[hidden] { display: none !important; }
:root {
  color-scheme: light;
  --bg: #f6f6f4; --surface-1: #ffffff; --line: #e4e4e0; --grid: #ececea;
  --text-primary: #191919; --text-secondary: #666666; --accent: #1b64be;
  --series-1: #257de0; --series-2: #f47230;
  --good: #006c10; --critical: #c42f30; --warn-bg: #fff6e0;
  font-family: "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", system-ui, sans-serif;
  font-size: 15px; color: var(--text-primary); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
header { position: sticky; top: 0; z-index: 5; display: flex; gap: 16px; align-items: center; padding: 10px 20px; background: var(--surface-1); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 17px; } .brand span { color: var(--accent); }
nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
nav a { padding: 6px 12px; border-radius: 8px; color: var(--text-secondary); text-decoration: none; font-weight: 600; }
nav a.on { background: #e8f0fb; color: var(--accent); }
.who { color: var(--text-secondary); font-size: 14px; }
main { max-width: 1280px; margin: 0 auto; padding: 20px; }
h1 { font-size: 22px; margin: 4px 0 16px; } h2 { font-size: 17px; margin: 24px 0 10px; }
.card { background: var(--surface-1); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.muted { color: var(--text-secondary); font-size: 13px; }
.note { background: var(--warn-bg); border-radius: 8px; padding: 10px 12px; font-size: 13px; color: #5a4300; margin: 8px 0; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-secondary); }
label.chk { flex-direction: row; align-items: center; gap: 6px; color: var(--text-primary); font-size: 14px; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid #cfcfca; border-radius: 8px; background: #fff; color: var(--text-primary); min-width: 0; }
input[type=checkbox] { width: 18px; height: 18px; }
textarea { min-height: 60px; }
button { font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; }
button.ghost { background: transparent; color: var(--accent); }
button.danger { background: #fff; color: var(--critical); border-color: var(--critical); }
button.sm { padding: 4px 10px; font-size: 13px; }
button:disabled { opacity: .5; cursor: default; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 7px 8px; border-bottom: 1px solid var(--grid); text-align: left; white-space: nowrap; }
th { color: var(--text-secondary); font-weight: 600; font-size: 13px; background: #fafaf8; position: sticky; top: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.sum td { font-weight: 700; background: #f7f9fc; }
tr.key td { font-weight: 800; background: #eef4fc; }
tr.click { cursor: pointer; } tr.click:hover td { background: #f3f7fd; }
.scroll { overflow-x: auto; }
.neg { color: var(--critical); }
.pos { color: var(--good); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface-1); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.kpi .l { font-size: 13px; color: var(--text-secondary); } .kpi .v { font-size: 24px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: #efefef; color: #444; }
.badge.in { background: #e3effc; color: #1757ac; } .badge.out { background: #fdebe2; color: #a3400f; }
.badge.warn { background: #fde9e9; color: var(--critical); }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: flex-start; justify-content: center; padding: 30px 12px; overflow-y: auto; z-index: 20; }
.modal-box { background: #fff; border-radius: 14px; padding: 20px; width: min(720px, 100%); }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.form .wide { grid-column: 1 / -1; }
.actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #222; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 30; font-size: 14px; }
.login { max-width: 380px; margin: 10vh auto; }
.login .card { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.files { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.files .f { border: 1px solid var(--line); border-radius: 8px; padding: 6px; font-size: 12px; display: flex; flex-direction: column; gap: 4px; align-items: center; width: 110px; }
.files img { width: 96px; height: 96px; object-fit: cover; border-radius: 4px; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .axis { fill: var(--text-secondary); font-size: 11px; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: #bdbdb8; stroke-width: 1; }
.chart .hit { fill: transparent; }
.chart .hit:hover { fill: rgba(0,0,0,.04); }
.tip { position: fixed; pointer-events: none; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; box-shadow: 0 4px 14px rgba(0,0,0,.12); z-index: 40; }
.tip b { display: block; margin-bottom: 4px; }
.tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.done td { color: #9a9a9a; text-decoration: line-through; }
.soon td:first-child { font-weight: 800; color: var(--critical); }
@media (max-width: 700px) {
  main { padding: 12px; } header { padding: 8px 12px; gap: 8px; }
  nav a { padding: 5px 8px; font-size: 14px; }
  .kpi .v { font-size: 20px; }
}
@media print { header, .noprint, button { display: none !important; } .card { border: none; } }
