:root {
  --primary: #0071e3;
  --primary-dark: #0058b0;
  --primary-light: #e8f2fd;
  --bg: #f5f5f7;
  --card: #ffffff;
  --border: #e5e5e5;
  --text: #1d1d1f;
  --muted: #86868b;
  --danger: #ff3b30;
  --success: #34c759;
  --warn: #ff9f0a;
  --sidebar-bg: #f5f5f7;
  --sidebar-border: #e5e5e5;
  --radius: 14px;
  --radius-sm: 10px;
}
* { box-sizing: border-box; }
html {
  overflow-x: hidden;
  width: 100%;
}
body {
  margin: 0;
  overflow-x: hidden;
  max-width: 100vw;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Malgun Gothic", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ===== 로그인 화면 ===== */
#login-screen {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fafafa 0%, #f0f0f2 100%);
}
.login-box {
  background: var(--card);
  padding: 44px 40px 36px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 16px 48px rgba(0,0,0,0.08);
  width: 340px;
  text-align: center;
}
.login-box h1 {
  font-size: 21px; font-weight: 600; letter-spacing: -0.02em;
  margin: 0; color: var(--text);
}
.login-box h1 .thin { font-weight: 400; color: var(--muted); }
.login-subtitle { font-size: 13px; color: var(--muted); margin: 4px 0 24px; }
.login-logo { display: block; max-width: 200px; max-height: 46px; width: auto; height: auto; margin: 0 auto 22px; object-fit: contain; }
.login-box input {
  width: 100%; padding: 12px 14px; margin-bottom: 12px;
  border: 1px solid var(--border); border-radius: 10px; font-size: 14px;
  background: #fbfbfd;
  transition: border-color .15s ease, background .15s ease;
}
.login-box input:focus {
  outline: none; border-color: var(--primary); background: #fff;
}
.login-box button {
  width: 100%; padding: 12px; background: var(--primary); color: #fff;
  border: none; border-radius: 10px; font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background .15s ease;
  margin-top: 4px;
}
.login-box button:hover { background: var(--primary-dark); }
.login-error { color: var(--danger); font-size: 13px; margin-top: 10px; }

/* ===== 앱 레이아웃 ===== */
#app { display: none; height: 100vh; }
.app-layout { display: flex; height: calc(100vh - 56px); }

/* ===== 가로형 상단 메뉴 (PC/태블릿) ===== */
.topbar {
  display: flex; align-items: center; height: 56px; padding: 0 20px;
  background: #fff; border-bottom: 1px solid var(--sidebar-border);
  gap: 16px;
}
.topbar-logo { flex-shrink: 0; }
.topbar-logo img { display: block; height: 22px; width: auto; object-fit: contain; margin-right: 28px; flex-shrink: 0; }

/* 로고를 제외한 나머지(메뉴+티커+계정영역) 전체를 하나의 가로 스크롤 단위로 묶습니다.
   창 폭이 좁아지면 이 영역 전체가 함께 스크롤되어, 메뉴뿐 아니라 환율/시간/계정 버튼까지 모두 접근 가능합니다. */
