/* ============================================================
   CentralPOS — Design System v2 (Light Theme)
   Primary: #16a34a  |  BG: #f0fdf4  |  Font: Manrope
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #16a34a;
    --primary-bright: #13ec6d;
    --primary-dim: rgba(22, 163, 74, 0.10);
    --primary-glow: rgba(22, 163, 74, 0.20);
    --bg-base: #f1f5f9;
    --bg-card: #ffffff;
    --bg-elevated: #f8fafc;
    --bg-surface: #e2e8f0;
    --border: rgba(22, 163, 74, 0.15);
    --border-subtle: rgba(0, 0, 0, 0.07);
    --text-primary: #0f1f15;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --red: #dc2626;
    --red-dim: rgba(220, 38, 38, 0.08);
    --amber: #d97706;
    --blue: #2563eb;
    --blue-dim: rgba(37, 99, 235, 0.08);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.09), 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 20px rgba(22, 163, 74, 0.18);
    --transition: all 0.16s ease;
}

/* ── Reset ────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Manrope', sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
}

input,
select,
textarea {
    font-family: inherit;
    outline: none;
}

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1fae5;
    border-radius: 10px;
}

/* ── Views ────────────────────────────────────────────────── */
.view {
    display: none !important;
}

.view.active {
    display: flex !important;
}

/* ════════════════════════════════════════════════════════════
   LOGIN
════════════════════════════════════════════════════════════ */
#loginView {
    flex-direction: column;
    align-items: stretch;
    height: 100vh;
    background: #f6f8f7;
    position: relative;
    overflow: hidden;
    font-family: 'Manrope', var(--font), sans-serif;
}

/* Orbes de fondo — degradado sutil verde */
.login-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.login-orb.top {
    width: 55vw;
    height: 55vw;
    top: -18%;
    left: -12%;
    background: radial-gradient(circle, rgba(148, 163, 184, 0.12) 0%, rgba(148, 163, 184, 0.04) 70%, transparent 100%);
    filter: blur(40px);
}

.login-orb.bottom {
    width: 38vw;
    height: 38vw;
    bottom: -12%;
    right: -8%;
    background: radial-gradient(circle, rgba(148, 163, 184, 0.08) 0%, rgba(148, 163, 184, 0.02) 70%, transparent 100%);
    filter: blur(50px);
}

/* ── Header bar ── */
.login-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.login-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-header-logo {
    width: 34px;
    height: 34px;
    background: #13ec6d;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.login-header-logo .material-symbols-outlined {
    font-size: 20px;
    color: #fff;
}

.login-header-name {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -.02em;
}

.login-header-actions {
    display: flex;
    gap: 6px;
}

.login-header-btn {
    width: 36px;
    height: 36px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s;
}

.login-header-btn .material-symbols-outlined {
    font-size: 18px;
    color: #64748b;
}

.login-header-btn:hover {
    background: #e2e8f0;
}

/* ── Clock ── */
.login-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 0 16px;
    position: relative;
    z-index: 5;
}

.login-clock-area {
    text-align: center;
    margin-bottom: 14px;
    position: relative;
    z-index: 5;
}

.login-time {
    font-size: 48px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1;
    letter-spacing: -.03em;
    font-family: 'Manrope', sans-serif;
}

.login-date {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    margin-top: 4px;
    font-family: 'Manrope', sans-serif;
}

/* ── Card ── */
.login-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    padding: 20px 24px 20px;
    width: 100%;
    max-width: 370px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.09), 0 1px 3px rgba(0, 0, 0, 0.04);
    position: relative;
    z-index: 5;
}

.login-card-header {
    text-align: center;
    margin-bottom: 14px;
}

.login-icon {
    width: 50px;
    height: 50px;
    background: rgba(19, 236, 109, 0.10);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}

.login-icon .material-symbols-outlined {
    font-size: 30px;
    color: #13ec6d;
}

.login-card-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -.02em;
    font-family: 'Manrope', sans-serif;
}

.login-card-subtitle {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
    line-height: 1.4;
    font-family: 'Manrope', sans-serif;
}

/* PIN Dots */
.pin-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 14px;
}

.pin-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    transition: all .15s ease;
}

