:root {
  color-scheme: dark;
  --bg: #08111f;
  --panel: #111c30;
  --panel-2: #16233c;
  --line: #263854;
  --ink: #edf5ff;
  --muted: #9cb1c9;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #fb7185;
  --shadow: 0 18px 48px rgba(0, 0, 0, .24);
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: radial-gradient(circle at 70% 0, #11284a 0, var(--bg) 42%); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, input, select, textarea { border-radius: 6px; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid #7ee8fa; outline-offset: 3px; }
.portal-driver-body .driver-record-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: .75rem; margin: 1rem 0; }
.portal-driver-body .driver-record-filters label { display: grid; gap: .4rem; min-width: 0; font-size: .875rem; }
.portal-driver-body .driver-record-filters input, .portal-driver-body .driver-record-filters select { width: 100%; min-width: 0; min-height: 2.75rem; padding: .6rem; border: 1px solid var(--c-border, var(--line)); background: var(--c-surface, var(--panel)); color: var(--c-fg, var(--ink)); }
.portal-driver-body [data-driver-record-panel] { min-width: 0; overflow-wrap: anywhere; }
.portal-driver-body .driver-safety-page .driver-safety-head > div:only-child { display: block; }
.portal-driver-body [data-driver-record-panel] > .driver-safety-section { padding: 0; border: 0; box-shadow: none; }
.portal-driver-body .driver-record-todos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.portal-driver-body .driver-record-todos > div { min-width: 0; }
@media (max-width: 640px) {
  .portal-driver-body .driver-record-filters, .portal-driver-body .driver-record-todos { grid-template-columns: minmax(0, 1fr); }
  .portal-driver-body [data-driver-record-panel] .button { min-height: 2.75rem; white-space: normal; }
}
.portal-login {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  align-items: safe center;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-padding-block: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-bottom));
  scrollbar-gutter: stable;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
}
.login-card, .card, dialog { background: rgba(17, 28, 48, .96); border: 1px solid var(--line); box-shadow: var(--shadow); }
.login-card { width: min(620px, 100%); max-width: 100%; min-width: 0; flex: 0 0 auto; padding: 32px; overflow-wrap: anywhere; }
.login-card h1 { margin: 16px 0 6px; font-size: 24px; }
.brand-mark { width: 54px; height: 54px; border: 1px solid #2bbad0; color: var(--cyan); display: grid; place-items: center; font-size: 22px; font-weight: 800; background: #0d2036; }
.brand-mark.small { width: 36px; height: 36px; font-size: 16px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; margin-top: 15px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: #0b1628; color: var(--ink); padding: 10px 11px; }
input[type="file"] { min-width: 0; max-width: 100%; padding: 7px; color-scheme: dark; }
input[type="file"]::file-selector-button { margin-right: 8px; border: 1px solid #315678; background: transparent; color: var(--cyan); padding: 6px 9px; cursor: pointer; }
.field-help { display: block; min-width: 0; color: var(--muted); font-size: 10.5px; line-height: 1.55; overflow-wrap: anywhere; }
textarea { min-height: 90px; resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }
.button { border: 1px solid var(--line); color: var(--ink); background: #182946; padding: 9px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.button:hover { border-color: #3f5d84; }
.button.primary { background: linear-gradient(135deg, #087ea4, #1767b3); border-color: #258ab9; }
.button.danger { color: #ffd9df; border-color: #864152; background: #401f2a; }
.button.ghost { background: transparent; }
.button.small { padding: 5px 9px; font-size: 12px; }
.button:disabled { opacity: .55; cursor: wait; }
.portal-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; color: var(--muted); font-size: 13px; }
.portal-pagination > div { display: flex; flex-wrap: wrap; gap: 8px; }
.portal-pagination .button { min-height: 44px; min-width: 72px; }
.portal-pagination .button:disabled { cursor: default; }
.login-card .button { width: 100%; margin-top: 18px; }
.portal-choice-label { margin-top: 22px; color: var(--muted); font-size: 12px; }
.portal-choice-hint { margin: 5px 0 0; color: #7f98b3; font-size: 11px; line-height: 1.5; }
.portal-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 9px; }
.portal-choice { min-height: 86px; border: 1px solid var(--line); background: #0b1628; color: var(--ink); padding: 12px 14px; text-align: left; cursor: pointer; text-decoration: none; }
.portal-choice strong, .portal-choice span { display: block; }
.portal-choice span { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.portal-choice:hover { border-color: #3f5d84; }
.portal-choice.selected { border-color: var(--cyan); background: #0e2940; box-shadow: inset 3px 0 var(--cyan); }
.portal-choice.public { grid-column: 1 / -1; }
.portal-choice .portal-account-type { width: max-content; margin: 0 0 7px; padding: 2px 7px; border: 1px solid #315678; color: #9fddef; font-size: 10px; letter-spacing: .04em; }
.endpoint-login-context { display: grid; gap: 8px; margin-top: 20px; padding: 15px 16px; border: 1px solid var(--line); background: #0b1628; }
.endpoint-login-context > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.endpoint-login-context > strong { font-size: 18px; }
.endpoint-login-context > span { color: var(--muted); font-size: 12px; line-height: 1.6; }
.endpoint-login-context .endpoint-account-hint { color: #c5d9ee; }
.endpoint-path { color: var(--muted); font-family: Consolas, monospace; font-size: 11px; }
.endpoint-switch { width: max-content; color: var(--cyan); font-size: 12px; }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 0; color: var(--muted); font-size: 11px; }
.login-divider::before, .login-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.screen-device-login { display: grid; gap: 11px; margin-top: 20px; padding: 16px; border: 1px solid #315978; background: linear-gradient(145deg, #0b1b2e, #0a1627); }
.screen-device-login-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.screen-device-login-head strong { font-size: 14px; }
.screen-device-login > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.screen-device-onboarding { padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.screen-device-onboarding > strong { display: block; margin-bottom: 9px; color: #d7e8f8; font-size: 12px; }
.screen-device-onboarding ol { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.screen-device-onboarding li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; align-items: start; color: var(--muted); font-size: 11px; line-height: 1.55; }
.screen-device-onboarding li > span { color: var(--cyan); font-weight: 750; font-variant-numeric: tabular-nums; }
.screen-device-onboarding b { color: #d7e8f8; font-weight: 650; }
.screen-device-onboarding code { color: #a8e8f4; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .96em; overflow-wrap: anywhere; }
.screen-device-login label { margin-top: 0; }
#screen-device-activation-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .06em; }
.screen-device-login .button { min-height: 44px; margin-top: 0; }
.screen-device-login-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.screen-device-login-actions .button { padding: 8px 10px; font-size: 11px; }
.screen-device-message { min-height: 0; margin: 0; line-height: 1.55; }
.screen-device-message:empty { display: none; }
.screen-device-message[data-tone="info"] { color: #acd6ed; }
.screen-device-message[data-tone="success"] { color: #86efac; }
.screen-entry-context-error { padding: 9px 10px; border: 1px solid #6e5631; background: rgba(245, 158, 11, .07); color: #f7d598 !important; }
.screen-device-account-preview { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.screen-device-account-preview .button { width: auto; flex: 0 0 auto; padding: 7px 10px; }
.muted, .subtle { color: var(--muted); }
.form-message { min-height: 20px; color: var(--red); margin: 12px 0 0; }
.topbar { min-height: 64px; border-bottom: 1px solid var(--line); background: rgba(8, 17, 31, .92); display: flex; justify-content: space-between; align-items: center; padding: 10px clamp(18px, 4vw, 52px); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); }
.brand, .account { display: flex; align-items: center; gap: 12px; }
.brand strong, .brand span { display: block; }
.brand span { color: var(--muted); font-size: 12px; margin-top: 2px; }
.content { width: min(1440px, calc(100% - 36px)); margin: 0 auto; padding: 28px 0 48px; }
.content.narrow { width: min(760px, calc(100% - 32px)); }
.page-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 20px; }
.page-head h1 { margin: 0 0 6px; font-size: 24px; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.card { padding: 18px; margin-bottom: 16px; }
.span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; } .span-8 { grid-column: span 8; } .span-12 { grid-column: 1 / -1; }
.card h2 { margin: 0 0 14px; font-size: 16px; }
.card h3 { margin: 0 0 8px; font-size: 14px; }
.metric { font-size: 28px; font-weight: 700; color: var(--cyan); }
.metric-label { color: var(--muted); font-size: 12px; margin-top: 5px; }
.weather-title, .weather-head, .weather-observation, .weather-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.weather-title { align-items: flex-start; margin-bottom: 14px; }
.weather-title h2 { margin-bottom: 4px; }
.weather-stale { color: var(--amber) !important; }
.weather-snapshot-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; margin: 0 0 12px; border: 1px solid var(--line); background: var(--line); }
.weather-snapshot-meta > span { min-width: 0; padding: 8px 10px; background: #0b1628; color: var(--muted); font-size: 10.5px; overflow-wrap: anywhere; }
.weather-snapshot-meta b { display: block; margin-bottom: 3px; color: #c8d9eb; font-size: 9.5px; font-weight: 600; }
.weather-health { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: -2px 0 12px; color: var(--muted); font-size: 11px; }
.weather-alerts { margin: 0 0 12px; padding: 12px; border: 1px solid #804050; background: rgba(64, 31, 42, .58); }
.weather-alerts-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: #ffd8df; }
.weather-alerts-title span { color: #efacb8; font-size: 11px; }
.weather-alert { margin-top: 7px; border: 1px solid #804050; background: #271925; }
.weather-alert.amber { border-color: #80652a; background: #2b281c; }
.weather-alert summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; cursor: pointer; font-size: 12px; }
.weather-alert summary span { min-width: 0; overflow-wrap: anywhere; }
.weather-alert summary b { flex: 0 0 auto; color: #ffc1ca; font-size: 11px; }
.weather-alert.amber summary b { color: #ffe29a; }
.weather-alert-body { display: grid; gap: 7px; padding: 0 10px 10px; color: #d6e1ed; font-size: 11px; line-height: 1.65; }
.weather-alert-body span, .weather-alerts p { color: var(--muted); font-size: 10.5px; }
.weather-alerts p { margin: 9px 0 0; }
.order-weather { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.order-weather .status { white-space: normal; line-height: 1.35; }
.weather-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.weather-card { border: 1px solid var(--line); background: var(--panel-2); padding: 14px; }
.weather-head { align-items: flex-start; }
.weather-observation { justify-content: flex-start; margin-top: 14px; }
.weather-temp { min-width: 82px; color: var(--cyan); font-size: 28px; font-weight: 700; }
.weather-advice { min-height: 44px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink); font-size: 12px; line-height: 1.7; }
.weather-hourly { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--line); }
.weather-hourly-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 10.5px; }
.weather-hourly-title strong { color: #c8d9eb; font-size: 11px; }
.weather-hourly-list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(88px, 1fr); gap: 6px; margin-top: 7px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: thin; }
.weather-hourly-list > div { display: grid; gap: 2px; padding: 7px; border: 1px solid #2c4261; background: #0f1c30; }
.weather-hourly-list time, .weather-hourly-list small { color: var(--muted); font-size: 9.5px; }
.weather-hourly-list small { line-height: 1.35; overflow-wrap: anywhere; }
.weather-hourly-list b, .weather-hourly-list span { font-size: 11px; }
.weather-hourly-empty { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10.5px; }
.weather-foot { align-items: flex-start; margin-top: 9px; color: var(--muted); font-size: 11px; }
.weather-foot span:first-child { max-width: 62%; }
.weather-unresolved { margin-top: 12px; }
.weather-notice { margin: 0; }
.weather-attribution { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 11px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); color: #d6e1ed; font-size: 13px; line-height: 1.55; }
.weather-attribution strong { color: #f1f6fb; font-weight: 650; }
.weather-attribution a { color: #a6edff; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.weather-context-note { margin: 10px 0 0; color: #d6e1ed; font-size: 11px; line-height: 1.6; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid #22334d; vertical-align: top; font-size: 13px; }
th { color: var(--muted); font-size: 12px; font-weight: 600; }
.status { display: inline-flex; border: 1px solid #3a5579; border-radius: 999px; padding: 2px 8px; color: #b9d7f5; font-size: 12px; white-space: nowrap; }
.status.green { color: #a9f3d2; border-color: #296a54; }
.status.amber { color: #ffe29a; border-color: #80652a; }
.status.red { color: #ffc1ca; border-color: #804050; }
.notice { border-left: 3px solid var(--cyan); background: #0d1c31; padding: 14px 16px; margin-bottom: 16px; color: var(--muted); }
.notification-list { display: grid; gap: 10px; }
.notification-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border: 1px solid var(--line); background: var(--panel-2); padding: 13px 14px; }
.notification-item.unread { border-color: var(--cyan); }
.notification-item p { margin: 5px 0 7px; color: var(--muted); line-height: 1.6; }
.notification-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.notification-item .actions { flex: 0 0 auto; margin-top: 0; }
.notification-panel { min-width: 0; }
.notification-panel .weather-title { flex-wrap: wrap; }
.notification-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 14px 8px; }
.notification-filters [aria-pressed="true"] { border-color: var(--cyan); color: var(--ink); background: var(--panel-2); }
.notification-panel .notification-guidance { margin-block: 8px 14px; line-height: 1.6; }
.notification-item > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.notification-item .actions { flex-wrap: wrap; }
.notification-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.notification-pagination .actions { flex-wrap: wrap; margin-top: 0; }
.notification-panel button { min-height: 44px; }
.notification-panel .notice { overflow-wrap: anywhere; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.tag { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 9px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); font-size: 12px; }
.portal-directory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.portal-recent-entry { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding: 12px 14px; border: 1px solid #2a6171; background: linear-gradient(105deg, rgba(14, 47, 59, .84), rgba(12, 31, 50, .92)); }
.portal-recent-entry > div { min-width: 0; display: grid; gap: 3px; }
.portal-recent-entry strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.portal-recent-entry small { color: var(--muted); font-size: 11px; }
.portal-recent-entry .button { flex: 0 0 auto; }
.portal-directory-empty { grid-column: 1 / -1; border: 1px dashed var(--line); background: var(--panel-2); }
.portal-entry { display: flex; flex-direction: column; min-height: 180px; border: 1px solid var(--line); background: var(--panel-2); padding: 18px; }
.portal-entry h2 { margin: 0 0 8px; font-size: 17px; }
.portal-entry p { flex: 1; margin: 0 0 14px; color: var(--muted); line-height: 1.65; }
.portal-entry .button { align-self: flex-start; }
.portal-entry.unavailable { opacity: .68; }
.portal-entry .entry-state { min-height: 24px; margin-bottom: 8px; }
.ops-facts { display: grid; gap: 10px; }
.ops-facts > div { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(0, 1.4fr); gap: 14px; padding-bottom: 9px; border-bottom: 1px solid #22334d; }
.ops-facts span { color: var(--muted); font-size: 12px; }
.ops-facts strong { min-width: 0; overflow-wrap: anywhere; font-size: 13px; text-align: right; }
.empty { color: var(--muted); text-align: center; padding: 26px; }
.route { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.route b:last-child { text-align: right; }
.workflow-table { min-width: 1040px; }
.workflow-stack { display: grid; gap: 6px; min-width: 210px; }
.workflow-stack > div:not(.workflow-history-empty) { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 7px; }
.workflow-stack > div > span:first-child { color: var(--muted); font-size: 10.5px; }
.workflow-stack em, .workflow-empty, .workflow-history-empty { color: var(--muted); font-size: 10.5px; font-style: normal; }
.workflow-actions { min-width: 138px; align-items: stretch; flex-direction: column; }
.workflow-actions .button { width: 100%; white-space: normal; text-align: center; }
.workflow-history { grid-column: 1 / -1; display: grid; gap: 7px; margin: 7px 0 0; padding: 9px 0 0 18px; border-top: 1px solid var(--line); }
.workflow-history li { padding-left: 2px; color: #c8d9eb; font-size: 10.5px; }
.workflow-history li b, .workflow-history li span, .workflow-history li small { display: block; overflow-wrap: anywhere; }
.workflow-history li span, .workflow-history li small { margin-top: 2px; color: var(--muted); font-size: 9.5px; line-height: 1.45; }
.workflow-blockers { grid-column: 1 / -1; display: grid; gap: 5px; margin: 5px 0; padding: 8px 9px; border: 1px solid rgba(251, 191, 36, .42); border-radius: 7px; background: rgba(251, 191, 36, .09); color: #ffe29a; font-size: 10.5px; line-height: 1.45; }
.workflow-blockers span { overflow-wrap: anywhere; }
.workflow-archive-evidence { grid-column: 1 / -1; display: grid; gap: 4px; margin: 5px 0; padding: 8px 9px; border: 1px solid rgba(52, 211, 153, .32); border-radius: 7px; background: rgba(52, 211, 153, .07); color: #c8d9eb; font-size: 9.5px; }
.workflow-archive-evidence span { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 6px; overflow-wrap: anywhere; }
.workflow-archive-evidence b { color: var(--muted); font-weight: 500; }
.inspection-summary { display: grid; gap: 4px; margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--line); }
.inspection-summary > span, .inspection-summary > small { color: var(--muted); font-size: 9.5px; line-height: 1.45; }
.score { display: flex; align-items: baseline; gap: 8px; }
.score strong { font-size: 30px; color: var(--cyan); }
.question { margin: 18px 0; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.rating { display: flex; gap: 8px; flex-wrap: wrap; }
.rating label { margin: 0; display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); padding: 7px 10px; cursor: pointer; }
.rating input { width: auto; }
dialog { color: var(--ink); width: min(460px, calc(100% - 32px)); max-height: 86vh; overflow-y: auto; padding: 0; }
dialog::backdrop { background: rgba(0, 0, 0, .65); }
.dialog-form { min-width: 0; padding: 22px; }
.dialog-form label { min-width: 0; }
.dialog-form h2 { margin: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.toast { position: fixed; right: 24px; bottom: 24px; max-width: 420px; background: #10233d; border: 1px solid #2d6085; padding: 12px 16px; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .18s; }
.toast.show { opacity: 1; transform: translateY(0); }

/* 调度大屏：沿用现有深蓝/青绿视觉，只呈现服务端真实事实。 */
.portal-screen-mode { overflow: hidden; background: #050d19 radial-gradient(circle at 50% -20%, #143559 0, #071221 45%, #050b15 100%); }
.portal-screen-mode .topbar { min-height: 52px; padding: 6px 18px; position: relative; background: rgba(5, 13, 25, .96); }
.portal-screen-mode .topbar .brand-mark { width: 34px; height: 34px; }
.portal-screen-mode .topbar .button { padding: 6px 10px; font-size: 12px; }
.portal-screen-mode .content { width: 100%; height: calc(100vh - 52px); padding: 8px 12px 10px; overflow: hidden; }
.screen-command { height: 100%; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.screen-command-header { min-width: 0; min-height: 54px; display: grid; grid-template-columns: minmax(270px, 1fr) auto auto auto; align-items: center; gap: clamp(12px, 2vw, 28px); padding: 7px 12px; border: 1px solid #22415e; background: linear-gradient(90deg, rgba(12, 37, 60, .92), rgba(9, 23, 42, .94)); box-shadow: inset 0 -1px rgba(34, 211, 238, .08); }
.screen-command-title { min-width: 0; }
.screen-command-title > span { display: block; color: #84c8d8; font-size: 11px; letter-spacing: 0; }
.screen-command-title h1 { margin: 2px 0 0; font-size: 22px; line-height: 1.18; letter-spacing: .01em; text-wrap: balance; }
.screen-command-title p { margin: 3px 0 0; color: #9cb1c5; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.screen-command-clock { display: grid; text-align: right; }
.screen-command-clock time { color: #dff9ff; font: 700 19px/1.1 Consolas, monospace; letter-spacing: .02em; }
.screen-command-clock span { margin-top: 2px; color: #91a8bf; font-size: 11px; }
.screen-command-health { display: grid; grid-template-columns: repeat(2, auto); align-items: center; gap: 3px 12px; }
.screen-command-health > div { display: flex; align-items: center; gap: 6px; color: #c8d9eb; font-size: 11px; }
.screen-command-health small { grid-column: 1 / -1; color: #91a8bf; font-size: 11px; }
.screen-health-dot { width: 8px; height: 8px; border: 2px solid #65809c; border-radius: 50%; background: transparent; }
.screen-health-dot.green { border-color: var(--green); background: var(--green); }
.screen-health-dot.amber { border-color: var(--amber); }
.screen-health-dot.red { border-color: var(--red); background: var(--red); }
.screen-command-actions { display: flex; gap: 6px; }
.screen-command-actions .button { min-height: 34px; padding: 6px 10px; font-size: 11px; white-space: nowrap; }
.screen-refresh-state { min-height: 20px; display: flex; align-items: center; justify-content: flex-end; padding: 0 4px; color: #91a8bf; font-size: 11px; }
.screen-refresh-state.refreshing { color: #a8e9f4; }
.screen-refresh-state.failed { color: #ffbdc7; }
.screen-mode-nav { display: flex; min-width: 0; gap: 1px; border: 1px solid #223e59; background: #223e59; }
.screen-mode-nav button { min-height: 36px; flex: 1 1 0; border: 0; border-radius: 0; background: #0c1a2c; color: #a9bdd0; font-size: 12px; cursor: pointer; }
.screen-mode-nav button[aria-pressed="true"] { background: #103a50; color: #e9fbff; box-shadow: inset 0 -2px var(--cyan); }
.screen-mode-nav button:disabled { color: #60768c; background: #0b1626; cursor: not-allowed; }
.screen-kpis { min-width: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.screen-kpis article { min-width: 0; min-height: 66px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; gap: 2px 8px; padding: 8px 10px; border: 1px solid #29465f; background: rgba(11, 28, 48, .96); }
.screen-kpis article.risk { border-color: #78505a; background: rgba(53, 27, 40, .7); }
.screen-kpis span { min-width: 0; grid-column: 1; grid-row: 1; color: #a8bdd0; font-size: 11px; }
.screen-kpis strong { grid-column: 2; grid-row: 1 / span 2; color: #dffaff; font: 700 26px/1 Consolas, monospace; text-align: right; }
.screen-kpis small { min-width: 0; grid-column: 1; grid-row: 2; color: #91a8bf; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.screen-command-body { min-height: 0; flex: 1 1 auto; overflow: hidden; }
.screen-command-columns { height: 100%; min-height: 0; display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(320px, .92fr); gap: 8px; }
.screen-command-columns.dispatch-mode { grid-template-columns: minmax(0, 2fr) minmax(340px, .88fr); }
.screen-command-columns.weather-mode { grid-template-columns: minmax(0, 1.55fr) minmax(390px, 1fr); }
.screen-column { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow: auto; scrollbar-width: thin; scrollbar-color: #34536f transparent; }
.screen-panel { min-width: 0; padding: 11px 12px; border: 1px solid #29445e; background: rgba(10, 25, 43, .96); }
.screen-panel.screen-primary { min-height: 100%; display: flex; flex-direction: column; }
.screen-panel-head { min-width: 0; min-height: 24px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.screen-panel-head h2 { margin: 0; color: #e2eef9; font-size: 14px; letter-spacing: .01em; text-wrap: balance; }
.screen-panel-head span { color: #91a8bf; font-size: 11px; line-height: 1.45; text-align: right; }
.screen-panel-head > div > span { display: block; margin-top: 2px; text-align: left; }
.screen-privacy-badge { align-self: flex-start; padding: 2px 6px; border: 1px solid #315a73; color: #9de4ef !important; white-space: nowrap; }
.screen-status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.screen-status-grid > div { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 5px 7px; border: 1px solid #1b334b; background: #0b1a2c; }
.screen-status-grid span { min-width: 0; color: #a0b4c8; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen-status-grid strong { color: #d6f8ff; font: 600 14px Consolas, monospace; }
.screen-empty-inline { grid-column: 1 / -1; margin: 0; padding: 9px; color: #91a8bf; font-size: 11px; text-align: center; }
.screen-empty-state { min-height: 96px; display: grid; place-content: center; gap: 5px; padding: 14px; border: 1px dashed #294760; color: #87a0b8; text-align: center; }
.screen-empty-state strong { color: #c7d9eb; font-size: 12px; }
.screen-empty-state span { max-width: 460px; font-size: 11px; line-height: 1.6; }
.screen-empty-state.compact { min-height: 70px; }
.screen-exception-state { border-color: rgba(251, 113, 133, .72); background: rgba(79, 22, 35, .45); }
.screen-exception-state strong { color: #ffd0d8; }
.screen-focus-card { padding: 9px 10px; border: 1px solid #21405a; background: #0b1c30; }
.screen-focus-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.screen-focus-title > div { display: grid; gap: 2px; }
.screen-focus-title span { color: #91a8bf; font-size: 11px; }
.screen-focus-title strong { color: #eefaff; font-size: 14px; }
.screen-focus-card > p { margin: 7px 0; color: #b6c8d9; font-size: 12px; }
.screen-route-line { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 7px; padding: 7px; border: 1px solid #1e3e57; background: #081725; font-size: 12px; }
.screen-route-line span { color: var(--cyan); }
.screen-route-line b:last-child { text-align: right; }
.screen-focus-card dl, .screen-time-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 10px; margin: 8px 0 0; }
.screen-focus-card dl > div, .screen-time-facts > div { min-width: 0; display: grid; gap: 2px; }
.screen-focus-card dt, .screen-time-facts dt { color: #91a8bf; font-size: 11px; }
.screen-focus-card dd, .screen-time-facts dd { margin: 0; color: #d2deea; font-size: 11px; overflow-wrap: anywhere; }
.screen-stage-rail { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; margin: 9px 0; background: #1a3851; }
.screen-stage-rail > div { min-width: 0; display: grid; place-items: center; gap: 3px; padding: 7px 3px; background: #0a192b; color: #91a8bf; text-align: center; }
.screen-stage-rail span { width: 19px; height: 19px; display: grid; place-items: center; border: 1px solid #35516a; border-radius: 50%; font: 11px Consolas, monospace; }
.screen-stage-rail b { font-size: 11px; font-weight: 500; }
.screen-stage-rail .done { color: #9adccf; background: #0c282c; }
.screen-stage-rail .done span { border-color: #2c806b; }
.screen-stage-rail .current { color: #dffaff; background: #10364c; box-shadow: inset 0 -2px var(--cyan); }
.screen-stage-rail .current span { border-color: var(--cyan); }
.screen-area-plot { position: relative; min-height: 300px; flex: 1; overflow: hidden; border: 1px solid #1d3a53; background: radial-gradient(circle at 50% 45%, rgba(20, 74, 92, .24), transparent 48%), #071625; }
.screen-map-grid { position: absolute; inset: 0; opacity: .55; background-image: linear-gradient(rgba(56, 105, 132, .2) 1px, transparent 1px), linear-gradient(90deg, rgba(56, 105, 132, .2) 1px, transparent 1px); background-size: 12.5% 20%; }
.screen-area-point { position: absolute; left: var(--x); top: var(--y); z-index: 1; display: grid; gap: 1px; transform: translate(-50%, -50%); padding: 4px 6px; border: 1px solid #28617a; background: rgba(6, 25, 39, .94); white-space: nowrap; }
.screen-area-point > span { position: absolute; left: -4px; top: 50%; width: 7px; height: 7px; transform: translate(-50%, -50%) rotate(45deg); background: var(--cyan); }
.screen-area-point.amber > span { background: var(--amber); }
.screen-area-point.red > span { background: var(--red); }
.screen-area-point b { color: #dffaff; font-size: 11px; }
.screen-area-point small { color: #91a8bc; font-size: 11px; }
.screen-map-disclaimer { position: absolute; right: 7px; bottom: 6px; color: #91a8bf; font-size: 11px; }
.screen-geo-empty { min-height: 150px; flex: 1; display: grid; place-content: center; gap: 5px; padding: 14px; border: 1px dashed #294760; background: #071625; text-align: center; }
.screen-geo-empty strong { color: #b6c9da; font-size: 12px; }
.screen-geo-empty span { max-width: 440px; color: #91a8bf; font-size: 11px; line-height: 1.6; }
.screen-task-list { min-height: 0; display: grid; grid-auto-rows: max-content; align-content: start; gap: 5px; overflow: auto; scrollbar-width: thin; }
.screen-task { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; padding: 7px 8px; border: 1px solid #1b3953; border-radius: 0; background: #0a192b; color: #d8e8f6; text-align: left; cursor: pointer; }
.screen-task:hover, .screen-task.selected { border-color: #4ba2b5; background: #0d2a3b; }
.screen-task.selected { outline: 1px solid #59bed0; outline-offset: -2px; }
.screen-task > span { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.screen-task strong { min-width: 0; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.screen-task .status { padding: 1px 5px; font-size: 11px; }
.screen-task small { min-width: 0; grid-column: 1 / -1; color: #91a8bf; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen-task time { grid-column: 2; grid-row: 1; color: #a0b4c8; font-size: 11px; white-space: nowrap; }
.screen-weather-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.screen-weather-facts > div { display: grid; place-items: center; gap: 2px; padding: 6px 3px; border: 1px solid #1c3a54; background: #09192a; }
.screen-weather-facts span { color: #91a8bf; font-size: 11px; }
.screen-weather-facts strong { color: #d9f8ff; font: 600 16px Consolas, monospace; }
.screen-panel-note { margin: 7px 0 0; color: #9aafc3; font-size: 11px; line-height: 1.55; }
.screen-alert-stack { display: grid; gap: 5px; margin-top: 7px; }
.screen-alert-stack article { display: grid; gap: 2px; padding: 6px 7px; border: 1px solid rgba(251, 113, 133, .58); background: rgba(64, 31, 42, .6); }
.screen-alert-stack article.amber { border-color: var(--amber); background: rgba(60, 50, 25, .55); }
.screen-alert-stack strong { font-size: 12px; }
.screen-alert-stack span { color: #bdcad7; font-size: 11px; }
.screen-capabilities { display: grid; gap: 5px; }
.screen-capabilities .screen-panel-head { margin-bottom: 2px; }
.screen-capability { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 6px 7px; border: 1px solid #27384b; background: #0a1727; }
.screen-capability > span { width: 7px; height: 7px; border: 1px solid #718399; border-radius: 50%; }
.screen-capability.connected > span { border-color: var(--green); background: var(--green); }
.screen-capability > div { min-width: 0; display: grid; gap: 1px; }
.screen-capability strong { color: #c6d6e5; font-size: 11px; }
.screen-capability small { color: #91a8bf; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen-capability b { color: #a7b6c6; font-size: 11px; font-weight: 500; }
.screen-capability.connected b { color: #9ae7c5; }
.screen-weather-full { height: 100%; overflow: auto; scrollbar-width: thin; }
.screen-weather-full > .weather-panel { min-height: 100%; margin: 0; padding: 12px; box-shadow: none; }
.screen-weather-full .weather-title { margin-bottom: 8px; }
.screen-weather-full .weather-title .actions { margin-top: 0; }
.screen-weather-full .weather-card { padding: 10px; }
.screen-command-timeline { min-height: 92px; padding: 7px 11px 8px; border: 1px solid #203d59; background: rgba(8, 22, 38, .96); }
.screen-command-timeline .screen-panel-head { min-height: 18px; margin-bottom: 5px; }
.screen-timeline { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.screen-timeline li { min-width: 0; position: relative; display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 1px 5px; padding-right: 5px; color: #91a8bf; }
.screen-timeline li::before { content: ""; position: absolute; top: 6px; left: 7px; right: -5px; height: 1px; background: #29455f; }
.screen-timeline li:last-child::before { display: none; }
.screen-timeline li > span { z-index: 1; grid-row: 1 / span 2; width: 12px; height: 12px; border: 2px solid #3a5872; border-radius: 50%; background: #091728; }
.screen-timeline li.recorded > span { border-color: var(--cyan); background: #0f5266; }
.screen-timeline b { font-size: 11px; }
.screen-timeline time { color: #91a8bf; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.screen-map-stage { min-height: 0; gap: 8px; }
.screen-panel.screen-primary.screen-map-stage { min-height: 0; flex: 1 1 auto; }
.screen-map-stage .screen-area-plot { min-height: 0; }
.screen-map-stage #screen-geodata-map { width: 100%; height: 100%; min-height: 300px; }
.portal-screen-mode .screen-geodata-plot .geodata-map-toolbar,
.portal-screen-mode .screen-geodata-plot .geodata-map-legal,
.portal-screen-mode .screen-geodata-plot .geodata-map-advisory,
.portal-screen-mode .screen-geodata-plot .geodata-event-list summary,
.portal-screen-mode .screen-geodata-plot .geodata-event-list li,
.portal-screen-mode .screen-geodata-plot .geodata-layer-control summary,
.portal-screen-mode .screen-geodata-plot .geodata-layer-toggle,
.portal-screen-mode .screen-geodata-plot .geodata-layer-control-body > small,
.portal-screen-mode .screen-geodata-plot .geodata-map-toolbar time,
.portal-screen-mode .screen-geodata-plot .geodata-map-mode { font-size: 11px; }
.portal-screen-mode .screen-geodata-plot .geodata-layer-control { width: 202px; }
.portal-screen-mode .screen-geodata-plot .geodata-layer-control summary { min-height: 34px; }
.portal-screen-mode .screen-geodata-plot .geodata-layer-toggle { min-height: 32px; }
.screen-map-head { margin-bottom: 0; }
.screen-map-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.screen-renderer-switch { display: inline-flex; min-width: 0; border: 1px solid #31526d; background: #081624; }
.screen-renderer-switch button { min-height: 34px; padding: 6px 12px; border: 0; border-radius: 0; background: transparent; color: #a7bbce; font-size: 12px; cursor: pointer; }
.screen-renderer-switch button + button { border-left: 1px solid #31526d; }
.screen-renderer-switch button[aria-pressed="true"] { background: #124052; color: #effcff; box-shadow: inset 0 -2px #42ccdd; }
.screen-renderer-switch button:disabled { color: #647b91; background: #0a1827; cursor: not-allowed; }
.screen-map-service-state { min-width: 0; color: #9fb4c8; font-size: 11px; text-align: right; }
.screen-map-service-state.ready { color: #8ee0c2; }
.screen-map-service-state.failed { color: #ffb3bf; }
.screen-map-coordinate-note { margin: -2px 0 0; color: #91a8bf; font-size: 11px; line-height: 1.5; }
.screen-map-view-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.screen-map-view-controls button { min-height: 32px; padding: 5px 10px; border: 1px solid #31526d; border-radius: 4px; background: #091827; color: #b8cad9; font-size: 11px; cursor: pointer; }
.screen-map-view-controls button:hover { border-color: #4d829d; color: #e6f7fc; }
.screen-map-view-controls button[aria-pressed="true"] { border-color: #43b5c9; background: #103b4d; color: #ecfcff; }
.screen-map-view-controls button:disabled { border-color: #263a4d; background: #091522; color: #647b91; cursor: not-allowed; }
.screen-map-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #91a8bf; font-size: 11px; }
.screen-map-foot > span { flex: 0 0 auto; text-align: right; }
.screen-map-legend { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.screen-map-legend > span { display: inline-flex; align-items: center; gap: 5px; color: #a8bbce; white-space: nowrap; }
.screen-map-legend i { width: 7px; height: 7px; border-radius: 50%; background: #6becf5; }
.screen-map-legend [data-layer="tasks"] i { background: #46a4f2; }
.screen-map-legend [data-layer="weather"] i { background: #e3ad31; }
.screen-map-legend [data-layer="routes"] i { border-radius: 0; background: #38bdf8; }
.screen-map-legend b { color: #e1edf8; font-family: Consolas, monospace; }

.screen-route-summary { flex: 0 0 auto; }
.screen-route-facts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: #244158; }
.screen-route-facts > div { min-width: 0; display: grid; gap: 3px; padding: 8px 9px; background: #0a192a; }
.screen-route-facts span { color: #91a8bf; font-size: 11px; }
.screen-route-facts strong { min-width: 0; color: #dcebf7; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen-route-evidence { margin: 8px 0 0; color: #9eb1c4; font-size: 11px; line-height: 1.55; }
.screen-focus-panel .screen-stage-rail { margin-bottom: 0; }
.screen-recent-panel { min-height: 0; display: flex; flex: 1; flex-direction: column; }
.screen-recent-panel .screen-task-list { flex: 1; }
.screen-resource-details, .screen-weather-task-picker, .screen-source-details { border: 1px solid #29445e; background: rgba(10, 25, 43, .96); }
.screen-resource-details > summary, .screen-weather-task-picker > summary, .screen-source-details > summary { min-height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 8px 11px; color: #c8d8e7; font-size: 12px; cursor: pointer; }
.screen-resource-details > summary::after, .screen-weather-task-picker > summary::after, .screen-source-details > summary::after { content: "展开"; color: #91a8bf; font-size: 11px; }
.screen-resource-details[open] > summary::after, .screen-weather-task-picker[open] > summary::after, .screen-source-details[open] > summary::after { content: "收起"; }
.screen-resource-details > div { display: grid; gap: 8px; padding: 0 8px 8px; }
.screen-resource-details .screen-panel { border-color: #203a52; background: #091827; }
.screen-task-detail-panel { display: grid; grid-template-columns: minmax(250px, .9fr) minmax(360px, 1.35fr); gap: 10px; }
.screen-task-detail-panel .screen-focus-card { grid-row: 1 / span 2; }
.screen-task-detail-panel .screen-stage-rail { margin: 0; }
.screen-task-detail-panel .screen-timeline { align-self: end; }
.screen-task-queue { min-height: 0; display: flex; flex: 0 1 auto; flex-direction: column; }
.screen-task-queue .screen-task-list { flex: 0 1 auto; max-height: clamp(170px, 33vh, 640px); }

.screen-weather-link-state { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 5px 10px; margin: 0 0 9px; padding: 8px 9px; border: 1px solid #31516b; background: #0a1b2c; color: #aabed0; font-size: 11px; line-height: 1.45; }
.screen-weather-link-state strong { color: #d7e9f6; font-size: 11px; }
.screen-weather-link-state.linked { border-color: #2b6d69; background: rgba(17, 62, 59, .45); }
.screen-weather-link-state.linked strong { color: #a9ead5; }
.screen-weather-link-state.unavailable { border-color: #735f38; background: rgba(62, 49, 24, .42); }
.screen-weather-link-state.unavailable strong { color: #f0d58f; }

.screen-weather-workbench { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #34536f transparent; }
.screen-weather-workbench-head { position: sticky; top: -11px; z-index: 2; padding: 10px 0 9px; background: #0a192b; }
.screen-weather-workbench-head .actions { display: flex; align-items: center; gap: 6px; }
.screen-weather-workbench-head .button { min-height: 32px; margin: 0; }
.screen-weather-now { padding: 12px; border: 1px solid #31516a; background: #0b1c2d; }
.screen-weather-now-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.screen-weather-now-head > div:first-child { min-width: 0; display: flex; align-items: baseline; gap: 12px; }
.screen-weather-now-head > div:first-child > span { min-width: 0; color: #c8d8e7; font-size: 13px; overflow-wrap: anywhere; }
.screen-weather-now-head > div:first-child > strong { color: #e9fbff; font: 700 28px/1 Consolas, monospace; white-space: nowrap; }
.screen-weather-now-head > div:last-child { display: flex; align-items: center; gap: 8px; }
.screen-weather-now-head b { color: #e2edf7; font-size: 13px; }
.screen-weather-now dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 11px 0 0; background: #29445b; }
.screen-weather-now dl > div { min-width: 0; padding: 7px 8px; background: #091725; }
.screen-weather-now dt { color: #91a8bf; font-size: 11px; }
.screen-weather-now dd { margin: 3px 0 0; color: #d3e0ec; font-size: 12px; overflow-wrap: anywhere; }
.screen-weather-now > p { margin: 9px 0 0; color: #b6c9da; font-size: 11px; line-height: 1.55; }
.screen-weather-section { margin-top: 12px; }
.screen-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.screen-section-title h3 { margin: 0; color: #dce9f5; font-size: 13px; }
.screen-section-title span { color: #91a8bf; font-size: 11px; text-align: right; }
.screen-hourly-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.screen-hourly-grid article, .screen-daily-grid article { min-width: 0; display: grid; gap: 3px; padding: 8px; border: 1px solid #244058; background: #091827; }
.screen-hourly-grid time, .screen-daily-grid time { color: #9eb2c5; font-size: 11px; }
.screen-hourly-grid strong, .screen-daily-grid strong { color: #e0edf8; font-size: 13px; }
.screen-hourly-grid span, .screen-daily-grid span { min-width: 0; color: #b9cad9; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen-hourly-grid small, .screen-daily-grid small { color: #91a8bf; font-size: 11px; }
.screen-hourly-grid small { line-height: 1.35; overflow-wrap: anywhere; }
.screen-daily-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 5px; }
.screen-weather-area-list { display: grid; gap: 5px; }
.screen-weather-area-list article { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 7px 8px; border: 1px solid #244058; }
.screen-weather-area-list article > div { min-width: 0; display: grid; gap: 2px; }
.screen-weather-area-list strong { color: #dbe8f4; font-size: 12px; }
.screen-weather-area-list article > div span { color: #91a8bf; font-size: 11px; }
.screen-weather-area-list article > b { color: #e7f7fb; font: 650 14px Consolas, monospace; }
.screen-weather-unavailable { min-height: 100px; display: grid; place-content: center; gap: 4px; padding: 12px; border: 1px dashed #365269; color: #91a8bf; text-align: center; }
.screen-weather-unavailable strong { color: #d5e3ef; font-size: 13px; }
.screen-weather-unavailable span { max-width: 52ch; font-size: 11px; line-height: 1.55; }
.screen-weather-unavailable.compact { min-height: 64px; }
.screen-weather-workbench .screen-alert-stack details { border: 1px solid rgba(251, 113, 133, .58); background: rgba(64, 31, 42, .6); }
.screen-weather-workbench .screen-alert-stack details.amber { border-color: #a47b2e; background: rgba(60, 50, 25, .55); }
.screen-weather-workbench .screen-alert-stack summary { display: grid; gap: 3px; padding: 8px; cursor: pointer; }
.screen-weather-workbench .screen-alert-stack p { margin: 0; padding: 0 8px 8px; color: #c5d2df; font-size: 11px; line-height: 1.55; }
.screen-source-details { margin-top: 12px; background: #091725; }
.screen-source-details > div { padding: 0 10px 9px; }
.screen-source-facts { display: flex; flex-wrap: wrap; gap: 5px 12px; color: #aabccd; font-size: 11px; }
.screen-source-details .weather-attribution { margin-top: 8px; font-size: 11px; }
.screen-weather-legal-note { display: grid; gap: 4px; max-height: 96px; margin-top: 12px; padding: 9px 10px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #756d4f transparent; border: 1px solid #4e4b3d; background: rgba(52, 46, 27, .46); color: #c9c4ad; font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.screen-weather-legal-note strong { color: #eee6ca; font-size: 12px; }
.screen-map-stage > .screen-weather-legal-note { margin-top: 0; padding: 7px 9px; line-height: 1.4; }
.screen-weather-task-picker { flex: 0 0 auto; }
.screen-weather-task-picker .screen-task-list { max-height: 230px; padding: 0 8px 8px; }
.screen-priority-strip { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 8px 11px; border: 1px solid #875864; background: rgba(65, 29, 42, .88); color: #ffd9df; font-size: 12px; line-height: 1.45; }
.screen-priority-strip b { flex: 0 0 auto; padding: 2px 6px; border: 1px solid #b87583; color: #fff0f2; font: 700 11px Consolas, monospace; }
.screen-priority-strip span { min-width: 0; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  .portal-screen-mode *, .portal-screen-mode *::before, .portal-screen-mode *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (min-width: 1181px) {
  .screen-command-title > span, .screen-command-clock span, .screen-command-health small { font-size: 12px; }
  .screen-command-title p, .screen-command-health > div, .screen-refresh-state { font-size: 13px; }
  .screen-mode-nav button { font-size: 14px; }
  .screen-kpis span, .screen-kpis small { font-size: 12px; }
  .screen-panel-head h2 { font-size: 16px; }
  .screen-panel-head span, .screen-status-grid span, .screen-empty-inline { font-size: 12px; }
  .screen-status-grid strong { font-size: 17px; }
  .screen-empty-state strong, .screen-geo-empty strong { font-size: 14px; }
  .screen-empty-state span, .screen-geo-empty span { font-size: 13px; }
  .screen-focus-title span, .screen-focus-card dt, .screen-time-facts dt { font-size: 12px; }
  .screen-focus-title strong { font-size: 16px; }
  .screen-focus-card > p, .screen-route-line { font-size: 14px; }
  .screen-focus-card dd, .screen-time-facts dd { font-size: 13px; }
  .screen-stage-rail b, .screen-area-point small, .screen-map-disclaimer { font-size: 12px; }
  .screen-area-point b { font-size: 13px; }
  .screen-task strong { font-size: 14px; }
  .screen-task .status, .screen-task time, .screen-task small { font-size: 12px; }
  .screen-weather-facts span, .screen-panel-note, .screen-alert-stack span { font-size: 12px; }
  .screen-weather-facts strong { font-size: 20px; }
  .screen-alert-stack strong { font-size: 14px; }
  .screen-capability strong, .screen-capability b, .screen-capability small { font-size: 12px; }
  .screen-timeline b, .screen-timeline time { font-size: 12px; }
}

@media (min-width: 1921px) {
  .portal-screen-mode .content { padding: 14px 20px 16px; }
  .screen-command { gap: 12px; }
  .screen-command-columns { gap: 12px; }
  .screen-panel { padding: 14px 16px; }
  .screen-task, .screen-status-grid > div { padding: 9px 10px; }
}

@media (max-width: 1180px) and (min-width: 901px) {
  .screen-command-header { grid-template-columns: minmax(220px, 1fr) auto auto auto; gap: 10px; }
  .screen-command-health { display: none; }
  .screen-command-columns { grid-template-columns: minmax(0, 1.9fr) minmax(290px, .9fr); }
  .screen-command-columns.dispatch-mode { grid-template-columns: minmax(0, 1.75fr) minmax(310px, .92fr); }
  .screen-command-columns.weather-mode { grid-template-columns: minmax(0, 1.25fr) minmax(350px, 1fr); }
  .screen-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .screen-kpis small { display: block; }
  .screen-route-facts { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .screen-task-detail-panel { grid-template-columns: minmax(220px, .8fr) minmax(300px, 1.2fr); }
}

@media (max-width: 900px) {
  .portal-screen-mode { overflow: auto; }
  .portal-screen-mode .topbar { position: sticky; min-height: 58px; }
  .portal-screen-mode .topbar .button, .portal-screen-mode .weather-panel .button, .portal-screen-mode .screen-command button { min-width: 44px; min-height: 44px; }
  .portal-screen-mode .screen-command .screen-geodata-plot .geodata-layer-toggle { min-height: 44px; }
  .portal-screen-mode .content { width: min(100% - 20px, 760px); height: auto; min-height: calc(100vh - 58px); padding: 10px 0 28px; overflow: visible; }
  .screen-command { height: auto; display: block; }
  .screen-command > * { margin-bottom: 10px; }
  .screen-priority-strip { align-items: flex-start; flex-wrap: wrap; }
  .screen-command-header { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 10px; }
  .screen-command-title > span, .screen-command-title p, .screen-command-health { display: none; }
  .screen-command-clock { grid-column: 2; grid-row: 1; }
  .screen-command-clock time { font-size: 14px; }
  .screen-command-actions { grid-column: 1 / -1; }
  .screen-command-actions .button { min-height: 44px; flex: 1; }
  .screen-refresh-state { min-height: 28px; justify-content: flex-start; line-height: 1.45; }
  .screen-mode-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .screen-mode-nav button { min-height: 44px; }
  .screen-mode-nav button:disabled { display: none; }
  .screen-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screen-kpis article { min-height: 76px; padding: 9px 10px; }
  .screen-kpis article.risk { grid-column: 1 / -1; }
  .screen-kpis strong { font-size: 28px; }
  .screen-command-body { overflow: visible; }
  .screen-command-columns, .screen-command-columns.dispatch-mode, .screen-command-columns.weather-mode { height: auto; display: flex; flex-direction: column; }
  .screen-column { overflow: visible; }
  .screen-center { order: -1; }
  .weather-mode .screen-center { order: -1; }
  .screen-panel.screen-primary { min-height: 380px; }
  .screen-area-plot, .screen-geo-empty, .screen-map-stage #screen-geodata-map { min-height: 330px; }
  .screen-task { min-height: 54px; }
  .screen-task-list { max-height: none; overflow: visible; }
  .screen-task-queue .screen-task-list { max-height: none; }
  .screen-command-timeline { min-height: 0; }
  .screen-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 5px; }
  .screen-timeline li::before { display: none; }
  .screen-task-detail-panel { grid-template-columns: 1fr; }
  .screen-task-detail-panel .screen-focus-card { grid-row: auto; }
  .screen-weather-workbench { overflow: visible; }
  .screen-weather-workbench-head { position: static; padding-top: 0; }
  .screen-route-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .screen-command-header { grid-template-columns: 1fr; }
  .screen-command-clock { grid-column: 1; grid-row: auto; text-align: left; }
  .screen-command-title h1 { font-size: 19px; }
  .screen-command-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .screen-kpis { gap: 6px; }
  .screen-kpis article { min-width: 0; }
  .screen-kpis small { display: block; }
  .screen-stage-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .screen-focus-card dl, .screen-time-facts { grid-template-columns: 1fr; }
  .screen-area-point small { display: none; }
  .screen-panel { padding: 11px; }
  .screen-weather-full .weather-snapshot-meta { grid-template-columns: 1fr; }
  .portal-screen-mode .weather-snapshot-meta b { font-size: 11px; }
  .portal-screen-mode .weather-attribution { font-size: 12px; }
  .screen-panel-head h2 { font-size: 15px; }
  .screen-panel-head span, .screen-status-grid span, .screen-empty-inline, .screen-empty-state span, .screen-geo-empty span { font-size: 12px; }
  .screen-refresh-state, .screen-command-clock span, .screen-kpis span, .screen-weather-facts span, .screen-panel-note { font-size: 12px; }
  .screen-kpis small, .screen-stage-rail b, .screen-map-disclaimer { font-size: 11.5px; }
  .screen-focus-card > p, .screen-route-line, .screen-task strong { font-size: 13px; }
  .screen-focus-card dd, .screen-time-facts dd, .screen-task small, .screen-panel-note, .screen-alert-stack span { font-size: 12px; }
  .screen-focus-card dt, .screen-time-facts dt, .screen-task time, .screen-task .status { font-size: 11px; }
  .screen-alert-stack strong { font-size: 13px; }
  .screen-capability strong, .screen-capability b { font-size: 12px; }
  .screen-capability small { font-size: 11px; }
  .screen-timeline b, .screen-timeline time { font-size: 12px; }
  .screen-map-toolbar, .screen-map-foot, .screen-weather-now-head { align-items: stretch; flex-direction: column; }
  .screen-map-view-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screen-map-view-controls button { min-height: 44px; }
  .screen-weather-link-state { grid-template-columns: 1fr; }
  .screen-renderer-switch { width: 100%; }
  .screen-renderer-switch button { flex: 1; min-height: 44px; }
  .screen-map-service-state, .screen-map-foot > span { text-align: left; }
  .screen-map-legend { gap: 6px 10px; }
  .screen-route-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screen-weather-now-head > div:first-child { justify-content: space-between; }
  .screen-weather-now dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screen-hourly-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screen-weather-workbench-head { align-items: stretch; display: grid; }
  .screen-weather-workbench-head .actions { justify-content: space-between; }
  .screen-section-title { align-items: flex-start; }
}
@media (max-width: 900px) { .span-4, .span-6, .span-8 { grid-column: 1 / -1; } }
@media (max-width: 640px) { .topbar { align-items: center; flex-wrap: wrap; gap: 10px; } .brand, .account { width: 100%; min-width: 0; } .account { flex-wrap: wrap; justify-content: flex-start; gap: 8px; } .account > span:first-child { margin-right: auto; } .form-grid { grid-template-columns: 1fr; } .page-head { display: block; } .weather-title, .weather-alerts-title { display: grid; } .weather-title .actions { margin-top: 2px; } .weather-snapshot-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } .weather-grid { grid-template-columns: minmax(0, 1fr); } .weather-head { display: grid; } .weather-head .actions { margin-top: 0; } .weather-foot { display: grid; } .weather-foot span:first-child { max-width: none; } .weather-alert summary { align-items: flex-start; } .notification-item { display: grid; } }
@media (max-width: 420px) { .content { width: min(100% - 22px, 1440px); } .card { padding: 14px; } .weather-snapshot-meta { grid-template-columns: 1fr 1fr; } .weather-temp { min-width: 66px; font-size: 25px; } .weather-alert summary { display: grid; } .workflow-actions { min-width: 118px; } .dialog-form { padding: 16px; } .dialog-actions { align-items: stretch; flex-direction: column-reverse; } .dialog-actions .button { width: 100%; } }
@media (max-width: 640px) { .portal-choice-grid, .portal-directory { grid-template-columns: 1fr; } .portal-choice.public { grid-column: auto; } .login-card { padding: 24px; } .portal-recent-entry { align-items: stretch; flex-direction: column; gap: 10px; } .portal-recent-entry .button { width: 100%; } .screen-device-login > p, .screen-device-onboarding li { font-size: 12px; } .screen-device-onboarding > strong { font-size: 13px; } .screen-device-login-actions { grid-template-columns: 1fr; } .screen-device-account-preview { align-items: stretch; flex-direction: column; } .screen-device-account-preview .button { width: 100%; } .ops-facts > div { grid-template-columns: 1fr; gap: 4px; } .ops-facts strong { text-align: left; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* 大屏最终覆盖层：portal-content.css 后加载，以下使用入口作用域锁定可读性与两列地图主舞台。 */
.portal-screen-mode .screen-command { gap: 8px; }
.portal-screen-mode .screen-command-header {
  min-height: 64px;
  grid-template-columns: minmax(240px, 1fr) minmax(300px, auto) auto auto;
  gap: 12px;
  padding: 7px 12px;
  border: 1px solid #29455f;
  background: rgba(9, 24, 42, .98);
}
.portal-screen-mode .screen-command-title > span { color: #84c8d8; font-size: 11px; letter-spacing: 0; }
.portal-screen-mode .screen-command-title h1 { color: #eaf4fc; font-size: 22px; font-weight: 650; line-height: 1.18; letter-spacing: .01em; }
.portal-screen-mode .screen-command-title p { color: #9cb1c5; font-size: 11px; }
.portal-screen-mode .screen-mode-nav { gap: 1px; padding: 0; border-radius: 0; overflow: visible; background: #29445e; }
.portal-screen-mode .screen-mode-nav button { min-width: 0; min-height: 36px; flex: 1 1 0; padding: 7px 12px; border-radius: 0; color: #a9bdd0; font-size: 12px; }
.portal-screen-mode .screen-mode-nav button[aria-pressed="true"] { background: #124052; color: #effcff; box-shadow: inset 0 -2px #42ccdd; }
.portal-screen-mode .screen-command-clock time { color: #dff9ff; font: 700 19px/1.1 Consolas, monospace; }
.portal-screen-mode .screen-command-clock span,
.portal-screen-mode .screen-command-health > div,
.portal-screen-mode .screen-command-health small,
.portal-screen-mode .screen-refresh-state { color: #9eb2c6; font-size: 11px; }
.portal-screen-mode .screen-command-actions { gap: 6px; }
.portal-screen-mode .screen-command-actions .button { min-height: 36px; padding: 7px 10px; border-radius: 5px; font-size: 11px; }
.portal-screen-mode .screen-priority-strip { min-height: 0; gap: 9px; padding: 8px 11px; border: 1px solid #875864; background: rgba(65, 29, 42, .88); color: #ffd9df; font-size: 12px; }
.portal-screen-mode .screen-priority-strip b { padding: 2px 6px; border: 1px solid #b87583; border-radius: 0; color: #fff0f2; font-size: 11px; }
.portal-screen-mode .screen-priority-strip span { overflow: visible; text-overflow: clip; white-space: normal; }
.portal-screen-mode .screen-kpis { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; border: 0; background: transparent; }
.portal-screen-mode .screen-kpis article { min-height: 66px; gap: 2px 8px; padding: 8px 10px; border: 1px solid #29465f; background: rgba(11, 28, 48, .96); }
.portal-screen-mode .screen-kpis article:last-child { border-right: 1px solid #29465f; }
.portal-screen-mode .screen-kpis article.risk { border-color: #78505a; background: rgba(53, 27, 40, .7); }
.portal-screen-mode .screen-kpis span,
.portal-screen-mode .screen-kpis small { color: #a8bdd0; font-size: 11px; }
.portal-screen-mode .screen-kpis strong { color: #dffaff; font: 700 26px/1 Consolas, monospace; }
.portal-screen-mode .screen-command-body { min-height: 0; flex: 1 1 auto; overflow: hidden; }
.portal-screen-mode .screen-command-columns { grid-template-columns: minmax(0, 2.15fr) minmax(320px, .92fr); gap: 8px; }
.portal-screen-mode .screen-command-columns.dispatch-mode { grid-template-columns: minmax(0, 2fr) minmax(340px, .88fr); gap: 8px; }
.portal-screen-mode .screen-command-columns.weather-mode { grid-template-columns: minmax(0, 1.55fr) minmax(390px, 1fr); gap: 8px; }
.portal-screen-mode .screen-column { gap: 8px; overflow-y: auto; }
.portal-screen-mode .screen-center { border: 0; }
.portal-screen-mode .screen-panel { padding: 11px 12px; border: 1px solid #29445e; border-radius: 0; background: rgba(10, 25, 43, .96); }
.portal-screen-mode .screen-panel.screen-primary { min-height: 0; }
.portal-screen-mode .screen-panel-head { min-height: 24px; margin-bottom: 8px; }
.portal-screen-mode .screen-panel-head h2 { color: #e2eef9; font-size: 14px; letter-spacing: .01em; }
.portal-screen-mode .screen-panel-head span { color: #91a8bf; font-size: 11px; }
.portal-screen-mode .screen-privacy-badge { padding: 2px 6px; color: #9de4ef !important; font-size: 11px !important; }
.portal-screen-mode .screen-focus-card { padding: 9px 10px; border-color: #31516b; border-radius: 0; background: #0b1c30; }
.portal-screen-mode .screen-focus-title span,
.portal-screen-mode .screen-focus-card dt,
.portal-screen-mode .screen-time-facts dt { color: #91a8bf; font-size: 11px; }
.portal-screen-mode .screen-focus-title strong { color: #eefaff; font-size: 14px; }
.portal-screen-mode .screen-focus-card > p,
.portal-screen-mode .screen-route-line { color: #b6c8d9; font-size: 12px; }
.portal-screen-mode .screen-route-line { border-radius: 0; }
.portal-screen-mode .screen-focus-card dd,
.portal-screen-mode .screen-time-facts dd { color: #d2deea; font-size: 11px; }
.portal-screen-mode .screen-stage-rail span { width: 19px; height: 19px; font-size: 11px; }
.portal-screen-mode .screen-stage-rail b { font-size: 11px; }
.portal-screen-mode .screen-area-plot,
.portal-screen-mode .screen-geo-empty { min-height: 300px; border-radius: 0; background-color: #071625; }
.portal-screen-mode .screen-geo-empty span { color: #91a8bf; font-size: 11px; }
.portal-screen-mode .screen-task-list { gap: 5px; }
.portal-screen-mode .screen-task { padding: 7px 8px; border: 1px solid #29445e; background: #0a192b; }
.portal-screen-mode .screen-task:hover,
.portal-screen-mode .screen-task.selected { border-color: #4ba2b5; background: #0d2a3b; }
.portal-screen-mode .screen-task.selected { outline: 1px solid #59bed0; outline-offset: -2px; }
.portal-screen-mode .screen-task strong { font-size: 12px; }
.portal-screen-mode .screen-task .status,
.portal-screen-mode .screen-task time,
.portal-screen-mode .screen-task small { color: #9fb2c5; font-size: 11px; }
.portal-screen-mode .screen-weather-facts span,
.portal-screen-mode .screen-panel-note,
.portal-screen-mode .screen-alert-stack span { color: #9fb2c5; font-size: 11px; }
.portal-screen-mode .screen-alert-stack strong { font-size: 12px; }
.portal-screen-mode .screen-capability strong,
.portal-screen-mode .screen-capability b,
.portal-screen-mode .screen-capability small,
.portal-screen-mode .screen-timeline b,
.portal-screen-mode .screen-timeline time { font-size: 11px; }

@media (max-width: 1180px) and (min-width: 901px) {
  .portal-screen-mode .screen-command-header { grid-template-columns: minmax(220px, 1fr) minmax(280px, auto) auto; gap: 10px; }
  .portal-screen-mode .screen-command-meta { display: none; }
  .portal-screen-mode .screen-command-columns { grid-template-columns: minmax(0, 1.9fr) minmax(290px, .9fr); }
  .portal-screen-mode .screen-command-columns.dispatch-mode { grid-template-columns: minmax(0, 1.75fr) minmax(310px, .92fr); }
  .portal-screen-mode .screen-command-columns.weather-mode { grid-template-columns: minmax(0, 1.25fr) minmax(350px, 1fr); }
  .portal-screen-mode .screen-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .portal-screen-mode .screen-kpis small { display: block; }
  .portal-screen-mode .screen-map-head { margin-bottom: 0; }
  .portal-screen-mode .screen-route-facts { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .portal-screen-mode .screen-map-stage > .screen-weather-legal-note { max-height: 80px; }
}

@media (max-width: 900px) {
  .portal-screen-mode .screen-command { gap: 0; }
  .portal-screen-mode .screen-command-header { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 8px 10px; }
  .portal-screen-mode .screen-command-title h1 { font-size: 18px; }
  .portal-screen-mode .screen-command-actions .button { min-width: 44px; min-height: 44px; font-size: 11px; }
  .portal-screen-mode .screen-mode-nav button { min-height: 44px; }
  .portal-screen-mode .screen-priority-strip { align-items: flex-start; flex-wrap: wrap; font-size: 11px; }
  .portal-screen-mode .screen-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .portal-screen-mode .screen-kpis article { min-height: 70px; }
  .portal-screen-mode .screen-kpis article:nth-child(2n) { border-right: 1px solid #29465f; }
  .portal-screen-mode .screen-command-body { overflow: visible; }
  .portal-screen-mode .screen-command-columns,
  .portal-screen-mode .screen-command-columns.dispatch-mode,
  .portal-screen-mode .screen-command-columns.weather-mode { height: auto; display: flex; flex-direction: column; }
  .portal-screen-mode .screen-column { gap: 8px; overflow: visible; }
  .portal-screen-mode .screen-center,
  .portal-screen-mode .weather-mode .screen-center { order: -1; border: 0; }
  .portal-screen-mode .screen-panel.screen-primary.screen-map-stage { min-height: 430px; }
  .portal-screen-mode .screen-area-plot,
  .portal-screen-mode .screen-geo-empty,
  .portal-screen-mode .screen-map-stage #screen-geodata-map { min-height: 330px; }
}

@media (max-width: 420px) {
  .portal-screen-mode .content { width: 100%; }
  .portal-screen-mode .screen-command-header { padding-inline: 8px; }
  .portal-screen-mode .screen-map-toolbar,
  .portal-screen-mode .screen-map-foot,
  .portal-screen-mode .screen-weather-now-head { align-items: stretch; flex-direction: column; }
  .portal-screen-mode .screen-route-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-screen-mode .screen-hourly-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-screen-mode .screen-stage-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
  .portal-screen-mode .screen-map-stage > .screen-weather-legal-note { max-height: 180px; }
}

@media (min-width: 2560px) {
  .portal-screen-mode .screen-command { gap: 12px; }
  .portal-screen-mode .screen-command-header { min-height: 88px; padding: 11px 18px; }
  .portal-screen-mode .screen-command-title > span,
  .portal-screen-mode .screen-command-title p,
  .portal-screen-mode .screen-command-clock span,
  .portal-screen-mode .screen-command-health > div,
  .portal-screen-mode .screen-command-health small,
  .portal-screen-mode .screen-refresh-state { font-size: 15px; }
  .portal-screen-mode .screen-command-title h1 { font-size: 30px; }
  .portal-screen-mode .screen-command-clock time { font-size: 26px; }
  .portal-screen-mode .screen-mode-nav button { min-height: 48px; font-size: 17px; }
  .portal-screen-mode .screen-command-actions .button { min-height: 46px; padding-inline: 16px; font-size: 15px; }
  .portal-screen-mode .screen-kpis article { min-height: 92px; padding: 12px 15px; }
  .portal-screen-mode .screen-kpis span,
  .portal-screen-mode .screen-kpis small { font-size: 15px; }
  .portal-screen-mode .screen-kpis strong { font-size: 38px; }
  .portal-screen-mode .screen-panel { padding: 15px 17px; }
  .portal-screen-mode .screen-panel-head h2 { font-size: 20px; }
  .portal-screen-mode .screen-panel-head span,
  .portal-screen-mode .screen-map-coordinate-note,
  .portal-screen-mode .screen-map-service-state,
  .portal-screen-mode .screen-map-legend,
  .portal-screen-mode .screen-route-facts span,
  .portal-screen-mode .screen-route-evidence,
  .portal-screen-mode .screen-weather-legal-note { font-size: 14px; }
  .portal-screen-mode .screen-renderer-switch button { min-height: 46px; padding-inline: 17px; font-size: 16px; }
  .portal-screen-mode .screen-map-view-controls button { min-height: 44px; padding-inline: 15px; font-size: 15px; }
  .portal-screen-mode .screen-weather-link-state,
  .portal-screen-mode .screen-weather-link-state strong { font-size: 14px; }
  .portal-screen-mode .screen-route-facts strong { font-size: 17px; }
}

/* Driver self-service profile -------------------------------------------------
   Kept in the shared portal stylesheet so the native portal and the compact
   mobile shell use the same visual language. The high-specificity prefix also
   protects these cards from legacy driver profile rules in ui-v2. */
.portal-driver-body .driver-profile-self-service {
  --profile-panel: var(--c-bg-elevated, #102536);
  --profile-panel-soft: var(--c-bg-subtle, #0c1d2c);
  --profile-border: var(--c-border, #29475d);
  --profile-text: var(--c-text, #edf5ff);
  --profile-muted: var(--c-text-muted, #9cb1c9);
  --profile-accent: var(--c-accent, #2dd4bf);
  margin: 0 0 18px;
  padding: clamp(16px, 2.4vw, 26px);
  border: 1px solid var(--profile-border);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(16, 37, 54, .98), rgba(8, 24, 37, .98));
  box-shadow: 0 18px 38px rgba(0, 0, 0, .16);
  min-width: 0;
}
.portal-driver-body .driver-profile-self-head,
.portal-driver-body .driver-profile-readonly-head,
.portal-driver-body .driver-profile-subhead,
.portal-driver-body .driver-profile-completeness-label,
.portal-driver-body .driver-profile-form-footer,
.portal-driver-body .driver-profile-document-title,
.portal-driver-body .driver-profile-self-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.portal-driver-body .driver-profile-self-head { align-items: flex-start; }
.portal-driver-body .driver-profile-self-head h2,
.portal-driver-body .driver-profile-readonly-head h3,
.portal-driver-body .driver-profile-subhead h3 { margin: 0; color: var(--profile-text); }
.portal-driver-body .driver-profile-self-head h2 { font-size: clamp(20px, 2.2vw, 28px); letter-spacing: -.02em; }
.portal-driver-body .driver-profile-self-head p,
.portal-driver-body .driver-profile-subhead p { margin: 5px 0 0; color: var(--profile-muted); font-size: 12px; line-height: 1.6; }
.portal-driver-body .driver-profile-eyebrow { display: block; margin-bottom: 6px; color: var(--profile-accent); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.portal-driver-body .driver-profile-self-actions { flex-wrap: wrap; justify-content: flex-end; }
.portal-driver-body .driver-profile-review-banner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(180px, .75fr); gap: 20px; align-items: center; margin: 20px 0; padding: 14px 16px; border: 1px solid var(--profile-border); border-radius: 12px; background: rgba(7, 20, 31, .62); }
.portal-driver-body .driver-profile-review-banner.amber { border-color: rgba(245, 183, 73, .45); }
.portal-driver-body .driver-profile-review-banner.red { border-color: rgba(251, 113, 133, .48); }
.portal-driver-body .driver-profile-review-banner.green { border-color: rgba(52, 211, 153, .42); }
.portal-driver-body .driver-profile-review-banner strong { color: var(--profile-text); font-size: 14px; }
.portal-driver-body .driver-profile-review-banner p { margin: 5px 0 0; color: var(--profile-muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.portal-driver-body .driver-profile-completeness { min-width: 0; }
.portal-driver-body .driver-profile-completeness-label { margin-bottom: 7px; color: var(--profile-muted); font-size: 11px; }
.portal-driver-body .driver-profile-completeness-label b { color: var(--profile-text); font-variant-numeric: tabular-nums; }
.portal-driver-body .driver-profile-progress { height: 7px; overflow: hidden; border-radius: 99px; background: rgba(128, 170, 192, .18); }
.portal-driver-body .driver-profile-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1fbfa5, #63e6be); transition: width .25s ease; }
.portal-driver-body .driver-profile-readonly { min-width: 0; }
.portal-driver-body .driver-profile-readonly-head { margin-bottom: 15px; }
.portal-driver-body .driver-profile-field-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; border: 1px solid var(--profile-border); border-radius: 10px; overflow: hidden; background: var(--profile-border); }
.portal-driver-body .driver-profile-field-grid > div { min-width: 0; padding: 12px 14px; background: var(--profile-panel-soft); }
.portal-driver-body .driver-profile-field-grid dt { color: var(--profile-muted); font-size: 11px; }
.portal-driver-body .driver-profile-field-grid dd { margin: 5px 0 0; color: var(--profile-text); font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.portal-driver-body .driver-profile-documents { margin-top: 20px; }
.portal-driver-body .driver-profile-subhead { align-items: flex-end; margin-bottom: 10px; }
.portal-driver-body .driver-profile-subhead > span { color: var(--profile-muted); font-size: 11px; white-space: nowrap; }
.portal-driver-body .driver-profile-document-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; min-width: 0; }
.portal-driver-body .driver-profile-document-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--profile-border); border-radius: 11px; background: rgba(9, 27, 41, .84); }
.portal-driver-body .driver-profile-document-card.is-missing { border-color: rgba(245, 183, 73, .62); }
.portal-driver-body .driver-profile-document-preview { display: grid; place-items: center; aspect-ratio: 1.52 / 1; min-height: 86px; overflow: hidden; background: linear-gradient(135deg, rgba(44, 83, 103, .55), rgba(7, 21, 32, .8)); color: var(--profile-muted); font-size: 11px; }
.portal-driver-body .driver-profile-document-preview.is-empty { border-bottom: 1px dashed rgba(134, 180, 197, .24); }
.portal-driver-body .driver-profile-document-preview img { width: 100%; height: 100%; object-fit: cover; }
.portal-driver-body .driver-profile-document-copy { display: grid; gap: 7px; min-width: 0; padding: 10px; }
.portal-driver-body .driver-profile-document-title { align-items: flex-start; }
.portal-driver-body .driver-profile-document-title strong { min-width: 0; color: var(--profile-text); font-size: 12px; overflow-wrap: anywhere; }
.portal-driver-body .driver-profile-document-title .status { flex: 0 0 auto; font-size: 10px; padding: 1px 6px; }
.portal-driver-body .driver-profile-document-copy > p { min-height: 31px; margin: 0; color: var(--profile-muted); font-size: 10.5px; line-height: 1.5; overflow-wrap: anywhere; }
.portal-driver-body .driver-profile-document-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.portal-driver-body .driver-profile-file-picker { position: relative; overflow: hidden; cursor: pointer; }
.portal-driver-body .driver-profile-file-picker input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; opacity: 0; cursor: pointer; }
.portal-driver-body .driver-profile-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.portal-driver-body .driver-profile-form-grid label,
.portal-driver-body .driver-profile-reason { min-width: 0; color: var(--profile-muted); font-size: 12px; }
.portal-driver-body .driver-profile-form-grid label { margin-top: 0; margin-bottom: 12px; }
.portal-driver-body .driver-profile-form-grid input,
.portal-driver-body .driver-profile-form-grid select,
.portal-driver-body .driver-profile-reason textarea { min-width: 0; margin-top: 6px; border-color: var(--profile-border); background: rgba(7, 22, 34, .8); }
.portal-driver-body .driver-profile-form-grid input:disabled,
.portal-driver-body .driver-profile-form-grid select:disabled,
.portal-driver-body .driver-profile-reason textarea:disabled { opacity: .7; }
.portal-driver-body .driver-profile-reason { display: grid; margin-top: 18px; }
.portal-driver-body .driver-profile-reason textarea { min-height: 74px; resize: vertical; }
.portal-driver-body .required-mark { margin-left: 3px; color: #fb7185; }
.portal-driver-body .driver-profile-form-footer { justify-content: flex-end; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--profile-border); }
.portal-driver-body .driver-profile-form-footer .button { min-width: 120px; }
.portal-driver-body .driver-profile-inline-error,
.portal-driver-body .driver-profile-pending-lock { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 12px 0; padding: 10px 12px; border: 1px solid rgba(251, 113, 133, .44); border-radius: 8px; color: #ffc1ca; background: rgba(72, 28, 42, .35); font-size: 12px; line-height: 1.55; }
.portal-driver-body .driver-profile-pending-lock { border-color: rgba(245, 183, 73, .38); color: #ffe29a; background: rgba(74, 54, 21, .28); }
.portal-driver-body .driver-profile-loading { display: grid; place-items: center; gap: 9px; min-height: 150px; color: var(--profile-muted); font-size: 12px; }
.portal-driver-body .driver-profile-loading p { margin: 0; }
.portal-driver-body .driver-profile-document-dialog { width: min(760px, calc(100vw - 28px)); max-width: 100%; padding: 0; border: 1px solid #2b5368; border-radius: 14px; background: #071722; color: var(--profile-text); box-shadow: 0 28px 90px rgba(0, 0, 0, .55); }
.portal-driver-body .driver-profile-document-dialog::backdrop { background: rgba(1, 8, 14, .78); backdrop-filter: blur(5px); }
.portal-driver-body .driver-profile-document-dialog-shell { display: grid; gap: 12px; padding: 14px; }
.portal-driver-body .driver-profile-document-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.portal-driver-body .driver-profile-document-dialog img { display: block; width: 100%; max-height: min(72vh, 680px); object-fit: contain; border-radius: 8px; background: #020b11; }
.portal-driver-body .driver-profile-history { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--profile-border); }
.portal-driver-body .driver-profile-history-empty { padding: 14px; border: 1px dashed var(--profile-border); border-radius: 9px; color: var(--profile-muted); font-size: 12px; text-align: center; }
.portal-driver-body .driver-profile-history-list { display: grid; gap: 8px; }
.portal-driver-body .driver-profile-history-row { display: grid; gap: 7px; min-width: 0; padding: 11px 12px; border: 1px solid var(--profile-border); border-radius: 10px; background: rgba(7, 22, 34, .54); }
.portal-driver-body .driver-profile-history-row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-width: 0; }
.portal-driver-body .driver-profile-history-row-head > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; min-width: 0; }
.portal-driver-body .driver-profile-history-row-head strong { color: var(--profile-text); font-size: 12px; }
.portal-driver-body .driver-profile-history-row-head span { color: var(--profile-muted); font-size: 11px; }
.portal-driver-body .driver-profile-history-row-head > .status { flex: 0 0 auto; }
.portal-driver-body .driver-profile-history-reason { margin: 0; color: var(--profile-muted); font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.portal-driver-body .driver-profile-history-row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--profile-muted); font-size: 11px; }
.portal-driver-body .driver-profile-history-docs { display: flex; flex-wrap: wrap; gap: 6px; }

@media (max-width: 900px) {
  .portal-driver-body .driver-profile-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .portal-driver-body .driver-profile-self-head,
  .portal-driver-body .driver-profile-subhead { align-items: flex-start; flex-direction: column; }
  .portal-driver-body .driver-profile-self-actions { justify-content: flex-start; }
  .portal-driver-body .driver-profile-review-banner { grid-template-columns: 1fr; gap: 12px; }
  .portal-driver-body .driver-profile-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-driver-body .driver-profile-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .portal-driver-body .driver-profile-self-service { padding: 14px 11px; border-radius: 12px; }
  .portal-driver-body .driver-profile-field-grid,
  .portal-driver-body .driver-profile-document-grid { grid-template-columns: 1fr; }
  .portal-driver-body .driver-profile-form-footer { align-items: stretch; flex-direction: column-reverse; }
  .portal-driver-body .driver-profile-form-footer .button { width: 100%; }
}
