/* POS (OperatorUI) styles. Moved out of Floor.razor; uses the DesignSystem tokens so it follows light/dark. */
/* Floor view */
.floor-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.floor-toolbar-divider {
    display: inline-block;
    width: 1px;
    height: 28px;
    background: var(--relax-border);
    margin: 0 4px;
}

/* Open orders strip */
.open-orders-strip {
    padding: 12px 14px;
    background: var(--relax-surface);
    border: 1px solid var(--relax-border);
    border-radius: 6px;
}

.open-orders-strip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.open-orders-badge {
    background: var(--relax-accent-fill);
    color: var(--relax-on-accent);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.open-orders-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.open-order-card {
    padding: 8px 12px;
    background: var(--relax-bg);
    border: 1px solid var(--relax-border);
    border-radius: 6px;
    min-width: 110px;
    cursor: pointer;
    transition: border-color 0.15s;
}

.open-order-card:hover {
    border-color: var(--relax-accent);
}

.open-order-card--alert {
    border-color: var(--relax-warning);
    background: rgba(245, 158, 11, 0.08);
}

.open-order-card-table { font-weight: 600; font-size: 0.9rem; }
.open-order-card-total { color: var(--relax-accent); margin-top: 4px; }

.reservations-strip {
    padding: 12px 14px;
    background: var(--relax-surface);
    border: 1px solid var(--relax-border);
    border-radius: 6px;
}

.reservations-strip-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.reservations-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.reservations-table th {
    text-align: left;
    padding: 4px 12px 6px 0;
    color: var(--relax-text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--relax-border);
    white-space: nowrap;
}

.reservations-table td {
    padding: 7px 12px 7px 0;
    border-bottom: 1px solid var(--relax-border);
    white-space: nowrap;
}

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

.reservations-table-row {
    cursor: pointer;
    transition: background 0.12s;
}

.reservations-table-row:hover td {
    background: rgba(20, 184, 166, 0.08);
}

.reservation-checked-in td {
    color: var(--relax-text-muted);
}

.checkin-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(34, 197, 94, 0.15);
    color: var(--relax-success-text);
    white-space: nowrap;
}

.checkout-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(148, 163, 184, 0.15);
    color: var(--relax-text-muted);
    white-space: nowrap;
}

/* Check view */
.check-topbar {
    display: flex;
    align-items: center;
    padding: 6px 0 12px;
    border-bottom: 1px solid var(--relax-border);
    margin-bottom: 14px;
}

.check-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.check-menu {
    flex: 3;
    min-width: 0;
}

.check-receipt {
    flex: 2;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 12px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.check-section {
    padding: 12px 14px;
    background: var(--relax-surface);
    border: 1px solid var(--relax-border);
    border-radius: 6px;
}

.check-section-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.res-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--relax-border);
}

.res-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.min-width-0 {
    min-width: 0;
}

/* Order item row with qty controls */
.order-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid var(--relax-border);
    gap: 6px;
}

.order-item-row:last-of-type {
    border-bottom: none;
}

.order-item-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 2px;
}

.order-item-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.qty-btn {
    min-width: 24px !important;
    padding: 0 4px !important;
}

.qty-display {
    min-width: 22px;
    text-align: center;
    font-weight: 600;
}

.order-item-remark {
    font-size: 0.75rem;
    color: var(--relax-warning);
    font-style: italic;
}

.order-item-modifier {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--relax-text-muted);
    padding-left: 12px;
}

.course-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 8px;
    margin-left: 4px;
    vertical-align: middle;
}

.course-badge--c1 { background: rgba(99,102,241,0.18); color: #6366f1; }
.course-badge--c2 { background: rgba(20,184,166,0.18); color: var(--relax-accent); }
.course-badge--c3 { background: rgba(244,114,182,0.18); color: #f472b6; }

/* Menu item availability */
.menu-item-avail-toggle {
    position: absolute;
    top: 4px;
    right: 4px;
    cursor: pointer;
    color: var(--relax-text-muted);
    opacity: 0;
    transition: opacity 0.15s;
    background: rgba(0,0,0,0.4);
    border-radius: 3px;
    padding: 1px 3px;
    line-height: 1;
    z-index: 1;
}

.menu-item-wrapper:hover .menu-item-avail-toggle {
    opacity: 1;
}

.menu-item-unavailable .rz-button {
    opacity: 0.4;
    cursor: not-allowed;
}

.menu-item-unavailable .menu-item-avail-toggle {
    opacity: 1;
    color: var(--relax-danger);
}

/* Menu grid */
.menu-item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
    align-items: stretch;
}

.menu-item-grid > * {
    min-width: 0;
    overflow: hidden;
}

.menu-item-wrapper {
    position: relative;
    height: 100%;
}

.menu-item-wrapper .rz-button {
    width: 100%;
    height: 100%;
}

.menu-item-grid .rz-button-box {
    align-items: stretch !important;
    width: 100%;
}

/* Payment status badges */
.payment-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    width: 100%;
}