.pin-dot.filled {
    background: #13ec6d;
    border-color: #13ec6d;
    box-shadow: 0 0 10px rgba(19, 236, 109, 0.45);
    transform: scale(1.05);
}

.pin-dot.error {
    background: #ef4444;
    border-color: #ef4444;
    animation: shake .35s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0)
    }

    25% {
        transform: translateX(-5px)
    }

    75% {
        transform: translateX(5px)
    }
}

/* Keypad */
.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.key-btn {
    height: 54px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    transition: background .12s, transform .1s, border-color .12s;
    touch-action: manipulation;
    user-select: none;
    font-family: 'Manrope', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
}

.key-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.key-btn:active {
    transform: scale(0.92);
    background: rgba(19, 236, 109, 0.08);
    border-color: rgba(19, 236, 109, 0.30);
}

.key-btn.delete {
    color: #ef4444;
    background: #fef2f2;
    border-color: #fecaca;
}

.key-btn.delete:hover {
    background: #fee2e2;
}

.key-btn.confirm {
    background: #13ec6d;
    border-color: #13ec6d;
    color: #0f172a;
    font-weight: 900;
    box-shadow: 0 3px 12px rgba(19, 236, 109, 0.40);
}

.key-btn.confirm:hover {
    background: #0ed663;
    box-shadow: 0 4px 16px rgba(19, 236, 109, 0.55);
}

/* ── Barra de estado inferior ── */
.login-status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 10px 16px 14px;
    flex-shrink: 0;
    position: relative;
    z-index: 5;
}

.login-status-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-family: 'Manrope', sans-serif;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #13ec6d;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 5px rgba(19, 236, 109, 0.5);
}

/* ── Clases legacy mantenidas para no romper JS ── */
.login-footer {
    display: none;
}

.login-footer-info {
    display: none;
}

.login-change-user {
    display: none;
}



/* ════════════════════════════════════════════════════════════
   APP SHELL
════════════════════════════════════════════════════════════ */
#appShell {
    flex-direction: column;
    height: 100vh;
    width: 100%;
}

/* Top Bar */
.topbar {
    height: 54px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    z-index: 200;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-logo {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-logo .material-symbols-outlined {
    font-size: 19px;
    color: #fff;
}

.topbar-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
}

.topbar-sub {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

.topbar-clock {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
}

.topbar-staff {
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 4px 10px 4px 4px;
}

.staff-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary-dim);
    border: 1.5px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: var(--primary);
}

.staff-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.staff-role {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--primary);
}

.role-badge {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 2px 6px;
    border-radius: 4px;
}

.role-badge.waiter {
    background: var(--primary-dim);
    color: var(--primary);
}

.role-badge.manager {
    background: var(--blue-dim);
    color: var(--blue);
}

.role-badge.admin {
    background: rgba(239, 68, 68, 0.08);
    color: var(--red);
}

.role-badge.kitchen {
    background: rgba(245, 158, 11, 0.1);
    color: var(--amber);
}

.role-badge.captain {
    background: rgba(139, 92, 246, .1);
    color: #7c3aed;
}


.icon-btn {
    width: 34px;
    height: 34px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.icon-btn:hover {
    border-color: var(--border);
    color: var(--text-primary);
}

.icon-btn .material-symbols-outlined {
    font-size: 18px;
}

.icon-btn.danger:hover {
    border-color: rgba(220, 38, 38, 0.25);
    color: var(--red);
    background: var(--red-dim);
}

/* ════════════════════════════════════════════════════════════
   MAIN AREA + LAYOUT
════════════════════════════════════════════════════════════ */
.main-area {
    flex: 1;
    display: flex;
    overflow: hidden;
    height: calc(100vh - 54px);
}

/* Sidebar */
.sidebar {
    width: 200px;
    flex-shrink: 0;
    background: var(--bg-card);
    border-right: 1px solid var(--border-subtle);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-label {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    padding: 0 6px;
    margin-bottom: 6px;
    margin-top: 4px;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    text-align: left;
}

.sidebar-btn .material-symbols-outlined {
    font-size: 18px;
}

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

.sidebar-btn.primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 6px var(--primary-glow);
    margin-bottom: 4px;
}

.sidebar-btn.primary:hover {
    background: #15803d;
}

.sidebar-btn.danger:hover {
    background: var(--red-dim);
    color: var(--red);
}

.sidebar-spacer {
    flex: 1;
}

/* ════════════════════════════════════════════════════════════
   TABLES VIEW
════════════════════════════════════════════════════════════ */
#tablesView {
    flex-direction: row;
    flex: 1;
    overflow: hidden;
}

