/* Auth / login screen (Figma Авторизация) */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: var(--bg-secondary-alt);
}

.auth-card {
    width: 100%;
    max-width: 528px;
    background: var(--bg-primary);
    border: 1px solid var(--border-secondary);
    border-radius: 24px;
    padding: 64px;
}

.auth-card__inner {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.auth-card__header {
    text-align: center;
}

.auth-card__title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 600;
    line-height: 32px;
    color: var(--text-primary);
}

.auth-card__subtitle {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: var(--text-tertiary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.auth-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-field {
    position: relative;
}

.auth-field__control {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    background: #fff;
}

.auth-field__control:focus-within {
    border-color: var(--bg-brand);
    outline: none;
}

.auth-field.is-invalid .auth-field__control {
    border-color: var(--bg-brand);
}

.auth-field__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.auth-field__input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 16px;
    line-height: 24px;
    color: var(--text-primary);
}

.auth-field__input::placeholder {
    color: var(--text-quaternary);
}

.auth-field__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.auth-field__label {
    position: absolute;
    top: -8px;
    left: 12px;
    padding: 0 4px;
    background: #fff;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.auth-field.is-invalid .auth-field__label {
    color: var(--bg-brand);
}

.auth-error {
    margin: 0;
    font-size: 14px;
    line-height: 20px;
    color: var(--bg-brand);
}

.auth-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.auth-remember {
    display: flex;
    flex: 1;
    gap: 8px;
    align-items: flex-start;
    min-width: 0;
}

.auth-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: var(--bg-brand);
    flex-shrink: 0;
}

.auth-remember span {
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    color: var(--text-secondary);
}

.auth-forgot {
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    color: var(--text-brand);
    white-space: nowrap;
}

.auth-submit {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    background: var(--bg-brand);
    padding: 12px 18px;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    color: #fff;
    cursor: pointer;
}

.auth-submit:hover {
    filter: brightness(0.96);
}

@media (max-width: 640px) {
    .auth-card {
        padding: 32px 20px;
        border-radius: 16px;
    }
}
