:root {
    --ink: #102018;
    --ink-strong: #0f172a;
    --text-on-dark: #ffffff;
    --muted: #52765f;
    --muted-dark: #365a43;
    --line: #bbf7d0;
    --line-strong: #22c55e;
    --brand: #16a34a;
    --brand-dark: #15803d;
    --brand-deep: #166534;
    --brand-soft: #f0fdf4;
    --brand-pale: #dcfce7;
    --pink: #22c55e;
    --pink-soft: #bbf7d0;
    --red: #ef4444;
    --amber: #f59e0b;
    --blue: #6366f1;
    --green: #16a34a;
    --bg: #f0fdf4;
    --card: rgba(255, 255, 255, .88);
    --shadow-red: rgba(21, 128, 61, .18);
    --shadow-pink: rgba(34, 197, 94, .18);
    --shadow-deep: rgba(20, 83, 45, .18);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
    background:
        radial-gradient(circle at 8% 0%, rgba(34, 197, 94, .18) 0, transparent 31rem),
        radial-gradient(circle at 98% 8%, rgba(16, 185, 129, .20) 0, transparent 30rem),
        radial-gradient(circle at 45% 100%, rgba(74, 222, 128, .12) 0, transparent 34rem),
        linear-gradient(180deg, #f7fff9 0%, #f0fdf4 48%, #dcfce7 100%);
    color: var(--ink);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(21, 128, 61, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(21, 128, 61, .055) 1px, transparent 1px);
    background-size: 30px 30px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .06));
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, .42), transparent 28%, rgba(255, 255, 255, .2) 54%, transparent 76%);
    opacity: .55;
}

a {
    color: var(--brand-dark);
    font-weight: 800;
    text-decoration-color: rgba(22, 163, 74, .35);
}

a:hover {
    color: var(--pink);
    text-decoration-color: var(--pink);
}

.content {
    padding: 0 !important;
}

.top-row,
.sidebar {
    display: none !important;
}

.page {
    display: block !important;
}

.booking-shell {
    width: min(1240px, 100%);
    margin: 0 auto;
    padding: 24px;
    position: relative;
    z-index: 1;
}

.hero-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 30px;
    border-radius: 32px;
    background:
        radial-gradient(circle at 82% 18%, rgba(187, 247, 208, .32) 0, transparent 18rem),
        radial-gradient(circle at 12% 80%, rgba(220, 252, 231, .24) 0, transparent 16rem),
        linear-gradient(135deg, #14532d 0%, #15803d 42%, #16a34a 72%, #22c55e 100%);
    color: white;
    box-shadow: 0 28px 78px rgba(21, 128, 61, .28), inset 0 1px 0 rgba(255, 255, 255, .28);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, .28);
}

.hero-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .16), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, .08), transparent 60%);
    pointer-events: none;
}

.hero-panel::after {
    content: '';
    position: absolute;
    width: 270px;
    height: 270px;
    border: 36px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
    right: -82px;
    top: -82px;
}

.eyebrow {
    margin: 0 0 8px;
    letter-spacing: .18em;
    font-size: .78rem;
    opacity: 1;
    font-weight: 950;
    color: #dcfce7;
    text-shadow: 0 3px 14px rgba(0, 0, 0, .35);
    position: relative;
    z-index: 1;
}

h1 {
    margin: 0;
    font-size: clamp(2.2rem, 6vw, 4.9rem);
    line-height: .92;
    letter-spacing: -0.06em;
    color: #ffffff;
    text-shadow: 0 5px 22px rgba(0, 0, 0, .42), 0 1px 0 rgba(255, 255, 255, .15);
    position: relative;
    z-index: 1;
}


h1 span {
    color: #ecfdf5;
    display: inline-block;
    text-shadow: 0 5px 22px rgba(0, 0, 0, .4);
}

