/* Shinwari & Barbeque Palace - Ultra Modern Restaurant POS Design System */

:root {
    --bg-dark: #0f172a;
    --bg-darker: #090d16;
    --surface-dark: #1e293b;
    --surface-light: #334155;
    --amber-primary: #f59e0b;
    --amber-dark: #d97706;
    --flame-orange: #ea580c;
    --emerald-green: #10b981;
    --emerald-dark: #059669;
    --ruby-red: #ef4444;
    --sky-blue: #0284c7;
    --purple-station: #8b5cf6;
    --text-white: #ffffff;
    --text-muted: #94a3b8;
    --border-dark: rgba(255, 255, 255, 0.1);
    --border-light: #e2e8f0;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-darker);
    color: #e2e8f0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* ======================================================== */
/* 1. RESTAURANT TOP NAVBAR                                 */
/* ======================================================== */
.rest-navbar {
    background: linear-gradient(135deg, #090d16 0%, #0f172a 50%, #1e293b 100%);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--amber-primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #ffffff;
    padding-right: 16px;
    border-right: 1px solid var(--border-dark);
}

.brand-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--flame-orange) 0%, var(--amber-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-text h1 {
    font-size: 16px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.15;
}
.brand-text span {
    font-size: 10px;
    color: var(--amber-primary);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: block;
    margin-top: 2px;
}

/* Nav Toolbar & Segmented Buttons */
.nav-links-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-dark);
    color: #cbd5e1;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 700;
    transition: all 0.22s ease;
    white-space: nowrap;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateY(-1px);
}

.nav-btn.active {
    background: linear-gradient(135deg, var(--amber-dark), var(--flame-orange));
    border-color: var(--amber-primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.nav-btn-kot {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    border-color: #c4b5fd;
    color: #ffffff !important;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}

.nav-right-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

/* ======================================================== */
/* 2. POS MAIN TOUCH TERMINAL LAYOUT                        */
/* ======================================================== */
.pos-screen-layout {
    display: grid;
    grid-template-columns: 1fr 390px;
    height: calc(100vh - 65px);
    overflow: hidden;
}

/* Left Area: Channels, Categories & Food Tiles */
.pos-catalog-pane {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--bg-dark);
    border-right: 1.5px solid var(--border-dark);
    padding: 14px 18px;
}

/* 4 Order Channels Toolbar (Dine-in, Car Hop, Takeaway, Delivery) */
.order-channel-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.channel-tab-btn {
    background: var(--surface-dark);
    border: 1.5px solid var(--border-dark);
    border-radius: var(--radius);
    padding: 10px 12px;
    color: #cbd5e1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    transition: all 0.2s ease;
}

.channel-tab-btn:hover {
    background: var(--surface-light);
    color: #ffffff;
}

.channel-tab-btn.active {
    background: linear-gradient(135deg, var(--flame-orange), var(--amber-dark));
    border-color: var(--amber-primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.45);
}

/* Category Horizontal Scroller */
.category-pills-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.cat-pill-btn {
    background: var(--surface-dark);
    border: 1px solid var(--border-dark);
    color: #94a3b8;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.cat-pill-btn:hover {
    color: #fff;
    background: var(--surface-light);
}

.cat-pill-btn.active {
    background: var(--sky-blue);
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.4);
}

/* Food Items Grid */
.food-items-grid {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 12px;
    padding-right: 4px;
}

.food-card-tile {
    background: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.food-card-tile:hover {
    transform: translateY(-2px);
    border-color: var(--amber-primary);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.food-thumb-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    background: #090d16;
}

.food-card-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.food-name {
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 4px;
}

.food-price {
    font-size: 14px;
    font-weight: 900;
    color: var(--amber-primary);
}

.food-badge-weight {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(234, 88, 12, 0.9);
    color: #fff;
    font-size: 9.5px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
}

/* ======================================================== */
/* 3. RIGHT CART & CHECKOUT TERMINAL                        */
/* ======================================================== */
.pos-cart-pane {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #0b1120;
    padding: 14px;
    justify-content: space-between;
}

.cart-order-info-strip {
    background: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-items-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-item-row {
    background: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cart-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.cart-item-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qty-stepper {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-dark);
    border-radius: 6px;
    background: #090d16;
    overflow: hidden;
}

.qty-btn {
    background: #1e293b;
    color: #fff;
    border: none;
    padding: 4px 10px;
    font-weight: 800;
    cursor: pointer;
}
.qty-btn:hover { background: var(--amber-dark); }

.qty-input {
    width: 38px;
    text-align: center;
    border: none;
    background: transparent;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    outline: none;
}

/* Modifiers Chips (Kam Mirch, Karak Roti, Extra Spicy, etc.) */
.modifier-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.mod-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-dark);
    color: #cbd5e1;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    cursor: pointer;
}
.mod-chip.active {
    background: var(--amber-dark);
    color: #fff;
    border-color: var(--amber-primary);
}

/* Bottom Calculation Shelf */
.cart-math-shelf {
    background: var(--surface-dark);
    border: 1.5px solid var(--border-dark);
    border-radius: var(--radius);
    padding: 14px;
}

.math-line {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    color: #cbd5e1;
    margin-bottom: 4px;
}

.math-grand-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 900;
    color: var(--amber-primary);
    border-top: 1.5px solid var(--border-dark);
    padding-top: 8px;
    margin-top: 6px;
}

