/* Variables */
:root {
    /* Colors */
    --primary-color: #00538C; /*#00538C*/
    --primary-color-hover: #282a7a;
    --primary-color-light: rgba(51, 56, 148, 0.1);
    --success-color: #0ab39c;
    --info-color: #39afd1;
    --danger-color: #f06548;
    --warning-color: #f59e0b;
    /* Text Colors */
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #878a99;
    --text-light: #9ca3af;
    --text-white: #ffffff;
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-light: #f8f9fa;
    --bg-lighter: #f9fafb;
    --bg-lighten: #f9fafc;
    --bg-dark: #1f2937;
    /* Border Colors */
    --border-color: #e9ecef;
    --border-color-light: #e5e7eb;
    --border-color-dark: #dee2e6;
    /* Chart Colors - Category bands: Aspirants, Strivers, Contenders, Front Runners, Champions */
    --color-aspirant: #f2f186;
    --color-striver: #a0d1e3;
    --color-contender: #72bdb8;
    --color-front-runner: #207778;
    --color-champion: #363a93;
    /* Shadows */
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 2px 13px 0 rgba(218, 215, 215, 0.5) /*0 8px 16px rgba(0, 0, 0, 0.12)*/;
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    /* Font Sizes */
    --font-size-xs: 12px;
    --font-size-sm: 13px;
    --font-size-base: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-2xl: 20px;
    /* Transitions */
    --transition-base: all 0.3s ease;
    --transition-fast: all 0.2s ease;
    --transition-slow: all 0.4s ease;
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.mud-snackbar-location-top-right
{
    top:64px !important;
    z-index:11001 !important;
}
.form-check-input
{
    width:20px;
    height:20px;
}

/* MudBlazor table: show sort icon by default so users see columns are sortable (MudBlazor uses opacity:0 when direction is none) */
.mud-table-sort-label .mud-table-sort-label-icon.mud-direction-none {
    opacity: 0.6;
}

.btn-outline-danger {
    --bs-btn-color: #ff1f69 !important;
    --bs-btn-border-color: #ff1f69 !important;
    --bs-btn-hover-color: #fff !important;
    --bs-btn-hover-bg: #ff1f69 !important;
    --bs-btn-hover-border-color: #ff1f69 !important;
    --bs-btn-focus-shadow-rgb: 220, 53, 69;
    --bs-btn-active-color: #fff !important;
    --bs-btn-active-bg: #ff1f69 !important;
    --bs-btn-active-border-color: #ff1f69 !important;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #ff1f69 !important;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: #ff1f69 !important;
    --bs-gradient: none;
}
body {
    font-family: var(--font-family-base, 'Inter'), -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal, 400);
    line-height: var(--line-height-base);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
.mud-input > input.mud-input-root, div.mud-input-slot.mud-input-root {
    font: inherit;
    color: currentColor;
    width: 100%;
    border: 0;
    height: 1lh;
    margin: 0;
    display: block;
    padding: 0px 0 3px !important;
}
    /* Top Header */
    .top-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 70px;
        background: var(--primary-color);
        box-shadow: var(--shadow);
        z-index: 9999;
        /*border-bottom: 3px solid var(--primary-color-hover);*/
    }

    .header-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 100%;
        padding: 0 30px;
        max-width: 100%;
        position: relative;
    }

    .mobile-menu-toggle {
        display: none;
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 8px;
        width: 40px;
        height: 40px;
        padding: 0;
        cursor: pointer;
        transition: all 0.3s ease;
        color: #ffffff;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        z-index: 10002;
        position: relative;
        pointer-events: auto;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

        .mobile-menu-toggle:hover {
            background: rgba(255, 255, 255, 0.25);
            border-color: rgba(255, 255, 255, 0.35);
        }

        .mobile-menu-toggle i {
            font-size: 20px;
        }

    .header-left {
        display: flex;
        align-items: center;
        gap: 15px;
        flex: 1;
    }

    .header-center {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .logo-img {
        height: 85px;
        width: auto;
    }

    .dashboard-title {
        color: #ffffff;
        font-size: 22px;
        font-weight: 600;
        margin: 0;
    }
    /* Profile Dropdown */
    .profile-dropdown {
        position: relative;
    }

    .profile-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.15);
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 8px;
        width: 44px;
        height: 44px;
        padding: 0;
        cursor: pointer;
        transition: all 0.3s ease;
        color: #ffffff;
        position: relative;
        z-index: 1002;
        pointer-events: auto;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

        .profile-btn:hover {
            background: rgba(255, 255, 255, 0.25);
            border-color: rgba(255, 255, 255, 0.35);
        }

        .profile-btn i {
            font-size: 22px;
        }

    .dropdown-menu {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        background: white;
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        min-width: 200px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 1001;
    }

        .dropdown-menu.show {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

    .dropdown-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 20px;
        color: #495057;
        text-decoration: none;
        transition: all 0.2s ease;
        border-bottom: 1px solid var(--border-color);
    }

        .dropdown-item:last-child {
            border-bottom: none;
        }

        .dropdown-item:hover {
            background: var(--bg-light);
            color: var(--primary-color);
        }

        .dropdown-item i {
            font-size: 18px;
            width: 20px;
        }
    /* Main Container */
    .main-container {
        display: flex;
        margin-top: 70px;
        min-height: calc(100vh - 70px);
        width: 100% !important;
    }
    /* Sidebar */
    .sidebar {
        width: 80px;
        background: #fff !important;
        box-shadow: 6px 16px 31px -18px #b7bcd1;
        position: fixed;
        left: 0;
        top: 70px;
        height: calc(100vh - 70px);
        overflow: visible;
        transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        border-right: 1px solid rgba(0, 0, 0, 0.06);
    }

        .sidebar:hover {
            width: 280px;
            box-shadow: 4px 0 30px rgba(0, 0, 0, 0.12);
        }

    .sidebar-nav {
        padding: 10px 8px;
        overflow-y: auto;
        max-height: calc(100vh - 70px);
        /* Hide scrollbar by default */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }

    /* Hide scrollbar for Chrome, Safari, Opera */
    .sidebar-nav::-webkit-scrollbar {
        width: 0;
        height: 0;
        background: transparent;
    }

    /* Show scrollbar on sidebar hover */
    .sidebar:hover .sidebar-nav {
        scrollbar-width: thin; /* Firefox */
        -ms-overflow-style: auto; /* IE and Edge */
    }

    .sidebar:hover .sidebar-nav::-webkit-scrollbar {
        width: 6px;
        background: transparent;
    }

    .sidebar:hover .sidebar-nav::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    .sidebar:hover .sidebar-nav::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 10px;
    }

    .sidebar:hover .sidebar-nav::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }

    .nav-menu {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .nav-item {
        position: relative;
    }

    .nav-link {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 16px;
        color: #495057 !important;
        text-decoration: none;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        border-radius: 10px;
        justify-content: center;
        margin: 0 3px;
        border: 1px solid transparent;
    }

        .nav-link::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 4px;
            height: 0;
            background: linear-gradient(135deg, var(--primary-color) 0%, #2c5fd1 100%);
            border-radius: 0 4px 4px 0;
            transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

    .sidebar:hover .nav-link {
        justify-content: flex-start;
        padding: 12px 18px;
    }

    .nav-link:hover {
        background: linear-gradient(135deg, rgba(51, 56, 148, 0.08) 0%, rgba(51, 56, 148, 0.05) 100%) !important;
        color: var(--primary-color);
        border-color: rgba(51, 56, 148, 0.15);
        transform: translateX(1px);
        box-shadow: 0 2px 8px rgba(51, 56, 148, 0.15);
    }

        .nav-link:hover::before {
            height: 60%;
        }

        .nav-link:hover i {
            transform: scale(1.1);
            color: var(--primary-color);
        }

    .nav-link.active {
        background: rgba(51, 56, 148, 0.08);
        color: var(--primary-color);
        border-color: rgba(51, 56, 148, 0.2);
    }

        .nav-link.active::before {
            height: 70%;
        }

        .nav-link.active i {
            color: var(--primary-color);
            transform: scale(1.05);
        }

    .nav-item.active .nav-link {
        background: rgba(51, 56, 148, 0.08);
        color: var(--primary-color);
        border-color: rgba(51, 56, 148, 0.2);
    }

        .nav-item.active .nav-link::before {
            height: 70%;
        }

    .nav-link i {
        font-size: 22px;
        width: 28px;
        flex-shrink: 0;
        text-align: center;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        color: #6c757d;
    }

    .nav-link .submenu-icon {
        margin-left: auto;
        font-size: 18px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        opacity: 0;
        width: 0;
        overflow: hidden;
        color: #6c757d;
    }

    .nav-text {
        opacity: 0;
        width: 0;
        overflow: hidden;
        white-space: nowrap;
        transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        font-size: 14px;
        font-weight: 500;
        letter-spacing: 0.2px;
    }

    .sidebar:hover .nav-text {
        opacity: 1;
        width: auto;
    }

    .sidebar:hover .nav-link .submenu-icon {
        opacity: 1;
        width: auto;
    }

    .nav-item.has-submenu .submenu {
        list-style: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding-left: 0;
        margin: 8px 0 0 0;
    }

        .nav-item.has-submenu .submenu .submenu-item .submenu-link {
            display: flex;
            align-items: center;
            padding: 10px 20px 10px 68px;
            color: #6c757d;
            text-decoration: none;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            font-size: 13px;
            opacity: 0;
            transform: translateX(-15px);
            margin: 2px 8px;
            border-radius: 8px;
            font-weight: 500;
        }

            .nav-item.has-submenu .submenu .submenu-item .submenu-link:hover {
                background: linear-gradient(135deg, rgba(51, 56, 148, 0.1) 0%, rgba(51, 56, 148, 0.06) 100%);
                color: var(--primary-color);
                padding-left: 72px;
                transform: translateX(0);
                box-shadow: 0 2px 6px rgba(51, 56, 148, 0.1);
            }

            .nav-item.has-submenu .submenu .submenu-item .submenu-link.active {
                background: linear-gradient(135deg, rgba(51, 56, 148, 0.15) 0%, rgba(51, 56, 148, 0.1) 100%);
                color: var(--primary-color);
                font-weight: 600;
                box-shadow: 0 2px 8px rgba(51, 56, 148, 0.15);
            }

    .nav-item.has-submenu.submenu-open .submenu {
        max-height: 500px;
    }

        .nav-item.has-submenu.submenu-open .submenu .submenu-item .submenu-link {
            opacity: 1;
            transform: translateX(0);
        }

    .nav-item.has-submenu.submenu-open .nav-link .submenu-icon {
        transform: rotate(180deg);
        color: var(--primary-color);
    }

    .sidebar:hover .has-submenu.submenu-open .submenu .submenu-item .submenu-link {
        opacity: 1;
        transform: translateX(0);
    }
    /* Main Content */
    .main-content {
        flex: 1;
        margin-left: 80px;
        padding: 10px;
        transition: margin-left 0.3s ease;
        background: var(--bg-lighten);
    }

    .content-wrapper {
        width: 100%;
        margin: 0 auto;
        /* Allow searchable dropdown overlay menus to escape vertically.
           (Template JS used a portal-to-body; in Blazor we rely on overflow visibility.) */
        overflow-x: hidden;
        overflow-y: visible;
    }
    /* Filter Section */
    .filter-section {
        margin-bottom: 10px;
    }

    .filter-card {
        background: white;
        border-radius: 8px;
        box-shadow: var(--shadow);
        border: 1px solid var(--border-color);
        /* Searchable dropdown menu is absolutely positioned; it must not be clipped. */
        overflow: visible;
    }

    .filter-body,
    .filter-grid,
    .filter-item {
        /* Ensure dropdown menus are not clipped by nested filter containers. */
        overflow: visible;
    }

    .filter-header {
        padding: 10px 16px;
        background: linear-gradient(135deg, var(--primary-color) 0%, #282a7a 100%);
        border-bottom: 2px solid #282a7a;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .page-title-in-header {
        color: white;
        font-size: 18px;
        font-weight: 700;
        margin: 0;
        letter-spacing: 0.3px;
    }

    .filter-title {
        color: white;
        font-size: 14px;
        font-weight: 600;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 8px;
        opacity: 0.9;
    }

        .filter-title i {
            font-size: 16px;
        }

    .filter-body {
        padding: 12px 16px;
    }

    .filter-grid {
        display: grid;
        grid-template-columns: auto auto auto auto;
        gap: var(--spacing-sm);
        align-items: center;
        justify-items: start;
    }

    .filter-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        justify-content: flex-start;
        /*width: 100%;*/
    }

    .filter-label {
        font-size: var(--font-size-sm);
        font-weight: var(--font-weight-semibold);
        color: var(--text-secondary);
        display: flex;
        align-items: center;
        gap: var(--spacing-xs);
        white-space: nowrap;
        min-width: fit-content;
        margin-bottom:3px;
    }

        .filter-label i {
            color: var(--primary-color);
            font-size: 14px;
        }

    .filter-select {
        padding: 10px 14px;
        padding-right: 40px;
        border: 2px solid #e5e7eb;
        border-radius: 10px;
        font-size: 13px;
        font-weight: 500;
        line-height: 1.5;
        color: #1f2937;
        background: linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%);
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333894' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        min-width: 140px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }

        .filter-select:hover {
            border-color: var(--primary-color);
            background: linear-gradient(to bottom, #ffffff 0%, #f3f4f6 100%);
            box-shadow: 0 4px 12px rgba(51, 56, 148, 0.15);
            transform: translateY(-1px);
        }

        .filter-select:focus {
            outline: none;
            border-color: var(--primary-color);
            background: white;
            box-shadow: 0 0 0 4px rgba(51, 56, 148, 0.1), 0 4px 16px rgba(51, 56, 148, 0.2);
            transform: translateY(-1px);
        }

        .filter-select:active {
            transform: translateY(0);
            box-shadow: 0 2px 8px rgba(51, 56, 148, 0.15);
        }

        .filter-select[multiple] {
            padding: 8px 12px;
            padding-right: 12px;
            background-image: none;
            min-height: 120px;
            min-width: 200px;
            overflow-y: auto;
            cursor: default;
        }

            .filter-select[multiple] option {
                padding: 6px 8px;
                margin: 2px 0;
                border-radius: 4px;
                cursor: pointer;
            }

                .filter-select[multiple] option:checked {
                    background: var(--primary-color);
                    color: white;
                }

                .filter-select[multiple] option:hover {
                    background: rgba(51, 56, 148, 0.1);
                }

    .filter-reset-btn {
        padding: 8px 16px;
        background: var(--bg-light);
        border: 1.5px solid var(--border-color);
        border-radius: 6px;
        font-size: 13px;
        font-weight: 600;
        color: #495057;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
        height: fit-content;
    }

        .filter-reset-btn:hover {
            background: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
            transform: translateY(-1px);
            box-shadow: 0 2px 6px rgba(51, 56, 148, 0.2);
        }
    /* MudBlazor Multi-Select Styling - Match Normal Dropdown */
    .filter-mudselect {
        width: 100%;
    }

        .filter-mudselect .mud-input-control,
        .filter-mudselect .mud-select,
        .filter-mudselect .mud-input-slot {
            width: 100%;
        }

        .filter-mudselect .mud-input {
            font-size: 14px;
            padding: 10px 12px;
            border-radius: 6px;
            min-height: 44px;
        }

        .filter-mudselect .mud-input-outlined {
            border: 1px solid #e3e6f0;
            background-color: #fff;
            transition: all 0.3s ease;
        }

            .filter-mudselect .mud-input-outlined:hover {
                border-color: #333894;
                box-shadow: 0 2px 8px rgba(51, 56, 148, 0.1);
            }

            .filter-mudselect .mud-input-outlined.mud-focused {
                border-color: #333894;
                box-shadow: 0 4px 12px rgba(51, 56, 148, 0.15);
            }

        .filter-mudselect .mud-select-item {
            padding: 8px 12px;
            font-size: 14px;
        }

            .filter-mudselect .mud-select-item.mud-selected {
                background-color: rgba(51, 56, 148, 0.1);
                color: #333894;
                font-weight: 600;
            }

            .filter-mudselect .mud-select-item:hover {
                background-color: rgba(51, 56, 148, 0.05);
            }

        .filter-mudselect .mud-chip {
            background-color: #333894;
            color: white;
            font-size: 12px;
            font-weight: 500;
        }

        .filter-mudselect .mud-helper-text,
        .filter-mudselect label {
            display: none;
        }

    .filter-reset-btn i {
        font-size: 14px;
    }
    /* Custom Multi-Select Dropdown */
    .custom-multi-select {
        position: relative;
        min-width: 200px;
        width: 100%;
    }

        .custom-multi-select .custom-multi-select-trigger {
            width: 100%;
            padding: 10px 14px;
            padding-right: 40px;
            border: 2px solid #e5e7eb;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 500;
            color: #1f2937;
            background: linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%);
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            text-align: left;
            display: flex;
            align-items: center;
            justify-content: space-between;
            min-height: 42px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        }

            .custom-multi-select .custom-multi-select-trigger .multi-select-placeholder {
                color: #9ca3af;
                font-weight: 400;
            }

            .custom-multi-select .custom-multi-select-trigger .selected-count {
                color: #333894;
                font-weight: 600;
                background: rgba(51, 56, 148, 0.1);
                padding: 2px 8px;
                border-radius: 12px;
                font-size: 12px;
            }

            .custom-multi-select .custom-multi-select-trigger .multi-select-arrow {
                position: absolute;
                right: 12px;
                top: 50%;
                transform: translateY(-50%);
                transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
                color: #6b7280;
                font-size: 20px;
            }

            .custom-multi-select .custom-multi-select-trigger:hover {
                border-color: #333894;
                background: linear-gradient(to bottom, #ffffff 0%, #f3f4f6 100%);
                box-shadow: 0 4px 12px rgba(51, 56, 148, 0.15);
                transform: translateY(-1px);
            }

            .custom-multi-select .custom-multi-select-trigger:focus {
                outline: none;
                border-color: #333894;
                background: white;
                box-shadow: 0 0 0 4px rgba(51, 56, 148, 0.1), 0 4px 16px rgba(51, 56, 148, 0.2);
                transform: translateY(-1px);
            }

        .custom-multi-select.active .custom-multi-select-trigger {
            border-color: #333894;
            background: white;
            box-shadow: 0 0 0 4px rgba(51, 56, 148, 0.1), 0 4px 16px rgba(51, 56, 148, 0.2);
        }

            .custom-multi-select.active .custom-multi-select-trigger .multi-select-arrow {
                transform: translateY(-50%) rotate(180deg);
                color: #333894;
            }

        .custom-multi-select .custom-multi-select-dropdown {
            display: none;
            position: absolute;
            top: calc(100% + 6px);
            left: 0;
            right: 0;
            background: white;
            border: 2px solid #e5e7eb;
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
            z-index: 1000;
            max-height: 380px;
            overflow: hidden;
            animation: dropdownSlide 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            max-width: 100vw;
            box-sizing: border-box;
        }

    @media (max-width: 768px) {
        .custom-multi-select {
            width: 100%;
            min-width: 0;
        }

            .custom-multi-select .custom-multi-select-dropdown {
                position: fixed;
                left: 10px !important;
                right: 10px !important;
                width: calc(100vw - 20px) !important;
                max-width: calc(100vw - 20px) !important;
                transform: translateX(0) !important;
            }
    }

    .custom-multi-select.active .custom-multi-select-dropdown {
        display: block;
    }

    .custom-multi-select .multi-select-search {
        padding: 12px;
        border-bottom: 1px solid #e5e7eb;
        background: #f9fafb;
    }

        .custom-multi-select .multi-select-search .multi-select-search-input {
            width: 100%;
            padding: 10px 14px;
            border: 2px solid #e5e7eb;
            border-radius: 8px;
            font-size: 14px;
            color: #1f2937;
            background: white;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        }

            .custom-multi-select .multi-select-search .multi-select-search-input:focus {
                outline: none;
                border-color: #333894;
                box-shadow: 0 0 0 3px rgba(51, 56, 148, 0.1), 0 2px 8px rgba(51, 56, 148, 0.15);
            }

            .custom-multi-select .multi-select-search .multi-select-search-input::placeholder {
                color: #9ca3af;
            }

    color: #212529;
}

.custom-multi-select .multi-select-search .multi-select-search-input:focus {
    outline: none;
    border-color: #333894;
}

.custom-multi-select .multi-select-options {
    max-height: 250px;
    overflow-y: auto;
    padding: 5px 0;
}

.custom-multi-select .multi-select-options::-webkit-scrollbar {
    width: 6px;
}

.custom-multi-select .multi-select-options::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.custom-multi-select .multi-select-options::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.custom-multi-select .multi-select-options::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.custom-multi-select .multi-select-options .multi-select-option {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    color: #1f2937;
    margin: 2px 8px;
    border-radius: 8px;
}

.custom-multi-select .multi-select-options .multi-select-option:hover {
    background: linear-gradient(135deg, rgba(51, 56, 148, 0.08) 0%, rgba(51, 56, 148, 0.04) 100%);
    transform: translateX(4px);
}

.custom-multi-select .multi-select-options .multi-select-option input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #333894;
    border-radius: 4px;
}

.custom-multi-select .multi-select-options .multi-select-option input[type="checkbox"]:checked {
    background-color: #333894;
}

.custom-multi-select .multi-select-options .multi-select-option span {
    flex: 1;
    font-weight: 500;
}

.custom-multi-select .multi-select-options .multi-select-option.hidden {
    display: none;
}

.custom-multi-select .multi-select-actions {
    padding: 12px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: #f9fafb;
}

.custom-multi-select .multi-select-actions button {
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    color: #495057;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.custom-multi-select .multi-select-actions button:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
    border-color: #333894;
    color: #333894;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(51, 56, 148, 0.15);
}

.custom-multi-select .multi-select-actions button.multi-select-select-all {
    color: #333894;
    border-color: rgba(51, 56, 148, 0.3);
}

.custom-multi-select .multi-select-actions button.multi-select-select-all:hover {
    background: linear-gradient(135deg, rgba(51, 56, 148, 0.1) 0%, rgba(51, 56, 148, 0.05) 100%);
}

.custom-multi-select .multi-select-actions button.multi-select-clear-all {
    color: #f06548;
    border-color: rgba(240, 101, 72, 0.3);
}

.custom-multi-select .multi-select-actions button.multi-select-clear-all:hover {
    background: linear-gradient(135deg, rgba(240, 101, 72, 0.1) 0%, rgba(240, 101, 72, 0.05) 100%);
    border-color: #f06548;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Searchable Dropdown Styles */
.searchable-dropdown {
    position: relative;
    width: 100%;
    min-width: 140px;
    z-index: 1;
}

.searchable-dropdown .searchable-dropdown-trigger {
    width: 100%;
    padding: 10px 14px;
    padding-right: 40px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    background: linear-gradient(to bottom, #ffffff 0%, #f9fafb 100%);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.searchable-dropdown .searchable-dropdown-trigger .searchable-dropdown-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1f2937;
}

.searchable-dropdown .searchable-dropdown-trigger .searchable-dropdown-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #6b7280;
    font-size: 20px;
    pointer-events: none;
}

.searchable-dropdown .searchable-dropdown-trigger:hover {
    border-color: #333894;
    background: linear-gradient(to bottom, #ffffff 0%, #f3f4f6 100%);
    box-shadow: 0 4px 12px rgba(51, 56, 148, 0.15);
    transform: translateY(-1px);
}

.searchable-dropdown .searchable-dropdown-trigger:focus {
    outline: none;
    border-color: #333894;
    background: white;
    box-shadow: 0 0 0 4px rgba(51, 56, 148, 0.1), 0 4px 16px rgba(51, 56, 148, 0.2);
    transform: translateY(-1px);
}

.searchable-dropdown .searchable-dropdown-trigger.active {
    border-color: #333894;
    background: white;
    box-shadow: 0 0 0 4px rgba(51, 56, 148, 0.1), 0 4px 16px rgba(51, 56, 148, 0.2);
}

.searchable-dropdown .searchable-dropdown-trigger.active .searchable-dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
    color: #333894;
}

.searchable-dropdown .searchable-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
    z-index: 99999;
    max-height: 380px;
    overflow: hidden;
    animation: dropdownSlide 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    pointer-events: auto;
}

.searchable-dropdown.active {
    z-index: 99999;
    position: relative;
}

.searchable-dropdown.active .searchable-dropdown-menu {
    display: block;
}

.searchable-dropdown .searchable-dropdown-search-wrapper {
    position: relative;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.searchable-dropdown .searchable-dropdown-search-wrapper .searchable-dropdown-search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 18px;
    pointer-events: none;
    z-index: 1;
}

.searchable-dropdown .searchable-dropdown-search-wrapper .searchable-dropdown-search {
    width: 100%;
    padding: 10px 14px 10px 44px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #1f2937;
    background: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.searchable-dropdown .searchable-dropdown-search-wrapper .searchable-dropdown-search:focus {
    outline: none;
    border-color: #333894;
    box-shadow: 0 0 0 3px rgba(51, 56, 148, 0.1), 0 2px 8px rgba(51, 56, 148, 0.15);
}

.searchable-dropdown .searchable-dropdown-search-wrapper .searchable-dropdown-search::placeholder {
    color: #9ca3af;
}

.searchable-dropdown .searchable-dropdown-options {
    max-height: 280px;
    overflow-y: auto;
    padding: 5px 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.searchable-dropdown .searchable-dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.searchable-dropdown .searchable-dropdown-options::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.searchable-dropdown .searchable-dropdown-options::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.searchable-dropdown .searchable-dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.searchable-dropdown .searchable-dropdown-options .searchable-dropdown-option {
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    color: #1f2937;
    margin: 2px 8px;
    border-radius: 8px;
    font-weight: 500;
}

.searchable-dropdown .searchable-dropdown-options .searchable-dropdown-option:hover,
.searchable-dropdown .searchable-dropdown-options .searchable-dropdown-option.focused {
    background: linear-gradient(135deg, rgba(51, 56, 148, 0.08) 0%, rgba(51, 56, 148, 0.04) 100%);
    transform: translateX(4px);
}

.searchable-dropdown .searchable-dropdown-options .searchable-dropdown-option.selected {
    background: linear-gradient(135deg, rgba(51, 56, 148, 0.15) 0%, rgba(51, 56, 148, 0.08) 100%);
    color: #333894;
    font-weight: 600;
}

.searchable-dropdown .searchable-dropdown-options .searchable-dropdown-option.selected::before {
    content: '✓';
    margin-right: 8px;
    color: #333894;
    font-weight: bold;
}

.searchable-dropdown .searchable-dropdown-options .searchable-dropdown-option mark {
    background: rgba(51, 56, 148, 0.2);
    color: #333894;
    font-weight: 600;
    padding: 0 2px;
    border-radius: 2px;
}

.searchable-dropdown .searchable-dropdown-options .searchable-dropdown-option.hidden {
    display: none;
}

.searchable-dropdown .searchable-dropdown-no-results {
    padding: 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
    font-style: italic;
}

/* Mobile: keep searchable dropdown usable in small viewports */
@media (max-width: 768px) {
    .searchable-dropdown .searchable-dropdown-menu {
        max-height: calc(100vh - 220px);
    }

    .searchable-dropdown .searchable-dropdown-options {
        max-height: calc(100vh - 320px);
    }
}

@media (max-width: 992px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }
}

/* Metrics Sections with Charts */
.metrics-sections {
    margin-top: 30px;
}

.section-tabs-container {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
    overflow: hidden;
}

.section-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
}

.section-tab-btn {
    flex: 1;
    min-width: 150px;
    padding: 16px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.section-tab-btn:hover {
    color: var(--primary-color);
    background: rgba(51, 56, 148, 0.1);
}

.section-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(51, 56, 148, 0.08);
}

.section-tab-btn i {
    font-size: 18px;
}

.section-content-wrapper {
    position: relative;
}

.section-content {
    display: none;
}

.section-content.active {
    display: block;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 28px;
}

.chart-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: none;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
}

