/* =====================================================
   AICE ICE CREAM - ANALYTICS DASHBOARD
   Main Stylesheet - AICE Brand Theme
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* =====================================================
   CSS VARIABLES / DESIGN TOKENS - AICE BRAND
   Brand: aice.co.id | Deep Purple + Yellow + Cream
   ===================================================== */
:root {
    /* Primary Palette - AICE Purple */
    --primary: #402566;
    --primary-light: #5c3a8a;
    --primary-dark: #2d1a4a;
    --primary-glow: rgba(64, 37, 102, 0.1);

    /* Accent - AICE Golden Yellow (Used sparingly in light theme) */
    --accent: #F7C948;
    --accent-light: #FFD966;
    --accent-glow: rgba(247, 201, 72, 0.1);

    /* Success / Warning / Danger */
    --success: #059669;
    --success-light: #10b981;
    --warning: #d97706;
    --warning-light: #f59e0b;
    --danger: #dc2626;
    --danger-light: #ef4444;
    --info: #7c3aed;

    /* Premium Inverted Theme - Deep Purple Background + Cream Elements */
    --bg-body: #1a0e2e;
    /* Very Dark Purple */
    --bg-sidebar: #241540;
    /* Solid Deep Purple */
    --bg-card: rgba(255, 255, 255, 0.03);
    /* Glassmorphism base */
    --bg-card-hover: rgba(255, 255, 255, 0.05);
    --bg-input: rgba(255, 255, 255, 0.03);
    --bg-table-header: rgba(255, 255, 255, 0.05);
    --bg-table-row: rgba(255, 255, 255, 0.02);
    --bg-table-row-alt: rgba(255, 255, 255, 0.04);

    /* Text Colors - Cream / White / Silver */
    --text-primary: #FFFDD0;
    /* Cream */
    --text-secondary: rgba(255, 253, 208, 0.85);
    --text-muted: rgba(255, 253, 208, 0.7);
    --text-heading: #ffffff;

    /* Borders - Subtle Outlines */
    --border: rgba(255, 253, 208, 0.12);
    --border-light: rgba(255, 253, 208, 0.08);
    --border-premium: rgba(255, 253, 208, 0.2);

    /* Sidebar */
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;

    /* Transitions */
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --transition-fast: all 0.2s ease;

    /* Shadows - Deep Purple Glow */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(64, 37, 102, 0.3);

    /* Radius */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    color-scheme: dark;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeInUp 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

/* =====================================================
   RESET & BASE
   ===================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color-scheme: dark;
}

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent-light);
}

/* =====================================================
   LAYOUT
   ===================================================== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed);
}

.content-area {
    flex: 1;
    padding: 24px 32px;
}

/* =====================================================
   MODERN BI COMPONENTS (Inspired by Reference)
   ===================================================== */
.bi-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 40px 32px 80px 32px;
    margin: -24px -32px 0 -32px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.bi-header .page-title {
    color: #fff;
    font-size: 24px;
    margin-bottom: 4px;
}

.bi-header .page-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

.bi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: -65px; /* Pull cards up into the header */
    margin-bottom: 30px;
    position: relative;
    z-index: 10;
}

.bi-card {
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    min-height: 120px;
}

.bi-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4), 0 0 20px rgba(247, 201, 72, 0.1);
}

.bi-card .card-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bi-card .card-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.bi-card .card-meta {
    margin-top: 10px;
    font-size: 11px;
    border-top: 1px solid var(--border-light);
    padding-top: 8px;
}

.bi-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: rgba(255,255,255,0.05);
    color: var(--accent);
}

/* =====================================================
   SIDEBAR
   ===================================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: var(--transition);
    overflow: hidden;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.3);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(64, 37, 102, 0.05) 0%, transparent 100%);
}

.sidebar-brand .brand-icon {
    width: 80px;
    height: 80px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border: none;
    padding: 0;
    transition: var(--transition);
}

.sidebar-brand .brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-brand .brand-text {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    letter-spacing: -0.8px;
    transition: color var(--transition);
}

.brand-tagline {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: -2px;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .brand-tagline,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar.collapsed .sidebar-brand {
    padding: 24px 20px;
    justify-content: center;
}

.sidebar.collapsed .brand-icon {
    width: 40px;
    height: 40px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 16px 20px 8px;
    white-space: nowrap;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
    cursor: pointer;
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
}

.nav-link:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--accent);
    background: rgba(247, 201, 72, 0.1);
    border-left-color: var(--accent);
    font-weight: 700;
    box-shadow: inset 4px 0 0 var(--accent);
}

.sidebar-footer {
    padding: 24px 20px;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    flex: 1;
}

.sidebar-footer .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, #e0a800 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    color: var(--primary-dark);
    flex-shrink: 0;
}

.sidebar-footer .user-details {
    overflow: hidden;
}

.sidebar-footer .user-name {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-footer .user-role {
    font-size: 12px;
    color: var(--accent);
    opacity: 0.8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar.collapsed .user-info {
    display: none;
}

.sidebar.collapsed .user-details {
    display: none;
}

/* =====================================================
   TOP HEADER
   ===================================================== */
.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: var(--bg-sidebar);
    /* Solid Deep Purple */
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 3000 !important; /* Extremely high to beat any overlay */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.toggle-sidebar {
    position: relative !important;
    z-index: 3001 !important;
    cursor: pointer !important;
}

.top-header .page-title {
    color: var(--text-heading);
}

.top-header .page-subtitle {
    color: var(--text-muted);
}

.top-header .toggle-sidebar {
    color: var(--text-primary);
    background: var(--bg-card);
}

.top-header .header-btn {
    background: var(--bg-card);
    border-color: var(--border);
    color: var(--text-primary);
}

.top-header .header-btn:hover {
    background: var(--bg-card-hover);
    color: var(--accent);
}

