/* ===== 광고현황 대시보드 — V1 Enterprise SaaS (Deep Blue) =====
   Sober enterprise tone: left sidebar, dense tables, flat cards,
   deep navy brand, no aurora/glass/gradients in chrome. */

:root {
  /* Neutrals (slate) */
  --ink-900: #0f172a;
  --ink-800: #1e293b;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748b;
  --ink-400: #94a3b8;
  --ink-300: #cbd5e1;
  --ink-200: #e2e8f0;
  --ink-150: #eaedf3;
  --ink-100: #f1f5f9;
  --ink-50:  #f8fafc;
  --paper:   #ffffff;
  --canvas:  #f4f5f8;

  /* Brand — deep navy (enterprise) */
  --brand-50:  #eef3ff;
  --brand-100: #dbe6ff;
  --brand-200: #b9cdff;
  --brand-300: #90acf4;
  --brand-400: #5a7ae6;
  --brand-500: #3b63e7;
  --brand-600: #2a4fd1;
  --brand-700: #1e40af;
  --brand-800: #1e3a8a;
  --brand-900: #0f1f4c;   /* sidebar / navy anchor */
  --brand-950: #0a1738;

  /* Semantic */
  --good-50: #ecfdf5;
  --good-100: #d1fae5;
  --good-500: #10b981;
  --good-600: #059669;
  --good-700: #047857;
  --warn-50: #fffbeb;
  --warn-100: #fef3c7;
  --warn-500: #f59e0b;
  --warn-600: #d97706;
  --warn-700: #b45309;
  --bad-50:  #fef2f2;
  --bad-100: #fee2e2;
  --bad-500: #ef4444;
  --bad-600: #dc2626;
  --bad-700: #b91c1c;

  /* Removed gradient chrome; these are kept only for fills we may still need */
  --accent-violet: #6366f1;
  --accent-amber:  #d97706;
  --accent-mint:   #059669;

  /* Shape */
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  /* Shadows — whisper-quiet */
  --shadow-xs: 0 1px 1px rgba(15, 23, 42, 0.03);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 2px 6px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 30px -8px rgba(15, 23, 42, 0.14);

  /* Sidebar */
  --side-w: 216px;

  --ease: cubic-bezier(.2,.7,.2,1);
  --dur: 160ms;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: "Pretendard Variable", Pretendard, "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--canvas);
  color: var(--ink-900);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: -0.003em;
  min-height: 100%;
}

