/* ============================================
   POS SYSTEM - Order Screen (Toast POS Style)
   Check panel left, Large menu tiles right
   ============================================ */

/* ---- MAIN LAYOUT ---- */
.order-layout {
    display: flex;
    height: 100%;
    overflow: hidden;
    background: var(--bg-primary);
}

/* ---- LEFT: CHECK PANEL ---- */
.check-panel {
    width: var(--check-panel-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: visible;
    position: relative;
}

.check-header {
    padding: var(--space-md) var(--space-md);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.check-header-top {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.check-number {
    font-weight: 800;
    font-size: var(--text-xl);
    color: var(--text-primary);
}

.check-invoice-badge {
    font-size: 11px;
    font-weight: 700;
    color: #22d3ee;
    background: rgba(6,182,212,0.12);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(6,182,212,0.3);
}

.check-table {
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-surface);
    padding: 3px var(--space-sm);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.check-tab-badge {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--orange);
    background: rgba(255,152,0,0.1);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,152,0,0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.check-header-info {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    padding: 3px 0;
}

.check-held-banner {
    background: #f97316;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    padding: 6px;
    letter-spacing: 1px;
    border-radius: 6px;
    margin-bottom: 8px;
    animation: holdPulse 2s ease-in-out infinite;
}
@keyframes holdPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.check-order-note {
    font-size: 13px;
    color: #fbbf24;
    background: rgba(251,191,36,0.08);
    padding: 5px 10px;
    border-radius: 6px;
    border-left: 3px solid #f59e0b;
    margin: 4px 0;
    cursor: pointer;
}

/* Scrollable items area */
.check-items-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Category group label */
.check-group-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.3px;
    padding: var(--space-sm) var(--space-md) 4px;
}

/* Single item row */
.check-item {
    display: flex;
    align-items: flex-start;
    padding: var(--space-sm) var(--space-md) var(--space-sm);
    gap: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.check-item:hover {
    background: rgba(255,255,255,0.03);
    border-color: var(--border);
    border-radius: var(--radius-sm);
}

.check-item-qty {
    font-weight: 700;
    color: var(--text-primary);
    min-width: 26px;
    font-size: 17px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 2px 5px;
    background: var(--bg-surface);
}

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

.check-item-name {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
}

.check-item-mod {
    font-size: 15px;
    font-weight: 300;
    color: var(--text-muted);
    padding-left: var(--space-xs);
}

.check-item-unit {
    font-size: 17px;
    color: var(--text-secondary);
    min-width: 56px;
    text-align: right;
}

.check-item-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 62px;
    text-align: right;
}

.check-item-total.dual {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    min-width: 70px;
}

.check-dual-card {
    font-size: 17px;
    font-weight: 600;
    color: #fff;
}

.check-dual-cash {
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
}

/* Footer */
.check-footer {
    border-top: 1px solid var(--border);
    padding: var(--space-sm) var(--space-md) var(--space-md);
    flex-shrink: 0;
    background: var(--bg-secondary);
}

/* Hold / Select / Send buttons */
.check-action-row {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.check-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px var(--space-sm);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-base);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.check-action-btn:hover {
    background: var(--bg-surface-hover);
}

.check-action-icon {
    font-size: 18px;
}

.check-action-btn.send-btn {
    background: rgba(34, 197, 94, 0.1);
    border-color: #22c55e;
    color: #22c55e;
}

.check-action-btn.send-btn:hover {
    background: rgba(34, 197, 94, 0.2);
}

.check-action-btn.hold-btn {
    background: rgba(249, 115, 22, 0.1);
    border-color: #f97316;
    color: #f97316;
}
.check-action-btn.hold-btn:hover {
    background: rgba(249, 115, 22, 0.2);
}

.check-badge {
    background: var(--orange);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 2px;
}

/* ---- Status Badge on Items ---- */
.check-item-status {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 3px 7px;
    border-radius: 4px;
    color: #fff;
    flex-shrink: 0;
    line-height: 1.1;
    margin-top: 1px;
}

/* ---- Multi-Select Checkbox ---- */
.check-item-cb {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-light);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 800;
    color: transparent;
    transition: all 0.1s;
    margin-top: 1px;
}

.check-item-cb.checked {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
}

.check-item.multi-checked {
    background: rgba(245, 158, 11, 0.06);
    border-color: rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-sm);
}

/* ---- Multi-Select Action Bar ---- */
.check-multi-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-bottom: var(--space-sm);
}

.check-multi-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.12s;
}

.check-multi-btn span:first-child { font-size: 16px; }

.check-multi-btn:hover { background: var(--bg-surface-hover); }