.top-header .header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.toggle-sidebar {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.toggle-sidebar:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-heading);
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.top-header .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: var(--transition-fast);
}

.header-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.header-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* =====================================================
   CARDS / PANELS
   ===================================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--transition);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) both;
}

.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.3s; }

.card:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(247, 201, 72, 0.1);
    transform: translateY(-5px);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
}

.card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: -0.3px;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* KPI Stat Cards */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(8px);
    animation: fadeInUp 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) both;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), var(--shadow-glow);
    border-color: var(--accent);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: var(--primary-glow);
    color: var(--primary-light);
}

.stat-icon.cyan {
    background: var(--accent-glow);
    color: var(--accent-light);
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-light);
}

.stat-icon.orange {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-light);
}

.stat-icon.red {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-light);
}

.stat-icon.purple {
    background: rgba(139, 92, 246, 0.15);
    color: var(--info);
}

.stat-card .stat-info h4 {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-card .stat-info .stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: -0.5px;
}

.stat-card .stat-info .stat-change {
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.up {
    color: var(--success);
}

.stat-change.down {
    color: var(--danger);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 15px rgba(64, 37, 102, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(64, 37, 102, 0.6);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: #fff;
}

.btn-success:hover {
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: #fff;
}

.btn-danger:hover {
    transform: translateY(-1px);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    color: var(--primary-light);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

/* =====================================================
   TABLES
   ===================================================== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 16px 20px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 2px solid var(--border);
}

table tbody td {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

table tbody tr {
    transition: var(--transition-fast);
}

table tbody tr:hover {
    background: rgba(255, 253, 208, 0.03);
}

table tbody tr:nth-child(even) {
    background: var(--bg-table-row-alt);
}

table tbody tr:nth-child(even):hover {
    background: rgba(255, 255, 255, 0.05);
}

/* =====================================================
   FORMS
   ===================================================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%2394a3b8' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-color: var(--bg-input);
    color: var(--text-primary);
}

select option,
select.form-control option,
select optgroup,
.form-select option {
    background-color: #1a102a !important;
    color: #ffffff !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

select option:hover,
select option:focus,
select option:checked {
    background-color: #311c52 !important;
    color: #f7c948 !important;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* =====================================================
   BADGES & STATUS
   ===================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--primary-glow);
    color: var(--primary-light);
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-light);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-light);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-light);
}

.badge-info {
    background: rgba(139, 92, 246, 0.15);
    color: var(--info);
}

.badge-secondary {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
}

.badge-pending-sales {
    background: var(--danger) !important;
    color: white !important;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
    animation: pulseBadge 2s infinite;
}

.badge-approval-count,
.badge-pending-users {
    background: var(--accent) !important;
    color: #1a0e2e !important;
    font-weight: 800 !important;
    font-size: 11px !important;
    padding: 2px 7px !important;
    border-radius: 10px !important;
    min-width: 18px !important;
    text-align: center !important;
    line-height: 14px !important;
    display: inline-block !important;
}

@keyframes pulseBadge {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* =====================================================
   ALERTS / FLASH MESSAGES
   ===================================================== */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
    font-weight: 600;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.alert-danger {
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning-light);
}

.alert-info {
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.3);
    color: var(--primary-light);
}


/* =====================================================
   CORE UI SCALE ENFORCEMENT (High Priority)
   Ensures header elements are large and visible
   ===================================================== */

/* 1. Header Bracing - Ensure enough height for large icons */
body .top-header {
    height: 72px !important;
    /* Forces a consistent, premium height */
    padding: 0 32px !important;
}

/* 2. Global Header Button Scaling */
body .header-btn {
    width: 36px !important;
    height: 36px !important;
    border-radius: 8px !important;
}

body .header-btn i {
    font-size: 14px !important;
}

/* 3. Specialized Profile Menu Button (Even Larger) */
body .user-menu-btn {
    width: 52px !important;
    height: 52px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1.5px solid var(--accent) !important;
    color: var(--accent) !important;
    box-shadow: 0 0 20px rgba(247, 201, 72, 0.2);
}

body .user-menu-btn i {
    font-size: 26px !important;
    /* Maximum visibility for hamburger */
}

body .user-menu-btn:hover {
    background: var(--accent) !important;
    color: var(--primary-dark) !important;
    transform: translateY(-2px) scale(1.05);
}

/* 4. Dropdown Scaling */
body .header-right .user-dropdown {
    top: calc(100% + 12px) !important;
    width: 240px !important;
    background: var(--bg-card);
    border: 1px solid var(--accent);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    z-index: 2000;
    backdrop-filter: blur(20px);
}

.dropdown-item {
    padding: 18px 25px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
}

.dropdown-item i {
    font-size: 18px !important;
    margin-right: 12px;
}

/* =====================================================
   ADDITIONAL PROFILE MENU OVERRIDES (High Priority)
   ===================================================== */
.header-right .profile-menu-container {
    padding-left: 10px;
}

body .header-right .user-menu-btn {
    width: 48px !important;
    height: 48px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1.5px solid var(--accent) !important;
    color: var(--accent) !important;
    border-radius: 12px !important;
    box-shadow: 0 0 15px rgba(247, 201, 72, 0.15);
    display: flex !important;
}

body .header-right .user-menu-btn i {
    font-size: 24px !important;
    /* Forces the icon to be large */
}

body .header-right .user-menu-btn:hover {
    background: var(--accent) !important;
    color: var(--primary-dark) !important;
    transform: scale(1.05);
}

/* Dropdown placement and size */
body .header-right .user-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(20px);
    overflow: hidden;
}

body .header-right .user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 15px 20px;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 1px solid var(--border);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
}

.dropdown-item:hover {
    background: rgba(247, 201, 72, 0.1);
    color: var(--accent);
}

