.auth-page {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--color-background);
    box-shadow: none;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    min-height: 100vh;
}

.auth-panel {
    display: flex;
    flex-direction: column;
    padding: 42px clamp(32px, 7vw, 110px);
    background-color: var(--color-background);
}

.auth-brand {
    align-self: flex-start;
}

.auth-content {
    width: 100%;
    max-width: 460px;
    margin: 54px auto 0;
}

.auth-content h1 {
    margin-bottom: 8px;
}

.auth-subtitle {
    margin-top: 0;
    margin-bottom: 30px;
    color: var(--color-muted);
}

.auth-social {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.auth-social button {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
}

.auth-social button:hover {
    border-color: var(--color-accent-border);
    background: var(--color-accent-light);
}

.auth-social button:disabled {
    background: var(--color-surface);
    color: var(--color-muted);
    opacity: 1;
    cursor: not-allowed;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 26px 0;
    color: var(--color-muted);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    height: 1px;
    background-color: var(--color-border);
    content: "";
    flex: 1;
}

.auth-error {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid var(--color-error-border);
    border-radius: 8px;
    background-color: var(--color-error-background);
    color: var(--color-error);
}

.auth-field {
    margin-bottom: 18px;
}

.auth-field label {
    font-size: 14px;
}

.auth-field input {
    width: 100%;
    max-width: none;
    min-height: 48px;
}

.auth-field__error {
    margin: 6px 0 0;
    color: var(--color-error);
    font-size: 13px;
}

.auth-submit {
    width: 100%;
    min-height: 52px;
    margin-top: 12px;
    font-weight: 700;
    box-shadow: 0 3px 10px var(--color-accent-shadow);
}

.auth-register {
    margin-top: 26px;
    color: var(--color-muted);
    text-align: center;
}

.auth-register a {
    font-weight: 600;
    text-decoration: none;
}

.auth-promo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    border-left: 1px solid var(--color-border);
    background-color: var(--color-surface-secondary);
    text-align: center;
}

.auth-promo__icon {
    margin-bottom: 24px;
    font-size: 62px;
    filter: drop-shadow(0 8px 16px var(--color-shadow-strong));
}

.auth-promo h2 {
    margin: 0 0 12px;
    font-size: 32px;
}

.auth-promo > p {
    max-width: 480px;
    margin: 0;
    color: var(--color-muted);
}

.auth-benefits {
    display: flex;
    width: 100%;
    max-width: 420px;
    margin-top: 44px;
    flex-direction: column;
    gap: 12px;
}

.auth-benefit {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background-color: var(--color-surface);
    text-align: left;
}

.auth-benefit > span {
    font-size: 24px;
}

.auth-benefit div {
    display: flex;
    flex-direction: column;
}

.auth-benefit small {
    margin-bottom: 2px;
    color: var(--color-muted);
}

.auth-benefit strong {
    color: var(--color-text);
}

@media (max-width: 900px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-panel {
        min-height: 100vh;
        padding: 32px 24px;
    }

    .auth-promo {
        display: none;
    }
}
.auth-form input,
.auth-form select,
.auth-form textarea {
    width: 100%;
    max-width: none;
}

.auth-form .helptext {
    display: block;
    margin-top: 7px;
    color: var(--color-muted);
    font-size: 12px;
    line-height: 1.45;
}

.auth-form .helptext ul {
    margin: 7px 0 0;
    padding-left: 20px;
}

.auth-form .helptext li {
    margin-bottom: 4px;
}

.auth-form .errorlist {
    margin: 0 0 7px;
    padding: 0;
    color: var(--color-error);
    font-size: 13px;
    list-style: none;
}

.auth-form .errorlist li {
    margin-bottom: 4px;
}

.auth-form p {
    margin-bottom: 18px;
}
.auth-password {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-password input {
    flex: 1;
    width: auto;
    min-width: 0;
}

.auth-password__toggle {
    display: inline-flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background-color: var(--color-surface);
    font-size: 17px;
    cursor: pointer;
}

.auth-password__toggle:hover {
    border-color: var(--color-accent-border);
    background-color: var(--color-accent-light);
}
.auth-field__required {
    margin-left: 3px;
    color: var(--color-error);
}

.auth-role-selector > label {
    margin-bottom: 10px;
}

.auth-role-selector #id_account_type {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.auth-role-selector #id_account_type label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    margin: 0;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
    cursor: pointer;
}

.auth-role-selector #id_account_type > div:has(input:checked) label {
    border-color: var(--color-accent);
    background: var(--color-accent-light);
    color: var(--color-accent-active);
}

.auth-role-selector input,
.auth-form #id_subjects input {
    width: auto;
    min-height: auto;
}

.auth-form #id_subjects {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.auth-form #id_subjects label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 9px 10px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-weight: 500;
}

[data-registration-role][hidden] {
    display: none;
}

@media (max-width: 480px) {
    .auth-role-selector #id_account_type,
    .auth-form #id_subjects {
        grid-template-columns: 1fr;
    }
}
