/* A-Taxi Boekingen — phone first, night-drive palette of the website. */
:root {
  --ink: #0F0D0B; --ink-2: #161310; --ink-3: #211C16; --card: #241E18; --line: #3A3128;
  --txt: #ECE5D7; --mut: #A99B83; --gold: #E7A92B; --gold-hi: #F6CE6A; --gold-deep: #B7791A;
  --ok: #6FCF97; --info: #7DB7F0; --warn: #F2C94C; --bad: #EB8A7E; --violet: #C3A6F2;
  --r: 14px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ink); color: var(--txt); }
body {
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%; min-height: 100vh; padding-bottom: calc(72px + var(--safe-b));
}
a { color: var(--gold-hi); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
main { max-width: 760px; margin: 0 auto; padding: 12px 16px 24px; outline: none; }
.loading, .empty { color: var(--mut); text-align: center; padding: 40px 0; }

/* top bar */
.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + var(--safe-t)) 16px 10px; background: rgba(15, 13, 11, .92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--ink-3);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--txt); text-decoration: none; font-weight: 650; font-size: 18px; }
.brand img { border-radius: 8px; }
.icon-btn { background: var(--ink-3); border: 1px solid var(--line); border-radius: 10px; width: 40px; height: 40px; font-size: 20px; cursor: pointer; }
.icon-btn.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .icon-btn.spin { animation: none; opacity: .6; } }

/* bottom tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--ink-2); border-top: 1px solid var(--ink-3); padding-bottom: var(--safe-b);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 10px; font-size: 12px;
  color: var(--mut); text-decoration: none; min-height: 56px;
}
.tabbar a span { font-size: 20px; line-height: 1.1; }
.tabbar a.on { color: var(--gold-hi); }
.tabbar a.add span { color: var(--ink); background: var(--gold); border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; font-weight: 700; }

/* headings + segments */
h1 { font-size: 22px; margin: 8px 0 12px; }
h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); margin: 22px 0 8px; font-weight: 600; }
.seg { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--ink-2); border-radius: 999px; padding: 8px 14px;
  cursor: pointer; white-space: nowrap; min-height: 40px;
}
.seg button.on { background: var(--gold); color: var(--ink); border-color: var(--gold); font-weight: 650; }
.seg .n { display: inline-block; min-width: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: rgba(0,0,0,.25); font-size: 12px; }
.daylabel { color: var(--mut); font-size: 13px; margin: 16px 2px 6px; }

/* booking cards */
.card {
  display: grid; grid-template-columns: 64px 1fr; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 12px; margin-bottom: 10px; color: var(--txt); text-decoration: none;
}
.card:active { background: var(--ink-3); }
.card.is-new { border-color: var(--gold-deep); }
.card .when { text-align: center; border-right: 1px solid var(--line); padding-right: 10px; }
.card .t { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.card .d { font-size: 12px; color: var(--mut); }
.card .route { font-weight: 600; overflow-wrap: anywhere; }
.card .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; font-size: 13px; color: var(--mut); }
.chip { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 650; border: 1px solid currentColor; }
.st-nieuw { color: var(--gold-hi); } .st-bevestigd { color: var(--info); } .st-toegewezen { color: var(--violet); }
.st-voltooid { color: var(--ok); } .st-geannuleerd { color: var(--bad); }
.src { background: var(--ink-3); border-radius: 6px; padding: 1px 7px; color: var(--txt); font-size: 12px; }

/* detail */
.back { display: inline-block; color: var(--mut); text-decoration: none; padding: 6px 0; }
.dhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dhead h1 { margin: 4px 0; }
.big-when { font-size: 26px; font-weight: 750; margin: 6px 0 2px; }
.actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.actions a, .actions button {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px;
  background: var(--ink-3); border: 1px solid var(--line); color: var(--txt); text-decoration: none; font-size: 12px; cursor: pointer; min-height: 64px;
}
.actions .ico { font-size: 20px; }
.actions .disabled { opacity: .35; pointer-events: none; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 14px; }
.row { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .k { color: var(--mut); flex: 0 0 auto; }
.row .v { text-align: right; overflow-wrap: anywhere; }
.statusbar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.statusbar button { min-height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--ink-2); cursor: pointer; font-weight: 600; }
.statusbar button.on { border-color: currentColor; background: var(--ink-3); }
.statusbar button:last-child:nth-child(odd) { grid-column: span 2; }
.hint { color: var(--mut); font-size: 13px; margin: 6px 0; }
.history { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.history li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.history time { color: var(--mut); font-size: 12px; display: block; }
pre.mail { white-space: pre-wrap; background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font: 14px/1.5 system-ui, sans-serif; }
details summary { cursor: pointer; padding: 10px 0; color: var(--gold-hi); }

/* forms */
form.stack, .stack { display: grid; gap: 12px; }
label.f { display: grid; gap: 5px; font-size: 14px; color: var(--mut); }
.f input, .f select, .f textarea {
  width: 100%; background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; min-height: 48px; color: var(--txt);
}
.f textarea { min-height: 84px; resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 50px; padding: 0 18px; border-radius: 12px;
  border: 0; background: var(--gold); color: var(--ink); font-weight: 700; cursor: pointer; text-decoration: none; width: 100%;
}
.btn.ghost { background: var(--ink-3); color: var(--txt); border: 1px solid var(--line); }
.btn.wa { background: #25D366; color: #06210f; }
.btn:disabled { opacity: .5; cursor: default; }
.err { color: var(--bad); min-height: 1.2em; margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* login */
.login { max-width: 380px; margin: 8vh auto 0; text-align: center; }
.login img { border-radius: 20px; }
.login h1 { margin: 16px 0 4px; }
.login form { text-align: left; margin-top: 24px; }

/* agenda */
.week { display: grid; grid-template-columns: 36px repeat(7, 1fr) 36px; gap: 4px; align-items: stretch; margin-bottom: 8px; }
.week button { background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 0; cursor: pointer; min-height: 56px; }
.week .day { display: flex; flex-direction: column; align-items: center; font-size: 12px; color: var(--mut); }
.week .day b { font-size: 17px; color: var(--txt); }
.week .day.on { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.week .day.on b { color: var(--ink); }
.week .day.today b { text-decoration: underline; text-underline-offset: 3px; }
.week .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-top: 3px; }
.week .day.on .dot { background: var(--ink); }
.week .dot.none { background: transparent; }

/* toast */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + var(--safe-b)); z-index: 10;
  background: var(--txt); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 600; max-width: 90vw; box-shadow: 0 6px 24px rgba(0,0,0,.4);
}

@media (min-width: 760px) {
  body { padding-bottom: 0; padding-left: 96px; }
  .tabbar { top: 0; right: auto; width: 96px; grid-template-columns: 1fr; grid-auto-rows: min-content; padding-top: 80px; border-top: 0; border-right: 1px solid var(--ink-3); }
  .top { padding-left: 16px; }
  .toast { bottom: 24px; }
}
