/* Lavalauto — design system. Sober, minimal, mobile-first. No framework. */

/* ===================== Tokens ===================== */

:root {
    /* One accent (brand blue, "water"), neutral slate greys, status colours */
    --color-primary: #0b5fff;  /* brand blue */
    --color-primary-hover: #0a4fd6;
    --color-primary-soft: #eff6ff;
    --color-text: #1e293b;
    --color-muted: #64748b;
    --color-border: #e2e8f0;
    --color-border-strong: #cbd5e1;
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-success: #047857;
    --color-success-bg: #ecfdf5;
    --color-error: #b91c1c;
    --color-error-bg: #fef2f2;
    --color-error-hover: #991b1b;
    --color-warning: #92400e;
    --color-warning-bg: #fffbeb;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-pill: 999px;
    --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.05);
    --shadow: 0 8px 24px rgb(15 23 42 / 0.08);
    --focus-ring: 0 0 0 3px rgb(11 95 255 / 0.25);

    /* System fonts: modern, fast, nothing loaded from third parties */
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --content-width: 1080px;
    --control-height: 44px;  /* comfortable touch target */
}

/* ===================== Base ===================== */

* { box-sizing: border-box; }

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

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 32px 20px 64px;
}

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.015em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 700; margin: 0 0 12px; }
h2 { font-size: 1.25rem; font-weight: 650; margin: 40px 0 12px; }
h3 { font-size: 1.05rem; font-weight: 650; margin: 24px 0 10px; }
p { margin: 0 0 12px; }

a { color: var(--color-primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--color-primary-hover); }

.muted { color: var(--color-muted); }

img { max-width: 100%; }

svg.icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ===================== Header and footer ===================== */

#site-header {
    position: sticky;
    top: 0;
    z-index: 1000;  /* above Leaflet panes */
    background: rgb(255 255 255 / 0.92);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--color-border);
}

nav {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 750;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    color: var(--color-text);
    text-decoration: none;
}

.brand-logo { height: 30px; width: auto; display: block; }
.brand-icon { height: 30px; width: 30px; display: block; }

/* Mascot: decorative picture above a title (empty pages, welcome screens) */
.mascot { display: block; margin: 0 auto 8px; width: 112px; height: 112px; object-fit: contain; }

.brand svg.icon {
    width: 28px;
    height: 28px;
    padding: 5px;
    border-radius: 8px;
    color: #fff;
    background: var(--color-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a:not(.button) {
    color: var(--color-muted);
    text-decoration: none;
    font-weight: 500;
}

.nav-links a:not(.button):hover { color: var(--color-text); }

#site-footer {
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}

#site-footer .footer-inner {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--color-muted);
}

/* ===================== Surfaces ===================== */

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

a.card {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}

a.card:hover {
    border-color: var(--color-border-strong);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.card h3 { margin: 0 0 4px; }
.card p { margin: 0; }
.card .distance { margin-top: 8px; font-weight: 600; color: var(--color-primary); }

.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.card > .list { margin: -8px 0; }

.list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.list li:last-child { border-bottom: none; }

/* Loading: a list or grid is empty only until its data arrives (then it shows items or an
   "empty" message), so :empty works as an automatic loading indicator */
.grid:empty::before,
.list:empty::before,
.photo-grid:empty::before {
    content: "";
    display: block;
    width: 24px;
    height: 24px;
    margin: 24px auto;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    grid-column: 1 / -1;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===================== Forms ===================== */

form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);  /* children never push the form wider than its container */
    gap: 14px;
    max-width: 520px;
}

form.wide { max-width: none; }

form.inline {
    max-width: none;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    align-items: end;
}

label {
    display: grid;
    gap: 6px;
    font-size: 0.92rem;
    font-weight: 550;
}

input, select, textarea {
    font: inherit;
    font-size: 1rem;
    min-height: var(--control-height);
    padding: 9px 12px;
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s, box-shadow 0.15s;
}

/* Fields shrink to their grid column instead of pushing the page wider (matters on phones) */
form.inline > * { min-width: 0; }
form.inline input, form.inline select, form.inline textarea { width: 100%; min-width: 0; }

input[type="file"] { padding: 8px; }
textarea { min-height: 96px; resize: vertical; }

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--focus-ring);
}

fieldset.choice {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 14px;
    margin: 0;
    display: grid;
    gap: 10px;
}

fieldset.choice legend { font-weight: 600; padding: 0 6px; }

label.option {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
    font-size: 1rem;
}

label.option input { min-height: auto; accent-color: var(--color-primary); }

.hint { margin: 0; font-size: 0.9rem; }

/* ===================== Buttons ===================== */

button, .button {
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    min-height: var(--control-height);
    padding: 0 18px;
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-sm);
    background: var(--color-primary);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

button:hover, .button:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); color: #fff; }
button:focus-visible, .button:focus-visible, a:focus-visible { outline: none; box-shadow: var(--focus-ring); }
button:disabled { opacity: 0.6; cursor: wait; }

button.secondary, .button.secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-border-strong);
}

button.secondary:hover, .button.secondary:hover {
    background: var(--color-bg);
    color: var(--color-text);
    border-color: var(--color-muted);
}

button.danger {
    min-height: 36px;
    padding: 0 10px;
    background: none;
    border-color: transparent;
    color: var(--color-error);
}

button.danger:hover { background: var(--color-error-bg); border-color: transparent; color: var(--color-error); }

