/* ============================================
   AUTH PAGES — Login & Register
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.auth-page {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    background: #f0f4f8;
}

body.auth-register {
    overflow-y: auto;
}

body.auth-login {
    overflow: hidden;
}

/* ===== LEFT PANEL ===== */
.left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 40px;
}

.left-panel.login-theme {
    background: linear-gradient(145deg, #1e3a5f 0%, #2d6a9f 40%, #4a90d9 100%);
}

.left-panel.register-theme {
    background: linear-gradient(145deg, #1b5e20 0%, #2e7d32 40%, #43a047 100%);
}

.left-panel::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    top: -100px;
    left: -100px;
}

.left-panel::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    bottom: -80px;
    right: -60px;
}

.edu-illustration {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
}

/* Login icon grid */
.edu-icon-grid {
    display: grid;
    grid-template-columns: repeat(3, 80px);
    gap: 16px;
    margin: 0 auto 40px;
}

.edu-icon-item {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: rgba(255, 255, 255, 0.9);
    animation: float 3s ease-in-out infinite;
}

.edu-icon-item:nth-child(1) {
    animation-delay: 0s;
}

.edu-icon-item:nth-child(2) {
    animation-delay: 0.3s;
}

.edu-icon-item:nth-child(3) {
    animation-delay: 0.6s;
}

.edu-icon-item:nth-child(4) {
    animation-delay: 0.9s;
}

.edu-icon-item:nth-child(5) {
    animation-delay: 0.4s;
    background: rgba(255, 255, 255, 0.18);
    font-size: 2rem;
}

.edu-icon-item:nth-child(6) {
    animation-delay: 0.7s;
}

.edu-icon-item:nth-child(7) {
    animation-delay: 1s;
}

.edu-icon-item:nth-child(8) {
    animation-delay: 0.5s;
}

.edu-icon-item:nth-child(9) {
    animation-delay: 0.8s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Register big icon */
.edu-big-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #fff;
    animation: float 3s ease-in-out infinite;
}

.edu-features {
    list-style: none;
    padding: 0;
    margin-top: 30px;
    text-align: left;
}

.edu-features li {
    padding: 8px 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    gap: 10px;
}

.edu-features li i {
    color: rgba(255, 255, 255, 0.6);
    width: 20px;
}

.edu-illustration h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.edu-illustration p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    max-width: 340px;
}

/* ===== RIGHT PANEL ===== */
.right-panel {
    width: 500px;
    min-width: 460px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 50px;
    background: #fff;
}

.right-panel.register-panel {
    width: 540px;
    min-width: 500px;
    padding: 30px 50px;
    overflow-y: auto;
}

.form-wrapper {
    width: 100%;
    max-width: 420px;
}

.brand-header {
    margin-bottom: 36px;
}

.brand-header .logo-badge {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 16px;
}

.logo-badge.login-badge {
    background: linear-gradient(135deg, #1e3a5f, #4a90d9);
}

.logo-badge.register-badge {
    background: linear-gradient(135deg, #1b5e20, #43a047);
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
    border-radius: 12px;
}

.brand-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 4px;
}

.brand-header p {
    font-size: 0.9rem;
    color: #718096;
}

/* ===== FORM STYLES ===== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.compact {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-field {
    position: relative;
}

.input-field i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.input-field input {
    width: 100%;
    padding: 13px 14px 13px 44px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.92rem;
    color: #2d3748;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.input-field input.compact-input {
    padding: 11px 12px 11px 38px;
    border-radius: 10px;
    font-size: 0.88rem;
}

.input-field input::placeholder {
    color: #a0aec0;
}

.input-field input:focus {
    outline: none;
    background: #fff;
}

.input-field input.login-input:focus {
    border-color: #4a90d9;
    box-shadow: 0 0 0 4px rgba(74, 144, 217, 0.1);
}

.input-field input.register-input:focus {
    border-color: #43a047;
    box-shadow: 0 0 0 4px rgba(67, 160, 71, 0.1);
}

.input-field input:focus~i {
    color: #4a90d9;
}

.input-field input.register-input:focus~i {
    color: #43a047;
}

.field-error {
    color: #dc2626;
    font-size: 0.72rem;
    margin-top: 3px;
}

/* ===== BUTTONS ===== */
.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1e3a5f, #2d6a9f);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 4px;
    letter-spacing: 0.3px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 58, 95, 0.35);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-register {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 4px;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(27, 94, 32, 0.35);
}

/* ===== LINKS ===== */
.auth-link {
    text-align: center;
    margin-top: 24px;
    font-size: 0.85rem;
    color: #718096;
}

.auth-link a {
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.auth-link a.login-link {
    color: #2d6a9f;
}

.auth-link a.login-link:hover {
    color: #1e3a5f;
}

.auth-link a.register-link {
    color: #2e7d32;
}

.auth-link a.register-link:hover {
    color: #1b5e20;
}

/* ===== ERRORS ===== */
.error-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.error-list li {
    background: #fef2f2;
    color: #dc2626;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    margin-bottom: 6px;
    border-left: 3px solid #dc2626;
}

/* ===== MESSAGES ===== */
.msg-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.msg-alert {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 20px;
    color: #2d3748;
    font-size: 0.85rem;
    margin-bottom: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    animation: msg-slide-in 0.3s ease;
}

@keyframes msg-slide-in {
    from {
        transform: translateX(100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .left-panel {
        display: none;
    }

    .right-panel,
    .right-panel.register-panel {
        width: 100%;
        min-width: auto;
    }

    body.auth-page {
        justify-content: center;
    }
}

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .right-panel,
    .right-panel.register-panel {
        padding: 20px;
    }
}