/* 
 * ADMIN ADVANCED STATISTICS PANEL CSS
 * Kaasaegne, täiustatud statistika paneel administraatoritele
 */

/* ===== PÕHI STIILID ===== */
.admin-advanced-stats {
    padding: var(--spacing-8) 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--spacing-8);
    gap: var(--spacing-6);
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -30px;
    left: -30px;
    right: -30px;
    bottom: -20px;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.05) 0%, 
        rgba(139, 92, 246, 0.05) 50%, 
        rgba(16, 185, 129, 0.05) 100%);
    border-radius: 24px;
    z-index: -1;
}

.page-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    margin-bottom: var(--spacing-3);
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gray-900), var(--primary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-subtitle {
    color: var(--gray-600);
    font-size: 1.125rem;
    font-weight: 500;
    margin: 0;
}

.page-actions {
    display: flex;
    gap: var(--spacing-3);
    z-index: 1;
}

/* ===== TÄIUSTATUD FILTRID ===== */
.advanced-filters {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: var(--spacing-8);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-5) var(--spacing-6);
    background: linear-gradient(135deg, var(--gray-50), var(--primary-50));
    border-bottom: 1px solid var(--gray-200);
}

.filters-header h3 {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    margin: 0;
    font-weight: 600;
    color: var(--gray-800);
}

.btn-toggle {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.filters-form {
    padding: var(--spacing-6);
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease;
    opacity: 0;
}

.filters-form.expanded {
    max-height: 400px;
    opacity: 1;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-5);
    margin-bottom: var(--spacing-6);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
}

.filter-group label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select,
.filter-input {
    padding: var(--spacing-3) var(--spacing-4);
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    background: white;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.date-range {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
}

.date-separator {
    color: var(--gray-400);
    font-weight: 500;
}

.filters-actions {
    display: flex;
    gap: var(--spacing-3);
    justify-content: flex-end;
    padding-top: var(--spacing-4);
    border-top: 1px solid var(--gray-200);
}

/* ===== ÜLDSTATISTIKA DASHBOARD ===== */
.overview-dashboard {
    margin-bottom: var(--spacing-8);
}

.stats-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-6);
}

.stat-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: var(--spacing-6);
    border: 1px solid var(--gray-100);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card.primary .stat-icon { background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)); }
.stat-card.success .stat-icon { background: linear-gradient(135deg, var(--success-color), #047857); }
.stat-card.warning .stat-icon { background: linear-gradient(135deg, var(--warning-color), #d97706); }
.stat-card.info .stat-icon { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-bottom: var(--spacing-4);
    position: relative;
    overflow: hidden;
}

.stat-icon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s ease;
}

.stat-card:hover .stat-icon::after {
    transform: rotate(45deg) translateX(100%);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: var(--spacing-2);
    line-height: 1;
}

.stat-label {
    color: var(--gray-600);
    font-weight: 500;
    margin-bottom: var(--spacing-1);
    font-size: 0.875rem;
}

.stat-sublabel {
    color: var(--gray-500);
    font-size: 0.75rem;
    margin-bottom: var(--spacing-3);
}

.stat-trend {
    padding-top: var(--spacing-3);
    border-top: 1px solid var(--gray-100);
}

.trend-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.125rem;
}

.trend-label {
    color: var(--gray-500);
    font-size: 0.75rem;
    margin-left: var(--spacing-2);
}

/* ===== ANALÜÜSI KAARDID ===== */
.analysis-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--spacing-8);
    margin-bottom: var(--spacing-8);
}

.analysis-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid var(--gray-100);
}

.card-header {
    padding: var(--spacing-5) var(--spacing-6);
    background: linear-gradient(135deg, var(--gray-50), var(--primary-50));
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    margin: 0;
    font-weight: 600;
    color: var(--gray-800);
}

.header-actions {
    display: flex;
    gap: var(--spacing-2);
}

.metric-selector,
.sort-selector {
    padding: var(--spacing-2) var(--spacing-3);
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.75rem;
    background: white;
}

.card-content {
    padding: var(--spacing-6);
}

/* ===== DISTSIPLIINIDE ANALÜÜS ===== */
.disciplines-detailed {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-6);
}

.discipline-detailed-card {
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: var(--spacing-5);
    transition: all 0.3s ease;
    background: white;
}

.discipline-detailed-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.discipline-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
    margin-bottom: var(--spacing-4);
}

