/* ───────────────── Reset-ish & Typography ───────────────── */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: #0b1220;                /* var(--text) */
  background: #f8fafc;           /* var(--bg) */
  font-family: "Noto Sans KR","Apple SD Gothic Neo",system-ui,-apple-system,Segoe UI,Roboto,Inter,sans-serif;
  font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5 { margin: 0 0 12px; font-weight: 700; color: #0b1220; } /* var(--space-3) */
p { margin: 0 0 16px; color: #475569; }                                      /* var(--text-muted) */
a { color: #14347b; text-decoration: none; }                                 /* var(--color-primary) */
a:hover { color: #01154d; text-decoration: underline; }                      /* var(--color-primary-600) */

/* 레이아웃 헬퍼 */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }           /* var(--space-4) */
.section { padding: 40px 0; }                                                /* var(--space-10) */

/* ───────────────── Cards / Panels ───────────────── */
.card {
  background: #ffffff;                               /* var(--surface) */
  border: 1px solid #e2e8f0;                         /* var(--border) */
  border-radius: 16px;                               /* var(--radius-lg) */
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);      /* var(--shadow-sm) */
  padding: 24px;                                     /* var(--space-6) */
}
.card--flat { box-shadow: none; }
.card--elevated { box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08); }           /* var(--shadow-md) */

/* ───────────────── Buttons ───────────────── */
.btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; font-weight: 600; padding: 8px 12px; border-radius: 12px;       /* var(--radius-md) */
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,0.25); } /* var(--ring) */