.chart-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(135deg, #333894, #4d4fa8, #39afd1, #282a7a);
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    animation: gradientShift 3s ease infinite;
    transition: opacity 0.3s ease;
}

    .chart-card:hover {
        box-shadow: var(--shadow-hover);
        /*transform: translateY(-1px) scale(1.01);*/
    }

.chart-card:hover::before {
    opacity: 1;
}

.chart-card:hover .chart-header {
    background: linear-gradient(135deg, rgba(51, 56, 148, 0.1) 0%, rgba(51, 56, 148, 0.05) 100%);
}

.chart-card:hover .chart-header .chart-title {
    color: #333894;
    transform: translateX(4px);
}

.chart-card:hover .chart-body {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%);
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.chart-header {
    padding: 22px 26px;
    background: transparent;
    border-bottom: 2px solid rgba(51, 56, 148, 0.08);
    position: relative;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.chart-header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
        background: radial-gradient(circle at top right, rgba(51, 56, 148, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.chart-header:hover::after {
    opacity: 1;
}

.chart-title {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    line-height: 1.6;
    letter-spacing: 0.01em;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #333894 0%, #4d4fa8 100%);
    border-radius: 2px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.chart-title:hover::before {
    height: 24px;
    width: 5px;
}

.chart-body {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    position: relative;
    transition: all 0.4s ease;
}

/* No-data message and legend at bottom: keep below chart, centered like labels */
.chart-body .chart-no-data-msg {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    margin-bottom: 0;
    flex-shrink: 0;
    order: 2;
    text-align: center;
}

.chart-body::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(51, 56, 148, 0.03) 1px, transparent 0);
    background-size: 20px 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chart-body:hover::before {
    opacity: 1;
}

.chart-container {
    min-height: 300px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Ensure ApexCharts canvases don't interfere with dropdowns */
.apexcharts-canvas,
.apexcharts-svg {
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

/* Ensure dropdown stays above all charts */
.searchable-dropdown-menu[style*="position: fixed"] {
    z-index: 99999 !important;
    pointer-events: auto !important;
}

/* Data labels positioned inside bars for employment charts */
.employment-charts-section .apexcharts-datalabels {
    text-align: center;
}

@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .section-tab-btn {
        min-width: 120px;
        font-size: 13px;
        padding: 12px 16px;
    }
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 6px;
    margin-bottom: 8px;
}

.cards-grid.cards-grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

.cards-grid.cards-grid-5 .stat-card .card-info .card-change {
    white-space: nowrap;
    flex-wrap: wrap;
}

.stat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid #e7eaed;
    border-radius: 6px;
    padding: 12px;
    transition: all 0.3s ease;
}

    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-hover);
        border-top: 4px solid;
         border-top-color: var(--primary-color);
    }

.stat-card.card-primary {
   /* border-top-color: var(--primary-color);*/
}

    .stat-card.card-primary .card-icon {
        /*background: rgb(51 56 148 / 5%);*/
        color: #5174bf;
        font-size:30px;
    }

.stat-card.card-success {
    border-top-color: var(--success-color);
}

.stat-card.card-success .card-icon {
    background: rgba(10, 179, 156, 0.1);
    color: var(--success-color);
}

.stat-card.card-info {
    border-top-color: var(--info-color);
}

.stat-card.card-info .card-icon {
    background: rgba(57, 175, 209, 0.1);
    color: var(--info-color);
}

.card-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-info {
    flex: 1;
}

.card-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: #747685;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.card-change {
    display: flex;
    align-items: center;
    gap: 1px;
    font-size: 13px;
    margin-left: -3px;
    margin-bottom: 0;
}

