/* Taxi Lazar · Yellow, charcoal and warm white */
:root {
  color-scheme: light;
  --bg: #f5f5f0;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --surface-3: #f7f7f3;
  --line: #e6e6de;
  --line-strong: #d3d3c9;
  --text: #20211e;
  --text-2: #65665e;
  --text-3: #74756b;
  --accent: #f5cb18;
  --accent-soft: #fff6c7;
  --accent-line: #e1c24a;
  --info: #44483f;
  --ok: #237149;
  --ok-bg: #e9f5ec;
  --warn: #806000;
  --warn-bg: #fff7d6;
  --bad: #b9362d;
  --bad-bg: #fceeea;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --shadow-1: 0 2px 3px rgba(20, 20, 10, .02);
  --shadow-2: 0 4px 14px rgba(20, 20, 10, .03);
  --shadow-3: 0 20px 60px rgba(20, 20, 10, .15);
  --sans: 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'Cascadia Mono', ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --fast: 120ms var(--ease);
  --slow: 260ms var(--ease);
}
/* ------------------------------------------------------------- Grundlage */
* { box-sizing: border-box; }

/* Muss vor allen Layoutregeln stehen, die display setzen.
   Ohne das ueberstimmt z. B. ".shell { display: flex }" die
   Voreinstellung des Browsers fuer [hidden] - die Seite waere dann
   trotz "hidden" sichtbar. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--sans);
  font-feature-settings: "cv02", "cv03", "cv04", "ss01";
  -webkit-font-smoothing: antialiased;
}

/* Weicher Lichtschein im Hintergrund, damit die Flaeche nicht flach wirkt */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: none;
}

h1, h2, h3 { margin: 0; line-height: 1.22; font-weight: 640; letter-spacing: -.015em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-3); font-weight: 620; margin-bottom: .7rem;
}
a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: var(--accent-soft); color: var(--text); }

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--line-strong); border-radius: 99px;
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ---------------------------------------------------------------- Login */
.login-wrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}

.login {
  width: 100%;
  max-width: 330px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-3);
  padding: 2.2rem 1.6rem 1.6rem;
  text-align: center;
}

.login .logo {
  width: 58px; height: 58px;
  margin: 0 auto 1.1rem;
  border-radius: 17px;
  background: linear-gradient(145deg, var(--accent), #e08c00);
  color: #17120a;
  display: grid; place-items: center;
  font-size: 1.65rem; font-weight: 800;
  box-shadow: 0 8px 22px rgba(255, 176, 32, .28);
}
.login h1 { font-size: 1.35rem; }
.login p { color: var(--text-3); margin: .3rem 0 1.6rem; font-size: .88rem; }

.pin-label {
  display: block;
  font-size: .9rem; font-weight: 560;
  color: var(--text-2);
  margin-bottom: .5rem;
}

#pin {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: .5em;
  text-indent: .5em;          /* optischer Ausgleich der Sperrung */
  padding: .8rem .5rem;
  min-height: 58px;
  font-variant-numeric: tabular-nums;
  /* 16px oder groesser, sonst zoomen iOS beim Fokussieren */
}
#pin::placeholder { letter-spacing: .5em; text-indent: .5em; opacity: .35; }

.btn.block {
  width: 100%;
  justify-content: center;
  margin-top: .7rem;
  padding: .75rem 1rem;
  font-size: .98rem;
  min-height: 48px;          /* bequeme Trefferflaeche auf dem Handy */
}

.msg { min-height: 1.3rem; margin-top: .9rem; font-size: .87rem; color: var(--bad); }
.msg.ok { color: var(--ok); }

/* --------------------------------------------------------------- Layout */
.shell { position: relative; z-index: 1; min-height: 100dvh; display: flex; flex-direction: column; }

header.top {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--line);
}

.top-in {
  max-width: 1240px; margin: 0 auto;
  padding: .65rem 1.1rem;
  display: flex; align-items: center; gap: 1rem;
}

/* Markenbereich ist ein Link zur Tankungsliste. Eigene Farbe, sonst
   wuerde die globale Regel fuer "a" den Text gelb faerben. */