h1,
h1:focus,
h1:focus-visible,
h1:active,
h1 span,
h1 span:focus,
h1 span:focus-visible {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.hero-copy {
    max-width: 650px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, .92);
    font-size: 1.05rem;
    position: relative;
    z-index: 1;
}

.hero-card {
    min-width: 150px;
    padding: 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .28);
    backdrop-filter: blur(14px);
    text-align: center;
    z-index: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24), 0 18px 44px rgba(20, 83, 45, .22);
}

.hero-card strong {
    display: block;
    font-size: 3rem;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 4px 18px rgba(0, 0, 0, .28);
}

.hero-card small {
    color: rgba(255, 255, 255, .88);
}

.booking-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 22px;
    margin-top: 22px;
    align-items: start;
}

.glass-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .93), rgba(240, 253, 244, .86));
    border: 1px solid rgba(187, 247, 208, .9);
    border-radius: 26px;
    box-shadow: 0 20px 58px rgba(21, 128, 61, .11), inset 0 1px 0 rgba(255, 255, 255, .9);
    backdrop-filter: blur(14px);
}

.control-card {
    padding: 22px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    align-items: end;
}

h2 {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: -.03em;
    color: #10351f;
}

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

.control-card p,
.section-title p,
.cart-head p {
    margin: 6px 0 0;
}

.controls-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: end;
}

label {
    display: grid;
    gap: 8px;
    color: var(--muted-dark);
    font-size: .9rem;
    font-weight: 900;
}

select,
input {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    min-width: 150px;
    background: linear-gradient(180deg, #ffffff, #f7fff9);
    color: var(--ink);
    font: inherit;
    font-weight: 750;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 8px 20px rgba(21, 128, 61, .08);
}

select:hover,
input:hover {
    border-color: var(--line-strong);
}

select:focus,
input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(22, 163, 74, .16), 0 12px 24px rgba(21, 128, 61, .12);
}

select::placeholder,
input::placeholder {
    color: #6b987b;
}

button {
    font: inherit;
}

