:root {
    color-scheme: light;
    --ink: #1c2b35;
    --muted: #657580;
    --subtle: #89949c;
    --line: #e6ebee;
    --canvas: #f5f7f9;
    --panel: #fff;
    --primary: #147d64;
    --primary-hover: #106852;
    --tint: #eaf6f1;
    --danger: #bb3549;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 14px; line-height: 1.6; }
h1, h2, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: middle; }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 100; background: var(--primary); color: #fff; padding: 12px 20px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.app-shell { display: grid; grid-template-columns: 218px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 29px 18px 20px; background: #fff; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 4px; font-size: 20px; font-weight: 750; letter-spacing: -.6px; }
.brand-mark { width: 39px; height: 43px; background: var(--primary); color: #fff; display: grid; place-items: center; border-radius: 12px; }
.brand-mark .icon { width: 26px; height: 26px; }
.brand small { display: block; margin-top: 1px; font-size: 10px; color: var(--muted); font-weight: 400; letter-spacing: .2px; }
.nav-caption { margin: 48px 14px 13px; color: var(--subtle); font-size: 11px; letter-spacing: 1px; }
.side-nav { display: grid; gap: 7px; }
.side-nav a { display: flex; align-items: center; gap: 13px; padding: 12px 15px; border-radius: 9px; color: #586a74; font-size: 13px; font-weight: 550; transition: background .15s, color .15s; }
.side-nav a:hover, .side-nav a:focus-visible { background: var(--tint); color: var(--primary); }
.sidebar-tip { margin: auto 4px 22px; padding: 17px; background: #f4f9f7; border: 1px solid #e8f0ec; border-radius: 12px; }
.sidebar-tip .icon { display: block; margin-bottom: 10px; color: var(--primary); }
.sidebar-tip strong { font-size: 12px; font-weight: 650; }
.sidebar-tip p { margin-top: 6px; font-size: 11px; color: var(--muted); line-height: 1.9; }
.sidebar-footer { display: flex; align-items: center; gap: 7px; border-top: 1px solid var(--line); padding: 19px 5px 0; font-size: 10px; color: var(--muted); }
.sidebar-footer > span:last-child { margin-left: auto; color: var(--subtle); }
.tiny-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.workspace { min-width: 0; }
.topbar { height: 76px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; gap: 15px; background: #fff; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; align-items: center; gap: 13px; color: var(--subtle); font-size: 12px; }
.breadcrumb strong { color: #475965; font-weight: 500; }
.connection-badge { display: inline-flex; gap: 7px; align-items: center; border: 1px solid var(--line); border-radius: 30px; padding: 5px 11px; font-size: 11px; white-space: nowrap; }
.connection-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.connection-badge.online { color: var(--primary); background: #f1faf5; border-color: #daeee3; }
.connection-badge.offline { color: #935d39; background: #fffbf5; border-color: #eee4d6; }
main { width: min(1180px, calc(100% - 64px)); margin: 32px auto 0; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 26px; }
.eyebrow { color: var(--primary); font-size: 10px; font-weight: 650; letter-spacing: 1.8px; margin-bottom: 6px; }
h1 { font-size: 28px; font-weight: 650; line-height: 1.4; letter-spacing: -.8px; }
.page-heading p:last-child { margin-top: 7px; font-size: 13px; color: var(--muted); }
.timezone-label { font-size: 11px; color: var(--subtle); font-variant-numeric: tabular-nums; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 3px 8px rgba(27, 46, 64, .025); }
.login-panel { max-width: 620px; margin: 54px auto 120px; padding: 34px; }
.login-panel > .section-icon { margin-bottom: 18px; }
.login-panel h2 { font-size: 22px; }
.section-description { font-size: 13px; color: var(--muted); margin: 7px 0 24px; }
.login-footnote { padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.database-maintenance { margin-top: 0; margin-bottom: 22px; border-color: #e7e5ef; }
.database-maintenance .section-heading { margin-bottom: 12px; }
.database-maintenance .section-icon.violet { color: #7254ad; background: #f2edfc; }
.database-maintenance .migration-status { margin: 0; padding: 11px 13px; border: 1px solid #eeeaf6; border-radius: 8px; background: #fbfaff; }
.migration-status { color: var(--muted); font-size: 11px; line-height: 1.65; }
.migration-status.running { color: #7254ad; }
.migration-status.ok { color: var(--primary); }
.migration-status.error { color: var(--danger); }
label { display: block; font-size: 12px; font-weight: 550; color: #435762; }
input, select, textarea { width: 100%; min-width: 0; padding: 10px 12px; margin: 7px 0 0; border: 1px solid #dbe3e8; border-radius: 7px; color: var(--ink); background: #fff; outline: none; font-size: 13px; font-weight: 400; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: #94a0a9; font-size: 12px; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(20, 125, 100, .10); }
textarea { resize: vertical; min-height: 102px; line-height: 1.7; }
input[type="color"] { padding: 5px; height: 42px; cursor: pointer; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 1px; }
input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 4px; }
input[type="color"]::-moz-color-swatch { border: 0; border-radius: 4px; }
button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; flex-shrink: 0; border: 1px solid #dce4e8; border-radius: 7px; padding: 9px 14px; min-height: 39px; background: #fff; color: #465b65; cursor: pointer; font-weight: 550; font-size: 12px; white-space: nowrap; transition: background .15s, border-color .15s; }
button .icon { width: 15px; height: 15px; }
button:hover { background: #f6f9fa; border-color: #b9c8cd; }
button.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
button.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
button:focus-visible, a:focus-visible { outline: 3px solid #8fcabb; outline-offset: 3px; }
button:disabled, select:disabled { opacity: .65; cursor: default; }
.inline-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.error { min-height: 20px; margin: 8px 0; color: var(--danger); font-size: 12px; }
.device-bar { padding: 23px 25px 25px; }
.device-picker { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.device-picker-title { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.device-picker-title label { font-size: 15px; color: var(--ink); font-weight: 650; }
.device-picker-title p { font-size: 11px; color: var(--muted); margin-top: 2px; }
.device-picker .inline-action { width: min(510px, 58%); }
.device-picker select { margin-top: 0; background: #fbfcfd; font-size: 13px; height: 42px; }
.device-picker button { height: 42px; }
.device-bar > .note { margin: 14px 0 20px; padding-bottom: 19px; border-bottom: 1px solid var(--line); font-size: 11px; }
.overview-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.overview-heading h2 { font-size: 13px; font-weight: 650; }
.live-caption { color: var(--subtle); font-size: 10px; }
.device-facts { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fact-card { min-width: 0; padding: 15px 17px; border: 1px solid #edf0f2; border-radius: 9px; background: #f9fafb; }
.fact-card dt { color: var(--muted); font-size: 11px; }
.fact-card dd { margin: 9px 0 0; color: var(--ink); font-weight: 600; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.battery-fact { background: #f1f8f4; border-color: #e5f0e9; }
.battery-fact dd { color: var(--primary); }
#revision { font-size: 23px; line-height: 1.1; }
.fact-wide { grid-column: span 2; }
.fact-wide dd { font-size: 12px; font-weight: 500; }
.control-section { padding: 25px; margin-top: 22px; scroll-margin-top: 22px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.section-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.section-icon { flex-shrink: 0; width: 39px; height: 39px; display: inline-grid; place-items: center; border-radius: 11px; background: var(--tint); color: var(--primary); }
.section-icon.blue { color: #537cb4; background: #edf3fc; }
.section-icon.amber { color: #b28741; background: #fbf5e9; }
.section-icon.violet { color: #7254ad; background: #f2edfc; }
.section-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-shrink: 0; }
.master-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 182px; padding: 7px 9px 7px 11px; border: 1px solid #d7e9e0; border-radius: 9px; background: #f5fbf7; cursor: pointer; }
.master-switch > span { min-width: 0; }
.master-switch strong { display: block; color: #246a50; font-size: 11px; font-weight: 650; }
.master-switch small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.master-switch.amber { border-color: #f0dfbd; background: #fffaf1; }
.master-switch.amber strong { color: #9a6921; }
.master-switch input { appearance: none; position: relative; width: 34px; height: 20px; flex-shrink: 0; margin: 0; padding: 0; border: 1px solid #d5dfe2; border-radius: 20px; background: #dce4e7; cursor: pointer; }
.master-switch input::after { content: ""; position: absolute; width: 14px; height: 14px; left: 2px; top: 2px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px #0002; transition: transform .15s; }
.master-switch input:checked { background: var(--primary); border-color: var(--primary); }
.master-switch.amber input:checked { background: #c08c37; border-color: #c08c37; }
.master-switch input:checked::after { transform: translateX(14px); }
.master-switch input:disabled { cursor: progress; opacity: .55; }
h2 { font-size: 17px; font-weight: 650; line-height: 1.5; }
.section-title p { font-size: 11px; color: var(--muted); margin-top: 3px; }
.config-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fafbfc; }
.config-grid > div { min-width: 0; padding: 14px 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.config-grid dt { font-size: 11px; color: var(--muted); }
.config-grid dd { margin: 6px 0 0; font-size: 12px; font-weight: 500; overflow-wrap: anywhere; line-height: 1.65; }
.sync-note { margin-top: 12px; font-size: 10px; color: var(--subtle); }
.note { font-size: 12px; color: var(--muted); }
.overlay-workspace { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(250px, 1fr); gap: 30px; }
.overlay-editor { min-width: 0; }
.field-hint { display: block; font-size: 10px; color: var(--subtle); margin-top: 5px; font-weight: 400; }
.switch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 17px 0 20px; }
.switch-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; background: #f9fafb; border: 1px solid #edf0f2; border-radius: 8px; cursor: pointer; }
.switch-line > span { font-size: 11px; color: #334b56; font-weight: 550; }
.switch-line small { display: block; margin-top: 4px; font-size: 9px; color: var(--muted); font-weight: 400; line-height: 1.6; }
.switch-line input { appearance: none; position: relative; width: 30px; height: 18px; flex-shrink: 0; margin: 0; padding: 0; border: 1px solid #d5dfe2; border-radius: 20px; background: #dce4e7; cursor: pointer; }
.switch-line input::after { content: ""; position: absolute; width: 12px; height: 12px; left: 2px; top: 2px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px #0002; transition: transform .15s; }
.switch-line input:checked { background: var(--primary); border-color: var(--primary); }
.switch-line input:checked::after { transform: translateX(12px); }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.form-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.unit-label { float: right; color: var(--subtle); font-size: 10px; font-weight: 400; }
.overlay-preview-panel { padding: 18px; border-radius: 11px; background: #f4f7f8; border: 1px solid #edf1f2; }
.preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; color: var(--muted); font: 10px ui-monospace, monospace; }
.preview-toolbar button { min-height: 28px; padding: 4px 8px; font-size: 10px; }
.preview-heading { display: flex; justify-content: space-between; align-items: center; }
.preview-heading p { font-size: 12px; font-weight: 600; }
.preview-heading span { font-size: 9px; color: var(--muted); background: #fff; padding: 2px 7px; border-radius: 4px; }
.phone-preview { width: 260px; max-width: 100%; margin: 17px auto 0; border: 6px solid #394d58; border-radius: 29px; background: #f8fafb; overflow: hidden; box-shadow: 0 12px 18px rgba(27, 46, 64, .10); }
.phone-screen { width: 100%; aspect-ratio: 1080 / 1920; position: relative; overflow: hidden; }
.preview-canvas { position: absolute; top: 0; left: 0; transform-origin: top left; z-index: 3; pointer-events: none; }
.phone-topline { position: relative; display: flex; justify-content: space-between; padding: 12px 15px; font-size: 9px; font-weight: 650; color: #56717e; }
.phone-topline::after { content: ""; position: absolute; width: 55px; height: 11px; top: 0; left: calc(50% - 27px); border-radius: 0 0 10px 10px; background: #394d58; }
.mock-app { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 15px 15px 0; }
.mock-avatar { width: 35px; height: 35px; border-radius: 12px; background: #cfe6e0; }
.mock-lines { display: grid; gap: 6px; align-content: center; }
.mock-lines i { display: block; height: 7px; border-radius: 3px; background: #dfe8eb; }
.mock-lines i:last-child { width: 65%; }
.mock-tile { background: #eaf0f3; height: 63px; border-radius: 9px; }
.mock-tile:nth-last-child(2) { background: #e5eeea; }
.mock-tile.wide { grid-column: 1 / -1; height: 78px; background: #edf1f3; }
.preview-shield { position: absolute; border: 3px solid #e53935; background: transparent; cursor: grab; touch-action: none; pointer-events: auto; user-select: none; }
.preview-shield:active { cursor: grabbing; }
.overlay-preview { width: 100%; height: 100%; min-width: 0; min-height: 0; border: 0; border-radius: inherit; display: grid; place-items: center; text-align: center; overflow-wrap: anywhere; overflow: hidden; white-space: pre-wrap; font-weight: 700; line-height: 1.3; }
.preview-resize { position: absolute; z-index: 4; right: 0; bottom: 0; width: 20px; height: 20px; transform-origin: bottom right; border: 1px solid #fff; border-radius: 5px 0 0; background: #e53935; color: #fff; display: grid; place-items: center; font-size: 12px; line-height: 1; cursor: nwse-resize; touch-action: none; }
.phone-home { position: absolute; bottom: 7px; left: calc(50% - 35px); width: 70px; height: 3px; border-radius: 3px; background: #81949e; }
.preview-note { text-align: center; font-size: 10px; line-height: 1.8; color: var(--muted); margin-top: 16px; }
.alarm-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.alarm-option { display: flex; align-items: flex-start; gap: 9px; border: 1px solid #e1e7eb; padding: 16px; border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.alarm-option:has(input:checked) { border-color: #7bb4a3; background: #f3faf6; }
.alarm-option input { width: 15px; height: 15px; flex-shrink: 0; margin: 3px 0 0; accent-color: var(--primary); }
.alarm-option strong { display: block; font-size: 12px; font-weight: 600; }
.alarm-option small { display: block; font-size: 10px; font-weight: 400; color: var(--muted); margin-top: 6px; line-height: 1.8; }
.alarm-option em { display: inline-block; font-size: 9px; color: var(--primary); background: #e1f2e9; padding: 1px 5px; margin-left: 6px; border-radius: 3px; font-style: normal; font-weight: 400; }
.callout { margin-top: 16px; padding: 10px 13px; background: #f7f9fa; border-radius: 7px; color: var(--muted); font-size: 11px; }
.test-section { overflow: hidden; }
.test-heading { margin-bottom: 20px; }
.test-session-badge { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; border: 1px solid #e4e9ec; border-radius: 999px; padding: 5px 10px; color: var(--muted); background: #f8fafb; font-size: 10px; white-space: nowrap; }
.test-session-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #aab5bb; }
.test-session-badge.running { color: #7656a6; background: #f6f1ff; border-color: #e4d9f8; }
.test-session-badge.running::before { background: #8a63c5; box-shadow: 0 0 0 3px #8a63c522; }
.test-session-badge.ok { color: var(--primary); background: #f1faf5; border-color: #daeee3; }
.test-session-badge.ok::before { background: var(--primary); }
.test-session-badge.error { color: var(--danger); background: #fff5f6; border-color: #f2dce0; }
.test-session-badge.error::before { background: var(--danger); }
.test-health-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 17px; border: 1px solid #e8e4f2; border-radius: 11px; background: linear-gradient(110deg, #fbfaff, #f8fafb); }
.test-health-copy { min-width: 0; }
.test-health-copy > strong { font-size: 13px; font-weight: 650; }
.test-health-copy > p { margin-top: 4px; color: var(--muted); font-size: 11px; }
.test-health-states { display: flex; flex-wrap: wrap; gap: 13px 20px; margin-top: 11px; color: var(--muted); font-size: 10px; }
.test-health-states span { display: inline-flex; align-items: center; gap: 5px; }
.test-health-states b { color: var(--ink); font-weight: 600; }
.test-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #b4bdc2; }
.test-dot.ok { background: var(--primary); }
.test-dot.running { background: #8a63c5; box-shadow: 0 0 0 3px #8a63c522; }
.test-dot.error { background: var(--danger); }
.test-action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.test-action-card { min-width: 0; display: flex; flex-direction: column; gap: 13px; padding: 16px; border: 1px solid #edf0f2; border-radius: 10px; background: #fff; }
.test-action-card > div:first-child { min-height: 70px; }
.test-action-card h3 { display: inline; margin: 0 0 0 7px; font-size: 13px; font-weight: 650; }
.test-action-card p { margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.75; }
.test-number { color: var(--subtle); font: 600 10px ui-monospace, monospace; letter-spacing: .4px; }
.test-action-card label { margin-top: auto; }
.test-action-card input[type="text"] { margin-top: 5px; }
.test-check { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; cursor: pointer; }
.test-check input { width: 15px; height: 15px; margin: 0; accent-color: #7254ad; }
.test-action-card > button { width: 100%; }
.test-button-stack { display: grid; gap: 8px; margin-top: auto; }
button.warning { background: #b8791b; border-color: #b8791b; }
button.warning:hover { background: #996315; border-color: #996315; }
.test-restore-card { background: #fbfcfc; }
.test-restore-card > button { margin-top: auto; }
.test-result { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 12px 14px; border: 1px solid #e8ecee; border-radius: 9px; background: #fafbfc; }
.test-result-icon { display: inline-grid; place-items: center; width: 21px; height: 21px; flex-shrink: 0; border-radius: 50%; color: #fff; background: #aab5bb; font: 700 12px/1 Arial, sans-serif; }
.test-result p { min-width: 0; }
.test-result strong { display: block; color: var(--ink); font-size: 11px; font-weight: 650; }
.test-result small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.test-result.running { border-color: #e4d9f8; background: #fbfaff; }
.test-result.running .test-result-icon { background: #8a63c5; }
.test-result.ok { border-color: #dceee4; background: #f5fbf7; }
.test-result.ok .test-result-icon { background: var(--primary); }
.test-result.error { border-color: #f0dfe2; background: #fff7f8; }
.test-result.error .test-result-icon { background: var(--danger); }
.test-callout { margin-top: 12px; }
.config-group { margin: 0; padding: 20px 0 0; border: 0; min-width: 0; }
.config-group + .config-group { margin-top: 25px; border-top: 1px solid var(--line); }
.config-group legend { width: 100%; padding: 0; font-weight: 600; font-size: 13px; }
.config-group legend span { display: inline-block; color: var(--subtle); font-size: 10px; font-weight: 500; margin-right: 11px; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
th { background: #f8fafb; font-size: 11px; font-weight: 500; color: var(--muted); }
th, td { padding: 13px 16px; border-bottom: 1px solid #edf0f2; vertical-align: top; }
th:first-child { width: 165px; }
th:nth-child(2) { width: 66px; }
td:first-child { color: #6f8089; font-size: 11px; font-variant-numeric: tabular-nums; }
td:nth-child(2) { white-space: nowrap; color: var(--primary); font-size: 11px; }
td:last-child { color: var(--muted); max-width: 400px; overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfc; }
.empty-row { color: var(--subtle); text-align: center; padding: 36px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 20; max-width: min(600px, calc(100vw - 32px)); padding: 13px 20px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 30px #18352d26; font-size: 13px; }
.toast:empty { display: none; }
.page-footer { display: flex; justify-content: space-between; gap: 15px; padding: 25px 0 30px; font-size: 10px; color: var(--subtle); }
.mobile-nav { display: none; }
@media (max-width: 1280px) {
    .app-shell { grid-template-columns: 190px minmax(0, 1fr); }
    .sidebar { padding-inline: 13px; }
    .brand { font-size: 18px; gap: 8px; }
    .brand small { font-size: 9px; }
    main { width: calc(100% - 44px); }
    .topbar { padding-inline: 24px; }
    .config-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .overlay-workspace { gap: 20px; grid-template-columns: minmax(0, 1.4fr) minmax(240px, 1fr); }
    .switch-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
    .app-shell { grid-template-columns: minmax(0, 1fr); }
    .sidebar { display: none; }
    .mobile-nav { display: flex; gap: 6px; overflow-x: auto; margin: 22px 0 0; padding-bottom: 2px; }
    .mobile-nav a { flex: 0 0 auto; color: var(--muted); padding: 7px 13px; border: 1px solid var(--line); border-radius: 20px; font-size: 12px; background: #fff; }
    .mobile-nav a:hover { color: var(--primary); border-color: #91bdaf; }
    .config-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .switch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .test-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .test-restore-card { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .topbar { height: 61px; padding-inline: 18px; }
    .breadcrumb { font-size: 11px; gap: 9px; }
    main { width: calc(100% - 30px); margin-top: 23px; }
    h1 { font-size: 24px; }
    .timezone-label { display: none; }
    .page-heading { margin-bottom: 20px; }
    .page-heading p:last-child { font-size: 12px; }
    .card { border-radius: 12px; }
    .device-bar, .control-section { padding: 19px; }
    .device-picker { align-items: stretch; flex-direction: column; gap: 16px; }
    .device-picker .inline-action { width: 100%; }
    .device-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .fact-card { padding: 13px; }
    .fact-wide { grid-column: 1 / -1; }
    .section-heading { align-items: flex-start; gap: 16px; flex-wrap: wrap; }
    .section-title p { font-size: 11px; }
    .section-heading > button, .section-heading > .section-actions { margin-left: 51px; }
    .section-actions { width: calc(100% - 51px); justify-content: space-between; }
    .config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .overlay-workspace { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    .overlay-preview-panel { padding: 18px; }
    .alarm-options { grid-template-columns: 1fr; gap: 9px; }
    .test-health-panel { align-items: stretch; flex-direction: column; }
    .test-action-grid { grid-template-columns: minmax(0, 1fr); }
    .test-restore-card { grid-column: auto; }
    .alarm-option { padding: 13px 15px; }
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
    .login-panel { margin: 25px auto 75px; padding: 23px; }
    table { min-width: 660px; }
    .page-footer { font-size: 9px; }
}
@media (max-width: 400px) {
    .topbar { padding-inline: 14px; }
    .breadcrumb { gap: 6px; }
    main { width: calc(100% - 20px); }
    .device-bar, .control-section { padding: 15px; }
    .device-picker .inline-action { grid-template-columns: minmax(0, 1fr); }
    .device-picker .inline-action button { justify-self: end; }
    .switch-grid { grid-template-columns: 1fr; }
    .form-grid.two-columns, .form-grid { grid-template-columns: minmax(0, 1fr); }
    .page-footer { flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