.dropdown-item i {
    font-size: 16px;
    width: 18px;
    text-align: center;
}

.dropdown-item.logout {
    color: var(--danger-light);
}

/* =====================================================
   INBOX SYSTEM
   ===================================================== */
.inbox-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.inbox-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.inbox-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    transform: translateX(5px);
}

.inbox-item.unread {
    background: rgba(64, 37, 102, 0.2);
    border-left: 4px solid var(--primary);
}

.inbox-item .inbox-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.inbox-item .inbox-body {
    flex-grow: 1;
}

.inbox-item .inbox-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
}

.inbox-item .inbox-title {
    font-weight: 600;
    font-size: 16px;
    color: #fff;
}

.inbox-item .inbox-time {
    font-size: 12px;
    color: var(--text-muted);
}

.inbox-item .inbox-message {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.inbox-item.expanded .inbox-message {
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

.inbox-item .unread-dot {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    top: 20px;
    right: 20px;
}

/* =====================================================
   MODAL
   ===================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13, 8, 26, 0.65); /* Cinematic dark tint */
    backdrop-filter: blur(12px) saturate(180%); /* Premium Glassmorphism */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
    animation: modalFadeIn 0.3s ease-out forwards;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: rgba(36, 21, 64, 0.95);
    border: 1.5px solid rgba(247, 201, 72, 0.25);
    border-radius: 24px;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9), 0 0 40px rgba(247, 201, 72, 0.05);
    transform: translateY(20px) scale(0.95);
    animation: modalScaleIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-heading);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalScaleIn {
    from { 
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination {
    display: flex;
    gap: 6px;
    margin-top: 20px;
    justify-content: center;
}

.pagination a,
.pagination span {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition-fast);
}

.pagination a:hover {
    background: var(--primary-glow);
    color: var(--primary-light);
    border-color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* =====================================================
   LOGIN PAGE - REDESIGNED
   ===================================================== */
/* Cinematic Video Background */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
    background: #000;
}

.video-foreground {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.video-foreground iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw; /* 16:9 ratio */
    min-height: 100vh;
    min-width: 177.77vh; /* 16:9 ratio */
    transform: translate(-50%, -50%) scale(1.5); /* Scale more to hide UI */
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.8) 100%);
    background-color: rgba(26, 14, 46, 0.4);
    z-index: 5;
}

.login-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    z-index: 10;
}

.login-card {
    background: rgba(26, 14, 46, 0.85); /* Semi-transparent */
    backdrop-filter: blur(20px); /* Glass effect */
    border: 1.5px solid rgba(247, 201, 72, 0.3);
    border-radius: var(--radius-lg);
    padding: 50px;
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 10;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9);
    transition: var(--transition);
}

.animate-fade-in {
    animation: fadeInScale 0.8s ease-out forwards;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-card .brand {
    text-align: center;
    margin-bottom: 45px;
}

.login-card .brand-logo {
    display: none; /* Removed as requested */
}

/* AICE Text Logo */
.login-card .brand h1 {
    font-size: 56px;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: -2px;
    margin: 0;
    text-shadow: 0 0 20px rgba(247, 201, 72, 0.3);
    font-family: 'Inter', sans-serif;
    line-height: 1;
}

.login-card .brand p {
    font-size: 13px;
    color: rgba(255, 253, 208, 0.7);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 10px;
}

.login-card .form-label {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
    font-size: 14px;
}

.login-card .form-control {
    height: 56px;
    padding: 0 20px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: #ffffff;
    font-size: 16px;
}

.login-card .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(247, 201, 72, 0.15);
}

.login-card .btn-primary {
    height: 60px;
    justify-content: center;
    font-size: 18px;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
    margin-top: 15px;
    background: var(--accent);
    color: var(--primary-dark);
}

.login-card .btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(247, 201, 72, 0.2);
}

/* =====================================================
   BREADCRUMB
   ===================================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--primary-light);
}

.breadcrumb .separator {
    color: var(--text-muted);
}

/* =====================================================
   CHART CONTAINER
   ===================================================== */
.chart-container {
    position: relative;
    width: 100%;
    padding: 16px 0;
}

/* =====================================================
   EMPTY STATE
   ===================================================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
    width: 100%;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
}

/* =====================================================
   LOADING SPINNER
   ===================================================== */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =====================================================
   RESPONSIVE - Mobile / Tablet Friendly
   ===================================================== */

/* ---- Sidebar overlay backdrop (mobile) ---- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    z-index: 999;
    animation: fadeIn 0.2s ease;
}

.sidebar-overlay.active {
    display: block;
}

/* ---- Tablet (≤ 1024px) - Sidebar Drawer Logic ---- */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        height: 100vh !important;
        width: 280px !important;
        transform: translateX(-100%) !important;
        z-index: 5000 !important; /* Higher than top-header and overlays */
        transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
        box-shadow: none !important;
    }

    .sidebar.open {
        transform: translateX(0) !important;
        box-shadow: 20px 0 50px rgba(0,0,0,0.4) !important;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .content-area {
        padding: 16px 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .top-header {
        padding: 12px 20px;
        z-index: 3000 !important; /* Below the sidebar drawer but above page content */
    }
}

/* ---- Mobile Landscape (≤ 768px) ---- */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 14px;
        gap: 12px;
    }

    .stat-card .stat-info .stat-value {
        font-size: 22px;
    }

    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .card-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .page-title {
        font-size: 16px;
    }

    .page-subtitle {
        display: none;
    }

    /* Tables scroll on mobile */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table thead th,
    table tbody td {
        white-space: nowrap;
        font-size: 13px;
        padding: 10px 12px;
    }
}

