:root {
  color-scheme: light;
  --blue: #1768e8;
  --blue-hover: #0c55c7;
  --blue-soft: #edf4ff;
  --navy: #172b48;
  --muted: #596c84;
  --line: #dce4ee;
  --bg: #f3f6fa;
  --green: #14785d;
  --orange: #a45b09;
  --sidebar: #fff;
  --shadow: 0 3px 16px #233c5b05;
  --radius: 16px;
  --sidebar-width: 236px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--navy); font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
a, button { transition: background-color .16s, border-color .16s, color .16s, box-shadow .16s; }
button:disabled { cursor: not-allowed; opacity: .48; }
:focus-visible { outline: 3px solid #8bb9ff; outline-offset: 3px; }
button.button-waiting { cursor: progress; opacity: .75; }
button.button-waiting:not(.nav-item)::before { content: ""; display: inline-block; width: 17px; height: 17px; flex: 0 0 17px; margin-right: 3px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: admin-button-spin .8s linear infinite; }
@keyframes admin-button-spin { to { transform: rotate(360deg); } }
.hidden, [hidden] { display: none !important; }
.muted { color: var(--muted); }
.blue { color: var(--blue); }
.error { color: #b33132; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.error:empty { margin: 0; }
.primary, .secondary { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border: 1px solid transparent; border-radius: 10px; font-size: 15px; font-weight: 600; line-height: 1.5; text-align: center; white-space: nowrap; }
.primary { color: #fff; background: var(--blue); border-color: var(--blue); box-shadow: 0 2px 4px #1768e814; }
.secondary { color: #344d6a; background: #fff; border-color: #cdd8e5; }
.primary svg, .secondary svg, .date-pill svg { width: 19px; height: 19px; flex-shrink: 0; }
.danger { color: #b33132; }
.secondary.danger { color: #b33132; border-color: #e7bcbc; }
.full { width: 100%; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 4px; border: 0; border-radius: 7px; color: var(--blue); background: transparent; font-size: 14px; line-height: 1.5; }
.icon-button { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: white; color: #526780; font-size: 28px; line-height: 1; }
input, select, textarea { display: block; width: 100%; min-width: 0; min-height: 48px; padding: 11px 13px; border: 1px solid #c8d4e2; border-radius: 9px; color: var(--navy); background: white; outline: none; transition: border-color .16s, box-shadow .16s; }
input::placeholder, textarea::placeholder { color: #626f7e; opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #1768e81a; }
textarea { min-height: 110px; resize: vertical; line-height: 1.7; }
label { display: block; margin-bottom: 20px; color: #344b67; font-size: 15px; font-weight: 600; line-height: 1.6; }
label input, label select, label textarea { margin-top: 8px; font-weight: 400; }
label small { font-weight: 400; }
input[type="checkbox"], input[type="radio"] { display: inline-block; flex-shrink: 0; width: 20px; min-height: 20px; height: 20px; margin: 0 8px 0 0; accent-color: var(--blue); vertical-align: middle; }
input[type="file"] { padding: 8px; background: #f8faff; font-size: 14px; }
input[type="file"]::file-selector-button { min-height: 36px; margin-right: 12px; padding: 7px 12px; border: 0; border-radius: 6px; color: #285588; background: #e5efff; font: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.4; }
small { font-size: 14px; }
.eyebrow { display: block; font-size: 14px; font-weight: 600; line-height: 1.6; }
/* Sign in: a simple branded entry with readable controls. */
.login-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(460px, 1fr); min-height: 100svh; background: #fff; }
.login-story { position: relative; display: flex; flex-direction: column; min-height: 680px; padding: 48px clamp(36px, 5vw, 80px); overflow: hidden; border-right: 1px solid #dfe9fa; background: linear-gradient(150deg, #f7faff 15%, #edf4ff 100%); }
.login-story::after { content: ""; position: absolute; width: 420px; height: 420px; border: 64px solid #1768e808; border-radius: 50%; bottom: -150px; right: -150px; pointer-events: none; }
.wordmark { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.wordmark img { width: 48px; height: 48px; border-radius: 12px; background: #fff; }
.wordmark strong { display: block; font-size: 25px; font-weight: 700; letter-spacing: 1px; }
.wordmark div > span { display: none; }
.wordmark .wordmark-divider { margin-left: 6px; padding-left: 18px; border-left: 1px solid #bacde8; color: #4f698a; font-size: 15px; }
.story-copy { position: relative; z-index: 1; margin-top: clamp(80px, 14vh, 160px); }
.story-copy .eyebrow { color: #3e6ba3; }
.story-copy h1 { margin: 20px 0; font-size: clamp(34px, 3vw, 46px); font-weight: 650; line-height: 1.45; letter-spacing: -.5px; }
.story-copy p { color: #527096; font-size: 17px; line-height: 1.9; }
.story-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.story-chips span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #c9dbf4; border-radius: 8px; color: #385d8c; background: #ffffff80; font-size: 14px; }
.story-chips span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.story-footer { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 70px; color: #567090; }
.story-footer small, .story-footer > span { font-size: 14px; }
.charge-art, .art-grid, .orbit, .orbit.two, .art-ground, .pillar-shadow, .pillar, .pillar-brand, .pillar-screen, .pillar-light, .pillar-base, .cable, .cable-plug, .art-label, .art-label-line, .art-coordinate { display: none; }
.login-panel { position: relative; display: flex; align-items: center; justify-content: center; min-height: 680px; padding: 64px 40px 96px; }
.login-panel form { width: 100%; max-width: 410px; }
.login-panel h2 { margin: 13px 0 12px; font-size: 30px; font-weight: 700; letter-spacing: -.5px; }
.login-panel .muted { margin-bottom: 28px; font-size: 16px; line-height: 1.8; }
.login-panel label { margin-bottom: 22px; }
.login-panel label[for="password"] { margin-bottom: 8px; }
.login-panel .password-field { margin-top: 0; margin-bottom: 22px; }
.login-panel input { min-height: 52px; padding: 13px 14px; }
.login-panel .primary { min-height: 52px; margin-top: 6px; font-size: 16px; }
.login-panel .primary > span { margin-left: auto; font-size: 22px; }
.login-panel .error { margin-top: 14px; }
.login-panel .error:empty { margin: 0; }
.entry-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 28px; padding: 5px; border: 1px solid #e1e7f0; border-radius: 11px; background: #f1f4f9; }
.entry-switch a { display: grid; place-items: center; min-height: 46px; padding: 10px; border-radius: 7px; color: #5a6f89; font-size: 15px; }
.entry-switch a[aria-current="page"] { color: #155dcc; background: #fff; box-shadow: 0 1px 5px #203b5912; font-weight: 650; }
.demo-note { margin-top: 22px; padding: 16px 18px; border: 1px solid #dce6f2; border-radius: 10px; color: #596e88; background: #f7faff; font-size: 14px; line-height: 1.8; }
.demo-note-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; font-weight: 650; }
.demo-dot { width: 7px; height: 7px; border-radius: 50%; background: #b26e16; }
.demo-note p { margin: 0; }
.demo-note button { padding-bottom: 0; }
.login-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.preview-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: #536d8b; font-size: 14px; }
.login-panel-foot { position: absolute; bottom: 26px; left: 20px; right: 20px; color: #616f83; font-size: 14px; text-align: center; }
.login-mobile-brand { display: none; }
/* Shared sign-in and keyboard access helpers. */
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 12px 18px; border: 2px solid #fff; border-radius: 9px; color: #fff; background: var(--blue); font-size: 16px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.password-field { position: relative; display: block; margin-top: 8px; }
.password-field input { margin-top: 0; padding-right: 78px; }
.password-field button { position: absolute; top: 4px; right: 4px; display: inline-flex; align-items: center; justify-content: center; min-width: 64px; min-height: 44px; padding: 8px; border: 0; border-radius: 7px; color: #38659a; background: transparent; font-size: 14px; font-weight: 500; }
.password-field button:hover { background: #edf4ff; }
.password-field button svg { width: 21px; height: 21px; }
.story-features { display: grid; gap: 18px; margin-top: 30px; }
.story-feature { display: flex; align-items: flex-start; gap: 15px; }
.story-feature > span:first-child { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border: 1px solid #c1d6f5; border-radius: 9px; color: #2362b8; background: #ffffff88; font-size: 14px; font-weight: 650; }
.story-feature h3, .story-feature strong { display: block; margin: 0 0 3px; color: #2d5689; font-size: 17px; font-weight: 650; }
.story-feature p { margin: 0; color: #537096; font-size: 15px; line-height: 1.7; }
/* Application shell */
.shell { display: flex; min-height: 100svh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; flex-direction: column; width: var(--sidebar-width); padding: 28px 16px 18px; overflow-y: auto; border-right: 1px solid var(--line); background: var(--sidebar); }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 29px; color: var(--navy); }
.sidebar-brand img { width: 44px; height: 44px; border-radius: 11px; background: #fff; }
.sidebar-brand strong { display: flex; align-items: baseline; gap: 7px; font-size: 24px; font-weight: 700; letter-spacing: .5px; }
.sidebar-brand strong > span { display: none; }
.sidebar-brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; }
.nav-caption { display: flex; justify-content: space-between; margin: 2px 11px 12px; color: #606e80; font-size: 14px; font-weight: 500; }
.nav-caption > span { display: none; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; margin: 5px 0; padding: 12px 14px; border: 1px solid transparent; border-radius: 10px; color: #526782; background: transparent; font-size: 16px; text-align: left; white-space: nowrap; }
.nav-item svg { width: 22px; height: 22px; flex-shrink: 0; stroke-width: 1.8; }
#nav .nav-item.active { color: #145fcc; border-color: #dae8ff; background: var(--blue-soft); font-weight: 650; }
#nav .nav-item.active::after { content: ""; width: 5px; height: 20px; margin-left: auto; border-radius: 4px; background: var(--blue); }
.nav-label-mobile { display: none; }
.sidebar-note { display: block; margin: 26px 6px 0; padding: 14px; border: 1px solid #dce7f5; border-radius: 10px; background: #f7faff; }
.sidebar-note p { margin: 0 0 6px; color: #405f84; font-size: 14px; font-weight: 600; }
.sidebar-note small { color: #596f8c; font-size: 14px; line-height: 1.8; }
.sidebar-note-line { display: none; }
.sidebar-bottom { margin-top: auto; padding: 30px 10px 0; }
.sidebar-account { display: flex; align-items: center; gap: 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.account-avatar { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; color: #1c65c8; background: #edf4ff; font-size: 16px; font-weight: 650; }
.sidebar-account > div { min-width: 0; }
.sidebar-account strong { display: block; max-width: 125px; overflow: hidden; color: #324a68; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account small { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; }
.account-indicator { width: 7px; height: 7px; margin-left: auto; flex-shrink: 0; border-radius: 50%; background: #24a67e; }
.sidebar-meta { display: none; }
.workspace { flex: 1; min-width: 0; margin-left: var(--sidebar-width); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding: 14px 32px; border-bottom: 1px solid var(--line); background: #fff; }
.breadcrumbs { min-width: 0; font-size: 14px; white-space: nowrap; }
.crumb { padding: 0 12px; color: #676e78; }
#breadcrumb { color: #314c6c; font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.top-actions #account-name { max-width: 150px; overflow: hidden; padding-left: 14px; border-left: 1px solid var(--line); text-overflow: ellipsis; white-space: nowrap; }
.top-actions .text-button { color: #526b89; }
.owner-preview-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: #526b89; white-space: nowrap; }
#main { max-width: 1800px; min-height: calc(100vh - 160px); margin: auto; padding: 30px 32px 12px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-kicker, .panel-index, .modal-eyebrow { display: none; }
.page-heading h1 { margin: 0 0 9px; font-size: 29px; font-weight: 700; letter-spacing: -.5px; }
.page-heading p { max-width: 780px; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.page-heading .actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; padding-top: 3px; }
.date-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; color: #5a718b; background: #fff; font-size: 14px; white-space: nowrap; }
.welcome-strip { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; padding: 17px 20px; border: 1px solid #d4e4fa; border-radius: 12px; background: #edf4ff; }
.welcome-icon, .device-shortcut-icon, .charger-preparation-icon, .lock-policy-icon, .quick-icon { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 11px; color: var(--blue); background: #edf4ff; }
.welcome-icon { background: #fff; }
.welcome-icon svg, .device-shortcut-icon svg, .charger-preparation-icon svg, .lock-policy-icon svg { width: 24px; height: 24px; }
.welcome-strip h3 { margin: 0 0 4px; color: #284e7d; font-size: 16px; font-weight: 650; }
.welcome-strip p { margin: 0; color: #566f90; font-size: 14px; }
.welcome-strip a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-left: auto; color: #285ea3; font-size: 14px; white-space: nowrap; }
.welcome-strip a svg { width: 18px; height: 18px; }
.device-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.device-shortcut { display: flex; align-items: center; gap: 14px; min-width: 0; min-height: 100px; padding: 20px; border: 1px solid #d4e1f1; border-radius: 14px; color: #29476a; background: #fff; text-align: left; }
.device-shortcut > span:nth-child(2) { min-width: 0; }
.device-shortcut strong { display: block; margin-bottom: 5px; color: #21446d; font-size: 17px; font-weight: 650; }
.device-shortcut small { display: block; color: var(--muted); font-size: 14px; line-height: 1.6; }
.device-shortcut > svg { flex: 0 0 19px; width: 19px; height: 19px; margin-left: auto; color: #557090; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { position: relative; min-width: 0; padding: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.stat-card.featured { border-color: #cbdfff; background: #edf4ff; }
.stat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #4d6480; font-size: 15px; }
.stat-icon { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 9px; color: #4a709c; background: #f0f5fb; }
.stat-icon svg { width: 19px; height: 19px; stroke-width: 1.8; }
.stat-value { margin: 17px 0 18px; color: #1e3657; font-size: clamp(28px, 2.3vw, 36px); font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -.7px; overflow-wrap: anywhere; }
.stat-value .currency { margin-right: 5px; color: #4870a0; font-size: 22px; font-weight: 500; }
.stat-value small { margin-left: 6px; color: #5a7087; font-size: 14px; font-weight: 400; letter-spacing: 0; }
.stat-foot { min-height: 38px; padding-top: 13px; border-top: 1px solid #e7edf5; color: #5c6e84; font-size: 14px; line-height: 1.7; }
.stat-card.featured .stat-head { color: #285b9e; }
.stat-card.featured .stat-value { color: #145fcf; }
.stat-card.featured .stat-icon { color: #1768e8; background: #fff; }
.stat-card.featured .stat-foot { border-color: #d4e2f7; color: #4c709b; }
.stat-card.attention .stat-icon { color: #9e5f12; background: #fff5e6; }
.stat-card.connected .stat-icon { color: #14785d; background: #e9f7f1; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); gap: 22px; }
.dashboard-grid > div { min-width: 0; }
.panel { margin-bottom: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px 0; }
.panel-head h3 { margin: 0; font-size: 18px; font-weight: 650; }
.panel-head small { color: var(--muted); font-size: 14px; }
.panel-heading-note { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.panel-body { padding: 22px 24px; }
.chart-summary { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.chart-total-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 14px; }
.chart-total { color: #294465; font-size: 30px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.chart-total span { margin-right: 5px; color: #5b6f88; font-size: 20px; font-weight: 400; }
.chart-legend { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.chart-legend::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--blue); }
.chart { display: flex; align-items: flex-end; gap: 12px; height: 180px; padding: 24px 4px 0; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0, transparent 43px, #edf1f7 43px, #edf1f7 44px); }
.bar-wrap { position: relative; display: flex; flex: 1; align-items: center; flex-direction: column; justify-content: flex-end; gap: 7px; min-width: 0; height: 100%; }
.bar-value { color: #58708c; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar { width: 32px; max-width: 66%; min-height: 2px; border-radius: 5px 5px 0 0; background: #aac7ef; transition: height .25s; }
.bar-wrap:last-child .bar { background: var(--blue); }
.bar-wrap:last-child .bar-value { color: var(--blue); font-weight: 650; }
.chart-labels { display: flex; gap: 12px; margin-top: 12px; padding: 0 4px; }
.chart-labels span { flex: 1; color: var(--muted); font-size: 14px; text-align: center; }
.money-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 13px 0; color: #59708a; font-size: 14px; }
.money-row + .money-row { border-top: 1px solid #edf1f6; }
.money-row b { color: #324f70; font-size: 16px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.profit-summary { margin-top: 16px; padding: 18px; border: 1px solid #cce8dd; border-radius: 11px; background: #eef8f3; }
.profit-summary span { display: block; margin-bottom: 8px; color: #42715f; font-size: 14px; }
.profit-summary strong { color: #17684d; font-size: 29px; font-weight: 650; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.profit-summary strong small { font-size: 18px; font-weight: 400; }
.finance-panel .secondary { font-size: 15px; }
.finance-note { margin: 16px 0 20px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.quick-links { padding-top: 10px; padding-bottom: 10px; }
.quick-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 66px; padding: 14px 0; border: 0; color: #3a5676; background: transparent; text-align: left; font-size: 15px; }
.quick-link + .quick-link { border-top: 1px solid #edf1f6; }
.quick-icon { width: 38px; height: 38px; border-radius: 10px; }
.quick-icon svg { width: 21px; height: 21px; stroke-width: 1.8; }
.quick-link > svg { width: 18px; height: 18px; margin-left: auto; color: #5b7087; }
.device-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mini-device { min-width: 0; padding: 18px; border: 1px solid #dfe7f1; border-radius: 12px; background: #fcfdff; }
.device-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.device-card-head > svg { flex-shrink: 0; width: 22px; height: 22px; color: #54708f; }
.mini-device strong { display: block; margin-bottom: 5px; color: #2d496c; font-size: 16px; font-weight: 650; }
.mini-device strong > .muted { font-size: 14px; font-weight: 400; }
.mini-device small { display: block; color: #59708b; font-size: 14px; line-height: 1.9; overflow-wrap: anywhere; }
.mini-device .device-code { margin: 9px 0; padding-bottom: 11px; border-bottom: 1px solid #e3eaf4; color: #5c6f87; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }
.device-lock { display: inline-flex; align-items: center; gap: 6px; color: #14785d; line-height: 1.6; vertical-align: middle; }
.device-lock.raised { color: #a45b09; }
.device-lock.unknown { color: #ac4234; }
.device-lock svg { width: 21px; height: 21px; flex-shrink: 0; }
.mini-device .device-lock svg { width: 18px; height: 18px; }
.device-preview > .empty { grid-column: 1 / -1; }
/* Shared status, lists and tables */
.badge { display: inline-flex; align-items: center; justify-content: center; gap: 6px; max-width: 100%; padding: 5px 9px; border-radius: 6px; color: #566b85; background: #edf1f6; font-size: 14px; font-weight: 500; line-height: 1.5; white-space: nowrap; }
.badge.green { color: #147052; background: #e8f6ef; }
.badge.orange { color: #965107; background: #fff2de; }
.badge.blue { color: #1c63bd; background: #eaf2ff; }
.badge.red { color: #b13532; background: #fff0ee; }
.tabs { display: flex; gap: 24px; margin-bottom: 22px; overflow-x: auto; border-bottom: 1px solid #d4deea; scrollbar-width: thin; }
.tab { min-height: 50px; padding: 12px 3px 14px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; color: #5b6f8a; background: transparent; font-size: 16px; white-space: nowrap; }
.tab.active { border-bottom-color: var(--blue); color: #1762d1; font-weight: 650; }
.table-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 22px 24px 0; }
.table-panel-head h3 { margin: 0; font-size: 18px; font-weight: 650; }
.table-panel-head > span { color: var(--muted); font-size: 14px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 20px 24px; }
.toolbar .group { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-width: 0; }
.search-control { position: relative; min-width: 200px; }
.search-control svg { position: absolute; top: 15px; left: 13px; width: 18px; height: 18px; color: #5c7086; pointer-events: none; }
.toolbar input { width: 290px; min-height: 48px; padding-left: 40px; background: #fafcff; font-size: 15px; }
.toolbar select { width: 180px; font-size: 15px; }
.toolbar button { min-height: 46px; font-size: 14px; }
.table-wrap { width: 100%; overflow: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #becbdc #f0f4f9; }
table { width: 100%; border-collapse: collapse; color: #425c7a; font-size: 14px; white-space: nowrap; }
th { padding: 15px 20px; border-top: 1px solid #e1e8f1; border-bottom: 1px solid #dce5f0; color: #536c8a; background: #f4f7fb; font-size: 14px; font-weight: 600; text-align: left; }
td { padding: 19px 20px; border-bottom: 1px solid #e8edf5; color: #435f7e; line-height: 1.7; vertical-align: top; }
td strong { color: #263f5e; font-size: 15px; font-weight: 650; }
td small { display: block; margin-top: 4px; color: #5b7088; font-size: 14px; line-height: 1.7; }
td button { min-height: 44px; padding: 8px 10px; border: 1px solid transparent; border-radius: 7px; color: var(--blue); background: transparent; font-size: 14px; line-height: 1.5; white-space: nowrap; }
.row-actions .cell-content { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; max-width: 360px; }
td button.row-action-primary, .row-action-primary { color: #155fca; border-color: #cfe0fc; background: #edf4ff; font-weight: 650; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.cell-content { min-width: 0; }
.cell-currency { color: #29496f; font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.table-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 18px 24px; border-top: 1px solid #e4ebf4; color: var(--muted); font-size: 14px; }
.pagination { display: flex; align-items: center; gap: 8px; }
.pagination button { min-height: 44px; padding: 9px 14px; border: 1px solid #d4dfeb; border-radius: 8px; color: #3f6088; background: #fff; font-size: 14px; }
.pagination > span { display: grid; place-items: center; min-width: 40px; height: 44px; border-radius: 8px; color: var(--blue); background: #edf4ff; font-weight: 600; }
.table-status-summary { display: flex; align-items: flex-start; flex-direction: column; gap: 7px; color: #4b6585; font-size: 14px; line-height: 1.7; }
.table-status-summary > span { display: inline-flex; align-items: center; gap: 6px; }
.table-status-summary small { margin: 0; }
.table-status-summary p { max-width: 260px; margin: 0; white-space: normal; }
.admin-table td:has(.table-status-summary) { min-width: 170px; }
.admin-table td:first-child .cell-content { min-width: 200px; max-width: 280px; white-space: normal; overflow-wrap: anywhere; }
.mini-device .table-status-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.mini-device .device-summary-row { gap: 6px; }
.mini-device > .lock-warning { margin: 0 0 14px; }
.device-identity-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.device-identity-heading > strong { min-width: 0; }
.device-card-control { display: none; }
.device-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.device-actions > button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.device-actions svg { width: 18px; height: 18px; }
.device-actions > div { display: flex; flex-wrap: wrap; gap: 2px; max-width: 280px; }
.search-feedback { display: block; margin-top: 4px; color: #235d9e; }
.search-feedback:empty { display: none; }
.table-search-empty { margin: 0 24px 20px; }
.table-help { margin: 0 24px 18px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.device-summary-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; margin-bottom: 4px; }
.device-summary-row > span:first-child { color: var(--muted); }
.status-dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #9aa8ba; vertical-align: middle; }
.status-dot.online, .status-dot.green { background: #1b996e; }
.status-dot.offline, .status-dot.orange { background: #c2862f; }
.status-dot.red { background: #d24d43; }
.badge.green .status-dot { background: #1b996e; }
.badge.orange .status-dot { background: #c2862f; }
.empty { padding: 56px 24px; color: #5a708a; text-align: center; white-space: normal; }
.empty svg { display: block; width: 44px; height: 44px; margin: 0 auto 18px; color: #5e6f84; stroke-width: 1.5; }
.empty strong { display: block; margin-bottom: 8px; color: #3e5d80; font-size: 18px; font-weight: 650; }
.empty p { max-width: 520px; margin: 0 auto; font-size: 15px; line-height: 1.8; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; max-width: 1800px; margin: auto; padding: 24px 32px 30px; color: #5e6f84; font-size: 14px; line-height: 1.8; }
/* Drawers and forms */
html.drawer-open { overflow: hidden; }
dialog { position: fixed; inset: 0 0 0 auto; width: min(720px, calc(100vw - 32px)); max-width: calc(100vw - 32px); height: 100svh; height: 100dvh; max-height: 100svh; max-height: 100dvh; margin: 0; padding: 0; overflow: hidden; overscroll-behavior: contain; border: 0; border-left: 1px solid #d8e2ef; border-radius: 18px 0 0 18px; color: var(--navy); background: #fff; box-shadow: -18px 0 64px #152d4c26; }
dialog[open] { display: flex; flex-direction: column; animation: admin-drawer-in 240ms cubic-bezier(.2, .8, .2, 1) both; }
dialog::backdrop { background: #152d4c66; backdrop-filter: blur(3px); animation: admin-backdrop-in 220ms ease-out both; }
dialog.drawer-closing { animation: admin-drawer-out 200ms cubic-bezier(.4, 0, 1, 1) both; pointer-events: none; }
dialog.drawer-closing::backdrop { animation: admin-backdrop-out 200ms ease-in both; }
@keyframes admin-drawer-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes admin-drawer-out { from { transform: translateX(0); } to { transform: translateX(100%); } }
@keyframes admin-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes admin-backdrop-out { from { opacity: 1; } to { opacity: 0; } }
.modal-head { position: relative; z-index: 2; display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 26px; border-bottom: 1px solid var(--line); background: #fff; }
.modal-head h2 { margin: 0; color: #1d3759; font-size: 23px; font-weight: 700; }
#dialog-body { flex: 1 1 auto; min-height: 0; padding: 26px; padding-bottom: calc(26px + env(safe-area-inset-bottom)); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #bccde3 #f6f9fd; overflow-wrap: anywhere; }
.modal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.modal-grid > .wide { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.form-note { margin-bottom: 22px; padding: 15px 17px; border: 1px solid #dae5f3; border-radius: 10px; color: #4f6a8b; background: #f3f7fd; font-size: 14px; line-height: 1.85; }
.detail-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 18px; padding: 14px 0; border-bottom: 1px solid #e6ecf4; font-size: 15px; line-height: 1.8; }
.detail-row span { color: var(--muted); }
.detail-row b { color: #355676; font-weight: 500; overflow-wrap: anywhere; }
.qr-image { display: block; width: 260px; max-width: 100%; height: auto; margin: 0 auto 18px; padding: 10px; border: 1px solid #dae4f0; border-radius: 12px; background: #fff; }
.pricing-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.station-picker { position: sticky; top: 20px; padding: 10px; }
.station-picker::before { content: "选择场站"; display: block; padding: 12px 12px 14px; color: var(--muted); font-size: 14px; }
.station-pick { width: 100%; min-height: 48px; margin-bottom: 4px; padding: 13px 12px; border: 1px solid transparent; border-radius: 8px; color: #546e8d; background: transparent; font-size: 15px; line-height: 1.7; text-align: left; }
.station-pick.active { border-color: #d3e3fc; color: #1762cd; background: #edf4ff; font-weight: 600; }
.pricing-form { padding: 26px; }
.pricing-form h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 0 24px; font-size: 19px; font-weight: 650; }
.form-section { margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--line); }
.form-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rate-table { margin-bottom: 18px; }
.rate-table input { min-width: 90px; max-width: 150px; padding: 10px; }
.rate-table td, .rate-table th { padding: 12px; }
.rate-table th { border-top: 0; }
summary { min-height: 44px; font-size: 15px; cursor: pointer; list-style-position: inside; }
.slot-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; padding-top: 20px; }
.slot-grid label { color: #59718e; font-size: 14px; }
.slot-grid select { padding: 9px; }
.receiver-row { display: grid; grid-template-columns: 1fr 1.6fr .7fr auto; align-items: center; gap: 10px; margin-bottom: 12px; }
.receiver-row input { padding: 10px; }
.receiver-entry { background: #fafcff; }
/* Device control: read first, actions grouped by target. */
.device-control-panel { display: grid; gap: 20px; }
.device-control-panel > .error:empty { display: none; }
.control-target { padding: 18px 20px; border: 1px solid #d7e5fa; border-radius: 12px; background: #f2f7ff; }
.control-target h3 { margin: 0 0 6px; font-size: 20px; font-weight: 700; }
.control-target-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 19px; }
.control-target-heading > .badge { flex-shrink: 0; }
.control-target .table-help { margin: 15px 0 0; font-size: 14px; }
.control-target > .device-summary-row { margin-top: 12px; }
.control-target strong { display: block; margin-bottom: 5px; color: #244e82; font-size: 18px; font-weight: 650; }
.control-target p, .control-target small { display: block; margin: 4px 0 0; color: #54708e; font-size: 14px; line-height: 1.8; }
.control-query-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.control-query-actions button { min-height: 50px; white-space: normal; }
.control-action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.control-action-button { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 15px 17px; border: 1px solid #d7e2ef; border-radius: 10px; color: #31577f; background: #fff; text-align: left; }
.control-action-button > svg { flex: 0 0 24px; width: 24px; height: 24px; color: var(--blue); }
.control-action-button strong { display: block; font-size: 16px; font-weight: 650; }
.control-action-button small { display: block; margin-top: 3px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.control-action-button.danger { border-color: #efd1cd; color: #b33b32; }
.control-action-button.danger > svg { color: #b33b32; }
.control-feedback { padding: 16px 18px; border: 1px solid #d9e4f2; border-radius: 11px; color: #3b5c83; background: #f7faff; font-size: 15px; line-height: 1.8; }
.control-feedback.success { border-color: #c4e5d6; color: #167253; background: #eef9f3; }
.control-feedback.error { border-color: #edccc8; color: #ad3932; background: #fff3f1; }
.control-status-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; font-size: 14px; line-height: 1.8; }
.control-status-line > span, .control-status-line > div { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.control-status-line > div > span:first-child { color: #59708c; }
.control-status-line strong { display: inline; margin: 0; color: #33597f; font-size: 14px; font-weight: 600; }
.control-detail-heading h3 { margin: 0 0 5px; font-size: 18px; font-weight: 650; }
.control-detail-heading p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.control-action-button.selected { border-color: #1768e8; background: #edf4ff; box-shadow: 0 0 0 2px #1768e815; color: #155fce; }
.control-feedback strong { font-size: 16px; }
.control-feedback p { margin: 7px 0 0; }
.control-feedback .table-help { margin: 12px 0 0; color: inherit; font-size: 14px; opacity: .85; }
.control-feedback.pending { border-color: #c9dbf8; color: #2e629f; background: #f0f6ff; }
.control-confirmation { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; margin: 18px 0; font-size: 14px; font-weight: 400; line-height: 1.9; }
.control-confirmation input { margin-top: 4px; }
.control-reason { margin-top: 20px; }
.control-reason textarea { min-height: 88px; }
.control-progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 19px 0 0; padding: 0; list-style: none; counter-reset: command-step; }
.control-progress li { padding-top: 9px; border-top: 3px solid #dce5f0; color: #5c6f86; font-size: 14px; line-height: 1.6; }
.control-progress li.done { border-color: #40a47d; color: #177354; }
.control-progress li.current { border-color: var(--blue); color: #1c65c8; font-weight: 650; }
/* Lock readings and configuration */
.lock-policy { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; padding: 18px; border: 1px solid #d2e3fc; border-radius: 12px; background: #f0f6ff; }
.lock-policy-icon { background: #fff; }
.lock-policy strong { color: #244d80; font-size: 17px; font-weight: 650; }
.lock-policy p { margin: 5px 0 0; color: #527090; font-size: 14px; line-height: 1.7; }
.lock-policy > .badge { margin-left: auto; flex-shrink: 0; }
.lock-report-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; color: #586f8b; font-size: 14px; }
.lock-report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; padding: 20px; border: 1px solid #dfe7f2; border-radius: 11px; background: #f8fafd; }
.lock-report-grid span { display: block; margin-bottom: 5px; color: #5c7087; font-size: 14px; }
.lock-report-grid strong { color: #304f74; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.lock-read-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 25px; }
.lock-section-heading { margin: 25px 0 16px; }
.lock-section-heading h3 { margin: 0 0 7px; font-size: 18px; font-weight: 650; }
.lock-section-heading p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.lock-command { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 15px 0; border-bottom: 1px solid #e4ebf4; }
.lock-command strong { font-size: 15px; font-weight: 600; }
.lock-command small { display: block; margin-top: 5px; color: var(--muted); font-size: 14px; }
.lock-command .error { max-width: 470px; margin-bottom: 0; }
.lock-alarm { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; padding: 16px; border: 1px solid #edc9c2; border-radius: 10px; color: #af3c2e; background: #fff4f1; }
.lock-alarm svg { flex-shrink: 0; width: 22px; height: 22px; margin-top: 2px; }
.lock-alarm strong { font-size: 16px; }
.lock-alarm p, .lock-warning { margin: 5px 0; font-size: 14px; line-height: 1.85; overflow-wrap: anywhere; }
.lock-warning { margin: 12px 0; color: #965b11; }
.network-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.network-fields:disabled { opacity: .65; }
.network-fields label small { display: block; margin-top: 7px; color: #5a6f88; font-size: 14px; line-height: 1.8; }
.network-target { margin: 16px 0; padding: 15px 17px; border-radius: 10px; color: #235fae; background: #edf4ff; font-size: 15px; overflow-wrap: anywhere; }
.network-consent { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; color: #4d698b; font-size: 14px; font-weight: 400; line-height: 1.9; }
.network-consent input { margin-top: 4px; }
.network-migration { margin-top: 22px; padding: 20px; border: 1px solid #d7e4f4; border-radius: 12px; background: #f5f9ff; }
.network-migration p { color: #4e6b8f; font-size: 15px; line-height: 1.85; }
.network-migration small { color: var(--muted); font-size: 14px; }
.network-migration-target { margin: 12px 0 8px; color: #2a5383; font-size: 16px; overflow-wrap: anywhere; }
.network-migration-target span { display: block; margin-top: 5px; color: #57708e; font-size: 14px; }
/* Binding, charger onboarding and QR identity */
.charger-preparation { border-color: #d7e4f8; }
.charger-preparation-heading { display: flex; align-items: center; gap: 14px; min-width: 0; }
.charger-preparation-heading p { margin: 5px 0 0; color: #567090; font-size: 14px; }
.charger-preparation .panel-head > .badge { flex-shrink: 0; }
.charger-preparation-note { margin: 0 0 19px; color: #55708d; font-size: 15px; line-height: 1.8; }
.charger-preparation-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.charger-preparation-card { min-width: 0; padding: 20px; border: 1px solid #dce6f4; border-radius: 12px; background: #fff; }
.charger-preparation-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.charger-preparation-label { display: block; color: var(--muted); font-size: 14px; }
.charger-preparation-code { display: block; margin-top: 5px; color: #2b4d77; font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.charger-preparation-card-head > .badge { flex-shrink: 0; }
.charger-preparation-guns { margin: 15px 0; color: #527198; font-size: 15px; }
.charger-preparation-meta { display: grid; gap: 12px; margin: 0; padding-top: 16px; border-top: 1px solid #e6edf6; }
.charger-preparation-meta > div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; font-size: 14px; line-height: 1.8; }
.charger-preparation-meta dt { color: #5c6f85; }
.charger-preparation-meta dd { margin: 0; color: #496b92; overflow-wrap: anywhere; }
.charger-preparation-card > button { margin-top: 18px; white-space: normal; }
.charger-preparation-parameters, .binding-communication { margin-top: 20px; overflow: hidden; border: 1px solid #d9e5f5; border-radius: 11px; background: #f9fbff; }
.charger-preparation-parameters summary, .binding-communication summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 15px 18px; color: #365f91; font-size: 15px; font-weight: 600; list-style: none; }
.charger-preparation-parameters summary { justify-content: space-between; }
.charger-preparation-parameters summary::-webkit-details-marker { display: none; }
.charger-preparation-parameters summary > span:first-child { display: inline-flex; align-items: center; gap: 9px; }
.charger-preparation-parameters summary svg, .binding-communication summary svg, .binding-network-grid h4 svg { flex-shrink: 0; width: 19px; height: 19px; }
.charger-preparation-disclosure { color: #4e6f99; font-size: 24px; font-weight: 400; }
.charger-preparation-parameters[open] .charger-preparation-disclosure { transform: rotate(45deg); }
.charger-preparation-parameters > div { padding: 0 18px 18px; }
.charger-preparation-parameters p { margin: 0; color: #57708f; font-size: 14px; line-height: 1.9; }
.charger-preparation-parameters dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 26px; margin: 20px 0; padding: 18px 0; border-top: 1px solid #dee8f5; border-bottom: 1px solid #dee8f5; }
.charger-preparation-parameters dt { margin-bottom: 5px; color: #5b6f89; font-size: 14px; }
.charger-preparation-parameters dd { margin: 0; color: #355e8d; font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.charger-preparation-error strong, .charger-preparation-error span { display: block; }
.charger-preparation-error span { margin-top: 6px; }
.device-binding-intro p { margin: 13px 0 18px; color: #576f90; font-size: 15px; line-height: 1.8; }
.device-binding-chain { display: grid; grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1.2fr) 12px minmax(0, 1.2fr) 12px minmax(0, 1fr); align-items: center; gap: 6px; margin: 18px 0 24px; }
.device-binding-chain > div { display: flex; align-items: center; flex-direction: column; justify-content: center; min-width: 0; min-height: 135px; padding: 12px; border: 1px solid #d7e6fb; border-radius: 11px; background: #f5f9ff; text-align: center; }
.device-binding-chain svg { width: 25px; height: 25px; margin-bottom: 8px; color: var(--blue); }
.device-binding-chain span:not(.binding-connector) { color: #566f90; font-size: 14px; }
.device-binding-chain strong { margin-top: 5px; color: #2b4e7e; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.device-binding-chain small { margin-top: 2px; color: #4e6f9a; font-size: 14px; }
.binding-connector { color: #596f8e; font-size: 17px; text-align: center; }
.binding-fields input[name="chargerCode"], .binding-fields input[name="lockId"] { font-variant-numeric: tabular-nums; }
.binding-qr-field { display: flex; flex-direction: column; justify-content: center; margin-bottom: 20px; padding: 15px 17px; border: 1px solid #dbe6f5; border-radius: 10px; background: #f5f9ff; }
.binding-qr-field > span { color: #557093; font-size: 14px; }
.binding-qr-field strong { margin-top: 6px; color: #355f92; font-size: 15px; font-weight: 600; }
.binding-qr-field small { margin-top: 5px; color: #58708c; font-size: 14px; line-height: 1.7; }
.binding-communication { margin: 18px 0; }
.binding-network-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 17px; }
.binding-network-grid article { padding: 17px; border: 1px solid #e2eaf6; border-radius: 10px; background: #fff; }
.binding-network-grid h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: #2f65a7; font-size: 16px; }
.binding-network-grid p { margin: 7px 0; color: #557091; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.binding-communication > p { padding: 0 17px 17px; color: #57708c; font-size: 14px; line-height: 1.8; }
.binding-tools { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.binding-empty { padding: 30px 14px; text-align: center; }
.binding-empty-icon { display: inline-flex; align-items: center; justify-content: center; width: 68px; height: 68px; border-radius: 18px; color: var(--blue); background: #edf4ff; }
.binding-empty-icon svg { width: 32px; height: 32px; }
.binding-empty h3 { margin: 23px 0 12px; color: #2d507c; font-size: 21px; }
.binding-empty p { max-width: 430px; margin: 0 auto 24px; color: #57708e; font-size: 15px; line-height: 1.9; }
.binding-qr-paper { max-width: 440px; margin: 0 auto; padding: 28px; border: 1px solid #d9e6f7; border-radius: 15px; background: #fff; text-align: center; }
.binding-qr-paper .qr-image { width: min(100%, 270px); height: auto; margin: 0 auto 18px; }
.binding-qr-paper h3 { margin: 0; color: #2b5f9e; font-size: 20px; }
.binding-qr-paper > p { margin: 10px 0 18px; color: #58708d; font-size: 14px; }
.binding-qr-identifiers { display: grid; gap: 7px; padding-top: 16px; border-top: 1px solid #e1eaf6; color: #537094; font-size: 14px; overflow-wrap: anywhere; }
/* Batch onboarding */
.onboarding-panel { margin: 22px 0; padding: 24px; }
.onboarding-heading, .onboarding-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.onboarding-heading h3, .onboarding-detail-heading h3 { margin: 0 0 7px; font-size: 21px; }
.onboarding-heading p, .onboarding-detail-heading p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.onboarding-batches { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: 16px; max-height: 560px; margin-top: 22px; overflow-y: auto; }
.onboarding-batch { display: block; padding: 21px; border: 1px solid #dce6f4; border-radius: 12px; color: var(--navy); background: #fbfdff; text-align: left; }
.onboarding-batch > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.onboarding-batch strong { font-size: 17px; overflow-wrap: anywhere; }
.onboarding-batch p { margin: 10px 0 18px; color: var(--muted); font-size: 14px; }
.onboarding-batch > small { display: block; margin-top: 16px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.onboarding-counts { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 14px; }
.onboarding-counts b { display: block; margin-top: 5px; color: var(--blue); font-size: 22px; }
.onboarding-empty { display: flex; align-items: center; gap: 16px; margin-top: 22px; padding: 23px; border: 1px dashed #bad1f2; border-radius: 12px; background: #f4f8ff; }
.onboarding-empty > svg { width: 30px; height: 30px; flex-shrink: 0; color: var(--blue); }
.onboarding-empty strong { font-size: 17px; }
.onboarding-empty p { margin: 7px 0 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
dialog.onboarding-wide { width: min(940px, calc(100vw - 32px)); max-width: calc(100vw - 32px); }
.onboarding-intro { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.onboarding-intro > span { display: grid; place-items: center; flex-shrink: 0; width: 54px; height: 54px; border-radius: 14px; color: var(--blue); background: #edf4ff; }
.onboarding-intro svg { width: 28px; height: 28px; }
.onboarding-intro h3 { margin: 0 0 7px; font-size: 21px; }
.onboarding-intro p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.onboarding-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 26px; }
.onboarding-steps span { padding: 12px 0; border-bottom: 3px solid #dfe7f2; color: #5a708a; font-size: 15px; }
.onboarding-steps .active { border-color: var(--blue); color: var(--blue); font-weight: 650; }
.onboarding-upload { margin-bottom: 20px; padding: 22px; border: 1px dashed #bcd1ef; border-radius: 12px; background: #f6faff; }
.onboarding-upload label { margin: 0; }
.onboarding-upload p { margin: 12px 0 17px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.onboarding-preview-note { display: flex; align-items: center; gap: 9px; margin: 18px 0 14px; padding: 15px; border-radius: 10px; color: #147555; background: #eaf7f0; font-size: 15px; }
.onboarding-preview-note svg { flex-shrink: 0; width: 20px; height: 20px; }
.onboarding-preview-table { max-height: 360px; overflow: auto; }
.onboarding-statistics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.onboarding-statistics > div { min-width: 0; padding: 19px; border: 1px solid #dce7f5; border-radius: 12px; background: #f7faff; }
.onboarding-statistics span { color: var(--muted); font-size: 14px; }
.onboarding-statistics strong { display: block; margin-top: 10px; color: var(--blue); font-size: 32px; font-weight: 650; }
.onboarding-statistics small { color: #5a708b; font-size: 14px; font-weight: 400; }
.onboarding-export { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 21px; border: 1px solid #d5e4f8; border-radius: 12px; background: #f3f8ff; }
.onboarding-export strong { font-size: 17px; }
.onboarding-export p { margin: 7px 0 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.onboarding-live-note { display: flex; align-items: center; gap: 9px; margin: 18px 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.onboarding-live-note svg { flex-shrink: 0; width: 18px; height: 18px; }
.onboarding-device-list { display: grid; gap: 14px; }
.onboarding-device { padding: 21px; border: 1px solid #dce6f4; border-radius: 12px; }
.onboarding-device-title { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.onboarding-device-title strong { margin-right: auto; font-size: 17px; }
.onboarding-device-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 21px; }
.onboarding-device-grid span { display: block; color: var(--muted); font-size: 14px; }
.onboarding-device-grid strong { display: block; margin: 6px 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.onboarding-device-grid small { display: block; color: var(--muted); font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.onboarding-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #98a7bb; }
.onboarding-dot.online { background: #1b996e; }
.onboarding-device-warning { display: flex; align-items: center; gap: 9px; margin: 18px 0 0; padding-top: 15px; border-top: 1px solid #e3eaf4; color: #9d5f13; font-size: 14px; line-height: 1.8; }
.onboarding-device-warning svg { flex-shrink: 0; width: 18px; height: 18px; }
.onboarding-device-grid .text-button { padding-top: 10px; }
.onboarding-device-grid .text-button svg { width: 17px; height: 17px; }
.onboarding-export .group, .onboarding-upload .group { display: flex; flex-wrap: wrap; gap: 10px; }
/* Installation settings follow the daily device list and stay collapsed when not needed. */
.setup-tools { margin: 24px 0; border: 1px solid #d7e3f2; border-radius: 13px; background: #fff; overflow: hidden; }
.setup-tools > summary { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 16px 20px; color: #345c8b; font-size: 16px; font-weight: 600; list-style: none; }
.setup-tools > summary::-webkit-details-marker { display: none; }
.setup-tools > summary > svg { flex: 0 0 22px; width: 22px; height: 22px; color: #396eae; }
.setup-tools > summary > span { flex: 1; min-width: 0; }
.setup-tools > summary::after { content: "+"; display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 6px; color: #3c6aa1; background: #edf4ff; font-size: 20px; line-height: 1; }
.setup-tools[open] > summary { border-bottom: 1px solid #dce6f3; background: #f6f9ff; }
.setup-tools[open] > summary::after { content: "−"; }
.setup-tools-body { padding: 18px; }
.setup-tools-body > .panel { margin: 0 0 18px; box-shadow: none; }
.setup-tools-body > .panel:last-child { margin-bottom: 0; }
/* Secondary details remain easy to discover without competing with primary tasks. */
.device-record-details { margin-top: 22px; border: 1px solid #dce6f3; border-radius: 11px; background: #fbfdff; overflow: hidden; }
.device-record-details summary { min-height: 50px; padding: 13px 17px; color: #315f97; font-size: 15px; font-weight: 600; }
.device-record-details[open] summary { border-bottom: 1px solid #dce6f3; background: #f2f7ff; }
.device-record-details > :not(summary) { margin-left: 17px; margin-right: 17px; }
.device-record-details > :last-child { margin-bottom: 17px; }
.form-help { margin: 8px 0 18px; color: var(--muted); font-size: 14px; line-height: 1.85; }
/* Feedback */
#toast { position: fixed; bottom: 30px; left: 50%; z-index: 50; max-width: min(640px, calc(100vw - 40px)); padding: 15px 22px; border: 1px solid #375778; border-radius: 11px; color: #fff; background: #1e3c60; box-shadow: 0 8px 32px #16375825; font-size: 15px; line-height: 1.75; opacity: 0; visibility: hidden; transform: translate(-50%, 15px); transition: opacity .2s, transform .2s, visibility .2s; overflow-wrap: anywhere; }
#toast.visible { visibility: visible; opacity: 1; transform: translate(-50%, 0); }
.loading, .list-loading { padding: 68px 22px; color: #55708d; font-size: 16px; text-align: center; }
.loading::before, .list-loading::before { content: ""; display: block; width: 28px; height: 28px; margin: 0 auto 17px; border: 3px solid #e0eafa; border-top-color: var(--blue); border-radius: 50%; animation: admin-button-spin .8s linear infinite; }
.notice { margin-bottom: 22px; padding: 18px 20px; border: 1px solid #efd9b4; border-radius: 12px; color: #8d5b17; background: #fff8eb; font-size: 15px; line-height: 1.9; overflow-wrap: anywhere; }
@media (hover: hover) {
  .primary:not(:disabled):hover { border-color: var(--blue-hover); background: var(--blue-hover); box-shadow: 0 4px 12px #1768e820; }
  .secondary:not(:disabled):hover, .icon-button:hover { border-color: #a7bddd; background: #f3f7fe; }
  .text-button:hover, .preview-link:hover, .owner-preview-link:hover { color: var(--blue-hover); background: #f1f6ff; }
  #nav .nav-item:not(.active):hover { color: #215fba; background: #f5f8fd; }
  .entry-switch a:not([aria-current]):hover { color: #215fba; background: #ffffffa0; }
  .tab:not(.active):hover { color: #1b5fbd; }
  td button:hover { color: #0d56c1; background: #edf4ff; }
  .admin-table tbody tr:hover { background: #f9fbff; }
  .quick-link:hover { color: var(--blue); }
  .station-pick:not(.active):hover { background: #f4f7fc; }
  .device-shortcut:hover, .onboarding-batch:hover, .control-action-button:not(:disabled):hover { border-color: #8db6f3; background: #fafdff; box-shadow: 0 3px 12px #1768e80a; }
}
@media (min-width: 1600px) {
  :root { --sidebar-width: 252px; }
  .sidebar { padding: 30px 20px 20px; }
  #main { padding: 34px 40px 16px; }
  .topbar, .footer { padding-left: 40px; padding-right: 40px; }
}
@media (max-width: 1250px) {
  :root { --sidebar-width: 216px; }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .sidebar-brand { gap: 10px; padding-left: 8px; }
  .sidebar-brand strong { font-size: 22px; }
  .sidebar-brand small { font-size: 14px; }
  #main { padding: 26px 24px 12px; }
  .topbar { padding: 14px 24px; }
  .owner-preview-link { display: none; }
  .top-actions { gap: 10px; }
  .top-actions #account-name { display: none; }
  .date-pill { display: none; }
  .stat-card { padding: 18px; }
  .stat-value { font-size: 29px; }
  .stats-grid { gap: 13px; }
  .device-shortcuts { gap: 12px; }
  .device-shortcut { padding: 17px; gap: 10px; }
  .device-shortcut-icon { width: 40px; height: 40px; }
  .device-shortcut small { font-size: 14px; }
  .device-shortcut > svg { display: none; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.5fr) minmax(290px, 1fr); gap: 18px; }
  .panel-head, .panel-body { padding-left: 20px; padding-right: 20px; }
  .pricing-layout { grid-template-columns: 180px minmax(0, 1fr); gap: 18px; }
  .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-grid > div:last-child { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: start; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-value { font-size: 34px; }
  .device-shortcuts { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .device-shortcut { min-height: 82px; padding: 16px 20px; }
  .device-shortcut small { font-size: 14px; }
  .device-shortcut > svg { display: block; }
  .pricing-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .station-picker { display: flex; position: static; gap: 6px; padding: 9px; overflow-x: auto; }
  .station-picker::before { display: none; }
  .station-pick { flex-shrink: 0; width: auto; margin: 0; }
  .slot-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .login-layout { grid-template-columns: minmax(0, 1fr); }
  .login-story { display: none; }
  .login-panel { min-height: 100svh; padding: 122px 30px 90px; background: #f7faff; }
  .login-mobile-brand { position: absolute; top: 28px; left: 32px; display: flex; align-items: center; gap: 12px; color: #254d7c; font-size: 23px; font-weight: 700; }
  .login-mobile-brand img { width: 42px; height: 42px; border-radius: 10px; }
  .login-mobile-brand small { display: block; color: #5c6f85; font-size: 14px; font-weight: 400; }
  .login-panel h2 { font-size: 29px; }
  .dashboard-grid > div:last-child { display: block; }
  .page-heading h1 { font-size: 27px; }
  .page-heading p { font-size: 14px; }
}
/* On phones, retain full size typography and turn data rows into field cards. */
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { position: sticky; inset: 0 0 auto; z-index: 10; width: 100%; min-height: 76px; padding: 14px 18px; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); background: #fff; }
  .sidebar-brand { gap: 10px; padding: 0; }
  .sidebar-brand img { width: 40px; height: 40px; border-radius: 10px; }
  .sidebar-brand strong { font-size: 21px; }
  .sidebar-brand small { margin-top: 1px; font-size: 14px; }
  .sidebar-note, .sidebar-bottom, .nav-caption { display: none; }
  .sidebar nav { position: fixed; inset: auto 0 0; display: grid; grid-template-columns: repeat(var(--nav-count, 6), minmax(0, 1fr)); gap: 2px; padding: 7px 4px calc(7px + env(safe-area-inset-bottom)); border-top: 1px solid #d7e2ef; background: #fff; box-shadow: 0 -4px 24px #17395a08; }
  #nav .nav-item { display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 4px; min-height: 64px; margin: 0; padding: 8px 1px; border: 0; border-radius: 8px; color: #5c7087; font-size: 14px; line-height: 1.4; text-align: center; white-space: normal; }
  #nav .nav-item.active { color: #145fce; background: #edf4ff; }
  #nav .nav-item.active::after { display: none; }
  #nav .nav-item svg { width: 23px; height: 23px; stroke-width: 1.8; }
  #nav .nav-label { display: none; }
  #nav .nav-label-mobile { display: block; white-space: nowrap; }
  .workspace { margin-left: 0; }
  .topbar { min-height: 56px; padding: 7px 18px; gap: 8px; }
  .breadcrumbs { font-size: 14px; }
  .crumb { padding: 0 8px; }
  .top-actions { gap: 8px; }
  .top-actions .badge { font-size: 14px; padding: 4px 7px; }
  .top-actions .text-button { min-height: 44px; font-size: 14px; }
  #demo-badge { display: none; }
  #main { min-height: 70vh; padding: 24px 16px 10px; }
  .page-heading { align-items: flex-start; gap: 12px; margin-bottom: 21px; }
  .page-heading h1 { margin-bottom: 7px; font-size: 27px; }
  .page-heading p { font-size: 14px; line-height: 1.8; }
  .page-heading .actions { padding-top: 0; }
  .page-heading .actions .secondary { min-height: 44px; padding: 10px 12px; font-size: 14px; }
  .page-heading .actions .secondary svg { width: 17px; height: 17px; }
  .welcome-strip { align-items: flex-start; gap: 11px; padding: 16px; }
  .welcome-strip a { display: none; }
  .welcome-strip h3 { font-size: 16px; }
  .welcome-strip p { font-size: 14px; }
  .welcome-icon { width: 36px; height: 36px; }
  .welcome-icon svg { width: 21px; height: 21px; }
  .stats-grid { gap: 12px; margin-bottom: 20px; }
  .stat-card { padding: 17px; border-radius: 13px; }
  .stat-head { align-items: flex-start; font-size: 14px; }
  .stat-icon { flex-basis: 28px; width: 28px; height: 28px; border-radius: 8px; }
  .stat-icon svg { width: 17px; height: 17px; }
  .stat-value { margin: 15px 0 14px; font-size: 30px; }
  .stat-value .currency { font-size: 19px; }
  .stat-foot { font-size: 14px; }
  .panel { margin-bottom: 20px; border-radius: 13px; }
  .panel-head { align-items: flex-start; gap: 10px; padding: 20px 18px 0; }
  .panel-head h3 { font-size: 18px; }
  .panel-body { padding: 20px 18px; }
  .chart-summary { gap: 10px; }
  .chart-total { font-size: 28px; }
  .chart { gap: 6px; padding-left: 0; padding-right: 0; }
  .bar { width: 26px; max-width: 72%; }
  .chart-labels { gap: 6px; padding: 0; }
  .device-preview { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .mini-device { padding: 17px; }
  .mini-device strong { font-size: 17px; }
  .tabs { gap: 22px; margin-bottom: 20px; }
  .tab { font-size: 16px; }
  .table-panel-head { flex-wrap: wrap; padding: 20px 17px 0; }
  .table-panel-head h3 { font-size: 18px; }
  .table-panel-head > span { font-size: 14px; }
  .toolbar { gap: 12px; padding: 18px 17px; }
  .toolbar .group { width: 100%; gap: 9px; }
  .toolbar .search-control { flex: 1; min-width: 0; }
  .toolbar input { width: 100%; font-size: 16px; }
  .toolbar select { width: 100%; font-size: 16px; }
  .toolbar button { min-height: 46px; font-size: 14px; }
  .table-status-summary { gap: 9px; }
  .admin-table td:has(.table-status-summary) { min-width: 0; }
  .admin-table td:first-child .cell-content { min-width: 0; max-width: none; }
  .device-identity-heading { align-items: flex-start; gap: 12px; }
  .device-identity-heading > strong { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  .admin-table td button.device-card-control { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; gap: 5px; min-width: 88px; min-height: 44px; margin-top: -2px; padding: 9px 11px; border-color: #c7dbfc; color: #155fca; background: #edf4ff; font-size: 14px; font-weight: 650; white-space: nowrap; }
  .device-card-control svg { width: 17px; height: 17px; }
  .device-actions { width: 100%; }
  .device-actions > .row-action-primary { display: none; }
  .device-actions > button { width: 100%; }
  .device-actions > div { max-width: none; width: 100%; gap: 8px; }
  .device-actions > div > button { flex: 1 1 90px; }
  .table-search-empty { margin-left: 17px; margin-right: 17px; }
  .setup-tools > summary { min-height: 56px; padding: 15px 17px; }
  .setup-tools-body { padding: 12px; }
  .table-help { margin-left: 17px; margin-right: 17px; }
  .admin-table, .admin-table tbody { display: block; }
  .admin-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .admin-table tr[data-row] { display: block; margin: 0 13px 14px; padding: 6px 16px 16px; border: 1px solid #dce5f1; border-radius: 12px; background: #fff; }
  .admin-table td { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: baseline; gap: 12px; padding: 10px 0; border: 0; font-size: 15px; line-height: 1.8; white-space: normal; overflow-wrap: anywhere; }
  .admin-table td::before { content: attr(data-label); color: #5c7087; font-size: 14px; }
  .admin-table td:first-child { grid-template-columns: minmax(0, 1fr); gap: 5px; margin-bottom: 6px; padding-top: 14px; padding-bottom: 15px; border-bottom: 1px solid #e4ebf4; }
  .admin-table td:first-child strong { font-size: 17px; }
  .admin-table td small { font-size: 14px; }
  .admin-table td.row-actions { grid-template-columns: 1fr; gap: 0; align-items: center; margin-top: 7px; padding-top: 15px; padding-bottom: 0; border-top: 1px solid #e4ebf4; }
  .admin-table td.row-actions::before { display: none; }
  .row-actions .cell-content { gap: 8px; max-width: none; }
  .admin-table td button { min-height: 44px; padding: 10px 13px; border-color: #d6e3f5; border-radius: 8px; background: #f4f8ff; font-size: 14px; }
  .admin-table td button.row-action-primary { background: #edf4ff; border-color: #c7dbfc; }
  .table-footer { justify-content: center; gap: 14px; padding: 19px 17px; font-size: 14px; text-align: center; }
  .pagination { width: 100%; justify-content: center; }
  .pagination button { flex: 1; max-width: 150px; }
  .form-row, .receiver-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .receiver-row { gap: 9px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .receiver-row .text-button { justify-self: end; }
  .pricing-form { padding: 21px 17px; }
  .rate-table { min-width: 550px; }
  .slot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer { display: block; padding: 18px 18px calc(118px + env(safe-area-inset-bottom)); font-size: 14px; }
  .footer > span { display: block; }
  .footer > span:last-child { margin-top: 4px; }
  dialog, dialog.onboarding-wide { width: calc(100vw - 20px); max-width: calc(100vw - 20px); height: 100svh; height: 100dvh; max-height: 100svh; max-height: 100dvh; border-radius: 14px 0 0 14px; }
  .modal-head { gap: 12px; padding: 18px; }
  .modal-head h2 { font-size: 22px; }
  #dialog-body { padding: 20px 18px; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .modal-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-row { grid-template-columns: 96px minmax(0, 1fr); gap: 13px; font-size: 15px; }
  .form-actions { justify-content: stretch; gap: 10px; }
  .form-actions > button, .form-actions > a { flex: 1; min-width: 100px; white-space: normal; }
  #toast { bottom: calc(102px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100vw - 32px); font-size: 15px; }
  .charger-preparation .panel-head { flex-wrap: wrap; }
  .charger-preparation-heading { gap: 11px; }
  .charger-preparation-icon { width: 40px; height: 40px; }
  .charger-preparation-list { grid-template-columns: minmax(0, 1fr); }
  .charger-preparation-card { padding: 18px; }
  .charger-preparation-code { font-size: 20px; }
  .charger-preparation-parameters dl { grid-template-columns: minmax(0, 1fr); }
  .device-binding-chain { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .device-binding-chain > div { min-height: 130px; }
  .binding-connector { display: none; }
  .binding-network-grid { grid-template-columns: minmax(0, 1fr); }
  .binding-qr-paper { padding: 23px 18px; }
  .binding-tools > * { flex: 1 1 155px; justify-content: center; white-space: normal; }
  .onboarding-panel { padding: 20px 18px; }
  .onboarding-heading, .onboarding-detail-heading { align-items: flex-start; flex-wrap: wrap; gap: 16px; }
  .onboarding-heading > button { width: 100%; }
  .onboarding-batches { grid-template-columns: minmax(0, 1fr); }
  .onboarding-statistics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .onboarding-statistics > div { padding: 16px; }
  .onboarding-export { align-items: stretch; flex-direction: column; }
  .onboarding-export .group { flex-wrap: wrap; }
  .onboarding-export button { flex: 1; white-space: normal; }
  .onboarding-device-grid { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .onboarding-device { padding: 18px; }
  .onboarding-steps { gap: 10px; }
  .onboarding-steps span { font-size: 14px; }
  .onboarding-preview-table table { min-width: 650px; }
  .onboarding-intro { align-items: flex-start; gap: 12px; }
  .onboarding-intro > span { width: 44px; height: 44px; }
}
@media (max-width: 460px) {
  .top-actions .badge { display: none; }
  .page-heading .actions .secondary { padding: 10px; }
  .page-heading .actions .secondary svg { display: none; }
  .stat-card { padding: 15px 13px; }
  .stat-head { gap: 6px; }
  .stat-icon { display: none; }
  .stat-value { font-size: 28px; }
  .stat-value small { display: inline; margin: 0 0 0 5px; font-size: 14px; }
  .chart-summary { align-items: flex-start; flex-wrap: wrap; }
  .chart-total { font-size: 27px; }
  .bar-value { font-size: 14px; }
  .chart { gap: 4px; }
  .chart-labels { gap: 4px; }
  .chart-labels span { font-size: 14px; }
  .lock-policy { align-items: flex-start; flex-wrap: wrap; gap: 11px; padding: 16px; }
  .lock-policy > .badge { margin-left: 55px; }
  .lock-report-grid { grid-template-columns: minmax(0, 1fr); gap: 17px; padding: 17px; }
  .lock-read-actions button { flex: 1 1 135px; }
  .lock-command { gap: 10px; }
  #lock-parameter-form .form-actions { flex-direction: column-reverse; }
  #lock-parameter-form .form-actions button { width: 100%; }
  .control-query-actions, .control-action-grid { grid-template-columns: minmax(0, 1fr); }
  .control-target-heading { flex-wrap: wrap; gap: 10px; }
  .control-status-line { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px 14px; }
  .control-status-line > div { display: flex; align-items: flex-start; flex-direction: column; gap: 5px; min-width: 0; }
  .mini-device .table-status-summary { grid-template-columns: minmax(0, 1fr); }
  .control-target { padding: 17px; }
  .control-action-button { min-height: 78px; }
  .slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-panel { padding: 124px 24px 86px; }
  .login-mobile-brand { left: 25px; }
  .login-links { flex-direction: column; gap: 0; }
  .login-panel h2 { font-size: 28px; }
}
@media (max-width: 360px) {
  #main { padding-left: 12px; padding-right: 12px; }
  .page-heading h1 { font-size: 26px; }
  .admin-table td { grid-template-columns: 80px minmax(0, 1fr); gap: 10px; }
  .admin-table td:first-child { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .admin-table tr[data-row] { margin-left: 10px; margin-right: 10px; padding-left: 13px; padding-right: 13px; }
  .device-binding-chain { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  button.button-waiting::before { border-right-color: currentColor; }
}

/* Platform-managed maintenance strategy and explicit recovery actions. */
.control-policy-line { display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; padding-top:14px; margin-top:14px; border-top:1px solid var(--line); }
.control-policy-line > span { color:var(--muted); }
.control-policy-line .text-button { margin-left:auto; }
.lock-policy-panel form { display:grid; gap:16px; }
.lock-policy-panel form > label { display:grid; gap:9px; font-size:16px; font-weight:600; }
.lock-policy-panel form > .control-confirmation { display:flex; font-size:15px; font-weight:400; line-height:1.7; }
.lock-policy-status { margin:0; padding:13px 16px; border-radius:10px; font-size:15px; line-height:1.7; background:#fff5e6; color:#8a5b18; }
.lock-policy-status.confirmed { background:#eaf7f0; color:#28704d; }
.lock-policy-panel .form-note { margin:16px 0 22px; }
.control-action-button:disabled { cursor:not-allowed; opacity:.5; }
.control-lock-blocked:empty, #control-lock-blocked:empty { display:none; }
@media (max-width:640px) { .control-policy-line { align-items:flex-start; } .control-policy-line .text-button { margin-left:0; } }
