:root {
    --blue: #000091;
    --blue-dark: #00006d;
    --blue-soft: #ececfe;
    --red: #e1000f;
    --red-dark: #b6000c;
    --green: #18753c;
    --green-soft: #b8fec9;
    --orange: #b34000;
    --orange-soft: #ffe9e5;
    --grey-050: #f6f6f6;
    --grey-100: #eeeeee;
    --grey-300: #cecece;
    --grey-600: #666666;
    --grey-900: #1e1e1e;
    --white: #ffffff;
    --shadow: 0 8px 30px rgba(0, 0, 18, .08);
    --radius: 10px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--grey-050); }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--grey-900);
    background: linear-gradient(180deg, #f7f7ff 0, var(--grey-050) 360px);
    font-family: Marianne, Arial, Helvetica, sans-serif;
    line-height: 1.5;
}
a { color: var(--blue); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, .btn { min-height: 44px; }
.offline-banner { position: sticky; top: 0; z-index: 80; padding: 10px 16px; color: var(--white); background: var(--red); text-align: center; font-weight: 700; }
.container { width: min(1240px, calc(100% - 32px)); margin-inline: auto; }

.site-header { background: var(--white); border-bottom: 4px solid var(--blue); box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.header-inner { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 16px; color: var(--grey-900); text-decoration: none; }
.brand img { width: 152px; height: auto; display: block; object-fit: contain; }
.brand span { display: flex; flex-direction: column; border-left: 1px solid var(--grey-300); padding-left: 16px; }
.brand strong { color: var(--blue); font-size: 1.25rem; }
.brand small { color: var(--grey-600); }
.main-nav { display: flex; align-items: center; gap: 5px; }
.main-nav > a, .nav-link-button { display: inline-flex; align-items: center; padding: 10px 12px; color: var(--grey-900); text-decoration: none; border: 0; background: transparent; cursor: pointer; }
.main-nav > a:hover, .nav-link-button:hover { color: var(--blue); background: var(--blue-soft); }
.nav-form { display: inline-flex; }
.nav-toggle { display: none; border: 1px solid var(--blue); color: var(--blue); background: var(--white); border-radius: 6px; padding: 8px 14px; }
.mobile-bottom-nav { display: none; }

.page-content { min-height: calc(100vh - 150px); padding-block: 36px 64px; }
.site-footer { padding: 20px 0; color: var(--grey-600); background: var(--white); border-top: 1px solid var(--grey-300); font-size: .9rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading h1 { margin: 2px 0 6px; color: var(--blue); font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.15; }
.page-heading p { margin: 0; color: var(--grey-600); }
.eyebrow { color: var(--red); font-weight: 700; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
h2 { color: var(--blue); margin-top: 0; }

.panel { background: var(--white); border: 1px solid #e3e3e3; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.narrow-panel { max-width: 620px; }
.selection-panel { margin-bottom: 24px; }
.selection-form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(240px, 1.4fr) auto; gap: 16px; align-items: end; }
.booking-selection .hourly-picker { grid-column: 1 / -1; }
.selection-submit { align-self: end; }
.selection-form label, .stack-form label, .form-grid label { display: flex; flex-direction: column; gap: 6px; color: #3a3a3a; font-weight: 700; }
input, select, textarea { width: 100%; color: var(--grey-900); background: var(--white); border: 1px solid #929292; border-radius: 5px; padding: 10px 12px; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(0,0,145,.18); border-color: var(--blue); }
label small { color: var(--grey-600); font-weight: 400; }
.stack-form { display: grid; gap: 16px; }
.form-grid { display: grid; gap: 16px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.hourly-picker { margin: 0; padding: 16px; border: 1px solid var(--grey-300); border-radius: 8px; background: #fafaff; }
.hourly-picker[hidden] { display: none; }
.hourly-picker legend { padding-inline: 6px; color: var(--blue); font-weight: 800; }
.hourly-picker > p { margin: 0 0 12px; color: var(--grey-600); font-size: .9rem; }
.slot-grid { display: grid; grid-template-columns: repeat(5, minmax(110px, 1fr)); gap: 8px; }
.slot-choice { position: relative; cursor: pointer; }
.slot-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.slot-choice span { display: grid; place-items: center; min-height: 42px; padding: 7px 8px; color: var(--blue); background: var(--white); border: 1px solid var(--blue); border-radius: 6px; font-weight: 700; }
.slot-choice input:checked + span { color: var(--white); background: var(--blue); box-shadow: 0 0 0 3px rgba(0,0,145,.13); }
.slot-choice input:focus-visible + span { outline: 3px solid rgba(0,0,145,.25); outline-offset: 2px; }
.selection-summary { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 11px 14px; color: var(--blue); background: var(--blue-soft); border-radius: 6px; }
.selection-summary strong { padding-right: 12px; border-right: 1px solid rgba(0,0,145,.25); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 5px; padding: 9px 16px; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-primary { color: var(--white); background: var(--blue); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { color: var(--blue); background: var(--white); border-color: var(--blue); }
.btn-secondary:hover { background: var(--blue-soft); }
.btn-danger { color: var(--white); background: var(--red); }
.btn-danger:hover { background: var(--red-dark); }
.btn-ghost { color: var(--blue); background: transparent; }
.btn-small { min-height: 34px; padding: 5px 10px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn:disabled, button:disabled { cursor: not-allowed; opacity: .7; }

.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--grey-100); color: var(--grey-600); font-size: .9rem; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 2px solid transparent; }
.legend-dot.available { background: var(--green); }
.legend-dot.reserved { background: var(--red); }
.legend-dot.mine { background: #e47900; }
.legend-dot.restricted { background: #777; }

.zone-panel { margin-bottom: 24px; }
.parking-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.parking-overview a { display: grid; grid-template-columns: 48px 1fr; gap: 2px 12px; align-items: center; padding: 16px; color: var(--grey-900); background: var(--white); border: 1px solid var(--grey-300); border-radius: 9px; box-shadow: var(--shadow); text-decoration: none; }
.parking-overview a:hover { border-color: var(--blue); transform: translateY(-2px); }
.parking-overview-icon { grid-row: span 2; display: grid; place-items: center; width: 48px; height: 48px; color: var(--white); background: var(--blue); border-radius: 50%; font-weight: 800; }
.parking-overview a > span:nth-child(2) { min-width: 0; }
.parking-overview strong, .parking-overview small { display: block; }
.parking-overview small { overflow: hidden; color: var(--grey-600); text-overflow: ellipsis; white-space: nowrap; }
.parking-overview b { grid-column: 2; color: var(--green); font-size: .88rem; }
.zone-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.zone-heading h2 { margin-bottom: 2px; }
.zone-heading p { margin: 0; color: var(--grey-600); }
.zone-info-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.zone-info-links .btn { text-decoration: none; }
.zone-kicker { display: block; margin-bottom: 2px; color: var(--red); font-size: .75rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.availability-count { color: var(--green); background: var(--green-soft); border-radius: 20px; padding: 6px 12px; font-weight: 700; white-space: nowrap; }
.parking-map-scroll { overflow-x: auto; border: 1px solid var(--grey-300); border-radius: 8px; background: #fff; }
.parking-map { position: relative; min-width: 980px; }
.parking-map > img { width: 100%; height: auto; display: block; }
.map-spot-form { position: absolute; transform: translate(-50%, -50%); margin: 0; }
.spot-jm-01 { left: 20.50%; top: 11.60%; }
.spot-jm-02 { left: 20.50%; top: 18.70%; }
.spot-jm-03 { left: 20.50%; top: 26.70%; }
.spot-jm-04 { left: 20.50%; top: 34.70%; }
.spot-jm-05 { left: 20.50%; top: 42.50%; }
.spot-jm-06 { left: 20.50%; top: 50.40%; }
.spot-jm-07 { left: 20.50%; top: 58.30%; }
.spot-jm-08 { left: 20.50%; top: 66.20%; }
.spot-jm-09 { left: 20.50%; top: 74.20%; }
.spot-jm-10 { left: 20.50%; top: 82.10%; }
.spot-jm-11 { left: 20.50%; top: 90.00%; }
.spot-jm-12 { left: 20.50%; top: 97.00%; }
.spot-jm-22 { left: 35.50%; top: 87.00%; }
.spot-jm-31 { left: 67.00%; top: 23.80%; }
.spot-jm-32 { left: 67.00%; top: 15.80%; }
.spot-jm-33 { left: 79.50%; top: 17.80%; }
.spot-jm-34 { left: 79.50%; top: 26.80%; }
.spot-jm-35 { left: 79.50%; top: 35.40%; }
.map-spot { width: 38px; height: 38px; min-height: 38px; padding: 0; border-radius: 50%; border: 3px solid var(--white); box-shadow: 0 2px 8px rgba(0,0,0,.35); color: var(--white); font-weight: 800; cursor: pointer; }
.map-spot.status-available { background: var(--green); animation: subtle-pulse 2.7s infinite; }
.map-spot.status-available:hover { transform: scale(1.15); }
.map-spot.status-reserved { background: var(--red); }
.map-spot.status-mine { background: #e47900; }
.map-spot.status-restricted, .map-spot.status-inactive { background: #6a6a6a; }
.map-retired-spot { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; transform: translate(-50%, -50%); border: 3px solid #6a6a6a; border-radius: 50%; background: #fff; color: #6a6a6a; font-weight: 800; box-shadow: 0 2px 8px rgba(0,0,0,.28); }
.map-retired-spot::after { content: ""; position: absolute; width: 48px; height: 4px; border-radius: 2px; background: var(--red); transform: rotate(-38deg); }
.retired-jm-23 { left: 65.00%; top: 87.00%; }
.visual-caption { margin: 12px 0 0; color: var(--grey-600); font-size: .9rem; }
@keyframes subtle-pulse { 0%, 100% { box-shadow: 0 2px 8px rgba(0,0,0,.3); } 50% { box-shadow: 0 0 0 7px rgba(24,117,60,.16); } }

.parking-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.spot-card { display: grid; grid-template-columns: 42px 1fr; gap: 3px 12px; align-items: center; padding: 16px; border: 2px solid var(--grey-300); border-radius: 8px; background: var(--white); }
.spot-card .spot-icon { grid-row: span 2; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 7px; background: var(--blue); color: white; font-weight: 800; font-size: 1.4rem; }
.spot-card small { color: var(--grey-600); }
.spot-card .btn { grid-column: 1 / -1; margin-top: 10px; }
.spot-card.status-available { border-color: var(--green); }
.spot-card.status-available .btn { color: white; background: var(--green); }
.spot-card.status-reserved { border-color: var(--red); background: #fff5f5; }
.spot-card.status-mine { border-color: #e47900; background: #fff8eb; }
.spot-card.status-restricted, .spot-card.status-inactive { background: var(--grey-100); }
.parking-lot-visual { overflow: hidden; border: 1px solid #adb5bd; border-radius: 10px; background: #e9ecef; }
.lot-road { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 70px; color: #fff; background: #59636d; font-weight: 700; }
.lot-road i { font-size: 2rem; font-style: normal; }
.lot-spaces { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; padding: 18px; }
.visual-space { display: grid; grid-template-columns: 54px 1fr; gap: 2px 10px; min-height: 170px; padding: 14px; background: var(--white); border: 3px solid var(--grey-300); border-radius: 6px 6px 18px 18px; }
.visual-space::before { content: ""; grid-column: 1 / -1; height: 8px; margin: -9px -8px 10px; background: repeating-linear-gradient(90deg, transparent 0 22px, #adb5bd 22px 26px); }
.visual-space-number { grid-row: 2 / span 2; display: grid; place-items: center; width: 54px; height: 54px; color: #fff; background: var(--blue); border-radius: 50%; font-size: 1.3rem; font-weight: 800; }
.visual-space small { color: var(--grey-600); }
.visual-space .btn { grid-column: 1 / -1; align-self: end; margin-top: 12px; }
.visual-space.status-available { border-color: var(--green); }
.visual-space.status-available .btn { color: #fff; background: var(--green); }
.visual-space.status-reserved { border-color: var(--red); background: #fff5f5; }
.visual-space.status-mine { border-color: #e47900; background: #fff8eb; }
.visual-space.status-restricted, .visual-space.status-inactive { background: var(--grey-100); }
.lot-entrance { padding: 10px 18px; color: #fff; background: #343a40; text-align: right; font-size: .85rem; font-weight: 700; }
.garage-visual { display: grid; grid-template-columns: minmax(160px, .6fr) minmax(260px, 1.4fr); gap: 18px; align-items: stretch; min-height: 260px; padding: 22px; background: linear-gradient(135deg, #d8dce0, #f1f3f5); border: 1px solid #adb5bd; border-radius: 10px; }
.garage-door { display: grid; place-items: center; min-height: 210px; color: #fff; background: repeating-linear-gradient(0deg, #444c54 0 16px, #57616a 16px 19px); border: 8px solid #343a40; border-bottom-width: 3px; }
.garage-door span { padding: 7px 12px; background: rgba(0,0,0,.6); border-radius: 4px; font-weight: 700; }
.garage-box { display: grid; grid-template-columns: 62px 1fr; gap: 12px; align-items: center; padding: 24px; background: var(--white); border: 3px solid var(--grey-300); border-radius: 8px; }
.garage-symbol { display: grid; place-items: center; width: 62px; height: 62px; color: #fff; background: var(--blue); border-radius: 10px; font-size: 2rem; font-weight: 800; }
.garage-box small { display: block; color: var(--grey-600); }
.garage-box .btn { grid-column: 1 / -1; }
.garage-box.status-available { border-color: var(--green); }
.garage-box.status-available .btn { color: #fff; background: var(--green); }
.garage-box.status-reserved { border-color: var(--red); background: #fff5f5; }
.garage-box.status-mine { border-color: #e47900; background: #fff8eb; }
.garage-box.status-restricted, .garage-box.status-inactive { background: var(--grey-100); }
.info-box { padding: 16px 20px; border-left: 5px solid var(--blue); background: var(--blue-soft); }

.auth-card { width: min(500px, 100%); margin: 36px auto; padding: 32px; background: var(--white); border-top: 6px solid var(--blue); box-shadow: var(--shadow); border-radius: var(--radius); }
.auth-card-wide { width: min(660px, 100%); }
.auth-heading { margin-bottom: 24px; }
.auth-heading h1 { margin: 4px 0 8px; color: var(--blue); }
.auth-heading p, .auth-footer { color: var(--grey-600); }
.auth-footer { text-align: center; margin: 20px 0 0; }
.offline-logo { display: block; width: min(260px, 100%); height: auto; margin-bottom: 28px; }

.alert { margin-bottom: 18px; padding: 13px 16px; border-left: 5px solid; background: var(--white); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.alert-success { border-color: var(--green); background: #f0fff4; }
.alert-danger { border-color: var(--red); background: #fff4f4; }
.alert-warning { border-color: #e47900; background: #fff8e8; }

.admin-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: -8px 0 24px; padding: 8px; background: var(--white); border: 1px solid var(--grey-300); border-radius: 8px; }
.admin-nav a { padding: 8px 12px; text-decoration: none; font-weight: 700; }
.admin-nav a:hover { background: var(--blue-soft); }
.admin-nav a[aria-current="page"] { color: var(--white); background: var(--blue); border-radius: 5px; }
.dashboard-date-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { padding: 20px; background: var(--white); border-left: 5px solid var(--blue); border-radius: 8px; box-shadow: var(--shadow); }
.stat-card span { color: var(--grey-600); }
.stat-card strong { display: block; color: var(--blue); font-size: 2.2rem; line-height: 1.2; }
.stat-card.accent { border-color: var(--red); }
.action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.action-card { display: flex; flex-direction: column; gap: 6px; padding: 22px; background: var(--white); border: 1px solid var(--grey-300); border-radius: 8px; text-decoration: none; box-shadow: var(--shadow); }
.action-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.action-card span { color: var(--grey-600); }
.action-card-primary { color: var(--white); background: var(--blue); border-color: var(--blue); }
.action-card-primary strong, .action-card-primary span { color: var(--white); }
.action-card-primary:hover { color: var(--white); background: var(--blue-dark); }
.mobile-admin-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; border-left: 5px solid var(--red); }
.mobile-admin-intro h2 { margin: 3px 0 5px; }
.mobile-admin-intro p { margin: 0; color: var(--grey-600); }
.online-status { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; color: #095d2b; background: var(--green-soft); border-radius: 20px; font-weight: 700; }
.online-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.online-status.is-offline { color: #8a0008; background: #ffe5e5; }
.online-status.is-offline::before { background: var(--red); }
.settings-form { display: grid; gap: 20px; }
.settings-section h2 { margin-bottom: 18px; }
.settings-section fieldset { margin: 20px 0; padding: 16px; border: 1px solid var(--grey-300); border-radius: 8px; }
.settings-section legend { padding-inline: 6px; color: var(--blue); font-weight: 800; }
.switch-line { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: var(--blue-soft); border-radius: 7px; cursor: pointer; }
.switch-line input { width: 22px; height: 22px; margin: 2px 0 0; }
.switch-line span, .radio-cards span { display: flex; flex-direction: column; gap: 2px; }
.switch-line small, .radio-cards small { color: var(--grey-600); }
.weekday-grid { display: grid; grid-template-columns: repeat(7, minmax(90px, 1fr)); gap: 8px; }
.check-tile { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px; border: 1px solid var(--grey-300); border-radius: 6px; cursor: pointer; }
.check-tile input { width: auto; }
.radio-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.radio-cards label { display: flex; gap: 10px; padding: 16px; border: 2px solid var(--grey-300); border-radius: 8px; cursor: pointer; }
.radio-cards input { width: auto; margin-top: 4px; }
.radio-cards label:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.settings-section .info-box { margin-top: 18px; }
.settings-actions { position: sticky; bottom: 12px; z-index: 5; display: flex; justify-content: flex-end; padding: 12px; background: rgba(246,246,246,.94); border-radius: 8px; backdrop-filter: blur(4px); }
.two-panel-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr); gap: 20px; margin-bottom: 24px; }
.info-panel { background: var(--blue-soft); box-shadow: none; }

.table-panel { padding: 0; overflow: hidden; }
.table-panel > h2, .table-panel > .alert { margin: 20px 24px; }
.responsive-table { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--grey-100); text-align: left; vertical-align: top; }
th { color: var(--blue); background: #f7f7ff; font-size: .88rem; }
tbody tr:hover { background: #fafafa; }
.table-subline { display: block; color: var(--grey-600); margin-top: 2px; }
.badge { display: inline-flex; padding: 4px 9px; border-radius: 16px; font-weight: 700; font-size: .82rem; }
.badge-success { color: #095d2b; background: var(--green-soft); }
.badge-warning { color: #8a3b00; background: #ffe9b8; }
.badge-muted { color: #555; background: #e5e5e5; }
.rights-form { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.check-label { display: inline-flex; align-items: center; gap: 5px; font-weight: 400; }
.check-label input { width: auto; }
.button-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.button-row form { margin: 0; }
.booking-actions { min-width: 170px; }
.booking-edit-panel { margin-inline: auto; }
.booking-edit-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-bottom: 22px; overflow: hidden; border: 1px solid var(--grey-300); border-radius: 8px; background: var(--grey-300); }
.booking-edit-summary > div { display: flex; flex-direction: column; padding: 14px 16px; background: var(--white); }
.booking-edit-summary span { color: var(--grey-600); font-size: .82rem; }
.booking-edit-summary strong { color: var(--blue); }
.booking-edit-summary small { color: var(--grey-600); }
.empty-cell { padding: 32px; color: var(--grey-600); text-align: center; }
.empty-state { text-align: center; padding: 50px 24px; }
.empty-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; color: var(--white); background: var(--blue); font-size: 1.6rem; font-weight: 800; }
.muted { color: var(--grey-600); }
.csv-example { overflow-x: auto; padding: 14px; background: #1e1e2a; color: #fff; border-radius: 6px; }
.import-result-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 24px 14px; }
.import-result-actions p { margin: 0; }
.sensitive-note { margin: 0 24px 18px; padding: 12px 14px; color: #6a3300; background: #fff4e5; border-left: 4px solid var(--orange); }
code { font-family: Consolas, Monaco, monospace; }

@media (max-width: 900px) {
    .nav-toggle { display: inline-flex; }
    .main-nav { display: none; position: absolute; top: 79px; left: 16px; right: 16px; z-index: 50; flex-direction: column; align-items: stretch; padding: 10px; background: var(--white); border: 1px solid var(--grey-300); box-shadow: var(--shadow); }
    .main-nav.is-open { display: flex; }
    .main-nav > a, .nav-link-button { width: 100%; }
    .selection-form, .two-panel-grid, .parking-overview { grid-template-columns: 1fr; }
    .slot-grid { grid-template-columns: repeat(3, minmax(105px, 1fr)); }
    .lot-spaces { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
    .weekday-grid { grid-template-columns: repeat(4, minmax(90px, 1fr)); }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .action-grid { grid-template-columns: 1fr; }
    .import-result-actions { align-items: stretch; flex-direction: column; }
    .responsive-table { scrollbar-color: var(--blue) var(--grey-100); }
    .responsive-table table { min-width: 760px; }
}

@media (max-width: 640px) {
    .container { width: min(100% - 20px, 1240px); }
    .header-inner { min-height: 72px; }
    .brand img { width: 112px; }
    .brand span { display: none; }
    .main-nav { top: 70px; }
    .page-content { padding-top: 20px; }
    .page-heading { flex-direction: column; }
    .page-heading .btn { width: 100%; }
    .panel { padding: 18px; }
    .two-columns, .three-columns, .radio-cards { grid-template-columns: 1fr; }
    .booking-edit-summary { grid-template-columns: 1fr; }
    .slot-grid { grid-template-columns: repeat(2, minmax(100px, 1fr)); }
    .lot-spaces, .garage-visual { grid-template-columns: 1fr; }
    .weekday-grid { grid-template-columns: repeat(2, minmax(90px, 1fr)); }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 15px; }
    .stat-card strong { font-size: 1.8rem; }
    .zone-heading { align-items: flex-start; flex-direction: column; }
    .auth-card { padding: 24px 18px; margin: 8px auto; }
    input, select, textarea { min-height: 46px; font-size: 16px; }
    textarea { min-height: 96px; }
    .btn { min-height: 46px; }
    .button-row .btn, .button-row form { width: 100%; }
    .button-row form .btn { width: 100%; }
    .admin-nav { position: sticky; top: 0; z-index: 35; flex-wrap: nowrap; margin-inline: -10px; overflow-x: auto; border-radius: 0; box-shadow: 0 4px 14px rgba(0,0,0,.08); scrollbar-width: thin; }
    .admin-nav a { flex: 0 0 auto; min-height: 44px; display: inline-flex; align-items: center; }
    .dashboard-date-nav { display: grid; grid-template-columns: 1fr 1fr; }
    .dashboard-date-nav .btn:first-child { display: none; }
    .mobile-admin-intro { align-items: flex-start; flex-direction: column; }
    .action-card { min-height: 108px; padding: 18px; }
    .footer-inner { align-items: stretch; flex-direction: column; }
    .pwa-install-footer { width: 100%; }
    .has-mobile-nav .page-content { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
    .has-mobile-nav .site-footer { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
    .mobile-bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 70;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
        padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
        background: rgba(255,255,255,.98);
        border-top: 1px solid var(--grey-300);
        box-shadow: 0 -5px 18px rgba(0,0,0,.1);
    }
    .mobile-bottom-nav a { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 2px; min-height: 54px; padding: 4px 2px; color: var(--grey-600); text-decoration: none; font-size: .72rem; font-weight: 700; text-align: center; }
    .mobile-bottom-nav a span { display: grid; place-items: center; width: 25px; height: 25px; color: var(--blue); background: var(--blue-soft); border-radius: 50%; font-size: .76rem; }
    .mobile-bottom-nav a[aria-current="page"] { color: var(--blue); }
    .mobile-bottom-nav a[aria-current="page"] span { color: var(--white); background: var(--blue); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
