/* Driver portal — "liquid glass", using issajatt.com's own design tokens:
   Manrope body, Bricolage Grotesque headings, blue→teal→green brand gradient,
   soft colour mesh behind frosted white glass. Hex values are fallbacks for
   phones without oklch(); modern browsers use the exact oklch values below. */
:root {
  --radius: 1.25rem;
  --background: #f2f8fc;
  --foreground: #0a1936;
  --primary: #1043a8;
  --teal: #00889b;
  --accent: #20a04e;
  --muted: #e5ecf3;
  --muted-foreground: #505f74;
  --input: #ced9e5;
  --glass-bg: linear-gradient(135deg, rgba(255,255,255,.7), rgba(255,255,255,.35));
  --glass-strong: linear-gradient(135deg, rgba(255,255,255,.85), rgba(255,255,255,.55));
  --glass-border: rgba(255,255,255,.75);
  --glass-shadow: 0 1px 0 0 rgba(255,255,255,.9) inset, 0 -1px 0 0 rgba(16,67,168,.06) inset, 0 20px 50px -20px rgba(16,67,168,.25);
  --gradient-brand: linear-gradient(120deg, #1043a8, #00889b, #20a04e);
  --gradient-mesh: radial-gradient(40rem 30rem at 10% -10%, rgba(128,195,255,.55), transparent 60%),
                   radial-gradient(35rem 30rem at 95% 10%, rgba(131,231,168,.45), transparent 60%),
                   radial-gradient(40rem 35rem at 50% 110%, rgba(145,219,242,.5), transparent 60%);
  --paid: #137a3b; --paid-bg: rgba(32,160,78,.14);
  --part: #8a5a00; --part-bg: rgba(242,170,40,.18);
  --unpaid: #b4232f; --unpaid-bg: rgba(200,16,46,.10);
  --font-body: Manrope, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Bricolage Grotesque", Manrope, ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}
@supports (color: oklch(50% .1 200)) {
  :root {
    --background: oklch(97.5% .008 240);
    --foreground: oklch(22% .06 262);
    --primary: oklch(42% .17 262);
    --teal: oklch(55% .15 205);
    --accent: oklch(62% .16 150);
    --muted: oklch(94% .012 245);
    --muted-foreground: oklch(48% .04 258);
    --input: oklch(88% .02 250);
    --glass-bg: linear-gradient(135deg, oklch(100% 0 0/.7), oklch(100% 0 0/.35));
    --glass-border: oklch(100% 0 0/.75);
    --glass-shadow: 0 1px 0 0 oklch(100% 0 0/.9) inset, 0 -1px 0 0 oklch(42% .17 262/.06) inset, 0 20px 50px -20px oklch(42% .17 262/.25);
    --gradient-brand: linear-gradient(120deg, oklch(42% .17 262), oklch(55% .15 205), oklch(62% .16 150));
    --gradient-mesh: radial-gradient(40rem 30rem at 10% -10%, oklch(80% .12 250/.55), transparent 60%),
                     radial-gradient(35rem 30rem at 95% 10%, oklch(85% .13 155/.45), transparent 60%),
                     radial-gradient(40rem 35rem at 50% 110%, oklch(85% .08 220/.5), transparent 60%);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--background); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--gradient-mesh), var(--background); background-attachment: fixed;
  color: var(--foreground); font: 17px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}
a { color: var(--primary); }
h1, h2, .big { font-family: var(--font-head); letter-spacing: -0.03em; }
h1 { font-size: 32px; font-weight: 800; line-height: 1.1; margin: 8px 0 14px; }
h2 { font-size: 19px; font-weight: 700; margin: 26px 0 10px; letter-spacing: -0.02em; }
h2.m0 { margin: 0 0 8px; }
.muted { color: var(--muted-foreground); }
.small { font-size: 14.5px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- glass ---------- */
.card, .bar, .tabs, table, select, input, button:not(.primary) {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  backdrop-filter: blur(24px) saturate(1.8);
}

/* Header: floating glass capsule with the logo, like issajatt.com's nav */
.bar {
  position: sticky; top: calc(10px + env(safe-area-inset-top)); z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: calc(10px + env(safe-area-inset-top)) 12px 0; padding: 8px 8px 8px 16px;
  border-radius: 999px;
}
.bar .home { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--foreground); }
.bar .logo { display: block; height: 34px; width: auto; }
.bar .app-name { font-family: var(--font-head); font-weight: 800; font-size: 15px; letter-spacing: -0.02em;
  padding-left: 10px; border-left: 1px solid rgba(16,67,168,.18); }
.bar .who { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 600; color: var(--foreground);
  padding: 5px 12px 5px 5px; border-radius: 999px; background: rgba(255,255,255,.6); border: 1px solid var(--glass-border); text-decoration: none; }
.bar .avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800;
  color: #fff; background: var(--gradient-brand); }

main { max-width: 560px; margin: 0 auto; padding: 18px 16px 24px; }

.card { display: block; border-radius: var(--radius); padding: 16px 18px; margin: 0 0 12px; color: inherit; text-decoration: none; position: relative; }
.card.link { transition: transform .15s ease; }
.card.link:active { transform: scale(.985); }
@media (hover: hover) { .card.link:hover { transform: translateY(-1px); } }
.row, .split { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.right { text-align: right; }

/* Hero: the brand gradient as tinted liquid glass */
.card.hero {
  background: var(--gradient-brand); color: #fff; border: 1px solid rgba(255,255,255,.35); padding: 22px 22px 20px;
  box-shadow: 0 1px 0 0 rgba(255,255,255,.45) inset, 0 24px 60px -24px rgba(16,67,168,.55);
  overflow: hidden;
}
.card.hero::before { /* specular highlight */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 70% at 10% -20%, rgba(255,255,255,.45), transparent 55%),
              linear-gradient(180deg, rgba(255,255,255,.16), transparent 40%);
}
.card.hero > * { position: relative; }
.card.hero .muted { color: rgba(255,255,255,.88); }
.label { margin: 0; font-size: 14.5px; font-weight: 600; opacity: .92; }
.big { margin: 4px 0 6px; font-size: 46px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.05; }
.small-hero .big { font-size: 36px; }

/* Status chips */
.status { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 13px; font-weight: 700;
  border: 1px solid rgba(255,255,255,.7); }
.s-paid { background: var(--paid-bg); color: var(--paid); }
.s-partly-paid { background: var(--part-bg); color: var(--part); }
.s-unpaid { background: var(--unpaid-bg); color: var(--unpaid); }
.card.hero .status { background: rgba(255,255,255,.92); }

.back { margin: 4px 0 0; font-size: 15px; font-weight: 600; }
.back a { text-decoration: none; }

/* Tables live on glass too */
table { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: var(--radius); overflow: hidden; font-size: 16px; }
th, td { padding: 11px 14px; border-bottom: 1px solid rgba(16,67,168,.08); text-align: left; }
th { font-size: 12.5px; font-weight: 700; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tfoot td, tr.strong td { font-weight: 800; background: rgba(255,255,255,.45); }
tr.strong td { border-top: 1px solid rgba(16,67,168,.15); }
tr.neg td.n { color: var(--unpaid); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.stats dt { font-size: 13px; color: var(--muted-foreground); font-weight: 600; }
.stats dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; font-family: var(--font-head); font-size: 18px; }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0 0 8px; }
.details dt { color: var(--muted-foreground); }
.details dd { margin: 0; overflow-wrap: anywhere; font-weight: 600; }

/* Forms */
label { display: block; font-size: 15px; font-weight: 600; margin: 10px 0 6px; }
select, input { width: 100%; font: inherit; padding: 13px 16px; border-radius: 16px; color: var(--foreground); outline: none; }
select:focus, input:focus { border-color: var(--primary); box-shadow: var(--glass-shadow), 0 0 0 4px rgba(16,67,168,.15); }
input.code { font-size: 30px; letter-spacing: 10px; text-align: center; font-variant-numeric: tabular-nums; font-family: var(--font-head); font-weight: 800; }
.filter { margin: 0 0 14px; }
button { font: inherit; font-weight: 600; padding: 14px 18px; border-radius: 999px; color: var(--foreground); cursor: pointer; margin-top: 12px; }
button.primary, a.button {
  display: flex; justify-content: center; align-items: center; gap: 8px; width: 100%;
  background: var(--gradient-brand); color: #fff; border: 0; font-weight: 700;
  box-shadow: 0 1px 0 0 rgba(255,255,255,.45) inset, 0 16px 36px -16px rgba(16,67,168,.6);
  text-decoration: none; padding: 15px 18px; border-radius: 999px;
}
button.primary:active, a.button:active { transform: scale(.985); }
a.button { margin-top: 22px; }
a.button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
button.wide { width: 100%; }
button.quiet { color: var(--muted-foreground); }
.error { color: var(--unpaid); background: var(--unpaid-bg); border: 1px solid rgba(255,255,255,.7); padding: 11px 14px; border-radius: 14px; font-weight: 600; }

.pill { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--part-bg); color: var(--part); vertical-align: middle; }
.card.dev { border-style: dashed; border-color: rgba(16,67,168,.25); }
.privacy { margin-top: 26px; }
.welcome { text-align: center; margin: 22px 0 6px; }
.welcome img { width: min(240px, 66%); height: auto; filter: drop-shadow(0 12px 24px rgba(16,67,168,.18)); }
.welcome h1 { margin-top: 18px; }
.grad { background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Bottom tab bar: floating liquid-glass capsule (iOS style) */
.tabs {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20;
  max-width: 520px; margin: 0 auto; display: flex; padding: 6px; border-radius: 999px;
  background: var(--glass-strong);
}
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 7px 2px 6px;
  border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--muted-foreground); text-decoration: none; min-height: 54px;
  transition: background .2s ease, color .2s ease; }
.tabs a.on { color: var(--primary); background: rgba(255,255,255,.88);
  box-shadow: 0 1px 0 0 rgba(255,255,255,.95) inset, 0 6px 16px -8px rgba(16,67,168,.35); }
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (prefers-reduced-transparency: reduce) {
  .card, .bar, .tabs, table, select, input, button:not(.primary) {
    -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255,255,255,.96);
  }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