.card-change i {
    font-size: 16px;
}

.card-change.positive {
    color: var(--success-color);
}

.card-change.negative {
    color: var(--danger-color);
}

.card-change.neutral {
    color: var(--text-muted, #6c757d);
}

.change-text {
    color: var(--text-muted);
    margin-left: 4px;
}

.card-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-icon iconify-icon {
    font-size: 32px;
}

/* Content Section */
.content-section {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 8px;
}

.metric-lists-container {
    width: 100%;
}

.ranking-lists-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
}

/* Responsive: Stack ranking lists vertically on mobile */
@media (max-width: 768px) {
    .ranking-lists-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Override grid layout when Bootstrap row is used (for responsive wrapping) */
.metric-lists-container .row {
    margin-left: 0;
    margin-right: 0;
}

.metric-lists-container .row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
}

/* Ensure ranking-list-card takes full width when in Bootstrap column */
.metric-lists-container .ranking-list-card {
    width: 100%;
    height: 100%;
}

.ranking-list-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ranking-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-light);
}

.ranking-card-header.top {
    background: linear-gradient(135deg, rgba(10, 179, 156, 0.1) 0%, rgba(10, 179, 156, 0.05) 100%);
    border-bottom-color: #0ab39c;
}

.ranking-card-header.bottom {
    background: linear-gradient(135deg, rgba(240, 101, 72, 0.1) 0%, rgba(240, 101, 72, 0.05) 100%);
    border-bottom-color: #f06548;
}

