/* =============================================================================
   assets/sg-base.css — SLEEPLESS GROUNDS shared stylesheet
   =============================================================================
   Task 4. Shared by reserve.html now, admin.html later (Task 5).

   This is a LIFT, not a rewrite: the :root tokens, reset, hamburger/nav-overlay,
   fixed header and footer rules, and every component class the reserve.html
   component-reuse table names, are copied verbatim (or near-verbatim) from
   index.html's inline <style> block — see the line-number references in each
   section comment below. index.html's own <style> block is left completely
   unchanged (Task 4 brief: "this task never edits index.html"), so there is
   now intentional duplication between the two. That duplication is a known,
   already-flagged follow-up (see the plan's "Known follow-up" section) —
   reconciling index.html to link this sheet instead of its inline styles is
   a separate, riskier change than this task's scope.

   New, non-lifted sections (booking-wizard-specific components with no
   precedent in index.html: date strip, time grid, terminal form fields,
   step wizard chrome, buttons) are marked NEW below.
============================================================================= */

/* -----------------------------------------------------------------------------
   :root tokens — lifted from index.html:47-59
----------------------------------------------------------------------------- */
:root {
    --bg-primary: #0a0a0a;
    --bg-surface: #121212;
    --bg-elevated: #1A1A1A;
    --text-primary: #E0E0E0;
    --text-secondary: #888888;
    --accent: #FFC107;
    --accent-hover: #ffb300;
    --grid-line: rgba(255, 255, 255, 0.08);
    --border-accent: 1px solid #FFC107;
    --font-display: 'Oswald', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* -----------------------------------------------------------------------------
   Reset & base — lifted from index.html:40-74 (reset), :61-71 (html/body)
----------------------------------------------------------------------------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
    /* Subtle noise texture via SVG data-uri — identical to index.html */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--text-primary);
}

/* -----------------------------------------------------------------------------
   Hamburger menu + fullscreen nav overlay — lifted from index.html:122-240
   Judgment call: index.html animates .nav-overlay open/close with a GSAP
   timeline (autoAlpha + staggered .nav-link/.nav-social-link tweens) that
   depends on the GSAP CDN bundle already loaded on that page. reserve.html
   is a transactional/conversion page — pulling in GSAP + ScrollTrigger just
   for a nav toggle is an external-script dependency (and a CDN-availability
   risk) this page doesn't need. sg-base.css instead makes .nav-overlay a
   plain CSS opacity/visibility transition (see the "Nav overlay: CSS-driven
   open/close" block below); reserve.js toggles a `.is-open` class rather
   than calling gsap.timeline(). Visual result and markup are unchanged.
----------------------------------------------------------------------------- */
.hamburger-menu {
    position: fixed;
    top: 0.75rem;
    left: 2rem;
    cursor: pointer;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
}

.hamburger-line {
    width: 30px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

@media (max-width: 480px) {
    .hamburger-menu {
        left: 1rem;
    }
}

.hamburger-menu.active .line-1 { transform: translateY(8px) rotate(45deg); background-color: var(--accent); }
.hamburger-menu.active .line-2 { opacity: 0; }
.hamburger-menu.active .line-3 { transform: translateY(-8px) rotate(-45deg); background-color: var(--accent); }

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-primary);
    z-index: 1500;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    background-image:
        linear-gradient(rgba(255, 193, 7, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 193, 7, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    /* NEW (see judgment-call note above): CSS-driven open/close, no GSAP. */
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.nav-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--text-primary);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link::before {
    content: attr(data-num);
    position: absolute;
    left: -5.5rem;
    top: 0.5rem;
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent);
    opacity: 0;
    transform: translateX(10px);
    white-space: nowrap;
    transition: all 0.3s ease;
}

.nav-link:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.nav-socials {
    position: absolute;
    bottom: 3rem;
    display: flex;
    gap: 2rem;
}

.nav-social-link {
    font-family: var(--font-mono);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s;
}

.nav-social-link:hover {
    color: var(--accent);
}

