/* Minification failed. Returning unminified contents.
(74,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(75,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(76,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(77,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(78,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(79,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(80,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(81,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(82,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(83,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(84,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(85,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(86,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(87,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(88,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(95,17): run-time error CSS1039: Token not allowed after unary operator: '-dark'
(185,21): run-time error CSS1039: Token not allowed after unary operator: '-dark'
(199,22): run-time error CSS1039: Token not allowed after unary operator: '-gradient'
(211,22): run-time error CSS1039: Token not allowed after unary operator: '-gradient'
(219,17): run-time error CSS1039: Token not allowed after unary operator: '-gray'
(229,17): run-time error CSS1039: Token not allowed after unary operator: '-dark'
(441,22): run-time error CSS1039: Token not allowed after unary operator: '-gradient'
(483,26): run-time error CSS1039: Token not allowed after unary operator: '-threshold-veryLow'
(488,26): run-time error CSS1039: Token not allowed after unary operator: '-threshold-low'
(493,26): run-time error CSS1039: Token not allowed after unary operator: '-threshold-inRange'
(498,26): run-time error CSS1039: Token not allowed after unary operator: '-threshold-high'
 */
.noTopBorder {
    border-top: none !important;
}

.invisiFont {
    color: transparent;
}

/*==================================================
* Shadowing Effects for Page Title
* ===============================================*/
.box h3 {
    text-align: center;
    position: relative;
    top: 5px;
}

.box {
    width: 100%;
    height: 150px;
    background: #FFF;
    margin: 5px auto;
}

.effect6 {
    position: relative;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
}

    .effect6:before, .effect6:after {
        content: "";
        position: absolute;
        z-index: -1;
        box-shadow: 0 0 20px rgba(0,0,0,0.8);
        top: 50%;
        bottom: 0;
        left: 10px;
        right: 10px;
        border-radius: 100px / 10px;
    }

.effect8 {
    position: relative;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
}

    .effect8:before, .effect8:after {
        content: "";
        position: absolute;
        z-index: -1;
        box-shadow: 0 0 20px rgba(0,0,0,0.8);
        top: 10px;
        bottom: 10px;
        left: 0;
        right: 0;
        border-radius: 100px / 10px;
    }

    .effect8:after {
        right: 10px;
        left: auto;
        transform: skew(8deg) rotate(3deg);
    }


/*Defaults*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --threshold-veryLow: #FFE4E1;
    --threshold-low: #FFFACD;
    --threshold-inRange: #E6F3FF;
    --threshold-high: #F0FFF0;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark);
    position: relative;
    padding: 0;
    overflow-x: auto;
}

    /* Animated background */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%), radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
        animation: drift 20s ease-in-out infinite;
        z-index: -1;
    }

.container {
    max-width: 100%;
    overflow-x: visible;
    overflow-y: hidden !important;
    max-height: 110vh;
    margin: 0 auto;
    padding-top: 0;
    padding-bottom: 1rem;
    padding-left: 0;
    padding-right: 0;
}

/* Content Area */
.content-area {
    animation: fadeIn 1s ease-out;
    overflow: visible;
    margin-left: 2px;
}

/* DataTable Formatting*/
/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.6s ease-out;
}

    .header h1 {
        font-size: 3rem;
        font-weight: 800;
        background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        margin-bottom: 0.5rem;
        letter-spacing: -1px;
        filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
    }

    .header p {
        color: rgba(255, 255, 255, 0.9);
        font-size: 1.2rem;
        font-weight: 300;
    }

/* Cards Grid - UPDATED to keep 4 cards on one line */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Changed from auto-fit to fixed 4 columns */
    gap: clamp(0.5rem, 2vw, 2rem); /* Fluid gap that shrinks with viewport */
    margin-bottom: 1rem;
    overflow: auto;
}

/* Stats Cards - UPDATED with fluid sizing */
.stats-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: clamp(0.75rem, 1.5vw, 1rem); /* Fluid padding */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.5);
    min-width: 0; /* Critical: allows cards to shrink below content size */
}

    .stats-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    }

    .stats-card h3 {
        color: var(--dark);
        font-size: clamp(0.9rem, 1.8vw, 1.3rem); /* Fluid font size */
        margin-bottom: clamp(0.5rem, 1vw, 1rem);
        display: flex;
        align-items: center;
        gap: 0.5rem;
        white-space: nowrap; /* Prevent title wrapping */
        overflow: hidden;
        text-overflow: ellipsis;
    }

.stat-icon {
    width: clamp(30px, 5vw, 40px); /* Fluid icon size */
    height: clamp(30px, 5vw, 40px);
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1rem, 2vw, 1.5rem);
    flex-shrink: 0; /* Icon maintains size */
}

.stat-value {
    font-size: clamp(1.5rem, 3.5vw, 2.5rem); /* Fluid value size */
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.stat-label {
    color: var(--gray);
    font-size: clamp(0.7rem, 1.2vw, 0.9rem); /* Fluid label size */
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.3;
}


.school-name {
    font-weight: 600;
    color: var(--dark);
}

/* Enhanced summary line styles */
.summaryLine {
    background-color: #d2f8d2 !important;
    font-weight: bold !important;
    border-top: 2px solid #343a40 !important;
}

/* Keep table header (title/export buttons) fixed within card */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    z-index: 12;
    margin-bottom: 1rem; /* Add some space below */
}

