@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ---------- Design tokens ---------- */
:root {
    color-scheme: light;

    --bg: #f5f5f7;
    --card: #ffffff;
    --nav-bg: rgba(251, 251, 253, 0.8);
    --text: #1d1d1f;
    --secondary: #6e6e73;
    --separator: rgba(0, 0, 0, 0.1);
    --fill: #f5f5f7;
    --hover: rgba(0, 0, 0, 0.05);
    --field-border: #d2d2d7;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-tint: rgba(0, 113, 227, 0.1);
    --danger: #ff3b30;
    --success: #248a3d;
    --success-tint: rgba(52, 199, 89, 0.14);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 30px rgba(0, 0, 0, 0.05);

    /* aliases used by inline styles in some templates */
    --primary: var(--accent);
    --text-muted: var(--secondary);

    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
            "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

:root[data-theme="dark"] {
    color-scheme: dark;

    --bg: #000000;
    --card: #1c1c1e;
    --nav-bg: rgba(22, 22, 23, 0.8);
    --text: #f5f5f7;
    --secondary: #a1a1a6;
    --separator: rgba(255, 255, 255, 0.14);
    --fill: #2c2c2e;
    --hover: rgba(255, 255, 255, 0.1);
    --field-border: #48484a;
    --accent: #2997ff;
    --accent-hover: #47a7ff;
    --accent-tint: rgba(41, 151, 255, 0.16);
    --success: #30d158;
    --success-tint: rgba(48, 209, 88, 0.16);
    --shadow: none;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Navigation (translucent, like apple.com) ---------- */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 52px;
    padding: 0 24px;
    background: var(--nav-bg);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--separator);
}

nav .brand {
    margin-right: auto;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
}

nav a {
    color: var(--text);
    opacity: 0.8;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 980px;
    text-decoration: none;
    transition: opacity 0.2s, background 0.2s;
}

nav a:hover {
    opacity: 1;
    background: var(--hover);
    text-decoration: none;
}

nav span[style] {
    color: var(--secondary) !important;
    font-size: 13px;
    padding: 8px 12px;
}

/* ---------- Layout ---------- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

.container {
    max-width: 720px;
    margin: 48px auto;
    padding: 0 20px;
    animation: fadeUp 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) both;
}

h1 {
    font-size: clamp(28px, 5vw, 40px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 28px;
}

h2 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 40px 0 16px;
}

p { color: var(--text); }

/* ---------- Cards ---------- */
.card {
    background: var(--card);
    border-radius: 18px;
    padding: 28px;
    box-shadow: var(--shadow);
}

.card p + p { margin-top: 4px; }

/* ---------- Forms ---------- */
form label {
    display: block;
    margin: 20px 0 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--secondary);
}

form input,
form select,
form textarea {
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    font-size: 16px;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--field-border);
    border-radius: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

form input:focus,
form select:focus,
form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-tint);
}

form select[style] {
    padding: 12px 14px !important;
    border: 1px solid var(--field-border) !important;
    border-radius: 12px !important;
    font-size: 16px !important;
}

/* ---------- Buttons ---------- */
button, .btn {
    display: inline-block;
    margin-top: 24px;
    padding: 12px 22px;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
    background: var(--accent);
    border: none;
    border-radius: 980px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}

button:hover, .btn:hover { background: var(--accent-hover); text-decoration: none; }
button:active, .btn:active { transform: scale(0.98); }
button:disabled { opacity: 0.6; cursor: default; }

button[style*="dc2626"] { background: var(--danger) !important; }

/* ---------- Tables ---------- */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

th, td {
    text-align: left;
    padding: 16px 18px;
    font-size: 15px;
    border-bottom: 1px solid var(--separator);
}

th {
    font-size: 12px;
    font-weight: 500;
    color: var(--secondary);
    padding-top: 14px;
    padding-bottom: 14px;
}

tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: var(--fill); }

td a {
    display: inline-block;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-tint);
    border-radius: 980px;
    transition: opacity 0.2s;
}

td a:hover { opacity: 0.8; text-decoration: none; }

/* ---------- Confirmation ---------- */
.confirm {
    padding: 18px 22px;
    font-weight: 500;
    color: var(--success);
    background: var(--success-tint);
    border-radius: 14px;
}

