/* ==========================================================================
   BlogOps UI v5 — bo-ui.css  (단일 CSS · 2026-11-22 · G0)
   정본: A_v11_bold (bo2-tokens.css + bo2-components.css) — 대표 확정 「3안 볼드 + 다크모드」

   ■ 이 파일 하나가 옛 CSS 5개(style · premium · theme · mobile · bo-tokens)를 대체한다.
     header.php 는 이 파일만 불러온다. 자체 <html> 틀 화면도 이 파일 하나만 <link> 하면 된다(단독 로딩 가능).
   ■ 층(@layer): bo.reset < bo.tokens < bo.base < bo.components < bo.legacy < bo.utilities
     - 층 밖(화면 안 <style>, chat.css, gsheet.css)은 항상 이 파일보다 이긴다 → 화면 전용 규칙은 그대로 동작.
     - !important 는 유틸리티(.d-none 등 옛 동작 유지)에만 쓴다. 컴포넌트에는 0개.
   ■ 색은 전부 토큰. [data-theme="dark"] 가 <html> 에 붙으면 토큰만 바뀌어 전 화면이 다크로 바뀐다.
     화면 파일에 #hex · #fff · black 직접 쓰기 금지 → var(--surface) var(--text) 등 의미 토큰만.
   ■ 상태색 의미 고정: 대기 회색(neutral) · 진행 파랑(info) · 처리필요 주황(warn) · 입금/완료 초록(ok) · 예외 빨강(danger)
   ■ 대비: 라이트·다크 모두 본문/보조/3차 글자·배지·버튼 글자 WCAG AA(4.5:1) 이상 계산 검증(_작업기록 참조).
   ========================================================================== */

@layer bo.reset, bo.tokens, bo.base, bo.components, bo.legacy, bo.utilities;

@font-face {
  font-family: "Pretendard Variable";
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
  /* Pretendard v1.3.9 고정 · 로컬 동봉(외부 CDN 의존 없음) */
  src: url("../fonts/PretendardVariable.woff2") format("woff2-variations");
}

/* ==========================================================================
   0. RESET
   ========================================================================== */
@layer bo.reset {
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  img, svg, video, canvas { vertical-align: middle; }
  img { max-width: 100%; }
  table { border-collapse: collapse; }
  button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
  ul, ol { list-style-position: outside; }
}

/* ==========================================================================
   1. TOKENS — 라이트(기본)
   ========================================================================== */
@layer bo.tokens {
:root {
  /* 1-1. 중립 회색(쿨그레이) — 다크에서는 같은 이름이 반대 방향으로 바뀐다 */
  --g-0:   #ffffff;
  --g-25:  #f9faf7;
  --g-50:  #f5f6f2;
  --g-100: #eef1ea;
  --g-150: #e8ebe3;
  --g-200: #e0e4db;
  --g-300: #cdd3ca;
  --g-400: #939b91;   /* placeholder·비활성 (본문 금지) */
  --g-500: #646c64;   /* 3차 글자 4.84:1 on bg */
  --g-600: #4a524b;   /* 2차 글자 */
  --g-700: #2d332e;
  --g-800: #1b1f1c;
  --g-900: #0b0d0c;   /* 잉크 */

  /* 1-2. 브랜드 파랑 + 인디고 */
  --brand-50:  #f2fce6;
  --brand-100: #e4f8c8;
  --brand-200: #cdee9f;
  --brand-300: #b9ff66;
  --brand-400: #86c61e;
  --brand-500: #4c9800;
  --brand-600: #3d7a00;
  --brand-700: #2f6100;
  --brand-800: #234a00;
  --indigo-400: #3fb8a8;
  --indigo-500: #14a090;
  --indigo-600: #0f8a7c;
  --indigo-700: #0f766e;
  --navy-700: #1c2a14;
  --navy-800: #121a0e;
  --navy-900: #0b0d0c;

  /* 1-3. 상태색 — 글자색(fg) · 옅은 면(bg) · 선(line) · 채움(fill: 흰 글자를 얹는 진한 면) */
  --ok:      #1f7a34;  --ok-bg:      #e1f4e6;  --ok-line:      #addcb9;  --ok-fill:      #1f7a34;
  --warn:    #9a4f00;  --warn-bg:    #fdf0d9;  --warn-line:    #f0cd96;  --warn-fill:    #a85600;
  --danger:  #be2626;  --danger-bg:  #fde8e8;  --danger-line:  #f4bcbc;  --danger-fill:  #d23c3c;
  --info:    #087670;  --info-bg:    #d8f3f1;  --info-line:    #9bdbd5;  --info-fill:    #087670;
  --neutral: #4f564f;  --neutral-bg: #eceee8;  --neutral-line: #dcdfd6;  --neutral-fill: #565e56;

  /* 장식 톤(섹션 아이콘 배지·범주 배지) — 상태 의미 없음 */
  --tone-blue:   #3d7a00;  --tone-blue-bg:   #eaf7d4;
  --tone-indigo: #5a6e00;  --tone-indigo-bg: #eef3d2;
  --tone-violet: #8a3fb0;  --tone-violet-bg: #f3e6f9;
  --tone-sky:    #8a5a00;  --tone-sky-bg:    #fbf0d6;
  --tone-slate:  #3f463f;  --tone-slate-bg:  #e8ebe3;
  --tone-pink:   #b4236b;  --tone-pink-bg:   #fce7f1;
  --tone-teal:   #0a7468;  --tone-teal-bg:   #d9f2ee;

  /* 1-4. 의미 토큰 (화면은 이것만 쓴다) */
  --bg:            var(--g-50);
  --bg-band:       #edf3e3;
  --surface:       var(--g-0);
  --surface-2:     var(--g-25);
  --surface-sunk:  var(--g-100);
  --surface-raise: var(--g-0);
  --line:          var(--g-200);
  --line-soft:     #ecefe8;
  --line-strong:   var(--g-300);
  --line-card:     #e3e7df;
  --text:          var(--g-900);
  --text-2:        var(--g-600);
  --text-3:        var(--g-500);
  --text-disabled: var(--g-400);
  --accent:        var(--brand-600);     /* 글자·아이콘·밑줄용 파랑 */
  --accent-hover:  var(--brand-700);
  --accent-soft:   #eefbdc;
  --accent-line:   #cdee9f;
  --accent-fill:   #b9ff66;     /* 흰 글자를 얹는 파랑 면(주 버튼·활성 메뉴) */
  --accent-fill-2: #a8f04d;     /* 그라데이션 끝 */
  --on-lime: #0b0d0c;               /* v5.2: 라임 면 위 글자(잉크) */
  --on-chip: #b9ff66;               /* v5.2: 진한 초록/검정 칩 위 라임 글리프 */
  --btn-fill: #0b0d0c; --btn-fill-2: #1f2420; --on-btn: #ffffff;  /* v5.2: 주 버튼 = 원래처럼 검정 */
  --sb-line: #1c201d;
  --on-accent:     #ffffff;
  --on-fill:       #ffffff;              /* 상태 채움 면 위 글자 */
  --row-hover:     #f6faee;
  --row-selected:  #eaf6d4;
  --focus-ring:    0 0 0 3px rgba(76, 152, 0, .38);
  --scrim:         rgba(11, 13, 12, .50);
  --topbar-bg:     rgba(255, 255, 255, .94);
  --glass-bg:      rgba(255, 255, 255, .96);
  --toast-bg:      #0b0d0c;
  --toast-text:    #ffffff;
  --toast-ok:      #b9ff66;
  --toast-err:     #ff9b9b;
  --toast-warn:    #ffd08a;
  --toast-info:    #8be9d8;
  --ink-fill:      #0b0d0c;      /* 잉크 버튼·일괄작업 줄 */
  --ink-fill-2:    #1f2420;
  --on-ink-fill:   #ffffff;
  --on-ink-fill-2: #d7ddd2;
  --sb-bg:         #0c0e0d;
  --sb-shadow:     4px 0 18px -10px rgba(0, 0, 0, .45);
  --tfoot-bg:      #eef6df;
  --tfoot-line:    #cdee9f;
  --tfoot-text:    var(--navy-800);
  --brand-name:    #0b0d0c;
  --av-bg:         #e6f3d0;
  --av-text:       #2f6100;
  --mark-hl:       #fff3b0;

  /* 히어로(블루 → 인디고) */
  --hero-grad:     linear-gradient(118deg, #0b0d0c 0%, #11200c 36%, #1d4208 70%, #3a7400 100%);
  --hero-glow-1:   rgba(185, 255, 102, .26);
  --hero-glow-2:   rgba(45, 212, 170, .20);
  --hero-glow-3:   rgba(255, 255, 255, .07);
  --hero-line:     rgba(255, 255, 255, .09);
  --hero-glass:    rgba(5, 10, 3, .34);
  --hero-glass-2:  rgba(255, 255, 255, .18);
  --hero-glass-h:  rgba(5, 10, 3, .24);
  --hero-seg:      rgba(5, 10, 3, .34);
  --on-hero:       #ffffff;
  --on-hero-2:     rgba(255, 255, 255, .90);
  --hero-dot-danger: #ffa3a3;
  --hero-dot-warn:   #ffd08a;
  --hero-dot-info:   #8be9d8;
  --hero-dot-ok:     #b9ff66;

  /* 그래프 — 차트·SVG·canvas 색도 이 토큰으로(다크 자동 전환) */
  --chart-1:       #4c9800;
  --chart-2:       #0e8f84;
  --chart-3:       #b57f00;
  --chart-4:       #dd6b1f;
  --chart-5:       #b4236b;
  --chart-muted:   #a2a99f;
  --chart-grid:    #e8ebe3;
  --chart-axis:    var(--g-500);
  --chart-area-top: .42;
  --chart-area-bot: .03;

  /* 1-5. 타이포 */
  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "D2Coding", monospace;
  --fs-11: 11px;  --lh-11: 16px;
  --fs-12: 12px;  --lh-12: 18px;
  --fs-13: 13px;  --lh-13: 20px;
  --fs-14: 14px;  --lh-14: 22px;
  --fs-16: 16px;  --lh-16: 24px;
  --fs-20: 20px;  --lh-20: 28px;
  --fs-24: 24px;  --lh-24: 32px;
  --fs-30: 30px;  --lh-30: 38px;
  --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-bold: 700; --fw-heavy: 800;
  --tracking-tight: -0.012em;
  --tracking-title: -0.022em;

  /* 1-6. 간격 (4/8) */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-16: 64px;

  /* 1-7. 모서리 · 그림자 */
  --r-xs: 5px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-full: 999px;
  --shadow-0: none;
  --shadow-1: 0 1px 2px rgba(27, 31, 25, .06);
  --shadow-card: 0 1px 2px rgba(27, 31, 25, .04), 0 4px 14px -4px rgba(27, 31, 25, .07);
  --shadow-raise: 0 2px 4px rgba(27, 31, 25, .04), 0 16px 36px -12px rgba(14, 40, 6, .30);
  --shadow-accent: 0 1px 2px rgba(11, 13, 12, .20), 0 6px 14px -4px rgba(76, 152, 0, .40);
  --shadow-pop: 0 8px 28px rgba(27, 31, 25, .12), 0 1px 3px rgba(27, 31, 25, .08);
  --shadow-modal: 0 24px 64px rgba(27, 31, 25, .20), 0 2px 6px rgba(27, 31, 25, .08);
  --shadow-topbar: 0 6px 16px -12px rgba(27, 31, 25, .14);

  /* 1-8. 크기 */
  --sidebar-w: 236px;
  --topbar-h: 56px;
  --ctl-h-sm: 28px; --ctl-h: 34px; --ctl-h-lg: 40px;
  --row-h: 44px; --row-h-compact: 38px;
  --content-max: 1480px;
  --page-px: var(--sp-8);   /* 본문 좌우 여백(히어로 풀블리드 계산에 씀) */
  --page-pt: var(--sp-6);

  /* 1-9. 움직임 · 레이어 */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur-1: 120ms; --dur-2: 180ms;
  --z-sticky: 10; --z-sidebar: 30; --z-drop: 40; --z-modal: 60; --z-toast: 70; --z-gate: 90;

  color-scheme: light;

  /* ---------- 1-10. 옛 변수 별칭 (화면 인라인 var(--…) 1,500여 곳이 새 토큰을 따라오게) ---------- */
  --ink: var(--text);            --ink-2: var(--g-800);         --on-ink: var(--surface);
  --line-2: var(--line);         --sunk: var(--surface-sunk);   --border: var(--line-strong);
  --border-strong: var(--g-400); --canvas: var(--bg);           --card: var(--surface);
  --primary: var(--accent);      --primary-dark: var(--accent-hover); --primary-light: var(--accent-soft);
  --primary-50: var(--accent-soft); --primary-bg: var(--accent-soft);
  --brand: var(--accent);        --brand-strong: var(--accent-hover); --brand-deep: var(--accent-hover);
  --brand-soft: var(--accent-soft); --brand-tint: var(--accent-soft); --brand-light: var(--accent-soft);
  --lime: var(--accent);         --lime-ink: var(--on-accent);
  --success: var(--ok);          --success-light: var(--ok-bg);
  --warning: var(--warn);        --warning-light: var(--warn-bg); --warning-dark: var(--warn);
  --danger-light: var(--danger-bg); --danger-soft: var(--danger-bg);
  --info-light: var(--info-bg);
  --purple: var(--tone-violet);  --purple-light: var(--tone-violet-bg); --violet: var(--tone-violet);
  --pink: var(--tone-pink);      --pink-light: var(--tone-pink-bg);
  --orange: var(--warn);         --orange-light: var(--warn-bg);
  --gray-50: var(--g-25);  --gray-100: var(--g-100); --gray-200: var(--g-200); --gray-300: var(--g-300);
  --gray-400: var(--g-400); --gray-500: var(--g-500); --gray-600: var(--g-600); --gray-700: var(--g-700);
  --gray-800: var(--g-800); --gray-900: var(--g-900);
  --radius-sm: var(--r-xs); --radius: var(--r-sm); --radius-md: var(--r-sm); --radius-lg: var(--r-md); --radius-xl: var(--r-lg); --radius-full: var(--r-full);
  --shadow-xs: var(--shadow-1); --shadow-sm: var(--shadow-1); --shadow: var(--shadow-card); --shadow-md: var(--shadow-card);
  --shadow-lg: var(--shadow-pop); --shadow-xl: var(--shadow-modal);
  --sidebar-width: var(--sidebar-w); --topbar-height: var(--topbar-h); --font-family: var(--font-sans);
  --transition-fast: var(--dur-1) var(--ease); --transition: var(--dur-2) var(--ease); --transition-slow: .3s var(--ease);
  --bo-ink: var(--text); --bo-text: var(--g-700); --bo-sub: var(--text-2); --bo-mute: var(--text-3);
  --bo-accent: var(--accent); --bo-accent-h: var(--accent-hover); --bo-accent-soft: var(--accent-soft); --bo-accent-line: var(--accent-line);
  --bo-surface: var(--surface); --bo-surface-2: var(--surface-2); --bo-sunk: var(--surface-sunk); --bo-bg: var(--bg);
  --bo-border: var(--line-strong); --bo-line: var(--line); --bo-line-2: var(--line-soft);
  --bo-ok: var(--ok); --bo-ok-soft: var(--ok-bg); --bo-warn: var(--warn); --bo-warn-soft: var(--warn-bg);
  --bo-bad: var(--danger); --bo-bad-soft: var(--danger-bg);
}

/* ==========================================================================
   1-D. TOKENS — 다크 (어두운 남색 바탕 · 전 글자 AA)
   ========================================================================== */
:root[data-theme="dark"], [data-theme="dark"] {
  --g-0:   #121513;   /* 카드 면 */
  --g-25:  #161a17;   /* 표 머리·합계 */
  --g-50:  #0a0c0b;   /* 앱 바탕 */
  --g-100: #1a1e1b;   /* 눌린 면 */
  --g-150: #1f2420;
  --g-200: #262b27;   /* 기본 테두리 */
  --g-300: #343b35;   /* 입력칸 테두리 */
  --g-400: #6f776d;
  --g-500: #939b90;   /* 3차 글자 6.3:1 */
  --g-600: #b9c1b6;   /* 2차 글자 9.1:1 */
  --g-700: #dbe1d6;
  --g-800: #e6ebe2;
  --g-900: #eef2ea;   /* 본문 15.4:1 */

  --brand-50:  #141c0d;
  --brand-100: #1a2610;
  --brand-200: #2f4a14;
  --brand-300: #4a7a1a;
  --brand-400: #8fd63a;
  --brand-500: #b9ff66;
  --brand-600: #b9ff66;   /* 글자용 파랑 7.1:1 */
  --brand-700: #d2ff99;
  --brand-800: #e4ffc2;
  --navy-700: #1c2a14;
  --navy-800: #d7ddd2;
  --navy-900: #0b0d0c;

  --ok:      #7ee08a;  --ok-bg:      #0f2a1d;  --ok-line:      #1f5a3b;  --ok-fill:      #1a8a3a;
  --warn:    #f2b25a;  --warn-bg:    #33240c;  --warn-line:    #6b4a14;  --warn-fill:    #a85600;
  --danger:  #ff8f8f;  --danger-bg:  #3a161b;  --danger-line:  #74282f;  --danger-fill:  #d23c3c;
  --info:    #4fd8d0;  --info-bg:    #0c2a2b;  --info-line:    #1b5a58;  --info-fill:    #087670;
  --neutral: #b9c1b6;  --neutral-bg: #1d2220;  --neutral-line: #333a34;  --neutral-fill: #4a524b;

  --tone-blue:   #b9ff66;  --tone-blue-bg:   #1a2610;
  --tone-indigo: #d4e87a;  --tone-indigo-bg: #232b0d;
  --tone-violet: #d9a8ee;  --tone-violet-bg: #2b1736;
  --tone-sky:    #f2c25a;  --tone-sky-bg:    #33280c;
  --tone-slate:  #b9c1b6;  --tone-slate-bg:  #1d2220;
  --tone-pink:   #f19ac4;  --tone-pink-bg:   #3a1730;
  --tone-teal:   #7fe0d4;  --tone-teal-bg:   #0e2d29;

  --bg-band:       #0d1209;
  --surface-raise: #161a17;
  --line-soft:     #1f2420;
  --line-card:     #262b27;
  --accent-soft:   #18230f;
  --accent-line:   #3a5a14;
  --accent-fill:   #b9ff66;
  --accent-fill-2: #a5ec4f;
  --on-lime: #0b0d0c;
  --on-chip: #b9ff66;
  --btn-fill: #b9ff66; --btn-fill-2: #a5ec4f; --on-btn: #0b0d0c;  /* v5.2: 다크에선 라임 */
  --sb-line: #171b18;
  --on-accent:     #0b0d0c;
  --row-hover:     #151915;
  --row-selected:  #1a2410;
  --focus-ring:    0 0 0 3px rgba(185, 255, 102, .40);
  --scrim:         rgba(0, 0, 0, .66);
  --topbar-bg:     rgba(10, 12, 11, .90);
  --glass-bg:      rgba(12, 14, 13, .94);
  --toast-bg:      #eef2ea;
  --toast-text:    #0b0d0c;
  --toast-ok:      #1f7a34;
  --toast-err:     #be2626;
  --toast-warn:    #9a4f00;
  --toast-info:    #087670;
  --ink-fill:      #1f2a14;
  --ink-fill-2:    #2a3a18;
  --sb-bg:         #070908;
  --sb-shadow:     4px 0 18px -10px rgba(0, 0, 0, .6);
  --tfoot-bg:      #1a2410;
  --tfoot-line:    #2f4a14;
  --tfoot-text:    #d7ddd2;
  --brand-name:    var(--g-900);
  --av-bg:         #243316;
  --av-text:       #d2ff99;
  --mark-hl:       #5a4a12;

  --hero-grad:     linear-gradient(118deg, #050605 0%, #0c1608 40%, #17330a 75%, #25520a 100%);
  --hero-glow-1:   rgba(185, 255, 102, .20);
  --hero-glow-2:   rgba(45, 212, 170, .14);
  --hero-glow-3:   rgba(255, 255, 255, .05);
  --hero-line:     rgba(255, 255, 255, .07);
  --hero-glass:    rgba(0, 0, 0, .40);
  --hero-glass-2:  rgba(255, 255, 255, .14);
  --hero-glass-h:  rgba(0, 0, 0, .30);
  --hero-seg:      rgba(0, 0, 0, .40);

  --chart-1:       #b9ff66;
  --chart-2:       #4fd1c1;
  --chart-3:       #f2c14e;
  --chart-4:       #f08a4b;
  --chart-5:       #f19ac4;
  --chart-muted:   #5d665c;
  --chart-grid:    #1f2420;
  --chart-axis:    #939b90;
  --chart-area-top: .50;
  --chart-area-bot: .02;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, .40);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 18px -8px rgba(0, 0, 0, .55);
  --shadow-raise: 0 2px 4px rgba(0, 0, 0, .35), 0 18px 40px -14px rgba(0, 0, 0, .70);
  --shadow-accent: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 16px -6px rgba(185, 255, 102, .35);
  --shadow-pop: 0 10px 32px rgba(0, 0, 0, .55), 0 1px 3px rgba(0, 0, 0, .40);
  --shadow-modal: 0 24px 64px rgba(0, 0, 0, .65), 0 2px 6px rgba(0, 0, 0, .40);
  --shadow-topbar: 0 6px 16px -12px rgba(0, 0, 0, .7);

  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-1: 0ms; --dur-2: 0ms; }
}
} /* /bo.tokens */

/* ==========================================================================
   2. BASE — 요소 기본값 (명시도 0: :where → 화면 규칙이 항상 이김)
   ========================================================================== */
@layer bo.base {
  html { background: var(--bg); scrollbar-color: var(--g-300) transparent; }
  body {
    background: var(--bg); color: var(--text);
    font-family: var(--font-sans); font-size: var(--fs-13); line-height: var(--lh-13);
    font-weight: var(--fw-regular); letter-spacing: var(--tracking-tight);
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "ss06";
    word-break: keep-all; overflow-wrap: break-word;
    overflow-x: hidden;
  }
  :where(h1) { font-size: 22px; line-height: 30px; font-weight: var(--fw-heavy); letter-spacing: -.03em; color: var(--text); }
  :where(h2) { font-size: 18px; line-height: 26px; font-weight: var(--fw-bold); letter-spacing: var(--tracking-title); color: var(--text); }
  :where(h3) { font-size: 15px; line-height: 22px; font-weight: var(--fw-bold); letter-spacing: var(--tracking-title); color: var(--text); }
  :where(h4, h5, h6) { font-size: 14px; line-height: 20px; font-weight: var(--fw-bold); color: var(--text); }
  :where(a) { color: var(--accent); text-decoration: none; }
  :where(a:hover) { color: var(--accent-hover); }
  :where(strong, b) { font-weight: var(--fw-bold); }
  :where(small) { font-size: var(--fs-12); }
  :where(hr) { border: 0; border-top: 1px solid var(--line-soft); margin: var(--sp-4) 0; }
  :where(code, kbd, pre, samp) { font-family: var(--font-mono); font-size: 12px; }
  :where(pre) { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: var(--sp-3); }
  :where(mark) { background: var(--mark-hl); color: var(--text); border-radius: 3px; padding: 0 2px; }
  :where(button) { cursor: pointer; }
  :where(label) { color: inherit; }
  :focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); border-radius: var(--r-xs); }
  ::selection { background: var(--brand-200); color: var(--text); }
  ::placeholder { color: var(--text-disabled); opacity: 1; }

  /* 클래스 없는 입력칸도 같은 모양 (화면 규칙·인라인이 있으면 그것이 이김) */
  :where(input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file], [type=submit], [type=button], [type=reset], [type=image], [type=hidden]), select, textarea) {
    min-height: var(--ctl-h); padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
    background-color: var(--surface); color: var(--text); font-size: var(--fs-13); line-height: 20px;
    transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
  }
  :where(textarea) { min-height: 76px; resize: vertical; }
  :where(select) { padding-right: 30px; appearance: none; -webkit-appearance: none; cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
    background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
  :where(select[multiple], select[size]) { background-image: none; padding-right: 10px; }
  :where(input:not([type=checkbox], [type=radio]), select, textarea):hover { border-color: var(--g-400); }
  :where(input:not([type=checkbox], [type=radio]), select, textarea):focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
  :where(input, select, textarea):disabled { background-color: var(--surface-sunk); color: var(--text-3); cursor: not-allowed; }
  :where(input[type=checkbox], input[type=radio]) { width: 16px; height: 16px; accent-color: var(--accent); vertical-align: -3px; cursor: pointer; }
  :where(input[type=file]) { font-size: var(--fs-12); color: var(--text-2); }
  :where(input[type=file])::file-selector-button { margin-right: 10px; height: 30px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }

  /* 클래스 없는 표도 계약 표 모양 */
  :where(table) { width: 100%; }
  :where(thead th) {
    height: 38px; padding: 0 12px; background: var(--surface-2); border-bottom: 1px solid var(--line);
    font-size: var(--fs-12); font-weight: var(--fw-bold); color: var(--text-2); text-align: left; white-space: nowrap; vertical-align: middle;
  }
  :where(tbody td, tbody th) { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; color: var(--text); }
  :where(tbody th) { font-weight: var(--fw-semibold); text-align: left; color: var(--text-2); background: var(--surface-2); }
  :where(tbody tr:last-child) > :where(td, th) { border-bottom: 0; }
  :where(tbody tr:hover) > :where(td) { background: var(--row-hover); }
  :where(tfoot td, tfoot th) { padding: 10px 12px; background: var(--tfoot-bg); border-top: 1px solid var(--tfoot-line); color: var(--tfoot-text); font-weight: var(--fw-bold); }
  :where(caption) { caption-side: top; text-align: left; padding: 0 0 8px; color: var(--text-2); font-weight: 600; }

  ::-webkit-scrollbar { width: 8px; height: 8px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--g-300); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
  ::-webkit-scrollbar-thumb:hover { background: var(--g-400); background-clip: padding-box; border: 2px solid transparent; }
}