/* -----------------------------------------------------------------------------
   Fixed header — lifted from index.html:1194-1252
   Judgment call: on index.html this bar is invisible until GSAP/ScrollTrigger
   fades it in as the hero brand scrolls past. reserve.html has no hero to
   scroll past, so reserve.js simply adds `.visible` on load and leaves it
   visible throughout — same class, same CSS, no scroll-linked JS needed.
----------------------------------------------------------------------------- */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 2rem;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--grid-line);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.fixed-header.visible {
    opacity: 1;
    pointer-events: auto;
}

.fixed-header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    /* Lets this block shrink below its content's natural width instead of
       forcing the whole .fixed-header row to overflow -- flex items
       default to min-width:auto, which ignores flex-shrink for any child
       (like .header-title, nowrap) whose content sets the floor. Paired
       with .header-title's own overflow/ellipsis below, it truncates
       gracefully instead of pushing .fixed-header-actions off-screen
       (clipped silently by body's overflow-x:hidden). */
    min-width: 0;
    overflow: hidden;
}

.fixed-header .header-logo {
    width: 36px;
    height: auto;
    opacity: 0.9;
    filter: brightness(1.1);
    flex-shrink: 0;
}

.fixed-header .header-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 480px) {
    .fixed-header .header-logo {
        width: 28px;
    }

    .fixed-header .header-title {
        font-size: 1rem;
    }

    /* Give the sign-out control more breathing room on the narrowest
       screens by capping the email display tighter -- it already
       truncates with an ellipsis (see .header-user), so shortening it
       just trades a longer email preview for a guaranteed-visible button. */
    .header-user {
        max-width: 7rem;
    }

    .fixed-header {
        padding: 0.625rem 1rem;
    }
}

/* -----------------------------------------------------------------------------
   Footer — lifted from index.html:953-1039 (desktop), :1140-1165 (mobile)
----------------------------------------------------------------------------- */
.site-footer {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-col:last-child {
    text-align: right;
    justify-content: flex-end;
}

.footer-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.footer-value {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.4rem 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.footer-links a:hover {
    border-bottom-color: var(--accent);
    color: var(--text-primary);
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--grid-line);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom span {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
}

.footer-bottom a {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .site-footer {
        grid-template-columns: 1fr;
    }

    .footer-col:last-child {
        text-align: left;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* -----------------------------------------------------------------------------
   Section header ("// NN — LABEL") — lifted from index.html:540-559
----------------------------------------------------------------------------- */
.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-header-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.section-header-line {
    flex: 1;
    height: 1px;
    background: var(--grid-line);
}

/* -----------------------------------------------------------------------------
   Terminal-receipt window chrome — lifted from index.html:562-621
----------------------------------------------------------------------------- */
.menu-terminal {
    position: relative;
    border: var(--border-accent);
    background: var(--bg-surface);
    max-width: 640px;
    margin: 0 auto;
    transform-origin: top center;
}

.menu-titlebar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--grid-line);
}

.menu-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--grid-line);
}

.menu-dot.on {
    background: var(--accent);
}

.menu-mode {
    margin-left: auto;
    display: flex;
    align-items: center;
    color: var(--accent);
}

.menu-mode svg {
    display: block;
}

.menu-fname {
    margin-left: 0.7rem;
    color: var(--text-secondary);
    font-size: 0.68rem;
    letter-spacing: 0.05em;
}

.menu-body {
    padding: 2rem clamp(1rem, 4vw, 2.4rem);
    font-family: var(--font-mono);
}

.menu-shop {
    text-align: center;
    margin-bottom: 1.5rem;
}

.menu-shop-name {
    font-family: var(--font-display);
    letter-spacing: 0.2em;
    font-size: 1rem;
    text-transform: uppercase;
}

.menu-shop-tag {
    color: var(--text-secondary);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 0.2rem;
}

.menu-rule {
    border-top: 1px dashed var(--grid-line);
    margin: 1.1rem 0;
}

/* -----------------------------------------------------------------------------
   .menu-opt segmented control — lifted from index.html:664-692
   Reused for the AREA (zone) picker per the component-reuse table.
----------------------------------------------------------------------------- */
.menu-select {
    text-align: center;
    margin-bottom: 1.6rem;
    font-size: 0.78rem;
}

