/* saas-design · saas.css — 토큰 · 기본 · 컴포넌트 · 앱 셸(사이드바·상단 바·페이지)
 * 브랜드를 바꾸려면 :root 의 --brand 하나(필요하면 --on-brand)만 바꾼다 — 호버·옅은 배경·글자색은 color-mix 로 따라온다.
 * 다크 모드: <html data-theme="dark|light"> 가 우선, 없으면 prefers-color-scheme. 글꼴은 서버에 같은 출처로 둔 Pretendard(외부 글꼴 금지). */

:root {
  /* 브랜드 */
  --brand: #4B5BD6; --on-brand: #FFFFFF;
  --brand-hover: color-mix(in oklab, var(--brand) 88%, #000);
  --brand-press: color-mix(in oklab, var(--brand) 78%, #000);
  --brand-soft: color-mix(in oklab, var(--brand) 9%, var(--surface));
  --brand-soft-2: color-mix(in oklab, var(--brand) 16%, var(--surface));
  --brand-ink: color-mix(in oklab, var(--brand) 82%, #000);
  --brand-line: color-mix(in oklab, var(--brand) 32%, var(--surface));
  /* 중립(약간 차가운 회색) */
  --bg: #F6F7F9; --surface: #FFFFFF; --surface-2: #F3F4F7; --surface-3: #EAECF0;
  --line: #E4E7EC; --line-strong: #D0D5DD;
  --ink: #101828; --ink-2: #344054; --ink-3: #5B667A; --ink-4: #98A2B3;
  /* 상태 */
  --ok: #067647; --ok-soft: #E7F6EE; --warn: #B54708; --warn-soft: #FEF4E2; --bad: #B42318; --bad-soft: #FDECEA; --info: #175CD3; --info-soft: #E8F1FE;
  /* 글자 */
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --fs-xs: 12px; --fs-sm: 13px; --fs-md: 14px; --fs-lg: 16px; --fs-xl: 20px; --fs-2xl: 28px;
  /* 간격(4px 단위) · 모서리 · 그림자 · 움직임 */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px;
  --r-sm: 6px; --r: 8px; --r-lg: 12px; --r-xl: 16px;
  --sh-1: 0 1px 2px rgba(16,24,40,.05); --sh-2: 0 4px 12px -2px rgba(16,24,40,.10), 0 2px 4px -2px rgba(16,24,40,.06); --sh-3: 0 24px 48px -12px rgba(16,24,40,.22);
  --ring: 0 0 0 3px color-mix(in oklab, var(--brand) 34%, transparent);
  --ease: cubic-bezier(.2,.7,.2,1); --dur: 160ms;
  --sb-w: 248px; --top-h: 56px; --ctl-h: 36px;
  color-scheme: light;
}
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="dark"], :root:not([data-theme="light"]) .dark-auto { }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0A0C11; --surface: #11141B; --surface-2: #171B24; --surface-3: #1F2430;
  --line: #242A36; --line-strong: #333B4A;
  --ink: #F4F5F7; --ink-2: #C9CFDA; --ink-3: #98A2B3; --ink-4: #667085;
  --brand-soft: color-mix(in oklab, var(--brand) 18%, var(--surface));
  --brand-soft-2: color-mix(in oklab, var(--brand) 28%, var(--surface));
  --brand-ink: color-mix(in oklab, var(--brand) 55%, #fff);
  --brand-hover: color-mix(in oklab, var(--brand) 86%, #fff);
  --brand-press: color-mix(in oklab, var(--brand) 74%, #fff);
  --ok: #4ADE9A; --ok-soft: rgba(74,222,154,.12); --warn: #FBBF6A; --warn-soft: rgba(251,191,106,.12); --bad: #FF8A80; --bad-soft: rgba(255,138,128,.12); --info: #7FB2FF; --info-soft: rgba(127,178,255,.12);
  --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 6px 16px -4px rgba(0,0,0,.55); --sh-3: 0 28px 56px -12px rgba(0,0,0,.7);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0C11; --surface: #11141B; --surface-2: #171B24; --surface-3: #1F2430;
    --line: #242A36; --line-strong: #333B4A;
    --ink: #F4F5F7; --ink-2: #C9CFDA; --ink-3: #98A2B3; --ink-4: #667085;
    --brand-soft: color-mix(in oklab, var(--brand) 18%, var(--surface));
    --brand-soft-2: color-mix(in oklab, var(--brand) 28%, var(--surface));
    --brand-ink: color-mix(in oklab, var(--brand) 55%, #fff);
    --brand-hover: color-mix(in oklab, var(--brand) 86%, #fff);
    --brand-press: color-mix(in oklab, var(--brand) 74%, #fff);
    --ok: #4ADE9A; --ok-soft: rgba(74,222,154,.12); --warn: #FBBF6A; --warn-soft: rgba(251,191,106,.12); --bad: #FF8A80; --bad-soft: rgba(255,138,128,.12); --info: #7FB2FF; --info-soft: rgba(127,178,255,.12);
    --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 6px 16px -4px rgba(0,0,0,.55); --sh-3: 0 28px 56px -12px rgba(0,0,0,.7);
  }
}

/* ── 기본 ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--fs-md)/1.55 var(--font); word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { letter-spacing: -.02em; font-weight: 650; line-height: 1.25; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--brand-ink); text-decoration: none; } a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg, video { max-width: 100%; display: block; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }
::selection { background: color-mix(in oklab, var(--brand) 28%, transparent); }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: 16px; height: 16px; } .i-lg { width: 22px; height: 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -48px; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--r); z-index: 200; } .skip:focus { top: 8px; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.muted { color: var(--ink-3); } .mono { font-family: var(--mono); font-size: .92em; }
.t-h1 { font-size: var(--fs-2xl); letter-spacing: -.03em; } .t-h2 { font-size: var(--fs-xl); } .t-h3 { font-size: var(--fs-lg); font-weight: 600; }
.t-sm { font-size: var(--fs-sm); } .t-xs { font-size: var(--fs-xs); }
.row { display: flex; align-items: center; gap: var(--s-3); } .row.wrap { flex-wrap: wrap; } .spread { justify-content: space-between; } .grow { flex: 1 1 0; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: var(--s-4); } .stack-sm { display: flex; flex-direction: column; gap: var(--s-2); }
.grid { display: grid; gap: var(--s-4); } .cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.auto-fit { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
@media (max-width: 960px) { .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: minmax(0, 1fr); } }
.hide { display: none !important; } [hidden] { display: none !important; }

/* ── 버튼 ── */
.btn { --h: var(--ctl-h); display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13.5px; line-height: 1; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform 80ms; box-shadow: var(--sh-1); user-select: none; }
.btn:hover { background: var(--surface-2); text-decoration: none; } .btn:active { transform: translateY(.5px); }
.btn:focus-visible { box-shadow: var(--ring); border-radius: var(--r); }
.btn-primary { background: var(--brand); border-color: color-mix(in oklab, var(--brand) 86%, #000); color: var(--on-brand); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), var(--sh-1); }
.btn-primary:hover { background: var(--brand-hover); } .btn-primary:active { background: var(--brand-press); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); } .btn-ghost:hover { background: var(--surface-3); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: color-mix(in oklab, var(--bad) 40%, var(--line-strong)); } .btn-danger:hover { background: var(--bad-soft); }
.btn-danger-solid { background: var(--bad); color: #fff; border-color: var(--bad); } .btn-danger-solid:hover { background: color-mix(in oklab, var(--bad) 88%, #000); }
.btn-sm { --h: 30px; padding: 0 10px; font-size: 13px; border-radius: var(--r-sm); gap: 6px; } .btn-lg { --h: 44px; padding: 0 20px; font-size: 15px; border-radius: 10px; }
.btn-icon { width: var(--h); padding: 0; } .btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn.is-loading { pointer-events: none; color: transparent !important; position: relative; }
.btn.is-loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid color-mix(in oklab, currentColor 30%, transparent); border-top-color: var(--on-brand); animation: spin .7s linear infinite; }
.btn:not(.btn-primary).is-loading::after { border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }
.link { color: var(--brand-ink); font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; } .link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── 폼 ── */
.field { display: grid; gap: 6px; min-width: 0; align-content: start; } .field-l { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px; }
.field-h { font-size: var(--fs-xs); color: var(--ink-3); } .field-e { font-size: var(--fs-xs); color: var(--bad); display: flex; gap: 6px; align-items: center; }
.input, .select, .textarea { width: 100%; height: var(--ctl-h); padding: 0 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); color: var(--ink); font-size: var(--fs-md); box-shadow: var(--sh-1); transition: border-color var(--dur), box-shadow var(--dur); }
.textarea { height: auto; min-height: 88px; padding: 10px 12px; line-height: 1.55; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); opacity: .85; }
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in oklab, var(--ink) 30%, var(--line-strong)); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--bad); } .input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px color-mix(in oklab, var(--bad) 30%, transparent); }
.input[disabled], .select[disabled], .textarea[disabled] { background: var(--surface-2); color: var(--ink-3); cursor: not-allowed; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2398A2B3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input-wrap { position: relative; } .input-wrap > .i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; } .input-wrap > .input { padding-left: 34px; }
.input-wrap > .kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: var(--fs-md); } .check input { width: 16px; height: 16px; accent-color: var(--brand); margin: 0; cursor: pointer; }
.switch { position: relative; display: inline-flex; width: 38px; height: 22px; flex: none; } .switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line-strong); transition: background var(--dur); } .switch i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform var(--dur) var(--ease); }
.switch input:checked + i { background: var(--brand); } .switch input:checked + i::after { transform: translateX(16px); } .switch input:focus-visible + i { box-shadow: var(--ring); }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: 10px; } .seg label { position: relative; } .seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--ink-3); transition: all var(--dur); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); } .seg input:focus-visible + span { box-shadow: var(--ring); }
.form-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid .full { grid-column: 1 / -1; } @media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ── 표시 요소 ── */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--ok-soft); color: var(--ok); } .badge-warn { background: var(--warn-soft); color: var(--warn); } .badge-bad { background: var(--bad-soft); color: var(--bad); } .badge-info { background: var(--info-soft); color: var(--info); } .badge-brand { background: var(--brand-soft); color: var(--brand-ink); }
.kbd { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; font: 600 12px var(--mono); color: var(--ink-3); background: var(--surface-2); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; }
.avatar { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; background: var(--brand-soft-2); color: var(--brand-ink); } .avatar-sm { width: 24px; height: 24px; font-size: 12px; } .avatar-lg { width: 44px; height: 44px; font-size: 15px; }
.avatar-stack { display: flex; } .avatar-stack .avatar { border: 2px solid var(--surface); margin-left: -8px; } .avatar-stack .avatar:first-child { margin-left: 0; }
.alert { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--r-lg); border: 1px solid; font-size: var(--fs-md); } .alert .i { margin-top: 2px; } .alert b { display: block; font-weight: 650; }
.alert-info { background: var(--info-soft); border-color: color-mix(in oklab, var(--info) 22%, transparent); color: var(--ink-2); } .alert-info .i { color: var(--info); }
.alert-ok { background: var(--ok-soft); border-color: color-mix(in oklab, var(--ok) 22%, transparent); color: var(--ink-2); } .alert-ok .i { color: var(--ok); }
.alert-warn { background: var(--warn-soft); border-color: color-mix(in oklab, var(--warn) 25%, transparent); color: var(--ink-2); } .alert-warn .i { color: var(--warn); }
.alert-bad { background: var(--bad-soft); border-color: color-mix(in oklab, var(--bad) 25%, transparent); color: var(--ink-2); } .alert-bad .i { color: var(--bad); }
.meter { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; } .meter > i { display: block; height: 100%; border-radius: inherit; background: var(--brand); transition: width .4s var(--ease); } .meter.is-warn > i { background: var(--warn); } .meter.is-bad > i { background: var(--bad); }
.skel { display: block; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; min-height: 12px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 56px 24px; } .empty-ic { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--surface-3); color: var(--ink-3); } .empty-ic .i { width: 22px; height: 22px; }
.empty h3 { font-size: var(--fs-lg); } .empty p { max-width: 380px; color: var(--ink-3); }
[data-tip] { position: relative; } [data-tip]::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%) translateY(2px); background: var(--ink); color: var(--bg); font: 500 12px/1.3 var(--font); padding: 6px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity var(--dur), transform var(--dur); z-index: 80; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translateX(-50%); }
[data-tip-side="right"]::after { left: calc(100% + 8px); bottom: auto; top: 50%; transform: translateY(-50%); } [data-tip-side="right"]:hover::after { transform: translateY(-50%); }