.check-multi-btn.send { border-color: #22c55e; color: #22c55e; }
.check-multi-btn.send:hover { background: rgba(34,197,94,0.1); }
.check-multi-btn.hold { border-color: #3b82f6; color: #3b82f6; }
.check-multi-btn.hold:hover { background: rgba(59,130,246,0.1); }
.check-multi-btn.fire { border-color: #f59e0b; color: #f59e0b; }
.check-multi-btn.fire:hover { background: rgba(245,158,11,0.1); }
.check-multi-btn.void { border-color: #ef4444; color: #ef4444; }
.check-multi-btn.void:hover { background: rgba(239,68,68,0.1); }
.check-multi-btn.seat { border-color: #a855f7; color: #a855f7; }
.check-multi-btn.seat:hover { background: rgba(168,85,247,0.1); }

.check-cancel-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
}

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

/* Totals */
.check-totals {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
    padding: 0 var(--space-xs);
}

.check-totals-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.check-total-line {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-base);
    color: var(--text-secondary);
}

.check-total-line span:last-child {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 55px;
    text-align: right;
}

.check-total-line.dual-total.card {
    font-weight: 700;
}

.check-total-line.dual-total.card span:last-child {
    color: var(--text-primary);
    font-weight: 800;
}

.check-total-line.dual-total.cash span,
.check-total-line.dual-total.cash span:last-child {
    color: var(--green);
    font-weight: 700;
}

.check-total-line.total-line {
    font-weight: 700;
}

.check-total-line.total-line span:last-child {
    font-weight: 800;
}

/* Pay row */
.check-pay-row {
    display: flex;
    gap: var(--space-sm);
}

.btn-check-secondary {
    flex: 0 0 auto;
    padding: 12px var(--space-lg);
    background: transparent;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--text-base);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.btn-check-pay {
    flex: 1;
    padding: 16px var(--space-lg);
    background: var(--orange);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-inverse);
    font-size: var(--text-lg);
    font-weight: 800;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-check-pay:hover {
    background: var(--orange-hover);
}

/* ---- BAR TAB INDICATOR WIDGET ---- */
.bartab-indicator {
    margin: 6px 0;
    padding: 8px 10px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bartab-ind-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.bartab-ind-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.bartab-ind-pct {
    font-size: 11px;
    font-weight: 600;
}
.bartab-ind-bar-track {
    height: 10px;
    background: rgba(255,255,255,0.08);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}
.bartab-ind-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.4s ease;
    box-shadow: 0 0 6px currentColor;
}
.bartab-ind-amounts {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}
.bartab-ind-card {
    font-size: 11px;
    color: var(--text-muted);
}
.bartab-ind-blocked {
    font-size: 11px;
    font-weight: 700;
    color: #ef4444;
    text-align: center;
    padding: 2px 0;
}
.bartab-ind-print {
    margin-top: 2px;
    padding: 4px 10px;
    font-size: 11px;
    font-family: inherit;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    align-self: center;
    transition: all 0.15s;
}
.bartab-ind-print:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
}

/* ---- RIGHT: MENU AREA ---- */
.menu-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    position: relative;
}

/* Top bar: search + actions */
.menu-top-bar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.menu-search-wrap {
    flex: 1;
}

.menu-search-input {
    width: 100%;
    padding: 10px var(--space-md);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-sm);
}

.menu-search-input::placeholder { color: var(--text-muted); }
.menu-search-input:focus { border-color: var(--border-focus); outline: none; }

.menu-top-btn {
    padding: 10px var(--space-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

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

.menu-top-btn.primary {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--text-inverse);
    font-weight: 700;
}

.menu-top-btn.primary:hover {
    background: var(--orange-hover);
}

/* ---- SCROLLABLE MENU CONTENT ---- */
.menu-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* ---- CATEGORY TILES GRID ---- */
.cat-grid {
    display: grid;
    grid-template-columns: var(--grid-template);
    gap: 6px;
}

.cat-tile {
    padding: var(--btn-tile-padding);
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    color: #fff;
    font-size: var(--btn-tile-font);
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: var(--btn-tile-height);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-tile:hover {
    filter: brightness(1.25);
}

.cat-tile.active {
    border-color: #fff;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.3), 0 2px 8px rgba(0,0,0,0.3);
}

/* Sub-categories row */
.sub-cat-grid {
    display: grid;
    grid-template-columns: var(--grid-template);
    gap: 6px;
}

.sub-cat-grid:empty {
    display: none;
}

/* Subcategory row inside items grid */
.sub-cat-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: var(--grid-template);
    gap: var(--space-sm);
}

.items-sub-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: var(--grid-template);
    gap: var(--space-sm);
}

.items-sub-grid .no-items-msg {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-3xl);
    color: var(--text-muted);
}

.sub-cat-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--btn-tile-padding);
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    color: var(--text-primary);
    font-size: var(--btn-tile-font);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--bg-surface);
    min-height: var(--btn-tile-height);
}

.sub-cat-tile:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-light);
}

.sub-cat-tile.active {
    border-color: var(--orange);
    color: var(--orange);
    background: color-mix(in srgb, var(--orange) 10%, var(--bg-surface));
}

/* ---- MENU ITEM TILES ---- */
.items-grid {
    display: grid;
    grid-template-columns: var(--grid-template);
    gap: 6px;
    align-content: start;
}

.item-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--btn-tile-padding);
    border-radius: var(--radius-md);
    border: none;
    color: #fff;
    min-height: var(--btn-tile-height);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.item-tile:hover {
    filter: brightness(1.3);
    transform: translateY(-1px);
}

.item-tile:active {
    transform: scale(0.96);
}

.item-tile.unavailable {
    opacity: 0.3;
    cursor: not-allowed;
}

.item-tile-name {
    font-size: var(--text-sm);
    font-weight: 700;
    line-height: 1.2;
}

.item-tile-price {
    font-size: 11px;
    opacity: 0.75;
    margin-top: 3px;
}

/* Tile with image */
.item-tile.has-img {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    gap: 0;
    text-align: left;
}

.item-tile-img {
    width: var(--btn-tile-height, 68px);
    height: 100%;
    min-height: var(--btn-tile-height, 68px);
    object-fit: cover;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    flex-shrink: 0;
}