.payment-status-badge--requested {
    background: rgba(59, 130, 246, 0.12);
    color: var(--relax-info-text);
}

.payment-status-badge--paid {
    background: rgba(34, 197, 94, 0.15);
    color: var(--relax-success-text);
}

/* Order status badges */
.order-item-status {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
}

.order-item-status--accepted {
    background: rgba(234, 179, 8, 0.2);
    color: var(--relax-warning-text);
}

.order-item-status--prepared {
    background: rgba(34, 197, 94, 0.2);
    color: var(--relax-success-text);
}

.order-item-status--served {
    background: rgba(148, 163, 184, 0.2);
    color: var(--relax-text-muted);
}

/* Stock badge */
.stock-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    background: rgba(34, 197, 94, 0.2);
    color: var(--relax-success-text);
    white-space: nowrap;
}

.stock-badge--low {
    background: rgba(239, 68, 68, 0.2);
    color: var(--relax-danger-text);
}

.menu-search-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.recent-items-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 6px 8px;
    background: var(--relax-surface);
    border: 1px solid var(--relax-border);
    border-radius: 6px;
}

.recent-items-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--relax-text-muted);
    margin-right: 4px;
}

.recent-item-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--relax-bg);
    color: var(--relax-text);
    border: 1px solid var(--relax-border);
    padding: 4px 10px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.78rem;
    transition: border-color 0.12s;
}

.recent-item-chip:hover { border-color: var(--relax-accent); }

.recent-item-price {
    font-weight: 700;
    color: var(--relax-accent);
}

/* Discount item */
.order-item-row--discount .order-item-info {
    color: var(--relax-warning);
    font-style: italic;
}

.order-item-row--discount .order-item-actions {
    color: var(--relax-warning);
}

/* Receipt */
.receipt-divider {
    border-top: 1px dashed var(--relax-border);
    margin: 8px 0;
}

.receipt-total {
    font-size: 1rem;
}

/* Phone-only elements, hidden at desktop widths */
.check-mobile-nav {
    display: none;
}

.floor-table-grid {
    display: none;
}

/* The same cards on a wide screen, when chosen instead of the map: the map cannot be used with a keyboard. */
.floor-views--list .floor-canvas-wrap { display: none; }
.floor-views--list .floor-table-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }

.floor-table-card {
    min-height: 76px;
    border: none;
    border-radius: 8px;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-weight: 600;
}

.floor-table-card-number {
    font-size: 1.1rem;
}

.floor-table-card-cap,
.floor-table-card-state {
    font-size: 0.75rem;
    font-weight: 500;
}

