:root {
    --mc-ink: #243238;
    --mc-muted: #65747b;
    --mc-paper: #fbf7ef;
    --mc-surface: #ffffff;
    --mc-line: #e5d8c6;
    --mc-sea: #1b6f76;
    --mc-sea-dark: #134e56;
    --mc-coral: #c76f58;
    --mc-gold: #d7a94f;
    --mc-mist: #dcebec;
    --mc-danger: #b5473d;
    --mc-success: #35735d;
    --shadow: 0 18px 55px rgba(36, 50, 56, .13);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #e5f0f0;
    overflow-x: hidden;
}

body {
    margin: 0;
    color: var(--mc-ink);
    background: #e5f0f0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    isolation: isolate;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, #e5f0f0 0%, var(--mc-paper) 44%, #ffffff 100%);
}

a {
    color: inherit;
}

button,
input,
textarea {
    font: inherit;
}

.booking-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 56px;
    position: relative;
    isolation: isolate;
}

.booking-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, #e5f0f0 0%, var(--mc-paper) 44%, #ffffff 100%);
}

.booking-brand {
    display: inline-flex;
    align-items: center;
    width: 190px;
    min-height: 56px;
}

.booking-brand img {
    display: block;
    max-width: 100%;
    height: auto;
}

.booking-hero {
    padding: 18px 0 28px;
}

.booking-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 36px;
    align-items: center;
    padding-top: 22px;
}

.booking-hero__copy h1,
.booking-admin-head h1 {
    max-width: 780px;
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.25rem, 5vw, 5.35rem);
    font-weight: 500;
    line-height: .95;
    letter-spacing: 0;
}

.booking-hero__copy p:not(.booking-kicker) {
    max-width: 690px;
    margin: 22px 0 0;
    color: var(--mc-muted);
    font-size: 1.08rem;
}

.booking-hero__visual {
    justify-self: end;
    width: min(320px, 100%);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.booking-hero__visual img {
    width: 72%;
    height: auto;
}

.booking-kicker {
    margin: 0 0 8px;
    color: var(--mc-sea);
    font-size: .77rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.booking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 22px;
    align-items: start;
}

.booking-form {
    display: grid;
    gap: 22px;
    min-width: 0;
}

.booking-panel,
.booking-side__box,
.booking-admin-panel {
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(229, 216, 198, .9);
    border-radius: 8px;
    box-shadow: 0 10px 34px rgba(36, 50, 56, .08);
}

.booking-panel,
.booking-side__box,
.booking-admin-panel {
    padding: 22px;
}

.booking-layout > *,
.booking-panel,
.booking-side,
.booking-side__box {
    min-width: 0;
}

.booking-panel__head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}

.booking-panel__head h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: 0;
}

