@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

/* ==========================================================================
   월드프레임 B2B — 공용 스타일
   보정 플랫폼(worldframe-retouch.kr)과 같은 톤앤매너를 쓴다.
   포인트 #0066cc · 배경 #fafafa · 흰 카드 + 1px 선 · 그림자 대신 선으로 나눈다.
   ========================================================================== */

:root {
  --wf-primary: #0066cc;
  --wf-primary-hover: #0058b0;
  --wf-primary-soft: #eaf1fd;
  --wf-logo: #3080f0;

  --wf-bg: #fafafa;
  --wf-surface: #ffffff;
  --wf-surface-soft: #f5f5f7;

  --wf-text: #1d1d1f;
  --wf-text-secondary: #7a7a7a;
  --wf-border: #e0e0e0;
  --wf-border-soft: #f0f0f0;

  --wf-red: #c1352b;
  --wf-red-soft: #fdeceb;
  --wf-green: #0f7b52;
  --wf-green-soft: #e7f5ef;
  --wf-amber: #8a6100;
  --wf-amber-soft: #fdf3e2;

  --wf-sidebar-width: 232px;
  --wf-header-height: 56px;
  --wf-radius-card: 18px;
  --wf-radius: 10px;
  --wf-transition: 160ms ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--wf-bg);
  color: var(--wf-text);
  font-family: "Pretendard Variable", Pretendard, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
  line-height: 1.5;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, a, input, select, textarea { font: inherit; letter-spacing: inherit; }
a { color: inherit; text-decoration: none; }
button { border: 0; background: none; cursor: pointer; color: inherit; }
svg { display: block; }
.wf-hidden { display: none !important; }
.wf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── 로고 ───────────────────────────────────────────────────────────── */
.wf-logo {
  display: inline-flex; align-items: center; gap: 7px; min-height: 36px;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--wf-logo); font-size: 22px; font-weight: 800; letter-spacing: -0.03em;
}
.wf-logo-tag {
  border-radius: 5px; background: var(--wf-primary-soft); color: var(--wf-primary);
  padding: 2px 6px; font-family: inherit; font-size: 11px; font-weight: 800; letter-spacing: 0;
  transform: translateY(1px);
}

