/**
 * Partner staff app shell (cashier / courier / admin) — golden home_v3 parity on app_shell_theme_v1.css
 * Phone frame: 430×932 + viewport scale — shared with client_app_shell_v1 / app_shell_viewport_fit.js
 */
html.shell-content body {
    display: block;
    min-height: 100%;
    margin: 0;
    padding: 0;
    background: var(--color-page);
    overflow: hidden;
}
html.shell-content .staff-viewport {
    position: fixed;
    inset: 0;
    padding: 0;
    display: block;
}
html.shell-content .staff-scale-slot {
    width: 100%;
    height: 100%;
}
html.shell-content .staff-scale-wrapper {
    width: 100%;
    height: 100%;
    transform: none !important;
}
html.shell-content .staff-device-frame {
    position: relative;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    background: var(--color-frame);
}
html.shell-content .staff-notch,
html.shell-content .staff-status-bar {
    display: none;
}
html.shell-content .staff-scroll-zone {
    inset: 0 0 84px;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--color-page);
    color: #1c1c1e;
    margin: 0;
    min-height: 100vh;
    overflow: hidden;
    transition: background 0.3s ease;
}

.staff-viewport {
    position: fixed;
    inset: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    box-sizing: border-box;
}

.staff-scale-slot {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.staff-scale-wrapper {
    width: 430px;
    height: 932px;
    transform-origin: center center;
    transition: transform 0.2s ease;
    will-change: transform;
}

.staff-device-frame {
    width: 430px;
    height: 932px;
    background: var(--color-frame);
    position: relative;
    overflow: hidden;
    border-radius: 55px;
    border: 8px solid #000;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    transition: background 0.3s ease;
}

.staff-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 34px;
    background: #000;
    border-radius: 0 0 20px 20px;
    z-index: 60;
}

.staff-status-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 22px 8px;
    background: var(--color-frame);
    z-index: 50;
    font-size: 13px;
    font-weight: 600;
    color: #000;
    transition: background 0.3s ease;
}

.staff-scroll-zone {
    position: absolute;
    inset: 52px 0 84px;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--color-frame);
    padding: 14px 20px 24px;
    transition: background 0.3s ease;
}

.staff-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.staff-nav-back {
    flex-shrink: 0;
}

.staff-nav-back.hidden {
    visibility: hidden;
    pointer-events: none;
}

.staff-header-brand {
    min-width: 0;
}

.staff-kicker {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.staff-title {
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 1;
}

.staff-subtitle {
    font-size: 12px;
    color: var(--color-muted);
    margin-top: 6px;
}

.staff-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.glass-btn {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--color-border-strong);
    background: var(--color-surface);
    color: var(--color-neutral);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 6px var(--color-shadow);
    cursor: pointer;
    transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}

.staff-profile-btn {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--color-border-strong);
    background: var(--color-surface);
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 1px 6px var(--color-shadow);
    cursor: pointer;
}

.staff-tabbar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 84px;
    background: color-mix(in srgb, var(--color-surface) 95%, transparent);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--color-border);
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    align-items: center;
    padding: 0 4px 16px;
    z-index: 100;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.staff-tab {
    border: 0;
    background: transparent;
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    flex: 1;
    transition: color 0.3s ease;
    min-width: 0;
    padding: 0 2px;
}

.staff-tab i {
    font-size: 20px;
}

.staff-tab.is-active {
    color: var(--color-primary);
}

.staff-tab.staff-tab-center i {
    font-size: 22px;
}

.staff-tab.staff-tab-center.is-active {
    font-weight: 700;
}

.staff-profile-btn {
    min-width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: color-mix(in srgb, var(--color-primary) 12%, var(--color-surface));
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    padding: 0 6px;
}

/* Golden cards */
.wallet-card {
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-soft) 100%);
    border: 1px solid var(--color-border);
    border-radius: 28px;
    padding: 20px;
    box-shadow: 0 2px 12px var(--color-shadow);
    margin-bottom: 18px;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.wallet-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(180deg, var(--color-soft-bg) 0%, var(--color-surface-soft) 100%);
    color: var(--color-primary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 6px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.wallet-chip.is-open {
    color: var(--color-primary);
}

.wallet-chip.is-closed {
    background: linear-gradient(180deg, #fef2f2 0%, #fff5f5 100%);
    color: #dc2626;
}

.wallet-hero-value {
    font-size: 32px;
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1;
}

.wallet-stat-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.wallet-stat-card {
    background: linear-gradient(180deg, var(--color-surface-soft) 0%, color-mix(in srgb, var(--color-surface-soft) 82%, var(--color-frame)) 100%);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    padding: 12px 10px;
    text-align: center;
}

.wallet-stat-label {
    font-size: 10px;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.wallet-stat-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-neutral);
}

.soft-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    color: var(--color-neutral);
    background: linear-gradient(180deg, var(--color-soft-bg) 0%, var(--color-surface-soft) 100%);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 5px 10px;
}

