:root {
    --ink: #201d19;
    --muted: #6c655d;
    --cream: #f4efe6;
    --paper: #fffdf9;
    --wine: #6d1f32;
    --wine-dark: #511525;
    --line: #ded5c8;
    --success: #245b3a;
    --danger: #8a2733;
    color-scheme: light;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font: 16px/1.5 Arial, sans-serif;
}
button, input, select, textarea { font: inherit; }
.shell { width: min(1050px, calc(100% - 28px)); margin: 0 auto; padding: 34px 0 60px; }
.guest-shell { max-width: 760px; }
.hero { margin-bottom: 24px; }
.hero h1 { margin: 2px 0 6px; font: 700 clamp(34px, 8vw, 58px)/1 Georgia, serif; }
.hero p { margin: 0; color: var(--muted); }
.eyebrow { color: var(--wine) !important; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(55, 42, 30, .08);
    padding: clamp(18px, 4vw, 34px);
}
.step { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.step span {
    display: grid; place-items: center; flex: 0 0 30px; height: 30px;
    border-radius: 50%; background: var(--wine); color: white; font-weight: 700;
}
h2, h3 { margin: 0 0 5px; font-family: Georgia, serif; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: grid; gap: 7px; margin-bottom: 16px; font-size: 14px; font-weight: 700; }
input, select, textarea {
    width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 9px;
    background: white; color: var(--ink); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--wine); box-shadow: 0 0 0 3px rgba(109, 31, 50, .12); }
.slots-wrap { margin: 10px 0 30px; }
.slots { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.slot { border: 1px solid var(--wine); border-radius: 999px; padding: 8px 16px; background: white; color: var(--wine); cursor: pointer; }
.slot.selected, .slot:hover { background: var(--wine); color: white; }
.primary, .secondary, .danger {
    border: 0; border-radius: 9px; padding: 11px 16px; cursor: pointer; font-weight: 700;
}
.primary { background: var(--wine); color: white; }
.primary:hover { background: var(--wine-dark); }
.secondary { background: #ece5da; color: var(--ink); }
.danger { background: #f4dce0; color: var(--danger); }
.check { grid-template-columns: auto 1fr; align-items: start; font-weight: 400; }
.check input { width: auto; margin-top: 4px; }
.muted { color: var(--muted); font-weight: 400; }
.hidden { display: none !important; }
.message { margin-top: 18px; border-radius: 9px; padding: 12px 14px; background: #eee8dc; }
.message.success { background: #dfeee5; color: var(--success); }
.message.error { background: #f4dce0; color: var(--danger); }

.admin-header { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 22px; }
.admin-header h1 { margin: 0; font-family: Georgia, serif; }
.admin-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.admin-nav button.active { background: var(--wine); color: white; }
.panel { display: none; }
.panel.active { display: block; }
.toolbar { display: flex; gap: 12px; align-items: end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar label { margin: 0; }
.reservation-list { display: grid; gap: 10px; }
.reservation {
    display: grid; grid-template-columns: 90px 1fr auto; gap: 16px; align-items: center;
    padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: white;
}
.reservation time { font-size: 20px; font-weight: 700; color: var(--wine); }
.reservation p { margin: 2px 0; }
.table-list { display: grid; gap: 8px; }
.table-row {
    display: grid; grid-template-columns: 45px 1fr 100px 90px auto; gap: 10px; align-items: center;
    padding: 10px; border: 1px solid var(--line); border-radius: 9px;
}
.login { max-width: 430px; margin: 10vh auto; }
.login h1 { font-family: Georgia, serif; }
.modal {
    position: fixed; inset: 0; z-index: 5; display: grid; place-items: center;
    background: rgba(30, 25, 20, .5); padding: 14px;
}
.modal .card { width: min(620px, 100%); max-height: 92vh; overflow: auto; }
.actions { display: flex; gap: 8px; justify-content: flex-end; }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

@media (max-width: 650px) {
    .grid.two { grid-template-columns: 1fr; }
    .reservation { grid-template-columns: 70px 1fr; }
    .reservation .actions { grid-column: 1 / -1; }
    .table-row { grid-template-columns: 35px 1fr 85px; }
    .table-row .active-control, .table-row .actions { grid-column: 2 / -1; justify-content: flex-start; }
}