.menu-select-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.menu-opt {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    line-height: normal;
    cursor: pointer;
    color: var(--text-secondary);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.35rem 0.9rem;
    border: 1px solid var(--grid-line);
    border-radius: 0;
    background: transparent;
    font-family: var(--font-mono);
    font-size: inherit;
    transition: color 0.15s ease, background 0.15s ease;
}
/* Fix (post-review): index.html's original lifted rule was
   `.menu-opt:first-child { border-right: none; }`, which only de-doubles
   the seam for a *two*-option control. A follow-up
   `.menu-opt:not(:first-child) { border-left: none; }` was added for
   reserve.html's three-option AREA step, but that combination strips
   *both* sides of the seam between options 1 and 2 (button1 loses its
   right border, button2 loses its left border) — an invisible 0px divider
   where there should be a 1px line — and, if index.html itself ever links
   this sheet, silently changes the plain two-option case as well (button2
   would newly lose a left border it never had removed before).
   `:not(:last-child) { border-right: none }` is the correct generalization:
   every button except the last drops its own right border, so each
   adjacent pair shares exactly one border (the left one, contributed by
   the second button) — correct at N=2 (matches index.html's original
   visual result) and at any N without special-casing. */
.menu-opt:not(:last-child) { border-right: none; }
.menu-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.menu-opt.active {
    color: var(--bg-primary);
    background: var(--accent);
    border-color: var(--accent);
    font-weight: 700;
    box-shadow: 0 0 10px 1px rgba(255, 193, 7, 0.55), 0 0 22px 4px rgba(255, 193, 7, 0.25);
}
.menu-opt:disabled,
.menu-opt[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.4;
    text-decoration: line-through;
}

.menu-panel { display: none; }
.menu-panel.active { display: block; }

/* Zone (location) options: unlike the day-toggle strip (admin.html's
   #s-open-days), these labels vary a lot in length ("Main Floor · 12 left"
   vs "Bar · 3 left"), so each button's un-set width just follows its own
   text. The shared-border "one continuous strip" look above assumes a
   tidy single row -- once mismatched widths wrap onto a second line on a
   narrow screen, the row break lands mid-strip and whichever button ends
   a visual row is still missing the border .menu-opt:not(:last-child)
   stripped from it, so it reads as an unbordered, cut-off shape rather
   than a button. Giving every zone option its own full border plus a
   real gap, in a wrapping flex row, keeps each one looking like a
   complete, properly sized button regardless of label length or row. */
#zone-opts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}
/* Width/style restore every zone button's right edge, including an active
   one -- .active must never lose its border. Color is set separately and
   only for the non-active case, so .menu-opt.active's own border-color
   (the accent) stays uncontested on all four sides instead of being
   overridden by a hardcoded grey right edge. */
#zone-opts .menu-opt:not(:last-child) {
    border-right-width: 1px;
    border-right-style: solid;
}
#zone-opts .menu-opt:not(:last-child):not(.active) {
    border-right-color: var(--grid-line);
}

/* -----------------------------------------------------------------------------
   Receipt lines with dotted leaders — lifted from index.html:716-742
----------------------------------------------------------------------------- */
.menu-row {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
}

.menu-item-name {
    white-space: nowrap;
    text-transform: lowercase;
    color: var(--text-primary);
}

.menu-fill {
    flex: 1;
    border-bottom: 1px dotted var(--grid-line);
    height: 0.6em;
    margin: 0 0.3rem;
}

.menu-price {
    font-variant-numeric: tabular-nums;
    color: var(--accent);
    font-weight: 600;
    white-space: nowrap;
}

/* -----------------------------------------------------------------------------
   Cut-here divider + blinking cursor — lifted from index.html:769-785
----------------------------------------------------------------------------- */
.menu-cut {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.7rem;
    margin: 1.5rem 0;
    letter-spacing: 0.05em;
}

.menu-cursor {
    display: inline-block;
    width: 7px;
    height: 1em;
    background: var(--accent);
    vertical-align: text-bottom;
    animation: menu-cursor-blink 1s steps(1) infinite;
}
@keyframes menu-cursor-blink { 50% { opacity: 0; } }

/* -----------------------------------------------------------------------------
   .brutal-tab — lifted from index.html:891-925
   Reused for the DATE strip per the component-reuse table.
----------------------------------------------------------------------------- */
.brutal-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.brutal-tab {
    padding: 0.8rem 1.5rem;
    background: transparent;
    border: 1px solid var(--grid-line);
    border-bottom: none;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: 0;
}