.shift-elapsed-dot {
    opacity: 0.45;
    font-weight: 600;
}

.shift-elapsed-timer {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--color-primary, #2d6a4f);
}

.shift-elapsed-timer.hidden,
.shift-elapsed-dot.hidden {
    display: none;
}

.search-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 12px 14px;
    box-shadow: 0 1px 6px var(--color-shadow);
    margin-bottom: 16px;
    cursor: pointer;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.search-card:active {
    transform: scale(0.99);
}

.search-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.search-card-tail {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    border: 1px solid var(--color-border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
}

.search-card-title {
    font-size: 13.5px;
    font-weight: 500;
}

.search-card-sub {
    font-size: 11px;
    margin-top: 2px;
}

.section-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--color-muted);
    margin-bottom: 12px;
}

.segment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 10px;
    margin-bottom: 10px;
}

.segment-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    padding: 0;
    font-family: inherit;
}

.segment-icon {
    width: 60px;
    height: 60px;
    border-radius: 22px;
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-soft) 100%);
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 6px var(--color-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: transform 0.12s ease;
}

.segment-icon.primary { color: var(--color-primary); }
.segment-icon.secondary { color: var(--color-secondary); }
.segment-icon.highlight { color: var(--color-highlight); }

.segment-tile:active .segment-icon {
    transform: scale(0.94);
}

.segment-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-neutral);
    text-align: center;
    line-height: 1.2;
}

.btn-primary {
    border: 0;
    border-radius: 18px;
    padding: 13px 16px;
    font-size: 13px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 20px var(--color-shadow);
    font-family: inherit;
    transition: transform 0.12s ease;
}

.btn-secondary {
    border: 0;
    border-radius: 18px;
    padding: 13px 16px;
    font-size: 13px;
    font-weight: 700;
    background: linear-gradient(180deg, var(--color-secondary-light) 0%, var(--color-secondary) 100%);
    color: #1c1c1e;
    cursor: pointer;
    font-family: inherit;
}

.btn-ghost {
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    background: var(--color-surface);
    color: var(--color-neutral);
    cursor: pointer;
    font-family: inherit;
}

.btn-danger {
    border: 1px solid #fecaca;
    border-radius: 14px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    background: #fff;
    color: #dc2626;
    cursor: pointer;
    font-family: inherit;
}

/* Hall handout: high-visibility release action */
.btn-release-all {
    border: 0;
    border-radius: 18px;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.01em;
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 8px 20px rgba(234, 88, 12, 0.35);
    transition: transform 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease;
}

.btn-release-all:active {
    transform: scale(0.98);
}

.btn-release-all.is-disabled,
.btn-release-all:disabled {
    opacity: 0.45;
    pointer-events: none;
    box-shadow: none;
}

.btn-primary:active,
.btn-secondary:active,
.btn-ghost:active,
.segment-tile:active {
    transform: scale(0.98);
}

.btn-block {
    width: 100%;
    margin-top: 14px;
}

.staff-card-highlight {
    border-color: rgba(204, 85, 83, 0.35);
    box-shadow: 0 0 0 1px rgba(204, 85, 83, 0.12);
}

.pill-new {
    background: #dbeafe;
    color: #1d4ed8;
}

.staff-card {
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-soft) 100%);
    border: 1px solid var(--color-border);
    border-radius: 22px;
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: 0 1px 6px var(--color-shadow);
}

.staff-card-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.staff-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-neutral);
}

.staff-card-sub {
    font-size: 12px;
    color: var(--color-muted);
    margin-top: 4px;
    line-height: 1.35;
}

.staff-card-meta {
    font-size: 12px;
    color: var(--color-muted);
    margin-top: 8px;
}

.staff-card-note {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--color-soft-bg);
    font-size: 12px;
    color: var(--color-neutral);
    border: 1px solid var(--color-border);
}

.staff-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.pill {
    font-size: 10px;
    font-weight: 800;
    padding: 5px 9px;
    border-radius: 999px;
    white-space: nowrap;
}