.brand {
  display: flex; align-items: center; gap: .65rem;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--r-sm);
  padding: .15rem .3rem .15rem .15rem;
  margin-left: -.15rem;
  transition: opacity var(--fast), transform var(--fast);
}
.brand:hover { text-decoration: none; opacity: .82; }
.brand:active { transform: scale(.99); }
.brand .mark {
  width: 34px; height: 34px; flex: none;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent), #e08c00);
  color: #17120a;
  display: grid; place-items: center;
  font-weight: 800; font-size: .95rem;
  box-shadow: 0 4px 14px rgba(255, 176, 32, .25);
  transition: transform var(--fast), box-shadow var(--fast);
}
.brand:hover .mark {
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(255, 176, 32, .38);
}
.brand b { font-weight: 680; letter-spacing: -.01em; white-space: nowrap; }
.brand small { display: block; color: var(--text-3); font-size: .72rem; font-weight: 500; letter-spacing: 0; }

nav { display: flex; gap: .3rem; margin-left: auto; align-items: center; }

nav a, .tab {
  color: var(--text-2);
  padding: .45rem .85rem;
  border-radius: 99px;
  font-size: .88rem; font-weight: 560;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background var(--fast), color var(--fast), border-color var(--fast);
  display: inline-flex; align-items: center; gap: .4rem;
}
nav a:hover, .tab:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
nav a.on {
  background: var(--accent-soft); color: var(--accent);
  border-color: var(--accent-line);
}
nav a svg { width: 16px; height: 16px; }

main { flex: 1; max-width: 1240px; width: 100%; margin: 0 auto; padding: 1.4rem 1.1rem 4rem; }

footer {
  text-align: center; color: var(--text-3); font-size: .78rem;
  padding: 1.2rem 1rem 2rem;
}

/* ------------------------------------------------------------ Bausteine */
.bar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.bar .grow { flex: 1; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  padding: 1.15rem 1.2rem;
  margin-bottom: 1rem;
  position: relative;
}
.card::after {
  content: ""; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.card > h3:first-child, .card > h2:first-child { margin-top: 0; }
.card p.lead { color: var(--text-2); font-size: .87rem; margin: -.2rem 0 1rem; }

.note {
  background: var(--warn-bg); color: var(--warn);
  border: 1px solid var(--accent-line);
  border-radius: var(--r);
  padding: .65rem .9rem; font-size: .87rem; margin-bottom: 1rem;
  display: flex; gap: .55rem; align-items: flex-start;
}
.note b { color: inherit; }
.note code {
  font-family: var(--mono); font-size: .82em;
  background: rgba(0, 0, 0, .22); padding: .08em .35em; border-radius: 4px;
}
.note.info { background: var(--surface); color: var(--text-2); border-color: var(--line); }
.note.bad { background: var(--bad-bg); color: var(--bad); border-color: rgba(255, 122, 112, .3); }
.note.ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(61, 220, 151, .3); }

