/**
 * Student / parent login & register — landing-aligned auth pages.
 */

body:has(.account-auth-page) {
    background: var(--landing-bg-hero, #0b1220) !important;
}

.account-auth-page {
    --account-auth-pad-x: clamp(1rem, 4vw, 4.5rem);
    min-height: calc(100vh - var(--landing-header-h, 76px));
    padding: clamp(1.5rem, 4vw, 2.75rem) var(--account-auth-pad-x) clamp(2.5rem, 5vw, 3.5rem);
    box-sizing: border-box;
}

.account-auth-wrap {
    width: 100%;
    max-width: 34rem;
    margin: 0 auto;
}

.account-auth-hero {
    margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
    text-align: center;
}

.account-auth-hero .trial-badge {
    margin-bottom: 0.85rem;
}

.account-auth-hero h1 {
    margin: 0 0 0.55rem;
    font-size: clamp(1.55rem, 3.2vw, 2rem);
    font-weight: 800;
    line-height: 1.25;
    color: var(--landing-dark-ink, #f8fafc);
}

.account-auth-hero .lead {
    margin: 0 auto;
    max-width: 28rem;
    font-size: 0.98rem;
    line-height: 1.65;
    color: var(--landing-dark-muted, #94a3b8);
}

.account-auth-card {
    margin: 0;
    padding: clamp(1.35rem, 3vw, 1.85rem);
}

.account-auth-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.account-auth-fields {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.account-auth-form .trial-field {
    margin-bottom: 0.95rem;
}

.account-auth-form .trial-field label {
    display: block;
    margin-bottom: 0.42rem;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--landing-dark-muted, #94a3b8);
}

.account-auth-form .trial-field input,
.account-auth-form .trial-field select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 3rem;
    padding: 0.72rem 1rem;
    border: 1px solid color-mix(in srgb, var(--c-primary) 24%, var(--landing-dark-border, #2a3a52));
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.4;
    background: var(--landing-dark-surface, #131c2e) !important;
    color: var(--landing-dark-ink, #f8fafc) !important;
    box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 4%, transparent);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

.account-auth-form .trial-field input::placeholder {
    color: color-mix(in srgb, var(--landing-dark-muted, #94a3b8) 55%, transparent);
}

.account-auth-form .trial-field input:focus,
.account-auth-form .trial-field select:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--c-primary) 55%, transparent);
    background: color-mix(in srgb, var(--landing-dark-elevated, #1a2740) 82%, var(--landing-dark-surface, #131c2e)) !important;
    box-shadow:
        inset 0 1px 0 color-mix(in srgb, #fff 5%, transparent),
        0 0 0 3px color-mix(in srgb, var(--c-primary) 20%, transparent);
}

.account-auth-form .trial-field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-inline-end: 2.65rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 0.95rem center;
    background-size: 1rem;
}

[dir="ltr"] .account-auth-form .trial-field select {
    background-position: right 0.95rem center;
    padding-inline-end: 2.65rem;
    padding-inline-start: 1rem;
}

.account-auth-form .trial-field select option {
    background: var(--landing-dark-surface, #131c2e);
    color: var(--landing-dark-ink, #f8fafc);
}

.account-auth-row {
    display: grid;
    gap: 0.95rem;
    margin-bottom: 0.95rem;
}

.account-auth-row--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-auth-row .trial-field {
    margin-bottom: 0;
}

.account-auth-note {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: -0.15rem 0 0.95rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--landing-dark-muted, #94a3b8);
    background: color-mix(in srgb, var(--c-primary) 10%, var(--landing-dark-surface, #131c2e));
    border: 1px solid color-mix(in srgb, var(--c-primary) 18%, var(--landing-dark-border, #2a3a52));
}

.account-auth-note::before {
    content: 'i';
    flex-shrink: 0;
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 0.08rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    font-style: normal;
    color: color-mix(in srgb, var(--c-secondary, #E2AE1A) 85%, #fff);
    background: color-mix(in srgb, var(--c-secondary, #E2AE1A) 18%, transparent);
}

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

.account-auth-password-wrap input {
    padding-inline-end: 3.1rem;
}

.account-auth-password-toggle {
    position: absolute;
    inset-inline-end: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--landing-dark-muted, #94a3b8);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.account-auth-password-toggle:hover {
    color: var(--landing-dark-ink, #f8fafc);
    background: color-mix(in srgb, var(--c-primary) 14%, transparent);
}

.account-auth-captcha {
    margin-top: 0.35rem;
}

.account-auth-captcha .form-math-captcha,
.account-auth-captcha .trial-captcha {
    margin: 0;
}

.account-auth-captcha .trial-captcha__row {
    direction: ltr;
    unicode-bidi: isolate;
    justify-content: flex-start;
}

.account-auth-captcha .trial-captcha__refresh {
    margin-inline-start: auto;
}

.account-auth-form .trial-btn {
    margin-top: 1.15rem;
}

.account-auth-foot {
    margin: 1.25rem 0 0;
    padding-top: 1.15rem;
    border-top: 1px solid var(--landing-dark-border, #2a3a52);
    text-align: center;
    font-size: 0.9rem;
    color: var(--landing-dark-muted, #94a3b8);
}

.account-auth-foot a {
    color: color-mix(in srgb, var(--c-secondary, #E2AE1A) 80%, #fff);
    font-weight: 700;
    text-decoration: none;
}

.account-auth-foot a:hover {
    text-decoration: underline;
}

.account-auth-captcha .trial-captcha__refresh.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

.account-auth-card .trial-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.account-auth-card .text-danger,
.account-auth-card .trial-alert {
    margin-bottom: 1rem;
}

.account-auth-card .hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 640px) {
    .account-auth-page {
        padding-top: 1.15rem;
    }

    .account-auth-hero {
        text-align: start;
    }

    .account-auth-row--2 {
        grid-template-columns: 1fr;
    }

    .account-auth-captcha .trial-captcha__row {
        flex-direction: column;
        align-items: stretch;
    }

    .account-auth-captcha .trial-captcha__question {
        width: 100%;
    }

    .account-auth-captcha .trial-captcha__input {
        max-width: none;
        width: 100%;
    }

    .account-auth-captcha .trial-captcha__refresh {
        margin-inline-start: 0;
        justify-content: center;
        width: 100%;
    }
}