/* ---------- Reports ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

.stat-box {
    background: var(--card);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.stat-box .value {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
}

.stat-box .label {
    margin-top: 4px;
    font-size: 13px;
    color: var(--secondary);
}

.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.bar-label { width: 110px; flex-shrink: 0; font-size: 13px; color: var(--secondary); }
.bar-track { flex: 1; height: 22px; background: var(--fill); border-radius: 6px; overflow: hidden; }

.bar-fill {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    padding-right: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    background: var(--accent);
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ---------- Overrides for inline styles inside templates ---------- */
#amount-preview {
    background: var(--fill) !important;
    color: var(--text);
    border-radius: 12px !important;
}

#booking-error { color: var(--danger) !important; }

[style*="f1f0fb"] { background: var(--fill) !important; }
[style*="94a3b8"], [style*="64748b"] { color: var(--secondary) !important; }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
    nav { height: auto; min-height: 52px; flex-wrap: wrap; padding: 6px 12px; }
    .container { margin: 28px auto; padding: 0 16px; }
    .card { padding: 20px; }
    table { display: block; overflow-x: auto; }
}

/* ---------- Accessibility: respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* ================= Landing page ================= */
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 72px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

.hero-wrap {
    background: radial-gradient(ellipse 80% 55% at 50% 0%, var(--accent-tint), transparent);
}

.hero { text-align: center; padding: 96px 24px 72px; }

.eyebrow {
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--accent);
}

