/* Enterprise Café ERP - Luxury Velvet Burgundy & Gold Theme (Matching Public Website) */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Google+Sans+Flex:wght@100..900&display=swap');

:root {
    /* Public Website Theme Tokens */
    --sky-bg-dark: #160205;
    --sky-bg-burgundy: #220309;
    --sky-bg-card: #27040b;
    --sky-bg-card-hover: #33060f;
    --sky-gold-light: #fff0b3;
    --sky-gold: #f5cf6d;
    --sky-gold-rich: #d4af37;
    --sky-gold-dark: #aa771c;
    --sky-gold-gradient: linear-gradient(135deg, #ffe599 0%, #d4af37 50%, #aa771c 100%);
    --sky-gold-border: rgba(212, 175, 55, 0.28);
    --sky-gold-border-bright: rgba(212, 175, 55, 0.7);
    --sky-cream: #fff7ed;
    --sky-cream-muted: #cbd5e1;

    /* ERP Standard Tokens mapped to Luxury Burgundy Theme */
    --cafe-primary: #831843;
    --cafe-primary-hover: #9f1239;
    --cafe-accent: #d4af37;
    --cafe-accent-hover: #b45309;
    --cafe-dark: #0f0103;
    --cafe-sidebar-bg: #140205;
    --cafe-bg: #160205;
    --cafe-card-bg: #25040a;
    --cafe-border: rgba(212, 175, 55, 0.22);
    --cafe-border-subtle: rgba(212, 175, 55, 0.14);
    --cafe-text: #fff7ed;
    --cafe-text-muted: #cbd5e1;
    --cafe-success: #10b981;
    --cafe-warning: #f59e0b;
    --cafe-danger: #ef4444;
    --cafe-info: #06b6d4;
    --font-main: 'Plus Jakarta Sans', 'Google Sans Flex', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Cinzel', 'Playfair Display', Georgia, serif;
    --radius-sm: 0.4rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    font-family: var(--font-main) !important;
    font-size: 14px !important;
    line-height: 1.5;
    letter-spacing: -0.01em;
    color: #fff7ed !important;
    background-color: #160205 !important;
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(185, 28, 52, 0.24) 0%, transparent 60%),
        radial-gradient(circle at 100% 50%, rgba(140, 18, 36, 0.14) 0%, transparent 50%),
        linear-gradient(180deg, #1b0307 0%, #100103 100%) !important;
    background-attachment: fixed !important;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: var(--font-main) !important;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff7ed;
}

.font-cinzel {
    font-family: var(--font-serif) !important;
    letter-spacing: 0.05em;
}

/* ========================================================
   SIDEBAR MASTER RULES (High Contrast, Ultra-Legible & Gold Accents)
   ======================================================== */
aside#sidebar {
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
    flex: 0 0 260px !important;
    height: 100vh !important;
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    background: linear-gradient(180deg, #1d0308 0%, #150205 50%, #0a0103 100%) !important;
    color: #fff7ed !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 1040 !important;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.5) !important;
    border-right: 1px solid rgba(212, 175, 55, 0.25) !important;
}

aside#sidebar::-webkit-scrollbar {
    width: 5px;
}
aside#sidebar::-webkit-scrollbar-track {
    background: #100103;
}
aside#sidebar::-webkit-scrollbar-thumb {
    background: #4a0d17;
    border-radius: 4px;
}

aside#sidebar .brand-header {
    padding: 1.1rem 1.25rem !important;
    background: rgba(14, 2, 4, 0.92) !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
}

aside#sidebar .brand-logo {
    width: 38px !important;
    height: 38px !important;
    background: linear-gradient(135deg, #f5cf6d 0%, #d4af37 50%, #aa771c 100%) !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #1c0205 !important;
    font-size: 1.25rem !important;
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.45) !important;
    flex-shrink: 0 !important;
}

/* Sidebar Section Titles - Warm Radiant Gold */
aside#sidebar .nav-section-title {
    font-size: 0.72rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    color: #f5cf6d !important;
    padding: 1.1rem 1.2rem 0.4rem !important;
    font-weight: 800 !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Sidebar Nav Links - Crystal Clear Pearl White with High Contrast */
aside#sidebar a.nav-link {
    color: #f8fafc !important;
    padding: 0.60rem 0.95rem !important;
    margin: 0.20rem 0.65rem !important;
    border-radius: 8px !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.8rem !important;
    text-decoration: none !important;
    border: 1px solid transparent !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Sidebar Icons - Radiant Warm Gold */
aside#sidebar a.nav-link i {
    font-size: 1.15rem !important;
    color: #f59e0b !important;
    width: 22px !important;
    text-align: center !important;
    flex-shrink: 0 !important;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.45)) !important;
    transition: all 0.2s ease !important;
}

