/* ==================== BASE STYLES ==================== */
body {
    background-color: #020617;
    color: #e2e8f0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 0;
    color: #f8fafc;
}

h1 { font-size: 2rem; line-height: 1.2; }
h2 { font-size: 1.5rem; line-height: 1.3; }
h3 { font-size: 1.25rem; line-height: 1.4; }
h4 { font-size: 1.125rem; line-height: 1.5; }
h5 { font-size: 1rem; line-height: 1.6; }
h6 { font-size: 0.875rem; line-height: 1.6; }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }

.money-green { color: #4ade80; }

/* ==================== LAYOUT & SPACING ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section { margin-bottom: 4rem; }

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #4ade80;
    margin-bottom: 2rem;
    text-align: center;
}

.grid { display: grid; gap: 2rem; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; }
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* ==================== SURFACES (was .glass) ==================== */
.glass {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 1rem;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.card {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 1rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.card:hover {
    background: #111c33;
    border-color: #334155;
    transform: translateY(-2px);
}

.card img {
    border-radius: 0.75rem;
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 1rem;
}

.rounded-\[2\.5rem\] { border-radius: 1rem !important; }
.rounded-3xl { border-radius: 1rem !important; }

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.625rem;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1.2;
}

.btn-primary {
    background-color: #4ade80;
    color: #020617;
}
.btn-primary:hover { background-color: #22c55e; }

.btn-secondary {
    background-color: #1e293b;
    color: #e2e8f0;
    border: 1px solid #334155;
}
.btn-secondary:hover { background-color: #334155; }

.btn-outline {
    background: transparent;
    border: 1px solid #334155;
    color: #e2e8f0;
}
.btn-outline:hover { border-color: #4ade80; color: #4ade80; }

.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.75rem; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 0.9375rem; }

/* ==================== BADGES ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-new { background-color: rgba(59, 130, 246, 0.1); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.2); }
.badge-popular { background-color: rgba(234, 179, 8, 0.1); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.2); }
.badge-top { background-color: rgba(234, 179, 8, 0.1); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.2); }
.badge-popular-green { background-color: rgba(74, 222, 128, 0.1); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.2); }

/* ==================== FORM ELEMENTS ==================== */
input, select, textarea, .iti input {
    background: #0f172a !important;
    border: 1px solid #1e293b !important;
    color: #e2e8f0 !important;
    border-radius: 0.625rem !important;
    padding: 0.625rem 0.875rem !important;
    width: 100%;
    outline: none;
    transition: border-color 0.15s ease;
    font-size: 0.875rem;
}

input:focus, select:focus, textarea:focus, .iti input:focus {
    border-color: #4ade80 !important;
}

input::placeholder, textarea::placeholder { color: #475569 !important; }

label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #94a3b8;
    display: block;
    margin-bottom: 0.375rem;
}

/* ==================== SELECT ==================== */
select,
select option {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
    border: 1px solid #1e293b !important;
    border-radius: 0.625rem !important;
    padding: 0.625rem 1rem !important;
    font-size: 0.875rem !important;
    outline: none !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 1.25rem !important;
    padding-right: 2.5rem !important;
}

select:hover,
select:focus { border-color: #4ade80 !important; }

/* ==================== MODALS ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1000;
    animation: fadeIn 0.15s ease;
}

.modal-content {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 1rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    animation: slideUp 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 768px) {
    .modal-overlay { align-items: flex-end; padding: 0; }
    .modal-content {
        max-width: 100%;
        width: 100%;
        border-radius: 1rem 1rem 0 0;
        margin: 0;
        max-height: 88vh;
    }
}

/* ==================== NAVIGATION ==================== */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
}

.nav-links { display: flex; gap: 0.5rem; }

.nav-link {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.nav-link:hover { color: #f8fafc; background: #1e293b; }
.nav-link.active { background: rgba(74, 222, 128, 0.1); color: #4ade80; }

/* ==================== SIDEBAR ==================== */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: #0b1220;
    border-left: 1px solid #1e293b;
    z-index: 1100;
    padding: 1.5rem;
    transform: translateX(0);
    transition: transform 0.25s ease;
    overflow-y: auto;
}

.sidebar.hidden { transform: translateX(100%); }
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1050;
    transition: opacity 0.25s ease;
}
.sidebar-overlay.hidden { display: none; }

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: left;
    border-radius: 0.5rem;
    transition: all 0.15s ease;
    cursor: pointer;
}

.sidebar-link:hover, .sidebar-link.active {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}

/* ==================== CAROUSELS ==================== */
.carousel {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
    scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel-item { flex: 0 0 auto; width: 200px; }
.carousel-prev, .carousel-next { transition: opacity 0.2s ease, visibility 0.2s ease; }

/* ==================== TABLES ==================== */
.table, .admin-table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .admin-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 600;
    background: #0b1220;
    border-bottom: 1px solid #1e293b;
}

.table td, .admin-table td {
    padding: 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid #1e293b;
    color: #e2e8f0;
    vertical-align: middle;
}

.admin-table tbody tr:last-child td,
.table tbody tr:last-child td { border-bottom: none; }

.admin-table tbody tr:hover,
.table tbody tr:hover { background: #111c33; }

/* ==================== UTILITIES ==================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.rounded-full { border-radius: 9999px; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-3 { margin: 0.75rem; }
.m-4 { margin: 1rem; }
.m-6 { margin: 1.5rem; }
.m-8 { margin: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.gap-x-6 { column-gap: 1.5rem; }
.gap-y-2 { row-gap: 0.5rem; }
.gap-x-4 { column-gap: 1rem; }
.gap-y-1 { row-gap: 0.25rem; }

/* ==================== LOADING SKELETON ==================== */
.skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.75rem;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==================== TOAST ==================== */
#toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: #0f172a;
    color: #e2e8f0;
    border: 1px solid #1e293b;
    border-left: 3px solid #4ade80;
    border-radius: 0.75rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    transform: translateX(120%);
    animation: slideIn 0.25s forwards, fadeOut 0.25s 2.75s forwards;
    max-width: 340px;
}

.toast.error { border-left-color: #ef4444; }
.toast.info { border-left-color: #3b82f6; }
.toast.warning { border-left-color: #eab308; }

@keyframes slideIn { to { transform: translateX(0); } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(120%); } }

/* ==================== SCANNER ==================== */
#scanner-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 1rem;
    overflow: hidden;
    background: #0f172a;
}
#scanner-container video { width: 100%; height: auto; }
.scan-region-highlight {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    border: 2px solid #4ade80;
    border-radius: 1rem;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.65);
    pointer-events: none;
}

/* ==================== TICKET STATUS BADGES ==================== */
.ticket-status-badge {
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s ease;
    display: inline-flex;
    align-items: center;
}
.ticket-status-badge:hover { opacity: 0.85; }

.status-unused { background: rgba(74, 222, 128, 0.1); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.2); }
.status-used { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.2); }
.status-voided { background: rgba(100, 116, 139, 0.1); color: #94a3b8; border: 1px solid rgba(100, 116, 139, 0.2); }
.payment-pending { background: rgba(234, 179, 8, 0.1); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.2); }

.status-pending { background: rgba(234, 179, 8, 0.1); color: #facc15; }
.status-confirmed { background: rgba(59, 130, 246, 0.1); color: #60a5fa; }
.status-preparing { background: rgba(168, 85, 247, 0.1); color: #a78bfa; }
.status-delivering { background: rgba(249, 115, 22, 0.1); color: #fb923c; }
.status-delivered { background: rgba(34, 197, 94, 0.1); color: #4ade80; }
.status-cancelled { background: rgba(239, 68, 68, 0.1); color: #f87171; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    h1 { font-size: 1.625rem; }
    h2 { font-size: 1.375rem; }
    h3 { font-size: 1.125rem; }
    .container { padding: 0 1rem; }
    .card { padding: 1rem; }
    .modal-content { padding: 1.5rem; }
    .nav-links { display: none; }
    #hamburger-btn { display: block; }
    .carousel-item { width: 160px; }
}

@media (min-width: 769px) {
    #hamburger-btn { display: none; }
    .sidebar-overlay, .sidebar { display: none !important; }
}

/* ==================== CATEGORY TREE ITEMS ==================== */
.category-tree-item {
    background: #0f172a !important;
    color: #e2e8f0 !important;
    border: 1px solid #1e293b;
}
.category-tree-item button { color: #e2e8f0 !important; }
.category-tree-item button.text-lime-500 { color: #4ade80 !important; }
.category-tree-item button.text-red-500 { color: #f87171 !important; }

select.category-parent-select,
select.category-parent-select option {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
    border: 1px solid #1e293b !important;
    border-radius: 0.5rem;
    padding: 0.5rem;
}

/* ==================== RESTAURANT CARD FIXES ==================== */
#restaurants-list .glass {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
}
#restaurants-list .glass > div:last-child {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}
#restaurants-list .glass > div:last-child > div:last-child { margin-top: auto !important; }
#restaurants-list .glass > div:first-child { flex-shrink: 0; }

/* ==================== SCROLLBAR HIDE ==================== */
.scrollbar-hide { scrollbar-width: none; -ms-overflow-style: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* ==================== IMAGE MODAL ==================== */
#image-modal {
    align-items: center;
    justify-content: center;
    z-index: 20000 !important;
    background: rgba(0, 0, 0, 0.95) !important;
}
#image-modal .modal-content {
    background: transparent !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
#image-modal img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 1rem;
}

/* ==================== CAROUSEL GAP FIX ==================== */
#new-popular-container .carousel-container .flex,
#coming-soon-container .carousel-container .flex { gap: 0.5rem !important; }

/* ==================== ONESIGNAL BELL ==================== */
.onesignal-bell-launcher { bottom: 20px !important; right: 20px !important; z-index: 10000 !important; }
.onesignal-bell-launcher-button {
    background-color: #4ade80 !important;
    color: #020617 !important;
}

/* ==================== GOOGLE MAPS AUTOCOMPLETE ==================== */
.pac-container {
    z-index: 10000 !important;
    background: #0f172a !important;
    border: 1px solid #1e293b !important;
    border-radius: 0.75rem !important;
    margin-top: 4px !important;
    font-family: 'Inter', sans-serif !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
    padding: 0.25rem 0 !important;
}
.pac-item {
    color: #e2e8f0 !important;
    background: transparent !important;
    border-top: 1px solid #1e293b !important;
    padding: 0.6rem 1rem !important;
    cursor: pointer !important;
    font-size: 0.875rem !important;
}
.pac-item:first-child { border-top: none !important; }
.pac-item:hover { background: rgba(74, 222, 128, 0.1) !important; }
.pac-item-query { color: #4ade80 !important; font-size: 0.875rem !important; font-weight: 500 !important; }
.pac-matched { font-weight: 700 !important; color: #f8fafc !important; }
.pac-icon { display: none !important; }
.pac-logo::after { display: none !important; }

/* ==================== PAYMENT METHOD DROPDOWN ==================== */
.payment-select-wrapper { position: relative; width: 100%; }

.payment-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: #0f172a;
    border: 1px solid #1e293b;
    color: #e2e8f0;
    border-radius: 0.625rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.payment-select-trigger:hover { background: #111c33; }
.payment-select-trigger[aria-expanded="true"] { border-color: #4ade80; background: #111c33; }

.payment-trigger-content { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.payment-caret { width: 1rem; height: 1rem; flex-shrink: 0; opacity: 0.5; }

.payment-select-menu {
    position: absolute;
    top: calc(100% + 0.375rem);
    left: 0;
    right: 0;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 0.75rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
    padding: 0.25rem;
    z-index: 200;
    max-height: 320px;
    overflow-y: auto;
}
.payment-select-menu.hidden { display: none; }

.payment-select-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: transparent;
    border: none;
    color: #e2e8f0;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}
.payment-select-item:hover { background: #1e293b; }
.payment-select-item.active { background: rgba(74, 222, 128, 0.1); }
.payment-select-item.active .payment-check { color: #4ade80; font-weight: 700; }

.payment-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}
.payment-logo svg, .payment-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.payment-logo .fa-money-bill-wave, .payment-logo .fa-building-columns { font-size: 1.125rem; color: #4ade80; }
.payment-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==================== CHECKBOX & RADIO RESET ==================== */
input[type="checkbox"],
input[type="radio"] {
    width: 1rem !important;
    height: 1rem !important;
    min-width: 1rem !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #334155 !important;
    border-radius: 0.25rem !important;
    background: transparent !important;
    accent-color: #4ade80;
    cursor: pointer;
    flex-shrink: 0;
    vertical-align: middle;
    appearance: auto;
    -webkit-appearance: checkbox;
}
input[type="radio"] { -webkit-appearance: radio; border-radius: 9999px !important; }
input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background: #4ade80 !important;
    border-color: #4ade80 !important;
    accent-color: #4ade80;
}

/* ==================== ADMIN TABS (sidebar) ==================== */
.admin-tab {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #94a3b8;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}
.admin-tab:hover { color: #f8fafc; background: #1e293b; }
.admin-tab.active {
    background: rgba(74, 222, 128, 0.1) !important;
    color: #4ade80 !important;
}
.admin-tab.active i { color: #4ade80 !important; }

.cart-tab, .tab-button {
    background: transparent;
    color: #94a3b8;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
}
.cart-tab:hover, .tab-button:hover { background: #1e293b; color: #e2e8f0; }
.cart-tab.active, .tab-button.active {
    background: #4ade80 !important;
    color: #020617 !important;
}

/* ==================== ORDER CARDS ==================== */
.order-card { transition: border-color 0.15s ease, background 0.15s ease; }
.order-card:hover { border-color: #334155; background: #111c33; }
.client-row:hover { background: #111c33; cursor: pointer; }

/* ==================== BUSINESS HOURS EDITOR ==================== */
.business-hours-editor {
    background: #0b1220;
    border: 1px solid #1e293b;
    border-radius: 1rem;
    padding: 1.5rem;
}

.day-row {
    border-bottom: 1px solid #1e293b;
    padding: 1rem 0;
}

.day-row:last-child {
    border-bottom: none;
}

.slot-row {
    margin-left: 0;
    gap: 0.75rem;
    align-items: center;
}

.time-input {
    background: #0f172a;
    border: 1px solid #1e293b;
    color: #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    width: 130px;
    min-width: 130px;
    text-align: center;
    outline: none;
    transition: border-color 0.15s ease;
}

.time-input:focus {
    border-color: #4ade80;
}

.remove-slot-btn {
    font-size: 1rem;
    line-height: 1;
    padding: 0.25rem;
    border-radius: 0.375rem;
}

.remove-slot-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ==================== CHART CONTAINER ==================== */
.chart-container {
    position: relative;
    height: 260px;
    width: 100%;
    padding-left: 0.25rem;
}

/* ==================== FLATPICKR INPUT OVERRIDE ==================== */
input[readonly].flatpickr-input,
input.flatpickr-input {
    background: #0f172a !important;
    border: 1px solid #1e293b !important;
    color: #e2e8f0 !important;
}

/* ==================== ADMIN RESPONSIVE FIX ==================== */
#admin-mobile-topbar { display: flex; }

@media (min-width: 768px) {
    #admin-mobile-topbar { display: none !important; }
}

@media (max-width: 767px) {
    #admin-view > aside.admin-desktop-sidebar { display: none !important; }
}

/* ==================== GLOW CARDS ==================== */
.glow-card {
    background: linear-gradient(180deg, #0d1524 0%, #0b1220 100%);
    border: 1px solid rgba(74, 222, 128, 0.1);
    border-radius: 0.875rem;
    box-shadow:
        0 0 0 1px rgba(74, 222, 128, 0.02) inset,
        0 0 24px -8px rgba(74, 222, 128, 0.08),
        0 2px 6px rgba(0, 0, 0, 0.35);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.glow-card:hover {
    border-color: rgba(74, 222, 128, 0.2);
    box-shadow:
        0 0 0 1px rgba(74, 222, 128, 0.04) inset,
        0 0 32px -6px rgba(74, 222, 128, 0.14),
        0 2px 8px rgba(0, 0, 0, 0.4);
}

.glow-card .admin-table th {
    background: rgba(2, 6, 23, 0.5);
    border-bottom-color: rgba(74, 222, 128, 0.08);
}
.glow-card .admin-table td {
    border-bottom-color: rgba(74, 222, 128, 0.06);
}
.glow-card .admin-table tbody tr:hover {
    background: rgba(74, 222, 128, 0.03);
}

.admin-desktop-sidebar {
    border-right-color: rgba(74, 222, 128, 0.08) !important;
}
.admin-desktop-sidebar > div {
    border-bottom-color: rgba(74, 222, 128, 0.08) !important;
}

/* ==================== MOBILE TAP / SELECTION FIX ==================== */
[onclick],
button,
.btn,
.badge,
.nav-link,
.sidebar-link,
.admin-tab,
.cart-tab,
.tab-button,
input[type="submit"],
input[type="button"] {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

input:not([type="submit"]):not([type="button"]),
textarea,
[contenteditable="true"],
.selectable-text {
    user-select: text;
    -webkit-user-select: text;
}

/* ==================== MODAL SCROLL FIX ==================== */
.modal-overlay {
    align-items: flex-start;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.modal-overlay > * {
    margin: auto;
}

.max-h-\[92vh\] { max-height: 92vh; }
.max-h-\[88vh\] { max-height: 88vh; }
.max-h-\[85vh\] { max-height: 85vh; }

@media (max-height: 700px) {
    .modal-overlay > * {
        max-height: 88vh !important;
    }
}

/* ==================== TIME INPUT WIDTH FIX ==================== */
.business-hours-editor input[type="time"],
.business-hours-editor .slot-open,
.business-hours-editor .slot-close,
.business-hours-editor .time-input {
    width: 8.5rem !important;
    min-width: 8.5rem !important;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.business-hours-editor .slot-row {
    flex-wrap: nowrap;
}

@media (max-width: 420px) {
    .business-hours-editor .slot-row {
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }
    .business-hours-editor .slot-row .slot-open,
    .business-hours-editor .slot-row .slot-close {
        width: 100% !important;
        min-width: 100% !important;
    }
    .business-hours-editor .slot-row > span {
        display: none;
    }
}

/* ==================== ADMIN ORDERS TABLE ==================== */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}

.admin-table th {
    text-align: left;
    padding: 0.875rem 1.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    background: #0b1220;
    border-bottom: 1px solid rgba(74, 222, 128, 0.08);
    white-space: nowrap;
}

.admin-table th.text-right { text-align: right; }

.admin-table td {
    padding: 1.125rem 1.25rem;
    font-size: 0.8125rem;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(74, 222, 128, 0.05);
    vertical-align: middle;
}

.admin-table tbody tr.orders-row {
    transition: background-color 0.15s ease;
}
.admin-table tbody tr.orders-row:hover {
    background: rgba(74, 222, 128, 0.03);
}
.admin-table tbody tr.orders-row:last-child td {
    border-bottom: none;
}

.cell-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.cell-primary {
    color: #f1f5f9;
    font-weight: 500;
    font-size: 0.8125rem;
    line-height: 1.3;
}
.cell-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.75rem;
    color: #cbd5e1;
    letter-spacing: -0.01em;
    line-height: 1.3;
}
.cell-muted {
    color: #64748b;
    font-size: 0.6875rem;
    line-height: 1.4;
}
.truncate-cell {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.type-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.type-chip i { font-size: 9px; opacity: 0.85; }
.type-chip-event {
    background: rgba(168, 85, 247, 0.08);
    color: #c4b5fd;
    border: 1px solid rgba(168, 85, 247, 0.18);
}
.type-chip-delivery {
    background: rgba(59, 130, 246, 0.08);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.18);
}

.money-cell {
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    justify-content: flex-end;
}
.money-symbol {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    margin-right: 1px;
}
.money-amount {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #f8fafc;
    letter-spacing: -0.01em;
}
.money-code {
    font-size: 0.625rem;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 4px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    border: 1px solid transparent;
}
.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.9;
    flex-shrink: 0;
}
.status-pill.is-pending    { background: rgba(234, 179, 8, 0.08);   color: #facc15; border-color: rgba(234, 179, 8, 0.2); }
.status-pill.is-paid       { background: rgba(74, 222, 128, 0.08);  color: #4ade80; border-color: rgba(74, 222, 128, 0.2); }
.status-pill.is-used       { background: rgba(59, 130, 246, 0.08);  color: #60a5fa; border-color: rgba(59, 130, 246, 0.2); }
.status-pill.is-voided     { background: rgba(239, 68, 68, 0.08);   color: #f87171; border-color: rgba(239, 68, 68, 0.2); }
.status-pill.is-cancelled  { background: rgba(100, 116, 139, 0.1);  color: #94a3b8; border-color: rgba(100, 116, 139, 0.2); }
.status-pill.is-confirmed  { background: rgba(59, 130, 246, 0.08);  color: #60a5fa; border-color: rgba(59, 130, 246, 0.2); }
.status-pill.is-preparing  { background: rgba(168, 85, 247, 0.08);  color: #a78bfa; border-color: rgba(168, 85, 247, 0.2); }
.status-pill.is-delivering { background: rgba(249, 115, 22, 0.08);  color: #fb923c; border-color: rgba(249, 115, 22, 0.2); }
.status-pill.is-delivered  { background: rgba(74, 222, 128, 0.08);  color: #4ade80; border-color: rgba(74, 222, 128, 0.2); }

.row-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
}
.row-action {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    color: #64748b;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.row-action:hover {
    background: rgba(74, 222, 128, 0.08);
    border-color: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}
.row-action-ai:hover {
    background: rgba(168, 85, 247, 0.08);
    border-color: rgba(168, 85, 247, 0.25);
    color: #c4b5fd;
}
.row-action:disabled {
    opacity: 0.5;
    cursor: default;
}

.table-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: #475569;
}
.table-empty i {
    font-size: 2.5rem;
    opacity: 0.35;
    display: block;
    margin-bottom: 0.75rem;
}
.table-empty p {
    font-size: 0.875rem;
}

/* ==================== AI VERDICT DETAILS ==================== */
.ai-verdict-details {
    display: inline-block;
    vertical-align: middle;
}

.ai-verdict-details > summary.ai-verdict-summary {
    list-style: none;
    outline: none;
}

.ai-verdict-details > summary.ai-verdict-summary::-webkit-details-marker {
    display: none;
}

.ai-verdict-details > summary.ai-verdict-summary::marker {
    content: '';
}

.ai-verdict-details > summary.ai-verdict-summary:hover {
    filter: brightness(1.15);
}

.ai-verdict-chevron {
    display: inline-block;
    transition: transform 0.15s ease;
    line-height: 1;
}

.ai-verdict-details[open] .ai-verdict-chevron {
    transform: rotate(180deg);
}

.ai-verdict-details[open] > summary.ai-verdict-summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.ai-verdict-reasoning {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: 0 !important;
    font-weight: 500;
    letter-spacing: 0.01em;
    animation: aiVerdictReveal 0.15s ease;
}

@keyframes aiVerdictReveal {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==================== CURRENCY DISPLAY SWAP ==================== */
/* Templates wrap the XCD base price in .price-xcd and append the
   formatXCDHtml() span .price-converted. CSS shows exactly one
   based on body[data-display-currency], which currency.js sets on
   every currency change and on initial load.

   Default (attribute not yet set or = "XCD"): show XCD, hide converted. */
.price-converted { display: none; }

body[data-display-currency]:not([data-display-currency="XCD"]) .price-xcd {
    display: none !important;
}
body[data-display-currency]:not([data-display-currency="XCD"]) .price-converted {
    display: inline !important;
}