.hero h1 {
    font-size: clamp(44px, 9vw, 88px);
    line-height: 1.02;
    letter-spacing: -0.045em;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(90deg, var(--accent), #af52de);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.hero .lead {
    max-width: 640px;
    margin: 0 auto 32px;
    font-size: clamp(18px, 2.4vw, 24px);
    line-height: 1.35;
    color: var(--secondary);
}

.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero-actions .btn { margin-top: 0; }

.btn.btn-secondary { color: var(--accent); background: var(--accent-tint); }
.btn.btn-secondary:hover { color: var(--accent); background: var(--accent-tint); opacity: 0.8; }

/* sample listing card in the hero */
.hero-card {
    max-width: 440px;
    margin: 56px auto 0;
    padding: 14px;
    text-align: left;
    background: var(--card);
    border-radius: 26px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.hero-map {
    position: relative;
    height: 150px;
    border-radius: 16px;
    background:
        linear-gradient(var(--separator) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(90deg, var(--separator) 1px, transparent 1px) 0 0 / 28px 28px,
        var(--fill);
}

@keyframes pinPulse {
    0%   { box-shadow: 0 0 0 0 rgba(0, 113, 227, 0.45); }
    100% { box-shadow: 0 0 0 20px rgba(0, 113, 227, 0); }
}

.hero-pin {
    position: absolute;
    left: 55%;
    top: 42%;
    width: 18px;
    height: 18px;
    background: var(--accent);
    border-radius: 50%;
    animation: pinPulse 2s ease-out infinite;
}

.hero-card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 8px 6px;
}

.hero-card-body strong { display: block; font-size: 17px; letter-spacing: -0.01em; }
.hero-card-body span { font-size: 13px; color: var(--secondary); }
.hero-price { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.hero-price small { font-size: 13px; font-weight: 400; color: var(--secondary); }

/* sections */
.section { padding: 72px 0; }

.section-title {
    margin-bottom: 12px;
    text-align: center;
    font-size: clamp(28px, 4.5vw, 44px);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.1;
}

.section-sub {
    max-width: 560px;
    margin: 0 auto 48px;
    text-align: center;
    font-size: 19px;
    color: var(--secondary);
}

.steps, .features, .spot-grid {
    display: grid;
    gap: 16px;
}

.steps    { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.features { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.spot-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.step, .feature {
    padding: 32px;
    background: var(--card);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-bottom: 18px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-tint);
    border-radius: 50%;
}

.step h3, .feature h3 { margin-bottom: 8px; font-size: 21px; letter-spacing: -0.02em; }
.step p, .feature p { font-size: 16px; color: var(--secondary); }
.feature .icon { margin-bottom: 14px; font-size: 28px; }

/* drivers / owners */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

.split-card {
    padding: 48px 36px;
    background: var(--card);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.split-card h2 { margin: 0 0 12px; font-size: 32px; letter-spacing: -0.03em; line-height: 1.1; }
.split-card p { margin-bottom: 8px; font-size: 17px; color: var(--secondary); }

.split-card.dark { color: #f5f5f7; background: #1d1d1f; }
.split-card.dark p { color: #a1a1a6; }

/* newest spots */
.spot-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--card);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.spot-card img, .spot-photo-empty { width: 100%; height: 170px; object-fit: cover; }

.spot-photo-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    background: var(--fill);
}

.spot-body { display: flex; flex-direction: column; gap: 4px; padding: 20px; }
.spot-body strong { font-size: 17px; letter-spacing: -0.01em; }
.spot-body > span { font-size: 14px; color: var(--secondary); }
.spot-meta { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; }
.spot-price { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.spot-price small { font-size: 13px; font-weight: 400; color: var(--secondary); }
.spot-rating { font-size: 14px; color: #ff9f0a; }
.spot-body .btn { margin-top: 14px; text-align: center; }

.cta-band { padding: 96px 0; text-align: center; }

.site-footer {
    padding: 28px 24px;
    text-align: center;
    font-size: 13px;
    color: var(--secondary);
    border-top: 1px solid var(--separator);
}

/* scroll-in animation (only when JavaScript is available) */
html.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
}
html.js .reveal.visible { opacity: 1; transform: none; }

.steps .reveal:nth-child(2), .features .reveal:nth-child(2), .spot-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.steps .reveal:nth-child(3), .features .reveal:nth-child(3), .spot-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.features .reveal:nth-child(4) { transition-delay: 0.3s; }

@media (max-width: 640px) {
    .hero { padding: 64px 20px 48px; }
    .section { padding: 48px 0; }
    .split-card { padding: 36px 24px; }
}

nav a.brand {
    padding: 8px 0;
    opacity: 1;
}

nav a.brand:hover {
    background: none;
    opacity: 0.7;
}

nav .theme-toggle {
    margin: 0 0 0 8px;
    padding: 6px 10px;
    font-size: 16px;
    line-height: 1;
    color: var(--text);
    background: transparent;
    border-radius: 980px;
}

nav .theme-toggle:hover { background: var(--hover); }

.vehicle-options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

.vehicle-chip { position: relative; display: inline-block; margin: 0; }

.vehicle-chip input { position: absolute; opacity: 0; width: 0; height: 0; padding: 0; }

.vehicle-chip span {
    display: inline-block;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--field-border);
    border-radius: 980px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.vehicle-chip:hover span { border-color: var(--accent); }

.vehicle-chip input:checked + span {
    color: #ffffff;
    background: var(--accent);
    border-color: var(--accent);
}

.vehicle-chip input:focus-visible + span { box-shadow: 0 0 0 4px var(--accent-tint); }

.time-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.time-group { display: inline-flex; align-items: center; gap: 4px; }

.time-row select {
    width: auto;
    padding: 8px 10px;
    font-size: 14px;
    border-radius: 10px;
}

.time-colon, .time-to { font-size: 14px; color: var(--secondary); }

.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.pills a {
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--field-border);
    border-radius: 980px;
    text-decoration: none;
    transition: border-color 0.2s;
}

.pills a:hover { border-color: var(--accent); }
.pills a.active { color: #ffffff; background: var(--accent); border-color: var(--accent); }

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--secondary);
    background: var(--fill);
    border-radius: 980px;
}

.badge-upcoming    { color: var(--accent);  background: var(--accent-tint); }
.badge-in-progress { color: var(--success); background: var(--success-tint); }
.badge-cancelled   { color: var(--danger);  background: rgba(255, 59, 48, 0.12); }

/* ================= Map search ================= */
.search-page { max-width: 1280px; margin: 0 auto; padding: 24px; }
.search-page h1 { margin-bottom: 16px; }

.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }

.filter-bar input[type="text"],
.filter-bar select {
    padding: 10px 14px;
    font: inherit;
    font-size: 15px;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--field-border);
    border-radius: 12px;
}

.filter-bar input[type="text"] { flex: 1; min-width: 200px; }
.filter-bar label { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--secondary); }

.search-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 16px;
    height: calc(100vh - 230px);
    min-height: 520px;
}

.map-shell {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: var(--shadow);
}

#map { width: 100%; height: 100%; }

/* price bubbles on the map */
.price-pin-wrap { background: none; border: none; }

