* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-body, #ffffff);
    color: var(--text-color, #333);
    position: relative;
    transition: background-color 0.4s ease, color 0.4s ease;
}

[data-theme="dark"] {
    --bg-body: #0a0a0f;
    --text-color: #f0f2ff;
    --panel-bg: rgba(18, 12, 18, 0.85);
    --form-bg: rgba(20, 10, 20, 0.9);
    --input-bg: #120818;
    --input-border: rgba(220, 50, 69, 0.25);
    --card-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(220, 50, 69, 0.08);
    --text-muted: #9ca3af;
    --header-bg: rgba(8, 5, 12, 0.95);
}

body .left-section {
    background: var(--bg-body, #ffffff);
    transition: background-color 0.4s ease;
}

/* ==================== SPLIT CONTAINER ==================== */
.container-split {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
}

.left-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    background: #ffffff;
}

.right-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #DC3245 0%, #B71C1C 50%, #DC3245 100%);
}

/* ==================== BACKGROUND ANIMATION ==================== */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #ffffff;
    overflow: hidden;
}

.gradient-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.6;
    animation: float 15s ease-in-out infinite;
    display: block;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(220, 50, 69, 0.4) 0%, rgba(183, 28, 28, 0.1) 100%);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 196, 0, 0.3) 0%, rgba(255, 196, 0, 0) 100%);
    bottom: -150px;
    right: -150px;
    animation-delay: 3s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    top: 50%;
    right: 5%;
    animation-delay: 5s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(40px, -40px) scale(1.1);
    }
}

.canvas-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.08;
}

/* ==================== MAIN WRAPPER ==================== */
.main-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    flex: 1;
}

/* ==================== ANIMATION WRAPPER ==================== */
.animation-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.logo-container {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border: 3px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    box-shadow:
        0 0 30px rgba(255, 255, 255, 0.3),
        inset 0 0 30px rgba(255, 255, 255, 0.1),
        0 20px 40px rgba(0, 0, 0, 0.2);
    animation: rotate-border 8s linear infinite;
}

@keyframes rotate-border {
    0% {
        border-color: rgba(255, 255, 255, 0.6);
        box-shadow:
            0 0 30px rgba(255, 255, 255, 0.3),
            inset 0 0 30px rgba(255, 255, 255, 0.1),
            0 20px 40px rgba(0, 0, 0, 0.2);
    }

    50% {
        border-color: rgba(255, 255, 255, 0.9);
        box-shadow:
            0 0 40px rgba(255, 255, 255, 0.5),
            inset 0 0 40px rgba(255, 255, 255, 0.15),
            0 20px 50px rgba(0, 0, 0, 0.3);
    }

    100% {
        border-color: rgba(255, 255, 255, 0.6);
        box-shadow:
            0 0 30px rgba(255, 255, 255, 0.3),
            inset 0 0 30px rgba(255, 255, 255, 0.1),
            0 20px 40px rgba(0, 0, 0, 0.2);
    }
}

.logo-3d {
    width: 85%;
    height: 85%;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 10px 20px rgba(255, 255, 255, 0.4));
}

.animation-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.6;
}

/* ==================== FLOATING CONTROLS ==================== */
.floating-controls-container {
    position: fixed;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10000;
}

.selected-lang-circle, .theme-control-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    color: var(--primary-color);
}

[data-theme="dark"] .selected-lang-circle, 
[data-theme="dark"] .theme-control-btn {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffc400;
}

