/* SEO Mobile ERP - Modern Theme & Glassmorphism Design System */
/* Signature Modern Palette: Electric Neon Cyan (#00F0FF / #13ECEC), Radiant Azure (#0080FF / #1380EC), Deep Royal Indigo (#6366F1 / #1313EC) */

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

:root {
    --color-cyan: #00F0FF;
    --color-azure: #0080FF;
    --color-indigo: #6366F1;
    --color-emerald: #10B981;
    --color-rose: #F43F5E;
    --color-amber: #F59E0B;
    
    --color-gradient-primary: linear-gradient(135deg, #00F0FF 0%, #0080FF 50%, #4F46E5 100%);
    --color-gradient-cyan-azure: linear-gradient(135deg, #00F0FF 0%, #0080FF 100%);
    --color-gradient-emerald: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --color-gradient-rose: linear-gradient(135deg, #F43F5E 0%, #E11D48 100%);
    --color-gradient-dark: linear-gradient(180deg, #0f172a 0%, #090d16 100%);
    
    --bg-body: #080d1a;
    --bg-card: #0f172a;
    --bg-surface: #111827;
    --bg-surface-elevated: #162032;
    --bg-sidebar: #090e1c;
    --bg-header: rgba(13, 21, 39, 0.9);
    
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(0, 240, 255, 0.35);
    --sidebar-width: 260px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 25px rgba(0, 240, 255, 0.35);
    --shadow-glow-azure: 0 0 25px rgba(0, 128, 255, 0.35);
    --border-radius: 14px;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-body);
    background-image: 
        radial-gradient(at 0% 0%, rgba(0, 240, 255, 0.06) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(0, 128, 255, 0.06) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(99, 102, 241, 0.05) 0px, transparent 50%);
    color: var(--text-primary);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* ==========================================================================
   Universal Text Contrast & Word Visibility Fixes
   ========================================================================== */
.text-dark {
    color: var(--text-primary) !important;
}

.text-muted {
    color: var(--text-secondary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.small.text-muted,
small.text-muted {
    color: #94A3B8 !important;
}

/* Global Heading & Dark Text Visibility Overrides */
h1[style*="color:#0f172a"],
h2[style*="color:#0f172a"],
h3[style*="color:#0f172a"],
h4[style*="color:#0f172a"],
h5[style*="color:#0f172a"],
h6[style*="color:#0f172a"],
div[style*="color:#0f172a"],
span[style*="color:#0f172a"],
h1[style*="color: #0f172a"],
h2[style*="color: #0f172a"],
h3[style*="color: #0f172a"],
h4[style*="color: #0f172a"],
h5[style*="color: #0f172a"],
h6[style*="color: #0f172a"],
div[style*="color: #0f172a"],
span[style*="color: #0f172a"] {
    color: #F8FAFC !important;
}

.bg-light {
    background-color: var(--bg-surface-elevated) !important;
    color: var(--text-primary) !important;
}

.badge.bg-light,
.badge.bg-light.text-dark {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #F8FAFC !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    font-weight: 600;
}

.badge.bg-dark-subtle {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #F8FAFC !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.badge.bg-secondary-subtle {
    background-color: rgba(148, 163, 184, 0.15) !important;
    color: #CBD5E1 !important;
    border: 1px solid rgba(148, 163, 184, 0.25) !important;
}

.badge.bg-info-subtle {
    background-color: rgba(0, 240, 255, 0.15) !important;
    color: #00F0FF !important;
    border: 1px solid rgba(0, 240, 255, 0.3) !important;
}

.badge.bg-success-subtle {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: #34D399 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

.badge.bg-warning-subtle {
    background-color: rgba(245, 158, 11, 0.15) !important;
    color: #FBBF24 !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

.badge.bg-danger-subtle {
    background-color: rgba(244, 63, 94, 0.15) !important;
    color: #FB7185 !important;
    border: 1px solid rgba(244, 63, 94, 0.3) !important;
}

/* ==========================================================================
   Form Controls, Inputs, and Select Elements
   ========================================================================== */
.form-control,
.form-select {
    background-color: #162032 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #F8FAFC !important;
    border-radius: 10px;
    padding: 10px 14px;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    background-color: #1a273e !important;
    border-color: var(--color-cyan) !important;
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.2) !important;
    color: #FFFFFF !important;
}

.form-control::placeholder {
    color: #64748B !important;
}

/* Explicit options styling for Windows / Chrome dropdown bug */
option {
    background-color: #0F172A !important;
    color: #F8FAFC !important;
}

.form-label {
    color: #E2E8F0 !important;
    font-weight: 600;
}

.form-check-label {
    color: #E2E8F0 !important;
}

.input-group-text {
    background-color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #94A3B8 !important;
}

/* ==========================================================================
   Glassmorphism & Surface Classes
   ========================================================================== */
.glass-panel {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.glass-dark {
    background: rgba(11, 17, 32, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

/* ==========================================================================
   Brand Buttons & Accents
   ========================================================================== */
.btn-gradient-primary {
    background: var(--color-gradient-primary);
    color: #080D1A !important;
    border: none;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.35);
    transition: all 0.25s ease;
}

.btn-gradient-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(0, 240, 255, 0.55);
    filter: brightness(1.1);
}

.btn-gradient-cyan {
    background: var(--color-gradient-cyan-azure);
    color: #080D1A !important;
    font-weight: 800;
    border: none;
    transition: all 0.2s ease;
}

.btn-gradient-cyan:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.45);
}

.gradient-text {
    background: var(--color-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* ==========================================================================
   Layout Shell: Sidebar & Header
   ========================================================================== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: #94A3B8;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    text-decoration: none;
}

.brand-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--color-gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #080D1A;
    font-size: 1.2rem;
    font-weight: 900;
    box-shadow: var(--shadow-glow);
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
    list-style: none;
    margin: 0;
}

.sidebar-heading {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #38BDF8 !important; /* Highly visible sky cyan */
    padding: 16px 16px 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: #94A3B8;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    border-radius: 10px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.sidebar-link i {
    font-size: 1.15rem;
    color: #64748B;
    transition: color 0.2s ease;
}

.sidebar-link:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-link:hover i {
    color: var(--color-cyan);
}

.sidebar-link.active {
    background: var(--color-gradient-primary);
    color: #080D1A;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.35);
}

.sidebar-link.active i {
    color: #080D1A;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.35);
}

/* Main Content Area */
.app-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Header Navbar */
.app-header {
    height: 70px;
    background: var(--bg-header);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.header-search {
    position: relative;
    width: 320px;
}

.header-search input {
    background: #162032 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 20px;
    padding: 8px 16px 8px 38px;
    font-size: 0.88rem;
    color: #FFFFFF !important;
    width: 100%;
    transition: all 0.2s ease;
}

.header-search input:focus {
    border-color: var(--color-cyan) !important;
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.2) !important;
}

.header-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-cyan);
}

.app-content {
    padding: 28px;
    flex: 1;
}

/* ==========================================================================
   Modern Cards & Glassmorphic Card Panels
   ========================================================================== */
.card-modern,
.card {
    background: linear-gradient(150deg, rgba(22, 32, 50, 0.82) 0%, rgba(13, 21, 39, 0.92) 100%) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    position: relative;
    color: var(--text-primary);
}

.card-modern::before,
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card-modern:hover,
.card:hover {
    border-color: rgba(0, 240, 255, 0.35) !important;
    transform: translateY(-3px);
    box-shadow: 0 20px 42px -10px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 240, 255, 0.12), inset 0 1px 0 rgba(0, 240, 255, 0.3) !important;
}

.card-modern:hover::before,
.card:hover::before {
    opacity: 1;
}

.card-body {
    color: var(--text-primary);
}

.card-header-modern,
.card-header {
    padding: 18px 24px;
    background: linear-gradient(90deg, rgba(26, 38, 59, 0.95) 0%, rgba(16, 25, 44, 0.95) 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #FFFFFF !important;
    font-weight: 700;
}

.card-footer-modern,
.card-footer {
    padding: 14px 24px;
    background: rgba(13, 21, 39, 0.95) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-secondary);
}

/* Enhanced Stat Box Cards */
.stat-card {
    background: linear-gradient(145deg, rgba(22, 32, 50, 0.85) 0%, rgba(13, 21, 39, 0.95) 100%) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 130px;
    height: 130px;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.09) 0%, transparent 70%);
    pointer-events: none;
    border-radius: 50%;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 240, 255, 0.4) !important;
    box-shadow: 0 20px 42px -10px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 240, 255, 0.18), inset 0 1px 0 rgba(0, 240, 255, 0.35) !important;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 16px;
    transition: all 0.25s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.08);
}