.pill-pending { background: #fef3c7; color: #b45309; }
.pill-confirmed { background: var(--color-soft-bg); color: var(--color-primary); }
.pill-rejected, .pill-cancelled_by_partner { background: #fee2e2; color: #b91c1c; }
.pill-new { background: #dbeafe; color: #1d4ed8; }
.pill-kitchen { background: #ffedd5; color: #c2410c; }
.pill-ready { background: var(--color-soft-bg); color: var(--color-primary); }

.open-orders-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.open-orders-section-head .section-label {
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

.section-label-btn {
    border: 0;
    background: transparent;
    padding: 0;
    text-align: left;
}

.open-orders-section-head.is-completed-open .section-label-btn {
    color: var(--color-primary);
    cursor: pointer;
}

.orders-back-to-active {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-primary);
    cursor: pointer;
}

.orders-back-to-active i {
    font-size: 11px;
}

.orders-completed-toggle {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--color-muted) 22%, transparent);
    background: var(--color-frame, #fff);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--color-muted);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.orders-completed-toggle.is-open {
    background: var(--color-soft-bg);
    color: var(--color-primary);
    border-color: color-mix(in srgb, var(--color-primary) 24%, transparent);
}

.orders-completed-chevron {
    font-size: 10px;
    opacity: 0.75;
}

#orders-completed-wrap {
    margin-top: 14px;
}

.shift-badge {
    display: none;
}

.catalog-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-soft) 100%);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    padding: 12px 14px;
    margin-bottom: 8px;
    box-shadow: 0 1px 6px var(--color-shadow);
}

.catalog-toolbar {
    margin-bottom: 12px;
}

.catalog-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    padding: 10px 14px;
    box-shadow: 0 1px 6px var(--color-shadow);
    color: var(--color-muted);
}

.catalog-search {
    flex: 1;
    border: 0;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    background: transparent;
    color: var(--color-neutral);
}

.catalog-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.catalog-chip {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-neutral);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
}

.catalog-chip.is-active {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px var(--color-shadow);
}

.hall-guest-chip {
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    background: var(--color-surface);
    color: var(--color-text);
    cursor: pointer;
    font-family: inherit;
}

#order-flow-guest-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

#order-flow-guest-picker.hidden {
    display: none !important;
}

.hall-guest-chip.is-active {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px var(--color-shadow);
}

.hall-guest-chip.hall-guest-add {
    border-style: dashed;
    font-weight: 600;
}

.hall-guest-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 8px;
    padding: 10px 0;
}

.hall-guest-stepper-btn {
    min-width: 56px;
    min-height: 56px;
    border-radius: 16px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
}

.hall-guest-stepper-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.hall-guest-stepper-value {
    min-width: 56px;
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    color: var(--color-text);
}

.hall-setup-table-quick {
    margin-top: 10px;
}

.hall-setup-table-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted, #64748b);
    margin: 10px 0 8px;
}

.hall-setup-table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 8px;
}

.hall-table-chip {
    min-height: 48px;
    padding: 10px 8px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.hall-table-chip.is-recent {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.hall-table-chip.is-catalog {
    min-height: 52px;
}

html.cashier-boot [data-staff-panel] {
    visibility: hidden;
}

.hall-table-chip.is-occupied {
    opacity: 0.62;
    border-style: dashed;
    color: #9a3412;
}

.hall-table-picker-sheet {
    max-height: 78vh;
}

.hall-table-picker-sheet .hall-setup-table-grid {
    max-height: 52vh;
    overflow-y: auto;
    padding-right: 2px;
}

.hall-table-picker-open {
    margin-top: 8px;
}

.hall-table-chip:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.catalog-card {
    position: relative;
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-soft) 100%);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 1px 6px var(--color-shadow);
    cursor: pointer;
}

.catalog-card-image {
    aspect-ratio: 1.15;
    background: var(--color-soft-bg);
    overflow: hidden;
}

.catalog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.catalog-card-body {
    padding: 10px 12px 12px;
}

.catalog-card-tag {
    font-size: 10px;
    font-weight: 700;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.catalog-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-neutral);
    margin-top: 4px;
    line-height: 1.25;
    min-height: 32px;
}

.catalog-card-price {
    font-size: 14px;
    font-weight: 800;
    color: var(--color-primary);
    margin-top: 8px;
}

