/* ============================================
   POS SYSTEM - Components
   Buttons, Cards, Tables Grid, Modals
   ============================================ */

/* ---- BUTTONS ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-base);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
    min-height: 44px;
}

.btn-primary {
    background: var(--orange);
    color: var(--text-inverse);
}
.btn-primary:hover { background: var(--orange-hover); }

.btn-success {
    background: var(--green);
    color: #fff;
}
.btn-success:hover { background: var(--green-hover); }

.btn-danger {
    background: var(--red);
    color: #fff;
}
.btn-danger:hover { background: var(--red-hover); }

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-surface-hover); }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--bg-surface); color: var(--text-primary); }

.btn-lg {
    padding: var(--space-lg) var(--space-xl);
    font-size: var(--text-lg);
    min-height: 56px;
}

.btn-sm {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--text-sm);
    min-height: 32px;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ---- TABLE GRID CARDS (All Sections view) ---- */
.tg-card    { flex-direction: column; gap: 2px; }
.tg-number  { font-size: var(--text-lg); font-weight: 700; color: var(--text-primary); line-height: 1.1; }
.tg-seats   { font-size: 11px; color: var(--text-muted); }
.tg-amount  { font-size: var(--text-sm); font-weight: 700; color: var(--green); }
.tg-server  { font-size: 11px; color: var(--orange); font-weight: 600; }

/* Elapsed time — centered at top of card */
.tg-elapsed {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    width: 100%;
    letter-spacing: 0.3px;
}

/* ---- TABLE GRID (Floor Plan) ---- */
.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: var(--space-md);
    padding: var(--space-lg);
    align-content: start;
}

.table-card {
    background: var(--bg-surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    font-family: 'Roboto', sans-serif;
    text-align: center;
}

.table-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.table-card[data-status="available"] {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.08);
}
.table-card[data-status="available"] .table-card-status-dot {
    background: var(--status-available);
}

.table-card[data-status="occupied"] {
    border-color: var(--status-occupied);
    background: rgba(245, 158, 11, 0.08);
}
.table-card[data-status="occupied"] .table-card-status-dot {
    background: var(--status-occupied);
}

.table-card[data-status="reserved"] {
    border-color: var(--status-reserved);
}
.table-card[data-status="reserved"] .table-card-status-dot {
    background: var(--status-reserved);
}

.table-card[data-status="billing"] {
    border-color: var(--status-billing);
    background: color-mix(in srgb, var(--status-billing) 8%, var(--bg-surface));
}
.table-card[data-status="billing"] .table-card-status-dot {
    background: var(--status-billing);
}

.table-card-number {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.table-card-info {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-xs);
    text-align: center;
}

.table-card-server {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-top: var(--space-xs);
}

/* Pending items indicator — animated clock */
.table-card-pending {
    font-size: 12px;
    font-weight: 700;
    color: #ef4444;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.table-card-pending span {
    font-size: 12px;
    animation: pendingPulse 1.5s ease-in-out infinite;
}
@keyframes pendingPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.table-card-status-dot {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* ---- MENU GRID ---- */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-sm);
    padding: var(--space-md);
}

.menu-item-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.menu-item-btn:hover {
    background: var(--bg-surface-hover);
    border-color: var(--orange);
}

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

.menu-item-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.menu-item-price {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--orange);
    margin-top: var(--space-xs);
}

/* Category tabs */
.category-tabs {
    display: flex;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    overflow-x: auto;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.category-tab {
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    background: transparent;
    transition: all var(--transition-fast);
    white-space: nowrap;
    border: 1px solid transparent;
}

.category-tab:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
}

.category-tab.active {
    color: #fff;
    background: var(--orange);
}

/* ---- ORDER PANEL ---- */
.order-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.order-panel-header {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: var(--text-lg);
}

.order-panel-items {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-sm);
}

.order-line {
    display: flex;
    align-items: flex-start;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--border);
    gap: var(--space-sm);
}

.order-line-qty {
    font-weight: 700;
    color: var(--orange);
    min-width: 28px;
    font-size: var(--text-sm);
}

.order-line-name {
    flex: 1;
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.order-line-modifier {
    font-size: var(--text-xs);
    color: var(--text-muted);
    padding-left: var(--space-lg);
}

.order-line-price {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 60px;
    text-align: right;
}

.order-panel-footer {
    border-top: 1px solid var(--border);
    padding: var(--space-md) var(--space-lg);
}

.order-total-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-xs) 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.order-total-row.grand-total {
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--text-primary);
    padding-top: var(--space-sm);
    border-top: 2px solid var(--border);
    margin-top: var(--space-xs);
}

.order-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

/* ---- MODAL ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    min-width: 380px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-title {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    margin-top: var(--space-xl);
}

/* ---- STATUS LEGEND ---- */
.status-legend {
    display: flex;
    gap: var(--space-lg);
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--text-xs);
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

.status-legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* ---- TOAST / NOTIFICATION ---- */
.toast {
    position: fixed;
    top: var(--space-xl);
    right: var(--space-xl);
    background: var(--bg-panel);
    color: var(--text-primary);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--green);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    font-size: var(--text-sm);
    font-weight: 600;
    animation: slideIn 0.3s ease;
}

.toast.error { border-left-color: var(--red); }
.toast.warning { border-left-color: var(--yellow); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ==================== FLOOR PLAN - VISUAL LAYOUT ==================== */
.fp-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.fp-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.fp-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-lg);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.fp-zones { display: flex; gap: 4px; flex: 1; overflow-x: auto; }

