/* REPORTS SPECIFIC STYLES - MATCHING DASHBOARD DESIGN */

:root {
    /* Dashboard-aligned palette */
    --report-bg: #F2F4F7;
    /* Matching --bg-app */
    --report-surface: #FFFFFF;
    /* Matching --bg-panel */
    --report-text-main: #111827;
    /* Matching --text-main */
    --report-text-muted: #6B7280;
    /* Matching --text-secondary */

    /* UKS Delfin Blue Accents */
    --uks-blue-50: #F0F9FF;
    --uks-blue-100: #E0F2FE;
    --uks-blue-500: #0EA5E9;
    --uks-blue-600: #0284C7;

    /* Shadows matching dashboard */
    --shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-blue: 0 4px 20px -2px rgba(14, 165, 233, 0.15);

    /* Radius matching dashboard */
    --radius-lg: 20px;
}

/* Dark Mode Overrides for Reports */
body.theme-dark {
    --report-bg: #0f172a;
    --report-surface: #1e293b;
    --report-text-main: #f1f5f9;
    --report-text-muted: #94a3b8;

    /* Adjust Accents */
    --uks-blue-50: #1e293b;
    --uks-blue-100: #334155;
    --uks-blue-500: #38bdf8;
    --uks-blue-600: #7dd3fc;

    --shadow-soft: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
}

.reports-admin-page {
    padding: 2rem;
    max-width: 1400px;
    /* LIMITED WIDTH like dashboard */
    margin: 0 auto;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--report-bg);
    min-height: calc(100vh - 64px);
    /* Account for header */
}

/* PAGE HEADER - matching dashboard cards */
.reports-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--report-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--uks-blue-50);
}

.reports-header-content h1 {
    font-size: 1.75rem;
    /* Smaller than 2.5rem */
    font-weight: 700;
    color: var(--uks-blue-600);
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.01em;
}

.reports-header-content p {
    font-size: 0.95rem;
    color: var(--report-text-muted);
    margin: 0;
    font-weight: 500;
}

.reports-header-actions {
    display: flex;
    gap: 0.75rem;
}

/* Buttons matching dashboard style */
.reports-header-actions .btn {
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.reports-header-actions .btn-primary {
    background: var(--uks-blue-500);
    color: white;
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.2);
}

.reports-header-actions .btn-primary:hover {
    background: var(--uks-blue-600);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.25);
}

.reports-header-actions .btn-secondary {
    background: var(--uks-blue-50);
    color: var(--uks-blue-600);
    border: 1px solid var(--uks-blue-200);
}

.reports-header-actions .btn-secondary:hover {
    background: var(--uks-blue-100);
    border-color: var(--uks-blue-300);
}

/* KPI CARDS GRID - matching stat cards */
.reports-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    /* Smaller min-width */
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.reports-kpi-card {
    background: var(--report-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    /* Reduced padding */
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--uks-blue-50);
    height: 100%;
}

.reports-kpi-card:hover {
    transform: translateY(-2px);
    /* Reduced hover lift */
    box-shadow: var(--shadow-hover);
    border-color: var(--uks-blue-200);
}

/* Category indicators as subtle left border */
.reports-kpi-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--uks-blue-300), var(--uks-blue-500));
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.reports-kpi-primary::before {
    background: linear-gradient(to bottom, #3B82F6, #2563EB);
}

.reports-kpi-success::before {
    background: linear-gradient(to bottom, #10B981, #059669);
}

.reports-kpi-info::before {
    background: linear-gradient(to bottom, #0EA5E9, #0284C7);
}

.reports-kpi-warning::before {
    background: linear-gradient(to bottom, #F59E0B, #D97706);
}

.reports-kpi-danger::before {
    background: linear-gradient(to bottom, #EF4444, #DC2626);
}

.reports-kpi-icon {
    font-size: 1.25rem;
    /* Smaller icons */
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: var(--uks-blue-50);
    color: var(--uks-blue-500);
}

.reports-kpi-value {
    font-size: 1.75rem;
    /* Smaller value */
    font-weight: 700;
    color: var(--report-text-main);
    margin-bottom: 0.25rem;
    line-height: 1;
}

.reports-kpi-label {
    font-size: 0.85rem;
    color: var(--report-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
}

/* Trend indicator - dashboard style */
.reports-kpi-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    background: var(--uks-blue-50);
    color: var(--uks-blue-600);
}

.trend-positive {
    background: #ECFDF5;
    color: #047857;
}

.trend-negative {
    background: #FEF2F2;
    color: #B91C1C;
}

.trend-warning {
    background: #FFFBEB;
    color: #B45309;
}

/* CHARTS SECTION - compact */
.reports-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    /* Smaller min-width */
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.reports-chart-card {
    background: var(--report-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--uks-blue-50);
}

.reports-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.reports-chart-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--report-text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reports-chart-subtitle {
    font-size: 0.85rem;
    color: var(--report-text-muted);
}

.reports-chart-container {
    height: 250px;
    /* Reduced height */
    width: 100%;
    position: relative;
}

/* Stats Lists - compact design */
.reports-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    /* Smaller min-width */
    gap: 1.5rem;
}

.reports-stats-card {
    background: var(--report-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--uks-blue-50);
}

.reports-stats-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--uks-blue-50);
    color: var(--report-text-main);
}

.reports-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #F8FAFC;
}

.reports-stat-item:hover {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    background: var(--uks-blue-50);
    border-radius: 8px;
}

.reports-stat-label {
    font-weight: 500;
    color: var(--report-text-muted);
    font-size: 0.9rem;
}

.reports-stat-value {
    font-weight: 600;
    color: var(--report-text-main);
    background: var(--uks-blue-50);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Progress Bars - dashboard style */
.reports-progress-item {
    margin-bottom: 1rem;
}

.reports-progress-bar {
    height: 8px;
    background: var(--uks-blue-100);
    border-radius: 10px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.reports-progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-out;
    background: linear-gradient(90deg, var(--uks-blue-300), var(--uks-blue-500));
}

/* Gender Stats - matching dashboard badges */
.reports-gender-stats {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.reports-gender-stat {
    background: var(--uks-blue-50);
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--uks-blue-600);
    border: 1px solid var(--uks-blue-200);
}

/* Filter Section - matching dashboard filters */
.reports-filters {
    background: var(--report-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--uks-blue-50);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .reports-admin-page {
        padding: 1rem;
        max-width: 100%;
        /* Full width on mobile */
    }

    .reports-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .reports-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .reports-charts-grid {
        grid-template-columns: 1fr;
    }

    .reports-kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .reports-kpi-value {
        font-size: 1.5rem;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .reports-admin-page {
        max-width: 95%;
        padding: 1.5rem;
    }

    .reports-charts-grid {
        grid-template-columns: 1fr;
    }
}

/* Print styles */
@media print {
    .reports-admin-page {
        max-width: 100%;
        padding: 0;
        background: white;
    }

    .reports-page-header,
    .reports-kpi-card,
    .reports-chart-card,
    .reports-stats-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}