/* ==========================================================================
   3. COMPONENTS — 계약(A_v11_bold) 컴포넌트. 옛 클래스명은 같은 규칙에 함께 묶었다.
   ========================================================================== */
@layer bo.components {

/* ---------- 3-0. 작은 도구 ---------- */
.tnum, .num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.row { display: flex; align-items: center; gap: var(--sp-2); }
.grow { flex: 1 1 auto; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.i-sm { width: 14px; height: 14px; }
.i-lg { width: 20px; height: 20px; }
.kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; font-size: 11px; font-weight: 600; color: var(--text-3); background: var(--surface); font-family: var(--font-sans); line-height: 1; }

/* ---------- 3-1. 앱 셸 (header.php 가 그린다) ---------- */
.app, .app-layout { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.main, .main-content { min-width: 0; display: flex; flex-direction: column; background: linear-gradient(180deg, var(--bg-band) 0, var(--bg) 320px) no-repeat; }
.page, .content-area { padding: var(--page-pt) var(--page-px) var(--sp-12); width: 100%; max-width: var(--content-max); flex: 1 0 auto; min-width: 0; }
.page-head, .page-header { display: flex; align-items: flex-end; gap: var(--sp-4); margin-bottom: var(--sp-5); flex-wrap: wrap; }
.page-title, .page-header h1, .page-header h2 { font-size: 22px; line-height: 30px; font-weight: var(--fw-heavy); letter-spacing: -.03em; color: var(--text); }
.page-sub, .page-header p { margin-top: 2px; color: var(--text-2); font-size: var(--fs-13); }
.page-actions { margin-left: auto; display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.page-header > :last-child:not(:first-child) { margin-left: auto; }

/* ---------- 3-2. 사이드바 ---------- */
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  background: var(--sb-bg); border-right: 1px solid var(--line);
  box-shadow: var(--sb-shadow);
  display: flex; flex-direction: column; z-index: var(--z-sidebar); min-width: 0;
}
.sb-brand, .sidebar-logo { height: var(--topbar-h); display: flex; align-items: center; gap: 10px; padding: 0 var(--sp-4); border-bottom: 1px solid var(--line-soft); flex: none; color: var(--text); }
.sb-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--hero-grad); box-shadow: var(--shadow-accent); color: var(--on-chip); display: grid; place-items: center; font-weight: 800; font-size: 13px; letter-spacing: -.04em; flex: none; }
.sb-name { font-weight: var(--fw-heavy); font-size: 16px; letter-spacing: -.03em; color: var(--brand-name); line-height: 20px; }
.sb-sub { display: block; font-size: 11px; line-height: 14px; font-weight: var(--fw-medium); color: var(--text-3); letter-spacing: 0; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-ws { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 6px 0 8px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 12px; font-weight: var(--fw-semibold); color: var(--text-2); background: var(--surface); max-width: 104px; cursor: pointer; }
.sb-ws > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-ws:hover { border-color: var(--line-strong); color: var(--text); }
.sb-ws-wrap { position: relative; margin-left: auto; }
.sb-ws-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: var(--z-drop); display: none; }
.sb-ws-wrap.open .sb-ws-menu { display: flex; }
.sb-search { margin: var(--sp-3) var(--sp-3) var(--sp-1); display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 10px; border-radius: var(--r-sm); background: var(--surface-sunk); color: var(--text-3); font-size: 12.5px; flex: none; border: 1px solid transparent; width: calc(100% - 2 * var(--sp-3)); text-align: left; cursor: pointer; }
.sb-search:hover { border-color: var(--line); color: var(--text-2); }
.sb-search .kbd { margin-left: auto; }
.sb-scroll, .sidebar-nav { overflow-y: auto; padding: var(--sp-2) var(--sp-2) var(--sp-4); flex: 1 1 auto; scrollbar-width: thin; display: block; }
.nav-sec { margin-top: var(--sp-3); }
.nav-sec:first-child { margin-top: 0; }
.nav-sec-h { display: flex; align-items: center; gap: 6px; width: 100%; height: 26px; padding: 0 var(--sp-2); border: 0; background: transparent; font-size: var(--fs-11); font-weight: var(--fw-bold); color: var(--text-3); letter-spacing: .02em; text-align: left; border-radius: var(--r-sm); cursor: pointer; }
.nav-sec-h:hover { color: var(--text); background: var(--row-hover); }
.nav-sec-h .i { width: 12px; height: 12px; margin-left: auto; transition: transform var(--dur-2) var(--ease); }
.nav-sec-more { margin-left: auto; font-weight: var(--fw-medium); color: var(--text-3); font-variant-numeric: tabular-nums; }
.nav-sec-more + .i { margin-left: 6px; }
.nav-sec-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--danger-fill); margin-left: 4px; flex: none; }
.nav-sec.closed .nav-sec-h { height: 30px; color: var(--g-700); font-size: 12.5px; font-weight: var(--fw-medium); }
.nav-sec.closed .nav-sec-h .i { transform: rotate(-90deg); }
.nav-sec.closed { margin-top: 0; }
.nav-sec.closed:first-of-type, .nav-sec:not(.closed) + .nav-sec.closed { margin-top: var(--sp-3); border-top: 1px solid var(--line-soft); padding-top: var(--sp-2); }
.nav-sec.closed .nav-list { display: none; }
.nav-sec:not(.closed) .nav-sec-more, .nav-sec:not(.closed) .nav-sec-dot { display: none; }
.nav-list { display: flex; flex-direction: column; gap: 1px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 10px; border-radius: var(--r-sm); color: var(--g-700); font-weight: var(--fw-medium); font-size: var(--fs-13); text-decoration: none; }
.nav-item > svg, .nav-item .i, .nav-icon-wrap svg { width: 16px; height: 16px; flex: none; color: var(--text-3); stroke: currentColor; stroke-width: 1.9; }
.nav-icon-wrap { width: 16px; height: 16px; display: grid; place-items: center; flex: none; background: transparent; color: var(--text-3); }
.nav-item-text, .nav-item > span:not([class]) { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item:hover { background: var(--row-hover); color: var(--accent); }
.nav-item:hover > svg, .nav-item:hover .i, .nav-item:hover .nav-icon-wrap, .nav-item:hover .nav-icon-wrap svg { color: var(--accent); }
.nav-item.active { background: linear-gradient(180deg, var(--accent-fill), var(--accent-fill-2)); color: var(--on-lime); font-weight: var(--fw-bold); box-shadow: var(--shadow-accent); }
.nav-item.active > svg, .nav-item.active .i, .nav-item.active .nav-icon-wrap, .nav-item.active .nav-icon-wrap svg { color: var(--on-lime); }
.nav-count, .nav-badge { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: var(--r-full); background: var(--surface-sunk); color: var(--text-2); font-size: 11px; font-weight: var(--fw-semibold); line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; flex: none; }
.nav-count.hot { background: var(--danger-fill); color: var(--on-fill); }
.nav-item.active .nav-count, .nav-item.active .nav-badge { background: rgba(255, 255, 255, .22); color: var(--on-lime); }
.nav-new { margin-left: 4px; height: 16px; padding: 0 5px; border-radius: var(--r-xs); background: var(--danger-fill); color: var(--on-fill); font-size: 10px; font-weight: var(--fw-bold); line-height: 16px; letter-spacing: .02em; flex: none; }
.nav-divider { height: 1px; background: var(--line-soft); margin: var(--sp-2) var(--sp-2); }
.ws-switcher { display: flex; gap: 4px; padding: var(--sp-2) var(--sp-3) 0; flex-wrap: wrap; flex: none; }
.ws-item { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: var(--r-full); font-size: 11.5px; font-weight: var(--fw-semibold); color: var(--text-2); background: var(--surface); border: 1px solid var(--line); text-decoration: none; white-space: nowrap; }
.ws-item:hover { color: var(--text); border-color: var(--line-strong); }
.ws-item.active { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.ws-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--g-400); flex: none; }
.ws-item.active .ws-dot { background: var(--accent); }
.sb-foot, .sidebar-footer { border-top: 1px solid var(--line-soft); padding: var(--sp-3) var(--sp-4); display: flex; align-items: center; gap: 10px; flex: none; font-size: 11.5px; color: var(--text-3); }

/* ---------- 3-3. 상단바 ---------- */
.topbar {
  position: sticky; top: 0; z-index: var(--z-sticky); height: var(--topbar-h); flex: none;
  display: flex; align-items: center; gap: var(--sp-3); padding: 0 var(--page-px) 0 var(--sp-6);
  background: var(--topbar-bg); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow-topbar);
}
.topbar-left { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.crumb { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 13px; white-space: nowrap; min-width: 0; }
.crumb-path { display: flex; align-items: center; gap: 6px; }
.crumb-path:empty { display: none; }
.crumb b, .crumb .topbar-title { color: var(--text); font-weight: var(--fw-bold); font-size: 13px; line-height: 20px; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; }
.crumb .i { width: 14px; height: 14px; }
.topbar-title { font-size: 15px; font-weight: var(--fw-bold); color: var(--text); }
.gsearch { margin-left: var(--sp-6); flex: 0 1 420px; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 12px; border: 1px solid var(--line-soft); border-radius: var(--r-sm); background: var(--g-50); color: var(--text-3); cursor: pointer; text-align: left; min-width: 0; }
.gsearch:hover { border-color: var(--line); color: var(--text-2); }
.gsearch .ph, .gsearch span.ph { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.top-r, .topbar-right { margin-left: auto; display: flex; align-items: center; gap: var(--sp-1); }
.top-date, .topbar-date { color: var(--text-2); font-size: 12.5px; margin-right: var(--sp-2); white-space: nowrap; }
.icon-btn, .topbar-bell, .theme-toggle { position: relative; width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--text-2); background: transparent; border: 0; cursor: pointer; flex: none; }
.icon-btn:hover, .topbar-bell:hover, .theme-toggle:hover { background: var(--surface-sunk); color: var(--text); }
.icon-btn > svg, .topbar-bell > svg, .theme-toggle > svg { width: 18px; height: 18px; }
.icon-btn .dot, .topbar-bell .dot { position: absolute; top: 2px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--r-full); background: var(--danger-fill); color: var(--on-fill); font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; border: 2px solid var(--surface); box-sizing: content-box; }
.me, .topbar-user { position: relative; display: flex; align-items: center; gap: 8px; padding: 3px 8px 3px 3px; border-radius: var(--r-sm); margin-left: var(--sp-1); cursor: pointer; border: 0; background: transparent; color: var(--text); }
.me:hover, .topbar-user:hover { background: var(--surface-sunk); }
.me-txt, .topbar-user-name { white-space: nowrap; font-weight: var(--fw-semibold); font-size: 13px; line-height: 16px; color: var(--text); }
.me-n { font-weight: var(--fw-semibold); font-size: 13px; line-height: 16px; }
.me-r { font-size: 11px; color: var(--text-3); line-height: 14px; }
.menu-btn, .mobile-menu-btn { display: none; }
.theme-wrap, .me-wrap, .notification-wrapper { position: relative; }
.bo-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sb-ws-menu { min-width: 200px; padding: 4px; flex-direction: column; gap: 0; }
.sb-ws-menu .ws-item { height: 34px; border: 0; border-radius: 6px; background: transparent; font-size: 13px; font-weight: 500; color: var(--text); padding: 0 10px; gap: 8px; }
.sb-ws-menu .ws-item:hover { background: var(--surface-sunk); }
.sb-ws-menu .ws-item.active { color: var(--accent); font-weight: var(--fw-semibold); background: var(--accent-soft); }
.sb-ws-menu .ws-chk { margin-left: auto; }
.top-drop { position: absolute; right: 0; top: calc(100% + 8px); z-index: var(--z-drop); display: none; }
.top-drop.open, .user-dropdown.active { display: block; }
.theme-ic-dark, .theme-ic-system { display: none; }
[data-theme-pref="dark"] .theme-ic-light, [data-theme-pref="system"] .theme-ic-light { display: none; }
[data-theme-pref="dark"] .theme-ic-dark { display: block; }
[data-theme-pref="system"] .theme-ic-system { display: block; }

/* 알림 · 내 정보 · 테마 드롭다운 = .pop */
.notif-dropdown { width: 360px; max-width: calc(100vw - 24px); padding: 0; overflow: hidden; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.notif-head h4 { font-size: 14px; font-weight: var(--fw-bold); }
.notif-list { max-height: 380px; overflow-y: auto; padding: 4px 0; }
.notif-empty { text-align: center; padding: 32px 16px; color: var(--text-3); font-size: 13px; }
.notif-item { display: flex; align-items: flex-start; gap: 8px; padding: 12px 16px; text-decoration: none; border-bottom: 1px solid var(--line-soft); color: var(--text); }
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: var(--row-hover); color: var(--text); }
.notif-item.unread { background: var(--info-bg); }
.notif-item.unread:hover { background: var(--row-selected); }
.notif-dot { width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.notif-t { font-size: 13px; font-weight: var(--fw-regular); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-item.unread .notif-t { font-weight: var(--fw-semibold); }
.notif-m { font-size: 12px; color: var(--text-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-time { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.user-dropdown { min-width: 200px; }
.user-head { padding: 10px 12px 8px; }
.user-head .n { font-weight: var(--fw-semibold); font-size: 14px; color: var(--text); }
.user-head .r { font-size: 12px; color: var(--text-3); }
.theme-menu { min-width: 168px; }
.theme-menu button { width: 100%; border: 0; background: transparent; color: var(--text); text-align: left; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border-radius: 5px; font-weight: 500; cursor: pointer; }
.theme-menu button:hover { background: var(--surface-sunk); }
.theme-menu button .chk { margin-left: auto; color: var(--accent); visibility: hidden; }
.theme-menu button[aria-checked="true"] { color: var(--accent); font-weight: var(--fw-semibold); }
.theme-menu button[aria-checked="true"] .chk { visibility: visible; }
.theme-menu .pop-label { padding: 6px 10px 4px; font-size: 11px; font-weight: var(--fw-bold); color: var(--text-3); }

/* ---------- 3-4. Ctrl K 메뉴 이동 / 검색 ---------- */
.cmdk-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: var(--z-modal); display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; }
.cmdk-scrim.open { display: flex; }
.cmdk { width: 600px; max-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-modal); overflow: hidden; display: flex; flex-direction: column; max-height: 70vh; }
.cmdk-top { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 52px; border-bottom: 1px solid var(--line-soft); color: var(--text-3); flex: none; }
.cmdk-top .i { width: 18px; height: 18px; }
.cmdk-input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; min-height: 0; padding: 0; }
.cmdk-input:focus { box-shadow: none; }
.cmdk-list { overflow-y: auto; padding: 6px; flex: 1 1 auto; }
.cmdk-group { padding: 8px 10px 4px; font-size: 11px; font-weight: var(--fw-bold); color: var(--text-3); letter-spacing: .02em; }
.cmdk-item { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: var(--r-sm); color: var(--text); font-weight: 500; cursor: pointer; text-decoration: none; }
.cmdk-item > svg, .cmdk-item .nav-icon-wrap { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.cmdk-item .sec { margin-left: auto; font-size: 12px; color: var(--text-3); font-weight: 400; }
.cmdk-item .ret { display: none; margin-left: 8px; }
.cmdk-item.hl { background: var(--accent-soft); color: var(--accent); }
.cmdk-item.hl > svg, .cmdk-item.hl .nav-icon-wrap { color: var(--accent); }
.cmdk-item.hl .ret { display: inline-grid; }
.cmdk-item mark { background: transparent; color: var(--accent); font-weight: var(--fw-bold); padding: 0; }
.cmdk-empty { padding: 28px 16px; text-align: center; color: var(--text-3); }
.cmdk-foot { display: flex; align-items: center; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--line-soft); background: var(--surface-2); color: var(--text-3); font-size: 12px; flex: none; }
.cmdk-foot span { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- 3-5. 아바타 ---------- */
.av, .topbar-avatar { width: 28px; height: 28px; border-radius: var(--r-full); display: inline-grid; place-items: center; flex: none; font-size: 11.5px; font-weight: var(--fw-bold); background: var(--av-bg); color: var(--av-text); }
.av-sm { width: 22px; height: 22px; font-size: 10.5px; }
.av-ink, .topbar-avatar { background: var(--hero-grad); color: var(--on-chip); }

/* ---------- 3-6. 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--ctl-h); padding: 0 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-size: 13px; font-weight: var(--fw-semibold); line-height: 1; white-space: nowrap; cursor: pointer; text-decoration: none;
  box-shadow: var(--shadow-1); transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
  vertical-align: middle; user-select: none;
}
.btn:hover { background: var(--surface-2); border-color: var(--g-400); color: var(--text); }
.btn:active { transform: translateY(.5px); }
.btn > svg, .btn .i { width: 16px; height: 16px; color: var(--text-2); flex: none; }
.btn-primary, .btn.primary { background: linear-gradient(180deg, var(--btn-fill), var(--btn-fill-2)); border-color: var(--btn-fill); color: var(--on-btn); box-shadow: var(--shadow-accent); }
.btn-primary > svg, .btn-primary .i, .btn.primary > svg { color: currentColor; }
.btn-primary:hover, .btn.primary:hover { background: var(--btn-fill-2); border-color: var(--btn-fill-2); color: var(--on-btn); }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--text); }
.btn-ink, .btn-dark { background: var(--ink-fill); border-color: var(--ink-fill); color: var(--on-ink-fill); }
.btn-ink > svg, .btn-ink .i, .btn-dark > svg { color: currentColor; }
.btn-ink:hover, .btn-dark:hover { background: var(--ink-fill-2); border-color: var(--ink-fill-2); color: var(--on-ink-fill); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-sunk); border-color: transparent; color: var(--text); }
.btn-light { background: var(--surface-sunk); border-color: transparent; box-shadow: none; color: var(--text); }
.btn-light:hover { background: var(--g-150); border-color: transparent; }
.btn-danger { color: var(--danger); }
.btn-danger > svg, .btn-danger .i { color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger); }
/* 실행 의미가 있는 채움 버튼(승인·입금확인·삭제확정) — 흰 글자 대비 AA */
.btn-success { background: var(--ok-fill); border-color: var(--ok-fill); color: var(--on-fill); }
.btn-success:hover { background: var(--ok-fill); border-color: var(--ok-fill); color: var(--on-fill); filter: brightness(.94); }
.btn-warning { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.btn-warning:hover { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.btn-danger-fill, .btn-danger.btn-solid { background: var(--danger-fill); border-color: var(--danger-fill); color: var(--on-fill); }
.btn-success > svg, .btn-danger-fill > svg, .btn-success .i, .btn-danger-fill .i { color: currentColor; }
.btn-outline { background: transparent; border-color: var(--accent-line); color: var(--accent); box-shadow: none; }
.btn-outline:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.btn-sm { height: var(--ctl-h-sm); padding: 0 10px; font-size: 12px; gap: 5px; }
.btn-sm > svg, .btn-sm .i { width: 14px; height: 14px; }
.btn-xs { height: 24px; padding: 0 8px; font-size: 11.5px; border-radius: 6px; gap: 4px; }
.btn-lg { height: var(--ctl-h-lg); padding: 0 16px; font-size: 14px; }
.btn-block { display: flex; width: 100%; }
.btn-icon { width: var(--ctl-h); padding: 0; }
.btn-sm.btn-icon { width: var(--ctl-h-sm); }
.btn[disabled], .btn.is-disabled, .btn:disabled { opacity: .45; pointer-events: none; box-shadow: none; }
.btn-group { display: inline-flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.btn-seg { display: inline-flex; }
.btn-seg .btn { border-radius: 0; margin-left: -1px; box-shadow: none; }
.btn-seg .btn:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); margin-left: 0; }
.btn-seg .btn:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.btn-on-hero { background: var(--surface); border-color: var(--surface); color: var(--accent); box-shadow: 0 6px 16px -6px rgba(29, 41, 22, .45); }
.btn-on-hero > svg, .btn-on-hero .i { color: var(--accent); }
.btn-on-hero:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent); }

/* ---------- 3-7. 폼 ---------- */
.field, .form-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label, .form-label { font-size: 12.5px; font-weight: var(--fw-semibold); color: var(--g-700); line-height: 18px; }
.label .req, .form-label .required, .required { color: var(--danger); margin-left: 2px; }
.help, .form-hint, .hint { font-size: 12px; color: var(--text-3); line-height: 18px; }
.err, .form-error { font-size: 12px; color: var(--danger); }
.input, .select, .textarea, .form-input, .form-select, .form-textarea, .filter-select {
  min-height: var(--ctl-h); height: var(--ctl-h); width: 100%; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background-color: var(--surface); font-size: 13px; color: var(--text); line-height: 20px;
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
div.input, div.select, span.input { display: flex; align-items: center; gap: 8px; }
.input.ph, .select.ph { color: var(--text-disabled); }
.input:hover, .select:hover, .form-input:hover, .form-select:hover, .form-textarea:hover, .filter-select:hover { border-color: var(--g-400); }
.input:focus, .input.is-focus, .form-input:focus, .form-select:focus, .form-textarea:focus, .filter-select:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.input.is-error, .form-input.is-error { border-color: var(--danger); }
.input .i, .select .i { color: var(--text-3); }
select.select, select.form-select, .filter-select, select.input {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
div.select { justify-content: space-between; cursor: pointer; }
div.select .i:last-child { margin-left: auto; }
.textarea, .form-textarea { height: auto; min-height: 76px; padding: 8px 10px; line-height: 20px; resize: vertical; }
div.textarea { align-items: flex-start; }
.form-input:disabled, .form-select:disabled, .form-textarea:disabled, .input:disabled { background-color: var(--surface-sunk); color: var(--text-3); cursor: not-allowed; }
.form-input[readonly], .input[readonly] { background-color: var(--surface-2); }
.input-sm, .form-input.input-sm, .form-select.input-sm { height: var(--ctl-h-sm); min-height: var(--ctl-h-sm); font-size: 12px; padding: 0 8px; }
.input-affix { margin-left: auto; color: var(--text-3); font-size: 12px; }
/* .form-grid: 옛 화면은 2칸(.form-group.full = 한 줄 전체), 계약 화면은 .col-N(12칸) */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.form-grid:has(> .col-3, > .col-4, > .col-6, > .col-8, > .col-12) { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.form-group.full, .form-grid > .full, .form-group.full-width { grid-column: 1 / -1; }
.col-3 { grid-column: span 3; } .col-4 { grid-column: span 4; } .col-6 { grid-column: span 6; } .col-8 { grid-column: span 8; } .col-12 { grid-column: span 12; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-4); }
.form-section { margin-bottom: var(--sp-6); }
.form-section:last-child { margin-bottom: 0; }
.form-section-title, .info-section-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: var(--fw-heavy); letter-spacing: var(--tracking-title); color: var(--text); padding-bottom: 10px; margin-bottom: var(--sp-4); border-bottom: 1px solid var(--line-soft); }
.form-section-title svg, .info-section-title svg { width: 16px; height: 16px; color: var(--accent); }
.info-section { margin-bottom: var(--sp-6); }
.info-section:last-child { margin-bottom: 0; }
.radio-group { display: flex; gap: var(--sp-4); flex-wrap: wrap; padding-top: 4px; }
.radio-group label, .check-row { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.cb { width: 16px; height: 16px; border: 1.5px solid var(--g-400); border-radius: var(--r-xs); background: var(--surface); display: inline-grid; place-items: center; flex: none; vertical-align: middle; }
.cb.on, .cb.mixed { background: var(--accent); border-color: var(--accent); }
.cb.on::after { content: ""; width: 8px; height: 4.5px; border-left: 2px solid var(--on-accent); border-bottom: 2px solid var(--on-accent); transform: rotate(-45deg) translate(1px, -1px); }
.cb.mixed::after { content: ""; width: 8px; height: 2px; background: var(--on-accent); }
.switch { width: 30px; height: 18px; border-radius: var(--r-full); background: var(--g-300); position: relative; flex: none; display: inline-block; vertical-align: middle; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: left var(--dur-2) var(--ease); }
.switch.on { background: var(--accent); }
.switch.on::after { left: 14px; }
.seg { display: inline-flex; padding: 3px; background: var(--g-150); border-radius: var(--r-sm); gap: 2px; }
.seg a, .seg span, .seg button { height: 28px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; border-radius: 5px; font-size: 12.5px; font-weight: var(--fw-medium); color: var(--text-2); white-space: nowrap; border: 0; background: transparent; cursor: pointer; text-decoration: none; }
.seg .on, .seg .active { background: var(--surface); color: var(--accent); font-weight: var(--fw-bold); box-shadow: 0 1px 2px rgba(27, 31, 25, .08), 0 2px 6px -2px rgba(27, 31, 25, .10); }
.seg .c { color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.search-box { position: relative; flex: 1 1 220px; min-width: 200px; max-width: 340px; }
.search-box input { width: 100%; height: var(--ctl-h); padding: 0 12px 0 34px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); font-size: 13px; color: var(--text); background: var(--surface); }
.search-box input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.search-box svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-3); pointer-events: none; }

/* ---------- 3-8. 배지 · 태그 ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--r-xs); font-size: 12px; font-weight: var(--fw-semibold); line-height: 1; white-space: nowrap; border: 1px solid transparent; color: var(--neutral); background: var(--neutral-bg); vertical-align: middle; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge.no-dot::before { display: none; }
.b-ok, .badge-success, .badge.success { color: var(--ok); background: var(--ok-bg); }
.b-warn, .badge-warning, .badge.warning { color: var(--warn); background: var(--warn-bg); }
.b-danger, .badge-danger, .badge.danger { color: var(--danger); background: var(--danger-bg); }
.b-info, .badge-primary, .badge-info, .badge.info { color: var(--info); background: var(--info-bg); }
.b-neutral, .badge-secondary, .badge.neutral { color: var(--neutral); background: var(--neutral-bg); }
.b-violet { color: var(--tone-violet); background: var(--tone-violet-bg); }
.b-pink { color: var(--tone-pink); background: var(--tone-pink-bg); }
.b-sky { color: var(--tone-sky); background: var(--tone-sky-bg); }
.b-line { background: transparent; border-color: currentColor; }
/* 숫자 알약(옛 .badge 빨간 원 · 안 읽음 수) */
.count, .badge-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-full); background: var(--danger-fill); color: var(--on-fill); font-size: 11px; font-weight: var(--fw-bold); line-height: 1; font-variant-numeric: tabular-nums; }
.count.info { background: var(--accent); color: var(--on-accent); }
.count.muted { background: var(--surface-sunk); color: var(--text-2); }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; border-radius: var(--r-xs); border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: 11.5px; font-weight: var(--fw-medium); white-space: nowrap; }
.tag-soft { border-color: transparent; background: var(--surface-sunk); }
.due { font-variant-numeric: tabular-nums; font-weight: var(--fw-semibold); }
.due.late { color: var(--danger); }
.due.soon { color: var(--warn); }
.txt-ok { color: var(--ok); } .txt-warn { color: var(--warn); } .txt-danger { color: var(--danger); } .txt-info { color: var(--info); } .txt-muted { color: var(--text-3); }