.selected-lang-circle:hover, .theme-control-btn:hover {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.selected-lang-circle img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.theme-control-btn i {
    font-size: 1.4rem;
}

/* Position dropdown correctly for the new layout */
.index-controls .lang-dropdown-menu {
    left: 70px;
    top: 0;
    transform: translateX(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.index-controls .lang-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* ==================== DARK MODE: UNIFIED FULL-SCREEN LAYOUT ==================== */

/* ---- Glyph-style: Animatsiya = fon, Login = markazda shisha karta ---- */

/* CSS O'zgaruvchilar */
[data-theme="dark"] {
    --bg-body: #050510;
    --text-color: #e2e8ff;
    --panel-bg: rgba(10, 8, 25, 0.88);
    --form-bg: rgba(12, 8, 28, 0.9);
    --input-bg: rgba(5, 3, 15, 0.7);
    --input-border: rgba(255, 255, 255, 0.07);
    --card-shadow: 0 30px 80px rgba(0, 0, 0, 0.75);
    --text-muted: #6b7394;
    --header-bg: rgba(5, 5, 16, 0.8);
}

/* =============== STRUKTURAVIY O'ZGARISH =============== */

/* Body asosiy fon */
[data-theme="dark"] body {
    background: #050510;
}

/* O'NG PANEL → DARK MODEDA TO'LIQ YASHIRISH (canvas animatsiya o'rniga Aurora) */
[data-theme="dark"] .right-section {
    display: none !important;
}

/* CHAP PANEL → TO'LIQ EKRAN */
[data-theme="dark"] .left-section {
    position: relative;
    z-index: 2;
    width: 100% !important;
    flex: 1 1 100% !important;
    background: transparent !important;
    min-height: 100vh;
}

/* =============== AURORA FON =============== */
/* Background container → fixed full-screen kosmik fon */
[data-theme="dark"] .background-container {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #050510;
    z-index: 0;
    overflow: hidden;
}

/* AURORA BLOB-LAR → sekin harakatdagi kosmik dog'lar */
[data-theme="dark"] .gradient-blob {
    display: block !important;
    position: absolute !important;
    border-radius: 50%;
    filter: blur(120px);
    -webkit-filter: blur(120px);
    opacity: 1;
    will-change: transform;
}

/* Blob 1: Katta indigo — yuqori chap */
[data-theme="dark"] .blob-1 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(55, 20, 160, 0.55) 0%, rgba(40, 10, 120, 0.2) 50%, transparent 70%);
    top: -20%;
    left: -15%;
    animation: aurora-1 18s ease-in-out infinite;
}

/* Blob 2: Violet/magenta — pastki o'ng */
[data-theme="dark"] .blob-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(120, 40, 200, 0.45) 0%, rgba(80, 20, 160, 0.15) 50%, transparent 70%);
    bottom: -15%;
    right: -10%;
    animation: aurora-2 22s ease-in-out infinite;
}

/* Blob 3: Och binafsha/pushti — markaz */
[data-theme="dark"] .blob-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(160, 70, 255, 0.3) 0%, rgba(130, 50, 220, 0.1) 50%, transparent 70%);
    top: 35%;
    left: 55%;
    animation: aurora-3 25s ease-in-out infinite;
}

/* ---- Aurora animatsiya keyframe-lari ---- */
@keyframes aurora-1 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }
    25% {
        transform: translate(12vw, 8vh) scale(1.15);
        opacity: 1;
    }
    50% {
        transform: translate(5vw, 18vh) scale(1.05);
        opacity: 0.7;
    }
    75% {
        transform: translate(-5vw, 10vh) scale(1.2);
        opacity: 0.9;
    }
}

@keyframes aurora-2 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.75;
    }
    25% {
        transform: translate(-10vw, -12vh) scale(1.1);
        opacity: 0.9;
    }
    50% {
        transform: translate(-15vw, -5vh) scale(1.2);
        opacity: 0.65;
    }
    75% {
        transform: translate(-5vw, -15vh) scale(0.95);
        opacity: 1;
    }
}

@keyframes aurora-3 {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.7;
    }
    25% {
        transform: translate(-8vw, -10vh) scale(1.2);
        opacity: 0.85;
    }
    50% {
        transform: translate(10vw, 5vh) scale(0.9);
        opacity: 1;
    }
    75% {
        transform: translate(5vw, -8vh) scale(1.1);
        opacity: 0.6;
    }
}