.map-card,
.ranking-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e7eaed;
}

.map-header,
.ranking-header {
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-light);
}

.map-title,
.ranking-title {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

/* Ranking Header */
.ranking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
}

/* Ranking Controls */
.ranking-controls {
    display: flex;
    align-items: center;
    gap: 0px;
}

.search-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-muted);
    font-size: 18px;
}

.search-toggle:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-box.active {
    width: 250px;
    opacity: 1;
    margin-right: 0;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 18px;
    pointer-events: none;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--bg-light);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(51, 56, 148, 0.1);
}

.sort-buttons {
    display: flex;
    gap: 0px;
}

.sort-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 0px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-muted);
    font-size: 18px;
}

.sort-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.sort-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.no-results {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.no-results p {
    margin: 0;
    font-size: 14px;
}

/* Tabs Container */
.tabs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 15px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(51, 56, 148, 0.1);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(51, 56, 148, 0.08);
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 20px;
}

.tab-content.active {
    display: block;
}

.map-body,
.ranking-body {
    padding: 20px;
}

.map-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    max-height: 500px;
    object-fit: contain;
}

.ranking-body {
    max-height: 600px;
    overflow-y: auto;
    padding: 0 !important;
}

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

.district-item:last-child {
    border-bottom: none;
}

.district-name {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 15px;
}