/* ---- Mobile Portrait (≤ 480px) ---- */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .content-area {
        padding: 12px 14px;
    }

    .top-header {
        padding: 10px 14px;
    }

    .breadcrumb {
        font-size: 11px;
        margin-bottom: 16px;
    }

    .login-card {
        margin: 20px;
        padding: 32px 24px;
        max-width: 100%;
        border-radius: var(--radius-md);
    }

    .login-card .brand h1 {
        font-size: 38px;
    }

    .btn {
        padding: 9px 16px;
        font-size: 13px;
    }

    .modal {
        width: 95%;
        max-height: 90vh;
    }

    /* Header: keep buttons accessible */

    .stat-card {
        flex-direction: row;
        align-items: center;
    }
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-muted);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-primary {
    color: var(--primary-light);
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

.gap-3 {
    gap: 24px;
}

.w-100 {
    width: 100%;
}

/* =====================================================
   NOTIFICATIONS DROPDOWN
   ===================================================== */
.notif-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

#notificationDropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 320px;
    background: #1a0e2e;
    /* Match main BG */
    border: 1px solid var(--border-premium);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    z-index: 1100;
    display: none !important;
    flex-direction: column;
    overflow: hidden;
    animation: slideDown 0.2s ease;
}

#notificationDropdown.active {
    display: flex !important;
}

.notif-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
}

.notif-header h4 {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.notif-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notif-header-actions a {
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.notif-list {
    max-height: 380px;
    overflow-y: auto;
}

.notif-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.notif-item.unread {
    background: rgba(64, 37, 102, 0.4);
    /* Much more opaque */
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.notif-icon.info {
    background: rgba(59, 130, 246, 0.25);
    color: #3b82f6;
}

.notif-icon.warning {
    background: rgba(245, 158, 11, 0.25);
    color: #f59e0b;
}

.notif-icon.alert {
    background: rgba(239, 68, 68, 0.25);
    color: #ef4444;
}

.notif-icon.success {
    background: rgba(16, 185, 129, 0.25);
    color: #10b981;
}

.notif-content {
    flex: 1;
}

.notif-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.notif-msg {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.notif-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.notif-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
    animation: fadeInUp 0.5s ease;
}

.notif-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-muted), transparent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.5;
}

/* Custom Empty State Illustration Placeholder */
.empty-state-illust {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFDD033' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    opacity: 0.4;
}

.header-btn .badge.pulse {
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
   MOBILE RESPONSIVENESS (1024px and below)
   ===================================================== */
@media screen and (max-width: 1024px) {
    :root {
        --sidebar-width: 0px;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        transform: translateX(-100%);
        z-index: 1000;
        transition: transform 0.3s ease;
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 20px 0 50px rgba(0,0,0,0.5);
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(4px);
        z-index: 4999; /* Just below the sidebar */
        display: block;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease, visibility 0.4s;
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }

    .content-area {
        padding: 15px 15px;
    }

    .bi-header {
        padding: 22px 16px 50px 16px !important;
        margin: -15px -15px 0 -15px !important;
        border-radius: 0 0 18px 18px !important;
    }

    .bi-header .page-title {
        font-size: 18px !important;
        margin-bottom: 4px !important;
    }

    .bi-header .page-subtitle {
        font-size: 12px !important;
    }

    .bi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        margin-top: -30px !important;
        gap: 10px !important;
        margin-bottom: 20px !important;
    }

    .bi-card {
        padding: 14px 12px !important;
        min-height: 100px !important;
        border-radius: 12px !important;
    }

    .bi-card .card-label {
        font-size: 10px !important;
        gap: 6px !important;
        margin-bottom: 6px !important;
    }

    .bi-card .bi-icon-box {
        width: 26px !important;
        height: 26px !important;
        font-size: 12px !important;
    }

    .bi-card .card-value {
        font-size: 18px !important;
        margin-bottom: 4px !important;
    }

    .bi-card .card-meta {
        font-size: 11px !important;
    }

    /* Table Responsiveness */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
        border-radius: var(--radius-md);
    }

    table {
        min-width: 600px; /* Force scroll on small screens */
    }

    /* Form & UI Adjustments */
    .header-left .page-title {
        font-size: 18px;
    }
    
    .header-left .page-subtitle {
        display: none; /* Hide subtitle on very small screens to save space */
    }

    .top-header {
        padding: 0 10px !important;
        justify-content: flex-start !important;
    }

    .header-left {
        gap: 5px !important;
    }

    .toggle-sidebar {
        margin-right: 5px !important;
        width: 40px !important;
        height: 40px !important;
    }

    /* Header: adjust icons for mobile */
    .header-right {
        gap: 8px !important;
    }

    .profile-menu-container {
        display: block !important;
    }
    
    .user-menu-btn {
        display: flex !important;
    }

    /* Filter Bar Responsive */
    .premium-filter-bar {
        border-radius: 12px !important;
        padding: 12px !important;
        margin-bottom: 15px !important;
    }

    .filter-group {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .filter-group select, 
    .filter-group input, 
    .filter-group .search-wrapper,
    .filter-group button,
    .filter-group a {
        width: 100% !important;
        min-width: 100% !important;
        height: 38px !important;
    }

    .breadcrumb {
        font-size: 11px;
        padding: 5px 0;
        margin-bottom: 10px !important;
    }

    /* Card adjustments to make them less crowded */
    .card {
        margin-bottom: 16px !important;
    }

    .card-header {
        padding: 12px 16px !important;
    }

    .card-header h3 {
        font-size: 15px !important;
    }
}

@media screen and (max-width: 480px) {
    .bi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin-top: -25px !important;
    }
    
    .bi-card {
        padding: 12px 10px !important;
    }

    .bi-card .card-label {
        font-size: 9px !important;
        letter-spacing: 0.2px !important;
    }
    
    .bi-card .card-value {
        font-size: 16px !important;
    }
}