/* Schaltflaechen */
.btn, button.btn {
  font-family: inherit; font-size: .88rem; font-weight: 560;
  padding: .5rem .85rem;
  display: inline-flex; align-items: center; gap: .4rem;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface-3);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--fast), border-color var(--fast), transform var(--fast), color var(--fast);
  white-space: nowrap;
}
.btn:hover { background: var(--line); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.btn.primary {
  background: var(--accent);
  color: #17120a; border-color: transparent; font-weight: 640;
  box-shadow: none;
}
.btn.primary:hover { filter: brightness(1.07); }

.btn.danger { color: var(--bad); border-color: rgba(255, 122, 112, .3); }
.btn.danger:hover { background: var(--bad-bg); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.sm { padding: .3rem .6rem; font-size: .8rem; }

/* Formularfelder */
input, select, textarea {
  font-family: inherit; font-size: .9rem;
  padding: .55rem .75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface-3);
  color: var(--text);
  width: 100%;
  transition: border-color var(--fast), box-shadow var(--fast);
}
input:hover, select:hover { border-color: var(--text-3); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder { color: var(--text-3); }
input[type="search"] { min-width: 200px; flex: 1; }
select {
  appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239fb0c3' d='M2.5 4.5L6 8l3.5-3.5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .6rem center;
}
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
label.check {
  display: inline-flex; align-items: center; gap: .55rem;
  cursor: pointer; font-size: .85rem; color: var(--text-2);
}

.field-row { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.feld-block label {
  display: block; font-size: .76rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-3); margin-bottom: .35rem;
}
.feld-block label .pflicht { color: var(--accent); }
.feld-block .hilfe { font-size: .78rem; color: var(--text-3); margin-top: .3rem; }
.feld-block.err input, .feld-block.err select { border-color: var(--bad); }
.feld-block .err-msg { font-size: .78rem; color: var(--bad); margin-top: .3rem; }

/* ----------------------------------------------------------------- KPIs */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: .8rem;
  margin-bottom: 1.1rem;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: .95rem 1rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--fast), border-color var(--fast);
}
.kpi:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.kpi .k {
  font-size: .72rem; font-weight: 620; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .09em;
  display: flex; align-items: center; gap: .4rem;
}
.kpi .k svg { width: 14px; height: 14px; opacity: .7; }
.kpi .v {
  font-size: 1.65rem; font-weight: 700; line-height: 1.15;
  margin: .3rem 0 .1rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.kpi .u { font-size: .79rem; color: var(--text-3); }
.kpi.hero {
  background: var(--accent);
  border-color: transparent;
  box-shadow: none;
}
.kpi.hero .k, .kpi.hero .u { color: rgba(23, 18, 10, .68); }
.kpi.hero .v { color: #17120a; }

/* -------------------------------------------------------------- Tabellen */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -1.2rem;
  padding: 0 1.2rem;
}
table { border-collapse: collapse; width: 100%; font-size: .875rem; }
th, td {
  padding: .55rem .6rem;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--text-3); font-weight: 620; font-size: .72rem;
  text-transform: uppercase; letter-spacing: .07em;
  position: sticky; top: 0;
  background: var(--surface);
  z-index: 1;
}
th:first-child, td:first-child { text-align: left; }
th.l, td.l { text-align: left; }
td { font-variant-numeric: tabular-nums; color: var(--text); }
tbody tr { transition: background var(--fast); }
tbody tr:hover { background: var(--surface-3); }
tbody tr.clickable { cursor: pointer; }
tfoot td {
  font-weight: 700; border-top: 1.5px solid var(--line-strong);
  border-bottom: none; color: var(--text);
}

.pill {
  display: inline-block; padding: .12rem .55rem; border-radius: 99px;
  font-size: .75rem; font-weight: 620; letter-spacing: .01em;
  white-space: nowrap;
}
.pill.gut { background: var(--ok-bg); color: var(--ok); }
.pill.mittel { background: var(--warn-bg); color: var(--warn); }
.pill.hoch { background: var(--bad-bg); color: var(--bad); }
.pill.neutral { background: var(--surface-3); color: var(--text-2); }

.tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.tag {
  font-size: .73rem; padding: .12rem .45rem; border-radius: 5px;
  background: var(--warn-bg); color: var(--warn);
  display: inline-block;
}
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.tag.info { background: var(--surface-3); color: var(--text-3); }

/* ---------------------------------------------------------------- Liste */
.rows { display: grid; gap: .55rem; }

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .2rem 1rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-1);
  padding: .8rem 1rem;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font: inherit; color: inherit;
  transition: transform var(--fast), border-color var(--fast), box-shadow var(--fast);
}
.row:hover {
  border-color: var(--accent-line);
  transform: translateX(3px);
  box-shadow: var(--shadow-2);
}
.row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row.flagged { border-left: 3px solid var(--accent); }

.row .who { font-weight: 640; letter-spacing: -.01em; }
.row .when { font-size: .81rem; color: var(--text-3); }
.row .val { text-align: right; font-variant-numeric: tabular-nums; }
.row .big { font-size: 1.2rem; font-weight: 700; letter-spacing: -.015em; }
.row .small { font-size: .8rem; color: var(--text-2); }
.row .actions { display: flex; gap: .35rem; justify-content: flex-end; margin-top: .35rem; }

/* --------------------------------------------------------------- Detail */
.detail-top {
  display: flex; align-items: center; gap: .7rem;
  flex-wrap: wrap; margin-bottom: .9rem;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .7rem;
}
.feld {
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: .6rem .75rem;
}
.feld .k {
  font-size: .71rem; font-weight: 620; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .07em;
}
.feld .v {
  font-weight: 620; font-variant-numeric: tabular-nums;
  word-break: break-word; margin-top: .15rem;
}
.feld .v.mono { font-family: var(--mono); font-size: .78rem; font-weight: 500; }

