:root {
    color-scheme: light;
    --cream: #FEF3D3;
    --cream-soft: #fff9ea;
    --cream-light: #fffdf6;
    --green: #647F52;
    --green-dark: #4d653d;
    --ink: #555;
    --ink-strong: #333;
    --line: #d9c99d;
    --line-strong: #b9a56d;
    --danger: #9f3d35;
    --danger-soft: #fff0ed;
    --success: #416f45;
    --success-soft: #eef6e8;
    --warn: #86612a;
    --new: #fff4b8;
    --shadow: 0 18px 45px rgba(85, 85, 85, .14);
}

* {
    box-sizing: border-box;
}

html {
    background: var(--cream);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        linear-gradient(180deg, rgba(254, 243, 211, .96), rgba(255, 249, 234, .98)),
        var(--cream);
    color: var(--ink);
}

main {
    width: min(960px, calc(100% - 28px));
    margin: 0 auto;
    padding: 28px 0;
}

.reservation-page {
    display: grid;
    gap: 18px;
    padding-bottom: 42px;
}

.reservation-intro,
.reservation-form,
.notice,
.success,
.error-list {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--cream-light);
    box-shadow: var(--shadow);
}

.reservation-intro {
    padding: clamp(22px, 5vw, 42px);
    border-top: 8px solid var(--green);
}

.topline {
    color: var(--green);
    font-size: .95rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

h1 {
    margin: 10px 0 16px;
    color: var(--ink-strong);
    font-size: clamp(2.15rem, 8vw, 4.6rem);
    line-height: 1.02;
}

p {
    margin: 0;
    line-height: 1.58;
}

a {
    color: var(--green);
}

.notice,
.success,
.error-list {
    padding: 16px 18px;
}

.notice {
    margin-top: 18px;
    background: var(--cream-soft);
    color: var(--ink);
    box-shadow: none;
}

.success {
    border-color: #9db58b;
    background: var(--success-soft);
    color: var(--success);
    font-size: 1.1rem;
    font-weight: 800;
}

.error-list {
    border-color: #d19188;
    background: var(--danger-soft);
    color: var(--danger);
}

.error-list strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.error-list ul {
    margin: 0;
    padding-left: 20px;
}

.reservation-form {
    display: grid;
    gap: 18px;
    padding: clamp(18px, 4vw, 32px);
}

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

label {
    display: grid;
    gap: 8px;
    color: var(--ink-strong);
    font-size: 1.06rem;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    padding: 13px 14px;
    background: #fff;
    color: var(--ink-strong);
    font: inherit;
    font-weight: 600;
}

textarea {
    min-height: 116px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
    outline: 3px solid rgba(100, 127, 82, .3);
    outline-offset: 2px;
    border-color: var(--green);
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border: 0;
    border-radius: 8px;
    padding: 0 20px;
    background: var(--green);
    color: #fff;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 900;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

button:hover,
.button:hover {
    background: var(--green-dark);
}

button:disabled {
    cursor: not-allowed;
    opacity: .65;
}

.reservation-form > button {
    width: 100%;
    margin-top: 4px;
    font-size: 1.15rem;
}

.field-hint {
    color: var(--ink);
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.35;
}

.page-dashboard {
    background: var(--cream);
}

.dashboard {
    width: min(1280px, calc(100% - 28px));
}

.dashboard h1 {
    font-size: clamp(2.2rem, 5vw, 4.6rem);
}

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

.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.status {
    color: var(--green);
    font-size: 1.1rem;
    font-weight: 900;
}

.reservations {
    display: grid;
    gap: 14px;
}

.reservation {
    border: 2px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    background: var(--cream-light);
    transition: background-color .3s ease, border-color .3s ease;
}

.reservation.is-new {
    border-color: var(--green);
    background: var(--new);
}

.reservation header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.when {
    color: var(--ink-strong);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 900;
}

.guest {
    color: var(--ink-strong);
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 900;
}

.details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0;
    color: var(--ink);
    font-size: 1.12rem;
    font-weight: 800;
}

.note {
    white-space: pre-wrap;
    font-size: 1.12rem;
    line-height: 1.45;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.actions button {
    flex: 1 1 180px;
    font-size: 1.08rem;
}

.reject {
    background: var(--danger);
}

.reject:hover {
    background: #7f302a;
}

.callback {
    background: var(--warn);
}

.callback:hover {
    background: #6e4e20;
}

.empty {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 48px 16px;
    background: var(--cream-light);
    text-align: center;
    color: var(--ink);
    font-size: 1.3rem;
    font-weight: 900;
}

.admin-section {
    display: grid;
    gap: 14px;
    margin: 18px 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    background: var(--cream-light);
}

.admin-section h2 {
    margin: 0;
    color: var(--ink-strong);
    font-size: clamp(1.4rem, 3vw, 2rem);
}

.admin-table {
    display: grid;
    grid-template-columns: minmax(120px, .35fr) 1fr;
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--line);
}

.admin-table > div,
.admin-table > form {
    margin: 0;
    padding: 12px;
    background: var(--cream-soft);
    color: var(--ink-strong);
    font-weight: 800;
}

.special-days {
    grid-template-columns: minmax(120px, .22fr) 1fr minmax(130px, .18fr) minmax(110px, .18fr);
}

.compact-form {
    box-shadow: none;
}

.small-button {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    font-size: .95rem;
}

@media (max-width: 720px) {
    main {
        width: min(100% - 20px, 960px);
        padding: 16px 0 28px;
    }

    .grid,
    .details,
    .admin-table,
    .special-days {
        grid-template-columns: 1fr;
    }

    .reservation-intro,
    .reservation-form,
    .notice,
    .success,
    .error-list {
        box-shadow: 0 10px 22px rgba(85, 85, 85, .1);
    }

    .toolbar {
        align-items: stretch;
    }

    .toolbar button,
    .toolbar .button,
    .toolbar-actions {
        width: 100%;
    }
}
