@font-face { font-family: "Pretendard"; src: url("/static/vendor/fonts/PretendardVariable.woff2") format("woff2-variations"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Rajdhani"; src: url("/static/vendor/fonts/rajdhani-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Rajdhani"; src: url("/static/vendor/fonts/rajdhani-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Rajdhani"; src: url("/static/vendor/fonts/rajdhani-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* 밝은 바탕 + 가운데 지도만 어두운 구성. 강조색 이름(--cyan 등)은 상황판 지도와 공유한다. */
:root {
  --bg0: #e6ebf2;
  --bg1: #eef2f7;
  --bg2: #ffffff;
  --panel: #ffffff;
  --panel-2: #f6f8fb;
  --line: #d8e0ea;
  --line-2: #b9c6d6;
  --ink: #13233a;
  --ink-2: #48596f;
  --ink-3: #7b8aa0;
  --cyan: #0b6fd6;
  --cyan-2: #2b8cf0;
  --teal: #0b9f86;
  --amber: #d68a00;
  --orange: #e2661c;
  --red: #dc2f45;
  --blue: #3567e0;
  --green: #1c9a5e;
  --violet: #7c5ce0;
  --navy: #0c2340;
  --num: "Rajdhani", "Pretendard", sans-serif;
  --surface: #ffffff;
  --surface-2: #f5f7fa;
  --surface-3: #e9eef4;
  --hover: #edf4fc;
  --bad-bg: #fff4f6;
  --ch-main: #0b6fd6;
  --ch-soft: #9cc4ee;
  --ch-prev: #c3cedb;
  --ch-grid: #e3e9f1;
  font-size: 14px;
  color-scheme: light;
}

/* 다크 테마 — 관제센터 모니터·DID·야간 근무용. [내 정보]에서 바꾸며 기기마다 기억한다. */
:root[data-theme="dark"] {
  --bg0: #050a12;
  --bg1: #0a1220;
  --bg2: #101c2e;
  --panel: #101c2e;
  --panel-2: #0d1828;
  --surface: #101c2e;
  --surface-2: #0d1828;
  --surface-3: #1a2a40;
  --hover: #16283f;
  --bad-bg: #2a121a;
  --line: rgba(120, 160, 210, .16);
  --line-2: rgba(120, 160, 210, .3);
  --ink: #e4eef9;
  --ink-2: #a3b5ca;
  --ink-3: #6f84a0;
  --navy: #dbe8f7;
  --cyan: #3cc8ff;
  --cyan-2: #1d8fd6;
  --teal: #2fe0b5;
  --amber: #ffb340;
  --orange: #ff7a3d;
  --red: #ff5468;
  --blue: #5b9bff;
  --green: #3ddc97;
  --ch-main: #3cc8ff;
  --ch-soft: #2b6aa8;
  --ch-prev: #33475f;
  --ch-grid: rgba(120, 160, 210, .14);
  color-scheme: dark;
}
:root[data-theme="dark"] .tab.on, :root[data-theme="dark"] .pager button.on,
:root[data-theme="dark"] .user-chip .av, :root[data-theme="dark"] .m-me .av { background: #1e5aa0; border-color: #1e5aa0; color: #fff; }
:root[data-theme="dark"] .btn.primary { color: #04131f; }
:root[data-theme="dark"] .st-접수 { color: #ff8a96; background: rgba(255, 77, 95, .14); border-color: rgba(255, 77, 95, .4); }
:root[data-theme="dark"] .st-작업지시 { color: #ffa070; background: rgba(255, 122, 61, .14); border-color: rgba(255, 122, 61, .4); }
:root[data-theme="dark"] .st-출동 { color: #ffc970; background: rgba(255, 179, 64, .13); border-color: rgba(255, 179, 64, .4); }
:root[data-theme="dark"] .st-조치완료 { color: #8ec2ff; background: rgba(91, 155, 255, .14); border-color: rgba(91, 155, 255, .4); }
:root[data-theme="dark"] .st-기관확인 { color: #6fe8b2; background: rgba(61, 220, 151, .12); border-color: rgba(61, 220, 151, .35); }
:root[data-theme="dark"] .sla-banner.ok { background: rgba(61, 220, 151, .1); border-color: rgba(61, 220, 151, .35); }
:root[data-theme="dark"] .sla-banner.warn { background: rgba(255, 179, 64, .1); color: var(--amber); border-color: rgba(255, 179, 64, .35); }
:root[data-theme="dark"] .sla-banner.bad { background: rgba(255, 77, 95, .12); border-color: rgba(255, 77, 95, .4); }
:root[data-theme="dark"] .kt.red, :root[data-theme="dark"] .kpi.alert { border-color: rgba(255, 77, 95, .45); }
:root[data-theme="dark"] .m-bar { background: linear-gradient(135deg, #07101d, #0f2846); }
:root[data-theme="dark"] .m-btn.ghost { background: rgba(60, 200, 255, .1); border-color: rgba(60, 200, 255, .35); }
:root[data-theme="dark"] body[data-route="m"] { background: var(--bg0); }
:root[data-theme="dark"] .stage { background:
    linear-gradient(rgba(60, 200, 255, .035) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(60, 200, 255, .035) 1px, transparent 1px) 0 0 / 40px 40px; }
:root[data-theme="dark"] .pn, :root[data-theme="dark"] .kt, :root[data-theme="dark"] .card, :root[data-theme="dark"] .kpi { box-shadow: none; }
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(195deg) brightness(.78) saturate(.55); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Pretendard", "Malgun Gothic", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg1);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 13px; margin: 0 0 8px; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
::selection { background: rgba(11, 111, 214, .22); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c3cedb; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 왼쪽 메뉴 + 상단 바 */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 216px; flex: none; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--line); z-index: 950;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); padding: 16px 18px; border-bottom: 1px solid var(--line); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; color: var(--cyan); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text small { font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text b { font-size: 15px; letter-spacing: -.01em; color: var(--navy); }
#nav { display: flex; flex-direction: column; gap: 2px; padding: 10px 10px; overflow-y: auto; flex: 1; }
.nav-group { font-size: 11px; font-weight: 700; color: var(--ink-3); letter-spacing: .08em; padding: 14px 12px 6px; }
.nav-group:first-child { padding-top: 4px; }
#nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 14px;
  position: relative;
}
#nav a:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
#nav a.active { background: var(--hover); color: var(--cyan); }
#nav a.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 3px 3px 0; background: var(--cyan); }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#nav a .badge { margin-left: auto; }
.badge { background: var(--red); color: #fff; border-radius: 9px; font-size: 11px; padding: 0 6px; font-family: var(--num); font-weight: 700; line-height: 17px; }
.badge:empty { display: none; }
.side-foot { padding: 12px 18px; font-size: 11px; color: var(--ink-3); border-top: 1px solid var(--line); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gnb {
  position: sticky; top: 0; z-index: 900; height: 56px; display: flex; align-items: center; gap: 14px; padding: 0 20px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.gnb h1 { font-size: 18px; margin: 0; color: var(--navy); letter-spacing: -.01em; }
.gnb-right { margin-left: auto; display: flex; gap: 12px; align-items: center; flex: none; }
.clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; font-family: var(--num); }
.clock span { font-size: 12px; color: var(--ink-3); }
.clock b { font-size: 20px; color: var(--navy); letter-spacing: .06em; }
.who { display: flex; gap: 4px; }
.menu-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-left: -6px; border-radius: 8px;
  background: none; border: 0; font-size: 20px; cursor: pointer; color: var(--ink-2); }
.menu-btn:hover { background: var(--hover); color: var(--ink); }
@media (min-width: 901px) { body.side-hidden .side { display: none; } }
#view { padding: 18px 20px 40px; }

/* ---------- 공통 요소 */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgba(12, 35, 64, .05), 0 4px 14px rgba(12, 35, 64, .05); padding: 16px; position: relative; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

.btn {
  font: inherit; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: 8px;
  padding: 6px 12px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; font-weight: 500;
}
.btn:hover { border-color: var(--cyan); color: var(--cyan); text-decoration: none; }
.btn.primary { background: var(--cyan); border-color: var(--cyan); color: #fff; }
.btn.primary:hover { background: #0a5fb8; color: #fff; }
.btn.danger { color: var(--red); border-color: #efb3bb; }
.btn.ok { background: var(--green); border-color: var(--green); color: #fff; }
.btn.ok:hover { color: #fff; filter: brightness(1.08); }
.btn.sm { padding: 3px 9px; font-size: 12px; border-radius: 6px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

input, select, textarea { font: inherit; color: var(--ink); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 9px; background: var(--surface); }
textarea { width: 100%; min-height: 64px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(11, 111, 214, .25); border-color: var(--cyan); }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); }
.form label.full { grid-column: 1 / -1; }
.form input, .form select, .form textarea { width: 100%; font-size: 14px; }
.req::after { content: " *"; color: var(--red); }

table.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.tbl th { font-size: 12px; color: var(--ink-2); font-weight: 600; background: var(--surface-2); position: sticky; top: 0; z-index: 1; border-bottom-color: var(--line-2); }
.tbl tbody tr:hover { background: var(--hover); }
.tbl tr.click { cursor: pointer; }
.tbl-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.tbl-wrap .tbl th:first-child, .tbl-wrap .tbl td:first-child { padding-left: 14px; }

.pill { display: inline-block; font-size: 12px; border-radius: 6px; padding: 1px 7px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.st-접수 { color: #c4233a; background: #fdeaed; border-color: #f4b8c1; }
.st-작업지시 { color: #c4500f; background: #fdeee4; border-color: #f4c6a8; }
.st-출동 { color: #9a6400; background: #fdf3dc; border-color: #eed39a; }
.st-조치완료 { color: #2553c4; background: #e8effd; border-color: #b6c8f3; }
.st-기관확인 { color: #157a4b; background: #e3f5ec; border-color: #a8dcc1; }
.st-반려 { color: #6440c9; background: #efeafd; border-color: #cbbcf4; }
.pr-긴급 { background: var(--red); color: #fff; }
.pr-일반 { background: #eef1f5; color: var(--ink-2); border-color: var(--line); }
.pr-경미 { color: var(--ink-3); border-color: var(--line); }
.sla-ok { color: var(--green); font-weight: 600; }
.sla-bad { color: var(--red); font-weight: 600; }
.sla-warn { color: var(--amber); font-weight: 600; }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 5px 14px; cursor: pointer; font: inherit; font-size: 13px; }
.tab:hover { color: var(--ink); }
.tab.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.tab .n { opacity: .7; margin-left: 4px; font-family: var(--num); }

/* ---------- KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgba(12, 35, 64, .05), 0 4px 14px rgba(12, 35, 64, .05); padding: 12px 16px; position: relative; overflow: hidden; color: var(--ink); }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cyan); }
.kpi .k { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.kpi .v { font-size: 30px; font-weight: 700; margin-top: 2px; font-family: var(--num); line-height: 1.1; color: var(--navy); }
.kpi .v small { font-size: 13px; font-weight: 500; color: var(--ink-3); margin-left: 3px; font-family: "Pretendard"; }
.kpi .d { font-size: 12px; margin-top: 2px; color: var(--ink-3); }
.kpi.alert { border-color: #f1b3bc; background: var(--bad-bg); }
.kpi.alert::before { background: var(--red); }
.kpi.alert .v { color: var(--red); }
a.kpi:hover { text-decoration: none; border-color: var(--cyan); }
.up { color: var(--red); } .down { color: var(--green); }

/* ---------- 차트 */
.hbars { display: flex; flex-direction: column; gap: 7px; }
.hbar { display: grid; grid-template-columns: 90px 1fr 44px; gap: 8px; align-items: center; font-size: 13px; }
.hbar .track, .hbar .fill { display: block; }
.hbar .track { background: var(--surface-3); height: 10px; overflow: hidden; border-radius: 5px; }
.hbar .fill { background: linear-gradient(90deg, var(--cyan-2), var(--cyan)); height: 100%; }
.hbar .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.hbar .num { font-family: var(--num); font-size: 15px; font-weight: 600; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); align-items: center; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 1px; margin-right: 5px; vertical-align: -1px; }
.legend i.dot { border-radius: 50%; }
/* 기본값만 svg에 두고, 글자마다 준 크기·색이 우선하게 한다 */
svg.chart { font-size: 12px; fill: var(--ink-3); font-family: var(--num); }

/* ---------- 장애 상세 */
.stepper { display: flex; margin: 4px 0 10px; }
.step { flex: 1; text-align: center; position: relative; padding-top: 30px; font-size: 13px; color: var(--ink-3); }
.step::before { content: ""; position: absolute; top: 11px; left: -50%; right: 50%; height: 3px; background: var(--line); }
.step:first-child::before { display: none; }
.step .dot { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-2); z-index: 1; font-size: 11px; line-height: 20px; font-family: var(--num); }
.step.done, .step.cur { color: var(--ink); }
.step.done::before, .step.cur::before { background: var(--cyan); }
.step.done .dot { background: var(--cyan); border-color: var(--cyan); color: #fff; font-weight: 700; }
.step.cur .dot { border-color: var(--cyan); color: var(--cyan); font-weight: 700; }
.step .t { font-size: 11px; color: var(--ink-3); margin-top: 2px; font-family: var(--num); }
.step.cur .name { font-weight: 700; color: var(--cyan); }
dl.kv { display: grid; grid-template-columns: 90px 1fr; gap: 7px 10px; margin: 0; font-size: 13px; }
dl.kv dt { color: var(--ink-3); }
dl.kv dd { margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 12px 18px; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); }
.timeline li::after { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.photo { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/3; background: var(--surface-3); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo span { position: absolute; left: 6px; top: 6px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 2px; }
.action-box { border: 2px solid var(--cyan); }
.sla-banner { border-radius: 10px; padding: 10px 12px; font-weight: 600; border: 1px solid; }
.sla-banner.ok { background: #e7f6ee; color: var(--green); border-color: #a8dcc1; }
.sla-banner.warn { background: #fdf4e0; color: #8f5c00; border-color: #eed39a; }
.sla-banner.bad { background: var(--bad-bg); color: var(--red); border-color: #f1b3bc; }

/* ---------- 상세 지도(Leaflet) */
.map-layout { display: grid; grid-template-columns: 300px 1fr; gap: 14px; height: calc(100vh - 100px); }
.map-panel { overflow: auto; }
#map, .mini-map { border-radius: 12px; border: 1px solid var(--line); background: var(--surface-3); }
#map { height: 100%; }
.mini-map { height: 220px; }
.leaflet-container { font: inherit; }
.map-pop { font-size: 13px; min-width: 180px; }
.map-pop b { font-size: 14px; }

/* ---------- 업로드 */
.drop { border: 2px dashed var(--line-2); border-radius: 12px; padding: 36px; text-align: center; background: var(--surface-2); cursor: pointer; }
.drop.over { border-color: var(--cyan); background: var(--hover); }
.map-table td select { width: 100%; }
.err { color: var(--red); }

/* ---------- 모달·토스트 */
.modal-bg { position: fixed; inset: 0; background: rgba(12, 25, 45, .45); display: flex; align-items: flex-start; justify-content: center; z-index: 2000; padding: 6vh 16px; overflow: auto; }
.modal { background: var(--surface); border-radius: 14px; width: 640px; max-width: 100%; box-shadow: 0 18px 50px rgba(10, 25, 45, .3); overflow: hidden; }
.modal header { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal header h3 { margin: 0; font-size: 16px; color: var(--ink); }
.modal header button { margin-left: auto; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--ink-3); }
.modal .body { padding: 18px; }
.modal footer { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 3000; display: flex; flex-direction: column; gap: 6px; }
#toast div { background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: 0 8px 24px rgba(10, 25, 45, .3); }
#toast div.e { background: var(--red); }
#toast div.link { cursor: pointer; border-left: 4px solid #3cc8ff; }
#toast div.link:hover { filter: brightness(1.15); }
.combo { position: relative; }
.combo-list { position: absolute; z-index: 10; top: 100%; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; max-height: 220px; overflow: auto; box-shadow: 0 8px 20px rgba(10, 25, 45, .12); }
.combo-list div { padding: 6px 10px; cursor: pointer; font-size: 13px; }
.combo-list div:hover, .combo-list div.on { background: var(--hover); }
.empty { padding: 30px; text-align: center; color: var(--ink-3); }

@media (max-width: 1280px) {
  .clock { display: none; }
}
@media (max-width: 1100px) {
  .g3, .g-2-1, .g-1-2 { grid-template-columns: minmax(0, 1fr); }
  .map-layout { grid-template-columns: 1fr; height: auto; }
  #map { height: 60vh; }
}
@media (max-width: 900px) {
  .side { position: fixed; left: -230px; transition: left .2s; box-shadow: 0 0 30px rgba(10, 25, 45, .2); }
  .side.open { left: 0; }
}
@media (max-width: 760px) {
  .gnb { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px; }
  .gnb-right { width: 100%; margin-left: 0; }
  .g2, .form { grid-template-columns: minmax(0, 1fr); }
  #view { padding: 12px 10px 40px; }
  .stepper .t { display: none; }
}
@media print {
  .gnb, .side, .no-print { display: none !important; }
}

/* ---------- 로그인 */
body.login-mode .shell, body.login-mode #toast:empty { display: none; }
#login-root:empty { display: none; }
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr); background: var(--surface); }
.login-hero {
  position: relative; overflow: hidden; color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: flex-end;
  background: radial-gradient(900px 600px at 40% 40%, #12305a, #071426 75%);
}
.login-map { position: absolute; inset: 6% -4% 22% -2%; width: 106%; height: 72%; }
.login-map path { fill: rgba(60, 200, 255, .07); stroke: rgba(120, 215, 255, .55); stroke-width: 1.4; }
.login-map path.rv { fill: none; stroke: rgba(43, 159, 232, .55); stroke-width: 2.2; }
.login-brand { position: relative; display: flex; gap: 14px; align-items: center; }
.login-brand .brand-mark { width: 46px; height: 46px; color: #3cc8ff; }
.login-brand small { display: block; color: #9fb8d6; font-size: 14px; }
.login-brand b { font-size: 28px; letter-spacing: -.02em; }
.login-copy { position: relative; color: #b8cbe2; font-size: 15px; line-height: 1.7; margin: 16px 0 0; }
.login-form { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 48px clamp(28px, 6vw, 88px); max-width: 520px; width: 100%; justify-self: center; }
.login-form h2 { font-size: 26px; margin: 0 0 8px; color: var(--navy); }
.login-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.login-form input { height: 46px; font-size: 15px; }
.login-form .btn { height: 48px; justify-content: center; font-size: 16px; font-weight: 700; margin-top: 6px; }
.login-form .err { min-height: 18px; font-size: 13px; }
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-hero { min-height: 230px; padding: 28px 24px; }
  .login-map { inset: 4% -10% 30% -10%; width: 120%; height: 70%; }
  .login-brand b { font-size: 22px; }
  .login-copy { display: none; }
  .login-form { padding: 28px 24px; justify-content: flex-start; }
}

/* ---------- 내 정보 메뉴 */
.user-wrap { position: relative; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); }
.user-chip:hover { border-color: var(--cyan); }
.user-chip .av { width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.who-txt { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.who-txt b { font-size: 13px; }
.who-txt small { font-size: 11px; color: var(--ink-3); }
.user-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(10, 25, 45, .18); padding: 6px; z-index: 1000; }
.user-menu .um-head { padding: 10px 12px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; }
.user-menu .um-head span { font-size: 12px; color: var(--ink-3); }
.user-menu button { display: block; width: 100%; text-align: left; font: inherit; border: 0; background: none; padding: 9px 12px; border-radius: 8px; cursor: pointer; color: var(--ink); }
.user-menu button:hover { background: var(--hover); }
.user-menu button.danger { color: var(--red); }
@media (max-width: 760px) { .who-txt { display: none; } .user-chip { padding: 3px; } }

/* 쪽 나눔 */
.pager { display: flex; gap: 4px; align-items: center; }
.pager button { min-width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-family: var(--num); font-weight: 600; cursor: pointer; color: var(--ink-2); }
.pager button:hover:not(:disabled) { border-color: var(--cyan); color: var(--cyan); }
.pager button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.pager button:disabled { opacity: .35; cursor: default; }
.pager span { color: var(--ink-3); padding: 0 2px; }
.tbl tbody tr:nth-child(even) td { background: var(--surface-2); }
.tbl tbody tr:hover td { background: var(--hover); }

#offline-bar { position: fixed; left: 50%; top: calc(10px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 3000; background: var(--amber); color: #fff; font-weight: 700; font-size: 13px; padding: 8px 16px; border-radius: 999px; box-shadow: 0 6px 18px rgba(10, 25, 45, .25); }
:root[data-theme="dark"] .pr-일반 { background: rgba(163, 181, 202, .12); }
:root[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(120, 160, 210, .3); }

/* ---------- 3D 상세 지도 */
.map3d-wrap { position: relative; min-height: 0; }
.map3d-wrap #map { position: absolute; inset: 0; height: auto; overflow: hidden; }
.map3d-tools { position: absolute; left: 12px; top: 12px; z-index: 2; display: flex; gap: 8px; flex-wrap: wrap; }
.map3d-tools .seg { display: flex; background: rgba(8, 18, 32, .82); border: 1px solid rgba(120, 200, 255, .35); border-radius: 10px; overflow: hidden; backdrop-filter: blur(6px); }
.map3d-tools .seg button, .m3-btn { font: inherit; font-size: 13px; font-weight: 600; color: #cfe3f7; background: none; border: 0; padding: 7px 12px; cursor: pointer; }
.map3d-tools .seg[hidden] { display: none; }
.map3d-tools .seg button.on { background: rgba(60, 200, 255, .25); color: #fff; }
.m3-btn { background: rgba(8, 18, 32, .82); border: 1px solid rgba(120, 200, 255, .35); border-radius: 10px; backdrop-filter: blur(6px); }
.map3d-note { position: absolute; right: 12px; bottom: 30px; z-index: 2; font-size: 11px; color: #cfe3f7; background: rgba(8, 18, 32, .7); padding: 3px 8px; border-radius: 6px; }
.hq-marker { display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.hq-marker span { width: 20px; height: 20px; border-radius: 50%; background: #3cc8ff; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(60, 200, 255, .3), 0 0 18px #3cc8ff; }
.hq-marker b { font-size: 12px; color: #fff; background: rgba(6, 22, 40, .88); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.mini-pin { width: 18px; height: 18px; border-radius: 50%; background: var(--green); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.mini-pin.bad { background: var(--red); }
.maplibregl-popup-content { background: var(--surface); color: var(--ink); border-radius: 12px; box-shadow: 0 10px 30px rgba(10, 25, 45, .3); }
.maplibregl-popup-tip { border-top-color: var(--surface) !important; border-bottom-color: var(--surface) !important; }
.maplibregl-popup-close-button { color: var(--ink-3); font-size: 18px; }
.map3d-wrap { min-height: 460px; }
.map3d-tools .seg button, .m3-btn { white-space: nowrap; }
@media (max-width: 1100px) { .map3d-wrap { height: 72vh; } }
@media (max-width: 760px) { .map3d-wrap { height: 78vh; min-height: 380px; } .map3d-note { display: none; } }

/* ---------- 장애 처리: 원인 유형·외부 대기·접수 종류 */
.form label.chk { flex-direction: row; align-items: center; gap: 8px; grid-column: 1 / -1; font-size: 13px; color: var(--ink); }
.form label.chk input { width: auto; }
.form label.chk small { color: var(--ink-3); }
.wait-box { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--line-2); font-size: 13px; }
.wait-box select, .wait-box input { padding: 4px 8px; font-size: 13px; }
.wait-box input { flex: 1; min-width: 120px; }
.wait-box.on { border: 1px solid var(--amber); background: var(--bad-bg); }
.wait-box.on b { color: var(--amber); }
.seg-pick { display: flex; gap: 6px; margin-bottom: 14px; }
.seg-pick button { flex: 1; font: inherit; font-weight: 600; padding: 9px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.seg-pick button.on { border-color: var(--cyan); color: var(--cyan); background: var(--hover); }
.center-only { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); margin-bottom: 12px; }
.center-only select { width: 100%; font-size: 14px; }

/* ---------- 월간 보고서 (홍천군 양식 미리보기) */
.report-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.paper { background: #fff; color: #111; border: 1px solid var(--line); border-radius: 6px; padding: 40px 48px; max-width: 900px; width: 100%; justify-self: center;
  box-shadow: 0 6px 24px rgba(10, 25, 45, .12); font-size: 13px; line-height: 1.6; }
.paper .muted { color: #777; }
.rtitle { text-align: center; font-size: 20px; font-weight: 800; padding: 14px; border: 2px solid #1f3b5c; margin-bottom: 18px; }
.rtitle small { display: block; font-size: 15px; font-weight: 600; margin-top: 2px; }
.rtitle.sub { font-size: 17px; border-width: 1px; background: #f2f6fb; }
.rsec { font-size: 15px; margin: 22px 0 8px; padding: 4px 0; border-top: 2px solid #1f3b5c; border-bottom: 1px solid #b8c4d2; color: #1f3b5c; }
.rlist { margin: 4px 0 6px; padding-left: 18px; list-style: none; }
.rlist > li::before { content: "□ "; margin-left: -18px; }
.rlist ul { padding-left: 18px; margin: 2px 0; list-style: none; }
.rlist ul li::before { content: "- "; }
.rnote { margin: 4px 0 4px 18px; font-size: 12px; color: #444; }
.rtbl { width: 100%; border-collapse: collapse; margin: 6px 0 8px; font-size: 12.5px; }
.rtbl th, .rtbl td { border: 1px solid #9aa8b8; padding: 5px 7px; text-align: center; }
.rtbl th { background: #dbe6f2; font-weight: 700; }
.rtbl.small th, .rtbl.small td { font-size: 11.5px; padding: 4px 5px; }
.rtbl.matrix td:first-child { text-align: left; white-space: nowrap; }
.rtbl b.ext { color: #c2410c; }
.rkpis { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #9aa8b8; margin: 6px 0 10px; }
.rkpis > div { padding: 8px 10px; border-left: 1px solid #c9d3df; display: flex; flex-direction: column; }
.rkpis > div:first-child { border-left: 0; }
.rkpis span { font-size: 11.5px; color: #555; }
.rkpis b { font-size: 20px; color: #1f3b5c; font-family: var(--num); }
.rkpis b.sm { font-size: 13px; font-family: inherit; }
.rkpis small { font-size: 11px; color: #666; }
.rpage { border-top: 2px dashed #c9d3df; margin: 34px -48px 26px; }
.notes { position: sticky; top: 72px; }
.notes .nf { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.notes textarea, .notes input { width: 100%; font-size: 13px; font-weight: 400; }
@media (max-width: 1100px) { .report-layout { grid-template-columns: 1fr; } .notes { position: static; } }
@media (max-width: 760px) { .paper { padding: 20px 14px; } .rkpis { grid-template-columns: repeat(2, 1fr); } .rpage { margin: 24px -14px 18px; } .rtbl { display: block; overflow-x: auto; } }
@media print { .report-layout { display: block; } .paper { box-shadow: none; border: 0; padding: 0; max-width: none; } .rpage { border: 0; page-break-before: always; margin: 0; } }

/* ---------- 지역 3D 모델 */
.m3-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 8px; }
.m3-kpis div { background: rgba(120, 160, 210, .1); border-radius: 10px; padding: 8px 10px; }
.m3-kpis b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.m3-kpis span { font-size: 12px; color: var(--ink-3); }
.m3-kpis .alert b { color: var(--red); }
.m3-layers { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: 13px; margin-bottom: 10px; }
.m3-layers label { display: flex; gap: 6px; align-items: center; }
.m3-net { margin-bottom: 6px; }
.m3-net span { cursor: pointer; }
.model3d .map-panel { overflow-y: auto; }

/* ---------- 화재감시 카메라 배치 (지도만 화면 가득) */

/* ---------- 전사 등록(org.js) */
.org-tabs { margin: 0; }
.org-tabs button { flex: none; padding: 7px 18px; }
.org-sep { grid-column: 1 / -1; margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.org-role { font-size: 11px; padding: 0 5px; background: var(--hover); color: var(--cyan); }
.form select[multiple] { min-height: 86px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