#karte {
  height: 360px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface-3);
  z-index: 0;
}
.leaflet-container {
  font: inherit;
  background: var(--surface-3);
  border-radius: var(--r);
}
.leaflet-popup-content-wrapper, .leaflet-popup-tip {
  background: var(--surface-2); color: var(--text);
  box-shadow: var(--shadow-3);
}
.leaflet-popup-content { color: var(--text); }
.leaflet-bar a {
  background: var(--surface-2) !important;
  color: var(--text) !important;
  border-color: var(--line) !important;
}
.leaflet-bar a:hover { background: var(--surface-3) !important; }
.leaflet-control-attribution {
  background: rgba(10, 14, 21, .82) !important;
  color: var(--text-3) !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a { color: var(--text-2) !important; }

.map-links { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .7rem; font-size: .85rem; }

/* --------------------------------------------------------------- Dialog */
dialog {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--text);
  padding: 0;
  max-width: 640px; width: calc(100% - 2rem);
  box-shadow: var(--shadow-3);
}
dialog::backdrop {
  background: rgba(3, 6, 11, .68);
  backdrop-filter: blur(3px);
}
.dlg-head {
  padding: 1.1rem 1.3rem .8rem;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: .6rem;
}
.dlg-head h2 { margin: 0; flex: 1; font-size: 1.05rem; }
.dlg-body { padding: 1.1rem 1.3rem; max-height: 66dvh; overflow-y: auto; }
.dlg-foot {
  padding: .9rem 1.3rem;
  border-top: 1px solid var(--line);
  display: flex; gap: .6rem; justify-content: flex-end;
  flex-wrap: wrap;
}
.dlg-foot .grow { flex: 1; }

.toast-wrap {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 1.4rem; z-index: 90;
  display: flex; flex-direction: column; gap: .5rem;
  align-items: center;
  width: calc(100% - 2rem); max-width: 460px;
}
.toast {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--ok);
  border-radius: var(--r);
  box-shadow: var(--shadow-3);
  padding: .7rem .9rem;
  font-size: .88rem;
  display: flex; gap: .6rem; align-items: flex-start;
  animation: rein .28s var(--ease);
}
.toast.bad { border-left-color: var(--bad); }
.toast.warn { border-left-color: var(--accent); }
.toast .ico { flex: none; font-weight: 700; }
.toast.ok .ico { color: var(--ok); }
.toast.bad .ico { color: var(--bad); }
.toast.warn .ico { color: var(--accent); }