/* ── 카드 · 표 ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); } .card-h h2, .card-h h3 { font-size: var(--fs-lg); font-weight: 650; } .card-h p { font-size: var(--fs-sm); color: var(--ink-3); }
.card-b { padding: 20px; } .card-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.card-link { transition: border-color var(--dur), box-shadow var(--dur), transform var(--dur); } .card-link:hover { border-color: var(--line-strong); box-shadow: var(--sh-2); }
.stat { padding: 18px 20px; display: grid; gap: 4px; } .stat-l { font-size: var(--fs-sm); color: var(--ink-3); font-weight: 500; display: flex; align-items: center; justify-content: space-between; } .stat-v { font-size: 28px; font-weight: 650; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.delta { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; } .delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
.table-wrap { overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); max-width: 100%; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); text-align: left; font-weight: 600; font-size: 12.5px; color: var(--ink-3); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; } .table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--dur); } .table tbody tr:hover td { background: var(--surface-2); } .table tr[aria-selected="true"] td { background: var(--brand-soft); }
.table .r { text-align: right; } .table .c { text-align: center; } .table .w-check { width: 44px; padding-right: 0; } .table .nowrap { white-space: nowrap; }
.cell-main { display: flex; align-items: center; gap: 12px; min-width: 0; } .cell-main b { display: block; font-weight: 600; } .cell-main small { display: block; color: var(--ink-3); font-size: 12.5px; }
.row-actions { opacity: 0; transition: opacity var(--dur); } .table tr:hover .row-actions, .table tr:focus-within .row-actions { opacity: 1; } @media (hover: none) { .row-actions { opacity: 1; } }
.th-sort { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; } .th-sort:hover { color: var(--ink); }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; } .toolbar .input-wrap { width: min(320px, 100%); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line-strong); font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; } .chip:hover { background: var(--surface-2); } .chip.is-on { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-ink); }
.bulkbar { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; margin-bottom: 12px; border-radius: var(--r-lg); background: var(--ink); color: var(--bg); font-size: 13.5px; font-weight: 600; } .bulkbar .btn { background: transparent; color: var(--bg); border-color: color-mix(in oklab, var(--bg) 30%, transparent); box-shadow: none; } .bulkbar .btn:hover { background: color-mix(in oklab, var(--bg) 14%, transparent); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 4px; font-size: var(--fs-sm); color: var(--ink-3); }
.kv { display: grid; grid-template-columns: minmax(110px, 160px) 1fr; gap: 12px 16px; font-size: var(--fs-md); } .kv dt { color: var(--ink-3); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.tl { list-style: none; margin: 0; padding: 0; display: grid; } .tl li { position: relative; display: grid; grid-template-columns: 20px 1fr; gap: 12px; padding-bottom: 18px; } .tl li::before { content: ""; position: absolute; left: 9px; top: 20px; bottom: 0; width: 1px; background: var(--line); } .tl li:last-child::before { display: none; } .tl .dot { width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; color: var(--ink-3); border: 1px solid var(--line-strong); } .tl .dot .i { width: 11px; height: 11px; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--ink-3); min-width: 0; } .crumbs a { color: var(--ink-3); } .crumbs a:hover { color: var(--ink); text-decoration: none; } .crumbs [aria-current] { color: var(--ink); font-weight: 600; } .crumbs .i { width: 14px; height: 14px; opacity: .6; }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; } .tab { position: relative; padding: 10px 2px; background: none; border: 0; font-weight: 600; font-size: var(--fs-md); color: var(--ink-3); cursor: pointer; white-space: nowrap; } .tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); } .tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brand); border-radius: 2px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; } .checklist li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r); } .checklist li:hover { background: var(--surface-2); }
.checklist .tick { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; color: transparent; } .checklist .is-done .tick { background: var(--brand); border-color: var(--brand); color: var(--on-brand); } .checklist .is-done .t { color: var(--ink-3); }
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; gap: 6px; height: 160px; } .bars span { display: block; border-radius: 4px 4px 0 0; background: var(--brand-soft-2); min-height: 4px; transition: background var(--dur); position: relative; } .bars span:hover { background: var(--brand); } .bars span.is-hi { background: var(--brand); }
.axis { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; margin-top: 8px; font-size: 11.5px; color: var(--ink-3); text-align: center; }
.spark { width: 100%; height: 40px; } .spark path { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } .spark .area { fill: var(--brand-soft); stroke: none; }

/* ── 메뉴 · 모달 · 서랍 · 토스트 · 명령 팔레트 ── */
.pop { position: relative; display: inline-block; }
.menu { position: absolute; z-index: 60; top: calc(100% + 6px); right: 0; min-width: 210px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--sh-2); display: none; } .menu.is-left { right: auto; left: 0; } .menu.is-up { top: auto; bottom: calc(100% + 6px); }
.menu[data-open] { display: block; animation: pop .14s var(--ease); } @keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 6px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); text-align: left; cursor: pointer; text-decoration: none; } .menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); color: var(--ink); text-decoration: none; box-shadow: none; } .menu-item.is-bad { color: var(--bad); } .menu-item .kbd { margin-left: auto; }
.menu-sep { height: 1px; margin: 4px; background: var(--line); } .menu-label { padding: 8px 10px 4px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.scrim { position: fixed; inset: 0; z-index: 70; background: rgba(8,10,16,.52); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .18s; } .scrim[data-open] { opacity: 1; pointer-events: auto; }
.modal { position: fixed; z-index: 71; left: 50%; top: 50%; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--sh-3); transform: translate(-50%, -46%) scale(.98); opacity: 0; pointer-events: none; visibility: hidden; transition: transform .2s var(--ease), opacity .2s, visibility 0s .2s; } .modal[data-open] { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.modal-h { padding: 20px 24px 0; } .modal-h h2 { font-size: 18px; } .modal-h p { color: var(--ink-3); margin-top: 4px; } .modal-b { padding: 16px 24px; } .modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px 20px; }
.drawer { position: fixed; z-index: 71; right: 0; top: 0; bottom: 0; width: min(480px, 100vw); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--line); box-shadow: none; transform: translateX(100%); visibility: hidden; transition: transform .24s var(--ease), box-shadow .24s, visibility 0s .24s; } .drawer[data-open] { transform: none; visibility: visible; box-shadow: var(--sh-3); transition-delay: 0s; }
.drawer-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); } .drawer-b { flex: 1; overflow: auto; padding: 20px; } .drawer-f { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); }
#toasts { position: fixed; z-index: 120; right: 16px; bottom: 16px; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--ink); color: var(--bg); border-radius: 12px; box-shadow: var(--sh-3); font-size: 13.5px; animation: toast-in .24s var(--ease); } .toast .i { margin-top: 1px; } .toast b { display: block; font-weight: 650; } .toast span { opacity: .8; } .toast.is-ok .i { color: #4ADE9A; } .toast.is-bad .i { color: #FF8A80; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.cmdk-wrap { position: fixed; inset: 0; z-index: 90; display: none; align-items: flex-start; justify-content: center; padding-top: 14vh; background: rgba(8,10,16,.5); backdrop-filter: blur(3px); } .cmdk-wrap[data-open] { display: flex; }
.cmdk { width: min(600px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--sh-3); overflow: hidden; animation: pop .16s var(--ease); }
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--ink-3); } .cmdk-in input { flex: 1; height: 52px; border: 0; background: none; outline: none; box-shadow: none !important; font-size: 15px; color: var(--ink); } .cmdk-in input::placeholder { color: var(--ink-3); }
.cmdk-list { max-height: 340px; overflow: auto; padding: 6px; } .cmdk-g { padding: 10px 10px 4px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--ink-2); } .cmdk-item[aria-selected="true"] { background: var(--brand-soft); color: var(--brand-ink); } .cmdk-item small { margin-left: auto; color: var(--ink-3); } .cmdk-empty { padding: 28px; text-align: center; color: var(--ink-3); }
.cmdk-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: 12px; color: var(--ink-3); }