/* 수주 상태 배지 — statusLabel 단계 의미 고정(계약 data.mjs): 협의 회색 · 접수/실무 파랑 · 작업완료 주황 · 링크전달 초록 · 정산완료 회색 */
.status-badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--r-xs); font-size: 12px; font-weight: var(--fw-semibold); line-height: 1; white-space: nowrap; color: var(--neutral); background: var(--neutral-bg); border: 0; }
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.status-quote_pending, .status-consulting, .status-cancelled, .status-settled { color: var(--neutral); background: var(--neutral-bg); }
.status-received, .status-working { color: var(--info); background: var(--info-bg); }
.status-done { color: var(--warn); background: var(--warn-bg); }
.status-delivered, .status-paid { color: var(--ok); background: var(--ok-bg); }
.status-hold, .status-failed, .status-rejected, .status-overdue { color: var(--danger); background: var(--danger-bg); }

/* ---------- 3-9. 패널(카드) ---------- */
.panel, .card { background: var(--surface); border: 1px solid var(--line-card); border-radius: var(--r-md); min-width: 0; box-shadow: var(--shadow-card); overflow: clip; color: var(--text); }
.card { margin-bottom: var(--sp-4); }
.panel-h, .card-header { display: flex; align-items: center; gap: var(--sp-2); min-height: 54px; padding: 10px var(--sp-4); border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.card-header { justify-content: space-between; }
.panel-t, .card-title { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; line-height: 22px; font-weight: var(--fw-heavy); letter-spacing: var(--tracking-title); color: var(--text); margin: 0; }
.panel-t small, .card-title small { font-size: 12px; font-weight: 500; color: var(--text-3); margin-left: 6px; letter-spacing: 0; }
.card-subtitle { font-size: 12.5px; color: var(--text-2); font-weight: 400; margin-top: 2px; }
.panel-h .more { margin-left: auto; font-size: 12px; color: var(--text-2); display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }
a.more:hover { color: var(--accent); }
.panel-b, .card-body { padding: var(--sp-4); }
.panel-f, .card-footer { border-top: 1px solid var(--line-soft); padding: var(--sp-3) var(--sp-4); display: flex; align-items: center; gap: var(--sp-2); background: var(--surface-2); }
.card-body.p-0, .panel-b.p-0 { padding: 0; }
.card > .table-wrapper:first-child, .card > table:first-child { border-top: 0; }
.stack { display: flex; flex-direction: column; gap: var(--sp-4); }
.grid { display: grid; gap: var(--sp-4); }
.g-main { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--sp-4); align-items: start; }
.g-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--sp-4); align-items: start; }
.g-2, .two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
.g-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); }
.g-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); }

/* ---------- 3-10. 탭 ---------- */
.tabs, .sub-tabs { display: flex; gap: var(--sp-5); border-bottom: 1px solid var(--line-strong); margin-bottom: var(--sp-4); overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.tabs::-webkit-scrollbar, .sub-tabs::-webkit-scrollbar { display: none; }
.card > .sub-tabs, .panel > .tabs, .tabs-in-panel { padding: 0 var(--sp-4); margin: 0; }
.tab, .sub-tab { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0; color: var(--text-2); font-weight: var(--fw-medium); font-size: 13.5px; white-space: nowrap; text-decoration: none; border: 0; background: transparent; cursor: pointer; flex: none; }
.tab .c, .sub-tab .c { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; font-weight: 500; }
.tab .c.hot, .sub-tab .c.hot { color: var(--danger); font-weight: 700; }
.tab:hover, .sub-tab:hover { color: var(--text); }
.tab.on, .tab.active, .sub-tab.active, .sub-tab.on { color: var(--accent); font-weight: var(--fw-bold); }
.tab.on::after, .tab.active::after, .sub-tab.active::after, .sub-tab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--accent); border-radius: 3px 3px 0 0; }
.tab.on .c, .tab.active .c, .sub-tab.active .c { color: var(--on-btn); background: var(--btn-fill); font-weight: 700; padding: 0 6px; border-radius: var(--r-full); line-height: 18px; }

/* ---------- 3-11. 도구줄 · 필터칩 ---------- */
.toolbar, .filter-bar { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line-soft); }
.toolbar .input, .toolbar .select, .toolbar .form-input, .toolbar .form-select,
.filter-bar .form-input, .filter-bar .form-select, .filter-bar-row .form-input, .filter-bar-row .form-select,
.filter-row .form-input, .filter-row .form-select, .filter-select { width: auto; min-width: 128px; flex: 0 1 auto; }
.toolbar .search-box, .filter-bar .search-box { flex: 1 1 240px; }
.filter-bar-row { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
.filter { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px dashed var(--line-strong); border-radius: var(--r-sm); color: var(--text-2); font-size: 12.5px; font-weight: var(--fw-medium); white-space: nowrap; background: var(--surface); cursor: pointer; text-decoration: none; }
.filter:hover { color: var(--text); border-color: var(--g-400); }
.filter.set, .filter.on, .filter.active { border-style: solid; border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
.filter b { font-weight: var(--fw-semibold); color: var(--text); }
.filter.set b, .filter.on b { color: var(--accent); }
.filter .x { margin-left: 2px; opacity: .7; }

/* ---------- 3-12. 표 ---------- */
.tbl-wrap, .table-wrapper, .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; min-width: 0; }
.tbl, .table-wrapper > table, .table-wrap > table, .card-body > table, .card > table { width: 100%; font-size: 13px; }
.tbl th, .table-wrapper th, .table-wrap th, .card > table th {
  height: 38px; padding: 0 12px; background: var(--surface-2); border-bottom: 1px solid var(--line);
  font-size: 12px; font-weight: var(--fw-bold); color: var(--text-2); text-align: left; white-space: nowrap; vertical-align: middle; letter-spacing: 0; text-transform: none;
}
.tbl thead th { position: sticky; top: 0; z-index: 1; }
.tbl th .i { width: 12px; height: 12px; vertical-align: -2px; }
.tbl th.sorted { color: var(--text); }
.tbl td, .table-wrapper td, .table-wrap td, .card > table td { height: var(--row-h); padding: 6px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; color: var(--text); font-size: 13px; }
.tbl td { white-space: nowrap; }
.tbl tbody tr:hover td, .table-wrapper tbody tr:hover td, .table-wrap tbody tr:hover td { background: var(--row-hover); }
.tbl tbody tr.sel td, tr.sel > td, tr.selected > td { background: var(--row-selected); }
.tbl tbody tr.dim td, tr.dim > td { color: var(--text-3); }
.tbl tbody tr:last-child td, .table-wrapper tbody tr:last-child td, .table-wrap tbody tr:last-child td { border-bottom: 0; }
.tbl .num, .tbl th.num, td.num, th.num, td.amount-cell { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .c, td.c, th.c { text-align: center; }
.tbl .w-cb, th.w-cb, td.w-cb { width: 40px; padding-right: 0; }
.tbl .w-act { width: 44px; padding-left: 0; text-align: right; }
.tbl .strong, td.strong { font-weight: var(--fw-semibold); }
.tbl .sub, td .sub { display: block; font-size: 12px; line-height: 16px; color: var(--text-3); margin-top: 1px; }
.tbl .link, td .link { color: var(--text); font-weight: var(--fw-semibold); }
.tbl .link:hover, td .link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.tbl tfoot td, .table-wrapper tfoot td, tr.total > td, tr.sum > td { height: 42px; padding: 0 12px; background: var(--tfoot-bg); border-top: 1px solid var(--tfoot-line); color: var(--tfoot-text); font-weight: var(--fw-bold); white-space: nowrap; }
.tbl-compact td { height: var(--row-h-compact); }
.tbl-group td, tr.tbl-group > td { background: var(--surface-2); height: 34px; font-size: 12px; color: var(--text-2); font-weight: var(--fw-semibold); }
tbody tr.clickable { cursor: pointer; }
table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; vertical-align: -3px; }
.cell-url { display: inline-flex; align-items: center; gap: 4px; max-width: 180px; color: var(--text-2); font-size: 12px; }
.cell-url span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-empty { color: var(--text-disabled); }
.tbl-foot { display: flex; align-items: center; gap: var(--sp-3); padding: 0 var(--sp-4); min-height: 48px; border-top: 1px solid var(--line-soft); color: var(--text-2); font-size: 12.5px; flex-wrap: wrap; }
.pager, .pagination { margin-left: auto; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.pagination { justify-content: center; margin: 0; padding: var(--sp-4) 0 var(--sp-2); }
.pager a, .pagination a, .pagination span { min-width: 30px; height: 30px; padding: 0 6px; display: grid; place-items: center; border-radius: var(--r-sm); font-weight: 500; color: var(--text-2); font-variant-numeric: tabular-nums; text-decoration: none; font-size: 13px; }
.pager a.on, .pagination a.active, .pagination span.active { background: var(--btn-fill); color: var(--on-btn); font-weight: 700; box-shadow: none; }
.pager a:hover:not(.on), .pagination a:hover:not(.active) { background: var(--surface-sunk); color: var(--text); }

/* 선택 시 나타나는 일괄 작업 줄 (계약: 네이비) */
.bulkbar, .bulk-actions.show { display: flex; align-items: center; gap: var(--sp-2); min-height: 48px; padding: 0 var(--sp-3) 0 var(--sp-4); background: linear-gradient(90deg, var(--ink-fill), var(--ink-fill-2)); color: var(--on-ink-fill); border-radius: var(--r-md) var(--r-md) 0 0; flex-wrap: wrap; }
.bulk-actions { display: none; border-radius: var(--r-md); margin-bottom: var(--sp-3); }
.bulkbar .cb.on { background: #fff; border-color: #fff; }
.bulkbar .cb.on::after { border-color: var(--navy-900); }
.bulkbar b, .bulk-actions .selected-count { font-variant-numeric: tabular-nums; color: var(--on-ink-fill); font-weight: var(--fw-bold); font-size: 13px; }
.bulkbar .sep { width: 1px; height: 18px; background: rgba(255, 255, 255, .18); margin: 0 var(--sp-1); }
.bulkbar .bb { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: var(--r-sm); color: var(--on-ink-fill-2); font-weight: 600; font-size: 12.5px; background: transparent; border: 0; cursor: pointer; text-decoration: none; }
.bulkbar .bb:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.bulkbar .bb .i, .bulkbar .bb svg { color: var(--hero-dot-info); width: 15px; height: 15px; }
.bulkbar .sum { margin-left: auto; color: var(--on-ink-fill-2); font-size: 12.5px; }
.bulkbar .sum b { color: #fff; }
.bulk-actions .btn { height: 30px; font-size: 12px; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: #fff; box-shadow: none; }
.bulk-actions .btn:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.bulk-actions .btn-primary { background: #fff; border-color: #fff; color: var(--navy-900); }

/* 진행 단계 미니 막대 · 전·입·정 체크 */
.flow-mini { display: inline-flex; gap: 2px; vertical-align: middle; }
.flow-mini i { width: 12px; height: 5px; border-radius: 3px; background: var(--g-200); }
.flow-mini i.done { background: var(--brand-300); }
.flow-mini i.now { background: var(--accent); }
.flow-mini i.alert { background: var(--danger); }
.pipe { display: inline-flex; align-items: center; gap: 8px; }
.pipe-l { font-size: 12.5px; font-weight: 600; }
.chk3 { display: inline-flex; gap: 3px; }
.chk3 span { display: inline-grid; place-items: center; width: 22px; height: 20px; border-radius: 4px; font-size: 11px; font-weight: 700; color: var(--text-disabled); background: var(--surface-sunk); }
.chk3 span.on { color: var(--ok); background: var(--ok-bg); }
.chk3 span.late { color: var(--danger); background: var(--danger-bg); }

/* ---------- 3-13. KPI 카드 (계약 v1.1 낱장 카드 · 옛 .stat-card 같은 모양) ---------- */
.kpis, .stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); margin-bottom: var(--sp-4); }
.kpi { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line-card); border-radius: var(--r-md); box-shadow: var(--shadow-card); padding: var(--sp-4) var(--sp-5) var(--sp-3); overflow: hidden; color: var(--text); }
a.kpi:hover, a.stat-card:hover { border-color: var(--accent-line); }
.kpi-l { font-size: 12.5px; color: var(--text-2); font-weight: var(--fw-semibold); display: flex; align-items: center; gap: 6px; }
.kpi-v { margin-top: 10px; font-size: 26px; line-height: 34px; font-weight: var(--fw-heavy); letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); }
.kpi-v small { font-size: 14px; font-weight: 600; color: var(--text-2); margin-left: 2px; letter-spacing: 0; }
.kpi-d { margin-top: 4px; font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.kpi > .spark { margin-top: auto; }
.kpi > .kpi-d:has(+ .spark) { margin-bottom: 12px; }
.kpi-ic { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--tone-blue-bg); color: var(--tone-blue); flex: none; }
.kpi-ic .i, .kpi-ic svg { width: 15px; height: 15px; stroke-width: 2; vertical-align: 0; }
.kpi-ic.t-indigo { background: var(--tone-indigo-bg); color: var(--tone-indigo); }
.kpi-ic.t-sky { background: var(--tone-sky-bg); color: var(--tone-sky); }
.kpi-ic.t-violet { background: var(--tone-violet-bg); color: var(--tone-violet); }
.kpi-ic.t-ok { background: var(--ok-bg); color: var(--ok); }
.kpi-ic.t-warn { background: var(--warn-bg); color: var(--warn); }
.kpi-ic.t-danger { background: var(--danger-bg); color: var(--danger); }
.delta { font-weight: 700; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--ok); } .delta.down { color: var(--danger); }
.kpi-d .delta.up { padding: 1px 6px; border-radius: var(--r-full); background: var(--ok-bg); }
.kpi-d .delta.down { padding: 1px 6px; border-radius: var(--r-full); background: var(--danger-bg); }
/* 옛 .stat-card(아이콘 왼쪽 + 숫자) — 계약 KPI 카드 모양으로 */
.stat-card { position: relative; display: flex; align-items: flex-start; gap: var(--sp-3); min-width: 0; background: var(--surface); border: 1px solid var(--line-card); border-radius: var(--r-md); box-shadow: var(--shadow-card); padding: var(--sp-4) var(--sp-5); color: var(--text); text-decoration: none; }
.stat-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--tone-blue-bg); color: var(--tone-blue); }
.stat-icon svg { width: 18px; height: 18px; stroke-width: 2; }
.stat-icon.blue { background: var(--tone-blue-bg); color: var(--tone-blue); }
.stat-icon.green { background: var(--ok-bg); color: var(--ok); }
.stat-icon.amber, .stat-icon.orange { background: var(--warn-bg); color: var(--warn); }
.stat-icon.purple { background: var(--tone-violet-bg); color: var(--tone-violet); }
.stat-icon.pink { background: var(--tone-pink-bg); color: var(--tone-pink); }
.stat-icon.red { background: var(--danger-bg); color: var(--danger); }
.stat-icon.indigo { background: var(--tone-indigo-bg); color: var(--tone-indigo); }
.stat-icon.sky { background: var(--tone-sky-bg); color: var(--tone-sky); }
.stat-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.stat-value { font-size: 24px; line-height: 32px; font-weight: var(--fw-heavy); letter-spacing: -.03em; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }
.stat-label { order: -1; font-size: 12.5px; line-height: 18px; color: var(--text-2); font-weight: var(--fw-semibold); }