/* =====================================================
   MOBILE OPTIMIZATION (Layout & Responsiveness)
   ===================================================== */
@media (max-width: 768px) {
    /* 1. Top Header Mobile Polish */
    .top-header {
        padding: 8px 12px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .top-header .header-left {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        min-width: 0 !important;
        flex: 1 !important;
        overflow: hidden !important;
    }

    .top-header .header-left .page-title {
        font-size: 15px !important;
        font-weight: 700 !important;
        margin: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .top-header .header-right {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex-shrink: 0 !important;
    }

    .dashboard-header {
        padding-top: 15px !important;
        margin-bottom: 20px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    /* 2. Responsive Table Container (Clean & Smooth) */
    .table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin-bottom: 15px !important;
        border-radius: var(--radius-md) !important;
    }
    
    .table-container table {
        width: 100% !important;
        min-width: 500px;
    }

    /* 3. Layout Fix - Stacked Cards & Grids */
    .dashboard-row, 
    .stats-grid,
    .expansion-grid,
    [style*="display:grid"] {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* 4. Responsive Helpers */
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    .mobile-hide {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
    .desktop-only {
        display: block !important;
    }
}

/* DROPDOWN VISIBILITY FIX - Consolidated */
#notificationDropdown.active,
#userDropdown.active,
.user-dropdown.active {
    display: block !important;
}

@media (max-width: 480px) {
    #notificationDropdown {
        width: 280px !important;
        right: -60px !important;
    }
}

/* =====================================================
   GLOBAL CENTERING FIX (Empty States & Inbox)
   ===================================================== */
.empty-state, 
.empty-inbox,
.notif-empty {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 60px 20px !important;
    width: 100% !important;
    min-height: 200px;
}

.empty-state i, 
.empty-inbox i,
.notif-empty i {
    font-size: 50px !important;
    margin-bottom: 20px !important;
    display: block !important;
    width: auto !important;
    color: var(--text-muted) !important;
}

.empty-state p, 
.empty-inbox p,
.notif-empty p {
    font-size: 16px !important;
    margin: 0 !important;
    color: var(--text-secondary) !important;
}

/* =====================================================
   NOTIFICATION DROPDOWN PREMIUM DESIGN
   ===================================================== */
#notificationDropdown {
    position: absolute !important;
    top: calc(100% + 15px) !important;
    right: 0 !important;
    width: 360px !important;
    background: #1a0e2e !important;
    border: 1px solid rgba(255, 253, 208, 0.2) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(64, 37, 102, 0.4) !important;
    z-index: 9999 !important;
    display: none !important;
    flex-direction: column;
    overflow: hidden !important;
}

#notificationDropdown.active {
    display: flex !important;
    animation: slideDown 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.notif-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 16px 20px !important;
    border-bottom: 1px solid rgba(255, 253, 208, 0.1) !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

.notif-header h4 {
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
}

.notif-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.notif-header-actions a {
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    display: inline-block !important;
}

#markAllRead {
    color: var(--accent) !important;
}

#markAllRead:hover {
    color: #fff !important;
    text-shadow: 0 0 8px var(--accent) !important;
}

#clearAllNotif {
    color: var(--danger-light) !important;
}

#clearAllNotif:hover {
    color: #fff !important;
    text-shadow: 0 0 8px var(--danger-light) !important;
}

.notif-header-separator {
    color: rgba(255,255,255,0.2) !important;
}

#notifList {
    max-height: 380px !important;
    overflow-y: auto !important;
    background: #1a0e2e !important;
}

.notif-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 16px !important;
    padding: 16px 20px !important;
    border-bottom: 1px solid rgba(255, 253, 208, 0.05) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    background: transparent !important;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

.notif-item.unread {
    background: rgba(247, 201, 72, 0.03) !important;
}

.notif-item.unread::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 3px !important;
    background: var(--accent) !important;
}

.notif-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin-bottom: 4px !important;
}

.notif-msg {
    font-size: 13px !important;
    color: rgba(255, 253, 208, 0.7) !important;
    line-height: 1.4 !important;
}

.notif-time {
    font-size: 11px !important;
    color: rgba(255, 255, 255, 0.4) !important;
    margin-top: 4px !important;
}

.notif-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    flex-shrink: 0 !important;
}

.notif-icon.warning { background: rgba(245, 158, 11, 0.15) !important; color: var(--warning-light) !important; }
.notif-icon.alert { background: rgba(239, 68, 68, 0.15) !important; color: var(--danger-light) !important; }
.notif-icon.success { background: rgba(16, 185, 129, 0.15) !important; color: var(--success-light) !important; }
.notif-icon.info { background: rgba(124, 58, 237, 0.15) !important; color: var(--info) !important; }

.notif-footer {
    padding: 14px !important;
    text-align: center !important;
    border-top: 1px solid rgba(255, 253, 208, 0.1) !important;
    background: rgba(0, 0, 0, 0.2) !important;
}

.notif-footer a {
    font-size: 13px !important;
    color: var(--accent) !important;
    text-decoration: none !important;
    font-weight: 700 !important;
}

/* =====================================================
   NOTIFICATION BADGE PULSE ANIMATION
   ===================================================== */
@keyframes notifPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

#notifBadge.pulse, .badge-pulse {
    animation: notifPulse 2s infinite ease-in-out;
}

/* =====================================================
   COMPREHENSIVE LIGHT MODE PALETTE & COMPONENT SYSTEM
   ===================================================== */
