/* WhyDrive fare table (owner) and operator price form: shared look. */
:root { --bg:#f4f5f9; --surface:#fff; --fg:#131a2b; --muted:#5b6579; --line:#dbe0ea; --field:#f7f8fb; --brand:#0b2a6b; --brand-ink:#fff; --gold:#c99412; --goldbg:#fff6dc;
  --ok:#1d7a46; --okbg:#e6f4ec; --warn:#a15c00; --warnbg:#fff1db; --bad:#b42318; --badbg:#fdecea; color-scheme:light; }
@media (prefers-color-scheme: dark) { :root { --bg:#0e1320; --surface:#161d2e; --fg:#e8ecf5; --muted:#9ca7be; --line:#2a3349; --field:#10172a; --brand:#93b2ff; --brand-ink:#0e1320;
  --gold:#f2c14e; --goldbg:#2d2410; --ok:#6fd39b; --okbg:#15301f; --warn:#f5b25a; --warnbg:#33230c; --bad:#ff8a80; --badbg:#3a1714; color-scheme:dark; } }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--fg); font:400 16px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; }
button, input, select { font: inherit; color: inherit; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left)) 130px; display: grid; gap: 14px; }
.hidden { display: none !important; }
.brandbar { background: #0b2a6b; color: #fff; }
.brandbar .in { max-width: 880px; margin: 0 auto; padding: calc(12px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-left)) 12px; display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.brandbar img { height: 34px; width: auto; border-radius: 6px; background: #fff; padding: 3px 6px; }
.brandbar .who { font-size: 13px; opacity: .85; text-align: right; }
.brandbar button { background: transparent; border: 1px solid #ffffff66; color: #fff; border-radius: 8px; padding: 6px 10px; font-weight: 700; cursor: pointer; }
.eyebrow { font-weight: 800; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
h1 { margin: 2px 0 4px; font-size: clamp(24px, 6vw, 34px); color: var(--brand); line-height: 1.15; }
h1 input { font: inherit; color: inherit; border: 0; background: transparent; width: 100%; padding: 0; border-bottom: 2px dashed transparent; }
h1 input:hover, h1 input:focus { outline: none; border-bottom-color: var(--line); }
h2 { margin: 0; font-size: 19px; color: var(--brand); }
.muted { color: var(--muted); font-size: 15px; margin: 0; }
.small { font-size: 13px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 10px; min-width: 0; }
.card.feature { border: 2px solid var(--gold); }
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 14px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #111; }
.btn.small { padding: 6px 10px; font-size: 14px; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .5; cursor: default; }
.field { display: grid; gap: 4px; min-width: 0; }
.field > span { font-weight: 700; font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea, .search { width: 100%; min-width: 0; border: 1.5px solid var(--line); background: var(--field); border-radius: 10px; padding: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.msg { padding: 10px 12px; border-radius: 10px; font-size: 15px; }
.msg.err { background: var(--badbg); color: var(--bad); } .msg.ok { background: var(--okbg); color: var(--ok); }
.tabs, .chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.tabs button, .chips button { white-space: nowrap; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 12px; font-weight: 700; font-size: 14px; cursor: pointer; }
.tabs button.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chips button.on { background: var(--goldbg); border-color: var(--gold); color: var(--fg); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar .search { flex: 1 1 200px; }
.head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.head h3 { margin: 0; font-size: 17px; }
.miles { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--brand); white-space: nowrap; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tag { font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--field); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag.off { background: var(--warnbg); color: var(--warn); border-color: transparent; }
.tag.ok { background: var(--okbg); color: var(--ok); border-color: transparent; }
.dest.changed { box-shadow: inset 4px 0 0 var(--ok); }
.check { background: var(--warnbg); color: var(--warn); border-radius: 10px; padding: 8px 10px; font-size: 14px; display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.avg { background: var(--goldbg); border-radius: 10px; padding: 8px 10px; font-size: 14px; display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.row { display: grid; grid-template-columns: 52px repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; }
.row.hub { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row .when { font-weight: 800; font-size: 12px; color: var(--muted); text-transform: uppercase; padding-bottom: 12px; }
.money { display: grid; gap: 3px; min-width: 0; }
.money span { font-weight: 700; font-size: 12px; color: var(--muted); }
.money.ex span { color: var(--gold); }
.money div { position: relative; }
.money div::before { content: "£"; position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.money input { width: 100%; border: 1.5px solid var(--line); background: var(--field); border-radius: 10px; padding: 10px 6px 10px 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.money input:focus, .field input:focus, .search:focus { outline: none; border-color: var(--brand); background: var(--surface); }
.money input.bad { border-color: var(--bad); }
details summary { cursor: pointer; font-weight: 700; color: var(--brand); font-size: 14px; }
details[open] { display: grid; gap: 10px; }
.results { display: grid; gap: 4px; }
.results button { text-align: left; border: 1px solid var(--line); background: var(--field); border-radius: 8px; padding: 8px; font-size: 14px; cursor: pointer; }
.ops { display: grid; gap: 8px; }
.op { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 6px; }
.op .link { font-family: ui-monospace, Menlo, monospace; font-size: 12px; word-break: break-all; color: var(--muted); }
.savebar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 10px max(16px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom)); z-index: 10; }
.savebar .in { max-width: 880px; margin: 0 auto; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.savebar .status { font-size: 14px; color: var(--muted); }
.empty { color: var(--muted); padding: 18px; text-align: center; border: 1px dashed var(--line); border-radius: 14px; }
.progress { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; } .progress i { display: block; height: 100%; background: var(--gold); width: 0; transition: width .2s; }
@media (max-width: 460px) { .row { grid-template-columns: repeat(3, minmax(0, 1fr)); } .row .when { grid-column: 1 / -1; padding: 0; } .grid2 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
