/* ==============================================================================
   ZENITH RESTAURANT & POS - GLOBAL LUXURY STYLESHEET
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Theme Colors (Dark Modern Luxury Theme Default) */
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #27354f;
    --bg-sidebar: #0b1120;
    --bg-topbar: #0f172a;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: #6366f1;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: rgba(79, 70, 229, 0.15);

    --accent-emerald: #10b981;
    --accent-emerald-light: rgba(16, 185, 129, 0.15);
    
    --accent-amber: #f59e0b;
    --accent-amber-light: rgba(245, 158, 11, 0.15);

    --accent-rose: #f43f5e;
    --accent-rose-light: rgba(244, 63, 94, 0.15);

    --accent-cyan: #06b6d4;
    --accent-cyan-light: rgba(6, 182, 212, 0.15);

    --glass-bg: rgba(30, 41, 59, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.3);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Bootstrap 5 Theme Variable Overrides */
    --bs-body-color: #f8fafc;
    --bs-body-bg: #0f172a;
    --bs-secondary-color: #94a3b8;
    --bs-secondary-bg: #1e293b;
    --bs-tertiary-color: #64748b;
    --bs-tertiary-bg: #0f172a;
    --bs-emphasis-color: #ffffff;
    --bs-border-color: rgba(255, 255, 255, 0.1);
    --bs-card-bg: #1e293b;
    --bs-card-color: #f8fafc;
    --bs-dropdown-bg: #1e293b;
    --bs-dropdown-color: #f8fafc;
    --bs-dropdown-link-color: #f8fafc;
    --bs-dropdown-link-hover-bg: #27354f;
    --bs-dropdown-border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] {
    --bs-body-color: #f8fafc;
    --bs-body-bg: #0f172a;
    --bs-secondary-color: #94a3b8;
    --bs-secondary-bg: #1e293b;
    --bs-tertiary-color: #64748b;
    --bs-emphasis-color: #ffffff;
    --bs-border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-sidebar: #0f172a;
    --bg-topbar: #ffffff;
    --border-color: #e2e8f0;
    --border-focus: #4f46e5;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --bs-body-color: #0f172a;
    --bs-secondary-color: #64748b;
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Global Typography & Text Contrast Overrides */
.text-muted {
    color: #94a3b8 !important;
    --bs-text-opacity: 1 !important;
}

.text-secondary {
    color: #cbd5e1 !important;
    --bs-text-opacity: 1 !important;
}

.text-dim {
    color: #64748b !important;
}

p.text-muted,
div.text-muted,
span.text-muted,
small.text-muted {
    color: #94a3b8 !important;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: #f8fafc;
}

/* Subtle Badge Overrides for Dark Mode High-Contrast */
.bg-primary-subtle {
    background-color: rgba(79, 70, 229, 0.22) !important;
    color: #c7d2fe !important;
}
.bg-success-subtle {
    background-color: rgba(16, 185, 129, 0.22) !important;
    color: #6ee7b7 !important;
}
.bg-warning-subtle {
    background-color: rgba(245, 158, 11, 0.22) !important;
    color: #fde68a !important;
}
.bg-danger-subtle {
    background-color: rgba(244, 63, 94, 0.22) !important;
    color: #fca5a5 !important;
}
.bg-info-subtle {
    background-color: rgba(6, 182, 212, 0.22) !important;
    color: #67e8f9 !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* App Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-main {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--bg-main);
}

/* Fullscreen Mode (e.g. POS / KDS) */
body.fullscreen-mode .app-sidebar {
    display: none;
}
body.fullscreen-mode .app-main {
    margin-left: 0;
}

/* Top Navbar */
.app-header {
    height: 68px;
    background-color: var(--bg-topbar);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(12px);
}

.app-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.02);
}

.sidebar-logo-img {
    max-width: 100%;
    height: 42px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.app-brand:hover .sidebar-logo-img {
    transform: scale(1.02);
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #175373, #5ea355);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(23, 83, 115, 0.4);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
    line-height: 1.1;
}

.brand-subtitle {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-logo-img {
    max-width: 280px;
    height: auto;
    max-height: 65px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.receipt-logo-img {
    max-width: 180px;
    max-height: 55px;
    object-fit: contain;
    margin-bottom: 8px;
}

/* Sidebar Navigation */
.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
    list-style: none;
}

.menu-heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-dim);
    letter-spacing: 0.8px;
    padding: 12px 14px 6px;
}

.menu-item {
    margin-bottom: 4px;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.menu-link i {
    font-size: 18px;
    width: 22px;
    text-align: center;
}

.menu-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    transform: translateX(3px);
}

.menu-item.active .menu-link {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.2), rgba(99, 102, 241, 0.1));
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.25);
    font-weight: 600;
}

.badge-counter {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Luxury Cards & Glassmorphism */
.zen-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.zen-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.zen-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.zen-card-title {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* KPI Stat Cards */
.kpi-card {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 255, 255, 0.2);
}

.kpi-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 14px;
}

.kpi-val {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
    font-family: var(--font-primary);
}

.kpi-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Custom Buttons */
.btn-zenith {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-zenith-primary {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.btn-zenith-primary:hover {
    background: linear-gradient(135deg, #4338ca, #4f46e5);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.btn-zenith-emerald {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-zenith-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-zenith-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.btn-zenith-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Badges */
.zen-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}

.badge-primary { background: var(--primary-light); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.badge-success { background: var(--accent-emerald-light); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: var(--accent-amber-light); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger  { background: var(--accent-rose-light); color: #f87171; border: 1px solid rgba(244, 63, 94, 0.3); }
.badge-info    { background: var(--accent-cyan-light); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }

/* Form Controls */
.form-control, .form-select {
    background-color: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    border-radius: var(--radius-sm) !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
}

.form-control::placeholder,
.form-control::-webkit-input-placeholder,
.form-control::-moz-placeholder,
.form-control:-ms-input-placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
    font-weight: 400;
}

[data-theme="light"] .form-control::placeholder,
[data-theme="light"] .form-control::-webkit-input-placeholder,
[data-theme="light"] .form-control::-moz-placeholder,
[data-theme="light"] .form-control:-ms-input-placeholder {
    color: #64748b !important;
    opacity: 1 !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--border-focus) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25) !important;
    color: #ffffff !important;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

/* Modals */
.modal-content {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-xl) !important;
    color: var(--text-main) !important;
    box-shadow: var(--shadow-lg) !important;
}

.modal-header, .modal-footer {
    border-color: var(--border-color) !important;
    padding: 18px 24px !important;
}

.modal-body {
    padding: 24px !important;
}

.btn-close {
    filter: invert(1);
}

/* Tables */
.table {
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
    margin-bottom: 0;
}

.table th {
    background-color: rgba(15, 23, 42, 0.4) !important;
    color: var(--text-muted) !important;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 12px 16px !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.table td {
    padding: 14px 16px !important;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color) !important;
    font-size: 13.5px;
}

.table tbody tr:hover {
    background-color: var(--bg-card-hover) !important;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    .app-sidebar.show {
        transform: translateX(0);
    }
    .app-main {
        margin-left: 0;
    }
}