button.link {
    min-height: auto;
    padding: 4px 0;
    background: none;
    border: none;
    color: var(--color-primary);
    font-weight: 400;
    text-align: left;
    text-decoration: underline;
    white-space: normal;
}

button.link:hover { background: none; color: var(--color-primary-hover); }

.row-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.row-actions button.secondary, .row-actions .button { min-height: 36px; padding: 0 12px; }

/* ===================== Feedback ===================== */

.message {
    margin: 0;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
}

.message.error { color: var(--color-error); background: var(--color-error-bg); }
.message.success { color: var(--color-success); background: var(--color-success-bg); }
.message.warning { color: var(--color-warning); background: var(--color-warning-bg); }

#page-message { margin-bottom: 20px; }

.badge {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-warning);
    background: var(--color-warning-bg);
}

.badge.gift { color: var(--color-success); background: var(--color-success-bg); font-weight: 700; }
.badge.status-approved { color: var(--color-success); background: var(--color-success-bg); }
.badge.status-rejected { color: var(--color-error); background: var(--color-error-bg); }

.status-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.status-card p { margin: 0; }

/* Info tooltip ("i" icon): shown on hover and on focus (tap on touch screens) */

.info-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 4px;
    border-radius: 50%;
    border: 1px solid var(--color-border-strong);
    color: var(--color-muted);
    font-size: 0.7rem;
    font-weight: 700;
    font-style: italic;
    cursor: help;
    vertical-align: middle;
}

.info-tip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 240px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--color-text);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 400;
    font-style: normal;
    line-height: 1.4;
    white-space: pre-line;  /* keeps line breaks in the text */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 10;
}

.info-tip:hover::after, .info-tip:focus::after { opacity: 1; }
.info-tip:focus { outline: none; box-shadow: var(--focus-ring); }

/* ===================== Maps ===================== */

.map {
    height: 320px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    z-index: 0;  /* keep Leaflet panes below the header */
}

.map-large { height: 420px; margin-bottom: 8px; }

.address-row {
    display: flex;
    align-items: end;
    gap: 8px;
}

.address-row label { flex: 1; min-width: 0; }
.address-row input { min-width: 0; }

.address-results {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 4px;
}

/* ===================== Photos ===================== */

.photo-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    margin-bottom: 12px;
}

.photo {
    display: block;
    margin: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.photo img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.photo figcaption {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 10px;
}

.photo .badge { margin-left: 0; }

.card-cover {
    display: block;
    width: calc(100% + 40px);
    margin: -20px -20px 14px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius) var(--radius) 0 0;
}

/* ===================== Offerings and extras ===================== */




.offering-extras {
    list-style: none;
    margin: 6px 0 0 16px;
    padding: 0;
    display: grid;
    gap: 6px;
    font-size: 0.92rem;
    color: var(--color-muted);
}

/* Nested in .list: drop the row separator and padding of the main list */
.list .offering-extras li {
    border-bottom: none;
    padding: 0;
}

.offering-extras li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.price-input { width: 110px; min-height: 36px; padding: 6px 10px; }
.instructions-input { width: 100%; margin-top: 8px; }
.duration-input { width: 84px; min-height: 36px; padding: 6px 10px; }
.duration { color: var(--color-muted); font-size: 0.9rem; font-weight: 400; margin-left: 6px; }

.list li.catalog-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(160px, 2fr) auto;
    gap: 8px;
}

/* ===================== Opening hours ===================== */

.open-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 600;
}

.open-status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.open-status.open { color: var(--color-success); background: var(--color-success-bg); }
.open-status.closed { color: var(--color-error); background: var(--color-error-bg); }
.open-status.closing { color: var(--color-warning); background: var(--color-warning-bg); }

.hours-list li.today { font-weight: 700; }

.closures {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: grid;
    gap: 8px;
}

.hours-editor { display: grid; gap: 8px; }

.hours-row {
    display: grid;
    grid-template-columns: 110px repeat(2, auto) auto;
    align-items: center;
    justify-content: start;
    gap: 12px;
}

