/* ===================================
   Auth Pages — Login / Register / Reset / Apply
=================================== */

html, body { overflow-x: hidden; max-width: 100%; }

.auth-page {
    min-height: 100vh;
    display: flex;
    max-width: 100%;
    overflow-x: hidden;
}

/* --- Left branding panel --- */
.auth-branding {
    width: 420px;
    flex-shrink: 0;
    background: var(--purple);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 300px; height: 300px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}
.auth-branding::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -60px;
    width: 240px; height: 240px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

.branding-content { position: relative; z-index: 1; }

.branding-logo {
    display: inline-flex;
    margin-bottom: 2.5rem;
    text-decoration: none;
}
.branding-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.branding-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.branding-subtitle {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.branding-features { display: flex; flex-direction: column; gap: 1rem; }
.branding-feature {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: rgba(255,255,255,0.88);
    font-size: 0.9rem;
}
.branding-feature-icon {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: white;
}

/* Floating shapes */
.auth-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    animation: authFloat 18s ease-in-out infinite;
}
.auth-shape-1 { width: 100px; height: 100px; top: 12%; left: 8%; animation-delay: 0s; }
.auth-shape-2 { width: 70px; height: 70px; top: 55%; right: 12%; animation-delay: -6s; }
.auth-shape-3 { width: 50px; height: 50px; bottom: 18%; left: 28%; animation-delay: -12s; }

@keyframes authFloat {
    0%, 100% { transform: translate(0,0); }
    33% { transform: translate(15px,-20px); }
    66% { transform: translate(-10px,15px); }
}

/* --- Right form panel --- */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: var(--white);
    overflow-y: auto;
}

.auth-form-container {
    width: 100%;
    max-width: 420px;
}

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    transition: var(--transition-fast);
}
.back-link:hover { color: var(--purple); }

.auth-form-title {
    font-family: var(--font-display);
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.auth-form-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    line-height: 1.5;
}
.auth-form-subtitle a { color: var(--purple); font-weight: 600; }
.auth-form-subtitle a:hover { text-decoration: underline; }

.auth-form-header { margin-bottom: 1.75rem; }

/* Forgot link */
.forgot-link {
    display: block;
    text-align: right;
    font-size: 0.82rem;
    color: var(--purple);
    font-weight: 600;
    margin-bottom: 1.25rem;
    transition: var(--transition-fast);
}
.forgot-link:hover { text-decoration: underline; }

/* Footer */
.auth-form-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.auth-form-footer a { color: var(--purple); font-weight: 600; }
.auth-form-footer a:hover { text-decoration: underline; }

/* Success state */
.auth-success {
    text-align: center;
    animation: fadeUp 0.4s ease;
}
.auth-success .success-icon {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--success-light);
    color: var(--success);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.25rem;
}
.auth-success h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}
.auth-success p {
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    line-height: 1.7;
    font-size: 0.92rem;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tutor apply specific */
.tutor-apply-header { text-align: center; margin-bottom: 1.5rem; }

/* Responsive */
@media (max-width: 1024px) {
    .auth-branding { display: none; }
}
@media (max-width: 768px) {
    .auth-page { overflow-x: hidden; }
    .auth-form-panel { padding: 2rem 1.25rem; align-items: flex-start; }
    .auth-form-title { font-size: 1.6rem; }
    .auth-form-container { width: 100%; max-width: 100%; }
}
@media (max-width: 480px) {
    .auth-form-panel { padding: 1.5rem 1rem; }
    .auth-form-container { max-width: 100%; width: 100%; padding: 0; }
    .form-row { flex-direction: column; }
    .auth-success { padding: 1rem 0; }
    .auth-success h2 { font-size: 1.4rem; }
    /* Prevent any child from overflowing */
    .auth-form-container * { max-width: 100%; }
}