.price-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    color: #1d1d1f;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 980px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.15s, background 0.15s, color 0.15s;
}

.price-pin.active {
    color: #ffffff;
    background: var(--accent);
    border-color: var(--accent);
    transform: translate(-50%, -50%) scale(1.12);
}

/* hover preview card */
#spot-card {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 1100;
    width: 300px;
    max-width: calc(100% - 32px);
    overflow: hidden;
    color: var(--text);
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

#spot-card[hidden] { display: none; }

#spot-card img, .card-photo-empty { display: block; width: 100%; height: 150px; object-fit: cover; }

.card-photo-empty { display: flex; align-items: center; justify-content: center; font-size: 40px; background: var(--fill); }

.card-body { padding: 14px 16px 16px; }
.card-body strong { display: block; font-size: 16px; letter-spacing: -0.01em; }
.card-sub { margin-top: 2px; font-size: 13px; color: var(--secondary); }

.status-open   { font-weight: 600; color: var(--success); }
.status-closed { font-weight: 600; color: var(--danger); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { padding: 4px 10px; font-size: 12px; color: var(--text); background: var(--fill); border-radius: 980px; }

.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.card-price { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.card-price small { font-size: 13px; font-weight: 400; color: var(--secondary); }
.card-foot .btn { margin-top: 0; padding: 8px 16px; font-size: 14px; text-align: center; }

/* list beside the map */
.spot-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    background: var(--card);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.panel-head { padding: 14px 18px; font-size: 14px; color: var(--secondary); border-bottom: 1px solid var(--separator); }
#spot-list { flex: 1; overflow-y: auto; }

.spot-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--separator);
    transition: background 0.15s;
}

.spot-row:hover, .spot-row.active { background: var(--fill); }

.spot-row img, .row-photo-empty { flex-shrink: 0; width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.row-photo-empty { display: flex; align-items: center; justify-content: center; background: var(--fill); }

.row-main { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.row-main strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { font-size: 12px; color: var(--secondary); }
.row-price { font-size: 17px; font-weight: 600; white-space: nowrap; }
.row-price small { font-size: 12px; font-weight: 400; color: var(--secondary); }
.empty { padding: 24px; text-align: center; color: var(--secondary); }

@media (max-width: 900px) {
    .search-layout { grid-template-columns: 1fr; height: auto; }
    .map-shell { height: 55vh; min-height: 360px; }
    .spot-panel { max-height: 60vh; }
    #spot-card { width: calc(100% - 32px); }
}
/* ================= Landing page map demo ================= */
.demo-map .map-shell { height: 480px; }

.demo-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1100;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    background: var(--card);
    border-radius: 980px;
    box-shadow: var(--shadow);
}

@media (max-width: 640px) {
    .demo-map .map-shell { height: 420px; }
    .demo-badge { top: auto; right: auto; bottom: 16px; left: 16px; }
}

nav .brand { display: inline-flex; align-items: center; gap: 8px; }
.brand-logo { width: 28px; height: 28px; border-radius: 7px; }

/* ================= Booking pass ================= */
.pass { padding: 0; overflow: hidden; }
.pass-photo { display: block; width: 100%; height: 190px; object-fit: cover; }
.pass-inner { padding: 28px; }

.pass-title { margin-bottom: 4px; font-size: 26px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.pass-sub { margin-top: 4px; font-size: 15px; color: var(--secondary); }

.pass-times { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 12px; margin-top: 28px; }
.pass-label { font-size: 14px; color: var(--secondary); }
.pass-date { margin-top: 6px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.pass-time { font-size: 17px; color: var(--secondary); }
.pass-right { text-align: right; }

.pass-duration {
    align-self: center;
    padding: 6px 14px;
    font-size: 15px;
    font-weight: 600;
    color: var(--secondary);
    background: var(--fill);
    border-radius: 980px;
}

.pass-meta {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--separator);
}

.pass-big { margin-top: 4px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; word-break: break-all; }

.pass-qr { margin-top: 26px; text-align: center; }
.pass-qr img { width: 200px; height: 200px; padding: 10px; background: #ffffff; border-radius: 16px; }
.pass-qr p { margin-top: 10px; font-size: 13px; color: var(--secondary); }

.pass-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    font-size: 15px;
    border-bottom: 1px solid var(--separator);
}
.pass-row:last-child { border-bottom: none; }
.pass-row span { color: var(--secondary); }
.pass-row strong { font-weight: 600; text-align: right; }

.pass-note { margin-bottom: 14px; padding: 16px 18px; font-size: 15px; background: var(--fill); border-radius: 14px; }

.pass-alert {
    margin-bottom: 16px;
    padding: 16px 20px;
    font-weight: 500;
    color: var(--danger);
    background: rgba(255, 59, 48, 0.12);
    border-radius: 14px;
}

.pass-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.pass-actions .btn, .pass-actions button { margin-top: 0; }

a.chip { text-decoration: none; }
a.chip:hover { text-decoration: none; opacity: 0.8; }

@media (max-width: 480px) {
    .pass-times { grid-template-columns: 1fr; }
    .pass-times .pass-right { text-align: left; }
    .pass-duration { justify-self: start; }
    .pass-meta { grid-template-columns: 1fr 1fr; }
}

@media print {
    nav, .no-print { display: none !important; }
    body { background: #ffffff; }
    .card { box-shadow: none; border: 1px solid #dddddd; }
}
/* ================= Account menu ================= */
.account-menu { position: relative; margin-left: 4px; }

nav .account-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 5px 12px 5px 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    background: transparent;
    border-radius: 980px;
}
nav .account-toggle:hover { background: var(--hover); }

.account-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    background: var(--accent);
    border-radius: 50%;
}

.account-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 200;
    min-width: 220px;
    padding: 8px;
    background: var(--card);
    border: 1px solid var(--separator);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}
.account-dropdown[hidden] { display: none; }

.account-dropdown a { display: block; padding: 10px 12px; font-size: 14px; color: var(--text); opacity: 1; border-radius: 10px; }
.account-dropdown a:hover { background: var(--fill); text-decoration: none; }
.account-dropdown hr { margin: 6px 0; border: none; border-top: 1px solid var(--separator); }

@media (max-width: 640px) { .account-name { display: none; } }

/* ================= Profile ================= */
.profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
    background: var(--accent);
    border-radius: 50%;
}

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.tile {
    display: block;
    padding: 20px;
    font-weight: 600;
    color: var(--text);
    background: var(--card);
    border-radius: 18px;
    box-shadow: var(--shadow);
    transition: transform 0.15s;
}
.tile small { display: block; margin-top: 4px; font-weight: 400; color: var(--secondary); }
.tile:hover { text-decoration: none; transform: translateY(-2px); }