.indicators-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.indicator-item {
    text-align: center;
    padding: 12px;
    background: var(--bg-light);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.indicator-item:hover {
    background: #e9ecef;
}

.indicator-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.indicator-value {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #494e52;
}

.indicator-value.positive {
    color: var(--success-color);
}

.indicator-value.negative {
    color: var(--danger-color);
}

/* Scrollbar Styling */
.ranking-body::-webkit-scrollbar {
    width: 6px;
}

.ranking-body::-webkit-scrollbar-track {
    background: var(--bg-light);
}

.ranking-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.ranking-body::-webkit-scrollbar-thumb:hover {
    background: #ced4da;
}

/* Districts Ranking Section */
.districts-ranking-section {
    margin-top: 20px;
}

.section-header {
    margin-bottom: 25px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #212529;
    margin: 0;
}

.metric-tabs-container {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 0;
    margin-bottom: 25px;
    overflow: hidden;
}

.metric-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
}

.metric-tab-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
    position: relative;
}

.metric-tab-btn:hover {
    color: var(--primary-color);
    background: rgba(51, 56, 148, 0.1);
}

.metric-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(51, 56, 148, 0.08);
}

.metric-content-wrapper {
    position: relative;
}

.metric-content {
    display: none;
}

.metric-content.active {
    display: block;
}
.username {
    display: flex;
    align-items: center;
    padding: 12px;
    color: white;
    font-weight: 400;
}
/* Category boxes grid layout */
.category-boxes-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 20px;
}

.category-box {
    background: #fff;
    border-radius: 16px;
    /*box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);*/
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

    .category-box:hover {
        box-shadow: var(--shadow-hover);
        transform: translateY(-3px);
    }

.category-box-header {
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
}

.category-box-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent 0%, currentColor 50%, transparent 100%);
    opacity: 0.3;
}

/* Category headers use shared category colors (Champions → Aspirants) */
.category-box-header.champions {
    background: linear-gradient(135deg, rgba(54, 58, 147, 0.12) 0%, rgba(54, 58, 147, 0.06) 100%);
    border-bottom: 3px solid var(--color-champion);
    color: var(--color-champion);
}

.category-box-header.front-runners {
    background: linear-gradient(135deg, rgba(32, 119, 120, 0.12) 0%, rgba(32, 119, 120, 0.06) 100%);
    border-bottom: 3px solid var(--color-front-runner);
    color: var(--color-front-runner);
}

.category-box-header.contenders {
    background: linear-gradient(135deg, rgba(114, 189, 184, 0.12) 0%, rgba(114, 189, 184, 0.06) 100%);
    border-bottom: 3px solid var(--color-contender);
    color: var(--color-contender);
}

.category-box-header.strivers {
    background: linear-gradient(135deg, rgba(160, 209, 227, 0.12) 0%, rgba(160, 209, 227, 0.06) 100%);
    border-bottom: 3px solid var(--color-striver);
    color: var(--color-striver);
}

.category-box-header.aspirants {
    background: linear-gradient(135deg, rgba(242, 241, 134, 0.12) 0%, rgba(242, 241, 134, 0.06) 100%);
    border-bottom: 3px solid var(--color-aspirant);
    color: var(--color-aspirant);
}

.category-box-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.category-box-subtitle {
    font-size: 12px;
    opacity: 0.8;
    font-weight: 500;
}

.category-box-body {
    padding: 8px;
    flex: 1;
    max-height: 500px;
    overflow-y: auto;
}

.ranking-card-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.ranking-card-title::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

.ranking-card-body {
    padding: 20px;
    max-height: 550px;
    overflow-y: auto;
    background: #fafbfc;
}

.ranking-card-body::-webkit-scrollbar {
    width: 6px;
}

.ranking-card-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.ranking-card-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.ranking-card-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.district-rank-item {
    display: flex;
    align-items: center;
    /*gap: 15px;*/
    justify-content: space-between;
    padding: 10px 9px;
    margin-bottom: 10px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.district-rank-item:last-child {
    margin-bottom: 0;
}

.district-rank-item:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateX(4px);
    border-color: var(--primary-color);
}

.rank-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-hover) 100%);
    color: white;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
    margin-right:12px;
}

.rank-district-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #212529;
    letter-spacing: 0.2px;
}

.rank-value-box {
    width: auto;
    min-width: 75px;
    padding: 8px 3px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--primary-color) 0%, #282a7a 100%);
    box-shadow: 0 4px 8px rgba(51, 56, 148, 0.3);
}

.district-rank-item:hover .rank-value-box {
    transform: scale(1.05);
}

.rank-value {
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.rank-value-box .arrow-up {
    font-size: 14px;
    font-weight: 600;
    color: var(--success-color);
}

.rank-value-box .arrow-down {
    font-size: 14px;
    font-weight: 600;
    color: var(--danger-color);
}

.rank-value-box .arrow-neutral {
    font-size: 14px;
    font-weight: 600;
    color: #dec733;
}

/* Department Sections with Left-Side Vertical Tabs */
.department-sections {
    margin-top: 30px;
}

.department-layout {
    display: flex;
    gap: 20px;
    min-height: 600px;
}

.department-tabs-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px 0;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    position: sticky;
    top: 90px;
}

.department-tabs-sidebar::-webkit-scrollbar {
    width: 6px;
}

.department-tabs-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.department-tabs-sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.department-tabs-sidebar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.department-tabs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
}

.department-tab-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    width: 100%;
}