.floor-table-card--free { background: #2e7d32; }
.floor-table-card--reserved { background: #1565c0; }
.floor-table-card--occupied { background: #c62828; }
.floor-table-card--warn { background: #a84300; }
.floor-table-card--late { background: #6a1b4d; }

/* Desktop reaches the operator list via the sidebar; the back button is phone-only */
.floor-back-btn {
    display: none !important;
}

/* Desktop: the toolbar groups are box-less so the flex row is unchanged */
.check-toolbar-more {
    display: contents;
}

.check-toolbar-more-toggle {
    display: none !important;
}

/* ── Phone layout (shared with the MAUI app; desktop unchanged above this
   breakpoint). !important is needed where inline styles must be beaten. ── */
@media (max-width: 767.98px) {
    .floor-back-btn {
        display: inline-flex !important;
        min-width: 40px;
        min-height: 40px;
    }

    /* Check view becomes a one-panel-at-a-time step flow */
    .check-layout {
        display: block;
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }

    .check-menu:not(.is-mobile-active) {
        display: none;
    }

    .check-receipt:not(.is-mobile-active) {
        display: none;
    }

    .check-receipt {
        position: static;
        max-height: none;
        overflow-y: visible;
    }

    /* Stuck to the bottom it covered most of a phone screen and hid the order lines. It follows them instead;
       the total stays in view on the "check" tab below. */
    .check-layout .pay-bar {
        position: static;
        box-shadow: none;
    }

    .check-topbar {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    /* Bottom step switcher */
    .check-mobile-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1040; /* below the dialog overlays at 1050+ */
        background: var(--relax-surface);
        border-top: 1px solid var(--relax-border);
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
        gap: 8px;
    }

    .check-mobile-nav-btn {
        flex: 1;
        min-height: 52px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border-radius: 8px;
        border: 1px solid var(--relax-border);
        background: var(--relax-bg);
        color: var(--relax-text);
        font-weight: 600;
    }

    .check-mobile-nav-btn.is-active {
        border-color: var(--relax-accent);
        color: var(--relax-accent);
    }

    .check-mobile-nav-total {
        font-weight: 700;
        color: var(--relax-accent);
    }

    /* Menu grid: two fixed columns with tall touch targets */
    .menu-item-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .menu-item-wrapper .rz-button {
        min-height: 64px;
    }

    .recent-item-chip {
        padding: 8px 12px;
    }

    /* No hover on touch screens: keep the availability toggle visible */
    .menu-item-avail-toggle {
        opacity: 1;
    }

    /* Receipt toolbar and row controls: comfortable touch targets */
    .check-section--order .check-section-header .rz-button {
        min-width: 40px;
        min-height: 40px;
    }

    /* Secondary toolbar icons collapse behind the "more" toggle */
    .check-toolbar-more-toggle {
        display: inline-flex !important;
    }

    .check-toolbar-more {
        display: none;
    }

    .check-toolbar-more.is-open {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        gap: 4px;
    }

    .order-item-row .qty-btn {
        min-width: 36px !important;
        min-height: 36px;
    }

    /* Mark-served / remark buttons are tapped constantly during service */
    .order-item-actions .rz-button {
        min-width: 36px;
        min-height: 36px;
    }

    /* The phone Check step goes straight to the receipt; reservations
       are handled from the floor view's reservations strip. */
    .check-receipt .check-section:not(.check-section--order) {
        display: none;
    }

    /* Category tab strip scrolls horizontally instead of overflowing */
    .check-menu .rz-tabview-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Floor map: table cards instead of the 900px canvas. */
    .floor-view-toggle {
        display: none !important;
    }

    .floor-canvas-wrap {
        display: none;
    }

    .floor-table-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }

    /* Reservations strip: scroll the wide table, drop the End column */
    .reservations-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .reservations-table th:nth-child(2),
    .reservations-table td:nth-child(2) {
        display: none;
    }

    /* Strip cards get a bit more room to breathe on narrow screens */
    .open-order-card {
        flex: 1 1 40%;
        min-width: 140px;
    }
}

/* ---------------------------------------------------------------------------
   Status pills and strip/card colour variants (replace the inline styles that used raw hex values).
   --------------------------------------------------------------------------- */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--r-pill);
    font-size: var(--fs-xs);
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.pill--sm { font-size: 0.7rem; padding: 1px 6px; }

.pill--accent  { background: var(--relax-accent-muted); color: var(--relax-accent); }
.pill--danger  { background: var(--relax-danger-bg);    color: var(--relax-danger-text); }
.pill--solid-accent  { background: var(--relax-accent-fill); color: var(--relax-on-accent); }
.pill--solid-success { background: var(--relax-success-text); color: var(--relax-surface); }
.pill--solid-warning { background: var(--relax-warning-text); color: var(--relax-surface); }
.pill--solid-info    { background: var(--relax-info-text);    color: var(--relax-surface); }
.pill--solid-neutral { background: var(--relax-text-muted);   color: var(--relax-surface); }

.open-orders-strip--success { border-color: color-mix(in srgb, var(--relax-success) 40%, transparent); }
.open-orders-strip--warning { border-color: var(--relax-warning); }
.open-orders-strip--accent  { border-color: var(--relax-accent); }
.open-order-card--success { border-color: color-mix(in srgb, var(--relax-success) 30%, transparent); }
.open-order-card--warning { border-color: color-mix(in srgb, var(--relax-warning) 40%, transparent); }
.open-order-card--accent  { border-color: color-mix(in srgb, var(--relax-accent) 40%, transparent); }

.text-success-token { color: var(--relax-success-text); }
.icon-warning { color: var(--relax-warning-text); }
.icon-info { color: var(--relax-info-text); }

.payment-status-badge--warning { background: color-mix(in srgb, var(--relax-warning) 15%, transparent); color: var(--relax-warning-text); }
.payment-status-badge--info    { background: color-mix(in srgb, var(--relax-info) 14%, transparent);    color: var(--relax-info-text); }

/* Touch devices (phone and fixed POS terminals): every Radzen button and chip is a finger-sized target. */
@media (pointer: coarse) {
    .rz-button.rz-button-xs,
    .rz-button.rz-button-sm {
        min-height: var(--touch-min);
        min-width: var(--touch-min);
    }
}

/* ---------------------------------------------------------------------------
   Operator home (/operator): one card per restaurant. The floor is the big action; the rest is secondary.
   --------------------------------------------------------------------------- */
.operator-privacy {
    margin-top: var(--sp-4);
    text-align: center;
}

.operator-privacy a {
    display: inline-block;
    min-height: var(--touch-min);
    line-height: var(--touch-min);
    color: var(--relax-accent);
    text-decoration: underline;
}

.operator-home {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--sp-4);
}

.operator-card {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    padding: var(--sp-4);
    background: var(--relax-surface);
    border: 1px solid var(--relax-border);
    border-radius: var(--r-md);
}

.operator-card-title {
    margin: 0;
    font-size: var(--fs-lg);
}

.operator-section-title {
    margin: var(--sp-8) 0 var(--sp-3);
    font-size: var(--fs-lg);
}

.operator-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    min-height: 56px;
    border: 0;
    border-radius: var(--r-md);
    background: var(--relax-accent-fill);
    color: var(--relax-on-accent);
    font: inherit;
    font-size: var(--fs-lg);
    font-weight: 600;
    cursor: pointer;
}

.operator-primary:hover { background: var(--relax-accent-fill-hover); }

.operator-quick {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: var(--sp-2);
}

.operator-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--sp-1);
    min-height: 64px;
    padding: var(--sp-2);
    border: 1px solid var(--relax-border);
    border-radius: var(--r-sm);
    background: var(--relax-bg);
    color: var(--relax-text);
    font: inherit;
    font-size: var(--fs-sm);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
}