/* =============== HEADER: Glassmorphism =============== */
[data-theme="dark"] .header {
    background: rgba(5, 5, 16, 0.55);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
}

/* =============== NAV: Glassmorphism =============== */
[data-theme="dark"] .nav-container {
    background: rgba(5, 5, 16, 0.45);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

/* Nav tugmalar: neytral, shaffof */
[data-theme="dark"] .nav-btn {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(180, 190, 220, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(15px);
}

[data-theme="dark"] .nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #c8d0f0;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Aktiv tugma: qizil brend */
[data-theme="dark"] .nav-btn[data-panel="admin"].active,
[data-theme="dark"] .nav-btn[data-panel="teacher"].active,
[data-theme="dark"] .nav-btn[data-panel="student"].active {
    background: linear-gradient(135deg, #DC3245 0%, #8B0015 100%);
    box-shadow: 0 6px 28px rgba(220, 50, 69, 0.5), 0 0 40px rgba(220, 50, 69, 0.18);
    border-color: transparent;
    color: white;
}

/* =============== PANELS: Markazda =============== */
[data-theme="dark"] .panels-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 220px);
}

[data-theme="dark"] .panel-wrapper {
    max-width: 480px;
}

/* =============== PANEL HEADER =============== */
[data-theme="dark"] .panel-header h2 {
    color: #e2e8ff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    font-weight: 700;
}

[data-theme="dark"] .panel-header p {
    color: rgba(140, 155, 200, 0.7);
}

[data-theme="dark"] .form-group label {
    color: rgba(180, 195, 230, 0.85);
    letter-spacing: 0.8px;
}

/* =============== IKONALAR =============== */
[data-theme="dark"] .admin-icon,
[data-theme="dark"] .teacher-icon,
[data-theme="dark"] .student-icon {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(180, 150, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(80, 50, 200, 0.15);
}

/* =============== GLASSMORPHISM KARTA (ASOSIY) =============== */
[data-theme="dark"] .glass-card {
    background: rgba(8, 6, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow:
        0 35px 100px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 0 50px rgba(40, 20, 100, 0.05);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}

/* =============== INPUT FIELDLAR =============== */
[data-theme="dark"] .form-group input {
    background: rgba(5, 3, 16, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #c8d0f0;
    box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

[data-theme="dark"] .form-group input::placeholder {
    color: rgba(100, 115, 165, 0.45);
}

/* Focus: qizil accent (brend) */
[data-theme="dark"] .form-group input:focus {
    border-color: rgba(220, 50, 69, 0.5);
    background: rgba(8, 5, 20, 0.8);
    box-shadow:
        0 0 0 3px rgba(220, 50, 69, 0.08),
        0 0 25px rgba(220, 50, 69, 0.08),
        inset 0 2px 12px rgba(0, 0, 0, 0.4);
    color: #e2e8ff;
}

/* Password toggle */
[data-theme="dark"] .password-toggle {
    color: rgba(110, 125, 175, 0.45);
}

[data-theme="dark"] .password-toggle:hover {
    color: rgba(180, 150, 255, 0.8);
}

/* =============== PANEL FOOTER =============== */
[data-theme="dark"] .panel-footer p {
    color: rgba(80, 95, 140, 0.6);
}

/* =============== ROLE TUGMALAR =============== */
[data-theme="dark"] .role-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: rgba(160, 170, 210, 0.7);
    backdrop-filter: blur(15px);
}

[data-theme="dark"] .role-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.12);
    color: #b8c4e8;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .role-btn.active {
    background: linear-gradient(135deg, #DC3245 0%, #8B0015 100%);
    border-color: transparent;
    box-shadow:
        0 6px 28px rgba(220, 50, 69, 0.5),
        0 0 40px rgba(220, 50, 69, 0.15);
    color: white;
}

/* =============== INPUT BORDER ANIMATSIYA =============== */
[data-theme="dark"] .input-border {
    background: linear-gradient(90deg, #DC3245, #ff6b7a);
    box-shadow: 0 0 14px rgba(220, 50, 69, 0.5);
}

/* =============== IQRO LOGOTIPI =============== */
[data-theme="dark"] .logo-iqro {
    background: linear-gradient(135deg, #ff7b8a 0%, #ff3352 50%, #DC3245 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(220, 50, 69, 0.4));
}

/* ACADEMY */
[data-theme="dark"] .highlight-text {
    color: #ffd000;
    -webkit-text-fill-color: #ffd000;
    text-shadow: 0 0 25px rgba(255, 210, 0, 0.4), 0 0 60px rgba(255, 196, 0, 0.15);
}

/* =============== FLOATING TUGMALAR =============== */
[data-theme="dark"] .selected-lang-circle,
[data-theme="dark"] .theme-control-btn {
    background: rgba(8, 6, 22, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    color: #ffc400;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

[data-theme="dark"] .selected-lang-circle:hover,
[data-theme="dark"] .theme-control-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(80, 50, 200, 0.15);
}

/* =============== RESPONSIVE: DARK MODE AURORA =============== */
@media (max-width: 768px) {
    [data-theme="dark"] .nav-container {
        background: rgba(5, 5, 16, 0.7);
    }

    [data-theme="dark"] .header {
        background: rgba(5, 5, 16, 0.75);
    }

    /* Aurora blob-larni kichikroq qilish */
    [data-theme="dark"] .blob-1 { width: 400px; height: 400px; }
    [data-theme="dark"] .blob-2 { width: 350px; height: 350px; }
    [data-theme="dark"] .blob-3 { width: 300px; height: 300px; }
}


@media (max-width: 768px) {
    .floating-controls-container {
        left: auto;
        right: 20px;
        bottom: 20px;
        top: auto;
        transform: none;
        flex-direction: row-reverse;
    }

    .index-controls .lang-dropdown-menu {
        left: auto;
        right: 0;
        bottom: 70px;
        top: auto;
        transform: translateY(10px);
    }

    .index-controls .lang-dropdown-menu.show {
        transform: translateY(0);
    }
}


/* ==================== HEADER ==================== */
.header {
    padding: 30px 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 2000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-height: 60px;
    position: relative;
}

.site-title {
    font-size: 44px;
    font-family: 'Cinzel', 'Trajan Pro', 'Times New Roman', serif;
    font-weight: 700;
    text-align: center;
    letter-spacing: 4px;
    margin: 0;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) skewX(-10deg);
    width: max-content;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-iqro {
    background: linear-gradient(135deg, #DC3245 0%, #B71C1C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight-text {
    color: #ffc400;
    -webkit-text-fill-color: #ffc400;
    background: none;
    text-shadow: 0 2px 10px rgba(255, 196, 0, 0.2);
}

/* ==================== NAVIGATION ==================== */
.nav-container {
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-tabs {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #f0f0f0;
    border: 2px solid transparent;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    min-width: 0;
}

.nav-btn i {
    font-size: 16px;
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.nav-btn.active {
    color: white;
    border-color: transparent;
}

.nav-btn[data-panel="admin"].active {
    background: linear-gradient(135deg, #DC3245 0%, #B71C1C 100%);
    box-shadow: 0 8px 25px rgba(220, 50, 69, 0.4);
}

.nav-btn[data-panel="teacher"].active {
    background: linear-gradient(135deg, #DC3245 0%, #B71C1C 100%);
    box-shadow: 0 8px 25px rgba(220, 50, 69, 0.4);
}

.nav-btn[data-panel="student"].active {
    background: linear-gradient(135deg, #DC3245 0%, #B71C1C 100%);
    box-shadow: 0 8px 25px rgba(220, 50, 69, 0.4);
}

/* ==================== PANELS CONTAINER ==================== */
.panels-container {
    flex: 1;
    position: relative;
    overflow: visible;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    min-height: calc(100vh - 250px);
    -webkit-overflow-scrolling: touch;
}

.panel {
    position: relative;
    width: 100%;
    min-height: 100%;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    overflow: visible;
    padding: 40px 20px;
    box-sizing: border-box;
}

.panel.active {
    display: flex;
    opacity: 1;
    z-index: 10;
    position: relative;
}

.panel-wrapper {
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
    min-height: 600px;
}

/* ==================== PANEL STYLES ==================== */
.admin-panel {
    background: transparent;
}

.teacher-panel {
    background: transparent;
}

.student-panel {
    background: transparent;
}

/* ==================== PANEL HEADER ==================== */
.panel-header {
    text-align: center;
    margin-bottom: 40px;
    color: #333;
    width: 100%;
}

.header-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 20px;
    animation: bounce 2s ease-in-out infinite;
}

.admin-icon {
    background: rgba(220, 50, 69, 0.1);
    color: #DC3245;
    border: 2px solid rgba(220, 50, 69, 0.3);
}

.teacher-icon {
    background: rgba(220, 50, 69, 0.1);
    color: #DC3245;
    border: 2px solid rgba(220, 50, 69, 0.3);
}

.student-icon {
    background: rgba(220, 50, 69, 0.1);
    color: #DC3245;
    border: 2px solid rgba(220, 50, 69, 0.3);
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.panel-header h2 {
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.panel-header p {
    font-size: 1em;
    opacity: 0.95;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* ==================== LOGIN FORM ==================== */
.login-form {
    width: 100%;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.6);
    padding: 50px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-sizing: border-box;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group label i {
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 14px 45px 14px 16px;
    /* Added right padding for icon */
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1em;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    background: white;
    border-color: #DC3245;
    box-shadow: 0 0 0 4px rgba(220, 50, 69, 0.1);
}

.form-group input::placeholder {
    color: #999;
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #a0a0a0;
    transition: all 0.3s ease;
    z-index: 5;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #DC3245;
    transform: translateY(-50%) scale(1.1);
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, #DC3245, #B71C1C);
    transition: width 0.3s ease;
}

.form-group input:focus~.input-border {
    width: 100%;
}

/* ==================== BUTTONS ==================== */
.btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn:hover::before {
    left: 100%;
}

.btn-admin {
    background: linear-gradient(135deg, #DC3245 0%, #B71C1C 100%);
}

.btn-admin:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(220, 50, 69, 0.4);
}

.btn-teacher {
    background: linear-gradient(135deg, #DC3245 0%, #B71C1C 100%);
}

.btn-teacher:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(220, 50, 69, 0.4);
}

.btn-student {
    background: linear-gradient(135deg, #DC3245 0%, #B71C1C 100%);
}

.btn-student:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(220, 50, 69, 0.4);
}

.btn:active {
    transform: translateY(-1px);
}

/* ==================== PANEL FOOTER ==================== */
.panel-footer {
    margin-top: 30px;
    text-align: center;
    color: #666;
    font-size: 0.9em;
    font-weight: 300;
}

/* ==================== SCROLLBAR ==================== */
.panel::-webkit-scrollbar {
    width: 8px;
}

.panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.panel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ==================== ROLE SELECTOR ==================== */
.role-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
    width: 100%;
}

.role-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-btn:hover {
    background: #e8e8e8;
    border-color: #DC3245;
    transform: translateY(-2px);
}

.role-btn.active {
    background: linear-gradient(135deg, #DC3245 0%, #B71C1C 100%);
    border-color: #DC3245;
    color: white;
    box-shadow: 0 8px 20px rgba(220, 50, 69, 0.4);
}

.role-btn i {
    font-size: 16px;
}

/* ==================== RESPONSIVE ==================== */

/* Large Tablets and Small Desktops */
@media (max-width: 1200px) {
    .panel-wrapper {
        max-width: 500px;
    }

    .login-form {
        padding: 35px 30px;
    }
}

/* Tablets */
@media (max-width: 1024px) {
    .container-split {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .left-section {
        flex: 1;
        min-height: 100vh;
    }

    .right-section {
        flex: 0;
        display: none;
    }

    .header {
        padding: 15px 20px;
    }

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

    .main-content {
        padding: 10px 5px;
    }

    .nav-container {
        padding: 15px 20px;
    }

    .panels-container {
        padding: 30px 20px;
        min-height: auto;
        align-items: flex-start;
    }

    .panel {
        position: relative;
        min-height: auto;
    }

    .panel-wrapper {
        max-width: 600px;
    }

    .logo-container {
        width: 180px;
        height: 180px;
    }
}

/* Small Tablets */
@media (max-width: 768px) {

    html,
    body {
        overflow-x: hidden;
        overflow-y: auto;
    }

    .container-split {
        flex-direction: column;
        min-height: 100vh;
    }

    .left-section {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .right-section {
        display: none;
    }

    .header {
        padding: 12px 15px;
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .header-content {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        text-align: center;
    }

    .site-title {
        font-size: 22px;
        width: 100%;
        text-align: center;
        position: relative;
        left: auto;
        top: auto;
        transform: skewX(-10deg);
        justify-content: center;
    }

    .language-selector {
        width: 100%;
        justify-content: center;
    }

    .lang-dropdown-btn {
        width: 100%;
        justify-content: center;
        max-width: 200px;
    }

    .nav-container {
        padding: 12px 15px;
        position: sticky;
        top: 60px;
        z-index: 999;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
    }

    .nav-tabs {
        gap: 8px;
        justify-content: center;
        flex-wrap: nowrap;
    }

    .nav-btn {
        padding: 10px 12px;
        font-size: 11px;
        flex: 1;
        min-width: 0;
        justify-content: center;
        white-space: nowrap;
    }

    .nav-btn i {
        font-size: 13px;
    }

    .nav-btn span {
        font-size: 11px;
    }

    .panels-container {
        padding: 20px 15px;
        min-height: auto;
        align-items: flex-start;
    }

    .panel {
        position: relative;
        min-height: auto;
        padding: 20px 15px;
    }

    .panel {
        position: relative;
        min-height: auto;
    }

    .panel-wrapper {
        max-width: 100%;
        width: 100%;
    }

    .panel-header {
        margin-bottom: 25px;
    }

    .panel-header h2 {
        font-size: 1.8em;
    }

    .panel-header p {
        font-size: 0.9em;
    }

    .header-icon {
        width: 70px;
        height: 70px;
        font-size: 35px;
    }

    .login-form {
        padding: 30px 20px;
        width: 100%;
    }

    .role-selector {
        flex-direction: column !important;
        gap: 12px;
        margin-bottom: 25px;
        width: 100%;
    }

    .role-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }

    .panel-footer {
        font-size: 0.85em;
        margin-top: 20px;
    }

    .gradient-blob {
        filter: blur(70px);
    }

    .blob-1 {
        width: 250px;
        height: 250px;
    }

    .blob-2 {
        width: 220px;
        height: 220px;
    }

    .blob-3 {
        width: 200px;
        height: 200px;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    .floating-lang-container {
        top: auto;
        bottom: 20px;
        left: auto;
        right: 20px;
        transform: none;
    }

    html,
    body {
        overflow-x: hidden;
    }

    .header {
        padding: 10px 12px;
    }

    .header-content {
        gap: 12px;
    }

    .site-title {
        font-size: 20px;
        letter-spacing: 1px;
    }

    .lang-dropdown-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .lang-dropdown {
        min-width: 160px;
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
    }

    .lang-dropdown.show {
        transform: translateX(-50%) translateY(0);
    }

    .nav-container {
        padding: 10px 12px;
    }

    .nav-tabs {
        gap: 6px;
        flex-wrap: wrap;
    }

    .nav-btn {
        padding: 8px 10px;
        font-size: 11px;
        flex: 1;
        min-width: 80px;
        gap: 5px;
    }

    .nav-btn span {
        display: inline;
    }

    .nav-btn i {
        font-size: 12px;
    }

    .panels-container {
        padding: 15px 10px;
        align-items: flex-start;
    }

    .panel {
        position: relative;
        min-height: auto;
        padding: 15px 10px;
    }

    .panel-wrapper {
        padding: 0;
        width: 100%;
    }

    .panel-header {
        margin-bottom: 25px;
    }

    .panel-header h2 {
        font-size: 1.5em;
        margin-bottom: 8px;
    }

    .panel-header p {
        font-size: 0.85em;
    }

    .header-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
        margin-bottom: 15px;
    }

    .login-form {
        padding: 25px 15px;
        border-radius: 15px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .form-group label {
        font-size: 0.8em;
        margin-bottom: 8px;
        gap: 6px;
    }

    .form-group label i {
        font-size: 12px;
    }

    .form-group input {
        padding: 12px 14px;
        font-size: 0.95em;
        border-radius: 10px;
    }

    .role-selector {
        flex-direction: column !important;
        gap: 10px;
        margin-bottom: 20px;
        width: 100%;
        display: flex !important;
    }

    .role-btn {
        width: 100% !important;
        padding: 12px 14px;
        font-size: 0.9em;
        justify-content: center;
        display: flex !important;
    }

    .role-btn i {
        font-size: 14px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9em;
        gap: 8px;
        border-radius: 10px;
    }

    .btn i {
        font-size: 14px;
    }

    .btn span {
        font-size: 0.9em;
    }

    .panel-footer {
        margin-top: 20px;
        font-size: 0.8em;
        padding: 0 5px;
    }

    .gradient-blob {
        filter: blur(60px);
        opacity: 0.2;
    }

    .blob-1 {
        width: 200px;
        height: 200px;
    }

    .blob-2 {
        width: 180px;
        height: 180px;
    }

    .blob-3 {
        width: 150px;
        height: 150px;
    }
}

/* Small Mobile Phones */
@media (max-width: 360px) {
    .site-title {
        font-size: 18px;
    }

    .nav-btn {
        padding: 7px 8px;
        font-size: 10px;
        min-width: 70px;
    }

    .nav-btn span {
        font-size: 10px;
    }

    .panel-header h2 {
        font-size: 1.4em;
    }

    .login-form {
        padding: 20px 12px;
    }

    .form-group input {
        padding: 11px 12px;
        font-size: 0.9em;
    }

    .btn {
        padding: 11px 16px;
        font-size: 0.85em;
    }

    .role-btn {
        padding: 10px 10px;
        font-size: 0.75em;
        width: 100% !important;
    }
}

/* Extra Small Devices */
@media (max-width: 320px) {
    .header {
        padding: 8px 10px;
    }

    .site-title {
        font-size: 16px;
        letter-spacing: 0.5px;
    }

    .nav-container {
        padding: 8px 10px;
    }

    .nav-btn {
        padding: 6px 8px;
        font-size: 9px;
        min-width: 60px;
    }

    .nav-btn i {
        font-size: 11px;
    }

    .panel-header h2 {
        font-size: 1.3em;
    }

    .login-form {
        padding: 18px 10px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-group label {
        font-size: 0.75em;
    }

    .form-group input {
        padding: 10px 12px;
        font-size: 0.85em;
    }

    .btn {
        padding: 10px 14px;
        font-size: 0.8em;
    }

    .header-icon {
        width: 50px;
        height: 50px;
        font-size: 25px;
    }
}

/* Landscape Orientation on Mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .panels-container {
        padding: 15px 20px;
    }

    .panel-header {
        margin-bottom: 20px;
    }

    .panel-header h2 {
        font-size: 1.5em;
    }

    .header-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
        margin-bottom: 10px;
    }

    .login-form {
        padding: 20px 25px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .role-selector {
        margin-bottom: 15px;
    }
}

/* ==================== PREMIUM LOADER ==================== */
body.loading {
    overflow: hidden;
}

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #DC3245 0%, #B71C1C 50%, #DC3245 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: all 1.2s cubic-bezier(0.8, 0, 0.2, 1);
    transform-origin: center;
}

#loader-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.loader-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.8s ease;
}

.loader-logo {
    font-family: 'Cinzel', 'Trajan Pro', 'Times New Roman', serif;
    font-weight: 700;
    font-size: 60px;
    margin-bottom: 20px;
    letter-spacing: 5px;
    animation: loader-pulse 2s infinite ease-in-out;
}

.loader-logo .iqro {
    color: white;
}

.loader-logo .kids {
    color: #ffc400;
}

.loader-bar {
    width: 250px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
}

.loader-progress {
    width: 0;
    height: 100%;
    background: #ffc400;
    box-shadow: 0 0 15px #ffc400;
    animation: loader-progress 2.5s cubic-bezier(0.1, 0, 0.45, 1) forwards;
}

.loader-text {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.8;
}

/* Loader Transition State */
.loader-overlay.transition-start {
    /* Move to the right side where the logo is */
    width: 50vw;
    height: 50vh;
    left: 100%;
    top: 50%;
    transform: translate(-100%, -50%) scale(0);
    border-radius: 50%;
    opacity: 0;
}

.loader-overlay.hidden {
    display: none;
    pointer-events: none;
}

@keyframes loader-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

@keyframes loader-progress {
    0% {
        width: 0;
    }

    30% {
        width: 40%;
    }

    60% {
        width: 70%;
    }

    100% {
        width: 100%;
    }
}

/* ==================== PWA INSTALL BUTTON ==================== */
.btn-install {
    display: none;
    /* Hidden by default */
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #00C853 0%, #009624 100%);
    border: none;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 15px;
    /* Spacing from spacer */
}

.btn-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 200, 83, 0.4);
}

.btn-install i {
    font-size: 16px;
}
/* ==================== PREMIUM CLICKABLE CARDS & MODALS ==================== */
.clickable-card {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.clickable-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.15);
    border-color: #8b5cf6 !important;
}

.clickable-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.clickable-card:hover::after {
    left: 100%;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

.modal-overlay.show {
    opacity: 1;
    display: flex;
}

.modal-overlay .premium-reveal {
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.show .premium-reveal {
    transform: scale(1);
}

/* Salary breakdown row hover */
#salary-teacher-breakdown > div {
    transition: background 0.2s;
}

#salary-teacher-breakdown > div:hover {
    background: #f8fafc;
}


/* ==================== KPI INTERACTIVE EFFECTS ==================== */
@keyframes shake-attention {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    50% { transform: translateX(8px); }
    75% { transform: translateX(-4px); }
}

/* ==================== KPI ATTENTION (SHAKE + GLOW) ==================== */
@keyframes attention-pulse-glow {
    0% { transform: scale(1); box-shadow: 0 0 5px rgba(239, 68, 68, 0.4); border-color: #ef4444; }
    5% { transform: translateX(-5px); }
    10% { transform: translateX(5px); }
    15% { transform: translateX(-5px); }
    20% { transform: translateX(0); }
    50% { transform: scale(1.02); box-shadow: 0 0 40px rgba(239, 68, 68, 0.9), inset 0 0 20px rgba(239, 68, 68, 0.3); border-color: #f87171; }
    100% { transform: scale(1); box-shadow: 0 0 5px rgba(239, 68, 68, 0.4); border-color: #ef4444; }
}

.attention-highlight {
    animation: attention-pulse-glow 1.2s ease-in-out infinite !important;
    transition: all 0.3s ease;
    z-index: 100;
    position: relative;
}
