/* ========================================
   FIFA-Style Student Cards
   ======================================== */

/* Base Card - Bronze (Default) */
.student-card {
    position: relative;
    background: linear-gradient(145deg, #5d4e37 0%, #3d3225 40%, #4a3c2a 60%, #2d2418 100%);
    border-radius: var(--radius-lg);
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    min-height: 400px;
    border: 1px solid rgba(139, 90, 43, 0.4);
}

.student-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(205, 133, 63, 0.15) 0%,
        transparent 40%,
        rgba(139, 90, 43, 0.1) 100%);
    pointer-events: none;
}

.student-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(139, 90, 43, 0.25);
}

/* ====== DIAMOND Card - 90+ (Brilliant) ====== */
.student-card.rank-diamond {
    background: linear-gradient(145deg, #0c0e1a 0%, #0a0c18 30%, #10132a 50%, #080a14 70%, #0e1025 100%);
    border: 2px solid transparent;
    border-image: linear-gradient(135deg,
        rgba(185, 242, 255, 0.8),
        rgba(140, 180, 255, 0.4),
        rgba(220, 200, 255, 0.8),
        rgba(140, 220, 255, 0.4),
        rgba(185, 242, 255, 0.8)) 1;
    box-shadow:
        0 6px 25px rgba(0, 0, 0, 0.4),
        0 0 25px rgba(140, 220, 255, 0.2),
        0 0 50px rgba(180, 160, 255, 0.1),
        0 0 80px rgba(140, 220, 255, 0.05),
        inset 0 0 40px rgba(140, 200, 255, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Diamond facet reflections */
.student-card.rank-diamond::before {
    background:
        linear-gradient(135deg,
            rgba(185, 242, 255, 0.12) 0%,
            transparent 20%,
            rgba(200, 180, 255, 0.06) 35%,
            transparent 50%,
            rgba(140, 230, 255, 0.08) 65%,
            transparent 80%,
            rgba(220, 200, 255, 0.1) 100%),
        radial-gradient(ellipse at 20% 20%, rgba(185, 242, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(200, 180, 255, 0.06) 0%, transparent 50%);
}

/* Prismatic shimmer sweep */
.student-card.rank-diamond::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 80%;
    height: 100%;
    background: linear-gradient(
        100deg,
        transparent 0%,
        rgba(255, 255, 255, 0.02) 15%,
        rgba(185, 242, 255, 0.08) 30%,
        rgba(220, 200, 255, 0.15) 45%,
        rgba(185, 242, 255, 0.12) 50%,
        rgba(140, 255, 220, 0.08) 55%,
        rgba(200, 180, 255, 0.06) 70%,
        rgba(255, 255, 255, 0.02) 85%,
        transparent 100%
    );
    animation: diamondShimmer 5s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes diamondShimmer {
    0% { left: -150%; opacity: 0; }
    10% { opacity: 1; }
    50% { left: 150%; opacity: 1; }
    60% { opacity: 0; }
    100% { left: 150%; opacity: 0; }
}

.student-card.rank-diamond:hover {
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.4),
        0 0 35px rgba(140, 220, 255, 0.35),
        0 0 70px rgba(180, 160, 255, 0.2),
        0 0 100px rgba(140, 220, 255, 0.1),
        inset 0 0 60px rgba(140, 200, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-image: linear-gradient(135deg,
        rgba(185, 242, 255, 1),
        rgba(160, 200, 255, 0.6),
        rgba(230, 210, 255, 1),
        rgba(160, 240, 255, 0.6),
        rgba(185, 242, 255, 1)) 1;
}

/* Diamond rating - prismatic gradient text */
.student-card.rank-diamond .overall-rating {
    background: linear-gradient(135deg, #e8faff 0%, #b9f2ff 20%, #d0c0ff 40%, #b9f2ff 60%, #e8faff 80%, #d0c0ff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: diamondTextShift 4s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(185, 242, 255, 0.5)) drop-shadow(0 0 4px rgba(200, 180, 255, 0.3));
}

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

.student-card.rank-diamond .position-badge {
    color: #b9f2ff;
    text-shadow: 0 0 12px rgba(185, 242, 255, 0.4);
}

.student-card.rank-diamond .class-badge {
    background: rgba(185, 242, 255, 0.08);
    border-color: rgba(185, 242, 255, 0.3);
    color: #b9f2ff;
    box-shadow: 0 0 10px rgba(185, 242, 255, 0.08);
}

.student-card.rank-diamond .photo-container {
    border-color: rgba(185, 242, 255, 0.6);
    box-shadow:
        0 0 20px rgba(185, 242, 255, 0.25),
        0 0 40px rgba(180, 160, 255, 0.1),
        0 4px 16px rgba(0, 0, 0, 0.3);
}

.student-card.rank-diamond .card-name {
    background: linear-gradient(90deg, transparent, rgba(185, 242, 255, 0.06), transparent);
}

.student-card.rank-diamond .student-name {
    color: #e8faff;
    text-shadow: 0 0 8px rgba(185, 242, 255, 0.2);
}

.student-card.rank-diamond .card-stats {
    background: rgba(8, 10, 20, 0.5);
    border-top: 1px solid rgba(185, 242, 255, 0.08);
    border-bottom: 1px solid rgba(185, 242, 255, 0.08);
}

.student-card.rank-diamond .card-footer {
    border-top-color: rgba(185, 242, 255, 0.12);
}

.student-card.rank-diamond .mini-stat-value {
    color: #b9f2ff;
    text-shadow: 0 0 6px rgba(185, 242, 255, 0.2);
}

/* Gold Card - 80-89 */
.student-card.rank-gold {
    background: linear-gradient(145deg, #5c4a1f 0%, #3d3010 40%, #4a3a15 60%, #2d2008 100%);
    border: 2px solid rgba(201, 162, 39, 0.6);
}

.student-card.rank-gold::before {
    background: linear-gradient(135deg,
        rgba(201, 162, 39, 0.2) 0%,
        transparent 40%,
        rgba(184, 134, 11, 0.15) 100%);
}

.student-card.rank-gold:hover {
    box-shadow: 0 15px 40px rgba(201, 162, 39, 0.3);
}

/* Silver Card - 60-79 */
.student-card.rank-silver {
    background: linear-gradient(145deg, #4a4f54 0%, #2d3236 40%, #3a3f44 60%, #1e2225 100%);
    border: 2px solid rgba(168, 168, 168, 0.5);
}

.student-card.rank-silver::before {
    background: linear-gradient(135deg,
        rgba(168, 168, 168, 0.15) 0%,
        transparent 40%,
        rgba(112, 128, 144, 0.1) 100%);
}

.student-card.rank-silver:hover {
    box-shadow: 0 15px 40px rgba(168, 168, 168, 0.2);
}

/* Bronze Card - below 60 */
.student-card.rank-bronze {
    background: linear-gradient(145deg, #5d4037 0%, #3e2723 40%, #4e342e 60%, #2d1f1a 100%);
    border: 2px solid rgba(160, 82, 45, 0.5);
}

.student-card.rank-bronze::before {
    background: linear-gradient(135deg,
        rgba(160, 82, 45, 0.15) 0%,
        transparent 40%,
        rgba(139, 69, 19, 0.1) 100%);
}

.student-card.rank-bronze:hover {
    box-shadow: 0 15px 40px rgba(160, 82, 45, 0.2);
}

/* Card Header */
.card-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--spacing-md);
    z-index: 2;
}

.card-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.overall-rating {
    font-family: 'Oswald', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(180deg, #ffffff 0%, #aaaaaa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.position-badge {
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: var(--spacing-xs);
}

.class-badge {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid var(--accent-gold);
    border-radius: var(--radius-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    color: var(--accent-gold);
}

/* Card Photo */
.card-photo {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-md) 0;
    margin-top: -20px;
}

.photo-container {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.student-card:hover .photo-container img {
    transform: scale(1.1);
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--accent-gold);
}

/* Card Name */
.card-name {
    text-align: center;
    padding: var(--spacing-sm) var(--spacing-md);
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
}

.student-name {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mentor-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Card Stats Grid */
.card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: var(--spacing-md);
    background: rgba(0, 0, 0, 0.2);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
}

.stat-value {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
}

.stat-value.excellent { color: var(--rating-excellent); }
.stat-value.good { color: var(--rating-good); }
.stat-value.average { color: var(--rating-average); }
.stat-value.below { color: var(--rating-below); }
.stat-value.poor { color: var(--rating-poor); }

.stat-delta {
    font-size: 0.65rem;
    font-weight: 500;
    margin-left: 2px;
    vertical-align: super;
    font-family: 'Roboto', sans-serif;
}
.stat-delta.delta-up { color: #22c55e; }
.stat-delta.delta-down { color: #ef4444; }
.stat-delta.delta-zero { color: #94a3b8; }

.stat-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

.stat-ranks {
    font-size: 0.6rem;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    line-height: 1.2;
}

.stat-ranks .rank-class {
    color: var(--accent-gold, #ffd700);
}

.stat-ranks .rank-school {
    color: var(--text-muted, rgba(255,255,255,0.5));
}

/* Card Footer - Mini Stats */
.card-footer {
    display: flex;
    justify-content: space-around;
    padding: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mini-stat {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.8rem;
}

.mini-stat-icon {
    font-size: 1rem;
}

.mini-stat-value {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    color: var(--accent-gold);
}

/* ========================================
   Psychometry Cards
   ======================================== */

.psychometry-card {
    background: linear-gradient(145deg, #1a1a3e 0%, #0d0d2a 50%, #1a1a3e 100%);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(100, 100, 255, 0.2);
}

.psychometry-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(100, 100, 255, 0.2);
}

.psychometry-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
}

.psychometry-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent-blue);
}

.psychometry-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.psychometry-info {
    flex: 1;
}

.psychometry-info h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.mbti-badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: linear-gradient(135deg, #4a90d9, #2d5aa0);
    border-radius: var(--radius-sm);
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.mbti-title {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.psychometry-body {
    padding: var(--spacing-md);
}

.intelligence-chart {
    width: 100%;
    height: 200px;
    margin-bottom: var(--spacing-md);
}

.intelligence-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
}

.intel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
}

.intel-icon {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.intel-value {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
}

.intel-label {
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Gallup Section in Psychometry Cards */
.gallup-section {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.gallup-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.gallup-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.4);
}

/* ========================================
   Reading Stats Cards
   ======================================== */

/* ========================================
   Reading Stats - Clean Table Design
   ======================================== */

.reading-summary-bar {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--secondary-color);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
}

.summary-item {
    text-align: center;
}

.summary-item .summary-value {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent-green);
}

.summary-item .summary-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.reading-table-container {
    background: var(--secondary-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.reading-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.reading-table thead {
    background: rgba(0, 0, 0, 0.3);
}

.reading-table th {
    padding: 16px 12px;
    text-align: center;
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.reading-table th.student-col {
    text-align: left;
    width: 250px;
}

.reading-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
    cursor: pointer;
}

.reading-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.reading-table td {
    padding: 12px;
    text-align: center;
    vertical-align: middle;
}

.reading-table td.student-col {
    text-align: left;
}

/* Performance Badge */
.performance-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 600;
}

.performance-badge.perf-excellent {
    color: #27ae60;
    background: rgba(39, 174, 96, 0.2);
}

.performance-badge.perf-good {
    color: #58d68d;
    background: rgba(88, 214, 141, 0.2);
}

.performance-badge.perf-average {
    color: #f4d03f;
    background: rgba(244, 208, 63, 0.2);
}

.performance-badge.perf-below {
    color: #e67e22;
    background: rgba(230, 126, 34, 0.2);
}

.performance-badge.perf-poor {
    color: #c0392b;
    background: rgba(192, 57, 43, 0.2);
}

/* Pages Value */
.pages-value {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Level Badge */
.level-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
}

.level-badge.level-mastery {
    color: #9b59b6;
    background: rgba(155, 89, 182, 0.2);
}

.level-badge.level-advanced {
    color: #27ae60;
    background: rgba(39, 174, 96, 0.2);
}

.level-badge.level-intermediate {
    color: #f4d03f;
    background: rgba(244, 208, 63, 0.2);
}

.level-badge.level-beginner {
    color: #e67e22;
    background: rgba(230, 126, 34, 0.2);
}

/* League Badge */
.league-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
}

.league-badge.league-gold {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.4);
}

.league-badge.league-silver {
    color: #c0c0c0;
    background: rgba(192, 192, 192, 0.2);
    border: 1px solid rgba(192, 192, 192, 0.4);
}

.league-badge.league-bronze {
    color: #cd7f32;
    background: rgba(205, 127, 50, 0.2);
    border: 1px solid rgba(205, 127, 50, 0.4);
}

.league-badge.league-wooden {
    color: #8b4513;
    background: rgba(139, 69, 19, 0.2);
    border: 1px solid rgba(139, 69, 19, 0.4);
}

/* Reading Score */
.reading-score {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 600;
}

/* Genres and Language values */
.genres-value,
.language-value {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.level-badge.level-n\/a {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.1);
}

/* Understanding Cell */
.understanding-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.understanding-bar {
    width: 60px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.understanding-fill {
    height: 100%;
    background: var(--accent-green);
    border-radius: 4px;
}

/* League Progression Indicator - New Design */
.league-progression-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 140px;
}

/* League label with emoji and text */
.league-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.league-emoji {
    font-size: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

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

.league-name {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.league-level {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* League colors - progressively brighter */
/* Wooden - темный коричневый */
.league-progression-container[data-league="wooden"] .league-name {
    color: #a0522d;
    text-shadow: 0 0 8px rgba(160, 82, 45, 0.4);
}
.league-progression-container[data-league="wooden"] .league-level {
    background: rgba(160, 82, 45, 0.3);
    color: #c4814a;
}

/* Bronze - яркий бронзовый */
.league-progression-container[data-league="bronze"] .league-name {
    color: #e8a54b;
    text-shadow: 0 0 10px rgba(232, 165, 75, 0.5);
}
.league-progression-container[data-league="bronze"] .league-level {
    background: rgba(232, 165, 75, 0.3);
    color: #f0b860;
}

/* Silver - яркий серебро */
.league-progression-container[data-league="silver"] .league-name {
    color: #d0d0d0;
    text-shadow: 0 0 12px rgba(208, 208, 208, 0.6);
}
.league-progression-container[data-league="silver"] .league-level {
    background: rgba(208, 208, 208, 0.3);
    color: #e8e8e8;
}

/* Gold - яркое золото */
.league-progression-container[data-league="gold"] .league-name {
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
}
.league-progression-container[data-league="gold"] .league-level {
    background: rgba(255, 215, 0, 0.3);
    color: #ffe44d;
}

/* Platinum - сияющий платиновый */
.league-progression-container[data-league="platinum"] .league-name {
    color: #f0f0f0;
    text-shadow: 0 0 20px rgba(240, 240, 240, 0.9), 0 0 30px rgba(200, 230, 255, 0.5);
}
.league-progression-container[data-league="platinum"] .league-level {
    background: rgba(240, 240, 240, 0.3);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(200, 230, 255, 0.4);
}

/* League Multi-Bar - Shows all leagues with their colors */
.league-multi-bar {
    display: flex;
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    gap: 2px;
}

.league-section {
    flex: 1;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.league-section-fill {
    height: 100%;
    transition: width 0.5s ease-out;
    position: relative;
}

/* Wooden - темный коричневый */
.league-section[data-league="wooden"] {
    background: rgba(139, 69, 19, 0.15);
}
.league-section[data-league="wooden"] .league-section-fill {
    background: linear-gradient(90deg, #5c3010, #8b4513, #a0522d);
}
.league-section.passed[data-league="wooden"] .league-section-fill,
.league-section.current[data-league="wooden"] .league-section-fill {
    box-shadow: 0 0 8px rgba(139, 69, 19, 0.6);
}

/* Bronze - яркий бронзовый */
.league-section[data-league="bronze"] {
    background: rgba(205, 127, 50, 0.15);
}
.league-section[data-league="bronze"] .league-section-fill {
    background: linear-gradient(90deg, #b87333, #cd7f32, #e8a54b);
}
.league-section.passed[data-league="bronze"] .league-section-fill,
.league-section.current[data-league="bronze"] .league-section-fill {
    box-shadow: 0 0 10px rgba(232, 165, 75, 0.7);
}

/* Silver - яркое серебро */
.league-section[data-league="silver"] {
    background: rgba(192, 192, 192, 0.15);
}
.league-section[data-league="silver"] .league-section-fill {
    background: linear-gradient(90deg, #a8a8a8, #c0c0c0, #e0e0e0);
}
.league-section.passed[data-league="silver"] .league-section-fill,
.league-section.current[data-league="silver"] .league-section-fill {
    box-shadow: 0 0 12px rgba(224, 224, 224, 0.8);
}

/* Gold - сияющее золото */
.league-section[data-league="gold"] {
    background: rgba(255, 215, 0, 0.15);
}
.league-section[data-league="gold"] .league-section-fill {
    background: linear-gradient(90deg, #daa520, #ffd700, #ffe44d);
}
.league-section.passed[data-league="gold"] .league-section-fill,
.league-section.current[data-league="gold"] .league-section-fill {
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.9);
}

/* Platinum - максимальное сияние */
.league-section[data-league="platinum"] {
    background: rgba(255, 255, 255, 0.15);
}
.league-section[data-league="platinum"] .league-section-fill {
    background: linear-gradient(90deg, #e0e0e0, #f0f0f0, #ffffff);
}
.league-section.passed[data-league="platinum"] .league-section-fill,
.league-section.current[data-league="platinum"] .league-section-fill {
    box-shadow: 0 0 20px rgba(255, 255, 255, 1), 0 0 30px rgba(200, 230, 255, 0.6);
}

/* Future leagues - dimmed */
.league-section.future {
    opacity: 0.4;
}

/* Current league pulse animation */
.league-section.current .league-section-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: sectionShimmer 2s ease-in-out infinite;
}

@keyframes sectionShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

/* Hover effects */
.league-section:hover {
    transform: scaleY(1.2);
    z-index: 1;
    transform: scale(1.2);
}

.understanding-cell span {
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 35px;
}

/* Trend Badge */
.trend-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.trend-badge.trend-up {
    color: #27ae60;
    background: rgba(39, 174, 96, 0.2);
}

.trend-badge.trend-down {
    color: #c0392b;
    background: rgba(192, 57, 43, 0.2);
}

.trend-badge.trend-stable {
    color: #f4d03f;
    background: rgba(244, 208, 63, 0.2);
}

/* Responsive */
@media (max-width: 1000px) {
    .reading-table-container {
        overflow-x: auto;
    }

    .reading-table {
        min-width: 700px;
    }

    .reading-summary-bar {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
}

/* ========================================
   Academic Cards
   ======================================== */

/* ========================================
   Academic Stats - Clean Table Design
   ======================================== */

.academic-table-container {
    background: var(--secondary-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.academic-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.academic-table thead {
    background: rgba(0, 0, 0, 0.3);
}

.academic-table th {
    padding: 16px 12px;
    text-align: center;
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.academic-table th.student-col {
    text-align: left;
    width: 250px;
}

.academic-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
    cursor: pointer;
}

.academic-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.academic-table td {
    padding: 12px;
    text-align: center;
    vertical-align: middle;
}

.academic-table td.student-col {
    text-align: left;
}

.academic-table td.avg-col {
    background: rgba(0, 0, 0, 0.1);
}

.academic-table .grade {
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
}

/* Student Cell */
.student-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.student-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--primary-color);
    flex-shrink: 0;
}

.student-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-gold);
    background: var(--primary-color);
}

.student-info {
    display: flex;
    flex-direction: column;
}

.student-info .student-name {
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.student-info .student-class {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Grade Styles */
.grade {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 500;
}

.grade-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
}

.grade-excellent, .grade-badge.grade-excellent {
    color: #27ae60;
}
.grade-badge.grade-excellent {
    background: rgba(39, 174, 96, 0.2);
}

.grade-good, .grade-badge.grade-good {
    color: #58d68d;
}
.grade-badge.grade-good {
    background: rgba(88, 214, 141, 0.2);
}

.grade-average, .grade-badge.grade-average {
    color: #f4d03f;
}
.grade-badge.grade-average {
    background: rgba(244, 208, 63, 0.2);
}

.grade-below, .grade-badge.grade-below {
    color: #e67e22;
}
.grade-badge.grade-below {
    background: rgba(230, 126, 34, 0.2);
}

.grade-poor, .grade-badge.grade-poor {
    color: #c0392b;
}
.grade-badge.grade-poor {
    background: rgba(192, 57, 43, 0.2);
}

.grade-na {
    color: var(--text-secondary);
}

/* Participation Cell */
.participation-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.participation-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    min-width: 60px;
}

.participation-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.participation-fill.grade-excellent { background: #27ae60; }
.participation-fill.grade-good { background: #58d68d; }
.participation-fill.grade-average { background: #f4d03f; }
.participation-fill.grade-below { background: #e67e22; }
.participation-fill.grade-poor { background: #c0392b; }

.participation-text {
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    color: var(--text-secondary);
    min-width: 40px;
}

/* Responsive */
@media (max-width: 1200px) {
    .academic-table {
        font-size: 0.8rem;
    }

    .academic-table th,
    .academic-table td {
        padding: 10px 8px;
    }

    .academic-table th.student-col {
        width: 180px;
    }
}

@media (max-width: 900px) {
    .academic-table-container {
        overflow-x: auto;
    }

    .academic-table {
        min-width: 800px;
    }
}

/* ========================================
   Sport Stats - Clean Table Design
   ======================================== */

.sport-summary-bar {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--secondary-color);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
}

/* Charts Section */
.sport-charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.sport-chart-card {
    background: var(--secondary-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
}

.sport-chart-card h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-md);
}

.sport-chart-card .chart-container {
    height: 200px;
}

.sport-table-container {
    background: var(--secondary-color);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    box-shadow: var(--shadow-lg);
}

.sport-table {
    width: 100%;
    min-width: 1700px;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.sport-table thead {
    background: rgba(0, 0, 0, 0.3);
}

.sport-table th {
    padding: 10px 6px;
    text-align: center;
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.sport-table th.student-col {
    text-align: left;
    width: 180px;
    padding-left: 12px;
}

.sport-table th.metric-col {
    font-size: 0.65rem;
    padding: 6px 4px;
}

/* Month column headers styling */
.sport-table thead tr:first-child th[colspan="4"] {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Month header backgrounds (after Student, Body Index, Overall columns) */
.sport-table thead tr:first-child th:nth-child(5) { background: rgba(56, 189, 248, 0.1); }   /* May */
.sport-table thead tr:first-child th:nth-child(6) { background: rgba(244, 114, 182, 0.1); }  /* April */
.sport-table thead tr:first-child th:nth-child(7) { background: rgba(52, 211, 153, 0.1); }   /* March */
.sport-table thead tr:first-child th:nth-child(8) { background: rgba(251, 146, 60, 0.1); }   /* February */
.sport-table thead tr:first-child th:nth-child(9) { background: rgba(167, 139, 250, 0.1); }  /* January */
.sport-table thead tr:first-child th:nth-child(10) { background: rgba(0, 255, 136, 0.1); }   /* December */
.sport-table thead tr:first-child th:nth-child(11) { background: rgba(255, 215, 0, 0.1); }   /* November */
.sport-table thead tr:first-child th:nth-child(12) { background: rgba(77, 168, 218, 0.1); }  /* October */
.sport-table thead tr:first-child th:nth-child(13) { background: rgba(233, 69, 96, 0.1); }   /* September */

.sport-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
    cursor: pointer;
}

.sport-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sport-table td {
    padding: 8px 4px;
    text-align: center;
    vertical-align: middle;
}

.sport-table td.student-col {
    text-align: left;
    padding-left: 12px;
}

/* Month column backgrounds */
.sport-table td.month-sep { background: rgba(233, 69, 96, 0.03); }
.sport-table td.month-oct { background: rgba(77, 168, 218, 0.03); }
.sport-table td.month-nov { background: rgba(255, 215, 0, 0.03); }
.sport-table td.month-dec { background: rgba(0, 255, 136, 0.03); }
.sport-table td.month-jan { background: rgba(167, 139, 250, 0.03); }
.sport-table td.month-feb { background: rgba(251, 146, 60, 0.03); }
.sport-table td.month-mar { background: rgba(52, 211, 153, 0.03); }
.sport-table td.month-apr { background: rgba(244, 114, 182, 0.03); }
.sport-table td.month-may { background: rgba(56, 189, 248, 0.03); }

.sport-table tbody tr:hover td.month-sep { background: rgba(233, 69, 96, 0.08); }
.sport-table tbody tr:hover td.month-oct { background: rgba(77, 168, 218, 0.08); }
.sport-table tbody tr:hover td.month-nov { background: rgba(255, 215, 0, 0.08); }
.sport-table tbody tr:hover td.month-dec { background: rgba(0, 255, 136, 0.08); }
.sport-table tbody tr:hover td.month-jan { background: rgba(167, 139, 250, 0.08); }
.sport-table tbody tr:hover td.month-feb { background: rgba(251, 146, 60, 0.08); }
.sport-table tbody tr:hover td.month-mar { background: rgba(52, 211, 153, 0.08); }
.sport-table tbody tr:hover td.month-apr { background: rgba(244, 114, 182, 0.08); }
.sport-table tbody tr:hover td.month-may { background: rgba(56, 189, 248, 0.08); }

/* Sport values */
.sport-val {
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-primary);
}

/* Body Index Badge */
.body-index-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64b5f6;
    background: rgba(100, 181, 246, 0.15);
}

/* Sport Overall Badge */
.sport-overall-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
}

.sport-overall-badge.sport-excellent {
    color: #27ae60;
    background: rgba(39, 174, 96, 0.2);
}

.sport-overall-badge.sport-good {
    color: #58d68d;
    background: rgba(88, 214, 141, 0.2);
}

.sport-overall-badge.sport-average {
    color: #f4d03f;
    background: rgba(244, 208, 63, 0.2);
}

.sport-overall-badge.sport-below {
    color: #e67e22;
    background: rgba(230, 126, 34, 0.2);
}

.sport-overall-badge.sport-poor {
    color: #c0392b;
    background: rgba(192, 57, 43, 0.2);
}

/* Sport Value */
.sport-value {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Sport Percent */
.sport-percent {
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
}

.sport-percent.sport-excellent {
    color: #27ae60;
}

.sport-percent.sport-good {
    color: #58d68d;
}

.sport-percent.sport-average {
    color: #f4d03f;
}

.sport-percent.sport-below {
    color: #e67e22;
}

.sport-percent.sport-poor {
    color: #c0392b;
}

/* Sparkline styles */
.progress-col {
    width: 120px;
}

.sparkline-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sparkline-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sparkline-wrapper.trend-up {
    color: #27ae60;
}

.sparkline-wrapper.trend-down {
    color: #c0392b;
}

.sparkline-wrapper.trend-stable {
    color: #f4d03f;
}

.sparkline-svg {
    display: block;
}

.spark-trend {
    font-family: 'Oswald', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
}

.no-data {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 1400px) {
    .sport-charts-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1000px) {
    .sport-table-container {
        overflow-x: auto;
    }

    .sport-table {
        min-width: 1700px;
    }

    .sport-summary-bar {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
}

/* ========================================
   Modal Detail View
   ======================================== */

.modal-student-header {
    display: flex;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--accent-gold);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.3);
    flex-shrink: 0;
}

.modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    flex: 1;
}

.modal-name {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
}

.modal-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.detail-value {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    color: var(--accent-gold);
}

.modal-stats-overview {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.modal-stat {
    text-align: center;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
}

.modal-stat-value {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    font-weight: 700;
}

.modal-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.modal-stat-rank {
    font-size: 0.7rem;
    color: var(--accent-gold);
    margin-top: 4px;
    font-weight: 600;
}

.modal-stat-rank.school {
    color: var(--text-muted, rgba(255,255,255,0.5));
    margin-top: 2px;
}

.modal-charts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

.modal-chart {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
}

.modal-chart h4 {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    color: var(--accent-gold);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
}

.modal-chart canvas {
    max-height: 200px;
}

/* Leadership Section */
.modal-leadership-section {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-lg);
}

.leadership-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    color: var(--accent-gold);
    margin-bottom: var(--spacing-lg);
}

.leadership-breakdown {
    display: flex;
    gap: var(--spacing-xl);
    align-items: center;
}

.leadership-total {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    padding: var(--spacing-lg);
    background: rgba(255, 215, 0, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.leadership-total-value {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    line-height: 1;
}

.leadership-total-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-top: 4px;
}

.leadership-items {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

.leadership-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
}

.leadership-item-value {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.leadership-item-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-top: 4px;
    text-align: center;
}

@media (max-width: 768px) {
    .leadership-breakdown {
        flex-direction: column;
    }

    .leadership-items {
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
    }
}

/* Career Dev + Behavior Row (side by side) */
.modal-breakdown-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.breakdown-card {
    padding: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-lg);
}

.breakdown-card-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    margin-bottom: var(--spacing-md);
}

.careerdev-card .breakdown-card-title {
    color: #64b5f6;
}

.behavior-card .breakdown-card-title {
    color: #a78bfa;
}

.breakdown-card-content {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.breakdown-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
}

.careerdev-card .breakdown-score {
    background: rgba(100, 181, 246, 0.1);
    border: 1px solid rgba(100, 181, 246, 0.3);
}

.behavior-card .breakdown-score {
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.breakdown-score-value {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.careerdev-card .breakdown-score-value {
    color: #64b5f6;
}

.behavior-card .breakdown-score-value {
    color: #a78bfa;
}

.breakdown-score-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-top: 2px;
}

.breakdown-items {
    flex: 1;
    display: grid;
    gap: 8px;
}

.careerdev-card .breakdown-items {
    grid-template-columns: repeat(5, 1fr);
}

.behavior-card .breakdown-items {
    grid-template-columns: repeat(3, 1fr);
}

.breakdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
}

.breakdown-item-value {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.breakdown-item-value.has-violations {
    color: #f87171;
}

.breakdown-item-label {
    font-size: 0.55rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-top: 2px;
    text-align: center;
}

@media (max-width: 768px) {
    .modal-breakdown-row {
        grid-template-columns: 1fr;
    }

    .breakdown-card-content {
        flex-direction: column;
    }

    .breakdown-score {
        width: 100%;
    }

    .breakdown-items {
        width: 100%;
    }
}

/* Achievements Section */
.modal-achievements-section {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
}

.achievements-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    color: var(--accent-gold);
    margin-bottom: var(--spacing-lg);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.achievement-card {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent-gold);
    transition: all 0.3s ease;
}

.achievement-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.achievement-card.academic {
    border-left-color: #3498db;
}

.achievement-card.sport {
    border-left-color: #27ae60;
}

.achievement-card.gallup {
    border-left-color: #9b59b6;
}

.achievement-icon {
    font-size: 2rem;
    line-height: 1;
}

.achievement-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.achievement-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.achievement-value {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.achievement-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: #9b59b6;
    text-decoration: none;
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.achievement-link:hover {
    color: #a86bd5;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .modal-student-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .modal-stats-overview {
        grid-template-columns: repeat(3, 1fr);
    }

    .modal-charts {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Academic Grades Section
   ======================================== */
.modal-academic-section {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.academic-title {
    color: var(--accent-color);
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    margin: 0 0 var(--spacing-md) 0;
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--accent-color);
}

.academic-table-container {
    overflow-x: auto;
    margin: 0 calc(var(--spacing-md) * -1);
    padding: 0 var(--spacing-md);
}

.academic-grades-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 500px;
}

.academic-grades-table thead {
    background: var(--primary-dark);
}

.academic-grades-table th {
    padding: var(--spacing-sm) var(--spacing-xs);
    color: var(--text-primary);
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    text-align: center;
    border: 1px solid var(--border-color);
}

.academic-grades-table th.subject-col {
    text-align: left;
    min-width: 150px;
}

.academic-grades-table th.grade-col {
    width: 70px;
}

.academic-grades-table th.avg-col {
    background: rgba(255, 215, 0, 0.1);
}

.academic-grades-table tbody tr {
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.2s ease;
}

.academic-grades-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.04);
}

.academic-grades-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.08);
}

.academic-grades-table td {
    padding: var(--spacing-sm) var(--spacing-xs);
    border: 1px solid var(--border-color);
    text-align: center;
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
}

.academic-grades-table td.subject-col {
    text-align: left;
    color: var(--text-secondary);
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
}

.academic-grades-table td.avg-col {
    background: rgba(255, 215, 0, 0.05);
}

.academic-grades-table tfoot tr {
    background: rgba(255, 215, 0, 0.1);
}

.academic-grades-table tfoot td {
    font-weight: 600;
}

/* Grade colors */
.academic-grades-table .grade-excellent {
    color: #22c55e;
}

.academic-grades-table .grade-good {
    color: #3b82f6;
}

.academic-grades-table .grade-average {
    color: #f59e0b;
}

.academic-grades-table .grade-poor {
    color: #ef4444;
}

@media (max-width: 576px) {
    .modal-academic-section {
        padding: var(--spacing-md);
    }

    .academic-grades-table {
        font-size: 0.8rem;
    }

    .academic-grades-table th,
    .academic-grades-table td {
        padding: var(--spacing-xs);
    }
}

/* ========================================
   Loading State Styles
   ======================================== */

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: var(--spacing-xl);
    grid-column: 1 / -1;
}

.loading-state p {
    color: var(--text-secondary);
    margin-top: var(--spacing-md);
    font-size: 1rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(201, 162, 39, 0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ========================================
   Student Manual (Методичка) Styles
   ======================================== */

/* Button in modal header */
.student-manual-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: var(--spacing-md);
    padding: 10px 20px;
    background: linear-gradient(135deg, #2d6a4f, #40916c);
    border: 1px solid rgba(64, 145, 108, 0.5);
    border-radius: var(--radius-md);
    color: #fff;
    font-family: 'Oswald', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.manual-btn-icon {
    font-size: 1.2rem;
}

.manual-btn-text {
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Fullscreen Manual Overlay */
.student-manual-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(5px);
}

.student-manual-overlay.active {
    opacity: 1;
    visibility: visible;
}

.student-manual-container {
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    background: linear-gradient(145deg, #1a1a2e 0%, #0d0d1a 50%, #16213e 100%);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(64, 145, 108, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
}

.student-manual-overlay.active .student-manual-container {
    transform: scale(1) translateY(0);
}

/* Manual Header */
.student-manual-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(90deg, rgba(64, 145, 108, 0.2), rgba(45, 106, 79, 0.1));
    border-bottom: 1px solid rgba(64, 145, 108, 0.3);
    flex-shrink: 0;
}

.manual-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.manual-header-icon {
    font-size: 1.5rem;
}

.manual-header-info h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #52b788;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.manual-student-name {
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    color: var(--accent-gold);
    padding: 4px 12px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.manual-close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.manual-close-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
}

/* Manual Body - Scrollable Content */
.student-manual-body {
    padding: 24px 32px;
    overflow-y: auto;
    flex: 1;
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.student-manual-body::-webkit-scrollbar {
    width: 6px;
}

.student-manual-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.student-manual-body::-webkit-scrollbar-thumb {
    background: rgba(82, 183, 136, 0.3);
    border-radius: 3px;
}

.student-manual-body::-webkit-scrollbar-thumb:hover {
    background: rgba(82, 183, 136, 0.5);
}

/* Manual Content Formatting */
.student-manual-body .manual-profile-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.4rem;
    color: #52b788;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(82, 183, 136, 0.3);
}

.student-manual-body .manual-section-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.15rem;
    color: var(--accent-gold);
    margin: 24px 0 12px 0;
    padding: 8px 12px;
    background: rgba(255, 215, 0, 0.05);
    border-left: 3px solid var(--accent-gold);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.student-manual-body h4 {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    color: #64b5f6;
    margin: 16px 0 8px 0;
}

.student-manual-body p {
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.85);
}

.student-manual-body strong {
    color: #e0e0e0;
}

/* Responsive */
@media (max-width: 768px) {
    .student-manual-container {
        width: 95%;
        max-height: 95vh;
    }

    .student-manual-body {
        padding: 16px 20px;
    }

    .manual-header-info h2 {
        font-size: 1rem;
    }

    .manual-student-name {
        display: none;
    }
}