.operator-tile:hover { border-color: var(--relax-accent); }

.operator-more > summary {
    cursor: pointer;
    min-height: var(--touch-min);
    display: flex;
    align-items: center;
    color: var(--relax-text-muted);
    font-size: var(--fs-sm);
    font-weight: 600;
}

.operator-more-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
}

.operator-link {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    min-height: var(--touch-min);
    padding: 0 var(--sp-2);
    border: 0;
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--relax-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.operator-link:hover { background: var(--relax-accent-muted); }
.operator-link--warn { color: var(--relax-warning-text); }

.operator-appearance {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    margin-top: var(--sp-8);
    color: var(--relax-text-muted);
    font-size: var(--fs-sm);
}

.operator-appearance .theme-select {
    min-height: var(--touch-min);
    padding: 0 var(--sp-3);
    border: 1px solid var(--relax-border);
    border-radius: var(--r-sm);
    background: var(--relax-surface);
    color: var(--relax-text);
    font: inherit;
}

.operator-intro {
    margin: 0 0 var(--sp-4);
    max-width: 60ch;
    color: var(--relax-text-muted);
}

.operator-primary { flex-wrap: wrap; }
.operator-primary small {
    flex-basis: 100%;
    text-align: center;
    font-size: var(--fs-sm);
    font-weight: 400;
}

.operator-tile small { color: var(--relax-text-muted); font-weight: 400; }

.operator-link-text { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.operator-link-text small { color: var(--relax-text-muted); font-size: var(--fs-sm); }

.operator-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; }
.operator-settings { display: inline-flex; align-items: center; gap: var(--sp-1); min-height: var(--touch-min); color: var(--relax-text-muted); font-size: var(--fs-sm); text-decoration: none; }
.operator-settings:hover { color: var(--relax-accent); }

/* ═══ Floor: fast ordering, overview and paying ═══ */

/* Floor toolbar extras */
.jump-to-table { display: inline-flex; align-items: center; gap: 4px; }
.jump-input { width: 7.5rem; min-height: var(--touch-min); padding: 0 var(--sp-3); background: var(--relax-bg); color: var(--relax-text); border: 1px solid var(--relax-border); border-radius: var(--r-sm); font: inherit; }
.my-tables-toggle { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--touch-min); cursor: pointer; }