/* ================= Vehicles ================= */
.plate {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px 5px 5px;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #111111;
    background: #ffffff;
    border: 2px solid #111111;
    border-radius: 8px;
}
.plate::before {
    content: "IND";
    padding: 6px 5px;
    font-size: 9px;
    letter-spacing: 0;
    color: #ffffff;
    background: #1d4ed8;
    border-radius: 4px;
}

.vehicle-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.vehicle-card { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 18px 20px; }
.vehicle-icon { font-size: 30px; }
.vehicle-main { flex: 1; min-width: 180px; }
.vehicle-main .pass-sub { margin-top: 8px; }
.vehicle-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vehicle-actions form { margin: 0; }

button.btn-small { margin: 0; padding: 6px 14px; font-size: 13px; }
button.btn-ghost { color: var(--accent); background: var(--accent-tint); }
button.btn-ghost:hover { background: var(--accent-tint); opacity: 0.8; }
button.btn-danger { background: var(--danger); }
button.btn-danger:hover { background: var(--danger); opacity: 0.85; }

.field-meta { display: flex; justify-content: space-between; margin-top: 6px; font-size: 13px; color: var(--secondary); }

.default-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }

.switch { position: relative; display: inline-block; flex-shrink: 0; width: 46px; height: 28px; margin: 0; }
.switch input { width: 0; height: 0; opacity: 0; }
.switch .slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: var(--field-border);
    border-radius: 28px;
    transition: background 0.2s;
}
.switch .slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(18px); }
/* ================= Messages ================= */
.toast-stack {
    position: fixed;
    top: 68px;
    right: 16px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: calc(100vw - 32px);
}

.toast {
    padding: 12px 18px;
    font-size: 14px;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--separator);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    animation: fadeUp 0.3s ease-out both;
    transition: opacity 0.4s;
}

.toast.hide { opacity: 0; }