.tables-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tables-toolbar {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.tables-toolbar-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
}

.tables-toolbar-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}

.zone-tabs {
    display: flex;
    gap: 5px;
    overflow-x: auto;
}

.zone-tab {
    padding: 6px 14px;
    border-radius: 99px;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    border: 1.5px solid var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: pointer;
    touch-action: manipulation;
}

.zone-tab:hover {
    border-color: var(--border);
    color: var(--text-primary);
}

.zone-tab.active {
    background: var(--text-primary);
    color: #fff;
    border-color: var(--text-primary);
}

.tables-grid {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    align-content: start;
}

/* Table Cards */
.table-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    touch-action: manipulation;
    user-select: none;
}

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

.table-card:active {
    transform: scale(0.97);
}

.table-card.open {
    border-color: #93c5fd;
    background: linear-gradient(135deg, #fff 0%, #eff6ff 100%);
}

.table-card.open:hover {
    border-color: var(--blue);
}

.table-card.available:hover {
    border-color: var(--primary);
}

.table-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
}

.table-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-icon .material-symbols-outlined {
    font-size: 17px;
}

.table-card.available .table-icon {
    background: var(--bg-surface);
    color: var(--text-muted);
}

.table-card.open .table-icon {
    background: var(--blue-dim);
    color: var(--blue);
}

.table-badge {
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .07em;
    padding: 2px 6px;
    border-radius: 4px;
}

.table-badge.open {
    background: var(--blue-dim);
    color: var(--blue);
}

.table-badge.available {
    background: var(--bg-surface);
    color: var(--text-muted);
}

.table-number {
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 2px;
}

.table-card.available .table-number {
    color: var(--text-muted);
}

.table-card.open .table-number {
    color: var(--text-primary);
}

.table-zone {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
}

.table-amount {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
    font-size: 13px;
    font-weight: 800;
    color: var(--blue);
    display: flex;
    align-items: center;
    gap: 5px;
}

.table-amount .pulse {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary);
    animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: .3
    }
}

.table-disponible {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.table-disponible::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-muted);
    display: inline-block;
}

/* ════════════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════════════ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 800;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    touch-action: manipulation;
}

.btn-primary:hover {
    background: #15803d;
    box-shadow: var(--shadow-glow);
}

.btn-primary .material-symbols-outlined {
    font-size: 16px;
}

.btn-secondary {
    flex: 1;
    padding: 11px;
    border-radius: var(--radius);
    background: var(--bg-elevated);
    border: 1.5px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
}

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

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: var(--red-dim);
    color: var(--red);
    border: 1.5px solid rgba(220, 38, 38, 0.15);
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 800;
    transition: var(--transition);
    cursor: pointer;
}

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

/* ════════════════════════════════════════════════════════════
   MODALS
════════════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: 22px 22px 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.modal-title {
    font-size: 18px;
    font-weight: 800;
}

.modal-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

.close-btn {
    width: 32px;
    height: 32px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
    flex-shrink: 0;
    cursor: pointer;
}

.close-btn:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.close-btn .material-symbols-outlined {
    font-size: 17px;
}

.modal-body {
    padding: 18px 22px;
}

.modal-footer {
    padding: 0 22px 22px;
    display: flex;
    gap: 8px;
}

/* Form */
.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    background: var(--bg-elevated);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 10px 13px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-dim);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Type grid */
.type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.type-btn {
    padding: 11px 6px;
    border-radius: var(--radius);
    background: var(--bg-elevated);
    border: 1.5px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
    cursor: pointer;
    touch-action: manipulation;
}

.type-btn .material-symbols-outlined {
    font-size: 20px;
}

.type-btn:hover {
    border-color: var(--border);
    color: var(--text-primary);
}

