:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --bg-deep: #070b14;
  --bg: #0b1120;
  --surface: #111a2d;
  --surface-raised: #17243a;
  --surface-soft: #0e1728;
  --sidebar: #0a1020;
  --sidebar-raised: #111c31;
  --line: #30435f;
  --line-strong: #4b6384;
  --text: #f7faff;
  --text-soft: #d9e5f5;
  --muted: #bdcce0;
  --primary: #42d9e9;
  --primary-hover: #8cebf4;
  --primary-ink: #05212a;
  --success: #66dba9;
  --warning: #ffd27f;
  --danger: #ff9dab;
  --info: #92c1ff;
  --shadow-sm: 0 12px 26px rgba(0, 0, 0, .18);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, .46);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 9px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--bg-deep); }
body { min-width: 320px; min-height: 100dvh; margin: 0; color: var(--text); background: radial-gradient(circle at 92% -12%, rgba(51, 106, 154, .16), transparent 32rem), var(--bg); }
body, button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .52; transform: none !important; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(66, 217, 233, .78); outline-offset: 3px; }
button:not(:disabled):hover { transform: translateY(-1px); }
.hidden { display: none !important; }
.shell { min-height: 100dvh; }

/* Typography: readable Chinese-first hierarchy; auxiliary text never below 13px. */
h1, h2, h3 { margin: 0; color: var(--text); letter-spacing: -.018em; text-wrap: balance; }
h1 { font-size: 1.25rem; } h2 { font-size: clamp(1.625rem, 2.2vw, 2.25rem); } h3 { font-size: 1.125rem; }
.eyebrow { margin: 0; color: #c8dbf3; font-size: .8125rem; font-weight: 800; letter-spacing: .035em; line-height: 1.45; }
.status, .muted { color: var(--muted); font-size: .875rem; line-height: 1.7; }
small { color: var(--muted); font-size: .8125rem; line-height: 1.55; }
.notice { min-height: 1.35rem; color: var(--danger); font-size: .875rem; line-height: 1.6; }
.notice.success { color: var(--success); }

/* Login and loading */
.boot-screen { position: fixed; z-index: 100; inset: 0; display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--text); background: var(--bg-deep); }
.boot-screen > div:last-child { display: grid; gap: 4px; }
.boot-screen strong { font-size: 1rem; }
.boot-screen span { color: var(--muted); font-size: .875rem; }
.boot-mark, .brand-mark { display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #15cfe6, #627dff); box-shadow: 0 10px 25px rgba(43, 200, 229, .22); }
.boot-mark { width: 43px; height: 43px; border-radius: 13px; }
.boot-mark svg, .brand-mark svg { width: 23px; height: 23px; fill: currentColor; }
.login-view { position: relative; display: grid; grid-template-columns: minmax(340px, 460px) minmax(300px, 520px); gap: clamp(3rem, 9vw, 10rem); align-items: center; width: min(1160px, calc(100% - 48px)); min-height: 100dvh; margin: auto; padding: 48px 0; }
.login-view::before { position: absolute; z-index: -1; inset: 8% 4% 8% 42%; content: ""; border-radius: 32px; background: radial-gradient(circle at 50% 45%, rgba(66, 217, 233, .12), rgba(95, 110, 255, .04) 42%, transparent 72%); }
.login-orbit { display: none; }
.login-card { padding: clamp(28px, 4vw, 42px); border: 1px solid var(--line-strong); border-radius: 20px; background: rgba(17, 26, 45, .94); box-shadow: var(--shadow-lg); backdrop-filter: blur(14px); }
.brand-lockup { display: flex; align-items: center; gap: 11px; color: var(--text); }
.brand-lockup > span:last-child { display: grid; gap: 3px; }
.brand-lockup strong { font-size: 1.08rem; letter-spacing: -.02em; }
.brand-lockup small { color: var(--muted); font-size: .8125rem; font-weight: 700; letter-spacing: .025em; }
.brand-mark { width: 40px; height: 40px; border-radius: 11px; }
.login-copy { margin: 52px 0 30px; }
.login-copy .eyebrow { margin-bottom: 14px; }
.login-copy h1 { font-size: clamp(2.1rem, 4vw, 3.35rem); line-height: 1.15; }
.login-copy h1 em { color: var(--primary); font-style: normal; }
.login-copy p:last-child { max-width: 390px; margin: 16px 0 0; }
.stack { display: grid; gap: 15px; }
.login-foot, .aside-foot { display: flex; align-items: center; gap: 8px; margin-top: 20px; color: var(--muted); font-size: .875rem; }
.secure-dot, .signal-line { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.login-aside { padding: 20px 0; }
.aside-kicker { color: var(--primary); font-size: .8125rem; font-weight: 800; letter-spacing: .04em; }
.login-aside h2 { margin: 18px 0 42px; font-size: clamp(2rem, 3vw, 3.3rem); line-height: 1.16; }
.login-aside h2 span { color: var(--text-soft); }
.aside-stack { display: grid; }
.aside-item { display: flex; align-items: center; gap: 15px; padding: 17px 0; border-top: 1px solid var(--line); }
.aside-item > span:last-child { display: grid; gap: 4px; }
.aside-item strong { font-size: 1rem; }
.mini-icon { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--primary); background: var(--surface-raised); font-size: .8125rem; font-weight: 800; }

/* Forms and buttons */
label { display: grid; gap: 7px; color: var(--text-soft); font-size: .9375rem; font-weight: 750; }
label > span:first-child { display: flex; justify-content: space-between; gap: 12px; }
label small { color: var(--muted); }
input, select, textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: .78rem .9rem; color: var(--text); background: #0b1425; outline: 0; transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease); }
input::placeholder { color: #9db0ca; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(66, 217, 233, .14); background: #0d1729; }
.primary-action, button:not(.secondary):not(.text-button):not(.icon-button):not(.modal-close):not([data-view]):not([data-open-view]) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: .72rem 1rem; border-radius: var(--radius-sm); color: var(--primary-ink); background: linear-gradient(135deg, #39d8e9, #83eaf4); box-shadow: 0 10px 24px rgba(19, 205, 231, .18); font-weight: 800; transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease); }
.primary-action:hover, button:not(.secondary):not(.text-button):not(.icon-button):not(.modal-close):not([data-view]):not([data-open-view]):hover { background: linear-gradient(135deg, #8cebf4, #c0f8fb); }
.secondary { min-height: 37px; padding: .53rem .8rem; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text-soft); background: var(--surface-raised); font-size: .875rem; font-weight: 750; transition: border-color .16s var(--ease), background .16s var(--ease), color .16s var(--ease), transform .16s var(--ease); }
.secondary:hover { border-color: var(--primary); color: #fff; background: rgba(66, 217, 233, .12); }
.text-button, .table-link { padding: 0; color: #8cebf4; background: transparent; font-weight: 750; text-decoration: none; }
.table-link:hover, .text-button:hover { color: #d9fbff; text-decoration: underline; }

/* Application shell */
.app-frame { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { display: flex; flex-direction: column; min-height: 100dvh; padding: 20px 12px 16px; color: var(--text-soft); border-right: 1px solid var(--line); background: linear-gradient(180deg, #0a1020, #08101c); }
.sidebar-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 3px 8px 20px; }
.sidebar .brand-lockup { color: var(--text); }
.sidebar .brand-lockup small { color: #b7c7df; }
.brand-lockup.compact .brand-mark { width: 35px; height: 35px; border-radius: 10px; }
.brand-lockup.compact strong { font-size: 1rem; }
.env-pill { display: inline-flex; align-items: center; padding: 5px 8px; border: 1px solid #496285; border-radius: 999px; color: #d7e9ff; background: #16243b; font-size: .75rem; font-weight: 750; }
.workspace-switcher { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; padding: 12px; margin: 0 3px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--sidebar-raised); }
.workspace-switcher > span:nth-child(2) { display: grid; gap: 3px; }
.workspace-switcher strong { color: var(--text); font-size: .9375rem; }
.workspace-switcher small { color: #c4d2e6; }
.workspace-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--primary); background: rgba(66, 217, 233, .12); }
.workspace-avatar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav { display: grid; gap: 4px; }
.nav-label { margin: 18px 10px 7px; color: #c5d6ed; font-size: .8125rem; font-weight: 800; letter-spacing: .035em; }
.nav button { position: relative; display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: center; width: 100%; min-height: 43px; padding: 0 11px; border: 1px solid transparent; border-radius: 9px; color: #d6e2f3; background: transparent; text-align: left; font-size: .9375rem; font-weight: 700; transition: color .16s var(--ease), background .16s var(--ease), border-color .16s var(--ease); }
.nav button:hover { color: #fff; border-color: #405977; background: #15243a; transform: none; }
.nav button.active { color: #fff; border-color: #317d91; background: linear-gradient(90deg, rgba(29, 190, 214, .23), rgba(86, 111, 240, .16)); box-shadow: inset 3px 0 #57e0ed; }
.nav-icon { width: 17px; height: 17px; color: #bbcee7; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav button.active .nav-icon { color: #7de8f2; }
.nav kbd { color: #b7c8e0; font-size: .75rem; }
.sidebar-foot { margin-top: auto; padding: 18px 3px 0; }
.help-card { display: flex; align-items: center; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #101a2c; }
.help-card > span:last-child { display: grid; gap: 3px; }
.help-card strong { color: var(--text); font-size: .875rem; }
.help-card small { color: #c2d0e4; }
.help-mark { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid rgba(102, 219, 169, .44); border-radius: 7px; color: var(--success); }
.help-mark svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.main-area { min-width: 0; background: transparent; }
.topbar { position: sticky; z-index: 5; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: 74px; padding: 15px clamp(22px, 4vw, 48px); border-bottom: 1px solid var(--line); background: rgba(10, 17, 32, .93); backdrop-filter: blur(18px); }
.topbar-title { display: flex; align-items: center; gap: 12px; }
.topbar-title h1 { margin-top: 2px; font-size: 1.125rem; }
.topbar-actions, .account { display: flex; align-items: center; gap: 11px; }
.system-status { color: var(--text-soft); font-size: .875rem; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; vertical-align: middle; }
.status-dot.on { background: var(--success); box-shadow: 0 0 0 4px rgba(102, 219, 169, .12); }
.status-dot.off { background: var(--danger); }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: #e9fbff; background: linear-gradient(135deg, #1b8ca9, #5356ce); font-size: .8125rem; font-weight: 800; }
.account > span:not(.avatar) { color: var(--text-soft); font-size: .875rem; font-weight: 700; }
.content { width: min(1600px, 100%); padding: clamp(24px, 3.5vw, 44px); }
.mobile-brand { display: none; place-items: center; width: 31px; height: 31px; border-radius: 9px; color: #fff; background: var(--primary); font-size: .8125rem; font-weight: 850; }

/* Shared content surfaces */
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.toolbar h2 { margin-top: 7px; }
.toolbar .status { max-width: 760px; margin: 9px 0 0; }
.toolbar > button { align-self: center; }
.page-header { margin-bottom: 22px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-grid { margin-bottom: 24px; }
.card, .plan-card, .provider-summary { position: relative; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.card { margin-bottom: 18px; padding: 21px; }
.card h2, .card h3 { margin-bottom: 12px; }
.compact-metric { min-height: 128px; }
.metric-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text-soft); font-size: .9375rem; font-weight: 750; }
.metric-kicker { color: #a9c6ec; font-size: .8125rem; font-weight: 800; }
.metric { margin-top: 12px; color: var(--text); font-size: 2rem; font-weight: 800; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.card > .status { margin-top: 6px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; background: #0b1424; }
table { width: 100%; min-width: 650px; border-collapse: collapse; }
th, td { padding: 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .875rem; line-height: 1.55; }
th { color: #d4e2f5; background: #18253b; font-size: .8125rem; font-weight: 800; letter-spacing: .02em; }
td { color: var(--text-soft); }
td strong { color: var(--text); font-size: .9375rem; }
td small { color: var(--muted); }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #142139; }
code { color: #c7dcfb; word-break: break-all; font-size: .8125rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.badge { display: inline-flex; align-items: center; padding: 4px 9px; border: 1px solid #506986; border-radius: 999px; color: #dce9f9; background: #1a2940; font-size: .8125rem; font-weight: 750; line-height: 1.35; }
.badge-success { border-color: rgba(102, 219, 169, .48); color: #a8f0cc; background: rgba(69, 180, 126, .15); }
.badge-warning { border-color: rgba(255, 210, 127, .48); color: #ffe1a7; background: rgba(197, 132, 38, .17); }
.badge-danger { border-color: rgba(255, 157, 171, .48); color: #ffc5ce; background: rgba(202, 66, 89, .17); }
.badge-neutral { border-color: #536b88; color: #d1dced; background: #18253a; }
.badge-info { border-color: rgba(146, 193, 255, .48); color: #c7e1ff; background: rgba(72, 130, 200, .18); }
.danger, .danger-text { color: var(--danger) !important; }
.empty { padding: 34px 14px; color: var(--muted); text-align: center; font-size: .9375rem; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.filter-bar input, .filter-bar select { width: min(300px, 100%); background: #0b1424; }
.filter-count { margin-left: auto; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 18px; }
.span-all { grid-column: 1 / -1; }
.check-field { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.check-field input { width: auto; }
.check-field small { display: block; }
.amount-positive { color: var(--success); font-weight: 800; }
.amount-negative { color: var(--danger); font-weight: 800; }

/* Dashboard: restrained technology visual, high contrast above decoration. */
.dashboard-command-deck { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, .36fr) 174px; gap: 24px; align-items: stretch; min-height: 215px; margin-bottom: 18px; padding: 29px; overflow: hidden; border: 1px solid #3c6081; border-radius: 18px; background: linear-gradient(118deg, #122039, #111a2d 55%, #16233b); box-shadow: var(--shadow-sm); }
.dashboard-command-deck::before { position: absolute; z-index: -1; right: -7%; bottom: -66%; width: 52%; height: 220px; content: ""; opacity: .42; background: radial-gradient(ellipse, rgba(89, 111, 255, .46), transparent 68%); filter: blur(12px); }
.dashboard-hero-copy { position: relative; }
.dashboard-hero-copy h2 { max-width: 680px; margin-top: 8px; font-size: clamp(2rem, 3vw, 3rem); line-height: 1.14; }
.dashboard-hero-copy > p:not(.eyebrow) { max-width: 660px; margin: 12px 0 0; color: #d7e3f4; font-size: .9375rem; line-height: 1.8; }
.hero-orb { display: none; }
.dashboard-meta { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 19px; color: #d2e0f3; font-size: .875rem; }
.live-indicator { display: inline-flex; align-items: center; gap: 8px; color: #a8f0cc; font-weight: 700; }
.live-indicator i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(102, 219, 169, .12); }
.health-panel { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 8px 23px; border-left: 1px solid #3b5473; }
.panel-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #d5e3f5; font-size: .875rem; font-weight: 750; }
.dashboard-health strong { display: block; margin: 8px 0 11px; color: #fff; font-size: 2.65rem; line-height: 1; font-variant-numeric: tabular-nums; }
.dashboard-health strong small { margin-left: 3px; color: var(--primary); font-size: 1rem; }
.dashboard-health p, .dashboard-health span { color: #d1ddec; font-size: .875rem; line-height: 1.55; }
.health-track { height: 7px; margin-bottom: 9px; overflow: hidden; border-radius: 999px; background: #2b3b55; }
.health-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #22d1e5, #8b8bff); box-shadow: 0 0 14px rgba(66, 217, 233, .45); }
.dashboard-deck-actions { display: flex; flex-direction: column; justify-content: space-between; align-items: stretch; gap: 14px; min-width: 145px; }
.dashboard-refresh { align-self: stretch; color: #dffcff; border-color: #3c8897; background: #123244; }
.deck-note { color: #d3e0ef; font-size: .8125rem; line-height: 1.6; }
.dashboard-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.dashboard-kpi { position: relative; display: flex; align-items: center; gap: 13px; min-height: 112px; padding: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .16s var(--ease), transform .16s var(--ease); }
.dashboard-kpi:hover { border-color: #557ca3; }
.dashboard-kpi > div { min-width: 0; }
.dashboard-kpi p, .dashboard-kpi small { display: block; margin: 0; color: #c6d4e7; font-size: .875rem; line-height: 1.45; }
.dashboard-kpi strong { display: block; margin: 5px 0 3px; color: var(--text); font-size: 1.75rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-icon { flex: 0 0 auto; position: relative; width: 38px; height: 38px; border: 1px solid rgba(66, 217, 233, .36); border-radius: 10px; background: rgba(66, 217, 233, .12); }
.kpi-icon::before, .kpi-icon::after { position: absolute; content: ""; border-radius: 3px; background: #51ddea; }
.kpi-icon::before { left: 10px; bottom: 9px; width: 4px; height: 11px; box-shadow: 8px -5px 0 #72e6ef, 16px -10px 0 #a4eff5; }
.kpi-icon::after { left: 8px; right: 8px; bottom: 8px; height: 1px; background: #9aeaf3; }
.kpi-icon.people::before { top: 9px; bottom: auto; width: 7px; height: 7px; border-radius: 50%; box-shadow: 10px 2px 0 #72e6ef; }
.kpi-icon.people::after { left: 8px; right: auto; bottom: 8px; width: 12px; height: 8px; border-radius: 8px 8px 3px 3px; box-shadow: 10px 0 0 #72e6ef; }
.kpi-icon.route { border-color: rgba(155, 139, 255, .42); background: rgba(139, 120, 255, .14); }
.kpi-icon.route::before, .kpi-icon.route::after { background: #b3a7ff; }
.kpi-icon.worker { border-color: rgba(146, 193, 255, .42); background: rgba(146, 193, 255, .14); }
.kpi-icon.worker::before { inset: 10px; width: auto; height: auto; border: 2px solid #9ac8ff; background: transparent; }
.kpi-icon.worker::after { left: 15px; top: 8px; width: 5px; height: 21px; border-right: 2px solid #9ac8ff; border-left: 2px solid #9ac8ff; background: transparent; }
.kpi-icon.audit { border-color: rgba(255, 210, 127, .42); background: rgba(255, 210, 127, .12); }
.kpi-icon.audit::before { left: 10px; top: 9px; width: 17px; height: 17px; border: 2px solid #ffdf9c; background: transparent; }
.kpi-icon.audit::after { left: 14px; top: 13px; width: 8px; height: 5px; border-bottom: 2px solid #ffdf9c; border-left: 2px solid #ffdf9c; background: transparent; transform: rotate(-45deg); }
.kpi-glow { display: none; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .8fr); gap: 18px; align-items: stretch; }
.dashboard-panel { min-height: 300px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 0 0 16px; }
.section-heading h3 { margin-top: 5px; font-size: 1.125rem; }
.activity-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; align-items: end; height: 174px; padding: 18px 8px 5px; border-top: 1px solid var(--line); }
.activity-bar { display: grid; grid-template-rows: 22px 1fr 22px; align-items: end; height: 100%; text-align: center; }
.activity-bar i { display: block; width: min(27px, 70%); min-height: 5px; margin: 0 auto; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #28d1e4, #6d7ff3); box-shadow: 0 0 14px rgba(66, 217, 233, .18); }
.activity-bar:nth-child(2n) i { background: linear-gradient(180deg, #af9aff, #5a88ef); }
.activity-bar small, .activity-value { color: #c5d5ea; font-size: .8125rem; font-variant-numeric: tabular-nums; }
.activity-value { color: #eff6ff; font-weight: 700; }
.chart-foot { display: flex; justify-content: space-between; padding: 15px 8px 0; color: #c5d4e8; font-size: .875rem; }
.chart-foot i { display: inline-block; width: 31px; height: 5px; margin: 0 5px; border-radius: 999px; vertical-align: middle; background: linear-gradient(90deg, #53627d, #34d8e8); }
.dashboard-guide > .status { max-width: 100%; margin: 0 0 17px; color: #d3e1f3; }
.quick-links { display: grid; gap: 9px; }
.quick-links button { display: flex; align-items: center; justify-content: space-between; min-height: 66px; padding: 11px 14px; border: 1px solid #3b5472; border-radius: 11px; color: var(--text); background: #0d182a; text-align: left; transition: border-color .16s var(--ease), background .16s var(--ease), transform .16s var(--ease); }
.quick-links button > span { display: grid; gap: 5px; min-width: 0; }
.quick-links button b { color: #f5f9ff; font-size: .9375rem; font-weight: 800; }
.quick-links button small { color: #d2deef; font-size: .8125rem; font-weight: 600; }
.quick-links button > i { color: #8cebf4; font-size: 1.25rem; font-style: normal; }
.quick-links button:hover { border-color: #4bc7d5; color: #fff; background: #123247; }
.audit-heading { margin-top: 28px; }
.audit-card { padding: 0; overflow: hidden; }
.audit-card .table-wrap { border: 0; border-radius: 0; }

/* Providers, settings, plans */
.provider-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 20px; }
.provider-summary { padding: 18px; transition: border-color .16s var(--ease), transform .16s var(--ease); }
.provider-summary:hover { border-color: #547fa7; }
.provider-summary > div:first-child, .provider-cell { display: flex; align-items: center; gap: 10px; }
.provider-monogram { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(66, 217, 233, .32); border-radius: 10px; color: #9bf3fa; background: rgba(66, 217, 233, .12); font-weight: 850; }
.provider-summary strong { color: var(--text); font-size: 1rem; }
.provider-summary small, .provider-summary dt, .provider-cell small { color: var(--muted); }
.provider-summary dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 17px 0 13px; }
.provider-summary dl div { padding: 10px; border-radius: 9px; background: #0c1627; }
.provider-summary dt { font-size: .8125rem; }
.provider-summary dd { margin: 4px 0 0; color: var(--text); font-size: 1.25rem; font-weight: 800; }
.group-pill { display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid rgba(66, 217, 233, .32); border-radius: 999px; color: #a6f4fa; background: rgba(66, 217, 233, .1); font-size: .8125rem; font-weight: 750; }
.key-inventory-card { padding: 16px 0 0; overflow: hidden; }
.table-caption { display: flex; justify-content: space-between; gap: 12px; padding: 0 18px 15px; color: #cbd9eb; font-size: .875rem; }
.table-caption span:last-child { color: #a8f0cc; }
.credential-summary, .connection-status { display: grid; gap: 5px; }
.credential-summary { grid-template-columns: 20px minmax(0, 1fr); align-items: start; }
.credential-summary strong, .connection-status strong, .route-summary strong, .managed-route-field strong { color: var(--text); font-size: .9375rem; }
.credential-summary small, .connection-status small, .route-summary small, .managed-route-field small { color: var(--muted); }
.credential-lock { position: relative; width: 14px; height: 12px; margin-top: 4px; border: 2px solid #85eaf3; border-radius: 3px; }
.credential-lock::before { position: absolute; left: 2px; bottom: 9px; width: 6px; height: 6px; content: ""; border: 2px solid #85eaf3; border-bottom: 0; border-radius: 5px 5px 0 0; }
.connection-status .badge { width: max-content; }
.route-summary { min-width: 195px; }
.route-summary-icon, .managed-route-icon { background: #53dbe9; box-shadow: 0 0 0 4px rgba(66, 217, 233, .1); }
.managed-route-field { border: 1px solid rgba(66, 217, 233, .35); background: rgba(66, 217, 233, .1); }
.managed-route-icon { background: #a693ff; box-shadow: 0 0 0 4px rgba(139, 120, 255, .11); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 28px; }
.plan-card { min-height: 190px; padding: 20px; }
.plan-card.is-disabled { filter: saturate(.55); opacity: .72; }
.plan-card-top, .plan-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-code { color: #9eeaf3; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .8125rem; font-weight: 800; letter-spacing: .04em; }
.plan-card h3 { margin: 22px 0 11px; font-size: 1.2rem; }
.plan-number { color: var(--text); font-size: 2.2rem; font-weight: 800; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.plan-number small { display: inline-block; margin-left: 7px; font-size: .875rem; font-weight: 700; }
.plan-card-foot { margin-top: 22px; color: var(--muted); font-size: .875rem; }
.candidate-card { padding-top: 15px; }
.candidate-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 0 7px 15px; color: var(--muted); font-size: .875rem; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 18px; align-items: start; }
.settings-card { min-width: 0; }
.settings-readonly-card { position: sticky; top: 94px; }
.settings-list { display: grid; }
.settings-list label, .settings-readonly { display: grid; grid-template-columns: minmax(170px, .6fr) minmax(220px, 1fr); align-items: center; gap: 20px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.settings-list label span, .settings-readonly span { display: grid; gap: 5px; }
.settings-list label span strong, .settings-readonly span strong { font-size: .9375rem; }
.settings-readonly-list { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.settings-readonly code { display: block; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 9px; background: #0b1424; }
.form-actions { margin-top: 18px; }

/* Dialog and notifications */
.action-modal { width: min(720px, calc(100% - 32px)); padding: 0; border: 1px solid #496786; border-radius: 17px; color: var(--text); background: #111d32; box-shadow: var(--shadow-lg); }
.action-modal::backdrop { background: rgba(2, 7, 17, .74); backdrop-filter: blur(8px); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 25px; border-bottom: 1px solid var(--line); background: linear-gradient(110deg, rgba(49, 88, 135, .3), transparent 62%); }
.modal-head h2 { margin-top: 6px; font-size: 1.4rem; }
.modal-head .status { color: #d0dff2; }
.modal-close { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: 9px; color: #d7e5f6; background: #0c1626; }
.modal-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.modal-close:hover { border-color: var(--primary); color: #fff; background: #163246; }
.action-modal form { padding: 24px 25px 26px; }
.modal-actions { padding-top: 15px; border-top: 1px solid var(--line); }
.toast-stack { position: fixed; z-index: 40; right: 20px; bottom: 20px; display: grid; gap: 10px; width: min(420px, calc(100% - 40px)); }
.toast { padding: 14px 16px; border: 1px solid #496786; border-left: 4px solid var(--primary); border-radius: 11px; color: #e8f3ff; background: #142138; box-shadow: var(--shadow-lg); font-size: .9375rem; line-height: 1.55; }
.toast.error { border-left-color: var(--danger); }
.skeleton { background: linear-gradient(90deg, #101a2d, #1b2a45, #101a2d); background-size: 220% 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media (max-width: 1080px) {
  .dashboard-command-deck { grid-template-columns: minmax(0, 1fr) minmax(230px, .42fr); }
  .dashboard-deck-actions { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  .dashboard-refresh { align-self: auto; }
  .dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .app-frame { grid-template-columns: 215px minmax(0, 1fr); }
  .dashboard-command-deck, .dashboard-grid, .settings-layout { grid-template-columns: 1fr; }
  .health-panel { padding: 18px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .settings-readonly-card { position: static; }
}
@media (max-width: 720px) {
  .login-view { grid-template-columns: 1fr; width: min(100% - 32px, 520px); gap: 20px; padding: 32px 0; }
  .login-aside { display: none; }
  .app-frame { grid-template-columns: 1fr; }
  .sidebar { min-height: auto; padding-bottom: 14px; }
  .sidebar-foot { display: none; }
  .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-label { grid-column: 1 / -1; }
  .nav button { grid-template-columns: 19px 1fr; }
  .topbar { padding: 13px 16px; }
  .system-status, .account > span:not(.avatar) { display: none; }
  .content { padding: 20px 16px; }
  .dashboard-command-deck { padding: 22px 18px; }
  .dashboard-hero-copy h2 { font-size: 2rem; }
  .dashboard-deck-actions { align-items: stretch; flex-direction: column; }
  .dashboard-refresh { width: 100%; }
  .dashboard-kpi-grid { grid-template-columns: 1fr; }
  .section-heading { display: grid; gap: 7px; }
  .filter-count { width: 100%; margin-left: 0; }
  .settings-list label, .settings-readonly { grid-template-columns: 1fr; gap: 9px; }
  .key-inventory-card { margin-right: -16px; margin-left: -16px; border-right: 0; border-left: 0; border-radius: 0; }
}