.time-range {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.time-range input { min-height: 38px; padding: 6px 8px; }

/* ===================== Home ===================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.hero {
    padding: 32px 0 8px;
    max-width: 720px;
}

.hero h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); letter-spacing: -0.03em; margin-bottom: 12px; }
.lead { font-size: 1.1rem; color: var(--color-muted); max-width: 600px; margin-bottom: 24px; }

.search-bar {
    max-width: none;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    padding: 8px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.search-bar .message { grid-column: 1 / -1; }

.search-field {
    position: relative;
    display: block;
}

.search-field .field-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    color: var(--color-muted);
}

.search-field input { width: 100%; padding-left: 40px; border-color: transparent; }
.search-field input:focus { border-color: var(--color-primary); }

.results-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 40px 0 16px;
}

.results-header h2 { margin: 0; }
.results-header form { max-width: none; }
.results-header input { width: 260px; max-width: 100%; }

.results {
    display: grid;
    gap: 20px;
}

.results .map { height: 360px; }

/* The search sits right above the map; on a phone map and search come first, then the list */
.results-map { display: grid; gap: 8px; align-content: start; }
.results-list .results-header { margin-top: 0; }

/* Wide screens: cards on the left, map always visible on the right */
@media (min-width: 960px) {
    .results { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
    .results .grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
    .results-list { grid-column: 1; grid-row: 1; }
    .results-map { grid-column: 2; grid-row: 1; position: sticky; top: 88px; }
    .results .map { height: calc(100vh - 200px); max-height: 600px; }
}

.card-cover.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    background: linear-gradient(135deg, var(--color-primary-soft), #f1f5f9);
}

.card-cover.placeholder svg.icon { width: 40px; height: 40px; stroke-width: 1.5; }

.partner-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 56px;
    padding: 32px;
    background: linear-gradient(135deg, var(--color-primary-soft), var(--color-surface) 60%);
}

.partner-cta h2 { margin-top: 0; }

.checklist {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.checklist li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checklist svg.icon { color: var(--color-success); }

@media (max-width: 600px) {
    .search-bar { grid-template-columns: 1fr 1fr; }
    .search-field { grid-column: 1 / -1; }
    .partner-cta { padding: 24px; }
}

/* ===================== Car wash page ===================== */

.cw-cover {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    margin-bottom: 24px;
}

.cw-cover img,
.cw-cover .placeholder {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 1;
    object-fit: cover;
}

.cw-cover .placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    background: linear-gradient(135deg, var(--color-primary-soft), #f1f5f9);
}

.cw-cover .placeholder svg.icon { width: 56px; height: 56px; stroke-width: 1.25; }

.cw-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px 24px;
}

.cw-head h1 { margin-bottom: 6px; }

.cw-address {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.cw-actions .button { min-height: var(--control-height); padding: 0 16px; }

.cw-layout {
    display: grid;
    gap: 24px;
    margin-top: 8px;
}

.cw-description { font-size: 1.05rem; max-width: 640px; white-space: pre-line; }
.cw-description:empty { display: none; }

.price-group { margin-bottom: 16px; }
.price-group h3 { margin: 0 0 4px; font-size: 1.1rem; }

.cw-side { display: grid; gap: 16px; align-content: start; }
.cw-side .map { height: 220px; margin-bottom: 12px; }
.cw-contact { margin: 0 0 4px; }

.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
}

.card-title svg.icon { color: var(--color-primary); }

/* Wide screens: content on the left, hours and map always at hand on the right */
@media (min-width: 960px) {
    .cw-layout { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 40px; }
    .cw-side { position: sticky; top: 88px; }
    .cw-main h2:first-of-type { margin-top: 8px; }
}

/* ===================== Bookings and agenda ===================== */

[hidden] { display: none !important; }  /* elements with their own display (grid, flex) must still hide */

.booking-list { display: grid; gap: 12px; }
.booking { display: grid; gap: 6px; }
.booking p { margin: 0; }
.booking-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.booking .row-actions { margin-top: 8px; }

.badge.status-confirmed { color: var(--color-success); background: var(--color-success-bg); }
.badge.status-completed { color: var(--color-primary); background: var(--color-primary-soft); }
.badge.status-no_show { color: var(--color-error); background: var(--color-error-bg); }
.badge.status-cancelled,
.badge.status-expired { color: var(--color-muted); background: var(--color-border); }

.agenda-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 16px 0;
}