/* POS Action Buttons Grid */
.pos-action-buttons {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 8px;
    margin-top: 10px;
}

.btn-pos-action {
    padding: 12px 14px;
    border-radius: 8px;
    border: none;
    font-size: 13.5px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-pos-kot {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.btn-pos-pay {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
}

/* ======================================================== */
/* 4. TABLE FLOOR MAP (GREEN / RED / BLUE)                  */
/* ======================================================== */
.tables-floor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.table-card-box {
    background: var(--surface-dark);
    border-radius: var(--radius-lg);
    padding: 16px;
    border: 2px solid var(--border-dark);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
    position: relative;
}

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

/* Table Status Variants */
.table-free {
    border-color: #10b981;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.12), rgba(15, 23, 42, 0.95));
}
.table-occupied {
    border-color: #ef4444;
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.16), rgba(15, 23, 42, 0.95));
}
.table-billed {
    border-color: #0284c7;
    background: linear-gradient(180deg, rgba(2, 132, 199, 0.16), rgba(15, 23, 42, 0.95));
}

/* ======================================================== */
/* 5. MODAL POPUPS (Manager PIN, Weight Pakai, Payment)     */
/* ======================================================== */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-backdrop.show {
    display: flex;
}

.modal-content {
    background: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.8);
    color: #ffffff;
}

.modal-header {
    background: #090d16;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--amber-primary);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    background: #090d16;
    padding: 14px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid var(--border-dark);
}

/* Numpad Controls */
.numpad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.numpad-btn {
    background: #090d16;
    border: 1px solid var(--border-dark);
    color: #fff;
    padding: 14px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.15s;
}
.numpad-btn:hover {
    background: var(--amber-dark);
}

/* Form Controls */
.pos-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    background: #090d16;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    outline: none;
}
.pos-input:focus {
    border-color: var(--amber-primary);
}

/* General Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn-primary { background: var(--amber-primary); color: #000; font-weight: 900; }
.btn-primary:hover { background: var(--amber-dark); color: #fff; }
.btn-emerald { background: var(--emerald-green); color: #fff; }
.btn-emerald:hover { background: var(--emerald-dark); }
.btn-danger { background: var(--ruby-red); color: #fff; }
.btn-outline { background: transparent; border-color: var(--border-dark); color: #cbd5e1; }
.btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 11.5px; }

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.badge-green { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid #10b981; }
.badge-amber { background: rgba(245, 158, 11, 0.2); color: #fde68a; border: 1px solid #f59e0b; }
.badge-red { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid #ef4444; }
.badge-blue { background: rgba(2, 132, 199, 0.2); color: #7dd3fc; border: 1px solid #0284c7; }
.badge-purple { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; border: 1px solid #8b5cf6; }

/* Main Wrapper */
.main-wrapper {
    flex: 1;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 24px;
}

.estate-card, .pharmacy-card, .rest-card {
    background: var(--surface-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.data-table-wrap {
    overflow-x: auto;
}

.rest-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}
.rest-table th {
    background: #090d16;
    color: #94a3b8;
    padding: 12px;
    border-bottom: 1.5px solid var(--border-dark);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 11px;
}
.rest-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-dark);
    color: #e2e8f0;
}
.rest-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.kbd-key {
    background: #334155;
    color: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 10.5px;
    font-weight: 800;
    border: 1px solid #475569;
}