/* ── 앱 뼈대 ─────────────────────────────────────────────────────────── */
.wf-app { min-height: 100vh; }
.wf-mobile-toggle { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.wf-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 50;
  display: flex; width: var(--wf-sidebar-width); flex-direction: column;
  border-right: 1px solid var(--wf-border);
  background: #fff;
  padding: 22px 16px;
  transition: transform 220ms ease;
}
.wf-sidebar .wf-logo { padding: 0 12px; }
.wf-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 32px; }
.wf-nav-label {
  margin: 18px 0 6px; padding: 0 12px;
  color: var(--wf-text-secondary); font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
}
.wf-nav-label:first-child { margin-top: 0; }
.wf-nav-link {
  display: flex; align-items: center; gap: 10px;
  border-radius: 8px; padding: 11px 12px;
  color: var(--wf-text); font-size: 14px; font-weight: 600;
  transition: background var(--wf-transition), color var(--wf-transition);
}
.wf-nav-link:hover { background: var(--wf-surface-soft); }
.wf-nav-link.is-active { background: var(--wf-primary); color: #fff; }
.wf-nav-icon { display: grid; width: 20px; height: 20px; flex: 0 0 20px; place-items: center; }
.wf-nav-count {
  margin-left: auto; border-radius: 999px; background: var(--wf-surface-soft);
  padding: 1px 7px; font-size: 12px; font-weight: 700; color: var(--wf-text-secondary);
}
.wf-nav-link.is-active .wf-nav-count { background: rgba(255,255,255,0.22); color: #fff; }

.wf-help-card { margin-top: auto; border-top: 1px solid var(--wf-border-soft); padding-top: 16px; }
.wf-help-title { margin: 0 0 6px; color: var(--wf-text-secondary); font-size: 12px; line-height: 1.5; }
.wf-help-link { display: inline-flex; align-items: center; gap: 4px; color: var(--wf-primary); font-size: 14px; font-weight: 600; }

.wf-sidebar-overlay { display: none; }

/* ── 헤더 ───────────────────────────────────────────────────────────── */
.wf-header {
  position: sticky; top: 0; z-index: 30;
  height: var(--wf-header-height);
  margin-left: var(--wf-sidebar-width);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.wf-header-inner {
  display: flex; max-width: 1320px; height: 100%;
  align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 auto; padding: 0 32px;
}
.wf-header-left { display: flex; align-items: center; gap: 6px; min-width: 0; }
.wf-header-title { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-menu-button {
  display: none; width: 40px; height: 40px; margin-left: -8px;
  place-items: center; border-radius: 10px;
  transition: background var(--wf-transition);
}
.wf-menu-button:hover { background: var(--wf-surface-soft); }
.wf-header-actions { display: flex; align-items: center; gap: 10px; }
.wf-icon-button {
  display: grid; width: 36px; height: 36px; place-items: center;
  border-radius: 50%; color: var(--wf-text-secondary);
  transition: background var(--wf-transition), color var(--wf-transition);
}
.wf-icon-button:hover { background: var(--wf-surface-soft); color: var(--wf-primary); }
.wf-user { display: flex; align-items: center; gap: 8px; border-radius: 10px; padding: 4px 6px; transition: background var(--wf-transition); }
.wf-user:hover { background: var(--wf-surface-soft); }
.wf-avatar {
  display: grid; width: 28px; height: 28px; place-items: center;
  border-radius: 50%; background: var(--wf-primary-soft); color: var(--wf-primary);
  font-size: 12px; font-weight: 700;
}
.wf-user-name { font-size: 14px; }

/* ── 본문 ───────────────────────────────────────────────────────────── */
.wf-main { margin-left: var(--wf-sidebar-width); padding: 44px 32px 72px; }
.wf-container { max-width: 1320px; margin: 0 auto; }
.wf-narrow { max-width: 860px; }

.wf-page-head { margin-bottom: 32px; }
.wf-page-title { margin: 0 0 8px; font-size: clamp(26px, 6vw, 34px); font-weight: 600; line-height: 1.15; }
.wf-page-desc { margin: 0; color: #333; font-size: 16px; line-height: 1.5; }

.wf-section { margin-bottom: 40px; }
.wf-section:last-child { margin-bottom: 0; }
.wf-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.wf-section-title { margin: 0; font-size: 18px; font-weight: 600; }
.wf-section-desc { margin: 4px 0 0; color: var(--wf-text-secondary); font-size: 14px; }

/* ── 카드 ───────────────────────────────────────────────────────────── */
.wf-card {
  border: 1px solid var(--wf-border); border-radius: var(--wf-radius-card);
  background: var(--wf-surface); padding: 24px;
}
.wf-card-flush { padding: 0; overflow: hidden; }
.wf-grid { display: grid; gap: 16px; }
.wf-grid-4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.wf-grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.wf-grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.wf-stat {
  display: flex; flex-direction: column; text-align: left;
  border: 1px solid var(--wf-border); border-radius: var(--wf-radius-card);
  background: var(--wf-surface); padding: 20px 22px;
  transition: border-color var(--wf-transition);
}
a.wf-stat:hover, button.wf-stat:hover { border-color: #b0b0b0; }
.wf-stat.is-active { border-color: var(--wf-primary); }
.wf-stat-label { margin: 0 0 14px; color: var(--wf-text-secondary); font-size: 14px; }
.wf-stat-value { font-size: 30px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.wf-stat-unit { margin-left: 3px; font-size: 15px; font-weight: 500; color: var(--wf-text-secondary); }

/* ── 버튼 ───────────────────────────────────────────────────────────── */
.wf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: var(--wf-radius); padding: 11px 18px;
  font-size: 15px; font-weight: 600; white-space: nowrap;
  transition: background var(--wf-transition), border-color var(--wf-transition), color var(--wf-transition);
}
.wf-btn-primary { background: var(--wf-primary); color: #fff; }
.wf-btn-primary:hover { background: var(--wf-primary-hover); }
.wf-btn-ghost { border: 1px solid var(--wf-border); background: #fff; }
.wf-btn-ghost:hover { border-color: #b0b0b0; }
.wf-btn-quiet { color: var(--wf-text-secondary); padding: 8px 10px; }
.wf-btn-quiet:hover { background: var(--wf-surface-soft); color: var(--wf-text); }
.wf-btn-sm { padding: 7px 12px; font-size: 14px; border-radius: 8px; }
.wf-btn-block { width: 100%; }
.wf-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── 입력 ───────────────────────────────────────────────────────────── */
.wf-field { display: block; margin-bottom: 16px; }
.wf-field-label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 600; }
.wf-field-hint { margin: 6px 0 0; color: var(--wf-text-secondary); font-size: 13px; }
.wf-input, .wf-select, .wf-textarea {
  width: 100%; border: 1px solid var(--wf-border); border-radius: var(--wf-radius);
  background: #fff; padding: 12px 14px; font-size: 15px; color: var(--wf-text);
  transition: border-color var(--wf-transition), box-shadow var(--wf-transition);
}
.wf-input:focus, .wf-select:focus, .wf-textarea:focus {
  outline: 0; border-color: var(--wf-primary); box-shadow: 0 0 0 3px var(--wf-primary-soft);
}
.wf-input::placeholder, .wf-textarea::placeholder { color: #b0b0b0; }
.wf-textarea { min-height: 110px; resize: vertical; }

/* ── 표 ─────────────────────────────────────────────────────────────── */
.wf-table-wrap { overflow-x: auto; }
.wf-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.wf-table th, .wf-table td { padding: 14px 18px; text-align: left; white-space: nowrap; }
.wf-table thead th {
  border-bottom: 1px solid var(--wf-border);
  color: var(--wf-text-secondary); font-size: 13px; font-weight: 600;
}
.wf-table tbody tr { border-bottom: 1px solid var(--wf-border-soft); }
.wf-table tbody tr:last-child { border-bottom: 0; }
.wf-table tbody tr:hover { background: #fbfbfd; }
.wf-table .wf-num { text-align: right; font-variant-numeric: tabular-nums; }

/* ── 상태 뱃지 ──────────────────────────────────────────────────────── */
.wf-badge {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 4px 10px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--wf-surface-soft); color: var(--wf-text-secondary);
}
.wf-badge-blue { background: var(--wf-primary-soft); color: var(--wf-primary); }
.wf-badge-green { background: var(--wf-green-soft); color: var(--wf-green); }
.wf-badge-amber { background: var(--wf-amber-soft); color: var(--wf-amber); }
.wf-badge-red { background: var(--wf-red-soft); color: var(--wf-red); }

/* ── 빈 상태 ────────────────────────────────────────────────────────── */
.wf-empty { padding: 56px 24px; text-align: center; }
.wf-empty-title { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.wf-empty-desc { margin: 0 0 18px; color: var(--wf-text-secondary); font-size: 14px; line-height: 1.5; }

/* ── 로그인 / 신청 화면 ─────────────────────────────────────────────── */
.wf-auth { display: flex; min-height: 100vh; flex-direction: column; }
.wf-auth-main { flex: 1; display: grid; place-items: center; padding: 40px 20px; }
.wf-auth-card {
  width: 100%; max-width: 420px;
  border: 1px solid var(--wf-border); border-radius: var(--wf-radius-card);
  background: var(--wf-surface); padding: 36px 32px;
}
.wf-auth-wide { max-width: 560px; }
.wf-auth-title { margin: 22px 0 6px; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.wf-auth-desc { margin: 0 0 28px; color: var(--wf-text-secondary); font-size: 15px; line-height: 1.5; }
.wf-auth-foot { margin: 22px 0 0; text-align: center; font-size: 14px; color: var(--wf-text-secondary); }
.wf-auth-foot a { color: var(--wf-primary); font-weight: 600; }
.wf-notice { margin: 16px 0 0; font-size: 14px; line-height: 1.45; color: var(--wf-primary); text-align: center; }
.wf-notice-error { color: var(--wf-red); }

/* ── 푸터 ───────────────────────────────────────────────────────────── */
.wf-footer { border-top: 1px solid var(--wf-border); background: #fff; }
.wf-app .wf-footer { margin-left: var(--wf-sidebar-width); }
.wf-footer-inner {
  display: flex; max-width: 1320px; gap: 20px; justify-content: space-between; flex-wrap: wrap;
  margin: 0 auto; padding: 26px 32px;
  color: var(--wf-text-secondary); font-size: 13px; line-height: 1.6;
}
.wf-footer-inner p { margin: 0; }
.wf-footer-right { text-align: right; }

/* ── 모바일 ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .wf-sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0,0,0,0.12); }
  .wf-mobile-toggle:checked ~ .wf-sidebar { transform: translateX(0); }
  .wf-mobile-toggle:checked ~ .wf-sidebar-overlay {
    display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,0.28);
  }
  .wf-header, .wf-main, .wf-app .wf-footer { margin-left: 0; }
  .wf-header-inner, .wf-footer-inner { padding-left: 18px; padding-right: 18px; }
  .wf-main { padding: 28px 18px 56px; }
  .wf-menu-button { display: grid; }
  .wf-user-name { display: none; }
  .wf-footer-right { text-align: left; }
  .wf-table th, .wf-table td { padding: 12px 14px; }
}
