/* ==========================================================================
   Vortex ERP - POS + Login Styles
   Last updated: February 2026
   ========================================================================== */

:root {
    --primary:       #c9a347;     /* warm gold / mustard accent */
    --primary-dark:  #b08f38;
    --secondary:     #355e3b;     /* forest green */
    --success:       #27ae60;
    --danger:        #c0392b;
    --bg-warm:       #fdfaf5;     /* very light warm beige */
    --card-bg:       #ffffff;
    --text-dark:     #2d2d2d;
    --text-muted:    #5f6b7a;
    --shadow-soft:   0 10px 40px rgba(0,0,0,0.08);
    --shadow-strong: 0 15px 50px rgba(0,0,0,0.12);
    --radius-lg:     16px;
    --radius-md:     12px;
}

* {
    box-sizing: border-box;
}

body {
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--text-dark);
    
    /* Background image with warm restaurant/lodge interior vibe */
    background-image: url("img/restaurant-interior.jpg");
    background-size: cover;          /* fill the screen */
    background-position: center;     /* centered nicely */
    background-repeat: no-repeat;    /* don't tile */
    
    /* Dark overlay so text & card remain readable */
    position: relative;
}



body::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.45);   /* semi-dark overlay – adjust 0.35–0.55 */
    z-index: -1;
}
/* ────────────────────────────────────────────────
   COMMON HELPERS
───────────────────────────────────────────────── */

.nav-pill-active {
    background-color: var(--primary) !important;
    color: white !important;
}

/* ────────────────────────────────────────────────
   LOGIN PAGE STYLES
───────────────────────────────────────────────── */

.container-fluid {
    min-height: 100vh;
}

.login-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    border: 1px solid rgba(201,163,71,0.12);
    max-width: 480px;
    margin: 2rem auto;
}

.login-header {
    background: linear-gradient(135deg, var(--secondary) 0%, #2f4f3f 100%);
    color: white;
    padding: 1.2rem 1.5rem;          /* Reduced from 2.2rem top/bottom */
    text-align: center;
    font-size: 1.35rem;               /* Smaller than 1.8rem */
    font-weight: 700;
    letter-spacing: 0.4px;
    line-height: 1.2;                 /* Tighter line height */
    margin-bottom: 0;                 /* No extra bottom space */
}

/* Logo inside header – keep it compact */
.login-header img {
    max-height: 100px;                 /* Slightly smaller logo */
    max-width: 200px;
    margin-bottom: 0.6rem !important;  /* Reduced space below logo */
    object-fit: contain;
    
    /* Added: rounded corners */
    border-radius: 12px;               /* Adjust value: 8px = subtle, 20px = very round, 50% = circle */
    
    /* Optional but recommended: subtle enhancements for better look */
    border: 2px;  /* light border for contrast on dark gradient */
       /* soft shadow to lift it off background */
}
/* "Login" text wrapper – make it even tighter */
.login-header > div {
    margin-top: 0.3rem;               /* Minimal space between logo and text */
}

.form-col .p-4,
.form-col .p-xl-5 {
    padding: 2.5rem !important;
}

.form-control {
    border-radius: 10px;
    border: 1px solid #d8d3c9;
    padding: 0.75rem 1.1rem;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(201,163,71,0.18);
}

.input-group .btn-outline-secondary {
    border-radius: 0 10px 10px 0;
    border-left: none;
}

.btn-login {
    background: var(--primary);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.9rem;
    border-radius: 10px;
    transition: all 0.25s;
}

.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(201,163,71,0.3);
}

.bg-light.text-muted.small {
    background: #f8f1e9 !important;
    border-top: 1px solid #e9e4d9;
}

/* ────────────────────────────────────────────────
   VIRTUAL KEYBOARD (Login page)
───────────────────────────────────────────────── */

#virtualKeyboard {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.8rem 1.2rem;
    box-shadow: var(--shadow-strong);
    max-width: 620px;
    width: 100%;
}

.vkey {
    width: 56px;
    height: 56px;
    margin: 6px 4px;
    border-radius: 14px;
    background: #f8f8f8;
    border: 1px solid #e2e2e2;
    font-size: 1.3rem;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    touch-action: manipulation;
}

.vkey:hover {
    background: #ececec;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.vkey:active {
    transform: scale(0.94);
    background: #d9d9d9;
}

.vkey.wide       { width: 88px; }
.vkey.extra-wide { width: 190px; }

#shiftKey, #capsLock, #backspace, #enterKey {
    font-size: 1.15rem;
}

#enterKey {
    background: var(--success);
    color: white;
    border-color: #219653;
}

#enterKey:hover {
    background: #219653;
}

#shiftKey.active,
#capsLock.active {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary-dark);
}

/* ────────────────────────────────────────────────
   MAIN POS LAYOUT
───────────────────────────────────────────────── */

.main-row {
    height: calc(100vh - 140px);
}