.segmented {
    display: inline-flex;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.segmented button { border: none; border-radius: 0; }
.segmented button.active { background: var(--color-primary); color: #fff; }

/* Booking page */
.booking-summary { margin-bottom: 8px; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.check-row input { width: auto; flex: none; }
.check-row span:last-child { margin-left: auto; }

.day-strip, .slot-grid { display: grid; gap: 8px; margin-bottom: 12px; }
.day-strip { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.slot-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
.day-button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.day-button .day-name { text-transform: capitalize; font-size: 0.9rem; white-space: normal; }
.day-button .day-free { font-size: 0.8rem; font-weight: 400; opacity: 0.8; }
.day-button.active, .slot.active { background: var(--color-primary); color: #fff; }
.day-button:disabled { opacity: 0.45; }
.booking-total { display: flex; gap: 8px; margin: 12px 0 4px; }
#confirm-form { margin-top: 16px; }

.day-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.day-nav button.icon-only { min-width: 44px; padding: 0; font-size: 1.3rem; }

fieldset.day-picker {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

/* ===================== Login / registration =====================

.auth {
    max-width: 460px;
    margin: 24px auto;
    padding: 32px;
}

.auth form { max-width: none; margin-bottom: 16px; }
.auth > p:last-child { margin: 0; text-align: center; }

/* ===================== Error page ===================== */

.empty-page {
    text-align: center;
    padding: 64px 0;
}

.empty-page .code {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--color-primary);
    margin: 0;
}

/* ===================== Statistics ===================== */

.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.figure { display: grid; gap: 2px; padding: 14px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); }
.figure-label { color: var(--color-muted); font-size: 0.85rem; }
.figure-value { font-size: 1.5rem; line-height: 1.2; }
.stats-block { margin: 16px 0; }
.stats-block h2 { margin-top: 0; }
.stats-block h3 { margin: 16px 0 8px; font-size: 0.95rem; color: var(--color-muted); }
.period-picker { margin: 8px 0; }
.chart { margin: 8px 0 0; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 160px; padding: 0 0 2px; border-bottom: 1px solid var(--color-border-strong); }
.bar { flex: 1 1 0; min-width: 1px; background: var(--color-primary); border-radius: 2px 2px 0 0; opacity: 0.85; }
.bar:hover { opacity: 1; }
.bars-axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 0.8rem; color: var(--color-muted); }
.row-bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.row-bars li { display: grid; grid-template-columns: minmax(80px, 150px) 1fr auto; align-items: center; gap: 10px; }
.row-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-track { height: 10px; border-radius: 5px; background: var(--color-bg); overflow: hidden; }
.row-fill { display: block; height: 100%; border-radius: 5px; background: var(--color-primary); }
.row-value { font-variant-numeric: tabular-nums; color: var(--color-muted); }

/* ===================== Zones searched (admin) ===================== */

.zone-map { height: 320px; border-radius: var(--radius); overflow: hidden; margin: 8px 0 12px; }
.zone-list { margin-top: 8px; }
.zone-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }

/* ===================== Install the app ===================== */

.install { max-width: 640px; margin: 0 auto; }
.install-card { margin: 16px 0; }
.install-card h2 { margin-top: 0; }
.install-steps { list-style: none; counter-reset: step; display: grid; gap: 14px; padding: 0; margin: 0; }
.install-steps li { counter-increment: step; display: flex; align-items: center; gap: 12px; }
.install-steps li::before {
    content: counter(step);
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.install-icon { flex: none; display: inline-flex; padding: 6px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); color: var(--color-primary); }
.install-icon svg.icon { width: 22px; height: 22px; }
.install-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; padding: 12px 14px; border-radius: var(--radius); background: var(--color-primary-soft); }
.install-hint p { margin: 0; flex: 1 1 220px; }

/* ===================== Hours: several days at once ===================== */

.hours-bulk { display: grid; gap: 12px; margin-bottom: 20px; }
.hours-bulk h3 { margin: 0; }
.hours-bulk .option-row { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.hours-bulk .time-range { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.hours-bulk .time-range > span:first-child { min-width: 11em; }
.day-presets { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
button.small { min-height: 32px; padding: 4px 10px; font-size: 0.85rem; }

/* ===================== Reports ===================== */

.link-button { min-height: 0; padding: 0; border: 0; background: none; color: var(--color-muted); text-decoration: underline; font-size: 0.9rem; cursor: pointer; }
.link-button:hover { color: var(--color-primary); }
.report-list { display: grid; gap: 12px; margin-top: 16px; }
.report { display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: start; }
.report-photo { width: 140px; }
.report-photo img { width: 140px; height: 105px; object-fit: cover; border-radius: var(--radius-sm); display: block; }
@media (max-width: 600px) { .report { grid-template-columns: 1fr; } }

/* ===================== Support ===================== */

.support-list { display: grid; gap: 10px; margin-top: 12px; }
.support-row { display: block; color: inherit; text-decoration: none; }
.support-row:hover { border-color: var(--color-primary); }
.support-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.support-row p { margin: 4px 0 0; }
.support-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 8px; }
.support-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 12px 0; }
.support-thread { display: grid; gap: 12px; margin: 16px 0; }
.support-message { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 12px 14px; background: var(--color-surface); }
.support-message.from-team { border-color: var(--color-primary); background: var(--color-primary-soft); }
.support-message.internal { border-style: dashed; background: var(--color-warning-bg); }
.support-message header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 6px; }
.support-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.support-photos { margin-top: 10px; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.support-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); display: block; }
.support-history { list-style: none; padding: 0; display: grid; gap: 4px; }
.badge.support-open { color: var(--color-warning); background: var(--color-warning-bg); }
.badge.support-waiting_user { color: var(--color-primary); background: var(--color-primary-soft); }
.badge.support-resolved { color: var(--color-success); background: var(--color-success-bg); }
.badge.support-closed { color: var(--color-muted); background: var(--color-bg); }
.badge.support-priority-high { color: var(--color-error); background: var(--color-error-bg); }
.badge.support-priority-low { color: var(--color-muted); background: var(--color-bg); }

/* ===================== Contact ===================== */

/* The bots' trap: out of the page and out of the way of screen readers and keyboards (the wrapper is aria-hidden) */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-list { display: grid; gap: 12px; margin-top: 16px; }
.contact header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 8px; }
.contact-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 12px; }

/* ===================== Photo cropper ===================== */

.cropper-dialog, .report-dialog {
    border: 0;
    border-radius: var(--radius);
    padding: 20px;
    max-width: calc(100vw - 24px);
    box-shadow: var(--shadow);
    overscroll-behavior: contain;
}
.cropper-dialog::backdrop, .report-dialog::backdrop { background: rgb(15 23 42 / 0.6); }
.cropper-dialog h2, .report-dialog h2 { margin: 0 0 12px; font-size: 1.1rem; }
.report-dialog { width: min(440px, calc(100vw - 24px)); }
.report-dialog .row-actions { justify-content: flex-end; }
.cropper-stage {
    position: relative;
    overflow: hidden;
    margin: 0 auto 12px;
    border-radius: var(--radius-sm);
    background: #0f172a;
    cursor: grab;
    touch-action: none;  /* the gestures are ours: no page scroll or browser zoom while framing */
    user-select: none;
    -webkit-user-select: none;
}
.cropper-stage:active { cursor: grabbing; }
.cropper-stage:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }
.cropper-stage.is-round { border-radius: 50%; }
.cropper-image {
    position: absolute;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    max-width: none;
    transform-origin: 0 0;
    -webkit-user-drag: none;
    pointer-events: none;
}
.cropper-zoom { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cropper-zoom input { flex: 1; min-height: var(--control-height); padding: 0; }
.cropper-dialog .row-actions { justify-content: flex-end; }

/* ===================== Photo viewer ===================== */

html.viewer-open { overflow: hidden; }
.photo-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }

.viewer {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    color: #fff;
    background: rgb(8 12 24 / calc(0.97 * var(--viewer-fade, 1)));
    overflow: hidden;
    overscroll-behavior: contain;
}
.viewer:focus { outline: none; }
.viewer::backdrop { background: transparent; }
.viewer [hidden] { display: none !important; }
.viewer-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;  /* swipe, pinch and drag are ours: the browser must not scroll or zoom the page */
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}
.viewer-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform-origin: center;
    will-change: transform;
    -webkit-user-drag: none;
}
.viewer-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(env(safe-area-inset-top) + 8px) calc(env(safe-area-inset-right) + 12px) 24px calc(env(safe-area-inset-left) + 12px);
    background: linear-gradient(rgb(0 0 0 / 0.55), transparent);
    pointer-events: none;
}
.viewer-top > * { pointer-events: auto; }
.viewer-counter { font-weight: 600; text-shadow: 0 1px 3px rgb(0 0 0 / 0.6); }
.viewer-tools { display: flex; gap: 8px; }
.viewer-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgb(255 255 255 / 0.16);
}
.viewer-button:hover:not(:disabled) { background: rgb(255 255 255 / 0.3); }
.viewer-button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.viewer-button:disabled { opacity: 0.35; }
.viewer-button svg.icon { width: 22px; height: 22px; stroke-width: 2.2; }
.viewer-prev, .viewer-next { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); }
.viewer-prev { left: calc(env(safe-area-inset-left) + 12px); }
.viewer-next { right: calc(env(safe-area-inset-right) + 12px); }
.viewer-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 24px 16px calc(env(safe-area-inset-bottom) + 12px);
    text-align: center;
    background: linear-gradient(transparent, rgb(0 0 0 / 0.6));
    pointer-events: none;
}
.viewer-caption { margin: 0; text-shadow: 0 1px 3px rgb(0 0 0 / 0.6); }
.viewer-message { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; padding: 24px; text-align: center; pointer-events: none; }
@media (pointer: coarse) {
    .viewer-prev, .viewer-next, .viewer-zoom { display: none; }  /* fingers have swipe and pinch */
}

/* ===================== Small screens ===================== */

@media (max-width: 600px) {
    main { padding: 24px 16px 48px; }
    nav { padding: 0 16px; }
    .nav-links { gap: 14px; font-size: 0.95rem; }
    .list li.catalog-row { grid-template-columns: 1fr; }
    .hours-row { grid-template-columns: 1fr; gap: 4px; }
}

/* Instructions before coming */
.instructions {
    margin: 12px 0;
    padding: 12px 14px;
    border-left: 3px solid var(--color-primary);
    background: var(--color-bg);
    border-radius: var(--radius-sm);
}
.instructions p { margin: 4px 0 0; }

/* Notifications */
.nav-links a.bell { position: relative; display: inline-flex; align-items: center; }
.bell svg.icon { width: 20px; height: 20px; }
.bell-badge {
    position: absolute;
    top: -6px;
    right: -9px;
    min-width: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--color-error);
    color: #fff;
    font-size: 0.7rem;
    line-height: 16px;
    text-align: center;
}
.notification-list { display: grid; gap: 8px; }
.card.notification { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card.notification > a { flex: 1; text-decoration: none; color: inherit; }
.card.notification p { margin: 0 0 4px; }
.notification.unread { border-left: 3px solid var(--color-primary); font-weight: 600; }
.notification.unread .muted { font-weight: 400; }

/* Employees */
.list li.staff-row { display: block; }
.staff-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.permission-picker { margin-top: 10px; display: grid; gap: 8px; }
.permission-picker select { width: 100%; }
.permission-boxes { display: grid; gap: 4px; }
.permission-boxes label { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.permission-boxes input { width: auto; flex: none; margin: 0; }
.staff-row > button { margin-top: 10px; }
#new-permissions { margin-bottom: 12px; }

/* Long option texts must not push the page wider than the screen */
select { max-width: 100%; }
.permission-picker label { min-width: 0; }

/* Personal home */
.dash-sections { display: grid; gap: 32px; }
.shortcut-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
a.card.shortcut { text-decoration: none; color: inherit; }
.shortcut svg.icon { width: 24px; height: 24px; color: var(--color-primary); margin-bottom: 6px; }

/* On narrow phones the header keeps only the logo icon: the menu needs the room */
@media (max-width: 440px) {
    .brand-name { display: none; }
    .nav-links { gap: 12px; }
}
.dash-carwash-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.dash-carwash h3 { margin: 0; }
.dash-carwash .list { margin: 0 0 8px; }
.dash-carwash .row-actions { margin-top: 8px; }

/* Admin numbers and filters */
.card.stat { display: grid; gap: 2px; text-decoration: none; color: inherit; }
.stat-value { font-size: 1.8rem; line-height: 1.1; color: var(--color-primary); }
.stat.attention .stat-value { color: var(--color-error); }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.filter-row input { flex: 1 1 220px; }

/* ===================== Private area shell (shell.js) ===================== */
/* Wide screens: fixed side menu. Phones: top bar + bottom tabs + "More" sheet. */

:root { --sidebar-width: 248px; --tabs-height: calc(64px + env(safe-area-inset-bottom, 0px));  /* the home bar of the iPhone sits below the tabs */ }

.app-nav { display: none; }
.app-tabs { display: none; }
.app-topbar { display: none; }

body.app #site-footer { display: none; }

.app-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
}
.app-nav-item:hover { background: var(--color-bg); color: var(--color-text); }
.app-nav-item.active { background: var(--color-primary-soft); color: var(--color-primary); font-weight: 650; }
.app-nav-item svg.icon { color: var(--color-muted); }
.app-nav-item.active svg.icon { color: var(--color-primary); }

.nav-badge {
    margin-left: auto;
    min-width: 20px;
    padding: 0 6px;
    border-radius: var(--radius-pill);
    background: var(--color-error);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}

.space-switcher { width: 100%; margin: 4px 0 12px; font-weight: 600; }

.crumbs { font-size: 0.9rem; color: var(--color-muted); margin-bottom: 4px; }
.crumbs a { color: var(--color-muted); }

@media (min-width: 900px) {
    body.app #site-header { display: none; }
    body.app { padding-left: var(--sidebar-width); }  /* room for the fixed side menu */

    .app-nav {
        display: flex;
        flex-direction: column;
        gap: 4px;
        position: fixed;
        inset: 0 auto 0 0;
        width: var(--sidebar-width);
        padding: 20px 14px;
        background: var(--color-surface);
        border-right: 1px solid var(--color-border);
        overflow-y: auto;
        z-index: 1000;
    }
    .app-nav .brand { margin: 0 6px 16px; }
    .app-nav-items { display: grid; gap: 2px; }
    .app-nav-footer { margin-top: auto; display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--color-border); }
}