.type-btn.selected {
    background: var(--primary-dim);
    border-color: var(--primary);
    color: var(--primary);
}

/* ════════════════════════════════════════════════════════════
   ORDER VIEW (Comandero)
════════════════════════════════════════════════════════════ */
#orderView {
    flex: 1;
    flex-direction: row;
    overflow: hidden;
}

/* Order Topbar */
.order-topbar {
    height: 48px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    flex-shrink: 0;
}

.order-topbar-info {
    flex: 1;
    min-width: 0;
}

.order-topbar-table {
    font-size: 14px;
    font-weight: 800;
}

.order-topbar-folio {
    font-size: 11px;
    color: var(--primary);
    font-weight: 700;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1.5px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
    flex-shrink: 0;
    touch-action: manipulation;
}

.btn-back .material-symbols-outlined {
    font-size: 17px;
}

.btn-back:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border);
}

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

/* Catalog */
.catalog-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.catalog-header {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.catalog-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-elevated);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 8px 12px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-elevated);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 10px 14px;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-box span {
    color: var(--text-muted);
}

.catalog-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-dim);
}

.catalog-search input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
}

.catalog-search input::placeholder {
    color: var(--text-muted);
}

.catalog-search .material-symbols-outlined {
    font-size: 17px;
    color: var(--text-muted);
}

.category-bar {
    display: flex;
    gap: 5px;
    padding: 8px 14px;
    overflow-x: auto;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.cat-tab {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 99px;
    border: 1.5px solid var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    transition: var(--transition);
    cursor: pointer;
    touch-action: manipulation;
}

.cat-tab .material-symbols-outlined {
    font-size: 14px;
}

.cat-tab:hover {
    border-color: var(--border);
    color: var(--text-primary);
}

.cat-tab.active {
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: #fff;
}

.products-grid {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
    gap: 8px;
    align-content: start;
}

.chip {
    background: var(--bg-surface);
    border: 1.5px solid var(--border-subtle);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.chip:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.product-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 12px 8px;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    box-shadow: var(--shadow-sm);
    touch-action: manipulation;
    user-select: none;
}

.product-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-card);
    transform: translateY(-1px);
}

.product-card:active {
    transform: scale(0.95);
}

.product-card.disabled-86 {
    opacity: 0.65;
    filter: grayscale(0.7);
    border-style: dashed;
    background: #fafafa;
}

.product-card.disabled-86:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border-subtle);
}

.product-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    overflow: hidden;
}

.product-name {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

.product-price {
    font-size: 13px;
    font-weight: 900;
    color: var(--primary);
}

/* Order Panel */
.order-panel {
    width: 290px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-left: 1px solid var(--border-subtle);
    overflow: hidden;
}

.order-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.order-count {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
}

.order-items {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.order-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    padding: 24px;
    text-align: center;
}

.order-empty .material-symbols-outlined {
    font-size: 38px;
    opacity: .4;
}

.order-empty p {
    font-size: 12px;
}

.order-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px;
    border-radius: var(--radius);
    margin-bottom: 3px;
    transition: var(--transition);
}

.order-item:hover {
    background: var(--bg-surface);
}

.order-item.order-item--pending, .order-item.order-item--sent {
    cursor: pointer;
    user-select: none;
}

.order-item.order-item--pending:hover {
    background: var(--primary-dim);
}

.order-item.order-item--sent:hover {
    background: var(--bg-surface-elevated);
    box-shadow: inset 0 0 0 1px var(--primary-dim);
}

.item-qty {
    min-width: 26px;
    height: 26px;
    border-radius: var(--radius-sm);
    background: var(--primary-dim);
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-mods {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 1px;
}

.item-price {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-secondary);
    white-space: nowrap;
}

.item-remove {
    color: var(--text-muted);
    background: none;
    display: flex;
    align-items: center;
    transition: var(--transition);
    cursor: pointer;
}

.item-remove .material-symbols-outlined {
    font-size: 14px;
}

.item-remove:hover {
    color: var(--red);
}

