/* EO팀 업무관리 툴 — 디자인 시스템 */
:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #eef1f5;
  --border: #e3e7ee;
  --border-strong: #cfd6e0;
  --text: #101828;
  --text-2: #475467;
  --muted: #7a8494;
  --accent: #2a78d6;
  --accent-ink: #1c5cab;
  --accent-weak: #e8f1fc;
  --accent-weak-2: #d5e6fa;
  --sidebar: #0f1b2d;
  --sidebar-2: #16263d;
  --sidebar-text: #c8d3e3;
  --sidebar-muted: #7e8ea6;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 4px 16px rgba(16, 24, 40, .08);
  --shadow-lg: 0 18px 48px rgba(16, 24, 40, .18);
  --radius: 10px;
  --radius-sm: 7px;
  /* 차트 (검증된 참조 팔레트, 고정 순서) */
  --chart-surface: #ffffff;
  --grid: #e9ebef;
  --axis: #c3c2b7;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  /* 상태 (고정, 아이콘+라벨과 함께) */
  --good: #0ca30c; --warning: #fab219; --serious: #ec835a; --critical: #d03b3b;
  --good-ink: #067a06; --critical-ink: #b42828; --warning-ink: #8a5a00;
  --good-bg: #e6f6e6; --warning-bg: #fff4d6; --serious-bg: #fdeee7; --critical-bg: #fbe7e7;
  /* 멸균 유형 */
  --k-daily: #2a78d6; --k-daily-bg: #e6f0fc;
  --k-val: #008300; --k-val-bg: #e3f4e3;
  --k-test: #7b61c9; --k-test-bg: #efebfa;
  --k-rec: #c9a400; --k-rec-bg: #fff7b3;
  --k-perf: #e07b00; --k-perf-bg: #ffe2bf;
  --k-fail: #6b6b6b; --k-fail-bg: #ececec;
  /* 히트맵 (파랑 단일 색상 순차) */
  --h0: #f1f4f8; --h1: #cde2fb; --h2: #9ec5f4; --h3: #5598e7; --h4: #256abf; --h5: #104281;
  --font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #0e1116; --surface: #161a21; --surface-2: #1b2029; --surface-3: #222833;
    --border: #2a313d; --border-strong: #3a4352; --text: #eef1f5; --text-2: #c2c9d4; --muted: #8b95a5;
    --accent: #3987e5; --accent-ink: #86b6ef; --accent-weak: #172a42; --accent-weak-2: #1d3656;
    --sidebar: #0a0f17; --sidebar-2: #121a26;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 4px 16px rgba(0,0,0,.4); --shadow-lg: 0 18px 48px rgba(0,0,0,.6);
    --chart-surface: #161a21; --grid: #262c36; --axis: #3a4352;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
    --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
    --good-ink: #3ccf3c; --critical-ink: #f08080; --warning-ink: #fab219;
    --good-bg: #13301a; --warning-bg: #3a2f10; --serious-bg: #3b2418; --critical-bg: #3b1a1a;
    --k-daily: #5598e7; --k-daily-bg: #172a42; --k-val: #2fb32f; --k-val-bg: #142e17;
    --k-test: #a596ef; --k-test-bg: #2a2440; --k-rec: #f2d230; --k-rec-bg: #3d3608; --k-perf: #ff9b2e; --k-perf-bg: #432a0c; --k-fail: #a0a0a0; --k-fail-bg: #2a2a2a;
    --h0: #1d232d; --h1: #184f95; --h2: #1c5cab; --h3: #2a78d6; --h4: #6da7ec; --h5: #b7d3f6;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1116; --surface: #161a21; --surface-2: #1b2029; --surface-3: #222833;
  --border: #2a313d; --border-strong: #3a4352; --text: #eef1f5; --text-2: #c2c9d4; --muted: #8b95a5;
  --accent: #3987e5; --accent-ink: #86b6ef; --accent-weak: #172a42; --accent-weak-2: #1d3656;
  --sidebar: #0a0f17; --sidebar-2: #121a26;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 4px 16px rgba(0,0,0,.4); --shadow-lg: 0 18px 48px rgba(0,0,0,.6);
  --chart-surface: #161a21; --grid: #262c36; --axis: #3a4352;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --good-ink: #3ccf3c; --critical-ink: #f08080; --warning-ink: #fab219;
  --good-bg: #13301a; --warning-bg: #3a2f10; --serious-bg: #3b2418; --critical-bg: #3b1a1a;
  --k-daily: #5598e7; --k-daily-bg: #172a42; --k-val: #2fb32f; --k-val-bg: #142e17;
  --k-test: #a596ef; --k-test-bg: #2a2440; --k-rec: #f2d230; --k-rec-bg: #3d3608; --k-perf: #ff9b2e; --k-perf-bg: #432a0c; --k-fail: #a0a0a0; --k-fail-bg: #2a2a2a;
  --h0: #1d232d; --h1: #184f95; --h2: #1c5cab; --h3: #2a78d6; --h4: #6da7ec; --h5: #b7d3f6;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 650; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.spacer { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.ic.sm { width: 15px; height: 15px; }

