/* ============================================================
   🎓 JASQANAT - БАРЛЫҚ ОҚУШЫЛАР РЕЙТИНГІ (ALL STUDENTS LEADERBOARD)
   Дизайн: Премиум білім платформасы, 6 пәндік модульдер, толық кесте
   Мобильді бейімделу: Android WebView және барлық смартфондар (Правило 9)
   ============================================================ */

/* 1. БАСТЫ КОНТЕЙНЕР */
body.all-students-page,
.all-students-page {
    background: linear-gradient(180deg, #eaf0f8 0%, #edf4fb 50%, #eaf1f8 100%) !important;
    min-height: 100vh;
    font-family: 'Nunito', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    position: relative;
}

/* Көңілді мектеп/математика өрнектері (SVG дудлдар: π, √x, ∑, Δ, %, 📐, 123) */
body.all-students-page::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 320 320'%3E%3Cpolygon points='30,40 30,100 90,100' fill='none' stroke='%233b82f6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline x1='30' y1='80' x2='40' y2='80' stroke='%233b82f6' stroke-width='2'/%3E%3Cline x1='30' y1='60' x2='45' y2='60' stroke='%233b82f6' stroke-width='2'/%3E%3Cpath d='M140,50 Q160,45 180,48 M150,48 L150,75 Q150,80 145,82 M170,48 L170,80 Q170,85 178,82' fill='none' stroke='%23f59e0b' stroke-width='2.5' stroke-linecap='round'/%3E%3Cpath d='M220,65 L226,75 L234,48 L265,48' fill='none' stroke='%2310b981' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ctext x='242' y='68' font-family='Arial' font-size='16' font-style='italic' font-weight='bold' fill='%2310b981'%3Ex%3C/text%3E%3Cpath d='M50,160 L70,160 M60,150 L60,170' fill='none' stroke='%23ec4899' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M125,145 L145,165 M145,145 L125,165' fill='none' stroke='%238b5cf6' stroke-width='3' stroke-linecap='round'/%3E%3Cline x1='220' y1='160' x2='250' y2='160' stroke='%23f59e0b' stroke-width='3' stroke-linecap='round'/%3E%3Ccircle cx='235' cy='148' r='3' fill='%23f59e0b'/%3E%3Ccircle cx='235' cy='172' r='3' fill='%23f59e0b'/%3E%3Cline x1='35' y1='260' x2='70' y2='225' stroke='%2306b6d4' stroke-width='2.5' stroke-linecap='round'/%3E%3Ccircle cx='42' cy='232' r='4.5' fill='none' stroke='%2306b6d4' stroke-width='2'/%3E%3Ccircle cx='63' cy='253' r='4.5' fill='none' stroke='%2306b6d4' stroke-width='2'/%3E%3Cpath d='M165,225 L135,225 L150,242 L135,260 L165,260' fill='none' stroke='%233b82f6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpolygon points='250,220 254,230 265,231 257,238 259,249 250,243 241,249 243,238 235,231 246,230' fill='%23fde047' stroke='%23f59e0b' stroke-width='1.5'/%3E%3Ctext x='175' y='165' font-family='Arial, sans-serif' font-size='16' font-weight='bold' fill='%233b82f6'%3E1 2 3%3C/text%3E%3Ctext x='75' y='275' font-family='Arial, sans-serif' font-size='13' font-weight='bold' fill='%2310b981'%3E%CF%80r%C2%B2%3C/text%3E%3C/svg%3E");
    background-size: 300px 300px;
    opacity: 0.18;
    pointer-events: none;
    z-index: 0;
}

.all-students-container {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 100px 20px 80px 20px; /* 70px шапка + 30px бос орын */
    box-sizing: border-box;
}

/* 2. HERO ШАПКА ЖӘНЕ АРТҚА ҚАЙТУ СІЛТЕМЕСІ */
.as-hero-section {
    text-align: center;
    margin-bottom: 28px;
    position: relative;
}

.as-breadcrumb {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 16px;
}

.as-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
    padding: 8px 16px;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.as-back-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #0057dd;
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(0, 87, 221, 0.15);
    text-decoration: none;
}

.as-back-arrow {
    font-size: 16px;
    font-weight: 900;
    transition: transform 0.2s ease;
}