/* ── 앱 셸: 사이드바 · 상단 바 · 페이지 ── */
.app { display: grid; grid-template-columns: var(--sb-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .2s var(--ease); }
.sb { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 12px 10px 10px; background: var(--surface); border-right: 1px solid var(--line); z-index: 30; min-width: 0; }
.ws { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; background: none; border-radius: 10px; cursor: pointer; text-align: left; } .ws:hover { background: var(--surface-2); }
.logo-mark { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; color: var(--on-brand); background: linear-gradient(140deg, color-mix(in oklab, var(--brand) 78%, #fff), var(--brand) 55%, color-mix(in oklab, var(--brand) 78%, #000)); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 1px 2px rgba(0,0,0,.2); } .logo-mark .i { width: 16px; height: 16px; stroke-width: 2.2; }
.ws b { display: block; font-size: 14px; font-weight: 650; line-height: 1.2; letter-spacing: -.01em; } .ws small { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.2; } .ws > .i:last-child { margin-left: auto; color: var(--ink-3); width: 16px; height: 16px; }
.sb-search { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; margin: 2px 0 6px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--ink-3); font-size: 13.5px; cursor: pointer; box-shadow: var(--sh-1); width: 100%; } .sb-search:hover { background: var(--surface-2); } .sb-search .kbd { margin-left: auto; }
.sb-nav { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; padding-right: 2px; scrollbar-width: thin; }
.sb-label { padding: 14px 10px 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .01em; color: var(--ink-3); } .sb-label:first-child { padding-top: 4px; }
.sb-item { position: relative; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: var(--r); color: var(--ink-2); font-size: 13.5px; font-weight: 500; text-decoration: none; transition: background var(--dur), color var(--dur); min-width: 0; } .sb-item .i { color: var(--ink-3); transition: color var(--dur); }
.sb-item:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; } .sb-item:hover .i { color: var(--ink-2); }
.sb-item[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); font-weight: 650; } .sb-item[aria-current="page"] .i { color: var(--brand); }
.sb-item:focus-visible { box-shadow: var(--ring); }
.sb-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sb-count { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--ink-3); background: var(--surface-3); padding: 1px 7px; border-radius: 99px; } .sb-item[aria-current="page"] .sb-count { background: var(--brand-soft-2); color: var(--brand-ink); } .sb-count.is-hot { background: var(--brand); color: var(--on-brand); }
.sb-sub { display: grid; gap: 1px; margin: 1px 0 4px 20px; padding-left: 12px; border-left: 1px solid var(--line); } .sb-sub .sb-item { height: 30px; font-size: 13px; }
.sb-foot { display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.usage { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); font-size: 12.5px; } .usage .row { justify-content: space-between; } .usage b { font-weight: 650; font-variant-numeric: tabular-nums; } .usage a { font-weight: 600; }
.sb-user { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; background: none; border-radius: 10px; cursor: pointer; text-align: left; } .sb-user:hover { background: var(--surface-2); } .sb-user b { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.2; } .sb-user small { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.2; } .sb-user > .i:last-child { margin-left: auto; color: var(--ink-3); width: 16px; height: 16px; }
.sb-toggle { position: absolute; right: -12px; top: 22px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-3); display: grid; place-items: center; cursor: pointer; box-shadow: var(--sh-1); opacity: 0; transition: opacity var(--dur); z-index: 2; } .sb:hover .sb-toggle, .sb-toggle:focus-visible { opacity: 1; } .sb-toggle .i { width: 14px; height: 14px; transition: transform .2s; }
html[data-sb="collapsed"] .app { --sb-w: 64px; } html[data-sb="collapsed"] .sb { padding-inline: 8px; } html[data-sb="collapsed"] .sb-text, html[data-sb="collapsed"] .sb-label, html[data-sb="collapsed"] .sb-count, html[data-sb="collapsed"] .sb-sub, html[data-sb="collapsed"] .ws > .t-col, html[data-sb="collapsed"] .ws > .i, html[data-sb="collapsed"] .usage, html[data-sb="collapsed"] .sb-user > .t-col, html[data-sb="collapsed"] .sb-user > .i, html[data-sb="collapsed"] .sb-search > .t-col, html[data-sb="collapsed"] .sb-search > .kbd { display: none; }
html[data-sb="collapsed"] .sb-item, html[data-sb="collapsed"] .ws, html[data-sb="collapsed"] .sb-search, html[data-sb="collapsed"] .sb-user { justify-content: center; padding-inline: 0; } html[data-sb="collapsed"] .sb-toggle .i { transform: rotate(180deg); } html[data-sb="collapsed"] .sb-nav { overflow: visible; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 clamp(16px, 3vw, 32px); background: color-mix(in oklab, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top .btn-icon { --h: 34px; } .top-search { width: min(280px, 30vw); } .top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.dotmark { position: relative; } .dotmark::after { content: ""; position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); border: 2px solid var(--bg); }
.page { width: 100%; max-width: var(--page-w, 1200px); margin: 0 auto; padding: 28px clamp(16px, 3vw, 32px) 72px; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; } .page-h h1 { font-size: var(--fs-2xl); letter-spacing: -.03em; } .page-h p { margin-top: 4px; color: var(--ink-3); } .page-h .row { flex: none; }
.section { margin-top: 32px; } .section-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; } .section-h h2 { font-size: var(--fs-lg); }
.menu-btn { display: none; }
.sb-scrim { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sb { position: fixed; inset: 0 auto 0 0; width: min(288px, 86vw); transform: translateX(-102%); visibility: hidden; transition: transform .24s var(--ease), box-shadow .24s, visibility 0s .24s; box-shadow: none; z-index: 80; }
  html[data-sb-open] .sb { transform: none; visibility: visible; box-shadow: var(--sh-3); transition-delay: 0s; } html[data-sb-open] .sb-scrim { display: block; position: fixed; inset: 0; z-index: 75; background: rgba(8,10,16,.5); }
  .menu-btn { display: inline-flex; } .sb-toggle { display: none; } .top-search { display: none; }
  html[data-sb="collapsed"] .app { --sb-w: 248px; } html[data-sb="collapsed"] .sb-text, html[data-sb="collapsed"] .sb-label, html[data-sb="collapsed"] .sb-count, html[data-sb="collapsed"] .ws > .t-col, html[data-sb="collapsed"] .ws > .i, html[data-sb="collapsed"] .usage, html[data-sb="collapsed"] .sb-user > .t-col, html[data-sb="collapsed"] .sb-user > .i, html[data-sb="collapsed"] .sb-search > .t-col, html[data-sb="collapsed"] .sb-search > .kbd { display: revert; }
  html[data-sb="collapsed"] .sb-item, html[data-sb="collapsed"] .ws, html[data-sb="collapsed"] .sb-search, html[data-sb="collapsed"] .sb-user { justify-content: flex-start; padding-inline: 10px; }
  .page { padding-top: 20px; } .table-wrap { border-radius: var(--r); }
}
@media (max-width: 640px) { .hide-m { display: none !important; } .table th, .table td { padding-inline: 10px; } .table .w-check { width: 34px; } .cell-main { gap: 10px; } .cell-main > span:last-child, .cell-main > div { min-width: 0; } .cell-main b, .cell-main small { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .page-h h1 { font-size: 24px; } .stat-v { font-size: 24px; } .modal { width: calc(100vw - 24px); } .toolbar .input-wrap { width: 100%; } .kv { grid-template-columns: 1fr; gap: 2px 0; } .kv dd { margin-bottom: 10px; } }
@media print { .sb, .top, .scrim, #toasts { display: none !important; } .app { display: block; } }
