:root {
    --bg: #f2f0eb;
    --surface: #fff;
    --text: #242424;
    --muted: #6c6c6c;
    --line: #dedbd3;
    --gold: #c2933f;
    --gold-dark: #7b5920;
    --teal: #03484b;
    --teal-dark: #062f31;
    --danger: #a93838;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Segoe UI", Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.admin-header { min-height: 72px; padding: 0 30px; display: flex; align-items: center; justify-content: space-between; gap: 30px; background: #090909; color: #fff; border-bottom: 2px solid var(--gold); }
.admin-brand { display: flex; align-items: center; gap: 14px; color: #e7c878; font-family: Georgia, serif; letter-spacing: .08em; }
.admin-brand img { width: 58px; height: 58px; object-fit: cover; }
.admin-header nav { display: flex; align-items: center; gap: 22px; }
.admin-header nav a, .admin-header nav button { color: #d7d7d7; border: 0; background: transparent; cursor: pointer; }
.admin-header nav a:hover, .admin-header nav button:hover { color: #e7c878; }
.admin-header form { margin: 0; }
.admin-main { width: min(calc(100% - 40px), 1380px); margin: 34px auto 70px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading.compact { align-items: center; }
.page-heading p { margin: 0 0 5px; color: var(--gold-dark); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.page-heading h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 400; }
.primary-action, .secondary-action, .danger-action, .filters button, .login-card button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 0 20px; border: 0; border-radius: 4px; cursor: pointer; font-weight: 700; }
.primary-action, .filters button, .login-card button { background: var(--teal); color: #fff; }
.secondary-action { border: 1px solid var(--teal); color: var(--teal); background: transparent; }
.danger-action { background: #f7e2e2; color: var(--danger); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.stats-grid article { padding: 22px; border-top: 3px solid var(--gold); background: var(--surface); box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.stats-grid span { display: block; color: var(--muted); font-size: .9rem; }
.stats-grid strong { display: block; margin-top: 8px; font-family: Georgia, serif; font-size: 2.2rem; color: var(--teal); }
.admin-panel { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 8px 28px rgba(0,0,0,.045); }
.admin-panel h2 { margin: 0 0 22px; font-family: Georgia, serif; font-size: 1.55rem; font-weight: 400; }
.filters { display: grid; grid-template-columns: 1fr 250px auto auto; gap: 12px; margin-bottom: 22px; }
.filters input, .filters select, .update-panel input, .update-panel select, .update-panel textarea { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #cfcac0; border-radius: 4px; background: #fff; }
.filters a { display: grid; place-items: center; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 14px; background: #f5f3ee; color: #68645d; text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
td { padding: 15px 14px; border-bottom: 1px solid #ece9e2; vertical-align: top; }
td small { display: block; margin-top: 5px; color: var(--muted); font-size: .78rem; }
.row-action { color: var(--teal); font-weight: 700; }
.status { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.status-pending { background: #fff0c9; color: #795800; }
.status-confirmed { background: #d7f2e1; color: #17653a; }
.status-cancelled, .status-rejected { background: #f7dddd; color: #8d2727; }
.status-completed { background: #e4e7eb; color: #4a5159; }
.empty-state { padding: 35px !important; color: var(--muted); text-align: center; }
.pagination { display: flex; gap: 7px; margin-top: 20px; }
.pagination a { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; }
.pagination a.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.details-grid { display: grid; grid-template-columns: 1.45fr .8fr; gap: 24px; align-items: start; }
.blocks-layout { grid-template-columns: .7fr 1.3fr; }
.booking-details dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; }
.booking-details dl div { padding: 14px 0; border-bottom: 1px solid #ece9e2; }
.booking-details dl div:nth-child(odd) { padding-right: 20px; }
.booking-details dl .full { grid-column: 1/-1; }
dt { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
dd { margin: 5px 0 0; }
.update-panel form { display: grid; gap: 17px; }
.update-panel label { display: grid; gap: 7px; font-weight: 600; }
.hint { margin: 18px 0 0; padding: 12px; background: #f5f2e9; color: #68645d; font-size: .85rem; }
.history-panel { margin-top: 24px; }
.timeline { display: grid; gap: 0; }
.timeline article { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding-bottom: 22px; }
.timeline article:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 12px; bottom: 0; width: 1px; background: #d5c8aa; }
.timeline-dot { position: relative; z-index: 1; width: 13px; height: 13px; margin-top: 5px; border: 3px solid #fff; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.timeline time { margin-left: 10px; color: var(--muted); font-size: .8rem; }
.timeline p { margin: 6px 0; }
.timeline small { color: var(--muted); }
.block-list { display: grid; gap: 12px; }
.block-list article { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px; border: 1px solid #e5e1d9; border-left: 4px solid var(--gold); }
.block-list p { margin: 5px 0; }
.block-list small { color: var(--muted); }
.flash { margin-bottom: 18px; padding: 13px 16px; border-radius: 4px; }
.flash.success { background: #dff2e5; color: #1e653d; }
.flash.error { background: #f8dede; color: #8d2727; }
.back-link { display: inline-block; margin-bottom: 10px; color: var(--teal); }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at center, #075054, #050505 66%); }
.login-card { width: min(430px, 100%); padding: 34px; background: #fff; border-top: 4px solid var(--gold); box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.login-card img { width: 190px; margin: 0 auto 18px; }
.login-card h1 { margin: 0; text-align: center; font-family: Georgia, serif; font-weight: 400; }
.login-card > p { color: var(--muted); text-align: center; }
.login-card form { display: grid; gap: 16px; margin-top: 24px; }
.login-card label { display: grid; gap: 6px; font-weight: 600; }
.login-card input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cfcac0; }
.login-card .remember { display: flex; grid-template-columns: auto 1fr; align-items: center; font-weight: 400; }
.login-card .remember input { width: auto; min-height: 0; }
.login-card span[field-validation-for] { color: var(--danger); font-size: .8rem; }
.validation-summary { color: var(--danger); }
.back-link { margin-top: 18px; text-align: center; }

@media (max-width: 900px) {
    .admin-header { align-items: flex-start; padding: 10px 18px; }
    .admin-header nav { flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
    .admin-brand span { display: none; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .details-grid, .blocks-layout { grid-template-columns: 1fr; }
    .filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 580px) {
    .admin-main { width: calc(100% - 22px); margin-top: 22px; }
    .admin-header { display: block; }
    .admin-header nav { margin-top: 8px; justify-content: flex-start; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .stats-grid { grid-template-columns: 1fr; }
    .filters { grid-template-columns: 1fr; }
    .booking-details dl { grid-template-columns: 1fr; }
    .booking-details dl div:nth-child(odd) { padding-right: 0; }
    .block-list article { align-items: flex-start; flex-direction: column; }
}
.password-panel { max-width: 650px; }
.update-panel span[field-validation-for] { color: var(--danger); font-size: .82rem; font-weight: 400; }

/* Booking settings — light admin theme */

.settings-panel {
    max-width: 1050px;
    margin-inline: auto;
}

.settings-intro {
    margin-bottom: 30px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2ddd4;
}

    .settings-intro h2 {
        margin: 0 0 10px;
        color: #9a6815;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 1.45rem;
        font-weight: 500;
    }

    .settings-intro p {
        max-width: 800px;
        margin: 0;
        color: #555b60;
        font-size: 1rem;
        line-height: 1.7;
    }

.settings-form {
    display: grid;
    gap: 26px;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.settings-field {
    min-width: 0;
    padding: 24px 28px;
    display: grid;
    align-content: start;
    gap: 10px;
    border: 1px solid #ddd6ca;
    border-radius: 7px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

    .settings-field:focus-within {
        border-color: #a8741c;
        box-shadow: 0 0 0 3px rgba(168, 116, 28, .11);
    }

    .settings-field > label {
        color: #8b5d10;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 1.05rem;
        font-weight: 500;
    }

    .settings-field > input,
    .price-input input {
        width: 100%;
        min-height: 50px;
        padding: 11px 14px;
        border: 1px solid #aaa49b;
        border-radius: 5px;
        outline: 0;
        background: #fff;
        color: #222;
        font: inherit;
        font-size: 1rem;
        opacity: 1;
        transition: border-color .2s ease, box-shadow .2s ease;
    }

        .settings-field > input:hover,
        .price-input input:hover {
            border-color: #777169;
        }

        .settings-field > input:focus,
        .price-input input:focus {
            border-color: #9a6815;
            box-shadow: 0 0 0 3px rgba(154, 104, 21, .12);
        }

        .settings-field > input::placeholder,
        .price-input input::placeholder {
            color: #888;
            opacity: 1;
        }

    .settings-field small {
        color: #62676b;
        font-size: .88rem;
        line-height: 1.55;
    }

.price-input {
    position: relative;
    width: 100%;
}

    .price-input input {
        padding-right: 50px;
    }

    .price-input > span {
        position: absolute;
        top: 50%;
        right: 18px;
        color: #8b5d10;
        font-family: Georgia, serif;
        font-size: 1.2rem;
        font-weight: 600;
        transform: translateY(-50%);
        pointer-events: none;
    }

/* Toggle */

.settings-toggle {
    position: relative;
    grid-column: 1 / -1;
    padding: 24px 28px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 20px;
    border: 1px solid #cfc8bc;
    border-radius: 7px;
    background: #f7f5f0;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}

    .settings-toggle:hover {
        border-color: #a8741c;
        background: #f9f7f2;
    }

    .settings-toggle > input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

.toggle-control {
    position: relative;
    width: 56px;
    height: 30px;
    border: 1px solid #8b867e;
    border-radius: 20px;
    background: #d2cec7;
    transition: background .2s ease, border-color .2s ease;
}

    .toggle-control::after {
        content: "";
        position: absolute;
        top: 3px;
        left: 3px;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 2px 5px rgba(0, 0, 0, .22);
        transition: transform .2s ease;
    }

.settings-toggle > input:checked + .toggle-control {
    border-color: #174d50;
    background: #174d50;
}

    .settings-toggle > input:checked + .toggle-control::after {
        transform: translateX(26px);
    }

.settings-toggle > input:focus-visible + .toggle-control {
    box-shadow: 0 0 0 4px rgba(154, 104, 21, .18);
}

.toggle-copy {
    display: grid;
    gap: 6px;
}

    .toggle-copy strong {
        color: #764d0c;
        font-family: Georgia, "Times New Roman", serif;
        font-size: 1rem;
        font-weight: 600;
    }

    .toggle-copy small {
        color: #5f6468;
        font-size: .88rem;
        line-height: 1.55;
    }

/* Warning */

.settings-warning {
    padding: 17px 20px;
    border: 1px solid #ddc99e;
    border-left: 4px solid #a8741c;
    border-radius: 4px;
    background: #fff9eb;
    color: #54504a;
    line-height: 1.55;
}

    .settings-warning strong {
        color: #80540c;
    }

/* Actions */

.settings-actions {
    padding-top: 22px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    border-top: 1px solid #e2ddd4;
}

    .settings-actions > a {
        color: #555b60;
        font-weight: 600;
    }

        .settings-actions > a:hover {
            color: #80540c;
        }

    .settings-actions .primary-action {
        border: 0;
        cursor: pointer;
    }

/* Validation */

.settings-validation-summary.validation-summary-valid {
    display: none;
}

.settings-validation-summary.validation-summary-errors {
    display: block;
    color: #9c2525;
}

.settings-validation-summary ul {
    margin: 0;
    padding: 15px 20px 15px 42px;
    border: 1px solid #e0aaaa;
    border-radius: 5px;
    background: #fff2f2;
}

.field-validation {
    color: #a62424;
    font-size: .84rem;
    font-weight: 600;
}

    .field-validation:empty,
    .field-validation-valid {
        display: none;
    }

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

    .settings-field {
        padding: 22px 20px;
    }

    .settings-toggle {
        grid-column: auto;
        padding: 22px 20px;
    }

    .settings-actions {
        align-items: stretch;
        flex-direction: column-reverse;
        text-align: center;
    }

        .settings-actions .primary-action {
            width: 100%;
        }
}