.brutal-tab:hover {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

.brutal-tab.active {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
    font-weight: 700;
}

.brutal-tab:disabled,
.brutal-tab[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.35;
    text-decoration: line-through;
}
.brutal-tab:disabled:hover,
.brutal-tab[aria-disabled="true"]:hover {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--grid-line);
}

@media (max-width: 768px) {
    .brutal-tabs {
        flex-direction: column;
    }

    .brutal-tab {
        border-bottom: 1px solid var(--grid-line);
    }
}

/* -----------------------------------------------------------------------------
   .fade-in utility — lifted from index.html:1261-1264
   On index.html this starting state is animated to visible by GSAP
   ScrollTrigger. reserve.js has no scroll-linked reveals, so the transition
   here is plain CSS (see .fade-in.is-in below) — same visual language
   (opacity + rise), no GSAP dependency. NEW: the .is-in half of this pair.
----------------------------------------------------------------------------- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.fade-in.is-in {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================================================
   NEW — booking-wizard-specific components (no index.html precedent)
   ============================================================================= */

/* Page shell: fixed-header offset + max-width content column. */
.page-shell {
    min-height: 100vh;
    padding: 6rem 1.25rem 4rem;
}

.reserve-main {
    max-width: 720px;
    margin: 0 auto;
}

.reserve-intro {
    text-align: center;
    margin-bottom: 2rem;
}

.reserve-intro h1 {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: clamp(1.6rem, 5vw, 2.4rem);
    margin-bottom: 0.5rem;
}

.reserve-intro p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Step wizard progress rail: "01 02 03 04 05" dots above the terminal. */
.step-rail {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.step-rail-item {
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--grid-line);
}

.step-rail-item.is-current {
    border-color: var(--accent);
    color: var(--accent);
}

.step-rail-item.is-done {
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

/* Individual wizard step panel. Inactive panels use the `hidden` attribute
   (not display:none via class) so they're removed from the tab order and
   accessibility tree for free. */
.step-panel {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.step-panel.is-entering {
    opacity: 0;
    transform: translateY(8px);
}

.step-title {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    margin-bottom: 1rem;
    text-align: center;
}

.step-help {
    color: var(--text-secondary);
    font-size: 0.7rem;
    text-align: center;
    margin: -0.6rem 0 1.2rem;
}

/* Admin login's Invite-only note is the one .step-help that doesn't follow
   a section header -- it follows the sign-in form (whose last visible
   content is the submit button), so the shared -0.6rem top margin pulls
   it up into the button instead of tucking under a heading. Worst on
   mobile, where the button goes width:100% and .step-help is
   text-align:center, so both texts land on the same centered line. Opt
   this one instance out of the negative margin rather than changing the
   shared rule other .step-help uses correctly rely on. */
.step-help.login-help {
    margin-top: 0.8rem;
}

/* Date strip: horizontal scroller of .brutal-tab.date-tab cards. */
.date-strip {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.date-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    flex: 0 0 auto;
    min-width: 4.4rem;
    padding: 0.6rem 0.4rem;
}

.date-tab-dow {
    font-weight: 700;
}

.date-tab-num {
    font-size: 1.1rem;
    font-variant-numeric: tabular-nums;
}

.date-tab-hours {
    font-size: 0.55rem;
    letter-spacing: 0.05em;
    opacity: 0.8;
    text-transform: none;
}

/* Time grid: buttons with a seat bar + tabular seat count. */
.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: 0.5rem;
}

.time-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.6rem 0.7rem;
    background: transparent;
    border: 1px solid var(--grid-line);
    border-radius: 0;
    color: var(--text-primary);
    font-family: var(--font-mono);
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
}

.time-cell:hover:not(:disabled) {
    border-color: var(--accent);
}

.time-cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.time-cell.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-primary);
}
.time-cell.active .time-cell-bar,
.time-cell.active .time-cell-count { color: var(--bg-primary); }

.time-cell:disabled {
    cursor: not-allowed;
    opacity: 0.35;
    text-decoration: line-through;
}