.as-back-btn:hover .as-back-arrow {
    transform: translateX(-2px);
}

.as-hero-header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.as-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    color: #1d4ed8;
    padding: 6px 16px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 14px;
    letter-spacing: 0.2px;
}

.as-badge-dot {
    width: 8px;
    height: 8px;
    background: #0057dd;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(0, 87, 221, 0.25);
}

.as-title {
    font-size: 34px;
    font-weight: 900;
    color: #0f172a;
    margin: 0 0 10px 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
    font-family: 'Inter', sans-serif;
}

.as-title span {
    color: #0057dd;
    position: relative;
}

.as-subtitle {
    font-size: 15px;
    color: #64748b;
    line-height: 1.55;
    max-width: 740px;
    margin: 0 auto;
    font-weight: 500;
}

/* 3. 6 ПӘНДІК МОДУЛЬ БАТЫРМАЛАРЫ (СКРИНШОТТАҒЫДАЙ ДИЗАЙН) */
.as-subject-tabs-wrap {
    margin-bottom: 24px;
    width: 100%;
}

.as-subject-tabs {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    padding: 6px 2px;
}

.as-tab-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    border-radius: 16px;
    padding: 10px 14px;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    min-height: 52px;
    box-sizing: border-box;
    position: relative;
    font-family: 'Inter', sans-serif;
}

.as-tab-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.22s ease;
    padding: 3px;
    box-sizing: border-box;
}