.fp-top-right { display: flex; gap: 6px; flex-shrink: 0; }

.fp-view-btn {
    padding: 8px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.fp-view-btn:hover { border-color: var(--text-muted); }
.fp-view-btn.active { background: var(--orange); border-color: var(--orange); color: #fff; }

.fp-canvas-area {
    flex: 1;
    overflow: hidden;
}

.fp-canvas-area.fp-canvas-visual {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
}

.fp-canvas-area.fp-canvas-grid {
    overflow-y: auto;
    align-content: start;
}

/* ---- Visual Canvas ---- */
.fp-visual-canvas {
    position: relative;
    background-color: #2a3a52;
    border: 2px solid var(--border);
    border-radius: 8px;
    flex-shrink: 0;
}
.fp-visual-canvas:not(.fp-has-image) {
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* ---- Table Buttons (visual) ---- */
.fv-table {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: box-shadow 0.12s, border-color 0.12s;
    z-index: 2;
    background: #253552;
    border: 2px solid rgba(255,255,255,0.15);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    font-family: 'Roboto', sans-serif;
}

.fv-table:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    border-color: var(--orange);
    z-index: 5;
}

.fv-table:active {
    transform: scale(0.96);
}

/* Shapes */
.fv-shape-square { border-radius: 8px; }
.fv-shape-round { border-radius: 50%; }
.fv-shape-rectangle { border-radius: 10px; }
.fv-shape-booth { border-radius: 10px; border-left: 5px solid #8b5cf6; }
.fv-shape-bar_stool { border-radius: 50%; }

/* Status colors */
.fv-status-available { border-color: var(--status-available); }
.fv-status-occupied  { border-color: var(--status-occupied); }
.fv-status-reserved  { border-color: var(--status-reserved); background: rgba(59,130,246,0.08); }
.fv-status-billing   { border-color: var(--status-billing); background: rgba(245,158,11,0.08); }

.fv-table-num {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.fv-table-info {
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 1px;
}

.fv-table-server {
    font-size: 8px;
    font-weight: 600;
    opacity: 0.85;
    margin-top: 1px;
    letter-spacing: 0.3px;
}

.fv-table-active {
    position: absolute;
    top: 3px;
    right: 5px;
    font-size: 8px;
    color: var(--orange);
}

.fv-table-balance {
    font-size: 14px;
    font-weight: 800;
    margin-top: 1px;
}

/* Pending items — animated clock on visual tables */
.fv-table-pending {
    position: absolute;
    bottom: 1px;
    right: 3px;
    line-height: 1;
}

/* Pure CSS animated clock */
.pending-clock {
    width: 18px;
    height: 18px;
    border: 2px solid #ef4444;
    border-radius: 50%;
    position: relative;
    animation: pendingPulse 1.5s ease-in-out infinite;
}
.pending-clock::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    width: 2px;
    height: 5px;
    background: #ef4444;
    transform-origin: bottom center;
    transform: translateX(-50%);
    animation: clockMinute 4s linear infinite;
}
.pending-clock::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 50%;
    width: 2px;
    height: 4px;
    background: #ff3333;
    transform-origin: bottom center;
    transform: translateX(-50%);
    animation: clockHour 8s linear infinite;
}
@keyframes clockMinute {
    from { transform: translateX(-50%) rotate(0deg); }
    to   { transform: translateX(-50%) rotate(360deg); }
}
@keyframes clockHour {
    from { transform: translateX(-50%) rotate(0deg); }
    to   { transform: translateX(-50%) rotate(360deg); }
}

/* Grid card pending — bigger clock */
.table-card-pending .pending-clock {
    width: 22px;
    height: 22px;
    border-width: 2px;
}
.table-card-pending .pending-clock::before {
    height: 6px;
    top: 3px;
}
.table-card-pending .pending-clock::after {
    height: 4px;
    top: 4px;
}

.table-card-balance {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--green);
    margin-top: var(--space-xs);
}

/* ---- Decorative Elements (visual) ---- */
.fv-element {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
}

.fv-element span { font-size: 14px; }

.fv-wall {
    background: #475569;
    border-radius: 2px;
}

.fv-divider {
    background: #334155;
    border-radius: 2px;
}

.fv-door {
    background: rgba(59, 130, 246, 0.12);
    border: 2px dashed #3b82f6;
    border-radius: 4px;
}

.fv-plant {
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid #22c55e;
    border-radius: 50%;
}

.fv-bar_counter {
    background: #78350f;
    border: 2px solid #92400e;
    border-radius: 6px;
}

.fv-bar_counter span { color: #fbbf24; }

.fv-host_stand {
    background: rgba(168, 85, 247, 0.1);
    border: 2px solid #a855f7;
    border-radius: 6px;
}

.fv-restroom {
    background: rgba(100, 116, 139, 0.1);
    border: 2px solid #64748b;
    border-radius: 6px;
}

.fv-label span {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
}

/* -- Furniture elements -- */
.fv-chair { background: rgba(168,85,247,0.12); border-color: #a855f7; border-radius: 50%; }
.fv-sofa { background: rgba(139,92,246,0.15); border-color: #8b5cf6; border-radius: 8px; }
.fv-armchair { background: rgba(139,92,246,0.12); border-color: #8b5cf6; border-radius: 10px; }
.fv-bench { background: #3f3f46; border: 1px solid #52525b; border-radius: 3px; }
.fv-counter { background: #44403c; border: 1px solid #78716c; border-radius: 4px; }
.fv-shelf { background: rgba(120,53,15,0.4); border: 1px solid #92400e; border-radius: 2px; }
.fv-podium { background: rgba(234,179,8,0.12); border-color: #eab308; border-radius: 6px; }

/* -- Decor elements -- */
.fv-fountain { background: rgba(56,189,248,0.12); border-color: #38bdf8; border-radius: 50%; }
.fv-statue { background: rgba(148,163,184,0.15); border-color: #94a3b8; border-radius: 6px; }
.fv-rug { background: rgba(180,83,9,0.12); border-color: #b45309; border-radius: 4px; border-style: dashed; }

/* -- Structure elements -- */
.fv-double_door { background: rgba(59,130,246,0.15); border-color: #3b82f6; }
.fv-window { background: rgba(125,211,252,0.15); border-color: #7dd3fc; border-style: dashed; }
.fv-pillar { background: #6b7280; border: 1px solid #9ca3af; border-radius: 2px; }
.fv-stairs { background: rgba(148,163,184,0.15); border-color: #94a3b8; border-radius: 4px; }

/* -- Facility elements -- */
.fv-kitchen { background: rgba(234,88,12,0.1); border-color: #ea580c; border-radius: 6px; }
.fv-cashier { background: rgba(34,197,94,0.1); border-color: #22c55e; border-radius: 6px; }
.fv-exit { background: rgba(239,68,68,0.12); border-color: #ef4444; }
.fv-storage { background: rgba(100,116,139,0.12); border-color: #64748b; border-radius: 4px; }

/* Round table cards in grid mode */
.table-card-round { border-radius: 50% !important; }

/* ---- GUEST COUNT MODAL ---- */
.guest-modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
}

.guest-modal {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 520px;
    max-width: 95vw;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.guest-modal-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--orange);
    text-align: center;
}

.guest-modal-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    text-align: center;
    margin-top: -10px;
}

.guest-modal-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    height: 80px;
}

.guest-modal-value {
    font-size: 48px;
    font-weight: 800;
    color: var(--text-primary);
    min-width: 60px;
    text-align: center;
}

.guest-modal-label {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 600;
}

.guest-modal-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.guest-pad-btn {
    height: 96px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.1s, border-color 0.1s;
}

.guest-pad-btn:hover {
    background: var(--bg-surface-hover);
}

.guest-pad-btn.clr {
    font-size: 16px;
    color: var(--text-secondary);
}

.guest-pad-btn.del {
    font-size: 28px;
    color: var(--red);
}

.guest-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.guest-modal-btn {
    height: 96px;
    border-radius: var(--radius-lg);
    border: none;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.1s;
}

.guest-modal-btn.cancel {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.guest-modal-btn.cancel:hover {
    background: var(--bg-surface-hover);
}

.guest-modal-btn.confirm {
    background: var(--green);
    color: #fff;
}

.guest-modal-btn.confirm:hover {
    filter: brightness(1.15);
}

/* ---- Zone tab badge ---- */
.zone-tab-badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: #06b6d4; color: #fff; border-radius: 10px;
    font-size: 10px; font-weight: 700; padding: 1px 5px; margin-left: 4px;
}

/* ---- Bar Tabs Canvas (zone view) ---- */
.bt-canvas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
    padding: var(--space-lg);
    align-content: start;
    width: 100%;
}

.bt-canvas-new-btn {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    min-height: 80px; cursor: pointer;
    color: var(--text-muted); font-size: var(--text-sm);
    transition: all var(--transition-fast);
}
.bt-canvas-new-btn:hover { border-color: #06b6d4; color: #06b6d4; background: rgba(6,182,212,0.05); }

.bt-canvas-card {
    background: var(--bg-surface);
    border: 1px solid #06b6d4;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex; flex-direction: column;
    gap: 6px; cursor: pointer;
    min-height: 80px;
    transition: all var(--transition-fast);
    background: rgba(6,182,212,0.04);
}
.bt-canvas-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: #22d3ee; }

.bt-canvas-top { display: flex; justify-content: space-between; align-items: flex-start; }
.bt-canvas-name { font-size: var(--text-lg); font-weight: 700; color: var(--text-primary); }
.bt-canvas-total { font-size: var(--text-xl); font-weight: 700; color: #06b6d4; }
.bt-canvas-bottom { display: flex; justify-content: space-between; align-items: center; }
.bt-canvas-meta { font-size: var(--text-xs); color: var(--text-muted); }
.bt-canvas-preauth { font-size: var(--text-xs); color: var(--text-secondary); }
.bt-canvas-status { font-size: 10px; font-weight: 700; letter-spacing: 0.5px; padding: 2px 6px; border-radius: 4px; }
.bt-canvas-status.open { background: rgba(245,158,11,0.15); color: var(--orange); }
.bt-canvas-status.sent { background: rgba(34,197,94,0.15); color: var(--green); }

/* ================================================
   BAR TABS PANEL - Slide-in side panel
   ================================================ */

.bt-panel {
    width: 0;
    overflow: hidden;
    background: var(--bg-primary);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: width 0.25s ease;
    flex-shrink: 0;
}
.bt-panel.open {
    width: 320px;
}

.bt-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.bt-title {
    font-size: 16px;
    font-weight: 800;
    flex: 1;
}
.bt-count {
    background: var(--orange);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}
.bt-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
}
.bt-close:hover { background: var(--bg-surface-hover); }

.bt-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.bt-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 16px;
    font-size: 14px;
}

.bt-item {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.12s;
    background: var(--bg-surface);
}
.bt-item:hover {
    border-color: var(--orange);
    background: rgba(255,152,0,0.04);
}
.bt-item:active {
    transform: scale(0.98);
}
.bt-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.bt-item-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}
.bt-item-total {
    font-size: 16px;
    font-weight: 800;
    color: var(--orange);
}
.bt-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.bt-item-card {
    font-size: 13px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.bt-item-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.bt-new {
    margin: 10px 8px 10px;
    height: 48px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.12s;
    flex-shrink: 0;
}
.bt-new:hover {
    border-color: var(--orange);
    color: var(--orange);
    background: rgba(255,152,0,0.04);
}

/* ---- New Tab Modal ---- */
.bt-modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.55);
    display: flex; align-items: center; justify-content: center;
}
.bt-modal {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    padding: 32px;
    width: 520px; max-width: 95vw;
    display: flex; flex-direction: column; gap: 20px;
}
.bt-modal-title {
    font-size: 26px; font-weight: 800; text-align: center;
}
.bt-modal-field {
    display: flex; flex-direction: column; gap: 8px;
}
.bt-modal-label {
    font-size: 13px; font-weight: 700; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.bt-modal-input {
    height: 56px;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    padding: 0 16px;
    width: 100%;
    box-sizing: border-box;
}
.bt-modal-input:focus {
    outline: none;
    border-color: var(--orange);
}
.bt-modal-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}
.bt-modal-actions {
    display: flex; flex-direction: column; gap: 10px;
}
.bt-modal-btn {
    flex: 1; height: 60px;
    border-radius: var(--radius-lg);
    font-size: 18px; font-weight: 700;
    cursor: pointer; border: none;
    transition: all 0.12s;
    min-height: 60px;
}
.bt-modal-btn.cancel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.bt-modal-btn.cancel:hover { background: var(--bg-surface-hover); }
.bt-modal-btn.confirm {
    background: var(--orange);
    color: #fff;
}
.bt-modal-btn.confirm:hover { filter: brightness(1.1); }


/* ==================== ZONE MANAGER ==================== */
.zone-manage-btn {
    font-size: 16px !important;
    padding: 4px 10px !important;
    opacity: 0.6;
    transition: opacity 0.15s;
}
.zone-manage-btn:hover { opacity: 1; }

.zm-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
}
.zm-modal {
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius-lg); width: 520px; max-width: 95vw;
    max-height: 85vh; display: flex; flex-direction: column;
    box-shadow: var(--shadow-lg);
}
.zm-header {
    display: flex; align-items: center; padding: 16px 20px;
    border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.zm-title { font-size: 18px; font-weight: 700; color: var(--text-primary); flex: 1; }
.zm-close {
    background: none; border: none; color: var(--text-muted);
    font-size: 20px; cursor: pointer; padding: 4px 8px;
}
.zm-close:hover { color: var(--text-primary); }

.zm-list {
    flex: 1; overflow-y: auto; padding: 12px;
    display: flex; flex-direction: column; gap: 8px;
}
.zm-empty {
    text-align: center; padding: 40px; color: var(--text-muted); font-size: 15px;
}
.zm-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; background: var(--bg-surface);
    border: 1px solid var(--border); border-radius: var(--radius-md);
}
.zm-color {
    width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.2);
}
.zm-color-stack {
    display: flex; flex-direction: column; gap: 4px; flex-shrink: 0;
}
.zm-floor-swatch {
    border-radius: 3px !important; width: 14px; height: 8px;
}
.zm-info { flex: 1; min-width: 0; }
.zm-name { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.zm-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.zm-default-badge {
    font-size: 11px; font-weight: 700; color: var(--orange);
    background: rgba(245,158,11,0.15); padding: 4px 10px;
    border-radius: var(--radius-sm); white-space: nowrap;
}
.zm-set-default {
    font-size: 12px; color: var(--text-muted); background: none;
    border: 1px solid var(--border); padding: 4px 10px;
    border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap;
}
.zm-set-default:hover { color: var(--orange); border-color: var(--orange); }

.zm-edit, .zm-del {
    background: none; border: none; font-size: 16px;
    cursor: pointer; padding: 4px; opacity: 0.6;
}
.zm-edit:hover, .zm-del:hover { opacity: 1; }

.zm-add-btn {
    margin: 12px; padding: 12px; font-size: 15px; font-weight: 600;
    background: rgba(59,130,246,0.1); color: var(--blue);
    border: 1px dashed var(--blue); border-radius: var(--radius-md);
    cursor: pointer; text-align: center;
}
.zm-add-btn:hover { background: rgba(59,130,246,0.2); }

/* Zone form modal */
.zm-form-modal {
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius-lg); width: 420px; max-width: 95vw;
    box-shadow: var(--shadow-lg);
}
.zm-form {
    padding: 16px 20px; display: flex; flex-direction: column; gap: 12px;
}
.zm-form label {
    font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: -6px;
}
.zm-form input[type="text"],
.zm-form input[type="number"] {
    padding: 10px 12px; background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-md); color: var(--text-primary);
    font-size: 15px; font-family: var(--font-primary);
}
.zm-form input[type="text"]:focus,
.zm-form input[type="number"]:focus {
    border-color: var(--border-focus); outline: none;
}
.zm-form input[type="color"] {
    width: 100%; height: 40px; border: 1px solid var(--border);
    border-radius: var(--radius-md); cursor: pointer; background: var(--bg-input);
}
.zm-form-row { display: flex; gap: 12px; }
.zm-form-col { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.zm-check-label {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px !important; font-weight: 500 !important;
    color: var(--text-primary) !important; cursor: pointer;
}
.zm-check-label input[type="checkbox"] {
    width: 18px; height: 18px; accent-color: var(--orange);
}
.zm-form-actions {
    display: flex; gap: 8px; padding: 12px 20px;
    border-top: 1px solid var(--border);
}
.zm-cancel {
    flex: 0 0 auto; padding: 10px 20px; background: var(--bg-surface);
    border: 1px solid var(--border); border-radius: var(--radius-md);
    color: var(--text-secondary); font-size: 14px; font-weight: 600; cursor: pointer;
}
.zm-cancel:hover { background: var(--bg-surface-hover); }
.zm-save {
    flex: 1; padding: 10px 20px; background: var(--blue);
    border: none; border-radius: var(--radius-md);
    color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
}
.zm-save:hover { filter: brightness(1.1); }

/* Floor color preview */
.zm-floor-preview {
    height: 48px; border-radius: var(--radius-md);
    border: 1px solid var(--border); position: relative;
    display: flex; align-items: center; justify-content: center;
}
.zm-preview-table {
    width: 28px; height: 28px; border-radius: var(--radius-sm);
    background: var(--bg-surface); border: 2px solid var(--border-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700; color: var(--text-primary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.zm-floor-preview-label { font-size: 12px !important; }

/* ==================== Action Modals (Transfer, Merge, Server, Guests) ==================== */
.action-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999; backdrop-filter: blur(4px);
}
.action-modal {
    background: var(--bg-primary); border-radius: var(--radius-xl);
    width: 90%; max-width: 520px; max-height: 80vh;
    display: flex; flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.action-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    font-size: 17px; font-weight: 700; color: var(--text-primary);
}
.action-modal-close {
    width: 32px; height: 32px; border-radius: var(--radius);
    border: 1px solid var(--border); background: var(--bg-surface);
    color: var(--text-secondary); font-size: 18px; cursor: pointer;
}
.action-modal-close:hover { background: var(--bg-surface-hover); }
.action-modal-body {
    padding: 16px 20px; overflow-y: auto; flex: 1;
}
.action-table-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}
.action-table-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 14px 8px; border-radius: var(--radius-lg);
    border: 2px solid var(--border); background: var(--bg-surface);
    cursor: pointer; transition: all 0.15s; min-height: 72px;
}
.action-table-btn:hover {
    border-color: var(--blue); background: rgba(59,130,246,0.08);
}
.action-table-btn.current {
    border-color: var(--green); background: rgba(34,197,94,0.1);
}
.action-table-num {
    font-size: 16px; font-weight: 800; color: var(--text-primary);
}
.action-table-info {
    font-size: 11px; color: var(--text-muted); margin-top: 2px;
}
.action-mode-btn {
    flex: 1; padding: 12px; border-radius: var(--radius-lg);
    border: 2px solid var(--border); background: var(--bg-surface);
    cursor: pointer; text-align: center; transition: all 0.15s;
    color: var(--text-secondary); font-size: 13px;
}
.action-mode-btn:hover { border-color: var(--blue); }
.action-mode-btn.active {
    border-color: var(--blue); background: rgba(59,130,246,0.1);
    color: var(--text-primary);
}
.action-mode-btn strong { display: block; font-size: 14px; color: var(--text-primary); }
.action-mode-btn small { color: var(--text-muted); }

/* ==================== Floor Plan Pick Mode ==================== */
.fp-pick-banner {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(245,158,11,0.1));
    border-bottom: 2px solid var(--blue);
    animation: fp-pick-pulse 2s ease-in-out infinite;
}
@keyframes fp-pick-pulse {
    0%, 100% { border-bottom-color: var(--blue); }
    50% { border-bottom-color: var(--orange); }
}
.fp-pick-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.fp-pick-info { flex: 1; }
.fp-pick-title {
    font-size: 16px; font-weight: 800; color: var(--text-primary);
}
.fp-pick-desc {
    font-size: 13px; color: var(--text-secondary); margin-top: 2px;
}
.fp-pick-desc strong { color: var(--text-primary); }
.fp-pick-cancel {
    padding: 8px 18px; border-radius: var(--radius-lg);
    border: 2px solid var(--red); background: transparent;
    color: var(--red); font-weight: 700; font-size: 13px;
    cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.fp-pick-cancel:hover {
    background: var(--red); color: #fff;
}

/* Dim non-selectable tables */
.fp-pick-dim {
    opacity: 0.25 !important;
    pointer-events: none;
    filter: grayscale(0.8);
}
/* Highlight selectable tables */
.fp-pick-highlight {
    animation: fp-table-glow 1.5s ease-in-out infinite;
    cursor: pointer !important;
}
@keyframes fp-table-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(59,130,246,0.4); }
    50% { box-shadow: 0 0 20px rgba(59,130,246,0.8), 0 0 40px rgba(59,130,246,0.3); }
}

/* ==================== Pick Confirm Modals (Touch-friendly) ==================== */
.pick-confirm-visual {
    display: flex; align-items: center; justify-content: center;
    gap: 16px; margin: 20px 0;
}
.pick-confirm-table {
    display: flex; flex-direction: column; align-items: center;
    padding: 16px 20px; border-radius: var(--radius-xl);
    border: 2px solid var(--border); background: var(--bg-surface);
    min-width: 100px;
}
.pick-confirm-table.highlight {
    border-color: var(--green); background: rgba(34,197,94,0.08);
}
.pick-confirm-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    color: var(--text-muted); letter-spacing: 0.5px;
}
.pick-confirm-num {
    font-size: 28px; font-weight: 900; color: var(--text-primary);
    margin: 4px 0 2px;
}
.pick-confirm-sub {
    font-size: 12px; color: var(--text-secondary);
}
.pick-confirm-arrow {
    font-size: 28px; font-weight: 900; color: var(--blue);
}
.pick-confirm-btn {
    flex: 1; padding: 16px; border-radius: var(--radius-lg);
    font-size: 16px; font-weight: 700; cursor: pointer;
    border: 2px solid transparent; transition: all 0.15s;
    min-height: 54px;
}
.pick-confirm-btn.cancel {
    background: var(--bg-surface); border-color: var(--border);
    color: var(--text-secondary);
}
.pick-confirm-btn.cancel:hover { background: var(--bg-surface-hover); }
.pick-confirm-btn.confirm {
    background: var(--blue); color: #fff; border-color: var(--blue);
}
.pick-confirm-btn.confirm:hover { filter: brightness(1.1); }
.pick-confirm-btn.confirm:disabled {
    opacity: 0.6; cursor: not-allowed;
}

/* Merge option buttons */
.pick-merge-option {
    display: flex; align-items: center; gap: 14px;
    padding: 16px; border-radius: var(--radius-lg);
    border: 2px solid var(--border); background: var(--bg-surface);
    cursor: pointer; transition: all 0.15s; width: 100%;
    text-align: left;
}
.pick-merge-option:hover {
    border-color: var(--blue); background: rgba(59,130,246,0.06);
}
.pick-merge-option:active {
    transform: scale(0.98);
}
.pick-merge-icon {
    font-size: 28px; flex-shrink: 0;
}
.pick-merge-info { flex: 1; }
.pick-merge-info strong {
    display: block; font-size: 15px; color: var(--text-primary);
    margin-bottom: 2px;
}
.pick-merge-info small {
    font-size: 12px; color: var(--text-muted); line-height: 1.3;
}

/* ============================================
   Payment Terminal Simulator (PAX A35)
   ============================================ */
.terminal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.55);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000;
    animation: termFadeIn 0.2s ease forwards;
    will-change: opacity;
}
@keyframes termFadeIn { from { opacity: 0; } to { opacity: 1; } }

.terminal-modal {
    background: #1a1a2e; border-radius: 20px;
    width: 92%; max-width: 480px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.08);
    overflow: hidden;
    animation: termSlideUp 0.3s ease forwards;
    will-change: transform;
}
@keyframes termSlideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.terminal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px;
    background: linear-gradient(135deg, #16213e, #0f3460);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.terminal-brand {
    font-size: 15px; font-weight: 800; color: #e2e8f0;
    letter-spacing: 1px;
}
.terminal-mode {
    font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
    padding: 3px 10px; border-radius: 20px;
    background: rgba(245,158,11,0.2); color: #f59e0b;
    text-transform: uppercase;
}

/* Screen area */
.terminal-screen {
    padding: 28px 24px;
    background: linear-gradient(180deg, #0f0f23 0%, #1a1a35 100%);
    min-height: 220px;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 16px;
}
.terminal-amount {
    font-size: 36px; font-weight: 900; color: #fff;
    letter-spacing: -1px;
    text-shadow: 0 0 20px rgba(59,130,246,0.3);
}

/* Card animation */
.terminal-anim {
    display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.terminal-card-icon {
    color: #64748b; transition: all 0.3s;
}
.terminal-card-icon.pulse {
    animation: termCardPulse 2s ease-in-out infinite;
    color: #3b82f6;
}
@keyframes termCardPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.08); opacity: 1; }
}
.terminal-insert-text {
    font-size: 15px; color: #94a3b8; font-weight: 600;
    animation: termBlink 2s ease-in-out infinite;
}
@keyframes termBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Card read display */
.terminal-card-read {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    animation: termFadeIn 0.4s ease;
}
.terminal-card-brand {
    font-size: 18px; font-weight: 700; color: #e2e8f0;
}
.terminal-card-number {
    font-size: 16px; font-weight: 600; color: #64748b;
    letter-spacing: 2px; font-family: 'Roboto Mono', monospace;
}

/* Status & progress */
.terminal-status {
    font-size: 14px; font-weight: 600; color: #94a3b8;
    min-height: 20px; transition: all 0.3s;
}
.terminal-status.processing {
    color: #3b82f6;
    animation: termBlink 1.2s ease-in-out infinite;
}
.terminal-progress {
    width: 100%; max-width: 260px; height: 4px;
    background: rgba(255,255,255,0.06); border-radius: 4px;
    overflow: hidden;
}
.terminal-progress-bar {
    height: 100%; width: 0%; border-radius: 4px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    transition: width 0.6s ease;
}

/* Result display */
.terminal-result {
    display: flex; flex-direction: column; align-items: center;
    gap: 12px; animation: termFadeIn 0.4s ease;
}
.terminal-result-icon {
    width: 64px; height: 64px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; font-weight: 900;
}
.terminal-result-icon.success {
    background: rgba(34,197,94,0.15); color: #22c55e;
    box-shadow: 0 0 30px rgba(34,197,94,0.2);
    animation: termSuccessPop 0.4s ease;
}
.terminal-result-icon.error {
    background: rgba(239,68,68,0.15); color: #ef4444;
    box-shadow: 0 0 30px rgba(239,68,68,0.2);
}
.terminal-result-icon.cancel {
    background: rgba(148,163,184,0.15); color: #94a3b8;
}
@keyframes termSuccessPop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}
.terminal-result-title {
    font-size: 22px; font-weight: 900; letter-spacing: 2px;
}
.terminal-result.success .terminal-result-title { color: #22c55e; }
.terminal-result.error .terminal-result-title { color: #ef4444; }
.terminal-result.cancel .terminal-result-title { color: #94a3b8; }

/* Receipt details */
.terminal-receipt {
    width: 100%; max-width: 260px;
    margin-top: 8px; padding: 12px 0;
    border-top: 1px dashed rgba(255,255,255,0.1);
}
.terminal-receipt-row {
    display: flex; justify-content: space-between;
    padding: 4px 0; font-size: 13px;
}
.terminal-receipt-row span:first-child { color: #64748b; }
.terminal-receipt-row span:last-child { color: #e2e8f0; font-weight: 600; font-family: 'Roboto Mono', monospace; }

.terminal-error-reason {
    font-size: 14px; color: #f87171; font-weight: 600;
    padding: 8px 16px; border-radius: 8px;
    background: rgba(239,68,68,0.1);
}

/* Controls */
.terminal-controls {
    padding: 16px 20px;
    background: #16162a;
    border-top: 1px solid rgba(255,255,255,0.04);
    display: flex; flex-direction: column; gap: 10px;
}
.terminal-sim-row {
    display: flex; gap: 8px;
}
.terminal-sim-btn {
    flex: 1; padding: 14px 8px; border-radius: 12px;
    border: 2px solid transparent;
    font-size: 14px; font-weight: 700;
    cursor: pointer; transition: all 0.15s;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.terminal-sim-btn span {
    font-size: 20px;
}
.terminal-sim-btn.approve {
    background: rgba(34,197,94,0.1); color: #22c55e;
    border-color: rgba(34,197,94,0.3);
}
.terminal-sim-btn.approve:hover { background: rgba(34,197,94,0.2); }
.terminal-sim-btn.approve:active { transform: scale(0.96); }

.terminal-sim-btn.decline {
    background: rgba(239,68,68,0.1); color: #ef4444;
    border-color: rgba(239,68,68,0.3);
}
.terminal-sim-btn.decline:hover { background: rgba(239,68,68,0.2); }
.terminal-sim-btn.decline:active { transform: scale(0.96); }

.terminal-sim-btn.timeout {
    background: rgba(245,158,11,0.1); color: #f59e0b;
    border-color: rgba(245,158,11,0.3);
}
.terminal-sim-btn.timeout:hover { background: rgba(245,158,11,0.2); }
.terminal-sim-btn.timeout:active { transform: scale(0.96); }

.terminal-cancel-btn {
    width: 100%; padding: 14px; border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: #94a3b8; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all 0.15s;
}
.terminal-cancel-btn:hover {
    background: rgba(255,255,255,0.08); color: #e2e8f0;
}

/* ---- Reorder Round Modal ---- */
.reorder-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.6);
    display: flex; align-items: center; justify-content: center;
    animation: reorderFadeIn 0.15s ease;
}
@keyframes reorderFadeIn { from { opacity: 0; } to { opacity: 1; } }

.reorder-modal {
    background: #0c1425;
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: 16px;
    width: 520px;
    max-height: 85vh;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 30px rgba(245,158,11,0.08);
    animation: reorderSlideUp 0.2s ease;
    overflow: hidden;
}
@keyframes reorderSlideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.reorder-header {
    padding: 18px 20px 14px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-style: italic;
    color: #f59e0b;
    letter-spacing: 0.5px;
}

.reorder-guests {
    display: flex;
    gap: 6px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    overflow-x: auto;
    flex-shrink: 0;
}

.reorder-guest-pill {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.15);
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}
.reorder-guest-pill:hover { background: rgba(255,255,255,0.06); }
.reorder-guest-pill.active {
    background: #f59e0b;
    color: #000;
    border-color: #f59e0b;
}

.reorder-seat {
    font-size: 11px;
    color: #f59e0b;
    font-weight: 600;
    margin-top: 2px;
}

.reorder-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.reorder-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.1s;
}
.reorder-item:last-child { border-bottom: none; }
.reorder-item:hover { background: rgba(255,255,255,0.03); }

.reorder-remove {
    width: 30px; height: 30px;
    border-radius: 8px;
    border: 1px solid rgba(239,68,68,0.3);
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    font-size: 14px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all 0.12s;
}
.reorder-remove:hover { background: #ef4444; color: #fff; border-color: #ef4444; }

.reorder-item-info {
    flex: 1;
    min-width: 0;
}
.reorder-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.reorder-mods {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: 4px;
}
.reorder-mod {
    font-size: 12px;
    color: #94a3b8;
}

.reorder-qty-ctrl {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.reorder-qty-btn {
    width: 40px; height: 40px;
    border-radius: 10px;
    border: none;
    font-size: 22px;
    font-weight: 800;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.1s;
}
.reorder-qty-btn:active { transform: scale(0.9); }
.reorder-qty-btn.plus {
    background: rgba(16,185,129,0.15);
    color: #34d399;
}
.reorder-qty-btn.plus:hover { background: rgba(16,185,129,0.25); }
.reorder-qty-btn.minus {
    background: rgba(239,68,68,0.12);
    color: #f87171;
}
.reorder-qty-btn.minus:hover { background: rgba(239,68,68,0.22); }

.reorder-qty-val {
    width: 38px;
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
}

.reorder-footer {
    display: flex;
    flex-direction: row-reverse;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.reorder-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.12s;
    letter-spacing: 0.3px;
}
.reorder-btn.accept {
    background: #f59e0b;
    color: #0c1425;
}
.reorder-btn.accept:hover { background: #fbbf24; }
.reorder-btn.accept:active { transform: scale(0.97); }
.reorder-btn.accept:disabled { opacity: 0.5; cursor: not-allowed; }
.reorder-btn.cancel {
    background: rgba(255,255,255,0.06);
    color: #94a3b8;
    border: 1px solid rgba(255,255,255,0.1);
}
.reorder-btn.cancel:hover { background: rgba(255,255,255,0.1); color: #e2e8f0; }

/* ---- Quick Order Name Prompt ---- */
.qop-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0,0,0,0.6);
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 40px;
    animation: reorderFadeIn 0.15s ease;
}
.qop-modal {
    background: #0c1425;
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: 16px;
    width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 30px rgba(245,158,11,0.08);
    animation: reorderSlideUp 0.2s ease;
    overflow: hidden;
}
.qop-header {
    padding: 18px 20px 14px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: #f59e0b;
    letter-spacing: 0.5px;
}
.qop-body {
    padding: 20px;
}
.qop-input {
    width: 100%;
    padding: 16px 18px;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    background: rgba(255,255,255,0.06);
    border: 2px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.qop-input:focus {
    border-color: #f59e0b;
    background: rgba(245,158,11,0.06);
}
.qop-input::placeholder {
    color: #475569;
    font-weight: 400;
}
.qop-quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.qop-tag {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: #94a3b8;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.12s;
}
.qop-tag:hover {
    background: rgba(245,158,11,0.12);
    border-color: rgba(245,158,11,0.3);
    color: #f59e0b;
}
.qop-tag:active { transform: scale(0.95); }
.qop-footer {
    display: flex;
    flex-direction: row-reverse;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.qop-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.12s;
    letter-spacing: 0.3px;
}
.qop-btn.accept {
    background: #f59e0b;
    color: #0c1425;
}
.qop-btn.accept:hover { background: #fbbf24; }
.qop-btn.accept:active { transform: scale(0.97); }
.qop-btn.cancel {
    background: rgba(255,255,255,0.06);
    color: #94a3b8;
    border: 1px solid rgba(255,255,255,0.1);
}
.qop-btn.cancel:hover { background: rgba(255,255,255,0.1); color: #e2e8f0; }

/* ---- Item Note Modal - price row ---- */
.note-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.06);
}
.note-price-label {
    font-size: 14px;
    font-weight: 600;
    color: #cbd5e1;
}
.note-price-input-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}
.note-price-sign {
    font-size: 18px;
    font-weight: 700;
    color: #f59e0b;
}
.note-price-input {
    width: 90px;
    padding: 10px 12px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    outline: none;
    text-align: right;
}
.note-price-input:focus {
    border-color: #f59e0b;
}

/* ---- Manager PIN Override Modal ---- */
.mgr-pin-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.mgr-pin-modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 340px;
    max-width: 90vw;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.mgr-pin-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    justify-content: center;
}
.mgr-pin-icon { font-size: 24px; }
.mgr-pin-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
}
.mgr-pin-reason {
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-bottom: 20px;
    line-height: 1.4;
}
.mgr-pin-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
    min-height: 20px;
}
.mgr-pin-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--border);
    transition: all 0.15s;
}
.mgr-pin-dot.filled {
    background: var(--orange);
    border-color: var(--orange);
}
.mgr-pin-error {
    text-align: center;
    color: var(--danger);
    font-size: var(--text-sm);
    min-height: 20px;
    margin-bottom: 8px;
}
.mgr-pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.mgr-pin-key {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    user-select: none;
    transition: all var(--transition-fast);
}
.mgr-pin-key:active {
    background: var(--orange);
    color: var(--bg-primary);
    border-color: var(--orange);
}
.mgr-pin-cancel {
    font-size: var(--text-sm) !important;
    color: var(--text-secondary) !important;
}
.mgr-pin-cancel:active {
    background: var(--danger) !important;
    color: white !important;
    border-color: var(--danger) !important;
}
.mgr-pin-back {
    font-size: var(--text-lg) !important;
}
.mgr-pin-dots.shake {
    animation: mgr-shake 0.4s;
}
@keyframes mgr-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}
.mgr-pin-submit {
    margin-top: 10px;
    width: 100%;
    height: 64px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--success);
    font-size: var(--text-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    letter-spacing: 1px;
}
.mgr-pin-submit:active {
    background: var(--success);
    color: white;
    border-color: var(--success);
}