.booking-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(110px, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

.booking-day {
    min-width: 120px;
    padding: 12px;
    border: 1px solid var(--mc-line);
    border-radius: 8px;
    background: #fffdf8;
}

.booking-day h3 {
    min-height: 42px;
    margin: 0 0 10px;
    color: var(--mc-sea-dark);
    font-size: .92rem;
    line-height: 1.15;
}

.booking-slots {
    display: grid;
    gap: 8px;
}

.booking-slot {
    position: relative;
    display: grid;
    gap: 2px;
    min-height: 58px;
    padding: 9px 10px;
    border: 1px solid var(--mc-line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.booking-slot input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.booking-slot span {
    font-weight: 800;
}

.booking-slot em {
    color: var(--mc-muted);
    font-size: .78rem;
    font-style: normal;
}

.booking-slot--available:hover,
.booking-slot:has(input:checked) {
    border-color: var(--mc-sea);
    box-shadow: 0 8px 18px rgba(27, 111, 118, .16);
    transform: translateY(-1px);
}

.booking-slot:has(input:checked) {
    background: var(--mc-mist);
}

.booking-slot--occupied,
.booking-slot--blocked,
.booking-slot--reserved,
.booking-slot--closed {
    color: #8b9396;
    background: #f4f1ec;
    cursor: not-allowed;
}

.booking-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.booking-fields label {
    display: grid;
    gap: 6px;
}

.booking-fields span,
.booking-consent span {
    color: var(--mc-muted);
    font-size: .93rem;
    font-weight: 700;
}

.booking-field--wide {
    grid-column: 1 / -1;
}

.booking-fields input,
.booking-fields select,
.booking-fields textarea {
    width: 100%;
    border: 1px solid var(--mc-line);
    border-radius: 8px;
    background: #fff;
    color: var(--mc-ink);
    padding: 12px 13px;
    outline: none;
}

.booking-fields textarea {
    resize: vertical;
}

.booking-fields input:focus,
.booking-fields select:focus,
.booking-fields textarea:focus {
    border-color: var(--mc-sea);
    box-shadow: 0 0 0 3px rgba(27, 111, 118, .15);
}

.booking-consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 18px 0;
}

.booking-consent input {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--mc-sea);
}

.booking-submit,
.booking-request__actions button,
.booking-admin-inline-action button,
.booking-admin-link,
.booking-side__box--admin a,
.booking-status-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.booking-submit {
    width: 100%;
    min-height: 52px;
    border-color: var(--mc-sea);
    background: var(--mc-sea);
    color: #fff;
}

.booking-submit:hover,
.booking-admin-link:hover,
.booking-side__box--admin a:hover {
    background: var(--mc-sea-dark);
}

.booking-submit:disabled {
    border-color: var(--mc-line);
    background: #d8d4ca;
    color: #7f796e;
    cursor: not-allowed;
}

.booking-note {
    margin: 12px 0 0;
    color: var(--mc-muted);
    font-size: .92rem;
}

.booking-side {
    display: grid;
    gap: 16px;
    position: sticky;
    top: 18px;
}

.booking-side__box ul {
    margin: 0;
    padding-left: 19px;
    color: var(--mc-muted);
}

.booking-side__box li + li {
    margin-top: 9px;
}

.booking-side__box--admin a,
.booking-admin-link {
    width: 100%;
    margin-top: 8px;
    background: var(--mc-sea);
    color: #fff;
}

.booking-alert {
    display: grid;
    gap: 4px;
    margin: 0 0 18px;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid;
    background: #fff;
}

.booking-alert--success {
    border-color: rgba(53, 115, 93, .35);
    color: var(--mc-success);
}

.booking-alert--error {
    border-color: rgba(181, 71, 61, .35);
    color: var(--mc-danger);
}

.booking-trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.booking-shell--admin {
    width: min(1440px, calc(100% - 32px));
}

.booking-admin-head {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) 170px;
    gap: 22px;
    align-items: center;
    padding: 18px 0 26px;
}

.booking-admin-head h1 {
    font-size: clamp(2rem, 4vw, 4.2rem);
}

.booking-admin-grid {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.booking-admin-week,
.booking-admin-list {
    display: grid;
    gap: 12px;
}

.booking-admin-block-form {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--mc-line);
}

.booking-admin-sync {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid var(--mc-line);
    border-radius: 8px;
    background: #f6fbfa;
}

.booking-admin-sync p {
    margin: 0;
    color: var(--mc-muted);
    font-size: .9rem;
}

.booking-admin-sync code {
    overflow-wrap: anywhere;
}

.booking-admin-day {
    padding: 12px;
    border: 1px solid var(--mc-line);
    border-radius: 8px;
    background: #fffdf8;
}

.booking-admin-day h3 {
    margin: 0 0 10px;
    font-size: 1rem;
    color: var(--mc-sea-dark);
}

.booking-admin-slot {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 8px 0;
    border-top: 1px solid #eee5d7;
}

.booking-admin-slot:first-of-type {
    border-top: 0;
}

.booking-admin-slot strong {
    font-size: .9rem;
}

.booking-admin-empty,
.booking-admin-empty-state {
    color: var(--mc-muted);
}

.booking-admin-person {
    display: block;
    padding: 7px 9px;
    border-radius: 8px;
    background: #eef7f7;
    font-weight: 800;
}

.booking-admin-person strong,
.booking-admin-person a,
.booking-admin-person small {
    display: block;
}

.booking-admin-person a,
.booking-request__top a {
    overflow-wrap: anywhere;
}

.booking-admin-person a {
    color: var(--mc-sea);
    font-size: .8rem;
    font-weight: 700;
}

