
:root {
    --ink: #171716;
    --muted: #6f6c66;
    --soft: #f3f0e9;
    --paper: #fffdfa;
    --line: #ddd8cf;
    --accent: #a12a24;
    --accent-dark: #7f1f1b;
    --green: #28785d;
    --amber: #a66a18;
    --red: #a23e39;
    --blue: #3e647d;
    --shadow: 0 24px 70px rgba(29, 26, 20, 0.12);
    --radius: 22px;
    --radius-sm: 13px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }

h1, h2, h3, p { margin-top: 0; }
h1, h2 { letter-spacing: -0.035em; }
h1 { font-family: "Playfair Display", Georgia, serif; }

.eyebrow {
    display: block;
    color: var(--accent);
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.step-chip, .count-chip, .live-badge, .staff-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 27px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f1e7e4;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
}
.live-badge, .staff-chip { background: #e8f4ee; color: var(--green); }
.count-chip { background: var(--soft); color: var(--muted); }
.text-link, .text-button {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--ink);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    cursor: pointer;
}
.text-button.danger { color: var(--red); }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: 0.18s ease;
}
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.button-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 20px rgba(161, 42, 36, 0.18); }
.button-primary:hover { background: var(--accent-dark); }
.button-secondary { border-color: var(--line); background: #fff; color: var(--ink); }
.button-secondary:hover { border-color: #b9b3a9; background: #faf8f3; }
.button-large { min-height: 56px; }
.button-small { min-height: 38px; padding: 0 14px; font-size: 0.85rem; }
.icon-button {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
}

.field { display: grid; gap: 7px; }
.field > span, .field > label { font-size: 0.83rem; font-weight: 700; }
.field em { color: var(--muted); font-style: normal; font-weight: 500; }
.field small { color: var(--muted); font-size: 0.75rem; }
.field input, .field select, .field textarea,
.search-grid input, .search-grid select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    outline: none;
    transition: 0.18s ease;
}
.field input, .field select, .search-grid input, .search-grid select { height: 51px; padding: 0 14px; }
.field textarea { padding: 13px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus,
.search-grid input:focus, .search-grid select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(161, 42, 36, 0.08); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.field-full { grid-column: 1 / -1; }
.compact-form { gap: 14px; }
.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.84rem; }
.check-row input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.subtle-check { color: var(--muted); }
.input-suffix { display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.input-suffix input { border: 0; border-radius: 0; }
.input-suffix b { display: flex; align-items: center; padding: 0 13px; background: var(--soft); color: var(--muted); font-size: 0.78rem; }
.honeypot { position: absolute !important; left: -10000px !important; }

.alert, .app-alert {
    padding: 13px 15px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 0.88rem;
    font-weight: 600;
}
.alert-error, .app-alert.error { background: #f9e7e5; color: #7e2d28; border: 1px solid #edc8c4; }
.alert-success, .app-alert.success { background: #e8f5ee; color: #24634f; border: 1px solid #c7e3d5; }

/* Customer booking */
.booking-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 0 0, rgba(161, 42, 36, 0.08), transparent 33%),
        linear-gradient(180deg, #f9f5ee 0%, #fffdfa 58%, #fff 100%);
}
.booking-header {
    max-width: 1210px;
    margin: 0 auto;
    padding: 22px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.booking-logo { display: block; width: 86px; height: 86px; border-radius: 18px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.booking-logo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.booking-shell {
    max-width: 1210px;
    margin: 0 auto;
    padding: 55px 28px 80px;
    display: grid;
    grid-template-columns: minmax(280px, 0.78fr) minmax(540px, 1.22fr);
    gap: 70px;
    align-items: start;
}
.booking-intro { position: sticky; top: 30px; padding-top: 35px; }
.booking-intro h1 { max-width: 520px; margin: 14px 0 18px; font-size: clamp(3rem, 5vw, 5.6rem); line-height: 0.96; }
.booking-intro > p { max-width: 480px; color: var(--muted); font-size: 1.05rem; }
.trust-row { display: grid; gap: 12px; margin-top: 34px; }
.trust-row span { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.trust-row span::before { content: "✓"; display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #e8f4ee; color: var(--green); font-size: 0.72rem; }
.booking-card {
    min-height: 610px;
    padding: 30px;
    border: 1px solid rgba(217, 209, 198, 0.85);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.93);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}
.progress-track { display: flex; gap: 8px; margin-bottom: 34px; }
.progress-step { flex: 1; display: flex; align-items: center; gap: 8px; color: #aaa49a; font-size: 0.75rem; font-weight: 700; }
.progress-step b { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--soft); font-size: 0.72rem; }
.progress-step.active { color: var(--ink); }
.progress-step.active b { background: var(--accent); color: #fff; }
.section-heading { margin-bottom: 23px; }
.section-heading h2 { margin: 10px 0 0; font-size: 1.65rem; }
.booking-step { display: none; }
.booking-step.active { display: block; animation: fadeUp 0.25s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.search-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.search-grid .button { grid-column: 1 / -1; }
.slots-panel { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 24px; }
.slots-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.slots-heading h3 { margin-bottom: 2px; }
.slots-heading p { margin: 0; color: var(--muted); font-size: 0.83rem; }
.slot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.slot-button { min-height: 45px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 700; cursor: pointer; }
.slot-button:hover, .slot-button.selected { border-color: var(--accent); color: var(--accent); background: #fbf2f0; }
.slot-button small { display: block; color: var(--red); font-size: 0.62rem; font-weight: 700; }
.fine-print { margin: 14px 0 0; color: var(--muted); font-size: 0.73rem; }
.back-button { border: 0; background: transparent; padding: 0; margin-bottom: 20px; font-weight: 700; cursor: pointer; }
.booking-summary { margin-bottom: 26px; padding: 16px; border-radius: 14px; background: var(--soft); }
.booking-summary strong { display: block; margin-bottom: 4px; }
.booking-summary span { color: var(--muted); font-size: 0.86rem; }
.confirmation-step { text-align: center; padding: 34px 12px; }
.confirmation-icon { width: 66px; height: 66px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; background: #e7f5ed; color: var(--green); font-size: 2rem; font-weight: 700; }
.confirmation-step h2 { margin: 10px 0; font-size: 2.25rem; }
.confirmation-step > p { max-width: 440px; margin: 0 auto; color: var(--muted); }
.confirmation-card { max-width: 420px; margin: 28px auto; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; text-align: left; }
.confirmation-card .ref { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.confirmation-card .ref span { color: var(--muted); font-size: 0.76rem; }
.confirmation-card .ref strong { color: var(--accent); }
.confirmation-card p { margin: 8px 0; }
.confirmation-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.booking-footer { max-width: 1210px; margin: 0 auto; padding: 0 28px 30px; display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 0.82rem; }

.manage-shell { max-width: 650px; margin: 0 auto; padding: 55px 25px 90px; }
.manage-card { padding: 34px; border-radius: 24px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.manage-card h1 { margin: 10px 0; font-size: 2.7rem; }
.manage-card > p { color: var(--muted); }
#booking-result { margin-top: 28px; padding-top: 25px; border-top: 1px solid var(--line); }
.manage-booking-card { display: grid; gap: 18px; }
.manage-booking-card h2 { margin-bottom: 4px; }
.manage-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.manage-meta div { padding: 14px; border-radius: 12px; background: var(--soft); }
.manage-meta span { display: block; color: var(--muted); font-size: 0.72rem; }
.manage-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.reschedule-box { padding: 18px; border-radius: 14px; background: var(--soft); }

/* Setup and login */
.setup-page, .admin-login-page { min-height: 100vh; background: #151514; }
.setup-shell, .admin-login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 0.9fr) minmax(560px, 1.1fr); }
.setup-brand, .admin-login-brand { min-height: 100%; padding: 80px max(50px, 8vw); display: flex; flex-direction: column; justify-content: space-between; color: #fff; background: radial-gradient(circle at 10% 10%, rgba(161, 42, 36, .42), transparent 40%), #151514; }
.setup-brand img, .admin-login-brand img { width: 135px; border-radius: 24px; }
.setup-brand h1, .admin-login-brand h1 { margin: 12px 0 18px; max-width: 560px; font-size: clamp(3rem, 5vw, 5rem); line-height: 0.98; }
.setup-brand p, .admin-login-brand p { max-width: 560px; color: #cfcac0; }
.setup-card, .admin-login-card { align-self: center; margin: 45px; padding: 40px; border-radius: 26px; background: #fff; box-shadow: var(--shadow); }
.admin-login-card { max-width: 540px; width: calc(100% - 90px); justify-self: center; }
.admin-login-card h2 { margin: 12px 0 24px; font-size: 2rem; }
.login-back { display: inline-block; margin-top: 25px; }

/* Admin shell */
.admin-page { background: #f4f2ed; }
.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 245px minmax(0, 1fr); }
.admin-sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 18px; display: flex; flex-direction: column; background: #171716; color: #fff; z-index: 20; }
.admin-logo { width: 78px; height: 78px; border-radius: 18px; overflow: hidden; margin: 0 8px 30px; }
.admin-logo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.admin-nav { display: grid; gap: 6px; }
.admin-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 13px; border-radius: 11px; color: #aaa69d; text-decoration: none; font-weight: 700; }
.admin-nav a span { width: 20px; text-align: center; }
.admin-nav a:hover, .admin-nav a.active { color: #fff; background: rgba(255,255,255,.09); }
.sidebar-footer { margin-top: auto; display: grid; gap: 12px; padding: 0 10px 4px; }
.sidebar-footer a { color: #aaa69d; font-size: 0.82rem; text-decoration: none; }
.sidebar-footer a:hover { color: #fff; }
.admin-main { min-width: 0; }
.admin-topbar { min-height: 102px; padding: 22px 35px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #dedad2; background: rgba(255,255,255,.87); backdrop-filter: blur(12px); }
.admin-topbar h1 { margin: 3px 0 0; font-family: "DM Sans", sans-serif; font-size: 1.7rem; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.mobile-menu { display: none; }
.admin-content { padding: 28px 34px 60px; }
.panel { border: 1px solid #dfdbd3; border-radius: 18px; background: #fff; box-shadow: 0 7px 25px rgba(43, 39, 31, .04); }
.panel-heading { padding: 22px 23px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #e8e4dd; }
.panel-heading.compact { padding: 18px 20px; }
.panel-heading h2 { margin: 4px 0 0; font-size: 1.22rem; }
.panel-heading small { color: var(--muted); }
.service-toolbar { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.date-nav, .service-actions { display: flex; align-items: center; gap: 9px; }
.date-picker-label { position: relative; min-width: 235px; height: 42px; display: flex; align-items: center; justify-content: center; padding: 0 16px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; }
.date-picker-label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.date-picker-label strong { font-size: 0.9rem; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.metric-card { padding: 20px; border: 1px solid #dfdbd3; border-radius: 16px; background: #fff; }
.metric-card span, .metric-card small { display: block; color: var(--muted); }
.metric-card span { font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
.metric-card strong { display: block; margin: 7px 0 2px; font-size: 2rem; line-height: 1; }
.metric-card small { font-size: 0.72rem; }
.service-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .72fr); gap: 20px; align-items: start; }
.bookings-panel { min-width: 0; }
.filter-tabs { display: flex; gap: 5px; padding: 4px; border-radius: 10px; background: var(--soft); }
.filter-tabs button { border: 0; padding: 6px 10px; border-radius: 8px; background: transparent; color: var(--muted); font-size: 0.75rem; font-weight: 700; cursor: pointer; }
.filter-tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 2px 7px rgba(0,0,0,.06); }
.booking-list { min-height: 180px; }
.booking-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 15px; align-items: center; padding: 18px 21px; border-bottom: 1px solid #ede9e2; }
.booking-row:last-child { border-bottom: 0; }
.booking-row.status-cancelled, .booking-row.status-no_show { opacity: .6; }
.booking-time { align-self: stretch; padding-right: 14px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid #e4e0d8; }
.booking-time strong { font-size: 1.02rem; }
.booking-time span { color: var(--muted); font-size: .7rem; }
.guest-heading { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.guest-heading h3 { margin: 0; font-size: 1rem; }
.booking-guest p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }
.booking-notes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.booking-notes span { padding: 4px 8px; border-radius: 7px; background: #f5f0e6; color: #70573e; font-size: .7rem; }
.booking-actions { display: flex; gap: 8px; align-items: center; }
.status-select { height: 37px; max-width: 125px; padding: 0 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: .75rem; font-weight: 700; }
.status-pill { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: .65rem; font-weight: 700; background: #ece9e3; color: var(--muted); }
.status-booked { background: #e9eef2; color: var(--blue); }
.status-confirmed { background: #e6f2eb; color: var(--green); }
.status-arrived { background: #f7eddb; color: var(--amber); }
.status-seated { background: #eee6f5; color: #6e4d87; }
.status-completed { background: #e8e8e8; color: #4e4e4e; }
.status-cancelled, .status-no_show { background: #f4e3e2; color: var(--red); }
.empty-state { min-height: 300px; display: grid; place-items: center; align-content: center; text-align: center; padding: 35px; }
.empty-state > span { font-size: 2rem; }
.empty-state h3 { margin: 8px 0 4px; }
.empty-state p, .empty-copy { color: var(--muted); }
.service-side { display: grid; gap: 20px; }
.table-status-grid { padding: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.table-tile { min-height: 92px; padding: 12px 10px; display: grid; align-content: center; justify-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fbfaf7; text-align: center; }
.table-tile span { font-size: .72rem; font-weight: 700; }
.table-tile strong { margin: 2px 0; font-size: 1.15rem; }
.table-tile small { max-width: 90px; color: var(--muted); font-size: .62rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-occupied { background: #f5e7e5; border-color: #e5c5c1; }
.table-reserved { background: #f7f0e2; border-color: #e5d4b3; }
.waitlist-list { padding: 5px 18px 15px; }
.waitlist-row { padding: 14px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #ece8e1; }
.waitlist-row:last-child { border-bottom: 0; }
.waitlist-row strong, .waitlist-row span { display: block; }
.waitlist-row span { color: var(--muted); font-size: .72rem; }
.mini-actions { display: flex; gap: 5px; }
.mini-actions button { border: 0; padding: 5px 7px; border-radius: 6px; background: var(--soft); font-size: .65rem; font-weight: 700; cursor: pointer; }

/* Modal and drawer */
.modal, .drawer { position: fixed; inset: 0; z-index: 100; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16, 15, 13, .58); backdrop-filter: blur(3px); }
.modal-card { position: relative; width: min(520px, calc(100% - 30px)); max-height: calc(100vh - 40px); overflow: auto; margin: 20px auto; padding: 28px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); animation: fadeUp .18s ease; }
.modal-wide { width: min(710px, calc(100% - 30px)); }
.modal-card h2 { margin: 10px 0 22px; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--soft); font-size: 1.35rem; cursor: pointer; }
.drawer-card { position: absolute; top: 0; right: 0; width: min(440px, 100%); height: 100%; overflow: auto; padding: 35px; background: #fff; box-shadow: -20px 0 60px rgba(0,0,0,.16); }
.drawer-card h2 { margin: 10px 0 5px; }
.drawer-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 20px 0; }
.drawer-detail-grid div { padding: 13px; border-radius: 11px; background: var(--soft); }
.drawer-detail-grid span { display: block; color: var(--muted); font-size: .7rem; }
.drawer-section { padding: 18px 0; border-top: 1px solid var(--line); }
.drawer-section h3 { font-size: .85rem; }
.drawer-section p { color: var(--muted); }

/* Settings / tables / reports */
.page-intro-row { margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.page-intro-row p { margin: 0; max-width: 720px; color: var(--muted); }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 15px 20px; border-bottom: 1px solid #ebe7df; text-align: left; white-space: nowrap; font-size: .84rem; }
.admin-table th { color: var(--muted); font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; }
.admin-table tr:last-child td { border-bottom: 0; }
.table-actions { text-align: right !important; }
.table-actions button + button { margin-left: 13px; }
.help-panel, .password-panel { margin-top: 20px; padding: 22px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.help-panel p, .password-panel p { margin: 0; max-width: 700px; color: var(--muted); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.settings-section { padding-bottom: 23px; }
.settings-section .form-grid { padding: 0 23px; }
.settings-wide { grid-column: 1 / -1; }
.hours-list { padding: 0 23px; }
.hours-row { display: grid; grid-template-columns: minmax(170px, 1fr) 180px 180px; gap: 15px; align-items: center; padding: 12px 0; border-bottom: 1px solid #ece8e1; }
.hours-row:last-child { border-bottom: 0; }
.hours-row > label:not(.toggle-label) { display: grid; grid-template-columns: 35px 1fr; align-items: center; gap: 7px; color: var(--muted); font-size: .72rem; }
.hours-row input[type="time"] { height: 41px; border: 1px solid var(--line); border-radius: 9px; padding: 0 9px; }
.toggle-label { display: flex; align-items: center; gap: 11px; font-weight: 700; }
.toggle-label input { width: 18px; height: 18px; accent-color: var(--accent); }
.sticky-save { position: sticky; bottom: 18px; z-index: 10; margin: 22px 0; padding: 13px 15px 13px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid #d8d3ca; border-radius: 15px; background: rgba(255,255,255,.94); box-shadow: 0 12px 35px rgba(0,0,0,.1); backdrop-filter: blur(12px); }
.sticky-save span { color: var(--muted); font-size: .82rem; }
.closures-panel { margin-top: 20px; }
.closure-list { padding: 0 23px; }
.closure-list article { padding: 16px 0; display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid #ece8e1; }
.closure-list article:last-child { border-bottom: 0; }
.closure-list strong, .closure-list span { display: block; }
.closure-list span { color: var(--muted); font-size: .78rem; }
.password-panel form { width: min(550px, 100%); }
.report-range { margin-bottom: 22px; display: flex; align-items: end; gap: 12px; }
.report-range .field { width: 190px; }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.report-source { grid-column: 1 / -1; }
.bar-chart { padding: 18px 23px 24px; display: grid; gap: 13px; }
.bar-row { display: grid; grid-template-columns: 70px minmax(100px, 1fr) 78px; align-items: center; gap: 11px; font-size: .76rem; }
.bar-row > div { height: 11px; overflow: hidden; border-radius: 999px; background: var(--soft); }
.bar-row i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.bar-row strong { text-align: right; font-size: .72rem; }
.source-list { padding: 10px 23px 23px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.source-list article { padding: 16px; border-radius: 12px; background: var(--soft); }
.source-list span, .source-list small { display: block; color: var(--muted); }
.source-list strong { display: block; margin: 5px 0; font-size: 1.5rem; }

@media (max-width: 1050px) {
    .booking-shell { gap: 38px; grid-template-columns: .75fr 1.25fr; }
    .booking-intro h1 { font-size: 3.7rem; }
    .slot-grid { grid-template-columns: repeat(3, 1fr); }
    .service-grid { grid-template-columns: 1fr; }
    .service-side { grid-template-columns: 1fr 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
    .settings-wide { grid-column: auto; }
}

@media (max-width: 820px) {
    .booking-shell { grid-template-columns: 1fr; padding-top: 15px; }
    .booking-intro { position: static; padding-top: 0; }
    .booking-intro h1 { max-width: 650px; font-size: clamp(3rem, 12vw, 5rem); }
    .trust-row { grid-template-columns: repeat(3, 1fr); }
    .setup-shell, .admin-login-shell { grid-template-columns: 1fr; }
    .setup-brand, .admin-login-brand { min-height: auto; padding: 45px 30px; gap: 40px; }
    .setup-brand h1, .admin-login-brand h1 { font-size: 3rem; }
    .setup-card, .admin-login-card { margin: 25px auto 45px; width: calc(100% - 40px); }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { position: fixed; left: -260px; width: 245px; transition: .2s ease; box-shadow: 20px 0 50px rgba(0,0,0,.2); }
    .admin-sidebar.open { left: 0; }
    .mobile-menu { display: inline-grid; }
    .admin-topbar { padding: 18px 22px; }
    .admin-content { padding: 22px; }
    .metric-grid { grid-template-columns: 1fr 1fr; }
    .hours-row { grid-template-columns: 1fr 1fr 1fr; }
    .service-toolbar { align-items: flex-start; }
}

@media (max-width: 620px) {
    .booking-header { padding: 17px 18px; }
    .booking-logo { width: 66px; height: 66px; }
    .booking-shell { padding: 25px 16px 60px; gap: 28px; }
    .booking-intro h1 { font-size: 3rem; }
    .booking-intro > p { font-size: .95rem; }
    .trust-row { grid-template-columns: 1fr; margin-top: 22px; }
    .booking-card { padding: 20px; min-height: 550px; border-radius: 20px; }
    .progress-step { font-size: 0; }
    .progress-step b { font-size: .72rem; }
    .search-grid, .form-grid { grid-template-columns: 1fr; }
    .field-full { grid-column: auto; }
    .slot-grid { grid-template-columns: repeat(3, 1fr); }
    .manage-card { padding: 24px; }
    .manage-card h1 { font-size: 2.2rem; }
    .manage-meta { grid-template-columns: 1fr; }
    .setup-card, .admin-login-card { padding: 26px 22px; }
    .admin-topbar .topbar-actions .button { display: none; }
    .admin-content { padding: 17px 14px 45px; }
    .service-toolbar { flex-direction: column; }
    .date-nav { width: 100%; }
    .date-picker-label { min-width: 0; flex: 1; }
    .service-actions { width: 100%; }
    .service-actions .button { flex: 1; }
    .metric-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .metric-card { padding: 15px; }
    .metric-card strong { font-size: 1.6rem; }
    .panel-heading { align-items: flex-start; flex-direction: column; }
    .booking-row { grid-template-columns: 67px minmax(0, 1fr); padding: 15px 14px; }
    .booking-actions { grid-column: 1 / -1; justify-content: flex-end; }
    .service-side { grid-template-columns: 1fr; }
    .table-status-grid { grid-template-columns: repeat(3, 1fr); }
    .modal-card { padding: 23px 19px; }
    .drawer-card { padding: 30px 21px; }
    .page-intro-row, .help-panel, .password-panel { align-items: flex-start; flex-direction: column; }
    .hours-row { grid-template-columns: 1fr 1fr; }
    .hours-row .toggle-label { grid-column: 1 / -1; }
    .sticky-save { align-items: stretch; flex-direction: column; }
    .sticky-save .button { width: 100%; }
    .report-range { align-items: stretch; flex-direction: column; }
    .report-range .field { width: 100%; }
    .report-grid { grid-template-columns: 1fr; }
    .report-source { grid-column: auto; }
    .source-list { grid-template-columns: 1fr; }
    .bar-row { grid-template-columns: 55px 1fr 68px; }
}

/* Guest CRM and communications */
.guestbook-heading { align-items: flex-end; }
.guest-search { display: grid; grid-template-columns: minmax(230px, 1fr) 170px auto; gap: 9px; width: min(650px, 100%); }
.guest-search input, .guest-search select, .inline-test-form input { height: 42px; border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; background: #fff; }
.guest-name-link { display: grid; gap: 3px; color: inherit; text-decoration: none; }
.guest-name-link:hover strong, .guest-inline-link:hover { color: var(--accent); }
.guest-name-link span, .admin-table td small { display: block; color: var(--muted); font-size: .72rem; }
.guest-inline-link { color: inherit; text-decoration: none; }
.tag-list { display: flex; flex-wrap: wrap; gap: 5px; }
.guest-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 8px; border-radius: 999px; background: #eeeae3; color: #474239; font-size: .65rem; font-weight: 800; letter-spacing: .01em; }
.guest-tag.vip { background: #1f1d1a; color: #fff; }
.guest-tag.occasion { background: #f6ead3; color: #6b4c16; }
.allergy-copy, .critical-note { color: #9d2f24 !important; }
.muted-copy { color: var(--muted); font-size: .72rem; }
.permission-pill, .message-status { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: #eeeae3; color: #5a554d; font-size: .66rem; font-weight: 800; white-space: nowrap; }
.permission-pill.allowed, .message-status.sent, .message-status.completed { background: #e4f1e8; color: #28623b; }
.permission-pill.blocked, .message-status.failed { background: #f5e3e1; color: #9d2f24; }
.message-status.queued, .message-status.sending { background: #f7efd9; color: #755612; }
.compact-empty { min-height: 160px; }

.back-link { display: inline-block; margin-bottom: 8px; color: var(--muted); font-size: .75rem; font-weight: 800; text-decoration: none; }
.guest-profile-hero { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 20px; align-items: center; padding: 24px; margin-bottom: 20px; }
.guest-avatar { width: 66px; height: 66px; display: grid; place-items: center; border-radius: 18px; background: #191817; color: #fff; font-size: 1.2rem; font-weight: 900; letter-spacing: .06em; }
.guest-profile-title h2 { margin: 3px 0; font-size: 1.7rem; }
.guest-profile-title p { margin: 0 0 10px; color: var(--muted); }
.guest-contact-state { min-width: 180px; padding: 14px 16px; border-radius: 12px; background: var(--soft); }
.guest-contact-state span, .guest-contact-state strong { display: block; }
.guest-contact-state span { color: var(--muted); font-size: .68rem; }
.guest-contact-state strong { margin-top: 4px; font-size: .82rem; }
.metric-date { font-size: 1.15rem !important; }
.guest-detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .75fr); gap: 20px; align-items: start; }
.guest-edit-panel .form-grid { padding: 0 23px 24px; }
.guest-side-stack { display: grid; gap: 20px; }
.intel-list { padding: 0 20px 20px; }
.intel-list article { padding: 13px 0; border-bottom: 1px solid #ece8e1; }
.intel-list article:last-child { border-bottom: 0; }
.intel-list span, .intel-list strong { display: block; }
.intel-list span { margin-bottom: 4px; color: var(--muted); font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; }
.intel-list strong { font-size: .8rem; line-height: 1.45; }
.warning-check { padding: 12px; border-radius: 10px; background: #f8eeec; }
.danger-zone-body { padding: 0 20px 20px; }
.danger-zone-body .text-button { margin-top: 14px; }
.guest-history-panel { margin-top: 20px; }
.communication-list { padding: 0 20px 15px; }
.communication-row { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 13px; align-items: start; padding: 16px 0; border-bottom: 1px solid #ece8e1; }
.communication-row:last-child { border-bottom: 0; }
.channel-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--soft); font-size: .65rem; font-weight: 900; }
.communication-row strong, .communication-row span { display: block; }
.communication-row > div:nth-child(2) > span { color: var(--muted); font-size: .7rem; }
.communication-row p { margin: 8px 0 0; color: #5f5a52; font-size: .78rem; line-height: 1.5; }

.message-settings-grid { margin-bottom: 20px; }
.inline-test-form { display: flex; gap: 9px; padding: 0 23px 23px; }
.inline-test-form input { flex: 1; }
.cron-box { margin: 4px 23px 23px; padding: 14px; border-radius: 11px; background: #171614; color: #fff; }
.cron-box span, .cron-box small { display: block; }
.cron-box span { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.cron-box code { display: block; overflow-wrap: anywhere; margin: 8px 0; color: #f0d6a5; font-size: .68rem; }
.cron-box small { color: #bcb7ae; line-height: 1.45; }
.template-panel, .campaign-panel, .communication-log-panel { margin-top: 20px; }
.template-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; padding: 0 20px 20px; }
.template-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fbfaf7; }
.template-card .field { margin-top: 11px; }
.template-card-head { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.template-card-head span { color: var(--muted); font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; }
.template-card-head h3 { margin: 3px 0 0; }
.mini-toggle { display: flex; align-items: center; gap: 6px; font-size: .68rem; font-weight: 800; }
.mini-toggle input { accent-color: var(--accent); }

.pre-shift-list { padding: 0 20px 20px; }
.pre-shift-row { display: grid; grid-template-columns: 80px minmax(0,1fr) auto; gap: 16px; padding: 18px 0; border-bottom: 1px solid #e9e5dd; }
.pre-shift-row:last-child { border-bottom: 0; }
.pre-shift-time strong, .pre-shift-time span { display: block; }
.pre-shift-time strong { font-size: 1.05rem; }
.pre-shift-time span { color: var(--muted); font-size: .7rem; }
.pre-shift-main .guest-heading { margin-bottom: 8px; }
.pre-shift-main .guest-heading span { color: var(--muted); font-size: .72rem; }
.pre-shift-notes { margin-top: 10px; padding: 11px 13px; border-radius: 10px; background: var(--soft); }
.pre-shift-notes p { margin: 4px 0; color: #514c44; font-size: .76rem; line-height: 1.4; }

.feedback-card { text-align: left; }
.feedback-form { display: grid; gap: 18px; }
.rating-field { border: 0; padding: 0; margin: 0; }
.rating-field legend { margin-bottom: 8px; font-size: .75rem; font-weight: 800; }
.rating-options { display: grid; grid-template-columns: repeat(5,1fr); gap: 7px; }
.rating-options input { position: absolute; opacity: 0; }
.rating-options span { display: grid; place-items: center; height: 48px; border: 1px solid var(--line); border-radius: 10px; font-weight: 800; cursor: pointer; }
.rating-options input:checked + span { background: #171614; color: #fff; border-color: #171614; }

@media (max-width: 1050px) {
    .guest-detail-grid { grid-template-columns: 1fr; }
    .template-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
    .guestbook-heading { align-items: stretch; }
    .guest-search { grid-template-columns: 1fr 150px auto; }
}
@media (max-width: 620px) {
    .guest-search { grid-template-columns: 1fr; }
    .guest-profile-hero { grid-template-columns: auto 1fr; }
    .guest-contact-state { grid-column: 1 / -1; }
    .communication-row { grid-template-columns: 36px minmax(0,1fr); }
    .communication-row > .message-status { grid-column: 2; justify-self: start; }
    .pre-shift-row { grid-template-columns: 65px minmax(0,1fr); }
    .pre-shift-row > a { grid-column: 2; }
    .inline-test-form { flex-direction: column; }
}

@media print {
    .admin-sidebar, .admin-topbar, .page-intro-row, .report-range, .button, .text-button { display: none !important; }
    .admin-layout, .admin-main { display: block; }
    .admin-content { padding: 0; }
    .panel { box-shadow: none; border: 0; }
    .pre-shift-row { break-inside: avoid; }
}

.tag-rules-list { padding: 0 23px; display: grid; gap: 9px; }
.tag-rule-row { display: grid; grid-template-columns: minmax(130px,1.2fr) minmax(150px,1.2fr) 72px 90px 85px auto; gap: 9px; align-items: center; }
.tag-rule-row input, .tag-rule-row select { height: 40px; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; background: #fff; }
.tag-rules-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 18px 23px 23px; }
@media (max-width: 820px) { .tag-rule-row { grid-template-columns: 1fr 1fr 70px 80px; } .tag-rule-row .mini-toggle, .tag-rule-row [data-remove-rule] { grid-column: span 2; justify-self: start; } }
@media (max-width: 620px) { .tag-rule-row { grid-template-columns: 1fr 80px; } .tag-rule-row .rule-name, .tag-rule-row .rule-metric { grid-column: 1 / -1; } .tag-rules-actions { flex-direction: column; } }

/* Version 3 host stand */
.service-toolbar-v3 { align-items: center; }
.service-view-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}
.service-view-switch button {
    min-width: 78px;
    height: 35px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 750;
    cursor: pointer;
}
.service-view-switch button.active { background: #171716; color: #fff; }
.service-kpi-strip {
    margin-bottom: 14px;
    display: flex;
    align-items: stretch;
    gap: 1px;
    overflow: hidden;
    border: 1px solid #dedad2;
    border-radius: 14px;
    background: #dedad2;
}
.service-kpi-strip > div {
    min-width: 128px;
    flex: 1;
    padding: 11px 15px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    background: #fff;
}
.service-kpi-strip strong { font-size: 1.2rem; }
.service-kpi-strip span { color: var(--muted); font-size: .72rem; font-weight: 700; }
.service-kpi-strip .attention { background: #fff5e9; }
.service-kpi-strip .attention strong, .service-kpi-strip .attention span { color: #9b5b0a; }
.host-stand {
    display: grid;
    grid-template-columns: 330px minmax(620px, 1fr);
    gap: 14px;
    align-items: start;
}
.reservation-rail {
    position: sticky;
    top: 14px;
    height: calc(100vh - 166px);
    min-height: 640px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.rail-header {
    padding: 17px 18px 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.rail-header h2 { margin: 3px 0 0; font-size: 1.16rem; }
.rail-tabs { display: flex; border-top: 1px solid #ebe7df; border-bottom: 1px solid #ebe7df; }
.rail-tabs button {
    flex: 1;
    height: 42px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: #fff;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 750;
    cursor: pointer;
}
.rail-tabs button.active { color: var(--ink); border-bottom-color: var(--accent); }
.rail-tabs button span { display: inline-grid; place-items: center; min-width: 19px; height: 19px; margin-left: 3px; padding: 0 5px; border-radius: 99px; background: var(--soft); font-size: .64rem; }
.rail-tools { padding: 12px; border-bottom: 1px solid #ebe7df; }
.service-search { height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.service-search span { color: var(--muted); }
.service-search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: .78rem; }
.rail-filters { margin-top: 9px; display: flex; gap: 4px; overflow: auto; }
.rail-filters button { min-width: max-content; padding: 5px 8px; border: 0; border-radius: 7px; background: var(--soft); color: var(--muted); font-size: .66rem; font-weight: 750; cursor: pointer; }
.rail-filters button.active { background: #171716; color: #fff; }
.reservation-card-list, .waitlist-rail { min-height: 0; flex: 1; overflow: auto; padding: 7px; }
.reservation-card {
    position: relative;
    display: grid;
    grid-template-columns: 55px minmax(0, 1fr) 24px;
    gap: 9px;
    align-items: center;
    min-height: 78px;
    margin-bottom: 5px;
    padding: 10px 8px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: #fff;
    cursor: pointer;
    transition: .15s ease;
}
.reservation-card:hover { border-color: #d7d2c8; background: #fbfaf7; }
.reservation-card.selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(161,42,36,.09); }
.reservation-card.status-cancelled, .reservation-card.status-no_show { opacity: .55; }
.reservation-card-time { align-self: stretch; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid #e9e5de; }
.reservation-card-time strong { font-size: .84rem; }
.reservation-card-time span { color: var(--muted); font-size: .65rem; }
.reservation-name-row { display: flex; align-items: center; gap: 7px; }
.reservation-name-row strong { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .81rem; }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #aaa; }
.status-dot.status-booked { background: var(--blue); }
.status-dot.status-confirmed { background: var(--green); }
.status-dot.status-arrived { background: var(--amber); }
.status-dot.status-seated { background: #6e4d87; }
.status-dot.status-completed { background: #777; }
.status-dot.status-cancelled, .status-dot.status-no_show { background: var(--red); }
.reservation-table-label { display: block; margin-top: 2px; color: var(--muted); font-size: .65rem; }
.reservation-signals { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.reservation-signals span, .private-signal { padding: 2px 5px; border-radius: 5px; background: #f1eee8; color: #6b665d; font-size: .58rem; font-style: normal; font-weight: 700; }
.reservation-signals .private-signal, .private-signal { background: #efe7f4; color: #654a78; }
.card-open { width: 24px; height: 36px; border: 0; background: transparent; color: #8b867e; font-size: 1.35rem; cursor: pointer; }
.rail-empty, .drawer-empty { padding: 34px 20px; text-align: center; color: var(--muted); }
.rail-empty strong, .drawer-empty strong { display: block; color: var(--ink); }
.rail-empty p, .drawer-empty p { margin: 5px 0 0; font-size: .77rem; }
.waitlist-card { padding: 13px 9px; display: flex; justify-content: space-between; align-items: center; gap: 8px; border-bottom: 1px solid #ece8e1; }
.waitlist-card strong, .waitlist-card span { display: block; }
.waitlist-card strong { font-size: .8rem; }
.waitlist-card span { color: var(--muted); font-size: .66rem; }
.service-stage { min-width: 0; display: grid; gap: 10px; }
.service-timebar { min-height: 58px; display: grid; grid-template-columns: 38px 116px minmax(0, 1fr) 38px; align-items: center; gap: 8px; padding: 8px; }
.time-step { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 1.2rem; cursor: pointer; }
.service-clock { padding-left: 5px; }
.service-clock span, .service-clock strong { display: block; }
.service-clock span { color: var(--muted); font-size: .59rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.service-clock strong { font-size: .95rem; }
.time-strip { min-width: 0; display: flex; gap: 4px; overflow: auto; scrollbar-width: none; }
.time-strip::-webkit-scrollbar { display: none; }
.time-strip button { min-width: 72px; height: 35px; padding: 0 8px; border: 0; border-radius: 8px; background: var(--soft); color: var(--muted); font-size: .68rem; font-weight: 750; cursor: pointer; }
.time-strip button.active { background: #171716; color: #fff; }
.service-view { min-width: 0; }
.floor-toolbar { min-height: 43px; display: flex; align-items: center; gap: 14px; margin-bottom: 7px; }
.floor-legend { display: flex; gap: 12px; flex-wrap: wrap; }
.floor-legend span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .64rem; font-weight: 700; }
.floor-legend i { width: 10px; height: 10px; border-radius: 3px; border: 1px solid #c9c4bb; background: #fff; }
.floor-legend .legend-reserved { background: #f5e9cf; border-color: #d8ba7e; }
.floor-legend .legend-arrived { background: #f7dbb2; border-color: #d69d4c; }
.floor-legend .legend-seated { background: #e7d9f0; border-color: #a884bd; }
.assignment-hint { min-width: 0; flex: 1; color: var(--muted); font-size: .68rem; text-align: center; }
.assignment-hint.active { color: var(--accent); font-weight: 750; }
.floor-scroll { position: relative; height: calc(100vh - 272px); min-height: 600px; overflow: auto; background: #edeae3; }
.floor-plan {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(rgba(255,255,255,.64), rgba(255,255,255,.64)),
        repeating-linear-gradient(0deg, transparent 0 24px, rgba(117,108,92,.08) 25px),
        repeating-linear-gradient(90deg, transparent 0 24px, rgba(117,108,92,.08) 25px),
        #e8e4dc;
    transform-origin: top left;
}
.floor-area-label { position: absolute; top: 18px; left: 20px; padding: 5px 9px; border-radius: 6px; background: rgba(255,255,255,.8); color: #777166; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.floor-table {
    position: absolute;
    display: grid;
    place-items: center;
    align-content: center;
    padding: 8px;
    border: 2px solid #bdb7ac;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 5px 14px rgba(55,49,39,.11);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease;
}
.floor-table.shape-round { border-radius: 50%; }
.floor-table.shape-square { border-radius: 12px; }
.floor-table.shape-rectangle { border-radius: 14px; }
.floor-table.shape-oval { border-radius: 999px; }
.floor-table > * { transform: rotate(calc(var(--table-rotation, 0deg) * -1)); }
.floor-table-name { max-width: 100%; font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.floor-table-capacity { font-size: 20px; line-height: 1.1; }
.floor-table-detail { max-width: 100%; color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.floor-table.state-free { background: #fff; }
.floor-table.state-reserved { border-color: #d6ac5f; background: #fff4da; }
.floor-table.state-arrived { border-color: #c37b24; background: #fde4bf; }
.floor-table.state-seated { border-color: #84609a; background: #ecdef4; }
.floor-table.assignment-available { border-color: #2b8b66; box-shadow: 0 0 0 5px rgba(43,139,102,.16), 0 5px 14px rgba(55,49,39,.11); }
.floor-table.assignment-conflict { opacity: .4; }
.floor-table.assignment-selected { border-color: var(--accent); box-shadow: 0 0 0 5px rgba(161,42,36,.16), 0 5px 14px rgba(55,49,39,.11); opacity: 1; }
.service-list-panel { overflow: auto; }
.service-list-table { width: 100%; border-collapse: collapse; }
.service-list-table th, .service-list-table td { padding: 14px 16px; border-bottom: 1px solid #ece8e1; text-align: left; font-size: .76rem; }
.service-list-table th { position: sticky; top: 0; background: #faf8f4; color: var(--muted); font-size: .65rem; text-transform: uppercase; letter-spacing: .05em; }
.service-list-table tbody tr { cursor: pointer; }
.service-list-table tbody tr:hover { background: #fbfaf7; }
.service-list-table td small { display: block; color: var(--muted); }
.timeline-shell { min-width: 900px; overflow: auto; }
.timeline-header, .timeline-row { display: grid; grid-template-columns: 118px minmax(780px, 1fr); }
.timeline-header { position: sticky; top: 0; z-index: 3; height: 48px; border-bottom: 1px solid #ddd8cf; background: #faf8f4; }
.timeline-header > div:first-child { padding: 15px; color: var(--muted); font-size: .65rem; font-weight: 800; text-transform: uppercase; }
.timeline-markers, .timeline-track { position: relative; }
.timeline-markers span { position: absolute; top: 15px; transform: translateX(-50%); color: var(--muted); font-size: .62rem; }
.timeline-row { min-height: 68px; border-bottom: 1px solid #ebe7df; }
.timeline-table-label { padding: 13px 14px; border-right: 1px solid #ebe7df; background: #fff; }
.timeline-table-label strong, .timeline-table-label span { display: block; }
.timeline-table-label strong { font-size: .76rem; }
.timeline-table-label span { color: var(--muted); font-size: .61rem; }
.timeline-track { min-height: 68px; background: repeating-linear-gradient(90deg, transparent 0 calc(8.333% - 1px), #eeeae3 calc(8.333% - 1px) 8.333%); }
.timeline-track > i { position: absolute; inset: 0; pointer-events: none; }
.timeline-track > i span { display: none; }
.timeline-booking { position: absolute; top: 10px; bottom: 10px; min-width: 55px; padding: 6px 8px; overflow: hidden; border: 1px solid #b6c8d5; border-radius: 8px; background: #edf3f7; color: #31536a; text-align: left; cursor: pointer; }
.timeline-booking.status-confirmed { background: #e7f3ec; border-color: #a9d2bd; color: #24634f; }
.timeline-booking.status-arrived { background: #faedd9; border-color: #e0be83; color: #8b5a12; }
.timeline-booking.status-seated { background: #eee4f4; border-color: #c5abd5; color: #654a78; }
.timeline-booking.status-completed { background: #eeeeec; border-color: #d2d2cf; color: #555; }
.timeline-booking strong, .timeline-booking span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-booking strong { font-size: .66rem; }
.timeline-booking span { font-size: .56rem; }

/* Booking workspace drawer */
.booking-workspace-drawer { position: fixed; inset: 0; z-index: 120; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(18,17,15,.42); backdrop-filter: blur(2px); }
.booking-workspace-card { position: absolute; top: 0; right: 0; width: min(590px, 100%); height: 100%; overflow: auto; background: #f5f3ee; box-shadow: -18px 0 55px rgba(0,0,0,.2); animation: slideDrawer .2s ease; }
@keyframes slideDrawer { from { transform: translateX(30px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }
.booking-drawer-header { min-height: 118px; padding: 23px 24px 18px 62px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #dedad2; background: #fff; }
.booking-drawer-header h2 { margin: 7px 0 2px; font-size: 1.45rem; }
.booking-drawer-header p { margin: 0; color: var(--muted); font-size: .72rem; }
.drawer-back { position: absolute; top: 27px; left: 18px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--soft); font-size: 1.25rem; cursor: pointer; }
.drawer-quick-actions { padding: 10px 14px; display: flex; gap: 5px; overflow: auto; border-bottom: 1px solid #dedad2; background: #fff; }
.drawer-quick-actions button { min-width: max-content; height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); font-size: .68rem; font-weight: 800; cursor: pointer; }
.drawer-quick-actions button:hover, .drawer-quick-actions button.active { border-color: #171716; background: #171716; color: #fff; }
.drawer-tabs { position: sticky; top: 0; z-index: 4; display: flex; padding: 0 18px; border-bottom: 1px solid #dedad2; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.drawer-tabs button { flex: 1; min-height: 48px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: .7rem; font-weight: 800; cursor: pointer; }
.drawer-tabs button.active { color: var(--ink); border-bottom-color: var(--accent); }
.drawer-tabs button span { display: inline-grid; place-items: center; min-width: 19px; height: 19px; margin-left: 3px; padding: 0 5px; border-radius: 99px; background: var(--soft); font-size: .58rem; }
.drawer-panel { padding: 18px; }
.drawer-form { display: grid; gap: 14px; }
.drawer-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.drawer-section-card { display: grid; gap: 12px; padding: 15px; border: 1px solid #e0dcd4; border-radius: 14px; background: #fff; }
.drawer-section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.drawer-section-title > span { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.drawer-section-title i { padding: 3px 6px; border-radius: 6px; background: #f1eee8; color: #615b52; font-size: .58rem; font-style: normal; font-weight: 800; }
.private-note-field { padding: 13px; border: 1px solid #dbcbe5; border-radius: 13px; background: #faf6fc; }
.private-note-field textarea { border-color: #d5c2df; }
.private-note-field > span { color: #654a78; }
.guest-profile-intel { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.guest-profile-intel div { padding: 11px; border-radius: 10px; background: #fff4e6; border: 1px solid #efd8b5; }
.guest-profile-intel strong { color: #815212; font-size: .65rem; text-transform: uppercase; }
.guest-profile-intel p { margin: 3px 0 0; font-size: .72rem; }
.drawer-save-row { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0 20px; }
.danger-outline { color: var(--red); border-color: #e4b8b4; }
.private-note-banner { padding: 15px; border: 1px solid #d9c6e4; border-radius: 13px; background: #f8f2fb; }
.private-note-banner strong { color: #5e4173; }
.private-note-banner p { margin: 4px 0 0; color: #765e86; font-size: .72rem; }
.note-compose { margin-top: 12px; padding: 14px; border: 1px solid #dfdbd3; border-radius: 14px; background: #fff; }
.note-compose textarea, .note-compose input { width: 100%; border: 1px solid var(--line); border-radius: 10px; outline: none; }
.note-compose textarea { padding: 11px; resize: vertical; }
.note-compose > div { margin-top: 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.note-compose input { height: 44px; padding: 0 11px; }
.note-history { margin-top: 12px; display: grid; gap: 9px; }
.note-entry { padding: 14px; border: 1px solid #dfdbd3; border-left: 4px solid #8a66a0; border-radius: 12px; background: #fff; }
.note-entry > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.note-entry strong { font-size: .74rem; }
.note-entry span { color: var(--muted); font-size: .62rem; }
.note-entry p { margin: 8px 0 0; white-space: pre-wrap; font-size: .78rem; }
.message-thread { max-height: 43vh; min-height: 180px; overflow: auto; display: grid; align-content: start; gap: 9px; padding: 2px; }
.message-bubble { margin-right: 38px; padding: 12px 13px; border: 1px solid #dcd8d0; border-radius: 13px 13px 13px 3px; background: #fff; }
.message-bubble.sms { margin-right: 0; margin-left: 38px; border-radius: 13px 13px 3px 13px; background: #eef6f2; border-color: #c9e0d4; }
.message-bubble > div { display: flex; justify-content: space-between; gap: 10px; }
.message-bubble strong { font-size: .6rem; letter-spacing: .06em; }
.message-bubble span { color: var(--muted); font-size: .58rem; }
.message-bubble h4 { margin: 8px 0 2px; font-size: .75rem; }
.message-bubble p { margin: 5px 0 0; white-space: pre-wrap; font-size: .76rem; }
.message-bubble small { display: block; margin-top: 8px; color: var(--red); }
.message-compose { margin-top: 13px; padding: 14px; display: grid; gap: 11px; border: 1px solid #dfdbd3; border-radius: 14px; background: #fff; }
.drawer-alert { margin-bottom: 10px; }
.drawer-open { overflow: hidden; }

/* Floor plan editor */
.floor-editor-shell { display: grid; grid-template-columns: minmax(620px, 1fr) 300px; gap: 16px; align-items: start; }
.floor-editor-canvas-wrap { min-height: 650px; overflow: auto; border: 1px solid #dedad2; border-radius: 17px; background: #e8e4dc; }
.floor-editor-canvas { position: relative; background: repeating-linear-gradient(0deg, transparent 0 24px, rgba(117,108,92,.10) 25px), repeating-linear-gradient(90deg, transparent 0 24px, rgba(117,108,92,.10) 25px), #eeeae3; }
.editor-table { touch-action: none; user-select: none; cursor: grab; }
.editor-table.dragging { cursor: grabbing; z-index: 20; box-shadow: 0 16px 30px rgba(0,0,0,.2); }
.editor-table.selected { border-color: var(--accent); box-shadow: 0 0 0 5px rgba(161,42,36,.14); }
.floor-editor-sidebar { position: sticky; top: 15px; display: grid; gap: 12px; }
.editor-help { padding: 14px; color: var(--muted); font-size: .74rem; }
.editor-help strong { display: block; margin-bottom: 4px; color: var(--ink); }
.table-shape-options { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.table-shape-options label { display: flex; align-items: center; gap: 7px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: .7rem; font-weight: 700; cursor: pointer; }
.table-shape-options input { accent-color: var(--accent); }

@media (max-width: 1250px) {
    .host-stand { grid-template-columns: 295px minmax(570px, 1fr); }
    .reservation-rail { height: calc(100vh - 180px); }
    .service-toolbar-v3 { flex-wrap: wrap; }
    .service-view-switch { order: 3; width: 100%; justify-content: center; }
    .floor-editor-shell { grid-template-columns: 1fr; }
    .floor-editor-sidebar { position: static; }
}
@media (max-width: 900px) {
    .host-stand { grid-template-columns: 1fr; }
    .reservation-rail { position: static; height: 430px; min-height: 0; }
    .floor-scroll { height: 650px; }
    .service-kpi-strip { overflow: auto; }
    .service-kpi-strip > div { flex: 0 0 125px; }
    .service-timebar { grid-template-columns: 35px 105px minmax(0,1fr) 35px; }
    .floor-toolbar { flex-wrap: wrap; }
    .assignment-hint { order: 3; width: 100%; flex-basis: 100%; text-align: left; }
}
@media (max-width: 640px) {
    .service-toolbar-v3 .date-nav { width: 100%; }
    .service-toolbar-v3 .service-actions { width: 100%; }
    .service-toolbar-v3 .service-actions .button { flex: 1; }
    .date-picker-label { min-width: 0; flex: 1; }
    .service-view-switch button { flex: 1; min-width: 0; }
    .booking-drawer-header { align-items: flex-start; padding-right: 16px; }
    .booking-drawer-header .button { display: none; }
    .drawer-field-grid, .guest-profile-intel { grid-template-columns: 1fr; }
    .drawer-save-row { flex-direction: column; }
    .drawer-save-row .button { width: 100%; }
    .service-timebar { grid-template-columns: 34px minmax(0,1fr) 34px; }
    .service-clock { grid-column: 2; text-align: center; }
    .time-strip { grid-column: 1 / -1; grid-row: 2; }
    .time-step:last-child { grid-column: 3; grid-row: 1; }
}
.table-inventory-row { width: 100%; padding: 10px 2px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; border-bottom: 1px solid #ece8e1; background: transparent; text-align: left; cursor: pointer; }
.table-inventory-row:last-child { border-bottom: 0; }
.table-inventory-row:hover, .table-inventory-row.active { color: var(--accent); }
.table-inventory-row span, .table-inventory-row strong, .table-inventory-row small { display: block; }
.table-inventory-row > span:last-child { color: var(--muted); font-size: .68rem; font-weight: 750; }
.table-inventory-row strong { font-size: .75rem; }
.table-inventory-row small { color: var(--muted); font-size: .62rem; }
.clear-assignment { min-width: max-content; font-size: .67rem; }

/* Version 4: table combinations and iPad host-stand mode */
.floor-plan-stage { position: relative; margin: 0 auto; }
.floor-plan { transform-origin: top left; }
.tablet-rail-toggle, .rail-close { display: none; }
.rail-header-actions { display: flex; align-items: center; gap: 8px; }
.reservation-rail-scrim { display: none; }

.assignment-options {
    margin-bottom: 8px;
    padding: 10px;
    border: 1px solid #d8d3ca;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(29, 26, 20, .08);
}
.assignment-options-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.assignment-options-heading strong { font-size: .78rem; }
.assignment-options-heading span { color: var(--muted); font-size: .65rem; }
.assignment-option-scroll { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.assignment-option-scroll button {
    flex: 0 0 auto;
    min-width: 142px;
    min-height: 52px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    text-align: left;
    cursor: pointer;
}
.assignment-option-scroll button strong, .assignment-option-scroll button span { display: block; }
.assignment-option-scroll button strong { font-size: .72rem; }
.assignment-option-scroll button span { margin-top: 2px; color: var(--muted); font-size: .6rem; }
.assignment-option-scroll button.available { border-color: #83b7a3; background: #f1faf6; }
.assignment-option-scroll button.current { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(161,42,36,.10); }
.assignment-option-scroll button.unavailable { opacity: .42; cursor: not-allowed; }

.combinations-panel { margin-top: 20px; }
.combinations-panel .panel-heading p { max-width: 650px; margin: 5px 0 0; color: var(--muted); font-size: .78rem; }
.combination-grid { padding: 0 18px 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.combination-card { padding: 15px; border: 1px solid #e3ded5; border-radius: 14px; background: #fff; }
.combination-card.inactive { opacity: .55; }
.combination-card > div:first-child { display: flex; align-items: flex-start; gap: 10px; }
.combination-card strong, .combination-card p { display: block; }
.combination-card p { margin: 3px 0 0; color: var(--muted); font-size: .7rem; }
.combination-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: #f1e7e4; color: var(--accent); font-weight: 800; }
.combination-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 14px 0; }
.combination-card dl div { padding: 8px; border-radius: 8px; background: var(--soft); }
.combination-card dt { color: var(--muted); font-size: .58rem; font-weight: 700; text-transform: uppercase; }
.combination-card dd { margin: 2px 0 0; font-size: .72rem; font-weight: 750; }
.combination-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.danger-text { color: var(--red); }
.combination-table-picker { max-height: 285px; overflow: auto; display: grid; gap: 7px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #faf9f6; }
.combination-table-picker label { min-height: 52px; padding: 7px 9px; display: flex; align-items: center; gap: 10px; border: 1px solid transparent; border-radius: 9px; background: #fff; cursor: pointer; }
.combination-table-picker label:has(input:checked) { border-color: var(--accent); background: #fbf2f0; }
.combination-table-picker input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--accent); }
.combination-table-picker strong, .combination-table-picker small { display: block; }
.combination-table-picker small { color: var(--muted); font-size: .67rem; }
.empty-state.compact { grid-column: 1 / -1; padding: 30px; text-align: center; color: var(--muted); }
.empty-state.compact strong { display: block; color: var(--ink); }
.empty-state.compact p { margin: 5px 0 0; }

@media (max-width: 1180px) and (pointer: coarse), (max-width: 1180px) and (hover: none) {
    html, body { overscroll-behavior: none; }
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { position: fixed; left: -260px; width: 245px; transition: left .2s ease; box-shadow: 20px 0 50px rgba(0,0,0,.22); }
    .admin-sidebar.open { left: 0; }
    .mobile-menu { display: inline-grid; }
    .admin-topbar { min-height: 78px; padding: 12px 16px; }
    .admin-topbar h1 { font-size: 1.35rem; }
    .admin-content { padding: 12px 12px 34px; }
    .service-toolbar-v3 { position: relative; gap: 9px; margin-bottom: 10px; }
    .service-toolbar-v3 .date-nav { flex: 1 1 360px; }
    .service-toolbar-v3 .service-actions { flex: 1 1 auto; justify-content: flex-end; }
    .service-toolbar-v3 .button, .service-toolbar-v3 .icon-button, .service-view-switch button { min-height: 46px; }
    .tablet-rail-toggle { display: inline-flex; }
    .tablet-rail-toggle span { margin-left: 6px; min-width: 21px; height: 21px; display: inline-grid; place-items: center; border-radius: 99px; background: var(--soft); font-size: .66rem; }
    .service-view-switch { order: 3; width: 100%; }
    .service-kpi-strip { margin-bottom: 9px; overflow-x: auto; }
    .service-kpi-strip > div { min-width: 118px; padding: 9px 12px; }
    .host-stand { display: block; }
    .reservation-rail {
        position: fixed;
        z-index: 111;
        top: 0;
        left: 0;
        width: min(410px, 88vw);
        height: 100dvh;
        min-height: 0;
        border-radius: 0 18px 18px 0;
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 20px 0 55px rgba(0,0,0,.24);
    }
    .reservation-rail-open .reservation-rail { transform: translateX(0); }
    .reservation-rail-scrim {
        display: block;
        position: fixed;
        z-index: 110;
        inset: 0;
        border: 0;
        background: rgba(18,17,15,.48);
        backdrop-filter: blur(2px);
    }
    .rail-close { width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--soft); font-size: 1.4rem; }
    .rail-tabs button, .rail-filters button, .reservation-card, .card-open { min-height: 44px; }
    .reservation-card { min-height: 86px; padding: 11px 9px; }
    .service-stage { width: 100%; }
    .service-timebar { grid-template-columns: 46px 112px minmax(0,1fr) 46px; min-height: 62px; }
    .time-step { width: 46px; height: 46px; }
    .time-strip button { min-width: 82px; height: 42px; }
    .floor-scroll { height: calc(100dvh - 265px); min-height: 500px; overflow: auto; -webkit-overflow-scrolling: touch; }
    .floor-plan { transform-origin: top left; }
    .floor-table { min-width: 58px; min-height: 58px; touch-action: manipulation; }
    .assignment-option-scroll button { min-height: 58px; min-width: 155px; }
    .booking-workspace-card { width: min(620px, 100%); }
    .drawer-quick-actions button, .drawer-tabs button { min-height: 48px; }
    .drawer-save-row .button, .message-compose .button, .note-compose .button { min-height: 48px; }
    .modal-card { width: min(720px, calc(100% - 24px)); max-height: calc(100dvh - 24px); margin: 12px auto; }
    .floor-editor-shell { grid-template-columns: 1fr; }
    .floor-editor-canvas-wrap { min-height: 54dvh; max-height: 64dvh; overflow: auto; -webkit-overflow-scrolling: touch; }
    .editor-table { touch-action: none; }
    .floor-editor-sidebar { position: static; grid-template-columns: 1fr 1fr; }
    .combination-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-intro-row { align-items: flex-start; }
    .page-intro-row .service-actions { flex-wrap: wrap; justify-content: flex-end; }
}

@media (max-width: 820px) {
    .floor-editor-sidebar { grid-template-columns: 1fr; }
    .combination-grid { grid-template-columns: 1fr; padding: 0 12px 14px; }
    .assignment-options-heading { align-items: flex-start; flex-direction: column; gap: 2px; }
    .booking-workspace-card { width: 100%; }
    .booking-drawer-header { padding-top: max(14px, env(safe-area-inset-top)); }
    .modal-card { width: 100%; max-height: 100dvh; min-height: 100dvh; margin: 0; border-radius: 0; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}
.floor-editor-stage { position: relative; margin: 0 auto; }
.floor-editor-canvas { transform-origin: top left; }

/* Version 5: two-way inbox and table-return workflow */
.admin-nav a { position: relative; }
.nav-count {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    font-size: .62rem;
    line-height: 1;
}
.reservation-card-time small { color: var(--muted); font-size: .62rem; font-weight: 700; }
.reservation-card-time span { color: var(--accent); font-weight: 700; }
.unread-message-signal {
    background: #fff1d8 !important;
    border-color: #ebc87b !important;
    color: #724600 !important;
    font-weight: 800;
}
.turnover-tight {
    background: #fff0ed !important;
    border-color: #e9b0a7 !important;
    color: #9d261f !important;
    font-weight: 800;
}
.table-return-card {
    margin-bottom: 14px;
    padding: 14px 16px;
    border: 1px solid #d9d4ca;
    border-left: 5px solid #267a57;
    border-radius: 12px;
    background: #f4faf7;
}
.table-return-card > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.table-return-card span { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.table-return-card strong { font-size: 1.55rem; line-height: 1; }
.table-return-card p { margin: 7px 0 0; color: #526058; font-size: .74rem; }
.table-return-card.tight { border-left-color: #d88a19; background: #fff8e9; }
.table-return-card.conflict { border-left-color: var(--accent); background: #fff1ef; }
.message-bubble.outbound {
    margin-right: 0;
    margin-left: 38px;
    border-radius: 13px 13px 3px 13px;
    background: #eef6f2;
    border-color: #c9e0d4;
}
.message-bubble.inbound {
    margin-left: 0;
    margin-right: 38px;
    border-radius: 13px 13px 13px 3px;
    background: #fff;
    border-color: #dcd8d0;
}
.message-bubble.inbound.unread { border-color: #d49b34; box-shadow: 0 0 0 2px rgba(212,155,52,.13); }
.message-bubble .attachment-note { color: #6a5a3d; }
.inbound-test-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.settings-status { margin: 12px 0 0; color: var(--muted); font-size: .72rem; }
.text-danger { color: var(--red); }
.checkbox-stack { display: grid; align-content: start; gap: 6px; }
.inbox-panel { margin: 22px 0; }
.admin-table tr.unread-row td { background: #fffaf0; }
.admin-table tr.unread-row strong { font-weight: 900; }
.metric-card.attention { border-color: #e2b058; background: #fffaf0; }

@media (max-width: 1180px) {
    .table-return-card { position: sticky; top: 0; z-index: 2; box-shadow: 0 4px 12px rgba(20,20,20,.06); }
    .table-return-card strong { font-size: 1.35rem; }
    .inbound-test-row .button { min-height: 44px; flex: 1 1 190px; }
}

@media (max-width: 760px) {
    .table-return-card > div { align-items: flex-start; flex-direction: column; gap: 5px; }
    .message-bubble.inbound, .message-bubble.outbound { margin-left: 0; margin-right: 0; }
}

/* Database and backup management */
.content-card {
    padding: 24px;
    margin-bottom: 22px;
    border: 1px solid #dfdbd3;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 7px 25px rgba(43, 39, 31, .04);
}
.split-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.status-badge { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .06em; }
.status-pending { background: #f7eddb; color: var(--amber); }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin: 18px 0; }
.summary-stat { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fbfaf7; }
.summary-stat span { display: block; color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.summary-stat strong { display: block; margin-top: 5px; overflow-wrap: anywhere; }
.helper-text { color: var(--muted); font-size: .86rem; }
.button-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.button-row form { margin: 0; }
.database-manual-backup { margin-top: 16px; }
.alert-warning { background: #fff3dc; color: #765019; border: 1px solid #efd59f; }
.table-scroll { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.data-table th, .data-table td { padding: 13px 12px; text-align: left; border-bottom: 1px solid #ece8e1; vertical-align: top; }
.data-table th { color: var(--muted); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; }
.data-table td { font-size: .86rem; }
.data-table tr:last-child td { border-bottom: 0; }

@media (max-width: 980px) {
    .summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
    .content-card { padding: 18px; }
    .split-heading { display: grid; }
    .summary-grid { grid-template-columns: 1fr; }
}

.field-help {
    margin: 10px 0 0;
    color: var(--muted, #6f6a63);
    font-size: 0.88rem;
    line-height: 1.45;
}


.live-reply-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: min(360px, calc(100vw - 32px));
    max-width: 440px;
    padding: 15px 16px;
    border: 1px solid rgba(212,155,52,.45);
    border-radius: 14px;
    background: #171717;
    color: #fff;
    box-shadow: 0 18px 55px rgba(0,0,0,.28);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .2s ease, transform .2s ease;
}
.live-reply-toast.visible { opacity: 1; transform: translateY(0); }
.live-reply-toast div { display: grid; gap: 3px; flex: 1; }
.live-reply-toast strong { font-size: .95rem; }
.live-reply-toast span { color: rgba(255,255,255,.72); font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-reply-toast button { min-height: 40px; padding: 0 15px; border: 0; border-radius: 10px; background: #d49b34; color: #111; font-weight: 800; cursor: pointer; }
@media (max-width: 700px) {
    .live-reply-toast { right: 12px; bottom: 12px; left: 12px; min-width: 0; }
}

/* Native ClickSend SMS integration */
.sms-rule-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfaf7;
}
.webhook-setup {
    display: grid;
    gap: 12px;
    margin-top: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f8f6f1;
}
.compact-heading { margin-bottom: 0; }
.compact-heading h3 { margin: 2px 0 0; }
.copy-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
}
.copy-input-row input { min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem; }
.communication-row .delivery-detail { display: block; margin-top: 4px; color: var(--muted); font-size: .76rem; }
@media (max-width: 760px) {
    .sms-rule-grid { grid-template-columns: 1fr; }
    .copy-input-row { grid-template-columns: 1fr; }
    .copy-input-row .button { width: 100%; }
}

/* Version 6.6: cleaner host workflow and staff attribution */
.current-staff-control {
    display: grid;
    gap: 3px;
    min-width: 170px;
}
.current-staff-control > span {
    color: var(--muted);
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.current-staff-control select {
    min-height: 38px;
    padding: 7px 34px 7px 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: .78rem;
    font-weight: 800;
}
.modal-intro {
    margin: -4px 0 18px;
    color: var(--muted);
    line-height: 1.5;
}
.form-section-heading {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 8px 0 0;
    padding: 12px 14px;
    border: 1px solid #e6e1d8;
    border-radius: 13px;
    background: #f9f7f2;
}
.form-section-heading > span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-size: .72rem;
    font-weight: 900;
}
.form-section-heading div { display: grid; gap: 2px; }
.form-section-heading strong { font-size: .86rem; }
.form-section-heading small { color: var(--muted); font-size: .7rem; }
.booking-attribution-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.booking-attribution-strip > div {
    min-width: 0;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfaf7;
}
.booking-attribution-strip span {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.booking-attribution-strip strong {
    display: block;
    overflow: hidden;
    font-size: .82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.staff-attribution-signal {
    background: #eef4f7 !important;
    border-color: #c7d7df !important;
    color: #345466 !important;
}
.staff-directory-panel { margin: 22px 0; }
.staff-directory-panel .panel-heading p { max-width: 640px; margin: 5px 0 0; color: var(--muted); }
.staff-member-list { display: grid; gap: 9px; }
.staff-member-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
}
.staff-member-row.inactive { opacity: .58; background: #f7f5f1; }
.staff-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #1a1a19;
    color: #fff;
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .04em;
}
.staff-member-copy { display: grid; gap: 3px; min-width: 0; }
.staff-member-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-member-copy span { color: var(--muted); font-size: .76rem; }
.staff-member-actions { display: flex; align-items: center; gap: 11px; }
.compact-empty { padding: 22px; }
.modal-compact { max-width: 560px; }

/* More consistent touch and visual rhythm across the dashboard */
.admin-content { padding-bottom: max(34px, env(safe-area-inset-bottom)); }
.panel, .content-card { overflow: clip; }
.form-grid { row-gap: 15px; }
.field > span { margin-bottom: 7px; }
.field input, .field select, .field textarea { border-color: #dcd7ce; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: 3px solid rgba(169, 39, 34, .11);
    border-color: var(--accent);
}
.modal-card .button-large { position: sticky; bottom: 0; z-index: 2; box-shadow: 0 -8px 20px rgba(255,255,255,.92); }
.drawer-save-row {
    position: sticky;
    bottom: 0;
    z-index: 4;
    padding: 12px 0 max(4px, env(safe-area-inset-bottom));
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 24%);
}

@media (max-width: 1180px) {
    .current-staff-control { min-width: 145px; }
    .current-staff-control > span { display: none; }
    .current-staff-control select { min-height: 44px; }
    .service-toolbar { gap: 10px; }
    .service-actions .button { min-height: 44px; }
}
@media (max-width: 820px) {
    .admin-topbar { gap: 10px; }
    .admin-topbar > div:nth-child(2) { min-width: 0; }
    .admin-topbar h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar-actions { gap: 7px; }
    .topbar-actions .staff-chip, .topbar-actions > a { display: none; }
    .current-staff-control { min-width: 132px; max-width: 42vw; }
    .booking-attribution-strip { grid-template-columns: 1fr; }
    .staff-member-row { grid-template-columns: auto minmax(0,1fr); }
    .staff-member-actions { grid-column: 1 / -1; justify-content: flex-end; padding-top: 7px; border-top: 1px solid #eee9e0; }
    .form-section-heading { margin-top: 3px; }
    .modal-card .button-large { min-height: 52px; }
}
@media (max-width: 560px) {
    .current-staff-control { min-width: 116px; }
    .current-staff-control select { font-size: .72rem; }
    .staff-directory-panel .panel-heading { align-items: stretch; flex-direction: column; }
    .staff-directory-panel .panel-heading .button { width: 100%; }
}

/* Version 6.7 — host stand workflow, guest lookup and live service alerts */
.service-toolbar-v3 {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 253, 250, .96);
    box-shadow: 0 10px 28px rgba(29, 26, 20, .08);
    backdrop-filter: blur(14px);
}
.service-kpi-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.service-alert-kpi.attention { background: #fff0ef; border-color: #e6a9a5; color: #8d201b; }
.walk-in-action { border-color: #b8d6c8; background: #eef8f3; color: #1f654e; }
.reservation-card { transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease; }
.reservation-card:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(29, 26, 20, .08); }
.reservation-card.service-late {
    border-color: #d54b43;
    background: #fff0ef;
    box-shadow: inset 4px 0 0 #b52822;
}
.reservation-card.service-turn-soon,
.reservation-card.service-overdue {
    border-color: #c93830;
    background: #fff4f2;
    box-shadow: inset 4px 0 0 #b52822;
}
.live-service-alert {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid #d25750;
    border-radius: 999px;
    background: #fff;
    color: #9c211c;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .015em;
}
.live-service-alert.turn-soon,
.live-service-alert.overdue { background: #b52822; color: #fff; }
.booking-ban-inline,
.booking-ban-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 3px 8px;
    border-radius: 999px;
    background: #1d1b1a;
    color: #fff;
    font-size: .68rem;
    font-style: normal;
    font-weight: 900;
    letter-spacing: .03em;
    vertical-align: middle;
}
.guest-banned-hero { border-color: #8e201b; background: linear-gradient(135deg, #fff, #fff0ef); }
.booking-ban-control {
    display: grid;
    gap: 12px;
    padding: 15px;
    border: 1px solid #e3a19c;
    border-radius: 14px;
    background: #fff4f2;
}
.ban-check span { display: grid; gap: 3px; }
.ban-check small { color: #79514e; font-size: .72rem; }
.intel-danger { border-color: #dc8e88 !important; background: #fff0ef !important; }
.intel-danger strong { color: #921f1a; }

.guest-lookup-results {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid #d9d4ca;
    border-radius: 14px;
    background: #fbfaf7;
}
.guest-lookup-results.loading,
.guest-lookup-results.empty { color: var(--muted); }
.guest-lookup-results p { margin: 0; font-size: .78rem; }
.guest-lookup-option {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #ddd8cf;
    border-radius: 11px;
    background: #fff;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}
.guest-lookup-option:hover { border-color: var(--accent); background: #fff8f7; }
.guest-lookup-option > span { display: grid; gap: 2px; }
.guest-lookup-option > span:last-child { align-content: center; text-align: right; }
.guest-lookup-option small { color: var(--muted); }
.guest-lookup-option b { color: var(--accent); font-size: .72rem; }
.guest-lookup-option.banned { border-color: #d58d87; background: #fff0ef; }
.guest-lookup-selected { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.guest-lookup-selected > div { display: grid; gap: 2px; }
.guest-lookup-selected span { color: var(--green); font-size: .68rem; font-weight: 900; text-transform: uppercase; }
.guest-lookup-results.banned .guest-lookup-selected span { color: #9c211c; }
.guest-ban-warning { padding: 11px 12px; border-radius: 10px; background: #a12a24; color: #fff; }
.guest-ban-warning p { margin-top: 3px; color: #fff; }
.guest-existing-bookings { display: grid; gap: 6px; padding-top: 4px; }
.guest-existing-bookings > strong { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.guest-existing-bookings a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 9px; background: #fff; text-decoration: none; font-size: .74rem; }
.guest-existing-bookings a:hover { background: #f1eee7; }
.guest-lookup-clear { color: var(--muted); }

.floor-legend .legend-late { background: #c4352e; }
.floor-legend .legend-turn { background: #8f1410; box-shadow: 0 0 0 3px rgba(196, 53, 46, .16); }
.floor-table.state-late {
    border-color: #b52822 !important;
    background: #fff0ef !important;
    color: #8f1e19 !important;
    box-shadow: 0 0 0 4px rgba(181, 40, 34, .13), 0 10px 24px rgba(181, 40, 34, .16) !important;
}
.floor-table.state-turn-soon,
.floor-table.state-overdue {
    border-color: #8f1410 !important;
    background: #b52822 !important;
    color: #fff !important;
    box-shadow: 0 0 0 5px rgba(181, 40, 34, .2), 0 12px 28px rgba(181, 40, 34, .3) !important;
    animation: table-return-pulse 1s ease-in-out infinite;
}
.floor-table.state-turn-soon small,
.floor-table.state-overdue small { color: #fff !important; font-weight: 900; }
.timeline-booking.service-late { background: #fff0ef !important; border-color: #b52822 !important; color: #8f1e19 !important; }
.timeline-booking.service-turn-soon,
.timeline-booking.service-overdue { background: #b52822 !important; color: #fff !important; animation: table-return-pulse 1s ease-in-out infinite; }
.table-return-card.turn-soon,
.table-return-card.overdue { border-color: #b52822; background: #fff0ef; }
.table-return-card.late { border-color: #d45b54; background: #fff6f5; }
@keyframes table-return-pulse {
    0%, 100% { filter: brightness(1); box-shadow: 0 0 0 5px rgba(181, 40, 34, .20), 0 12px 28px rgba(181, 40, 34, .30); }
    50% { filter: brightness(1.12); box-shadow: 0 0 0 8px rgba(181, 40, 34, .30), 0 16px 34px rgba(181, 40, 34, .42); }
}

#walkin-modal .modal-card { max-width: 760px; }
#walkin-form select option:disabled { color: #aaa; }

@media (prefers-reduced-motion: reduce) {
    .floor-table.state-turn-soon,
    .floor-table.state-overdue,
    .timeline-booking.service-turn-soon,
    .timeline-booking.service-overdue { animation: none; }
}
@media (max-width: 1180px) {
    .service-kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .service-toolbar-v3 { top: 0; }
    .service-actions { flex-wrap: wrap; }
    .service-actions .button { flex: 1 1 auto; }
}
@media (max-width: 700px) {
    .service-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .guest-lookup-selected { align-items: flex-start; flex-direction: column; }
    .guest-existing-bookings a { align-items: flex-start; flex-direction: column; gap: 2px; }
}

.service-list-table tr.service-late { background: #fff1f0; box-shadow: inset 4px 0 0 #b52822; }
.service-list-table tr.service-turn-soon,
.service-list-table tr.service-overdue { background: #ffe5e3; box-shadow: inset 5px 0 0 #8f1410; }
.list-live-alert { display: inline-flex; margin-top: 5px; width: fit-content; padding: 3px 7px; border-radius: 999px; font-size: .68rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.list-live-alert.service-late { background: #b52822; color: #fff; }
.list-live-alert.service-turn-soon,
.list-live-alert.service-overdue { background: #8f1410; color: #fff; animation: list-alert-pulse 1s ease-in-out infinite; }
@keyframes list-alert-pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .list-live-alert.service-turn-soon, .list-live-alert.service-overdue { animation: none; } }

/* Version 6.8 — calmer host stand, iPad viewport layout and internal alerts */
.internal-alert-settings {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, .8fr);
    gap: 13px 18px;
    padding: 16px;
    border: 1px solid #ddd7cd;
    border-radius: 14px;
    background: #faf8f4;
}
.internal-alert-settings > div:first-child { grid-column: 1 / -1; }
.internal-alert-settings h3 { margin: 3px 0 4px; font-size: 1rem; }
.internal-alert-settings p,
.internal-alert-settings > small { margin: 0; color: var(--muted); font-size: .72rem; }
.internal-alert-settings > small { grid-column: 1 / -1; }
.internal-alert-settings .check-row { align-self: end; }

/* Flatten the command area so the service screen feels like one workspace. */
.service-toolbar-v3 {
    position: relative;
    padding: 8px;
    gap: 8px;
    margin-bottom: 8px;
    border-color: #e1ddd5;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(29, 26, 20, .045);
    backdrop-filter: none;
}
.service-toolbar-v3 .date-nav { gap: 5px; }
.service-toolbar-v3 .icon-button { width: 38px; height: 38px; }
.service-toolbar-v3 .button { min-height: 38px; padding: 0 12px; }
.service-view-switch { border-radius: 10px; }
.service-view-switch button { height: 32px; min-width: 68px; }
.service-actions { gap: 6px; }

.service-kpi-strip {
    display: grid;
    grid-template-columns: 1.25fr repeat(4, minmax(90px, .8fr));
    gap: 6px;
    margin-bottom: 8px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.service-kpi-strip > div {
    min-width: 0;
    padding: 7px 10px;
    border: 1px solid #e2ddd4;
    border-radius: 10px;
    background: #fff;
}
.service-kpi-strip strong { font-size: 1rem; }
.service-kpi-strip span { font-size: .66rem; }
.service-kpi-strip b { margin-left: auto; color: var(--muted); font-size: .64rem; font-weight: 750; }
.service-kpi-strip .attention { border-color: #e9c48a; background: #fff9ef; }

.host-stand { gap: 10px; }
.reservation-rail { border-radius: 14px; box-shadow: 0 3px 12px rgba(29, 26, 20, .04); }
.rail-header { padding: 12px 14px 9px; }
.rail-header h2 { font-size: 1.02rem; }
.rail-tools { padding: 9px; }
.reservation-card-list, .waitlist-rail { padding: 5px; }
.reservation-card {
    min-height: 70px;
    grid-template-columns: 52px minmax(0, 1fr) 22px;
    gap: 8px;
    margin-bottom: 3px;
    padding: 8px 7px;
    border-radius: 9px;
}
.reservation-card:hover { transform: none; box-shadow: none; }
.reservation-signals { margin-top: 4px; }
.service-timebar { min-height: 50px; padding: 6px; }
.floor-toolbar { min-height: 34px; margin-bottom: 5px; }
.floor-scroll { border-radius: 14px; }

/* Make the iPad host stand a true single-screen workspace. */
@media (max-width: 1180px) and (pointer: coarse), (max-width: 1180px) and (hover: none) {
    .service-dashboard-page { overflow: hidden; }
    .service-dashboard-page .admin-main { height: 100dvh; min-height: 0; overflow: hidden; }
    .service-dashboard-page .admin-topbar { min-height: 58px; height: 58px; padding: 7px 12px; }
    .service-dashboard-page .admin-topbar .eyebrow { display: none; }
    .service-dashboard-page .admin-topbar h1 { font-size: 1.05rem; }
    .service-dashboard-page .admin-content {
        height: calc(100dvh - 58px);
        min-height: 0;
        padding: 8px;
        display: grid;
        grid-template-rows: auto auto minmax(0, 1fr);
        gap: 7px;
        overflow: hidden;
    }
    .service-dashboard-page .service-toolbar-v3 {
        margin: 0;
        padding: 6px;
        flex-wrap: nowrap;
    }
    .service-dashboard-page .service-toolbar-v3 .date-nav { flex: 1 1 auto; min-width: 0; }
    .service-dashboard-page .date-picker-label { min-width: 170px; }
    .service-dashboard-page .date-picker-label strong { font-size: .74rem; }
    .service-dashboard-page .service-view-switch { order: initial; width: auto; flex: 0 0 auto; }
    .service-dashboard-page .service-view-switch button { min-width: 61px; min-height: 38px; padding: 0 8px; }
    .service-dashboard-page .service-actions { flex: 0 0 auto; flex-wrap: nowrap; }
    .service-dashboard-page .service-actions .button { min-height: 40px; padding: 0 10px; white-space: nowrap; }
    .service-dashboard-page .service-kpi-strip {
        margin: 0;
        grid-template-columns: 1.2fr repeat(4, minmax(72px, .75fr));
        gap: 5px;
        overflow: hidden;
    }
    .service-dashboard-page .service-kpi-strip > div { min-width: 0; padding: 5px 8px; }
    .service-dashboard-page .service-kpi-strip strong { font-size: .92rem; }
    .service-dashboard-page .service-kpi-strip span,
    .service-dashboard-page .service-kpi-strip b { font-size: .58rem; }
    .service-dashboard-page .host-stand { height: 100%; min-height: 0; }
    .service-dashboard-page .service-stage {
        height: 100%;
        min-height: 0;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 6px;
    }
    .service-dashboard-page .service-timebar { min-height: 48px; }
    .service-dashboard-page .service-view.active { height: 100%; min-height: 0; }
    .service-dashboard-page #floor-view.active {
        display: grid;
        grid-template-rows: auto auto minmax(0, 1fr);
        min-height: 0;
    }
    .service-dashboard-page .floor-toolbar { margin: 0 0 4px; }
    .service-dashboard-page .floor-scroll { height: auto; min-height: 0; }
    .service-dashboard-page .timeline-shell,
    .service-dashboard-page .service-list-panel { height: 100%; overflow: auto; }
    .service-dashboard-page .floor-plan-stage { margin: auto; }
}

/* Landscape iPad: bookings and floor remain visible together. */
@media (min-width: 900px) and (max-width: 1180px) and (orientation: landscape) and (pointer: coarse),
       (min-width: 900px) and (max-width: 1180px) and (orientation: landscape) and (hover: none) {
    .service-dashboard-page .host-stand {
        display: grid;
        grid-template-columns: minmax(270px, 29vw) minmax(0, 1fr);
        gap: 8px;
    }
    .service-dashboard-page .reservation-rail {
        position: relative;
        inset: auto;
        z-index: 1;
        width: auto;
        height: 100%;
        min-height: 0;
        border-radius: 13px;
        transform: none !important;
        box-shadow: 0 3px 12px rgba(29, 26, 20, .05);
    }
    .service-dashboard-page .tablet-rail-toggle,
    .service-dashboard-page .rail-close,
    .service-dashboard-page .reservation-rail-scrim { display: none !important; }
    .service-dashboard-page .reservation-card { min-height: 67px; }
    .service-dashboard-page .reservation-signals span:not(.live-service-alert):not(.unread-message-signal):not(.booking-ban-inline):not(.turnover-tight) {
        display: none;
    }
}

@media (max-width: 899px) and (pointer: coarse), (max-width: 899px) and (hover: none) {
    .service-dashboard-page .service-toolbar-v3 { flex-wrap: wrap; }
    .service-dashboard-page .service-view-switch { order: 3; width: 100%; }
    .service-dashboard-page .service-view-switch button { flex: 1; }
    .service-dashboard-page .service-actions { margin-left: auto; max-width: 100%; overflow-x: auto; }
    .service-dashboard-page .service-actions .button { flex: 0 0 auto; font-size: .7rem; padding-inline: 9px; }
    .service-dashboard-page .service-kpi-strip { overflow-x: auto; grid-template-columns: repeat(5, minmax(92px, 1fr)); }
}

@media (max-width: 720px) {
    .internal-alert-settings { grid-template-columns: 1fr; }
    .internal-alert-settings > * { grid-column: 1 !important; }
}


/* Version 6.9 — true iPad viewport fit and compact host-stand controls */
:root { --dp-app-height: 100dvh; }
.date-label-short,
.action-label-short { display: none; }

@media (max-width: 1180px) {
    html,
    body.service-dashboard-page {
        width: 100%;
        max-width: 100%;
        height: var(--dp-app-height);
        min-height: 0;
        overflow: hidden;
        overscroll-behavior: none;
    }
    .service-dashboard-page .admin-layout,
    .service-dashboard-page .admin-main {
        width: 100%;
        max-width: 100%;
        height: var(--dp-app-height);
        min-height: 0;
        overflow: hidden;
    }
    .service-dashboard-page .admin-topbar {
        width: 100%;
        min-width: 0;
        min-height: 52px;
        height: 52px;
        padding: max(5px, env(safe-area-inset-top)) 8px 5px;
        gap: 7px;
    }
    .service-dashboard-page .admin-topbar > div:nth-child(2) { flex: 1 1 auto; min-width: 0; }
    .service-dashboard-page .admin-topbar h1 { margin: 0; font-size: .98rem; }
    .service-dashboard-page .mobile-menu { width: 38px; height: 38px; flex: 0 0 38px; }
    .service-dashboard-page .topbar-actions { min-width: 0; gap: 5px; }
    .service-dashboard-page .topbar-actions .staff-chip,
    .service-dashboard-page .topbar-actions > .button { display: none; }
    .service-dashboard-page .current-staff-control { max-width: 158px; min-width: 0; }
    .service-dashboard-page .current-staff-control > span { display: none; }
    .service-dashboard-page .current-staff-control select { width: 100%; min-width: 0; height: 38px; padding: 0 28px 0 9px; font-size: .72rem; }

    .service-dashboard-page .admin-content {
        width: 100%;
        max-width: 100%;
        height: calc(var(--dp-app-height) - 52px);
        min-height: 0;
        padding: 6px;
        gap: 5px;
        grid-template-rows: auto 34px minmax(0, 1fr);
        overflow: hidden;
    }
    .service-dashboard-page .service-toolbar-v3 {
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "date views"
            "actions actions";
        align-items: center;
        gap: 5px 7px;
        padding: 5px;
        overflow: hidden;
    }
    .service-dashboard-page .service-toolbar-v3 .date-nav { grid-area: date; width: 100%; min-width: 0; gap: 4px; }
    .service-dashboard-page .service-toolbar-v3 .date-nav .icon-button { width: 36px; height: 36px; flex: 0 0 36px; }
    .service-dashboard-page .date-picker-label { min-width: 0; width: 100%; height: 36px; padding: 0 7px; }
    .service-dashboard-page .today-jump { display: none; }
    .service-dashboard-page .date-label-long { display: none; }
    .service-dashboard-page .date-label-short { display: inline; }
    .service-dashboard-page .service-view-switch { grid-area: views; flex: 0 0 auto; padding: 3px; }
    .service-dashboard-page .service-view-switch button { min-width: 54px; width: auto; height: 34px; min-height: 34px; padding: 0 7px; font-size: .69rem; }
    .service-dashboard-page .service-actions {
        grid-area: actions;
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 5px;
        overflow: visible;
    }
    .service-dashboard-page .service-actions .button {
        width: 100%;
        min-width: 0;
        min-height: 35px;
        height: 35px;
        padding: 0 6px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: .68rem;
        border-radius: 9px;
    }
    .service-dashboard-page .action-label-long { display: none; }
    .service-dashboard-page .action-label-short { display: inline; }

    .service-dashboard-page .service-kpi-strip {
        width: 100%;
        min-width: 0;
        height: 34px;
        display: grid;
        grid-template-columns: 1.25fr repeat(4, minmax(0, 1fr));
        gap: 4px;
        overflow: hidden;
    }
    .service-dashboard-page .service-kpi-strip > div {
        min-width: 0;
        height: 34px;
        padding: 3px 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        overflow: hidden;
        border-radius: 8px;
    }
    .service-dashboard-page .service-kpi-strip strong { font-size: .82rem; line-height: 1; }
    .service-dashboard-page .service-kpi-strip span,
    .service-dashboard-page .service-kpi-strip b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .52rem; }
    .service-dashboard-page .service-volume-kpi b { display: none; }

    .service-dashboard-page .host-stand,
    .service-dashboard-page .service-stage,
    .service-dashboard-page .service-view,
    .service-dashboard-page #floor-view,
    .service-dashboard-page .floor-scroll {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 0;
        overflow: hidden;
    }
    .service-dashboard-page .service-stage { gap: 4px; grid-template-rows: 42px minmax(0, 1fr); }
    .service-dashboard-page .service-timebar {
        width: 100%;
        min-width: 0;
        min-height: 42px;
        height: 42px;
        grid-template-columns: 34px 88px minmax(0, 1fr) 34px;
        gap: 4px;
        padding: 4px;
        border-radius: 10px;
    }
    .service-dashboard-page .time-step { width: 34px; height: 34px; border-radius: 8px; }
    .service-dashboard-page .service-clock { min-width: 0; padding-left: 2px; }
    .service-dashboard-page .service-clock span { display: none; }
    .service-dashboard-page .service-clock strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .79rem; }
    .service-dashboard-page .time-strip button { min-width: 62px; height: 32px; padding: 0 5px; font-size: .62rem; }

    .service-dashboard-page #floor-view.active { grid-template-rows: 28px auto minmax(0, 1fr); }
    .service-dashboard-page #floor-view.active > .floor-toolbar { grid-row: 1; }
    .service-dashboard-page #floor-view.active > .assignment-options { grid-row: 2; }
    .service-dashboard-page #floor-view.active > .floor-scroll { grid-row: 3; }
    .service-dashboard-page .floor-toolbar {
        width: 100%;
        min-width: 0;
        min-height: 28px;
        height: 28px;
        margin: 0;
        gap: 6px;
        overflow: hidden;
    }
    .service-dashboard-page .floor-legend {
        min-width: 0;
        flex: 1 1 auto;
        flex-wrap: nowrap;
        gap: 7px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
    }
    .service-dashboard-page .floor-legend::-webkit-scrollbar { display: none; }
    .service-dashboard-page .floor-legend span { flex: 0 0 auto; font-size: .54rem; }
    .service-dashboard-page .floor-legend i { width: 8px; height: 8px; }
    .service-dashboard-page .assignment-hint:not(.active),
    .service-dashboard-page .floor-toolbar > a { display: none; }
    .service-dashboard-page .assignment-hint.active { min-width: 0; font-size: .57rem; text-align: right; }
    .service-dashboard-page .floor-scroll {
        height: 100%;
        border-radius: 10px;
        -webkit-overflow-scrolling: auto;
        touch-action: manipulation;
    }
    .service-dashboard-page .floor-plan-stage { max-width: 100%; max-height: 100%; margin: auto; }
    .service-dashboard-page .floor-table { box-shadow: 0 2px 6px rgba(55,49,39,.1); }

    .service-dashboard-page .reservation-rail {
        max-width: calc(100vw - 12px);
        max-height: calc(var(--dp-app-height) - 64px);
        min-height: 0;
    }
    .service-dashboard-page .rail-header { padding: 8px 10px 6px; }
    .service-dashboard-page .rail-header .eyebrow { display: none; }
    .service-dashboard-page .rail-header h2 { margin: 0; font-size: .92rem; }
    .service-dashboard-page .rail-tabs button { height: 36px; min-height: 36px; }
    .service-dashboard-page .rail-tools { padding: 6px; }
    .service-dashboard-page .service-search { height: 34px; }
    .service-dashboard-page .rail-filters { margin-top: 5px; }
    .service-dashboard-page .rail-filters button { min-height: 30px; padding: 4px 7px; }
    .service-dashboard-page .reservation-card { min-height: 60px; grid-template-columns: 48px minmax(0, 1fr) 20px; padding: 6px; }
    .service-dashboard-page .reservation-card-time strong { font-size: .76rem; }
    .service-dashboard-page .reservation-card-time span,
    .service-dashboard-page .reservation-card-time small,
    .service-dashboard-page .reservation-table-label { font-size: .57rem; }
    .service-dashboard-page .reservation-name-row strong { font-size: .73rem; }
}

/* Landscape iPad: reserve enough room for both the host rail and the entire floor. */
@media (min-width: 820px) and (max-width: 1180px) and (orientation: landscape) {
    .service-dashboard-page .host-stand {
        display: grid;
        grid-template-columns: clamp(228px, 25vw, 260px) minmax(0, 1fr);
        gap: 6px;
    }
    .service-dashboard-page .reservation-rail {
        position: relative;
        inset: auto;
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        transform: none !important;
        border-radius: 10px;
    }
    .service-dashboard-page .tablet-rail-toggle,
    .service-dashboard-page .rail-close,
    .service-dashboard-page .reservation-rail-scrim { display: none !important; }
    .service-dashboard-page .service-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .service-dashboard-page .service-actions .tablet-rail-toggle { display: none !important; }
}

/* Portrait and split-screen iPad: floor stays visible, host stand uses a fitted drawer. */
@media (max-width: 819px) {
    .service-dashboard-page .reservation-rail {
        top: 58px;
        bottom: 6px;
        left: 6px;
        width: min(360px, calc(100vw - 12px));
        height: auto;
        max-height: none;
        border-radius: 12px;
    }
    .service-dashboard-page .service-toolbar-v3 { grid-template-columns: minmax(0, 1fr) auto; }
    .service-dashboard-page .service-view-switch button { min-width: 48px; padding-inline: 5px; }
}

@media (max-width: 620px) {
    .service-dashboard-page .service-view-switch button { min-width: 42px; font-size: .62rem; }
    .service-dashboard-page .service-actions .button { font-size: .62rem; padding-inline: 3px; }
    .service-dashboard-page .service-kpi-strip span { display: none; }
    .service-dashboard-page .service-kpi-strip > div::after { font-size: .47rem; color: var(--muted); }
    .service-dashboard-page .service-kpi-strip > div:nth-child(2)::after { content: "Wait"; }
    .service-dashboard-page .service-kpi-strip > div:nth-child(3)::after { content: "Unassigned"; }
    .service-dashboard-page .service-kpi-strip > div:nth-child(4)::after { content: "Late"; }
    .service-dashboard-page .service-kpi-strip > div:nth-child(5)::after { content: "Due"; }
}

/* Version 7.0 — dedicated front-of-house workspace and protected manager mode */
:root { --foh-bg: #111318; --foh-panel: #1a1d24; --foh-panel-2: #20242c; --foh-line: #303540; --foh-text: #f4f5f7; --foh-muted: #9aa1ad; --foh-accent: #c63a32; }

body.foh-app-page {
    width: 100%;
    height: var(--dp-app-height, 100dvh);
    min-height: 0;
    margin: 0;
    overflow: hidden;
    overscroll-behavior: none;
    background: var(--foh-bg);
    color: var(--foh-text);
    -webkit-user-select: none;
    user-select: none;
}
.foh-app-shell {
    width: 100%;
    height: var(--dp-app-height, 100dvh);
    min-height: 0;
    display: grid;
    grid-template-rows: 54px minmax(0, 1fr);
    overflow: hidden;
    background: var(--foh-bg);
}
.foh-appbar {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: max(6px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 6px max(10px, env(safe-area-inset-left));
    border-bottom: 1px solid var(--foh-line);
    background: #151820;
    z-index: 60;
}
.foh-icon-button {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--foh-line);
    border-radius: 9px;
    background: var(--foh-panel-2);
    color: var(--foh-text);
    font-size: 1.05rem;
    cursor: pointer;
}
.foh-brand-block { min-width: 0; display: flex; flex-direction: column; line-height: 1.05; }
.foh-brand-block strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.foh-brand-block span { margin-top: 3px; color: var(--foh-muted); font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.foh-appbar-spacer { min-width: 0; flex: 1; }
.foh-staff-selector { min-width: 0; display: flex; align-items: center; gap: 6px; color: var(--foh-muted); font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.foh-staff-selector select {
    width: min(180px, 23vw);
    height: 36px;
    padding: 0 30px 0 10px;
    border: 1px solid var(--foh-line);
    border-radius: 9px;
    background: var(--foh-panel-2);
    color: var(--foh-text);
    font-size: .72rem;
}
.foh-manager-button {
    min-width: 42px;
    height: 36px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--foh-line);
    border-radius: 9px;
    background: var(--foh-panel-2);
    color: var(--foh-muted);
    text-decoration: none;
    font-size: .68rem;
    font-weight: 800;
}
.foh-manager-button.unlocked { border-color: #39755e; color: #aee1c8; }
.foh-menu-scrim {
    position: fixed;
    inset: 0;
    z-index: 79;
    border: 0;
    background: rgba(3,5,8,.66);
    backdrop-filter: blur(2px);
}
.foh-menu-drawer {
    position: fixed;
    z-index: 80;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(330px, calc(100vw - 44px));
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    transform: translateX(-104%);
    transition: transform .18s ease;
    background: #171a21;
    border-right: 1px solid var(--foh-line);
    box-shadow: 20px 0 50px rgba(0,0,0,.35);
}
.foh-menu-drawer.open { transform: translateX(0); }
.foh-menu-heading { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 14px; }
.foh-menu-heading span, .foh-menu-heading strong { display: block; }
.foh-menu-heading span { color: var(--foh-muted); font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.foh-menu-heading strong { margin-top: 3px; font-size: 1.05rem; }
.foh-menu-nav { display: grid; gap: 5px; }
.foh-menu-nav a {
    min-height: 58px;
    padding: 9px 11px;
    display: grid;
    grid-template-columns: 28px minmax(0,1fr);
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: var(--foh-text);
    text-decoration: none;
}
.foh-menu-nav a:hover, .foh-menu-nav a.active { border-color: var(--foh-line); background: var(--foh-panel-2); }
.foh-menu-nav a > span { color: #c4c9d1; font-size: 1rem; text-align: center; }
.foh-menu-nav strong, .foh-menu-nav small { display: block; }
.foh-menu-nav strong { font-size: .78rem; }
.foh-menu-nav small { margin-top: 2px; color: var(--foh-muted); font-size: .62rem; }
.foh-menu-manager { margin-top: 14px; padding: 12px; display: grid; gap: 7px; border: 1px solid var(--foh-line); border-radius: 11px; background: #12151b; }
.foh-menu-manager span { color: var(--foh-muted); font-size: .65rem; line-height: 1.45; }
.foh-menu-manager a { color: #fff; font-size: .7rem; font-weight: 800; }
.foh-menu-footer { margin-top: auto; display: grid; gap: 8px; padding: 14px 5px 0; border-top: 1px solid var(--foh-line); }
.foh-menu-footer a { color: var(--foh-muted); font-size: .68rem; text-decoration: none; }

.foh-app-main {
    min-width: 0;
    min-height: 0;
    padding: 7px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
    background: var(--foh-bg);
}
.foh-app-page .alert { flex: 0 0 auto; margin: 0; padding: 8px 11px; border-radius: 9px; font-size: .7rem; }
.foh-app-page .service-toolbar-v3 {
    min-width: 0;
    flex: 0 0 auto;
    min-height: 44px;
    margin: 0;
    padding: 5px;
    display: grid;
    grid-template-columns: minmax(235px, .9fr) auto minmax(260px, 1fr);
    align-items: center;
    gap: 6px;
    border: 1px solid var(--foh-line);
    border-radius: 11px;
    background: var(--foh-panel);
}
.foh-app-page .date-nav { min-width: 0; display: grid; grid-template-columns: 34px minmax(0,1fr) 34px auto; align-items: center; gap: 4px; }
.foh-app-page .date-nav .icon-button { width: 34px; height: 34px; border-color: var(--foh-line); background: var(--foh-panel-2); color: var(--foh-text); }
.foh-app-page .date-picker-label { min-width: 0; height: 34px; border-color: var(--foh-line); background: var(--foh-panel-2); color: var(--foh-text); }
.foh-app-page .date-picker-label strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; }
.foh-app-page .today-jump { height: 34px; min-height: 34px; border-color: var(--foh-line); background: var(--foh-panel-2); color: var(--foh-text); }
.foh-app-page .service-view-switch { min-width: 0; padding: 3px; border-color: var(--foh-line); background: #12151b; }
.foh-app-page .service-view-switch button { min-width: 61px; height: 32px; color: var(--foh-muted); }
.foh-app-page .service-view-switch button.active { background: #f2f3f5; color: #181b22; }
.foh-app-page .service-actions { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 5px; }
.foh-app-page .service-actions .button { width: 100%; min-width: 0; min-height: 34px; height: 34px; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-color: var(--foh-line); background: var(--foh-panel-2); color: var(--foh-text); font-size: .66rem; border-radius: 8px; }
.foh-app-page .service-actions .button-primary { border-color: #d44d45; background: var(--foh-accent); color: #fff; }
.foh-app-page .tablet-rail-toggle { display: none; }

.foh-app-page .service-kpi-strip {
    min-width: 0;
    height: 34px;
    flex: 0 0 34px;
    margin: 0;
    display: grid;
    grid-template-columns: 1.35fr repeat(4, minmax(0, .8fr));
    gap: 4px;
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: hidden;
}
.foh-app-page .service-kpi-strip > div {
    min-width: 0;
    height: 34px;
    padding: 3px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--foh-line);
    border-radius: 9px;
    background: var(--foh-panel);
    color: var(--foh-text);
}
.foh-app-page .service-kpi-strip strong { color: var(--foh-text); font-size: .86rem; }
.foh-app-page .service-kpi-strip span, .foh-app-page .service-kpi-strip b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--foh-muted); font-size: .55rem; }
.foh-app-page .service-kpi-strip .attention { border-color: #8d6235; background: #282118; }
.foh-app-page .service-kpi-strip .attention strong, .foh-app-page .service-kpi-strip .attention span { color: #f0c98f; }

.foh-app-page .host-stand {
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: clamp(264px, 28vw, 315px) minmax(0,1fr);
    grid-template-rows: minmax(0,1fr);
    gap: 7px;
    align-items: stretch;
    overflow: hidden;
}
.foh-app-page .reservation-rail {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-width: none;
    max-height: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: none !important;
    border: 1px solid var(--foh-line);
    border-radius: 11px;
    background: var(--foh-panel);
    color: var(--foh-text);
    box-shadow: none;
}
.foh-app-page .reservation-rail-scrim, .foh-app-page .rail-close { display: none !important; }
.foh-app-page .rail-header { min-height: 45px; padding: 8px 10px 6px; border-bottom: 1px solid var(--foh-line); }
.foh-app-page .rail-header .eyebrow { display: none; }
.foh-app-page .rail-header h2 { margin: 0; color: var(--foh-text); font-size: .88rem; }
.foh-app-page .count-chip { background: #303540; color: #fff; }
.foh-app-page .rail-tabs { border-color: var(--foh-line); }
.foh-app-page .rail-tabs button { height: 36px; min-height: 36px; border-bottom-color: transparent; background: var(--foh-panel); color: var(--foh-muted); }
.foh-app-page .rail-tabs button.active { border-bottom-color: #dc554d; color: #fff; }
.foh-app-page .rail-tabs button span { background: #303540; color: #fff; }
.foh-app-page .rail-tools { padding: 6px; border-color: var(--foh-line); }
.foh-app-page .service-search { height: 34px; border-color: var(--foh-line); background: #12151b; color: #fff; }
.foh-app-page .service-search input { color: #fff; }
.foh-app-page .service-search input::placeholder { color: #777f8c; }
.foh-app-page .rail-filters { margin-top: 5px; gap: 4px; }
.foh-app-page .rail-filters button { min-height: 29px; padding: 4px 7px; background: #292e37; color: var(--foh-muted); }
.foh-app-page .rail-filters button.active { background: #f2f3f5; color: #171a20; }
.foh-app-page .reservation-card-list, .foh-app-page .waitlist-rail { padding: 5px; background: #161920; }
.foh-app-page .reservation-card {
    min-height: 62px;
    margin-bottom: 4px;
    padding: 6px;
    grid-template-columns: 48px minmax(0,1fr) 18px;
    gap: 6px;
    border-color: transparent;
    border-radius: 8px;
    background: #20242c;
    color: var(--foh-text);
}
.foh-app-page .reservation-card:hover { background: #252a33; border-color: #3a404d; }
.foh-app-page .reservation-card.selected { border-color: #e05a52; box-shadow: 0 0 0 2px rgba(224,90,82,.18); }
.foh-app-page .reservation-card-time { border-color: #343943; }
.foh-app-page .reservation-card-time strong, .foh-app-page .reservation-name-row strong { color: #fff; font-size: .72rem; }
.foh-app-page .reservation-card-time span, .foh-app-page .reservation-card-time small, .foh-app-page .reservation-table-label { color: var(--foh-muted); font-size: .55rem; }
.foh-app-page .reservation-signals { margin-top: 4px; gap: 3px; max-height: 20px; overflow: hidden; }
.foh-app-page .reservation-signals span { padding: 2px 4px; background: #303540; color: #cbd0d8; font-size: .5rem; }
.foh-app-page .card-open { width: 18px; color: #929aa6; }
.foh-app-page .waitlist-card { border-color: var(--foh-line); }
.foh-app-page .waitlist-card strong { color: #fff; }
.foh-app-page .waitlist-card span { color: var(--foh-muted); }

.foh-app-page .service-stage {
    min-width: 0;
    min-height: 0;
    height: 100%;
    display: grid;
    grid-template-rows: 42px minmax(0,1fr);
    gap: 5px;
    overflow: hidden;
}
.foh-app-page .service-timebar {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    height: 42px;
    padding: 4px;
    grid-template-columns: 34px 92px minmax(0,1fr) 34px;
    gap: 4px;
    border: 1px solid var(--foh-line);
    border-radius: 10px;
    background: var(--foh-panel);
    color: var(--foh-text);
}
.foh-app-page .time-step { width: 34px; height: 34px; border-color: var(--foh-line); background: var(--foh-panel-2); color: #fff; }
.foh-app-page .service-clock { min-width: 0; }
.foh-app-page .service-clock span { display: none; }
.foh-app-page .service-clock strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font-size: .76rem; }
.foh-app-page .time-strip button { min-width: 58px; height: 32px; background: #292e37; color: var(--foh-muted); font-size: .6rem; }
.foh-app-page .time-strip button.active { background: #f2f3f5; color: #171a20; }
.foh-app-page .service-view, .foh-app-page #floor-view, .foh-app-page .floor-scroll { min-width: 0; min-height: 0; width: 100%; height: 100%; overflow: hidden; }
.foh-app-page .service-view.active { display: block; }
.foh-app-page #floor-view.active { display: grid; grid-template-rows: 32px auto minmax(0,1fr); }
.foh-app-page .floor-toolbar {
    min-width: 0;
    min-height: 32px;
    height: 32px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--foh-muted);
}
.foh-app-page .floor-legend { min-width: 0; flex: 1; display: flex; flex-wrap: nowrap; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.foh-app-page .floor-legend::-webkit-scrollbar { display: none; }
.foh-app-page .floor-legend span { flex: 0 0 auto; color: var(--foh-muted); font-size: .52rem; }
.foh-app-page .floor-legend i { width: 8px; height: 8px; }
.foh-app-page .assignment-hint:not(.active) { display: none; }
.foh-app-page .assignment-hint.active { min-width: 0; flex: 0 1 auto; color: #f0a39e; font-size: .55rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.floor-zoom-controls { flex: 0 0 auto; display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--foh-line); border-radius: 8px; background: #12151b; }
.floor-zoom-controls button { min-width: 30px; height: 25px; padding: 0 7px; border: 0; border-radius: 6px; background: transparent; color: #d9dde3; font-size: .64rem; font-weight: 800; cursor: pointer; }
.floor-zoom-controls button:hover { background: #2a2f38; }
.foh-app-page .assignment-options { max-height: 58px; overflow: auto; }
.foh-app-page .floor-scroll {
    position: relative;
    height: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
    border: 1px solid var(--foh-line);
    border-radius: 10px;
    background:
        radial-gradient(circle at 50% 45%, rgba(63,69,82,.22), transparent 50%),
        repeating-linear-gradient(0deg, transparent 0 31px, rgba(255,255,255,.025) 32px),
        repeating-linear-gradient(90deg, transparent 0 31px, rgba(255,255,255,.025) 32px),
        #0f1217;
}
.foh-app-page .floor-scroll.is-panning { cursor: grabbing; }
.foh-app-page .floor-plan-stage { position: absolute; top: 0; left: 0; max-width: none; max-height: none; will-change: transform; }
.foh-app-page .floor-plan { overflow: visible; background: transparent; }
.foh-app-page .floor-area-label { display: none; }
.foh-app-page .floor-table {
    min-width: 0;
    min-height: 0;
    border-width: 1.5px;
    border-color: #626a77;
    background: #e9ebef;
    color: #14171d;
    box-shadow: 0 4px 12px rgba(0,0,0,.28);
}
.foh-app-page .floor-table-name { font-size: 11px; }
.foh-app-page .floor-table-capacity { font-size: 18px; }
.foh-app-page .floor-table-detail { font-size: 8px; }
.foh-app-page .floor-table.state-reserved { border-color: #e4ad4c; background: #f4dca7; }
.foh-app-page .floor-table.state-arrived { border-color: #ee8d36; background: #f8c98c; }
.foh-app-page .floor-table.state-seated { border-color: #a98bc4; background: #d8c2e8; }
.foh-app-page .floor-table.state-next { border-color: #5686ad; background: #dceaf5; }
.foh-app-page .floor-table.service-late { border-color: #ff6056; background: #f5a19b; }
.foh-app-page .floor-table.service-turn-soon, .foh-app-page .floor-table.service-overdue { border-color: #ff4e45; }
.foh-app-page .timeline-shell, .foh-app-page .service-list-panel { height: 100%; overflow: auto; border-color: var(--foh-line); background: var(--foh-panel); color: #fff; }
.foh-app-page .service-list-table th, .foh-app-page .service-list-table td { border-color: var(--foh-line); color: #fff; }
.foh-app-page .service-list-table small { color: var(--foh-muted); }

/* Portrait iPad: show both floor and host stand without shrinking either into an unusable column. */
@media (max-width: 819px) and (orientation: portrait) {
    .foh-app-shell { grid-template-rows: 52px minmax(0,1fr); }
    .foh-appbar { padding-block: 5px; }
    .foh-brand-block span, .foh-manager-button span, .foh-staff-selector > span { display: none; }
    .foh-staff-selector select { width: min(170px, 31vw); }
    .foh-app-main { padding: 5px; gap: 4px; }
    .foh-app-page .service-toolbar-v3 {
        min-height: 80px;
        grid-template-columns: minmax(0,1fr) auto;
        grid-template-areas: "date views" "actions actions";
    }
    .foh-app-page .date-nav { grid-area: date; grid-template-columns: 32px minmax(0,1fr) 32px; }
    .foh-app-page .today-jump { display: none; }
    .foh-app-page .service-view-switch { grid-area: views; }
    .foh-app-page .service-view-switch button { min-width: 48px; }
    .foh-app-page .service-actions { grid-area: actions; }
    .foh-app-page .service-kpi-strip { height: 30px; flex-basis: 30px; }
    .foh-app-page .service-kpi-strip > div { height: 30px; padding-inline: 5px; }
    .foh-app-page .service-kpi-strip span, .foh-app-page .service-kpi-strip b { display: none; }
    .foh-app-page .host-stand {
        grid-template-columns: minmax(0,1fr);
        grid-template-rows: minmax(0, 1.55fr) minmax(205px, .85fr);
        grid-template-areas: "stage" "rail";
    }
    .foh-app-page .service-stage { grid-area: stage; }
    .foh-app-page .reservation-rail { grid-area: rail; }
    .foh-app-page .rail-header { display: none; }
    .foh-app-page .rail-tabs button { height: 32px; min-height: 32px; }
    .foh-app-page .rail-tools { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 5px; }
    .foh-app-page .rail-filters { margin: 0; }
    .foh-app-page .rail-filters button:nth-child(2),
    .foh-app-page .rail-filters button:nth-child(3) { display: none; }
    .foh-app-page .reservation-card-list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 42vw); overflow-x: auto; overflow-y: hidden; gap: 4px; }
    .foh-app-page .reservation-card { height: calc(100% - 4px); margin: 0; }
}

@media (max-width: 620px) {
    .foh-brand-block { display: none; }
    .foh-app-page .service-toolbar-v3 { min-height: 78px; }
    .foh-app-page .service-actions .button { font-size: .6rem; }
    .foh-app-page .service-view-switch button { min-width: 43px; font-size: .62rem; }
}

/* Non-service manager access affordances. */
.admin-nav-divider { margin: 14px 10px 5px; color: #8f918f; font-size: .58rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.manager-nav-lock { color: #ddd1bc !important; }
.manager-gate-panel { padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-style: dashed; }
.manager-gate-panel h2 { margin: 3px 0 6px; }
.manager-gate-panel p { max-width: 700px; margin: 0; color: var(--muted); }
.manager-unlock-page { min-height: 100vh; margin: 0; display: grid; place-items: center; padding: 24px; background: #111318; color: #fff; }
.manager-unlock-shell { width: min(520px, 100%); }
.manager-unlock-card { padding: 28px; border: 1px solid #343944; border-radius: 18px; background: #1a1d24; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.manager-unlock-card img { width: 170px; max-height: 70px; object-fit: contain; object-position: left center; margin: 18px 0 25px; }
.manager-unlock-card h1 { margin: 4px 0 8px; font-size: 1.7rem; }
.manager-unlock-card p { color: #aeb4be; line-height: 1.55; }
.manager-back-link { color: #bfc4cc; font-size: .75rem; text-decoration: none; }
.manager-unlock-form { margin-top: 22px; display: grid; gap: 14px; }
.manager-unlock-page .field span { color: #d8dbe1; }
.manager-unlock-page .field input { border-color: #3a404b; background: #111419; color: #fff; }

/* Version 7.1 — direct host-stand interactions and reliable page scrolling */
body.messages-page {
    height: auto !important;
    min-height: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
}
.messages-page .admin-layout,
.messages-page .admin-main,
.messages-page .admin-content {
    height: auto !important;
    min-height: 100vh;
    overflow: visible !important;
}
.messages-page .panel { overflow: visible; }
.messages-page .admin-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 820px) {
    .messages-page .admin-topbar { position: sticky; top: 0; z-index: 18; }
    .messages-page .admin-content { padding-bottom: max(70px, env(safe-area-inset-bottom)); }
}

.assignment-options-disabled { display: none !important; }
.foh-app-page #floor-view.active { grid-template-rows: 32px minmax(0, 1fr); }
.foh-app-page #floor-view.active > .floor-toolbar { grid-row: 1; }
.foh-app-page #floor-view.active > .floor-scroll { grid-row: 2; }

.foh-app-page .reservation-card {
    grid-template-columns: 48px minmax(0, 1fr) 27px 18px;
}
.reservation-drag-handle {
    width: 27px;
    height: 42px;
    align-self: center;
    display: grid;
    place-items: center;
    border: 1px solid #3a404b;
    border-radius: 7px;
    background: #292e37;
    color: #c5cad2;
    font-size: .83rem;
    line-height: 1;
    letter-spacing: -2px;
    cursor: grab;
    touch-action: none;
}
.reservation-drag-handle:active { cursor: grabbing; background: #343a45; }
.reservation-touch-dragging { cursor: grabbing !important; }
.reservation-drag-ghost {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    min-width: 180px;
    max-width: 260px;
    padding: 10px 12px;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 10px;
    background: rgba(25,29,36,.96);
    color: #fff;
    box-shadow: 0 16px 40px rgba(0,0,0,.4);
    transform: translate3d(-500px,-500px,0);
}
.reservation-drag-ghost strong,
.reservation-drag-ghost span { display: block; }
.reservation-drag-ghost strong { font-size: .78rem; }
.reservation-drag-ghost span { margin-top: 2px; color: #b8bec8; font-size: .62rem; }
.foh-app-page .floor-table.drag-drop-target {
    border-color: #43c98e !important;
    box-shadow: 0 0 0 5px rgba(67,201,142,.22), 0 10px 28px rgba(0,0,0,.35) !important;
}
.foh-app-page .floor-table.drag-drop-invalid {
    border-color: #ef6259 !important;
    opacity: .55;
}

.table-action-card { width: min(470px, calc(100vw - 28px)); }
.table-action-buttons { display: grid; gap: 10px; margin-top: 18px; }
.table-action-buttons .button {
    min-height: 72px;
    padding: 12px 15px;
    justify-content: flex-start;
    gap: 12px;
    text-align: left;
}
.table-action-buttons .button > span { width: 34px; font-size: 1.3rem; text-align: center; }
.table-action-buttons .button strong,
.table-action-buttons .button small { display: block; }
.table-action-buttons .button small { margin-top: 2px; opacity: .72; font-weight: 600; }
.assignment-choice-list { display: grid; gap: 8px; }
.assignment-choice-button {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}
.assignment-choice-button:hover { border-color: var(--accent); background: #fff8f6; }
.assignment-choice-button strong,
.assignment-choice-button span { display: block; }
.assignment-choice-button span { margin-top: 3px; color: var(--muted); font-size: .75rem; }
.booking-table-context {
    min-height: 50px;
    padding: 9px 11px;
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto;
    align-items: center;
    gap: 9px;
    border: 1px solid #c7dcca;
    border-radius: 11px;
    background: #eef8f0;
}
.booking-table-context span { color: #477055; font-size: .7rem; font-weight: 750; }
.booking-table-context strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; }
.booking-table-context button { border: 0; background: transparent; color: var(--accent); font-weight: 800; cursor: pointer; }

@media (max-width: 819px) and (orientation: portrait) {
    .foh-app-page .reservation-card { grid-template-columns: 46px minmax(0, 1fr) 29px 18px; }
    .reservation-drag-handle { width: 29px; height: 46px; }
}

/* Version 7.2 — clearer host modals, live table cards and multi-table assignment */
.foh-app-page .modal-card {
    color: #1b1b19;
    background: #fffdfa;
}
.foh-app-page .modal-card h2,
.foh-app-page .modal-card h3,
.foh-app-page .modal-card strong,
.foh-app-page .modal-card .field > span,
.foh-app-page .modal-card .field > label,
.foh-app-page .modal-card label,
.foh-app-page .modal-card .form-section-heading strong {
    color: #1b1b19;
}
.foh-app-page .modal-card .modal-intro,
.foh-app-page .modal-card .field small,
.foh-app-page .modal-card .field em,
.foh-app-page .modal-card .form-section-heading small,
.foh-app-page .modal-card .table-action-buttons small {
    color: #5f5b55;
    opacity: 1;
}
.foh-app-page .modal-card input,
.foh-app-page .modal-card select,
.foh-app-page .modal-card textarea {
    color: #171716;
    background: #fff;
}
.foh-app-page .modal-card input::placeholder,
.foh-app-page .modal-card textarea::placeholder { color: #817c74; }
.foh-app-page .booking-table-context strong { color: #214e31; }
.foh-app-page .booking-table-context span { color: #356a45; }

.foh-app-page #floor-view.active {
    position: relative;
    grid-template-rows: 32px minmax(0, 1fr);
    grid-template-areas: "floor-toolbar" "floor-canvas";
}
.foh-app-page .floor-toolbar { grid-area: floor-toolbar; }
.foh-app-page .floor-scroll { grid-area: floor-canvas; }
.foh-app-page .assignment-options { display: none !important; }
/* Keep the multi-table selector out of the grid sizing calculation. Safari could
   otherwise collapse the floor canvas when the selector was hidden. */
.foh-app-page .multi-table-bar {
    position: absolute;
    z-index: 18;
    top: 36px;
    left: 8px;
    right: 8px;
    margin: 0;
}
.foh-app-page .multi-table-bar[hidden] { display: none !important; }

.floor-tool-button {
    flex: 0 0 auto;
    min-height: 26px;
    padding: 3px 8px;
    border: 1px solid var(--foh-line);
    border-radius: 7px;
    background: #262b34;
    color: #eef1f4;
    font-size: .57rem;
    font-weight: 800;
    cursor: pointer;
}
.floor-tool-button:hover,
.floor-tool-button.active { border-color: #5e9d82; background: #244337; color: #e9fff4; }
.floor-tool-button.danger { border-color: #6b3a3a; color: #ffb2ad; }
.floor-tool-button.danger:hover { background: #4b2424; }

.multi-table-bar {
    min-width: 0;
    min-height: 49px;
    margin-bottom: 5px;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #3e735f;
    border-radius: 9px;
    background: #193128;
    color: #eefaf4;
}
.multi-table-bar > div:first-child { min-width: 0; }
.multi-table-bar strong,
.multi-table-bar span { display: block; }
.multi-table-bar strong { color: #fff; font-size: .7rem; }
.multi-table-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #b9d7ca; font-size: .56rem; }
.multi-table-actions { flex: 0 0 auto; display: flex; gap: 5px; }
.multi-table-actions .button { min-height: 32px; height: 32px; padding-inline: 10px; font-size: .6rem; }

.foh-app-page .floor-table-booking {
    width: calc(100% - 6px);
    min-width: 0;
    display: grid;
    gap: 2px;
    padding: 5px 6px;
    border-radius: 7px;
    background: #20252d;
    box-shadow: 0 2px 7px rgba(0,0,0,.24);
    line-height: 1.08;
}
.foh-app-page .floor-table-booking[hidden] { display: none !important; }
.foh-app-page .floor-table-booking strong,
.foh-app-page .floor-table-booking span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #ffffff;
}
.foh-app-page .floor-table-booking strong { font-size: 10px; font-weight: 900; }
.foh-app-page .floor-table-booking span { font-size: 8px; font-weight: 800; color: #dbe2ea; }
.foh-app-page .floor-table.state-next .floor-table-booking { background: #24577e; }
.foh-app-page .floor-table-detail { color: #353941; font-weight: 800; }
.foh-app-page .floor-table.state-late .floor-table-booking,
.foh-app-page .floor-table.state-turn-soon .floor-table-booking,
.foh-app-page .floor-table.state-overdue .floor-table-booking { background: #fff; }
.foh-app-page .floor-table.state-late .floor-table-booking strong,
.foh-app-page .floor-table.state-late .floor-table-booking span,
.foh-app-page .floor-table.state-turn-soon .floor-table-booking strong,
.foh-app-page .floor-table.state-turn-soon .floor-table-booking span,
.foh-app-page .floor-table.state-overdue .floor-table-booking strong,
.foh-app-page .floor-table.state-overdue .floor-table-booking span { color: #17191e; }
.foh-app-page .floor-table.just-assigned { animation: tableAssignedPulse .85s ease; }
@keyframes tableAssignedPulse {
    0% { box-shadow: 0 0 0 0 rgba(67,201,142,.72), 0 4px 12px rgba(0,0,0,.28); }
    55% { box-shadow: 0 0 0 9px rgba(67,201,142,.18), 0 8px 20px rgba(0,0,0,.32); }
    100% { box-shadow: 0 4px 12px rgba(0,0,0,.28); }
}

.foh-app-page .floor-table.multi-table-option { cursor: pointer; }
.foh-app-page .floor-table.multi-table-option:not(.multi-table-conflict) {
    border-color: #4f9475;
    box-shadow: 0 0 0 3px rgba(79,148,117,.14), 0 4px 12px rgba(0,0,0,.28);
}
.foh-app-page .floor-table.multi-table-selected {
    border-color: #49d294 !important;
    box-shadow: 0 0 0 6px rgba(73,210,148,.25), 0 7px 18px rgba(0,0,0,.35) !important;
}
.foh-app-page .floor-table.multi-table-conflict {
    border-color: #d9534f !important;
    opacity: .45;
    filter: grayscale(.35);
}

.floor-feedback-card { width: min(440px, calc(100vw - 28px)); }
.floor-feedback-card .button-large { width: 100%; margin-top: 14px; }
.floor-feedback-card p { color: #4d4943; }

@media (max-width: 819px) {
    .foh-app-page .floor-toolbar { gap: 4px; }
    .foh-app-page .floor-legend { display: none; }
    .foh-app-page .assignment-hint.active { flex: 1 1 auto; }
    .floor-tool-button { padding-inline: 7px; }
    .multi-table-bar { align-items: stretch; }
    .multi-table-actions { align-items: center; }
    .multi-table-actions .button { padding-inline: 7px; }
}


/* Version 7.2.1 — floor recovery */
.foh-app-page .floor-plan.floor-plan-empty::after {
    content: 'No active tables are available. Open Manager → Tables to restore or activate the floor plan.';
    position: absolute;
    inset: 40px;
    display: grid;
    place-items: center;
    padding: 24px;
    border: 1px dashed #59616f;
    border-radius: 14px;
    color: #d8dde5;
    background: rgba(20,24,31,.92);
    font-size: .82rem;
    font-weight: 750;
    text-align: center;
}

/* Version 7.2.4 — readable, contained reservation workspace */
.foh-app-page .booking-workspace-card {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    overflow: hidden;
    color: #1b1b19;
    background: #f5f3ee;
    -webkit-user-select: text;
    user-select: text;
}
.foh-app-page .booking-drawer-header {
    position: relative;
    min-width: 0;
    color: #1b1b19;
    background: #ffffff;
}
.foh-app-page .booking-drawer-header h2 {
    color: #171716;
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 700;
}
.foh-app-page .booking-drawer-header p { color: #5f5b55; }
.foh-app-page .booking-drawer-header .button-secondary {
    border-color: #d7d2c8;
    background: #ffffff;
    color: #171716;
}
.foh-app-page .drawer-back {
    color: #171716;
    background: #f3f0e9;
}
.foh-app-page .drawer-quick-actions {
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    background: #ffffff;
}
.foh-app-page .drawer-quick-actions::-webkit-scrollbar { display: none; }
.foh-app-page .drawer-quick-actions button {
    border-color: #d8d3ca;
    background: #ffffff;
    color: #4f4b45;
}
.foh-app-page .drawer-tabs {
    position: static;
    min-width: 0;
    color: #171716;
    background: #fff;
}
.foh-app-page .drawer-tabs button { color: #68635c; }
.foh-app-page .drawer-tabs button.active { color: #171716; }
.foh-app-page .drawer-tabs button span {
    background: #f0ede7;
    color: #5c5750;
}
.foh-app-page .drawer-panel {
    grid-row: 4;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 18px 18px max(24px, env(safe-area-inset-bottom));
    color: #1b1b19;
    background: #f5f3ee;
}
.foh-app-page .drawer-panel h2,
.foh-app-page .drawer-panel h3,
.foh-app-page .drawer-panel h4,
.foh-app-page .drawer-panel strong,
.foh-app-page .drawer-panel .field > span,
.foh-app-page .drawer-panel .field > label,
.foh-app-page .drawer-panel label,
.foh-app-page .drawer-panel .drawer-section-title,
.foh-app-page .drawer-panel .drawer-section-title strong {
    color: #1b1b19;
    opacity: 1;
}
.foh-app-page .drawer-panel .field > span {
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .01em;
}
.foh-app-page .drawer-panel .field em,
.foh-app-page .drawer-panel .field small,
.foh-app-page .drawer-panel p { color: #5f5b55; }
.foh-app-page .drawer-panel input,
.foh-app-page .drawer-panel select,
.foh-app-page .drawer-panel textarea {
    border-color: #d7d2c8;
    background: #ffffff;
    color: #171716;
}
.foh-app-page .drawer-panel input::placeholder,
.foh-app-page .drawer-panel textarea::placeholder { color: #817b73; }
.foh-app-page .drawer-panel input:focus,
.foh-app-page .drawer-panel select:focus,
.foh-app-page .drawer-panel textarea:focus {
    border-color: #a12a24;
    outline: 3px solid rgba(161,42,36,.12);
}
.foh-app-page .booking-attribution-strip > div {
    border-color: #ddd8cf;
    background: #fffdfa;
}
.foh-app-page .booking-attribution-strip span { color: #6a655e; }
.foh-app-page .booking-attribution-strip strong { color: #25231f; }
.foh-app-page .table-return-card {
    border-color: #cbd9d0;
    background: #f2faf6;
}
.foh-app-page .table-return-card span { color: #496456; }
.foh-app-page .table-return-card strong { color: #1d5f43; }
.foh-app-page .table-return-card p { color: #4e5c54; }
.foh-app-page .drawer-section-card {
    border-color: #ddd8cf;
    background: #fffdfa;
}
.foh-app-page .drawer-section-title i {
    background: #eeeae3;
    color: #504b44;
}
.foh-app-page .drawer-save-row {
    position: sticky;
    bottom: -1px;
    z-index: 8;
    display: grid;
    grid-template-columns: minmax(145px, 1.2fr) minmax(135px, 1fr) minmax(135px, 1fr);
    gap: 8px;
    margin: 8px -18px -24px;
    padding: 14px 18px max(14px, env(safe-area-inset-bottom));
    border-top: 1px solid #d8d3ca;
    background: rgba(255,255,255,.97);
    box-shadow: 0 -10px 24px rgba(29,26,20,.09);
    backdrop-filter: blur(12px);
}
.foh-app-page .drawer-save-row .button {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding-inline: 12px;
    white-space: nowrap;
}
.foh-app-page .drawer-save-row .danger-outline {
    border-color: #dca9a5;
    background: #fff;
    color: #9f2c26;
}
.foh-app-page .private-note-banner,
.foh-app-page .note-compose,
.foh-app-page .message-compose,
.foh-app-page .note-entry,
.foh-app-page .message-bubble { color: #1b1b19; }

@media (max-width: 680px) {
    .foh-app-page .booking-workspace-card { width: 100%; }
    .foh-app-page .booking-drawer-header { padding-right: 14px; }
    .foh-app-page .drawer-panel { padding-inline: 14px; }
    .foh-app-page .drawer-save-row {
        grid-template-columns: 1fr 1fr;
        margin-inline: -14px;
        padding-inline: 14px;
    }
    .foh-app-page .drawer-save-row .button-primary { grid-column: 1 / -1; }
}

@media (max-width: 430px) {
    .foh-app-page .drawer-save-row { grid-template-columns: 1fr; }
    .foh-app-page .drawer-save-row .button-primary { grid-column: auto; }
}

/* Version 7.2.5 — high-contrast messaging and phone-booking details */
.foh-app-page [data-drawer-panel="messages"] {
    color: #171716;
    background: #f5f3ee;
}
.foh-app-page [data-drawer-panel="messages"] .message-thread,
.foh-app-page [data-drawer-panel="messages"] .message-compose {
    color: #171716;
}
.foh-app-page [data-drawer-panel="messages"] .message-bubble,
.foh-app-page [data-drawer-panel="messages"] .message-bubble strong,
.foh-app-page [data-drawer-panel="messages"] .message-bubble h4,
.foh-app-page [data-drawer-panel="messages"] .message-bubble p {
    color: #171716 !important;
    opacity: 1 !important;
}
.foh-app-page [data-drawer-panel="messages"] .message-bubble span {
    color: #625d56 !important;
    opacity: 1 !important;
}
.foh-app-page [data-drawer-panel="messages"] .message-compose .field > span,
.foh-app-page [data-drawer-panel="messages"] .message-compose label {
    color: #292621 !important;
    opacity: 1 !important;
}
.foh-app-page [data-drawer-panel="messages"] .message-compose input,
.foh-app-page [data-drawer-panel="messages"] .message-compose select,
.foh-app-page [data-drawer-panel="messages"] .message-compose textarea {
    color: #171716 !important;
    background: #fff !important;
    border-color: #cfc8bd !important;
    opacity: 1 !important;
}
.foh-app-page [data-drawer-panel="messages"] .message-compose textarea::placeholder,
.foh-app-page [data-drawer-panel="messages"] .message-compose input::placeholder {
    color: #777168 !important;
    opacity: 1 !important;
}
.foh-app-page [data-drawer-panel="messages"] .drawer-empty strong { color: #211f1b !important; }
.foh-app-page [data-drawer-panel="messages"] .drawer-empty p { color: #625d56 !important; }

.messages-page .panel,
.messages-page .panel h2,
.messages-page .panel h3,
.messages-page .panel strong,
.messages-page .panel .field > span,
.messages-page .panel label,
.messages-page .admin-table,
.messages-page .admin-table td,
.messages-page .admin-table th {
    color: #1d1b18;
}
.messages-page .panel p,
.messages-page .panel small,
.messages-page .settings-status,
.messages-page .field-help { color: #625d56; }
.messages-page .panel input,
.messages-page .panel select,
.messages-page .panel textarea {
    color: #171716;
    background: #fff;
}
.messages-page .admin-table td small { color: #625d56; }

.guest-details-shell { padding-block: 34px 56px; }
.guest-details-card { width: min(760px, 100%); }
.guest-details-card h1 { margin-bottom: 8px; }
.guest-details-booking-summary {
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.guest-details-booking-summary strong { color: #1c1a17; }
.guest-details-booking-summary span { color: #625d56; }
.guest-details-form { margin-top: 20px; }
.consent-panel {
    padding: 14px;
    border: 1px solid #ddd7cd;
    border-radius: 13px;
    background: #faf8f4;
}
.consent-panel small { display: block; margin-top: 8px; color: #625d56; }
.guest-details-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.guest-details-summary > div { padding: 14px; border: 1px solid #ded8cf; border-radius: 12px; background: #fff; }
.guest-details-summary span { display: block; color: #69635b; font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.guest-details-summary strong { display: block; margin-top: 4px; color: #1b1916; }

@media (max-width: 620px) {
    .guest-details-shell { padding: 18px 12px 44px; }
    .guest-details-booking-summary { align-items: flex-start; flex-direction: column; }
    .guest-details-summary { grid-template-columns: 1fr; }
}


/* Version 7.2.7 — reliable touch scrolling and closed-booking separation */
html:has(body.guest-details-page),
body.guest-details-page {
    height: auto !important;
    min-height: 100%;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}
body.guest-details-page .booking-header,
body.guest-details-page .guest-details-shell,
body.guest-details-page .guest-details-card,
body.guest-details-page .guest-details-form {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}
body.guest-details-page .guest-details-shell {
    min-height: 0;
    padding-bottom: max(100px, calc(60px + env(safe-area-inset-bottom)));
}
body.guest-details-page .guest-details-form .button[type="submit"] {
    position: static !important;
    width: 100%;
    margin-top: 4px;
}

body.admin-scroll-page {
    height: auto !important;
    min-height: 100dvh;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}
.admin-scroll-page .admin-layout,
.admin-scroll-page .admin-main,
.admin-scroll-page .admin-content {
    height: auto !important;
    min-height: 100dvh;
    max-height: none !important;
    overflow: visible !important;
}
.admin-scroll-page .admin-content {
    padding-bottom: max(90px, calc(55px + env(safe-area-inset-bottom)));
}
.admin-scroll-page .panel,
.admin-scroll-page .content-card {
    max-height: none !important;
    overflow: visible !important;
}
.admin-scroll-page .admin-table-wrap,
.admin-scroll-page .table-scroll {
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}
@media (max-width: 1180px) {
    .admin-scroll-page .admin-topbar { position: sticky; top: 0; z-index: 18; }
}
@media (max-width: 620px) {
    body.guest-details-page .booking-header { padding-bottom: 8px; }
    body.guest-details-page .guest-details-shell { padding: 8px 10px max(110px, calc(70px + env(safe-area-inset-bottom))); }
    body.guest-details-page .guest-details-card { padding: 20px 16px; border-radius: 18px; }
    body.guest-details-page .guest-details-card h1 { font-size: 2rem; }
    body.guest-details-page .field input,
    body.guest-details-page .field select,
    body.guest-details-page .field textarea { font-size: 16px; }
}

.cancelled-booking-list {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    padding: 7px;
    -webkit-overflow-scrolling: touch;
}
.cancelled-booking-card {
    width: 100%;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 6px;
    padding: 11px;
    border: 1px solid #493537;
    border-radius: 9px;
    background: #221c1e;
    color: #f5eeee;
    text-align: left;
    cursor: pointer;
}
.cancelled-booking-card span { min-width: 0; }
.cancelled-booking-card strong,
.cancelled-booking-card small { display: block; }
.cancelled-booking-card strong { overflow: hidden; color: #fff; text-overflow: ellipsis; white-space: nowrap; font-size: .73rem; }
.cancelled-booking-card small { overflow: hidden; color: #bcaeb0; text-overflow: ellipsis; white-space: nowrap; font-size: .55rem; }
.cancelled-booking-card i { padding: 4px 7px; border-radius: 999px; background: #542d31; color: #ffb8b8; font-size: .55rem; font-style: normal; font-weight: 800; }
.cancelled-booking-card:hover { border-color: #7c474b; background: #2b2022; }


/* Version 7.2.9 — iPad-safe scrolling for non-service pages
   Safari added-to-Home-Screen can fail to scroll the document body when fixed/sticky
   navigation is present. Use the admin main column as the single vertical scroll root. */
:root { --dp-admin-height: 100dvh; }
html:has(body.admin-scroll-page),
body.admin-scroll-page {
    width: 100%;
    height: var(--dp-admin-height, 100dvh) !important;
    min-height: 0 !important;
    max-height: var(--dp-admin-height, 100dvh) !important;
    overflow: hidden !important;
    overscroll-behavior: none;
}
body.admin-scroll-page .admin-layout {
    width: 100%;
    height: var(--dp-admin-height, 100dvh) !important;
    min-height: 0 !important;
    max-height: var(--dp-admin-height, 100dvh) !important;
    overflow: hidden !important;
}
body.admin-scroll-page .admin-main {
    min-width: 0;
    min-height: 0 !important;
    height: var(--dp-admin-height, 100dvh) !important;
    max-height: var(--dp-admin-height, 100dvh) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-gutter: stable;
}
body.admin-scroll-page .admin-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
}
body.admin-scroll-page .admin-content {
    width: 100%;
    height: auto !important;
    min-height: calc(var(--dp-admin-height, 100dvh) - 102px) !important;
    max-height: none !important;
    overflow: visible !important;
    padding-bottom: max(110px, calc(72px + env(safe-area-inset-bottom)));
    touch-action: pan-y;
}
body.admin-scroll-page .panel,
body.admin-scroll-page .content-card,
body.admin-scroll-page form,
body.admin-scroll-page .settings-grid,
body.admin-scroll-page .report-grid,
body.admin-scroll-page .message-settings-grid {
    max-height: none !important;
    touch-action: pan-y;
}
body.admin-scroll-page .admin-table-wrap,
body.admin-scroll-page .table-scroll {
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
}
body.admin-scroll-page.modal-open .admin-main,
body.admin-scroll-page.drawer-open .admin-main {
    overflow: hidden !important;
    touch-action: none;
}
@media (max-width: 1180px) {
    body.admin-scroll-page .admin-main { width: 100%; }
    body.admin-scroll-page .admin-content {
        min-height: calc(var(--dp-admin-height, 100dvh) - 78px) !important;
        padding: 14px 14px max(120px, calc(78px + env(safe-area-inset-bottom)));
    }
    body.admin-scroll-page .admin-sidebar {
        height: var(--dp-admin-height, 100dvh);
        max-height: var(--dp-admin-height, 100dvh);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Version 7.3.0: capacity-based online availability */
.capacity-summary {
    align-content: start;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f6fbf8;
}
.capacity-summary strong {
    display: block;
    font-size: 1.25rem;
    color: #1f6b48;
}

/* Empire33 super-admin permanent deletion */
.button-danger { background: #8d201b; color: #fff; border-color: #8d201b; box-shadow: 0 10px 20px rgba(141,32,27,.18); }
.button-danger:hover { background: #6f1713; border-color: #6f1713; }
.platform-danger-zone { padding: 22px; border: 1px solid #edc8c4; border-radius: 16px; background: #fff8f7; }
.platform-danger-zone h2 { color: #7e2d28; }
.platform-danger-zone code { padding: 2px 6px; border-radius: 5px; background: #f5e3e1; color: #7e2d28; }


/* Version 1.2.0 — phone day-book mode
   Phones use a booking-first service view. The floor plan remains unchanged on tablets,
   iPads and desktop screens. */
@media (max-width: 760px), (max-height: 520px) and (pointer: coarse) {
    body.foh-app-page.mobile-daybook-mode {
        height: var(--dp-app-height, 100dvh);
        overflow: hidden;
    }
    .mobile-daybook-mode .foh-app-shell {
        height: var(--dp-app-height, 100dvh);
        grid-template-rows: 52px minmax(0, 1fr);
    }
    .mobile-daybook-mode .foh-appbar {
        min-height: 52px;
        padding-block: 5px;
    }
    .mobile-daybook-mode .foh-brand-block span,
    .mobile-daybook-mode .foh-manager-button span,
    .mobile-daybook-mode .foh-staff-selector > span { display: none; }
    .mobile-daybook-mode .foh-brand-block { display: block; min-width: 0; }
    .mobile-daybook-mode .foh-brand-block strong {
        display: block;
        max-width: 32vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: .74rem;
    }
    .mobile-daybook-mode .foh-staff-selector select {
        width: min(132px, 34vw);
        height: 36px;
        font-size: 16px;
    }
    .mobile-daybook-mode .foh-app-main {
        min-height: 0;
        padding: 5px;
        gap: 5px;
        overflow: hidden;
    }
    .mobile-daybook-mode .service-toolbar-v3 {
        min-height: 83px !important;
        padding: 5px !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: 36px 36px;
        grid-template-areas: "date" "actions" !important;
        gap: 5px !important;
    }
    .mobile-daybook-mode .date-nav {
        grid-area: date !important;
        grid-template-columns: 36px minmax(0, 1fr) 36px auto !important;
        gap: 4px;
    }
    .mobile-daybook-mode .date-nav .icon-button,
    .mobile-daybook-mode .date-picker-label,
    .mobile-daybook-mode .today-jump {
        height: 36px;
        min-height: 36px;
    }
    .mobile-daybook-mode .date-picker-label strong { font-size: .72rem; }
    .mobile-daybook-mode .date-label-long { display: none; }
    .mobile-daybook-mode .date-label-short { display: inline; }
    .mobile-daybook-mode .today-jump {
        display: inline-flex !important;
        padding-inline: 8px;
        font-size: .6rem;
    }
    .mobile-daybook-mode .service-view-switch { display: none !important; }
    .mobile-daybook-mode .service-actions {
        grid-area: actions !important;
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 5px;
    }
    .mobile-daybook-mode .service-actions .tablet-rail-toggle { display: none !important; }
    .mobile-daybook-mode .service-actions .button {
        min-height: 36px;
        height: 36px;
        padding-inline: 5px;
        font-size: .63rem;
    }
    .mobile-daybook-mode .action-label-long { display: inline; }
    .mobile-daybook-mode .action-label-short { display: none; }

    .mobile-daybook-mode .service-kpi-strip {
        height: 35px;
        flex-basis: 35px;
        grid-template-columns: 1.35fr repeat(4, minmax(0, .72fr));
        gap: 4px;
    }
    .mobile-daybook-mode .service-kpi-strip > div {
        height: 35px;
        min-width: 0;
        padding: 3px 5px;
    }
    .mobile-daybook-mode .service-kpi-strip strong { font-size: .82rem; }
    .mobile-daybook-mode .service-kpi-strip span,
    .mobile-daybook-mode .service-kpi-strip b { display: none !important; }
    .mobile-daybook-mode .service-kpi-strip > div::after {
        color: var(--foh-muted);
        font-size: .46rem;
        font-weight: 750;
        white-space: nowrap;
    }
    .mobile-daybook-mode .service-kpi-strip > div:nth-child(1)::after { content: "Booked"; }
    .mobile-daybook-mode .service-kpi-strip > div:nth-child(2)::after { content: "Wait"; }
    .mobile-daybook-mode .service-kpi-strip > div:nth-child(3)::after { content: "No table"; }
    .mobile-daybook-mode .service-kpi-strip > div:nth-child(4)::after { content: "Late"; }
    .mobile-daybook-mode .service-kpi-strip > div:nth-child(5)::after { content: "Due"; }

    .mobile-daybook-mode .host-stand {
        min-width: 0;
        min-height: 0;
        flex: 1 1 auto;
        display: block !important;
        overflow: hidden;
    }
    .mobile-daybook-mode .service-stage { display: none !important; }
    .mobile-daybook-mode .reservation-rail {
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        max-height: none !important;
        transform: none !important;
        border-radius: 11px !important;
    }
    .mobile-daybook-mode .reservation-rail-scrim,
    .mobile-daybook-mode .rail-close { display: none !important; }
    .mobile-daybook-mode .rail-header {
        min-height: 44px;
        display: flex !important;
        padding: 8px 10px 7px;
    }
    .mobile-daybook-mode .rail-header .eyebrow { display: block; font-size: .48rem; }
    .mobile-daybook-mode .rail-header h2 { font-size: .95rem; }
    .mobile-daybook-mode .rail-tabs {
        flex: 0 0 auto;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .mobile-daybook-mode .rail-tabs::-webkit-scrollbar { display: none; }
    .mobile-daybook-mode .rail-tabs button {
        flex: 1 0 auto;
        min-width: 92px;
        height: 38px;
        min-height: 38px;
        padding-inline: 8px;
    }
    .mobile-daybook-mode .rail-tools {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 5px;
        padding: 7px;
    }
    .mobile-daybook-mode .service-search { height: 38px; }
    .mobile-daybook-mode .service-search input { font-size: 16px; }
    .mobile-daybook-mode .rail-filters {
        margin: 0;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        overflow: visible;
    }
    .mobile-daybook-mode .rail-filters button {
        min-width: 0;
        min-height: 31px;
        padding-inline: 3px;
        font-size: .57rem;
    }
    .mobile-daybook-mode .reservation-card-list,
    .mobile-daybook-mode .waitlist-rail,
    .mobile-daybook-mode .cancelled-booking-list,
    .mobile-daybook-mode .mobile-finished-booking-list {
        min-height: 0;
        flex: 1;
        display: block !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        padding: 6px;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        background: #161920;
    }
    .mobile-daybook-mode .reservation-card {
        width: 100%;
        min-height: 94px;
        height: auto !important;
        margin: 0 0 6px;
        padding: 9px 8px;
        grid-template-columns: 63px minmax(0, 1fr) 58px !important;
        grid-auto-flow: row !important;
        gap: 8px;
        border: 1px solid #2f3540;
        border-radius: 11px;
        background: #20242c;
    }
    .mobile-daybook-mode .reservation-card:active { background: #292e37; }
    .mobile-daybook-mode .reservation-card-time {
        min-width: 0;
        padding-right: 7px;
        border-right: 1px solid #353b47;
    }
    .mobile-daybook-mode .reservation-card-time strong { font-size: .93rem; }
    .mobile-daybook-mode .reservation-card-time span,
    .mobile-daybook-mode .reservation-card-time small { font-size: .58rem; }
    .mobile-daybook-mode .reservation-name-row strong {
        font-size: .83rem;
        line-height: 1.25;
        white-space: normal;
    }
    .mobile-daybook-mode .reservation-table-label {
        margin-top: 3px;
        color: #b7bec9;
        font-size: .61rem;
        white-space: normal;
    }
    .mobile-daybook-mode .reservation-signals {
        max-height: none;
        margin-top: 5px;
    }
    .mobile-daybook-mode .reservation-signals span { font-size: .51rem; }
    .mobile-daybook-mode .reservation-drag-handle { display: none !important; }
    .mobile-daybook-mode .card-open {
        width: 56px;
        height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        align-self: center;
        padding: 0 7px;
        border: 1px solid #424a57;
        border-radius: 8px;
        background: #2c323c;
        color: #fff;
        font-size: .61rem;
        font-weight: 800;
    }
    .mobile-daybook-mode .mobile-daybook-contact {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 4px 8px;
        margin-top: 6px;
        color: #98a1ae;
        font-size: .55rem;
    }
    .mobile-daybook-mode .mobile-daybook-contact a {
        color: #cbd7e8;
        text-decoration: none;
    }
    .mobile-daybook-mode .mobile-daybook-status {
        display: inline-flex;
        align-items: center;
        min-height: 20px;
        padding: 2px 6px;
        border-radius: 999px;
        background: #313743;
        color: #e4e7ec;
        font-size: .5rem;
        font-weight: 800;
    }
    .mobile-daybook-mode .mobile-daybook-status.status-arrived { background: #5a3b1f; color: #ffd39b; }
    .mobile-daybook-mode .mobile-daybook-status.status-seated { background: #49365b; color: #e9d4ff; }
    .mobile-daybook-mode .mobile-daybook-status.status-confirmed { background: #1d4b39; color: #a9e6ca; }
    .mobile-daybook-mode .mobile-daybook-status.status-booked { background: #243e58; color: #b9d9f7; }

    .mobile-daybook-mode .cancelled-booking-card,
    .mobile-daybook-mode .mobile-finished-card {
        min-height: 70px;
        grid-template-columns: 62px minmax(0, 1fr) auto;
        padding: 10px;
        text-decoration: none;
    }
    .mobile-daybook-mode .mobile-finished-card {
        width: 100%;
        display: grid;
        gap: 9px;
        align-items: center;
        margin-bottom: 6px;
        border: 1px solid #39404a;
        border-radius: 9px;
        background: #20252d;
        color: #f4f5f7;
    }
    .mobile-daybook-mode .mobile-finished-card span { min-width: 0; }
    .mobile-daybook-mode .mobile-finished-card strong,
    .mobile-daybook-mode .mobile-finished-card small { display: block; }
    .mobile-daybook-mode .mobile-finished-card strong {
        overflow: hidden;
        color: #fff;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: .72rem;
    }
    .mobile-daybook-mode .mobile-finished-card small {
        overflow: hidden;
        color: #aeb5c0;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: .55rem;
    }
    .mobile-daybook-mode .mobile-finished-card i {
        padding: 4px 7px;
        border-radius: 999px;
        background: #2f3742;
        color: #d6dbe3;
        font-size: .52rem;
        font-style: normal;
        font-weight: 800;
    }
    .mobile-daybook-mode .mobile-finished-card.status-no_show {
        border-color: #684144;
        background: #291f21;
    }
    .mobile-daybook-mode .mobile-finished-card.status-no_show i {
        background: #583236;
        color: #ffc0c0;
    }
    .mobile-daybook-mode .rail-empty { padding-block: 28px; }

    .mobile-daybook-mode .booking-workspace-card {
        width: 100% !important;
        max-width: none !important;
    }
    .mobile-daybook-mode .booking-drawer-header {
        padding: 12px 10px;
    }
    .mobile-daybook-mode .booking-drawer-header h2 { font-size: 1.25rem; }
    .mobile-daybook-mode .drawer-quick-actions button { min-width: 82px; }
}


/* Version 1.2.1 — mobile day-book natural page scrolling
   Use the document as the phone scroll container instead of a nested flex panel.
   This is more reliable on iOS Safari and Android browsers. */
@media (max-width: 760px), (max-height: 520px) and (pointer: coarse) {
    html {
        height: auto !important;
        min-height: 100%;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    body.foh-app-page.mobile-daybook-mode {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        min-height: var(--dp-app-height, 100dvh) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior-y: auto !important;
        touch-action: pan-y !important;
        -webkit-overflow-scrolling: touch;
    }
    .mobile-daybook-mode .foh-app-shell {
        height: auto !important;
        min-height: var(--dp-app-height, 100dvh) !important;
        grid-template-rows: auto auto !important;
        overflow: visible !important;
    }
    .mobile-daybook-mode .foh-appbar {
        position: sticky;
        top: 0;
        z-index: 80;
    }
    .mobile-daybook-mode .foh-app-main {
        min-height: 0 !important;
        height: auto !important;
        overflow: visible !important;
    }
    .mobile-daybook-mode .host-stand {
        min-height: 0 !important;
        height: auto !important;
        overflow: visible !important;
    }
    .mobile-daybook-mode .reservation-rail {
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    .mobile-daybook-mode .reservation-card-list,
    .mobile-daybook-mode .waitlist-rail,
    .mobile-daybook-mode .cancelled-booking-list,
    .mobile-daybook-mode .mobile-finished-booking-list {
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
        flex: none !important;
        overflow: visible !important;
        overscroll-behavior: auto !important;
        touch-action: pan-y !important;
    }
    .mobile-daybook-mode .booking-workspace-drawer,
    .mobile-daybook-mode .booking-workspace-card {
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }
}


/* Version 1.2.2 — phone day-book tab visibility + side-menu tidy-up */
@media (max-width: 760px), (max-height: 520px) and (pointer: coarse) {
    /* Only show the currently active rail panel. The 1.2.x phone layout forced every panel
       to display:block, which caused cancelled/finished lists to appear underneath bookings. */
    .mobile-daybook-mode .reservation-card-list[hidden],
    .mobile-daybook-mode .waitlist-rail[hidden],
    .mobile-daybook-mode .cancelled-booking-list[hidden],
    .mobile-daybook-mode .mobile-finished-booking-list[hidden] {
        display: none !important;
    }

    /* Make the menu feel like the primary layer on phones rather than leaving the day-book
       visually fighting for space behind it. */
    .mobile-daybook-mode .foh-menu-drawer {
        width: min(390px, calc(100vw - 12px));
        max-width: calc(100vw - 12px);
        z-index: 92;
    }
    .mobile-daybook-mode .foh-menu-scrim {
        z-index: 91;
        background: rgba(3,5,8,.82);
        backdrop-filter: blur(4px);
    }
    .mobile-daybook-mode.foh-menu-open {
        height: 100dvh !important;
        overflow: hidden !important;
    }
    .mobile-daybook-mode.foh-menu-open .foh-app-main {
        visibility: hidden;
        pointer-events: none;
    }
    .mobile-daybook-mode.foh-menu-open .foh-menu-drawer,
    .mobile-daybook-mode.foh-menu-open .foh-menu-scrim,
    .mobile-daybook-mode.foh-menu-open .foh-appbar {
        visibility: visible;
        pointer-events: auto;
    }
}


/* Version 1.2.3 — keep mobile booking forms above the day-book */
@media (max-width: 760px), (max-height: 520px) and (pointer: coarse) {
    .mobile-daybook-mode .modal {
        z-index: 2000 !important;
    }
    .mobile-daybook-mode .modal-backdrop {
        z-index: 0;
    }
    .mobile-daybook-mode .modal-card {
        position: relative;
        z-index: 1;
    }

    /* The modal lives inside .foh-app-main, so hide only the service dashboard behind it. */
    body.mobile-daybook-mode.modal-open .service-toolbar-v3,
    body.mobile-daybook-mode.modal-open .service-kpi-strip,
    body.mobile-daybook-mode.modal-open .host-stand {
        display: none !important;
    }

    body.mobile-daybook-mode.modal-open .foh-app-main {
        display: block !important;
        padding: 0 !important;
    }

    body.mobile-daybook-mode.modal-open .modal:not([hidden]) {
        display: block !important;
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
        overflow: hidden !important;
    }

    body.mobile-daybook-mode.modal-open .modal-card {
        width: 100% !important;
        min-height: 100dvh !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        border-radius: 0 !important;
        padding-bottom: max(28px, env(safe-area-inset-bottom)) !important;
    }
}


/* Version 1.2.4 — covers, date picker and monthly booking calendar */
.date-picker-label input {
    z-index: 2;
}
.date-picker-label strong {
    position: relative;
    z-index: 1;
    pointer-events: none;
}
.foh-app-page .date-nav {
    grid-template-columns: 34px minmax(0,1fr) 34px 34px auto;
}
.foh-app-page .service-calendar-trigger {
    font-size: 1rem;
    font-weight: 900;
}
.service-calendar-view-button {
    min-width: 74px !important;
}

/* Keep the total cover count visible beside the booking total on touch devices. */
@media (max-width: 1024px), (pointer: coarse) {
    .foh-app-page .service-volume-kpi span,
    .foh-app-page .service-volume-kpi b {
        display: inline-flex !important;
        align-items: center;
        min-width: 0;
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
    }
    .foh-app-page .service-volume-kpi b {
        margin-left: 5px;
        color: #c4cad4;
        font-size: .55rem;
    }
}
@media (max-width: 760px), (max-height: 520px) and (pointer: coarse) {
    .mobile-daybook-mode .date-nav {
        grid-template-columns: 36px minmax(0,1fr) 36px 36px auto !important;
    }
    .mobile-daybook-mode .service-volume-kpi span {
        display: none !important;
    }
    .mobile-daybook-mode .service-volume-kpi b {
        display: inline-flex !important;
        margin-left: 4px !important;
        color: #c4cad4 !important;
        font-size: .51rem !important;
    }
}
@media (min-width: 761px) and (max-width: 819px) and (orientation: portrait) {
    .foh-app-page .date-nav {
        grid-template-columns: 32px minmax(0,1fr) 32px 32px auto;
    }
}

body.service-calendar-open {
    overflow: hidden !important;
}
.service-calendar-modal {
    position: fixed;
    inset: 0;
    z-index: 2600;
    display: grid;
    place-items: center;
    padding: 18px;
}
.service-calendar-modal[hidden] { display: none !important; }
.service-calendar-scrim {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(3,5,8,.82);
    backdrop-filter: blur(5px);
}
.service-calendar-card {
    position: relative;
    width: min(1280px, 96vw);
    max-height: min(920px, 94dvh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #383e49;
    border-radius: 18px;
    background: #171a21;
    color: #f5f6f8;
    box-shadow: 0 30px 90px rgba(0,0,0,.48);
}
.service-calendar-header,
.service-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.service-calendar-header {
    padding: 16px 18px 12px;
    border-bottom: 1px solid #343a45;
}
.service-calendar-header span {
    color: #dc554d;
    font-size: .62rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.service-calendar-header h2 {
    margin: 3px 0 0;
    font-size: 1.35rem;
}
.service-calendar-header-actions { display: flex; gap: 8px; }
.service-calendar-header-actions button,
.service-calendar-nav button {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #3b424e;
    border-radius: 9px;
    background: #242932;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}
.service-calendar-header-actions button:last-child {
    width: 40px;
    padding: 0;
    font-size: 1.25rem;
}
.service-calendar-nav {
    padding: 10px 18px;
    background: #12151b;
    border-bottom: 1px solid #343a45;
}
.service-calendar-nav strong { font-size: 1rem; }
.service-calendar-scroll {
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}
.service-calendar-weekdays,
.service-calendar-grid {
    min-width: 860px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0,1fr));
}
.service-calendar-weekdays {
    position: sticky;
    top: 0;
    z-index: 4;
    background: #20242c;
    border-bottom: 1px solid #3a404b;
}
.service-calendar-weekdays span {
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-right: 1px solid #3a404b;
    color: #d8dce3;
    font-size: .72rem;
    font-weight: 800;
}
.service-calendar-day {
    min-height: 145px;
    padding: 9px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-right: 1px solid #3a404b;
    border-bottom: 1px solid #3a404b;
    background: #1d2027;
    color: #f5f6f8;
    text-decoration: none;
}
.service-calendar-day:hover { background: #252a33; }
.service-calendar-day.outside-month { opacity: .42; }
.service-calendar-day.today { box-shadow: inset 0 0 0 2px #e7e9ed; }
.service-calendar-day.selected-day { background: #292d35; box-shadow: inset 0 0 0 2px #dc554d; }
.service-calendar-day > strong {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 1rem;
}
.service-calendar-day.today > strong { background: #f4f5f7; color: #16191f; }
.service-calendar-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.service-calendar-badges span {
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #fff;
    font-size: .61rem;
    font-style: normal;
}
.service-calendar-badges span.bookings { background: #2f9961; }
.service-calendar-badges span.covers { background: #61646b; }
.service-calendar-badges b,
.service-calendar-badges i,
.service-calendar-badges em { font-style: normal; }
.service-calendar-badges i { font-weight: 900; }
.service-calendar-previews { display: grid; gap: 3px; }
.service-calendar-booking-preview {
    min-width: 0;
    display: grid;
    grid-template-columns: 46px minmax(0,1fr) auto;
    align-items: center;
    gap: 5px;
    color: #cbd0d9;
    font-size: .56rem;
}
.service-calendar-booking-preview b { color: #fff; }
.service-calendar-booking-preview i {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: normal;
}
.service-calendar-booking-preview em {
    color: #9da5b2;
    font-style: normal;
}
.service-calendar-more { color: #9da5b2; font-size: .55rem; }
.service-calendar-loading {
    min-height: 54px;
    display: grid;
    place-items: center;
    padding: 12px;
    color: #b7bec9;
}
.service-calendar-loading[hidden] { display: none !important; }

@media (max-width: 760px) {
    .service-calendar-modal { padding: 0; }
    .service-calendar-card {
        width: 100vw;
        height: 100dvh;
        max-height: none;
        border: 0;
        border-radius: 0;
    }
    .service-calendar-header { padding-top: max(12px, env(safe-area-inset-top)); }
    .service-calendar-weekdays,
    .service-calendar-grid { min-width: 700px; }
    .service-calendar-day { min-height: 118px; padding: 7px; }
    .service-calendar-badges em { display: none; }
    .service-calendar-booking-preview { display: none; }
    .service-calendar-more { display: none; }
}


/* Version 1.2.5 — selected reservation spotlight */
.foh-app-page .reservation-card,
.foh-app-page .floor-table {
    transition:
        opacity .16s ease,
        filter .16s ease,
        transform .16s ease,
        border-color .16s ease,
        box-shadow .16s ease,
        background-color .16s ease;
}

.foh-app-page.booking-spotlight-active .reservation-card.booking-spotlight-dimmed {
    opacity: .30;
    filter: grayscale(.18) saturate(.42);
}

.foh-app-page.booking-spotlight-active .reservation-card.selected {
    position: relative;
    z-index: 3;
    opacity: 1;
    filter: none;
    transform: translateX(3px) scale(1.012);
    border-color: #ff665d !important;
    background: #303640 !important;
    box-shadow:
        0 0 0 2px rgba(255,102,93,.30),
        0 12px 26px rgba(0,0,0,.25) !important;
}

.foh-app-page.floor-booking-spotlight-active .floor-table.booking-spotlight-dimmed {
    opacity: .24;
    filter: grayscale(.20) saturate(.38);
}

.foh-app-page.floor-booking-spotlight-active .floor-table.booking-spotlight-focused {
    z-index: 12;
    opacity: 1;
    filter: none;
    transform:
        rotate(var(--table-rotation, 0deg))
        scale(1.06);
    border-color: #ff665d !important;
    box-shadow:
        0 0 0 5px rgba(255,102,93,.25),
        0 0 0 10px rgba(255,102,93,.10),
        0 18px 34px rgba(0,0,0,.32) !important;
}

.foh-app-page.floor-booking-spotlight-active
.floor-table.booking-spotlight-focused
.floor-table-booking {
    background: #b92f28;
    box-shadow: 0 5px 16px rgba(0,0,0,.28);
}

.foh-app-page.floor-booking-spotlight-active
.floor-table.booking-spotlight-focused
.floor-table-booking strong,
.foh-app-page.floor-booking-spotlight-active
.floor-table.booking-spotlight-focused
.floor-table-booking span {
    color: #fff !important;
}

/* The phone day-book has no floor, so retain the normal full-strength list. */
@media (max-width: 760px), (max-height: 520px) and (pointer: coarse) {
    .mobile-daybook-mode .reservation-card.booking-spotlight-dimmed {
        opacity: 1 !important;
        filter: none !important;
    }
}
