/* GERZMO app styles — mobile first, no external fonts or frameworks.
   Colours match the website (src/styles.css). */
:root {
  --bg: #0b0f14; --bg-2: #0f151d; --card: #141c26; --card-2: #1a2430; --line: #243142;
  --text: #f2f5f8; --muted: #a9b5c2; --accent: #22d3ee; --accent-ink: #062027;
  --warn-bg: #3b2a05; --warn: #fcd34d; --ok: #4ade80; --danger: #f87171;
  --radius: 14px; --tabbar-h: 64px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5; font-size: 1rem;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  overflow-wrap: break-word;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
a { color: var(--accent); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; }
.skip-link:focus { top: 8px; }
[hidden] { display: none !important; }

.demo-banner {
  background: var(--warn-bg); color: var(--warn); font-size: .85rem; padding: 8px 16px;
  padding-top: calc(8px + env(safe-area-inset-top)); border-bottom: 1px solid #5a430c;
}
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 16px; background: rgba(11, 15, 20, .94); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: .08em; }
.brand img { border-radius: 7px; }

main { display: block; max-width: 640px; margin: 0 auto; padding: 16px; outline: none; }
.pad { padding: 16px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg-2); border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: .75rem; min-height: 44px;
}
.tabbar svg { width: 24px; height: 24px; fill: currentColor; }
.tabbar a[aria-current="page"] { color: var(--accent); font-weight: 700; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px;
  padding: 12px 18px; border-radius: 12px; border: 0; font: inherit; font-weight: 700; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; width: 100%;
}
.btn-small { min-height: 36px; padding: 6px 12px; width: auto; font-size: .85rem; }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid #5b2a2a; }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--card-2); color: var(--muted); cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; margin-top: 12px; }
.btn-row .btn { flex: 1; }
.back { display: inline-block; margin-bottom: 10px; text-decoration: none; font-weight: 600; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.card-link { display: block; color: inherit; text-decoration: none; }
.card-link:hover, .card-link:focus-visible { border-color: var(--accent); }
.car-art { background: var(--card-2); border-radius: 10px; margin-bottom: 10px; aspect-ratio: 16 / 7; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.car-art svg { width: 78%; height: auto; }
.car-art img { width: 100%; height: 100%; object-fit: cover; }
.car-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.car-title { font-weight: 800; font-size: 1.05rem; margin: 0; }
.meta { color: var(--muted); font-size: .9rem; margin: 2px 0 0; }
.price { font-weight: 700; margin-top: 8px; }
.placeholder { display: inline-block; border: 1px dashed var(--warn); color: var(--warn); background: rgba(252, 211, 77, .06); border-radius: 6px; padding: 1px 6px; font-weight: 600; font-size: .9rem; }

.tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .02em; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.tag-example { background: #2a2140; color: #c4b5fd; }
.tag-mine { background: #0d3340; color: var(--accent); }
.tag-demo { background: var(--warn-bg); color: var(--warn); }
.days { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.day { font-size: .72rem; padding: 2px 7px; border-radius: 6px; background: var(--card-2); color: var(--muted); }
.day.on { background: #0d3340; color: var(--accent); }

.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.filters .full { grid-column: 1 / -1; }
.result-count { color: var(--muted); font-size: .9rem; margin: 0 0 10px; }

label, .label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.hint { color: var(--muted); font-size: .82rem; margin: 4px 0 0; font-weight: 400; }
input, select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
}
textarea { min-height: 80px; resize: vertical; }
input[type="checkbox"] { width: 22px; min-height: 22px; height: 22px; accent-color: var(--accent); flex: none; margin: 1px 0 0; }
input[type="file"] { padding: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-bottom: 10px; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0 0 14px; }
legend { font-weight: 600; font-size: .9rem; padding: 0 4px; }
.day-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.day-picks label { display: flex; align-items: center; gap: 6px; font-weight: 500; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; margin: 0; }
.day-picks input { width: 18px; height: 18px; min-height: 18px; }
.error { color: var(--danger); font-size: .88rem; margin: 6px 0 0; }
.form-errors { border: 1px solid #5b2a2a; background: #2a1414; color: #fecaca; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
[aria-invalid="true"] { border-color: var(--danger); }

.summary { width: 100%; border-collapse: collapse; font-size: .95rem; }
.summary th, .summary td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.summary th { color: var(--muted); font-weight: 500; width: 42%; padding-right: 10px; }
.notice { border-left: 4px solid var(--warn); background: var(--warn-bg); color: #fde68a; border-radius: 8px; padding: 10px 12px; margin: 12px 0; font-size: .92rem; }
.notice-info { border-left-color: var(--accent); background: #0c2530; color: #cdeff7; }
.pay-box { border: 1px dashed var(--warn); border-radius: 12px; padding: 12px; margin: 12px 0; }
.pay-box h3 { margin-bottom: 4px; }
.success-mark { width: 56px; height: 56px; border-radius: 50%; background: #0f2f1d; color: var(--ok); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; margin-bottom: 10px; }
.ref { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.thumbs img { width: 76px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.steps { padding-left: 1.2em; margin: 0 0 .8em; }
.steps li { margin-bottom: .4em; }
.links { list-style: none; padding: 0; margin: 0; }
.links li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.empty { text-align: center; color: var(--muted); padding: 24px 12px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 18px 0 10px; }
.section-title h2 { margin: 0; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); background: var(--card-2); border: 1px solid var(--line); color: var(--text); padding: 10px 16px; border-radius: 10px; z-index: 50; font-size: .9rem; box-shadow: 0 6px 24px rgba(0,0,0,.4); }
@media (min-width: 700px) { .filters { grid-template-columns: 1fr 1fr 1fr; } .filters .full { grid-column: auto; } }
/* early-access additions */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.empty-big { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 28px 18px; margin-top: 12px; }
.empty-big .btn { margin-top: 8px; }
.empty-title { color: var(--text); font-size: 1.15rem; font-weight: 800; margin-bottom: .4em; }
.pre { white-space: pre-line; }
.btn:disabled { opacity: .7; cursor: wait; }
/* Concept v2: register for use */
.tag-pending { background: var(--warn-bg); color: var(--warn); }
.tag-use { background: #0d3340; color: var(--accent); margin: 0 4px 4px 0; }
.uses-line { margin: 6px 0; }
.uses-pick .use-option { padding: 8px 0; border-top: 1px solid var(--line); margin: 0; }
.uses-pick .use-option:first-of-type { border-top: 0; }
.use-option strong { display: block; }
.use-option small { display: block; color: var(--muted); font-size: .85rem; }
.use-option input { width: 20px; height: 20px; min-height: 20px; margin-top: 2px; flex: none; }
.notice-soon { margin: 10px 0 2px; }
.contact-text { font-weight: 600; }

/* Owner area sub-nav (My registered cars / Earnings) */
.subnav { display: flex; gap: 8px; margin: 16px 0 4px; flex-wrap: wrap; }
.subnav a { padding: 6px 14px; border-radius: 999px; border: 1px solid #2c3a4a; color: inherit; text-decoration: none; font-weight: 600; }
.subnav a[aria-current="page"] { background: #22d3ee; color: #0b0f14; border-color: #22d3ee; }
.earnings-total { font-size: 2.4rem; font-weight: 800; margin: 0; }

/* TEST MODE: obvious banner on every test screen */
.test-banner { margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; border: 2px dashed #f59e0b; background: #2a1f05; color: #fcd34d; }
body.is-test .demo-banner { background: #f59e0b; color: #0b0f14; }
.test-card { border: 1px dashed #f59e0b; }
.tag-test { background: #f59e0b; color: #0b0f14; font-weight: 800; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.chip { padding: 4px 10px; border-radius: 999px; border: 1px solid #2c3a4a; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.test-steps li.done { font-weight: 700; }