.catalog-card-variants {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.catalog-card-variant-chip {
    border: 1px solid var(--color-border, #e5e7eb);
    background: #fff;
    color: var(--color-neutral, #111827);
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.catalog-card-variant-chip.is-active {
    border-color: var(--color-primary, #cc5553);
    background: color-mix(in srgb, var(--color-primary, #cc5553) 12%, #fff);
    color: var(--color-primary, #cc5553);
}

.catalog-card-old {
    font-size: 11px;
    color: var(--color-muted);
    text-decoration: line-through;
    margin-left: 6px;
    font-weight: 600;
}

.catalog-card.in-cart {
    border-color: color-mix(in srgb, var(--color-primary) 35%, var(--color-border));
}

.catalog-card-qty {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 8px var(--color-shadow);
}

.catalog-qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
}

.catalog-qty-val {
    min-width: 22px;
    text-align: center;
    font-size: 14px;
    font-weight: 800;
    color: var(--color-neutral);
}

.catalog-card .catalog-add-btn {
    position: absolute;
    right: 8px;
    bottom: 8px;
}

.catalog-add-btn {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--color-shadow);
}

.cart-panel {
    margin-top: 14px;
    padding: 16px;
    border-radius: 22px;
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-soft) 100%);
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 12px var(--color-shadow);
}

.cart-line-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed var(--color-border);
}

.cart-line-row:last-child {
    border-bottom: 0;
}

.cart-line-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-neutral);
}

.cart-line-mods {
    font-size: 11px;
    color: var(--color-muted);
    margin-top: 2px;
}

.cart-line-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-neutral);
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
}

.cart-qty {
    min-width: 18px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
}

.cart-line-sum {
    font-size: 13px;
    font-weight: 800;
    color: var(--color-primary);
    white-space: nowrap;
}

.cart-subtotal-note {
    font-size: 11px;
    margin-top: 6px;
}

.catalog-modal-hero {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.catalog-modal-image {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid var(--color-border);
    background: var(--color-soft-bg);
}

.mod-group {
    margin-bottom: 12px;
}

.mod-group-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--color-neutral);
    margin-bottom: 8px;
}

.mod-group-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mod-chip {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-neutral);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.mod-chip.is-active {
    background: var(--color-soft-bg);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-primary.is-disabled,
.btn-secondary.is-disabled,
.btn-release-all.is-disabled,
.btn-ghost.is-disabled,
button:disabled {
    opacity: 0.45;
    pointer-events: none;
}

.staff-card.is-active-order {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 25%, transparent);
}

.cart-payment-note {
    font-size: 11px;
    line-height: 1.4;
    margin-bottom: 10px;
    min-height: 16px;
}

.order-flow-shell {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 8px;
}

.order-flow-top {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 4px;
}

.order-flow-back {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-neutral);
    cursor: pointer;
    font-size: 14px;
}

.order-flow-meta {
    flex: 1;
    min-width: 0;
}

.cart-line-row.is-readonly {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 8px;
    align-items: center;
}

.review-guest-block .cart-line-row.is-readonly {
    margin-bottom: 6px;
}

.review-guest-block {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

.review-guest-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.review-guest-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.review-guest-foot {
    margin-top: 8px;
}

.order-flow-stepper {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
}

.order-flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 4px;
    border-radius: 12px;
    background: var(--color-surface-soft);
    border: 1px solid var(--color-border);
    opacity: 0.55;
    font: inherit;
    color: inherit;
}

.order-flow-step.is-clickable:not(:disabled) {
    cursor: pointer;
}

.order-flow-step:disabled {
    cursor: default;
}

.order-flow-step.is-active {
    opacity: 1;
    border-color: var(--color-primary);
    background: var(--color-soft-bg);
}

.order-flow-step.is-done {
    opacity: 0.85;
}

.order-flow-step-num {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
}

.order-flow-step.is-active .order-flow-step-num {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.order-flow-step-label {
    font-size: 9px;
    font-weight: 700;
    text-align: center;
    line-height: 1.1;
    color: var(--color-neutral);
}

.order-flow-order-id {
    display: none !important;
}

.order-flow-hint {
    font-size: 11px;
    line-height: 1.35;
}

.order-flow-dock {
    position: sticky;
    bottom: 0;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 22px;
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-soft) 100%);
    border: 1px solid var(--color-border);
    box-shadow: 0 -4px 20px var(--color-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.order-flow-dock-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    color: var(--color-muted);
}

.order-flow-dock-info strong {
    font-size: 18px;
    font-weight: 800;
    color: var(--color-primary);
}

.order-flow-dock .btn-primary {
    flex-shrink: 0;
    min-width: 140px;
}

.order-flow-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.order-flow-actions .btn-primary,
.order-flow-actions .btn-secondary,
.order-flow-actions .btn-release-all,
.order-flow-actions .btn-ghost {
    flex: 1;
    min-width: 100px;
}

.order-flow-actions-stack {
    flex-direction: column;
}

.kitchen-step-note {
    font-size: 12px;
    line-height: 1.45;
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--color-soft-bg);
    border: 1px solid var(--color-border);
}

.supplement-order-banner {
    margin: 0 0 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--color-soft-bg);
    border: 1px solid var(--color-border);
}

.supplement-order-banner-title {
    font-size: 13px;
    font-weight: 800;
}