.topbar-scroll {
  display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: thin;
}
.topbar-scroll::-webkit-scrollbar { height: 4px; }
.topbar-scroll::-webkit-scrollbar-thumb { background: #d2d2d7; border-radius: 4px; }

.topbar-nav { display: flex; align-items: center; gap: 2px; white-space: nowrap; flex-shrink: 0; }
.topbar-nav .nav-link {
  padding: 8px 12px; border-radius: 8px; color: #48484a; text-decoration: none;
  font-size: 13px; font-weight: 400; cursor: pointer; white-space: nowrap;
  transition: background .12s ease, color .12s ease;
}
.topbar-nav .nav-link:hover { background: rgba(0,0,0,0.045); }
.topbar-nav .nav-link.active { background: var(--primary); color: #fff; font-weight: 500; }

.nav-dropdown { position: relative; flex-shrink: 0; }
.nav-dropdown-menu {
  display: none; position: fixed; z-index: 60;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); padding: 6px; min-width: 160px;
}
.nav-dropdown-menu.open { display: block; }
.nav-dropdown-menu .nav-link { display: block; border-radius: 7px; }

.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.topbar-user-label { font-size: 12px; color: var(--muted); margin-right: 4px; white-space: nowrap; }

.topbar-ticker {
  display: flex; align-items: center; gap: 6px; font-size: 12px; color: #48484a;
  background: #f5f5f7; border-radius: 8px; padding: 6px 12px; min-width: 140px;
  flex-shrink: 0; overflow: hidden; position: relative; height: 30px;
}
/* 환율 티커부터는 오른쪽으로 밀어서, 메뉴(More까지)와 확실히 분리합니다.
   가로 스크롤 컨테이너 안에서도 동작: 공간이 남으면 오른쪽 정렬되고, 창이 좁아 넘치면 자연스럽게 스크롤됩니다. */
#topbar-fx-ticker { margin-left: auto; }
.topbar-ticker .tk-icon { font-size: 13px; }
.topbar-ticker .tk-item {
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
  animation: tk-fade 0.4s ease;
}
.topbar-ticker .tk-code { color: #86868b; font-weight: 600; }
.topbar-ticker .tk-value { font-weight: 600; color: #1d1d1f; }
@keyframes tk-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.sidebar {
  width: 220px; background: var(--sidebar-bg); color: var(--text);
  display: none; flex-direction: column; flex-shrink: 0;
  border-right: 1px solid var(--sidebar-border);
}
.sidebar-header { padding: 24px 20px 40px; }
.sidebar-logo { display: block; max-width: 100%; max-height: 28px; width: auto; height: auto; object-fit: contain; }

.exchange-rates {
  padding: 12px 20px; margin: 8px 12px; border-radius: var(--radius-sm);
  background: #fff; border: 1px solid var(--border);
  font-size: 12px; color: var(--muted);
}
.exchange-rates .fx-row { display: flex; justify-content: space-between; margin-bottom: 4px; }
.exchange-rates .fx-code { color: var(--muted); }
.exchange-rates .fx-value { font-weight: 600; color: var(--text); }
.exchange-rates .fx-title { font-size: 11px; font-weight: 600; color: var(--text); margin-bottom: 6px; display: flex; align-items: center; gap: 5px; }
.leave-cal-cell { border: 1px solid var(--border); border-radius: 6px; min-height: 56px; padding: 4px; transition: background 0.1s; }
.leave-cal-cell:hover { background: #f5f7fa; }
.leave-cal-cell.empty { border: none; background: none; }
.exchange-rates .fx-updated { font-size: 10px; color: #b0b0b5; margin-top: 4px; }
.exchange-rates .fx-error { font-size: 11px; color: var(--danger); }

.sidebar nav { flex: 1; padding: 4px 12px; overflow-y: auto; }
.sidebar nav a, .sidebar .nav-link {
  display: block; padding: 9px 12px; margin-bottom: 2px; color: #48484a; text-decoration: none;
  font-size: 13.5px; font-weight: 400; cursor: pointer; border-radius: 8px;
  transition: background .12s ease, color .12s ease;
}
.sidebar nav a:hover, .sidebar .nav-link:hover { background: rgba(0,0,0,0.04); }
.sidebar nav a.active, .sidebar .nav-link.active { background: var(--primary); color: #fff; font-weight: 500; }
.sidebar .user-info { padding: 14px 20px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--sidebar-border); }
.sidebar .user-info #user-name-label { margin-bottom: 8px; font-weight: 500; color: var(--text); text-align: center; }
.sidebar .user-info .sidebar-btn { display: block; width: 100%; text-align: center; margin-top: 8px; box-sizing: border-box; text-decoration: none; }

.main { flex: 1; overflow-y: auto; padding: 32px 40px; }
.main h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 20px; color: var(--text); }

.card { background: var(--card); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); border: 1px solid rgba(0,0,0,0.04); }
.summary-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.summary-cards .stat { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); border: 1px solid rgba(0,0,0,0.04); }
.summary-cards .stat .num { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.summary-cards .stat .label { font-size: 12px; color: var(--muted); margin-top: 4px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); }
th { background: transparent; color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.02em; border-bottom: 1px solid var(--border); }
tr:hover td { background: #fafafa; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 10px; flex-wrap: wrap; }
.toolbar input[type=text], .toolbar select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; background: #fff; }
.tab-group { display: flex; gap: 6px; background: #ececee; padding: 3px; border-radius: 9px; }
.tab-group .btn { box-shadow: none; }
.tab-group .btn.small:not(.secondary) { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.tab-group .btn.secondary.small { background: transparent; color: var(--muted); }
.tab-group .btn.secondary.small:hover { background: rgba(0,0,0,0.03); }

.btn { padding: 9px 18px; background: var(--primary); color: #fff; border: none; border-radius: 980px; font-size: 13px; font-weight: 500; cursor: pointer; transition: background .15s ease; }
.btn:hover { background: var(--primary-dark); }
.btn.secondary { background: #f0f0f2; color: var(--text); }
.btn.secondary:hover { background: #e4e4e7; }
.btn.charcoal { background: #7c8189; color: #fff; }
.btn.charcoal:hover { background: #6b6f77; }
.btn.small { padding: 6px 14px; font-size: 12px; }

.badge { padding: 3px 10px; border-radius: 980px; font-size: 11px; font-weight: 600; }
.badge.대기 { background: #eee; color: #777; }
.badge.진행중, .badge.입고중, .badge.요청, .badge.완료요청 { background: #fff2dc; color: #b5720a; }
.badge.출고완료, .badge.입고완료, .badge.완료, .badge.승인 { background: #e3f8e9; color: #1c8a3c; }
.badge.취소, .badge.반려 { background: #ffe5e3; color: #d5241a; }

.modal-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.35); backdrop-filter: blur(2px);
  align-items: center; justify-content: center; z-index: 100;
}
.modal-backdrop.show { display: flex; }
.modal { background: #fff; border-radius: 18px; padding: 26px; width: 760px; max-width: 92vw; max-height: 88vh; min-width: 420px; min-height: 200px; overflow: auto; resize: both; box-shadow: 0 24px 64px rgba(0,0,0,0.2); }
.modal.modal-compact { width: auto; min-width: 260px; max-width: 380px; min-height: auto; height: auto; resize: none; padding: 24px 28px; }
.modal.modal-wide { width: 1120px; max-width: 95vw; padding: 32px 36px; }
.modal.modal-xwide { width: 1420px; max-width: 96vw; padding: 32px 36px; }
.modal h2 { margin-top: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }

/* ===== 이미지 라이트박스(레이어 팝업) — 새 브라우저 탭 대신 화면 위에 오버레이로 이미지를 크게 보여줍니다.
   기존 modal-backdrop(z-index:100)보다 더 위에 뜨도록 해서, Edit/Detail 모달을 띄운 채로도 이미지를 확인할 수 있습니다. ===== */
.image-lightbox-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.78);
  align-items: center; justify-content: center; z-index: 600; cursor: zoom-out;
}
.image-lightbox-backdrop.show { display: flex; }
.image-lightbox-backdrop img { max-width: 90vw; max-height: 88vh; border-radius: 10px; box-shadow: 0 24px 64px rgba(0,0,0,0.4); cursor: default; }
.image-lightbox-close {
  position: fixed; top: 20px; right: 28px; background: rgba(255,255,255,0.12); border: none; color: #fff;
  font-size: 18px; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; line-height: 1;
}
.image-lightbox-close:hover { background: rgba(255,255,255,0.22); }
.form-row { margin-bottom: 14px; }
/* New Receipt / New Shipment 폼처럼 항목이 많고 구조가 뚜렷하게 구분되어야 하는 폼에 사용하는 넉넉한 간격 */
.form-spacious .form-row { margin-bottom: 26px; }
.form-row label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; font-size: 13px;
  font-family: inherit; background: #fbfbfd; transition: border-color .15s ease, background .15s ease;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: var(--primary); background: #fff; }
.item-line { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; margin-bottom: 6px; align-items: center; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.error-msg { color: var(--danger); font-size: 13px; margin-top: 8px; }
.empty-state { color: var(--muted); font-size: 13px; padding: 24px; text-align: center; }
.link-btn { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 12px; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.order-link { color: var(--text); text-decoration: none; cursor: pointer; }
.order-link:hover { color: var(--primary); text-decoration: underline; }

.progress-wrap { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.progress-track { flex: 1; height: 6px; background: #ececee; border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 4px; }
.progress-fill.complete { background: var(--success); }
.progress-pct { font-size: 12px; color: var(--muted); min-width: 34px; text-align: right; }

@media print {
  .sidebar, .toolbar, .modal-actions, #modal-backdrop .btn { display: none !important; }
  body { background: #fff; }
  .main { padding: 0; }
}

/* =========================================================================
   스마트폰 전용 레이아웃 (max-width: 640px)
   태블릿(iPad 등, 보통 768px 이상)은 이 구간에 해당하지 않아 기존 PC 레이아웃 그대로 유지됩니다.
   주 기능(Scheduler, Samples, Attendance, Time Off)에 하단 바로가기 바를 제공하고,
   나머지 메뉴는 햄버거 버튼으로 여는 사이드바에서 접근합니다.
   ========================================================================= */
#mobile-menu-toggle, #mobile-bottom-nav, #mobile-sidebar-backdrop { display: none; }

@media (max-width: 640px) {
  /* 왼쪽 상단 햄버거 버튼은 제거하고, 하단 바로가기 바의 "Menu" 항목으로만 사이드바를 엽니다. */
  #mobile-menu-toggle { display: none !important; }

  /* Time Off 팝업: 달력을 위, 신청 폼을 아래로 세로 배치 */
  .timeoff-grid { display: block !important; }
  .timeoff-grid > div { width: 100%; }
  .timeoff-grid > div:first-child { margin-bottom: 18px; }

  /* User(계정 설정) 화면의 카드들도 스마트폰에서는 1열로 */
  .user-cards-grid { display: block !important; }
  /* PC/태블릿용 가로 상단바는 스마트폰에서 숨기고, 기존 하단 바로가기+슬라이드 사이드바 방식을 그대로 씁니다. */
  .topbar { display: none !important; }
  .app-layout { display: block; height: auto; min-height: 100vh; max-width: 100vw; overflow-x: hidden; }
  #app { max-width: 100vw; overflow-x: hidden; }

  .sidebar {
    display: flex; /* 데스크톱에서는 숨겨두지만, 모바일 드로어로 열릴 때는 다시 보여야 합니다. */
    position: fixed; top: 0; left: 0; bottom: 0; width: 78vw; max-width: 300px;
    z-index: 55; transform: translateX(-100%); transition: transform .2s ease;
    box-shadow: 2px 0 12px rgba(0,0,0,0.15); overflow-y: auto;
  }
  .sidebar.mobile-open { transform: translateX(0); }

  #mobile-sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 50;
  }
  #mobile-sidebar-backdrop.visible { display: block; }

  .main { padding: 16px 14px 78px; overflow-y: visible; max-width: 100vw; overflow-x: hidden; box-sizing: border-box; }
  .card { max-width: 100%; box-sizing: border-box; }

  h1 { font-size: 19px !important; }

  .toolbar { flex-direction: column; align-items: stretch !important; gap: 8px; }
  .toolbar > div { display: flex; flex-wrap: wrap; gap: 8px; }

  .card { padding: 14px; border-radius: 12px; }

  /* 표(테이블)는 가로 스크롤 + 첫 컬럼(식별용) 고정 */
  table { font-size: 12.5px; }
  .card > table, .card table { display: block; overflow-x: auto; white-space: nowrap; }
  table thead th:first-child, table tbody td:first-child {
    position: sticky; left: 0; background: #fff; z-index: 2;
    box-shadow: 2px 0 4px rgba(0,0,0,0.04);
  }
  table thead th:first-child { background: #f5f5f7; z-index: 3; }

  /* Scheduler 전용: 가로로 매우 긴 표라서 첫 컬럼 고정 + 살짝 더 작은 폰트로 스크롤 편의성 향상 */
  #sched-table { min-width: 900px; font-size: 11.5px; }
  #sched-table th, #sched-table td { padding: 5px 6px !important; }
  .sched-col-resizer { display: none; } /* 손가락 조작에서는 드래그 리사이즈가 오히려 불편하므로 숨김 */

  /* 하단 바로가기 바 */
  #mobile-bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 58;
    background: rgba(255,255,255,0.97); backdrop-filter: blur(8px);
    border-top: 1px solid var(--border); padding: 6px 2px calc(6px + env(safe-area-inset-bottom));
  }
  #mobile-bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: 10.5px; color: #6a6a6e; text-decoration: none; padding: 4px 2px; cursor: pointer;
    border-radius: 10px;
  }
  #mobile-bottom-nav a:active { background: rgba(0,0,0,0.05); }
  #mobile-bottom-nav .mbn-icon { font-size: 19px; line-height: 1; }

  /* 모달(팝업)이 화면을 꽉 채우도록 */
  #modal-backdrop .modal, .modal { width: 94vw !important; max-width: 94vw !important; min-width: 0 !important; max-height: 88vh; overflow-y: auto; padding: 18px !important; }

  .exchange-rates, #world-clock { display: none; } /* 스마트폰에서는 공간 절약을 위해 숨김, 사이드바 안에서는 그대로 노출 */
  .sidebar .exchange-rates, .sidebar #world-clock { display: block; }
}


/* ===== SO/PO 통합 워크플로우 화면 (Order Lines / Purchase Orders / Incoming / Shipments 탭) ===== */
.wf-actionbar { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 16px; flex-wrap: wrap; gap: 10px; }
.wf-left { display: flex; gap: 8px; flex-wrap: wrap; }
.wf-stepper { display: flex; align-items: center; }
.wf-step { padding: 7px 18px; font-size: 12px; font-weight: 600; color: #86868b; background: #f5f5f7; }
.wf-step.active { background: #e3f2ec; color: #1c8a3c; }
.wf-step:not(:first-child) { margin-left: -10px; clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0 50%); padding-left: 26px; }
.wf-step:first-child { border-radius: 8px 0 0 8px; }
.wf-step:last-child { border-radius: 0 8px 8px 0; }

.wf-doc-header { background: #fff; border-radius: 14px; padding: 24px 28px 0; border: 1px solid var(--border); border-bottom: none; }
.wf-doc-header h1 { font-size: 24px; font-weight: 700; color: #1d1d1f; }
.wf-doc-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 200px)); gap: 24px; margin-top: 14px; padding-bottom: 6px; font-size: 13px; }
.wf-doc-meta:last-of-type { padding-bottom: 20px; }
.wf-header-row { display: flex; align-items: flex-start; gap: 24px; margin-top: 14px; }
.wf-header-row:last-child { padding-bottom: 20px; }
.wf-images-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 0; flex-shrink: 0; }
.wf-images-row img { width: 90px; height: 90px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); flex-shrink: 0; }
.wf-doc-meta-col { flex: 1; min-width: 0; }
.wf-doc-meta-col .wf-doc-meta:last-of-type { padding-bottom: 0; }

/* ===== Incoming ↔ Shipments 빠른 탭 전환 (Logistics 통합) ===== */
.logistics-tabs { display: flex; gap: 4px; margin-bottom: 14px; }
.logistics-tabs button { background: #f5f5f7; color: #6a6a6e; border: none; padding: 7px 16px; border-radius: 9px; font-size: 13px; font-weight: 500; cursor: pointer; }
.logistics-tabs button.active { background: var(--primary); color: #fff; }
.logistics-tabs button:hover:not(.active) { background: #ececef; }

/* ===== 전역 빠른검색 (Sales Order / Incoming / Shipments 통합 점프) ===== */
.quick-search-panel {
  position: fixed; width: 340px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.12); padding: 10px; z-index: 500;
}
.quick-search-panel input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px;
  font-size: 13px; box-sizing: border-box; margin-bottom: 8px;
}
.quick-search-results { max-height: 360px; overflow-y: auto; }
.quick-search-group-title { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.3px; margin: 10px 0 4px; }
.quick-search-group-title:first-child { margin-top: 0; }
.quick-search-item { padding: 8px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.quick-search-item:hover { background: #f5f5f7; }
.quick-search-item .qs-main { font-weight: 500; color: #1d1d1f; }
.quick-search-item .qs-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.quick-search-empty { font-size: 12.5px; color: var(--muted); padding: 10px 4px; text-align: center; }
.wf-label { color: #86868b; font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 3px; }
.wf-value { color: #1d1d1f; font-weight: 600; }

.wf-tabs { display: flex; gap: 4px; padding: 0 28px; background: #fff; border: 1px solid var(--border); border-top: none; border-bottom: 1px solid #e5e5ea; }
.wf-tab { padding: 10px 18px; font-size: 13.5px; font-weight: 600; color: #86868b; cursor: pointer; border-bottom: 2px solid transparent; }
.wf-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.wf-count { display: inline-block; background: #f5f5f7; color: #6a6a6e; font-size: 10.5px; padding: 1px 6px; border-radius: 8px; margin-left: 4px; }
.wf-tab.active .wf-count { background: var(--primary); color: #fff; }

.wf-tab-body { background: #fff; border: 1px solid var(--border); border-top: none; border-radius: 0 0 14px 14px; padding: 20px 28px 28px; }
.wf-tab-body table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.wf-tab-body th { text-align: left; padding: 9px 10px; color: #86868b; font-weight: 600; font-size: 10.5px; text-transform: uppercase; border-bottom: 1px solid #eee; }
.wf-tab-body td { padding: 10px 10px; border-bottom: 1px solid #f2f2f4; }

.wf-subtabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.wf-subtab { padding: 8px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 600; background: #f5f5f7; color: #48484a; cursor: pointer; }
.wf-subtab.active { background: #1d1d1f; color: #fff; }
.wf-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; background: #d2d2d7; }
.wf-subtab.active .wf-dot { background: #34c759; }

.wf-panel { border: 1px solid #eee; border-radius: 12px; padding: 18px; }
.wf-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.wf-panel-header h3 { font-size: 14px; }
.wf-panel-meta { font-size: 11.5px; color: #86868b; margin-top: 2px; }

/* ===== Dashboard 위젯 (Apple 스타일) ===== */
.dash-card {
  background: #fff; border-radius: 18px; padding: 22px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.04);
}
.dash-card-title { font-size: 13px; font-weight: 600; color: #6a6a6e; margin-bottom: 16px; letter-spacing: 0.2px; }
.dash-trend-toggle .link-btn { background: #f5f5f7; color: #6a6a6e; }
.dash-trend-toggle .link-btn.active-toggle { background: var(--primary); color: #fff; }