/* ---------- 레이아웃 */
.app { display: grid; grid-template-columns: 236px 1fr; height: 100vh; }
.app.collapsed { grid-template-columns: 64px 1fr; }
.sidebar { background: var(--sidebar); color: var(--sidebar-text); display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px; color: #fff; font-weight: 700; font-size: 15px; white-space: nowrap; }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #3987e5, #1baf7a); display: grid; place-items: center; font-size: 13px; flex: none; }
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--sidebar-muted); }
.nav { padding: 6px 10px 16px; display: flex; flex-direction: column; gap: 1px; }
.nav .sec { font-size: 11px; color: var(--sidebar-muted); padding: 14px 10px 6px; letter-spacing: .04em; white-space: nowrap; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: var(--sidebar-text); white-space: nowrap; text-decoration: none; position: relative; }
.nav a:hover { background: var(--sidebar-2); color: #fff; }
.nav a.active { background: #1f3555; color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: #5598e7; }
.nav a .count { margin-left: auto; background: #2b3e5a; color: #dce6f5; font-size: 11px; padding: 0 7px; border-radius: 10px; }
.nav a .lock { margin-left: auto; opacity: .6; }
.app.collapsed .nav a span, .app.collapsed .nav .sec, .app.collapsed .brand .bt, .app.collapsed .nav a .count, .app.collapsed .nav a .lock { display: none; }
.app.collapsed .nav a { justify-content: center; }
.nav-collapse { margin: auto 10px 0; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--sidebar-muted); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.nav-collapse:hover { background: var(--sidebar-2); color: #fff; }
.nav-collapse .ar { width: 18px; text-align: center; font-size: 16px; line-height: 1; transition: transform .15s; }
.app.collapsed .nav-collapse { justify-content: center; }
.app.collapsed .nav-collapse .ar { transform: rotate(180deg); }
.app.collapsed .nav-collapse .lb, .app.collapsed .sidebar .foot { display: none; }
.app { transition: grid-template-columns .16s ease; }
.sidebar .foot { padding: 8px 16px 12px; font-size: 11px; color: var(--sidebar-muted); white-space: nowrap; }
.bottomnav { display: none; }
.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.topbar { height: 58px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.searchbox { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); width: min(420px, 40vw); cursor: text; }
.searchbox kbd { margin-left: auto; }
kbd { font-family: inherit; font-size: 11px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; color: var(--muted); background: var(--surface); }
.content { flex: 1; overflow: auto; padding: 22px 26px 60px; }
.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.avatars { display: flex; }
.av { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; vertical-align: middle; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: var(--s1); border: 2px solid var(--surface); margin-left: -6px; flex: none; }
.av.lg { width: 36px; height: 36px; font-size: 13px; margin: 0; }
.av.sm { width: 22px; height: 22px; font-size: 10px; margin: 0; border-width: 1px; }
.iconbtn { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--text-2); position: relative; }
.iconbtn:hover { background: var(--surface-3); }
.iconbtn .dot { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--critical); color: #fff; font-size: 10px; display: grid; place-items: center; padding: 0 4px; font-weight: 700; }

/* ---------- 기본 컴포넌트 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 13px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 550; white-space: nowrap; color: var(--text); }
.btn:hover { background: var(--surface-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--critical-ink); border-color: var(--critical); background: var(--surface); }
.btn.danger:hover { background: var(--critical-bg); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 12.5px; border-radius: 7px; }
.btn:disabled { opacity: .5; cursor: default; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 7px; cursor: pointer; color: var(--text-2); font-weight: 550; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.input, select.input, textarea.input { height: 34px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); width: 100%; outline: none; }
textarea.input { height: auto; min-height: 80px; padding: 8px 10px; resize: vertical; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak-2); }
.input.sm { height: 30px; font-size: 13px; }
label.fld { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--text-2); font-weight: 550; }
label.chk { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card > .hd { display: flex; align-items: center; gap: 8px; padding: 13px 16px 0; }
.card > .hd h3 { font-size: 14.5px; }
.card > .bd { padding: 12px 16px 16px; }
.card.pad { padding: 16px; }
.grid { display: grid; gap: 16px; }
.grid > *, .cards > * { min-width: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.span2 { grid-column: span 2; }
@media (max-width: 1200px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .span2 { grid-column: auto; } .app { grid-template-columns: 64px 1fr; } .content { padding: 16px; } .form-grid { grid-template-columns: 1fr; } }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.pill .d { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.blue { background: var(--accent-weak); color: var(--accent-ink); }
.pill.good { background: var(--good-bg); color: var(--good-ink); }
.pill.warn { background: var(--warning-bg); color: var(--warning-ink); }
.pill.serious { background: var(--serious-bg); color: #b4531f; }
.pill.crit { background: var(--critical-bg); color: var(--critical-ink); }
.pill.gray { background: var(--surface-3); color: var(--muted); }
:root[data-theme="dark"] .pill.serious { color: var(--serious); }
.tag { display: inline-block; font-size: 11.5px; padding: 1px 7px; border-radius: 5px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 9px 14px; cursor: pointer; color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tabs button.on { color: var(--accent-ink); border-bottom-color: var(--accent); }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.notice-bar { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 9px; background: var(--warning-bg); color: var(--text); font-size: 13px; margin-bottom: 14px; }
.notice-bar.info { background: var(--accent-weak); }
.notice-bar.crit { background: var(--critical-bg); }
.progress { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.card .bd, .card.pad { min-width: 0; overflow-wrap: anywhere; }
hr.sep { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }

/* ---------- 표 */
.tbl-wrap { overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); max-height: calc(100vh - 230px); }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.tbl th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); text-align: left; font-weight: 650; color: var(--text-2); padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; cursor: pointer; user-select: none; }
.tbl th.nosort { cursor: default; }
.tbl th .arr { color: var(--accent); margin-left: 3px; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl tbody tr.click { cursor: pointer; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.wrap { white-space: normal; min-width: 200px; }
.tbl td .inline-sel { height: 26px; border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 0 4px; cursor: pointer; }
.tbl td .inline-sel:hover { border-color: var(--border-strong); background: var(--surface); }
.tbl tfoot td { font-weight: 700; background: var(--surface-2); position: sticky; bottom: 0; }
.tbl tr.over td:first-child { box-shadow: inset 3px 0 0 var(--critical); }

/* ---------- 칸반 / 카드 */
.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; min-height: 300px; }
.lane { flex: 0 0 290px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 220px); }
.lane .lh { display: flex; align-items: center; gap: 8px; padding: 11px 12px 8px; font-weight: 700; font-size: 13.5px; }
.lane .lh .n { color: var(--muted); font-weight: 600; }
.lane .lb { padding: 4px 10px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.lane.drop { outline: 2px dashed var(--accent); outline-offset: -4px; background: var(--accent-weak); }
.kcard { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 10px 11px; box-shadow: var(--shadow-sm); cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.kcard:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.kcard.dragging { opacity: .5; }
.kcard .t { font-weight: 600; font-size: 13.5px; line-height: 1.35; word-break: break-all; }
.kcard .m { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.kcard.over { border-left: 3px solid var(--critical); }
.lane .more { text-align: center; font-size: 12px; color: var(--muted); padding: 4px; }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ---------- 지표 타일 */
.kpi { padding: 15px 16px; display: flex; flex-direction: column; gap: 4px; min-height: 108px; position: relative; }
.kpi .lbl { color: var(--text-2); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi .val { font-size: 28px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.kpi .val small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.kpi .dl { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.kpi .dl .up { color: var(--good-ink); font-weight: 650; }
.kpi .dl .down { color: var(--critical-ink); font-weight: 650; }
.kpi.link { cursor: pointer; }
.kpi.link:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.kpi .spark { position: absolute; right: 14px; bottom: 14px; }
.hero { font-size: 48px; font-weight: 750; letter-spacing: -.02em; line-height: 1; }

/* ---------- 차트 */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .gl { stroke: var(--grid); stroke-width: 1; }
.chart .bl { stroke: var(--axis); stroke-width: 1; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart text.lbl2 { fill: var(--text-2); font-weight: 600; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover { fill: var(--text); fill-opacity: .04; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); margin-bottom: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.tip { position: fixed; z-index: 1000; pointer-events: none; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: 8px; padding: 8px 10px; font-size: 12px; min-width: 120px; max-width: 280px; }
.tip .tt { font-weight: 700; margin-bottom: 4px; color: var(--text); }
.tip .tr { display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.tip .tr b { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; padding-left: 10px; }
.tip .tr i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.bars-h { display: flex; flex-direction: column; gap: 8px; }
.bars-h .r { display: grid; grid-template-columns: 110px 1fr 60px; align-items: center; gap: 10px; font-size: 12.5px; }
.bars-h .r .tr2 { height: 12px; background: var(--surface-3); border-radius: 0 4px 4px 0; overflow: hidden; }
.bars-h .r .tr2 i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--s1); }
.bars-h .r .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.stackbar { display: flex; height: 12px; border-radius: 4px; overflow: hidden; gap: 2px; background: var(--surface); }
.stackbar i { display: block; height: 100%; }
.heat { display: grid; gap: 2px; font-size: 11px; }
.heat .c { height: 22px; border-radius: 3px; background: var(--h0); }
.heat .c.l1 { background: var(--h1); } .heat .c.l2 { background: var(--h2); } .heat .c.l3 { background: var(--h3); } .heat .c.l4 { background: var(--h4); } .heat .c.l5 { background: var(--h5); }
.heat .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 6px; align-self: center; color: var(--text-2); font-weight: 600; }
.heat .dh { text-align: center; color: var(--muted); }
.heat .dh.we { color: var(--critical-ink); }

/* ---------- 멸균 캘린더 */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--border); gap: 1px; }
.cal .dow { background: var(--surface-2); padding: 7px 8px; font-weight: 700; font-size: 12px; color: var(--text-2); text-align: center; }
.cal .dow.sun { color: var(--critical-ink); }
.cal .dow.sat { color: var(--accent-ink); }
.cal .day { background: var(--surface); min-height: 128px; padding: 5px 5px 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; cursor: pointer; }
.cal .day:hover { background: var(--surface-2); }
.cal .day.out { background: var(--surface-2); }
.cal .day.out .dn { color: var(--muted); }
.cal .day.today .dn b { background: var(--accent); color: #fff; border-radius: 12px; padding: 0 7px; }
.cal .day.drop { outline: 2px dashed var(--accent); outline-offset: -3px; }
.cal .dn { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; }
.cal .dn .hol { color: var(--critical-ink); font-weight: 600; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .dn .cnt { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: 600; }
.cal .day.weekend .dn > b { color: var(--critical-ink); }
.chip { display: flex; align-items: center; gap: 4px; font-size: 11.5px; line-height: 1.3; padding: 2px 5px; border-radius: 5px; background: var(--k-daily-bg); border-left: 3px solid var(--k-daily); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; min-width: 0; }
.chip > span.tx { overflow: hidden; text-overflow: ellipsis; }
.chip.k-밸리데이션 { background: var(--k-val-bg); border-left-color: var(--k-val); }
.chip.k-테스트 { background: var(--k-test-bg); border-left-color: var(--k-test); }
.chip.k-기록 { background: var(--k-rec-bg); border-left-color: var(--k-rec); }
.chip.k-수행 { background: var(--k-perf-bg); border-left-color: var(--k-perf); }
.chip.k-Fail { background: var(--k-fail-bg); border-left-color: var(--k-fail); text-decoration: line-through; }
/* 표의 유형 칸: 셀 전체를 유형 색으로 (기록=노랑, 수행=주황) */
.kindcell { display: block; margin: -8px -10px; padding: 8px 10px; font-weight: 650; font-size: 12.5px; }
.kc-daily { background: var(--k-daily-bg); } .kc-val { background: var(--k-val-bg); }
.kc-rec { background: var(--k-rec-bg); } .kc-perf { background: var(--k-perf-bg); }
.kc-test { background: var(--k-test-bg); } .kc-fail { background: var(--k-fail-bg); text-decoration: line-through; }
.chip.st-취소 { opacity: .45; text-decoration: line-through; }
.chip .ch { font-size: 10px; font-weight: 700; color: var(--text-2); flex: none; }
.chip .ok { color: var(--good-ink); flex: none; font-weight: 700; }
.chip:hover { filter: brightness(.96); }
.chip.dragging { opacity: .4; }
.cal .more { font-size: 11px; color: var(--accent-ink); font-weight: 600; padding: 0 4px; }
.cal .memo { font-size: 11px; color: var(--warning-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 3px; }
.cal .roster { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 3px; }
.legend-kinds { display: flex; gap: 12px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; align-items: center; }
.legend-kinds span { display: inline-flex; align-items: center; gap: 5px; }
.legend-kinds i { width: 12px; height: 12px; border-radius: 3px; border-left: 3px solid; }
/* 주간 보기 (기존 엑셀 배치) */
.week { display: grid; grid-template-columns: 64px repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); background: var(--border); gap: 1px; overflow: hidden; }
.week > div { background: var(--surface); padding: 6px; min-width: 0; }
.week .wh { background: var(--surface-2); font-weight: 700; text-align: center; font-size: 12.5px; padding: 8px 4px; }
.week .wh.today { background: var(--accent-weak); color: var(--accent-ink); }
.week .slot { background: var(--surface-2); font-weight: 700; font-size: 12px; color: var(--text-2); display: grid; place-items: center; }
.week .cell { display: flex; flex-direction: column; gap: 3px; min-height: 70px; }
.week .chip { white-space: normal; align-items: flex-start; }
.week .chip > span.tx { overflow: visible; }
.tabs { scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.week .cell.drop { outline: 2px dashed var(--accent); outline-offset: -3px; }
.week .addbtn { opacity: 0; font-size: 11px; color: var(--accent-ink); cursor: pointer; border: 1px dashed var(--border-strong); border-radius: 5px; text-align: center; padding: 1px; background: transparent; }
.week .cell:hover .addbtn { opacity: 1; }
.week .rost { font-size: 12px; color: var(--text-2); cursor: pointer; border-radius: 5px; padding: 2px 4px; min-height: 22px; }
.week .rost:hover { background: var(--surface-3); }
.week .rost .h { color: var(--muted); font-size: 11px; display: block; }

/* ---------- 간트 / 타임라인 */
.gantt { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: auto; max-height: calc(100vh - 240px); position: relative; }
.gantt .gh, .gantt .gr { display: grid; grid-template-columns: var(--lw, 260px) 1fr; }
.gantt .gh { position: sticky; top: 0; z-index: 2; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.gantt .gl2 { padding: 8px 12px; font-size: 12.5px; border-right: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: sticky; left: 0; background: inherit; z-index: 1; }
.gantt .gr { border-bottom: 1px solid var(--border); background: var(--surface); }
.gantt .gr:hover { background: var(--surface-2); }
.gantt .track { position: relative; height: 36px; }
.gantt .months { position: relative; height: 34px; }
.gantt .months span { position: absolute; top: 0; height: 100%; border-left: 1px solid var(--border); font-size: 11.5px; color: var(--muted); padding: 8px 6px; white-space: nowrap; }
.gantt .bar { position: absolute; top: 10px; height: 16px; border-radius: 4px; background: var(--s1); cursor: pointer; overflow: hidden; }
.gantt .bar i { position: absolute; inset: 0 auto 0 0; background: rgba(255,255,255,.35); }
.gantt .bar.over { background: var(--critical); }
.gantt .dot { position: absolute; top: 12px; width: 12px; height: 12px; transform: rotate(45deg); background: var(--s2); border: 2px solid var(--surface); }
.gantt .todayline { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--critical); opacity: .65; z-index: 1; pointer-events: none; }
.gantt .vline { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--grid); }

/* ---------- 모달 / 드로어 / 토스트 */
.overlay { position: fixed; inset: 0; background: rgba(10, 16, 28, .42); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; animation: fade .12s; }
.modal { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); width: min(640px, 100%); display: flex; flex-direction: column; animation: pop .14s; }
.modal.wide { width: min(920px, 100%); }
.modal .mh { display: flex; align-items: center; gap: 10px; padding: 16px 20px 12px; border-bottom: 1px solid var(--border); }
.modal .mb { padding: 16px 20px; max-height: 70vh; overflow-y: auto; }
.modal .mf { display: flex; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--border); align-items: center; }
.drawer-ov { position: fixed; inset: 0; background: rgba(10, 16, 28, .3); z-index: 90; animation: fade .12s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 100vw); background: var(--surface); box-shadow: var(--shadow-lg); z-index: 91; display: flex; flex-direction: column; animation: slide .16s; }
.drawer .dh { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.drawer .db { flex: 1; overflow-y: auto; padding: 18px 20px 40px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #1d2939; color: #fff; padding: 10px 16px; border-radius: 9px; box-shadow: var(--shadow-lg); font-size: 13.5px; animation: pop .15s; display: flex; gap: 10px; align-items: center; }
.toast.err { background: #b42828; }
.toast.ok { background: #067a06; }
.toast .tb { background: none; border: 0; color: #9cd1ff; font: inherit; font-weight: 700; cursor: pointer; padding: 0 2px; margin-left: 4px; }
.palette { width: min(640px, 100%); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .12s; }
.palette .pi { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.palette .pi input { border: 0; outline: 0; background: transparent; font-size: 16px; flex: 1; }
.palette .pr { max-height: 60vh; overflow-y: auto; padding: 6px; }
.palette .it { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.palette .it.sel, .palette .it:hover { background: var(--accent-weak); }
.palette .it .ty { font-size: 11px; color: var(--muted); width: 64px; flex: none; }
.palette .it .sub { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.menu { position: fixed; z-index: 300; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); min-width: 220px; padding: 6px; animation: pop .1s; }
.menu .mi { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.menu .mi:hover { background: var(--surface-3); }
.menu .ms { border-top: 1px solid var(--border); margin: 5px 0; }
.menu .mhd { padding: 8px 10px 4px; font-size: 12px; color: var(--muted); }
.notif-item { display: flex; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.notif-item:hover { background: var(--surface-3); }

/* ---------- 로그인 */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-side { background: radial-gradient(1200px 600px at 10% 10%, #1f3a63 0%, #0f1b2d 60%); color: #dbe5f3; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login-side h1 { color: #fff; font-size: 30px; margin: 18px 0 10px; }
.login-side ul { padding-left: 18px; line-height: 2; color: #b6c4d8; }
.login-form { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.login-form form { width: min(360px, 100%); display: flex; flex-direction: column; gap: 14px; }
.err-text { color: var(--critical-ink); font-size: 13px; min-height: 18px; }
@media (max-width: 860px) { .login-wrap { grid-template-columns: 1fr; } .login-side { display: none; } }

/* ---------- 플래너 */
.planner-grid { display: grid; grid-template-columns: 1fr 340px; gap: 16px; }
@media (max-width: 1100px) { .planner-grid { grid-template-columns: 1fr; } }
.timeline-day { position: relative; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.timeline-day .hr { display: grid; grid-template-columns: 54px 1fr; height: 46px; border-bottom: 1px solid var(--border); }
.timeline-day .hr:last-child { border-bottom: 0; }
.timeline-day .hr .t { font-size: 11px; color: var(--muted); padding: 3px 8px; border-right: 1px solid var(--border); }
.timeline-day .hr .slot { cursor: pointer; }
.timeline-day .hr .slot:hover { background: var(--surface-2); }
.timeline-day { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.timeline-day .ev { position: absolute; left: calc(60px + (100% - 68px) * var(--c, 0) / var(--n, 1)); width: calc((100% - 68px) / var(--n, 1) - 3px); border-radius: 7px; padding: 4px 8px; font-size: 12.5px; line-height: 1.35; background: var(--accent-weak); border-left: 3px solid var(--accent); cursor: grab; overflow: hidden; touch-action: pan-y; }
.timeline-day .ev .rz { position: absolute; left: 0; right: 0; height: 8px; cursor: ns-resize; }
.timeline-day .ev .rz-t { top: 0; }
.timeline-day .ev .rz-b { bottom: 0; }
.timeline-day .ev .rz-b::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 20px; height: 3px; margin-left: -10px; border-radius: 2px; background: var(--accent); opacity: 0; }
.timeline-day .ev:hover .rz-b::after, .timeline-day .ev.sel .rz-b::after { opacity: .7; }
.timeline-day .ev.sel { box-shadow: 0 0 0 2px var(--accent); }
.timeline-day .ev.moving { box-shadow: var(--shadow-lg); z-index: 3; opacity: .94; cursor: grabbing; }
.timeline-day .ev.ghost { background: var(--accent-weak-2); border: 1px dashed var(--accent); border-left: 3px solid var(--accent); pointer-events: none; z-index: 3; font-weight: 650; }
.timeline-day.drop-on { box-shadow: 0 0 0 2px var(--accent); }
.timeline-day .dropline { position: absolute; left: 54px; right: 0; height: 2px; background: var(--accent); z-index: 3; pointer-events: none; }
.timeline-day .dropline span { position: absolute; left: 6px; top: -10px; font-size: 11px; font-weight: 700; color: var(--accent-ink); background: var(--surface); padding: 0 4px; border-radius: 4px; }
@media (pointer: coarse) { .timeline-day .ev .rz { height: 16px; } .timeline-day .ev .rz-b::after { opacity: .6; } }
.selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; margin-bottom: 10px; border-radius: 10px; background: var(--accent-weak); border: 1px solid var(--accent); font-size: 13px; }
.selbar[hidden] { display: none; }
.dhint { font-size: 12px; color: var(--muted); margin: -6px 0 10px; }
.todo[draggable="true"] { cursor: grab; }
.weekplan .wd.drop { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-weak-2); }
.weekplan .it2[draggable="true"] { cursor: grab; }
.timeline-day .ev.done { opacity: .55; text-decoration: line-through; }
.timeline-day .now { position: absolute; left: 54px; right: 0; height: 2px; background: var(--critical); z-index: 2; }
.todo { display: flex; align-items: flex-start; gap: 9px; padding: 8px 6px; border-bottom: 1px solid var(--border); }
.todo:last-child { border-bottom: 0; }
.todo .tt2 { flex: 1; min-width: 0; cursor: pointer; }
.todo.done .tt2 { text-decoration: line-through; color: var(--muted); }
.matrix { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.matrix .q { border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); min-height: 220px; display: flex; flex-direction: column; }
.matrix .q .qh { padding: 10px 12px; font-weight: 700; font-size: 13px; display: flex; gap: 8px; align-items: center; border-bottom: 1px solid var(--border); }
.matrix .q .qb { padding: 6px 10px; flex: 1; }
.matrix .q.drop { outline: 2px dashed var(--accent); outline-offset: -4px; }
.weekplan { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.weekplan .wd { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-height: 260px; display: flex; flex-direction: column; }
.weekplan .wd.today { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-weak-2); }
.weekplan .wd .wdh { padding: 8px 10px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 13px; display: flex; }
.weekplan .wd .wdb { padding: 6px 8px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.weekplan .it2 { font-size: 12.5px; padding: 5px 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; }
.weekplan .it2.done { text-decoration: line-through; color: var(--muted); }
@media (max-width: 1100px) { .weekplan { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 가이드 / 설명서 */
.steps { position: relative; padding-left: 8px; }
.step { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding-bottom: 18px; position: relative; }
.step::before { content: ""; position: absolute; left: 16px; top: 34px; bottom: 0; width: 2px; background: var(--border); }
.step:last-child::before { display: none; }
.step .no { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-weak); color: var(--accent-ink); display: grid; place-items: center; font-weight: 750; }
.step .role { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 10px; background: var(--surface-3); color: var(--text-2); margin-bottom: 4px; }
.step .where { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.manual { max-width: 980px; }
.manual h2 { margin: 28px 0 10px; padding-top: 6px; }
.manual h3 { margin: 18px 0 6px; }
.manual p, .manual li { color: var(--text-2); line-height: 1.75; }
.manual .toc { columns: 2; font-size: 13.5px; }
.manual .toc a { display: block; padding: 2px 0; }
.manual .box { padding: 12px 16px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); margin: 10px 0; }
.manual code { background: var(--surface-3); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }
.manual table { border-collapse: collapse; width: 100%; font-size: 13px; margin: 8px 0; }
.manual th, .manual td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; vertical-align: top; }
.manual th { background: var(--surface-2); }

/* ---------- 차수(1·2·3차) */
.slotno { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--text-2); color: var(--surface); font-size: 11px; font-weight: 800; margin-right: 5px; flex: none; vertical-align: middle; line-height: 1; }
.slotno.sm { width: 15px; height: 15px; font-size: 9.5px; margin-right: 3px; }
.week .slot, .daygrid .slot { display: flex; align-items: center; justify-content: center; gap: 2px; }
.daygrid { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; }
.daygrid > div { background: var(--surface); padding: 6px; min-width: 0; }
.daygrid .dgh { background: var(--surface-2); font-weight: 700; font-size: 13px; text-align: center; padding: 9px 6px; position: sticky; top: 0; z-index: 1; }
.daygrid .dgh i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }
.daygrid .slot { background: var(--surface-2); font-weight: 700; font-size: 12.5px; color: var(--text-2); }
.daygrid .cell { display: flex; flex-direction: column; gap: 3px; min-height: 92px; }
.daygrid .cell.drop { outline: 2px dashed var(--accent); outline-offset: -3px; }
.daygrid .chip { white-space: normal; align-items: flex-start; }
.daygrid .chip > span.tx { overflow: visible; }
.daygrid .addbtn { opacity: 0; font-size: 11px; color: var(--accent-ink); cursor: pointer; border: 1px dashed var(--border-strong); border-radius: 5px; padding: 1px; background: transparent; margin-top: auto; }
.daygrid .cell:hover .addbtn { opacity: 1; }
.agenda { padding: 10px 12px; }
.agenda.today { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-weak-2); }
.agenda .agh { display: flex; align-items: center; gap: 8px; cursor: pointer; padding-bottom: 6px; }
.agenda .agh b.we { color: var(--critical-ink); }
.agenda .roster { color: var(--muted); padding-bottom: 4px; }
.agenda .agslot { border-top: 1px solid var(--border); padding: 6px 0 4px; }
.agenda .agsl { display: flex; align-items: center; font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.agenda .agcell { display: flex; flex-direction: column; gap: 4px; }
.agenda .chip { white-space: normal; font-size: 13px; padding: 5px 7px; }
.agenda .chip > span.tx { overflow: visible; }
.guide-grid { grid-template-columns: 280px 1fr; align-items: start; }
.nav-backdrop { display: none; }
.url-big { font-family: ui-monospace, Consolas, monospace; font-size: 17px; font-weight: 700; padding: 10px 12px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); user-select: all; word-break: break-all; }

/* ---------- 휴대폰 */
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .app, .app.collapsed { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 268px; z-index: 130; transform: translateX(-102%); transition: transform .18s ease; padding-bottom: env(safe-area-inset-bottom); }
  .app.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .app.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 16, 28, .45); z-index: 125; }
  .app.collapsed .nav a span, .app.collapsed .nav .sec, .app.collapsed .brand .bt, .app.collapsed .nav a .count, .app.collapsed .nav a .lock { display: initial; }
  .app.collapsed .nav a { justify-content: flex-start; }
  .nav a { padding: 11px 12px; font-size: 15px; }
  .main { height: 100dvh; }
  .topbar { height: 54px; padding: 0 8px; gap: 4px; padding-top: env(safe-area-inset-top); }
  .searchbox { width: auto; flex: 1; min-width: 0; padding: 0 10px; }
  .searchbox span, .searchbox kbd, #online, #btnUser .nowrap { display: none; }
  .content { padding: 12px 12px calc(70px + env(safe-area-inset-bottom)); }
  .page-head { margin-bottom: 12px; }
  .page-head h1 { font-size: 19px; }
  .page-head .sub { font-size: 12.5px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid { gap: 10px; }
  .kpi { padding: 12px; min-height: 92px; }
  .kpi .val { font-size: 22px; }
  .kpi .spark { display: none; }
  .toolbar { gap: 6px; }
  .toolbar .input, .toolbar select.input { width: auto !important; flex: 1 1 120px; min-width: 0; }
  .toolbar h2 { min-width: 0 !important; font-size: 15px; flex: 1 1 auto; }
  .seg { overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .seg button { padding: 6px 10px; }
  .lane { flex: 0 0 84vw; }
  .overlay { padding: 8px; align-items: flex-start; }
  .modal .mb { max-height: 72vh; padding: 14px; }
  .modal .mh, .modal .mf { padding-left: 14px; padding-right: 14px; }
  .drawer { width: 100vw; }
  .matrix { grid-template-columns: 1fr; }
  .weekplan { grid-template-columns: 1fr; }
  .guide-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 92px 1fr; }
  .btn { height: 38px; }
  .btn.sm { height: 32px; }
  .iconbtn { width: 40px; height: 40px; }
  .cal .day { min-height: 92px; }
  .tbl-wrap { max-height: none; }
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); width: calc(100% - 24px); }
  .manual .toc { columns: 1; }
  .nav-collapse { display: none; }
  /* 보고서 일정 표 → 휴대폰에서는 카드처럼 쌓기 */
  .rep-tbl, .rep-tbl tbody { display: block; }
  .rep-tbl tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .rep-tbl td { display: block; width: auto !important; padding: 0 !important; border: 0 !important; }
  .rep-tbl td:nth-child(2) { grid-column: 1 / -1; order: -1; }
  .rep-tbl td:nth-child(6) { grid-column: 1 / -1; }
  /* 하단 빠른 메뉴 (휴대폰) */
  .content { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .bottomnav { display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; height: calc(62px + env(safe-area-inset-bottom)); padding: 0 6px env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -4px 14px rgba(10, 16, 28, .06); }
  .bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 100%; color: var(--muted); font-size: 11.5px; font-weight: 600; text-decoration: none; -webkit-tap-highlight-color: transparent; }
  .bottomnav a svg.ic { width: 22px; height: 22px; }
  .bottomnav a.on { color: var(--accent); }
  .bn-add { justify-self: center; width: 50px; height: 50px; border-radius: 16px; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(30, 90, 200, .35); cursor: pointer; }
  .bn-add svg.ic { width: 24px; height: 24px; stroke-width: 2.2; }
  /* 입력칸 16px: iPhone 자동 확대 방지 */
  .input, select.input, textarea.input, input[type="text"], input[type="date"], input[type="time"], input[type="number"], textarea { font-size: 16px; }
  /* 대화상자는 아래에서 올라오는 시트로 */
  .overlay { padding: 0; align-items: flex-end; }
  .modal, .modal.wide { width: 100%; max-height: 94dvh; border-radius: 16px 16px 0 0; animation: sheet .18s ease; }
  .modal .mb { max-height: none; flex: 1 1 auto; min-height: 0; }
  .modal .mf { padding-bottom: calc(14px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .modal .mh::before { content: ""; position: absolute; left: 50%; top: 6px; width: 38px; height: 4px; margin-left: -19px; border-radius: 2px; background: var(--border-strong); }
  .modal .mh { position: relative; padding-top: 18px; }
  .menu { max-width: calc(100vw - 16px); }
  .menu .mi { padding: 11px 12px; font-size: 15px; }
}
@keyframes sheet { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }

/* ---------- 실적 보고 */
.dotc { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.big { font-size: 22px; font-weight: 750; letter-spacing: -.01em; }
.big small { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.up { color: var(--good-ink); font-weight: 650; } .down { color: var(--critical-ink); font-weight: 650; }
.warnc { color: var(--warning-ink); font-weight: 700; }
.perf-tbl td, .perf-tbl th { white-space: nowrap; }
.perf-tbl tr.sub td { color: var(--muted); font-size: 12px; }
.perf-tbl tr.total td { font-weight: 750; background: var(--surface-2); }
.perf-tbl tr.em td { font-weight: 650; }
.perf-tbl .cur { background: var(--accent-weak); }
.perf-tbl.mini { font-size: 12px; }
.perf-tbl.mini td, .perf-tbl.mini th { padding: 6px 7px; }
.cats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 560px), 1fr)); }
.achv { display: flex; flex-direction: column; gap: 10px; }
.achv-row { display: grid; grid-template-columns: 110px 1fr 150px; align-items: center; gap: 10px; }
.achv-name { font-weight: 650; white-space: nowrap; display: flex; align-items: center; }
.achv-name i { width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; flex: none; }
.achv-bar { position: relative; height: 14px; border-radius: 0 7px 7px 0; background: var(--surface-3); }
.achv-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 7px 7px 0; }
.achv-bar .fill.ok { background: var(--good); } .achv-bar .fill.behind { background: var(--serious); }
.achv-bar .pace { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); opacity: .7; border-radius: 1px; }
.achv-val { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.note-tbl { width: 100%; border-collapse: collapse; margin-bottom: 10px; font-size: 13px; }
.note-tbl th, .note-tbl td { border: 1px solid var(--border); padding: 7px 9px; text-align: left; vertical-align: top; white-space: pre-line; }
.note-tbl th { background: var(--surface-2); font-weight: 700; }
.note-edit { border-collapse: collapse; width: 100%; }
.note-edit td { padding: 2px; vertical-align: top; min-width: 120px; }
.note-edit textarea { width: 100%; border: 1px solid var(--border-strong); border-radius: 6px; padding: 5px 7px; resize: vertical; background: var(--surface); font: inherit; font-size: 13px; }
.note-edit textarea.hd { font-weight: 700; background: var(--surface-2); }
@media (max-width: 760px) {
  .achv-row { grid-template-columns: 80px 1fr; } .achv-val { grid-column: 1 / -1; text-align: left; }
}

/* ---------- 프레젠테이션 (슬라이드는 다크 모드에서도 흰 바탕) */
.present { position: fixed; inset: 0; z-index: 3000; background: #0b0f16; display: flex; flex-direction: column; }
.pr-stage { position: relative; flex: 1; overflow: hidden; }
.pr-deck { position: absolute; inset: 0; }
.slide { position: absolute; left: 50%; top: 50%; width: 1280px; height: 720px; transform-origin: center center; background: #fff; color: #101828; opacity: 0; pointer-events: none;
  display: flex; flex-direction: column; padding: 36px 52px 26px; box-shadow: 0 10px 40px rgba(0,0,0,.4); border-radius: 6px; overflow: hidden;
  --text: #101828; --text-2: #475467; --muted: #7a8494; --surface: #fff; --surface-2: #f6f7f9; --surface-3: #eef1f5; --border: #dde2e9; --border-strong: #c9d1dc;
  --chart-surface: #fff; --grid: #e9ebef; --axis: #c3c2b7; --accent-weak: #e8f1fc; --good-ink: #067a06; --critical-ink: #b42828; --warning-ink: #8a5a00;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948; }
.slide.on { opacity: 1; pointer-events: auto; }
.sl-head { display: flex; align-items: center; gap: 16px; padding-bottom: 14px; border-bottom: 2px solid #eef1f5; margin-bottom: 18px; }
.sl-head h2 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.sl-sub { color: #667085; font-size: 15px; margin-top: 2px; }
.sl-team { color: #fff; font-weight: 800; font-size: 15px; padding: 6px 14px; border-radius: 20px; white-space: nowrap; }
.sl-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 16px; font-size: 15px; }
.sl-foot { display: flex; justify-content: space-between; color: #98a2b3; font-size: 12px; padding-top: 8px; }
.sl-cover { justify-content: center; background: radial-gradient(900px 500px at 15% 10%, #1f3a63 0%, #0f1b2d 65%); color: #fff; }
.sl-cover-in { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-left: 40px; }
.sl-kicker { font-size: 22px; letter-spacing: .3em; color: #86b6ef; font-weight: 800; }
.sl-cover h1 { font-size: 72px; font-weight: 850; margin: 12px 0 18px; letter-spacing: -.03em; }
.sl-date { font-size: 22px; color: #c8d3e3; }
.sl-teams { display: flex; gap: 10px; margin-top: 40px; }
.sl-teams span { border: 2px solid; border-radius: 22px; padding: 6px 16px; font-size: 16px; font-weight: 700; }
.sl-cover .sl-foot { color: #7e8ea6; }
.sl-2col { display: grid; grid-template-columns: 1.35fr 1fr; gap: 26px; align-items: start; }
.sl-3col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.sl-h3 { font-size: 17px; margin: 0 0 10px; }
.slide .tbl-wrap { border: 0; max-height: none; overflow: visible; }
.slide .perf-tbl { font-size: 14.5px; }
.slide .perf-tbl td, .slide .perf-tbl th { padding: 7px 9px; }
.slide .achv-row { grid-template-columns: 96px 1fr 170px; }
.sl-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.sl-tbl th, .sl-tbl td { border: 1px solid #dde2e9; padding: 6px 4px; text-align: center; white-space: nowrap; }
.sl-tbl th { background: #f2f4f7; font-weight: 700; }
.sl-tbl td:first-child { font-weight: 700; background: #f8f9fb; }
.sl-tbl .cur { background: #fff4d6; }
.sl-tbl small.ct { display: block; font-size: 11px; color: #667085; font-weight: 500; }
.sl-tbl tr.em td { font-weight: 700; }
.sl-tbl tr.sub td { color: #667085; }
.sl-split { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: center; }
.sl-chart { min-width: 0; }
.sl-chart-lg { flex: 1; }
.sl-kpis { display: flex; flex-direction: column; gap: 14px; }
.sl-kpis > div, .sl-kpi-row > div { border: 1px solid #e3e7ee; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.sl-kpis span, .sl-kpi-row span { color: #667085; font-size: 14px; font-weight: 600; }
.sl-kpis b, .sl-kpi-row b { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.sl-kpis em { font-style: normal; color: #475467; font-weight: 600; }
.sl-kpis i { font-style: normal; font-size: 13px; color: #667085; }
.sl-kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.sl-notes { columns: 2; column-gap: 26px; }
.sl-notes .note-tbl { break-inside: avoid; font-size: 14.5px; }
.pr-bar { height: 52px; display: flex; align-items: center; gap: 8px; padding: 0 12px; color: #c8d3e3; background: #0b0f16; }
.pr-btn { width: 40px; height: 40px; border-radius: 10px; border: 0; background: #1b2433; color: #e6edf7; display: grid; place-items: center; cursor: pointer; }
.pr-btn:hover { background: #26324a; }
.pr-count { font-variant-numeric: tabular-nums; min-width: 70px; text-align: center; font-weight: 700; }
.pr-prog { flex: 1; height: 4px; background: #1b2433; border-radius: 2px; overflow: hidden; }
.pr-prog i { display: block; height: 100%; background: #3987e5; transition: width .2s; }
.present.grid .pr-stage { overflow-y: auto; }
.present.grid .pr-deck { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; padding: 20px; }
.present.grid .slide { position: relative; left: auto; top: auto; opacity: 1; pointer-events: auto; zoom: .2; cursor: pointer; transform: none !important; }
.present.grid .slide.on { outline: 14px solid #3987e5; }
body.presenting { overflow: hidden; }

@media print {
  .sidebar, .topbar, .toolbar, .btn { display: none !important; }
  .app { display: block; }
  .content { overflow: visible; }
  body.presenting > *:not(.present) { display: none !important; }
  body.presenting .present { position: static; background: #fff; display: block; }
  body.presenting .pr-bar { display: none !important; }
  body.presenting .pr-stage, body.presenting .pr-deck { position: static; overflow: visible; }
  body.presenting .slide { position: relative; left: auto; top: auto; transform: none !important; opacity: 1; box-shadow: none; border-radius: 0; break-after: page; margin: 0; }
  @page { size: 1280px 720px; margin: 0; }
}
