:root {
    --auth-page-top: #f7f8f2;
    --auth-page-bottom: #eef1e4;
    --auth-card-border: #d9dfc7;
    --auth-card-subtle: #eef1e4;
    --auth-card-surface: #ffffff;
    --auth-card-soft: #f8fbf0;
    --auth-text-strong: #102a43;
    --auth-text-default: #243b53;
    --auth-text-muted: #52606d;
    --auth-brand-teal: #00a19c;
    --auth-brand-teal-dark: #007f7b;
    --auth-accent-olive: #91af3d;
    --auth-primary-blue: #0b6e99;
    --auth-primary-blue-dark: #0a5d82;
    --auth-danger: #ce352c;
    --auth-danger-soft: #fff1f0;
    --auth-warning: #ff9900;
    --auth-warning-soft: #fff7e8;
    --auth-success: #5f7b1f;
    --auth-success-soft: #f4f8e8;
    --auth-shadow: 0 18px 46px rgba(15, 23, 42, 0.12);
}

.auth-page {
    display: grid;
    align-items: center;
    min-height: 100%;
    padding: 24px 0;
    box-sizing: border-box;
    overflow: auto;
    background:
        radial-gradient(circle at top right, rgba(0, 161, 156, 0.12), transparent 32%),
        radial-gradient(circle at bottom left, rgba(145, 175, 61, 0.12), transparent 28%),
        linear-gradient(180deg, var(--auth-page-top) 0%, var(--auth-page-bottom) 100%);
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(300px, 1.05fr) minmax(340px, 0.95fr);
    max-width: 1060px;
    margin: 0 auto;
    border: 1px solid var(--auth-card-border);
    border-radius: 20px;
    overflow: hidden;
    background: var(--auth-card-surface);
    box-shadow: var(--auth-shadow);
}

.auth-shell--single {
    grid-template-columns: minmax(340px, 620px);
    max-width: 620px;
}

.auth-shell--single .auth-shell__form {
    padding: 30px 28px 26px;
}

.auth-shell--single .auth-shell__header {
    margin-bottom: 18px;
}