/* ---------- 3-14. 정의 목록 · 상세 ---------- */
.dl { display: grid; grid-template-columns: 112px minmax(0, 1fr); }
.dl dt, .dl dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line-soft); min-height: 41px; }
.dl dt { color: var(--text-3); font-size: 12.5px; font-weight: var(--fw-medium); }
.dl dd { font-weight: var(--fw-medium); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dl > :nth-last-child(-n+2) { border-bottom: 0; }
.dl-2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--sp-8); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--sp-8); row-gap: 0; }
.detail-row { display: flex; gap: var(--sp-3); padding: 10px 0; border-bottom: 1px solid var(--line-soft); align-items: baseline; }
.detail-item { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.detail-item.full-width, .detail-item.full { grid-column: 1 / -1; }
.detail-label, .detail-item > label { font-size: 12px; font-weight: var(--fw-medium); color: var(--text-3); min-width: 96px; flex: none; letter-spacing: 0; text-transform: none; margin: 0; }
.detail-value, .detail-item > span, .detail-item > a { font-size: 13.5px; font-weight: var(--fw-semibold); color: var(--text); }
.detail-item > a { color: var(--accent); }

/* ---------- 3-15. 진행표(주문 상세) ---------- */
.stepper { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.step { padding: 10px 12px 0; border-top: 4px solid var(--g-200); }
.step-n { font-size: 11.5px; color: var(--text-3); font-weight: 600; font-variant-numeric: tabular-nums; }
.step-t { font-size: 13px; font-weight: 600; color: var(--text-2); margin-top: 2px; }
.step-d { font-size: 12px; color: var(--text-3); margin-top: 2px; font-variant-numeric: tabular-nums; }
.step.done { border-top-color: var(--brand-300); }
.step.done .step-t { color: var(--text); }
.step.now { border-top-color: var(--accent); }
.step.now .step-n, .step.now .step-t { color: var(--accent); }

/* ---------- 3-16. 이력(타임라인) ---------- */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding: 0 0 14px 20px; }
.tl li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--surface); border: 2px solid var(--g-400); }
.tl li::after { content: ""; position: absolute; left: 8px; top: 17px; bottom: 0; width: 1px; background: var(--line); }
.tl li:last-child::after { display: none; }
.tl li.now::before { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 3px var(--brand-100); }
.tl-t { font-size: 13px; font-weight: 500; }
.tl-m { font-size: 12px; color: var(--text-3); margin-top: 1px; font-variant-numeric: tabular-nums; }
.timeline { padding: 0; }
.timeline-item { position: relative; display: flex; gap: var(--sp-3); padding: 0 0 14px; }
.timeline-item:not(:last-child)::after { content: ""; position: absolute; left: 4px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.timeline-dot { position: relative; z-index: 1; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--surface); flex: none; }
.timeline-content { flex: 1; min-width: 0; }
.timeline-content .time { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.timeline-content .desc { font-size: 13px; color: var(--text); }

/* ---------- 3-17. 콜아웃(옛 .alert 포함) — 화면당 1개 권장 ---------- */
.callout, .alert { display: flex; align-items: center; gap: var(--sp-3); padding: 11px var(--sp-4); border: 1px solid var(--info-line); border-left: 4px solid var(--accent); border-radius: var(--r-sm); background: var(--info-bg); color: var(--text); margin-bottom: var(--sp-4); box-shadow: var(--shadow-1); line-height: 20px; }
.alert { align-items: flex-start; }
.callout .i, .callout > svg, .alert > svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.alert > svg { margin-top: 1px; }
.callout.warn, .alert-warning { border-color: var(--warn-line); border-left-color: var(--warn); background: var(--warn-bg); }
.callout.warn .i, .callout.warn > svg, .alert-warning > svg { color: var(--warn); }
.callout.danger, .alert-danger, .alert-error { border-color: var(--danger-line); border-left-color: var(--danger); background: var(--danger-bg); }
.callout.danger .i, .callout.danger > svg, .alert-danger > svg, .alert-error > svg { color: var(--danger); }
.callout.ok, .alert-success { border-color: var(--ok-line); border-left-color: var(--ok); background: var(--ok-bg); }
.callout.ok .i, .callout.ok > svg, .alert-success > svg { color: var(--ok); }
.alert-info { border-color: var(--info-line); border-left-color: var(--accent); background: var(--info-bg); }
.callout-t { font-weight: var(--fw-semibold); }
.callout .btn { margin-left: auto; }

/* ---------- 3-18. 팝 메뉴 · 모달 · 서랍 · 토스트 · 툴팁 ---------- */
.pop, .action-dropdown { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-pop); padding: 4px; min-width: 180px; color: var(--text); }
.pop a, .pop > button, .action-dropdown a, .action-dropdown button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 0 10px; border-radius: 5px; font-weight: 500; font-size: 13px; color: var(--text); background: transparent; border: 0; text-align: left; cursor: pointer; text-decoration: none; }
.pop a:hover, .pop a.hl, .pop > button:hover, .action-dropdown a:hover, .action-dropdown button:hover { background: var(--surface-sunk); color: var(--text); }
.pop a > svg, .pop > button > svg, .action-dropdown svg { width: 15px; height: 15px; color: var(--text-3); flex: none; }
.pop hr, .action-dropdown .divider { border: 0; height: 0; border-top: 1px solid var(--line-soft); margin: 4px 0; }
.pop .danger, .action-dropdown .text-danger, .pop a.danger > svg { color: var(--danger); }
.action-menu { position: relative; display: inline-flex; }
.action-dropdown { position: absolute; top: 100%; right: 0; margin-top: 4px; min-width: 160px; z-index: var(--z-drop); display: none; }
.action-dropdown.show { display: block; }
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: var(--z-modal); }
/* 옛 모달: .modal-overlay(.active) > .modal > .modal-header/.modal-body/.modal-footer */
.modal-overlay { position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--scrim); opacity: 0; visibility: hidden; transition: opacity var(--dur-2) var(--ease), visibility var(--dur-2); }
.modal-overlay.active, .modal-overlay.show, .modal-overlay.open { opacity: 1; visibility: visible; }
.modal { background: var(--surface); color: var(--text); border-radius: var(--r-lg); box-shadow: var(--shadow-modal); width: 480px; max-width: calc(100vw - 32px); border: 1px solid var(--line-card); }
.modal-overlay .modal { width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow-y: auto; transform: translateY(8px); transition: transform var(--dur-2) var(--ease); }
.modal-overlay.active .modal, .modal-overlay.show .modal, .modal-overlay.open .modal { transform: none; }
.modal-lg .modal, .modal.modal-lg { max-width: 760px; }
.modal-xl .modal, .modal.modal-xl { max-width: 1000px; }
.modal-sm .modal, .modal.modal-sm { max-width: 420px; }
.modal-h, .modal-header { padding: var(--sp-5) var(--sp-6) var(--sp-3); display: flex; align-items: flex-start; gap: var(--sp-3); }
.modal-header { align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft); padding-bottom: var(--sp-4); }
.modal-t, .modal-header h3, .modal-header h2 { font-size: 16px; line-height: 24px; font-weight: 700; letter-spacing: var(--tracking-title); color: var(--text); display: flex; align-items: center; gap: 8px; }
.modal-b, .modal-body { padding: var(--sp-4) var(--sp-6) var(--sp-5); color: var(--text); }
.modal-b { color: var(--text-2); padding-top: var(--sp-1); }
.modal-f, .modal-footer { padding: var(--sp-3) var(--sp-6); background: var(--surface-2); border-top: 1px solid var(--line-soft); border-radius: 0 0 var(--r-lg) var(--r-lg); display: flex; justify-content: flex-end; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.modal-close { width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r-sm); cursor: pointer; color: var(--text-3); border: 0; background: transparent; font-size: 18px; line-height: 1; flex: none; }
.modal-close:hover { background: var(--surface-sunk); color: var(--text); }
.drawer { background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-modal); width: 440px; max-width: 100vw; }
.toast-container { position: fixed; top: calc(var(--topbar-h) + 12px); right: 20px; z-index: var(--z-toast); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 300px; max-width: 420px; padding: 11px 14px; border-radius: var(--r-md); background: var(--toast-bg); color: var(--toast-text); box-shadow: var(--shadow-pop); font-weight: 500; font-size: 13px; line-height: 19px; pointer-events: all; animation: bo-toast-in .28s var(--ease) both; border: 0; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--toast-info); flex: none; align-self: flex-start; margin-top: 6px; }
.toast.success::before, .toast.t-ok::before { background: var(--toast-ok); }
.toast.error::before, .toast.t-err::before { background: var(--toast-err); }
.toast.warning::before, .toast.t-warn::before { background: var(--toast-warn); }
.toast .i { color: var(--toast-ok); }
.toast.t-err .i { color: var(--toast-err); }
.toast a { margin-left: auto; color: var(--toast-info); font-weight: 600; padding: 4px 6px; }
.toast-t { font-weight: 700; font-size: 13.5px; }
.toast-d { font-size: 12px; opacity: .88; margin-top: 2px; }
.toast.fade-out { animation: bo-toast-out .28s var(--ease) both; }
@keyframes bo-toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes bo-toast-out { from { opacity: 1; } to { opacity: 0; transform: translateY(-6px); } }
.tip { display: inline-block; padding: 5px 8px; border-radius: 5px; background: var(--toast-bg); color: var(--toast-text); font-size: 12px; font-weight: 500; }

/* ---------- 3-19. 빈 상태 · 스켈레톤 ---------- */
.empty, .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: var(--sp-12) var(--sp-6); color: var(--text-2); }
.empty-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--tone-blue); margin-bottom: var(--sp-3); background: var(--tone-blue-bg); }
.empty-ic .i, .empty-ic svg { width: 20px; height: 20px; }
.empty-state > svg { width: 44px; height: 44px; padding: 12px; border-radius: 12px; color: var(--tone-blue); background: var(--tone-blue-bg); margin-bottom: var(--sp-3); stroke-width: 2; }
.empty-t, .empty-state h3, .empty-state h4 { font-size: 14px; font-weight: 700; color: var(--text); }
.empty-d, .empty-state p { margin-top: 4px; max-width: 380px; color: var(--text-2); font-size: 13px; font-weight: 400; }
.empty .btn, .empty-state .btn { margin-top: var(--sp-4); }
td > .empty-state, td.empty { padding: var(--sp-10) var(--sp-4); text-align: center; color: var(--text-3); }
.sk { display: block; height: 10px; border-radius: 4px; background: linear-gradient(90deg, var(--g-100) 0%, var(--g-150) 40%, var(--g-100) 80%); background-size: 200% 100%; animation: bo-sk 1.4s linear infinite; }
@keyframes bo-sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- 3-20. 업로드 · 파일 ---------- */
.drop, .file-upload-area { border: 1.5px dashed var(--brand-300); border-radius: var(--r-md); background: var(--accent-soft); padding: var(--sp-6); display: flex; align-items: center; gap: var(--sp-4); color: var(--text); }
.file-upload-area { display: block; padding: 0; transition: border-color var(--dur-1), background var(--dur-1); }
.file-upload-area.drag-over, .drop.drag-over { border-color: var(--accent); background: var(--row-selected); }
.file-upload-trigger { padding: var(--sp-6) var(--sp-5); text-align: center; cursor: pointer; color: var(--text-2); }
.file-upload-trigger:hover { color: var(--text); }
.drop-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--hero-grad); display: grid; place-items: center; color: var(--on-chip); flex: none; box-shadow: var(--shadow-accent); }
.file-ic { width: 28px; height: 32px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface); display: inline-grid; place-items: end center; padding-bottom: 3px; font-size: 8.5px; font-weight: 800; color: var(--text-2); letter-spacing: 0; flex: none; }
.file-ic.hwp, .file-ic.docx { color: var(--tone-blue); } .file-ic.zip { color: var(--warn); } .file-ic.pdf { color: var(--danger); } .file-ic.xlsx { color: var(--ok); }
.file-list { display: flex; flex-direction: column; gap: 6px; padding: 0 12px 12px; }
.file-list:empty { padding: 0; }
.file-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-sm); font-size: 13px; }
.file-icon { font-size: 16px; flex: none; color: var(--text-3); }
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file-size { color: var(--text-3); font-size: 11.5px; flex: none; font-variant-numeric: tabular-nums; }
.file-thumb { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; flex: none; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 8px; }
.attachment-item { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 12.5px; color: var(--text-2); text-decoration: none; }
.attachment-item:hover { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.attachment-thumb { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.prog { height: 6px; border-radius: 3px; background: var(--g-150); overflow: hidden; }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-500), var(--accent-fill)); border-radius: 3px; }

/* ---------- 3-21. 가로 막대 · 차트 ---------- */
.hbar { display: grid; grid-template-columns: 64px minmax(0, 1fr) 96px; align-items: center; gap: var(--sp-3); height: 36px; }
.hbar-n { font-weight: 600; font-size: 12.5px; }
.hbar-t { height: 12px; border-radius: 6px; background: var(--g-100); overflow: hidden; display: flex; }
.hbar-t i { display: block; height: 100%; background: var(--brand-200); }
.hbar-t i.m { background: linear-gradient(90deg, var(--brand-500), var(--indigo-500)); }
.hbar-v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 12.5px; }
.spark { display: block; height: 46px; margin: 12px calc(-1 * var(--sp-5)) calc(-1 * var(--sp-3)); width: calc(100% + 2 * var(--sp-5)); color: var(--chart-1); overflow: visible; }
.spark .ln, .trend .ln { fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark .s0, .trend .s0 { stop-color: currentColor; stop-opacity: var(--chart-area-top); }
.spark .s1, .trend .s1 { stop-color: currentColor; stop-opacity: var(--chart-area-bot); }
.c-1 { color: var(--chart-1); } .c-2 { color: var(--chart-2); } .c-3 { color: var(--chart-3); } .c-4 { color: var(--chart-4); } .c-5 { color: var(--chart-5); }
.c-danger { color: var(--danger); } .c-ok { color: var(--ok); } .c-warn { color: var(--warn); } .c-muted { color: var(--chart-muted); }
.trend { color: var(--chart-1); }
.trend .base, .chart-grid-line { stroke: var(--chart-grid); }
.trend .dot { fill: currentColor; stroke: var(--surface); stroke-width: 1.5; }
.chart-axis, svg .axis text { fill: var(--chart-axis); font-size: 11px; }
.stackbar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; }
.stackbar i { display: block; height: 100%; }
.lg { display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; font-size: 12px; color: var(--text-2); }
.lg i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
/* 옛 막대(.chart-bar) */
.chart-bar-group { display: flex; flex-direction: column; gap: 10px; padding: 8px 0; }
.chart-bar-row { display: flex; align-items: center; gap: 14px; }
.chart-bar-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); min-width: 80px; white-space: nowrap; }
.chart-bars { flex: 1; display: flex; gap: 3px; align-items: center; }
.chart-bar { height: 14px; border-radius: 4px; min-width: 2px; background: var(--chart-1); }
.chart-bar.income { background: var(--chart-1); } .chart-bar.expense { background: var(--chart-4); } .chart-bar.profit { background: var(--chart-3); }
.chart-bar-value { font-size: 12px; font-weight: 600; color: var(--text-2); margin-left: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- 3-22. 등록 화면 하단 고정 합계 ---------- */
.actionbar { position: sticky; bottom: 0; z-index: var(--z-sticky); display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-3) var(--page-px); margin: var(--sp-4) calc(-1 * var(--page-px)) calc(-1 * var(--sp-12)); background: var(--glass-bg); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
.actionbar .tot { display: flex; gap: var(--sp-6); }
.actionbar .tot div { font-size: 12px; color: var(--text-3); }
.actionbar .tot b { display: block; font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.actionbar .r { margin-left: auto; display: flex; gap: var(--sp-2); }

/* ---------- 3-23. 단계 번호 · 섹션 아이콘 배지 ---------- */
.secno { width: 24px; height: 24px; border-radius: 7px; background: var(--hero-grad); color: var(--on-chip); box-shadow: var(--shadow-accent); display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.secno.off { background: var(--g-150); color: var(--text-3); box-shadow: none; }
.sec-ic { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; flex: none; background: var(--tone-blue-bg); color: var(--tone-blue); }
.sec-ic .i, .sec-ic svg { width: 16px; height: 16px; stroke-width: 2; vertical-align: 0; }
.sec-ic.t-blue   { background: var(--tone-blue-bg);   color: var(--tone-blue); }
.sec-ic.t-indigo { background: var(--tone-indigo-bg); color: var(--tone-indigo); }
.sec-ic.t-violet { background: var(--tone-violet-bg); color: var(--tone-violet); }
.sec-ic.t-sky    { background: var(--tone-sky-bg);    color: var(--tone-sky); }
.sec-ic.t-slate  { background: var(--tone-slate-bg);  color: var(--tone-slate); }
.sec-ic.t-pink   { background: var(--tone-pink-bg);   color: var(--tone-pink); }
.sec-ic.t-teal   { background: var(--tone-teal-bg);   color: var(--tone-teal); }
.sec-ic.t-ok     { background: var(--ok-bg);     color: var(--ok); }
.sec-ic.t-warn   { background: var(--warn-bg);   color: var(--warn); }
.sec-ic.t-danger { background: var(--danger-bg); color: var(--danger); }
.sec-ic.t-solid  { background: var(--hero-grad); color: var(--on-chip); box-shadow: var(--shadow-accent); }

/* ---------- 3-24. 히어로 (대시보드 상단 그라데이션 — G4 대시보드가 쓴다) ----------
   사용: <section class="hero hero-bleed"><div class="hero-in">…</div></section>
         <div class="kpis kpis-lift">…</div>
   .hero-bleed = .content-area 안에서 좌우·위 여백을 지우고 화면 끝까지 붙인다. */
.hero, .banner { position: relative; overflow: hidden; color: var(--on-hero); background: var(--hero-grad); }
.hero::before, .banner::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(520px 260px at 88% -10%, var(--hero-glow-1), transparent 70%),
    radial-gradient(420px 300px at 62% 120%, var(--hero-glow-2), transparent 70%),
    radial-gradient(300px 200px at 6% 0%, var(--hero-glow-3), transparent 70%); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: linear-gradient(var(--hero-line) 1px, transparent 1px), linear-gradient(90deg, var(--hero-line) 1px, transparent 1px);
  background-size: 44px 44px; background-position: -1px -1px;
  -webkit-mask-image: linear-gradient(100deg, transparent 30%, #000 75%); mask-image: linear-gradient(100deg, transparent 30%, #000 75%); }
.hero-bleed { margin: calc(-1 * var(--page-pt)) calc(-1 * var(--page-px)) 0; }
.hero-in { position: relative; z-index: 1; max-width: var(--content-max); padding: var(--sp-6) var(--page-px) 92px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-6) var(--sp-8); align-items: end; }
.hero-top { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.hero-date { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px 0 10px; border-radius: var(--r-full); background: var(--hero-glass); border: 1px solid var(--hero-glass-2); font-size: 12.5px; font-weight: var(--fw-semibold); color: var(--on-hero); font-variant-numeric: tabular-nums; }
.hero-date .i, .hero-date svg { width: 14px; height: 14px; }
.hero-act { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.hero-t { font-size: 30px; line-height: 40px; font-weight: var(--fw-heavy); letter-spacing: -.035em; color: var(--on-hero); }
.hero-t em { font-style: normal; color: var(--on-hero); background: linear-gradient(transparent 62%, rgba(255, 255, 255, .22) 62%); padding: 0 2px; }
.hero-s { margin-top: 6px; color: var(--on-hero-2); font-size: 14px; line-height: 22px; font-weight: var(--fw-medium); }
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(112px, auto)); border-radius: var(--r-md); background: var(--hero-glass); border: 1px solid var(--hero-glass-2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hero-stat { display: block; padding: 12px 18px 13px; border-left: 1px solid var(--hero-glass-2); min-width: 0; color: var(--on-hero); text-decoration: none; }
.hero-stat:first-child { border-left: 0; }
a.hero-stat:hover { background: var(--hero-glass-h); color: var(--on-hero); }
.hero-stat .l { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: var(--fw-semibold); color: var(--on-hero); white-space: nowrap; }
.hero-stat .l::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--hero-dot-info); flex: none; }
.hero-stat.danger .l::before { background: var(--hero-dot-danger); box-shadow: 0 0 0 3px rgba(255, 163, 163, .25); }
.hero-stat.warn .l::before { background: var(--hero-dot-warn); }
.hero-stat.ok .l::before { background: var(--hero-dot-ok); }
.hero-stat .v { margin-top: 2px; font-size: 28px; line-height: 36px; font-weight: var(--fw-heavy); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.hero-stat .v small { font-size: 13px; font-weight: var(--fw-semibold); margin-left: 2px; color: var(--on-hero); letter-spacing: 0; }
.hero .seg { background: var(--hero-seg); }
.hero .seg span, .hero .seg a, .hero .seg button { color: var(--on-hero-2); }
.hero .seg .on, .hero .seg .active { background: var(--surface); color: var(--accent); }
.page.page-lift, .content-area.page-lift { padding-top: 0; }
.kpis.kpis-lift { position: relative; z-index: 2; margin-top: -68px; padding: 0 0; }
.hero-bleed + .kpis-lift { margin-left: 0; margin-right: 0; }
.kpis.kpis-lift .kpi { box-shadow: var(--shadow-raise); border-color: transparent; }
/* 옛 .banner(인사말 띠) */
.banner { border-radius: var(--r-lg); padding: var(--sp-6) var(--sp-8); margin-bottom: var(--sp-5); }
.banner > * { position: relative; z-index: 1; }
.banner h2, .banner h3 { color: var(--on-hero); font-size: 20px; line-height: 28px; font-weight: var(--fw-heavy); margin-bottom: 4px; }
.banner p { color: var(--on-hero-2); font-size: 14px; }

/* ---------- 3-25. 화면 조각(계약 mock-pages 승격분) ---------- */
.todo-list { display: grid; grid-template-columns: 1fr 1fr; }
.todo { display: flex; align-items: center; gap: var(--sp-3); padding: 12px var(--sp-4); border-bottom: 1px solid var(--line-soft); min-width: 0; color: var(--text); text-decoration: none; }
.todo:nth-child(odd) { border-right: 1px solid var(--line-soft); }
.todo:nth-last-child(-n+2) { border-bottom: 0; }
.todo:hover { background: var(--row-hover); color: var(--text); }
.todo > .i:last-child, .todo > svg:last-child { color: var(--text-disabled); }
.todo-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--neutral-bg); color: var(--neutral); flex: none; }
.todo-ic.danger { background: var(--danger-bg); color: var(--danger); }
.todo-ic.warn { background: var(--warn-bg); color: var(--warn); }
.todo-ic.info { background: var(--info-bg); color: var(--info); }
.todo-ic.ok { background: var(--ok-bg); color: var(--ok); }
.todo-l { display: block; font-weight: 600; }
.todo-d { display: block; font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-n { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.notice-list, .feed { padding: 4px 0; }
.notice { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 var(--sp-4); min-width: 0; color: var(--text); text-decoration: none; }
.notice:hover { background: var(--row-hover); color: var(--text); }
.notice .tnum { white-space: nowrap; }
.feed-i { display: flex; gap: 10px; padding: 9px var(--sp-4); align-items: flex-start; }
.feed-i b { font-weight: 600; }
.money { padding: var(--sp-4); }
.money-row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; }
.money-row .l { color: var(--text-2); }
.money-row .v { font-variant-numeric: tabular-nums; font-weight: 600; }
.money-row.total { border-top: 1px solid var(--line-soft); margin-top: 6px; padding-top: 12px; }
.money-row.total .v { font-size: 22px; font-weight: 800; letter-spacing: -.025em; color: var(--accent); }
.toggle-row { display: flex; align-items: center; gap: var(--sp-3); padding: 12px var(--sp-4); border-top: 1px solid var(--line-soft); }
.toggle-row .t { font-weight: 600; }
.toggle-row .d { font-size: 12px; color: var(--text-3); }
.statusbar { display: flex; align-items: center; gap: var(--sp-5); flex-wrap: wrap; padding: 12px var(--sp-4); }
.statusbar .it { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.statusbar .it b { color: var(--text); font-weight: 600; }
.statusbar .vsep { width: 1px; height: 16px; background: var(--line); }
.grp-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px var(--sp-4); border-top: 1px solid var(--line); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--brand-300); }
.grp-h:first-of-type { border-top: 0; }
.grp-h .nm { font-weight: 700; font-size: 13.5px; }
.sumseg { display: flex; border: 1px solid var(--line-card); border-radius: var(--r-md); background: var(--surface); margin-bottom: var(--sp-4); overflow: hidden; box-shadow: var(--shadow-card); }
.sumseg a { flex: 1; padding: 12px var(--sp-4); border-left: 1px solid var(--line-soft); min-width: 0; color: var(--text); text-decoration: none; }
.sumseg a:first-child { border-left: 0; }
.sumseg a.on { background: var(--accent-soft); box-shadow: inset 0 -3px 0 var(--accent); }
.sumseg a.on .v { color: var(--accent); }
.sumseg .l { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.sumseg .v { font-size: 22px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.sched { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sched > div { padding: var(--sp-4) var(--sp-5); border-left: 1px solid var(--line-soft); }
.sched > div:first-child { border-left: 0; }
.sched .k { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.sched .p { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.sched .v { margin-top: 10px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sched .v small { font-size: 13px; color: var(--text-2); font-weight: 600; margin-left: 4px; letter-spacing: 0; }
.sched .f { margin-top: 6px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.quote { padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--r-sm); color: var(--g-700); font-size: 12.5px; line-height: 20px; }
.ov-head { display: flex; align-items: flex-start; gap: var(--sp-4); margin-bottom: var(--sp-4); }
.ov-back { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-size: 12.5px; font-weight: 500; margin-bottom: 6px; }
.ov-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; color: var(--text-2); font-size: 12.5px; }
.ov-meta .dotsep { width: 3px; height: 3px; border-radius: 50%; background: var(--g-400); }
.rank { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 14px; }
.rank-d { font-size: 11.5px; font-weight: 700; margin-left: 4px; font-variant-numeric: tabular-nums; }
.rank-d.up { color: var(--ok); } .rank-d.down { color: var(--danger); }

/* ---------- 3-26. 모바일 하단 탭 ---------- */
.bottom-nav { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sidebar); grid-template-columns: repeat(5, 1fr); height: calc(60px + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--glass-bg); border-top: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--text-3); position: relative; background: transparent; border: 0; text-decoration: none; cursor: pointer; }
.bottom-nav a > svg, .bottom-nav button > svg, .bottom-nav .i { width: 20px; height: 20px; }
.bottom-nav .on { color: var(--accent); }
.bottom-nav .on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.bottom-nav .n { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger-fill); color: var(--on-fill); font-size: 10px; line-height: 16px; text-align: center; }

/* ---------- 3-27. 공통 팝업(header) · 서약 게이트(footer) ---------- */
.msg-popup-overlay { position: fixed; inset: 0; z-index: calc(var(--z-modal) + 1); display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--scrim); }
.msg-popup { background: var(--surface); color: var(--text); border: 1px solid var(--line-card); border-radius: var(--r-lg); width: 440px; max-width: 100%; max-height: 80vh; overflow: hidden; box-shadow: var(--shadow-modal); display: flex; flex-direction: column; }
.msg-popup.shake { animation: bo-shake .4s var(--ease); }
@keyframes bo-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.msg-popup-header { padding: var(--sp-5) var(--sp-6) var(--sp-3); }
.msg-popup-body { padding: 0 var(--sp-6) var(--sp-4); overflow-y: auto; }
.msg-popup-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-sm); border: 1px solid var(--line); margin-bottom: 8px; color: var(--text); text-decoration: none; }
.msg-popup-item:hover { background: var(--row-hover); border-color: var(--accent-line); color: var(--text); }
.msg-popup-item.urgent { border-color: var(--danger-line); background: var(--danger-bg); }
.msg-popup-item > svg { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.msg-popup-footer { padding: var(--sp-3) var(--sp-6); border-top: 1px solid var(--line-soft); background: var(--surface-2); display: flex; gap: var(--sp-2); justify-content: flex-end; }
.pop-t { font-size: 14px; font-weight: var(--fw-semibold); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-m { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.notice-popup-body { max-height: min(420px, 60vh); overflow-y: auto; }
.notice-popup-item { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 10px; background: var(--surface-2); transition: opacity var(--dur-2); }
.notice-popup-item.is-done { opacity: .4; pointer-events: none; }
.notice-popup-item .np-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.notice-popup-item h4 { font-size: 14px; font-weight: 600; color: var(--text); }
.notice-popup-item .np-d { font-size: 11.5px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.notice-popup-item p { font-size: 13px; color: var(--text-2); line-height: 20px; margin-bottom: 10px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.notice-popup-item .np-f { display: flex; gap: 8px; justify-content: flex-end; }
.today-events-popup { position: fixed; top: calc(var(--topbar-h) + 16px); right: 20px; width: 360px; max-width: calc(100vw - 24px); z-index: var(--z-drop); background: var(--surface); color: var(--text); border: 1px solid var(--line-card); border-radius: var(--r-md); box-shadow: var(--shadow-pop); padding: var(--sp-4); animation: bo-toast-in .28s var(--ease) both; transition: opacity .3s, transform .3s; }
.today-events-popup.is-out { opacity: 0; transform: translateX(20px); }
.te-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.te-h h4 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.te-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.te-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); border-left: 3px solid var(--g-400); }
.te-item .te-time { font-size: 12px; color: var(--text-2); font-weight: 600; flex: none; min-width: 38px; font-variant-numeric: tabular-nums; }
.te-item .te-title { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.te-item .te-type { font-size: 11px; font-weight: 600; flex: none; }
.te-item.t-task { border-left-color: var(--neutral); } .te-item.t-task .te-type { color: var(--neutral); }
.te-item.t-meeting { border-left-color: var(--info); } .te-item.t-meeting .te-type { color: var(--info); }
.te-item.t-deadline { border-left-color: var(--danger); } .te-item.t-deadline .te-type { color: var(--danger); }
.te-item.t-personal { border-left-color: var(--ok); } .te-item.t-personal .te-type { color: var(--ok); }
.te-item.t-memo { border-left-color: var(--warn); } .te-item.t-memo .te-type { color: var(--warn); }
.te-more { display: block; text-align: center; margin-top: 12px; }
/* 서약·규정 게이트(footer.php) — 동의 전에는 닫을 수 없는 전면 창 */
.gate-overlay { position: fixed; inset: 0; z-index: var(--z-gate); display: flex; align-items: center; justify-content: center; padding: 20px; overflow-y: auto; background: var(--scrim); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.gate { background: var(--surface); color: var(--text); border: 1px solid var(--line-card); border-radius: var(--r-lg); width: 100%; max-width: 720px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-modal); }
.gate-h { padding: var(--sp-6) var(--sp-8) var(--sp-4); border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.gate-h::before { content: ""; display: block; width: 32px; height: 4px; border-radius: 2px; background: var(--hero-grad); margin-bottom: var(--sp-3); }
.gate-z1 { z-index: calc(var(--z-gate) + 1); } .gate-z2 { z-index: calc(var(--z-gate) + 2); } .gate-z3 { z-index: calc(var(--z-gate) + 3); }
.gate-h h2 { font-size: 20px; line-height: 28px; font-weight: var(--fw-heavy); letter-spacing: -.03em; }
.gate-h p { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.gate-b { padding: var(--sp-5) var(--sp-8); font-size: 13px; line-height: 1.85; color: var(--text); }
.gate-b p { margin: 0 0 var(--sp-2); }
.gate-b ul, .gate-b ol { margin: var(--sp-2) 0 var(--sp-2) 20px; }
.gate-b .doc-h { font-size: 14px; font-weight: 700; color: var(--text); margin: var(--sp-5) 0 var(--sp-2); padding-left: 10px; border-left: 3px solid var(--accent); line-height: 20px; }
.gate-b .doc-h.is-warn { border-left-color: var(--danger); }
.gate-b .doc-sub { font-weight: 600; margin: var(--sp-3) 0 6px; }
.gate-b .doc-sub.warn { color: var(--warn); } .gate-b .doc-sub.danger { color: var(--danger); }
.gate-b .doc-note { font-size: 12px; color: var(--text-2); }
.doc-warn { background: var(--danger-bg); border: 1px solid var(--danger-line); border-radius: var(--r-sm); padding: 12px 16px; margin: var(--sp-2) 0; color: var(--danger); }
.doc-warn p, .doc-warn li { color: var(--danger); }
.doc-warn ul { margin: 8px 0 0 18px; }
.doc-tbl { width: 100%; margin: var(--sp-2) 0; font-size: 12.5px; border: 1px solid var(--line); border-radius: var(--r-sm); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.doc-tbl th, .doc-tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; height: auto; background: transparent; }
.doc-tbl th { background: var(--surface-2); font-weight: 700; color: var(--text-2); font-size: 12px; }
.doc-tbl tr:last-child td { border-bottom: 0; }
.doc-tbl td.c, .doc-tbl th.c { text-align: center; }
.doc-tbl tr.is-danger td { color: var(--danger); background: var(--danger-bg); }
.doc-tbl .is-ok { color: var(--ok); font-weight: 600; } .doc-tbl .is-warn { color: var(--warn); font-weight: 600; } .doc-tbl .is-danger { color: var(--danger); font-weight: 600; }
.gate-f { padding: var(--sp-4) var(--sp-8) var(--sp-6); border-top: 1px solid var(--line-soft); background: var(--surface-2); position: sticky; bottom: 0; }
.gate-agree { display: flex; align-items: center; gap: 10px; margin-bottom: var(--sp-4); font-size: 13px; font-weight: 600; cursor: pointer; }
.gate-agree input { width: 18px; height: 18px; flex: none; }
.gate-agree label { cursor: pointer; color: var(--text); }
.gate-act { display: flex; gap: var(--sp-2); justify-content: flex-end; }
.gate-sign { font-size: 11.5px; color: var(--text-3); margin-top: 10px; text-align: right; }

/* ---------- 3-28. 로그인 전 화면(login · register — 자체 틀) ---------- */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--hero-grad); position: relative; overflow: hidden; color: var(--text); }
.login-page::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(600px 320px at 85% 0%, var(--hero-glow-1), transparent 70%), radial-gradient(520px 360px at 10% 110%, var(--hero-glow-2), transparent 70%); }
.login-card { position: relative; z-index: 1; width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line-card); border-radius: var(--r-lg); padding: 40px 36px; box-shadow: var(--shadow-modal); }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo-icon { width: 48px; height: 48px; border-radius: 14px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--hero-grad); color: var(--on-chip); font-size: 20px; font-weight: 800; box-shadow: var(--shadow-accent); }
.login-logo h1 { font-size: 24px; line-height: 32px; font-weight: 800; letter-spacing: -.03em; color: var(--text); }
.login-logo p { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.login-form { display: flex; flex-direction: column; gap: var(--sp-4); }
.login-field { display: flex; flex-direction: column; gap: 6px; }
.login-field label { font-size: 12.5px; font-weight: 600; color: var(--g-700); }
.login-field input { width: 100%; height: var(--ctl-h-lg); padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); font-size: 14px; background: var(--surface); color: var(--text); }
.login-field input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.login-btn { width: 100%; height: 44px; border: 0; border-radius: var(--r-sm); background: linear-gradient(180deg, var(--btn-fill), var(--btn-fill-2)); color: var(--on-btn); font-size: 14.5px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-accent); margin-top: 4px; }
.login-btn:hover { background: var(--btn-fill-2); }
.login-error { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--danger-bg); border: 1px solid var(--danger-line); border-radius: var(--r-sm); font-size: 13px; color: var(--danger); }
.login-error svg { width: 16px; height: 16px; flex: none; }