/* NEW: Wrapper to contain the scrollable table */
.table-body {
    flex: 1; /* Takes up remaining space */
    overflow: auto; /* Scrolls vertically */
    position: relative;
    margin-bottom: 200px !important;
    padding-bottom: 100px !important;
}

/* NEW: Wrapper for the table with horizontal scroll */
.table-wrapper {
    overflow: auto !important; 
    height: 100%; /* Fill the table-body */
}

/* Base table styles */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    /* FROZEN FIRST COLUMN - School Name */
    .data-table thead tr th:nth-child(1),
    .data-table tbody tr td:nth-child(1) {
        position: sticky;
        left: 0;
        z-index: 5;
        width: 175px;
        min-width: 175px;
        max-width: 175px;
        background: white; /* Solid background so content doesn't show through */
    }

    /* FROZEN HEADER - First row */
    .data-table thead {
        position: sticky;
        top: 0;
        z-index: 10;
    }

        .data-table thead tr:first-child th {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: .5rem;
            font-weight: 600;
            font-size: 0.7rem;
            text-align: center;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            position: sticky;
            top: 0;
            z-index: 11;
        }

            .data-table thead tr:first-child th:first-child {
                border-radius: 12px 0 0 0;
            }

            .data-table thead tr:first-child th:last-child {
                border-radius: 0 12px 0 0;
            }

        /* Make sure thead first column is above tbody */
        .data-table thead tr th:nth-child(1) {
            z-index: 15; /* Higher than regular thead z-index */
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* Keep the gradient */
        }

        /* FROZEN HEADER - Second row */
        .data-table thead tr:last-child th {
            color: white;
            padding: .5rem;
            text-align: center;
            font-weight: 600;
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            position: sticky;
            top: 33px; /* Height of first row - adjust if needed */
            z-index: 10;
        }

            /* Alternating colors for second row */
            .data-table thead tr:last-child th:nth-child(odd) {
                z-index: 11 !important;
                width: auto !important;
                min-width: auto !important;
                max-width: auto !important;
                background: rgba(102, 126, 234, 1);
            }

            .data-table thead tr:last-child th:nth-child(even) {
                z-index: 11 !important;
                width: auto !important;
                min-width: auto !important;
                max-width: auto !important;
                background: rgba(118, 75, 162, 1);
            }

        /* FROZEN SECOND COLUMN - Total Students */
        .data-table thead tr th:nth-child(2),
        .data-table tbody tr td:nth-child(2) {
            position: sticky;
            left: 175px;
            z-index: 5;
            background: white; /* Solid background */
        }

        /* Make sure thead second column is above tbody */
        .data-table thead tr th:nth-child(2) {
            z-index: 15;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* Keep the gradient */
        }

        /* Optional: Add a shadow to show the frozen columns more clearly */
        .data-table thead tr th:nth-child(2),
        .data-table tbody tr td:nth-child(2) {
            box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1); /* Shadow on right edge */
        }

    /* Body styles */
    .data-table tbody tr {
        transition: all 0.2s;
    }

        .data-table tbody tr:hover {
            background: rgba(99, 102, 241, 0.05);
        }

    .data-table tbody td {
        padding: .5rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        font-size: 0.8rem;
    }

/* Smooth scrolling for table-body */
.table-body::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.table-body::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 4px;
}

    .table-body::-webkit-scrollbar-thumb:hover {
        background: rgba(102, 126, 234, 0.7);
    }

/* Smooth scrolling for table-wrapper (horizontal) */
.table-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 4px;
}

    .table-wrapper::-webkit-scrollbar-thumb:hover {
        background: rgba(102, 126, 234, 0.7);
    }

.borderEnd {
    border-right: 2px solid black !important;
}

.metric-cell {
    text-align: center;
    font-weight: 500;
    position: relative;
}

.metric-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    opacity: 0.3;
    transition: height 0.3s;
}

.metric-cell:hover .metric-bar {
    height: 100%;
    opacity: 0.1;
}

.threshold-veryLow {
    background: #FFE4E1;
    color: white;
    font-weight: 600;
}

.threshold-low {
    background: #FFFACD;
    color: black;
    font-weight: 600;
}

.threshold-inRange {
    background: #E6F3FF;
    color: black;
    font-weight: 600;
}

.threshold-high {
    background: #F0FFF0;
    color: white;
    font-weight: 600;
}

.threshold-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

    .threshold-badge.veryLow {
        background: var(--threshold-veryLow);
        color: black;
    }

    .threshold-badge.low {
        background: var(--threshold-low);
        color: black;
    }

    .threshold-badge.inRange {
        background: var(--threshold-inRange);
        color: black;
    }

    .threshold-badge.high {
        background: var(--threshold-high);
        color: black;
    }

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes drift {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .grade-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: 0.85rem;
    }

        .data-table thead th,
        .data-table tbody td {
            padding: 0.75rem 0.5rem;
        }
}

/* Progress bar enhancement */
.progress {
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #ffc107, #ff9800);
}

/* Optional: Adjust for very small screens (mobile) if you want 2x2 grid */
@media (max-width: 640px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
        gap: 1rem;
    }
}

/* Optional: Fine-tune for medium screens */
@media (min-width: 768px) and (max-width: 1024px) {
    .cards-grid {
        gap: 1rem; /* Slightly smaller gap on medium screens */
    }
}

/* Optional: Comfortable spacing on large screens */
@media (min-width: 1400px) {
    .cards-grid {
        gap: 2.5rem; /* More generous gap on large screens */
    }

    .stats-card {
        padding: 1.5rem;
    }
}

