:root { --navy:#1f3a5f; --accent:#e4572e; --bg:#f4f6fa; --line:#dde3ec; --muted:#667085; }
* { box-sizing:border-box; }
body { margin:0; font-family:"Pretendard","Apple SD Gothic Neo","Noto Sans KR","Malgun Gothic",sans-serif; background:var(--bg); color:#1d2433; }
[hidden] { display:none !important; }
.topbar { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; padding:14px 24px; background:var(--navy); color:#fff; }
.brand { font-weight:800; font-size:20px; letter-spacing:-.3px; }
.brand .sub { font-weight:500; font-size:14px; opacity:.85; margin-left:8px; }
.badges { display:flex; gap:6px; flex-wrap:wrap; }
.badge { display:inline-block; padding:3px 9px; border-radius:999px; font-size:12px; font-weight:700; background:#e8edf5; color:var(--navy); border:1px solid #c9d3e3; }
.badge.warn { background:#fff4e5; color:#b54708; border-color:#f7c58b; }
.wrap { max-width:1080px; margin:0 auto; padding:20px 16px 40px; display:grid; grid-template-columns:minmax(0,1fr); gap:16px; }
.card { min-width:0; }
.card { background:#fff; border:1px solid var(--line); border-radius:14px; padding:20px; box-shadow:0 1px 2px rgba(16,24,40,.04); }
h1 { font-size:22px; margin:0 0 6px; } h2 { font-size:18px; margin:0; }
.muted { color:var(--muted); font-size:14px; }
.grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px 16px; margin:14px 0; }
label { display:flex; flex-direction:column; gap:6px; font-size:13px; font-weight:600; color:#344054; }
input, select { font:inherit; font-size:16px; padding:10px 12px; border:1px solid #cfd6e2; border-radius:10px; background:#fff; text-align:right; }
select { text-align:left; } input::placeholder { text-align:left; }
.row { display:flex; gap:8px; flex-wrap:wrap; } .row input { text-align:left; flex:1; min-width:180px; }
.end { display:flex; align-items:flex-end; }
.btn { display:inline-flex; align-items:center; justify-content:center; padding:10px 16px; border-radius:10px; border:1px solid #cfd6e2; background:#fff; color:var(--navy); font:inherit; font-weight:700; cursor:pointer; text-decoration:none; }
.btn.primary { background:var(--accent); color:#fff; border-color:var(--accent); }
.error { color:#b42318; font-weight:600; } .ok { color:#067647; font-weight:600; }
.result-head { display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.kpis { display:grid; grid-template-columns:2fr 1.4fr 1fr 1fr; gap:12px; }
.kpi { border:1px solid var(--line); border-radius:12px; padding:14px; background:#fafbfd; }
.kpi.main { background:var(--navy); color:#fff; border-color:var(--navy); }
.kpi .k { font-size:13px; opacity:.85; } .kpi .v { font-size:24px; font-weight:800; margin-top:6px; }
.kpi.main .v { font-size:34px; } .kpi .v.sm { font-size:18px; }
.facts { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:14px 0 0; }
.facts div { border-top:1px dashed var(--line); padding-top:8px; } dt { font-size:12px; color:var(--muted); } dd { margin:4px 0 0; font-weight:700; }
.note { font-size:13px; color:#7a4b00; background:#fff8ec; border:1px solid #f7dcae; border-radius:10px; padding:10px 12px; }
.actions { display:flex; gap:8px; flex-wrap:wrap; }
.table-wrap { overflow:auto; max-height:520px; border:1px solid var(--line); border-radius:10px; }
table.sched { width:100%; border-collapse:collapse; font-size:13px; font-variant-numeric:tabular-nums; }
.sched th, .sched td { padding:7px 10px; border-bottom:1px solid #eef1f6; text-align:right; white-space:nowrap; }
.sched th:first-child, .sched td:first-child { text-align:center; }
.sched thead th { position:sticky; top:0; background:#eef2f8; color:#344054; }
.sched tfoot th { background:#f7f9fc; position:sticky; bottom:0; }
.admin td:nth-child(3), .admin td:nth-child(5), .admin td:nth-child(6) { text-align:left; }
.tag { padding:2px 8px; border-radius:6px; background:#ecfdf3; color:#067647; font-size:12px; font-weight:700; }
.tag.blue { background:#eff8ff; color:#175cd3; }
.foot { text-align:center; color:var(--muted); font-size:12px; padding:20px; } .foot a { color:var(--navy); }

/* A4 리포트 미리보기 (화면) */
.a4 { width:210mm; min-height:297mm; margin:0 auto 40px; background:#fff; padding:14mm 14mm; box-shadow:0 4px 20px rgba(16,24,40,.15); font-size:11px; }
.rep-head { display:flex; justify-content:space-between; border-bottom:3px solid var(--navy); padding-bottom:8px; }
.rep-brand { font-weight:800; color:var(--accent); font-size:14px; } .rep-title { font-size:20px; font-weight:800; color:var(--navy); }
.rep-badges { text-align:right; } .rep-date { color:var(--muted); margin-top:6px; }
.a4 h3 { font-size:13px; color:var(--navy); margin:14px 0 6px; }
.rep-kv { width:100%; border-collapse:collapse; } .rep-kv tbody { display:grid; grid-template-columns:1fr 1fr; }
.rep-kv tr { display:flex; border-bottom:1px solid #eef1f6; } .rep-kv th { width:40%; text-align:left; padding:5px; color:var(--muted); font-weight:600; } .rep-kv td { padding:5px; text-align:right; flex:1; font-weight:700; }
.rep-kpis { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; } .rep-kpis div { border:1px solid var(--line); border-radius:8px; padding:8px; display:flex; flex-direction:column; }
.rep-kpis span { color:var(--muted); } .rep-kpis b { font-size:18px; color:var(--navy); margin-top:4px; }
.rep-sched { font-size:9.5px; } .rep-sched th, .rep-sched td { padding:2.5px 6px; } .rep-sched thead th { position:static; }
.rep-foot { margin-top:12px; padding-top:8px; border-top:1px solid var(--line); color:var(--muted); font-size:9.5px; }

@media (max-width: 860px) {
  .grid { grid-template-columns:1fr 1fr; } .kpis { grid-template-columns:1fr 1fr; } .kpi.main { grid-column:1 / -1; } .facts { grid-template-columns:1fr 1fr; }
  .a4 { width:auto; min-height:auto; padding:16px; margin:0 10px 30px; overflow-x:auto; }
}
@media (max-width: 520px) {
  .topbar { padding:12px 14px; } .brand .sub { display:block; margin:2px 0 0; }
  .grid { grid-template-columns:1fr; } .kpis { grid-template-columns:1fr; } .facts { grid-template-columns:1fr; }
  .kpi.main .v { font-size:30px; } .wrap { padding:12px 10px 30px; } .card { padding:16px; }
  .rep-kv tbody { grid-template-columns:1fr; } .rep-kpis { grid-template-columns:1fr; }
}

@page { size:A4; margin:10mm; }
@media print {
  body { background:#fff; }
  .no-print { display:none !important; }
  .a4 { width:auto; min-height:auto; margin:0; padding:0; box-shadow:none; }
  .rep-sched tr { break-inside:avoid; } .rep-sched thead { display:table-header-group; }
  * { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}