.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ========== App shell (sidebar + main) ========== */
.app-shell {
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
  min-height: 100vh;
}
@media (max-width: 820px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ========== Sidebar ========== */
.sidebar {
  background: var(--brand-900);
  color: #e2e8f0;
  position: sticky; top: 0;
  height: 100vh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand-logo {
  width: 26px; height: 26px; border-radius: 5px;
  background: var(--brand-500);
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}
.sidebar-section-title {
  padding: 18px 18px 6px;
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.sidebar-nav { display: flex; flex-direction: column; padding: 4px 0; }
.sidebar-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 18px;
  font-size: 12.5px;
  color: #94a3b8;
  border-left: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all .12s var(--ease);
}
.sidebar-nav-item:hover { color: #e2e8f0; background: rgba(255,255,255,0.04); }
.sidebar-nav-item.active {
  color: #fff;
  background: rgba(59,99,231,0.18);
  border-left-color: var(--brand-500);
  font-weight: 600;
}
.sidebar-nav-item svg { width: 15px; height: 15px; opacity: 0.85; }
.sidebar-mgr {
  padding: 6px 18px;
  font-size: 11.5px;
  display: flex; justify-content: space-between; align-items: center;
  color: #cbd5e1;
}
.sidebar-mgr-count { color: #64748b; font-variant-numeric: tabular-nums; }
.sidebar-mgr-dot { width: 7px; height: 7px; border-radius: 2px; display: inline-block; margin-right: 8px; }
.sidebar-footer {
  margin-top: auto;
  padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 10.5px;
  color: #64748b;
  display: flex; flex-direction: column; gap: 4px;
}
.sidebar-footer .row { justify-content: space-between; }

/* ========== Main ========== */
.main {
  min-width: 0;
  padding: 18px 24px 40px;
  max-width: 100%;
}
.main-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.page-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  margin: 0;
}
.page-crumbs {
  font-size: 11px;
  color: var(--ink-500);
  margin-bottom: 2px;
}
.page-meta { font-size: 11.5px; color: var(--ink-500); }

/* ========== Banner (info strip) ========== */
.banner {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  font-size: 11px;
  background: #fff9e6;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  color: #854d0e;
  margin-bottom: 14px;
}
.banner::before {
  content: "⚠"; font-size: 12px;
}

/* ========== Chips ========== */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.6;
  white-space: nowrap;
}
.chip-dot { width: 6px; height: 6px; border-radius: 2px; }

.chip-mgr {
  background: var(--ink-100);
  color: var(--ink-800);
  border: 1px solid var(--ink-200);
}
.chip-mgr .chip-dot { background: var(--ink-400); }
.chip-mgr[data-m="남유진"] { background: #eef3ff; color: #1f3eae; border-color: #dbe5ff; }
.chip-mgr[data-m="남유진"] .chip-dot { background: #3b63e7; }
.chip-mgr[data-m="남혜원"] { background: #fef3e6; color: #92610a; border-color: #fbe3bf; }
.chip-mgr[data-m="남혜원"] .chip-dot { background: #d97706; }
.chip-mgr[data-m="김수정"] { background: #eefaf3; color: #047857; border-color: #c7ecd4; }
.chip-mgr[data-m="김수정"] .chip-dot { background: #10b981; }
.chip-mgr[data-m="김종은"] { background: #fdecec; color: #991b1b; border-color: #fbd3d3; }
.chip-mgr[data-m="김종은"] .chip-dot { background: #dc2626; }

.chip-cat-side      { background: #eaf4fb; color: #0c4a6e; }
.chip-cat-package   { background: #efe9fb; color: #5b21b6; }
.chip-cat-single    { background: #fef3c7; color: #92400e; }
.chip-cat-tm_service{ background: #d9f5e5; color: #065f46; }
.chip-cat-tm_package{ background: #ccecec; color: #0f766e; }
.chip-cat-recommend { background: #fde5ec; color: #9d174d; }
.chip-cat-free      { background: var(--ink-150); color: var(--ink-600); }

.chip-ch-meta1  { background: #e3f1fb; color: #0369a1; }
.chip-ch-meta2  { background: #e6e9ff; color: #3730a3; }
.chip-ch-meta3  { background: #ede4fb; color: #5b21b6; }
.chip-ch-google { background: #fef3c7; color: #92400e; }
.chip-ch-daangn { background: #fee7d4; color: #9a3412; }
.chip-ch-youtube{ background: #fde5e5; color: #b91c1c; }
.chip-ch-tm     { background: #d9f5e5; color: #065f46; }

.chip-note-briefing { background: #e3ecfb; color: #1e40af; }
.chip-note-progress { background: #d9f5e5; color: #065f46; }
.chip-note-issue    { background: #fde5e5; color: #b91c1c; }
.chip-note-client   { background: #efe4fb; color: #6b21a8; }
.chip-note-etc      { background: var(--ink-150); color: var(--ink-600); }

.chip-good { background: var(--good-100); color: var(--good-700); }
.chip-warn { background: var(--warn-100); color: var(--warn-700); }
.chip-bad  { background: var(--bad-100); color: var(--bad-700); }
.chip-neutral { background: var(--ink-150); color: var(--ink-700); }

/* D-Day chips */
.chip-dday-done { background: #ecfdf5; color: #047857; border: 1px solid #c7ecd4; }
.chip-dday-soon { background: #fef2f2; color: #b91c1c; border: 1px solid #fbd3d3; }
.chip-dday-watch{ background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.chip-dday-ok   { background: var(--ink-100); color: var(--ink-600); border: 1px solid var(--ink-200); }

/* ========== Cards ========== */
.card {
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.card-hover:hover { border-color: var(--ink-300); }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ink-150);
  gap: 12px;
  background: var(--ink-50);
}
.section-title {
  font-size: 10.5px; font-weight: 700;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.section-subtitle { font-size: 11.5px; color: var(--ink-500); margin-top: 2px; }

/* ========== Forms ========== */
.label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-500);
  margin-bottom: 5px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--ink-300);
  background: var(--paper);
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-family: inherit;
  color: var(--ink-900);
  transition: border-color .12s var(--ease), box-shadow .12s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-400); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-400); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(42, 79, 209, 0.15);
}
.input-ghost {
  width: 100%; border: 1px solid transparent; background: transparent;
  padding: 3px 7px; border-radius: 4px; font-size: inherit; font-family: inherit;
  color: inherit; font-weight: inherit;
}
.input-ghost:hover { background: var(--ink-100); }
.input-ghost:focus { outline: none; background: var(--paper); border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(42, 79, 209, 0.15); }

select.input, select.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  padding-right: 26px;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  transition: all .12s var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  font-family: inherit;
}
.btn:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.btn-primary {
  background: var(--brand-700);
  color: white;
  border-color: var(--brand-800);
}
.btn-primary:hover { background: var(--brand-800); }
.btn-gradient { /* alias to primary for compatibility */
  background: var(--brand-700); color: white; border-color: var(--brand-800);
}
.btn-gradient:hover { background: var(--brand-800); }
.btn-secondary {
  background: var(--paper);
  color: var(--ink-800);
  border-color: var(--ink-300);
}
.btn-secondary:hover { background: var(--ink-100); border-color: var(--ink-400); }
.btn-ghost { background: transparent; color: var(--ink-600); }
.btn-ghost:hover { background: var(--ink-100); color: var(--ink-900); }
.btn-danger { background: var(--paper); color: var(--bad-700); border-color: var(--bad-100); }
.btn-danger:hover { background: var(--bad-50); }
.btn-sm { padding: 5px 10px; font-size: 11.5px; }
.btn-xs { padding: 3px 8px; font-size: 10.5px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ink-300); background: var(--paper);
  color: var(--ink-600); cursor: pointer;
  transition: all .12s var(--ease);
}
.icon-btn:hover { background: var(--ink-100); color: var(--ink-900); border-color: var(--ink-400); }

/* ========== Segmented control ========== */
.seg {
  display: inline-flex;
  background: var(--ink-100);
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ink-200);
  gap: 2px;
}
.seg button {
  border: 0; background: transparent;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 11.5px; font-weight: 500;
  color: var(--ink-600);
  cursor: pointer;
  transition: all .12s var(--ease);
  font-family: inherit;
  display: inline-flex; align-items: center; gap: 5px;
}
.seg button:hover { color: var(--ink-900); }
.seg button.active {
  background: var(--paper);
  color: var(--ink-900);
  box-shadow: var(--shadow-xs), 0 0 0 1px var(--ink-200);
  font-weight: 600;
}

/* ========== Table ========== */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--ink-50);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--ink-200);
  white-space: nowrap;
}
.tbl tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--ink-150);
  font-size: 12.5px;
  color: var(--ink-800);
  vertical-align: middle;
}
.tbl tbody tr { transition: background .1s var(--ease); }
.tbl tbody tr:hover { background: var(--ink-50); cursor: pointer; }
.tbl tbody tr:last-child td { border-bottom: 0; }

/* Dense variant */
html[data-dense="true"] .tbl tbody td { padding: 5px 12px; font-size: 12px; }

.row-primary { font-weight: 600; color: var(--ink-900); letter-spacing: -0.01em; }
.row-muted { color: var(--ink-500); font-size: 11.5px; }

.cell-input {
  width: 100%; border: 0; background: transparent;
  padding: 5px 7px; font-size: 11px; text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink-800);
  border-radius: 3px;
  font-family: inherit;
}
.cell-input:focus { outline: 2px solid var(--brand-500); outline-offset: -2px; background: var(--paper); }

/* ========== Toast ========== */
.toast {
  position: fixed; bottom: 20px; right: 20px;
  background: var(--ink-900); color: white;
  padding: 9px 14px;
  border-radius: var(--radius);
  font-size: 12px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(8px);
  transition: all .18s var(--ease);
  pointer-events: none;
  z-index: 100;
  display: inline-flex; align-items: center; gap: 8px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  background: var(--good-500);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8l3 3 7-7' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/70% no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8l3 3 7-7' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/70% no-repeat;
}

/* ========== KPIs ========== */
.kpi-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
@media (max-width: 980px) { .kpi-row { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  padding: 12px 14px;
  position: relative;
}
.kpi-label {
  font-size: 10px; font-weight: 600; color: var(--ink-500);
  text-transform: uppercase; letter-spacing: 0.06em;
  display: inline-flex; align-items: center; gap: 6px;
}
.kpi-accent-bar {
  width: 20px; height: 2px; border-radius: 1px;
}
.kpi-body {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-top: 8px;
  gap: 8px;
}
.kpi-value {
  font-size: 22px; font-weight: 700; color: var(--ink-900);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.kpi-sub {
  font-size: 10.5px; font-weight: 500; margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.kpi-sub.up { color: var(--good-600); }
.kpi-sub.down { color: var(--bad-600); }
.kpi-sub.neutral { color: var(--ink-500); }
.kpi-spark { width: 72px; height: 26px; flex-shrink: 0; }

/* ========== Tabs ========== */
.tabs {
  display: flex; align-items: center; gap: 0;
  border-bottom: 1px solid var(--ink-200);
  padding-left: 2px;
}
.tab {
  padding: 9px 14px;
  font-size: 12.5px; font-weight: 500;
  color: var(--ink-500);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  background: transparent; border-left: 0; border-right: 0; border-top: 0;
  transition: color .12s var(--ease), border-color .12s var(--ease);
  font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
}
.tab:hover { color: var(--ink-900); }
.tab.active { color: var(--brand-700); border-bottom-color: var(--brand-600); font-weight: 600; }

/* ========== Progress ring + bar ========== */
.ring-wrap { position: relative; width: 120px; height: 120px; flex-shrink: 0; }
.ring-inner {
  position: absolute; inset: 8px;
  background: var(--paper);
  border-radius: 999px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.progress-bar {
  height: 6px; border-radius: 3px; background: var(--ink-150); overflow: hidden;
}
.progress-bar-fill {
  height: 100%; border-radius: 3px;
  transition: width .4s var(--ease);
  background: var(--brand-600);
}

/* ========== Filter bar ========== */
.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) 1fr 1fr 1fr;
  gap: 10px;
  align-items: end;
}
@media (max-width: 820px) { .filter-bar { grid-template-columns: 1fr 1fr; } }

.search-wrap { position: relative; }
.search-wrap .input { padding-left: 32px; font-size: 12.5px; }
.search-wrap svg {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--ink-400); pointer-events: none;
}

/* ========== Detail summary / stat strip ========== */
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr) 160px;
  gap: 0;
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
}
@media (max-width: 820px) {
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-strip-ring { grid-column: span 2; }
}
.stat-cell {
  padding: 12px 16px;
  border-right: 1px solid var(--ink-150);
  display: flex; flex-direction: column; gap: 3px;
  min-width: 0;
}
.stat-cell:last-child { border-right: 0; }
.stat-cell-label {
  font-size: 10px; font-weight: 600;
  color: var(--ink-500); text-transform: uppercase; letter-spacing: 0.06em;
}
.stat-cell-value {
  font-size: 16px; font-weight: 700;
  color: var(--ink-900); font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em; line-height: 1.1;
}
.stat-cell-sub { font-size: 10.5px; color: var(--ink-500); font-variant-numeric: tabular-nums; }
.stat-cell-sub.up { color: var(--good-600); }
.stat-cell-sub.down { color: var(--bad-600); }
.stat-strip-ring {
  display: flex; align-items: center; justify-content: center;
  background: var(--ink-50);
  padding: 10px;
}

/* compact summary (for legacy spend-board use) */
.summary-bar {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px;
  background: var(--ink-200);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 980px) { .summary-bar { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .summary-bar { grid-template-columns: repeat(2, 1fr); } }
.summary-cell {
  background: var(--paper);
  padding: 9px 12px;
}
.summary-cell[data-highlight="true"] {
  background: var(--brand-50);
}
.summary-cell-label { font-size: 10px; font-weight: 600; color: var(--ink-500); text-transform: uppercase; letter-spacing: 0.04em; }
.summary-cell-value { font-weight: 700; color: var(--ink-900); font-variant-numeric: tabular-nums; text-align: right; font-size: 13px; margin-top: 2px; }
.summary-cell input { background: transparent; border: 0; font: inherit; color: inherit; text-align: right; width: 100%; padding: 0; }
.summary-cell input:focus { outline: none; }

/* ========== Checks grid (status board) ========== */
.check-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ink-200);
  background: var(--paper);
  transition: all .12s var(--ease);
  cursor: pointer;
}
.check-row:hover { border-color: var(--ink-400); background: var(--ink-50); }
.check-row[data-done="true"] { background: var(--good-50); border-color: #c7ecd4; }
.check-dot {
  width: 18px; height: 18px; border-radius: 3px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid var(--ink-300);
  color: transparent;
  font-size: 11px; font-weight: 700;
  transition: all .12s var(--ease);
  background: var(--paper);
}
.check-row[data-done="true"] .check-dot {
  background: var(--good-600); border-color: var(--good-600); color: white;
}
.check-label { font-size: 12.5px; font-weight: 500; color: var(--ink-800); }
.check-row[data-done="true"] .check-label { color: var(--good-700); }
.check-desc { font-size: 11px; color: var(--ink-500); margin-top: 2px; }

/* ========== Product rows ========== */
.product-row {
  display: grid;
  grid-template-columns: 84px 1fr 130px 140px 1.2fr 30px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-sm);
  background: var(--paper);
}
.product-row:hover { border-color: var(--ink-300); }

/* ========== Spend table ========== */
.spend-wrap { overflow-x: auto; border: 1px solid var(--ink-200); border-radius: var(--radius-sm); }
.spend-tbl { border-collapse: separate; border-spacing: 0; font-size: 11px; font-variant-numeric: tabular-nums; }
.spend-tbl th, .spend-tbl td {
  border-right: 1px solid var(--ink-150);
  border-bottom: 1px solid var(--ink-150);
  padding: 5px 4px;
  text-align: center;
  background: var(--paper);
}
.spend-tbl thead th {
  background: var(--ink-50); font-weight: 600; color: var(--ink-500);
  position: sticky; top: 0;
}
.spend-tbl .row-label {
  position: sticky; left: 0; z-index: 2;
  background: var(--ink-50); text-align: left;
  padding: 7px 11px; font-weight: 500; color: var(--ink-800);
  min-width: 140px; border-right: 1px solid var(--ink-200);
}
.spend-tbl td.active-range {
  background: #eef3ff; color: var(--brand-700); font-weight: 500;
}
.spend-tbl tfoot td, .spend-tbl td.totals {
  background: var(--ink-50); font-weight: 600;
}

/* ========== Overlay / modal ========== */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn .15s var(--ease);
}
.modal {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  animation: popIn .18s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(.98) translateY(4px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* ========== Empty states ========== */
.empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--ink-400);
  font-size: 12.5px;
}
.empty-title { color: var(--ink-600); font-weight: 600; font-size: 13px; margin-bottom: 4px; }

/* ========== Divider ========== */
.hr { height: 1px; background: var(--ink-200); border: 0; margin: 0; }
.divider-vert { width: 1px; height: 14px; background: var(--ink-200); }

/* ========== Links ========== */
a.link { color: var(--brand-700); text-decoration: none; transition: color .12s var(--ease); }
a.link:hover { color: var(--brand-800); text-decoration: underline; }

/* ========== Site card grid (enterprise — flat, left-accent strip) ========== */
.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}
.site-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius);
  padding: 14px 14px 12px 18px;
  cursor: pointer;
  transition: border-color .12s var(--ease), box-shadow .12s var(--ease);
  display: flex; flex-direction: column;
  gap: 8px;
}
.site-card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--ink-300);
  border-top-left-radius: var(--radius);
  border-bottom-left-radius: var(--radius);
}
.site-card[data-mgr="남유진"]::before { background: #3b63e7; }
.site-card[data-mgr="남혜원"]::before { background: #d97706; }
.site-card[data-mgr="김수정"]::before { background: #10b981; }
.site-card[data-mgr="김종은"]::before { background: #dc2626; }
.site-card:hover { border-color: var(--brand-300); box-shadow: var(--shadow-sm); }

.site-card-title {
  font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--ink-900);
  line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  min-height: 2.7em;
}
.site-card-meta { font-size: 11.5px; color: var(--ink-500); }
.site-card-amount {
  font-size: 15px; font-weight: 700; color: var(--ink-900);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.site-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--ink-200);
  margin-top: 2px;
}
.site-card-pct-inline {
  display: inline-flex; align-items: center; gap: 6px;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--ink-600);
}
.site-card-pct-inline .progress-bar {
  width: 80px; height: 5px;
}

/* ========== Tweaks panel ========== */
.tweaks-panel {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  width: 280px;
  background: var(--paper);
  border: 1px solid var(--ink-300);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  animation: popIn .15s var(--ease);
}
.tweaks-panel h3 {
  font-size: 12.5px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--ink-900);
  display: flex; align-items: center; justify-content: space-between;
}

/* ========== Utility ========== */
.text-xs  { font-size: 11px; }
.text-sm  { font-size: 12.5px; }
.text-md  { font-size: 13px; }
.text-lg  { font-size: 15px; }
.text-xl  { font-size: 18px; }
.text-2xl { font-size: 24px; }

.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }

.muted { color: var(--ink-500); }
.subtle { color: var(--ink-400); }

.grow { flex: 1 1 auto; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.row { display: flex; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.col { display: flex; flex-direction: column; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 860px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 14px; }
.mt-5 { margin-top: 18px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 14px; }

.pad-4 { padding: 14px; }
.pad-5 { padding: 18px; }

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Legacy compatibility shims ===== */
.card-glass { background: var(--paper); border: 1px solid var(--ink-200); box-shadow: var(--shadow-xs); }
.app-header { display: none; } /* replaced by sidebar */
.page-hero { display: none; }  /* replaced by compact main-header */
.detail-hero { display: none; } /* replaced by .stat-strip */

.max-w { max-width: 100% !important; margin: 0 !important; padding: 0 !important; }