.item-tile.has-img .item-tile-name,
.item-tile.has-img .item-tile-price,
.item-tile.has-img .item-tile-dual {
    padding: 0 8px;
}

.item-tile.has-img .item-tile-name {
    text-align: left;
}

.item-tile.has-img .item-tile-price,
.item-tile.has-img .item-tile-dual {
    text-align: left;
}

.item-tile.has-img .item-tile-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6px 8px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.item-tile-dual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    margin-top: 3px;
}

/* ---- Generic tile image (categories, subcategories, modifiers) ---- */
.tile-img {
    object-fit: cover;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    flex-shrink: 0;
}

.tile-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Category tiles with image */
.cat-tile.has-img,
.sub-cat-tile.has-img {
    flex-direction: row;
    padding: 0;
    gap: 0;
    text-align: left;
    justify-content: flex-start;
}

.cat-tile.has-img .tile-img {
    width: var(--btn-tile-height, 68px);
    height: 100%;
    min-height: var(--btn-tile-height, 68px);
}

.cat-tile.has-img .tile-text,
.sub-cat-tile.has-img .tile-text {
    padding: 0 10px;
}

.sub-cat-tile.has-img .tile-img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
}

.sub-cat-tile.has-img {
    gap: 6px;
    padding: 0 8px 0 0;
}

/* Vertical category tiles with image */
.vcat-tile.has-img {
    flex-direction: row;
    padding: 0;
    gap: 0;
    text-align: left;
    justify-content: flex-start;
}

.vcat-tile.has-img .tile-img {
    width: var(--vcat-height, 60px);
    height: 100%;
    min-height: var(--vcat-height, 60px);
}

.vcat-tile.has-img .tile-text {
    padding: 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modifier buttons with image */
.mod-option-btn.has-img {
    padding-left: 0;
    gap: 0;
}

.mod-option-btn.has-img .tile-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    margin-right: 8px;
}

.dual-card {
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    opacity: 0.95;
}

.dual-cash {
    font-size: 9px;
    font-weight: 600;
    color: #34d399;
    opacity: 0.85;
}

/* Section divider between cats and items */
.menu-section-divider {
    height: 1px;
    background: var(--border);
    margin: var(--space-xs) 0;
}


/* ============================================
   MODE SELECTION SCREEN
   ============================================ */

.mode-screen {
    padding: var(--space-2xl) var(--space-3xl);
    overflow-y: auto;
    height: 100%;
}

.mode-section {
    margin-bottom: var(--space-2xl);
}

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

.mode-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

.mode-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl) var(--space-lg);
    background: var(--bg-surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 100px;
}

.mode-tile:hover:not(.disabled) {
    border-color: var(--orange);
    background: color-mix(in srgb, var(--orange) 8%, var(--bg-surface));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mode-tile:active:not(.disabled) {
    transform: scale(0.98);
}

.mode-tile.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.mode-tile-label {
    font-size: var(--text-base);
    font-weight: 600;
    text-align: center;
}

.manager-tile {
    background: var(--bg-secondary);
}


/* ---- ITEM ACTION BAR ---- */
.item-bar {
    display: flex;
    flex-direction: column;
    width: 96px;
    min-width: 96px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 8px 6px;
    gap: 6px;
    align-items: center;
    overflow-y: auto;
}

.item-bar-name {
    font-size: 10px;
    font-weight: 700;
    color: var(--orange);
    text-align: center;
    line-height: 1.2;
    padding: 4px 2px;
    word-break: break-word;
    max-height: 36px;
    overflow: hidden;
}

/* Vertical pill stepper */
.item-bar-stepper {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-surface);
    border: 2px solid var(--border);
    border-radius: 28px;
    padding: 4px;
    margin-bottom: 4px;
    width: 56px;
}

.item-bar-step-btn {
    width: 48px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    transition: all var(--transition-fast);
}

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

.item-bar-step-btn:active { transform: scale(0.9); }

.item-bar-step-val {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    padding: 2px 0;
    text-align: center;
    line-height: 1;
}

/* Square colored buttons */
.item-bar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: all var(--transition-fast);
    gap: 4px;
    padding: 6px 4px;
}

.item-bar-btn:hover { opacity: 0.85; transform: scale(1.03); }
.item-bar-btn:active { transform: scale(0.93); }

.item-bar-btn.clr-blue,
.item-bar-btn.clr-teal,
.item-bar-btn.clr-purple,
.item-bar-btn.clr-orange,
.item-bar-btn.clr-yellow,
.item-bar-btn.clr-gray {
    background: var(--bg-surface);
    border: 1px solid var(--border);
}

.item-bar-btn.clr-blue:hover,
.item-bar-btn.clr-teal:hover,
.item-bar-btn.clr-purple:hover,
.item-bar-btn.clr-orange:hover,
.item-bar-btn.clr-yellow:hover,
.item-bar-btn.clr-gray:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-light);
}

.item-bar-btn.clr-orange:hover { border-color: var(--orange); }
.item-bar-btn.clr-yellow:hover { border-color: var(--yellow); }

.item-bar-btn.clr-red { background: #ef4444; }

.item-bar-icon {
    font-size: 22px;
    line-height: 1;
}

.item-bar-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-primary);
}