/* ---------- 3-29. 폰: 검색·필터 접기 / 표 → 카드 (mobile.js 가 붙이는 클래스) ---------- */
.mf-toggle { display: none; }
} /* /bo.components */

/* ==========================================================================
   4. LEGACY — 옛 클래스 중 계약에 짝이 없는 것 (새 토큰으로 다시 그림)
   ========================================================================== */
@layer bo.legacy {
.amount { font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; }
.amount.income { color: var(--accent); }
.amount.expense { color: var(--warn); }
.amount.profit { color: var(--ok); }
.blogger-tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; background: var(--accent-soft); color: var(--accent); border-radius: var(--r-xs); font-size: 12px; font-weight: 600; white-space: nowrap; }
.report-card { background: var(--surface); border: 1px solid var(--line-card); border-radius: var(--r-md); box-shadow: var(--shadow-card); padding: var(--sp-4) var(--sp-5); margin-bottom: var(--sp-3); }
.report-card-header { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-bottom: 8px; }
.report-card-title { font-size: 14px; font-weight: 700; color: var(--text); }
.report-card-date { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.report-card-body { font-size: 13px; color: var(--text-2); line-height: 1.7; }
.report-status { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--r-xs); font-size: 12px; font-weight: 600; color: var(--neutral); background: var(--neutral-bg); }
.report-status.pending { background: var(--warn-bg); color: var(--warn); }
.report-status.approved { background: var(--ok-bg); color: var(--ok); }
.report-status.rejected { background: var(--danger-bg); color: var(--danger); }
.deadline-alert { color: var(--danger); font-weight: 600; font-size: 12px; }
.blogger-header-badges, .specialty-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.badge-settlement, .badge-contract, .badge-index, .index-badge, .specialty-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-xs); font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-settlement { background: var(--info-bg); color: var(--info); }
.badge-contract { background: var(--tone-violet-bg); color: var(--tone-violet); }
.index-badge { background: var(--neutral-bg); color: var(--neutral); }
.index-badge.optimal { background: var(--ok-bg); color: var(--ok); }
.index-badge.sub-optimal { background: var(--info-bg); color: var(--info); }
.index-badge.low { background: var(--danger-bg); color: var(--danger); }
.index-badge.other { background: var(--neutral-bg); color: var(--neutral); }
.specialty-tag { background: var(--surface-sunk); color: var(--text-2); font-weight: 500; }
.star-rating { color: var(--warn); font-size: 13px; letter-spacing: 1px; }
.star-rating .empty { color: var(--g-300); padding: 0; display: inline; }
.inline-edit input { width: 120px; }
.divider { height: 1px; background: var(--line-soft); margin: var(--sp-3) 0; }
.selected-count { font-weight: 700; font-variant-numeric: tabular-nums; }
.pending { color: var(--warn); }
.low { color: var(--danger); }
.mobile-overlay { display: none; position: fixed; inset: 0; background: var(--scrim); z-index: calc(var(--z-sidebar) + 1); opacity: 0; transition: opacity .25s var(--ease); }
.mobile-overlay.active { opacity: 1; }
.theme-toggle .i-sun { display: none; }
/* 색 이름 클래스(옛 .blue .green …)는 상태·장식 토큰으로 */
.text-blue, .c-blue { color: var(--info); }
.text-green, .c-green { color: var(--ok); }
}

/* ==========================================================================
   5. UTILITIES — 옛 유틸리티(!important 동작 유지) + 계약 최소 세트
   ========================================================================== */
@layer bo.utilities {
.text-primary { color: var(--accent) !important; }
.text-success { color: var(--ok) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warn) !important; }
.text-info { color: var(--info) !important; }
.text-purple { color: var(--tone-violet) !important; }
.text-pink { color: var(--tone-pink) !important; }
.text-muted { color: var(--text-2) !important; }
.text-faint { color: var(--text-3) !important; }
.text-xs { font-size: 12px !important; }       /* 11.5px → 12px (작은 글씨 하한) */
.text-sm { font-size: 12.5px !important; }
.text-md { font-size: 14px !important; }
.text-lg { font-size: 16px !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-left { text-align: left !important; }
.fw-400 { font-weight: 400 !important; } .fw-500 { font-weight: 500 !important; } .fw-600 { font-weight: 600 !important; } .fw-700 { font-weight: 700 !important; } .fw-800 { font-weight: 800 !important; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px !important; } .mt-2 { margin-top: 16px !important; } .mt-3 { margin-top: 24px !important; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 8px !important; } .mb-2 { margin-bottom: 16px !important; } .mb-3 { margin-bottom: 24px !important; }
.ml-auto { margin-left: auto !important; } .mr-auto { margin-right: auto !important; }
.p-0 { padding: 0 !important; } .p-1 { padding: 8px !important; } .p-2 { padding: 16px !important; } .p-3 { padding: 24px !important; }
.d-flex { display: flex !important; } .d-none { display: none !important; } .d-block { display: block !important; } .d-inline-flex { display: inline-flex !important; } .d-grid { display: grid !important; }
.items-center { align-items: center !important; } .items-start { align-items: flex-start !important; }
.justify-between { justify-content: space-between !important; } .justify-end { justify-content: flex-end !important; } .justify-center { justify-content: center !important; }
.gap-half { gap: 4px !important; } .gap-1 { gap: 8px !important; } .gap-2 { gap: 16px !important; } .gap-3 { gap: 24px !important; }
.flex-1 { flex: 1 !important; min-width: 0; } .flex-wrap { flex-wrap: wrap !important; } .flex-none { flex: none !important; }
.w-full, .full-w { width: 100% !important; }
.overflow-hidden { overflow: hidden !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap !important; }
.cursor-pointer { cursor: pointer !important; }
.border-t { border-top: 1px solid var(--line) !important; } .border-b { border-bottom: 1px solid var(--line) !important; }
.show-sm { display: none; }
@media (max-width: 1520px) { .hide-xl { display: none !important; } .tbl-dense th, .tbl-dense td { padding-left: 9px; padding-right: 9px; } }
}

/* ==========================================================================
   6. RESPONSIVE
   1360↓ 노트북: 덜 중요한 열(.hide-lg) 숨김 · 히어로 1단
   1023↓ 태블릿: 사이드바 → 서랍(☰), 하단 탭 없음
   768↓  폰: 표 → 카드(mobile.js .mc) · 필터 접기 · 하단 탭 5개
   ========================================================================== */
@layer bo.components {
@media (max-width: 1360px) {
  :root { --page-px: var(--sp-6); --page-pt: var(--sp-5); }
  .hide-lg { display: none !important; }
  .gsearch { margin-left: var(--sp-4); }
  .me-txt, .topbar-user-name, .top-flag { display: none; }
  .hero-in { padding: var(--sp-5) var(--page-px) 88px; grid-template-columns: minmax(0, 1fr); }
  .hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpi-v { font-size: 24px; }
  .g-main { grid-template-columns: minmax(0, 1fr) 320px; }
  .g-side { grid-template-columns: minmax(0, 1fr) 300px; }
  .todo-list { grid-template-columns: 1fr; }
  .todo:nth-child(odd) { border-right: 0; }
  .todo:nth-last-child(2) { border-bottom: 1px solid var(--line-soft); }
  .kpis, .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis.kpis-lift { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  .kpis.kpis-lift { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col, .g-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1023px) {
  .app, .app-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); height: 100%; transform: translateX(-102%); transition: transform .25s var(--ease); z-index: calc(var(--z-sidebar) + 2); box-shadow: var(--shadow-modal); }
  .sidebar.open { transform: none; }
  .mobile-overlay.active { display: block; }
  .menu-btn, .mobile-menu-btn { display: grid; }
  .topbar { padding: 0 var(--page-px) 0 var(--sp-3); }
  .hide-md { display: none !important; }
  .g-main, .g-side, .g-2, .g-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 768px) {
  :root { --page-px: var(--sp-4); --page-pt: var(--sp-4); }
  body { font-size: 14px; line-height: 22px; }
  html, body { overflow-x: clip; }
  .hide-sm { display: none !important; }
  .show-sm { display: initial !important; }
  .topbar { padding: 0 var(--sp-2); gap: 2px; }
  .crumb { font-size: 15px; }
  .crumb .crumb-path { display: none; }
  .crumb b, .crumb .topbar-title { font-size: 16px; font-weight: 700; }
  .gsearch, .top-date, .topbar-date, .me-txt, .topbar-user-name { display: none; }
  .page, .content-area { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); max-width: 100vw; }
  .content-area img, .content-area video, .content-area iframe { max-width: 100%; height: auto; }
  .page-head, .page-header { flex-wrap: wrap; align-items: flex-start; margin-bottom: var(--sp-4); }
  .page-title, .page-header h1, .page-header h2 { font-size: 20px; line-height: 28px; }
  .page-actions { margin-left: 0; width: 100%; }
  .page-actions .btn { flex: 1; height: 40px; }
  .page-actions .btn.btn-icon { flex: none; width: 40px; }
  .kpis, .stats-grid, .kpis.kpis-lift { grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
  .kpi { padding: var(--sp-3) var(--sp-3) var(--sp-2); }
  .kpi-v { font-size: 19px; line-height: 26px; margin-top: 6px; }
  .kpi-l { font-size: 12px; }
  .kpi-d { flex-wrap: wrap; row-gap: 2px; white-space: normal; }
  .kpi-ic { width: 22px; height: 22px; border-radius: 6px; }
  .spark { height: 34px; margin: 8px calc(-1 * var(--sp-3)) calc(-1 * var(--sp-2)); width: calc(100% + 2 * var(--sp-3)); }
  .stat-card { padding: var(--sp-3); gap: var(--sp-2); }
  .stats-grid .stat-icon { display: none; }
  .stat-value { font-size: 18px; line-height: 26px; }
  .stat-label { font-size: 12px; }
  .tabs, .sub-tabs { gap: var(--sp-4); }
  .toolbar, .filter-bar { padding: var(--sp-3); gap: 6px; }
  .search-box { max-width: none; flex: 1 1 100%; }
  .card-header, .panel-h { padding-top: 10px; padding-bottom: 10px; }
  .panel-b, .card-body { padding: var(--sp-3) var(--sp-4); }
  .panel-f .btn, .card-footer .btn { flex: 1; height: 40px; }
  .dl { grid-template-columns: 96px minmax(0, 1fr); }
  .dl-2, .detail-grid { grid-template-columns: 1fr; }
  .form-grid, .form-grid:has(> .col-3, > .col-4, > .col-6, > .col-8, > .col-12), .form-row { grid-template-columns: 1fr; gap: var(--sp-3); }
  .form-grid > * { grid-column: 1 / -1; }
  .form-input, .form-select, .form-textarea, .input, .content-area input[type=text], .content-area input[type=search], .content-area input[type=number],
  .content-area input[type=date], .content-area input[type=email], .content-area input[type=tel], .content-area input[type=password], .content-area select, .content-area textarea { font-size: 16px; }
  .btn { min-height: 38px; height: auto; padding-top: 6px; padding-bottom: 6px; }
  .btn-sm { min-height: 32px; }
  .btn-icon { height: 38px; }
  .actionbar { flex-wrap: wrap; gap: var(--sp-2); bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
  .actionbar .tot { gap: var(--sp-4); }
  .actionbar .r { width: 100%; }
  .actionbar .r .btn { flex: 1; height: 44px; }
  .bulkbar, .bulk-actions.show { border-radius: 0; gap: 4px; padding: 6px var(--sp-2) 6px var(--sp-4); }
  .bulkbar .sep { display: none; }
  .stepper { gap: 3px; }
  .step { padding: 8px 0 0; }
  .step-n, .step-d { display: none; }
  .step-t { font-size: 11.5px; line-height: 15px; }
  .hero-in { padding: var(--sp-4) var(--page-px) 76px; gap: var(--sp-4); }
  .hero-t { font-size: 22px; line-height: 30px; }
  .hero-s { font-size: 13px; line-height: 20px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stat { padding: 10px 14px; }
  .hero-stat:nth-child(3) { border-left: 0; }
  .hero-stat:nth-child(n+3) { border-top: 1px solid var(--hero-glass-2); }
  .hero-stat .v { font-size: 22px; line-height: 28px; }
  .kpis.kpis-lift { margin-top: -56px; }
  .banner { padding: var(--sp-5); }
  .sec-ic { width: 26px; height: 26px; }
  .panel-t, .card-title { flex-wrap: wrap; row-gap: 0; }
  .sched { grid-template-columns: 1fr; }
  .sched > div { border-left: 0; border-top: 1px solid var(--line-soft); padding: var(--sp-3) var(--sp-4); }
  .sched > div:first-child { border-top: 0; }
  .sumseg { display: grid; grid-template-columns: repeat(3, 1fr); }
  .ov-head { flex-direction: column; gap: var(--sp-3); }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-overlay .modal { max-width: 100%; max-height: 92vh; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .modal-h, .modal-header, .modal-b, .modal-body, .modal-f, .modal-footer { padding-left: var(--sp-4); padding-right: var(--sp-4); }
  .modal-footer, .modal-f { padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom, 0px)); }
  .toast-container { top: auto; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); right: 12px; left: 12px; }
  .toast { min-width: 0; width: 100%; max-width: none; }
  .notif-dropdown { position: fixed; top: calc(var(--topbar-h) + 4px); left: 8px; right: 8px; width: auto; }
  .today-events-popup { top: auto; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); right: 12px; left: 12px; width: auto; }
  .gate-h, .gate-b, .gate-f { padding-left: var(--sp-5); padding-right: var(--sp-5); }
  .login-card { padding: 32px 22px; }
  .bottom-nav { display: grid; }
  .cmdk-scrim { padding-top: 8vh; }
  .pagination a, .pagination span { min-width: 34px; height: 34px; }

  /* 검색 · 필터 접기 (mobile.js) */
  .mf-toggle { display: flex; align-items: center; gap: 6px; width: 100%; margin: 0 0 10px; padding: 0 14px; height: 42px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-1); }
  .mf-toggle svg { color: var(--text-3); }
  .mf-toggle b { background: var(--btn-fill); color: var(--on-btn); font-size: 11px; border-radius: var(--r-full); padding: 1px 7px; line-height: 16px; }
  .mf-toggle i { margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
  .mf-toggle.open i { transform: rotate(-135deg); }
  form.mf-form.mf-closed { display: none; }
  form.mf-form { margin-bottom: 10px; }

  /* 표 → 카드 (mobile.js 가 table.mc · td[data-label] · .mc-title/.mc-chk/.mc-act 를 붙인다) */
  .table-wrapper:has(table.mc), .table-wrap:has(table.mc) { overflow: visible; margin: 0; padding: 10px; }
  table.mc { min-width: 0; width: 100%; border: 0; background: transparent; table-layout: auto; }
  table.mc > thead, table.mc tr.mc-head { display: none; }
  table.mc > tbody, table.mc > tfoot { display: block; }
  table.mc > tbody > tr, table.mc > tfoot > tr, table.mc > tr {
    display: flex; flex-direction: column; position: relative;
    border: 1px solid var(--line-card); border-radius: var(--r-md); background: var(--surface);
    padding: 12px 14px; margin: 0 0 10px; box-shadow: var(--shadow-card);
  }
  table.mc > tbody > tr > td, table.mc > tfoot > tr > td, table.mc > tbody > tr > th, table.mc > tfoot > tr > th {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: auto; max-width: none; min-width: 0; height: auto; padding: 4px 0; border: 0; background: transparent;
    text-align: right; white-space: normal; word-break: break-word; overflow-wrap: anywhere; font-size: 13.5px;
  }
  table.mc td[data-label]::before, table.mc th[data-label]::before {
    content: attr(data-label); flex: 0 0 auto; max-width: 42%; text-align: left;
    color: var(--text-3); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  table.mc td[data-label=""]::before { content: none; }
  table.mc td > * { max-width: 100%; }
  table.mc td input:not([type=checkbox]):not([type=radio]), table.mc td select { max-width: 62%; }
  /* 카드(.card/.panel) 안의 표는 카드 속 카드 대신 구분선 목록으로 */
  :is(.card, .panel) .table-wrapper:has(table.mc), :is(.card, .panel) .table-wrap:has(table.mc) { padding: 0; }
  :is(.card, .panel) table.mc > tbody > tr { border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; box-shadow: none; margin: 0; padding: 14px var(--sp-4); }
  :is(.card, .panel) table.mc > tbody > tr:last-child { border-bottom: 0; }
  table.mc td.mc-title { order: -1; justify-content: flex-start; text-align: left; font-size: 15px; font-weight: 700; color: var(--text); padding: 0 30px 8px 0; margin-bottom: 4px; border-bottom: 1px solid var(--line-soft); }
  table.mc td.mc-title::before { content: none; }
  table.mc td.mc-chk { position: absolute; top: 12px; right: 12px; padding: 0; z-index: 1; }
  table.mc td.mc-chk::before { content: none; }
  table.mc td.mc-act { justify-content: flex-end; flex-wrap: wrap; padding-top: 8px; }
  table.mc td.mc-empty { display: none; }
  table.mc td.mc-full { display: block; text-align: left; }
  table.mc td.mc-full::before { content: none; }
  table.mc > tbody > tr:has(> td.mc-full:only-child) { border-style: dashed; box-shadow: none; text-align: center; }
  table.mc > tbody > tr:hover > td { background: transparent; }
  table.mc .text-right, table.mc .text-center { text-align: right; }
  table.mc td .d-flex, table.mc td > div { justify-content: flex-end; flex-wrap: wrap; }
  table.mc td.mc-title .d-flex, table.mc td.mc-title > div, table.mc td.mc-full > div { justify-content: flex-start; }
  .mc-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .content-area .d-flex { flex-wrap: wrap; }

  /* 계약 .tbl-m (td 에 m-* 붙은 것만 남는 카드형 줄) */
  .tbl-m thead, .tbl-m tfoot { display: none; }
  .tbl-m, .tbl-m tbody { display: block; }
  .tbl-m tbody tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 10px; row-gap: 3px; padding: 12px var(--sp-4); border-bottom: 1px solid var(--line-soft); align-items: center; }
  .tbl-m tbody tr:last-child { border-bottom: 0; }
  .tbl-m tbody tr.tbl-group { display: block; padding: 0; }
  .tbl-m td { display: none; height: auto; padding: 0; border: 0; white-space: normal; background: transparent; }
  .tbl-m td.m-cb { display: block; grid-column: 1; grid-row: 1 / span 2; align-self: start; padding-top: 2px; }
  .tbl-m td.m-title { display: block; grid-column: 2; grid-row: 1; font-size: 14.5px; font-weight: 600; min-width: 0; }
  .tbl-m td.m-right { display: block; grid-column: 3; grid-row: 1; text-align: right; font-weight: 700; font-size: 14.5px; }
  .tbl-m td.m-sub { display: block; grid-column: 2; grid-row: 2; color: var(--text-2); font-size: 13px; min-width: 0; }
  .tbl-m td.m-status { display: block; grid-column: 3; grid-row: 2; text-align: right; }
  .tbl-m td.m-meta { display: flex; grid-column: 2 / span 2; grid-row: 3; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 5px; font-size: 12.5px; color: var(--text-3); }
  .tbl-m tr:not(:has(.m-cb)) td.m-title, .tbl-m tr:not(:has(.m-cb)) td.m-sub { grid-column: 1 / span 2; }
  .tbl-m tr:not(:has(.m-cb)) td.m-meta { grid-column: 1 / span 3; }
  .tbl-m td.m-title .sub { display: block; font-weight: 400; font-size: 12.5px; margin-top: 1px; }
  .tbl-m tr:not(:has(.m-sub)) td.m-title { grid-row: 1 / span 2; align-self: start; }
  .tbl-m td.m-sub .sub, .tbl-m td.m-meta .sub { display: inline; margin: 0; }
  .tbl-m .cell-url { max-width: 100%; display: flex; white-space: nowrap; }
}
@media (max-width: 480px) {
  .stat-value { font-size: 17px; letter-spacing: -.02em; }
}
}