.discipline-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.discipline-detailed-card.koolisoit .discipline-icon { background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)); }
.discipline-detailed-card.takistussoit .discipline-icon { background: linear-gradient(135deg, var(--success-color), #047857); }
.discipline-detailed-card.kestvusratsutamine .discipline-icon { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.discipline-title h4 {
    margin: 0;
    font-weight: 600;
    color: var(--gray-900);
}

.discipline-subtitle {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.discipline-metrics {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3);
}

.metric-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-4);
}

.metric-row.special {
    background: var(--gray-50);
    padding: var(--spacing-3);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.metric {
    text-align: center;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--spacing-1);
}

.metric-label {
    color: var(--gray-600);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== VANUSEGRUPPIDE ANALÜÜS ===== */
.age-groups-analysis {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-5);
}

.age-group-detailed {
    padding: var(--spacing-4);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    background: var(--gray-50);
}

.age-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-3);
}

.age-group-header h4 {
    margin: 0;
    color: var(--gray-900);
    font-weight: 600;
}

.age-group-count {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.age-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-3);
    margin-bottom: var(--spacing-3);
}

.age-metric {
    text-align: center;
}

.age-progress-bar {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    transition: width 0.8s ease;
}

/* ===== TRENDIDE GRAAFIKUD ===== */
.trends-chart-container {
    background: var(--gray-50);
    border-radius: 12px;
    padding: var(--spacing-5);
}

.trends-chart {
    display: flex;
    align-items: end;
    gap: var(--spacing-3);
    height: 200px;
    margin-bottom: var(--spacing-4);
}

.month-trend-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-2);
    height: 100%;
}

.trend-bars {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: end;
    gap: 2px;
    position: relative;
}

.trend-bar {
    flex: 1;
    min-height: 4px;
    border-radius: 2px 2px 0 0;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.trend-bar:hover {
    transform: scaleY(1.1);
    filter: brightness(1.1);
}

.trend-bar.results { background: linear-gradient(to top, var(--primary-color), var(--primary-light)); }
.trend-bar.athletes { background: linear-gradient(to top, var(--success-color), #10b981); }
.trend-bar.points { background: linear-gradient(to top, var(--warning-color), #f59e0b); }

.month-label {
    font-size: 0.75rem;
    color: var(--gray-600);
    font-weight: 600;
    text-align: center;
}

.month-stats {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-1);
    text-align: center;
}

.month-stat {
    font-size: 0.65rem;
    color: var(--gray-500);
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: var(--spacing-4);
    margin-top: var(--spacing-4);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    font-size: 0.75rem;
    color: var(--gray-600);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

.legend-color.results { background: var(--primary-color); }
.legend-color.athletes { background: var(--success-color); }
.legend-color.points { background: var(--warning-color); }

/* ===== TOP SPORTLASED ===== */
.top-athletes-section {
    margin-bottom: var(--spacing-8);
}

.section-header {
    margin-bottom: var(--spacing-6);
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.top-athletes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--spacing-6);
}

.top-athletes-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid var(--gray-100);
}

.top-athletes-card .card-header {
    background: linear-gradient(135deg, var(--gray-50), var(--primary-50));
}

.discipline-badge {
    padding: var(--spacing-2) var(--spacing-3);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.discipline-badge.koolisoit { background: var(--primary-color); }
.discipline-badge.takistussoit { background: var(--success-color); }
.discipline-badge.kestvusratsutamine { background: #8b5cf6; }

.athletes-ranking {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3);
}

.athlete-rank-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
    padding: var(--spacing-4);
    border-radius: 10px;
    transition: all 0.3s ease;
    background: var(--gray-50);
}

.athlete-rank-item.podium {
    background: linear-gradient(135deg, #fff7ed, #fef3c7);
    border: 1px solid #f59e0b;
}

.athlete-rank-item:hover {
    transform: translateX(4px);
    background: var(--primary-50);
}

.rank-position {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    background: white;
    border: 2px solid var(--gray-200);
}

.rank-position .icon-crown.gold { color: #fbbf24; }
.rank-position .icon-award.silver { color: #9ca3af; }
.rank-position .icon-award.bronze { color: #cd7c2f; }

.rank-number {
    color: var(--gray-600);
    font-weight: 700;
}

.athlete-info {
    flex: 1;
}

.athlete-name {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--spacing-1);
}

.athlete-stats {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-1);
}

.stat {
    font-size: 0.75rem;
    color: var(--gray-600);
}

.athlete-best {
    text-align: center;
    min-width: 80px;
}

.best-result {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.best-label {
    font-size: 0.65rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.special-metric {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-top: var(--spacing-1);
}

/* ===== VÕISTLUSTE ANALÜÜS ===== */
.competitions-analysis {
    margin-bottom: var(--spacing-8);
}

.competitions-table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
}

.competitions-analysis-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 1000px;
}

.competitions-analysis-table th {
    background: var(--gray-50);
    padding: var(--spacing-4);
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
    border-bottom: 2px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 10;
}

.competitions-analysis-table td {
    padding: var(--spacing-4);
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.competitions-analysis-table tr:hover {
    background: var(--gray-50);
}

.competition-name .comp-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--spacing-1);
}

.competition-name .comp-location {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.competition-date {
    font-size: 0.875rem;
    color: var(--gray-700);
    white-space: nowrap;
}

.discipline-tag {
    display: inline-block;
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    color: white;
    margin-right: var(--spacing-1);
    margin-bottom: var(--spacing-1);
}

.discipline-tag.koolisoit { background: var(--primary-color); }
.discipline-tag.takistussoit { background: var(--success-color); }
.discipline-tag.kestvusratsutamine { background: #8b5cf6; }

.participants-count .count-main,
.finished-count .count-main {
    font-weight: 600;
    color: var(--gray-900);
}

.count-unique,
.count-percentage {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.avg-points,
.best-result {
    font-weight: 600;
    color: var(--primary-color);
}

.efficiency {
    min-width: 100px;
}

.efficiency-bar {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: var(--spacing-1);
}

.efficiency-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), #10b981);
    transition: width 0.8s ease;
}

.efficiency-text {
    font-size: 0.75rem;
    color: var(--gray-600);
    text-align: center;
}

/* ===== PUNKTIDE JAOTUS ===== */
.points-distribution-section {
    margin-bottom: var(--spacing-8);
}

.points-distribution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-6);
}

.distribution-card {
    background: var(--gray-50);
    border-radius: 12px;
    padding: var(--spacing-5);
    border: 1px solid var(--gray-200);
}

.distribution-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-4);
}

.distribution-header h4 {
    margin: 0;
    color: var(--gray-900);
    font-weight: 600;
}

.total-results {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.distribution-chart {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3);
}

.distribution-bar {
    background: white;
    border-radius: 8px;
    padding: var(--spacing-3);
    border: 1px solid var(--gray-200);
}

.bar-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-2);
}

