:root {
  color-scheme: dark;
  --bg: #06101d;
  --surface: #0a1929;
  --surface-raised: #0d2035;
  --surface-soft: rgba(12, 29, 47, .84);
  --line: rgba(140, 180, 208, .22);
  --line-strong: rgba(77, 199, 255, .58);
  --text: #eff8ff;
  --muted: #93aabf;
  --accent: #12d9ed;
  --accent-soft: rgba(18, 217, 237, .14);
  --good: #35e1a4;
  --danger: #ff8d97;
  --page-background: radial-gradient(circle at 82% -8%, rgba(24, 147, 214, .17), transparent 31%), var(--bg);
  --media-stage-background: radial-gradient(circle at 50% 45%, #183049 0, #030913 76%);
  --radius-card: 16px;
  --radius-control: 13px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef5fa;
  --surface: #f8fcff;
  --surface-raised: #fff;
  --surface-soft: rgba(255, 255, 255, .82);
  --line: rgba(36, 79, 112, .18);
  --line-strong: rgba(0, 143, 208, .62);
  --text: #10263a;
  --muted: #5f778b;
  --accent: #009dc6;
  --accent-soft: rgba(0, 157, 198, .11);
  --good: #009c70;
  --danger: #d83b54;
  --page-background: radial-gradient(circle at 82% -8%, rgba(0, 158, 202, .12), transparent 31%), var(--bg);
  --media-stage-background: #0c1b2a;
}

* { box-sizing: border-box; }
html, body { min-width: 0; min-height: 100%; margin: 0; overflow-x: hidden; background: var(--page-background); }
body { color: var(--text); font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
button, input, select, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.hidden, [hidden] { display: none !important; }
.screen-reader-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.message, .error { min-height: 18px; margin: 0; color: var(--muted); font-size: 12px; }
.failure, .error { color: var(--danger); }
.app-shell { width: min(100%, 480px); min-height: 100vh; margin: 0 auto; }

/* Login */
.auth-view { display: grid; min-height: 100vh; grid-template-rows: auto 1fr; padding: max(18px, env(safe-area-inset-top)) 22px 30px; }
.auth-header, .app-header { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.brand-lockup { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 800; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--accent); background: var(--accent-soft); font-size: 20px; }
.theme-toggle { display: grid; place-items: center; width: 36px; min-width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--text); background: var(--surface-soft); }
.theme-icon::before { color: var(--accent); content: "☀"; font-size: 18px; }
:root[data-theme="light"] .theme-icon::before { color: var(--text); content: "☾"; }
.auth-content { align-self: center; width: min(100%, 380px); margin: -8px auto 0; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-card); background: rgba(6, 24, 42, .55); box-shadow: 0 18px 50px rgba(0, 0, 0, .18); }
:root[data-theme="light"] .auth-content { background: rgba(255, 255, 255, .72); }
.auth-title { margin: 0 0 16px; font-size: 27px; line-height: 1.1; }
.auth-form { display: grid; gap: 12px; }
.auth-form label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.auth-form input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-control); outline: none; color: var(--text); background: var(--surface); }
.auth-form input:focus, select:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px var(--accent-soft); }