/* ── Estado: ítem enviado a cocina ── */
.order-item--pending {
    border-left: 3px solid var(--primary);
    padding-left: 6px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.order-item--sent {
    opacity: .85;
}

.item-qty.sent {
    background: rgba(37, 99, 235, 0.08);
    color: var(--blue);
}

.item-sent-badge {
    font-size: 9px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 1px;
    letter-spacing: .02em;
}

/* ── Botón cancelar ítem enviado (solo manager) ── */
.item-cancel-sent {
    color: var(--text-muted);
    background: none;
    display: flex;
    align-items: center;
    transition: var(--transition);
    cursor: pointer;
    border-radius: var(--radius-sm);
    padding: 2px;
    opacity: 0;
}

.order-item:hover .item-cancel-sent {
    opacity: 1;
}

.item-cancel-sent .material-symbols-outlined {
    font-size: 14px;
}

.item-cancel-sent:hover {
    color: var(--red);
    background: var(--red-dim);
}

.order-totals {
    padding: 10px 14px;
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
    background: var(--bg-elevated);
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 3px;
}

.total-row.grand {
    font-size: 17px;
    font-weight: 900;
    color: var(--text-primary);
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px solid var(--border-subtle);
}

.order-actions {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}

.order-actions-row {
    display: flex;
    gap: 6px;
}

/* ── Comanda (Enviar a Cocina) ── oscuro */
.btn-comanda {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 8px;
    background: #1e293b;
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    touch-action: manipulation;
    white-space: nowrap;
}

.btn-comanda .material-symbols-outlined {
    font-size: 16px;
}

.btn-comanda:hover:not(:disabled) {
    background: #0f172a;
}

.btn-comanda:disabled {
    opacity: .35;
    pointer-events: none;
}

/* ── Cerrar Cuenta ── rojo outline */
.btn-close-table {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 8px;
    background: var(--red-dim);
    color: var(--red);
    border: 1.5px solid rgba(220, 38, 38, 0.18);
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    touch-action: manipulation;
    white-space: nowrap;
}

.btn-close-table .material-symbols-outlined {
    font-size: 16px;
}

.btn-close-table:hover:not(:disabled) {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

.btn-close-table:disabled {
    opacity: .35;
    pointer-events: none;
}

/* ── Pagar ── verde grande */
.btn-pay {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 900;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    touch-action: manipulation;
    letter-spacing: .03em;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-pay .material-symbols-outlined {
    font-size: 20px;
}

.btn-pay:hover:not(:disabled) {
    background: #15803d;
    box-shadow: var(--shadow-glow);
}

.btn-pay:disabled {
    opacity: .35;
    pointer-events: none;
}

/* ════════════════════════════════════════════════════════════
   MODIFIERS MODAL
════════════════════════════════════════════════════════════ */
.modifier-options {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.mod-btn {
    padding: 6px 12px;
    border-radius: 99px;
    border: 1.5px solid var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    touch-action: manipulation;
}

.mod-btn:hover {
    border-color: var(--border);
    color: var(--text-primary);
}

.mod-btn.selected {
    background: var(--primary-dim);
    border-color: var(--primary);
    color: var(--primary);
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-elevated);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius);
    overflow: hidden;
}

.qty-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    color: var(--primary);
    font-size: 22px;
    font-weight: 800;
    transition: var(--transition);
    cursor: pointer;
    touch-action: manipulation;
}

.qty-btn:hover {
    background: var(--primary-dim);
}

.qty-val {
    min-width: 38px;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
}

/* ════════════════════════════════════════════════════════════
   CHECKOUT MODAL
════════════════════════════════════════════════════════════ */
.checkout-modal {
    max-width: 760px;
}

.checkout-body {
    display: flex;
    gap: 0;
}

.checkout-left {
    flex: 1;
    padding: 18px 20px;
    border-right: 1px solid var(--border-subtle);
}

.checkout-right {
    width: 250px;
    padding: 18px;
}

.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 14px;
}

.pay-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 13px 6px;
    border-radius: var(--radius);
    background: var(--bg-elevated);
    border: 1.5px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    gap: 4px;
    transition: var(--transition);
    cursor: pointer;
    touch-action: manipulation;
}

.pay-btn .material-symbols-outlined {
    font-size: 22px;
}

.pay-btn:hover {
    border-color: var(--border);
    color: var(--text-primary);
}