.attention-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-3); padding: var(--sp-2) var(--sp-3); background: var(--relax-surface); border: 1px solid var(--relax-border); border-radius: var(--r-md); }
.attention-bar-title { display: inline-flex; align-items: center; gap: var(--sp-1); font-weight: 600; color: var(--relax-text-muted); font-size: var(--fs-sm); }
.attention-chip { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--touch-min); padding: 0 var(--sp-3); border: 0; border-radius: 999px; color: #fff; font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.attention-chip--waitercalled { background: #d97706; }
.attention-chip--billrequested { background: #2563eb; }
.attention-chip--readytoserve { background: #15803d; }

.floor-legend { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin: 0 0 var(--sp-2); font-size: var(--fs-sm); color: var(--relax-text-muted); }
.floor-legend-item { display: inline-flex; align-items: center; gap: var(--sp-2); }
/* Reserved is also dashed, here and on the map. */
.floor-legend-dot--reserved { border: 2px dashed #fff; outline: 1px solid var(--relax-text-muted); }
.floor-legend-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.floor-legend-dot--free { background: #2e7d32; }
.floor-legend-dot--reserved { background: #1565c0; }
.floor-legend-dot--occupied { background: #c62828; }
.floor-legend-dot--warn { background: #a84300; }
.floor-legend-dot--late { background: #6a1b4d; }

.floor-canvas-wrap { border: 2px solid var(--relax-border); border-radius: var(--r-sm); overflow: hidden; overflow-x: auto; display: block; width: 100%; }

.open-orders-strip-header { cursor: pointer; }
/* The part of a clickable card or row that the keyboard lands on. */
.card-open { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.row-open { color: inherit; text-decoration: underline; min-width: 44px; min-height: 24px; }
.open-orders-sum { color: var(--relax-accent); font-weight: 600; }
.open-orders-chevron { color: var(--relax-text-muted); font-size: .9rem; }
button.open-order-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; font: inherit; color: inherit; width: 100%; }
.open-order-card-note { font-size: var(--fs-xs); font-weight: 600; color: var(--relax-warning-text); }
.icon-warning { color: #d97706; }
.icon-info { color: #2563eb; }
.icon-success { color: #15803d; }
.icon-fired { color: #f59e0b; font-size: .95rem; vertical-align: middle; }

.floor-table-card { position: relative; }
.floor-table-card-total { font-weight: 700; font-size: 1.05rem; }
.floor-table-card-waiter { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); opacity: .9; }
.floor-table-card-alert { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: #111; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* Menu panel: sticky search + categories, big tiles */
.menu-panel-top { position: sticky; top: 0; z-index: 2; display: flex; flex-direction: column; gap: var(--sp-2); padding: 0 0 var(--sp-2); background: var(--relax-bg); }
.menu-search-input { flex: 1; min-height: var(--touch-min); padding: 0 var(--sp-3); background: var(--relax-surface); color: var(--relax-text); border: 1px solid var(--relax-border); border-radius: var(--r-sm); font: inherit; }
.chip-count { font-weight: 700; color: var(--relax-accent); }
.menu-categories { display: flex; gap: var(--sp-2); overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.menu-category { flex: none; display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--touch-min); padding: 0 var(--sp-4); background: var(--relax-surface); color: var(--relax-text); border: 1px solid var(--relax-border); border-radius: 999px; font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; }
.menu-category--active { background: var(--relax-accent-fill); color: var(--relax-on-accent); border-color: var(--relax-accent-fill); }
.menu-category-count { min-width: 20px; padding: 0 6px; border-radius: 10px; background: rgba(0,0,0,.25); font-size: var(--fs-xs); text-align: center; }

.menu-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--sp-2); padding-top: var(--sp-2); }
.menu-tile { position: relative; display: flex; min-height: 88px; background: var(--relax-surface); border: 1px solid var(--relax-border); border-radius: var(--r-md); overflow: hidden; }
.menu-tile--on-check { border-color: var(--relax-accent); box-shadow: inset 0 0 0 1px var(--relax-accent); }
.menu-tile--unavailable { opacity: .5; }
.menu-tile-main { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-3); padding-right: var(--sp-6); background: none; border: 0; color: var(--relax-text); font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.menu-tile-main:active:not(:disabled) { background: var(--relax-accent-muted); }
.menu-tile-main:disabled { cursor: not-allowed; }
.menu-tile-name { line-height: 1.25; word-break: break-word; font-weight: 500; }
.menu-tile-category { font-size: var(--fs-xs); color: var(--relax-text-muted); }
.menu-tile-meta { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.menu-tile-price { font-weight: 700; white-space: nowrap; }
.menu-tile-count { position: absolute; top: 6px; left: 6px; min-width: 26px; padding: 1px 7px; border-radius: 12px; background: var(--relax-accent-fill); color: var(--relax-on-accent); font-weight: 700; font-size: var(--fs-sm); text-align: center; pointer-events: none; }
.menu-tile--on-check .menu-tile-name { margin-top: 18px; }
.menu-tile-tools { position: absolute; top: 2px; right: 2px; display: flex; flex-direction: column; }
.menu-tile-tool { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--relax-text-muted); cursor: pointer; border-radius: var(--r-sm); }
.menu-tile-tool:hover { color: var(--relax-accent); background: var(--relax-accent-muted); }
.menu-empty { grid-column: 1 / -1; }

/* Receipt: touch-sized controls */
.order-item-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; margin-left: var(--sp-2); }
.qty-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0; background: var(--relax-bg); color: var(--relax-text); border: 1px solid var(--relax-border); border-radius: var(--r-sm); cursor: pointer; }
.qty-btn:active { background: var(--relax-accent-muted); }
.qty-btn--serve { color: var(--relax-info-text); border-color: var(--relax-info); }
.qty-btn--active { color: var(--relax-accent); border-color: var(--relax-accent); }
.qty-display { min-width: 24px; text-align: center; font-weight: 600; }
.order-item-total { min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.order-item-modifier .icon { font-size: .75rem; vertical-align: middle; }

.check-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0 0 var(--sp-3); }
.check-action { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--touch-min); padding: 0 var(--sp-3); background: var(--relax-bg); color: var(--relax-text); border: 1px solid var(--relax-border); border-radius: var(--r-sm); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.check-action:hover { border-color: var(--relax-accent); }
.check-empty { text-align: center; padding: var(--sp-4) 0; color: var(--relax-text-muted); }
.check-empty-icon { font-size: 2.5rem; }
.check-signal { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-2); }
.check-takeout { margin-bottom: var(--sp-3); padding: var(--sp-2); border: 1px solid var(--relax-border); border-radius: var(--r-sm); }
.check-locked { display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); background: color-mix(in srgb, var(--relax-warning) 14%, transparent); color: var(--relax-warning-text); font-size: var(--fs-sm); }
.check-subtotals { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--sp-3); margin-top: var(--sp-2); font-size: var(--fs-sm); color: var(--relax-text-muted); }
.check-courses { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
.check-reservations > summary { cursor: pointer; list-style: none; margin-bottom: 0; }
.check-reservations > summary::-webkit-details-marker { display: none; }
.check-reservations[open] > summary { margin-bottom: var(--sp-2); }

/* Pay bar: sticks to the bottom of the receipt, total always visible */
.pay-bar { position: sticky; bottom: 0; z-index: 3; margin: 0 -2px -2px; padding: var(--sp-3); background: var(--relax-surface); border: 1px solid var(--relax-accent); border-radius: var(--r-md); box-shadow: 0 -6px 16px rgba(0,0,0,.25); }
.pay-bar-total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--sp-2); font-size: var(--fs-md); }
.pay-bar-total strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.pay-bar-paid { display: flex; justify-content: space-between; gap: var(--sp-3); margin: calc(var(--sp-1) * -1) 0 var(--sp-2); font-size: var(--fs-sm); color: var(--relax-text-muted); }
.pay-bar-paid strong { color: var(--relax-text); }
.gp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.gp-actions .rz-button { min-height: var(--touch-min); }

.split-progress { margin-bottom: var(--sp-2); padding: var(--sp-2) var(--sp-3); background: var(--relax-bg); border: 1px solid var(--relax-border); border-radius: var(--r-sm); }
.split-progress-title { display: flex; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.split-progress-actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.split-progress-actions .rz-button { min-height: var(--touch-min); }
.split-progress-links { display: flex; gap: var(--sp-4); }
.split-option { margin: 0 0 var(--sp-4); padding-bottom: var(--sp-4); border-bottom: 1px solid var(--relax-border); }
.split-option:last-of-type { border-bottom: 0; }
.split-option h5 { margin: 0 0 var(--sp-2); font-size: var(--fs-md); }
.split-stepper { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); flex-wrap: wrap; }
.split-stepper-value { min-width: 5rem; text-align: center; font-weight: 600; }
.split-stepper-share { color: var(--relax-text-muted); }

/* Cash checkout */
.cash-total { display: flex; flex-direction: column; align-items: center; margin-bottom: var(--sp-3); padding: var(--sp-3); background: var(--relax-bg); border-radius: var(--r-md); }
.cash-total-label { font-size: var(--fs-sm); color: var(--relax-text-muted); }
.cash-total-amount { font-size: 2.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cash-total-note { font-size: var(--fs-sm); color: var(--relax-text-muted); }
.cash-block { margin-bottom: var(--sp-3); }
.cash-block-label { display: block; margin-bottom: var(--sp-1); font-size: var(--fs-sm); color: var(--relax-text-muted); }
.cash-chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.cash-chip { min-width: 64px; min-height: var(--touch-min); padding: 0 var(--sp-3); background: var(--relax-bg); color: var(--relax-text); border: 1px solid var(--relax-border); border-radius: var(--r-sm); font: inherit; font-weight: 600; cursor: pointer; }
.cash-chip:disabled { opacity: .4; cursor: not-allowed; }
.cash-chip--active { background: var(--relax-accent-fill); color: var(--relax-on-accent); border-color: var(--relax-accent-fill); }
.cash-change { display: flex; align-items: baseline; justify-content: space-between; padding: var(--sp-3); border-radius: var(--r-md); background: color-mix(in srgb, var(--relax-success) 14%, transparent); color: var(--relax-success-text); }
.cash-change strong { font-size: 1.9rem; font-variant-numeric: tabular-nums; }
.cash-change--short { background: var(--relax-danger-bg); color: var(--relax-danger-text); }
.cash-items { margin-top: var(--sp-3); font-size: var(--fs-sm); }
.cash-items summary { cursor: pointer; color: var(--relax-text-muted); }

/* Desktop: the labelled action row is a normal flex row, not box-less like the old icon toolbar */
@media (min-width: 768px) {
    .check-actions.check-toolbar-more { display: flex; }
}

@media (max-width: 767.98px) {
    .menu-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .menu-tile { min-height: 96px; }
    .jump-input { width: 6rem; }
    .pay-bar { margin: 0; }
}

/* ═══ Floor: classes that replace the inline styles of the older panels and dialogs ═══ */

.text-muted-token { color: var(--relax-text-muted); }
.text-accent-token { color: var(--relax-accent); }
.text-danger-token { color: var(--relax-danger); }
.flex-fill { flex: 1; }
.w-input-80 { width: 80px; }
.w-input-100 { width: 100px; }
.w-input-130 { width: 130px; }
.w-input-date { width: 145px; }
.btn-min-120 { min-width: 120px; }
.form-label-fixed { min-width: 90px; }

/* Icons next to text */
.icon-inline { font-size: .85rem; vertical-align: middle; }
.icon-inline--lg { font-size: 1rem; }
.strip-icon { font-size: 1rem; }
.strip-icon--success { color: #10b981; }
.strip-icon--warning { color: #d97706; }
.strip-icon--accent { color: var(--relax-accent); }

/* Manager PIN and sign-in PIN fields */
.pin-input { width: 140px; font-family: monospace; letter-spacing: 4px; }
.pin-input--big { letter-spacing: 6px; font-size: 1.2rem; text-align: center; }
.signin-icon { display: block; margin-bottom: var(--sp-4); font-size: 2.5rem; color: var(--relax-accent); }

/* Printable receipt preview */
.receipt-print-area--shown { display: block; }
.receipt-head { text-align: center; margin-bottom: var(--sp-3); }
.receipt-title { font-size: 1.1rem; }
.receipt-sub { font-size: var(--fs-sm); color: var(--relax-text-muted); }
.receipt-meta { font-size: var(--fs-sm); color: var(--relax-text-muted); }
.receipt-meta--center { text-align: center; }
.receipt-meta--small { font-size: var(--fs-xs); }
.receipt-remark { padding-left: var(--sp-4); font-size: var(--fs-sm); color: var(--relax-text-muted); }

/* From AuditLog (moved out of the page) */
.audit-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.18);
    color: #6366f1;
    padding: 2px 6px;
    border-radius: 4px;
}

/* From FeedbackDashboard (moved out of the page) */
.fb-kpi {
    padding: 16px 20px;
    background: var(--relax-surface);
    border: 1px solid var(--relax-border);
    border-radius: 8px;
    min-width: 160px;
}
.fb-kpi-label { font-size:0.75rem; text-transform:uppercase; color: var(--relax-text-muted); margin-bottom:4px; }
.fb-kpi-value { font-size:2rem; font-weight:700; color: var(--relax-accent); }

.rating-bars { max-width: 480px; }
.rating-bar-row { display:flex; align-items:center; gap:10px; margin-bottom:4px; }
.rating-bar-label { width:40px; font-weight:600; }
.rating-bar-wrap { flex:1; height:14px; background: var(--relax-border); border-radius:7px; overflow:hidden; }
.rating-bar-fill { height:100%; background: var(--relax-accent); }
.rating-bar-count { width:40px; text-align:right; color: var(--relax-text-muted); font-size:0.85rem; }

/* From LiveDashboard (moved out of the page) */
.live-kpi-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.live-kpi-card {
    flex: 1;
    min-width: 150px;
    padding: 16px 20px;
    background: var(--relax-surface);
    border: 1px solid var(--relax-border);
    border-radius: 8px;
}

.live-kpi-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--relax-text-muted);
    margin-bottom: 6px;
}

.live-kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--relax-accent);
    line-height: 1.1;
}

.live-kpi-sub {
    margin-top: 4px;
}

/* Hourly bar chart */
.hourly-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 120px;
    padding-bottom: 20px;
}