/* LEFT COLUMN - ORDER PANEL */
.order-col {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.order-panel {
    height: 100%;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.order-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 10px;
    min-height: 0;
}

.order-footer {
    flex-shrink: 0;
    background: white;
    border-top: 1px solid #dee2e6;
}

/* Order Items */
.order-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-item:hover {
    background: #e9ecef;
}

.order-item.editing {
    background: #fff3e0 !important;       /* warm peach/orange highlight */
    border: 3px solid var(--primary) !important;
    box-shadow: 0 0 15px rgba(201,163,71,0.25);
    transform: scale(1.02);
}

.order-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    padding-right: 10px;
}

.order-item-price {
    font-weight: bold;
    color: var(--success);
    font-size: 1rem;
}

/* RIGHT COLUMN - PRODUCTS + KEYPAD */
.products-panel {
    height: 100%;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.products-header {
    padding: 16px 20px 8px;
    flex-shrink: 0;
}

.products-grid {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* ────────────────────────────────────────────────
   CATEGORY BUTTONS
───────────────────────────────────────────────── */

.d-flex.flex-nowrap.overflow-auto.gap-2 {
    gap: 10px !important;
    padding-bottom: 10px;
}

.d-flex.flex-nowrap.overflow-auto::-webkit-scrollbar {
    height: 6px;
}
.d-flex.flex-nowrap.overflow-auto::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 3px;
}
.d-flex.flex-nowrap.overflow-auto {
    scrollbar-width: thin;
    -ms-overflow-style: none;
}

.category-btn {
    min-width: 110px;
    max-width: 170px;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    background: #f1f5f9;
    color: #374151;
    border: none;
    border-radius: 10px;
    transition: all 0.18s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: inline-block;
}

.category-btn:hover {
    background: #fef5e7;
    color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201,163,71,0.15);
}

.category-btn.active {
    background: var(--primary);
    color: white;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(201,163,71,0.3);
    transform: translateY(-2px);
}

/* ────────────────────────────────────────────────
   PRODUCT CARDS
───────────────────────────────────────────────── */

.product-card {
    background: #fff;
    border: 2px solid #eee;
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
    border-color: var(--primary);
}

.product-img {
    width: 68px;
    height: 68px;
    object-fit: contain;
    margin: 0 auto 10px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 5px;
}

.product-card.out-of-stock {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}

.out-of-stock-label {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* ────────────────────────────────────────────────
   KEYPAD (POS)
───────────────────────────────────────────────── */

.keypad-btn {
    height: 70px;
    font-size: 1.4rem !important;
    width: 100%;
    background: #fff;
    border: 1px solid #e6e6e6;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border-radius: 10px;
    transition: all 0.15s;
}

.keypad-btn:hover {
    background: #fef5e7;
    border-color: var(--primary);
}

.yellow-key   { background: #fff7d1; }
.danger-key   { background: #ffe0de; }
.enter-key    { background: #d4edda; border-color: #c3e6cb; font-weight: bold; }

.mode-btn.active {
    background: var(--primary) !important;
    color: white !important;
    box-shadow: 0 0 10px rgba(201,163,71,0.5);
}

#keypad-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.98);
    z-index: 9999;
    display: none;
    flex-direction: column;
    padding: 20px;
}

#keypad-overlay.active {
    display: flex;
}

/* ────────────────────────────────────────────────
   BUTTONS & HELPERS
───────────────────────────────────────────────── */

.custom-action-btn {
    padding: 12px !important;
    font-size: 1rem !important;
    width: 100%;
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-soft-primary   { background: #fff0d4; border: 1px solid #ffe0b2; }
.btn-soft-secondary { background: #edeef2; }
.btn-soft-purple    { background: #efe5ff; border: 1px solid #d3baff; }

/* ────────────────────────────────────────────────
   THERMAL RECEIPT PRINTING (80mm)
───────────────────────────────────────────────── */

#thermal-receipt-print {
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    width: 80mm !important;
    max-width: 80mm !important;
    padding: 8px 10px !important;
    margin: 0 !important;
    background: white;
    color: black;
}

@media print {
    body * {
        visibility: hidden !important;
    }
    #thermal-receipt-print,
    #thermal-receipt-print * {
        visibility: visible !important;
    }
    #thermal-receipt-print {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
    }
    @page {
        size: 80mm auto;
        margin: 0;
    }
}

/* ────────────────────────────────────────────────
   MODIFIERS MODAL
───────────────────────────────────────────────── */

#modifiersModal {
    z-index: 9999 !important;
}

#modifiersModal + .modal-backdrop {
    z-index: 9998 !important;
}

#modifiersModal .modal-dialog {
    margin-top: 120px !important;
    margin-bottom: 80px;
}

#modifiersModal .modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
    overflow: hidden;
}

#modifiersModal .modal-header {
    background: linear-gradient(135deg, var(--secondary), #4a704f);
    border-bottom: none;
    color: white;
}

@media (max-width: 576px) {
    #modifiersModal .modal-dialog {
        margin: 80px 10px 40px 10px !important;
    }
}

/* ────────────────────────────────────────────────
   RESPONSIVE TWEAKS
───────────────────────────────────────────────── */

@media (max-width: 991px) {
    .keyboard-col {
        display: flex !important;
        padding: 1.5rem !important;
    }
}