/* Primary (블루) */
.btn--primary { background: #14347b; color: #fff; box-shadow: 0 2px 8px rgba(15,23,42,0.06); }
.btn--primary:hover { background: #01154d; transform: translateY(-1px); }
.btn--primary:active { background: #010921; transform: translateY(0); }

/* Neutral (그레이) */
.btn--neutral { background: #e2e8f0; color: #1f2937; } /* gray-200 / gray-800 */
.btn--neutral:hover { background: #cbd5e1; }           /* gray-300 */

/* Outline */
.btn--outline {
  background: transparent;
  border: 2px solid #14347b;
  color: #14347b;
}
.btn--outline:hover { background: rgba(1,44,139,.1); }

/* Ghost */
.btn--ghost { background: transparent; color: #14347b; }
.btn--ghost:hover { background: rgba(37,99,235,.06); }

/* Size */
.btn--sm { padding: 8px 12px; border-radius: 8px; font-size: 14px; }         /* var(--radius-sm) */
.btn--lg { padding: 14px 22px; border-radius: 16px; font-size: 17px; }       /* var(--radius-lg) */

/* ───────────────── Forms ───────────────── */
.form-control {
  width: 100%; padding: 12px 14px; border-radius: 12px;                      /* var(--radius-md) */
  border: 1px solid #e2e8f0; background: #ffffff; color: #0b1220;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.form-control::placeholder { color: #94a3b8; }                                /* gray-400 */
.form-control:focus { outline: none; border-color: #14347b; box-shadow: 0 0 0 3px rgba(37,99,235,0.25); }

.form-label { display: block; margin-bottom: 6px; font-size: 14px; color: #475569; }
.form-help { margin-top: 6px; font-size: 13px; color: #64748b; }              /* gray-500 */

.input-group { display: flex; gap: 8px; }
.input-group .form-control { flex: 1; }

.checkbox, .radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: #0b1220; }
.checkbox input, .radio input { width: 18px; height: 18px; accent-color: #14347b; }

/* ───────────────── Badges / Pills ───────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; border: 1px solid #e2e8f0; background: #f9fafb;
  color: #475569;
}
.badge--primary { border-color: rgba(37,99,235,.25); background: rgba(37,99,235,.08); color: #14347b; }
.badge--success { border-color: rgba(16,185,129,.25); background: rgba(16,185,129,.08); color: #10b981; }
.badge--warning { border-color: rgba(245,158,11,.25); background: rgba(245,158,11,.10); color: #f59e0b; }
.badge--danger  { border-color: rgba(239,68,68,.25);  background: rgba(239,68,68,.10); color: #ef4444; }

/* ───────────────── Alerts ───────────────── */
.alert {
  padding: 14px 16px; border-radius: 12px;
  border: 1px solid #e2e8f0; background: #f9fafb; color: #0b1220;
}
.alert--info    { border-color: rgba(37,99,235,.25); background: rgba(37,99,235,.08); }
.alert--success { border-color: rgba(16,185,129,.25); background: rgba(16,185,129,.08); }
.alert--warning { border-color: rgba(245,158,11,.25); background: rgba(245,158,11,.10); }
.alert--danger  { border-color: rgba(239,68,68,.25);  background: rgba(239,68,68,.10); }

/* ───────────────── Tables ───────────────── */
.table {
  width: 100%; border-collapse: separate; border-spacing: 0; background: #ffffff; border: 1px solid #e2e8f0;
  border-radius: 16px; overflow: hidden; box-shadow: 0 2px 8px rgba(15,23,42,0.06);
}
.table th, .table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid #e2e8f0; }
.table thead th { background: #f9fafb; color: #0b1220; font-weight: 700; }
.table tbody tr:hover { background: rgba(2, 6, 23, 0.03); }

/* ───────────────── Nav / Header / Footer ───────────────── */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #ffffff; border-bottom: 1px solid #e2e8f0;
  backdrop-filter: saturate(180%) blur(6px);
}
.site-header .nav{display:flex; gap:20px;}
.site-header .mobile-nav{display:none;}
.avatar{width:40px;height:40px;border:1px solid #ccc; border-radius:50%;overflow:hidden;object-fit:cover;object-position:center;}
.navbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.navbar ul.main-menu{display:flex;list-style:none;gap:10px;margin:0;height:60px;}
.navbar ul.main-menu li:nth-child(4){margin-left:100px;}
.navbar ul.main-menu button{border:none;background:#fff;}
.navbar ul.main-menu a,.navbar ul.main-menu button{font-weight:400;line-height:40px;display:block;margin:10px 0;}
.navbar ul.main-menu .head-log{padding:3px 8px; font-size:13px;border:1px solid #ccc; border-radius:5px;line-height:20px;height:28px;margin:16px 0;}
.navbar ul.main-menu .head-log:hover{text-decoration:none;background:#14347b;color:#fff;font-weight:700;}
.site-footer {
  background: #ffffff; border-top: 1px solid #e2e8f0;
  color: #475569; padding: 32px 0;      /* var(--space-8) */
}

/* ───────────────── Utility (간단 필수) ───────────────── */
.grid { display: grid; gap: 24px; }     /* var(--space-6) */
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
@media (max-width: 1200px) { .grid-2,.grid-3 { grid-template-columns: 1fr; } }

.mt-0{margin-top:0}.mt-4{margin-top:16px}.mt-6{margin-top:24px}.mt-8{margin-top:32px}
.mb-0{margin-bottom:0}.mb-4{margin-bottom:16px}.mb-6{margin-bottom:24px}.mb-8{margin-bottom:32px}
.p-0{padding:0}.p-4{padding:16px}.p-6{padding:24px}.p-8{padding:32px}

.shadow-sm{box-shadow:0 2px 8px rgba(15, 23, 42, 0.06)}
.shadow-md{box-shadow:0 8px 24px rgba(15, 23, 42, 0.08)}
.shadow-lg{box-shadow:0 16px 40px rgba(15, 23, 42, 0.10)}
.rounded-sm{border-radius:8px}.rounded-md{border-radius:12px}.rounded-lg{border-radius:16px}
.border { border: 1px solid #e2e8f0; }

/* ───────────────── Hero (선택) ───────────────── */
.hero {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(37,99,235,0.18), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
}
.hero__inner { padding: 80px 0; }
.hero__title { font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -0.02em; }
.hero__desc { font-size: 1em; color: #475569; }

/* ───────── 모바일 패널 (≤768px) ───────── */
@media (max-width:768px) {
  .hero{padding:0px 10px;}
  .navbar { height: 60px; }
  .site-header .nav { display: none; }

  .site-header .hamburger {
    display:flex !important;
    position: relative;
    margin-left:auto;
    width:44px; height:44px;
    padding:10px;
    z-index:1002;
    background:#fff;
    border:0; cursor:pointer;
    flex-direction:column;
  }
  .site-header .hamburger span{ display:block; height:3px;width:100%; border-radius:2px; background:#111; transition:.3s; }
  .site-header .hamburger span + span{ margin-top:7.5px; }
  .site-header .hamburger.is-active span:nth-child(1){ transform:rotate(45deg) translate(7.5px,7.5px); }
  .site-header .hamburger.is-active span:nth-child(2){ opacity:0; }
  .site-header .hamburger.is-active span:nth-child(3){ transform:rotate(-45deg) translate(7px,-7px); }

  /* 드로어 */
  .site-header .mobile-nav {
    display: none;
    position: fixed;
    top: 61px;              /* 헤더 높이와 맞추기 */
    right: 0;
    bottom: 0;
    width: 220px;
    background: #fff;
    border-left: 1px solid #eee;
    padding: 12px 0;
    z-index: 1001;
    height: 100dvh;         /* ← 오타 수정 (100dhv → 100dvh) */

    transform: translateX(100%);
    transition: transform .5s ease;
  }
  .site-header .mobile-nav ul.log{margin:10px auto;;padding:0;display:flex;justify-content:flex-end;gap:10px;width:200px;}
  .site-header .mobile-nav ul.log > li{list-style:none;}
  .site-header .mobile-nav ul.log > li > a.log-button{font-size:12px;width:80px;text-align:center;border:1px solid #ccc;border-radius:10px;}
  .site-header .mobile-nav ul li{list-style-position:inside;}
  .site-header .mobile-nav ul li a{display:inline-block;padding:5px 10px;width:150px;}
  .site-header .mobile-nav.is-ready { display: block; }
  .site-header .mobile-nav.is-open  { transform: translateX(0); }
  .site-header .mobile-nav .telefax{width:100%;height:50px;line-height:50px;border-top:3px solid #79797b;position:relative;top:0;left:0;background:#041d67;color:#fff;text-align:center;}

  /* 오버레이: 헤더 바깥에 둘 것이므로 .site-header 접두어 제거 */
  .nav-backdrop {
    position: fixed;
    top: 61px;              /* 헤더 높이만큼 비워주기 */
    left: 0;
    right: 0;               /* 기본은 전체 덮기 */
    bottom: 0;
    background: rgba(0,0,0,.28);
    z-index: 1000;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
  }
  /* 드로어 열림 시: 드로어(220px) 영역은 제외 */
  .nav-open .nav-backdrop.is-open {
    right: 220px;           /* 나머지 공간만 모달 처리 */
    opacity: 1;
    pointer-events: auto;
  }

  html { scrollbar-gutter: stable; }
  html.nav-open, body.nav-open { overflow:hidden; height:100dvh; }
}