body.auth-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(122, 170, 116, 0.2), transparent 35%),
        radial-gradient(circle at bottom right, rgba(212, 168, 67, 0.16), transparent 32%),
        var(--bg);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(340px, 1.05fr);
    gap: 28px;
    padding: 28px;
}

.auth-shell-wide {
    grid-template-columns: minmax(320px, 0.8fr) minmax(420px, 1.2fr);
}

.auth-panel {
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    background: rgba(250, 247, 240, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: var(--sh-md);
}

.auth-panel-brand {
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    background:
        linear-gradient(145deg, rgba(45, 74, 45, 0.95), rgba(30, 58, 30, 0.96)),
        var(--forest);
    color: white;
}

.auth-panel-brand h1 {
    font-family: var(--font-display);
    font-size: clamp(2.3rem, 5vw, 4rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
    max-width: 10ch;
}

.auth-panel-brand p {
    color: rgba(255, 255, 255, 0.78);
    max-width: 52ch;
    line-height: 1.7;
}

.auth-brand {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: white;
}

.auth-brand .dot {
    color: var(--accent);
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-feature-list,
.auth-steps {
    display: grid;
    gap: 14px;
}

.auth-feature,
.auth-steps div {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--r-lg);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.auth-feature i,
.auth-steps span {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.14);
    color: var(--accent-light);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.auth-feature strong,
.auth-steps div {
    font-size: 0.95rem;
    font-weight: 700;
}

.auth-feature span {
    display: block;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.86rem;
    line-height: 1.55;
}

.auth-panel-form {
    padding: 28px;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 32px;
    min-height: 100%;
}

.auth-card-wide {
    padding: 30px;
}

.auth-card-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--title);
    margin-top: 16px;
}

.auth-card-header p {
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.7;
}

.auth-flash {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 22px;
    padding: 14px 16px;
    border-radius: var(--r-md);
    font-size: 0.92rem;
    line-height: 1.55;
}

.auth-flash-success {
    background: rgba(94, 138, 90, 0.12);
    border: 1px solid rgba(94, 138, 90, 0.28);
    color: var(--green-1);
}

.auth-flash-error {
    background: rgba(182, 95, 61, 0.1);
    border: 1px solid rgba(182, 95, 61, 0.24);
    color: #8c3e24;
}

.auth-form {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

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

.auth-span-full {
    grid-column: 1 / -1;
}

.auth-label {
    display: grid;
    gap: 8px;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--title);
}

.auth-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--r-md);
    border: 1px solid var(--border-med);
    background: var(--bg-2);
    color: var(--title);
    font-family: var(--font-ui);
    font-size: 0.96rem;
    transition: all 0.2s ease;
}

.auth-input:focus {
    outline: none;
    border-color: var(--green-3);
    background: white;
    box-shadow: 0 0 0 3px rgba(74, 114, 72, 0.12);
}

.auth-textarea {
    min-height: 110px;
    resize: vertical;
}

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

.auth-password-wrap .auth-input {
    padding-right: 56px;
}

.auth-password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
}

.auth-submit {
    justify-content: center;
    width: 100%;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.76rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-med);
}

.auth-socials {
    display: grid;
    gap: 12px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    border-radius: var(--r-md);
    font-size: 0.92rem;
    font-weight: 700;
    padding: 12px 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.social-btn:hover {
    transform: translateY(-1px);
}

.btn-google {
    background: white;
    border: 1px solid var(--border-med);
    color: #222;
}

.btn-fb {
    background: #1877f2;
    color: white;
}

.btn-disabled {
    background: var(--bg-2);
    color: var(--muted);
    cursor: not-allowed;
}

.auth-switch {
    margin-top: 22px;
    color: var(--muted);
    text-align: center;
    font-size: 0.9rem;
}

.auth-switch a {
    color: var(--green-1);
    font-weight: 800;
}

.auth-section {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--bg-2);
}

.auth-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.auth-section-head h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--title);
    letter-spacing: -0.03em;
}

.auth-section-head p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.9rem;
}

.auth-section-badge {
    padding: 8px 12px;
    border-radius: var(--r-pill);
    background: rgba(45, 74, 45, 0.08);
    color: var(--green-2);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.subject-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.subject-card {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: var(--r-lg);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid transparent;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.subject-card:hover {
    transform: translateY(-2px);
    border-color: rgba(45, 74, 45, 0.15);
    box-shadow: var(--sh-sm);
}

.subject-card.is-selected {
    border-color: var(--green-3);
    box-shadow: 0 12px 32px rgba(45, 74, 45, 0.12);
}

.subject-card-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.subject-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.subject-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
}

.subject-card strong {
    color: var(--title);
    font-size: 1rem;
}

.subject-card span {
    color: var(--muted);
    font-size: 0.82rem;
}

.subject-card-pick {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: var(--r-pill);
    background: rgba(45, 74, 45, 0.08);
    color: var(--green-2);
    font-weight: 700;
}

.subject-card.is-selected .subject-card-pick {
    background: var(--green-1);
    color: white;
}

.subject-level-select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.auth-summary-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: linear-gradient(135deg, rgba(45, 74, 45, 0.06), rgba(212, 168, 67, 0.12));
}

.auth-summary-box h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--title);
}

.auth-summary-box p {
    margin-top: 6px;
    color: var(--muted);
}

@media (max-width: 1080px) {
    .auth-shell,
    .auth-shell-wide {
        grid-template-columns: 1fr;
    }

    .auth-panel-brand h1 {
        max-width: none;
    }
}

@media (max-width: 720px) {
    .auth-shell {
        padding: 16px;
        gap: 16px;
    }

    .auth-panel-brand,
    .auth-panel-form,
    .auth-card {
        padding: 22px;
    }

    .auth-form-grid,
    .subject-grid {
        grid-template-columns: 1fr;
    }

    .auth-section-head,
    .auth-summary-box {
        flex-direction: column;
        align-items: stretch;
    }
}