.auth-shell__intro {
    position: relative;
    padding: 36px 34px 34px;
    background:
        linear-gradient(135deg, rgba(0, 161, 156, 0.08) 0%, rgba(145, 175, 61, 0.16) 100%),
        linear-gradient(180deg, #fcfdf8 0%, #f5f8ed 100%);
    border-right: 1px solid var(--auth-card-subtle);
}

.auth-shell__intro::after {
    content: "";
    position: absolute;
    right: 28px;
    bottom: 28px;
    width: 148px;
    height: 148px;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(0, 161, 156, 0.14) 0%, rgba(11, 110, 153, 0.08) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.auth-shell__eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(0, 161, 156, 0.1);
    color: var(--auth-brand-teal-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.auth-shell__title {
    margin: 18px 0 10px;
    color: var(--auth-text-strong);
    font-size: 32px;
    line-height: 1.08;
}

.auth-shell__copy {
    max-width: 38ch;
    margin: 0;
    color: var(--auth-text-muted);
    font-size: 13px;
    line-height: 1.7;
}

.auth-shell__list {
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.auth-shell__list li {
    position: relative;
    margin-bottom: 12px;
    padding-left: 18px;
    color: var(--auth-text-default);
    font-size: 12px;
    line-height: 1.6;
}

.auth-shell__list li::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--auth-accent-olive);
}

.auth-shell__form {
    padding: 34px 32px 30px;
    background: var(--auth-card-surface);
}

.auth-shell__header {
    margin-bottom: 20px;
}

.auth-shell__header h2 {
    margin: 0;
    color: var(--auth-text-strong);
    font-size: 22px;
    line-height: 1.2;
}

.auth-shell__header p {
    margin: 8px 0 0;
    color: var(--auth-text-muted);
    font-size: 12px;
    line-height: 1.55;
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-field {
    display: grid;
    gap: 6px;
}

.auth-field label {
    color: var(--auth-text-strong);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-field input {
    width: 100%;
    min-height: 40px;
    padding: 10px 12px;
    border: 1px solid var(--auth-card-border);
    border-radius: 11px;
    box-sizing: border-box;
    background: #ffffff;
    color: var(--auth-text-default);
    font-size: 13px;
}

.auth-field input:focus {
    border-color: var(--auth-primary-blue);
    box-shadow: 0 0 0 3px rgba(11, 110, 153, 0.14);
    outline: 0;
}

.auth-alert {
    padding: 12px 14px;
    border: 1px solid var(--auth-card-border);
    border-radius: 12px;
    background: var(--auth-success-soft);
    color: var(--auth-text-default);
    font-size: 12px;
    line-height: 1.55;
}

.auth-alert--error {
    border-color: rgba(206, 53, 44, 0.28);
    background: var(--auth-danger-soft);
    color: #7f1d1d;
}

.auth-alert--warning {
    border-color: rgba(255, 153, 0, 0.28);
    background: var(--auth-warning-soft);
    color: #8a4b00;
}

.auth-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 4px;
}

.auth-actions--stacked {
    flex-wrap: wrap;
}

.auth-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid var(--auth-primary-blue);
    border-radius: 999px;
    background: linear-gradient(180deg, var(--auth-primary-blue) 0%, var(--auth-primary-blue-dark) 100%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
}

.auth-button:hover {
    border-color: var(--auth-primary-blue-dark);
}

.auth-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.auth-link {
    color: var(--auth-brand-teal-dark);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.auth-link:hover {
    color: var(--auth-brand-teal);
    text-decoration: underline;
}

.auth-strength {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--auth-card-border);
    border-radius: 14px;
    background: linear-gradient(180deg, #fbfcf8 0%, #f5f8ed 100%);
}

#password_strength {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    width: 150px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

#password_hint {
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--auth-card-subtle);
    border-radius: 10px;
    background: #ffffff;
    color: var(--auth-text-muted);
    font-size: 11px;
    line-height: 1.5;
}

.auth-requirements {
    display: grid;
    gap: 6px;
}

.auth-requirement {
    color: var(--auth-text-muted);
    font-size: 11px;
}

.valid {
    color: var(--auth-success);
    font-weight: 700;
}

.invalid {
    color: var(--auth-danger);
}

.very_weak {
    color: #ffffff;
    background: var(--auth-danger);
}

.weak {
    color: #ffffff;
    background: #d97706;
}

.medium {
    color: #1f2937;
    background: #facc15;
}

.strong {
    color: #ffffff;
    background: #65a30d;
}

.very_strong {
    color: #ffffff;
    background: #166534;
}

.status-page {
    display: grid;
    place-items: center;
    min-height: 100%;
    padding: 24px 0;
    box-sizing: border-box;
    background:
        radial-gradient(circle at top right, rgba(0, 161, 156, 0.08), transparent 30%),
        linear-gradient(180deg, var(--auth-page-top) 0%, var(--auth-page-bottom) 100%);
}

.status-card {
    width: min(640px, 100%);
    padding: 32px 34px;
    border: 1px solid var(--auth-card-border);
    border-radius: 18px;
    background: var(--auth-card-surface);
    box-shadow: var(--auth-shadow);
    box-sizing: border-box;
}

.status-card__eyebrow {
    margin: 0 0 10px;
    color: var(--auth-brand-teal-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-card h2 {
    margin: 0 0 10px;
    color: var(--auth-text-strong);
    font-size: 24px;
    line-height: 1.15;
}

.status-card p {
    margin: 0;
    color: var(--auth-text-muted);
    font-size: 12px;
    line-height: 1.7;
}

.status-card__actions {
    margin-top: 20px;
}

.status-card--error {
    border-color: rgba(206, 53, 44, 0.28);
}

.status-card--error .status-card__eyebrow {
    color: var(--auth-danger);
}

.status-card--warning {
    border-color: rgba(255, 153, 0, 0.28);
}

.status-card--warning .status-card__eyebrow {
    color: var(--auth-warning);
}

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

    .auth-shell__intro {
        border-right: 0;
        border-bottom: 1px solid var(--auth-card-subtle);
    }

    .auth-shell__intro::after {
        display: none;
    }
}

@media (max-width: 640px) {
    .auth-page,
    .status-page {
        padding: 12px 0;
    }

    .auth-shell__intro,
    .auth-shell__form,
    .status-card {
        padding: 24px 20px;
    }

    .auth-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-button {
        width: 100%;
    }
}