.pay-btn.selected {
    background: var(--primary-dim);
    border-color: var(--primary);
    color: var(--primary);
}

.tip-row {
    display: flex;
    gap: 5px;
}

.tip-chip {
    flex: 1;
    padding: 8px;
    text-align: center;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
    touch-action: manipulation;
}

.tip-chip.selected {
    background: var(--primary-dim);
    border-color: var(--primary);
    color: var(--primary);
}

.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

.num-btn {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1.5px solid var(--border-subtle);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    transition: var(--transition);
    cursor: pointer;
    touch-action: manipulation;
}

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

.num-btn:active {
    transform: scale(0.92);
}

.num-btn.bksp {
    color: var(--red);
}

.amount-display {
    background: var(--bg-elevated);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 10px 12px;
    text-align: right;
    margin-bottom: 8px;
}

.amount-display .amount {
    font-size: 24px;
    font-weight: 900;
    color: var(--text-primary);
}

.amount-display .label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
}

.change-display {
    background: var(--primary-dim);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 9px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.change-display .label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
}

.change-display .amount {
    font-size: 17px;
    font-weight: 900;
    color: var(--primary);
}

/* ════════════════════════════════════════════════════════════
   TOAST
════════════════════════════════════════════════════════════ */
.toast-container {
    position: fixed;
    bottom: 18px;
    right: 18px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 11px 15px;
    display: flex;
    align-items: center;
    gap: 9px;
    box-shadow: var(--shadow-card);
    font-size: 13px;
    font-weight: 600;
    animation: slideIn .2s ease;
    max-width: 300px;
}

.toast.success {
    border-color: rgba(22, 163, 74, 0.25);
}

.toast.error {
    border-color: rgba(220, 38, 38, 0.25);
}

.toast .material-symbols-outlined {
    font-size: 17px;
    flex-shrink: 0;
}

.toast.success .material-symbols-outlined {
    color: var(--primary);
}

.toast.error .material-symbols-outlined {
    color: var(--red);
}

@keyframes slideIn {
    from {
        transform: translateX(110%);
        opacity: 0
    }

    to {
        transform: translateX(0);
        opacity: 1
    }
}

/* ════════════════════════════════════════════════════════════
   LOADING
════════════════════════════════════════════════════════════ */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: var(--bg-base);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    transition: opacity .3s ease;
}

.spinner {
    width: 38px;
    height: 38px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

.loading-text {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ════════════════════════════════════════════════════════════
   COURSE / TIEMPO SELECTOR
════════════════════════════════════════════════════════════ */
.course-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius);
    margin-bottom: 14px;
}

.course-row-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
}

.course-selector {
    display: flex;
    gap: 6px;
}

.course-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 54px;
    padding: 7px 4px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-subtle);
    background: var(--bg-card);
    cursor: pointer;
    transition: var(--transition);
    touch-action: manipulation;
    font-family: inherit;
}

.course-btn-num {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-secondary);
    line-height: 1;
}

.course-btn-label {
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    margin-top: 2px;
}

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

.course-btn:active {
    transform: scale(0.93);
}

.course-btn.selected {
    background: var(--primary-dim);
    border-color: var(--primary);
}

.course-btn.selected .course-btn-num {
    color: var(--primary);
}

.course-btn.selected .course-btn-label {
    color: var(--primary);
}

/* Badge en la lista de orden para indicar el tiempo */
.course-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
}

.course-badge.t1 {
    background: rgba(22, 163, 74, 0.10);
    color: var(--primary);
}

.course-badge.t2 {
    background: rgba(37, 99, 235, 0.08);
    color: var(--blue);
}

.course-badge.t3 {
    background: rgba(245, 158, 11, 0.10);
    color: var(--amber);
}

/* ════════════════════════════════════════════════════════════
   CLOSE TABLE MODAL — Cerrar Cuenta
════════════════════════════════════════════════════════════ */
.close-modal {
    max-width: 920px;
    width: 96vw;
    padding: 0;
    overflow: hidden;
    max-height: 90vh;
    border-radius: var(--radius-xl);
}

.close-layout {
    display: flex;
    height: 82vh;
    max-height: 82vh;
}

.close-left {
    width: 330px;
    flex-shrink: 0;
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    background: var(--bg-elevated);
}