.range-label {
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.range-count {
    font-size: 0.75rem;
    color: var(--gray-600);
}

.bar-container {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: var(--spacing-2);
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    transition: width 0.8s ease;
}

.unique-athletes {
    font-size: 0.65rem;
    color: var(--gray-500);
    text-align: right;
}

/* ===== REKORDID ===== */
.records-section {
    margin-bottom: var(--spacing-8);
}

.records-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-6);
}

.record-card {
    background: white;
    border-radius: 12px;
    padding: var(--spacing-6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-200);
    text-align: center;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.record-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.record-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto var(--spacing-4);
}

.record-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--spacing-2);
}

.record-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: var(--spacing-3);
}

.record-athlete {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--spacing-2);
}

.record-details {
    border-top: 1px solid var(--gray-200);
    padding-top: var(--spacing-3);
}

.record-competition {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: var(--spacing-1);
}

.record-date {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* ===== VÕRDLUS EELMISE AASTAGA ===== */
.comparison-section {
    margin-bottom: var(--spacing-8);
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-5);
}

.comparison-metric {
    text-align: center;
    padding: var(--spacing-4);
    background: var(--gray-50);
    border-radius: 10px;
    border: 1px solid var(--gray-200);
}

.metric-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--spacing-2);
    font-size: 0.875rem;
}

.metric-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    margin-bottom: var(--spacing-2);
}