/* Sidebar Link Hover State */
aside#sidebar a.nav-link:hover {
    color: #ffffff !important;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.25) 0%, rgba(212, 175, 55, 0.06) 100%) !important;
    border: 1px solid rgba(212, 175, 55, 0.35) !important;
    border-left: 3.5px solid #f5cf6d !important;
    transform: translateX(3px) !important;
}

aside#sidebar a.nav-link:hover i {
    color: #fff0b3 !important;
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.8)) !important;
    transform: scale(1.15) !important;
}

/* Active Nav Link - Radiant Amber/Gold Pill */
aside#sidebar a.nav-link.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, #d4af37 0%, #8a2408 100%) !important;
    box-shadow: 0 4px 18px rgba(212, 175, 55, 0.45) !important;
    border: 1px solid rgba(255, 235, 175, 0.55) !important;
    font-weight: 700 !important;
}

aside#sidebar a.nav-link.active i {
    color: #ffffff !important;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.75)) !important;
}

/* ========================================================
   TOP NAVBAR (Luxury Royal Burgundy Glass)
   ======================================================== */
.top-navbar {
    background: rgba(24, 3, 7, 0.95) !important;
    backdrop-filter: blur(14px) !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25) !important;
    padding: 0.65rem 1.5rem !important;
    min-height: 56px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1020 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

.top-navbar h5 {
    color: #fff7ed !important;
    font-family: var(--font-serif) !important;
    letter-spacing: 0.5px !important;
    font-size: 1.12rem !important;
}

/* ========================================================
   ADMIN DASHBOARD PANELS & CARDS (Website Burgundy Luxury Theme)
   ======================================================== */
.card, .card.bg-white {
    background: linear-gradient(145deg, #25040a 0%, #1c0307 100%) !important;
    border: 1px solid rgba(212, 175, 55, 0.24) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
    color: #fff7ed !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease !important;
}

.card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55), 0 0 20px rgba(212, 175, 55, 0.10) !important;
    border-color: rgba(212, 175, 55, 0.4) !important;
}

.card-header, .card-header.bg-white {
    background: rgba(18, 2, 5, 0.65) !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2) !important;
    padding: 0.85rem 1.15rem !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    color: #f5cf6d !important;
}

.card-header h5, .card-header h6, .card-header .text-dark, .card-header div {
    color: #f5cf6d !important;
}

.card-footer {
    background: rgba(18, 2, 5, 0.5) !important;
    border-top: 1px solid rgba(212, 175, 55, 0.18) !important;
    color: #cbd5e1 !important;
}