:root.light-mode, body.light-mode, html.light-mode, .light-mode {
    /* Primary Palette - AICE Purple */
    --primary: #402566;
    --primary-light: #5c3a8a;
    --primary-dark: #2d1a4a;
    --primary-glow: rgba(64, 37, 102, 0.08);

    /* Accent in Light Mode - High-Contrast Warm Amber */
    --accent: #b45309;
    --accent-light: #d97706;
    --accent-glow: rgba(180, 83, 9, 0.1);

    /* Status Colors */
    --success: #15803d;
    --success-light: #16a34a;
    --warning: #b45309;
    --warning-light: #d97706;
    --danger: #b91c1c;
    --danger-light: #dc2626;
    --info: #6d28d9;

    /* Backgrounds - Clean, Crisp, Professional Canvas */
    --bg-body: #f1f5f9;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-input: #ffffff;
    --bg-table-header: #f1f5f9;
    --bg-table-row: #ffffff;
    --bg-table-row-alt: #f8fafc;

    /* Text Colors - Deep, High Contrast */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-heading: #0f172a;

    /* Borders */
    --border: #cbd5e1;
    --border-light: #e2e8f0;
    --border-premium: #94a3b8;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.09);
    --shadow-glow: 0 0 20px rgba(64, 37, 102, 0.08);

    color-scheme: light;
}

/* 1. Global Light Mode Layout */
.light-mode body,
.light-mode .app-wrapper,
.light-mode .main-content,
.light-mode .content-area {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

/* 2. Sidebar & Navigation */
.light-mode .sidebar {
    background: #ffffff !important;
    border-right: 1px solid #cbd5e1 !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.04) !important;
}

.light-mode .sidebar-brand {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.light-mode .sidebar-brand .brand-text,
.light-mode .brand-text,
.light-mode .sidebar-brand h2 {
    color: #402566 !important;
}

.light-mode .nav-group-title {
    color: #64748b !important;
    font-weight: 700 !important;
}

.light-mode .nav-link {
    color: #334155 !important;
    font-weight: 600 !important;
}

.light-mode .nav-link i {
    color: #402566 !important;
}

.light-mode .nav-link:hover {
    color: #402566 !important;
    background: #f1f5f9 !important;
}

.light-mode .nav-link.active {
    color: #402566 !important;
    background: rgba(64, 37, 102, 0.08) !important;
    border-left: 4px solid #402566 !important;
    font-weight: 700 !important;
}

.light-mode .nav-link.active i {
    color: #402566 !important;
}

/* 3. Top Header & User Controls */
.light-mode .top-header {
    background: #ffffff !important;
    border-bottom: 1px solid #cbd5e1 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
}

.light-mode .header-btn,
.light-mode .toggle-sidebar {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
}

.light-mode .header-btn:hover,
.light-mode .toggle-sidebar:hover {
    background: #ede9fe !important;
    color: #402566 !important;
    border-color: #402566 !important;
}

.light-mode .user-menu-btn {
    background: #f8fafc !important;
    border: 1.5px solid #402566 !important;
    color: #402566 !important;
}

.light-mode .user-menu-btn:hover {
    background: #402566 !important;
    color: #ffffff !important;
}

.light-mode .user-dropdown {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12) !important;
}

.light-mode .user-dropdown .dropdown-header {
    color: #64748b !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.light-mode .user-dropdown .dropdown-item {
    color: #1e293b !important;
}

.light-mode .user-dropdown .dropdown-item:hover {
    background: #f1f5f9 !important;
    color: #402566 !important;
}

.light-mode .dropdown-divider {
    border-top: 1px solid #e2e8f0 !important;
}

/* 4. Cards & KPI BI Panels */
.light-mode .card,
.light-mode .stat-card,
.light-mode .bi-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
    color: #0f172a !important;
}

.light-mode .card:hover,
.light-mode .stat-card:hover,
.light-mode .bi-card:hover {
    border-color: #402566 !important;
    box-shadow: 0 8px 24px rgba(64, 37, 102, 0.12) !important;
}

.light-mode .card-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #cbd5e1 !important;
}

.light-mode .card-header h3,
.light-mode .card-header h2,
.light-mode .card-header h4,
.light-mode .page-title,
.light-mode .stat-value {
    color: #0f172a !important;
    font-weight: 700 !important;
}

.light-mode .stat-card .stat-info h4,
.light-mode .stat-info h4 {
    color: #0f172a !important;
    font-weight: 700 !important;
}

.light-mode .stat-card .stat-info div,
.light-mode .stat-info div {
    color: #64748b !important;
}

.light-mode .breadcrumb,
.light-mode .breadcrumb a {
    color: #402566 !important;
    font-weight: 600 !important;
}

.light-mode .breadcrumb-item.active,
.light-mode .breadcrumb span {
    color: #64748b !important;
    font-weight: 500 !important;
}

.light-mode .page-subtitle {
    color: #64748b !important;
}

.light-mode .card-body {
    color: #1e293b !important;
}

.light-mode .card-footer {
    background: #f8fafc !important;
    border-top: 1px solid #cbd5e1 !important;
}