.stat-icon.cyan {
    background: rgba(0, 240, 255, 0.15);
    color: #00F0FF;
    border: 1px solid rgba(0, 240, 255, 0.35);
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.25);
}

.stat-icon.azure {
    background: rgba(0, 128, 255, 0.15);
    color: #38BDF8;
    border: 1px solid rgba(0, 128, 255, 0.35);
    box-shadow: 0 0 18px rgba(0, 128, 255, 0.25);
}

.stat-icon.indigo {
    background: rgba(99, 102, 241, 0.15);
    color: #818CF8;
    border: 1px solid rgba(99, 102, 241, 0.35);
    box-shadow: 0 0 18px rgba(99, 102, 241, 0.25);
}

.stat-icon.success {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, 0.35);
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.25);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #FFFFFF !important;
    line-height: 1.1;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

/* Report Hub Interactive Cards */
.report-card {
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer;
}

.report-card:hover {
    border-color: var(--color-cyan) !important;
    transform: translateY(-4px) scale(1.01) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 240, 255, 0.2) !important;
}

/* ==========================================================================
   Modern Tables
   ========================================================================== */
.table-modern,
.table {
    --bs-table-bg: transparent !important;
    --bs-table-color: #E2E8F0 !important;
    color: #E2E8F0 !important;
    margin-bottom: 0;
}