/* KPI Stat Cards (Obsidian Burgundy with Gold Trim) */
.kpi-card {
    border-radius: var(--radius-md) !important;
    padding: 1.15rem 1.25rem !important;
    position: relative !important;
    overflow: hidden !important;
    background: linear-gradient(145deg, #2b050d 0%, #1e0307 100%) !important;
    border: 1px solid rgba(212, 175, 55, 0.28) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.kpi-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 20px rgba(212, 175, 55, 0.18) !important;
    border-color: rgba(212, 175, 55, 0.65) !important;
}

.kpi-card .kpi-icon {
    width: 44px !important;
    height: 44px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.3rem !important;
}

.kpi-card .kpi-value, .kpi-card .kpi-value.text-dark {
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    letter-spacing: -0.03em !important;
    margin-top: 0.2rem !important;
    line-height: 1.2 !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.kpi-card .kpi-label {
    color: #d6c7b2 !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
}

/* Subtle KPI Icon Highlights */
.bg-success-subtle {
    background-color: rgba(16, 185, 129, 0.16) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
}
.bg-danger-subtle {
    background-color: rgba(239, 68, 68, 0.16) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
}
.bg-warning-subtle {
    background-color: rgba(245, 158, 11, 0.16) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
}
.bg-info-subtle {
    background-color: rgba(6, 182, 212, 0.16) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(6, 182, 212, 0.35) !important;
}

/* ========================================================
   TABLES (High Contrast, Luxury Table Rows & Gold Headers)
   ======================================================== */
.table {
    vertical-align: middle !important;
    margin-bottom: 0 !important;
    font-size: 0.86rem !important;
    width: 100% !important;
    color: #f1f5f9 !important;
    --bs-table-bg: transparent !important;
    --bs-table-hover-bg: rgba(212, 175, 55, 0.09) !important;
}

.table thead th, .table-light, .table-light th {
    background-color: rgba(16, 2, 5, 0.92) !important;
    color: #f5cf6d !important;
    font-size: 0.76rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    font-weight: 700 !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3) !important;
    padding: 0.8rem 1rem !important;
    white-space: nowrap !important;
}

.table tbody td {
    padding: 0.8rem 1rem !important;
    color: #f1f5f9 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    background-color: transparent !important;
}

.table-hover tbody tr:hover {
    background-color: rgba(212, 175, 55, 0.09) !important;
}

/* ========================================================
   FORM CONTROLS & INPUTS (Burgundy & Gold Styling)
   ======================================================== */
.form-control, .form-select {
    font-family: var(--font-main) !important;
    font-size: 0.86rem !important;
    border: 1px solid rgba(212, 175, 55, 0.35) !important;
    border-radius: var(--radius-sm) !important;
    padding: 0.45rem 0.8rem !important;
    color: #fff7ed !important;
    background-color: #1a0307 !important;
}

.form-control:focus, .form-select:focus {
    border-color: #f5cf6d !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25) !important;
    outline: none !important;
    background-color: #200409 !important;
    color: #ffffff !important;
}

.form-control-sm, .form-select-sm {
    font-size: 0.80rem !important;
    padding: 0.30rem 0.65rem !important;
}

.input-group-text {
    font-size: 0.82rem !important;
    border: 1px solid rgba(212, 175, 55, 0.35) !important;
    background-color: #24040a !important;
    color: #f5cf6d !important;
}

/* ========================================================
   BUTTONS & UTILITIES
   ======================================================== */
.btn {
    font-family: var(--font-main) !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    padding: 0.44rem 0.95rem !important;
    letter-spacing: -0.01em !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    transition: all 0.18s ease !important;
}

.btn-cafe {
    background: linear-gradient(135deg, #d4af37 0%, #8a2408 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 230, 160, 0.45) !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35) !important;
}

.btn-cafe:hover {
    background: linear-gradient(135deg, #e5be49 0%, #a42c0a 100%) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.48) !important;
}

.btn-light {
    background-color: rgba(212, 175, 55, 0.12) !important;
    color: #f5cf6d !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
}

.btn-light:hover {
    background-color: rgba(212, 175, 55, 0.25) !important;
    color: #ffffff !important;
    border-color: rgba(212, 175, 55, 0.5) !important;
}

.btn-outline-secondary {
    border-color: rgba(212, 175, 55, 0.35) !important;
    color: #f5cf6d !important;
    background-color: transparent !important;
}

.btn-outline-secondary:hover {
    background-color: rgba(212, 175, 55, 0.15) !important;
    color: #ffffff !important;
    border-color: #f5cf6d !important;
}

/* Badges */
.badge {
    font-family: var(--font-main) !important;
    font-weight: 600 !important;
    padding: 0.35em 0.70em !important;
    border-radius: 6px !important;
    font-size: 0.74rem !important;
    letter-spacing: 0.3px !important;
}

.badge-paid {
    background-color: rgba(16, 185, 129, 0.2) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

.badge-unpaid {
    background-color: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

.badge-partially {
    background-color: rgba(245, 158, 11, 0.2) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
}

/* List Groups */
.list-group-item {
    background-color: transparent !important;
    color: #fff7ed !important;
    border-color: rgba(212, 175, 55, 0.15) !important;
}
.list-group-item:hover {
    background-color: rgba(212, 175, 55, 0.08) !important;
}

/* Modals & Dropdowns */
.modal-content, .dropdown-menu {
    background: linear-gradient(145deg, #25040a 0%, #1a0206 100%) !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
    color: #fff7ed !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75) !important;
    border-radius: var(--radius-md) !important;
}

.modal-header {
    border-bottom: 1px solid rgba(212, 175, 55, 0.2) !important;
    padding: 1rem 1.25rem !important;
}

.modal-footer {
    border-top: 1px solid rgba(212, 175, 55, 0.2) !important;
    padding: 0.85rem 1.25rem !important;
}

.dropdown-item {
    color: #f1f5f9 !important;
    padding: 0.5rem 1rem !important;
}

.dropdown-item:hover {
    background-color: rgba(212, 175, 55, 0.2) !important;
    color: #f5cf6d !important;
}

/* Pagination */
.pagination {
    margin-bottom: 0 !important;
    gap: 4px !important;
}

.page-link {
    border-radius: 6px !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    background-color: #1a0307 !important;
    color: #f5cf6d !important;
    font-size: 0.82rem !important;
    padding: 0.35rem 0.75rem !important;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #d4af37 0%, #8a2408 100%) !important;
    border-color: #d4af37 !important;
    color: #ffffff !important;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4) !important;
}

/* Universal Text Overrides for Dark Panels */
.text-dark {
    color: #ffffff !important;
}
.text-muted, .text-secondary {
    color: #cbd5e1 !important;
}
.border-end, .border-bottom, .border-top {
    border-color: rgba(212, 175, 55, 0.2) !important;
}