.close-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
    background: var(--bg-card);
}

.close-panel-title .material-symbols-outlined {
    font-size: 18px;
    color: var(--primary);
}

.ticket-preview-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ticket-card {
    background: #fff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 22px 18px;
    width: 100%;
    box-shadow: var(--shadow-card);
    font-size: 10px;
    line-height: 1.5;
}

.ticket-logo {
    text-align: center;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #e2e8f0;
}

.ticket-logo .material-symbols-outlined {
    font-size: 28px;
    color: var(--primary);
    display: block;
    margin-bottom: 4px;
}

.ticket-restaurant {
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-primary);
}

.ticket-address {
    font-size: 8px;
    color: var(--text-muted);
    margin-top: 2px;
}

.ticket-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px 8px;
    font-size: 9px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e2e8f0;
}

.ticket-meta span {
    color: var(--text-muted);
}

.ticket-meta strong {
    color: var(--text-primary);
    font-weight: 800;
}

.ticket-items-header {
    display: grid;
    grid-template-columns: 24px 1fr 42px 46px;
    gap: 2px 5px;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.ticket-item-row {
    display: grid;
    grid-template-columns: 24px 1fr 42px 46px;
    gap: 2px 5px;
    font-size: 9px;
    margin-bottom: 3px;
}

.ticket-item-row .t-qty {
    font-weight: 800;
    color: var(--primary);
}

.ticket-item-row .t-pu {
    text-align: right;
    color: var(--text-secondary);
}

.ticket-item-row .t-tot {
    text-align: right;
    font-weight: 700;
}

.ticket-totals {
    border-top: 1px dashed #e2e8f0;
    margin-top: 10px;
    padding-top: 10px;
}

.ticket-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    margin-bottom: 3px;
    color: var(--text-secondary);
}

.ticket-total-row.grand {
    font-size: 13px;
    font-weight: 900;
    color: var(--text-primary);
    margin-top: 7px;
    padding-top: 7px;
    border-top: 1px solid #e2e8f0;
}

.ticket-total-row.grand .t-amount {
    color: var(--primary);
}

.ticket-usd {
    font-size: 8px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 2px;
    font-style: italic;
}

.ticket-footer {
    text-align: center;
    margin-top: 14px;
    font-size: 8px;
    color: var(--text-muted);
    font-style: italic;
}

/* Right panel */
.close-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 22px;
    overflow-y: auto;
}

.close-right-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.close-right-title {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-primary);
}

.close-right-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: -4px;
}

.close-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 4px 0;
}

.close-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 16px 10px;
    background: var(--bg-elevated);
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    text-align: center;
}

.close-action-card .material-symbols-outlined {
    font-size: 26px;
    color: var(--text-secondary);
}

.close-action-card:hover {
    border-color: var(--border);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.close-action-card:hover .material-symbols-outlined {
    color: var(--primary);
}

.close-action-card.active {
    border-color: var(--primary);
    background: var(--primary-dim);
}

.cac-name {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-primary);
}

.cac-desc {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 600;
}

.close-sub-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 12px 14px;
}

.exchange-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-dim);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 11px;
    color: var(--text-secondary);
}

.exchange-info .material-symbols-outlined {
    font-size: 17px;
    color: var(--primary);
    flex-shrink: 0;
}

.btn-print-close {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 900;
    font-family: inherit;
    letter-spacing: .04em;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 3px 10px var(--primary-glow);
    touch-action: manipulation;
}

.btn-print-close .material-symbols-outlined {
    font-size: 20px;
}

.btn-print-close:hover {
    background: #15803d;
    box-shadow: var(--shadow-glow);
}

.btn-cancel-op {
    display: block;
    text-align: center;
    padding: 10px;
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.btn-cancel-op:hover {
    color: var(--red);
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════ */
@media(max-width:768px) {
    .sidebar {
        display: none;
    }

    .order-panel {
        width: 100%;
    }

    .order-view-body {
        flex-direction: column;
    }

    .checkout-body {
        flex-direction: column;
    }

    .checkout-right {
        width: 100%;
        border-top: 1px solid var(--border-subtle);
    }

    .tables-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
}