/* Base styles that work with theme system */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* CRITICAL: Font Awesome icons MUST use their own font */
i.fas,
i.far,
i.fab,
.fas,
.far,
.fab {
    font-family: var(--fa-style-family, "Font Awesome 6 Free") !important;
}

body {
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.header {
    background: var(--bg-secondary);
    box-shadow: 0 2px 8px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-links a {
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: var(--text-primary);
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.nav-links a:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.btn-success {
    background: var(--success-color);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 2px solid var(--success-color);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    background: var(--success-color);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: var(--success-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    filter: brightness(0.9);
}

.btn-danger {
    background: var(--danger-color);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 2px solid var(--danger-color);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    background: var(--danger-color);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: var(--danger-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    filter: brightness(0.9);
}

.btn-warning {
    background: var(--warning-color);
    color: #212529 !important;
    -webkit-text-fill-color: #212529 !important;
    border: 2px solid var(--warning-color);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    background: var(--warning-color);
    color: #212529 !important;
    -webkit-text-fill-color: #212529 !important;
    border-color: var(--warning-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
    filter: brightness(0.9);
}

.btn-secondary {
    background: var(--secondary-color);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 2px solid var(--secondary-color);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: var(--secondary-color);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
    filter: brightness(0.9);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color) !important;
    -webkit-text-fill-color: var(--primary-color) !important;
}

.btn-outline:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Button Sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Dashboard Cards */
.dashboard {
    padding: 2rem 0;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    color: var(--text-primary);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: var(--text-secondary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.card-icon.engagement {
    background: rgba(38, 55, 143, 0.1);
    color: var(--primary-color);
}

.card-icon.support {
    background: rgba(189, 37, 51, 0.1);
    color: var(--secondary-color);
}

.card-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0.5rem 0;
    color: var(--text-primary);
}

.card-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--success-color);
    font-weight: 500;
}

/* Forms */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-blue);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(38, 55, 143, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Tables */
.table-container {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
}

.table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.table tbody tr {
    border-bottom: 1px solid var(--gray-200);
}

.table tbody tr:hover {
    background: var(--light-blue);
}

.table td {
    padding: 1rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-primary {
    background: rgba(38, 55, 143, 0.1);
    color: var(--primary-color);
}

.badge-secondary {
    background: rgba(189, 37, 51, 0.1);
    color: var(--secondary-color);
}

.badge-success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.badge-danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.badge-warning {
    background: rgba(255, 193, 7, 0.2);
    color: var(--warning-color);
}

/* Charts */
.chart-container {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-blue);
}

.chart-actions {
    display: flex;
    gap: 1rem;
}

.chart-select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.login-logo {
    margin-bottom: 2rem;
}

.login-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--success-color);
    color: var(--success-color);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--danger-color);
    color: var(--danger-color);
}

.alert-info {
    background: rgba(6, 182, 212, 0.1);
    border-left: 4px solid var(--info-color);
    color: var(--info-color);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid var(--warning-color);
    color: var(--warning-color);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav-links {
        order: 3;
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
        display: none;
    }
    
    .nav-links.mobile-open {
        display: flex;
    }
    
    .nav-links a {
        width: 100%;
        justify-content: center;
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    .user-menu {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .theme-toggle {
        padding: 0.5rem;
    }
    
    .mobile-menu-toggle {
        display: block;
        order: 2;
        background: var(--bg-tertiary);
        border: 1px solid var(--border-color);
        padding: 0.5rem 1rem;
        border-radius: 8px;
        cursor: pointer;
        color: var(--text-primary);
    }
    
    .dashboard-header h1 {
        font-size: 2rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .login-card {
        padding: 2rem;
    }
}



/* Enhanced Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .task-tabs-nav {
        overflow-x: auto;
        padding: 0.5rem;
    }
    
    .task-tab-btn {
        white-space: nowrap;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .nav-links a {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    .user-menu {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .task-tabs-header {
        padding: 1rem;
    }
    
    .task-tabs-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .task-tab-content {
        padding: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .table {
        min-width: 600px;
    }
    
    .month-selector {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .chart-controls {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .dashboard-header h1 {
        font-size: 1.75rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .card-value {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .metrics-table th,
    .metrics-table td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}

/* Animation for better UX */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.task-tab-content {
    animation: slideIn 0.3s ease;
}

/* Enhanced Card Design */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(38, 55, 143, 0.15);
}

/* Better Button Styling */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

/* Improved Table Design */
.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(38, 55, 143, 0.05);
}

/* Better Form Elements */
.form-control:focus {
    box-shadow: 0 0 0 3px rgba(38, 55, 143, 0.1);
    border-color: var(--primary-color);
}

/* Enhanced Alert Design */
.alert {
    animation: slideIn 0.5s ease;
    border-left-width: 4px;
    border-left-style: solid;
}

/* Additional Responsive Styles */
@media (max-width: 1200px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sidebar {
        order: -1;
    }
}

@media (max-width: 992px) {
    .dashboard-header h1 {
        font-size: 2rem;
    }
    
    .card-value {
        font-size: 2.25rem;
    }
}

@media (max-width: 576px) {
    .logo-text {
        font-size: 1.25rem;
    }
    
    .dashboard-header p {
        font-size: 0.9rem;
    }
    
    .data-scope-info {
        font-size: 0.85rem;
        padding: 0.75rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .table th, .table td {
        padding: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .header, .btn, .chart-actions, .data-scope-info {
        display: none !important;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* Dark mode support - DISABLED: Using data-theme attribute instead */
/* @media (prefers-color-scheme: dark) {
    :root {
        --white: #1a1a1a;
        --gray-100: #2d2d2d;
        --gray-200: #404040;
        --gray-300: #595959;
        --gray-800: #e0e0e0;
        --light-blue: #2d3748;
    }
    
    body {
        background: #121212;
        color: var(--gray-800);
    }
    
    .card {
        background: var(--white);
    }
} */


/* Modern Super Admin Styles */
.super-admin-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: var(--shadow);
}

.stat-icon.success {
    background: linear-gradient(135deg, var(--success-color), #34d399);
}

.stat-icon.warning {
    background: linear-gradient(135deg, var(--warning-color), #fbbf24);
}

.stat-icon.danger {
    background: linear-gradient(135deg, var(--danger-color), #f87171);
}

.stat-icon.info {
    background: linear-gradient(135deg, var(--info-color), #22d3ee);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.stat-trend.up {
    color: var(--success-color);
}

.stat-trend.down {
    color: var(--danger-color);
}

/* Modern Card Enhancements */
.modern-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
}

.modern-card:hover {
    box-shadow: var(--shadow-xl);
}

.modern-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: linear-gradient(135deg, var(--gray-50), var(--white));
}

.modern-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modern-card-body {
    padding: 1.5rem;
}

/* Activity Timeline */
.activity-timeline {
    position: relative;
    padding-left: 2rem;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
}

.activity-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--white);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.activity-content {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--radius);
    border-left: 3px solid var(--primary-color);
}

/* User Role Badges */
.user-role-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-role-badge.super-admin {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

.user-role-badge.head-officer {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
}

.user-role-badge.manager {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.user-role-badge.user {
    background: #6c757d;
    color: white;
}

.user-role-badge.staff {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* Modern Table */
.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table thead {
    background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
}

.modern-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.modern-table th:first-child {
    border-top-left-radius: var(--radius);
}

.modern-table th:last-child {
    border-top-right-radius: var(--radius);
}

.modern-table tbody tr {
    background: var(--white);
    transition: var(--transition);
}

.modern-table tbody tr:hover {
    background: var(--gray-50);
    transform: scale(1.01);
}

.modern-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

/* Settings Panel */
.settings-panel {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.settings-section {
    padding: 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.settings-row:last-child {
    border-bottom: none;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-300);
    transition: var(--transition);
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Progress Bar */
.progress-bar-modern {
    height: 8px;
    background: var(--gray-200);
    border-radius: 50px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 50px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* Glassmorphism Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-lg);
}

/* Gradient Text */
.gradient-text {
    color: var(--primary-color);
    font-weight: 600;
}

/* Data Scope Info Enhancement */
.data-scope-info {
    background: var(--bg-tertiary);
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px var(--shadow);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.data-scope-info i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.data-scope-info strong {
    color: var(--primary-color);
}

/* Responsive Grid System */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}


/* ========================================
   MOBILE RESPONSIVE NAVIGATION
   ======================================== */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    z-index: 1001;
}

.mobile-menu-toggle:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.navbar .logo {
    order: 1;
}

.navbar .nav-wrapper {
    order: 3;
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Desktop - nav-wrapper is visible and horizontal */
@media (min-width: 769px) {
    .nav-wrapper {
        position: static !important;
        display: flex !important;
        flex-direction: row;
        align-items: center;
        gap: 2rem;
        width: auto;
        height: auto;
        background: transparent;
        box-shadow: none;
        padding: 0;
        border: none;
    }
    
    .nav-links {
        display: flex;
        flex-direction: row;
        gap: 1rem;
    }
    
    .user-menu {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block !important;
    }
    
    .navbar {
        position: relative;
    }
    
    .nav-wrapper {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 300px;
        max-width: 85vw;
        height: calc(100vh - 70px);
        background: var(--bg-secondary);
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 1000;
        padding: 1rem 0;
        border-left: 1px solid var(--border-color);
    }
    
    .nav-wrapper.active {
        right: 0;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
        padding: 0;
        margin: 0;
    }
    
    .nav-links li {
        width: 100%;
        margin: 0;
    }
    
    .nav-links a {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--border-color);
        font-size: 1rem;
    }
    
    .nav-links a i {
        font-size: 1.25rem;
        width: 24px;
    }
    
    .user-menu {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 1.5rem;
        gap: 1rem;
        border-top: 2px solid var(--border-color);
        margin-top: 1rem;
    }
    
    .user-info {
        justify-content: flex-start;
        padding: 1rem 0;
        gap: 1rem;
    }
    
    .user-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .theme-toggle {
        width: 100%;
        justify-content: center;
        padding: 0.75rem;
        background: var(--bg-tertiary);
        border-radius: 8px;
        font-size: 1rem;
    }
    
    .user-menu .btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    /* Logo adjustments for mobile */
    .logo {
        flex: 1;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .logo img {
        height: 35px !important;
    }
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .navbar {
        flex-wrap: nowrap;
        gap: 1rem;
    }
    
    .nav-links {
        font-size: 0.9rem;
        gap: 0.5rem;
    }
    
    .nav-links a {
        padding: 0.5rem 0.75rem;
    }
    
    .user-menu {
        gap: 0.5rem;
    }
    
    .user-menu .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .user-info {
        gap: 0.5rem;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
        font-size: 0.875rem;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .nav-wrapper {
        width: 100%;
        max-width: 100vw;
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .logo img {
        height: 30px !important;
    }
    
    .mobile-menu-toggle {
        font-size: 1.25rem;
    }
}


/* User Filter Tabs */
.user-filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.user-filter-tab {
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-filter-tab:hover {
    background: var(--light-blue);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.user-filter-tab.active {
    background: var(--primary-color, #007bff) !important;
    color: white !important;
    border-color: var(--primary-color, #007bff) !important;
    -webkit-text-fill-color: white !important;
}

.user-filter-tab.active i {
    color: white !important;
    -webkit-text-fill-color: white !important;
}


/* Year Comparison Tabs */
.comparison-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
}

.comparison-tab {
    flex: 1;
    min-width: 150px;
    padding: 1rem 1.5rem;
    text-align: center;
    text-decoration: none;
    border-right: 1px solid var(--border-color);
    border-bottom: none;
    background: var(--card-bg);
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.comparison-tab:last-child {
    border-right: none;
}

.comparison-tab:hover {
    background: var(--light-blue);
    color: var(--primary-color);
}

.comparison-tab.active {
    background: var(--primary-color) !important;
    color: white !important;
    font-weight: 600;
    border-bottom: 3px solid var(--primary-color);
}

.comparison-tab.active i {
    color: white !important;
}


/* Table Styling - Editable from Theme Settings */
.table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.table thead tr {
    background: var(--primary-color);
}

.table thead th {
    color: #ffffff;
    font-weight: 600;
    padding: 1rem;
    border-bottom: 2px solid rgba(0,0,0,0.1);
}

/* Table cell styling - ensure numbers display fully */
.table tbody td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap !important;
    overflow: visible !important;
}

/* Make number cells more flexible */
.table td strong {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    white-space: nowrap !important;
}

/* Specific styling for numeric cells */
.table td.text-end,
.table th.text-end {
    text-align: right;
}

/* Table container with horizontal scroll */
.table-container {
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    display: block;
    margin: 0;
    padding: 0;
}

/* Table layout - allow natural width */
.table {
    table-layout: auto !important;
    width: 100% !important;
    margin: 0;
    border-collapse: collapse;
}

/* Ensure all cells can expand as needed */
.table td,
.table th {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

/* Card body should not restrict table */
.card-body {
    overflow-x: auto !important;
    padding: 0 !important;
}

/* Responsive number display */
@media (max-width: 768px) {
    .table tbody td {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
}

.table tbody tr:hover {
    background: var(--light-blue);
}

.table-category-header {
    background: var(--gray-100);
}

.table-subcategory-header {
    background: var(--gray-50);
}
