/* =========================================================
   黄浦消防 · 防火风险预警与战训联动平台
   Design tokens & application styles
   ========================================================= */
:root {
  --ink: #10212B;
  --ink-2: #203844;
  --muted: #657880;
  --muted-2: #8A9AA1;
  --line: #DEE5E7;
  --line-soft: #E9EEEF;
  --paper: #F3F5F4;
  --card: #FFFFFF;
  --navy: #0B1C26;
  --navy-2: #102A38;
  --navy-3: #173A4A;
  --red: #CB4A38;
  --red-deep: #A9372A;
  --red-soft: #FBECE8;
  --orange: #DF7D32;
  --orange-soft: #FCF1E6;
  --gold: #B99332;
  --gold-soft: #F8F3E2;
  --green: #3F8468;
  --green-soft: #EAF4EF;
  --blue: #2F6F8E;
  --blue-soft: #EAF2F6;
  --shadow-sm: 0 1px 2px rgba(16, 33, 43, .04), 0 4px 14px rgba(16, 33, 43, .03);
  --shadow-md: 0 8px 30px rgba(7, 25, 34, .10);
  --shadow-lg: 0 24px 60px rgba(4, 17, 24, .20);
  --radius: 14px;
  --radius-lg: 18px;
  --font: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --num: "Bahnschrift", "DIN Alternate", "DIN Condensed", "Arial Narrow", sans-serif;
  --rail-w: 236px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.55;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 14% -4%, rgba(203, 74, 56, .055), transparent 30%),
    radial-gradient(circle at 94% 4%, rgba(47, 111, 142, .06), transparent 32%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
b, strong { font-weight: 700; }
::selection { background: rgba(203, 74, 56, .18); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 18px; height: 18px; display: inline-block; vertical-align: -3px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 999; padding: 10px 16px; border-radius: 8px;
  background: #fff; color: var(--ink); box-shadow: var(--shadow-md); transition: top .2s;
}
.skip-link:focus { top: 12px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #C9D3D6; border-radius: 20px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }
.no-scroll { overflow: hidden; }

/* ---------- App shell ---------- */
.app-shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; z-index: 40; display: flex; flex-direction: column;
  color: #EAF1F2; padding: 22px 14px 16px; overflow: hidden;
  background:
    radial-gradient(circle at 14% 0%, rgba(203, 74, 56, .20), transparent 34%),
    radial-gradient(circle at 100% 80%, rgba(44, 106, 129, .16), transparent 44%),
    linear-gradient(180deg, #0E222D 0%, #0A1A23 58%, #07141B 100%);
  border-right: 1px solid rgba(255, 255, 255, .04);
}
.rail::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .3;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, #000, transparent 70%);
}
.rail > * { position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 22px; }
.brand-mark {
  width: 42px; height: 42px; flex: none; display: grid; place-items: center; color: #fff;
  border-radius: 12px; border: 1px solid rgba(255, 255, 255, .18);
  background: linear-gradient(145deg, #DE5A42 0%, #B5392A 55%, #8E281E 100%);
  box-shadow: 0 8px 20px rgba(180, 52, 40, .28), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-text { min-width: 0; }
.brand-text strong { display: block; font-size: 17.5px; letter-spacing: 1.5px; line-height: 1.2; font-weight: 700; white-space: nowrap; }
.brand-text span { display: block; margin-top: 4px; font-family: var(--num); font-size: 8px; letter-spacing: 1.7px; color: #8FAAB4; white-space: nowrap; }
.nav-label { font-size: 9.5px; letter-spacing: 1.8px; color: #6F8B96; padding: 0 12px; margin: 10px 0 8px; font-family: var(--num); }
.nav-list { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px; width: 100%; height: 44px;
  padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: #A9BEC7;
  font-size: 13.5px; text-align: left; transition: background .18s, color .18s, transform .18s;
}
.nav-item .icon { color: #7E9AA5; transition: color .18s; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item:hover .icon { color: #D5E3E7; }
.nav-item.is-active { color: #fff; background: linear-gradient(90deg, rgba(203, 74, 56, .24), rgba(255, 255, 255, .055)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .045); }
.nav-item.is-active::before { content: ""; position: absolute; left: 0; top: 11px; bottom: 11px; width: 3px; border-radius: 0 4px 4px 0; background: #E4644C; box-shadow: 0 0 12px rgba(228, 100, 76, .6); }
.nav-item.is-active .icon { color: #F19A86; }
.nav-badge {
  margin-left: auto; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  display: grid; place-items: center; background: #D04B39; color: #fff; font-family: var(--num); font-size: 10.5px; font-weight: 700;
}
.rail-spacer { flex: 1; }
.rail-identity {
  margin: 14px 2px 10px; padding: 12px; border-radius: 11px;
  background: rgba(255, 255, 255, .055); border: 1px solid rgba(255, 255, 255, .07);
}
.rail-identity .ri-label { font-size: 10px; letter-spacing: 1.2px; color: #7F9AA4; font-family: var(--num); }
.rail-identity .ri-name { display: flex; align-items: center; gap: 7px; margin-top: 5px; font-size: 13px; color: #F2F7F8; font-weight: 600; }
.rail-identity .ri-name .live-dot { flex: none; }
.rail-identity .ri-meta { margin-top: 3px; font-size: 11px; color: #8BA4AD; }
.rail-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px 0; border-top: 1px solid rgba(255, 255, 255, .07); margin-top: 2px; }
.rail-foot span { font-size: 10px; color: #69818B; }
.rail-reset { border: 0; background: transparent; color: #8AA4AE; padding: 4px; border-radius: 6px; display: grid; place-items: center; }
.rail-reset:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 66px; flex: none; display: flex; align-items: center; gap: 18px; padding: 0 28px;
  background: rgba(247, 249, 248, .84); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30;
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.topbar-brand { display: none; align-items: center; gap: 9px; }
.topbar-brand .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
.topbar-brand .brand-mark svg { width: 21px; height: 21px; }
.topbar-brand strong { font-size: 14.5px; letter-spacing: .5px; white-space: nowrap; }
.crumb { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; color: var(--muted); }
.crumb .sep { color: #C2CED2; font-family: var(--num); }
.crumb strong { color: var(--ink-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 12px; flex: none; }
.online-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px 0 8px; border-radius: 20px;
  font-size: 10.5px; color: #427A63; background: #E9F3EE; border: 1px solid #D3E6DC; white-space: nowrap;
}
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #3F9A75; box-shadow: 0 0 0 3px rgba(63, 154, 117, .12); }
.online-chip.is-offline { color: #8B6A3D; background: #F8F1E4; border-color: #EADDC5; }
.online-chip.is-offline .live-dot { background: #C58B3C; box-shadow: 0 0 0 3px rgba(197, 139, 60, .14); }
.top-clock { text-align: right; line-height: 1.15; padding-right: 2px; }
.top-clock b { display: block; font-family: var(--num); font-size: 15px; letter-spacing: .4px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.top-clock span { display: block; margin-top: 2px; font-size: 9.5px; color: var(--muted-2); letter-spacing: .3px; }
.icon-button {
  position: relative; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid transparent; background: transparent; color: #546B75; transition: background .16s, border-color .16s, color .16s;
}
.icon-button:hover { background: #fff; border-color: var(--line); color: var(--ink); }
.icon-button .notif-badge {
  position: absolute; top: 4px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px;
  display: grid; place-items: center; background: var(--red); color: #fff; font-family: var(--num); font-size: 9.5px; font-weight: 700;
  border: 2px solid #F7F9F8;
}
.role-switch { display: flex; align-items: center; gap: 3px; padding: 3px; background: #E8ECEC; border-radius: 9px; }
.role-switch button {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 0; border-radius: 7px;
  background: transparent; color: #627780; font-size: 11.5px; white-space: nowrap; transition: all .16s;
}
.role-switch button .icon { width: 14px; height: 14px; }
.role-switch button.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(16, 33, 43, .12); font-weight: 600; }
.station-picker {
  height: 34px; min-width: 118px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  color: var(--ink-2); font-size: 12px; padding: 0 8px; outline: 0;
}
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(16, 33, 43, .16); }
.topbar-mobile-menu { display: none; }

.content { padding: 24px 28px 34px; max-width: 1780px; width: 100%; margin: 0 auto; }
.page { animation: pageFade .28s ease; }
@keyframes pageFade { from { opacity: 0; } to { opacity: 1; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.eyebrow { display: flex; align-items: center; gap: 8px; font-family: var(--num); font-size: 9.5px; letter-spacing: 1.7px; color: var(--muted-2); text-transform: uppercase; margin-bottom: 7px; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--red); opacity: .8; }
.page-head h1 { font-size: 28px; line-height: 1.2; letter-spacing: -.4px; font-weight: 700; }
.page-head h1 em { font-style: normal; color: var(--red); }
.page-head .page-sub { margin-top: 7px; color: var(--muted); font-size: 12.5px; max-width: 760px; }
.page-head .head-actions { display: flex; align-items: center; gap: 9px; flex: none; }
.head-meta { display: flex; align-items: center; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.meta-pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 6px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: 10.5px; }
.meta-pill b { color: var(--ink-2); font-family: var(--num); font-weight: 700; }

/* ---------- Buttons / pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px;
  border: 1px solid transparent; border-radius: 9px; background: #fff; color: var(--ink); font-size: 12.5px; font-weight: 600;
  white-space: nowrap; transition: background .16s, border-color .16s, box-shadow .16s, transform .16s;
}
.btn .icon { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 5px 14px rgba(203, 74, 56, .2); }
.btn-primary:hover { background: #B94031; box-shadow: 0 7px 18px rgba(203, 74, 56, .26); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); }
.btn-outline { border-color: var(--line); color: var(--ink-2); }
.btn-outline:hover { border-color: #C4D0D4; background: #FBFCFC; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: #EDF1F1; color: var(--ink); }
.btn-soft { background: var(--red-soft); color: var(--red-deep); }
.btn-soft:hover { background: #F8E2DD; }
.btn-sm { height: 31px; padding: 0 10px; font-size: 11.5px; border-radius: 7px; }
.btn-sm .icon { width: 14px; height: 14px; }
.btn-lg { height: 46px; padding: 0 20px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; pointer-events: none; }
.link-btn { border: 0; background: transparent; color: var(--red-deep); font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; padding: 3px 0; }
.link-btn:hover { text-decoration: underline; }
.link-btn .icon { width: 13px; height: 13px; }

.grade-tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 7px 0 5px; border-radius: 5px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.grade-tag b { width: 14px; height: 14px; display: grid; place-items: center; border-radius: 3px; color: #fff; font-family: var(--num); font-size: 9px; font-weight: 800; }
.grade-tag.g-a { color: #A33426; background: #FBECE8; } .grade-tag.g-a b { background: #D54836; }
.grade-tag.g-b { color: #9D5A1E; background: #FCF1E6; } .grade-tag.g-b b { background: #DE7A2E; }
.grade-tag.g-c { color: #82681E; background: #F8F3E2; } .grade-tag.g-c b { background: #B99332; }
.grade-tag.g-d { color: #2F6B54; background: #EAF4EF; } .grade-tag.g-d b { background: #3F8468; }
.grade-square {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 8px;
  color: #fff; font-family: var(--num); font-size: 16px; font-weight: 800; line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28);
}
.grade-square.g-a { background: linear-gradient(145deg, #DD5642, #B63B2B); }
.grade-square.g-b { background: linear-gradient(145deg, #E58B41, #C76821); }
.grade-square.g-c { background: linear-gradient(145deg, #CAA644, #A58225); }
.grade-square.g-d { background: linear-gradient(145deg, #4E9377, #356E59); }
.grade-square.sm { width: 26px; height: 26px; border-radius: 6px; font-size: 12px; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 20px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.st-waiting { color: #8A6B25; background: #F8F2E1; }
.st-done { color: #35725B; background: #E9F4EE; }
.st-overdue { color: #AC3A2A; background: #FBEAE6; }
.st-pending { color: #A46022; background: #FCF0E3; }
.st-feedback { color: #2F6481; background: #EAF2F6; }
.st-closed { color: #35725B; background: #E9F4EE; }
.warn-pill { display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 7px; border-radius: 5px; font-size: 9.5px; font-weight: 600; white-space: nowrap; }
.warn-pill .icon { width: 11px; height: 11px; }
.warn-red { color: #AE3425; background: #FBE9E5; border: 1px solid #F5D5CE; }
.warn-orange { color: #9A571C; background: #FCF0E3; border: 1px solid #F3DFC9; }
.warn-yellow { color: #82671B; background: #F8F3E1; border: 1px solid #ECE2C2; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 5px; background: #F1F4F4; color: #5F747C; font-size: 10px; }
.tag-line { border: 1px solid var(--line); background: #fff; }
.mono { font-family: var(--num); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.tiny { font-size: 10.5px; }
.text-red { color: var(--red-deep); }
.text-green { color: var(--green); }
.nowrap { white-space: nowrap; }

/* ---------- Cards / common layout ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.card-head h3 { font-size: 14px; font-weight: 700; letter-spacing: -.1px; }
.card-head p { margin-top: 3px; font-size: 10.5px; color: var(--muted-2); }
.card-body { padding: 16px 18px 18px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line-soft); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-title h2 { font-size: 15px; font-weight: 700; }
.section-title p { font-size: 11px; color: var(--muted-2); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi-grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi-card {
  position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 14px 15px 13px;
  box-shadow: var(--shadow-sm); min-width: 0;
}
.kpi-card::before { content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 100%; background: var(--accent, var(--navy)); opacity: .8; }
.kpi-card::after { content: ""; position: absolute; right: -32px; top: -38px; width: 100px; height: 100px; border-radius: 50%; background: var(--accent, var(--navy)); opacity: .045; }
.kpi-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.kpi-label .icon { width: 14px; height: 14px; color: var(--accent, var(--navy)); opacity: .9; }
.kpi-value { display: flex; align-items: baseline; gap: 3px; margin-top: 6px; font-family: var(--num); font-size: 29px; line-height: 1.1; letter-spacing: -.4px; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi-value small { font-family: var(--font); font-size: 10.5px; font-weight: 500; color: var(--muted-2); letter-spacing: 0; }
.kpi-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 7px; font-size: 9.5px; color: var(--muted-2); }
.kpi-foot b { color: var(--accent, var(--green)); font-weight: 600; font-family: var(--num); }
.kpi-card .sparkline { position: absolute; right: 9px; bottom: 10px; width: 60px; height: 22px; opacity: .8; }
.kpi-card.accent-red { --accent: var(--red); }
.kpi-card.accent-orange { --accent: var(--orange); }
.kpi-card.accent-gold { --accent: var(--gold); }
.kpi-card.accent-green { --accent: var(--green); }
.kpi-card.accent-blue { --accent: var(--blue); }
.kpi-card.accent-navy { --accent: var(--navy); }
.two-col { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.empty-state { padding: 34px 18px; text-align: center; color: var(--muted-2); font-size: 12px; }
.empty-state .icon { width: 30px; height: 30px; color: #B8C6CA; margin-bottom: 8px; }
.empty-state strong { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 3px; }

/* ---------- Search / filter ---------- */
.search-box { position: relative; display: flex; align-items: center; }
.search-box .icon { position: absolute; left: 10px; width: 15px; height: 15px; color: #94A5AB; pointer-events: none; }
.search-box input { width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: #FAFBFB; padding: 0 10px 0 32px; font-size: 12px; outline: 0; transition: border-color .16s, box-shadow .16s; }
.search-box input:focus { border-color: #C6A29B; box-shadow: 0 0 0 3px rgba(203, 74, 56, .07); background: #fff; }
.filter-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border: 1px solid var(--line);
  border-radius: 7px; background: #fff; color: var(--muted); font-size: 10.5px; white-space: nowrap; transition: all .15s;
}
.chip:hover { border-color: #C7D2D6; color: var(--ink); }
.chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip .count { font-family: var(--num); font-size: 9.5px; opacity: .7; }
.chip-grade { padding-left: 6px; }
.chip-grade b { width: 15px; height: 15px; display: grid; place-items: center; border-radius: 3px; color: #fff; font-family: var(--num); font-size: 8.5px; }
.chip-grade.c-a b { background: #D54836; } .chip-grade.c-b b { background: #DE7A2E; } .chip-grade.c-c b { background: #B99332; } .chip-grade.c-d b { background: #3F8468; }
.chip-grade.is-active b { background: rgba(255, 255, 255, .22); }
.switch-line { display: inline-flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--muted); cursor: pointer; user-select: none; }
.switch { position: relative; width: 30px; height: 17px; border-radius: 10px; background: #D6DFE1; transition: background .16s; flex: none; }
.switch::after { content: ""; position: absolute; width: 13px; height: 13px; left: 2px; top: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); transition: transform .16s; }
.switch.is-on { background: var(--red); }
.switch.is-on::after { transform: translateX(13px); }
.select { height: 34px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 11.5px; padding: 0 8px; color: var(--ink-2); outline: 0; }
.select:focus { border-color: #C6A29B; }

/* ---------- Map page ---------- */
.map-page { display: flex; flex-direction: column; height: calc(100dvh - 66px - 58px); min-height: 620px; overflow: hidden; }
.map-page .page-head { margin-bottom: 15px; flex: none; }
.map-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 13px; flex: 1; min-height: 0; }
.map-side { display: flex; flex-direction: column; min-height: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.map-side-top { padding: 13px 13px 0; flex: none; }
.map-side .search-box { margin-bottom: 10px; }
.side-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 8px; overflow: hidden; margin-bottom: 11px; }
.side-stat { background: #fff; padding: 7px 6px 6px; }
.side-stat span { display: block; font-size: 8.5px; color: var(--muted-2); white-space: nowrap; }
.side-stat strong { display: block; margin-top: 1px; font-family: var(--num); font-size: 18px; line-height: 1.15; letter-spacing: -.2px; }
.side-stat strong small { font-family: var(--font); font-size: 8.5px; font-weight: 500; color: var(--muted-2); margin-left: 1px; }
.side-stat.s-red strong { color: var(--red-deep); }
.side-stat.s-orange strong { color: var(--orange); }
.side-stat.s-gold strong { color: var(--gold); }
.side-stat.s-green strong { color: var(--green); }
.side-filters { display: flex; flex-direction: column; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }
.side-filter-row { display: flex; align-items: center; gap: 6px; }
.side-filter-row .filter-row { flex: 1; gap: 4px; }
.side-filter-row .chip { height: 25px; padding: 0 6px; font-size: 9.5px; }
.side-filter-row .chip-grade { padding-left: 4px; gap: 3px; }
.side-filter-row .chip-grade b { width: 13px; height: 13px; font-size: 8px; }
.side-sort { display: flex; align-items: center; gap: 6px; font-size: 9.5px; color: var(--muted-2); }
.side-sort select { border: 0; background: transparent; color: var(--ink-2); font-size: 10px; font-weight: 600; outline: 0; padding: 0 2px; }
.side-list-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 13px 6px; flex: none; }
.side-list-head strong { font-size: 10px; letter-spacing: .6px; color: var(--muted-2); font-family: var(--num); }
.side-list-head span { font-size: 9.5px; color: var(--muted-2); }
.unit-list { flex: 1; overflow-y: auto; padding: 0 8px 10px; min-height: 0; }
.unit-row {
  position: relative; display: flex; align-items: flex-start; gap: 9px; width: 100%; padding: 9px 7px;
  border: 0; border-bottom: 1px solid #EFF3F3; border-radius: 7px; background: transparent; text-align: left;
  transition: background .14s;
}
.unit-row:hover { background: #F6F8F8; }
.unit-row.is-active { background: #F7EFED; }
.unit-row.is-active::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2.5px; border-radius: 3px; background: var(--red); }
.unit-row .grade-square { width: 29px; height: 29px; border-radius: 7px; font-size: 13px; margin-top: 1px; }
.unit-row-main { flex: 1; min-width: 0; }
.unit-row-main strong { display: block; font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.45; }
.unit-row-main small { display: block; margin-top: 2px; font-size: 9.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unit-row-meta { flex: none; text-align: right; padding-top: 1px; }
.unit-row-meta em { display: block; font-family: var(--num); font-style: normal; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.unit-row-meta em small { font-size: 8px; color: var(--muted-2); font-weight: 500; margin-left: 1px; }
.unit-row-meta .warn-pill { margin-top: 4px; height: 18px; font-size: 8.5px; padding: 0 5px; }
.map-side-foot { flex: none; padding: 9px 13px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #FCFDFD; }
.map-side-foot span { font-size: 9px; color: var(--muted-2); }
.map-side-foot b { font-family: var(--num); color: var(--ink-2); }

.map-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; border-radius: var(--radius); background: #dfe8ea; border: 1px solid #17313D; box-shadow: 0 12px 34px rgba(4, 17, 24, .16); }
.map-stage:fullscreen { border-radius: 0; border: 0; width: 100vw; height: 100vh; }
#risk-map-host, .risk-map-host, .baidu-map-host { position: absolute; inset: 0; z-index: 1; }
#risk-map-host[hidden], .risk-map-host[hidden], .baidu-map-host[hidden] { display: none; }
#risk-map-host > svg { width: 100%; height: 100%; display: block; cursor: grab; }
#risk-map-host > svg.is-dragging { cursor: grabbing; }
.map-topbar { position: absolute; left: 13px; top: 13px; right: 13px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; z-index: 4; pointer-events: none; }
.map-topbar > * { pointer-events: auto; }
.map-title-glass {
  display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px 11px; border-radius: 9px;
  background: rgba(7, 23, 31, .68); border: 1px solid rgba(152, 185, 196, .14); backdrop-filter: blur(10px);
  color: #EAF3F5;
}
.map-title-glass .map-live { width: 6px; height: 6px; border-radius: 50%; background: #54B78C; box-shadow: 0 0 0 4px rgba(84, 183, 140, .12); flex: none; animation: livePulse 2.6s infinite; }
@keyframes livePulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(84, 183, 140, .1); } 50% { box-shadow: 0 0 0 6px rgba(84, 183, 140, .03); } }
.map-title-glass strong { font-size: 11.5px; font-weight: 600; letter-spacing: .3px; white-space: nowrap; }
.map-title-glass span { font-size: 9px; color: #90B0BA; white-space: nowrap; }
.map-tools { display: flex; align-items: center; gap: 5px; }
.glass-btn {
  height: 31px; display: inline-flex; align-items: center; gap: 5px; padding: 0 9px; border-radius: 7px;
  border: 1px solid rgba(152, 185, 196, .16); background: rgba(7, 23, 31, .68); color: #BBD0D7;
  font-size: 9.5px; backdrop-filter: blur(10px); transition: all .15s;
}
.glass-btn:hover { background: rgba(18, 48, 61, .86); color: #fff; }
.glass-btn.is-active { background: rgba(203, 74, 56, .82); border-color: rgba(255, 255, 255, .12); color: #fff; }
.glass-btn .icon { width: 13px; height: 13px; }
.map-zoom { position: absolute; right: 13px; bottom: 46px; z-index: 4; display: flex; flex-direction: column; gap: 4px; }
.map-zoom button {
  width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid rgba(152, 185, 196, .16);
  border-radius: 7px; background: rgba(7, 23, 31, .68); color: #C6D8DE; backdrop-filter: blur(10px); font-size: 16px;
}
.map-zoom button:hover { background: rgba(18, 48, 61, .86); color: #fff; }
.map-zoom button .icon { width: 15px; height: 15px; }
.map-legend { position: absolute; left: 13px; bottom: 13px; z-index: 4; display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; max-width: calc(100% - 80px); padding: 7px 10px; border-radius: 8px; background: rgba(7, 23, 31, .64); border: 1px solid rgba(152, 185, 196, .12); backdrop-filter: blur(8px); }
.legend-item { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; color: #A6BEC6; white-space: nowrap; }
.legend-item i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.legend-item i.sq { border-radius: 2px; }
.legend-item i.fwd { border-radius: 50%; background: #2C7A7B; box-shadow: 0 0 0 2px rgba(44, 122, 123, .2); }
.legend-divider { width: 1px; height: 11px; background: rgba(255, 255, 255, .12); }
.map-data-note { position: absolute; right: 14px; bottom: 14px; z-index: 4; font-size: 8.5px; color: #6F8A94; font-family: var(--num); letter-spacing: .3px; }
.map-empty { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: rgba(5, 18, 25, .55); backdrop-filter: blur(2px); }
.map-empty div { text-align: center; color: #9DB4BC; font-size: 12px; }
.map-empty .icon { width: 28px; height: 28px; margin-bottom: 6px; opacity: .6; }
.map-detail {
  position: absolute; top: 13px; right: 13px; bottom: 13px; width: 352px; z-index: 5; display: flex; flex-direction: column;
  background: rgba(255, 255, 255, .985); border-radius: 13px; box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
  border: 1px solid rgba(255, 255, 255, .5); animation: drawerIn .24s ease both; overflow: hidden;
}
@keyframes drawerIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.map-detail-head { padding: 14px 15px 11px; border-bottom: 1px solid var(--line-soft); position: relative; flex: none; }
.map-detail-head .close-btn { position: absolute; top: 10px; right: 10px; width: 27px; height: 27px; border-radius: 6px; border: 0; background: #F0F3F3; color: #74878E; display: grid; place-items: center; }
.map-detail-head .close-btn:hover { background: #E7ECEC; color: var(--ink); }
.map-detail-head .eyebrow { margin-bottom: 8px; font-size: 8.5px; }
.map-detail-title { display: flex; align-items: flex-start; gap: 9px; padding-right: 24px; }
.map-detail-title h2 { font-size: 17px; line-height: 1.3; letter-spacing: -.2px; }
.map-detail-title .sub { margin-top: 3px; font-size: 10px; color: var(--muted); }
.map-detail-body { overflow-y: auto; padding: 12px 15px 14px; flex: 1; min-height: 0; }
.map-detail-foot { flex: none; padding: 10px 14px; border-top: 1px solid var(--line-soft); background: #FBFCFC; display: flex; gap: 7px; }
.map-detail-foot .btn { flex: 1; height: 35px; font-size: 11.5px; }
.risk-summary { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 9px; background: linear-gradient(135deg, #F7F9F8, #F1F5F4); border: 1px solid #E7ECEC; margin-bottom: 11px; }
.risk-summary .ring { flex: none; }
.ring { position: relative; display: inline-grid; place-items: center; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring > span { position: relative; font-family: var(--num); font-size: 15px; font-weight: 700; line-height: 1; }
.ring > span em { font-style: normal; font-size: 7px; color: var(--muted-2); margin-left: 1px; }
.risk-summary .rs-main { flex: 1; min-width: 0; }
.risk-summary .rs-main strong { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.risk-summary .rs-main p { margin-top: 4px; font-size: 9.5px; color: var(--muted); line-height: 1.5; }
.detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; margin-bottom: 11px; }
.detail-meta div { padding: 6px 0; border-bottom: 1px dashed #E8EDEE; min-width: 0; }
.detail-meta span { display: block; font-size: 8.5px; color: var(--muted-2); }
.detail-meta strong { display: block; margin-top: 1px; font-size: 10.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-block { margin-top: 11px; }
.detail-block-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.detail-block-head strong { font-size: 10.5px; font-weight: 700; }
.detail-block-head span { font-size: 9px; color: var(--muted-2); }
.warning-callout { display: flex; gap: 8px; padding: 8px 9px; border-radius: 7px; border: 1px solid; font-size: 9.5px; line-height: 1.5; }
.warning-callout .icon { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.warning-callout strong { display: block; font-size: 10px; margin-bottom: 1px; }
.warning-callout.red { background: #FCF0ED; border-color: #F5D8D1; color: #8D3D31; }
.warning-callout.orange { background: #FDF5EC; border-color: #F2DFC9; color: #83531F; }
.warning-callout.yellow { background: #FAF6E8; border-color: #EBE1C1; color: #75611F; }
.risk-mini-list { display: flex; flex-direction: column; gap: 5px; }
.risk-mini { display: flex; align-items: flex-start; gap: 7px; padding: 7px 8px; border-radius: 6px; background: #F7F9F9; border: 1px solid #EDF1F1; }
.risk-mini .rm-dot { width: 5px; height: 5px; border-radius: 50%; margin-top: 5px; flex: none; }
.risk-mini .rm-body { flex: 1; min-width: 0; }
.risk-mini .rm-body strong { display: block; font-size: 9.5px; font-weight: 600; line-height: 1.4; }
.risk-mini .rm-body span { display: block; margin-top: 1px; font-size: 8.5px; color: var(--muted-2); }
.risk-mini .status-pill { height: 18px; font-size: 8px; padding: 0 5px; }
.detail-facilities { display: flex; flex-wrap: wrap; gap: 4px; }
.facility-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 4px; background: #F2F6F5; font-size: 8.5px; color: #4E6A62; }
.facility-chip::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: #4A9478; }
.facility-chip.warn { background: #FBEFEA; color: #9A4F3D; }
.facility-chip.warn::before { background: #D16149; }

/* ---------- Baidu static map ---------- */
.bd-map-viewport { position: absolute; inset: 0; overflow: hidden; touch-action: none; user-select: none; cursor: grab; background: #e6edef; }
.bd-map-viewport.is-dragging { cursor: grabbing; }
.bd-map-pan { position: absolute; inset: 0; will-change: transform; }
.bd-map-image { width: 100%; height: 100%; object-fit: fill; display: block; pointer-events: none; filter: saturate(.93) contrast(.98); }
.bd-map-boundary-host { position: absolute; inset: 0; pointer-events: none; }
.bd-map-boundary { width: 100%; height: 100%; display: block; }
.bd-map-boundary path { fill: rgba(201, 74, 54, .055); stroke: #C94634; stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.bd-boundary-label { position: absolute; transform: translate(-50%, -50%); padding: 2px 6px; border-radius: 4px; background: rgba(201, 74, 54, .92); color: #fff; font-size: 8.5px; letter-spacing: .6px; box-shadow: 0 2px 8px rgba(102, 35, 25, .22); pointer-events: none; z-index: 2; }
.bd-map-markers { position: absolute; inset: 0; z-index: 3; }
.bd-marker { position: absolute; width: 30px; height: 30px; padding: 0; border: 0; background: transparent; transform: translate(-50%, -50%); z-index: 3; cursor: pointer; }
.bd-marker-dot { position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--c); color: #fff; border: 2px solid #fff; box-shadow: 0 3px 10px rgba(9, 28, 37, .35); font-family: var(--num); font-size: 10px; font-weight: 800; line-height: 1; transition: box-shadow .16s, transform .16s; }
.bd-marker:hover .bd-marker-dot, .bd-marker:focus-visible .bd-marker-dot { transform: scale(1.08); box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--c), 0 4px 14px rgba(9, 28, 37, .4); }
.bd-marker.is-selected { z-index: 6; }
.bd-marker.is-selected .bd-marker-dot { box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--c), 0 5px 18px rgba(9, 28, 37, .45); }
.bd-marker-pulse { position: absolute; left: -4px; top: -4px; width: 38px; height: 38px; border: 2px solid var(--w); border-radius: 50%; opacity: 0; animation: bdPulse 2.8s ease-out infinite; pointer-events: none; }
.bd-marker.has-warning .bd-marker-pulse { opacity: .75; }
.bd-marker-badge { position: absolute; right: 1px; top: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--w); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .22); }
@keyframes bdPulse { 0% { transform: scale(.65); opacity: .65; } 70% { transform: scale(1.7); opacity: 0; } 100% { transform: scale(1.7); opacity: 0; } }
.bd-marker-tip { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: 6px; background: rgba(8, 25, 34, .94); color: #fff; box-shadow: 0 8px 20px rgba(7, 22, 29, .3); opacity: 0; pointer-events: none; transition: opacity .14s; white-space: nowrap; text-align: left; }
.bd-marker-tip b { font-size: 10px; font-weight: 600; }
.bd-marker-tip em { font-style: normal; font-size: 8.5px; color: #A9C0C8; }
.bd-marker:hover .bd-marker-tip, .bd-marker:focus-visible .bd-marker-tip { opacity: 1; }
.bd-station { position: absolute; width: 23px; height: 23px; padding: 0; transform: translate(-50%, -50%); border-radius: 5px; border: 2px solid #E1B45A; background: #102A38; color: #F0D295; z-index: 2; cursor: pointer; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(9, 28, 37, .3); }
.bd-station span { font-size: 9px; font-weight: 700; line-height: 1; }
.bd-station em { position: absolute; top: 25px; left: 50%; transform: translateX(-50%); padding: 1px 4px; border-radius: 2px; background: rgba(255, 255, 255, .9); color: #38515B; font-style: normal; font-size: 8px; white-space: nowrap; opacity: 0; transition: opacity .14s; pointer-events: none; }
.bd-station:hover em, .bd-station:focus-visible em { opacity: 1; }
.bd-forward { position: absolute; width: 22px; height: 22px; padding: 0; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid #fff; background: #2C7A7B; color: #fff; z-index: 2; cursor: pointer; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(9, 28, 37, .28); }
.bd-forward span { font-size: 9px; font-weight: 700; line-height: 1; }
.bd-forward em { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); padding: 1px 4px; border-radius: 2px; background: rgba(255, 255, 255, .92); color: #285A5B; font-style: normal; font-size: 8px; white-space: nowrap; opacity: 0; transition: opacity .14s; pointer-events: none; }
.bd-forward:hover em, .bd-forward:focus-visible em { opacity: 1; }
.bd-map-loading { position: absolute; inset: 0; z-index: 7; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(244, 248, 248, .68); backdrop-filter: blur(2px); color: #536D77; font-size: 10px; }
.baidu-map-host.is-loading .bd-map-loading { display: flex; }
.bd-spinner { width: 24px; height: 24px; border: 2px solid #C4D2D6; border-top-color: #C94634; border-radius: 50%; animation: bdSpin .8s linear infinite; }
@keyframes bdSpin { to { transform: rotate(360deg); } }
.bd-map-error { position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(9, 28, 37, .52); }
.bd-map-error[hidden] { display: none; }
.bd-map-error-card { width: min(300px, 100%); padding: 20px; background: #fff; border-radius: 12px; box-shadow: 0 18px 50px rgba(0, 0, 0, .25); text-align: center; }
.bd-map-error-icon { width: 34px; height: 34px; margin: 0 auto 9px; display: grid; place-items: center; border-radius: 50%; background: var(--red-soft); color: var(--red-deep); font-family: var(--num); font-size: 18px; font-weight: 700; }
.bd-map-error-card strong { display: block; font-size: 13px; }
.bd-map-error-card p { margin: 5px 0 13px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.bd-map-error-actions { display: flex; justify-content: center; gap: 7px; }
.map-stage.has-baidu .map-legend { bottom: 44px; }
.map-stage.has-baidu .map-data-note { color: #54717C; right: 56px; bottom: 15px; }
@media (max-width: 820px) {
  .bd-marker-tip { display: none; }
  .bd-station em, .bd-forward em { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bd-marker-pulse, .bd-spinner { animation: none; }
}

/* map SVG internals */
.risk-map-svg { background: #071922; user-select: none; touch-action: none; }
.map-road { stroke: #3B606E; opacity: .48; }
.map-road.is-major { stroke-width: 2.1; opacity: .6; }
.map-road.is-minor { stroke-width: 1; stroke-dasharray: 3 2; opacity: .4; }
.map-road-label { fill: #88A7B2; font-size: 8.2px; letter-spacing: 1.1px; opacity: .76; }
.street-label circle { fill: #C7A03A; opacity: .8; }
.street-label text { fill: #9AB6BF; font-size: 8.8px; letter-spacing: 1.2px; opacity: .82; }
.water-label { fill: #44717F; font-size: 11px; letter-spacing: 7px; font-weight: 500; opacity: .75; }
.water-label.is-small { font-size: 9px; letter-spacing: 5px; fill: #3D6876; }
.compass-text { fill: #88A4AE; font-size: 8px; font-family: var(--num); letter-spacing: 1px; }
.scale-text { fill: #7C99A3; font-size: 6.5px; font-family: var(--num); }
.map-disclaimer { fill: #54717C; font-size: 7px; letter-spacing: .6px; }
.station-marker { cursor: pointer; outline: none; }
.station-halo { fill: #0B1C26; opacity: .55; }
.station-box { fill: #102A38; stroke: #E1B45A; stroke-width: 1.2; }
.station-icon { fill: none; stroke: #F0D295; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.station-name { fill: #C1D3D9; font-size: 8.2px; text-anchor: middle; letter-spacing: .4px; opacity: .86; }
.station-marker:hover .station-box, .station-marker:focus-visible .station-box { fill: #173A4A; stroke: #FFE3A8; }
.forward-marker { cursor: pointer; outline: none; }
.forward-halo { fill: #2C7A7B; opacity: .22; }
.forward-dot { fill: #2C7A7B; stroke: #E8F6F4; stroke-width: 1.2; }
.forward-label { fill: #D8F1EF; font-size: 7px; font-weight: 700; }
.forward-marker:hover .forward-dot, .forward-marker:focus-visible .forward-dot { fill: #3A9495; stroke: #fff; }
.unit-marker { cursor: pointer; outline: none; }
.marker-back { transition: opacity .15s; }
.marker-core { transition: r .15s, stroke-width .15s; }
.unit-marker:hover .marker-core, .unit-marker:focus-visible .marker-core { r: 9; stroke-width: 2; }
.marker-letter { font-family: var(--num); letter-spacing: 0; pointer-events: none; }
.marker-selected { animation: selectedSpin 12s linear infinite; }
@keyframes selectedSpin { to { transform: rotate(360deg); } }
.marker-pulse { opacity: 0; transform-origin: center; animation: markerPulse 2.8s ease-out infinite; }
.unit-marker.warning-red .marker-pulse { opacity: .9; animation-duration: 2s; }
.unit-marker.warning-orange .marker-pulse { opacity: .5; }
.unit-marker.warning-yellow .marker-pulse { opacity: .28; animation-duration: 3.6s; }
@keyframes markerPulse {
  0% { transform: scale(.7); opacity: .8; }
  70% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}
.marker-tooltip { opacity: 0; pointer-events: none; transition: opacity .15s; }
.tooltip-bg { fill: #F8FBFC; stroke: rgba(7, 23, 31, .22); stroke-width: .8; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .3)); }
.tooltip-name { fill: #142A34; font-size: 9.5px; font-weight: 700; }
.tooltip-meta { fill: #688089; font-size: 7.5px; }
.unit-marker:hover .marker-tooltip, .unit-marker:focus-visible .marker-tooltip { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .marker-pulse, .marker-selected, .map-title-glass .map-live { animation: none; }
}

/* ---------- Units page ---------- */
.units-toolbar { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; flex-wrap: wrap; }
.units-toolbar .search-box { width: 260px; }
.units-toolbar .toolbar-spacer { flex: 1; }
.unit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.unit-card {
  position: relative; display: flex; flex-direction: column; min-height: 212px; padding: 14px 15px 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-sm);
  cursor: pointer; text-align: left; overflow: hidden; transition: transform .16s, box-shadow .16s, border-color .16s;
}
.unit-card::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: var(--grade-color, var(--navy)); opacity: .9; }
.unit-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(16, 33, 43, .09); border-color: #CED9DC; }
.unit-card.g-a { --grade-color: #D54836; } .unit-card.g-b { --grade-color: #DE7A2E; } .unit-card.g-c { --grade-color: #B99332; } .unit-card.g-d { --grade-color: #3F8468; }
.unit-card-top { display: flex; align-items: flex-start; gap: 9px; }
.unit-card-top .grade-square { margin-top: 1px; }
.unit-card-title { flex: 1; min-width: 0; }
.unit-card-title h3 { font-size: 14px; line-height: 1.35; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unit-card-title p { margin-top: 2px; font-size: 9.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unit-score { flex: none; text-align: right; }
.unit-score b { display: block; font-family: var(--num); font-size: 19px; line-height: 1.05; }
.unit-score span { font-size: 8px; color: var(--muted-2); }
.unit-card-warning { margin-top: 10px; }
.unit-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 9px; }
.unit-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 11px; border-top: 1px solid var(--line-soft); }
.unit-card-foot .uc-metrics { display: flex; align-items: center; gap: 10px; }
.unit-card-foot .uc-metrics span { font-size: 9px; color: var(--muted-2); }
.unit-card-foot .uc-metrics b { display: block; font-family: var(--num); font-size: 12px; color: var(--ink-2); font-weight: 700; }
.unit-card-foot .icon { width: 15px; height: 15px; color: #A0B0B5; }

/* ---------- Four-lists page ---------- */
.four-summary {
  display: flex; align-items: center; gap: 13px; padding: 13px 15px; margin-bottom: 13px;
  border: 1px solid #EFE1C9; border-radius: 12px; background: linear-gradient(110deg, #FDF8ED, #FBFCFB);
}
.four-summary-icon { width: 36px; height: 36px; flex: none; border-radius: 9px; display: grid; place-items: center; background: #F8EED8; color: #9D7829; }
.four-summary-copy { flex: 1; min-width: 0; }
.four-summary-copy strong { display: block; font-size: 12px; }
.four-summary-copy p { margin-top: 2px; color: #78663F; font-size: 10px; line-height: 1.55; }
.four-summary-stats { display: flex; gap: 18px; flex: none; }
.four-summary-stats span { font-size: 8.5px; color: #8B7950; text-align: center; }
.four-summary-stats b { display: block; font-family: var(--num); font-size: 19px; line-height: 1.15; color: #72581E; }
.four-card { overflow: hidden; }
.four-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.four-toolbar .search-box { width: 236px; }
.four-toolbar .filter-row { flex: 1; gap: 5px; }
.four-toolbar .select { max-width: 148px; height: 30px; font-size: 10px; }
.four-toolbar .switch-line { white-space: nowrap; }
.four-count { margin-left: auto; white-space: nowrap; }
.four-dot { display: inline-block; width: 6px; height: 6px; border-radius: 2px; margin-right: 1px; }
.four-table { width: 100%; border-collapse: collapse; }
.four-table th { text-align: left; padding: 9px 12px; background: #F8FAF9; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line); font-size: 8.5px; letter-spacing: .4px; font-weight: 600; color: var(--muted-2); white-space: nowrap; }
.four-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); font-size: 10.5px; vertical-align: middle; }
.four-table tbody tr { cursor: pointer; transition: background .14s; }
.four-table tbody tr:hover { background: #FAFCFC; }
.four-table tbody tr:last-child td { border-bottom: 0; }
.four-cat { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 4px; font-size: 9px; font-weight: 600; white-space: nowrap; }
.four-name { min-width: 160px; max-width: 320px; }
.four-name strong { display: block; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.four-name small { display: block; margin-top: 2px; font-size: 9px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.four-extra { display: block; max-width: 170px; margin-top: 2px; font-size: 8px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.four-hazard-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; max-width: 300px; }
.four-hazard-cell small { display: block; max-width: 100%; font-size: 8.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.four-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line-soft); background: #FBFCFC; }
.four-pager-btns { display: flex; gap: 6px; }

/* ---------- Training ---------- */
.page-tabs { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.page-tab { position: relative; border: 0; background: transparent; padding: 9px 14px 11px; color: var(--muted); font-size: 12px; font-weight: 500; }
.page-tab:hover { color: var(--ink); }
.page-tab.is-active { color: var(--ink); font-weight: 700; }
.page-tab.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--red); border-radius: 2px; }
.page-tab .tab-count { display: inline-grid; place-items: center; min-width: 17px; height: 17px; margin-left: 5px; padding: 0 4px; border-radius: 9px; background: #EDF1F1; color: var(--muted); font-family: var(--num); font-size: 9px; vertical-align: 1px; }
.page-tab.is-active .tab-count { background: var(--red-soft); color: var(--red-deep); }
.plan-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.plan-card {
  position: relative; display: flex; gap: 12px; padding: 13px 14px 12px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-sm); transition: border-color .16s, box-shadow .16s;
}
.plan-card:hover { border-color: #CDD8DB; box-shadow: 0 6px 18px rgba(16, 33, 43, .06); }
.plan-card.is-overdue { border-left: 3px solid #D15A45; }
.plan-date { flex: none; width: 52px; text-align: center; padding-top: 1px; }
.plan-date b { display: block; font-family: var(--num); font-size: 24px; line-height: 1.05; letter-spacing: -.5px; color: var(--ink); }
.plan-date span { display: block; margin-top: 2px; font-size: 8.5px; color: var(--muted-2); }
.plan-date .plan-due-tag { display: inline-block; margin-top: 5px; padding: 1px 4px; border-radius: 3px; background: #F5F0E2; color: #8A6D23; font-size: 7.5px; font-family: var(--font); }
.plan-card.is-overdue .plan-date .plan-due-tag { background: #FBEAE6; color: #AC3A2A; }
.plan-card.is-done .plan-date .plan-due-tag { background: #E9F4EE; color: #35725B; }
.plan-card.is-done .plan-progress-bar i { background: linear-gradient(90deg, #4E9377, #79B49C); }
.plan-main { flex: 1; min-width: 0; }
.plan-topline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.plan-topline .plan-type { font-size: 9px; color: var(--muted-2); }
.plan-main h3 { margin-top: 4px; font-size: 13px; line-height: 1.4; font-weight: 700; }
.plan-main .plan-unit { margin-top: 3px; font-size: 10px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.plan-main .plan-unit .icon { width: 11px; height: 11px; }
.plan-meta { display: flex; align-items: center; gap: 9px; margin-top: 7px; flex-wrap: wrap; font-size: 9px; color: var(--muted-2); }
.plan-meta span { display: inline-flex; align-items: center; gap: 3px; }
.plan-meta .icon { width: 11px; height: 11px; }
.plan-progress { margin-top: 9px; }
.plan-progress-bar { height: 4px; border-radius: 4px; background: #EDF1F1; overflow: hidden; }
.plan-progress-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #D35A45, #E49462); }
.plan-progress-label { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; font-size: 8.5px; color: var(--muted-2); }
.plan-actions { display: flex; align-items: center; gap: 5px; margin-top: 9px; }
.plan-actions .btn { height: 29px; font-size: 10.5px; padding: 0 9px; }
.plan-score { display: flex; align-items: center; gap: 5px; font-family: var(--num); font-size: 18px; font-weight: 700; color: var(--green); margin-left: auto; }
.record-list { display: flex; flex-direction: column; gap: 8px; }
.record-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; transition: border-color .15s, background .15s;
}
.record-row:hover { border-color: #CDD8DB; background: #FDFEFE; }
.record-icon { width: 34px; height: 34px; flex: none; border-radius: 8px; display: grid; place-items: center; background: #EEF4F1; color: #4D846D; }
.record-main { flex: 1; min-width: 0; }
.record-main strong { display: block; font-size: 12px; font-weight: 600; }
.record-main small { display: block; margin-top: 2px; font-size: 9.5px; color: var(--muted-2); }
.record-meta { display: flex; align-items: center; gap: 12px; flex: none; }
.record-meta span { text-align: right; font-size: 9px; color: var(--muted-2); }
.record-meta span b { display: block; font-family: var(--num); font-size: 13px; color: var(--ink-2); }
.training-hero {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 18px; border-radius: 13px; background: linear-gradient(120deg, #0E2632 0%, #143845 60%, #1C4350 100%);
  box-shadow: 0 8px 24px rgba(8, 30, 40, .14); color: #fff; margin-bottom: 13px;
}
.training-hero::after { content: ""; position: absolute; right: -30px; top: -55px; width: 230px; height: 230px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 0 0 34px rgba(255, 255, 255, .025), 0 0 0 68px rgba(255, 255, 255, .018); }
.training-hero .th-left { position: relative; z-index: 1; }
.training-hero .th-kicker { display: flex; align-items: center; gap: 6px; font-size: 9px; letter-spacing: 1.2px; color: #8DB0BC; font-family: var(--num); text-transform: uppercase; }
.training-hero h2 { margin-top: 5px; font-size: 19px; letter-spacing: -.2px; }
.training-hero p { margin-top: 4px; font-size: 10.5px; color: #A8C2CA; }
.training-hero .th-stats { position: relative; z-index: 1; display: flex; gap: 22px; padding-right: 6px; }
.training-hero .th-stat { text-align: center; }
.training-hero .th-stat b { display: block; font-family: var(--num); font-size: 26px; line-height: 1.05; }
.training-hero .th-stat span { display: block; margin-top: 3px; font-size: 9px; color: #93B3BD; }
.suggestion-card { border-left: 3px solid var(--gold); }
.suggestion-body { display: flex; align-items: flex-start; gap: 12px; }
.suggestion-icon { width: 36px; height: 36px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--gold-soft); color: #A18029; }
.suggestion-copy { flex: 1; min-width: 0; }
.suggestion-copy strong { font-size: 12px; }
.suggestion-copy p { margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.suggestion-basis { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.suggestion-basis span { padding: 2px 6px; border-radius: 4px; background: #F7F4E9; color: #8A7331; font-size: 8.5px; }
.train-tips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 15px; }
.train-tip { display: flex; gap: 10px; align-items: flex-start; padding: 12px 13px; border: 1px dashed #D6DFE1; border-radius: 10px; background: rgba(255, 255, 255, .55); }
.train-tip .tip-no { font-family: var(--num); font-size: 10px; font-weight: 700; color: #A6B4B9; letter-spacing: .6px; padding-top: 1px; }
.train-tip strong { display: block; font-size: 10.5px; }
.train-tip p { margin-top: 3px; font-size: 9.5px; color: var(--muted-2); line-height: 1.6; }

/* ---------- Assessment ---------- */
.assess-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.assess-table { width: 100%; border-collapse: collapse; }
.assess-table th { text-align: left; font-size: 9px; letter-spacing: .5px; color: var(--muted-2); font-weight: 600; padding: 9px 12px; background: #F8FAF9; border-bottom: 1px solid var(--line); white-space: nowrap; }
.assess-table td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); font-size: 11px; vertical-align: middle; }
.assess-table tr:last-child td { border-bottom: 0; }
.assess-table tbody tr { cursor: pointer; transition: background .14s; }
.assess-table tbody tr:hover { background: #FAFCFC; }
.assess-unit { display: flex; align-items: center; gap: 8px; min-width: 0; }
.assess-unit .grade-square { width: 27px; height: 27px; border-radius: 6px; font-size: 12px; }
.assess-unit strong { display: block; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.assess-unit small { display: block; font-size: 9px; color: var(--muted-2); }
.score-cell { display: flex; align-items: center; gap: 6px; }
.score-cell b { font-family: var(--num); font-size: 17px; line-height: 1; }
.score-cell span { font-size: 9px; }
.score-cell.s-excellent b { color: #2F7A5F; } .score-cell.s-good b { color: #2F6F8E; } .score-cell.s-pass b { color: #9B6C25; } .score-cell.s-fail b { color: #AE3A2A; }
.mini-score-bar { width: 46px; height: 3px; border-radius: 3px; background: #EDF1F1; overflow: hidden; }
.mini-score-bar i { display: block; height: 100%; border-radius: 3px; background: #4D8A73; }
.assess-side .insight-block { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.assess-side .insight-block:last-child { border-bottom: 0; }
.insight-block h4 { font-size: 10.5px; margin-bottom: 8px; color: var(--ink-2); }
.weak-list { display: flex; flex-direction: column; gap: 7px; }
.weak-item { display: flex; align-items: center; gap: 8px; }
.weak-item span { flex: 1; font-size: 10px; color: var(--muted); }
.weak-item b { font-family: var(--num); font-size: 11px; }
.weak-bar { width: 74px; height: 4px; border-radius: 4px; background: #EEF1F1; overflow: hidden; }
.weak-bar i { display: block; height: 100%; background: var(--red); border-radius: 4px; opacity: .8; }
.rect-summary { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 8px; background: #FBF7EA; border: 1px solid #EEE5C9; margin-bottom: 10px; }
.rect-summary .icon { color: #A78528; }
.rect-summary p { font-size: 10px; color: #775F20; }
.rect-summary strong { display: block; font-size: 11px; margin-bottom: 1px; }
.assess-detail-hero { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 10px; background: linear-gradient(135deg, #F6F9F8, #EDF4F1); border: 1px solid #E3ECE8; margin-bottom: 12px; }
.assess-detail-hero .hero-main { flex: 1; min-width: 0; }
.assess-detail-hero h3 { font-size: 15px; }
.assess-detail-hero p { margin-top: 3px; font-size: 10px; color: var(--muted); }
.assess-detail-hero .hero-score { text-align: center; flex: none; }
.assess-detail-hero .hero-score b { display: block; font-family: var(--num); font-size: 34px; line-height: 1; }
.assess-detail-hero .hero-score span { display: block; margin-top: 4px; font-size: 9px; color: var(--muted-2); }
.dim-list { display: flex; flex-direction: column; gap: 8px; }
.dim-row { display: flex; align-items: center; gap: 9px; }
.dim-row .dim-label { width: 66px; flex: none; font-size: 10px; color: var(--muted); }
.dim-row .dim-bar { flex: 1; height: 5px; border-radius: 5px; background: #EEF1F1; overflow: hidden; }
.dim-row .dim-bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #3F8468, #6EA98F); }
.dim-row b { width: 30px; text-align: right; font-family: var(--num); font-size: 11px; }
.dim-row.is-weak .dim-bar i { background: linear-gradient(90deg, #D05A45, #E08B66); }
.deficiency-list { display: flex; flex-wrap: wrap; gap: 5px; }
.deficiency-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 4px; background: #FBEDE9; color: #9C4433; font-size: 9px; }
.deficiency-chip .icon { width: 10px; height: 10px; }
.note-box { padding: 10px 12px; border-radius: 8px; background: #F8FAF9; border: 1px solid #E8EEEC; font-size: 10.5px; line-height: 1.7; color: #3C515A; }
.feedback-box { padding: 10px 12px; border-radius: 8px; background: #F2F7F5; border: 1px solid #DFEAE4; font-size: 10.5px; line-height: 1.7; }
.feedback-box strong { display: flex; align-items: center; gap: 5px; font-size: 10px; margin-bottom: 3px; color: #39725D; }
.assess-timeline { display: flex; flex-direction: column; gap: 0; margin-top: 4px; }
.timeline-item { position: relative; display: flex; gap: 9px; padding-bottom: 12px; }
.timeline-item::before { content: ""; position: absolute; left: 4px; top: 10px; bottom: 0; width: 1px; background: #E4EAEA; }
.timeline-item:last-child::before { display: none; }
.timeline-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; border: 2px solid #B9C7CB; background: #fff; margin-top: 3px; z-index: 1; }
.timeline-item.is-done .timeline-dot { border-color: var(--green); background: var(--green); }
.timeline-item.is-current .timeline-dot { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.timeline-copy strong { display: block; font-size: 10.5px; }
.timeline-copy span { display: block; margin-top: 1px; font-size: 9px; color: var(--muted-2); }

/* ---------- Analytics ---------- */
.analytics-grid { display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 13px; }
.analytics-grid .span-2 { grid-column: span 2; }
.donut-layout { display: flex; align-items: center; gap: 18px; }
.donut-legend { display: flex; flex-direction: column; gap: 7px; flex: 1; }
.donut-legend-row { display: flex; align-items: center; gap: 7px; font-size: 10px; }
.donut-legend-row i { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.donut-legend-row span { flex: 1; color: var(--muted); }
.donut-legend-row b { font-family: var(--num); font-size: 12px; }
.donut-legend-row em { font-style: normal; font-size: 8.5px; color: var(--muted-2); width: 28px; text-align: right; }
.bar-list { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 78px 1fr 38px; align-items: center; gap: 8px; }
.bar-label { min-width: 0; }
.bar-label span { display: block; font-size: 10px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-label em { display: block; font-style: normal; font-size: 8px; color: var(--muted-2); }
.bar-track { height: 6px; border-radius: 5px; background: #EFF2F2; overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 5px; transition: width .5s ease; }
.bar-row > .bar-value { font-family: var(--num); font-size: 11px; font-weight: 700; text-align: right; color: var(--ink-2); }
.bar-list.is-compact { gap: 7px; }
.bar-list.is-compact .bar-row { grid-template-columns: 66px 1fr 32px; }
.area-chart { width: 100%; height: auto; display: block; margin-top: 5px; }
.chart-grid { stroke: #EBF0F0; stroke-width: 1; }
.chart-axis { fill: #93A3A9; font-size: 8px; font-family: var(--num); }
.chart-legend { display: flex; align-items: center; gap: 12px; justify-content: flex-end; margin-top: 2px; }
.chart-legend span { display: flex; align-items: center; gap: 4px; font-size: 8.5px; color: var(--muted-2); }
.chart-legend i { width: 6px; height: 6px; border-radius: 2px; }
.radar-wrap { display: flex; align-items: center; justify-content: center; }
.radar-chart { width: 100%; max-width: 310px; height: auto; display: block; }
.radar-label { fill: #5C737B; font-size: 8px; }
.radar-value { fill: #223C47; font-size: 9px; font-family: var(--num); font-weight: 700; }
.ranking-list { display: flex; flex-direction: column; gap: 5px; }
.ranking-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed #E9EEEE; }
.ranking-row:last-child { border-bottom: 0; }
.rank-no { width: 19px; height: 19px; flex: none; display: grid; place-items: center; border-radius: 5px; background: #F1F4F4; font-family: var(--num); font-size: 9px; font-weight: 700; color: #7C8D93; }
.ranking-row:nth-child(1) .rank-no { background: #1D3C4B; color: #fff; }
.ranking-row:nth-child(2) .rank-no { background: #DCE5E8; color: #38515B; }
.ranking-row:nth-child(3) .rank-no { background: #F0E6D3; color: #84642E; }
.ranking-name { flex: 1; min-width: 0; }
.ranking-name strong { display: block; font-size: 10.5px; font-weight: 600; }
.ranking-name small { display: block; font-size: 8.5px; color: var(--muted-2); }
.ranking-score { text-align: right; }
.ranking-score b { font-family: var(--num); font-size: 14px; }
.ranking-score span { display: block; font-size: 8px; color: var(--muted-2); }
.insight-list { display: flex; flex-direction: column; gap: 8px; }
.insight-item { display: flex; gap: 8px; padding: 9px 10px; border-radius: 8px; background: #F7F9F8; border: 1px solid #E9EEEC; }
.insight-item .ins-icon { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: #FBEDE9; color: #B14A37; flex: none; }
.insight-item.ins-blue .ins-icon { background: #EAF2F6; color: #2F6F8E; }
.insight-item.ins-green .ins-icon { background: #EAF4EF; color: #3F8468; }
.insight-item .ins-icon .icon { width: 13px; height: 13px; }
.insight-item strong { display: block; font-size: 10px; }
.insight-item p { margin-top: 2px; font-size: 9.5px; color: var(--muted); line-height: 1.55; }
.heat-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; }
.heat-cell { aspect-ratio: 1; border-radius: 3px; position: relative; }
.heat-legend { display: flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 8px; color: var(--muted-2); }
.heat-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.donut-wrap { position: relative; flex: none; }
.donut { width: 100%; height: 100%; display: block; }
.donut-seg { transition: opacity .2s; }
.donut-seg:hover { opacity: .75; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut-center strong { font-family: var(--num); font-size: 27px; line-height: 1; letter-spacing: -.5px; }
.donut-center span { margin-top: 3px; font-size: 8.5px; color: var(--muted-2); }
.gauge-wrap { position: relative; flex: none; }
.gauge { width: 100%; height: auto; display: block; }
.gauge-center { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; }
.gauge-center strong { display: block; font-family: var(--num); font-size: 24px; line-height: 1; }
.gauge-center span { display: block; margin-top: 2px; font-size: 8px; color: var(--muted-2); }

/* ---------- Modal / drawer ---------- */
.overlay { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(4, 15, 21, .56); backdrop-filter: blur(3px); animation: fadeIn .18s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(760px, 100%); max-height: min(88vh, 900px); display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); animation: modalIn .24s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.modal.is-wide { width: min(920px, 100%); }
.modal.is-drawer { width: min(560px, 100%); margin-left: auto; height: 100%; max-height: 100%; border-radius: 16px 0 0 16px; animation: drawerIn .26s cubic-bezier(.2,.8,.2,1) both; }
.modal.is-large-drawer { width: min(680px, 100%); margin-left: auto; height: 100%; max-height: 100%; border-radius: 16px 0 0 16px; animation: drawerIn .26s cubic-bezier(.2,.8,.2,1) both; }
.overlay.is-right { justify-content: flex-end; padding: 0; }
.overlay.is-right .modal { max-height: 100vh; }
.modal-head { flex: none; display: flex; align-items: flex-start; gap: 12px; padding: 17px 20px 14px; border-bottom: 1px solid var(--line-soft); background: #fff; position: relative; }
.modal-head .mh-title { flex: 1; min-width: 0; }
.modal-head .eyebrow { margin-bottom: 5px; font-size: 8.5px; }
.modal-head h2 { font-size: 18px; line-height: 1.35; letter-spacing: -.2px; }
.modal-head p { margin-top: 3px; color: var(--muted); font-size: 10.5px; }
.modal-close { width: 31px; height: 31px; flex: none; display: grid; place-items: center; border: 0; border-radius: 7px; background: #F1F4F4; color: #72868D; }
.modal-close:hover { background: #E8EDED; color: var(--ink); }
.modal-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.modal-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line-soft); background: #FBFCFC; }
.modal-foot .foot-note { font-size: 9.5px; color: var(--muted-2); }
.modal-foot .foot-actions { display: flex; gap: 8px; margin-left: auto; }
.drawer-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); padding: 0 20px; flex: none; background: #fff; }
.drawer-tab { position: relative; border: 0; background: transparent; padding: 10px 12px 11px; color: var(--muted); font-size: 11.5px; }
.drawer-tab.is-active { color: var(--ink); font-weight: 700; }
.drawer-tab.is-active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--red); }
.drawer-tab .tab-count { margin-left: 4px; font-family: var(--num); font-size: 9px; color: var(--muted-2); }
.unit-profile-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.unit-profile-top .grade-square { width: 44px; height: 48px; font-size: 21px; border-radius: 10px; }
.unit-profile-top .upt-main { flex: 1; min-width: 0; }
.unit-profile-top h2 { font-size: 19px; line-height: 1.35; letter-spacing: -.3px; }
.unit-profile-top p { margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.unit-profile-top .upt-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 8px; overflow: hidden; margin-bottom: 14px; }
.profile-stat { background: #fff; padding: 9px 10px; }
.profile-stat span { font-size: 8.5px; color: var(--muted-2); display: block; }
.profile-stat b { display: block; font-family: var(--num); font-size: 18px; line-height: 1.2; margin-top: 2px; }
.profile-stat b small { font-family: var(--font); font-size: 8px; color: var(--muted-2); font-weight: 500; }
.profile-section { margin-top: 15px; }
.profile-section h3 { font-size: 12px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.profile-section h3 span { font-size: 9px; color: var(--muted-2); font-weight: 400; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.info-grid div { padding: 6px 0; border-bottom: 1px dashed #E8EDEE; min-width: 0; }
.info-grid span { display: block; font-size: 8.5px; color: var(--muted-2); }
.info-grid strong { display: block; font-size: 10.5px; font-weight: 600; word-break: break-all; }
.risk-point-card { display: flex; gap: 9px; padding: 10px; border-radius: 8px; border: 1px solid var(--line-soft); background: #FBFCFC; margin-bottom: 7px; }
.risk-level-bar { width: 3px; border-radius: 3px; flex: none; }
.risk-level-bar.lv-重大 { background: #D54836; } .risk-level-bar.lv-较大 { background: #DE7A2E; } .risk-level-bar.lv-一般 { background: #B99332; }
.risk-point-main { flex: 1; min-width: 0; }
.risk-point-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.risk-point-top strong { font-size: 11px; line-height: 1.45; font-weight: 600; }
.risk-point-top .status-pill { flex: none; }
.risk-point-main p { margin-top: 4px; font-size: 9.5px; color: var(--muted); line-height: 1.55; }
.risk-point-foot { display: flex; align-items: center; gap: 10px; margin-top: 5px; font-size: 8.5px; color: var(--muted-2); }
.risk-point-foot .link-btn { margin-left: auto; font-size: 9.5px; }
.timeline-log { display: flex; flex-direction: column; }
.log-item { position: relative; display: flex; gap: 9px; padding: 0 0 13px; }
.log-item::before { content: ""; position: absolute; left: 5px; top: 12px; bottom: 0; width: 1px; background: #E5EBEB; }
.log-item:last-child::before { display: none; }
.log-dot { width: 11px; height: 11px; flex: none; border-radius: 50%; border: 2px solid #B9C7CB; background: #fff; margin-top: 2px; }
.log-item.is-done .log-dot { border-color: var(--green); background: var(--green); }
.log-item.is-warn .log-dot { border-color: var(--red); background: var(--red); }
.log-copy strong { display: block; font-size: 10.5px; }
.log-copy span { display: block; margin-top: 1px; font-size: 9px; color: var(--muted-2); }
.profile-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 15px; }
.profile-actions .btn { flex: 1; min-width: 120px; }

/* ---------- Forms ---------- */
.form-section { margin-bottom: 18px; }
.form-section h3 { font-size: 12px; font-weight: 700; margin-bottom: 9px; display: flex; align-items: center; gap: 6px; }
.form-section h3 .num-badge { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 4px; background: var(--navy); color: #fff; font-family: var(--num); font-size: 9px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > label { font-size: 9.5px; color: var(--muted); font-weight: 500; }
.field > label em { color: var(--red); font-style: normal; }
.input, .textarea, .field select {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #FCFDFD; padding: 0 10px; height: 38px;
  font-size: 12px; color: var(--ink); outline: 0; transition: border-color .16s, box-shadow .16s;
}
.textarea { height: auto; min-height: 78px; padding: 9px 10px; resize: vertical; line-height: 1.6; }
.input:focus, .textarea:focus, .field select:focus { border-color: #C7A29B; box-shadow: 0 0 0 3px rgba(203, 74, 56, .06); background: #fff; }
.input::placeholder, .textarea::placeholder { color: #AAB8BC; }
.field-hint { font-size: 8.5px; color: var(--muted-2); }
.field-row { display: flex; gap: 8px; }
.field-row > .field { flex: 1; }
.radio-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.radio-card { position: relative; display: flex; align-items: center; gap: 7px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 10.5px; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card .rc-dot { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid #C5D0D3; flex: none; }
.radio-card:has(input:checked) { border-color: #C68D82; background: #FDF7F5; }
.radio-card:has(input:checked) .rc-dot { border-color: var(--red); box-shadow: inset 0 0 0 3px #fff; background: var(--red); }
.check-row { display: flex; align-items: flex-start; gap: 7px; padding: 7px 0; font-size: 10.5px; color: var(--muted); }
.check-row input { margin-top: 2px; accent-color: var(--red); }
.tag-select { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-option { border: 1px solid var(--line); background: #fff; border-radius: 5px; padding: 4px 8px; font-size: 9.5px; color: var(--muted); }
.tag-option.is-active { background: #FBEDE9; border-color: #EBC6BD; color: #9C4433; font-weight: 600; }
.form-note { padding: 9px 10px; border-radius: 7px; background: #F7F9F8; border: 1px solid #E9EEEC; font-size: 9.5px; color: var(--muted); line-height: 1.6; }
.form-note b { color: var(--ink-2); }

/* ---------- Training wizard ---------- */
.wizard-overlay { position: fixed; inset: 0; z-index: 140; background: #F3F5F4; display: flex; flex-direction: column; overflow: hidden; animation: fadeIn .2s ease both; }
.wizard-top { flex: none; display: flex; align-items: center; gap: 14px; padding: 12px 22px; background: linear-gradient(110deg, #0B1C26, #12313E); color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.wizard-top .wz-brand { width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center; background: rgba(203, 74, 56, .18); border: 1px solid rgba(255, 255, 255, .12); color: #F09079; }
.wizard-top .wz-title { flex: 1; min-width: 0; }
.wizard-top .wz-title .wz-kicker { font-family: var(--num); font-size: 8px; letter-spacing: 1.5px; color: #86A6B1; text-transform: uppercase; }
.wizard-top .wz-title h2 { margin-top: 2px; font-size: 16px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wizard-top .wz-title p { margin-top: 2px; font-size: 9.5px; color: #9CB6BF; }
.wizard-timer { display: flex; align-items: center; gap: 9px; padding: 6px 11px; border-radius: 8px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); }
.wizard-timer .icon { width: 17px; height: 17px; color: #F0B088; }
.wizard-timer b { display: block; font-family: var(--num); font-size: 18px; line-height: 1.05; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.wizard-timer span { display: block; font-size: 8px; color: #90ADB7; }
.wizard-close { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .1); border-radius: 8px; background: transparent; color: #A7C0C8; }
.wizard-close:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.wizard-progress { flex: none; padding: 12px 22px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 0; overflow-x: auto; }
.wizard-step { display: flex; align-items: center; gap: 7px; flex: none; }
.wizard-step .ws-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #EDF1F1; color: #83969D; font-family: var(--num); font-size: 10px; font-weight: 700; border: 1px solid transparent; }
.wizard-step .ws-label { font-size: 10px; color: #899BA1; white-space: nowrap; }
.wizard-step.is-active .ws-num { background: var(--red); color: #fff; box-shadow: 0 0 0 4px var(--red-soft); }
.wizard-step.is-active .ws-label { color: var(--ink); font-weight: 700; }
.wizard-step.is-done .ws-num { background: #E9F4EE; color: #35725B; border-color: #D3E6DC; }
.wizard-step.is-done .ws-label { color: #5C776C; }
.wizard-line { width: 34px; height: 1px; background: #E4EAEA; margin: 0 9px; flex: none; }
.wizard-body { flex: 1; overflow-y: auto; padding: 20px 24px 110px; }
.wizard-inner { max-width: 960px; margin: 0 auto; }
.wizard-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-sm); padding: 18px 20px; margin-bottom: 12px; }
.wizard-card h3 { font-size: 15px; margin-bottom: 4px; }
.wizard-card .wz-desc { color: var(--muted); font-size: 11px; line-height: 1.65; }
.wizard-kicker { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; font-family: var(--num); font-size: 8.5px; letter-spacing: 1.4px; color: var(--muted-2); text-transform: uppercase; }
.wizard-kicker::before { content: ""; width: 14px; height: 1px; background: var(--red); }
.wizard-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.wizard-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; }
.checklist { display: flex; flex-direction: column; gap: 6px; }
.check-item { display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: #FCFDFD; cursor: pointer; transition: all .15s; }
.check-item:hover { border-color: #C9D5D8; }
.check-item.is-checked { background: #F2F8F5; border-color: #CDE4D9; }
.check-box { width: 18px; height: 18px; flex: none; border-radius: 5px; border: 1.5px solid #C6D2D5; display: grid; place-items: center; margin-top: 1px; background: #fff; color: transparent; }
.check-item.is-checked .check-box { background: var(--green); border-color: var(--green); color: #fff; }
.check-box .icon { width: 11px; height: 11px; stroke-width: 2.6; }
.check-copy { flex: 1; min-width: 0; }
.check-copy strong { display: block; font-size: 10.5px; font-weight: 600; line-height: 1.45; }
.check-copy > span { display: block; margin-top: 2px; font-size: 9px; color: var(--muted-2); line-height: 1.5; }
.check-copy .risk-level-tag { display: inline-block; margin-left: 5px; padding: 0 4px; border-radius: 3px; font-size: 7.5px; font-style: normal; }
.risk-level-tag.lv-重大 { background: #FBEAE6; color: #A93B2B; } .risk-level-tag.lv-较大 { background: #FCF0E3; color: #9A5B20; } .risk-level-tag.lv-一般 { background: #F8F3E1; color: #80661D; }
.check-note { margin-top: 6px; width: 100%; border: 1px solid #E3EAEA; border-radius: 5px; height: 28px; font-size: 9.5px; padding: 0 7px; background: #fff; outline: 0; }
.check-note:focus { border-color: #C7A29B; }
.wizard-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 141; display: flex; align-items: center; gap: 10px; padding: 12px 24px calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); backdrop-filter: blur(10px); }
.wizard-actions .wa-inner { width: 100%; max-width: 960px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.wizard-actions .wa-note { flex: 1; font-size: 10px; color: var(--muted-2); }
.wizard-actions .btn { height: 42px; padding: 0 18px; }
.step-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.step-summary .ss-item { padding: 10px; border-radius: 8px; background: #F7F9F8; text-align: center; }
.step-summary .ss-item b { display: block; font-family: var(--num); font-size: 20px; line-height: 1.1; }
.step-summary .ss-item span { display: block; margin-top: 3px; font-size: 8.5px; color: var(--muted-2); }
.geo-row { display: flex; align-items: stretch; gap: 6px; margin-top: 8px; }
.geo-row .form-note { flex: 1; display: flex; align-items: center; gap: 5px; }
.geo-row .btn { flex: none; height: auto; min-height: 36px; font-size: 9.5px; }
.wizard-brief { padding: 14px 18px 16px; }
.wizard-brief-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 18px; margin-top: 11px; }
.wizard-brief-grid div { min-width: 0; padding-top: 7px; border-top: 1px dashed #E5EBEC; }
.wizard-brief-grid span { display: block; font-size: 8.5px; color: var(--muted-2); }
.wizard-brief-grid strong { display: block; margin-top: 2px; font-size: 10.5px; font-weight: 600; line-height: 1.5; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photo-tile { aspect-ratio: 4 / 3; border-radius: 7px; border: 1px dashed #C9D5D8; background: linear-gradient(135deg, #F3F6F5, #E9EFED); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #8B9EA4; font-size: 8.5px; }
.photo-tile .icon { width: 17px; height: 17px; }
.photo-tile.is-photo { border-style: solid; border-color: #D8E1E2; background: linear-gradient(145deg, #17303C, #254B58); color: #B9CDD3; }
.signature-wrap { position: relative; border: 1px dashed #C9D5D8; border-radius: 8px; background: #FCFDFD; overflow: hidden; }
.signature-wrap canvas { display: block; width: 100%; height: 130px; touch-action: none; cursor: crosshair; }
.signature-clear { position: absolute; right: 7px; top: 7px; height: 24px; padding: 0 7px; border: 1px solid var(--line); border-radius: 5px; background: #fff; font-size: 8.5px; color: var(--muted); }
.signature-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; color: #B0BEC3; font-size: 10px; }
.signature-placeholder.is-hidden { display: none; }
.wizard-success { max-width: 560px; margin: 4vh auto 0; text-align: center; padding: 26px; }
.success-mark { width: 66px; height: 66px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: #E9F4EE; color: #3F8468; box-shadow: 0 0 0 10px rgba(63, 132, 104, .06); }
.success-mark .icon { width: 30px; height: 30px; stroke-width: 2; }
.wizard-success h2 { font-size: 24px; }
.wizard-success p { margin-top: 6px; color: var(--muted); font-size: 11.5px; }
.receipt { text-align: left; margin: 18px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.receipt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--line-soft); font-size: 10.5px; background: #fff; }
.receipt-row:last-child { border-bottom: 0; }
.receipt-row span { color: var(--muted); }
.receipt-row b { font-weight: 600; text-align: right; }

/* ---------- Assessment form ---------- */
.score-form { display: flex; flex-direction: column; gap: 11px; }
.score-dim { padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: #FCFDFD; }
.score-dim-top { display: flex; align-items: center; gap: 8px; }
.score-dim-top strong { font-size: 11.5px; }
.score-dim-top .weight { font-size: 8.5px; color: var(--muted-2); }
.score-dim-top .dim-score { margin-left: auto; font-family: var(--num); font-size: 19px; font-weight: 700; color: var(--ink); }
.score-dim-top .dim-score small { font-family: var(--font); font-size: 8px; color: var(--muted-2); font-weight: 400; }
.score-dim .dim-hint { margin-top: 2px; font-size: 8.5px; color: var(--muted-2); }
.score-dim input[type=range] { width: 100%; margin-top: 8px; accent-color: var(--red); height: 20px; }
.score-dim-bottom { display: flex; justify-content: space-between; font-size: 8px; color: var(--muted-2); margin-top: -2px; }
.score-total-box { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 10px; background: linear-gradient(120deg, #0F2632, #1B4351); color: #fff; margin-bottom: 12px; }
.score-total-box .stb-main { flex: 1; }
.score-total-box span { font-size: 9px; color: #94B0BA; }
.score-total-box h3 { margin-top: 2px; font-size: 14px; }
.score-total-box .stb-score { text-align: right; }
.score-total-box .stb-score b { display: block; font-family: var(--num); font-size: 32px; line-height: 1; }
.score-total-box .stb-score em { font-style: normal; font-size: 9px; color: #CDDDE2; }
.assess-inspector { display: flex; gap: 10px; padding: 10px 12px; border-radius: 8px; background: #F7F9F8; border: 1px solid #E9EEEC; margin-bottom: 12px; font-size: 10px; color: var(--muted); }
.assess-inspector strong { color: var(--ink-2); }

/* ---------- Inbox ---------- */
.inbox-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 20px; border-bottom: 1px solid var(--line-soft); }
.inbox-toolbar .filter-row { gap: 4px; }
.inbox-list { display: flex; flex-direction: column; }
.inbox-item { display: flex; gap: 9px; width: 100%; padding: 13px 20px; border: 0; border-bottom: 1px solid var(--line-soft); background: #fff; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: background .14s; position: relative; }
.inbox-item:hover { background: #FAFCFC; }
.inbox-item.is-unread { background: #FCFFFE; }
.inbox-item.is-unread::before { content: ""; position: absolute; left: 9px; top: 18px; width: 4px; height: 4px; border-radius: 50%; background: var(--red); }
.inbox-icon { width: 30px; height: 30px; flex: none; border-radius: 7px; display: grid; place-items: center; background: #EEF3F2; color: #547C70; }
.inbox-icon.t-assessment { background: #FBEDE9; color: #B14A37; }
.inbox-icon.t-warning { background: #FCF0E3; color: #A56427; }
.inbox-icon.t-plan { background: #EAF2F6; color: #33718D; }
.inbox-copy { flex: 1; min-width: 0; }
.inbox-copy strong { display: block; font-size: 11px; font-weight: 600; }
.inbox-copy p { margin-top: 2px; font-size: 9.5px; color: var(--muted); line-height: 1.55; }
.inbox-copy time { display: block; margin-top: 4px; font-size: 8.5px; color: var(--muted-2); font-family: var(--num); }
.inbox-empty { padding: 40px 20px; text-align: center; color: var(--muted-2); font-size: 11px; }

/* ---------- Toasts ---------- */
.toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.wizard-open .toast-root { top: 112px; bottom: auto; }
.toast {
  display: flex; align-items: flex-start; gap: 9px; min-width: 260px; max-width: 380px; padding: 11px 13px;
  background: #0C202A; color: #EAF2F4; border-radius: 9px; box-shadow: 0 12px 30px rgba(0, 0, 0, .24);
  border: 1px solid rgba(255, 255, 255, .08); animation: toastIn .22s ease both; pointer-events: auto;
}
.toast.is-out { animation: toastOut .2s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }
.toast .toast-icon { width: 24px; height: 24px; flex: none; border-radius: 6px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: #9AD0B7; }
.toast.t-warn .toast-icon { color: #F2B184; }
.toast.t-error .toast-icon { color: #F08C7A; }
.toast-copy { flex: 1; }
.toast-copy strong { display: block; font-size: 11px; }
.toast-copy span { display: block; margin-top: 1px; font-size: 9.5px; color: #A7BEC6; line-height: 1.5; }
.toast-close { border: 0; background: transparent; color: #7B949E; padding: 2px; }

/* ---------- Utilities / responsive ---------- */
.hide { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-6 { gap: 6px; }
.ml-auto { margin-left: auto; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-12 { margin-bottom: 12px; }
.text-right { text-align: right; }
.divider { height: 1px; background: var(--line-soft); margin: 12px 0; }

@media (max-width: 1360px) {
  .unit-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .map-layout { grid-template-columns: 318px minmax(0, 1fr); }
  .map-detail { width: 326px; }
  .top-clock { display: none; }
}
@media (max-width: 1180px) {
  :root { --rail-w: 206px; }
  .content { padding: 20px 22px 30px; }
  .topbar { padding: 0 22px; }
  .map-layout { grid-template-columns: 300px minmax(0, 1fr); }
  .map-detail { width: 318px; }
  .kpi-grid.cols-5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .analytics-grid { grid-template-columns: 1fr 1fr; }
  .analytics-grid .span-2 { grid-column: span 2; }
  .unit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-list { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .app-shell { display: block; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .rail { display: none; }
  .topbar { height: 58px; padding: 0 16px; gap: 10px; }
  .topbar-brand { display: flex; }
  .topbar-brand .brand-text, .topbar-brand .brand-mark + div { display: none; }
  .crumb { display: none; }
  .topbar-left { flex: none; }
  .topbar-right { margin-left: auto; gap: 7px; }
  .role-switch button { padding: 0 8px; }
  .station-picker { min-width: 104px; }
  .content { padding: 16px 16px 26px; }
  .page-head h1 { font-size: 24px; }
  .page-head .page-sub { font-size: 11.5px; }
  .bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: flex; align-items: stretch;
    height: calc(62px + env(safe-area-inset-bottom)); padding: 5px 8px env(safe-area-inset-bottom);
    background: rgba(10, 27, 36, .97); border-top: 1px solid rgba(255, 255, 255, .08); backdrop-filter: blur(14px);
  }
  .bottom-nav button { flex: 1; border: 0; background: transparent; color: #829CA6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 9px; border-radius: 8px; position: relative; }
  .bottom-nav button .icon { width: 20px; height: 20px; }
  .bottom-nav button.is-active { color: #F3F7F8; }
  .bottom-nav button.is-active::before { content: ""; position: absolute; top: -5px; width: 22px; height: 2px; border-radius: 2px; background: #E05B44; }
  .bottom-nav .bn-badge { position: absolute; top: 4px; right: calc(50% - 19px); min-width: 14px; height: 14px; padding: 0 3px; border-radius: 8px; background: #D04B39; color: #fff; font-family: var(--num); font-size: 8px; display: grid; place-items: center; }
  .map-page { height: calc(100dvh - 58px - 62px - 42px); min-height: 540px; }
  .map-layout { grid-template-columns: 285px minmax(0, 1fr); min-height: 0; }
  .map-detail { width: 300px; }
  .map-side .side-stats { grid-template-columns: repeat(4, 1fr); }
  .unit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr; }
  .assess-layout { grid-template-columns: 1fr; }
  .analytics-grid { grid-template-columns: 1fr 1fr; }
  .four-toolbar .search-box { width: 210px; }
  .modal.is-drawer, .modal.is-large-drawer { width: min(600px, 100%); }
}
@media (max-width: 820px) {
  .topbar-brand strong { display: none; }
  .role-switch button { padding: 0 8px; }
  .role-switch button .icon { width: 15px; height: 15px; }
  .station-picker { max-width: 96px; }
  .map-page { height: auto; min-height: 0; overflow: visible; }
  .map-layout { display: flex; flex-direction: column; min-height: 0; }
  .map-side { order: 2; max-height: 420px; }
  .map-stage { order: 1; min-height: 56vh; height: 60vh; }
  .map-detail { position: fixed; top: auto; left: 8px; right: 8px; bottom: calc(70px + env(safe-area-inset-bottom)); width: auto; height: min(62vh, 560px); max-height: calc(100dvh - 150px); border-radius: 14px; z-index: 90; }
  .marker-tooltip { display: none; }
  .map-page .page-head { margin-bottom: 12px; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .page-head .head-actions { width: 100%; flex-wrap: wrap; }
  .page-head .head-actions .btn { flex: 1; }
  .units-toolbar .search-box { width: 100%; }
  .unit-grid { grid-template-columns: 1fr; }
  .analytics-grid { grid-template-columns: 1fr; }
  .analytics-grid .span-2 { grid-column: span 1; }
  .unit-card { min-height: 196px; }
  .training-hero { flex-direction: column; align-items: flex-start; }
  .training-hero .th-stats { width: 100%; justify-content: flex-start; gap: 28px; }
  .four-summary { flex-wrap: wrap; }
  .four-summary-copy { flex-basis: calc(100% - 50px); }
  .four-summary-stats { width: 100%; justify-content: space-around; padding-top: 6px; border-top: 1px dashed #EDE1C9; }
  .four-toolbar .search-box { width: 100%; }
  .four-toolbar .filter-row { order: 3; width: 100%; flex: none; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .four-toolbar .select { margin-left: 0; }
  .four-count { margin-left: auto; }
  .four-table .col-street { display: none; }
  .assess-table th:nth-child(3), .assess-table td:nth-child(3) { display: none; }
  .record-meta span:nth-child(2) { display: none; }
  .modal { border-radius: 14px; }
  .overlay { padding: 12px; }
  .overlay.is-right { padding: 0; }
  .modal.is-drawer, .modal.is-large-drawer { width: 100%; border-radius: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .wizard-grid { grid-template-columns: 1fr; }
  .wizard-progress { padding: 10px 14px; }
  .wizard-line { width: 20px; margin: 0 6px; }
  .wizard-step .ws-label { display: none; }
  .wizard-step.is-active .ws-label { display: inline; }
  .wizard-body { padding: 14px 12px 100px; }
  .wizard-top { padding: 10px 12px; }
  .wizard-top .wz-title h2 { font-size: 13.5px; }
  .wizard-timer { padding: 4px 8px; }
  .wizard-timer b { font-size: 15px; }
  .wizard-actions { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .wizard-actions .wa-note { display: none; }
  .wizard-actions .btn { flex: 1; }
  .wizard-inner { max-width: none; }
  .wizard-card { padding: 14px; }
  .wizard-brief-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .toast-root { left: 12px; right: 12px; top: calc(66px + env(safe-area-inset-top)); bottom: auto; }
  .toast { max-width: none; }
  .wizard-open .toast-root { top: 100px; }
  .map-topbar .map-title-glass span { display: none; }
  .map-tools .glass-btn span { display: none; }
  .map-tools .glass-btn { padding: 0 8px; }
  .map-legend { max-width: calc(100% - 26px); }
  .map-data-note { display: none; }
  .map-zoom { bottom: 52px; }
  .unit-profile-top h2 { font-size: 17px; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: 1fr; }
  .page-tabs { overflow-x: auto; }
}
@media (max-width: 560px) {
  .content { padding: 13px 12px 22px; }
  .topbar { padding: 0 12px; }
  .role-switch button span { display: none; }
  .role-switch button { padding: 0 9px; }
  .role-switch button .icon { width: 16px; height: 16px; }
  .topbar-right [data-action="open-guide"] { display: none; }
  .train-tips { grid-template-columns: 1fr; }
  .topbar-right .icon-button { width: 34px; height: 34px; }
  .topbar-right .avatar { display: none; }
  .station-picker { max-width: 86px; font-size: 10.5px; }
  .page-head h1 { font-size: 22px; }
  .page-head .page-sub { font-size: 11px; }
  .kpi-grid { gap: 8px; }
  .kpi-card { padding: 11px 11px 10px; }
  .kpi-value { font-size: 24px; }
  .kpi-card .sparkline { width: 48px; height: 18px; }
  .map-stage { min-height: 52vh; }
  .map-side { max-height: 380px; }
  .map-side-top { padding: 10px 10px 0; }
  .side-stats { margin-bottom: 8px; }
  .map-detail { left: 6px; right: 6px; bottom: calc(68px + env(safe-area-inset-bottom)); height: min(66vh, 560px); max-height: calc(100dvh - 140px); }
  .map-detail-title h2 { font-size: 15px; }
  .map-topbar { left: 8px; right: 8px; top: 8px; }
  .map-title-glass { padding: 6px 8px; }
  .map-title-glass strong { font-size: 10px; }
  .map-tools { gap: 3px; }
  .glass-btn { height: 28px; font-size: 9px; }
  .map-legend { left: 8px; bottom: 8px; padding: 6px 8px; gap: 5px 9px; }
  .legend-item { font-size: 8px; }
  .map-zoom { right: 8px; bottom: 44px; }
  .map-zoom button { width: 28px; height: 28px; }
  .unit-card { min-height: 186px; }
  .plan-card { gap: 9px; padding: 11px; }
  .plan-date { width: 44px; }
  .plan-date b { font-size: 21px; }
  .plan-main h3 { font-size: 12px; }
  .record-row { align-items: flex-start; }
  .record-meta { display: none; }
  .assess-table th:nth-child(4), .assess-table td:nth-child(4) { display: none; }
  .assess-table th, .assess-table td { padding: 9px 8px; }
  .assess-table th { font-size: 8px; }
  .assess-unit small { display: none; }
  .assess-unit strong { font-size: 10.5px; }
  .score-cell b { font-size: 15px; }
  .mini-score-bar { display: none; }
  .four-table { table-layout: fixed; width: 100%; }
  .four-table .col-cat, .four-table .col-metric, .four-table .col-deadline { display: none; }
  .four-table th, .four-table td { padding: 9px 5px; }
  .four-table th:nth-child(2), .four-table td:nth-child(2) { width: 52%; }
  .four-table th:nth-child(5), .four-table td:nth-child(5) { width: 38%; }
  .four-table th:nth-child(7), .four-table td:nth-child(7) { width: 10%; }
  .four-name { min-width: 0; max-width: none; }
  .four-name strong { display: -webkit-box; white-space: normal; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 10.5px; }
  .four-name small { white-space: nowrap; }
  .four-hazard-cell { max-width: 100%; }
  .four-summary-stats b { font-size: 16px; }
  .drawer-tabs { padding: 0 12px; overflow-x: auto; }
  .modal-body { padding: 14px 14px; }
  .modal-head { padding: 14px 14px 12px; }
  .modal-foot { padding: 10px 14px; }
  .wizard-top .wz-brand { display: none; }
  .wizard-progress { padding: 9px 10px; }
  .wizard-line { width: 12px; margin: 0 4px; }
  .wizard-step .ws-num { width: 22px; height: 22px; font-size: 9px; }
  .wizard-step.is-active .ws-label { font-size: 9px; }
  .wizard-brief-grid { grid-template-columns: 1fr; }
  .geo-row { flex-direction: column; }
  .step-summary { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .step-summary .ss-item { padding: 7px 3px; }
  .step-summary .ss-item b { font-size: 17px; }
  .bar-row { grid-template-columns: 70px 1fr 34px; }
  .donut-layout { gap: 9px; }
  .donut-wrap { width: 125px !important; height: 125px !important; }
  .donut-center strong { font-size: 22px; }
  .analytics-grid { gap: 10px; }
  .chart-legend { justify-content: flex-start; }
  .toast-root { top: calc(62px + env(safe-area-inset-top)); bottom: auto; }
}
@media (min-width: 1025px) {
  .bottom-nav { display: none; }
}
@media (pointer: coarse) {
  .btn-sm { height: 34px; padding: 0 11px; }
  .chip { height: 31px; }
  .icon-button { width: 40px; height: 40px; }
  .map-zoom button { width: 35px; height: 35px; }
  .role-switch button { height: 32px; }
  .check-item { padding: 11px 12px; }
  .page-tab { padding-top: 11px; padding-bottom: 13px; }
}
@media print {
  .rail, .topbar, .bottom-nav, .map-side, .map-tools, .map-zoom, .page-head .head-actions, .btn { display: none !important; }
  .app-shell { display: block; }
  .content { padding: 0; }
  .map-layout { display: block; }
  .map-stage { height: 580px; }
  .card { break-inside: avoid; box-shadow: none; }
}

/* ---------------- 登录 / 测试账号 ---------------- */
.login-shell {
  min-height: 100dvh;
  background:
    radial-gradient(800px 500px at 18% 8%, rgba(203, 74, 56, .18), transparent 60%),
    radial-gradient(700px 500px at 88% 88%, rgba(47, 111, 142, .16), transparent 62%),
    #0B1C26;
  color: #E7F0F2;
  padding: 38px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-wrap { width: min(1040px, 100%); display: grid; grid-template-columns: .85fr 1.15fr; gap: 46px; align-items: center; }
.login-brand { display: flex; align-items: center; gap: 13px; }
.login-brand .brand-mark { width: 52px; height: 52px; }
.login-brand strong { display: block; font-family: var(--display); font-size: 27px; letter-spacing: 3px; }
.login-brand span { display: block; margin-top: 5px; color: #8FAAB3; font-size: 11px; letter-spacing: 1.5px; }
.login-card { background: rgba(246, 249, 248, .98); color: var(--ink); border-radius: 16px; padding: 30px 32px 24px; box-shadow: 0 24px 70px rgba(0, 0, 0, .28); }
.login-kicker { color: var(--red-deep); font-size: 9px; letter-spacing: 2px; font-weight: 800; }
.login-card h1 { margin: 8px 0 7px; font-family: var(--display); font-size: 25px; letter-spacing: 1px; }
.login-sub { margin: 0 0 18px; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.login-error { background: #FCEDEA; color: #A73827; border: 1px solid #F1C5BC; border-radius: 6px; padding: 8px 10px; font-size: 11px; margin-bottom: 10px; }
.login-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 9px; align-items: end; }
.login-form label { display: flex; flex-direction: column; gap: 5px; font-size: 10px; color: var(--muted); }
.login-form input { height: 36px; border: 1px solid var(--line); border-radius: 5px; padding: 0 9px; background: #fff; font-size: 12px; color: var(--ink); outline: none; }
.login-form input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(203, 74, 56, .1); }
.login-form .btn { height: 36px; white-space: nowrap; }
.login-accounts { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 16px; }
.login-account { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; text-align: left; cursor: pointer; transition: .15s; }
.login-account:hover { border-color: var(--red); background: #FFF9F7; transform: translateY(-1px); }
.login-account .la-avatar { width: 27px; height: 27px; border-radius: 50%; background: var(--navy); color: #F5DFA6; display: grid; place-items: center; font-size: 12px; flex: none; }
.login-account span:nth-child(2) { min-width: 0; flex: 1; }
.login-account b { display: block; font-size: 11px; }
.login-account small { display: block; color: var(--muted); font-size: 9px; margin-top: 2px; }
.login-account .icon { color: var(--muted); flex: none; }
.login-note { margin-top: 15px; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 9.5px; line-height: 1.6; }
.topbar .user-chip { display: flex; align-items: center; gap: 7px; padding: 3px 7px 3px 3px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.topbar .user-avatar { width: 27px; height: 27px; border-radius: 50%; background: var(--navy); color: #F5DFA6; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.topbar .user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.topbar .user-meta b { font-size: 10px; }
.topbar .user-meta small { font-size: 8px; color: var(--muted); }
.topbar .logout-btn { color: var(--muted); }
.topbar .user-chip { font: inherit; cursor: pointer; }
.topbar .account-switch { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 18px; background: #fff; color: var(--ink); font-size: 11px; font-weight: 600; cursor: pointer; }
.topbar .account-switch:hover { border-color: var(--orange); color: var(--orange); }
@media (max-width: 820px) {
  .login-wrap { grid-template-columns: 1fr; gap: 20px; max-width: 560px; }
  .login-brand { justify-content: center; }
  .login-card { padding: 23px 19px 18px; }
  .login-form { grid-template-columns: 1fr; }
  .login-accounts { grid-template-columns: 1fr; }
  .topbar .user-meta { display: flex; max-width: 92px; }
  .topbar .user-meta b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .user-meta small { display: none; }
  .topbar .account-switch { width: auto; padding: 0 8px; justify-content: center; font-size: 10px; }
  .topbar .account-switch span { display: inline; }
  .topbar .user-chip { padding: 3px; border: 0; background: transparent; }
}
@media (max-width: 560px) {
  .login-shell { padding: 20px 12px; align-items: flex-start; }
  .login-brand strong { font-size: 22px; }
  .login-brand span { font-size: 9px; letter-spacing: .8px; }
  .login-card h1 { font-size: 21px; }
}
.bd-map-areas { width: 100%; height: 100%; display: block; }
.bd-area { fill-opacity: .045; stroke-opacity: .45; stroke-width: 1; vector-effect: non-scaling-stroke; }
.bd-area.is-pilot { fill-opacity: .11; stroke-opacity: .9; stroke-width: 1.8; }
.bd-station.is-pilot { border-color: #C94634; box-shadow: 0 0 0 2px rgba(255,255,255,.75), 0 2px 10px rgba(9,28,37,.35); }
.bd-station .pilot-badge { position: absolute; right: -7px; top: -7px; width: 13px; height: 13px; border-radius: 50%; background: #C94634; color: #fff; font-size: 7px; font-weight: 700; display: grid; place-items: center; font-style: normal; border: 1px solid #fff; }
.legend-item i.area { width: 10px; height: 8px; border-radius: 2px; background: rgba(203,74,56,.18); border: 1px solid rgba(203,74,56,.75); }
.area-shape { fill-opacity: .035; stroke-opacity: .32; stroke-width: .8; }
.area-shape.is-pilot { fill-opacity: .10; stroke-opacity: .7; stroke-width: 1.2; }
.bd-map-boundary-host > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.bd-area { fill-opacity: .07; stroke-opacity: .55; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.bd-area.is-pilot { fill-opacity: .18; stroke-opacity: 1; stroke-width: 2.2; }
.area-shape { fill-opacity: .06; stroke-opacity: .45; stroke-width: 1; }
.area-shape.is-pilot { fill-opacity: .16; stroke-opacity: .85; stroke-width: 1.6; }
.prediction-note { display: flex; align-items: flex-start; gap: 6px; margin: 7px 0 10px; padding: 7px 9px; border: 1px dashed #D8B36A; border-radius: 5px; background: #FFF9EC; color: #7B632B; font-size: 10px; line-height: 1.55; }
.hazard-clause-list { display: flex; flex-direction: column; gap: 5px; max-height: 220px; overflow: auto; padding-right: 3px; }
.hazard-clause { padding: 6px 8px; border-left: 2px solid var(--red); background: #FCF7F5; border-radius: 0 4px 4px 0; font-size: 10px; line-height: 1.55; color: #455A62; }
.bd-area { fill-opacity: .08; stroke-opacity: .7; stroke-width: 1.1; }
.bd-area.is-pilot { fill-opacity: .17; stroke-opacity: 1; stroke-width: 2; }
.bd-station.is-pilot em { opacity: .92; }

/* ---------------- 考评模板 ---------------- */
.tpl-intro { padding: 2px 0 10px; }
.tpl-intro-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.tpl-intro-head h3 { margin: 4px 0 0; font-family: var(--display); font-size: 18px; }
.tpl-intro-head > b { font-family: var(--num); font-size: 34px; color: var(--red-deep); line-height: 1; }
.tpl-intro-head > b small { font-size: 10px; margin-left: 2px; color: var(--muted); }
.tpl-kicker { font-size: 8px; letter-spacing: 2px; font-weight: 800; color: var(--red-deep); }
.tpl-intro p { margin: 8px 0 0; font-size: 10.5px; line-height: 1.7; color: var(--ink-2); }
.tpl-header-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.tpl-header-fields span { display: flex; align-items: center; justify-content: space-between; gap: 4px; border: 1px dashed var(--line); border-radius: 4px; padding: 5px 7px; font-size: 9px; color: var(--muted); }
.tpl-header-fields i { font-style: normal; color: var(--muted-2); font-size: 8px; }
.tpl-stage { margin-top: 14px; }
.tpl-stage-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 5px; background: #102A38; color: #F4E8C8; }
.tpl-stage-head > div { display: flex; align-items: center; gap: 8px; }
.tpl-stage-head h3 { margin: 0; font-size: 12px; letter-spacing: .5px; }
.tpl-stage-head > b { font-family: var(--num); font-size: 13px; color: #F0D295; }
.tpl-stage-no { font-size: 8px; color: #9BB4BD; letter-spacing: 1px; }
.tpl-item { border: 1px solid var(--line); border-radius: 5px; padding: 9px 10px; margin-top: 7px; background: #fff; }
.tpl-item-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.tpl-item-head > div { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tpl-no { width: 19px; height: 19px; border-radius: 3px; background: #F4EDE0; color: #8B6A25; display: grid; place-items: center; font-size: 9px; font-weight: 800; flex: none; }
.tpl-item-head b { font-size: 11.5px; color: var(--ink); }
.tpl-item-head em { font-style: normal; font-size: 8px; color: #9B6A4A; background: #FBF2EC; padding: 2px 4px; border-radius: 2px; }
.tpl-score { white-space: nowrap; font-family: var(--num); font-size: 11px; color: var(--red-deep); font-weight: 700; }
.tpl-task { margin: 6px 0 7px; font-size: 10px; line-height: 1.65; color: #455A62; }
.tpl-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.tpl-two-col h4 { margin: 0 0 4px; font-size: 9px; color: var(--muted); letter-spacing: .5px; }
.tpl-two-col ul { margin: 0; padding-left: 14px; }
.tpl-two-col li { font-size: 9.5px; line-height: 1.65; color: var(--ink-2); margin-bottom: 2px; }
.tpl-criteria li { color: #7A3D34; }
.tpl-notes { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 9px; }
.tpl-notes summary { cursor: pointer; font-size: 10px; color: var(--muted); font-weight: 600; }
.tpl-notes p { margin: 6px 0 0; font-size: 9.5px; line-height: 1.65; color: var(--muted); }
@media (max-width: 700px) {
  .tpl-header-fields { grid-template-columns: 1fr 1fr; }
  .tpl-two-col { grid-template-columns: 1fr; }
  .tpl-intro-head h3 { font-size: 15px; }
}
@media print {
  body * { visibility: hidden; }
  #overlay-root, #overlay-root * { visibility: visible; }
  #overlay-root { position: absolute; inset: 0; }
  .modal-backdrop { background: #fff; }
  .modal { box-shadow: none; border: 0; max-height: none; width: 100%; }
  .modal-body { overflow: visible; padding: 0; }
  .modal-foot, .modal-close { display: none !important; }
  .tpl-notes { break-inside: avoid; }
}

/* ---------------- 岗位训练推送 ---------------- */
.position-push { margin: 0 0 14px; padding: 14px 16px; border: 1px solid #DFE6E8; border-left: 3px solid var(--red); border-radius: 6px; background: linear-gradient(135deg, #FFFDF8, #F7FAFA); }
.pp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pp-kicker { display: flex; align-items: center; gap: 5px; font-size: 8.5px; letter-spacing: 1.2px; color: var(--red-deep); font-weight: 800; }
.pp-head h3 { margin: 4px 0 3px; font-family: var(--display); font-size: 18px; }
.pp-head p { margin: 0; font-size: 10px; color: var(--muted); line-height: 1.55; }
.pp-badge { flex: none; padding: 4px 7px; border-radius: 3px; background: #102A38; color: #F4E8C8; font-size: 8.5px; letter-spacing: .5px; }
.pp-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); }
.pp-grid h4 { margin: 0 0 5px; font-size: 9px; letter-spacing: .8px; color: var(--muted); }
.pp-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.pp-chips span { padding: 3px 6px; border-radius: 3px; background: #fff; border: 1px solid var(--line); font-size: 9px; color: var(--ink-2); }
.pp-items { margin: 0; font-size: 9px; line-height: 1.8; color: var(--ink-2); }
.pp-items b { font-family: var(--num); color: var(--red-deep); font-weight: 700; }
.pp-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.pp-foot > span { display: flex; align-items: center; gap: 4px; font-size: 8.5px; color: var(--muted); }
@media (max-width: 700px) { .pp-grid { grid-template-columns: 1fr; } .pp-head { flex-direction: column; } .pp-foot { flex-direction: column; align-items: flex-start; } }
.tpl-role-note { display: flex; align-items: center; gap: 5px; margin-top: 9px; padding: 7px 9px; border-radius: 4px; background: #FBF0EC; color: #7C4138; font-size: 9.5px; line-height: 1.6; }
.tpl-item.is-mine { border-color: #D9A79C; box-shadow: inset 3px 0 0 var(--red); }
.tpl-mine { background: #FBEDE9 !important; color: var(--red-deep) !important; }

/* ---------------- 实战考评 ---------------- */
.assess-tabs { margin: 0 0 12px; }
.seg-tabs { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 5px; background: #F6F8F8; width: fit-content; }
.seg-tab { border: 0; background: transparent; padding: 6px 14px; border-radius: 3px; color: var(--muted); font-size: 10px; font-weight: 600; cursor: pointer; }
.seg-tab.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(16,42,56,.12); }
.practical-focus { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin: 0 0 12px; padding: 12px 14px; border-radius: 6px; border: 1px solid #E8D6C8; background: #FFF9F2; }
.pf-kicker { display: flex; align-items: center; gap: 4px; font-size: 8px; letter-spacing: 1px; font-weight: 800; color: var(--red-deep); }
.practical-focus h3 { margin: 4px 0 6px; font-size: 13px; }
.practical-focus .pp-chips { margin: 0; }
.practical-card { padding: 0; overflow: hidden; }
.practical-card .card-head { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.practical-card .card-head h3 { margin: 0; font-size: 13px; }
.practical-card .card-head p { margin: 3px 0 0; font-size: 9px; color: var(--muted); }
.practical-list { padding: 8px 14px 14px; }
.practical-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 10px 2px; cursor: pointer; }
.practical-row:last-child { border-bottom: 0; }
.practical-row:hover { background: #FAF7F2; }
.pr-score { width: 54px; flex: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 1px; }
.pr-score b { font-family: var(--num); font-size: 20px; color: var(--red-deep); line-height: 1; }
.pr-score span { font-size: 8px; color: var(--muted); }
.pr-score small { width: 100%; font-size: 8px; color: var(--muted); margin-top: 2px; }
.pr-main { flex: 1; min-width: 0; }
.pr-main strong { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-main small { display: block; font-size: 9px; color: var(--muted); margin-top: 3px; }
.pr-right { display: flex; align-items: center; gap: 8px; flex: none; }
.practical-form { padding-bottom: 2px; }
.pf-meta { display: grid; grid-template-columns: 1fr 1fr 1fr 2fr; gap: 8px; }
.pf-meta label, .pf-controls label { display: flex; flex-direction: column; gap: 3px; }
.pf-meta label > span, .pf-controls label > span { font-size: 8px; letter-spacing: .5px; color: var(--muted); font-weight: 600; }
.pf-meta input, .pf-controls select, .pf-controls input { height: 28px; border: 1px solid var(--line); border-radius: 4px; padding: 0 7px; font-size: 10px; font-family: var(--body); background: #fff; color: var(--ink); }
.pf-prior { margin-top: 9px; padding: 7px 9px; border-radius: 4px; background: #F6F9F9; border: 1px dashed #C9D6D9; font-size: 9.5px; color: var(--ink-2); line-height: 1.6; }
.pf-roster { margin-top: 12px; padding-top: 9px; border-top: 1px solid var(--line); }
.pf-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pf-section-title h4 { margin: 0; font-size: 11px; }
.pf-section-title span { font-size: 8.5px; color: var(--muted); }
.pf-person-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.pf-person { display: flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; background: #fff; }
.pf-person input { accent-color: var(--red); }
.pf-person b { display: block; font-size: 9.5px; }
.pf-person small { display: block; font-size: 8px; color: var(--muted); }
.pf-stage { margin-top: 12px; }
.pf-stage-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; background: #102A38; color: #F4E8C8; border-radius: 4px; }
.pf-stage-head h4 { margin: 0; font-size: 10.5px; }
.pf-stage-head b { font-family: var(--num); font-size: 10px; color: #F0D295; }
.pf-item { border: 1px solid var(--line); border-radius: 4px; padding: 8px 9px; margin-top: 5px; background: #fff; }
.pf-item.is-focus { border-color: #D9A79C; box-shadow: inset 3px 0 0 var(--red); }
.pf-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pf-item-head > div { display: flex; align-items: center; gap: 5px; }
.pf-item-head b { font-size: 10.5px; }
.pf-item-head em { font-style: normal; padding: 1px 4px; border-radius: 2px; background: #FBEDE9; color: var(--red-deep); font-size: 8px; }
.pf-item-head > span { font-family: var(--num); font-size: 9px; color: var(--red-deep); white-space: nowrap; }
.pf-item > p { margin: 5px 0 6px; font-size: 9px; color: var(--muted); line-height: 1.55; }
.pf-controls { display: grid; grid-template-columns: 210px 1fr 80px; gap: 8px; align-items: end; }
.pf-status { display: flex; gap: 3px; }
.pf-status button { flex: 1; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 3px; padding: 5px 4px; font-size: 9px; cursor: pointer; }
.pf-status button.is-active { border-color: var(--red); background: #FBEDE9; color: var(--red-deep); font-weight: 700; }
.pf-note { width: 100%; height: 27px; margin-top: 6px; border: 1px solid var(--line); border-radius: 3px; padding: 0 7px; font-size: 9px; font-family: var(--body); }
.pf-summary { margin-top: 12px; padding-top: 9px; border-top: 1px solid var(--line); }
.pf-summary textarea { width: 100%; margin-top: 5px; border: 1px solid var(--line); border-radius: 4px; padding: 7px; font-family: var(--body); font-size: 10px; resize: vertical; }
.practical-detail { padding-bottom: 2px; }
.pd-score { display: flex; align-items: center; gap: 14px; padding: 8px 0 12px; border-bottom: 1px solid var(--line); }
.pd-score-num { font-family: var(--num); font-size: 44px; line-height: 1; color: var(--red-deep); }
.pd-score-num small { font-size: 10px; margin-left: 2px; color: var(--muted); }
.pd-score b { font-size: 14px; }
.pd-score p { margin: 4px 0 0; font-size: 9.5px; color: var(--muted); }
.pd-focus { margin: 10px 0; }
.pd-focus h4, .pd-block h4 { margin: 0 0 5px; font-size: 10px; }
.pd-block { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.pd-def { padding: 6px 8px; margin-bottom: 4px; border-left: 2px solid var(--red); background: #FCF7F5; border-radius: 0 3px 3px 0; }
.pd-def b { font-size: 9.5px; }
.pd-def span { float: right; font-size: 8.5px; color: var(--muted); }
.pd-def p { margin: 3px 0 0; font-size: 9px; color: var(--ink-2); }
.pd-block > p { margin: 0; font-size: 9.5px; line-height: 1.7; color: var(--ink-2); }
.pd-items { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.pd-items summary { cursor: pointer; font-size: 9.5px; color: var(--muted); font-weight: 600; }
.pd-table { margin-top: 6px; }
.pd-table > div { display: grid; grid-template-columns: 22px 1fr 60px 130px; gap: 6px; align-items: center; padding: 4px 0; border-bottom: 1px solid #F0F2F2; font-size: 9px; }
.pd-table > div > span { color: var(--muted); font-family: var(--num); }
.pd-table > div > em { font-style: normal; color: var(--muted); font-size: 8.5px; }
.pd-table > div > small { color: var(--muted); font-size: 8.5px; text-align: right; }
.pd-table > div > p { grid-column: 2 / -1; margin: 0; color: var(--red-deep); font-size: 8.5px; }
@media (max-width: 700px) {
  .pf-meta { grid-template-columns: 1fr 1fr; }
  .pf-controls { grid-template-columns: 1fr 1fr; }
  .pf-status { grid-column: 1 / -1; }
  .practical-focus { flex-direction: column; align-items: flex-start; }
  .pd-table > div { grid-template-columns: 22px 1fr 55px; }
  .pd-table > div > small { display: none; }
}
.pp-prior { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 9px; padding: 6px 8px; border-radius: 4px; background: #FFF7EE; border: 1px dashed #D9B98E; font-size: 9px; color: #7B5627; }
.pp-prior b { font-weight: 600; color: #7B3D2E; }

/* ---------------- 考评任务同步 ---------------- */
.sync-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.sync-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border-radius: 3px; background: #F5F1E8; color: #806A38; font-size: 8.5px; font-weight: 600; }
.sync-chip.is-online { background: #EAF4EF; color: #2F765A; }
.sync-chip.is-offline { background: #FBEDE9; color: #A44A3A; }
.practical-task-card { margin-bottom: 12px; }
.practical-task-row { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.practical-task-row:last-child { border-bottom: 0; }
.pt-status { flex: none; min-width: 48px; text-align: center; padding: 4px 5px; border-radius: 3px; font-size: 8.5px; font-weight: 700; }
.pt-status.pending { background: #FBEDE9; color: var(--red-deep); }
.pt-status.in_progress { background: #FFF4DF; color: #97671E; }
.pt-status.done { background: #EAF4EF; color: #2F765A; }
.pt-main { flex: 1; min-width: 0; }
.pt-main strong { display: block; font-size: 11px; }
.pt-main small { display: block; font-size: 9px; color: var(--muted); margin-top: 3px; }
.pt-focus { display: block; margin-top: 3px; font-size: 8.5px; color: #97671E; }
.pt-actions { flex: none; display: flex; gap: 5px; }
.pf-focus-select { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.pf-focus-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.pf-focus-list label { display: flex; align-items: center; gap: 4px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 3px; background: #fff; font-size: 9px; cursor: pointer; }
.pf-focus-list input { accent-color: var(--red); }
@media (max-width: 700px) {
  .practical-task-row { align-items: flex-start; flex-wrap: wrap; }
  .pt-actions { width: 100%; justify-content: flex-end; }
}


/* 车辆/编成训练目标 */
.vehicle-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.vehicle-option { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.vehicle-option.is-checked { border-color: var(--orange); background: #FFF7F2; }
.vehicle-option input { margin: 0; accent-color: var(--orange); }
.vo-main { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.vo-main b { font-size: 12px; color: var(--ink); }
.vo-main small { font-size: 10px; color: var(--muted); }
.plan-vehicles { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; padding: 3px 8px; border-radius: 4px; background: #F3F7F6; color: var(--ink-2); font-size: 10px; }
.plan-vehicles svg { width: 12px; height: 12px; color: var(--orange); }
.plan-vehicles b { color: var(--orange); font-weight: 600; }
@media (max-width: 820px) { .vehicle-picker { grid-template-columns: 1fr; } }

/* 考评责任车辆 */
.pf-vehicles-summary { display: flex; flex-wrap: wrap; gap: 7px; }
.pf-vehicle-chip { display: inline-flex; flex-direction: column; gap: 1px; padding: 7px 10px; border-radius: 7px; border: 1px solid #E7C8AF; background: #FFF7F2; color: var(--ink); font-size: 12px; font-weight: 600; }
.pf-vehicle-chip small { color: var(--orange); font-size: 9px; font-weight: 500; }
