/* ============================================================
   브랜드 GEO 블로그 — Admin prototype v3 · shared styles
   베이스 = v2 프로토타입 shared.css 기반 (네이비 사이드바 · 사각 radius ·
   브랜드 모티프 · 반응형 드로어).
   내부 구성은 v1 페이지 8종이며, 반응형 드로어와 공용 모티프를 유지한다.
   말미의 "v1 페이지 호환 계층"이 v1 토큰 별칭과 누락 클래스를 보충한다.
   Design source: 브랜드 가이드라인 + 디자인 시스템 접근성 규칙.

   원본 브랜드 팔레트:
   · Brand Navy #1D2D63 (주조) — deep #141C3C ·
     semi #36406D · light #817E9A · lighter #D2D4DE
   · Brand Brown #D6A679 (포인트) —
     deep #B69471 · semi #D8B997 · light #EFD3BE · lighter #FBF7F3
   · Mild Beige #F2F1EA (서브) → admin 캔버스
   · 악센트(보조 안내·데이터 시각화 전용): blue #3C9DD8 · green #73B670 ·
     orange #DB914C · red #D9613A — 주조색 사용 금지 (B.20)
   · 브라운 골드 텍스트는 네이비 배경 위에서 사용해 대비를 유지한다.
   · 서체: Pretendard Variable (국문, SemiBold 이하 지향 B.24) ·
     Plus Jakarta Sans (라틴 본문 B.25 — Sofia Pro는 상용이라 미번들)
   ============================================================ */

@font-face {
  font-family: 'Pretendard Variable';
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
  src: url('/assets/fonts/PretendardVariable.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  src: url('/assets/fonts/PlusJakartaSans-wght.woff2') format('woff2-variations');
}

:root {
  /* primitive — 기존 페이지 호환용 브랜드 토큰 */
  --navy-900: #1D2D63;
  --navy-950: #141C3C;      /* 메인 타이틀 극대비용 딥 */
  --navy-700: #36406D;      /* 세미 라이트 — 서브 타이틀/호버 */
  --navy-300: #817E9A;      /* 라이트 — 포인트 강조 */
  --navy-100: #D2D4DE;      /* 라이터 — 배경 */
  --brown-500: #D6A679;     /* 포인트 컬러 */
  --brown-700: #B69471;
  --brown-300: #D8B997;
  --brown-200: #EFD3BE;
  --brown-50: #FBF7F3;
  --beige: #F2F1EA;         /* Mild Beige — admin 캔버스 */
  --beige-line: #E4E2D6;    /* 베이지 톤 보더 */
  --acc-blue: #3C9DD8;
  --acc-green: #73B670;
  --acc-orange: #DB914C;
  --acc-red: #D9613A;

  /* 텍스트/상태 (본문 가독용 — design-system 실측 유지) */
  --gray-900: #191F28;
  --gray-600: #6B7684;
  --gray-300: #C2C2C2;
  --gray-100: #F5F5F5;
  --off-white: #F9F9F9;
  --red-600: #C94F41;       /* 텍스트용 다크 레드 (acc-red 톤 정합) */
  --green-600: #3E7D4C;     /* 텍스트용 다크 그린 (acc-green 톤 정합) */

  /* semantic */
  --bg: var(--beige);               /* 캔버스 = Mild Beige */
  --card: #FFFFFF;
  --ink: var(--gray-900);
  --text-2: #44505F;
  --text-3: var(--gray-600);
  --muted: #98A2B0;
  --border: #E7E5DB;                /* 웜 화이트 위 카드 보더 */
  --border-strong: #CFCDC2;
  --accent: var(--brown-500);       /* Brand Brown */

  /* status tints */
  --green-bg: #EAF2EB;
  --red-bg: #FAEAE6;
  --amber: #96682B;
  --amber-bg: #F8EEDD;
  --steel: #3D6FA3;
  --steel-bg: #E8F0F8;
  --navy-bg: #E6E8F0;

  --radius-sm: 4px;   /* inputs, tags */
  --radius-md: 8px;   /* cards */
  --shadow-card: 0 2px 8px rgba(29,45,99, 0.05);
  --font: 'Pretendard Variable', Pretendard, -apple-system, system-ui, sans-serif;
  --font-latin: 'Plus Jakarta Sans', 'Pretendard Variable', sans-serif;
  --motion-fast: 150ms ease-out;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum';
  letter-spacing: 0;
}
::selection { background: rgba(29,45,99, 0.14); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--navy-700); outline-offset: 2px; }
.num { font-family: var(--font-latin); font-feature-settings: 'tnum'; }

.scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.scroll::-webkit-scrollbar-thumb { background: #D6D4C8; border-radius: 8px; border: 3px solid var(--bg); }
.scroll::-webkit-scrollbar-track { background: transparent; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- app shell ---------- */
.layout { display: flex; height: 100vh; width: 100%; overflow: hidden; }

.sidebar {
  width: 248px; min-width: 248px; height: 100%;
  background: var(--navy-900); color: #fff;
  display: flex; flex-direction: column; padding: 22px 14px 16px;
  position: relative; z-index: 70;
}
/* 브랜드 모티프 — 방사선+아치 라인 (C.2 Motif A, 4면 모서리 시작 규칙) */
.sidebar::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background:
    linear-gradient(115deg, transparent calc(50% - 0.5px), rgba(214,166,121,0.28) 50%, transparent calc(50% + 0.5px)) no-repeat 0 100% / 100% 130px,
    radial-gradient(circle 210px at -60px calc(100% + 90px), transparent 208px, rgba(255,255,255,0.16) 209px, transparent 211px);
}
.sidebar .logo { display: flex; align-items: center; gap: 11px; padding: 2px 10px 22px; position: relative; z-index: 1; }
.sidebar .sidebar-logo { display: block; width: 154px; height: auto; }
.sidebar .logo-mark { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sidebar .logo-name { font-family: var(--font-latin); font-size: 16px; font-weight: 600; color: #fff; letter-spacing: 0.01em; }
.sidebar .logo-name em { font-style: normal; color: var(--accent); }
.sidebar .logo-sub { font-size: 10px; color: rgba(255, 255, 255, 0.55); letter-spacing: 0.04em; margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 2px; position: relative; z-index: 1; }
.nav-label {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.42); padding: 16px 12px 5px;
}
.nav-label:first-child { padding-top: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: none; background: none; cursor: pointer;
  border-radius: 0; padding: 8px 12px; min-height: 36px;
  font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.78);
  transition: background var(--motion-fast), color var(--motion-fast);
}
.nav-item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.nav-item.active {
  background: rgba(255, 255, 255, 0.10); color: var(--accent); font-weight: 600;
  box-shadow: inset 2px 0 0 var(--accent);
}
.nav-item .ico { display: flex; width: 18px; height: 18px; align-items: center; justify-content: center; }
.nav-item .lbl { flex: 1; text-align: left; }
.nav-item .badge {
  font-size: 10px; font-weight: 700; color: var(--navy-900);
  background: var(--brown-300); border-radius: 0; padding: 1px 6px;
}
.nav-item .badge.warn { color: #fff; background: var(--acc-red); }

.sidebar-foot { margin-top: auto; position: relative; z-index: 1; }
.nextrun-widget {
  display: block; border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0; padding: 12px 13px; background: rgba(20,28,60, 0.5);
  transition: border-color var(--motion-fast);
}
.nextrun-widget:hover { border-color: rgba(214,166,121, 0.6); }
.nextrun-widget .t { font-size: 10.5px; font-weight: 600; letter-spacing: 0.05em; color: rgba(255, 255, 255, 0.5); }
.nextrun-widget .v { font-size: 12.5px; font-weight: 600; color: #fff; margin-top: 4px; }
.nextrun-widget .note { font-size: 10.5px; color: rgba(255, 255, 255, 0.5); margin-top: 5px; line-height: 1.45; }
.nextrun-widget .note b { color: var(--accent); font-weight: 600; }
.userbox {
  display: flex; align-items: center; gap: 10px; padding: 14px 8px 2px;
  width: 100%; border: none; background: none; cursor: pointer; font-family: inherit;
}
.userbox:hover .avatar { background: rgba(255, 255, 255, 0.22); }
.userbox .avatar {
  width: 30px; height: 30px; border-radius: 9999px; background: rgba(255, 255, 255, 0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--accent); flex-shrink: 0;
}
.userbox .name { font-size: 12.5px; font-weight: 600; color: #fff; }
.userbox .role { font-size: 10.5px; color: rgba(255, 255, 255, 0.5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 역할 시뮬레이터 팝오버 */
.role-pop {
  display: none; position: absolute; left: 0; right: 0; bottom: calc(100% + 8px);
  background: #fff; border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(20,28,60, 0.22); z-index: 60; padding: 6px;
}
.role-pop.open { display: block; }
.role-pop-head {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; color: var(--text-3);
  padding: 8px 10px 6px; border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.role-pop-item {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  border: none; background: none; cursor: pointer; padding: 8px 9px; font-family: inherit;
  color: var(--ink);
}
.role-pop-item:hover { background: var(--beige); }
.role-pop-item.on { background: var(--beige); }
.role-pop-item .avatar {
  width: 26px; height: 26px; border-radius: 9999px; background: var(--navy-900);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.role-pop-item .txt { flex: 1; min-width: 0; line-height: 1.3; }
.role-pop-item .nm { display: block; font-size: 12px; font-weight: 600; }
.role-pop-item .nm em { font-style: normal; font-size: 10px; font-weight: 700; color: var(--text-3); letter-spacing: 0.04em; }
.role-pop-item .sc { display: block; font-size: 10.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-pop-item svg { color: var(--navy-900); flex-shrink: 0; }

.main { flex: 1; height: 100%; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 64px; min-height: 64px; border-bottom: 1px solid var(--border);
  background: var(--card); display: flex; align-items: center; padding: 0 28px; gap: 14px;
}
.topbar .titles { flex: 1; min-width: 0; }
.topbar .title-row { display: flex; align-items: center; gap: 9px; }
.topbar h1 { font-size: 19px; font-weight: 700; margin: 0; color: var(--navy-950); white-space: nowrap; }
.topbar .page-badge {
  font-size: 11px; font-weight: 600; color: var(--green-600); background: var(--green-bg);
  border-radius: var(--radius-sm); padding: 2px 8px; white-space: nowrap;
}
.topbar .page-badge.amber { color: var(--amber); background: var(--amber-bg); }
.topbar .page-badge.red { color: var(--red-600); background: var(--red-bg); }
.topbar .desc { font-size: 12.5px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .divider { width: 1px; height: 24px; background: var(--border); }
.icon-btn {
  position: relative; width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--card); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background var(--motion-fast);
}
.icon-btn:hover { background: var(--brown-50); }
.icon-btn .dot {
  position: absolute; top: 8px; right: 9px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--acc-red); border: 1.5px solid var(--card);
}
.menu-btn { display: none; }

.content { flex: 1; overflow-y: auto; padding: 28px 32px 56px; }
.container { max-width: 1180px; margin: 0 auto; animation: fadeUp 0.3s ease-out both; }
.container.narrow { max-width: 980px; }
.workspace-setup-required #page { display: none; }
.workspace-setup-required .spec-panel,
.workspace-setup-required .spec-dot,
.workspace-setup-required .tour-widget { display: none !important; }
.workspace-setup-gate {
  max-width: 680px; margin: 56px auto; padding: 38px 42px; text-align: center;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-card); animation: fadeUp 0.3s ease-out both;
}
.workspace-setup-mark {
  width: 76px; height: 76px; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; background: var(--brown-50); border: 1px solid var(--brown-200);
}
.workspace-setup-gate h2 {
  margin: 14px 0 8px; color: var(--navy-950); font-size: 22px; letter-spacing: -0.015em;
}
.workspace-setup-gate p {
  margin: 0; color: var(--text-3); font-size: 13.5px; line-height: 1.7;
}
.workspace-setup-actions {
  display: flex; justify-content: center; gap: 9px; margin-top: 24px; flex-wrap: wrap;
}
.workspace-setup-meta {
  display: flex; justify-content: center; gap: 18px; margin-top: 22px; padding-top: 16px;
  border-top: 1px solid var(--border); color: var(--text-3); font-size: 11px; flex-wrap: wrap;
}
.workspace-setup-meta b { color: var(--ink); font-family: var(--font-latin); }
.workspace-setup-widget .row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 3px;
}
.workspace-setup-widget .bv {
  color: var(--accent); font-size: 10px; font-weight: 700; white-space: nowrap;
}

/* ---------- primitives ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-card); }
.card.pad { padding: 20px 22px; }
.card-title { font-size: 15px; font-weight: 700; color: var(--navy-950); }
.card-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; line-height: 1.5; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; gap: 12px; }
.card-foot-note { font-size: 11px; color: var(--muted); line-height: 1.5; border-top: 1px solid var(--gray-100); padding-top: 10px; margin-top: 12px; }

.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-5 { grid-template-columns: repeat(5, 1fr); }
.cols-wide { grid-template-columns: 1.55fr 1fr; }
.mb { margin-bottom: 16px; }
.mb-lg { margin-bottom: 22px; }

/* ---------- ⓘ 지표 설명 툴팁 (제품 기능 · 대표님·타팀용 상시 설명) ----------
   스펙 모드(개발용 data-spec 오버레이)와는 별개인 상시 노출 UI.
   호버·클릭(고정)·키보드 포커스 모두 지원 — 배선은 shared.js BZ.info(). */
.info-ic {
  display: inline-flex; align-items: center; justify-content: center;
  vertical-align: middle; margin-left: 5px; padding: 0; width: 16px; height: 16px;
  border: none; background: none; color: var(--muted); cursor: pointer;
  border-radius: 50%; line-height: 0; transition: color 0.12s, background 0.12s;
}
.info-ic svg { pointer-events: none; }
.info-ic:hover, .info-ic:focus-visible { color: var(--navy-900); background: var(--navy-bg); outline: none; }
.info-pop {
  position: fixed; z-index: 120; display: none; max-width: 288px;
  background: var(--navy-950); color: #fff; border-radius: 6px;
  padding: 10px 13px; font-size: 12px; line-height: 1.6; letter-spacing: -0.005em;
  box-shadow: 0 10px 30px rgba(20,28,60, 0.4); white-space: pre-line;
}
.info-pop.open { display: block; }

.pill {
  font-size: 11px; font-weight: 600; border-radius: var(--radius-sm);
  padding: 2px 8px; white-space: nowrap; display: inline-block;
}
.pill.green { color: var(--green-600); background: var(--green-bg); }
.pill.amber { color: var(--amber); background: var(--amber-bg); }
.pill.red { color: var(--red-600); background: var(--red-bg); }
.pill.navy { color: var(--navy-900); background: var(--navy-bg); }
.pill.gray { color: var(--text-2); background: var(--gray-100); }
.pill.steel { color: var(--steel); background: var(--steel-bg); }
.pill.brown { color: var(--navy-950); background: var(--brown-200); }
.pill.outline { background: none; border: 1px solid var(--border-strong); color: var(--text-2); }

/* "as of" 스탬프 (M7-FR-2) */
.asof { font-size: 10.5px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.asof::before { content: '기준 '; }
.stale { color: var(--amber); font-weight: 600; }

/* buttons — 이진 radius 규칙: 인라인 사각(0) / 플로팅 원형 */
.btn {
  border: none; border-radius: 0; padding: 8px 15px; min-height: 34px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  transition: background var(--motion-fast), color var(--motion-fast), border-color var(--motion-fast);
}
.btn.primary { background: var(--navy-900); color: #fff; }
.btn.primary:hover { background: var(--navy-700); }
.btn.ghost { background: var(--card); color: var(--text-2); border: 1px solid var(--border-strong); }
.btn.ghost:hover { border-color: var(--navy-900); color: var(--navy-900); }
.btn.danger-ghost { background: var(--card); color: var(--red-600); border: 1px solid var(--border-strong); }
.btn.danger-ghost:hover { border-color: var(--red-600); }
.btn.lg { padding: 11px 22px; font-size: 13.5px; font-weight: 700; min-height: 44px; }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { background: var(--gray-100); color: var(--muted); cursor: not-allowed; border: 1px solid var(--border); }
.link { font-size: 12px; font-weight: 600; color: var(--navy-900); cursor: pointer; }
.link:hover { text-decoration: underline; }

/* segmented control — 사각 탭 */
.seg { display: flex; gap: 6px; width: fit-content; flex-wrap: wrap; }
.seg button {
  border: 1px solid var(--border-strong); background: var(--card); border-radius: 0;
  padding: 5px 13px; font-size: 12.5px; font-weight: 500; color: var(--ink); cursor: pointer;
  transition: background var(--motion-fast), color var(--motion-fast);
}
.seg button.on { background: var(--navy-900); color: #fff; border-color: var(--navy-900); font-weight: 600; }
.seg button:hover:not(.on) { border-color: var(--navy-900); }

.meter { height: 7px; background: var(--gray-100); border-radius: 5px; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 5px; background: var(--navy-900); }

/* insight/notice strips */
.insight { font-size: 11.5px; color: var(--text-2); background: var(--brown-50); border: 1px solid var(--brown-200); border-radius: var(--radius-sm); padding: 10px 12px; line-height: 1.55; }
.notice { display: flex; align-items: center; gap: 12px; border-radius: var(--radius-md); padding: 13px 18px; }
.notice .txt { flex: 1; font-size: 12.5px; line-height: 1.55; }
.notice.amber { background: var(--amber-bg); border: 1px solid #EBD9B6; }
.notice.amber .txt { color: var(--amber); }
.notice.red { background: var(--red-bg); border: 1px solid #F0CFC5; }
.notice.red .txt { color: var(--red-600); }
.notice.navy { background: var(--navy-900); border: 1px solid var(--navy-900); }
.notice.navy .txt { color: rgba(255, 255, 255, 0.75); }

/* tables — 44px rows */
.tbl-head {
  display: flex; align-items: center; font-size: 10.5px; color: var(--muted);
  font-weight: 600; letter-spacing: 0.02em; padding: 0 4px 9px; border-bottom: 1px solid var(--border);
}
.tbl-row {
  display: flex; align-items: center; font-size: 13px; min-height: 44px;
  padding: 6px 4px; border-bottom: 1px solid var(--gray-100);
}
.tbl-row:last-child { border-bottom: none; }
.tbl-row:hover { background: var(--brown-50); }

/* stat cards */
.stat { padding: 18px 18px 14px; }
.stat .stat-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.stat .stat-label { font-size: 12.5px; color: var(--text-3); font-weight: 500; line-height: 1.35; }
.stat .stat-value { font-size: 30px; font-weight: 700; letter-spacing: -0.01em; margin: 9px 0 2px; color: var(--navy-950); font-family: var(--font-latin); }
.stat .stat-value small { font-size: 15px; font-weight: 600; color: var(--text-3); font-family: var(--font); }
.stat .stat-note { font-size: 11px; color: var(--text-3); line-height: 1.45; margin-top: 8px; border-top: 1px solid var(--gray-100); padding-top: 8px; }

/* modal */
.modal-veil {
  position: fixed; inset: 0; background: rgba(20,28,60, 0.45); z-index: 90;
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-veil.open { display: flex; }
.modal {
  background: var(--card); border-radius: var(--radius-md); max-width: 560px; width: 100%;
  max-height: 84vh; overflow-y: auto; padding: 26px 28px; animation: fadeUp 0.2s ease-out both;
}

/* toast */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--navy-950); color: #fff; font-size: 13px; font-weight: 500;
  border-radius: var(--radius-sm); padding: 11px 18px; opacity: 0; pointer-events: none;
  transition: opacity var(--motion-fast), transform var(--motion-fast); z-index: 99;
  display: flex; gap: 9px; align-items: center; max-width: 620px;
}
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.err { background: var(--acc-red); }

/* form bits */
label.fld { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
input[type="text"], input[type="password"], input[type="email"], input[type="number"], textarea, select {
  font-family: inherit; font-size: 13px; color: var(--ink);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff;
  padding: 9px 12px; outline: none; width: 100%;
}
input:focus, textarea:focus, select:focus { border-color: var(--navy-900); }
.fld-err { font-size: 12px; color: var(--red-600); margin-top: 5px; }

/* admin-only lock chip */
.lock-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700; color: #fff; background: var(--navy-900);
  border-radius: 0; padding: 2px 8px; letter-spacing: 0.03em;
}
.lock-chip .g { color: var(--accent); }

/* ---------- 빈 상태 (브랜드 모티프 적용) ---------- */
.empty-wrap { max-width: 640px; margin: 60px auto; text-align: center; position: relative; }
.empty-motif { width: 96px; height: 96px; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; }
.empty-wrap h2 { font-size: 22px; font-weight: 700; margin: 0 0 10px; color: var(--navy-950); }
.empty-wrap p { font-size: 14px; color: var(--text-3); line-height: 1.65; margin: 0 0 28px; }

/* ---------- 스켈레톤 (로딩 상태 규약, PRD §7) ---------- */
.skel { position: relative; overflow: hidden; background: var(--gray-100); border-radius: var(--radius-sm); color: transparent !important; }
.skel::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
  animation: skel 1.4s infinite;
}
@keyframes skel { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* 데모 장치(스펙 모드·가이드 투어·개발 예정 라벨·차트 툴팁) 스타일은
   /demo.css — 공개 블로그(root)와 공유하므로 별도 파일 */

/* ============================================================
   반응형 — v4 신규 (v3 admin에는 미디어쿼리가 없었음)
   ============================================================ */
@media (max-width: 1180px) {
  .cols-4 { grid-template-columns: 1fr 1fr; }
  .cols-5 { grid-template-columns: repeat(3, 1fr); }
  .cols-wide { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .layout { display: block; height: auto; overflow: visible; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 95;
    transform: translateX(-100%); transition: transform 200ms ease-out;
    box-shadow: 24px 0 48px rgba(20,28,60, 0.3);
  }
  .sidebar.open { transform: none; }
  .side-veil { position: fixed; inset: 0; background: rgba(20,28,60, 0.4); z-index: 94; display: none; }
  .side-veil.open { display: block; }
  .main { height: auto; min-height: 100vh; }
  .menu-btn { display: flex; }
  .topbar { position: sticky; top: 0; z-index: 50; padding: 0 16px; gap: 10px; }
  .topbar .divider { display: none; }
  .topbar .desc { display: none; }
  .content { padding: 20px 16px 48px; overflow: visible; }
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .cols-4 { grid-template-columns: 1fr 1fr; }
  .cols-5 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .cols-4 { grid-template-columns: 1fr; }
  .cols-5 { grid-template-columns: 1fr; }
  .topbar h1 { font-size: 16px; }
  .topbar .page-badge { display: none; }
  .workspace-setup-gate { margin: 28px auto; padding: 28px 20px; }
  .workspace-setup-gate h2 { font-size: 19px; }
  .workspace-setup-gate p br { display: none; }
  .workspace-setup-actions { align-items: stretch; flex-direction: column; }
}

/* ============================================================
   v1 페이지 호환 계층 — v3에서 내부 구성(화면 8종)은 v1 페이지를
   그대로 쓰므로, v1 페이지 인라인 스타일이 참조하는 토큰 이름을
   v2 팔레트로 별칭 매핑하고, v1에만 있던 컴포넌트 클래스를 보충한다.
   ============================================================ */
:root {
  /* v1 토큰 → v2 팔레트 별칭 */
  --navy: var(--navy-900);
  --navy-text: #D2D4DE;             /* navy 면 위 보조 텍스트 */
  --tan: var(--brown-500);
  --brown: var(--navy-900);         /* 흰/베이지 위 브라운 텍스트 금지 → navy */
  --brown-bg: var(--brown-200);
  --brown-bg-2: var(--brown-50);
  --field: var(--off-white);
  --field-deep: var(--gray-100);
  --track: var(--gray-100);
  --border-card: var(--border);
  --border-soft: var(--gray-100);
  --border-row: var(--gray-100);
  --border-input: var(--border-strong);
  --label: var(--muted);
  --ink-2: var(--text-2);
  --green: var(--green-600);
  --green-bg-2: var(--green-bg);
  --amber-border: #EBD9B6;
  --red: var(--red-600);
  --radius: var(--radius-md);
}

/* 사이드바 예산 위젯 (v1 구성) — nextrun-widget 다크 스킨 위에 게이지 추가 */
.budget-widget .row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.budget-widget .bv { font-size: 11px; font-weight: 700; font-family: var(--font-latin); }
.budget-widget .bmeter { height: 5px; background: rgba(255, 255, 255, 0.15); border-radius: 3px; overflow: hidden; }
.budget-widget .bmeter i { display: block; height: 100%; border-radius: 3px; }

/* v1 전용 컴포넌트 보충 */
.btn.tan { background: var(--brown-500); color: var(--navy-900); font-weight: 700; }
.btn.tan:hover { background: var(--brown-700); color: #fff; }
.pill.round { border-radius: 20px; padding: 3px 10px; }
.notice.cream { background: var(--brown-50); border: 1px solid var(--brown-200); }
.notice.cream .txt { color: var(--amber); }
.checkline {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 11px 12px;
  border: 1px solid var(--border-strong); background: var(--off-white); border-radius: var(--radius-sm);
}
.checkline.on { border-color: var(--green-600); background: var(--green-bg); }
.checkline .box {
  width: 20px; height: 20px; border-radius: 4px; border: 2px solid var(--border-strong);
  background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;
}
.checkline.on .box { border-color: var(--green-600); background: var(--green-600); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
