/* Kratos XT on the web: the app's near-black, glass and red. */
:root {
  --bg: #0A0B0E; --panel: #121419; --ink: #F2F3F5; --ink-2: #C9CDD3;
  --muted: #9CA3AD; --faint: #6B7280; --red: #FF3B30; --red-soft: rgba(255,59,48,.14);
  --amber: #FFB020; --green: #34C77B; --green-soft: rgba(52,199,123,.14);
  --blue: #4C8DFF; --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.14);
  --glass: rgba(255,255,255,.04); --glass-2: rgba(255,255,255,.07); --radius: 22px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(1100px 560px at 85% -10%, rgba(255,59,48,.10), transparent 60%), var(--bg);
  color: var(--ink); font-family: Outfit, system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--red); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }

/* sign in */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate-card { width: min(420px, 100%); text-align: center; padding: 40px 28px; border-radius: 28px;
  background: linear-gradient(160deg, rgba(255,59,48,.14), var(--glass) 55%); border: 1px solid var(--line-2); }
.gate-card img { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 0 40px rgba(255,59,48,.35); }
.gate-card h1 { font-weight: 500; font-size: 30px; margin: 18px 0 6px; letter-spacing: -.02em; }
.gate-card p { color: var(--muted); margin: 0 0 26px; line-height: 1.5; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 52px; padding: 0 24px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--glass-2); font-weight: 600; transition: transform .15s, background .2s; }
.pill:hover { background: rgba(255,255,255,.1); }
.pill:active { transform: scale(.97); }
.pill.primary { background: var(--ink); color: #0A0B0E; border-color: var(--ink); }
.pill.red { background: var(--red); color: #fff; border-color: var(--red); box-shadow: 0 8px 30px rgba(255,59,48,.35); }
.pill.block { width: 100%; }
.pill:disabled { opacity: .5; cursor: default; }

/* shell */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 16px clamp(16px, 4vw, 40px);
  background: rgba(10,11,14,.72); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 14px; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand .xt { color: var(--red); }
.top .spacer { flex: 1; }
.me { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--red-soft); color: var(--red); font-weight: 600; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--glass); display: grid; place-items: center; }
.icon-btn svg { width: 18px; height: 18px; }
main { padding: 26px clamp(16px, 4vw, 40px) 60px; max-width: 1200px; margin: 0 auto; }
h2.title { font-size: clamp(30px, 4vw, 44px); font-weight: 400; letter-spacing: -.02em; margin: 6px 0 4px; }
.sub { color: var(--muted); margin: 0 0 24px; }

/* garage */
.cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.car { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line-2); padding: 22px; min-height: 190px;
  background: radial-gradient(420px 220px at 90% 120%, rgba(255,59,48,.28), transparent 60%), linear-gradient(180deg, #14171D, #0A0B0E);
  text-decoration: none; display: flex; flex-direction: column; transition: transform .2s, border-color .2s; }
.car:hover { transform: translateY(-3px); border-color: rgba(255,59,48,.45); }
.car .chip { align-self: flex-start; font-size: 12px; color: var(--ink-2); padding: 4px 10px; border-radius: 999px; background: var(--glass-2); border: 1px solid var(--line); }
.car h3 { margin: auto 0 2px; font-size: 26px; font-weight: 500; }
.car .meta { color: var(--muted); font-size: 14px; }
.car .odo { margin-top: 12px; font-variant-numeric: tabular-nums; letter-spacing: .12em; font-size: 15px; }

/* car */
.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); overflow-x: auto; margin: 18px 0 22px; }
.tabs button { flex: 0 0 auto; border: 0; background: transparent; padding: 10px 18px; border-radius: 999px; color: var(--muted); font-weight: 500; }
.tabs button.on { background: var(--ink); color: #0A0B0E; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { border-radius: var(--radius); padding: 18px 20px; background: var(--glass); border: 1px solid var(--line); }
.stat .l { color: var(--muted); font-size: 13px; }
.stat .n { font-size: 28px; font-weight: 400; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .n small { font-size: 14px; color: var(--muted); margin-left: 4px; }
.stat.hero { background: linear-gradient(150deg, rgba(255,59,48,.2), var(--glass) 60%); border-color: rgba(255,59,48,.35); }
.card { border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line); margin-bottom: 18px; overflow: hidden; }
.card h4 { margin: 0; padding: 16px 20px; font-size: 15px; font-weight: 600; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.card h4 .spacer { flex: 1; }
.row { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .d { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.row b { font-weight: 500; display: block; }
.row small { color: var(--muted); }
.row .v { font-variant-numeric: tabular-nums; text-align: right; }
.row .v small { display: block; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.red { background: var(--red-soft); color: #FF8A82; }
.badge.amber { background: rgba(255,176,32,.14); color: var(--amber); }
.badge.green { background: var(--green-soft); color: var(--green); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-size: 14px; }

/* dialog */
dialog { border: 1px solid var(--line-2); border-radius: 26px; background: #121419; color: var(--ink); padding: 0; width: min(460px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
dialog form { padding: 26px; display: grid; gap: 14px; }
dialog h3 { margin: 0 0 4px; font-size: 22px; font-weight: 500; }
label.f { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
label.f input, label.f select { height: 48px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--glass); color: var(--ink); padding: 0 14px; font: inherit; font-size: 16px; }
label.f input:focus, label.f select:focus { outline: 2px solid rgba(255,59,48,.5); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 10px; align-items: center; color: var(--ink-2); }
.actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(30px); opacity: 0; transition: all .3s;
  background: var(--ink); color: #0A0B0E; padding: 12px 20px; border-radius: 999px; font-weight: 500; pointer-events: none; }
#toast.show { opacity: 1; transform: translateX(-50%); }
@media (max-width: 640px) {
  .row { grid-template-columns: 1fr auto; }
  .row .d { grid-column: 1 / -1; }
  .me span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .rise { animation: none; } .car:hover { transform: none; } }

/* Sign-in choices: Apple first, in Apple's white on dark, Google on glass. */
.sign-ins { display: grid; gap: 12px; margin-top: 8px; }
.sign-ins .pill svg { flex: none; }