.current-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.change-indicator {
    display: flex;
    align-items: center;
    gap: var(--spacing-1);
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.change-indicator.positive {
    background: var(--success-light);
    color: var(--success-color);
}

.change-indicator.negative {
    background: var(--danger-light);
    color: var(--danger-color);
}

.previous-value {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* ===== KOKKUVÕTE ===== */
.summary-section {
    margin-bottom: var(--spacing-8);
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-6);
}

.summary-highlights,
.summary-insights {
    background: var(--gray-50);
    padding: var(--spacing-5);
    border-radius: 12px;
    border: 1px solid var(--gray-200);
}

.summary-highlights h4,
.summary-insights h4 {
    margin: 0 0 var(--spacing-4);
    color: var(--gray-900);
    font-weight: 600;
}

.highlights-list,
.insights-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.highlights-list li,
.insights-list li {
    padding: var(--spacing-2) 0;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
    line-height: 1.5;
}

.highlights-list li:last-child,
.insights-list li:last-child {
    border-bottom: none;
}

.highlights-list strong,
.insights-list strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* ===== UTILITY CLASSES ===== */
.no-data {
    text-align: center;
    padding: var(--spacing-12) var(--spacing-6);
    color: var(--gray-500);
}

.no-data i {
    font-size: 3rem;
    margin-bottom: var(--spacing-4);
    opacity: 0.5;
}

.no-data p {
    margin: 0;
    font-size: 1rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .top-athletes-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-advanced-stats {
        padding: var(--spacing-4) 0;
    }
    
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-4);
        text-align: center;
    }
    
    .page-title {
        font-size: 1.875rem;
    }
    
    .stats-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-4);
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-actions {
        flex-direction: column;
    }
    
    .disciplines-detailed {
        gap: var(--spacing-4);
    }
    
    .metric-row {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-3);
    }
    
    .age-metrics {
        grid-template-columns: 1fr;
    }
    
    .trends-chart {
        height: 150px;
        gap: var(--spacing-2);
    }
    
    .month-stats {
        display: none;
    }
    
    .athlete-rank-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-2);
    }
    
    .competitions-table-container {
        font-size: 0.875rem;
    }
    
    .competitions-analysis-table th,
    .competitions-analysis-table td {
        padding: var(--spacing-2);
    }
    
    .points-distribution-grid {
        grid-template-columns: 1fr;
    }
    
    .records-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.5rem;
    }
    
    .stats-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .metric-row {
        grid-template-columns: 1fr;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-legend {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-2);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .page-actions,
    .filters-section,
    .header-actions,
    .btn,
    .btn-toggle {
        display: none !important;
    }
    
    .admin-advanced-stats {
        background: white !important;
        padding: 0 !important;
    }
    
    .analysis-card,
    .stat-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }
    
    .page-header::before {
        display: none !important;
    }
    
    .page-title {
        color: black !important;
        background: none !important;
        -webkit-text-fill-color: initial !important;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes countUp {
    from { opacity: 0; }
    to { opacity: 1; }
}

.stat-number {
    animation: countUp 0.8s ease-out;
}

.record-card {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .stat-card:hover,
    .record-card:hover,
    .discipline-detailed-card:hover {
        transform: none !important;
    }
}

/* ===== FOCUS STYLES ===== */
.btn:focus,
.filter-select:focus,
.filter-input:focus,
.metric-selector:focus,
.sort-selector:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== TOOLTIPS ===== */
.chart-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===== CUSTOM SCROLLBAR ===== */
.user-menu-dropdown::-webkit-scrollbar,
.trends-chart-container::-webkit-scrollbar,
.competitions-table-container::-webkit-scrollbar {
    width: 6px;
}

.user-menu-dropdown::-webkit-scrollbar-track,
.trends-chart-container::-webkit-scrollbar-track,
.competitions-table-container::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

.user-menu-dropdown::-webkit-scrollbar-thumb,
.trends-chart-container::-webkit-scrollbar-thumb,
.competitions-table-container::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 3px;
}

.user-menu-dropdown::-webkit-scrollbar-thumb:hover,
.trends-chart-container::-webkit-scrollbar-thumb:hover,
.competitions-table-container::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.stat-card,
.analysis-card,
.discipline-detailed-card,
.record-card {
    will-change: transform;
    backface-visibility: hidden;
}

.trend-bar,
.chart-bar,
.bar-fill,
.efficiency-fill,
.progress-fill {
    will-change: width, height;
}

/* ===== PUNKTIDE SELGITUSE STIILID ===== */
.range-title {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.875rem;
    margin-bottom: 2px;
}

.range-explanation {
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 2px;
    font-style: italic;
}

.range-stats {
    color: var(--gray-600);
    font-size: 0.7rem;
    font-weight: 500;
}

/* ===== HIGH CONTRAST MODE SUPPORT ===== */
@media (prefers-contrast: high) {
    .stat-card,
    .analysis-card {
        border: 2px solid var(--gray-800);
    }
    
    .discipline-badge,
    .discipline-tag {
        border: 1px solid currentColor;
    }
    
    .chart-bar,
    .trend-bar {
        border: 1px solid var(--gray-800);
    }
}

/* ===== FINAL UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: var(--spacing-2) !important; }
.mb-4 { margin-bottom: var(--spacing-4) !important; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

.pointer-events-none { pointer-events: none; }
.cursor-pointer { cursor: pointer; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* ===== END OF CSS FILE ===== */