@keyframes rein {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes aus {
  to { opacity: 0; transform: translateY(8px); }
}

.spinner {
  display: inline-block; width: 15px; height: 15px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 3rem 1rem; color: var(--text-3); }
.empty svg { width: 40px; height: 40px; opacity: .35; margin-bottom: .6rem; }

.chart { width: 100%; height: 220px; display: block; }
.chart-wrap { overflow-x: auto; margin: 0 -1.2rem; padding: 0 1.2rem; }

.hint { color: var(--text-3); font-size: .82rem; margin: .8rem 0 0; }
.mono { font-family: var(--mono); }

/* Taxi identity and spacious workspace */
svg { width: 20px; height: 20px; flex-shrink: 0; }
h1 { font-size: clamp(1.8rem, 3vw, 2.55rem); font-weight: 750; letter-spacing: -.045em; }
header.top { background: #191a17; color: white; border-bottom: 4px solid var(--accent); backdrop-filter: none; }
.top-in { max-width: 1280px; padding: 1rem 2rem; min-height: 88px; }
.brand { color: white; gap: .8rem; }
.brand b { font-size: 1.15rem; letter-spacing: -.01em; }
.brand small { color: #aaa99f; font-size: .7rem; }
.brand .mark, .taxi-sign { width: 62px; height: 35px; background: var(--accent); border-radius: 5px; color: #191a17; font-size: 17px; font-weight: 900; letter-spacing: .02em; box-shadow: none; }
nav { gap: .5rem; }
nav a { color: #c4c4ba; border-radius: 7px; padding: .65rem 1rem; }
nav a:hover { color: white; background: #30312b; }
nav a.on { color: #191a17; background: var(--accent); border-color: var(--accent); }
.brand-logo { display: block; width: 44px; height: 44px; object-fit: contain; border-radius: 8px; flex: none; }
main { max-width: 1280px; padding: 2.5rem 2rem 4rem; }
footer { border-top: 1px solid var(--line); padding: 1.4rem; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .4rem 0 2rem; }
.eyebrow { font-size: .68rem; font-weight: 750; letter-spacing: .16em; color: var(--text-2); margin: 0 0 .7rem; }
.page-heading h1 span, .login-copy h2 span { color: #d8b000; }
.page-description { margin: .65rem 0 0; font-size: .95rem; color: var(--text-2); }
.workspace-badge { padding: .45rem .8rem; border: 1px solid var(--line-strong); border-radius: 6px; font-size: .75rem; color: var(--text-2); white-space: nowrap; }
.workspace-badge::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: .5rem; border-radius: 50%; background: var(--ok); }
.btn { min-height: 42px; border-radius: 7px; background: white; padding: .6rem .95rem; font-weight: 600; }
.btn.sm { min-height: 36px; }
.btn:hover { background: #f3f3ec; }
.btn.primary:hover { background: #ebbe0d; filter: none; }
.filter-bar { background: white; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 1.3rem; }
.filter-bar input { min-width: 160px; flex: 2; }
.filter-bar select { width: auto; min-width: 170px; flex: 1; }
.filter-bar .grow { display: none; }
.filter-bar input, .filter-bar select { min-height: 42px; }
.btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-line); }
.kpis { gap: 1rem; margin-bottom: 2rem; }
.kpi { padding: 1.35rem; border-radius: 12px; min-width: 0; }
.kpi .k { color: var(--text-2); letter-spacing: .06em; }
.kpi .k svg { width: 18px; height: 18px; }
.kpi .v { font-size: clamp(1.5rem, 2.8vw, 2rem); margin: .85rem 0 .3rem; overflow-wrap: anywhere; }
.kpi.hero .k, .kpi.hero .u { color: #4c4214; }
.list-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 0 0 1rem; }
.list-heading h2 { font-size: 1.1rem; }
.list-heading > span { font-size: .78rem; color: var(--text-3); }
.rows { gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: white; }
.row { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 1.1rem 1.4rem; gap: 1rem; }
.row:last-child { border-bottom: 0; }
.row:hover { transform: none; background: #fffcef; box-shadow: inset 4px 0 var(--accent); }
.row .who { font-size: 1rem; }
.row .who::before { content: ''; display: inline-block; width: 8px; height: 8px; background: var(--accent); border-radius: 2px; margin-right: .65rem; }
.row .when { display: inline-block; margin: .25rem 0 0 1.15rem; }
.row .big { font-size: 1.25rem; }
.row .small { line-height: 1.8; }
.card { box-shadow: none; padding: 1.5rem; margin-bottom: 1.4rem; }
.card h3 { color: var(--text-2); }
.card::after { display: none; }
.analysis-hint { margin: .5rem 0 1.8rem; max-width: 78ch; }
th { background: #f7f7f2; }
th, td { padding: .85rem .75rem; }
td a { text-decoration: underline; text-underline-offset: 3px; }
.table-wrap, .chart-wrap { margin: 0; padding: 0; }
.location-field { display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; }
.location-field .btn { white-space: normal; text-align: left; }
.dlg-head, .dlg-foot { background: #fafaf6; }
.dlg-head .btn { font-size: 1.4rem; }

/* Entry screen */
.login-wrap { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); padding: 0; background: #fafaf6; }
.login-intro { min-height: 100dvh; background: #191a17; color: white; padding: clamp(2rem, 6vw, 6rem); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-intro { width: 100%; }
.analysis-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.login-intro::after { content: ''; position: absolute; height: 12px; bottom: 0; left: 0; right: 0; background: repeating-linear-gradient(90deg, var(--accent) 0 18px, #191a17 18px 36px); }
.login-brand { display: flex; align-items: center; gap: 1rem; font-size: 1.3rem; font-weight: 750; letter-spacing: .16em; }
.login-brand b { font-size: 1.15rem; letter-spacing: -.01em; }
.login-brand small { display: block; color: #aaa99f; font-size: .75rem; font-weight: 500; letter-spacing: 0; }
.taxi-sign { display: grid; place-items: center; }
.login-copy { margin: 5rem 0; max-width: 490px; }
.login-copy .eyebrow { color: var(--accent); }
.login-copy h2 { font-size: clamp(2.5rem, 4.2vw, 4.5rem); font-weight: 750; letter-spacing: -.05em; line-height: 1.12; }
.login-copy h2 span { color: var(--accent); }
.login-copy > p:last-of-type { color: #b6b7aa; max-width: 36ch; margin: 1.6rem 0 2.5rem; font-size: 1rem; line-height: 1.8; }
.login-features { display: flex; gap: 1.5rem; flex-wrap: wrap; padding-top: 1.3rem; border-top: 1px solid #3c3d35; font-size: .75rem; color: #dfdfd3; }
.login-intro-foot { display: flex; justify-content: space-between; gap: 1rem; color: #8e9082; font-size: .6rem; letter-spacing: .13em; }
.login { width: calc(100% - 3rem); max-width: 370px; background: transparent; border: 0; border-radius: 0; box-shadow: none; text-align: left; padding: 2rem 0; }
.login .logo { width: 56px; height: 56px; border-radius: 12px; background: var(--accent); margin: 0 0 2rem; box-shadow: none; }
.login .logo svg { width: 32px; height: 32px; }
.login .eyebrow { margin: 0 0 .65rem; font-size: .65rem; }
.login h1 { font-size: 2rem; font-weight: 750; letter-spacing: -.035em; }
.login > p:not(.eyebrow) { color: var(--text-2); margin: .8rem 0 2rem; line-height: 1.7; }
.pin-label { color: var(--text); font-size: .8rem; }
#pin { background: white; border-radius: 8px; }
.login .btn.block { border-radius: 8px; }
.login-security { padding-top: 1.5rem; margin-top: 1rem; border-top: 1px solid var(--line); font-size: .73rem; color: var(--text-3); text-align: center; }

@media (max-width: 900px) {
  .filter-bar input { flex-basis: 50%; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-intro { padding: 2.5rem; }
  .login-features { gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 640px) {
  main { padding: 1rem .8rem 3rem; }
  .top-in { padding: .6rem .8rem; gap: .5rem; flex-wrap: wrap; }
  nav { margin-left: 0; width: 100%; }
  nav a { flex: 1; justify-content: center; padding: .45rem .5rem; }
  .brand small { display: block; }
  .table-wrap, .chart-wrap { margin: 0 -.8rem; padding: 0 .8rem; }
  .kpis { grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: .6rem; }
  .kpi .v { font-size: 1.4rem; }
  .card { padding: 1rem; }
  .dlg-body { padding: 1rem; }
  .login-wrap { grid-template-columns: 1fr; align-content: start; }
  .login-intro { min-height: auto; padding: 1.5rem; }
  .login-copy { margin: 2.2rem 0 1.2rem; }
  .login-copy h2 { font-size: 2.1rem; }
  .login-copy > p:last-of-type, .login-features, .login-intro-foot { display: none; }
  .login { max-width: 370px; padding: 2rem 0; }
  .login .logo { display: none; }
  .top-in { padding: .8rem 1rem; }
  nav { gap: .4rem; }
  main { padding: 1.5rem 1rem 3rem; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 1.5rem; }
  .page-heading h1 { font-size: 1.85rem; }
  .workspace-badge { display: none; }
  .filter-bar { gap: .6rem; padding: .8rem; }
  .filter-bar input { flex-basis: 100%; min-width: 0; }
  .filter-bar select { min-width: 0; width: 100%; flex-basis: 100%; }
  .filter-bar .btn { flex: 1; justify-content: center; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .kpi { padding: 1rem; }
  .kpi .k { font-size: .65rem; }
  .kpi .v { margin-top: .6rem; }
  .list-heading { align-items: flex-start; flex-direction: column; gap: .3rem; }
  .row { padding: 1rem; gap: .5rem; grid-template-columns: minmax(0, 1fr) auto; }
  .row .who { overflow-wrap: anywhere; }
  .row .when { margin-left: 0; font-size: .72rem; }
  .row .small { font-size: .72rem; }
  .table-wrap, .chart-wrap { margin: 0; padding: 0; }
  .field-row { grid-template-columns: 1fr; }
  .dlg-foot { padding: .8rem; gap: .4rem; }
}