.refresh-btn,
.checkout-btn {
    border: 0;
    border-radius: 15px;
    min-height: 46px;
    padding: 0 18px;
    background: linear-gradient(135deg, #16a34a 0%, #16a34a 52%, #22c55e 100%);
    color: white;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(22, 163, 74, .25), inset 0 1px 0 rgba(255, 255, 255, .22);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.refresh-btn:hover,
.checkout-btn:hover {
    transform: translateY(-1px);
    filter: saturate(1.08);
    box-shadow: 0 17px 38px rgba(34, 197, 94, .33), inset 0 1px 0 rgba(255, 255, 255, .24);
}

.week-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 8px;
}

.week-strip button {
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: linear-gradient(180deg, #ffffff, #f0fdf4);
    color: var(--brand-dark);
    font-size: 1.6rem;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 9px 22px rgba(21, 128, 61, .1);
    transition: all .18s ease;
}

.week-strip button:hover {
    border-color: var(--brand);
    background: #dcfce7;
    transform: translateY(-1px);
}

.week-strip div {
    text-align: center;
    display: grid;
    gap: 4px;
}

.week-strip span {
    color: var(--muted);
    font-size: .9rem;
}

.days-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.day-pill {
    min-height: 82px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff, #f7fff9);
    border-radius: 20px;
    cursor: pointer;
    display: grid;
    place-items: center;
    gap: 0;
    color: var(--muted);
    box-shadow: 0 10px 24px rgba(21, 128, 61, .08);
    transition: all .18s ease;
}

.day-pill strong {
    color: var(--ink);
    font-size: 1.45rem;
}

.day-pill:hover {
    border-color: var(--brand);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(21, 128, 61, .13);
}

.day-pill.active {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 45%, #22c55e 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 16px 36px rgba(22, 163, 74, .3);
}

.day-pill.active strong {
    color: white;
}

.slots-card {
    padding: 22px;
}

.section-title,
.cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.loading-dot {
    color: var(--brand-dark);
    font-weight: 950;
}

.notice {
    margin: 16px 0;
    padding: 14px;
    border-radius: 16px;
    font-weight: 900;
}

.notice.warning {
    color: #7c2d12;
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.slot-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.slot-tile {
    min-height: 136px;
    text-align: left;
    border: 1px solid #bbf7d0;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
    border-radius: 22px;
    padding: 16px;
    display: grid;
    gap: 4px;
    cursor: pointer;
    color: var(--ink);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
    box-shadow: 0 10px 26px rgba(21, 128, 61, .08);
}

.slot-tile:hover:not(:disabled) {
    transform: translateY(-3px);
    border-color: var(--brand);
    box-shadow: 0 18px 38px rgba(22, 163, 74, .18);
}

.slot-time {
    font-size: .98rem;
    font-weight: 950;
    color: #10351f;
}

.slot-court {
    color: #245a35;
    font-weight: 900;
}

.slot-meta {
    color: var(--muted);
    font-size: .86rem;
}

.slot-price {
    font-weight: 950;
    color: var(--brand-dark);
}

.slot-status {
    margin-top: 8px;
    width: fit-content;
    border-radius: 999px;
    padding: 5px 10px;
    background: #dcfce7;
    color: #15803d;
    font-size: .78rem;
    font-weight: 950;
    text-transform: capitalize;
    border: 1px solid rgba(22, 163, 74, .16);
}

.slot-tile.booked,
.slot-tile.locked,
.slot-tile.not-available,
.slot-tile.disabled {
    border-color: #fecaca;
    background: linear-gradient(180deg, #f8fff9, #fee2e2);
    opacity: .82;
    cursor: not-allowed;
}

.slot-tile.booked .slot-status,
.slot-tile.locked .slot-status,
.slot-tile.not-available .slot-status,
.slot-tile.disabled .slot-status {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.slot-tile.selected {
    border-color: #16a34a;
    background: linear-gradient(135deg, #14532d 0%, #16a34a 52%, #22c55e 100%);
    color: white;
    opacity: 1;
    box-shadow: 0 18px 42px rgba(22, 163, 74, .35);
}

.slot-tile.selected .slot-time,
.slot-tile.selected .slot-court,
.slot-tile.selected .slot-meta,
.slot-tile.selected .slot-price {
    color: rgba(255, 255, 255, .94);
}

.slot-tile.selected .slot-status {
    background: rgba(255, 255, 255, .18);
    color: white;
    border-color: rgba(255, 255, 255, .28);
}

.cart-card {
    position: sticky;
    top: 18px;
    padding: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(240, 253, 244, .9));
}

.cart-badge {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #15803d;
    font-weight: 950;
    border: 1px solid rgba(22, 163, 74, .16);
}

.empty-cart {
    margin-top: 20px;
    padding: 28px;
    border: 1px dashed #86efac;
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
    background: rgba(240, 253, 244, .78);
}

.cart-items {
    display: grid;
    gap: 12px;
    margin: 18px 0;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(21, 128, 61, .08);
}

.cart-item div {
    display: grid;
    gap: 4px;
}

.cart-item span,
.cart-item small {
    color: var(--muted);
}

.cart-item button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 11px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 1.3rem;
    font-weight: 950;
    cursor: pointer;
    transition: all .18s ease;
}

.cart-item button:hover {
    background: #ef4444;
    color: #ffffff;
}

.checkout-btn,
.clear-btn {
    width: 100%;
    margin-top: 10px;
}

.clear-btn {
    min-height: 44px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #4ade80;
    color: #15803d;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(21, 128, 61, .08);
    transition: all .18s ease;
}

.clear-btn:hover,
.clear-btn:focus {
    background: linear-gradient(135deg, #15803d, #16a34a, #22c55e);
    border-color: #16a34a;
    color: #ffffff;
    box-shadow: 0 14px 32px rgba(22, 163, 74, .3);
    transform: translateY(-1px);
}

.clear-btn:active {
    transform: translateY(0);
}

.cart-price {
    color: #10351f;
    font-weight: 950;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-top: 10px;
    border-top: 1px solid rgba(22, 163, 74, .16);
    font-size: 1rem;
    color: #10351f;
    font-weight: 950;
}

.qty-field {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .35rem;
}

.qty-field input {
    width: 70px;
    padding: .3rem .45rem;
    border-radius: .5rem;
    border: 1px solid var(--line);
    background: #ffffff;
}

.court-select-box {
    display: grid;
    gap: 10px;
}

.court-select-title {
    color: var(--muted-dark);
    font-size: .9rem;
    font-weight: 950;
}

.court-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.court-pill {
    min-height: 46px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff, #f7fff9);
    border-radius: 16px;
    padding: 0 18px;
    cursor: pointer;
    font-weight: 950;
    color: var(--ink);
    box-shadow: 0 8px 20px rgba(21, 128, 61, .08);
    transition: all .18s ease;
}

.court-pill:hover {
    border-color: var(--brand);
    background: #f0fdf4;
    transform: translateY(-1px);
}

.court-pill.active {
    background: linear-gradient(135deg, #15803d, #16a34a 52%, #22c55e);
    color: white;
    border-color: transparent;
    box-shadow: 0 14px 32px rgba(22, 163, 74, .28);
}

.vertical-controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center !important;
}

.court-select-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center !important;
}

.court-row {
    width: 100%;
    display: flex;
    justify-content: center !important;
    flex-wrap: wrap;
}

.date-refresh-row {
    width: 100%;
    display: flex;
    justify-content: center !important;
    align-items: center;
    gap: 10px;
}

.date-refresh-row input {
    width: 170px !important;
    min-width: 170px;
    flex: 0 0 170px;
}

.date-refresh-row .refresh-btn {
    width: auto !important;
    min-width: 120px;
    flex: 0 0 auto;
}

@media (max-width: 960px) {
    .booking-grid {
        grid-template-columns: 1fr;
    }

    .cart-card {
        position: static;
    }

    .control-card {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    .booking-shell {
        padding: 12px;
    }

    .hero-panel {
        padding: 22px;
        border-radius: 22px;
        width: 100%;
    }

    .days-row {
        /*display: flex;*/
        overflow-x: auto;
        padding-bottom: 6px;
    }

    .day-pill {
        /*min-width: 76px;*/
        border-radius: 10px;
    }

    .slot-list {
        grid-template-columns: 1fr;
    }

    .controls-row,
    .controls-row label,
    select,
    input,
    .refresh-btn {
        width: 100%;
    }

    .court-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .date-refresh-row {
        justify-content: center !important;
        flex-wrap: nowrap;
    }

    .date-refresh-row input {
        width: 160px !important;
        min-width: 160px;
    }

    .date-refresh-row .refresh-btn {
        width: auto !important;
    }
}

@media (max-width: 500px) {
    .hero-panel {
        padding: 22px;
        border-radius: 22px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .slot-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .slot-tile {
        min-height: 105px;
        padding: 10px;
        border-radius: 16px;
    }

    .slot-time {
        font-size: .95rem;
    }

    .slot-court {
        font-size: .78rem;
    }

    .slot-meta {
        font-size: .70rem;
    }

    .slot-price {
        font-size: .75rem;
    }

    .slot-status {
        margin-top: 4px;
        padding: 4px 7px;
        font-size: .65rem;
    }
}

@media (max-width: 380px) {
    .hero-panel {
        padding: 22px;
        border-radius: 22px;
        width: 100%;
    }

    .slot-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

.player-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

.counter-btn {
    width: 42px;
    height: 42px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: #fff;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.counter-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.counter-input {
    width: 70px;
    height: 42px;
    text-align: center;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
}


.app-loading {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 8% 0%, rgba(34, 197, 94, .24) 0, transparent 31rem),
        radial-gradient(circle at 100% 12%, rgba(16, 185, 129, .20) 0, transparent 28rem),
        linear-gradient(135deg, #052e16 0%, #14532d 38%, #15803d 70%, #22c55e 100%);
    color: #ffffff;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.app-loading::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(220, 252, 231, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(220, 252, 231, .08) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .14));
}

.app-loading::after {
    content: '';
    position: absolute;
    width: 270px;
    height: 270px;
    border: 36px solid rgba(220, 252, 231, .16);
    border-radius: 50%;
    right: -82px;
    top: -82px;
    pointer-events: none;
}

.loading-ball {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dcfce7 0%, #4ade80 45%, #22c55e 100%);
    animation: bounce 0.7s infinite alternate;
    margin-bottom: 22px;
    box-shadow:
        0 0 24px rgba(74, 222, 128, .78),
        0 14px 34px rgba(21, 128, 61, .42),
        inset 0 1px 0 rgba(255, 255, 255, .45);
    position: relative;
    z-index: 1;
}

.loading-title {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 8px;
    color: #ffffff;
    letter-spacing: -.03em;
    text-shadow: 0 5px 24px rgba(0, 0, 0, .38);
    position: relative;
    z-index: 1;
}

.loading-subtitle {
    font-size: 14px;
    color: rgba(240, 253, 244, .88);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

@keyframes bounce {
    from {
        transform: translateY(0) scale(1);
    }

    to {
        transform: translateY(-22px) scale(1.08);
    }
}

#blazor-error-ui {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    bottom: auto;
    left: auto;
    width: auto;
    max-width: calc(100vw - 40px);
    background: linear-gradient(135deg, #991b1b 0%, #16a34a 55%, #22c55e 100%);
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid rgba(187, 247, 208, .7);
    box-shadow:
        0 16px 34px rgba(22, 163, 74, .30),
        0 10px 26px rgba(15, 23, 42, .24),
        inset 0 1px 0 rgba(255, 255, 255, .18);
    z-index: 9999;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
    font-weight: 800;
}

#blazor-error-ui .reload,
#blazor-error-ui .dismiss {
    color: #ffffff;
    margin-left: 10px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 900;
}

#blazor-error-ui .reload:hover,
#blazor-error-ui .dismiss:hover {
    text-decoration: underline;
}

@media (max-width: 620px) {
    .app-loading {
        padding: 24px;
    }

    .loading-title {
        font-size: 22px;
    }

    .loading-subtitle {
        font-size: 13px;
    }

    #blazor-error-ui {
        top: 12px;
        right: 12px;
        max-width: calc(100vw - 24px);
        padding: 11px 14px;
        border-radius: 12px;
    }
}

/* =========================================================
   Mobile layout hardening patch
   Purpose: keep hero-panel and booking content full-width on
   mobile without changing the existing red-pink visual theme.
   ========================================================= */

html,
body,
.page,
.content {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    min-width: 0;
}

.booking-shell {
    width: 100%;
    max-width: 1240px;
    min-width: 0;
}

.hero-panel,
.hero-panel>div,
.booking-grid,
.booking-grid>main,
.glass-card,
.control-card,
.slots-card,
.cart-card {
    max-width: 100%;
    min-width: 0;
}

.hero-panel {
    width: 100%;
}

.hero-business {
    display: block;
}

.hero-panel h1,
.hero-copy {
    overflow-wrap: anywhere;
}

.court-row {
    max-width: 100%;
}

.date-refresh-row span {
    color: var(--muted-dark);
    font-size: .9rem;
    font-weight: 950;
}

@media (max-width: 960px) {
    .booking-shell {
        padding-inline: 16px;
    }

    .hero-panel {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-card {
        align-self: flex-start;
    }
}

@media (max-width: 620px) {
    .booking-shell {
        width: 100%;
        padding: 10px;
    }

    .hero-panel {
        width: 100%;
        max-width: 100%;
        padding: 22px 18px;
        border-radius: 22px;
        gap: 16px;
    }

    .hero-panel::after {
        width: 210px;
        height: 210px;
        right: -96px;
        top: -96px;
        border-width: 28px;
    }

    .eyebrow,
    .hero-business {
        margin-bottom: 10px;
        font-size: .72rem;
        line-height: 1.25;
    }

    h1 {
        font-size: clamp(1.9rem, 10vw, 2.75rem);
        line-height: 1;
        letter-spacing: -.045em;
    }

    .hero-copy {
        margin-top: 12px;
        font-size: .95rem;
        line-height: 1.55;
    }

    .hero-card {
        /*width: 100%;*/
        max-width: none;
        min-width: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        text-align: left;
        padding: 16px 18px;
        border-radius: 20px;
    }

    .hero-card strong {
        font-size: 2.25rem;
    }

    .control-card,
    .slots-card,
    .cart-card {
        padding: 18px;
        border-radius: 22px;
    }

    .date-refresh-row {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center !important;
        gap: 10px;
    }

    .date-refresh-row span {
        width: 100%;
        text-align: center;
    }

    .date-refresh-row input,
    .date-refresh-row .refresh-btn {
        /*
        flex: 1 1 100%;
        width: 100% !important;
        */
        min-width: 0;
    }

    .court-row {
        display: flex;
        justify-content: center !important;
        flex-wrap: wrap;
        gap: 8px;
    }

    .court-pill {
        /*flex: 1 1 calc(50% - 8px);*/
        min-width: 128px;
        padding-inline: 12px;
    }

    .week-strip {
        padding-inline: 0;
    }

    .week-strip div {
        min-width: 0;
    }

    .week-strip strong,
    .week-strip span {
        overflow-wrap: anywhere;
    }

    .slot-list {
        grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    }
}

@media (max-width: 420px) {
    .booking-shell {
        padding: 8px;
    }

    .hero-panel {
        padding: 20px 16px;
        border-radius: 20px;
    }

    h1 {
        font-size: clamp(1.75rem, 10.5vw, 2.35rem);
    }

    .court-pill {
        /*flex-basis: 100%;*/
    }

    .slot-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .slot-tile {
        min-width: 0;
    }
}

@media (max-width: 340px) {
    .slot-list {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Slot Display Switch
   ========================================================= */

.slot-section-title {
    align-items: flex-start;
}

.slot-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.slot-view-switch {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(110px, 1fr));
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f8fafc;
}

.slot-view-button {
    min-height: 42px;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #475569;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
}

.slot-view-button:hover {
    background: #eaf3f8;
}

.slot-view-button.active {
    color: white;
    background: linear-gradient(135deg, var(--brand), var(--blue));
    box-shadow: 0 8px 20px rgba(37, 99, 235, .2);
}

.slot-view-icon {
    font-size: 1rem;
    line-height: 1;
}


/* =========================================================
   Slot Schedule Grid
   ========================================================= */

.slot-grid-help {
    margin-top: 16px;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--brand-soft);
    border: 1px solid var(--line);
    color: var(--brand-dark);
    font-size: .84rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.slot-grid-scroll {
    width: 100%;
    max-width: 100%;
    margin-top: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--card);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    overscroll-behavior-x: contain;
}

.slot-grid-scroll::-webkit-scrollbar {
    height: 10px;
}

.slot-grid-scroll::-webkit-scrollbar-track {
    background: var(--brand-pale);
    border-radius: 999px;
}

.slot-grid-scroll::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 999px;
}

.slot-schedule-grid {
    display: grid;
    width: max-content;
    min-width: 100%;
    align-items: stretch;
    align-content: start;
    grid-auto-flow: row;
    grid-auto-rows: 86px;
}

.slot-grid-corner,
.slot-grid-time,
.slot-grid-court,
.slot-grid-cell {
    height: 86px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.slot-grid-corner {
    position: sticky;
    left: 0;
    top: 0;
    z-index: 8;
    min-width: 100px;
    background: var(--brand-soft);
    color: var(--ink);
    font-weight: 900;
    display: grid;
    place-items: center;
}

.slot-grid-time {
    position: sticky;
    top: 0;
    z-index: 6;
    padding: 12px 8px;
    min-width: 112px;
    min-height: 64px;
    background: var(--brand-soft);
    color: var(--muted-dark);
    text-align: center;
    font-size: .79rem;
    font-weight: 900;
    display: grid;
    place-items: center;
    line-height: 1.25;
}

.slot-grid-court {
    position: sticky;
    left: 0;
    z-index: 5;
    min-width: 100px;
    padding: 10px;
    background: var(--card);
    color: var(--ink);
    display: grid;
    place-items: center;
    text-align: center;
}

.slot-grid-cell {
    min-width: 112px;
    padding: 8px;
}

.slot-grid-empty {
    background: var(--brand-soft);
    color: var(--muted);
    display: grid;
    place-items: center;
}

.slot-grid-booking {
    width: 100%;
    min-height: 86px;
    border-top: 0;
    border-left: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: linear-gradient(180deg, var(--card), var(--brand-soft));
    color: var(--ink);
    cursor: pointer;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 5px;
    text-align: center;
}

.slot-grid-booking:hover:not(:disabled) {
    box-shadow: inset 0 0 0 2px var(--shadow-pink);
}

.slot-grid-booking:disabled {
    cursor: not-allowed;
}

.slot-grid-status {
    color: var(--brand-dark);
    font-size: .82rem;
    font-weight: 900;
    text-transform: capitalize;
}

.slot-grid-price {
    color: var(--muted-dark);
    font-size: .75rem;
    font-weight: 800;
}

.slot-grid-type {
    font-size: .92rem;
    font-weight: 900;
}

.slot-grid-detail {
    font-size: .75rem;
    font-weight: 700;
    opacity: .86;
}

.slot-grid-booking.booked,
.slot-grid-booking.locked,
.slot-grid-booking.not-available,
.slot-grid-booking.disabled {
    background: var(--pink-soft);
    color: var(--red);
    opacity: .78;
}

.slot-grid-booking.booked .slot-grid-status,
.slot-grid-booking.locked .slot-grid-status,
.slot-grid-booking.not-available .slot-grid-status,
.slot-grid-booking.disabled .slot-grid-status {
    color: var(--red);
}

.slot-grid-booking.slot-grid-spanning {
    position: relative;
    z-index: 2;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 100%;
    justify-self: stretch;
    align-self: stretch;
    background: linear-gradient(135deg, var(--brand-pale), var(--pink-soft));
    color: var(--brand-deep);
    border: 1px solid var(--line-strong);
}

.slot-grid-booking.slot-grid-spanning:hover:not(:disabled) {
    box-shadow: inset 0 0 0 2px var(--shadow-deep);
}

.slot-grid-booking.selected {
    background: linear-gradient(135deg, var(--brand-deep), var(--brand));
    color: var(--text-on-dark);
    opacity: 1;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .48);
}

.slot-grid-booking.selected .slot-grid-status,
.slot-grid-booking.selected .slot-grid-price,
.slot-grid-booking.selected .slot-grid-detail {
    color: var(--text-on-dark);
}

.slot-grid-legend {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
}

.slot-grid-legend>span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.slot-legend-color {
    width: 17px;
    height: 17px;
    border-radius: 5px;
    border: 1px solid var(--line);
    display: inline-block;
}

.slot-legend-color.available {
    background: var(--brand-pale);
    border-color: var(--line-strong);
}

.slot-legend-color.booked {
    background: color-mix(in srgb, var(--red) 14%, var(--card));
    border-color: color-mix(in srgb, var(--red) 42%, var(--line));
}

.slot-legend-color.openplay {
    background: linear-gradient(135deg, var(--brand-pale), var(--pink-soft));
    border-color: #67e8f9;
}

.slot-legend-color.selected {
    background: linear-gradient(135deg, var(--brand-deep), var(--brand));
    border: 2px solid var(--brand-dark);
}


/* =========================================================
   Mobile Slot Grid
   ========================================================= */

@media (max-width: 620px) {
    .slot-section-title {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .slot-header-actions {
        width: 100%;
        justify-content: stretch;
    }

    .slot-view-switch {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .slot-view-button {
        width: 100%;
        min-width: 0;
        padding: 0 8px;
        font-size: .82rem;
    }

    .slot-grid-scroll {
        border-radius: 14px;
    }

    .slot-grid-corner,
    .slot-grid-court {
        min-width: 68px;
        width: 68px;
        padding: 5px;
        font-size: .68rem;
    }

    .slot-grid-time,
    .slot-grid-cell {
        min-width: 78px;
        width: 78px;
    }

    .slot-grid-booking {
        width: 100%;
        min-width: 0;
        max-width: none;
    }


    .slot-grid-cell {
        padding: 3px;
    }

    .slot-grid-corner,
    .slot-grid-time,
    .slot-grid-court,
    .slot-grid-cell,
    .slot-grid-booking {
        height: 68px;
        min-height: 68px;
    }

    .slot-grid-time {
        padding: 5px 3px;
        font-size: .60rem;
        line-height: 1.15;
        white-space: normal;
    }

    .slot-grid-booking {
        padding: 6px;
    }

    .slot-grid-status,
    .slot-grid-type {
        font-size: .72rem;
    }

    .slot-grid-booking {
        padding: 4px 2px;
        gap: 2px;
    }

    .slot-grid-status,
    .slot-grid-type {
        font-size: .67rem;
        line-height: 1.1;
    }

    .slot-grid-price,
    .slot-grid-detail {
        font-size: .60rem;
        line-height: 1.1;
    }

    .slot-grid-court strong {
        font-size: .68rem;
        line-height: 1.1;
    }


    .slot-grid-legend {
        justify-content: flex-start;
        gap: 10px 14px;
    }

    .slot-schedule-grid {
        grid-auto-rows: 78px;
    }
}

@media (max-width: 380px) {
    .slot-view-button {
        font-size: .76rem;
    }

    .slot-grid-corner,
    .slot-grid-court {
        min-width: 62px;
        width: 62px;
    }

    .slot-grid-time,
    .slot-grid-cell {
        min-width: 72px;
        width: 72px;
    }

    .slot-grid-booking {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .slot-schedule-grid {
        grid-auto-rows: 78px;
    }
}

.booking-grid>* {
    min-width: 0;
}

.slots-card {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.slot-grid-scroll {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.slot-schedule-grid {
    --slot-court-width: 100px;
    --slot-time-width: 112px;
}

@media (max-width: 620px) {
    .slot-schedule-grid {
        --slot-court-width: 68px;
        --slot-time-width: 78px;
    }
}

@media (max-width: 380px) {
    .slot-schedule-grid {
        --slot-court-width: 62px;
        --slot-time-width: 72px;
    }
}

.slot-grid-corner,
.slot-grid-court {
    width: var(--slot-court-width);
    min-width: var(--slot-court-width);
}

.slot-grid-time,
.slot-grid-cell {
    width: var(--slot-time-width);
    min-width: var(--slot-time-width);
}

.slot-grid-booking {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 100%;
    justify-self: stretch;
    align-self: stretch;
}

.slot-grid-time,
.slot-grid-cell {
    width: var(--slot-time-width);
    min-width: var(--slot-time-width);
}

.slot-grid-booking {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 100%;
    justify-self: stretch;
    align-self: stretch;
}