/* ATHENA 调度台（v1.8.1 第 91 节）：深海军蓝底、白色文字、金黄色主操作；绿色在线、红色仅用于紧急/危险、离线灰色并配文字。
   布局：顶栏 + 三栏（群组树 / 地图+PTT / 多组·紧急·通话·消息·录音）；窄屏堆叠 */
:root {
  --bg: #0a1322;
  --panel: #0f1b2e;
  --panel-2: #142439;
  --line: #213552;
  --fg: #e6edf6;
  --muted: #8d9fb8;
  --faint: #5c6f8b;
  --accent: #f3b631;      /* 品牌金：主操作、选中、发话目标 */
  --accent-ink: #1a1200;
  --tx: #f5b301;          /* 发射/讲话：金 */
  --tx-ink: #1a1200;
  --rx: #4cb0ff;          /* 接收：蓝 */
  --ok: #3ccf7c;
  --warn: #e9c046;
  --crit: #ff4d45;
  --crit-bg: rgba(255, 77, 69, .12);
  --hover: rgba(255, 255, 255, .04);
  --sel: rgba(245, 179, 1, .12);
  --shadow: 0 8px 28px rgba(0, 0, 0, .45);
  --tile-filter: brightness(.62) contrast(1.1) saturate(.55) hue-rotate(-8deg);
  /* 只用系统字体：调度台多部署在内网，不依赖任何外部字体服务 */
  /* 西文字体在前：英/法/西文的撇号与引号用西文字形；中文字符自动回退到中文字体。界面语言为中文时改为中文字体在前（v1.10 第 118 节） */
  --font-ui: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif;
  --font-label: "Bahnschrift", "DIN Alternate", "Roboto Condensed", "Arial Narrow", "Segoe UI", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Cascadia Mono", "SF Mono", Consolas, "Roboto Mono", "DejaVu Sans Mono", monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #e8edf4; --panel: #ffffff; --panel-2: #f3f6fa; --line: #d3dce8; --fg: #0b1526; --muted: #52637b; --faint: #8796ab;
    --accent: #f3b631; --accent-ink: #1a1200; --tx: #b07d00; --tx-ink: #ffffff; --rx: #0a6fc2; --ok: #16804a; --warn: #8a6700; --crit: #c8261f; --crit-bg: rgba(200, 38, 31, .08);
    --hover: rgba(0, 0, 0, .035); --sel: rgba(245, 179, 1, .16); --shadow: 0 8px 24px rgba(20, 40, 60, .15); --tile-filter: none; color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #e8edf4; --panel: #ffffff; --panel-2: #f3f6fa; --line: #d3dce8; --fg: #0b1526; --muted: #52637b; --faint: #8796ab;
  --accent: #f3b631; --accent-ink: #1a1200; --tx: #b07d00; --tx-ink: #ffffff; --rx: #0a6fc2; --ok: #16804a; --warn: #8a6700; --crit: #c8261f; --crit-bg: rgba(200, 38, 31, .08);
  --hover: rgba(0, 0, 0, .035); --sel: rgba(245, 179, 1, .16); --shadow: 0 8px 24px rgba(20, 40, 60, .15); --tile-filter: none; color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
:root:lang(zh) { --font-ui: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", system-ui, sans-serif; --font-label: "Bahnschrift", "DIN Alternate", "Roboto Condensed", "Arial Narrow", "PingFang SC", "Microsoft YaHei", sans-serif; }
body { background: var(--bg); color: var(--fg); font: 13px/1.45 var(--font-ui); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.num, time { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.label { font-family: var(--font-label); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 11px; color: var(--muted); }
[hidden] { display: none !important; }

/* ───── 登录 ───── */
.login { min-height: 100%; display: grid; place-content: center; justify-items: center; gap: 22px; padding: 24px 16px;
  /* 夜间城市航拍背景（branding/render_night_city.py 原创生成）：上下加深，保证标志与表单可读；深浅主题都用同一张夜景 */
  background: linear-gradient(180deg, rgba(2, 5, 15, .7) 0%, rgba(2, 5, 15, .15) 38%, rgba(2, 5, 15, .25) 70%, rgba(2, 5, 15, .85) 100%), url(login-night.jpg) center / cover no-repeat, #02050f;
  }
.login .logo-lockup { color: #fff; filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .6)); }
.login-brand { display: grid; justify-items: center; gap: 8px; }
/* ATHENA 标志（客户标志图矢量化，branding/build_logo.py 生成 logo.svg）：字色跟随主题，金点固定品牌金 */
.logo-lockup { width: min(380px, 86vw); height: auto; color: var(--fg); display: block; }
.logo-word { height: 15px; width: auto; aspect-ratio: 1560 / 174; color: var(--fg); display: block; }
.login form { width: min(360px, 100%); background: color-mix(in srgb, var(--panel) 86%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 10px; padding: 28px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.login h1 { margin: 0 0 4px; font: 600 22px/1.2 var(--font-label); letter-spacing: .04em; }
.login p { margin: 0; color: var(--muted); }
.field { display: grid; gap: 6px; }
.field input, .field select, .input { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; width: 100%; }
.err { color: var(--crit); min-height: 1.2em; }

.btn { border: 1px solid var(--line); background: var(--panel-2); border-radius: 6px; padding: 6px 12px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.danger { color: var(--crit); border-color: color-mix(in srgb, var(--crit) 40%, var(--line)); }
.btn.small { padding: 3px 8px; font-size: 12px; }
.btn.icon { padding: 4px 7px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ───── 主框架 ───── */
.app { height: 100%; display: grid; grid-template-rows: 48px auto 1fr; }
.app > .top { grid-row: 1; } .app > .ws-bar { grid-row: 2; } .app > .main { grid-row: 3; }
.top { display: flex; align-items: center; gap: 18px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--panel); min-width: 0; }
.brand { font: 600 17px/1 var(--font-label); letter-spacing: .06em; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand-mod { color: var(--accent); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }

.brand i { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); display: inline-block; }
.brand i.on { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.stats { display: flex; gap: 16px; overflow: hidden; min-width: 0; flex: 0 1000 auto; }
.stat { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.stat b { font: 600 16px var(--font-mono); }
.stat.alert b { color: var(--crit); }
.top .spacer { flex: 1; }
.who { color: var(--muted); white-space: nowrap; display: flex; gap: 8px; align-items: center; flex: 0 1 auto; min-width: 0; }
.who > * { flex: none; }
/* 窄屏时先压缩统计区，再截断姓名与授权标签，按钮始终可见 */
.who > #meName, .who > #licChip { flex: 0 1 auto; min-width: 3em; overflow: hidden; text-overflow: ellipsis; }

.main { display: grid; grid-template-columns: var(--left-w, 300px) minmax(0, 1fr) var(--right-w, 370px); min-height: 0; }
.main.no-left { --left-w: 0px; } .main.no-left .col.left { display: none; }
.main.no-right { --right-w: 0px; } .main.no-right .col.right { display: none; }
.col { position: relative; }
.resizer { position: absolute; top: 0; bottom: 0; width: 6px; cursor: col-resize; z-index: 5; }
.resizer:hover, .resizer.drag { background: var(--line); }
.col.left .resizer { right: -3px; } .col.right .resizer { left: -3px; }
.ws-status { font-size: 12px; color: var(--muted); white-space: nowrap; max-width: 9em; overflow: hidden; text-overflow: ellipsis; }
.ws-status.bad { color: var(--crit, #ff5a5a); } .ws-status.warn { color: var(--warn, #f5b041); }
.ws-bar { display: flex; gap: 10px; align-items: center; padding: 6px 14px; background: var(--panel); border-bottom: 1px solid var(--line); color: var(--fg); flex-wrap: wrap; }
.audio-chip { cursor: pointer; border: 0; }
.col { min-height: 0; display: flex; flex-direction: column; background: var(--panel); }
.col.left { border-right: 1px solid var(--line); }
.col.right { border-left: 1px solid var(--line); }

.tabs { display: flex; border-bottom: 1px solid var(--line); flex: none; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.tabs button { flex: 1 0 auto; white-space: nowrap; background: none; border: 0; padding: 11px 6px 9px; font: 600 13px var(--font-label); letter-spacing: .06em; color: var(--muted); border-bottom: 2px solid transparent; display: flex; justify-content: center; gap: 6px; align-items: center; }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.badge { font: 600 11px var(--font-mono); background: var(--crit); color: #fff; border-radius: 9px; padding: 0 6px; min-width: 18px; text-align: center; }
.badge.soft { background: var(--line); color: var(--fg); }
.pane { flex: 1; min-height: 0; overflow: auto; }
.toolbar { display: flex; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex: none; align-items: center; flex-wrap: wrap; }
.toolbar .input { flex: 1; min-width: 120px; padding: 6px 9px; }
.empty { color: var(--faint); padding: 28px 16px; text-align: center; }

/* ───── 群组树 ───── */
.grp { border-bottom: 1px solid var(--line); }
.grp-head { display: grid; grid-template-columns: 16px 1fr auto auto; gap: 8px; align-items: center; padding: 9px 12px; cursor: pointer; }
.grp-head:hover { background: var(--hover); }
.grp.sel > .grp-head { background: var(--sel); box-shadow: inset 3px 0 0 var(--accent); }
.grp-head .caret { color: var(--faint); transition: transform .15s; font-size: 10px; }
.grp.open .caret { transform: rotate(90deg); }
.grp-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-count { color: var(--muted); font-size: 12px; }
.grp-live { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--rx); color: #fff; white-space: nowrap; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.grp-live.tx { background: var(--tx); color: var(--tx-ink); }
.grp-live.emg { background: var(--crit); }
.mon { border: 0; background: none; color: var(--faint); padding: 2px 4px; border-radius: 4px; }
.mon.on { color: var(--rx); }
.members { padding-bottom: 6px; }

.mem { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 6px 12px 6px 30px; cursor: pointer; position: relative; }
.mem:hover { background: var(--hover); }
.mem.sel { background: var(--sel); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); opacity: .5; }
.mem.on .dot { background: var(--ok); opacity: 1; }
.mem.talk .dot { background: var(--tx); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tx) 30%, transparent); }
.mem.alarming .dot { background: var(--crit); animation: blink 1s steps(2) infinite; }
.mem-main { min-width: 0; }
.mem-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mem:not(.on) .mem-name { color: var(--muted); }
.mem-sub { color: var(--faint); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mem-meta { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 11px; }
.batt { font-family: var(--font-mono); }
.batt.low { color: var(--crit); }
.mem-acts { display: none; gap: 4px; }
.mem:hover .mem-acts, .mem.sel .mem-acts { display: flex; }
.mem:hover .mem-meta, .mem.sel .mem-meta { display: none; }
.chip { font-size: 11px; padding: 0 5px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.chip.crit { border-color: var(--crit); color: var(--crit); }
.chip.warn { border-color: var(--warn); color: var(--warn); }
.chip.rx { border-color: var(--rx); color: var(--rx); }
.chip.tx { border-color: var(--tx); color: var(--tx); }

/* ───── 中栏：地图 + PTT ───── */
.center { position: relative; min-height: 0; display: grid; grid-template-rows: 1fr auto auto; }
#map { min-height: 0; background: var(--panel-2); }
.map-ctl { position: absolute; top: 10px; right: 10px; z-index: 500; display: flex; gap: 6px; }
.map-ctl select { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; box-shadow: var(--shadow); }
.map-note { pointer-events: none; position: absolute; left: 10px; top: 56px; z-index: 500; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; color: var(--muted); font-size: 12px; box-shadow: var(--shadow); max-width: 60%; }

.invite { border-top: 1px solid var(--line); background: var(--sel); padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 600; }
.ptt-bar { border-top: 1px solid var(--line); background: var(--panel); padding: 12px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.ptt-info { min-width: 0; display: grid; gap: 4px; }
.ptt-target { font: 600 18px/1.2 var(--font-label); letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 10px; align-items: center; }
.ptt-state { color: var(--muted); min-height: 1.4em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptt-state.tx { color: var(--tx); }
.ptt-state.rx { color: var(--rx); }
.ptt-state.pre { color: var(--warn); font-weight: 600; }
.ptt-state.bad { color: var(--crit); }
.meter { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; max-width: 260px; }
.meter.big { height: 10px; max-width: none; border-radius: 5px; }
.meter i { display: block; height: 100%; width: 0; background: var(--tx); transition: width .08s; }
.ptt-side { display: flex; align-items: center; gap: 12px; }
.ptt {
  width: 132px; height: 56px; border-radius: 28px; border: 2px solid var(--tx); background: transparent; color: var(--tx);
  font: 700 18px var(--font-label); letter-spacing: .14em; user-select: none; touch-action: none; transition: background .1s, transform .05s;
}
.ptt:hover { background: color-mix(in srgb, var(--tx) 10%, transparent); }
.ptt.pending { background: color-mix(in srgb, var(--tx) 25%, transparent); }
.ptt.live { background: var(--tx); color: var(--tx-ink); transform: scale(.98); box-shadow: 0 0 0 6px color-mix(in srgb, var(--tx) 22%, transparent); }
.ptt.denied { border-color: var(--crit); color: var(--crit); }
.ptt:disabled { opacity: .4; }
.kbd { font: 11px var(--font-mono); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; color: var(--muted); }

/* ───── 右栏 ───── */
.alarm { display: grid; grid-template-columns: 4px 1fr; border-bottom: 1px solid var(--line); }
.alarm .stripe { background: var(--warn); }
.alarm.critical .stripe { background: var(--crit); }
.alarm.critical.open { background: var(--crit-bg); }
.alarm.acked { opacity: .6; }
.alarm .body { padding: 10px 12px; display: grid; gap: 6px; min-width: 0; }
.alarm .row { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.alarm .title { font-weight: 600; }
.alarm .meta { color: var(--muted); font-size: 12px; }
.alarm .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.alarm .acts .input { flex: 1; min-width: 100px; padding: 3px 8px; }

.call { padding: 10px 12px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.call.live { box-shadow: inset 3px 0 0 var(--rx); }
.call.live.emg { box-shadow: inset 3px 0 0 var(--crit); background: var(--crit-bg); }
.call .who { color: var(--fg); font-weight: 600; }
.call .sub { color: var(--muted); font-size: 12px; grid-column: 1; }
.call .dur { font-family: var(--font-mono); color: var(--muted); }
.call.live .dur { color: var(--rx); }
.section-title { padding: 10px 12px 6px; }

.conv { display: grid; grid-template-rows: auto 1fr auto; height: 100%; }
.msgs { overflow: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 85%; display: grid; gap: 2px; }
.msg .meta { color: var(--faint); font-size: 11px; }
.msg .txt { background: var(--panel-2); border: 1px solid var(--line); padding: 6px 10px; border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; text-align: right; }
.msg.mine .txt { background: var(--sel); border-color: transparent; text-align: left; }
.compose { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.compose .input { flex: 1; }

.rec { padding: 9px 12px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.rec .row { display: flex; justify-content: space-between; gap: 8px; }
.rec audio { width: 100%; height: 32px; }
.rec .meta { color: var(--muted); font-size: 12px; }

/* 地图标记 */
.mk { display: flex; align-items: center; gap: 4px; transform: translate(-6px, -6px); white-space: nowrap; pointer-events: auto; }
.mk i { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--ok); flex: none; }
.mk span { font-size: 11px; background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.mk.off i { background: var(--faint); box-shadow: 0 0 0 1px var(--faint); }
.mk.off span { color: var(--muted); }
.mk.talk i { background: var(--tx); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tx) 35%, transparent); }
.mk.alarming i { background: var(--crit); box-shadow: 0 0 0 5px color-mix(in srgb, var(--crit) 35%, transparent); animation: blink 1s steps(2) infinite; }
.mk.sel span { border-color: var(--rx); }
.pop { display: grid; gap: 6px; min-width: 200px; font: 12px/1.5 var(--font-ui); }
.pop h4 { margin: 0; font-size: 14px; }
.pop dl { display: grid; grid-template-columns: auto 1fr; gap: 1px 10px; margin: 0; }
.pop dt { color: var(--muted); }
.pop dd { margin: 0; }
.pop .acts { display: flex; gap: 6px; flex-wrap: wrap; }

/* 弹窗 */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 2000; display: grid; place-items: center; padding: 16px; }
.dialog { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; width: min(980px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.dialog header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.dialog header h3 { margin: 0; font: 600 16px var(--font-label); letter-spacing: .05em; }
.dialog .content { overflow: auto; padding: 12px 16px; display: grid; gap: 14px; grid-auto-rows: max-content; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; background: var(--panel-2); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
.form-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.form-row .field { flex: 1; min-width: 120px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; max-height: 160px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 6px; }
.checks label { display: flex; gap: 5px; align-items: center; white-space: nowrap; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 8px; padding: 8px 14px; z-index: 3000; max-width: calc(100% - 32px); }
.toast.bad { border-color: var(--crit); color: var(--crit); }

@keyframes blink { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ───── 窄屏 ───── */
@media (max-width: 1180px) { .main:not(.sized) { grid-template-columns: 260px minmax(0, 1fr) 320px; } .stats .stat.opt { display: none; } }
@media (max-width: 900px) {
  .app { height: auto; min-height: 100%; grid-template-rows: auto auto auto; }
  .top { flex-wrap: wrap; padding: 8px 16px; gap: 8px 14px; }
  .main:not(.sized), .main.sized { grid-template-columns: minmax(0, 1fr); }
  .resizer { display: none; }
  .center { order: -1; grid-template-rows: 52vh auto auto; }
  .col.left, .col.right { border: 0; border-top: 1px solid var(--line); max-height: 70vh; }
  .ptt-bar { grid-template-columns: minmax(0, 1fr); }
  .ptt-side { justify-content: space-between; }
  .who { flex-wrap: wrap; white-space: normal; row-gap: 6px; flex: 1 1 100%; min-width: 0; }
  .brand-mod { display: none; }
  .tabs { overflow-x: auto; }
  .tabs button { flex: 1 0 auto; padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 520px) { .who #clock { display: none; } }

/* Leaflet 必需样式（内联，避免依赖外部 CSS） */
.leaflet-pane, .leaflet-tile, .leaflet-marker-icon, .leaflet-marker-shadow, .leaflet-tile-container, .leaflet-pane > svg, .leaflet-pane > canvas, .leaflet-zoom-box, .leaflet-image-layer, .leaflet-layer { position: absolute; left: 0; top: 0; }
.leaflet-container { overflow: hidden; background: var(--panel-2); outline: 0; font: 12px var(--font-ui); }
.leaflet-tile, .leaflet-marker-icon, .leaflet-marker-shadow { user-select: none; -webkit-user-drag: none; }
.leaflet-tile { filter: inherit; visibility: hidden; }
.leaflet-tile-loaded { visibility: inherit; }
.leaflet-container img.leaflet-tile { max-width: none !important; max-height: none !important; }
.leaflet-tile-pane { filter: var(--tile-filter); }
.leaflet-zoom-animated { transform-origin: 0 0; }
.leaflet-zoom-anim .leaflet-zoom-animated { transition: transform .25s cubic-bezier(0, 0, .25, 1); }
.leaflet-pane { z-index: 400; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }
.leaflet-control { position: relative; z-index: 800; pointer-events: auto; }
.leaflet-top, .leaflet-bottom { position: absolute; z-index: 1000; pointer-events: none; }
.leaflet-top { top: 0; } .leaflet-bottom { bottom: 0; } .leaflet-left { left: 0; } .leaflet-right { right: 0; }
.leaflet-left .leaflet-control { margin-left: 10px; float: left; clear: both; }
.leaflet-bottom .leaflet-control { margin-bottom: 10px; }
.leaflet-top .leaflet-control { margin-top: 10px; }
.leaflet-right .leaflet-control { margin-right: 10px; float: right; }
.leaflet-control-zoom { display: grid; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; box-shadow: var(--shadow); margin-top: 56px !important; }
.leaflet-control-zoom a { width: 30px; height: 30px; line-height: 30px; text-align: center; background: var(--panel); color: var(--fg); text-decoration: none; font: 600 16px var(--font-mono); }
.leaflet-control-zoom a + a { border-top: 1px solid var(--line); }
.leaflet-control-attribution { background: color-mix(in srgb, var(--panel) 80%, transparent); color: var(--faint); padding: 0 5px; font-size: 10px; }
.leaflet-control-attribution a { color: var(--muted); }
.leaflet-popup { position: absolute; text-align: center; margin-bottom: 20px; }
.leaflet-popup-content-wrapper { padding: 1px; text-align: left; border-radius: 8px; background: var(--panel); color: var(--fg); border: 1px solid var(--line); box-shadow: var(--shadow); }
.leaflet-popup-content { margin: 10px 12px; }
.leaflet-popup-tip-container { width: 40px; height: 20px; position: absolute; left: 50%; margin-top: -1px; margin-left: -20px; overflow: hidden; pointer-events: none; }
.leaflet-popup-tip { width: 17px; height: 17px; padding: 1px; margin: -10px auto 0; transform: rotate(45deg); background: var(--panel); border: 1px solid var(--line); }
.leaflet-popup-close-button { position: absolute; top: 4px; right: 6px; color: var(--muted); text-decoration: none; font-size: 18px; }
.leaflet-div-icon { background: none; border: 0; }
.leaflet-interactive { cursor: pointer; }
.leaflet-grab { cursor: grab; }
.leaflet-dragging .leaflet-grab { cursor: grabbing; }
.leaflet-fade-anim .leaflet-popup { opacity: 0; transition: opacity .2s linear; }
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { opacity: 1; }
tr.sel td { background: var(--sel); }
#adminContent .tabs { flex-wrap: wrap; }

/* ───── 多组调度卡片（v1.8.1 第 92 节） ───── */
.gc-top { display: grid; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.gc-top .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--muted); }
.gc-top label.row { flex-wrap: nowrap; align-items: flex-start; }
.gc-top label.row input { margin-top: 3px; flex: none; }
.gcards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px 12px; }
.gcard { border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); padding: 9px 10px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.gcard.primary { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.gcard.target .gc-name::after { content: attr(data-tl); margin-left: 6px; font: 600 10px var(--font-label); letter-spacing: .08em; background: var(--accent); color: var(--accent-ink); border-radius: 3px; padding: 1px 5px; vertical-align: 2px; }
.gcard.live { border-color: var(--rx); }
.gcard.emg { border-color: var(--crit); background: var(--crit-bg); }
.gc-head { display: flex; gap: 6px 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.gc-name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-act { color: var(--muted); font-size: 12px; min-height: 1.4em; }
.gc-act.live { color: var(--rx); }
.gc-act.emg { color: var(--crit); font-weight: 600; }
.gc-ctl { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.gc-ctl input[type=range] { width: 90px; accent-color: var(--accent); }
.gc-ai { font-size: 12px; color: var(--faint); }
.radio-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--faint); display: inline-block; vertical-align: -2px; }
.primary .radio-dot { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 45%, transparent 50%); }
.gc-more { padding: 4px 12px 14px; display: grid; gap: 4px; }
.gc-more .row { display: flex; justify-content: space-between; align-items: center; color: var(--muted); padding: 4px 0; border-bottom: 1px dashed var(--line); }
.upsell { margin: 10px 12px; padding: 8px 10px; border: 1px dashed var(--accent); border-radius: 8px; color: var(--muted); }
.ptt-target .label { color: var(--accent); }
.alarm .facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 12px; color: var(--muted); margin: 4px 0; }
.alarm .facts b { color: var(--fg); font-weight: 500; }

/* 语言选择（v1.10 第 117 节）：显示语言自称，较长的法/西文不撑破页眉 */
.input.small { padding: 3px 8px; font-size: 12px; height: auto; }
.who .lang-sel { width: auto; min-width: 9em; max-width: 12em; flex: none; }
.login .lang-sel { width: 100%; }
.stat .label { white-space: nowrap; }
.map-ctl { left: 10px; justify-content: flex-end; flex-wrap: wrap; pointer-events: none; }
.map-ctl > * { pointer-events: auto; min-width: 0; }
.map-ctl #tileSel { max-width: min(260px, 100%); }
@media (max-width: 520px) { .leaflet-top.leaflet-right { margin-top: 74px; } .map-note { top: 90px; } }
.notice { margin: 0; padding: 8px 10px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