.as-tab-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.as-tab-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.as-tab-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* Пастельные неактивные темы (Скриншоттағыдай) */
.as-tab-btn.as-tab-math {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 2px solid #fdba74;
    color: #9a3412;
    box-shadow: 0 3px 10px rgba(249, 115, 22, 0.12);
}
.as-tab-btn.as-tab-math .as-tab-icon { border: 1.5px solid #fed7aa; }

.as-tab-btn.as-tab-sypat {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #86efac;
    color: #166534;
    box-shadow: 0 3px 10px rgba(34, 197, 94, 0.12);
}
.as-tab-btn.as-tab-sypat .as-tab-icon { border: 1.5px solid #bbf7d0; }

.as-tab-btn.as-tab-eng {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #93c5fd;
    color: #1e40af;
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.12);
}
.as-tab-btn.as-tab-eng .as-tab-icon { border: 1.5px solid #bfdbfe; }

.as-tab-btn.as-tab-kaz {
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
    border: 2px solid #67e8f9;
    color: #0e7490;
    box-shadow: 0 3px 10px rgba(6, 182, 212, 0.12);
}
.as-tab-btn.as-tab-kaz .as-tab-icon { border: 1.5px solid #a5f3fc; }

.as-tab-btn.as-tab-rus {
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
    border: 2px solid #fecdd3;
    color: #9f1239;
    box-shadow: 0 3px 10px rgba(244, 63, 94, 0.12);
}
.as-tab-btn.as-tab-rus .as-tab-icon { border: 1.5px solid #fda4af; }

.as-tab-btn.as-tab-science {
    background: linear-gradient(135deg, #f7fee7 0%, #ecfccb 100%);
    border: 2px solid #bef264;
    color: #4d7c0f;
    box-shadow: 0 3px 10px rgba(132, 204, 22, 0.12);
}
.as-tab-btn.as-tab-science .as-tab-icon { border: 1.5px solid #d9f99d; }

.as-tab-btn:hover:not(.active) {
    transform: translateY(-3px);
    filter: brightness(0.97);
}

/* 🌟 АКТИВТІ БАТЫРМА (ӨТЕ ІРІ, ҚАНЫҚ ТҮСТІ, БАСҚАЛАРЫНАН ЕРЕКШЕЛЕНЕТІН 3D-ЭФФЕКТ) */
.as-tab-btn.active {
    min-height: 60px !important;
    font-size: 15px !important;
    font-weight: 950 !important;
    color: #ffffff !important;
    transform: translateY(-5px) scale(1.08) !important;
    z-index: 10;
    text-shadow: 0 1.5px 3px rgba(0, 0, 0, 0.45);
    border: 2.5px solid #ffffff !important;
}

.as-tab-btn.active .as-tab-icon {
    width: 38px !important;
    height: 38px !important;
    border-radius: 11px !important;
    background: #ffffff !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28), 0 0 0 2px rgba(255, 255, 255, 0.8) !important;
    transform: scale(1.08);
}

.as-tab-btn.as-tab-math.active {
    background: linear-gradient(135deg, #ff6b35 0%, #ea580c 100%) !important;
    border: 2.5px solid #ffffff !important;
    box-shadow: 0 14px 34px rgba(234, 88, 12, 0.55), 0 3px 8px rgba(0, 0, 0, 0.2) !important;
}

.as-tab-btn.as-tab-sypat.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: 2.5px solid #ffffff !important;
    box-shadow: 0 14px 34px rgba(16, 185, 129, 0.55), 0 3px 8px rgba(0, 0, 0, 0.2) !important;
}

.as-tab-btn.as-tab-eng.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    border: 2.5px solid #ffffff !important;
    box-shadow: 0 14px 34px rgba(59, 130, 246, 0.55), 0 3px 8px rgba(0, 0, 0, 0.2) !important;
}

.as-tab-btn.as-tab-kaz.active {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
    border: 2.5px solid #ffffff !important;
    box-shadow: 0 14px 34px rgba(6, 182, 212, 0.55), 0 3px 8px rgba(0, 0, 0, 0.2) !important;
}

.as-tab-btn.as-tab-rus.active {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%) !important;
    border: 2.5px solid #ffffff !important;
    box-shadow: 0 14px 34px rgba(244, 63, 94, 0.55), 0 3px 8px rgba(0, 0, 0, 0.2) !important;
}

.as-tab-btn.as-tab-science.active {
    background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%) !important;
    border: 2.5px solid #ffffff !important;
    box-shadow: 0 14px 34px rgba(132, 204, 22, 0.55), 0 3px 8px rgba(0, 0, 0, 0.2) !important;
}

/* ============================================================
   3.1. МАУСЫМДАРДЫ ТАҢДАУ (AS-SEASON-TABS)
   Барлық маусымдар және 4 маусым (Көктем, Жаз, Күз, Қыс)
   100% Android WebView & Мобильді бейімделу (скроллсыз, 2 қатарлы)
   ============================================================ */
.as-season-tabs-wrap {
    margin-bottom: 22px;
    width: 100%;
}

.as-season-tabs {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) 1.25fr !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.as-season-btn {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 10px 14px !important;
    cursor: pointer !important;
    transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
    min-height: 52px !important;
    box-sizing: border-box !important;
    text-align: left !important;
    font-family: 'Nunito', 'Inter', -apple-system, sans-serif !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03) !important;
    width: 100% !important;
}

.as-sbtn-emoji {
    font-size: 22px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 10px !important;
    background: #f8fafc !important;
    flex-shrink: 0 !important;
    transition: transform 0.2s ease !important;
}

.as-sbtn-info {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
}

.as-sbtn-title {
    font-size: 13.5px !important;
    font-weight: 850 !important;
    color: #1e293b !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-family: 'Nunito', 'Inter', sans-serif !important;
}

.as-sbtn-sub {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    margin-top: 2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-family: 'Nunito', 'Inter', sans-serif !important;
}

.as-season-btn:hover:not(.active) {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    background: #f8fafc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.as-season-btn:hover:not(.active) .as-sbtn-emoji {
    transform: scale(1.1);
}

/* Активті күйлер - әр маусымның өз қанық түсі мен градиенті */
.as-season-btn.active {
    border-color: transparent !important;
    transform: translateY(-2px);
}

.as-season-btn.active .as-sbtn-title {
    color: #ffffff !important;
    font-weight: 900;
}

.as-season-btn.active .as-sbtn-sub {
    color: rgba(255, 255, 255, 0.9) !important;
}

.as-season-btn.active .as-sbtn-emoji {
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

/* Барлық маусымдар (Индиго/көк) */
.as-season-btn.as-sbtn-all.active {
    background: linear-gradient(135deg, #1d4ed8 0%, #0057dd 100%) !important;
    box-shadow: 0 6px 18px rgba(0, 87, 221, 0.35) !important;
}

/* 1-маусым: Көктем (Изумрудты жасыл) */
.as-season-btn.as-sbtn-spring.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.38) !important;
}

/* 2-маусым: Жаз (Шуақты күн сары) */
.as-season-btn.as-sbtn-summer.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.38) !important;
}