/* ==========================================================================
   7. PRINT
   ========================================================================== */
@media print {
  @layer bo.utilities {
    .sidebar, .topbar, .mobile-overlay, .toast-container, .bottom-nav, .filter-bar, .toolbar, .pagination, .pager, .btn, .cmdk-scrim, .today-events-popup { display: none !important; }
    .app, .app-layout { display: block !important; }
    .content-area, .page { padding: 0 !important; max-width: none !important; }
    .main, .main-content, body, html { background: #fff !important; }
    .card, .panel, .kpi, .stat-card { box-shadow: none !important; break-inside: avoid; }
  }
}

/* ===========================================================================
   v5 합본 보강 (2026-11-23) — 그룹 G1~G9 의 _G0요청.md 중 G0 에 빠져 있던 것만 추가.
   기존 규칙은 하나도 바꾸지 않는다(같은 이름이면 화면 쪽 <style> 이 이기므로 안전).
   =========================================================================== */
@layer bo.components {
  .stack > .callout { margin-bottom: 0; }
  .row.wrap { flex-wrap: wrap; }
  .kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .kpi-v.txt-danger { color: var(--danger); } .kpi-v.txt-warn { color: var(--warn); } .kpi-v.txt-ok { color: var(--ok); }
  .kpi-v.faint, .kpi-v.is-zero { color: var(--text-3); }
  a.kpi { color: inherit; text-decoration: none; } a.kpi:hover { border-color: var(--accent-line); }
  .kpi.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
  .callout .dl { margin: 0; }
  .field[style*="display: block"] > .label, .field[style*="display:block"] > .label { display: block; margin-bottom: 6px; }
  .page-title small { font-size: var(--fs-14); font-weight: 500; color: var(--text-3); }
  .page-sub .badge, .page-sub .tag { vertical-align: middle; margin-left: 4px; }
  .page-actions form { display: inline-flex; gap: var(--sp-2); margin: 0; }
  .tbl a.sub:hover { color: var(--accent); }
  a.link { color: var(--accent); text-decoration: none; } a.link:hover { text-decoration: underline; }
  .seg a .c, .seg button .c { height: auto; padding: 0; display: inline; background: transparent; }
  .bulkbar .btn, .bulk-actions .btn { background: rgba(255, 255, 255, .10); border-color: rgba(255, 255, 255, .28); color: var(--on-ink-fill); box-shadow: none; }
  .bulkbar .btn:hover, .bulk-actions .btn:hover { background: rgba(255, 255, 255, .18); }
  .bulkbar .btn-danger, .bulk-actions .btn-danger { background: var(--danger-bg); border-color: transparent; color: var(--danger); }
  .bulk-actions .form-select { background: rgba(255, 255, 255, .10); color: var(--on-ink-fill); border-color: rgba(255, 255, 255, .28); }
  .modal-title { font-size: 16px; font-weight: 700; color: var(--text); margin: 0; }
  textarea.form-input { height: auto; min-height: 76px; padding: 8px 10px; line-height: 20px; }
  .prog.danger i { background: var(--danger); }
  button.badge { cursor: pointer; font-family: inherit; }
  .pre-wrap { white-space: pre-wrap; }
  .input-wrap { position: relative; display: block; }
  .input-wrap > .input-unit { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 12.5px; pointer-events: none; }
  .choices { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
  .choice { display: inline-flex; align-items: center; gap: 6px; height: var(--ctl-h, 34px); padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--text); cursor: pointer; font-weight: 500; }
  .choice.on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent); }
  .form-input[readonly], .input[readonly] { background: var(--surface-sunk); color: var(--text-2); }
  .tbl tbody tr.warn > td { background: var(--warn-bg); }
  .tbl tbody tr.late > td { background: var(--danger-bg); }
  .tbl tbody tr.strike > td { text-decoration: line-through; color: var(--text-3); }
  @media (max-width: 1023px) { .kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  @media (max-width: 640px) {
    .kpis-3, .kpis-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-actions { flex-wrap: wrap; }
    .page-actions form { display: contents; }
  }
  /* mock-pages(계약 시안) 부품 — 그룹 화면이 이름 그대로 사용 */
  .checklist { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px 16px; }
  .checklist span { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
  .checklist .i { color: var(--ok); }
  .files { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
  .file { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); min-width: 220px; background: var(--surface); }
  .file b { display: block; font-weight: 600; font-size: 12.5px; }
  .file small { color: var(--text-3); font-size: 11.5px; }
  .guide { white-space: pre-line; color: var(--g-700); line-height: 21px; }
  .qual { display: inline-flex; gap: 2px; vertical-align: middle; }
  .qual i { width: 6px; height: 12px; border-radius: 1.5px; background: var(--g-200); }
  .qual i.on { background: var(--brand-500); }
  .idx { font-variant-numeric: tabular-nums; font-weight: 600; }
  .idx.top { color: var(--accent); }
  .room { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
  .room .i { color: var(--text-3); }
  .rank small { font-size: 11.5px; color: var(--text-3); font-weight: 600; margin-right: 4px; }
  .bulk-sec { display: flex; align-items: center; gap: 10px; }
  .file-row td { height: 52px; }
  .bl-pick { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px 0 4px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); min-width: 168px; background: var(--surface); font-weight: 500; }
  .bl-pick .i:last-child { margin-left: auto; color: var(--text-3); }
  .bl-pick.is-empty { border-color: var(--danger); color: var(--danger); padding-left: 10px; }
  .pay-in { display: inline-flex; align-items: center; justify-content: flex-end; height: 30px; width: 116px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); font-variant-numeric: tabular-nums; font-weight: 600; background: var(--surface); }
  .kw-in { display: inline-flex; align-items: center; height: 30px; width: 100%; min-width: 150px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); }
  @media (max-width: 640px) { .no-bnav .bottom-nav { display: none !important; } }
  @media (max-width: 640px) { .no-bnav .page { padding-bottom: var(--sp-6); } }
  @media (max-width: 640px) { .sumseg a:nth-child(4) { border-left: 0; } }
  @media (max-width: 640px) { .sumseg a:nth-child(n+4) { border-top: 1px solid var(--line-soft); } }
  @media (max-width: 640px) { .checklist { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 640px) { .ov-head .page-actions { width: 100%; } }
  @media (max-width: 640px) { .file { min-width: 0; flex: 1 1 100%; } }
}

/* ===========================================================================
   v5.1 모바일 완성 (2026-11-23) — 담당 A
   · 이 블록은 레이어 밖(unlayered)이라 화면 쪽 <style> 보다 우선하는 곳에서만 !important 를 쓴다.
   · 색은 전부 토큰(var(--…)) — 다크 자동 대응. 기능·URL·name 은 건드리지 않는다.
   · 기준 폭: 360(갤럭시) · 390(아이폰) · 768(태블릿). 1023↓ 서랍, 768↓ 하단 탭·카드.
   · 글자 규칙: 본문·표·버튼·라벨 14px↑, 입력 16px(iOS 확대 방지), 배지·보조설명·탭라벨은 13px↑(예외).
   · 터치 규칙: 누르는 곳은 44×44px↑(체크박스는 칸 전체/줄 전체가 눌림 — mobile.js).
   =========================================================================== */
:root { --bn-h: 62px; }
.sb-close { display: none; }

/* ---- 공통(≤1023): 컨트롤 크기 토큰 · 상단바 · 서랍 ---- */
@media (max-width: 1023px) {
  :root { --ctl-h: 44px; --ctl-h-sm: 44px; --ctl-h-lg: 48px; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
  body { min-height: 100vh; min-height: 100dvh; overscroll-behavior-y: none; }
  html.sb-lock, html.sb-lock body { overflow: hidden; }
  .app, .app-layout { min-height: 100vh; min-height: 100dvh; }
  a, button, input, select, textarea, label, summary, [role=button], .btn, .tab { touch-action: manipulation; }

  /* 상단바: 노치·상태바 아래로, 44px 버튼 */
  .topbar { height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); padding-left: max(var(--sp-2), env(safe-area-inset-left, 0px)); padding-right: max(var(--sp-2), env(safe-area-inset-right, 0px)); gap: 2px; }
  .topbar .icon-btn, .topbar .topbar-bell, .topbar .theme-toggle, .menu-btn, .mobile-menu-btn { width: 44px; height: 44px; border-radius: 12px; }
  .topbar .icon-btn > svg, .menu-btn > svg { width: 22px; height: 22px; }
  .topbar .me { height: 44px; min-width: 44px; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center; }
  .topbar .topbar-avatar { width: 34px; height: 34px; font-size: 14px; }
  .topbar .icon-btn .dot { top: 4px; right: 2px; font-size: 11px; }
  .topbar-title, .crumb b, .crumb .topbar-title { font-size: 17px !important; font-weight: 800; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-left, .crumb { min-width: 0; flex: 1 1 auto; }
  .notif-dropdown { top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px) + 4px) !important; max-height: 70dvh; overflow-y: auto; }
  .pop button, .pop a, .pop [role=menuitem], .pop [role=menuitemradio] { min-height: 44px; font-size: 15px; }

  /* 서랍(드로어): 닫혀 있을 땐 그림자·포커스 모두 없음(왼쪽 끝 번짐 방지), 열면 슬라이드 */
  .sidebar { height: 100vh; height: 100dvh; width: min(320px, 88vw); visibility: hidden; box-shadow: none; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); transition: transform .26s var(--ease), visibility 0s linear .26s, box-shadow .26s; overscroll-behavior: contain; }
  .sidebar.open { visibility: visible; box-shadow: var(--shadow-modal); transition: transform .26s var(--ease), visibility 0s, box-shadow .26s; }
  .sidebar .sb-brand, .sidebar .sidebar-logo { height: 56px; position: relative; padding-right: 56px; }
  .sb-close { position: absolute; right: 8px; top: 6px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--text-2); cursor: pointer; }
  .sb-close:active { background: var(--surface-sunk); }
  .sb-close svg { width: 22px; height: 22px; }
  .sb-ws { height: 36px; font-size: 13px; }
  .sb-search { height: 44px; margin: 10px 12px 6px; font-size: 15px; border-radius: 12px; }
  .sb-search .kbd { display: none; }
  .sb-scroll, .sidebar-nav { padding: 6px 10px 20px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .nav-sec-h { height: 40px; font-size: 13px; padding: 0 10px; border-radius: 10px; }
  .nav-sec.closed .nav-sec-h { height: 44px; font-size: 14px; }
  .nav-sec-h .i { width: 16px; height: 16px; }
  .nav-item { min-height: 46px; padding: 0 12px; font-size: 15px; gap: 12px; border-radius: 12px; }
  .nav-item > svg, .nav-item .i, .nav-icon-wrap svg { width: 20px; height: 20px; }
  .nav-icon-wrap { width: 20px; height: 20px; }
  .nav-count, .nav-badge { height: 22px; min-width: 24px; font-size: 12px; }
  .sb-foot, .sidebar-footer { padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); font-size: 13px; }
  .sb-foot .icon-btn { width: 44px; height: 44px; }
  .mobile-overlay { -webkit-tap-highlight-color: transparent; }

  /* 팝업형 메뉴 검색(Ctrl K) → 위에서 내려오는 전체폭 시트 */
  .cmdk-scrim { padding: env(safe-area-inset-top, 0px) 0 0; align-items: flex-start; }
  .cmdk { width: 100%; max-width: 100%; border-radius: 0 0 var(--r-lg) var(--r-lg); max-height: 82dvh; }
  .cmdk-top { height: 56px; }
  .cmdk-input { font-size: 16px !important; }
  .cmdk-item { height: 48px; font-size: 15px; }
  .cmdk-foot { display: none; }

  /* 가로 탭: 한 줄로 밀기(스냅) · 44px */
  .tabs, .sub-tabs { overflow-x: auto; flex-wrap: nowrap; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain; }
  .tabs::-webkit-scrollbar, .sub-tabs::-webkit-scrollbar { display: none; }
  .tab, .sub-tab { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; flex: none; scroll-snap-align: start; font-size: 14px; white-space: nowrap; }
  .seg { overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .seg::-webkit-scrollbar { display: none; }
  .seg a, .seg button { min-height: 40px; display: inline-flex; align-items: center; flex: none; font-size: 14px; }
  .pagination a, .pagination span { min-width: 44px !important; height: 44px !important; display: inline-flex; align-items: center; justify-content: center; }
}

/* ---- 폰·태블릿 세로(≤768) ---- */
@media (max-width: 768px) {
  /* 기본 글자: 14px↑ / 입력 16px */
  body, .content-area, .page { font-size: 14px; }
  .page-sub, .page-header p, .dl dt, .dl dd, label, .label, .form-label, .btn, .btn-sm, .btn-xs, a.btn, .nav-item-text { font-size: 14px; }
  .badge, .tag, .chip, .kpi-l, .kpi-d, .req, .pill { font-size: 13px; }
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=color]):not([type=file]):not([type=submit]):not([type=button]),
  select, textarea, .form-input, .form-select, .form-textarea, .input, .select, .textarea, .form-control { font-size: 16px !important; min-height: 44px; }
  textarea, .form-textarea, textarea.form-input, textarea.textarea { min-height: 96px; line-height: 22px; }
  input.input-sm, select.input-sm, .select.input-sm, .input-sm { height: 44px !important; min-height: 44px !important; font-size: 16px !important; }
  input[type=checkbox], input[type=radio] { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
  label:has(> input[type=checkbox]), label:has(> input[type=radio]), .choice, .check, .chk { min-height: 44px; display: inline-flex; align-items: center; gap: 10px; }
  .btn, .btn-sm, .btn-xs, .btn-lg, button.btn, a.btn { min-height: 44px !important; height: auto; padding-left: 14px; padding-right: 14px; font-size: 14px !important; border-radius: 12px; }
  .btn.btn-icon, .btn-icon, .btn-sm.btn-icon { width: 44px !important; min-width: 44px; padding: 0; }
  a.link, a.sub.cell-url, a.cell-url, a.link.mono, summary { min-height: 44px; display: inline-flex; align-items: center; }
  summary { padding: 0 4px; font-size: 14px; }
  table.mc td a:not(.btn):not(.badge):not(.tag) { min-height: 44px; display: inline-flex; align-items: center; }
  .content-area p a, .content-area li a:not(.btn), .content-area .page-sub a { display: inline; min-height: 0; }

  /* 페이지 머리 · 본문 여백(하단 탭·안전영역) */
  .page, .content-area { padding-left: max(var(--page-px), env(safe-area-inset-left, 0px)); padding-right: max(var(--page-px), env(safe-area-inset-right, 0px)); padding-bottom: calc(var(--bn-h) + env(safe-area-inset-bottom, 0px) + 28px); }
  .no-bnav .page, .no-bnav .content-area { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 28px); }
  .page-title, .page-header h1, .page-header h2 { font-size: 22px; line-height: 30px; }
  .page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .page-actions .btn { flex: 1 1 calc(50% - 8px); min-width: 120px; height: auto; min-height: 44px; }

  /* 하단 탭 5개 */
  .bottom-nav { height: calc(var(--bn-h) + env(safe-area-inset-bottom, 0px)); padding: 0 max(4px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(4px, env(safe-area-inset-left, 0px)); grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--glass-bg); box-shadow: 0 -6px 20px -12px rgba(21, 30, 16, .28); }
  .bottom-nav a, .bottom-nav button { min-height: 52px; gap: 2px; font-size: 12px; font-weight: 600; letter-spacing: -.02em; padding: 6px 0 4px; -webkit-tap-highlight-color: transparent; }
  .bottom-nav a > svg, .bottom-nav button > svg, .bottom-nav .i { width: 24px; height: 24px; stroke-width: 1.9; transition: transform .15s var(--ease); }
  .bottom-nav a:active > svg, .bottom-nav button:active > svg { transform: scale(.88); }
  .bottom-nav span:not(.n) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 16px; }
  .bottom-nav .on { color: var(--accent); font-weight: 800; }
  .bottom-nav .on::before { top: 0; left: 28%; right: 28%; height: 3px; }
  .bottom-nav .on > svg { stroke-width: 2.3; }
  .bottom-nav .n { top: 3px; left: calc(50% + 6px); min-width: 18px; height: 18px; line-height: 18px; font-size: 11px; font-weight: 800; box-shadow: 0 0 0 2px var(--glass-bg); }
  html.kb-open .bottom-nav, html.kb-open .bo-fab { display: none !important; }
  html.kb-open .page, html.kb-open .content-area { padding-bottom: 28px; }

  /* 하단 고정 줄(합계·일괄작업)은 하단 탭 바로 위 */
  .actionbar { bottom: calc(var(--bn-h) + env(safe-area-inset-bottom, 0px)); z-index: calc(var(--z-sticky) + 5); padding-left: max(var(--page-px), env(safe-area-inset-left, 0px)); padding-right: max(var(--page-px), env(safe-area-inset-right, 0px)); box-shadow: 0 -8px 24px -14px rgba(21, 30, 16, .3); }
  .bulkbar, .bulk-actions.show { position: fixed; left: 8px; right: 8px; bottom: calc(var(--bn-h) + env(safe-area-inset-bottom, 0px) + 8px); border-radius: 16px; z-index: calc(var(--z-sticky) + 6); flex-wrap: wrap; }
  .bulkbar .btn, .bulk-actions .btn { flex: 1 1 auto; }
  .toast-container { bottom: calc(var(--bn-h) + env(safe-area-inset-bottom, 0px) + 12px); }
  .today-events-popup { bottom: calc(var(--bn-h) + env(safe-area-inset-bottom, 0px) + 12px); }

  /* 모달 → 하단 시트 (손잡이 · 안전영역 · 아래 고정 버튼) */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-overlay .modal { max-width: 100% !important; width: 100%; max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 20px); border-radius: 20px 20px 0 0; border-bottom: 0; transform: translateY(40px); display: flex; flex-direction: column; overflow: hidden; }
  .modal-overlay.active .modal, .modal-overlay.show .modal, .modal-overlay.open .modal { transform: none; }
  .modal-overlay .modal::before { content: ""; flex: none; width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 8px auto 0; }
  .modal-overlay .modal > :is(.modal-b, .modal-body, form) { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; flex: 1 1 auto; min-height: 0; }
  .modal-overlay .modal .modal-body, .modal-overlay .modal .modal-b { overflow-y: auto; }
  .modal-header .close, .modal-header .modal-close, .modal-h .close, .modal-close, .modal .close { width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; }
  .modal-footer, .modal-f { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line-soft); display: flex; gap: 8px; flex: none; }
  .modal-footer .btn, .modal-f .btn { flex: 1 1 0; }
  .drawer { width: 100vw; }

  /* 표 → 카드: 덜 중요한 칸은 접기 · 터치 영역 · 제목 */
  table.mc > tbody > tr { padding: 14px 16px; }
  table.mc > tbody > tr > td, table.mc > tfoot > tr > td { font-size: 14px; padding: 6px 0; min-height: 32px; }
  table.mc td[data-label]::before { font-size: 13px; font-weight: 600; max-width: 40%; }
  table.mc td.mc-title { font-size: 16px; line-height: 24px; padding-bottom: 10px; }
  table.mc td.mc-title a { min-height: 0; display: inline; }
  table.mc td.mc-chk { top: 4px; right: 4px; width: 44px; height: 44px; display: grid; place-items: center; }
  table.mc td.mc-act { gap: 8px; padding-top: 10px; }
  table.mc td.mc-act .btn { flex: 1 1 auto; }
  table.mc td.mc-more { display: none; }
  table.mc > tbody > tr.mc-open > td.mc-more { display: flex; }
  table.mc > tbody > tr.mc-fold::after { content: "자세히 보기  ▾"; display: flex; align-items: center; justify-content: center; min-height: 44px; margin: 8px -14px -12px; border-top: 1px dashed var(--line); color: var(--accent); font-size: 14px; font-weight: 700; cursor: pointer; border-radius: 0 0 var(--r-md) var(--r-md); }
  table.mc > tbody > tr.mc-fold.mc-open::after { content: "접기  ▴"; }
  :is(.card, .panel) table.mc > tbody > tr.mc-fold::after { margin: 8px calc(-1 * var(--sp-4)) -14px; }
  /* 빈 목록 */
  table.mc > tbody > tr:has(> td.mc-full:only-child) { padding: 36px 16px; font-size: 14px; color: var(--text-3); border-radius: var(--r-md); }
  table.mc > tbody > tr:has(> td.mc-full:only-child)::before { content: ""; width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 14px; background: var(--tone-blue-bg, var(--accent-soft)); -webkit-mask: none; display: block; box-shadow: inset 0 0 0 1px var(--line-soft); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: 24px; }
  .empty, .empty-state { padding: 40px 20px; }
  .empty-t, .empty-state h3, .empty-state h4 { font-size: 15px; }
  .empty-d, .empty-state p { font-size: 14px; }

  /* 접이식 필터 */
  .mf-toggle { height: 48px; font-size: 15px; border-radius: 14px; }
  form.mf-form:not(.mf-closed) { background: var(--surface); border: 1px solid var(--line-card); border-radius: var(--r-md); padding: 12px; box-shadow: var(--shadow-card); }
  form.mf-form .form-grid, form.mf-form .filter-row, form.mf-form .row { gap: 10px; }
  form.mf-form .btn { flex: 1 1 calc(50% - 8px); }

  /* 고정 상단 액션바 (스크롤하면 주요 버튼이 상단바 아래에 붙음) */
  #boActBar { position: fixed; left: 0; right: 0; top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px)); z-index: calc(var(--z-sticky) + 4); display: flex; align-items: center; gap: 8px; padding: 6px max(var(--page-px), env(safe-area-inset-right, 0px)) 6px max(var(--page-px), env(safe-area-inset-left, 0px)); background: var(--glass-bg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-topbar); transform: translateY(-120%); opacity: 0; pointer-events: none; transition: transform .2s var(--ease), opacity .2s; }
  #boActBar.on { transform: none; opacity: 1; pointer-events: auto; }
  #boActBar .t { flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 800; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #boActBar .btn { flex: none; max-width: 52%; }
  #boActBar .btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* 한 손 조작 — 등록 버튼 FAB (엄지 닿는 오른쪽 아래) */
  .bo-fab { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(var(--bn-h) + env(safe-area-inset-bottom, 0px) + 16px); z-index: calc(var(--z-sticky) + 3); min-width: 56px; height: 56px; padding: 0 20px; border-radius: 28px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: linear-gradient(180deg, var(--accent-fill), var(--accent-fill-2)); color: var(--on-lime); font-size: 15px; font-weight: 800; box-shadow: 0 10px 24px -8px rgba(21, 30, 16, .45), var(--shadow-accent); text-decoration: none; transform: translateY(0); transition: transform .2s var(--ease), opacity .2s; }
  .bo-fab svg { width: 22px; height: 22px; }
  .bo-fab.hide { transform: translateY(24px) scale(.9); opacity: 0; pointer-events: none; }
  .actionbar ~ .bo-fab, body:has(.actionbar) .bo-fab, body:has(.bulkbar.show) .bo-fab { display: none; }

  /* 페이지 이동 피드백 */
  #boNavBar { position: fixed; left: 0; top: 0; height: 3px; width: 0; z-index: 200; background: var(--accent); box-shadow: 0 0 8px var(--accent); transition: width .6s var(--ease), opacity .3s; opacity: 0; pointer-events: none; }
  html.bo-leaving #boNavBar { opacity: 1; width: 78%; }
  html.bo-leaving .content-area, html.bo-leaving .page { opacity: .55; transition: opacity .2s; }

  /* 스켈레톤 (비동기로 채워지는 영역에 class="sk" 한 줄) */
  .sk, .skeleton { position: relative; overflow: hidden; border-radius: 10px; background: var(--surface-sunk); color: transparent !important; min-height: 16px; }
  .sk::after, .skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 70%, transparent), transparent); transform: translateX(-100%); animation: boSk 1.2s infinite; }
  @keyframes boSk { to { transform: translateX(100%); } }
  @media (prefers-reduced-motion: reduce) { .sk::after, .skeleton::after { animation: none; } }

  /* 대시보드 · 카드류 */
  .hero-in { padding-top: var(--sp-4); }
  .kpi, .stat-card { min-height: 0; }
  .kpi-l, .stat-label { font-size: 13px; }
  .kpi-d { font-size: 13px; }
  .card, .panel { border-radius: 16px; }
  .card-header, .panel-h { min-height: 52px; }
  .dl { grid-template-columns: 104px minmax(0, 1fr); }
  .stepper .step-t { font-size: 13px; }
  .pagination { flex-wrap: wrap; justify-content: center; gap: 6px; }
}