.table-modern thead th,
.table thead th {
    background-color: #162032 !important;
    color: #94A3B8 !important;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    white-space: nowrap;
}

.table-modern tbody td,
.table tbody td {
    padding: 14px 18px;
    vertical-align: middle;
    color: #F1F5F9 !important;
    font-size: 0.92rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    background-color: transparent !important;
}

.table-modern tbody tr:hover,
.table tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

/* ==========================================================================
   Modals & Dropdowns
   ========================================================================== */
.modal-content {
    background-color: #0F172A !important;
    color: #F8FAFC !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 18px !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(0, 240, 255, 0.18) !important;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    background-color: #111827 !important;
    border-top-left-radius: 18px !important;
    border-top-right-radius: 18px !important;
}

.modal-header .modal-title {
    color: #FFFFFF !important;
    font-weight: 700;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    background-color: #111827 !important;
    border-bottom-left-radius: 18px !important;
    border-bottom-right-radius: 18px !important;
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.dropdown-menu {
    background-color: #0F172A !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
    border-radius: 12px !important;
    padding: 8px !important;
}

.dropdown-item {
    color: #E2E8F0 !important;
    border-radius: 8px !important;
    padding: 8px 14px !important;
    transition: all 0.15s ease !important;
}

.dropdown-item:hover {
    background-color: rgba(0, 240, 255, 0.12) !important;
    color: var(--color-cyan) !important;
}

.dropdown-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* ==========================================================================
   Print Styles for Receipts and Invoices
   ========================================================================== */
@media print {
    .no-print, .app-sidebar, .app-header, .sidebar, .btn, .nav, .modal-backdrop {
        display: none !important;
    }
    
    .app-main {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    .printable-receipt {
        width: 80mm !important;
        margin: 0 auto !important;
        padding: 4mm !important;
        font-family: 'Courier New', Courier, monospace !important;
        font-size: 11px !important;
    }
}

/* ==========================================================================
   Header Buttons & Responsive Mobile Drawer
   ========================================================================== */
.header-toggle-btn {
    background: #162032 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: var(--color-cyan) !important;
    border-radius: 10px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.header-toggle-btn:hover,
.header-toggle-btn:focus {
    background: rgba(0, 240, 255, 0.15) !important;
    border-color: var(--color-cyan) !important;
    color: #FFFFFF !important;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}

.header-close-btn {
    color: #94A3B8 !important;
    transition: color 0.2s ease;
}

.header-close-btn:hover {
    color: #FFFFFF !important;
}

.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 7, 14, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1045;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

body.sidebar-open {
    overflow: hidden !important;
}

/* Mobile Responsiveness */
@media (max-width: 991px) {
    .app-sidebar {
        transform: translateX(-100%);
        z-index: 1050;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.7);
    }

    .app-sidebar.show {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .app-header {
        height: 62px;
        padding: 0 16px;
    }

    .app-content {
        padding: 18px 16px;
    }

    .header-search {
        display: none;
    }
}

@media (max-width: 576px) {
    .app-header {
        height: 58px;
        padding: 0 10px;
    }

    .header-btn {
        font-size: 0.76rem !important;
        padding: 5px 9px !important;
    }

    .header-toggle-btn {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    .app-content {
        padding: 14px 10px;
    }

    .card-modern {
        border-radius: 12px;
    }
}