/* 3-маусым: Күз (Күзгі қызғылт-сары) */
.as-season-btn.as-sbtn-autumn.active {
    background: linear-gradient(135deg, #f97316 0%, #c2410c 100%) !important;
    box-shadow: 0 6px 18px rgba(234, 88, 12, 0.38) !important;
}

/* 4-маусым: Қыс (Мұзды сапфир көк) */
.as-season-btn.as-sbtn-winter.active {
    background: linear-gradient(135deg, #0ea5e9 0%, #1d4ed8 100%) !important;
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.38) !important;
}

/* 4. БАСҚАРУ ПАНЕЛІ: СТАТУС БЕЙДЖДЕРІ ЖӘНЕ ІЗДЕУ */
.as-control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px 18px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.as-control-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.as-subject-badge {
    background: linear-gradient(135deg, #0057dd 0%, #003ea8 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    padding: 6px 14px;
    border-radius: 10px;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 6px rgba(0, 87, 221, 0.25);
}

.as-count-badge {
    color: #475569;
    font-size: 13.5px;
    font-weight: 700;
}

.as-control-right {
    display: flex;
    align-items: center;
}

.as-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 280px;
}

.as-search-icon {
    position: absolute;
    left: 12px;
    font-size: 14px;
    color: #94a3b8;
    pointer-events: none;
}

.as-search-input {
    width: 100%;
    padding: 9px 36px 9px 36px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    background: #f8fafc;
    transition: all 0.2s ease;
    outline: none;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

.as-search-input:focus {
    background: #ffffff;
    border-color: #0057dd;
    box-shadow: 0 0 0 3px rgba(0, 87, 221, 0.12);
}

.as-search-clear {
    position: absolute;
    right: 10px;
    background: #e2e8f0;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
}

.as-search-clear:hover {
    background: #cbd5e1;
    color: #0f172a;
}

/* 5. ТОЛЫҚ КЕСТЕ КАРТОЧКАСЫ */
.as-table-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.as-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.as-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-family: 'Inter', sans-serif;
}

.as-table thead tr {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.as-table th {
    padding: 14px 18px;
    font-size: 12.5px;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.as-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.as-row {
    transition: background-color 0.18s ease;
}

.as-row:hover {
    background-color: #f8fbff;
}

/* Топ-1..3 қатарларының фонын боямаймыз — тек орын кружоктары ерекшеленеді */

/* Жүйеге кірген қолданушының өз қатарын айқын обводкамен көрсету */
tr.as-row.as-row-me td {
    background: linear-gradient(90deg, #eff6ff 0%, #f0f9ff 100%) !important;
    border-top: 2px solid #2563eb !important;
    border-bottom: 2px solid #2563eb !important;
}
tr.as-row.as-row-me td:first-child {
    border-left: 4px solid #2563eb !important;
}
tr.as-row.as-row-me td:last-child {
    border-right: 2px solid #2563eb !important;
}
tr.as-row.as-row-me:hover td {
    background: linear-gradient(90deg, #dbeafe 0%, #e0f2fe 100%) !important;
}
.as-me-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    margin-left: 6px;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    vertical-align: middle;
    line-height: 1.3;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.28);
}

/* Орын бағаны */
.as-pos-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 900;
    box-sizing: border-box;
}

.as-pos-badge.pos-gold {
    background: linear-gradient(135deg, #fef08a 0%, #eab308 100%);
    color: #713f12;
    border: 2px solid #ca8a04;
    box-shadow: 0 3px 8px rgba(234, 179, 8, 0.4);
}

.as-pos-badge.pos-silver {
    background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
    color: #334155;
    border: 2px solid #94a3b8;
    box-shadow: 0 3px 8px rgba(148, 163, 184, 0.35);
}

.as-pos-badge.pos-bronze {
    background: linear-gradient(135deg, #fed7aa 0%, #f97316 100%);
    color: #7c2d12;
    border: 2px solid #ea580c;
    box-shadow: 0 3px 8px rgba(249, 115, 22, 0.35);
}

.as-pos-badge.pos-default {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* Пайдаланушы ұяшығы */
.as-user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 150px;
}

.as-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #ffffff;
    border: 2px solid #bfdbfe;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

/* Рангтер бойынша арнайы жиектер (1..7 саты) және маусымдық сәулелену */
.as-user-avatar.rank-wrap-1 { border-color: #cbd5e1; }
.as-user-avatar.rank-wrap-2 { border-color: #93c5fd; }
.as-user-avatar.rank-wrap-3 { border-color: #86efac; }
.as-user-avatar.rank-wrap-4 { border-color: #67e8f9; }
.as-user-avatar.rank-wrap-5 { border-color: #a78bfa; }
.as-user-avatar.rank-wrap-6 { border-color: #f43f5e; }

.as-user-avatar.season-avatar-1 {
    border: 2.5px solid #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.42), 0 2px 6px rgba(0, 0, 0, 0.08);
}
.as-user-avatar.season-avatar-2 {
    border: 2.5px solid #f59e0b;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.48), 0 2px 6px rgba(0, 0, 0, 0.08);
}
.as-user-avatar.season-avatar-3 {
    border: 2.5px solid #ea580c;
    box-shadow: 0 0 12px rgba(234, 88, 12, 0.44), 0 2px 6px rgba(0, 0, 0, 0.08);
}
.as-user-avatar.season-avatar-4 {
    border: 2.5px solid #0284c7;
    box-shadow: 0 0 14px rgba(2, 132, 199, 0.50), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.as-user-avatar.rank-wrap-7 {
    border-color: #0284c7 !important;
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.65) !important;
    overflow: visible !important;
}
.as-user-avatar.season-avatar-1.rank-wrap-7 {
    border-color: #10b981 !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.62) !important;
}
.as-user-avatar.season-avatar-2.rank-wrap-7 {
    border-color: #f59e0b !important;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.68) !important;
}
.as-user-avatar.season-avatar-3.rank-wrap-7 {
    border-color: #ea580c !important;
    box-shadow: 0 0 15px rgba(234, 88, 12, 0.62) !important;
}
.as-user-avatar.season-avatar-4.rank-wrap-7 {
    border-color: #0284c7 !important;
    box-shadow: 0 0 15px rgba(2, 132, 199, 0.68) !important;
}

.as-rank-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.as-rank-img.rank-img-7 {
    width: 50px !important;
    height: auto !important;
    max-width: none !important;
    border-radius: 0 !important;
    object-fit: contain !important;
}
.season-avatar-1 .as-rank-img.rank-img-7 { filter: drop-shadow(0 2px 6px rgba(5, 150, 105, 0.5)); }
.season-avatar-2 .as-rank-img.rank-img-7 { filter: drop-shadow(0 2px 6px rgba(217, 119, 6, 0.5)); }
.season-avatar-3 .as-rank-img.rank-img-7 { filter: drop-shadow(0 2px 6px rgba(194, 65, 12, 0.5)); }
.season-avatar-4 .as-rank-img.rank-img-7 { filter: drop-shadow(0 2px 6px rgba(2, 132, 199, 0.55)); }

.as-user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.as-user-name {
    font-size: 14.5px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.as-user-login {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-top: 2px;
}

/* Дәреже (Сатысы) капсуласы — маусымдық ашық реңктердегі үлкен иконкамен */
.as-rank-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 999px;
    padding: 4px 12px 4px 5px;
    white-space: nowrap;
}

.as-rank-pill.season-rank-pill-1 {
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
    border-color: #a7f3d0;
}
.as-rank-pill.season-rank-pill-2 {
    background: linear-gradient(135deg, #fefce8 0%, #ffffff 100%);
    border-color: #fde68a;
}
.as-rank-pill.season-rank-pill-3 {
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%);
    border-color: #fed7aa;
}
.as-rank-pill.season-rank-pill-4 {
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
    border-color: #bae6fd;
}

.as-rank-pill-img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.as-rank-pill-name {
    font-size: 13px;
    font-weight: 800;
    color: #1e293b;
}

.as-rank-level {
    font-size: 11px;
    font-weight: 800;
    color: #0284c7;
    background: #e0f2fe;
    padding: 2px 7px;
    border-radius: 999px;
}

.season-rank-pill-1 .as-rank-level {
    color: #047857;
    background: #d1fae5;
}
.season-rank-pill-2 .as-rank-level {
    color: #a16207;
    background: #fef3c7;
}
.season-rank-pill-3 .as-rank-level {
    color: #c2410c;
    background: #ffedd5;
}
.season-rank-pill-4 .as-rank-level {
    color: #0369a1;
    background: #e0f2fe;
}

/* Сынақтар бағаны */
.as-tests-pill {
    font-size: 13.5px;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}

.as-tests-pill b {
    color: #0f172a;
    font-weight: 900;
    font-size: 14px;
}

/* Орташа балл */
.as-score-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 110px;
}

.as-score-badge {
    font-size: 13px;
    font-weight: 900;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    width: fit-content;
}

.as-score-badge.score-high {
    color: #059669;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.as-score-badge.score-mid {
    color: #d97706;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.as-score-badge.score-low {
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.as-score-bar-bg {
    width: 100%;
    height: 5px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.as-score-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease;
}

.as-score-bar-fill.fill-high { background: #10b981; }
.as-score-bar-fill.fill-mid { background: #f59e0b; }
.as-score-bar-fill.fill-low { background: #ef4444; }

/* XP бағаны */
.as-xp-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #eff6ff;
    border: 1.5px solid #bae6fd;
    color: #0284c7;
    font-size: 13px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.08);
}

/* Бос күй */
.as-empty-state {
    text-align: center;
    padding: 50px 20px;
}

.as-empty-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.as-empty-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.as-empty-sub {
    font-size: 13.5px;
    color: #64748b;
    font-weight: 500;
}

/* ============================================================
   📱 6. МОБИЛЬДІ БЕЙІМДЕЛУ (Правило 9: Android WebView & Mobile)
   ============================================================ */
@media (max-width: 1024px) {
    .as-subject-tabs {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .as-season-tabs {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .as-season-btn.as-sbtn-all {
        grid-column: 1 / -1 !important;
    }
}

@media (max-width: 768px) {
    .all-students-container {
        padding: 85px 12px 60px 12px;
    }

    .as-title {
        font-size: 26px;
    }

    .as-subtitle {
        font-size: 13.5px;
    }

    .as-subject-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .as-season-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .as-season-btn.as-sbtn-all {
        grid-column: 1 / -1 !important;
    }

    .as-season-btn {
        padding: 9px 12px !important;
        min-height: 50px !important;
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .as-tab-btn {
        padding: 8px 10px !important;
        min-height: 48px !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        gap: 8px !important;
    }

    .as-tab-icon {
        width: 26px !important;
        height: 26px !important;
        border-radius: 8px !important;
        flex-shrink: 0 !important;
        padding: 2px !important;
    }

    .as-tab-info {
        min-width: 0 !important;
        flex: 1 !important;
    }

    .as-tab-name {
        font-family: 'Nunito', 'Inter', sans-serif !important;
        font-size: 12px !important;
        font-weight: 800 !important;
        white-space: normal !important;
        line-height: 1.15 !important;
        word-break: normal !important;
        overflow: visible !important;
    }

    .as-control-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 14px;
    }

    .as-search-wrap {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .as-subject-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 6px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .as-tab-btn {
        padding: 6px 8px !important;
        min-height: 46px !important;
        gap: 6px !important;
        border-radius: 13px !important;
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .as-tab-icon {
        width: 24px !important;
        height: 24px !important;
        border-radius: 7px !important;
        flex-shrink: 0 !important;
    }

    .as-tab-name {
        font-size: 11px !important;
        line-height: 1.12 !important;
        letter-spacing: -0.2px !important;
    }

    .as-season-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 6px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .as-season-btn {
        padding: 7px 8px !important;
        min-height: 46px !important;
        gap: 6px !important;
        border-radius: 13px !important;
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .as-sbtn-emoji {
        font-size: 16px !important;
        width: 24px !important;
        height: 24px !important;
        border-radius: 7px !important;
        flex-shrink: 0 !important;
    }

    .as-sbtn-title {
        font-size: 11px !important;
        letter-spacing: -0.3px !important;
    }

    .as-sbtn-sub {
        font-size: 9px !important;
        letter-spacing: -0.2px !important;
    }

    .as-table th,
    .as-table td {
        padding: 10px 12px;
    }

    .as-user-cell {
        min-width: 120px;
    }
}