/* ---- 태블릿(600~768): 카드를 2열로 ---- */
@media (min-width: 600px) and (max-width: 768px) {
  .table-wrapper:has(table.mc):not(.card .table-wrapper), .table-wrap:has(table.mc) { padding: 12px; }
  :not(.card):not(.panel) > .table-wrapper > table.mc > tbody, :not(.card):not(.panel) > .table-wrap > table.mc > tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
  :not(.card):not(.panel) > .table-wrapper > table.mc > tbody > tr, :not(.card):not(.panel) > .table-wrap > table.mc > tbody > tr { margin: 0; }
  .kpis, .stats-grid, .kpis.kpis-lift { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .page-actions .btn { flex: 0 1 auto; }
  .modal-overlay { align-items: center; padding: 20px; }
  .modal-overlay .modal { max-width: 560px !important; border-radius: 20px; border-bottom: 1px solid var(--line-card); max-height: 88dvh; }
  .modal-overlay .modal::before { display: none; }
}

/* ---- 좁은 폰(≤380: 갤럭시 360) ---- */
@media (max-width: 380px) {
  :root { --page-px: 12px; }
  .topbar-title, .crumb b, .crumb .topbar-title { font-size: 16px !important; }
  .topbar .icon-btn, .topbar .topbar-bell, .topbar .theme-toggle, .menu-btn { width: 40px; height: 44px; }
  .page-title, .page-header h1 { font-size: 20px; line-height: 28px; }
  .kpi-v { font-size: 18px; }
  .hero-stat .v { font-size: 20px; }
  .bottom-nav a, .bottom-nav button { font-size: 12px; }
  .page-actions .btn { flex-basis: 100%; }
}

/* ---- 가로 모드 폰 ---- */
@media (max-width: 1023px) and (orientation: landscape) and (max-height: 500px) {
  :root { --bn-h: 52px; }
  .bottom-nav a, .bottom-nav button { flex-direction: row; justify-content: center; gap: 6px; min-height: 44px; }
  .sidebar { width: min(360px, 60vw); }
}

/* ---- 설치형(PWA) 홈 화면 앱 ---- */
@media (display-mode: standalone) and (max-width: 1023px) {
  body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  input, textarea, [contenteditable], .selectable, td, .content-area p { -webkit-user-select: text; user-select: text; }
}

/* v5.1 보강: 작은 체크박스·아이콘 링크·아이콘 탭도 44px 로 눌리게 */
@media (max-width: 1023px) {
  input[type=checkbox]:not(label *), input[type=radio]:not(label *) { box-sizing: content-box; width: 22px; height: 22px; padding: 11px; margin: 0; }
  a:not(.btn):not(.tab):has(> svg:only-child), a:not(.btn):not(.tab):has(> .i:only-child), a.g1-mc-ext { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .tab, .sub-tab { min-width: 44px; justify-content: center; padding-left: 12px; padding-right: 12px; }
}

/* ===========================================================================
   v5.1-A2 (2026-11-23) — 하단 탭이 가리는 것 전체 정리 (대표 지시: 메신저 입력창이 탭에 가려짐)
   · 규칙 1: 고정 위치 요소(토스트·알림창·점프 버튼)는 모바일에서 하단 탭 + 안전영역 위로 띄운다
   · 규칙 2: 입력창이 있는 전체화면형 화면은 <html class="ch-in-room"> 처럼 탭을 숨긴다(chat.css) 또는 <body class="no-bnav">
   · 규칙 3: 입력창에 포커스가 가면 html.kb-open → 탭 숨김(mobile.js), 키보드가 닫히면 복구
   =========================================================================== */
@media (max-width: 768px) {
  .lm-toast, .pj-toast { bottom: calc(var(--bn-h) + env(safe-area-inset-bottom, 0px) + 16px) !important; max-width: calc(100vw - 24px); }
  html.ch-in-room .toast-container { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  html.kb-open .lm-toast, html.kb-open .pj-toast, html.kb-open .toast-container { bottom: 16px !important; }
  .actionbar, .g3-bulk, .lmxc-sticky, .wl-actions { bottom: calc(var(--bn-h) + env(safe-area-inset-bottom, 0px)); }   /* 화면 아래 고정 저장줄·선택줄이 탭 바로 위에 */
  html.kb-open .actionbar, html.kb-open .g3-bulk, html.kb-open .lmxc-sticky, html.kb-open .wl-actions { bottom: 0; }
  .no-bnav .actionbar, .no-bnav .g3-bulk, .no-bnav .lmxc-sticky, .no-bnav .wl-actions { bottom: env(safe-area-inset-bottom, 0px); }
}


/* v5.1-B */
/* 사이드바: 긴 화면을 끝까지 스크롤/전체 캡처해도 사이드바 바탕이 화면 높이에서 끊기지 않게(열 전체에 같은 바탕·경계선) */
@media (min-width: 1024px) {
  .app, .app-layout { background-image: linear-gradient(to right, var(--sb-bg) 0, var(--sb-bg) calc(var(--sidebar-w) - 1px), var(--sb-line) calc(var(--sidebar-w) - 1px), var(--sb-line) var(--sidebar-w), transparent var(--sidebar-w)); background-repeat: no-repeat; }
}
/* 진행 막대 칸: 전역 .alert(안내 상자) 와 클래스가 겹쳐 분홍 상자로 보이던 것 방지 */
.flow-mini i.alert { display: block; width: 12px; height: 5px; padding: 0; margin: 0; border: 0; border-left: 0; border-radius: 3px; background: var(--danger); box-shadow: none; line-height: 0; }
.flow-mini i.no { background: var(--danger); }
/* 블로그 주소는 어디서든 끝까지 보이게 — 말줄임 금지(길면 줄바꿈) */
.cell-url { max-width: 100%; }
.cell-url span { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
td .sub.cell-url, a.cell-url { white-space: normal; }
/* 대비: 아직 안 된 단계 표시(입·정·전)와 달력 흐린 날짜 글자를 읽을 수 있게 */
.chk3 span:not(.on):not(.late) { color: var(--text-3); }

/* v5.1-D */
/* ==========================================================================
   v5.1-D — 제품 브랜드 · 데스크톱 상단바/사이드바 브랜드 · 대시보드 · 실데이터 길이 대응
   (모바일 @media 는 A 소유 — 여기에는 넣지 않는다. 색은 토큰만.)
   ========================================================================== */

/* ── 브랜드(사이드바) : 로고 한 줄 + 워크스페이스는 별도 줄 ── */
.sb-brand, .sidebar-logo { padding: 0 var(--sp-4) 0 18px; }
.sb-logo { display: inline-flex; align-items: center; height: 100%; color: var(--text); border-radius: var(--r-sm); }
.sb-logo:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.bo-lockup { display: block; height: 28px; width: auto; color: currentColor; flex: none; }
.bo-mark { display: block; width: 28px; height: 28px; flex: none; }
.sb-wsrow { padding: var(--sp-3) var(--sp-3) 0; flex: none; }
.sb-wsrow .sb-ws-wrap { display: block; width: 100%; margin: 0; }
.sb-wsrow .sb-ws, .sb-ws-static {
  width: 100%; max-width: none; height: 40px; margin: 0; padding: 0 10px 0 8px; gap: 8px;
  display: flex; align-items: center; justify-content: flex-start; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
  font-size: var(--fs-13); font-weight: var(--fw-semibold); color: var(--text); cursor: pointer;
  transition: border-color .12s, background-color .12s;
}
.sb-ws-static { cursor: default; background: var(--surface-2); border-color: var(--line-soft); }
.sb-wsrow .sb-ws:hover { border-color: var(--line-strong); background: var(--surface-2); }
.sb-wsrow .sb-ws:focus-visible { outline: none; box-shadow: var(--focus-ring); border-color: var(--accent); }
.sb-wsrow .sb-ws[aria-expanded="true"] { border-color: var(--accent-line); background: var(--accent-soft); }
.sb-ws-ic { width: 24px; height: 24px; border-radius: 7px; flex: none; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: var(--fw-heavy); letter-spacing: 0; }
.sb-ws-nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-wsrow .sb-ws > .i { margin-left: auto; color: var(--text-3); flex: none; }
.sb-wsrow .sb-ws-menu { left: 0; right: 0; min-width: 0; width: 100%; max-height: 320px; overflow-y: auto; }
.sb-ws-menu .ws-item .ws-nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-search { margin-top: var(--sp-2); }

/* ── 상단바 : 제목/브레드크럼 위계, 숫자 정렬 ── */
.topbar .tb-title, .topbar-title { letter-spacing: -.02em; }

/* ── 숫자·긴 텍스트 공통 안전장치 ── */
.kpi-v, .hero-stat .v, .dash-todo-n, .badge, .tab .n, .tabs .n { font-variant-numeric: tabular-nums; }
.kpi { min-width: 0; }
.kpi-l { min-width: 0; }
.kpi-v { white-space: nowrap; overflow: hidden; text-overflow: clip; }
.kpi-d { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-todo .grow, .dash-notice .grow { min-width: 0; }
.dash-todo-d { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-todo-d a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.dash-todo-d a:hover { color: var(--accent); text-decoration-color: currentColor; }
.dash-todo-n { min-width: 2.5ch; text-align: right; }
.dash-notice { min-width: 0; }

/* ── 대시보드 히어로: 한 문장 + 누계 칩(쉼표·줄바꿈 정리) ── */
.dash-hero .hero-s { max-width: 560px; margin-top: var(--sp-2); }
.dash-hero-totals { list-style: none; margin: var(--sp-4) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 8px; }
.dash-hero-totals li { display: inline-flex; align-items: baseline; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-full);
  background: var(--hero-glass); border: 1px solid var(--hero-glass-2); font-size: 12.5px; color: var(--on-hero-2); white-space: nowrap; align-items: center; }
.dash-hero-totals li span { opacity: .85; }
.dash-hero-totals li b { color: var(--on-hero); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; margin-left: 2px; margin-right: -2px; }
.hero-t { overflow-wrap: anywhere; }
.hero-stats { min-width: 0; }
.hero-stat .v { white-space: nowrap; }

/* ── 앱 설치 배너: 슬림 한 줄, 화면 하단 비중 낮춤(위치는 1줄 아래) ── */
.dash-install { box-shadow: none; background: var(--surface-2); border: 1px dashed var(--line-strong); }
.dash-install:hover { border-style: solid; border-color: var(--accent-line); background: var(--accent-soft); }
.dash-install-in { padding: 10px var(--sp-12) 10px var(--sp-4); gap: var(--sp-3); }
.dash-install-ic { width: 36px; height: 36px; background: transparent; }
.dash-install-ic img { width: 34px; height: 34px; border-radius: 9px; }
.dash-install-t { margin-bottom: 0; font-size: var(--fs-13); }
.dash-install .muted { font-size: var(--fs-12); }
.dash-install-qr { width: 40px; height: 40px; }
.dash-install .btn.btn-primary { height: 32px; padding: 0 14px; font-size: var(--fs-13); box-shadow: none; }

/* ── 시안 값 유지: 카드 그림자는 토큰(--shadow-card / --shadow-raise) 그대로, 여기서 줄이지 않는다 ── */
a:focus-visible, button:focus-visible, .btn:focus-visible, [tabindex]:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ── 넓은 화면(1440·1920): 콘텐츠 폭 활용 ── */
@media (min-width: 1600px) {
  .dash-row { grid-template-columns: minmax(0, 1fr) 460px; }
}
.dash-hero-totals li b small { font-size: 12px; font-weight: var(--fw-medium); margin-left: 1px; opacity: .9; }

/* ── 수주관리(B 소유 화면) — CSS 로 풀리는 것만 ── */
/* 상태 막대 '지남' 칸이 콜아웃(.alert) 규칙을 물려받아 빨간 네모로 커지던 충돌 */
.flow-mini i.alert { display: block; flex: none; width: 12px; height: 5px; padding: 0; margin: 0; border: 0; border-radius: 3px; background: var(--danger); box-shadow: none; }
/* 도구줄: 검색칸이 남는 폭만 쓰고 '초기화'가 다음 줄로 떨어지지 않게 */
.toolbar.no-mf { gap: var(--sp-2); row-gap: var(--sp-2); }
.toolbar.no-mf .g1-ord-q { width: auto; flex: 1 1 180px; min-width: 150px; max-width: 360px; }
.toolbar.no-mf .g1-ord-fin { width: 112px; }
.toolbar.no-mf .g1-ord-fin[type=date] { width: 108px; }
@media (max-width: 1400px) { .toolbar.no-mf .filter { padding-inline: 8px; gap: 5px; } .toolbar.no-mf .g1-ord-fsel { max-width: 96px; } }
.toolbar.no-mf .filter { flex: 0 1 auto; min-width: 0; }
.toolbar.no-mf .g1-ord-fsel { max-width: 150px; text-overflow: ellipsis; }
.toolbar.no-mf .btn { flex: none; }
/* 상품별 칩: 넘치면 오른쪽이 흐려져 더 있음을 알림 */
.g1-ord-prod { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
.g1-ord-prod { scrollbar-width: none; }
/* 키워드·광고주 열: 폭에 비례해 읽히게 */
.tbl.g1-ord-tbl td.g1-ord-kw, .g1-ord-tbl td.g1-ord-kw { max-width: clamp(100px, 10.5vw, 300px); }
.g1-ord-tbl .g1-ord-client { max-width: clamp(130px, 12.5vw, 300px); }
.g1-ord-tbl td, .g1-ord-tbl th { font-variant-numeric: tabular-nums; }
.dash-kpis .kpi-d { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dash-row { align-items: stretch; }

/* ── 대시보드(시안 dashboard.html 구성) ── */
.dash-body { padding: 0 var(--page-px); }
.dash-body > .kpis-lift { margin-top: -68px; }
.dash-hero.hero-bleed .hero-in { padding-bottom: 92px; }
.kpi > .spark { margin-top: auto; }
.kpi > .kpi-d:has(+ .spark) { margin-bottom: 12px; }
.kpi .kpi-d.kpi-lg { flex-wrap: wrap; row-gap: 2px; }
.kpi .kpi-lg .lg b { font-weight: var(--fw-semibold); color: var(--text); margin-left: 2px; }
.kpi .stackbar { height: 10px; border-radius: 5px; }
.spark-empty { height: 46px; }
.dash-staff-m { display: none; }
.dash-work th.c, .dash-work td.c { text-align: center; width: 56px; }
.dash-work .sub { font-size: var(--fs-12); color: var(--text-3); line-height: 16px; margin-top: 1px; }
.dash-work .ell, .ell { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.dash-work td.m-title { max-width: 0; width: 38%; }
.dash-work td.m-sub { max-width: 0; width: 24%; }
.dash-work .due.late, .dash-work .due.soon { font-weight: var(--fw-bold); }
.dash-work .due.late { color: var(--danger); } .dash-work .due.soon { color: var(--warn); }
.panel .trend, .panel .bars { display: block; width: 100%; height: auto; }
.trend .tk, .bars .tk { font-size: 11px; fill: var(--text-3); font-variant-numeric: tabular-nums; }
.trend .dot { fill: currentColor; stroke: var(--surface); stroke-width: 2; }
.toolbar.no-mf .g1-ord-q { display: flex; align-items: center; flex-wrap: nowrap; min-width: 200px; }
.toolbar.no-mf .g1-ord-q input { flex: 1 1 0; width: 0; min-width: 0; height: 100%; line-height: normal; }
.toolbar.no-mf > .g1-ord-sp { display: none; }
.toolbar.no-mf .btn-ghost { padding-inline: 8px; }

/* ── 넓은 화면: 콘텐츠 상한을 1760 으로 올리고(1920 에서 오른쪽 200px 가 비던 문제) 더 넓으면 가운데 정렬 ── */
:root { --content-max: 1760px; }
.page, .content-area { margin-inline: auto; }

/* v5.1-D2 (시안 일치·그래프) */

.dash-kpis .kpi-d.kpi-lg { display: flex; -webkit-line-clamp: unset; overflow: visible; }
.dash-kpis .kpi-d:has(.delta) { white-space: nowrap; display: flex; -webkit-line-clamp: unset; overflow: hidden; }
.hero.hero-bleed { border-radius: 0; }
.page-lift > .hero-bleed, .content-area.page-lift > .hero-bleed { margin-top: 0; }
.g1-rm-tr { width: 104px; } .g1-rm-tr .trend { display: block; width: 88px; height: 24px; }
.trend .base, .trend .ln, .trend .dot { vector-effect: non-scaling-stroke; }
.trend.c-5 { color: var(--chart-5, var(--danger)); }
.dash-staff .dash-staff-m { display: none; }
/* v5.1-E ===== 메뉴 구성(includes/nav.php) : 행·고정(★)·더 보기·최근/즐겨찾기·좁은 사이드바(72px)+플라이아웃 ===== */
.nav-row { position: relative; }
.nav-row > .nav-item { width: 100%; }
.nav-sec-ic, .nav-fly-t { display: none; }
.nav-badge { background: var(--accent-soft); color: var(--accent); }
.nav-badge.is-danger { background: var(--danger-fill); color: var(--on-fill); }
.nav-item.active .nav-badge { background: rgba(255, 255, 255, .22); color: var(--on-lime); }
.nav-pin { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; display: none; place-items: center; border: 0; border-radius: var(--r-xs); background: var(--surface); color: var(--text-3); cursor: pointer; padding: 0; }
.nav-pin .i { width: 13px; height: 13px; }
.nav-row:hover .nav-pin, .nav-pin:focus-visible, .nav-pin.on:hover { display: grid; }
.nav-pin:hover { color: var(--warn-text, #b7791f); }
.nav-pin.on { color: var(--warn-text, #b7791f); }
.nav-pin.on .i { fill: currentColor; }
.nav-row:hover .nav-badge { visibility: hidden; }
@media (hover: none) { .nav-pin { display: none !important; } .nav-row:hover .nav-badge { visibility: visible; } }
.nav-pin-item { position: relative; display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 10px; border-radius: var(--r-sm); color: var(--g-700); font-weight: var(--fw-medium); font-size: var(--fs-13); text-decoration: none; }
.nav-pin-item .nav-icon-wrap { color: var(--text-3); }
.nav-pin-item:hover { background: var(--row-hover); color: var(--accent); }
.nav-pin-item.active { color: var(--accent); font-weight: var(--fw-bold); }
.nav-sec-fav .nav-sec-h { color: var(--text-3); }
.nav-more { margin-top: 2px; }
.nav-more-h { display: flex; align-items: center; gap: 6px; width: 100%; height: 28px; padding: 0 10px; border: 0; background: transparent; color: var(--text-3); font-size: 12px; font-weight: var(--fw-medium); border-radius: var(--r-sm); cursor: pointer; text-align: left; }
.nav-more-h:hover { background: var(--row-hover); color: var(--text); }
.nav-more-h .nav-sec-more { margin-left: auto; }
.nav-more-h .i { width: 12px; height: 12px; margin-left: 6px; transition: transform var(--dur-2) var(--ease); }
.nav-more.open .nav-more-h .i { transform: rotate(180deg); }
.nav-more-list { display: none; flex-direction: column; gap: 1px; }
.nav-more.open .nav-more-list { display: flex; }
.nav-foot { position: sticky; bottom: calc(-1 * var(--sp-4)); margin-top: var(--sp-3); padding: 6px 0 var(--sp-2); background: var(--sb-bg); border-top: 1px solid var(--line-soft); }
.nav-collapse { display: flex; align-items: center; gap: 10px; width: 100%; height: 30px; padding: 0 10px; border: 0; background: transparent; color: var(--text-3); font-size: 12px; font-weight: var(--fw-medium); border-radius: var(--r-sm); cursor: pointer; }
.nav-collapse:hover { background: var(--row-hover); color: var(--text); }
.nav-collapse[aria-pressed="true"] .i { transform: rotate(180deg); }
@media (max-width: 1023px) { .nav-foot { display: none; } }
@media (min-width: 1024px) {
  html[data-sb="mini"] { --sidebar-w: 72px; --sidebar-width: 72px; }
  html[data-sb="mini"] .sb-brand { padding: 0; justify-content: center; }
  html[data-sb="mini"] .sb-brand .grow, html[data-sb="mini"] .sb-ws-wrap { display: none; }
  html[data-sb="mini"] .sb-search { width: 40px; margin: 8px auto 4px; padding: 0; justify-content: center; }
  html[data-sb="mini"] .sb-search span { display: none; }
  html[data-sb="mini"] .sb-scroll { padding: 4px 8px 12px; }
  html[data-sb="mini"] .nav-sec { position: relative; margin-top: 2px; border: 0; padding: 0; }
  html[data-sb="mini"] .nav-sec .nav-sec-h { height: 44px; justify-content: center; padding: 0; font-size: 0; color: var(--text-3); }
  html[data-sb="mini"] .nav-sec .nav-sec-h .nav-sec-ic { display: grid; place-items: center; }
  html[data-sb="mini"] .nav-sec .nav-sec-h .nav-sec-ic .i { width: 20px; height: 20px; margin: 0; }
  html[data-sb="mini"] .nav-sec .nav-sec-h > svg, html[data-sb="mini"] .nav-sec .nav-sec-more { display: none; }
  html[data-sb="mini"] .nav-sec .nav-sec-dot { display: block; position: absolute; top: 9px; right: 17px; margin: 0; }
  html[data-sb="mini"] .nav-sec[data-active] .nav-sec-h, html[data-sb="mini"] .nav-sec:hover .nav-sec-h { background: var(--accent-soft); color: var(--accent); }
  html[data-sb="mini"] .nav-sec .nav-list { display: none !important; }
  html[data-sb="mini"] .nav-sec:hover .nav-list, html[data-sb="mini"] .nav-sec:focus-within .nav-list {
    display: flex !important; position: fixed; left: 72px; top: var(--fy, 80px); width: 244px; max-height: calc(100vh - 16px); overflow-y: auto;
    padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md, 10px); box-shadow: var(--shadow-modal); z-index: var(--z-drop); }
  html[data-sb="mini"] .nav-list::before { content: ""; position: absolute; left: -10px; top: 0; bottom: 0; width: 10px; }
  html[data-sb="mini"] .nav-fly-t { display: block; padding: 6px 10px 8px; font-size: 11px; font-weight: var(--fw-bold); color: var(--text-3); letter-spacing: .02em; }
  html[data-sb="mini"] .nav-collapse { justify-content: center; padding: 0; }
  html[data-sb="mini"] .nav-collapse span { display: none; }
  html[data-sb="mini"] .sb-foot { justify-content: center; padding: var(--sp-3) 0; }
  html[data-sb="mini"] .sb-foot .grow { display: none; }
}
.nav-sec-h > svg.i { margin-left: auto; }
.nav-sec-h .nav-sec-more + svg.i { margin-left: 6px; }
@media (min-width: 1024px) { html[data-sb="mini"] .sb-foot { flex-direction: column; gap: 6px; padding: var(--sp-3) 0; } }

/* v5.1-MERGE 공통: mobile.js 가 모든 폭에서 만드는 모바일 전용 요소가 데스크톱에서 스타일 없이 커지던 문제 */
@media (min-width: 769px) { .bo-fab, #boActBar { display: none !important; } }

/* v5.1-SCR1 (정산·링크·블로거 시안 일치) — 자기 화면 클래스 범위, 토큰만 */
[data-pane][hidden] { display: none !important; }
/* 정산: 상단 월 이동 + KPI */
.g3-month-h.scr1-month { margin-top: 0; padding-top: 0; border-top: 0; }
.scr1-kpis { margin-bottom: 0; }
.scr1-kpis .kpi-d { white-space: normal; flex-wrap: wrap; }
.scr1-kpis .kpi-v { overflow: hidden; text-overflow: ellipsis; }
/* 정산: 탭(버튼형) */
.scr1-tabs { margin-bottom: 0; }
.scr1-tabs .tab { font: inherit; font-size: 13.5px; font-weight: var(--fw-medium); }
.scr1-tabs .tab.on { font-weight: var(--fw-bold); }
/* 정산: 차트 */
.scr1-chart { width: 100%; }
.scr1-chart svg { display: block; width: 100%; height: auto; }
.scr1-chart-t { margin: var(--sp-4) 0 var(--sp-1); font-size: var(--fs-12); font-weight: var(--fw-semibold); color: var(--text-2); }
.bars .tk, .trend .tk { fill: var(--text-3); font-size: 11px; }
.scr1-chart svg { overflow: visible; }
.scr1-chart-t small { font-weight: var(--fw-medium); color: var(--text-3); }
.scr1-charts { min-width: 0; }
/* 링크 전달 */
.scr1-lk-kpis { margin-bottom: var(--sp-4); }
.scr1-lk-kpis .kpi-d { white-space: normal; }
.g1-lk-det > summary { cursor: pointer; list-style: none; }
.g1-lk-det > summary::-webkit-details-marker { display: none; }
.g1-lk-det > .g1-lk-pre { margin-top: var(--sp-2); }
.g1-lk-selcnt { font-size: var(--fs-13); color: var(--text-2); }
.g1-lk-selcnt b { color: var(--text); }
.g1-lk-act .g1-lk-selcnt { margin-right: var(--sp-1); }
/* 블로거관리 */
.scr1-bl-kpis { margin-bottom: var(--sp-4); }
.scr1-bl-kpis .kpi-d { white-space: normal; }
/* 공통: 모바일 FAB(.bo-fab)는 mobile.js 가 폭과 무관하게 만들고 CSS 는 768px 이하에만 있어, 데스크톱에서 스타일 없는 큰 + 아이콘이 페이지 하단에 노출됨 */
@media (min-width: 769px) { .bo-fab { display: none !important; } }
.scr1-bl-tbl td.m-title .grow { min-width: 0; max-width: 260px; }
.scr1-bl-tbl td.m-title .grow > a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scr1-bl-tbl th, .scr1-bl-tbl td { white-space: nowrap; }
.scr1-bl-tbl th, .scr1-bl-tbl td { padding-left: 9px; padding-right: 9px; }
.scr1-bl-tbl td.m-title .grow { max-width: 210px; }
.scr1-bl-tbl .w-cb { padding-left: var(--sp-3); padding-right: 0; }
/* 링크 전달 — 모바일 카드 줄: 같은 칸에 겹치던 m-meta 셀을 flex 줄바꿈으로 */
@media (max-width: 768px) {
  .tbl td.g1-lk-title { min-width: 0; }
  .g1-lk-title .cell-url { max-width: 100%; overflow: hidden; }
  .g1-lk-title .cell-url span { overflow: hidden; text-overflow: ellipsis; }
  .g1-lk-grp .tbl-m tbody tr, .scr1-lk-q.tbl-m tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
  .g1-lk-grp .tbl-m td, .scr1-lk-q.tbl-m td.m-meta, .scr1-lk-q.tbl-m td.m-sub, .scr1-lk-q.tbl-m td.m-title, .scr1-lk-q.tbl-m td.m-status { grid-column: auto; grid-row: auto; margin: 0; }
  /* 보낼 링크 줄: 체크 | 제목·링크 / 주문 · 구분 · 빼기 */
  .g1-lk-grp .tbl-m td:nth-child(1) { order: 0; align-self: flex-start; }
  .g1-lk-grp .tbl-m td:nth-child(4) { order: 1; flex: 1 1 calc(100% - 40px); }
  .g1-lk-grp .tbl-m td:nth-child(2) { order: 2; margin-left: 30px; }
  .g1-lk-grp .tbl-m td:nth-child(5) { order: 3; text-align: left; }
  .g1-lk-grp .tbl-m td:nth-child(6) { order: 4; margin-left: auto; }
  .g1-lk-grp .tbl-m td.m-status .sub { display: none; }
  /* 대기열·뺀 주문 줄: 보낼 시각 | 업체 / 방 / 건수·방식 · 상태 · 취소 */
  .scr1-lk-q.tbl-m td { align-items: center; }
  .scr1-lk-q.tbl-m td:nth-child(2) { order: 1; flex: 1 1 auto; }
  .scr1-lk-q.tbl-m td:nth-child(1) { order: 0; flex: 0 0 100%; }
  .scr1-lk-q.tbl-m td:nth-child(3) { order: 2; flex: 1 1 100%; }
  .scr1-lk-q.tbl-m td:nth-child(4) { order: 3; flex: 0 0 auto; }
  .scr1-lk-q.tbl-m td:nth-child(5) { order: 4; flex: 0 0 auto; }
  .scr1-lk-q.tbl-m td:nth-child(6) { order: 5; margin-left: auto; }
  .scr1-lk-q.tbl-m td:nth-child(7) { order: 6; flex: 0 0 auto; }
  .g1-lk-chk { display: block; line-height: 1.5; flex: 1 1 100%; }
  .g1-lk-chk input { vertical-align: middle; margin-right: 8px; }
  .g1-lk-act .g1-lk-selcnt { flex: 1 1 100%; }
}
@media (max-width: 768px) {
  .g1-lk-grp .tbl-m td:nth-child(4) { flex: 1 1 0; min-width: 0; overflow: hidden; }
  .g1-lk-grp .tbl-m td:nth-child(4) .cell-url { min-width: 0; width: 100%; }
  .g1-lk-grp .tbl-m td:nth-child(4) .cell-url span { min-width: 0; flex: 1 1 auto; }
  .g1-lk-grp .tbl-m td:nth-child(1) { flex: 0 0 auto; }
  .g1-lk-act label.g1-lk-chk { display: block !important; }
}
@media (max-width: 768px) {
  .g1-lk-grp .tbl-m td:nth-child(2) { flex: 0 0 calc(100% - 30px); order: 2; }
  .g1-lk-grp .tbl-m td:nth-child(5) { margin-left: 30px; }
}
@media (max-width: 768px) {
  .g1-lk-grp .tbl-m tr.sel { background: var(--info-bg); }
  .g1-lk-grp .tbl-m tr.sel td { background: transparent; }
}


/* v5.1-SCR2 (수주관리·수주 상세·대량 등록·실무 작업함 — 시안 일치) */

/* 0) 모바일 전용 요소가 데스크톱에서 스타일 없이 크게 보이던 문제 (mobile.js 가 모든 폭에서 만들고, 스타일은 768px 이하에만 있음) */
@media (min-width: 769px) { .bo-fab, #boActBar { display: none !important; } }

/* 1) 수주관리 — 상단 요약(KPI 4 + 진행 분포 막대) */
.ox-sum { background: var(--surface); border: 1px solid var(--line-card); border-radius: var(--r-md); box-shadow: var(--shadow-card); margin-bottom: var(--sp-4); overflow: hidden; }
.ox-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ox-k { position: relative; display: flex; flex-direction: column; min-width: 0; padding: var(--sp-4) var(--sp-5) var(--sp-3); overflow: hidden; }
.ox-k + .ox-k { border-left: 1px solid var(--line-soft); }
.ox-kl { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: var(--fw-semibold); color: var(--text-2); }
.ox-kv { margin-top: 6px; font-size: 24px; line-height: 32px; font-weight: var(--fw-heavy); letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); }
.ox-kv small { margin-left: 2px; font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: 0; }
.ox-kd { margin-top: 2px; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ox-kd b { font-weight: var(--fw-semibold); color: var(--text-2); }
.ox-kd .delta { padding: 1px 6px; border-radius: var(--r-full); font-weight: var(--fw-semibold); }
.ox-kd .delta.up { color: var(--ok); background: var(--ok-bg); }
.ox-kd .delta.down { color: var(--danger); background: var(--danger-bg); }
.ox-k .spark { height: 30px; margin-top: auto; margin-bottom: calc(-1 * var(--sp-3)); padding-top: 6px; }
.ox-dist { padding: var(--sp-3) var(--sp-5) var(--sp-4); border-top: 1px solid var(--line-soft); background: var(--surface-sunk); }
.ox-dist-t { font-size: 12px; font-weight: var(--fw-semibold); color: var(--text-2); }
.ox-dist .stackbar { margin-top: 8px !important; height: 12px; border-radius: 6px; }
.ox-dist .kpi-d { margin-top: 8px !important; display: flex; flex-wrap: wrap; row-gap: 2px; white-space: normal; }
.ox-dist .lg b { margin-left: 2px; font-weight: var(--fw-semibold); color: var(--text); }
@media (max-width: 1100px) { .ox-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ox-k:nth-child(3) { border-left: 0; } .ox-k:nth-child(n+3) { border-top: 1px solid var(--line-soft); } }
@media (max-width: 640px) { .ox-k { padding: var(--sp-3) var(--sp-4) var(--sp-2); } .ox-kv { font-size: 20px; line-height: 26px; } .ox-k .spark { display: none; } .ox-dist { padding: var(--sp-3) var(--sp-4); } .ox-dist .lg { margin-left: 0; margin-right: 10px; } }

/* 2) 수주관리 표 — 키워드 칸은 2줄까지(전체는 마우스를 올리면), 주문번호는 번호 열이 숨는 폭에서 광고주 아래로 */
body .g1-ord-tbl td.g1-ord-kw { width: 120px; max-width: 150px; }
.g1-ord-kwt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.g1-ord-no { display: none; font-size: 11px; color: var(--text-3); letter-spacing: 0; }
@media (max-width: 1520px) { .g1-ord-no { display: block; } }
@media (max-width: 1440px) { body .g1-ord-tbl td.g1-ord-kw { width: 104px; max-width: 120px; } }
@media (max-width: 1320px) { body .g1-ord-tbl td.g1-ord-kw { width: 76px; max-width: 90px; } }
@media (max-width: 640px) { .g1-ord-no { display: none; } }

/* 3) 선택 작업바 — 한 줄에 최대한 담고, 금액 합계는 오른쪽 끝 */
.g1-ord-bulk { gap: 2px; column-gap: 2px; }
.g1-ord-bulk .bb { padding: 0 8px; gap: 5px; white-space: nowrap; }
.g1-ord-bulk .sep { margin: 0 var(--sp-2); }
.g1-ord-bulk .g1-ord-bsel { height: 28px; max-width: 104px; padding: 0 6px; }
.g1-ord-bulk .sum { margin-left: auto; white-space: nowrap; padding-right: var(--sp-1); }
.g1-ord-bulk .selected-count { white-space: nowrap; margin-right: var(--sp-1); }

/* 4) 수주관리 — 모바일 상태 탭은 한 줄 가로 스크롤(시안), 요약 설명은 줄바꿈 허용 */
@media (max-width: 640px) {
  .g1-ord-tabs { flex-wrap: nowrap; overflow-x: auto; column-gap: var(--sp-4); }
  .g1-ord-tabs .tab { flex: none; }
  .g1-ord-tabs .g1-ord-sp { display: none; }
  .ox-kd { white-space: normal; }
}

/* 5) 폭이 1700px 이하면 번호·지급액 열을 접어 광고주·지급액 아래 줄로 (블로그 주소 전체 표시를 지키기 위해) */
@media (max-width: 1700px) {
  .g1-ord-tbl .hide-xl { display: none !important; }
  .g1-ord-no { display: block; }
  .g1-ord-paycol { display: none !important; }
  .g1-ord-paysub { display: block !important; }
}
@media (max-width: 640px) { .g1-ord-no { display: none; } }
@media (max-width: 1320px) {
  body .g1-ord-tbl th, body .g1-ord-tbl td { padding-left: 4px; padding-right: 4px; }
  body .g1-ord-tbl .g1-ord-staff { width: 52px !important; min-width: 0 !important; max-width: 52px; }
  body .g1-ord-tbl .g1-ord-client { max-width: 108px; }
}
@media (max-width: 1320px) { body .g1-ord-tbl .g1-ord-blu { font-size: 11.5px; } }

/* 6) 주문 상세 모바일 — 상단 버튼이 두 줄로 밀리지 않게 */
@media (max-width: 640px) {
  .ov-head .page-actions { flex-wrap: nowrap; }
  .ov-head .page-actions .btn-primary { min-width: 0; flex: 1 1 auto; }
  .ov-head .page-actions .ov-more { flex: none; }
}

/* 7) 모바일 카드형 표 — 선택된 줄의 색은 줄 전체에 한 번만 */
@media (max-width: 640px) {
  body .g1-ord-tbl tr.sel { background: var(--surface-sunk); }
  body .g1-ord-tbl tr.sel > td { background: transparent !important; }
}

/* ==========================================================================
   v5.2-green (2026-11-23) — 색 정체성을 「원래 쓰던 초록」으로: 검정 사이드바 + 라임 포인트 + 검정 주 버튼.
   구성·마크업·레이아웃은 v5.1 그대로. 색 토큰은 위 :root / [data-theme="dark"] 에서 바뀌었고,
   아래는 「면 색의 역할」이 바뀐 규칙(사이드바 · 주 버튼 · 활성 메뉴 배지 · 선택 · 막대)만 덧씌운다.
   ========================================================================== */
::selection { background: #b9ff66; color: #0b0d0c; }

/* 1) 사이드바 = 라이트·다크 모두 검정 바탕. 사이드바 안에서만 토큰을 어두운 값으로 바꿔 안쪽 규칙이 그대로 따라오게 한다 */
.sidebar {
  --text: #f2f5ef; --text-2: #b4bbb2; --text-3: #8d968c; --g-700: #b4bbb2; --g-600: #b4bbb2; --g-400: #6b746a;
  --line: #1c201d; --line-soft: #1c201d; --line-strong: #2d332e;
  --surface: #151816; --surface-2: #121512; --surface-sunk: #171a18; --row-hover: #171a18;
  --accent: #b9ff66; --accent-hover: #d2ff99; --accent-soft: rgba(185, 255, 102, .14); --accent-line: rgba(185, 255, 102, .36);
  --brand-name: #f2f5ef; --on-fill: #ffffff; --danger-fill: #d93f3f;
  --focus-ring: 0 0 0 3px rgba(185, 255, 102, .40);
  color: #f2f5ef; border-right-color: var(--sb-line);
}
.sidebar .nav-item:hover { color: #f2f5ef; }
.sidebar .nav-item:hover > svg, .sidebar .nav-item:hover .i, .sidebar .nav-item:hover .nav-icon-wrap, .sidebar .nav-item:hover .nav-icon-wrap svg { color: #f2f5ef; }
.sidebar .nav-item.active { background: #b9ff66; color: #0b0d0c; box-shadow: 0 0 0 1px rgba(185, 255, 102, .35), 0 6px 16px -8px rgba(185, 255, 102, .55); }
.sidebar .nav-item.active > svg, .sidebar .nav-item.active .i, .sidebar .nav-item.active .nav-icon-wrap, .sidebar .nav-item.active .nav-icon-wrap svg { color: #0b0d0c; }
.sidebar .nav-count, .sidebar .nav-badge { background: rgba(185, 255, 102, .16); color: #b9ff66; }
.sidebar .nav-count.hot, .sidebar .nav-badge.is-danger { background: #d93f3f; color: #ffffff; }
.sidebar .nav-item.active .nav-count, .sidebar .nav-item.active .nav-badge { background: #0b0d0c; color: #b9ff66; }
.sidebar .nav-sec-h:hover { background: #171a18; color: #f2f5ef; }
.sidebar .nav-sec.closed .nav-sec-h { color: #b4bbb2; }
.sidebar .nav-pin-item.active { color: #b9ff66; }
.sidebar .ws-item.active { color: #0b0d0c; background: #b9ff66; border-color: #b9ff66; }
.sidebar .ws-item.active .ws-dot { background: #0b0d0c; }
.sidebar .sb-ws-menu { background: #151816; border: 1px solid #2d332e; box-shadow: 0 12px 32px rgba(0, 0, 0, .55); }
.sidebar .sb-ws-menu .ws-item.active { color: #b9ff66; background: rgba(185, 255, 102, .14); }
.sidebar .sb-mark { background: #b9ff66; color: #0b0d0c; box-shadow: none; }
.sidebar ::-webkit-scrollbar-thumb { background: #2d332e; }
.sidebar .kbd { background: #1c201d; border-color: #2d332e; color: #b4bbb2; }

/* 2) 주 버튼 = 원래처럼 검정(다크에서는 라임). 라임은 활성 메뉴·포인트에만 */
.btn-primary, .btn.primary, .login-btn { background: var(--btn-fill); border-color: var(--btn-fill); color: var(--on-btn); }
.btn-primary:hover, .btn.primary:hover, .login-btn:hover { background: var(--btn-fill-2); border-color: var(--btn-fill-2); color: var(--on-btn); }
html:not([data-theme="dark"]) .btn-primary, html:not([data-theme="dark"]) .btn.primary, html:not([data-theme="dark"]) .login-btn { box-shadow: 0 1px 2px rgba(11, 13, 12, .25), 0 6px 14px -6px rgba(11, 13, 12, .45); }
html[data-theme="dark"] .btn-primary:hover, html[data-theme="dark"] .btn.primary:hover { background: #d2ff99; border-color: #d2ff99; }
.btn-primary > svg, .btn-primary .i { color: currentColor; }
.btn-primary:focus-visible, .btn.primary:focus-visible { box-shadow: var(--focus-ring); }

/* 3) 진한 칩(번호·아이콘 칩·아바타)은 검정→딥그린 면 + 라임 글리프 */
.sb-mark, .secno, .drop-ic, .sec-ic.t-solid, .login-logo-icon, .av-ink, .topbar-avatar { color: var(--on-chip); }
.secno, .drop-ic, .sec-ic.t-solid, .av-ink, .topbar-avatar { box-shadow: 0 1px 2px rgba(11, 13, 12, .25); }

/* 4) 일괄 작업 줄(검정 줄) 안의 체크박스 */
.bulkbar .cb.on, .bulkbar .cb.mixed { background: #b9ff66; border-color: #b9ff66; }
.bulkbar .cb.on::after { border-color: #0b0d0c; }
.bulkbar .bb .i, .bulkbar .bb svg { color: #b9ff66; }

/* 5) 히어로 — 검정/딥그린 → 라임 빛. 숫자는 흰색 유지(AA) */
.hero-date, .hero-stats { border-color: rgba(255, 255, 255, .20); }
.hero .seg { background: var(--hero-seg); }

/* 6) 로그인 화면 바탕 */
.login-page { background: var(--hero-grad); }
.login-page .login-btn:focus-visible { box-shadow: 0 0 0 3px rgba(185, 255, 102, .45); }

/* 7) 상단 로딩 줄·알림 점 등 accent 소품은 토큰을 그대로 쓴다(진한 초록 / 다크에선 라임) */
#boNavBar { background: #b9ff66; box-shadow: 0 0 8px rgba(185, 255, 102, .8); }

/* v5.1-fix blogger-name (운영 핫픽스 유지) */
.g1-ord-tbl td.g1-ord-bltd .g1-ord-bl .bl-n{max-width:240px !important;overflow:visible !important;text-overflow:clip !important}
.g1-ord-tbl td.g1-ord-bltd .g1-ord-bl{max-width:none !important;min-width:0 !important}
.g1-ord-tbl td.g1-ord-bltd{overflow:visible}