.route-split-preview {
    margin: 10px 0 14px;
    font-size: 12px;
}

.route-split-group + .route-split-group {
    margin-top: 8px;
}

.route-split-title {
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--color-muted);
}

.route-split-line {
    padding: 2px 0;
}

.hall-order-workspace {
    margin-top: 4px;
}

.hall-ws-back {
    margin-bottom: 4px;
}

.hall-ws-lines {
    margin-top: 8px;
}

.hall-ws-line {
    grid-template-columns: 1fr auto auto;
}

.hall-ws-line .hall-ws-line-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.hall-order-card {
    cursor: pointer;
}

.hall-order-card:active {
    transform: scale(0.99);
}

.btn-danger-text {
    color: #b91c1c;
}

.pay-split-status-card {
    margin-bottom: 10px;
    padding: 12px 14px;
}

.pay-type-block {
    margin-bottom: 12px;
    padding: 14px;
}

.pay-type-block-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.pay-type-block-sub {
    font-size: 12px;
    margin: 0 0 12px;
    line-height: 1.4;
}

.pay-split-payer-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.pay-split-payer-chips .hall-guest-chip {
    flex: 1 1 calc(50% - 8px);
    min-width: 120px;
    justify-content: center;
}

.order-complete-title {
    color: #16a34a;
}

.order-complete-sheet .fa-circle-check {
    color: #16a34a;
}

.pay-split-status-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pay-split-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
}

.pay-split-status-row.is-remain {
    padding-top: 8px;
    border-top: 1px solid var(--color-border);
    font-weight: 700;
}

.pay-split-paid-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: #15803d;
    padding-left: 8px;
}

.pay-split-paid-row + .pay-split-paid-row {
    margin-top: 4px;
}

.pay-guest-money-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.pay-guest-money-card {
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 12px;
    padding: 10px 12px;
    background: var(--color-surface, #fff);
}

.pay-guest-money-card.is-paid {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.pay-guest-money-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.pay-guest-money-status {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pay-guest-money-status.is-paid {
    color: #15803d;
}

.pay-guest-money-status.is-due {
    color: #b45309;
}

.pay-guest-money-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pay-guest-money-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
}

.pay-guest-money-row.is-payable {
    margin-top: 2px;
    padding-top: 6px;
    border-top: 1px dashed var(--color-border, #e5e7eb);
    font-size: 15px;
}

.pay-guest-money-row.is-payable strong {
    font-size: 1.15rem;
    font-weight: 700;
}

.review-line-void-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fff5f5;
    color: #b91c1c;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
}

.review-line-void-btn:active {
    transform: scale(0.96);
    background: #fee2e2;
}

.review-guest-block .cart-line-row.is-readonly {
    grid-template-columns: 1fr auto auto minmax(44px, auto);
}

.cart-line-row.is-released {
    opacity: 0.72;
}

.btn-compact {
    font-size: 11px;
    padding: 4px 8px;
    min-height: 28px;
}

.cart-line-route {
    font-size: 11px;
    margin-top: 2px;
}

.order-flow-actions-stack .btn-block {
    width: 100%;
}

.order-flow-block-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin: 10px 0 6px;
}

.order-status-card {
    margin-bottom: 8px;
}

.order-status-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--color-primary);
    margin-top: 4px;
}

.order-flow-client-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.order-flow-client-row .chat-input {
    flex: 1;
}

.cart-line-row.is-readonly {
    opacity: 0.92;
}

.cart-line-row.is-readonly .cart-qty {
    font-weight: 700;
    color: var(--color-muted);
}

.pay-mode-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.pay-mode-tile {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    border-radius: 18px;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    min-height: 110px;
}

.pay-mode-tile i {
    font-size: 22px;
    color: var(--color-primary);
}

.pay-mode-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--color-neutral);
}

.pay-mode-sub {
    font-size: 10px;
    line-height: 1.3;
    color: var(--color-muted);
}

.pay-mode-tile.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.pay-submode-row {
    margin-top: 8px;
}

.pay-bonus-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.pay-client-badge {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--color-soft-bg);
    border: 1px solid color-mix(in srgb, var(--color-primary) 30%, transparent);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-neutral);
}

.pay-qr-image {
    width: 220px;
    height: 220px;
    border-radius: 18px;
    border: 1px solid var(--color-border);
    background: #fff;
    margin: 0 auto 12px;
    display: block;
}

.cart-line {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 5px 0;
    color: var(--color-neutral);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: 800;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--color-border);
    color: var(--color-primary);
    font-size: 15px;
}

.chat-wrap {
    display: flex;
    flex-direction: column;
    min-height: 480px;
}