.time-cell-label {
    font-weight: 700;
    font-size: 0.85rem;
}

.time-cell-bar {
    font-variant-numeric: tabular-nums;
    color: var(--accent);
    letter-spacing: 1px;
}

.time-cell-count {
    font-size: 0.65rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.time-cell-reason {
    font-size: 0.6rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Zone caveat note under the .menu-opt segmented control. */
.zone-caveat {
    border: 1px dashed var(--grid-line);
    padding: 0.7rem 0.9rem;
    margin-top: 1rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
}
.zone-caveat strong { color: var(--accent); }

/* Terminal-style form fields. */
.field {
    margin-bottom: 1.1rem;
}

.field-label {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.field-prefix-wrap {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--grid-line);
    background: var(--bg-elevated);
}

.field-prefix {
    display: flex;
    align-items: center;
    padding: 0 0.6rem;
    color: var(--accent);
    font-family: var(--font-mono);
    user-select: none;
}

.field-input,
.field-textarea {
    flex: 1;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 0.6rem 0.7rem 0.6rem 0;
    border-radius: 0;
}

.field-textarea {
    resize: vertical;
    min-height: 4.5rem;
}

.field-input:focus,
.field-textarea:focus {
    outline: none;
}

.field-prefix-wrap:has(.field-input:focus),
.field-prefix-wrap:has(.field-textarea:focus) {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

/* :has() fallback (Safari <15.4, older Firefox): without this, keyboard
   focus on a form field is otherwise completely invisible in browsers that
   don't support :has() — the brief calls out keyboard tab order explicitly,
   so this can't silently degrade to "no visible focus ring". */
.field-input:focus-visible,
.field-textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.field-error {
    color: #ff6b6b;
    font-size: 0.65rem;
    margin-top: 0.3rem;
    min-height: 1em;
}

.field-hint {
    color: var(--text-secondary);
    font-size: 0.65rem;
    margin-top: 0.3rem;
}

/* Inquiry-mode banner shown in DETAILS when party size exceeds the online max. */
.inquiry-banner {
    border: var(--border-accent);
    background: rgba(255, 193, 7, 0.08);
    padding: 0.8rem 1rem;
    margin-bottom: 1.1rem;
    font-size: 0.72rem;
    color: var(--text-primary);
}
.inquiry-banner strong { color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; }

/* Wizard nav buttons. */
.step-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.6rem;
}

.btn {
    appearance: none;
    -webkit-appearance: none;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.65rem 1.4rem;
    border: 1px solid var(--grid-line);
    border-radius: 0;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-primary {
    border-color: var(--accent);
    color: var(--accent);
}
.btn-primary:hover:not(:disabled) {
    background: var(--accent);
    color: var(--bg-primary);
    box-shadow: 0 0 10px 1px rgba(255, 193, 7, 0.55);
}

.btn-ghost:hover:not(:disabled) {
    border-color: var(--text-primary);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Submission-level error/status banner (409 mid-flow, generic failures). */
.form-status {
    font-size: 0.75rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--grid-line);
    margin-bottom: 1rem;
    display: none;
}
.form-status.is-error {
    display: block;
    border-color: #ff6b6b;
    color: #ff9d9d;
}
.form-status.is-warning {
    display: block;
    border-color: var(--accent);
    color: var(--accent);
}
.form-status.is-loading {
    display: block;
    color: var(--text-secondary);
}

/* Receipt (step 05) extras. */
.receipt-ref {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin: 0.5rem 0 1.2rem;
}

.receipt-save-note {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.4rem;
}

.receipt-cancel-note {
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--grid-line);
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
}

/* -----------------------------------------------------------------------------
   Reduced motion — respected globally. Kills the two CSS keyframe animations
   copied above (menu-cursor blink, and any future ones) plus every
   transition this stylesheet defines. reserve.js additionally reads
   `prefers-reduced-motion` in JS to skip the runFlicker()-style opacity
   flicker entirely (a pure-JS effect, not something a CSS override can
   reach) — see reserve.js's REDUCED_MOTION constant.
----------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 480px) {
    .page-shell {
        padding: 5.5rem 0.75rem 3rem;
    }
    .menu-body {
        padding: 1.5rem 1rem;
    }
    .step-actions {
        flex-direction: column-reverse;
    }
    .step-actions .btn {
        width: 100%;
    }
}

/* =============================================================================
   NEW — admin dashboard components (Task 5, admin.html/admin.js)
   All additive: nothing above this line is modified, so reserve.html's
   rendering is unaffected. Reuses .menu-terminal/.brutal-tabs/.brutal-tab/
   .menu-opt/.field*/.btn*/.form-status/.section-header verbatim (see the
   component-reuse comments inline in admin.html) -- only genuinely new
   shapes (wider content column, data tables, status pills, filter grid,
   header sign-out affordance, blackout-impact warning box) get new rules
   here.
   ============================================================================= */

/* Wider content column than .reserve-main (720px) -- admin views are data
   tables (Upcoming, zones, blackouts), not a narrow conversational wizard. */
.admin-main {
    max-width: 1100px;
    margin: 0 auto;
}

.admin-terminal {
    max-width: 1100px;
}

.login-terminal {
    max-width: 420px;
    margin: 0 auto;
}

.admin-tabs {
    margin-bottom: 1.5rem;
}

.admin-panel {
    margin-top: 0.5rem;
}

/* Fixed header, admin variant: brand block on the left, sign-out control on
   the right (reserve.html's .fixed-header centers a single block -- this is
   an additive modifier class, not a change to that rule). */
.fixed-header.has-actions {
    justify-content: space-between;
}

.fixed-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    /* The sign-out control is the one thing a staff member must always be
       able to see and tap -- never let it get squeezed by the brand block
       above shrinking. */
    flex-shrink: 0;
}

.header-user {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
    white-space: nowrap;
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-small {
    padding: 0.35rem 0.7rem;
    font-size: 0.65rem;
}

.btn-danger {
    border-color: #ff6b6b;
    color: #ff9d9d;
}
.btn-danger:hover:not(:disabled) {
    background: #ff6b6b;
    color: var(--bg-primary);
}

/* Filter/settings field grids (Upcoming filters, Schedule's numeric fields,
   Blackout's date/zone/slot row). */
.admin-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.admin-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
}
.admin-checkbox-row input[type="checkbox"] {
    accent-color: var(--accent);
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.admin-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Data tables (Tonight's per-slot groups, Upcoming, zones editor, blackouts
   list, inquiries). Wrapper scrolls horizontally on narrow screens instead
   of letting the table force the whole page wider -- these have more
   columns than comfortably fit a phone width. */
.admin-table-wrap {
    overflow-x: auto;
    margin-bottom: 1rem;
    border: 1px solid var(--grid-line);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    font-family: var(--font-mono);
}

.admin-table th,
.admin-table td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--grid-line);
    text-align: left;
    white-space: nowrap;
}