.account-dropdown a.logout-link { color: var(--danger); }

/* ================= Mobile interface ================= */
html { -webkit-text-size-adjust: 100%; }
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

.tabbar { display: none; }
.view-toggle { display: none; }

@media print { .tabbar { display: none !important; } }

@media (max-width: 760px) {

    /* --- Top bar: just the logo, account and theme button --- */
    nav { padding: 0 14px; }
    nav > a:not(.brand) { display: none; }

    /* --- Bottom tab bar --- */
    body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }

    .tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 150;
        display: flex;
        justify-content: space-around;
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        background: var(--nav-bg);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
        backdrop-filter: saturate(180%) blur(20px);
        border-top: 1px solid var(--separator);
    }

    .tab {
        display: flex;
        flex: 1;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 4px 2px;
        font-size: 11px;
        font-weight: 500;
        color: var(--secondary);
        text-decoration: none;
    }
    .tab:hover { text-decoration: none; }
    .tab.active { color: var(--accent); }
    .tab svg {
        width: 24px;
        height: 24px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    /* --- Page spacing --- */
    .container { margin: 24px auto; padding: 0 16px; }
    .card { padding: 20px; border-radius: 16px; }
    h2 { margin: 28px 0 12px; font-size: 20px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-box { padding: 16px; }
    .stat-box .value { font-size: 24px; }
    .toast-stack { top: 62px; right: 12px; left: 12px; }

    /* --- Forms: no zoom on focus, easy to tap --- */
    form input, form select, form textarea { font-size: 16px; }
    .card form > button:not([style]):not(.btn-small) { width: 100%; }
    .pass-actions .btn, .pass-actions button { flex: 1; text-align: center; }

    /* Booking form: the date gets its own line */
    #booking-form div[style*="display: flex"] { flex-wrap: wrap; }
    #booking-form div[style*="flex: 2"] { flex: 1 1 100% !important; }

    /* --- Tables turn into cards --- */
    table.stack, table.stack tbody { display: block; }
    table.stack {
        overflow: visible;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
    }
    table.stack .head-row { display: none; }
    table.stack tr {
        display: block;
        margin-bottom: 12px;
        padding: 6px 16px;
        background: var(--card);
        border-radius: 16px;
        box-shadow: var(--shadow);
    }
    table.stack td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 10px 0;
        font-size: 15px;
        text-align: right;
        border-bottom: 1px solid var(--separator);
    }
    table.stack td:last-child { border-bottom: none; }
    table.stack td[data-label]::before {
        flex-shrink: 0;
        content: attr(data-label);
        font-size: 13px;
        text-align: left;
        color: var(--secondary);
    }

    /* --- Search: map or list --- */
    .search-page { padding: 14px; }
    .search-page h1 { margin-bottom: 12px; font-size: 26px; }
    .filter-bar { gap: 8px; margin-bottom: 12px; }
    .filter-bar input[type="text"], .filter-bar select { font-size: 16px; }

    .view-toggle {
        display: flex;
        padding: 3px;
        margin-bottom: 12px;
        background: var(--fill);
        border-radius: 12px;
    }
    .view-toggle button {
        flex: 1;
        margin: 0;
        padding: 8px 0;
        font-size: 14px;
        font-weight: 600;
        color: var(--secondary);
        background: transparent;
        border-radius: 10px;
        box-shadow: none;
    }
    .view-toggle button:hover { background: transparent; }
    .view-toggle button.active, .view-toggle button.active:hover {
        color: var(--text);
        background: var(--card);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    }

    .search-layout { grid-template-columns: 1fr; height: auto; min-height: 0; }
    .map-shell { height: calc(100vh - 300px); height: calc(100dvh - 300px); min-height: 360px; }
    .spot-panel { display: none; max-height: none; }
    .search-layout.show-list .spot-panel { display: flex; }
    .search-layout.show-list .map-shell { display: none; }

    #spot-card { top: auto; right: 12px; bottom: 12px; left: 12px; width: auto; max-width: none; }
    #spot-card img, .card-photo-empty { height: 110px; }

    /* --- Landing page --- */
    .hero { padding: 48px 20px 40px; }
    .hero-card { margin-top: 36px; }
    .section { padding: 44px 0; }
    .section-sub { margin-bottom: 32px; font-size: 17px; }
    .split-card { padding: 32px 24px; }
}