.cashier-client-chat-wrap {
    min-height: 0;
    flex: 1;
}

.cashier-client-chat-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: 0;
}

.cashier-client-chat-threads {
    flex: 0 0 auto;
    max-height: 168px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-surface);
    margin-bottom: 10px;
}

.cashier-client-chat-thread {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    border-bottom: 1px solid var(--color-border);
    background: transparent;
    padding: 10px 12px;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
}

.cashier-client-chat-thread:last-child {
    border-bottom: none;
}

.cashier-client-chat-thread:hover {
    background: var(--color-surface-soft);
}

.cashier-client-chat-thread.active {
    background: color-mix(in srgb, var(--color-primary) 10%, var(--color-surface));
}

.cashier-client-chat-thread.has-needs-reply .cashier-client-chat-thread-title {
    font-weight: 700;
}

.cashier-client-chat-thread-title {
    font-size: 14px;
    line-height: 1.3;
    color: var(--color-neutral);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cashier-client-chat-thread-preview {
    font-size: 12px;
    line-height: 1.35;
    color: var(--color-muted, #64748b);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cashier-client-chat-thread-time {
    font-size: 10px;
    color: var(--color-muted, #94a3b8);
    margin-top: 3px;
}

.cashier-chat-reply-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 5px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 2px var(--color-surface), 0 0 8px rgba(239, 68, 68, 0.5);
    vertical-align: middle;
}

.cashier-chat-reply-dot.is-red {
    background: #ef4444;
    box-shadow: 0 0 0 2px var(--color-surface), 0 0 8px rgba(239, 68, 68, 0.5);
}

.cashier-chat-reply-dot.is-green {
    background: #22c55e;
    box-shadow: 0 0 0 2px var(--color-surface), 0 0 8px rgba(34, 197, 94, 0.45);
}

.cashier-chat-thread-badge {
    display: inline-block;
    margin-right: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    vertical-align: middle;
}

.cashier-chat-thread-badge.is-courier {
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
}

.cashier-trips-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.cashier-trips-day {
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 10px;
    padding: 6px 8px;
    font-size: 12px;
    background: var(--color-surface, #fff);
}

.cashier-trips-home-list,
#cashier-trips-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cashier-trip-card {
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 14px;
    padding: 12px;
    background: var(--color-surface, #fff);
}

.cashier-trip-card.is-compact {
    padding: 10px;
}

.cashier-trip-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 6px;
}

.cashier-trip-row {
    font-size: 12px;
    margin-top: 3px;
}

.cashier-trip-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.cashier-trip-badge.is-void {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.orders-completed-toggle.is-active {
    color: var(--color-primary, #cc5553);
    font-weight: 700;
}

.cashier-client-chat-thread.is-answered .cashier-client-chat-thread-title {
    font-weight: 600;
}

.cashier-client-chat-thread-claim,
.cashier-client-chat-thread-order {
    font-size: 11px;
    color: var(--color-muted, #64748b);
    margin-top: 2px;
}

.cashier-client-chat-pane {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.cashier-client-chat-pane-head {
    font-size: 13px;
    font-weight: 700;
    padding: 0 2px 8px;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 8px;
}

.cashier-client-chat-empty {
    padding: 16px 12px;
    font-size: 13px;
    color: var(--color-muted, #64748b);
    text-align: center;
}

.cashier-client-chat-pane .chat-messages {
    min-height: 0;
    flex: 1;
}

.chat-booking-picker {
    margin-bottom: 12px;
}

.chat-booking-picker select {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 12px 14px;
    font-size: 13px;
    font-family: inherit;
    background: var(--color-surface);
    color: var(--color-neutral);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 12px;
    min-height: 320px;
}

.chat-bubble {
    max-width: 82%;
    padding: 12px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-bubble.ai {
    align-self: flex-start;
    background: var(--color-surface-soft);
    border: 1px solid var(--color-border);
    border-bottom-left-radius: 6px;
    color: var(--color-neutral);
}

.chat-bubble.partner,
.chat-bubble.user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: #fff;
    border-bottom-right-radius: 6px;
}

.chat-time {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

.chat-input-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 6;
    background: var(--color-frame);
    padding-bottom: max(0px, var(--staff-kb-inset, 0px));
}

.chat-input-composer {
    border-radius: 18px;
    min-height: 44px;
    max-height: 132px;
    resize: none;
    overflow-y: hidden;
    line-height: 1.4;
    padding: 11px 16px;
    white-space: pre-wrap;
    word-break: break-word;
}

.staff-scroll-zone.staff-chat-view {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
}

[data-staff-panel="chat"]:not(.hidden) {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.staff-device-frame.is-keyboard-open .staff-scroll-zone.staff-chat-view {
    padding-bottom: 0;
}

.staff-order-chat-modal {
    position: absolute;
    inset: 52px 0 84px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    background: var(--color-frame);
    padding: 0 20px 12px;
}

.staff-order-chat-modal.hidden {
    display: none !important;
}

.staff-order-chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0 12px;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.staff-order-chat-header-title {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.staff-order-chat-header-sub {
    font-size: 11px;
    color: var(--color-muted, #64748b);
    margin-top: 2px;
}

.staff-order-chat-modal .chat-messages {
    flex: 1;
    min-height: 0;
    max-height: none;
}

.courier-order-contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.courier-home-active-card {
    margin-top: 12px;
}

.chat-input {
    flex: 1;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
    background: var(--color-surface-soft);
    font-family: inherit;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
    color: var(--color-neutral);
}

.settings-row:last-child {
    border-bottom: 0;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-end;
    z-index: 200;
}

/* Hall table catalog must sit above staff-tabbar (z-index:100) and remain clickable. */
#hall-table-picker-modal.modal-backdrop {
    z-index: 320;
    pointer-events: auto;
}

#hall-table-picker-modal .hall-table-chip {
    pointer-events: auto;
    touch-action: manipulation;
}

.modal-sheet {
    width: 100%;
    background: var(--color-surface);
    border-radius: 28px 28px 0 0;
    padding: 20px 20px 28px;
    max-height: 80%;
    overflow-y: auto;
    box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.12);
}

.modal-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--color-neutral);
}

.modal-textarea {
    width: 100%;
    min-height: 90px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 12px;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    margin: 12px 0;
    background: var(--color-surface-soft);
}

.qr-box {
    width: 180px;
    height: 180px;
    margin: 16px auto;
    border-radius: 22px;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 48px;
    background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-surface-soft) 100%);
    box-shadow: 0 2px 12px var(--color-shadow);
}

.pay-app-hint {
    font-size: 13px;
    margin-bottom: 14px;
    line-height: 1.45;
}

.pay-scan-primary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
    padding: 16px 18px;
}

.pay-manual-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 12px;
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pay-manual-divider::before,
.pay-manual-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.pay-scanned-hint {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--color-soft-bg);
    border: 1px solid var(--color-border);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
}

/* Full-frame overlay inside staff-device-frame (position:relative ancestor). */
#client-qr-scan-modal.modal-backdrop {
    position: absolute;
    inset: 0;
    z-index: 1400;
    align-items: stretch;
    background: rgba(15, 23, 42, 0.72);
}