.admin-table th {
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.62rem;
    background: var(--bg-elevated);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table td.wrap {
    white-space: normal;
    min-width: 10rem;
}

.admin-table input[type="number"],
.admin-table input[type="text"] {
    width: 100%;
    min-width: 4rem;
    background: var(--bg-elevated);
    border: 1px solid var(--grid-line);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.3rem 0.4rem;
}

.admin-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* Per-slot heading inside the Tonight view. */
.admin-slot-group {
    margin-bottom: 1.5rem;
}

.admin-slot-heading {
    font-family: var(--font-display);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

/* Status pill -- one per booking_status enum value (plus a client-only
   "seated" variant that never touches the database, see admin.js). */
.status-pill {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--grid-line);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.status-pill.is-confirmed { border-color: var(--accent); color: var(--accent); }
.status-pill.is-seated { border-color: var(--text-primary); color: var(--text-primary); }
.status-pill.is-completed { border-color: var(--text-secondary); color: var(--text-secondary); }
.status-pill.is-no_show,
.status-pill.is-cancelled { border-color: #ff6b6b; color: #ff9d9d; }

/* Blackout impact warning -- lists confirmed bookings a new blackout would
   strand, shown before the insert is confirmed (never an automatic cancel). */
.impact-warning {
    border: var(--border-accent);
    background: rgba(255, 193, 7, 0.08);
    padding: 0.8rem 1rem;
    margin: 0.8rem 0;
    font-size: 0.72rem;
}
.impact-warning strong { color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; }
.impact-warning ul {
    margin: 0.5rem 0 0;
    padding-left: 1.1rem;
}
.impact-warning li { margin-bottom: 0.2rem; }

@media (max-width: 480px) {
    .admin-filters {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   NEW — order.html menu-detail + cart components
   =============================================================================
   Menu-detail classes below (.menu-cat-title through .menu-roast-notes) are
   lifted from index.html's inline <style> (index.html:699-828) — same
   "lift, not rewrite" approach this file's header comment describes for its
   other sections. Everything from .order-row down has no precedent in
   index.html — order.html-only cart/checkout components.
============================================================================= */

.menu-cat-title {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.8rem;
    text-align: center;
    margin-bottom: 0.2rem;
}

.menu-cat-note {
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.65rem;
    font-style: italic;
    margin-bottom: 0.9rem;
}

.menu-item-desc {
    color: var(--text-secondary);
    font-size: 0.7rem;
    margin: 0 0 0.7rem 1.1rem;
}
.menu-item-desc::before {
    content: "> ";
    color: var(--grid-line);
}

.menu-item-foot {
    color: var(--text-secondary);
    font-size: 0.65rem;
    margin: -0.4rem 0 0.7rem 1.1rem;
}

.menu-tag {
    color: var(--accent);
}

.menu-icon-spice {
    color: var(--accent);
    vertical-align: -1px;
}

.menu-cursor {
    display: inline-block;
    width: 7px;
    height: 1em;
    background: var(--accent);
    vertical-align: text-bottom;
    animation: menu-cursor-blink 1s steps(1) infinite;
}
@keyframes menu-cursor-blink { 50% { opacity: 0; } }

.menu-total {
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

.menu-spec {
    border: 1px solid var(--grid-line);
    padding: 0.8rem 1rem;
    margin-bottom: 1.1rem;
    font-size: 0.72rem;
}
.menu-spec-title {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.68rem;
    margin-bottom: 0.4rem;
}
.menu-spec-row {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}
.menu-roast-line {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    margin-top: 0.3rem;
}
.menu-roast-dots { color: var(--accent); letter-spacing: 2px; }
.menu-roast-notes { color: var(--text-secondary); font-size: 0.65rem; }

/* Cart controls attached to each order.html item row. */
.order-row {
    padding: 0.5rem 0 0.7rem;
    border-bottom: 1px dashed var(--grid-line);
    margin-bottom: 0.3rem;
}
.order-row:last-child { border-bottom: none; }

.order-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0.5rem 0 0 1.1rem;
    flex-wrap: wrap;
}

.qty-stepper {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.qty-btn {
    appearance: none;
    -webkit-appearance: none;
    width: 1.8rem;
    height: 1.8rem;
    border: 1px solid var(--grid-line);
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s ease;
}
.qty-btn:hover { border-color: var(--accent); color: var(--accent); }
.qty-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.qty-value {
    min-width: 1.4rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-size: 0.85rem;
}

.roast-toggle { display: none; gap: 0.4rem; }
.order-row.has-qty .roast-toggle { display: flex; }
.roast-btn {
    appearance: none;
    -webkit-appearance: none;
    padding: 0.25rem 0.6rem;
    border: 1px solid var(--grid-line);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.15s ease;
}
.roast-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.roast-btn.active { border-color: var(--accent); color: var(--accent); }

.cart-bar {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    margin-top: 1.2rem;
    border: var(--border-accent);
    background: var(--bg-elevated);
}
.cart-bar-summary {
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.cart-bar-total { color: var(--accent); font-weight: 600; }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 2500;
}
.modal-overlay.active { display: flex; }
.modal-box {
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-surface);
    border: var(--border-accent);
    padding: 1.4rem;
}
.order-preview {
    font-size: 0.7rem;
    min-height: 8rem;
    color: var(--text-secondary);
}
.modal-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.form-status.is-success {
    display: block;
    border-color: var(--accent);
    color: var(--text-primary);
}

@media (max-width: 480px) {
    .cart-bar { flex-direction: column; align-items: stretch; text-align: center; }
    .modal-actions { flex-direction: column; }
    .modal-actions .btn { width: 100%; }
}