.department-tab-btn i {
    font-size: 20px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.department-tab-btn span {
    flex: 1;
    line-height: 1.4;
}

.department-tab-btn:hover {
    background: rgba(51, 56, 148, 0.08);
    color: var(--primary-color);
    transform: translateX(4px);
}

.department-tab-btn:hover i {
    transform: scale(1.1);
}

.department-tab-btn.active {
    background: linear-gradient(135deg, rgba(51, 56, 148, 0.15) 0%, rgba(51, 56, 148, 0.08) 100%);
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(51, 56, 148, 0.15);
}

.department-tab-btn.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: linear-gradient(to bottom, var(--primary-color), #4d4fa8);
    border-radius: 0 4px 4px 0;
}

.department-tab-btn.active i {
    color: var(--primary-color);
}

.department-content-wrapper {
    flex: 1;
    min-width: 0;
}

.department-content {
    display: none;
}

.department-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content-section {
        grid-template-columns: 1fr;
    }

    .category-boxes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    /* Mobile Header Layout */
    .top-header {
        height: auto;
        min-height: 90px;
    }
    .username {
        display: none;
    }
    .top-header .header-content {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 15px;
        height: auto;
        min-height: 90px;
        position: relative;
    }

    .top-header .header-content .mobile-menu-toggle {
        display: flex;
        position: absolute;
        left: 15px;
        top: 10px;
    }

    .top-header .header-content .header-left {
        order: 2;
        justify-content: center;
        width: 100%;
    }

    .top-header .header-content .header-left .logo .logo-img {
        height: 50px;
    }

    .top-header .header-content .header-center {
        position: static;
        transform: none;
        order: 3;
        width: 100%;
        text-align: center;
    }

    .top-header .header-content .header-center .dashboard-title {
        font-size: 14px;
        line-height: 1.4;
    }

    .top-header .header-content .header-right {
        position: absolute;
        top: 10px;
        right: 15px;
        order: 1;
    }

    /* Mobile Sidebar - Drawer Menu */
    .sidebar {
        width: 260px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 10001;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar .nav-text {
        display: block !important;
        opacity: 1 !important;
        width: auto !important;
    }

    .sidebar .nav-link {
        justify-content: flex-start !important;
        padding: 12px 25px !important;
    }

    .sidebar .submenu-icon {
        opacity: 1 !important;
        width: auto !important;
    }

    /* Sidebar Overlay for Mobile */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

    .main-content {
        margin-left: 0;
        padding: 10px 15px;
        padding-top: 27px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .content-wrapper {
        margin-top: 0;
    }

    .filter-section {
        margin-top: 0;
        margin-bottom: 15px;
    }

    body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .cards-grid.cards-grid-5 {
        grid-template-columns: 1fr;
    }

    /* Department Layout Mobile Responsive */
    .department-layout {
        flex-direction: column;
        gap: 15px;
        min-height: auto;
    }

    .department-tabs-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        top: auto;
    }

    .department-content-wrapper {
        width: 100%;
    }

    /* Charts Grid Mobile Responsive */
    .charts-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    /* Chart Card Mobile Responsive */
    .chart-card {
        overflow: hidden;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
        margin: 0;
    }

    .chart-container {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        min-width: 0;
    }

    .chart-body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding: 20px 15px;
        box-sizing: border-box;
    }

    .chart-header {
        padding: 16px 15px;
        box-sizing: border-box;
    }

    .chart-title {
        font-size: 13px;
        line-height: 1.5;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Department Charts Section Mobile */
    .department-charts-section {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Entrepreneurship Charts Section Mobile (similar to department) */
    .entrepreneurship-charts-section,
    .employment-charts-section,
    .education-charts-section,
    .livelihood-charts-section,
    .mobility-charts-section {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Content Wrapper Mobile */
    .content-wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding: 0;
        box-sizing: border-box;
    }

    /* Section Tabs Mobile */
    .section-tabs {
        flex-wrap: wrap;
        overflow-x: auto;
    }

    .section-tab-btn {
        min-width: 120px;
        font-size: 12px;
        padding: 12px 16px;
        flex: 1 1 auto;
    }

    .section-tabs-container {
        overflow-x: hidden;
    }

    /* Category boxes mobile */
    .category-boxes-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .category-box-body {
        max-height: 400px;
    }
}

/* Snapshot Table Styles */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0px 7px 0px;
}

.page-header .page-title {
    font-size: 24px;
    font-weight: 700;
    color: #212529;
    margin: 0;
}

.table-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.table-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-legend .legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: inline-block;
}

.table-legend .legend-champion {
    background: #4F46E5;
}

.table-legend .legend-front-runner {
    background: #10B981;
}

.table-legend .legend-contender {
    background: #F59E0B;
}

.table-legend .legend-striver {
    background: #3B82F6;
}

.table-legend .legend-aspirant {
    background: #EF4444;
}

.table-legend .legend-text {
    font-size: 13px;
    color: #495057;
    font-weight: 500;
}

.table-filters {
    margin-bottom: 24px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.table-filters .filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}

.table-filters .filter-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.table-filters .filter-label {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
}

.table-filters .filter-select,
.table-filters .filter-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    color: #212529;
    background: white;
    transition: all 0.3s ease;
}

.table-filters .filter-select:focus,
.table-filters .filter-input:focus {
    outline: none;
    border-color: #333894;
    box-shadow: 0 0 0 3px rgba(51, 56, 148, 0.1);
}

.table-filters .search-input-wrapper {
    position: relative;
}

.table-filters .search-input-wrapper .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #878a99;
    font-size: 18px;
}

.table-filters .search-input-wrapper .filter-input {
    padding-left: 40px;
}

.table-filters .btn-reset {
    padding: 10px 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-filters .btn-reset:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.table-filters .btn-reset i {
    font-size: 16px;
}

.table-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    padding: 24px;
    overflow: hidden;
}

.table-wrapper {
    overflow-x: auto;
    margin-bottom: 24px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.snapshot-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 1200px;
}

.snapshot-table thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.snapshot-table .table-header {
    padding: 14px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
    position: relative;
}

.snapshot-table .table-header.sticky-col {
    position: sticky;
    left: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    z-index: 11;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
}

.snapshot-table .table-header .info-icon {
    font-size: 14px;
    color: #878a99;
    margin-left: 4px;
    cursor: help;
    vertical-align: middle;
}

.snapshot-table .table-header-group {
    text-align: center;
    border-left: 1px solid #e9ecef;
}

.snapshot-table .table-subheader {
    background: #f8f9fa;
}

.snapshot-table .table-subheader .table-header {
    padding: 10px 8px;
    font-weight: 600;
    font-size: 11px;
    text-align: center;
}

.snapshot-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.snapshot-table tbody tr:hover {
    background-color: #f8f9fa;
}

.snapshot-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.snapshot-table .table-cell {
    padding: 12px;
    color: #495057;
    border-right: 1px solid #f0f0f0;
    vertical-align: middle;
}

.snapshot-table .table-cell.sticky-col {
    position: sticky;
    left: 0;
    background: white;
    z-index: 5;
    font-weight: 600;
    color: #212529;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
}

.snapshot-table tbody tr:nth-child(even) .table-cell.sticky-col {
    background: #fafbfc;
}

.snapshot-table tbody tr:hover .table-cell.sticky-col {
    background: #f8f9fa;
}

.snapshot-table .score-indicator {
    display: inline-block;
    width: 4px;
    height: 20px;
    border-radius: 2px;
    margin-right: 8px;
    vertical-align: middle;
}

.snapshot-table .score-champion {
    background: #4F46E5;
}

.snapshot-table .score-front-runner {
    background: #10B981;
}

.snapshot-table .score-contender {
    background: #F59E0B;
}

.snapshot-table .score-striver {
    background: #3B82F6;
}

.snapshot-table .score-aspirant {
    background: #EF4444;
}

.snapshot-table .trend-up {
    color: #10B981;
    font-size: 18px;
    font-weight: bold;
}

.snapshot-table .trend-down {
    color: #EF4444;
    font-size: 18px;
    font-weight: bold;
}

.snapshot-table .trend-neutral {
    color: #6c757d;
    font-size: 18px;
    font-weight: bold;
}

.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    flex-wrap: wrap;
    gap: 16px;
}

.table-pagination .pagination-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #495057;
}

.table-pagination .pagination-info .pagination-select {
    padding: 6px 10px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 14px;
    color: #495057;
    background: white;
    cursor: pointer;
}

.table-pagination .pagination-info .pagination-select:focus {
    outline: none;
    border-color: #333894;
}

.table-pagination .pagination-controls {
    display: flex;
    gap: 4px;
    align-items: center;
}

.table-pagination .pagination-btn {
    padding: 8px 14px;
    border: 1px solid #e9ecef;
    background: white;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.table-pagination .pagination-btn:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #333894;
    color: #333894;
}