.booking-admin-person small,
.booking-request__top small {
    display: block;
    color: var(--mc-muted);
    font-size: .78rem;
    font-weight: 700;
}

.booking-admin-person em {
    display: block;
    color: var(--mc-muted);
    font-size: .76rem;
    font-style: normal;
    font-weight: 700;
}

.booking-admin-person--approved {
    background: #e4f2e7;
}

.booking-admin-person--pending {
    background: #fff3d4;
}

.booking-admin-person--blocked {
    border: 1px solid rgba(139, 111, 61, .25);
    background: #f4f1ec;
}

.booking-admin-person--google {
    border-color: rgba(0, 122, 129, .22);
    background: #e9f6f5;
}

.booking-admin-inline-action {
    margin-top: 8px;
}

.booking-admin-inline-action button {
    min-height: 30px;
    padding: 0 10px;
    border-color: rgba(139, 111, 61, .28);
    background: #fff;
    color: var(--mc-muted);
}

.booking-admin-toolbar {
    align-items: center;
}

.booking-status-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.booking-status-tabs a {
    min-height: 34px;
    padding: 0 11px;
    border-color: var(--mc-line);
    background: #fff;
    color: var(--mc-muted);
    font-size: .86rem;
}

.booking-status-tabs a.is-active {
    border-color: var(--mc-sea);
    background: var(--mc-sea);
    color: #fff;
}

.booking-request {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--mc-line);
    border-left: 5px solid var(--mc-gold);
    border-radius: 8px;
    background: #fffdf8;
}

.booking-request--approved {
    border-left-color: var(--mc-success);
}

.booking-request--rejected,
.booking-request--spam {
    border-left-color: var(--mc-danger);
}

.booking-request__top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.booking-request__top h3 {
    margin: 0 0 3px;
    font-size: 1.15rem;
}

.booking-request__top a {
    color: var(--mc-sea);
    font-weight: 700;
}

.booking-request__top > span {
    align-self: start;
    padding: 4px 9px;
    border-radius: 999px;
    background: #fff3d4;
    color: #725316;
    font-size: .78rem;
    font-weight: 800;
}

.booking-request dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.booking-request dt {
    color: var(--mc-muted);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.booking-request dd {
    margin: 2px 0 0;
    font-weight: 700;
}

.booking-request__message {
    margin: 0;
    padding: 12px;
    border-radius: 8px;
    background: #fff;
    color: var(--mc-muted);
}

.booking-request__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.booking-request__actions button {
    min-height: 36px;
    padding: 0 11px;
    border-color: var(--mc-line);
    background: #fff;
    color: var(--mc-ink);
}

.booking-request__actions button[value="approved"] {
    border-color: var(--mc-success);
    background: var(--mc-success);
    color: #fff;
}

.booking-request__actions button[value="spam"],
.booking-request__actions button[value="rejected"] {
    border-color: rgba(181, 71, 61, .4);
    color: var(--mc-danger);
}

@media (max-width: 980px) {
    .booking-hero__grid,
    .booking-layout,
    .booking-admin-head,
    .booking-admin-grid {
        grid-template-columns: 1fr;
    }

    .booking-hero__visual {
        justify-self: start;
        width: 210px;
    }

    .booking-side {
        position: static;
    }

    .booking-admin-link {
        width: max-content;
        padding: 0 16px;
    }
}

@media (max-width: 640px) {
    body {
        background-attachment: scroll;
    }

    .booking-shell,
    .booking-shell--admin {
        width: min(100% - 20px, 1180px);
        padding-top: 18px;
    }

    .booking-hero__copy h1,
    .booking-admin-head h1 {
        font-size: 2.55rem;
        line-height: 1;
    }

    .booking-panel,
    .booking-side__box,
    .booking-admin-panel {
        padding: 16px;
    }

    .booking-fields,
    .booking-request dl {
        grid-template-columns: 1fr;
    }

    .booking-week {
        grid-template-columns: repeat(7, 132px);
    }

    .booking-panel__head,
    .booking-request__top,
    .booking-admin-toolbar {
        display: grid;
    }

    .booking-status-tabs {
        justify-content: start;
    }
}