@media (max-width: 899px) {
    body.app main { padding-bottom: calc(var(--tabs-height) + 32px); }

    .app-topbar {
        display: flex;
        align-items: center;
        gap: 12px;
        height: 56px;
        padding: 0 16px;
    }
    .app-topbar-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .app-topbar .bell { position: relative; display: inline-flex; color: var(--color-muted); }
    .app-topbar .bell svg.icon { width: 22px; height: 22px; }
    .app-topbar .nav-badge { position: absolute; top: -6px; right: -10px; min-width: 16px; line-height: 16px; font-size: 0.7rem; padding: 0 4px; }

    .app-tabs {
        display: flex;
        position: fixed;
        inset: auto 0 0 0;
        height: var(--tabs-height);
        padding-bottom: env(safe-area-inset-bottom);
        background: rgb(255 255 255 / 0.96);
        border-top: 1px solid var(--color-border);
        z-index: 1000;
    }
    .app-tab {
        flex: 1;
        min-width: 0;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: none;
        color: var(--color-muted);
        font-size: 0.72rem;
        font-weight: 600;
        text-decoration: none;
        min-height: 0;
    }
    .app-tab span:not(.nav-badge) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .app-tab svg.icon { width: 22px; height: 22px; }
    .app-tab.active { color: var(--color-primary); }
    .app-tab:hover { background: none; color: var(--color-primary); }
    .app-tab .nav-badge { position: absolute; top: 6px; left: 55%; min-width: 16px; line-height: 16px; font-size: 0.65rem; padding: 0 4px; }

    .app-sheet {
        position: fixed;
        inset: 0;
        z-index: 1100;
        background: rgb(15 23 42 / 0.4);
        display: flex;
        align-items: flex-end;
    }
    .app-sheet[hidden] { display: none; }
    .app-sheet-panel {
        width: 100%;
        max-height: 80vh;
        overflow-y: auto;
        padding: 16px 16px calc(var(--tabs-height) + 16px);
        background: var(--color-surface);
        border-radius: var(--radius) var(--radius) 0 0;
        display: grid;
        gap: 2px;
    }
    .app-sheet-panel hr { width: 100%; border: 0; border-top: 1px solid var(--color-border); margin: 8px 0; }
}

.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

/* ===================== Feedback (feedback.js) ===================== */

.toasts {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 1200;
    display: grid;
    gap: 8px;
    width: min(420px, calc(100% - 32px));
    pointer-events: none;
}
.toast {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--color-text);
    color: #fff;
    box-shadow: var(--shadow);
    font-weight: 500;
    animation: toast-in 0.2s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 899px) { body.app .toasts { bottom: calc(var(--tabs-height) + 16px); } }