.light-mode .bi-header {
    background: linear-gradient(135deg, #402566 0%, #2d1a4a 100%) !important;
    color: #ffffff !important;
}

.light-mode .bi-header .page-title {
    color: #ffffff !important;
}

.light-mode .bi-header .page-subtitle {
    color: rgba(255, 255, 255, 0.85) !important;
}

.light-mode .bi-card .card-label {
    color: #475569 !important;
    font-weight: 600 !important;
}

.light-mode .bi-card .card-value {
    color: #0f172a !important;
    font-weight: 800 !important;
}

/* 5. Tables & Data Lists */
.light-mode .table-container,
.light-mode .table-responsive {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
}

.light-mode table {
    color: #0f172a !important;
}

.light-mode table thead th {
    background: #f1f5f9 !important;
    color: #1e293b !important;
    border-bottom: 2px solid #cbd5e1 !important;
    font-weight: 700 !important;
}

.light-mode table tbody td {
    border-bottom: 1px solid #e2e8f0 !important;
    color: #334155 !important;
}

.light-mode table tbody tr:nth-child(even) {
    background: #f8fafc !important;
}

.light-mode table tbody tr:hover {
    background: #ede9fe !important;
}

.light-mode .hover-underline {
    color: #0f172a !important;
}

.light-mode .hover-underline:hover {
    color: #402566 !important;
}

/* 6. Forms, Inputs, Selects & Textareas */
.light-mode .form-control,
.light-mode input[type="text"],
.light-mode input[type="email"],
.light-mode input[type="password"],
.light-mode input[type="number"],
.light-mode input[type="tel"],
.light-mode input[type="date"],
.light-mode select.form-control,
.light-mode textarea.form-control {
    background-color: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #0f172a !important;
}

.light-mode select.form-control option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

.light-mode .form-control:focus {
    border-color: #402566 !important;
    box-shadow: 0 0 0 3px rgba(64, 37, 102, 0.15) !important;
    background-color: #ffffff !important;
}

.light-mode .form-label {
    color: #1e293b !important;
    font-weight: 700 !important;
}

.light-mode .form-text {
    color: #64748b !important;
}

.light-mode .form-control::placeholder {
    color: #94a3b8 !important;
}

/* 7. Modals & Dialogs */
.custom-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(6px) !important;
    z-index: 99999 !important;
    overflow-y: auto !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    padding: 20px !important;
}

.custom-modal-overlay.active,
.custom-modal-overlay[style*="display: flex"],
.custom-modal-overlay[style*="display:flex"],
.custom-modal-overlay[style*="display: block"],
.custom-modal-overlay[style*="display:block"] {
    display: flex !important;
}

.custom-modal-overlay[style*="display: none"],
.custom-modal-overlay[style*="display:none"] {
    display: none !important;
}

.modal-card,
.custom-modal-content {
    background: var(--card-bg, #1a102a);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
    border-radius: 14px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    color: var(--text-primary, #ffffff);
    position: relative;
    max-width: 520px;
    width: 100%;
    margin: auto;
    overflow: hidden;
}

.light-mode .modal-overlay,
.light-mode .custom-modal-overlay {
    background: rgba(15, 23, 42, 0.65) !important;
    backdrop-filter: blur(8px) !important;
}

.light-mode .modal,
.light-mode .modal-card,
.light-mode .custom-modal-content {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18) !important;
    color: #0f172a !important;
}

.light-mode .modal-header,
.light-mode .modal-card .card-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #cbd5e1 !important;
}

.light-mode .modal-header h3,
.light-mode .modal-header h2,
.light-mode .modal-header h4,
.light-mode .modal-card h3,
.light-mode .modal-card h2 {
    color: #0f172a !important;
    font-weight: 800 !important;
}

.light-mode .modal-close,
.light-mode .modal-card .modal-close {
    color: #64748b !important;
}

.light-mode .modal-close:hover,
.light-mode .modal-card .modal-close:hover {
    color: #0f172a !important;
}

.light-mode .modal-body,
.light-mode .modal-card .card-body {
    background: #ffffff !important;
    color: #1e293b !important;
}

.light-mode .modal-footer,
.light-mode .modal-card .card-footer {
    background: #f8fafc !important;
    border-top: 1px solid #cbd5e1 !important;
}

/* Modal Inputs & Controls inside Light Mode Modals */
.light-mode .modal input,
.light-mode .modal select,
.light-mode .modal textarea,
.light-mode .modal-card input,
.light-mode .modal-card select,
.light-mode .modal-card textarea {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 1.5px solid #cbd5e1 !important;
}

.light-mode .modal input:focus,
.light-mode .modal select:focus,
.light-mode .modal textarea:focus,
.light-mode .modal-card input:focus,
.light-mode .modal-card select:focus,
.light-mode .modal-card textarea:focus {
    background-color: #ffffff !important;
    border-color: #402566 !important;
    color: #0f172a !important;
}

.light-mode .modal label,
.light-mode .modal-card label {
    color: #1e293b !important;
    font-weight: 700 !important;
}

/* 8. Notification Dropdown */
.light-mode #notificationDropdown {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12) !important;
}

.light-mode .notif-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.light-mode .notif-header h4 {
    color: #0f172a !important;
}

.light-mode #markAllRead {
    color: #402566 !important;
}

.light-mode #clearAllNotif {
    color: #b91c1c !important;
}

.light-mode #notifList {
    background: #ffffff !important;
}

.light-mode .notif-item {
    border-bottom: 1px solid #f1f5f9 !important;
    color: #0f172a !important;
}

.light-mode .notif-item:hover {
    background: #f8fafc !important;
}

.light-mode .notif-item.unread {
    background: #f5f3ff !important;
    border-left: 4px solid #402566 !important;
}

.light-mode .notif-title {
    color: #0f172a !important;
    font-weight: 700 !important;
}

.light-mode .notif-msg {
    color: #334155 !important;
}

.light-mode .notif-time {
    color: #64748b !important;
}

.light-mode .notif-footer {
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
}

.light-mode .notif-footer a {
    color: #402566 !important;
}