/* App frame */
.app-view { min-height: 100vh; padding: max(10px, env(safe-area-inset-top)) 12px calc(78px + env(safe-area-inset-bottom)); }
.app-header { position: relative; min-height: 48px; }
.vehicle-selector { display: inline-flex; min-width: 0; max-width: calc(100% - 138px); align-items: center; gap: 6px; height: 40px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-control); color: var(--text); background: var(--surface-soft); font-weight: 750; }
.vehicle-selector > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vehicle-selector-icon { color: var(--accent); font-size: 17px; }
.header-actions { display: inline-flex; align-items: center; gap: 7px; }
.connection-pill { display: inline-flex; align-items: center; min-height: 31px; padding: 5px 9px; border: 1px solid color-mix(in srgb, var(--good) 45%, var(--line)); border-radius: 999px; color: var(--good); background: color-mix(in srgb, var(--good) 10%, transparent); font-size: 11px; font-weight: 800; }
.connection-pill::before { width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: currentColor; content: ""; }
.connection-pill.neutral { border-color: var(--line); color: var(--muted); background: var(--surface-soft); }
.vehicle-menu { position: absolute; z-index: 50; top: 46px; right: 0; left: 0; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-raised); box-shadow: 0 16px 36px rgba(0, 0, 0, .28); }
.vehicle-menu-items { display: grid; gap: 5px; max-height: 260px; overflow: auto; }
.vehicle-menu-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) 18px; gap: 10px; align-items: center; width: 100%; min-height: 52px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: var(--surface-soft); text-align: left; }
.vehicle-menu-item:hover { border-color: var(--line-strong); background: color-mix(in srgb, var(--accent-soft) 64%, var(--surface-soft)); }
.vehicle-menu-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.vehicle-menu-item.is-selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.vehicle-menu-item.is-offline { color: var(--muted); }
.vehicle-menu-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 14%, transparent); }
.vehicle-menu-item.is-offline .vehicle-menu-dot { background: var(--muted); box-shadow: 0 0 0 3px color-mix(in srgb, var(--muted) 14%, transparent); }
.vehicle-menu-copy { display: grid; min-width: 0; gap: 2px; }
.vehicle-menu-copy strong, .vehicle-menu-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vehicle-menu-copy strong { font-size: 13px; }
.vehicle-menu-copy small { color: var(--muted); font-size: 11px; }
.vehicle-menu-check { min-width: 18px; color: var(--accent); font-size: 17px; font-weight: 800; text-align: center; }
.vehicle-menu-footer { display: flex; justify-content: flex-end; gap: 7px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.tab-panels { padding-top: 8px; }
.module-panel { min-width: 0; padding-bottom: 8px; }
.top-subtabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; min-height: 40px; margin-bottom: 10px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface-soft); }
.top-subtab { min-height: 34px; padding: 4px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 750; }
.top-subtab.is-active { color: var(--text); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* Home */
.storage-visual-list, .config-form, .mine-support-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-card); background: color-mix(in srgb, var(--surface-raised) 86%, transparent); }
.config-form { display: grid; }
.switch-row, .compact-setting-row, .compact-select-row, .config-row, .number-setting-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 52px; padding: 9px 11px; border-bottom: 1px solid var(--line); }
.compact-setting-row, .compact-select-row { grid-template-columns: minmax(0, 1fr) minmax(128px, 45%); }
.compact-select-row, .compact-select-row > span, .compact-select-row > select { min-width: 0; }
.compact-select-row > select { width: 100%; max-width: 100%; }
.switch-row b, .compact-setting-row b, .compact-select-row b, .config-row b, .number-setting-row b { font-size: 13px; }
.vehicle-info-list .config-row:last-child { border-bottom: 0; }
.vehicle-info-row > span { font-size: 13px; }
.vehicle-info-row strong { overflow: hidden; color: var(--text); font-size: 12px; font-weight: 700; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.home-storage-details { min-width: 0; }
.home-storage-details > summary { list-style: none; cursor: pointer; }
.home-storage-details > summary::-webkit-details-marker { display: none; }
.vehicle-info-list .home-storage-details[open] > summary { border-bottom: 1px solid var(--line); }
.home-storage-summary { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 7px; }
.home-storage-summary strong { max-width: 190px; }
.home-storage-summary i { color: var(--muted); font-size: 17px; font-style: normal; line-height: 1; transition: transform .18s ease; }
.home-storage-details[open] .home-storage-summary i { transform: rotate(90deg); }
.home-storage-details .storage-visual-list { border: 0; border-radius: 0; background: color-mix(in srgb, var(--surface) 66%, transparent); }
.switch { appearance: none; width: 43px; height: 24px; margin: 0; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--muted) 24%, transparent); position: relative; }
.switch::after { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); content: ""; transition: .2s ease; }
.switch:checked { border-color: var(--accent); background: var(--accent); }
.switch:checked::after { left: 20px; background: #fff; }
.switch:indeterminate::after { left: 14px; top: 10px; width: 13px; height: 2px; border-radius: 1px; }
select { width: 100%; min-width: 0; min-height: 40px; padding: 8px 34px 8px 11px; border: 1px solid var(--line); border-radius: 12px; outline: none; appearance: none; -webkit-appearance: none; color: var(--text); background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 16px) 17px / 6px 6px no-repeat, linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 10px) 17px / 6px 6px no-repeat, var(--surface); text-overflow: ellipsis; white-space: nowrap; }
select:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select:disabled { border-color: var(--line); color: var(--muted); background: linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 16px) 17px / 6px 6px no-repeat, linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 10px) 17px / 6px 6px no-repeat, var(--surface-soft); cursor: not-allowed; opacity: .62; }
.preset-segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 9px; }
.preset-segmented button { min-height: 32px; padding: 4px; border: 0; border-right: 1px solid var(--line); color: var(--muted); background: transparent; font-size: 11px; }
.preset-segmented button:last-child { border-right: 0; }
.preset-segmented button.is-selected { color: var(--text); background: var(--accent-soft); }
.technical-details { margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--surface) 78%, transparent); }
.technical-details > summary { padding: 9px 10px; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 700; }
.advanced-setting-body, .storage-config-form { border-top: 1px solid var(--line); }
.number-field { display: grid; grid-template-columns: minmax(58px, 1fr) auto; align-items: center; width: 116px; min-height: 38px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.number-field:focus-within { border-color: var(--line-strong); box-shadow: 0 0 0 3px var(--accent-soft); }
.number-field input { width: 100%; min-width: 0; min-height: 36px; padding: 6px 3px 6px 10px; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 16px; font-weight: 750; text-align: right; }
.number-field i { padding: 0 9px 0 4px; color: var(--muted); font-size: 10px; font-style: normal; white-space: nowrap; }
.number-field input, .storage-quota-number input { appearance: textfield; -moz-appearance: textfield; }
.number-field input::-webkit-inner-spin-button, .number-field input::-webkit-outer-spin-button,
.storage-quota-number input::-webkit-inner-spin-button, .storage-quota-number input::-webkit-outer-spin-button { margin: 0; appearance: none; -webkit-appearance: none; }
.storage-config-form { margin-top: 8px; }
.storage-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.storage-quota-list { display: grid; }
.storage-quota-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; min-width: 0; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.storage-quota-row label { display: grid; gap: 3px; justify-items: end; min-width: 0; color: var(--muted); font-size: 9px; }
.storage-quota-number { display: grid; grid-template-columns: minmax(44px, 1fr) auto; align-items: center; width: 94px; min-height: 36px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.storage-quota-number:focus-within { border-color: var(--line-strong); box-shadow: 0 0 0 3px var(--accent-soft); }
.storage-quota-number input { width: 100%; min-width: 0; min-height: 34px; padding: 5px 2px 5px 8px; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 16px; font-weight: 800; text-align: right; }
.storage-quota-number span { padding: 0 8px 0 4px; color: var(--muted); font-size: 10px; }
.storage-quota-copy { min-width: 0; }
.storage-quota-copy strong, .storage-quota-copy small { display: block; }
.storage-quota-copy small { margin-top: 3px; overflow-wrap: anywhere; color: var(--muted); font-size: 9px; }
.unified-save-bar { padding: 10px; }
.primary, .danger, .ghost, .icon-plain { min-height: 34px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: var(--surface-soft); }
.primary { border-color: color-mix(in srgb, var(--accent) 65%, var(--line)); color: #06202b; background: linear-gradient(135deg, #15d7ea, #3bb9f6); font-weight: 800; }
.danger { border-color: color-mix(in srgb, var(--danger) 55%, var(--line)); color: var(--danger); }
.ghost { color: var(--accent); }
.wide { width: 100%; min-height: 43px; }
.compact-button { min-height: 29px; padding: 4px 8px; font-size: 11px; }
.compact-message { min-height: 0; padding: 4px 2px 0; font-size: 10px; text-align: center; }
.compact-message:empty { display: none; }

/* Video */
.camera-card, .playback-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-card); background: #02070d; box-shadow: 0 12px 30px rgba(0, 0, 0, .2); }
.camera-card.is-playing, .playback-card.is-playing { border-color: color-mix(in srgb, var(--good) 62%, var(--line)); }
.camera-card.is-error, .playback-card.is-error { border-color: var(--danger); }
.video-stage { position: relative; display: grid; place-items: center; width: 100%; overflow: hidden; isolation: isolate; color: #eff8ff; background: var(--media-stage-background); }
.live-video-stage { aspect-ratio: 16 / 9; }
.live-video-stage.is-avm, .playback-stage.is-avm { aspect-ratio: 4 / 3; }
.playback-stage { aspect-ratio: 16 / 9; }
.video-element, .video-canvas { position: relative; z-index: 0; width: 100%; height: 100%; object-fit: contain; background: #02070d; }
.video-canvas.hidden, .video-element.hidden { display: none; }
.player-topbar, .player-bottombar { position: absolute; z-index: 3; right: 0; left: 0; display: flex; align-items: center; justify-content: space-between; gap: 7px; pointer-events: none; }
.player-topbar { top: 0; min-height: 43px; padding: 7px 8px 11px; background: linear-gradient(180deg, rgba(0, 7, 14, .88), transparent); }
.player-bottombar { bottom: 0; min-height: 39px; padding: 8px; background: linear-gradient(0deg, rgba(0, 7, 14, .9), transparent); }
.player-title { min-width: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.player-title strong { font-size: 13px; }
.player-topbar-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; min-width: 0; }
.player-status, .media-label { display: inline-flex; align-items: center; gap: 4px; min-height: 23px; padding: 3px 6px; border: 1px solid rgba(255, 255, 255, .17); border-radius: 999px; color: rgba(239, 248, 255, .9); background: rgba(0, 9, 17, .48); font-size: 9px; white-space: nowrap; }
.player-status i { width: 6px; height: 6px; border-radius: 50%; background: #9ab2c5; }
.is-playing .player-status i { background: var(--good); box-shadow: 0 0 8px var(--good); }
.is-error .player-status i { background: var(--danger); }
.media-label { color: #a9c2d4; font-weight: 800; }
.network-latency { color: #74e9ff; font-size: 10px; font-variant-numeric: tabular-nums; }
.player-icon-button, .camera-stop { pointer-events: auto; border: 0; border-radius: 8px; color: #eff8ff; background: rgba(0, 13, 24, .56); }
.player-icon-button { display: grid; place-items: center; width: 27px; height: 27px; font-size: 18px; }
.camera-stop { min-height: 27px; padding: 4px 7px; font-size: 10px; }
.playback-controls { display: grid; grid-template-columns: auto minmax(50px, 1fr) auto auto; gap: 7px; pointer-events: auto; }
.playback-controls input[type="range"] { width: 100%; min-width: 0; height: 18px; margin: 0; appearance: none; border-radius: 999px; accent-color: var(--accent); background: linear-gradient(var(--accent), var(--accent)) 0 / var(--range-fill, 0%) 4px no-repeat, rgba(191, 214, 232, .25); cursor: pointer; }
.playback-controls input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: rgba(191, 214, 232, .25); }
.playback-controls input[type="range"]::-webkit-slider-thumb { width: 14px; height: 14px; margin-top: -5px; appearance: none; border: 0; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px rgba(3, 16, 26, .5); }
.playback-controls input[type="range"]::-moz-range-track { height: 4px; border-radius: 999px; background: rgba(191, 214, 232, .25); }
.playback-controls input[type="range"]::-moz-range-progress { height: 4px; border-radius: 999px; background: var(--accent); }
.playback-controls input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--accent); }
.player-time { font-size: 10px; font-variant-numeric: tabular-nums; }
.player-cover-placeholder { position: absolute; z-index: 1; inset: 0; display: grid; place-content: center; gap: 8px; border: 0; color: #eff8ff; background: rgba(3, 12, 22, .5); }
.player-cover-art { width: min(115px, 40vw); margin: 0 auto; opacity: .88; }
.playback-player-cover[hidden] { display: none; }
.video-state-overlay { position: absolute; z-index: 2; inset: 0; display: none; gap: 7px; place-items: center; color: #eff8ff; background: rgba(3, 12, 22, .48); font-size: 12px; }
.is-connecting .video-state-overlay { display: grid; }
.video-spinner { width: 17px; height: 17px; border: 2px solid rgba(255, 255, 255, .28); border-top-color: var(--accent); border-radius: 50%; animation: dm-spin .8s linear infinite; }
.video-error-overlay { position: absolute; z-index: 4; inset: 0; display: grid; place-content: center; margin: 0; padding: 28px; color: var(--danger); text-align: center; background: rgba(3, 12, 22, .82); font-size: 12px; font-weight: 700; pointer-events: none; }
.video-error-overlay[hidden] { display: none; }
@keyframes dm-spin { to { transform: rotate(360deg); } }
.live-camera-controls { width: 100%; margin: 10px auto 0; }
.dashcam-button { display: flex; align-items: center; justify-content: center; gap: 6px; width: min(132px, 32%); min-width: 112px; min-height: 36px; margin: 0 auto 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); background: var(--surface-soft); font-size: 11px; }
.dashcam-button > span:first-child { color: var(--accent); font-size: 16px; }
.dashcam-button b { font-size: 11px; }
.camera-switch.is-selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 12%, transparent); }
.surround-selector { position: relative; width: 182px; height: 182px; margin: 0 auto; }
.selector-ring { position: absolute; inset: 8px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 50%; background: radial-gradient(circle, var(--accent-soft) 0 30%, transparent 31%); }
.direction-button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: var(--surface); font-size: 10px; }
.direction-front { top: 0; left: 67px; }
.direction-back { bottom: 0; left: 67px; }
.direction-left { top: 67px; left: 0; }
.direction-right { top: 67px; right: 0; }
.direction-all { top: 55px; left: 55px; width: 72px; height: 72px; gap: 1px; border-color: var(--accent); color: #06303a; background: var(--accent); box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 34%, transparent); }
.direction-all .car-glyph { font-size: 18px; }
.direction-all b { font-size: 11px; }

/* Recording, logs and storage */
.list-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 2px 7px; }
.list-heading strong { font-size: 13px; }
.icon-plain { min-height: 28px; padding: 3px 8px; color: var(--accent); }
.recordings-list, .logs-list, .audit-list { display: grid; gap: 7px; }
.recording-date-group { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: color-mix(in srgb, var(--surface-raised) 72%, transparent); }
.recording-date-group + .recording-date-group { margin-top: 7px; }
.recording-date-group > summary { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding: 8px 10px; color: var(--text); cursor: pointer; }
.recording-date-group > summary small { color: var(--muted); font-size: 10px; }
.recording-date-list { display: grid; gap: 6px; padding: 0 7px 7px; }
.recording-event-group { margin: 2px 3px 0; color: var(--muted); font-size: 10px; }
.recording-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 68px; padding: 7px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.recording-row.is-active { border-color: var(--accent); background: var(--accent-soft); }
.recording-cover { position: relative; display: grid; place-items: center; width: 76px; height: 52px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; color: var(--accent); background: var(--surface); }
.recording-cover.has-image { display: block; }
.recording-cover-image { width: 100%; height: 100%; object-fit: cover; }
.recording-cover-image-symbol, .recording-cover-behavior-label, .recording-cover-frame-label { position: absolute; padding: 2px 4px; border-radius: 999px; color: #eff8ff; background: rgba(2, 10, 18, .72); font-size: 8px; }
.recording-cover-image-symbol { top: 3px; left: 3px; }
.recording-cover-behavior-label { bottom: 3px; left: 3px; max-width: 42px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recording-cover-frame-label { right: 3px; bottom: 3px; }
.recording-cover-symbol svg, .recording-cover-image-symbol svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.recording-info { min-width: 0; }
.recording-info strong, .recording-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recording-info strong { font-size: 12px; }
.recording-info small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.recording-actions { display: grid; gap: 4px; }
.recording-actions button { min-height: 26px; padding: 3px 6px; font-size: 9px; }
.mine-support-card { min-width: 0; overflow: hidden; }
.account-summary { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px; border-bottom: 1px solid var(--line); }
.account-summary > span:last-child { display: grid; min-width: 0; gap: 1px; }
.account-summary small { color: var(--muted); font-size: 9px; }
.account-summary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.account-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--accent); background: var(--accent-soft); font-size: 14px; font-weight: 850; }
.device-status-list { display: grid; }
.device-status-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(92px, auto); gap: 8px; align-items: center; min-height: 54px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.device-status-row > span { font-size: 13px; }
.device-status-row strong { overflow: hidden; color: var(--text); font-size: 12px; font-weight: 700; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.mine-meta-list .device-status-row { min-height: 48px; }
.small-state { color: var(--good) !important; }
.small-state.neutral { color: var(--muted) !important; }
.mine-support-card > .upload-button { width: calc(100% - 20px); margin: 10px 10px 0; }
.mine-support-card > .compact-message { padding-right: 10px; padding-left: 10px; }
.mine-support-card > .technical-details { margin-right: 8px; margin-left: 8px; }
.details-actions { display: flex; justify-content: flex-end; padding: 0 8px 7px; }
.audit-list, .logs-list { min-width: 0; padding: 0 8px 8px; }
.audit-list { max-height: 360px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.audit-row, .log-row { min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.audit-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; overflow: hidden; cursor: pointer; }
.audit-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.audit-heading { display: grid; min-width: 0; gap: 1px; }
.audit-heading strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.audit-heading time { color: var(--muted); font-size: 9px; }
.audit-result { align-self: start; font-size: 9px; font-weight: 800; white-space: nowrap; }
.audit-detail { display: -webkit-box; grid-column: 1 / -1; min-width: 0; margin: 3px 0 0; overflow: hidden; overflow-wrap: anywhere; color: var(--muted); font-size: 9px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.audit-row.is-expanded .audit-detail { display: block; }
.log-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.log-info { min-width: 0; }
.log-info strong, .log-info small { display: block; min-width: 0; overflow-wrap: anywhere; }
.log-info strong { font-size: 11px; }
.log-info small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.log-row a { color: var(--accent); font-size: 10px; white-space: nowrap; }
.device-delete { width: calc(100% - 16px); margin: 8px; }
.storage-visual-list { display: grid; }
.storage-visual-list.is-empty { border: 0; border-radius: 0; background: transparent; }
.storage-empty-state { min-width: 0; margin: 0; padding: 7px 1px; color: var(--muted); font-size: 10px; text-align: left; }
.storage-visual-row { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.storage-visual-row:last-child { border-bottom: 0; }
.storage-visual-row.is-selected { background: var(--accent-soft); }
.storage-visual-title { display: flex; align-items: center; gap: 6px; }
.storage-visual-title > span { color: var(--accent); }
.storage-visual-title small { margin-left: auto; color: var(--muted); font-size: 9px; }
.storage-bar { position: relative; height: 5px; margin: 8px 0; overflow: hidden; border-radius: 99px; background: color-mix(in srgb, var(--muted) 28%, transparent); }
.storage-bar i { position: absolute; top: 0; bottom: 0; display: block; border-radius: inherit; }
.storage-bar-used { left: 0; background: var(--accent); }
.storage-bar-allocation { background: color-mix(in srgb, var(--accent) 34%, transparent); }
.storage-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.storage-figures span, .storage-figures b { display: block; }
.storage-figures span span { color: var(--muted); font-size: 8px; }
.storage-figures b { font-size: 10px; }
.app-toast { position: fixed; z-index: 60; right: 14px; bottom: calc(76px + env(safe-area-inset-bottom)); max-width: min(330px, calc(100vw - 28px)); margin: 0; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 11px; color: var(--text); background: rgba(4, 17, 29, .92); box-shadow: 0 14px 32px rgba(0, 0, 0, .3); font-size: 11px; }
.app-toast.failure { border-color: color-mix(in srgb, var(--danger) 60%, var(--line)); color: var(--danger); }
.bottom-tabs { position: fixed; z-index: 40; bottom: 0; left: 50%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 480px); min-height: calc(62px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); transform: translateX(-50%); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 93%, transparent); backdrop-filter: blur(18px); }
.app-tab { display: grid; place-content: center; gap: 2px; padding: 5px; border: 0; color: var(--muted); background: transparent; font-size: 11px; }
.app-tab > span { color: currentColor; font-size: 20px; line-height: 1; }
.app-tab.is-active { color: var(--accent); font-weight: 800; }
@media (min-width: 640px) { .app-shell { border-right: 1px solid var(--line); border-left: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, .2); } .bottom-tabs { border-right: 1px solid var(--line); border-left: 1px solid var(--line); } }
@media (max-width: 360px) { .app-view { padding-right: 9px; padding-left: 9px; } .vehicle-selector { max-width: calc(100% - 130px); } .connection-pill { padding-right: 7px; padding-left: 7px; } .player-topbar { padding-right: 6px; padding-left: 6px; } .media-label, .network-latency { display: none; } .playback-controls { grid-template-columns: auto minmax(34px, 1fr) auto auto; gap: 4px; } .dashcam-button { min-width: 104px; } .compact-setting-row, .compact-select-row { grid-template-columns: minmax(0, 1fr) minmax(118px, 44%); } .number-field { width: 108px; } .recording-row { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 6px; } .recording-cover { width: 64px; } }