.table-pagination .pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.table-pagination .pagination-btn.pagination-btn-active {
    background: #333894;
    color: white;
    border-color: #333894;
}

.table-pagination .pagination-ellipsis {
    padding: 8px 4px;
    color: #6c757d;
}

@media (max-width: 1200px) {
    .table-filters .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
}

@media (max-width: 768px) {
    .table-legend {
        flex-direction: column;
        gap: 12px;
    }
    .main-content {
        padding-top: 27px;
    }
        .table-filters .filter-grid {
            grid-template-columns: 1fr;
        }

        .table-pagination {
            flex-direction: column;
            align-items: stretch;
        }

            .table-pagination .pagination-controls {
                justify-content: center;
                flex-wrap: wrap;
            }
    }

/* Admin Upload Page Styles */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2c5fd1 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary i {
    font-size: 16px;
}

.btn-secondary {
    background: white;
    color: #3b82f6;
    border: 2px solid #3b82f6;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #3b82f6;
    color: white;
}

.btn-secondary i {
    font-size: 16px;
}

.btn-icon {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #6b7280;
}

.btn-icon:hover {
    background: #f3f4f6;
    border-color: #3b82f6;
    color: #3b82f6;
}

.btn-icon-small {
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #6b7280;
}

.btn-icon-small:hover {
    background: #f3f4f6;
    color: #3b82f6;
}

/* Upload Table Card */
.upload-table-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.upload-table-card .table-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f3f4f6;
}

.upload-table-card .table-header .table-title {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

.upload-table-card .table-header .table-actions {
    display: flex;
    gap: 8px;
}

.upload-table-card .table-filters-section {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: white;
}

.upload-table-card .table-filters-section .filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}

.upload-table-card .table-filters-section .filter-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upload-table-card .table-filters-section .filter-item .filter-label {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 6px;
}

.upload-table-card .table-filters-section .filter-item .filter-label i {
    font-size: 16px;
    color: #3b82f6;
}

.upload-table-card .table-filters-section .filter-item .filter-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    color: #212529;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-table-card .table-filters-section .filter-item .filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.upload-table-card .table-filters-section .filter-item .filter-select:hover {
    border-color: #3b82f6;
}

.upload-table-card .table-container {
    overflow-x: auto;
}

/* Data Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f3f4f6;
}

.data-table thead th {
    padding: 16px 24px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e5e7eb;
}

.data-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.2s ease;
}

.data-table tbody tr:hover {
    background: #f3f4f6;
}

.data-table tbody td {
    padding: 16px 24px;
    font-size: 14px;
    color: #212529;
}

.data-table .file-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.data-table .file-name-cell i {
    font-size: 20px;
    color: #10b981;
}

.data-table .status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.data-table .status-badge.status-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.data-table .status-badge.status-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.data-table .status-badge.status-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.data-table .action-buttons {
    display: flex;
    gap: 8px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 11000;
    padding: 20px;
    backdrop-filter: blur(4px);
    display: none;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 100vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f3f4f6;
}

.modal-header .modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #212529;
    margin: 0;
}

.modal-header .modal-close {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.3s ease;
}

.modal-header .modal-close:hover {
    background: #e5e7eb;
    color: #212529;
}

.modal-header .modal-close i {
    font-size: 20px;
}

.modal-body {
    padding: 24px;
}

/* Form Styles */
.form-group {
    margin-bottom: 10px;
}

.form-group .form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
}

.form-group .form-label .required {
    color: #ef4444;
}

.form-group .form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #212529;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-group .form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group .form-select:hover {
    border-color: #3b82f6;
}

/* File Upload Styles */
.file-upload-wrapper {
    position: relative;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-upload-label {
    display: block;
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
    padding: 20px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f3f4f6;
}

.file-upload-label:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.file-upload-label .file-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.file-upload-label .file-upload-content i {
    font-size: 32px;
    color: #3b82f6;
}

.file-upload-label .file-upload-content .file-upload-text {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
}

.file-upload-label .file-upload-content .file-upload-hint {
    font-size: 12px;
    color: #6b7280;
}

.file-name-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f3f4f6;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-top: 12px;
}

.file-name-display i {
    font-size: 24px;
    color: #10b981;
}

.file-name-display span {
    flex: 1;
    font-size: 14px;
    color: #212529;
    font-weight: 500;
}

.file-name-display .file-remove {
    background: transparent;
    border: none;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.3s ease;
}

.file-name-display .file-remove:hover {
    background: #ef4444;
    color: white;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

/* Login Page Styles */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #333894 0%, #282a7a 50%, #4d4fa8 100%);
    padding: 20px;
    overflow-x: hidden;
}

.login-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.login-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    min-height: 600px;
}

