:root {
  color-scheme: dark;
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #070b12;
  color: #edf5ff;
  font-synthesis: none;
  --muted: #8290a5;
  --line: rgba(156, 184, 214, .14);
  --panel: rgba(15, 22, 34, .76);
  --blue: #47c2ff;
  --green: #39d895;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #070b12; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background: radial-gradient(circle at 50% -20%, #15304b 0, #09101a 34%, #070b12 67%); }
button { font: inherit; }
.hidden { display: none !important; }

.ambient { position: fixed; width: 440px; height: 440px; border-radius: 50%; filter: blur(120px); opacity: .12; pointer-events: none; z-index: -1; }
.ambient-a { top: 12%; left: -220px; background: #1679dd; }
.ambient-b { right: -260px; bottom: 8%; background: #1aa8ac; }

.topbar { max-width: 1320px; margin: 0 auto; padding: 24px 28px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 13px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(145deg, #3cc7ff, #315cf3); color: #03111b; font-weight: 900; letter-spacing: -.06em; box-shadow: 0 8px 28px rgba(45, 132, 255, .28); }
.brand-mark.large { width: 64px; height: 64px; border-radius: 18px; font-size: 22px; margin: 0 auto 18px; }
.brand strong { display: block; letter-spacing: -.025em; }
.brand small { display: block; margin-top: 2px; color: #6f8096; font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.top-actions { display: flex; align-items: center; gap: 11px; }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 9px 12px; color: #a7b5c8; background: rgba(12, 18, 28, .65); font-size: 12px; font-weight: 700; }
.pill i, .status-list i { width: 7px; height: 7px; border-radius: 50%; background: #ffb55f; box-shadow: 0 0 12px currentColor; }
.pill.online i, .status-list dd.ok i { background: var(--green); }
.pill.error i, .status-list dd.error i { background: #ff647c; }
.button { border: 0; border-radius: 11px; min-height: 42px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: #edf7ff; cursor: pointer; transition: transform .16s ease, opacity .16s ease, background .16s ease; font-size: 13px; font-weight: 800; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .56; transform: none; }
.button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.button.primary { background: linear-gradient(135deg, #38bdff, #336bf6); box-shadow: 0 9px 24px rgba(46, 119, 255, .28); }
.button.ghost { border: 1px solid var(--line); background: rgba(12, 18, 28, .7); }

main { width: min(1264px, calc(100% - 40px)); margin: 0 auto; padding: 12px 0 54px; }
.panel { border: 1px solid var(--line); background: linear-gradient(145deg, rgba(18, 27, 41, .88), rgba(10, 16, 25, .8)); box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 24px 60px rgba(0,0,0,.16); backdrop-filter: blur(18px); }
.hero { min-height: 430px; border-radius: 24px; padding: 46px 48px; display: grid; grid-template-columns: minmax(370px, .8fr) 1.4fr; overflow: hidden; position: relative; }
.hero::after { content: ""; position: absolute; inset: auto -8% -78% 42%; height: 520px; background: radial-gradient(ellipse, rgba(54, 161, 231, .12), transparent 65%); }
.hero-copy { z-index: 2; display: flex; flex-direction: column; justify-content: center; }
.eyebrow { color: #62caff; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.hero .eyebrow { display: flex; align-items: center; gap: 8px; color: #4be0a1; }
.hero h1 { margin: 12px 0 5px; font-size: clamp(31px, 4vw, 52px); line-height: 1; letter-spacing: -.055em; }
.hero-copy > p { margin: 5px 0 28px; color: var(--muted); font-size: 13px; }
.vehicle-specs { display: flex; flex-wrap: wrap; gap: 8px; margin: -18px 0 24px; }
.vehicle-specs > span { display: inline-flex; align-items: center; min-height: 25px; padding: 0 10px; border: 1px solid rgba(151,180,210,.13); border-radius: 999px; background: rgba(4,9,15,.27); color: #8192a7; font-size: 10px; font-weight: 700; }
.paint-spec { gap: 7px; }
.paint-spec i { width: 10px; height: 10px; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; box-shadow: 0 0 12px rgba(255,255,255,.12); }
.hero-stats { display: flex; align-items: center; gap: 25px; }
.hero-stats > div:not(.divider) { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 5px; }
.hero-stats strong { font-size: clamp(49px, 6vw, 76px); line-height: .92; letter-spacing: -.07em; font-weight: 500; }
.hero-stats span { color: #adbbcd; font-size: 18px; }
.hero-stats small { grid-column: 1 / -1; margin-top: 10px; color: #6e7e93; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.hero-stats .divider { width: 1px; height: 58px; background: var(--line); }
.charge-track { width: min(390px, 100%); height: 4px; margin-top: 24px; border-radius: 10px; background: rgba(104, 134, 160, .17); overflow: hidden; }
.charge-track span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #37a9ff, #62dbff); box-shadow: 0 0 14px #48c8ff; transition: width .6s ease; }
.freshness { width: min(420px, 100%); display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; color: #63758b; font-size: 10px; }
.freshness strong { color: #92a4b9; font-weight: 700; }
.car-visual { --car-paint: #28669a; --car-paint-shadow: #10293e; --car-paint-highlight: #91b3cc; --car-glow: #28669a; align-self: center; position: relative; min-width: 0; z-index: 1; }
.car-visual svg { display: block; width: 112%; max-width: 780px; transform: translateX(-4%); overflow: visible; filter: drop-shadow(0 18px 24px rgba(0,0,0,.35)); transition: opacity .3s ease; }
.vehicle-picture { display: none; width: 112%; max-width: 780px; height: 330px; object-fit: contain; transform: translateX(-4%); filter: drop-shadow(0 20px 28px rgba(0,0,0,.42)); }
.car-visual.picture-loaded .vehicle-picture { display: block; }
.car-visual.picture-loaded svg { display: none; }
.car-glow { position: absolute; left: 18%; right: 5%; bottom: 12%; height: 55px; border-radius: 50%; background: var(--car-glow); opacity: .22; filter: blur(40px); transition: background .6s ease; }

.metric-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.metric { min-height: 134px; border-radius: 18px; padding: 24px; display: flex; align-items: flex-start; gap: 18px; }
.metric-icon { flex: 0 0 auto; display: grid; place-items: center; width: 37px; height: 37px; border-radius: 11px; font-weight: 800; }
.metric-icon.blue { color: #5fcbff; background: rgba(50,155,235,.12); }
.metric-icon.green { color: #44dd9e; background: rgba(49,216,143,.12); }
.metric-icon.amber { color: #ffc371; background: rgba(255,178,81,.12); }
.metric-icon.violet { color: #a993ff; background: rgba(142,113,255,.12); }
.metric small { display: block; color: #66768b; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.metric strong { display: block; margin-top: 9px; color: #f0f6ff; font-size: 23px; line-height: 1.05; letter-spacing: -.035em; }
.metric p { margin: 7px 0 0; color: #748399; font-size: 11px; }

.content-grid { display: grid; grid-template-columns: 2fr .82fr; gap: 16px; margin-top: 16px; }
.chart-card, .status-card { min-height: 350px; border-radius: 19px; padding: 25px 27px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.section-head h2 { margin: 7px 0 0; font-size: 19px; letter-spacing: -.03em; }
.segmented { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); background: rgba(4,8,13,.3); border-radius: 10px; }
.segmented button { border: 0; border-radius: 7px; padding: 7px 11px; color: #66768c; background: transparent; font-size: 9px; font-weight: 800; cursor: pointer; }
.segmented button.active { color: #c9edff; background: rgba(54,164,236,.17); }
.chart-wrap { position: relative; height: 250px; margin-top: 20px; }
.chart-wrap canvas { width: 100%; height: 100%; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.status-list { margin: 24px 0; }
.status-list > div { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(148,174,203,.09); padding: 14px 0; }
.status-list dt { color: #7d8da2; font-size: 11px; }
.status-list dd { margin: 0; display: flex; align-items: center; gap: 7px; color: #b9c7d8; font-size: 11px; font-weight: 700; text-align: right; }
.sync-message { border-radius: 11px; padding: 12px 13px; background: rgba(53, 144, 204, .09); color: #81a9c4; font-size: 10px; line-height: 1.5; }
.sync-message.error { background: rgba(210,66,92,.1); color: #ff91a3; }
.footnote { margin: 22px 5px 0; text-align: center; color: #4c5b6d; font-size: 9px; }

.auth-wall { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px; background: rgba(5,8,13,.82); backdrop-filter: blur(15px); }
.auth-card { width: min(390px, 100%); border-radius: 22px; padding: 34px; text-align: center; }
.auth-card h2 { margin: 0 0 10px; }
.auth-card p { margin: 0 0 24px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.auth-card .button { width: 100%; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding: 36px; }
  .car-visual { position: absolute; right: -18%; bottom: 12%; width: 68%; opacity: .72; }
  .hero-copy { max-width: 55%; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .topbar { padding: 17px 18px; }
  .pill, .button.ghost { display: none; }
  .brand small { display: none; }
  .button { padding: 0 12px; }
  main { width: min(100% - 24px, 1264px); padding-top: 2px; }
  .hero { min-height: 510px; padding: 28px 25px; align-items: start; }
  .hero-copy { max-width: 100%; justify-content: flex-start; }
  .hero-copy > p { margin-bottom: 22px; }
  .vehicle-specs { margin-top: -14px; margin-bottom: 18px; }
  .hero-stats strong { font-size: 52px; }
  .car-visual { width: 105%; right: -30%; bottom: 5%; opacity: .82; }
  .freshness { flex-direction: column; gap: 4px; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .metric { min-height: 130px; padding: 18px; gap: 12px; }
  .metric-icon { width: 31px; height: 31px; }
  .metric strong { font-size: 18px; }
  .chart-card, .status-card { padding: 21px 18px; }
  .section-head { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