#client-qr-scan-modal.modal-backdrop.is-open,
#client-qr-scan-modal.modal-backdrop.is-open.hidden {
    display: flex !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 5000 !important;
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: stretch;
}

#client-qr-scan-modal .client-qr-scan-sheet {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.client-qr-scan-sheet {
    max-width: 100%;
}

.client-qr-scanner-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    max-height: min(52vh, 420px);
    min-height: 220px;
    margin: 12px 0;
    border-radius: 20px;
    overflow: hidden;
    background: #111827;
    flex-shrink: 0;
}

.client-qr-scan-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0b1220;
    z-index: 0;
    opacity: 1;
    visibility: visible;
}

.client-qr-scanner-frame {
    position: absolute;
    inset: 18%;
    border: 2px solid rgba(255, 255, 255, 0.92);
    border-radius: 18px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    z-index: 1;
}

.client-qr-scanner-frame::after {
    content: '';
    position: absolute;
    left: 8%;
    right: 8%;
    top: 0;
    height: 2px;
    background: var(--color-primary);
    box-shadow: 0 0 12px var(--color-primary);
    animation: clientQrScanLine 2s ease-in-out infinite;
}

@keyframes clientQrScanLine {
    0% { top: 8%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 88%; opacity: 0; }
}

.client-qr-scan-status {
    font-size: 12px;
    text-align: center;
    margin-bottom: 10px;
    min-height: 32px;
}

.client-qr-photo-btn {
    cursor: pointer;
    text-align: center;
}

.client-qr-photo-btn input {
    display: none;
}

.staff-toast {
    position: absolute;
    left: 50%;
    bottom: 92px;
    transform: translateX(-50%) translateY(12px);
    background: rgba(17, 24, 39, 0.92);
    color: #fff;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s;
    z-index: 120;
    max-width: 86%;
    text-align: center;
}

.staff-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.empty-state {
    text-align: center;
    padding: 28px 12px;
    color: var(--color-muted);
    font-size: 13px;
}

.staff-consent-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 12px 0;
}