.item-bar-btn.clr-red .item-bar-icon { filter: grayscale(1) brightness(10); }
.item-bar-btn.clr-red .item-bar-label { color: #fff; }

/* Check item selected state */
.check-item.selected {
    background: rgba(245, 158, 11, 0.12);
    border-left: 3px solid var(--orange);
    padding-left: 7px;
}

/* ---- PRICE CHANGE MODAL ---- */
.price-modal-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
}

.price-modal-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px 28px;
    width: auto;
    max-width: 95vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    text-align: center;
}

.price-modal-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.price-modal-item {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Input row with original price label */
.price-input-row {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-original {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-align: left;
    padding-left: 4px;
    min-height: 16px;
    text-decoration: line-through;
}

.price-modal-input {
    width: 100%;
    height: 80px;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 36px;
    font-weight: 800;
    text-align: center;
    box-sizing: border-box;
}

.price-modal-input.editing {
    border-color: var(--orange);
    color: var(--orange);
}

.price-modal-input:focus {
    outline: none;
}

/* Numpad grid matching login pin-pad */
.price-numpad {
    display: grid;
    grid-template-columns: repeat(4, 96px);
    gap: 10px;
    justify-content: center;
}

.price-numpad .pin-key {
    height: 96px;
    width: 96px;
}

.price-modal-btn {
    height: 96px;
    width: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

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

.price-modal-btn.cancel:hover { color: var(--red); }
.price-modal-btn.cancel:active { transform: scale(0.95); }

.price-modal-btn.save {
    border: none;
    background: var(--orange);
    color: var(--text-inverse);
    font-size: 20px;
    font-weight: 800;
}

.price-modal-btn.save:hover { background: var(--orange-hover); }
.price-modal-btn.save:active { background: var(--orange-light); transform: scale(0.95); }

/* Check item selected state */
.check-item.selected {
    background: rgba(245, 158, 11, 0.12);
    border-left: 3px solid var(--orange);
    padding-left: 7px;
}

/* ---- VERTICAL CATEGORIES PANEL ---- */
.vert-cat-panel {
    width: var(--vcat-panel-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
}

.vert-cat-panel::-webkit-scrollbar { width: 4px; }
.vert-cat-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.vert-cat-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 6px;
}

.vcat-tile {
    padding: 10px 8px;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    color: #fff;
    font-size: var(--vcat-font);
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: var(--vcat-height);
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-word;
    line-height: 1.2;
}

.vcat-tile:hover { filter: brightness(1.25); }
.vcat-tile.active {
    border-color: #fff;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.3), 0 2px 8px rgba(0,0,0,0.3);
}

/* ---- TICKETS DASHBOARD PANEL ---- */
.tickets-panel {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 200;
    display: none;
    flex-direction: column;
}

.tickets-panel.open { display: flex; }

.tickets-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

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

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

.tickets-close-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

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

/* Filter Bar */
.tickets-filters {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.tfilter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tfilter-pills {
    display: flex;
    gap: 4px;
}

.tfilter-pill {
    padding: 10px 20px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 44px;
}

.tfilter-pill:hover { background: var(--bg-surface-hover); }

.tfilter-pill.active {
    background: var(--orange);
    color: #000;
    border-color: var(--orange);
}

.tfilter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tfilter-select {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 14px;
    min-width: 160px;
    min-height: 44px;
    cursor: pointer;
}

.tfilter-date-btn {
    padding: 10px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    min-height: 44px;
    min-width: 140px;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.tfilter-date-btn:hover { border-color: var(--orange); }

.tfilter-date-btn.has-date {
    color: var(--text-primary);
    border-color: var(--orange);
    background: rgba(245, 158, 11, 0.1);
}

.tfilter-search-btn {
    padding: 10px 28px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--blue);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    min-height: 44px;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-left: auto;
}

.tfilter-search-btn:hover { background: var(--blue-hover); }

/* Summary Bar */
.tickets-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    min-height: 20px;
}

.tsummary-count {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.tsummary-total {
    font-size: 15px;
    font-weight: 800;
    color: var(--orange);
}

/* Tickets Grid */
.tickets-grid {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 12px;
    align-content: start;
}

.tickets-loading,
.tickets-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 16px;
}

/* Ticket Cards */
.tcard {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 140px;
}

.tcard:hover {
    border-color: var(--orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.tcard:active {
    transform: translateY(0);
}

.tcard-top {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.tcard-number {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.tcard-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    color: #fff;
    letter-spacing: 0.5px;
    margin-left: auto;
    flex-shrink: 0;
}

.tcard-badge.sent { background: var(--green); }
.tcard-badge.open { background: var(--yellow); color: #000; }
.tcard-badge.paid { background: var(--blue); }
.tcard-badge.cancelled { background: var(--text-muted); }
.tcard-badge.hold { background: #f97316; }

.tcard-invoice {
    font-size: 12px;
    font-weight: 700;
    color: #22d3ee;
    background: rgba(6,182,212,0.12);
    padding: 2px 8px;
    border-radius: var(--radius);
    border: 1px solid rgba(6,182,212,0.3);
    flex-shrink: 0;
}

.tcard-otype {
    font-size: 20px;
    font-weight: 800;
    flex-shrink: 0;
}

.tcard-tab-name {
    font-size: 12px;
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245,158,11,0.12);
    padding: 2px 8px;
    border-radius: 6px;
    flex-shrink: 0;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tcard-meta {
    display: flex;
    align-items: center;
    gap: 8px 12px;
    flex-wrap: wrap;
}

.tcard-table {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.tcard-server {
    font-size: 13px;
    color: var(--text-secondary);
}

.tcard-time {
    font-size: 13px;
    color: var(--text-secondary);
}

.tcard-items {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tcard-item {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tcard-more {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

.tcard-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 10px;
    margin-top: auto;
}

.tcard-count {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.tcard-total {
    font-size: 18px;
    font-weight: 800;
    color: var(--orange);
}

/* ---- TOUCH CALENDAR ---- */
.tcal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
}

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

.tcal-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 20px;
    width: 420px;
    max-width: 95vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.tcal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.tcal-month {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
}

.tcal-nav {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.tcal-nav:hover {
    background: var(--bg-surface-hover);
    border-color: var(--orange);
}

.tcal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 6px;
}

.tcal-weekdays span {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 6px 0;
}

.tcal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.tcal-day {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--bg-surface);
    border: 2px solid transparent;
}

.tcal-day:hover {
    background: var(--bg-surface-hover);
    border-color: var(--orange);
}

.tcal-day:active {
    transform: scale(0.93);
}

.tcal-day.empty {
    background: transparent;
    cursor: default;
    border: none;
}

.tcal-day.today {
    border-color: var(--blue);
    color: var(--blue);
    font-weight: 800;
}

.tcal-day.selected {
    background: var(--orange);
    color: #000;
    font-weight: 800;
    border-color: var(--orange);
}

.tcal-footer {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.tcal-footer-btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
    min-height: 48px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tcal-footer-btn:hover { background: var(--bg-surface-hover); }

.tcal-footer-btn.primary {
    background: var(--orange);
    color: #000;
    border-color: var(--orange);
}

.tcal-footer-btn.primary:hover { background: var(--orange-hover); }

/* 1920×1080 fixed — no responsive breakpoints needed */

/* ============================================
   MODIFIER PANEL (Fixed, covers menu area only)
   ============================================ */

.mod-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
}

.mod-panel {
    position: absolute;
    top: 0;             /* JS calculates exact position at divider line */
    right: 0;
    bottom: 0;
    left: 0;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    z-index: 100;
    animation: modFadeIn 0.15s ease;
}

@keyframes modFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Header */
.mod-panel-header {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.mod-panel-title {
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--text-primary);
}

.mod-panel-subtitle {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-top: 2px;
}

/* Scrollable body — horizontal groups */
.mod-panel-body {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    gap: 0;
    min-height: 0;
}

/* Each modifier group is a vertical column */
.mod-group {
    flex-shrink: 0;
    width: 240px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    overflow: hidden;
}

.mod-group:last-child {
    border-right: none;
}

.mod-group-header {
    padding: var(--space-md) var(--space-md);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mod-group-name {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.mod-group-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 3px 10px;
    border-radius: 3px;
    width: fit-content;
}

.mod-group-tag.required {
    background: color-mix(in srgb, var(--red) 20%, transparent);
    color: var(--red);
}

.mod-group-tag.optional {
    background: color-mix(in srgb, var(--text-muted) 15%, transparent);
    color: var(--text-muted);
}

/* Scrollable list of modifiers inside each group */
.mod-group-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-xs);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Each modifier option — tall buttons */
.mod-option-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    padding: var(--btn-tile-padding);
    min-height: var(--btn-tile-height);
    background: var(--bg-surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--btn-tile-font);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
    width: 100%;
}

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

.mod-option-btn.selected {
    border-color: var(--orange);
    background: color-mix(in srgb, var(--orange) 12%, var(--bg-surface));
}

.mod-option-btn.selected .mod-option-check {
    display: flex;
}

.mod-option-name {
    flex: 1;
    min-width: 0;
}

.mod-option-price {
    font-size: var(--text-sm);
    color: var(--orange);
    font-weight: 700;
    white-space: nowrap;
}

.mod-price-card {
    display: block;
    font-size: var(--text-sm);
}

.mod-price-cash {
    display: block;
    font-size: 10px;
    color: var(--green);
}

.mod-option-check {
    display: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--orange);
    color: #fff;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}

/* Footer — always visible at bottom */
.mod-panel-footer {
    padding: var(--space-sm) var(--space-lg);
    border-top: 1px solid var(--border);
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
    background: var(--bg-secondary);
}

/* Single-line edit footer */
.mod-edit-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.mod-edit-footer .mod-btn-cancel {
    padding: 12px 16px;
    font-size: 14px;
}

.mod-edit-footer .mod-btn-add {
    padding: 12px 18px;
    font-size: 14px;
    flex: 0;
    white-space: nowrap;
}

.mod-edit-footer .mod-btn-delete {
    width: auto;
    min-width: 44px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 700;
    gap: 4px;
}

.mod-edit-qty {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 44px;
}

.mod-edit-qty-btn {
    width: 40px;
    height: 44px;
    border: none;
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.12s;
}

.mod-edit-qty-btn:hover { background: var(--bg-surface-hover); }

.mod-edit-qty-val {
    min-width: 30px;
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    color: var(--orange);
}

.mod-edit-action {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.12s;
    white-space: nowrap;
}

.mod-edit-action:hover { border-color: var(--orange); background: var(--bg-surface-hover); }

.mod-btn-cancel {
    padding: 14px var(--space-2xl);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.mod-btn-add {
    flex: 1;
    padding: 14px var(--space-xl);
    background: var(--orange);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-inverse);
    font-size: var(--text-lg);
    font-weight: 800;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mod-btn-add:hover {
    background: var(--orange-hover);
}

#mod-add-new {
    flex: 0.6;
}

.mod-btn-delete {
    width: 50px;
    padding: 14px 0;
    background: var(--bg-surface);
    border: 2px solid var(--red);
    border-radius: var(--radius-md);
    color: var(--red);
    font-size: var(--text-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

/* ============================================
   DELETE CONFIRMATION MODAL
   ============================================ */

.del-confirm-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: delFadeIn 0.15s ease;
}

@keyframes delFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.del-confirm-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl) var(--space-3xl);
    text-align: center;
    max-width: 520px;
    width: 90%;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.del-confirm-icon {
    font-size: 40px;
    margin-bottom: var(--space-md);
}

.del-confirm-title {
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.del-confirm-msg {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--space-xl);
}

.del-confirm-msg strong {
    color: var(--text-primary);
}

.del-confirm-actions {
    display: flex;
    gap: var(--space-sm);
}

.del-confirm-btn {
    flex: 1;
    padding: 14px var(--space-lg);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

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

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

.del-confirm-btn.confirm {
    background: var(--red);
    color: #fff;
}

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

/* Void warning in confirm modal */
.del-confirm-warn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    font-size: 12px;
    color: #ef4444;
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Void reason selector */
.del-confirm-reason {
    margin-bottom: 14px;
}

.del-confirm-reason label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.del-confirm-reason select,
.del-confirm-reason input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}

.del-confirm-reason select:focus,
.del-confirm-reason input:focus {
    border-color: var(--orange);
}

.del-confirm-reason input {
    margin-top: 8px;
}

/* Voided item row in check panel */
.check-item.voided {
    opacity: 0.5;
    pointer-events: none;
}

.check-item.voided .check-item-name {
    text-decoration: line-through;
    color: var(--red);
}

.check-item.voided .check-item-qty {
    text-decoration: line-through;
    color: var(--red);
}

/* Void credit line in totals */
.check-total-line.void-credit {
    color: var(--red);
}

.check-total-line.void-credit span:last-child {
    color: var(--red);
    font-weight: 700;
}

/* ---- SEAT TABS ---- */
.seat-tabs {
    display: flex;
    gap: 4px;
    padding: 6px 12px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    flex-shrink: 0;
}

.seat-tabs::-webkit-scrollbar { display: none; }

.seat-tab {
    min-width: 40px;
    height: 32px;
    padding: 0 12px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.12s;
    flex-shrink: 0;
}

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

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

/* ---- SEAT BADGE on items ---- */
.check-seat-badge {
    font-size: 12px;
    font-weight: 700;
    background: #a855f7;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    flex-shrink: 0;
    line-height: 1.1;
}

/* ---- SEAT PICKER MODAL ---- */
.seat-picker-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;
}

.seat-picker-modal {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: auto;
    max-width: 95vw;
    padding: 24px 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.seat-picker-title {
    font-size: 20px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.seat-picker-grid {
    display: grid;
    grid-template-columns: repeat(3, 96px);
    gap: 10px;
    justify-content: center;
    margin-bottom: 16px;
}

.seat-picker-btn {
    height: 96px;
    width: 96px;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s;
}

.seat-picker-btn:hover {
    border-color: #a855f7;
    background: rgba(168,85,247,0.1);
}

.seat-picker-btn:active {
    transform: scale(0.95);
}

.seat-picker-btn.shared {
    grid-column: 1 / -1;
    width: 100%;
    border-color: var(--border);
    color: var(--text-secondary);
    height: 56px;
    font-size: 16px;
    font-weight: 700;
}

.seat-picker-btn.shared:hover {
    border-color: var(--text-secondary);
}

.seat-picker-cancel {
    width: 100%;
    height: 56px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.seat-picker-cancel:hover {
    background: var(--border);
}

/* 1920×1080 fixed */

/* ============================================
   ACTIONS PANEL (Dropdown from check header)
   ============================================ */

.check-actions-trigger {
    margin-left: auto;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: var(--text-lg);
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    letter-spacing: 1px;
}

.check-actions-trigger:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--border-light);
}

/* Panel — hidden by default, slides open to the right */
.actions-panel {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    bottom: 0;
    width: 380px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    box-shadow: 6px 0 24px rgba(0,0,0,0.35);
    z-index: 50;
    flex-direction: column;
    animation: actionSlideIn 0.2s ease;
}

.actions-panel.open {
    display: flex;
}

@keyframes actionSlideIn {
    from { opacity: 0; transform: translateX(-12px); }
    to   { opacity: 1; transform: translateX(0); }
}

.actions-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.actions-panel-title {
    font-size: var(--text-lg);
    font-weight: 800;
    color: var(--text-primary);
}

.actions-panel-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-muted);
    font-size: var(--text-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.actions-panel-close:hover {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

/* Action buttons grid */
.actions-grid {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    align-content: start;
}

.action-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: var(--space-md) var(--space-xs);
    min-height: 80px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.action-tile:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-light);
    transform: translateY(-1px);
}

.action-tile:active {
    transform: scale(0.97);
}

.action-icon {
    font-size: 24px;
    line-height: 1;
}
.action-icon.adj-icon {
    color: #fbbf24;
    font-weight: 900;
    font-size: 22px;
    background: rgba(251,191,36,0.15);
    border-radius: 6px;
    padding: 2px 6px;
}

.action-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.2;
}

.action-label.danger {
    color: var(--red);
}

/* ---- Open Item Modal (dark POS theme) ---- */
.oi-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.6);
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 40px;
}
.oi-box {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 660px;
    max-width: 95vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.oi-step { padding: 28px 32px; }
.oi-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
}
.oi-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.oi-type-btn {
    height: 72px;
    border: 2px solid;
    border-radius: 12px;
    background: var(--bg-surface);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}
.oi-type-btn:hover { transform: scale(1.03); background: var(--bg-surface-hover); }
.oi-type-btn:active { transform: scale(0.97); }

/* Form row */
.oi-form-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.oi-field-group { display: flex; flex-direction: column; gap: 6px; }
.oi-field-group.name-field { flex: 1; }
.oi-field-group.price-field { width: 150px; flex-shrink: 0; }
.oi-field-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-left: 2px;
}
.oi-text-input {
    height: 54px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 19px;
    font-weight: 600;
    padding: 0 14px;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s;
}
.oi-text-input:focus { border-color: var(--accent); }
.oi-text-input.price { text-align: right; font-weight: 700; }
.oi-text-input.price:focus { border-color: #22c55e; }

/* Footer */
.oi-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 24px;
}
.oi-btn {
    height: 50px;
    padding: 0 28px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.12s;
    border: 1px solid var(--border);
}
.oi-btn.cancel {
    background: var(--bg-surface);
    color: var(--text-secondary);
}
.oi-btn.cancel:hover { background: var(--bg-surface-hover); }
.oi-btn.add {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    min-width: 140px;
}
.oi-btn.add:hover { background: #1d4ed8; }
.oi-btn.add:active { transform: scale(0.97); }


/* ---- Void / Reopen Order Modal ---- */
.vo-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;
}
.vo-modal {
    background: var(--bg-primary); border-radius: var(--radius-xl);
    border: 1px solid var(--border); padding: 28px;
    width: 440px; max-width: 95vw;
    display: flex; flex-direction: column; gap: 16px;
}
.vo-title {
    font-size: 22px; font-weight: 800; text-align: center;
}
.vo-info {
    background: var(--bg-surface); border-radius: var(--radius-lg);
    padding: 14px 18px;
    display: flex; flex-direction: column; gap: 8px;
}
.vo-info-row {
    display: flex; justify-content: space-between;
    font-size: 15px; color: var(--text-secondary);
}
.vo-info-row span:last-child {
    font-weight: 700; color: var(--text-primary);
}
.vo-info-row.total span:last-child {
    font-size: 18px; color: var(--orange);
}
.vo-warn {
    font-size: 14px; color: var(--red);
    background: rgba(239,68,68,0.08);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    line-height: 1.5;
    text-align: center;
}
.vo-reason {
    height: 44px; border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--bg-surface); color: var(--text-primary);
    font-size: 15px; padding: 0 14px; width: 100%; box-sizing: border-box;
}
.vo-reason:focus { outline: none; border-color: var(--orange); }
.vo-actions {
    display: flex; gap: 10px;
}
.vo-btn {
    flex: 1; height: 52px; border-radius: var(--radius-lg);
    font-size: 16px; font-weight: 700; cursor: pointer;
    border: none; transition: all 0.12s;
}
.vo-btn.cancel {
    background: var(--bg-surface); border: 1px solid var(--border);
    color: var(--text-secondary);
}
.vo-btn.cancel:hover { background: var(--bg-surface-hover); }
.vo-btn.confirm {
    background: var(--red); color: #fff;
}
.vo-btn.confirm:hover { filter: brightness(1.1); }
.vo-btn.reopen {
    background: var(--cyan); color: #fff;
}
.vo-btn.reopen:hover { filter: brightness(1.1); }

/* ============================================
   ADJUSTMENTS MODAL & PANEL
   ============================================ */

/* Main Adjustments Modal */
.adj-modal {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: var(--radius-xl);
    width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
}

.adj-header {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #334155;
    background: #0f172a;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.adj-title { font-size: 18px; font-weight: 800; color: #f8fafc; flex: 1; }
.adj-order { font-size: 13px; color: #94a3b8; }
.adj-close {
    width: 32px; height: 32px; border-radius: 50%;
    background: #334155; border: 1px solid #475569;
    color: #e2e8f0; font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.adj-close:hover { background: #ef4444; color: #fff; border-color: #ef4444; }

/* Current adjustments list */
.adj-current {
    padding: 12px 20px;
    border-bottom: 1px solid #334155;
    background: rgba(255,152,0,0.06);
}
.adj-current-title {
    font-size: 12px; font-weight: 700; color: #94a3b8;
    text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.adj-current-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 12px; margin: 4px 0;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: var(--radius);
}
.adj-current-info { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.adj-current-type { font-size: 14px; font-weight: 700; color: #fbbf24; }
.adj-current-detail { font-size: 13px; color: #cbd5e1; }
.adj-current-reason { font-size: 12px; color: #94a3b8; font-style: italic; }
.adj-remove-btn {
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3);
    color: #f87171; font-size: 14px; font-weight: 800;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.adj-remove-btn:hover { background: #ef4444; color: #fff; border-color: #ef4444; }

.adj-clear-all {
    margin-top: 10px; width: 100%;
    padding: 10px; border-radius: var(--radius);
    background: rgba(239,68,68,0.06); border: 1px dashed rgba(239,68,68,0.4);
    color: #f87171; font-size: 13px; font-weight: 700;
    cursor: pointer;
}
.adj-clear-all:hover { background: rgba(239,68,68,0.15); }

/* Adjustment tiles grid */
.adj-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 16px 20px 20px;
}
.adj-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; padding: 18px 10px;
    background: #293548;
    border: 2px solid #475569;
    border-radius: var(--radius-lg);
    cursor: pointer; transition: all 0.15s;
    min-height: 85px;
}
.adj-tile:hover { border-color: #f59e0b; background: #3a4a5e; }
.adj-tile:active { transform: scale(0.97); }
.adj-tile.active { border-color: #22c55e; background: rgba(34,197,94,0.15); }
.adj-tile.disabled { opacity: 0.35; pointer-events: none; }
.adj-tile-icon { font-size: 28px; color: #fbbf24; }
.adj-tile-label { font-size: 15px; font-weight: 700; text-align: center; color: #f1f5f9; }

/* ---- Input modals (discount, gratuity etc.) ---- */
.adj-input-modal {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: var(--radius-xl);
    width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.7);
    overflow: hidden;
}
.adj-input-header {
    padding: 16px 20px;
    font-size: 18px; font-weight: 800; color: #f8fafc;
    border-bottom: 1px solid #334155;
    background: #0f172a;
}

.adj-preset-grid {
    display: flex; gap: 8px; padding: 16px 20px 8px;
    flex-wrap: wrap;
}
.adj-preset {
    flex: 1; min-width: 60px;
    padding: 14px 8px; border-radius: var(--radius);
    background: #0f172a;
    border: 2px solid #475569;
    color: #f1f5f9; font-size: 17px; font-weight: 700;
    cursor: pointer; transition: all 0.12s;
    text-align: center;
}
.adj-preset:hover { border-color: #f59e0b; background: rgba(255,152,0,0.08); }
.adj-preset.active { background: #f59e0b; color: #000; border-color: #f59e0b; }

.adj-input-row {
    padding: 8px 20px;
    display: flex; flex-direction: column; gap: 6px;
}
.adj-input-row label {
    font-size: 13px; font-weight: 600; color: #94a3b8;
}
.adj-input {
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid #475569;
    background: #0f172a;
    color: #f1f5f9;
    font-size: 16px; font-weight: 600;
}
.adj-input:focus { border-color: #f59e0b; outline: none; box-shadow: 0 0 0 2px rgba(245,158,11,0.2); }
.adj-input::placeholder { color: #64748b; }

.adj-input-hint {
    padding: 0 20px 4px;
    font-size: 12px; color: #94a3b8; font-style: italic;
}

.adj-comp-warning {
    padding: 12px 20px;
    font-size: 14px; color: #fbbf24; font-weight: 500;
    background: rgba(255,152,0,0.08);
    border-bottom: 1px solid #334155;
}

.adj-input-actions {
    display: flex; gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #334155;
    background: #0f172a;
}
.adj-btn {
    flex: 1; padding: 14px;
    border-radius: var(--radius);
    font-size: 15px; font-weight: 700;
    cursor: pointer; border: none;
    transition: all 0.12s;
}
.adj-btn.cancel {
    background: #334155;
    border: 1px solid #475569;
    color: #e2e8f0;
}
.adj-btn.cancel:hover { background: #475569; }
.adj-btn.confirm {
    background: #f59e0b; color: #000;
}
.adj-btn.confirm:hover { background: #fbbf24; }
.adj-btn.confirm.danger {
    background: #ef4444; color: #fff;
}
.adj-btn.confirm.danger:hover { background: #f87171; }

/* ---- Adjustment lines in check totals ---- */
.check-total-line.adj-line {
    font-size: 12px;
}
.check-total-line.adj-line.discount span:last-child { color: #ef4444; }
.check-total-line.adj-line.tax-exempt span { color: var(--text-muted); font-style: italic; }
.check-total-line.adj-line.svc span:last-child { color: var(--cyan); }
.check-total-line.adj-line.grat span:last-child { color: var(--green); }

/* ---- Refund Modal ---- */
.vo-field { margin-bottom: 10px; }
.vo-field label {
    display: block; font-size: 11px; color: #94a3b8;
    margin-bottom: 4px; font-weight: 600;
}
.vo-input {
    width: 100%; padding: 8px 10px; background: #0f172a;
    border: 1px solid #475569; border-radius: 6px;
    color: #f1f5f9; font-size: 13px;
}
.vo-input:focus { border-color: #6366f1; outline: none; }
select.vo-input { cursor: pointer; }
.vo-warning {
    padding: 10px 14px; margin: 10px 0; border-radius: 6px;
    background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3);
    color: #f87171; font-size: 12px; text-align: center;
}
.refund-history {
    margin-top: 14px; padding-top: 12px;
    border-top: 1px solid #334155;
}
.refund-hist-title {
    font-size: 11px; font-weight: 700; color: #94a3b8;
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;
}
.refund-hist-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 4px 0; font-size: 12px; color: #cbd5e1;
}
.refund-hist-reason { color: #64748b; font-size: 11px; }
.refund-hist-total {
    margin-top: 6px; padding-top: 6px; border-top: 1px dashed #475569;
    font-size: 12px; font-weight: 700; color: #fbbf24;
}
