/**
 * Authentication Module Stylesheet (auth.css)
 * Multi-School Online Quiz & Learning Platform
 * Scoped styles for Student, Teacher, Admin Login & Registration
 */

/* 1. Page & Layout Wrapper */
.auth-main-wrapper {
    background: radial-gradient(100% 100% at 50% 0%, #eef4fb 0%, #f8fafc 100%);
    min-height: calc(100vh - 130px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 0 3.5rem;
}

/* 2. Split Screen Two-Panel Container */
.auth-split-container {
    max-width: 1040px;
    width: 100%;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.10), 0 8px 24px -4px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    animation: authCardEntrance 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes authCardEntrance {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 3. Left Brand Panel */
.auth-brand-panel {
    padding: 3.5rem 2.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    height: 100%;
}

/* Ambient Geometric Glows (CSS-Only) */
.auth-brand-panel::before {
    content: '';
    position: absolute;
    top: -90px;
    right: -80px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.28) 0%, transparent 70%);
    pointer-events: none;
}

.auth-brand-panel::after {
    content: '';
    position: absolute;
    bottom: -90px;
    left: -70px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(15, 76, 129, 0.35) 0%, transparent 70%);
    pointer-events: none;
}

/* Role-Specific Brand Panel Gradients */
.auth-brand-student {
    background: linear-gradient(150deg, #091e3a 0%, #0f4c81 55%, #1e6bb8 100%);
}

.auth-brand-teacher {
    background: linear-gradient(150deg, #092c4c 0%, #0f766e 55%, #0d9488 100%);
}

.auth-brand-admin {
    background: linear-gradient(150deg, #061527 0%, #091e3a 60%, #1e293b 100%);
}

/* Brand Panel Elements */
.auth-brand-top {
    position: relative;
    z-index: 2;
}

.auth-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #ffffff;
    margin-bottom: 2.25rem;
}

.auth-brand-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #ffffff;
}

.auth-brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin: 0;
}

.auth-brand-headline {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.22;
    margin-bottom: 0.85rem;
    color: #ffffff;
    letter-spacing: -0.025em;
}

.auth-brand-desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.auth-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    position: relative;
    z-index: 2;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
}

.auth-feature-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.auth-brand-bottom {
    position: relative;
    z-index: 2;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.825rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

/* 4. Right Form Panel */
.auth-form-panel {
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #ffffff;
}

/* Role Badges */
.auth-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.725rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    margin-bottom: 0.85rem;
}

.auth-role-badge.badge-student {
    background: #eff6ff;
    color: var(--primary);
    border: 1px solid #bfdbfe;
}

.auth-role-badge.badge-teacher {
    background: #f0fdfa;
    color: var(--secondary);
    border: 1px solid #99f6e4;
}

.auth-role-badge.badge-admin {
    background: #f1f5f9;
    color: #092c4c;
    border: 1px solid #cbd5e1;
}

.auth-form-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.4rem;
    letter-spacing: -0.025em;
}

.auth-form-subtitle {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 1.85rem;
    line-height: 1.5;
}

/* 5. Modern Input Design */
.auth-input-group {
    margin-bottom: 1.35rem;
}

.auth-input-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.45rem;
    display: block;
}

.auth-input-group .input-group {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-md);
}

.auth-input-group .input-group-text {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
    padding: 0 1.05rem;
    font-size: 1.15rem;
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
    transition: all 0.18s ease;
}

.auth-input-group .form-control {
    height: 52px;
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
    padding: 0.65rem 1rem;
    color: #0f172a;
    transition: all 0.18s ease;
}

.auth-input-group .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3.5px rgba(15, 76, 129, 0.12);
    outline: none;
    background-color: #ffffff;
}

.auth-input-group .input-group:focus-within .input-group-text {
    border-color: var(--primary);
    color: var(--primary);
    background-color: #eff6ff;
}

/* Teacher form focus color */
.theme-teacher .auth-input-group .form-control:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3.5px rgba(13, 148, 136, 0.15);
}
.theme-teacher .auth-input-group .input-group:focus-within .input-group-text {
    border-color: var(--secondary);
    color: var(--secondary);
    background-color: #f0fdfa;
}

/* Admin form focus color */
.theme-admin .auth-input-group .form-control:focus {
    border-color: #092c4c;
    box-shadow: 0 0 0 3.5px rgba(9, 44, 76, 0.16);
}
.theme-admin .auth-input-group .input-group:focus-within .input-group-text {
    border-color: #092c4c;
    color: #092c4c;
    background-color: #f1f5f9;
}

.auth-input-group .toggle-password-btn {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    padding: 0 1.05rem;
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
    font-size: 1.15rem;
    transition: all 0.15s ease;
}

.auth-input-group .toggle-password-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* 6. Action Buttons */
.auth-submit-btn {
    height: 52px;
    font-size: 1.025rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-student {
    background-color: var(--primary);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(15, 76, 129, 0.22);
}

.btn-student:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 76, 129, 0.32);
}

.btn-teacher {
    background-color: var(--secondary);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.25);
}

.btn-teacher:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.35);
}

.btn-admin {
    background-color: #091e3a;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(9, 30, 58, 0.28);
}

.btn-admin:hover {
    background-color: #0f2b4c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(9, 30, 58, 0.38);
}

/* 7. Secondary Links & Footers */
.auth-meta-links {
    margin-top: 1.85rem;
    text-align: center;
    font-size: 0.925rem;
    color: #64748b;
}

.auth-meta-links a {
    font-weight: 700;
    text-decoration: none;
    transition: color 0.15s ease;
}

.auth-meta-links a:hover {
    text-decoration: underline;
}

.auth-back-home {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #64748b;
    font-size: 0.885rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: 1.35rem;
    transition: all 0.18s ease;
}

.auth-back-home:hover {
    color: var(--primary);
    transform: translateX(-3px);
}

/* 8. Registration Card Layout */
.auth-register-wrapper {
    max-width: 920px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 20px 50px -10px rgba(15, 23, 42, 0.10);
    padding: 3rem 2.75rem;
    animation: authCardEntrance 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.auth-register-header {
    text-align: center;
    margin-bottom: 2.25rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.auth-section-divider {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    padding-bottom: 0.65rem;
    margin-bottom: 1.35rem;
    border-bottom: 2px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 9. Responsive Rules */
@media (max-width: 991.98px) {
    .auth-main-wrapper {
        padding: 1.75rem 0.75rem 2.5rem;
        min-height: auto;
    }

    .auth-split-container {
        max-width: 520px;
        border-radius: 16px;
    }

    .auth-brand-panel {
        display: none;
    }

    .auth-form-panel {
        padding: 2.5rem 1.85rem;
    }

    .auth-register-wrapper {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }
}

@media (max-width: 575.98px) {
    .auth-form-panel {
        padding: 2rem 1.25rem;
    }

    .auth-form-title {
        font-size: 1.55rem;
    }

    .auth-input-group .form-control,
    .auth-submit-btn {
        height: 48px;
    }

    .auth-register-wrapper {
        padding: 1.5rem 1rem;
    }
}