.confirm-dialog {
    width: min(440px, calc(100% - 32px));
    padding: 24px;
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.confirm-dialog::backdrop { background: rgb(15 23 42 / 0.45); }
.confirm-dialog p { margin-bottom: 20px; }
.confirm-dialog .row-actions { justify-content: flex-end; }
button.danger-solid { background: var(--color-error); border-color: var(--color-error); color: #fff; }
button.danger-solid:hover { background: var(--color-error-hover); border-color: var(--color-error-hover); }

/* Start-up checklist */
.checklist { margin-bottom: 20px; padding: 16px 20px; border-left: 3px solid var(--color-warning); }
.checklist.ready { border-left-color: var(--color-success); }
.checklist h2 { margin: 0 0 8px; font-size: 1.1rem; }
.checklist li { display: flex; align-items: flex-start; justify-content: flex-start; gap: 10px; }
.check-mark {
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--color-border-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.checklist li.done .check-mark { border-color: var(--color-success); background: var(--color-success); color: #fff; }
.check-mark svg.icon { width: 14px; height: 14px; stroke-width: 3; }
.checklist li.done a { color: var(--color-muted); text-decoration: line-through; }
.setup-hint a { color: var(--color-warning); font-weight: 600; }

/* Profile (read-only data) */
.profile-card { max-width: 520px; }
.profile-head { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
.profile-id { min-width: 0; }
.profile-id h2 { margin: 0; word-break: break-word; }
.profile-id p { margin: 4px 0 0; word-break: break-word; }

/* ===================== Price table (public) ===================== */

.price-table-wrap { padding: 0; }  /* no overflow clipping: the info tooltips hang outside the card */
.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--color-border); }
.price-table thead th { font-size: 0.85rem; color: var(--color-muted); font-weight: 600; white-space: nowrap; }
.price-table tbody tr:last-child > * { border-bottom: 0; }
.service-cell { font-weight: 600; min-width: 180px; }
.service-cell .offering-extras { font-weight: 400; margin-top: 4px; }
/* An extra on ONE line: the name takes the room, the price (or the green "Omaggio") stays at the right and does not wrap under the name */
.service-cell .offering-extras li, .price-extras li { flex-wrap: nowrap; align-items: baseline; }
.service-cell .extra-name, .price-extras .extra-name { flex: 1 1 auto; min-width: 0; }
.service-cell .offering-extras li > :last-child, .price-extras li > :last-child { flex: none; white-space: nowrap; }
.offering-extras .badge.gift { font-size: 0.78rem; padding: 1px 8px; }
.price-cell { white-space: nowrap; }
.price-link { display: grid; gap: 0; text-decoration: none; color: inherit; padding: 6px 10px; margin: -6px -10px; border-radius: var(--radius-sm); }
.price-link:hover { background: var(--color-primary-soft); color: var(--color-primary); }
.price-link .muted { font-size: 0.8rem; }
.price-cell.unavailable { color: var(--color-muted); }

@media (max-width: 700px) {
    /* One card per service: the vehicle types become labelled lines */
    .price-table, .price-table tbody, .price-table tr, .price-table th, .price-table td { display: block; }
    .price-table thead { display: none; }
    .price-table tr { padding: 12px 16px; border-bottom: 1px solid var(--color-border); }
    .price-table tbody tr:last-child { border-bottom: 0; }
    .price-table th, .price-table td { padding: 4px 0; border: 0; }
    .price-cell { display: flex !important; align-items: center; justify-content: space-between; gap: 12px; }
    .price-cell::before { content: attr(data-label); color: var(--color-muted); }
    .price-link { margin: 0; text-align: right; }
}

/* ===================== Price list editor (owner) ===================== */

.service-list { display: grid; gap: 16px; }
.service-card h3, .service-card h4 { margin: 0; }
.service-card h4 { margin: 16px 0 6px; }
.price-matrix { width: 100%; border-collapse: collapse; margin: 12px 0; }
.price-matrix th { text-align: left; font-size: 0.85rem; color: var(--color-muted); padding: 4px 8px 4px 0; }
.price-matrix td { padding: 4px 8px 4px 0; }
.matrix-vehicle { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.matrix-vehicle input { width: auto; flex: none; margin: 0; }
.price-matrix .price-input, .price-matrix .duration-input { width: 90px; }
.service-card textarea { width: 100%; }

/* ===================== Guided set-up (wizard.js) ===================== */

.wizard-bar { margin-bottom: 16px; }
.wizard-bar p { margin: 0 0 6px; font-size: 0.9rem; }
.wizard-steps { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; flex-wrap: wrap; }
.wizard-steps li {
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: var(--color-border);
    color: var(--color-muted);
    font-size: 0.85rem;
    font-weight: 600;
}
.wizard-steps li a { color: inherit; text-decoration: none; }
.wizard-steps li.done { background: var(--color-success-bg); color: var(--color-success); }
.wizard-steps li.current { background: var(--color-primary); color: #fff; }
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }

/* Pick-up distance bands */
.band-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.terms-text { white-space: pre-wrap; margin: 8px 0 0; color: var(--color-muted); }
.terms-version summary { cursor: pointer; font-weight: 600; }

/* Pick-up on booking cards and the trip */
.pickup-info { margin: 6px 0; padding: 8px 12px; border-left: 3px solid var(--color-primary); background: var(--color-bg); border-radius: var(--radius-sm); }
.pickup-info p { margin: 2px 0; }
.trip-progress { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; }
.trip-progress li { padding: 2px 10px; border-radius: var(--radius-pill); background: var(--color-border); color: var(--color-muted); font-size: 0.8rem; font-weight: 600; }
.trip-progress li.done { background: var(--color-success-bg); color: var(--color-success); }
.trip-progress li.current { background: var(--color-primary); color: #fff; }
.pickups-map { height: 260px; margin-bottom: 12px; }

/* Handover */
.handover-box { margin: 8px 0; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--color-primary-soft); }
.handover-box p { margin: 4px 0; }
.handover-box .who { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.pin { font-size: 1.5rem; letter-spacing: 0.2em; color: var(--color-primary); }
.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.avatar-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.handover-gallery { margin-top: 8px; display: grid; gap: 8px; }
.handover-gallery .photo-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.terms-box { white-space: pre-wrap; max-height: 180px; overflow-y: auto; padding: 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-bg); font-size: 0.9rem; margin-bottom: 8px; }
.pickup-badge { margin-left: 0; margin-top: 4px; }
.service-cell .pickup-badge { display: inline-block; }
.check-row.plain span:last-child { margin-left: 0; }
.notification-actions { display: flex; align-items: center; gap: 6px; }

.car-card { margin-bottom: 12px; }
.car-head { display: flex; align-items: center; gap: 8px; }
.car-head .badge { margin-left: 0; }
.notification-actions button.icon-only { min-width: 40px; min-height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* "Which car?" picker; its tooltips span the picker so they are never cut off at the screen edge */
.vehicle-picker { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-bottom: 16px; }
.vehicle-picker .info-tip { position: static; }
.vehicle-picker .info-tip::after { left: 0; right: 0; transform: none; width: auto; max-width: none; }
.chip-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip-wrap { display: inline-flex; align-items: center; }
.chip { min-height: 36px; padding: 0 14px; border-radius: var(--radius-pill); }
.chip.active { background: var(--color-primary); color: #fff; }
#vehicle-picker { margin-bottom: 8px; }
.price-rows { display: grid; gap: 10px; }
.price-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; margin: 0; }
.price-row .price-extras { grid-column: 1 / -1; margin: 2px 0 0; }
.price-row .price-cell { display: flex; flex-direction: column; align-items: flex-end; }
.price-row.unavailable { opacity: 0.6; }
.from-price { margin: 4px 0 0; font-weight: 600; }

.avatar-large { width: 72px; height: 72px; }
.avatar.placeholder { display: inline-flex; align-items: center; justify-content: center; background: var(--color-primary-soft); color: var(--color-primary); }
.avatar.placeholder .icon { width: 32px; height: 32px; }
.customer-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.car-title { font-size: 1.2rem; }
.chip-title { font-weight: 600; }
.chip-sub { margin-left: 6px; font-size: 0.8rem; font-weight: 400; opacity: 0.75; }

.app-nav-group { margin: 16px 12px 4px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-muted); }
.app-sheet-panel .app-nav-group:first-child { margin-top: 4px; }
.mode-card { display: grid; gap: 6px; cursor: pointer; margin-bottom: 12px; }
.mode-head { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.mode-head input { width: auto; flex: none; }
.badge.neutral { color: var(--color-muted); background: var(--color-primary-soft); margin-left: 0; margin-right: 6px; }
.mode-badges { margin: 4px 0 0; }

.car-row { display: flex; align-items: center; gap: 12px; }
.car-row p { margin: 0; }
.car-info { min-width: 0; }
.car-info p { margin: 2px 0 0; }
.car-thumb { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 72px; height: 72px; overflow: hidden; border-radius: var(--radius-sm); background: var(--color-primary-soft); color: var(--color-primary); }
.car-thumb.small { width: 48px; height: 48px; }
.car-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.car-thumb a { display: block; width: 100%; height: 100%; }
.car-thumb .icon { width: 28px; height: 28px; }

.verify-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 16px; padding: 12px 16px; border-radius: var(--radius-sm); color: var(--color-warning); background: var(--color-warning-bg); }
.verify-banner p { margin: 0; }
.verify-banner .message { flex-basis: 100%; }

.danger-zone { border-color: var(--color-error); }

.badge.verified { color: var(--color-success); background: var(--color-success-bg); }
.badge.verified .icon { width: 14px; height: 14px; margin-right: 2px; }
#verified-badge { margin: 4px 0 8px; }
.reject-form { margin-top: 12px; }

.more-button { display: block; margin: 12px auto; }
.grid .more-button { grid-column: 1 / -1; }
.avatar-xl { width: 96px; height: 96px; flex: none; }
.avatar.placeholder.avatar-xl .icon { width: 44px; height: 44px; }

/* Photos chosen in the handover dialog: small thumbnails with a remove button */
.handover-thumbs { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
.handover-thumbs .photo { position: relative; }
.handover-thumbs .photo img { aspect-ratio: 1; object-fit: cover; }
.handover-thumbs .photo button { position: absolute; top: 2px; right: 2px; min-height: 0; padding: 0 8px; }
.handover-thumbs:empty { display: none; }

/* A mascot with a short text: empty lists, a booking just made, where the car is */
.empty-note { text-align: center; padding: 12px 0; }
.empty-note .mascot { width: 88px; height: 88px; margin-bottom: 4px; }
.mascot-banner { display: flex; align-items: center; gap: 12px; }
.mascot-banner .mascot { flex: none; width: 64px; height: 64px; margin: 0; }

/* Map pins of the car washes: colour = status, symbol = kind */
.pin-wrap { background: none; border: 0; }
.pin {
    width: 34px; height: 34px; box-sizing: border-box;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
    border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
    color: #fff;
}
.pin .icon { width: 18px; height: 18px; transform: rotate(45deg); stroke: currentColor; fill: none; stroke-width: 2; }
.pin-partner { background: #16a34a; }
.pin-selfservice { background: #2563eb; }
.pin-unclaimed { background: #8a94a3; }

/* The filter and the kind labels of the explore page */
.explore-filter { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.explore-filter input { width: auto; }
.kind-note { margin: 4px 0 12px; }

/* Wash type icons (a hand, two rollers) with a tooltip, and the coloured chips of the cards */
.wash-icons { display: inline-flex; gap: 6px; margin-left: 8px; vertical-align: middle; }
.wash-icon.info-tip {
    width: 26px; height: 26px; margin: 0; border: 0; border-radius: 50%;
    background: var(--color-primary-soft); color: var(--color-primary); font-style: normal; cursor: help;
}
.wash-icon .icon { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.badge.bookable { color: var(--color-success); background: var(--color-success-bg); margin-left: 0; margin-right: 6px; }
.badge.pickup { color: var(--color-primary); background: var(--color-primary-soft); margin-left: 0; margin-right: 6px; }
.badge.selfservice { color: #4338ca; background: #eef2ff; margin-left: 0; margin-right: 6px; }
.badge.unclaimed { color: var(--color-warning); background: var(--color-warning-bg); margin-left: 0; margin-right: 6px; }
.explore-filters { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 12px; font-size: 0.9rem; }
.explore-filters .explore-filter { margin: 0; }

