:root {
    --primary-bg: #f3f7fd;
    --sidebar-bg: #074a74;
    --card-bg: #ffffff;
    --accent-color: #0284c7;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-main);
    overflow-x: hidden;
    margin: 0;
}

/* Updated Card Design */
.glass {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    backdrop-filter: none;
    /* Removed blur for light theme performance/clarity */
}

.sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: linear-gradient(180deg, #074a74 0%, #0c4a6e 100%);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    padding: 2rem 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar nav {
    flex: 1;
    display: flex;
    flex-direction: column;
}


.main-content {
    margin-left: 260px;
    padding: 2.5rem;
    min-height: 100vh;
}

.nav-link {
    color: #bae6fd;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.nav-link i {
    margin-right: 12px;
    font-size: 1.1rem;
    opacity: 0.8;
}

.nav-link-danger {
    background: #ef4444 !important;
    color: #ffffff !important;
    margin-top: auto;
    border-radius: 12px;
    font-weight: 700;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.nav-link-danger:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.4);
}


.nav-link:hover,
.nav-link.active {

    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.nav-link.active {
    border-right: 4px solid #38bdf8;
    background: rgba(255, 255, 255, 0.2);
}

/* ── Sidebar Reports Submenu ──────────────────────────────────────────────── */
.sidebar #reportsSubmenu .nav-link {
    font-size: 0.82rem;
    padding: 0.45rem 0.75rem;
    margin-bottom: 0.15rem;
    border-radius: 8px;
    color: #bae6fd;
    opacity: 0.82;
}

.sidebar #reportsSubmenu .nav-link:hover,
.sidebar #reportsSubmenu .nav-link.active {
    opacity: 1;
    color: #ffffff;
    background: rgba(255,255,255,0.12);
    transform: translateX(3px);
    border-right: 3px solid #38bdf8;
}

.sidebar #reportsSubmenu .nav-link.active {
    border-right: 3px solid #38bdf8;
    background: rgba(56, 189, 248, 0.15);
}

/* ── Utilities ────────────────────────────────────────────────────────────── */
.cursor-pointer { cursor: pointer !important; }


.stats-card {
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.stats-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

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

.table thead th {
    background-color: #f1f5f9;
    color: #475569;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
}

.dataTables_wrapper {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.btn-primary {
    background: var(--accent-color);
    border: none;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #0369a1;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.form-control,
.form-select {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background-color: #ffffff;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.1);
    outline: none;
}

.input-group-text {
    border-radius: 12px 0 0 12px;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    color: #64748b;
    padding: 0 1.25rem;
}

.input-group>.form-control {
    border-radius: 0 12px 12px 0;
}

.section-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.section-header::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, #e2e8f0 0%, transparent 100%);
    margin-left: 1rem;
}


.app-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 3.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    letter-spacing: -0.5px;
}

.user-profile.glass {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: var(--text-main);
}

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

.chart-container {
    position: relative;
    height: 350px;
    width: 100%;
}

/* Select2 Premium Overrides */
.select2-container--default .select2-selection--single {
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    height: 48px !important;
    padding: 10px !important;
    background-color: #ffffff !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-main) !important;
    line-height: 28px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px !important;
}

.select2-dropdown {
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    z-index: 9999 !important;
}


.select2-search__field {
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    padding: 8px !important;
}

.select2-results__option--highlighted[aria-selected] {
    background-color: var(--accent-color) !important;
}

/* Premium River Loader */
.river-loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.river-loader {
    width: 80px;
    height: 80px;
    background-color: #ffffff;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 30px rgba(2, 132, 199, 0.15);
    border: 4px solid #f1f5f9;
    overflow: hidden;
}

.river-loader .wave {
    position: absolute;
    width: 200%;
    height: 200%;
    background: linear-gradient(180deg, rgba(2, 132, 199, 0.4) 0%, #0284c7 100%);
    top: 60%;
    left: -50%;
    border-radius: 40%;
    animation: wave-animation 4s infinite linear;
    transition: all 0.3s ease;
}

.river-loader .wave:nth-child(2) {
    top: 55%;
    background: rgba(14, 165, 233, 0.6);
    animation: wave-animation 7s infinite linear;
    opacity: 0.5;
}

@keyframes wave-animation {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.loader-text {
    margin-top: 1.5rem;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

footer {


    margin-top: 4rem;

    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    color: var(--text-muted);
}