/* Auth pages — login, forgot password, reset password */

.auth-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--brand-font-family, 'Inter', system-ui, sans-serif);
    background: var(--brand-page-bg, #f4f9fc);
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
}

.auth-shell {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}

/* Brand panel */
.auth-brand {
    position: relative;
    flex: 0 0 42%;
    max-width: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
    background: linear-gradient(
        145deg,
        var(--brand-primary-darker, #125a82) 0%,
        var(--brand-primary, #29abe2) 55%,
        var(--brand-primary-dark, #1a8fc4) 100%
    );
    overflow: hidden;
}

.auth-brand__inner {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
}

.auth-brand__logo {
    width: min(200px, 70vw);
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.15));
}

.auth-brand__school {
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.auth-brand__tagline {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.88;
}

.auth-brand__glow {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    top: -80px;
    right: -60px;
    pointer-events: none;
}

.auth-brand__glow::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    bottom: -120px;
    left: -100px;
}

/* Form side */
.auth-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 20px;
    padding: 2.25rem 2rem;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 12px 40px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.auth-card__logo-mobile {
    display: none;
    width: 120px;
    height: auto;
    margin: 0 auto 1.25rem;
}

.auth-card__title {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.auth-card__subtitle {
    margin: 0 0 1.75rem;
    font-size: 0.9375rem;
    color: #64748b;
    line-height: 1.5;
}

.auth-field {
    margin-bottom: 1.125rem;
}

.auth-field label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

.auth-password-wrap {
    position: relative;
}

.auth-input--password {
    padding-right: 2.85rem;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    color: #64748b;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color 0.15s, background 0.15s;
}

.auth-password-toggle:hover {
    color: var(--brand-primary, #29abe2);
    background: rgba(var(--brand-primary-rgb, 41, 171, 226), 0.08);
}

.auth-password-toggle__icon--hide {
    display: none;
}

.auth-password-toggle.is-visible .auth-password-toggle__icon--show {
    display: none;
}

.auth-password-toggle.is-visible .auth-password-toggle__icon--hide {
    display: block;
}

.auth-input {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-family: inherit;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    box-sizing: border-box;
}

.auth-input::placeholder {
    color: #94a3b8;
}

.auth-input:hover {
    border-color: #cbd5e1;
}

.auth-input:focus {
    outline: none;
    background: #fff;
    border-color: var(--brand-primary, #29abe2);
    box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb, 41, 171, 226), 0.18);
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 0.25rem 0 0;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.875rem;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.auth-check input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--brand-primary, #29abe2);
    cursor: pointer;
}

.auth-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--brand-primary, #29abe2);
    text-decoration: none;
    transition: color 0.15s;
}

.auth-link:hover {
    color: var(--brand-primary-dark, #1a8fc4);
    text-decoration: underline;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.8rem 1.25rem;
    margin-top: 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

.auth-btn--primary {
    color: var(--brand-button-text, #fff);
    background: var(--brand-button-bg, #29abe2);
    box-shadow: 0 4px 14px rgba(var(--brand-button-bg-rgb, 41, 171, 226), 0.35);
}

.auth-btn--primary:hover {
    background: var(--brand-button-hover-bg, #1a8fc4);
}

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

.auth-btn--outline {
    margin-top: 0.75rem;
    color: var(--brand-primary, #29abe2);
    background: transparent;
    border: 1.5px solid #e2e8f0;
    box-shadow: none;
}

.auth-btn--outline:hover {
    border-color: var(--brand-primary, #29abe2);
    background: rgba(var(--brand-primary-rgb, 41, 171, 226), 0.06);
}

.auth-alert {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-radius: 10px;
    line-height: 1.45;
}

.auth-alert--error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.auth-alert--success {
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
}

.auth-back:hover {
    color: var(--brand-primary, #29abe2);
}

.auth-footer {
    margin: 1.5rem 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
}

/* Mobile */
@media (max-width: 900px) {
    .auth-shell {
        flex-direction: column;
    }

    .auth-brand {
        flex: none;
        max-width: none;
        padding: 2rem 1.5rem 2.25rem;
    }

    .auth-brand__logo {
        width: 100px;
        margin-bottom: 0.75rem;
    }

    .auth-brand__school {
        font-size: 1.1rem;
    }

    .auth-brand__tagline {
        font-size: 0.85rem;
    }

    .auth-main {
        padding: 0 1rem 2rem;
        margin-top: -1.25rem;
    }

    .auth-card {
        padding: 1.75rem 1.35rem;
        border-radius: 16px;
    }

    .auth-card__title {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        box-shadow: 0 8px 30px rgba(15, 23, 42, 0.07);
    }
}