.hourly-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    height: 100%;
    cursor: default;
}

.hourly-bar-fill {
    width: 100%;
    background: var(--relax-accent);
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    transition: height 0.3s;
}

.hourly-bar-label {
    font-size: 0.65rem;
    color: var(--relax-text-muted);
    margin-top: 4px;
}

/* From Reports (moved out of the page) */
.period-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.report-kpi-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.report-kpi-card {
    flex: 1;
    min-width: 150px;
    padding: 16px 20px;
    background: var(--relax-surface);
    border: 1px solid var(--relax-border);
    border-radius: 8px;
}

.report-kpi-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--relax-text-muted);
    margin-bottom: 6px;
}

.report-kpi-value {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--relax-accent);
    line-height: 1.1;
}

.report-kpi-sub {
    margin-top: 4px;
}

.delta {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 4px;
}

.delta-positive { color: #16a34a; }
.delta-negative { color: #dc2626; }
.delta-neutral  { color: var(--relax-text-muted); }

/* Trend chart */
.trend-chart-wrap {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 140px;
    padding-bottom: 22px;
    background: var(--relax-surface);
    border: 1px solid var(--relax-border);
    border-radius: 6px;
    padding: 12px 12px 24px;
    overflow-x: auto;
}

.trend-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    min-width: 20px;
    height: 100%;
    cursor: default;
}

.trend-bar-fill {
    width: 80%;
    max-width: 32px;
    background: var(--relax-accent);
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    transition: height 0.3s;
}

.trend-bar-label {
    font-size: 0.6rem;
    color: var(--relax-text-muted);
    margin-top: 4px;
    white-space: nowrap;
    text-align: center;
}

/* Tables */
.report-table thead th {
    color: var(--relax-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--relax-border);
}

.report-table tbody tr:hover td { background: var(--relax-accent-muted); }

/* Share bar */
.share-bar {
    width: 50px;
    height: 6px;
    background: var(--relax-border);
    border-radius: 3px;
    overflow: hidden;
}

.share-bar-fill {
    height: 100%;
    background: var(--relax-accent);
    border-radius: 3px;
}

/* Previous period box */
.prev-period-box {
    padding: 12px 14px;
    background: var(--relax-surface);
    border: 1px solid var(--relax-border);
    border-radius: 6px;
    font-size: 0.875rem;
}

/* ═══ Activity bar floor ═══ */
.session-summary { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin-bottom: var(--sp-3); color: var(--relax-text-muted); font-size: var(--fs-sm); }
.session-summary strong { color: var(--relax-text); font-size: 1.1rem; }
.session-filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.session-filter { min-height: var(--touch-min); padding: 0 var(--sp-3); border: 1px solid var(--relax-border); border-radius: 999px; background: var(--relax-surface); color: var(--relax-text); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.session-filter.is-active { background: var(--relax-accent-fill); border-color: var(--relax-accent-fill); color: var(--relax-on-accent); }
.session-list { display: flex; flex-direction: column; gap: var(--sp-2); max-width: 640px; }

.inbox-card__markread { min-width: var(--touch-min); min-height: var(--touch-min); border: 1px solid var(--relax-border); border-radius: 999px; background: var(--relax-surface); color: var(--relax-accent); font: inherit; cursor: pointer; }

/* Kitchen / bar dashboard */
.badge-room { background: #586069; color: #fff; }
.badge-remark { background: #f59e0b; color: #000; }
.cell-middle { vertical-align: middle; }
.cell-w130 { width: 130px; }
.cell-w150 { width: 150px; }
.kitchen-board .card-header, .kitchen-board .card-footer { background: var(--relax-surface); color: var(--relax-text); }

/* The icon buttons on the bill and above the menu: without this they get the platform's grey default button. */
.check-layout .btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--touch-min);
    min-height: var(--touch-min);
    padding: 0;
    background: transparent;
    border: 1px solid var(--relax-border);
    border-radius: var(--r-sm);
    color: var(--relax-text);
    cursor: pointer;
}

.check-layout .btn-icon.btn-icon--danger {
    color: var(--relax-danger-text);
}