.staff-consent-check,
.cashier-consent-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 0;
    cursor: pointer;
    color: inherit;
}

.staff-consent-box,
.cashier-consent-box {
    width: 18px;
    height: 18px;
    border: 1px solid var(--color-border, #d1d5db);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    background: var(--color-surface, #fff);
}

.staff-consent-box i,
.cashier-consent-box i {
    display: none;
    font-size: 11px;
    color: #fff;
}

.staff-consent-check.is-checked .staff-consent-box,
.cashier-consent-check.is-checked .cashier-consent-box {
    background: var(--color-primary, #16a34a);
    border-color: var(--color-primary, #16a34a);
}

.staff-consent-check.is-checked .staff-consent-box i,
.cashier-consent-check.is-checked .cashier-consent-box i {
    display: block;
}

.staff-consent-text,
.cashier-consent-text {
    font-size: 12px;
    line-height: 1.4;
    color: var(--color-muted, #6b7280);
}

.staff-consent-link {
    color: var(--color-primary, #16a34a);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
}

.staff-consent-doc-modal {
    position: absolute;
    inset: 0;
    z-index: 300;
    background: var(--color-frame, #f2f2f7);
    display: flex;
    flex-direction: column;
}

.staff-consent-doc-modal--viewport {
    position: fixed;
    z-index: 2147482900;
}

.staff-consent-doc-header {
    height: 52px;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
}

.staff-consent-doc-title {
    font-size: 15px;
    font-weight: 800;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.staff-consent-doc-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.staff-consent-doc-content {
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 16px;
    padding: 16px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--color-neutral, #374151);
}

.staff-consent-doc-heading {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 12px;
}

.staff-consent-doc-footer {
    margin-top: 16px;
    padding-bottom: 8px;
}

.hidden {
    display: none !important;
}

#client-qr-scan-modal.is-open {
    display: flex !important;
    visibility: visible !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 5000 !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    align-items: stretch;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Flutter BusinessShell WebView — без phone mockup; касса сохраняет staff-tabbar */
html.business-login-embed,
html.business-staff-embed {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

html.business-login-embed .staff-viewport,
html.business-login-embed .staff-scale-slot,
html.business-login-embed .staff-scale-wrapper,
html.business-login-embed .staff-device-frame,
html.business-staff-embed .staff-viewport,
html.business-staff-embed .staff-scale-slot,
html.business-staff-embed .staff-scale-wrapper,
html.business-staff-embed .staff-device-frame {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    transform: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

html.business-login-embed .staff-notch,
html.business-login-embed .staff-status-bar,
html.business-staff-embed .staff-notch,
html.business-staff-embed .staff-status-bar {
    display: none !important;
}

html.business-login-embed .staff-scroll-zone {
    inset: 0 !important;
}

html.business-staff-embed .staff-scroll-zone {
    inset: 0 0 84px !important;
}

html.business-staff-embed .staff-tabbar {
    display: grid !important;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.hall-open-tables-carousel-wrap {
    margin: 0 0 8px;
}
.hall-open-tables-carousel-wrap[hidden] {
    display: none !important;
}
.hall-open-tables-carousel {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 0;
}
.hall-open-tables-chip {
    flex: 0 0 auto;
    margin: 0;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-neutral);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}
.hall-open-tables-chip.is-active {
    border-color: var(--color-primary);
    background: var(--color-soft-bg);
    color: var(--color-primary);
}

.hall-table-note-head-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-neutral);
    cursor: pointer;
    font-size: 16px;
}
.hall-table-note-head-btn.is-disabled,
.hall-table-note-head-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.hall-table-note-head-btn.has-note {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-soft-bg);
}
.hall-table-note-modal {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
}
.hall-table-note-modal .hall-table-note-sheet {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: none;
    min-height: 100%;
    margin: 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    border-radius: 0;
    background: var(--color-bg);
    box-sizing: border-box;
}
.hall-table-note-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.hall-table-note-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-neutral);
    cursor: pointer;
    font-size: 16px;
}
.hall-table-note-personas {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.hall-table-note-persona-chip {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    font-size: 12px;
    font-weight: 600;
}
.hall-table-note-new-guests {
    font-size: 12px;
    margin: 0;
}
.hall-table-note-input {
    width: 100%;
    min-height: 88px;
    resize: vertical;
    font-size: 15px;
    line-height: 1.4;
}
.hall-table-note-keyboard {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
}
.hall-table-note-kb-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}
.hall-table-note-kb-key {
    min-width: 28px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-neutral);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}
.hall-table-note-kb-key.hall-table-note-kb-wide {
    flex: 1 1 120px;
}
body.hall-table-note-modal-open {
    overflow: hidden;
}