.login-logo {
    background: linear-gradient(135deg, #333894 0%, #282a7a 100%);
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.login-logo::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.login-logo .logo-img {
    height: 85px;
    width: auto;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: white;
    position: relative;
    z-index: 1;
    line-height: 1.3;
}

.login-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    position: relative;
    z-index: 1;
    line-height: 1.6;
}

.login-form-card {
    padding: 60px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form {
    width: 100%;
    max-width: 400px;
}

.form-group {
    margin-bottom: 10px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.form-label i {
    color: var(--primary-color);
    font-size: 18px;
}
.mud-input.mud-input-underline:before
{
    border:none !important
}
.mud-input.mud-input-underline:hover {
    border: none !important
}
    .form-input {
        width: 100%;
        padding: 10px 14px;
        border-radius: 10px;
        font-size: 14px;
        font-family: inherit;
        transition: all 0.3s ease;
        background: white;
        box-sizing: border-box;
        border: 2px solid #e5e7eb;
        line-height: 1.5;
        color: #1f2937;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        appearance: none;
        background-repeat: no-repeat;
        background-position: right 12px center;
        min-width: 140px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(51, 56, 148, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.password-toggle i {
    font-size: 20px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.forgot-password {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-color-hover);
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #282a7a 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(51, 56, 148, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(51, 56, 148, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn i {
    font-size: 20px;
}

.login-footer {
    grid-column: 1 / -1;
    padding: 20px 50px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--bg-light);
}

.login-footer p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* Forgot Password Page Styles */
.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.form-footer-links {
    margin-top: 20px;
    text-align: center;
}

.back-to-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-to-login:hover {
    color: var(--primary-color-hover);
    text-decoration: underline;
    gap: 12px;
}

.back-to-login i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.back-to-login:hover i {
    transform: translateX(-3px);
}

.success-message {
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--success-color) 0%, rgba(10, 179, 156, 0.8) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(10, 179, 156, 0.3);
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-icon i {
    font-size: 40px;
    color: white;
}

.success-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.success-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

.success-text:last-of-type {
    margin-bottom: 32px;
    padding-bottom: 0;
    border-bottom: none;
}

.success-actions {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.success-actions .login-btn {
    width: 100%;
    justify-content: center;
}

.success-actions .login-btn i {
    font-size: 18px;
}

/* Login Page Mobile Responsive */
@media (max-width: 768px) {
    .login-page {
        padding: 15px;
    }

    .login-wrapper {
        grid-template-columns: 1fr;
        min-height: auto;
        border-radius: 15px;
    }

    .login-logo {
        padding: 40px 30px;
        order: 1;
    }

    .login-logo .logo-img {
        height: 70px;
        margin-bottom: 20px;
    }

    .login-title {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .login-subtitle {
        font-size: 14px;
    }

    .login-form-card {
        padding: 40px 30px;
        order: 2;
    }

    .login-footer {
        padding: 15px 30px;
        order: 3;
    }
}

/* Summary Page Styles - Replaces TailwindCSS utilities */
.summary-page-container {
    padding: 15px;
    background: white;
    border-radius: 8px;
    /*box-shadow: var(--shadow);*/
    margin-bottom: 8px;
}

.summary-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
}

.summary-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-legend-indicator {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: inline-block;
    flex-shrink: 0;
}

.summary-legend-indicator.champion {
    background: var(--color-champion);
}

.summary-legend-indicator.front-runner {
    background: var(--color-front-runner);
}

.summary-legend-indicator.contender {
    background: var(--color-contender);
}

.summary-legend-indicator.striver {
    background: var(--color-striver);
}

.summary-legend-indicator.aspirant {
    background: var(--color-aspirant);
}

.summary-legend-text {
    font-size: 13px;
    color: #495057;
    font-weight: 500;
}

/* Constrain Summary page width so only the table scrolls; filter row stays fully visible */
.summary-page-layout {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}
.summary-table-wrapper {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.summary-table {
    width: 100%;
    font-size: 13px;
    text-align: left;
    color: #6b7280;
    white-space: nowrap;
    border-collapse: collapse;
}

.summary-table thead {
    font-size: 12px;
    color: #1f2937;
    text-transform: uppercase;
    background: #f9fafb;
}

.summary-table thead th {
    padding: 12px 14px;
    font-weight: 600;
    text-align: left;
}

.summary-table thead th.text-center {
    text-align: center;
}

.summary-table thead th.sub-header {
    padding: var(--spacing-sm);
    font-weight: var(--font-weight-medium);
}

.summary-table tbody tr {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color-light);
}

.summary-table tbody tr:nth-child(even) {
    background: var(--bg-lighter);
}

.summary-table tbody td {
    padding: var(--spacing-md) var(--spacing-lg);
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
}

.summary-table tbody td:first-child {
    font-weight: 600;
    color: #111827;
}

.summary-table-header {
    padding: 12px 24px;
}

.summary-table-subheader {
    padding: 8px 12px;
    font-weight: 500;
    text-align: center;
}

.summary-table-district {
    padding: 16px 24px;
    font-weight: 600;
    color: #111827;
}

/* Right border to separate each lever group (and Index) - keeps same look */
.summary-table .summary-group-separator {
    border-right: var(--bs-border-width) var(--bs-border-style) var(--bs-border-color) !important
}

/* Sortable header - match existing header look */
.summary-table th .sortable-header {
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.summary-table th .sortable-header:hover {
    color: var(--color-primary, #4f46e5);
}
.summary-table th .sortable-header .sort-icon {
    font-size: 14px;
    opacity: 0.7;
}
/* Active sort column: highlight so user sees current sort */
.summary-table th .sortable-header.sorted {
    color: var(--color-primary, #4f46e5);
    font-weight: 600;
}
.summary-table th .sortable-header.sorted .sort-icon {
    opacity: 1;
}

.summary-page-title,
.page-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    margin-top: 0;
}

.summary-indicator {
    display: inline-block;
    width: 4px;
    height: 20px;
    margin-left: 12px;
    border-radius: 2px;
    vertical-align: middle;
}

.summary-indicator.champion {
    background: var(--color-champion);
}

.summary-indicator.front-runner {
    background: var(--color-front-runner);
}

.summary-indicator.contender {
    background: var(--color-contender);
}

.summary-indicator.striver {
    background: var(--color-striver);
}

.summary-indicator.aspirant {
    background: var(--color-aspirant);
}

.trend-up {
    color: #10B981;
}

.trend-down {
    color: #EF4444;
}

.trend-neutral {
    color: #6B7280;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(51, 56, 148, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.chart-loading {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile responsive improvements */
@media (max-width: 992px) {
    .summary-table {
        font-size: 12px;
    }
    
    .summary-legend {
        gap: 16px;
    }
}
@media (min-width: 768px) {
    .main-content{
        padding-top:4px;
    }
}
    @media (max-width: 768px) {
        .summary-legend {
            gap: 12px;
            flex-direction: column;
            align-items: flex-start;
        }

        .summary-table-wrapper {
            font-size: 12px;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        .summary-table {
            font-size: 11px;
            min-width: 800px;
        }

            .summary-table thead th,
            .summary-table tbody td {
                padding: 8px 12px;
            }

                .summary-table thead th.summary-table-subheader {
                    padding: 6px 8px;
                    font-size: 10px;
                }

        .summary-page-container {
            padding: 16px;
        }

        .searchable-dropdown {
            min-width: 100%;
            width: 100%;
        }
    }

    @media (max-width: 480px) {
        .summary-table {
            font-size: 10px;
            min-width: 600px;
        }

            .summary-table thead th,
            .summary-table tbody td {
                padding: 6px 8px;
            }
    }

    /* Back to Top Button */
    .back-to-top-btn {
        position: fixed;
        bottom: 30px;
        right: 30px;
        width: 50px;
        height: 50px;
        background: linear-gradient(135deg, var(--primary-color) 0%, #282a7a 100%);
        color: white;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        box-shadow: 0 4px 20px rgba(51, 56, 148, 0.4);
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
    }

        .back-to-top-btn.visible {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .back-to-top-btn:hover {
            background: linear-gradient(135deg, #282a7a 0%, var(--primary-color) 100%);
            box-shadow: 0 6px 30px rgba(51, 56, 148, 0.6);
            transform: translateY(-3px);
        }

        .back-to-top-btn:active {
            transform: translateY(-1px);
        }

        .back-to-top-btn i {
            display: flex;
            align-items: center;
            justify-content: center;
        }

    @media (max-width: 768px) {
        .back-to-top-btn {
            bottom: 20px;
            right: 20px;
            width: 45px;
            height: 45px;
            font-size: 20px;
        }
    }

    @media (max-width: 480px) {
        .back-to-top-btn {
            bottom: 15px;
            right: 15px;
            width: 40px;
            height: 40px;
            font-size: 18px;
        }

        .summary-legend-item {
            font-size: 12px;
        }

        .summary-page-title {
            font-size: 16px;
        }
    }

    /* Profile Page Styles */
    .content-section.profile-section {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        grid-template-columns: none;
    }

    .profile-card {
        background: white;
        border-radius: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        overflow: hidden;
        max-width: 900px;
        width: 100%;
    }

.profile-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color) 100%);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 24px;
    color: white;
}

    .profile-avatar {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        overflow: hidden;
        border: 4px solid rgba(255, 255, 255, 0.3);
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .profile-avatar i {
            font-size: 48px;
            color: white;
        }

    .profile-header-info {
        flex: 1;
    }

    .profile-name {
        font-size: 28px;
        font-weight: 700;
        margin: 0 0 8px 0;
        color: white;
    }

    .profile-designation {
        font-size: 16px;
        color: rgba(255, 255, 255, 0.9);
        margin: 0;
    }

    .profile-actions {
        display: flex;
        gap: 12px;
    }

    .profile-body {
        padding: 32px;
    }

    .profile-info-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 24px;
        margin-bottom: 32px;
    }

    .profile-info-item {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .info-label {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        font-weight: 600;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

        .info-label i {
            font-size: 16px;
            color: var(--primary-color);
        }

    .info-value {
        font-size: 16px;
        font-weight: 500;
        color: var(--text-primary);
        padding: 8px 0;
    }

    .profile-bio-section {
        padding-top: 24px;
        border-top: 1px solid var(--border-color);
    }

    .profile-bio-content {
        margin-top: 12px;
        font-size: 15px;
        line-height: 1.6;
        color: var(--text-secondary);
        padding: 16px;
        background: var(--bg-light);
        border-radius: 8px;
    }

    /* Responsive Profile Styles */
    @media (max-width: 768px) {
        .profile-header {
            flex-direction: column;
            text-align: center;
            padding: 24px;
        }

        .profile-actions {
            width: 100%;
            justify-content: center;
        }

            .profile-actions .btn-primary {
                width: 100%;
            }

        .profile-info-grid {
            grid-template-columns: 1fr;
            gap: 20px;
        }

        .profile-body {
            padding: 24px;
        }
    }

    @media (max-width: 480px) {
        .profile-name {
            font-size: 22px;
        }

        .profile-designation {
            font-size: 14px;
        }

        .profile-avatar {
            width: 80px;
            height: 80px;
        }

        .profile-card {
            max-width: 100%;
        }
    }

/* Spinner Styles */
.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: text-bottom;
    border: 0.15em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
    width: 0.875rem;
    height: 0.875rem;
    border-width: 0.15em;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Alert Styles for Upload Modal */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.alert-danger {
    background-color: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

    .alert-danger pre {
        background-color: rgba(0, 0, 0, 0.05);
        padding: 8px;
        border-radius: 4px;
        font-size: 12px;
        max-height: 300px;
        overflow-y: auto;
    }

.alert-info {
    background-color: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}