/* 9. Inbox Items & Shared Modals */
.light-mode .inbox-item {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

.light-mode .inbox-item:hover {
    background: #f8fafc !important;
    border-color: #402566 !important;
}

.light-mode .inbox-item.unread {
    background: #f5f3ff !important;
    border-left: 4px solid #402566 !important;
}

.light-mode .inbox-title {
    color: #0f172a !important;
    font-weight: 700 !important;
}

.light-mode .inbox-message {
    color: #334155 !important;
}

.light-mode .inbox-time {
    color: #64748b !important;
}

.light-mode #modalNotifMessage {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

/* 10. Badges & Status Tags */
.light-mode .badge-primary {
    background: #ede9fe !important;
    color: #402566 !important;
    border: 1px solid #ddd6fe !important;
}

.light-mode .badge-success {
    background: #dcfce7 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
}

.light-mode .badge-warning {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
}

.light-mode .badge-danger {
    background: #fee2e2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
}

.light-mode .badge-info {
    background: #e0e7ff !important;
    color: #4338ca !important;
    border: 1px solid #c7d2fe !important;
}

.light-mode .badge-secondary {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

/* 11. Buttons in Light Mode */
.light-mode .btn-outline {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #334155 !important;
}

.light-mode .btn-outline:hover {
    background: #f1f5f9 !important;
    border-color: #402566 !important;
    color: #402566 !important;
}

/* 12. Pagination & Breadcrumbs */
.light-mode .pagination a,
.light-mode .pagination span {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
}

.light-mode .pagination a:hover {
    background: #ede9fe !important;
    color: #402566 !important;
    border-color: #402566 !important;
}

.light-mode .pagination .active {
    background: #402566 !important;
    color: #ffffff !important;
    border-color: #402566 !important;
}

.light-mode .breadcrumb a {
    color: #402566 !important;
}

.light-mode .breadcrumb,
.light-mode .breadcrumb .separator {
    color: #64748b !important;
}

/* 13. Dashboard Released Products Carousel */
.light-mode .dashboard-product-item {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
}

.light-mode .dashboard-product-item:hover {
    background: #f8fafc !important;
    border-color: #402566 !important;
}

.light-mode .dashboard-product-item .image-box {
    background: #f1f5f9 !important;
}

.light-mode .dashboard-product-item .content h5 {
    color: #0f172a !important;
    font-weight: 700 !important;
}

.light-mode .dashboard-product-item .price-tag {
    color: #b45309 !important;
    font-weight: 800 !important;
}

/* =====================================================
   INBOX MODAL & CONTENT SAFEGUARDS
   ===================================================== */
#modalNotifMessage {
    line-height: 1.6 !important;
    font-size: 15px !important;
    background: rgba(255, 255, 255, 0.04);
    padding: 20px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary) !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    min-height: 80px;
}

/* =====================================================
   TABLE RESPONSIVENESS & WORD BREAK HELPER
   ===================================================== */
.table-responsive,
.table-container {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin-bottom: 1rem;
}

.word-break-all {
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
}

/* =====================================================
   MOBILE RESPONSIVENESS (PHONES & TABLETS)
   ===================================================== */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .sidebar {
        transform: translateX(-100%) !important;
        transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
        z-index: 99999 !important;
    }
    
    .sidebar.open {
        transform: translateX(0) !important;
    }
    
    .sidebar-overlay {
        position: fixed !important;
        inset: 0 !important;
        background: rgba(0, 0, 0, 0.7) !important;
        backdrop-filter: blur(4px) !important;
        z-index: 99998 !important;
        display: none;
    }
    
    .sidebar-overlay.active {
        display: block !important;
    }

    .content-area {
        padding: 16px !important;
    }
    
    .top-header {
        padding: 12px 16px !important;
    }
    
    #notificationDropdown {
        right: 15px !important;
        top: 60px !important;
        width: 320px !important;
        max-width: calc(100vw - 30px) !important;
    }
}

@media (max-width: 768px) {
    #notificationDropdown {
        position: fixed !important;
        top: 65px !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: calc(100vw - 24px) !important;
        box-shadow: 0 15px 40px rgba(0,0,0,0.85) !important;
        z-index: 999999 !important;
    }

    .bi-header {
        padding: 24px 16px 60px 16px !important;
        margin: -16px -16px 0 -16px !important;
    }
    
    .bi-grid, .stats-grid {
        grid-template-columns: 1fr !important;
        margin-top: -40px !important;
    }
    
    .card-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 16px !important;
    }
    
    .card-body {
        padding: 16px !important;
    }
    
    .page-title {
        font-size: 17px !important;
    }
    
    .page-subtitle {
        font-size: 11px !important;
    }
    
    .modal {
        width: 95% !important;
        padding: 0 !important;
        margin: 10px !important;
    }
}

/* =====================================================
   MODERN FLOATING LABELS (FACEBOOK / GOOGLE STYLE)
   ===================================================== */
.floating-group {
    position: relative;
    margin-bottom: 18px;
    text-align: left;
}

.floating-group .form-control {
    height: 54px !important;
    padding: 20px 14px 6px 14px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.floating-group .form-control:focus {
    border-color: #f7c948 !important;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 0 0 3px rgba(247, 201, 72, 0.15) !important;
    outline: none !important;
}

.floating-group label.floating-label {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left top;
    margin: 0;
    line-height: 1;
    z-index: 2;
}

/* When focused or when input has content */
.floating-group .form-control:focus ~ label.floating-label,
.floating-group .form-control:not(:placeholder-shown) ~ label.floating-label {
    top: 9px;
    transform: translateY(0) scale(0.78);
    color: #f7c948;
    font-weight: 700;
}

/* Light Mode Floating Labels */
.light-mode .floating-group .form-control {
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

.light-mode .floating-group .form-control:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

.light-mode .floating-group label.floating-label {
    color: #64748b;
}

.light-mode .floating-group .form-control:focus ~ label.floating-label,
.light-mode .floating-group .form-control:not(:placeholder-shown) ~ label.floating-label {
    color: #6366f1;
}

/* Floating Tooltip for Collapsed Sidebar */
.sidebar-floating-tooltip {
    position: fixed;
    transform: translateY(-50%);
    background: #1e1338;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 18px rgba(99, 102, 241, 0.25);
    pointer-events: none;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
    letter-spacing: 0.3px;
    line-height: 1.4;
}

.sidebar-floating-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

.sidebar-floating-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 7px 6px 0;
    border-style: solid;
    border-color: transparent #1e1338 transparent transparent;
}


