/* === Страница входа === */

body.auth-body {
    background:
        radial-gradient(circle at 10% -10%, rgba(65, 93, 132, 0.18), transparent 45%),
        radial-gradient(circle at 100% 110%, rgba(65, 93, 132, 0.09), transparent 40%),
        var(--color-bg);
}

.auth-page {
    display: flex;
    justify-content: center;
    max-width: 900px;
    margin: 2.5rem auto;
}

/* --- Карточка входа --- */

.auth-card {
    background: var(--color-surface);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.auth-title {
    font-size: 1.6rem;
    color: var(--color-primary);
    margin-bottom: 0.4rem;
}

.auth-subtitle {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.75rem;
}

.auth-form .form-field {
    margin-bottom: 1.25rem;
}

.auth-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.4rem;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-form input[type="text"]:focus,
.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(65, 93, 132, 0.25);
}

.auth-submit {
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.5rem;
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.auth-submit:hover {
    background-color: var(--color-primary-hover);
}

.auth-alert {
    background: var(--color-danger-bg);
    border: 1px solid rgba(179, 38, 30, 0.3);
    color: var(--color-danger);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.field-error {
    color: var(--color-danger);
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

/* --- Поле пароля с переключателем видимости --- */

.password-field {
    position: relative;
}

.password-field input[type="password"],
.password-field input[type="text"] {
    padding-right: 2.75rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.6rem;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: none;
    border: none;
    color: var(--color-text-soft);
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--color-primary);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

.password-toggle .icon-eye-off {
    display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye {
    display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye-off {
    display: block;
}

/* --- Ссылка "нет доступа" под формой --- */

.auth-more-info {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-info-trigger {
    background: none;
    border: none;
    padding: 0;
    color: var(--color-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.auth-info-trigger:hover {
    color: var(--color-primary-hover);
}

/* --- Модальное окно с инструкцией по регистрации --- */

.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(43, 38, 32, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1000;
}

.auth-modal-overlay[hidden] {
    display: none;
}

.auth-modal {
    position: relative;
    background: var(--color-surface-alt);
    border-radius: 12px;
    padding: 2rem 2.25rem;
    max-width: 480px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.auth-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.9rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--color-text-muted);
    cursor: pointer;
}

.auth-modal-close:hover {
    color: var(--color-text);
}

.auth-modal h2 {
    font-size: 1.15rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    padding-right: 1.5rem;
}

.auth-info-lead {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.auth-steps {
    list-style: none;
    padding-left: 0;
    margin: 0;
    text-align: left;
}

.auth-step {
    display: flex;
    gap: 0.9rem;
    position: relative;
    padding-bottom: 1.5rem;
}

.auth-step:last-child {
    padding-bottom: 0;
}

.auth-step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 0.875rem;
    top: 1.9rem;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}

.auth-step-number {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.auth-step-body {
    flex: 1;
    padding-top: 0.15rem;
}

.auth-step-title {
    display: block;
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.auth-step-text {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.auth-checklist {
    list-style: none;
    margin: 0.6rem 0 0;
    padding: 0.75rem 0.9rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.auth-checklist li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.85rem;
    color: var(--color-text);
    line-height: 1.4;
}

.auth-checklist li::before {
    content: '';
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
}

/* --- Адаптив --- */

@media (max-width: 480px) {
    .auth-card {
        padding: 1.75rem;
    }

    .auth-modal {
        padding: 1.75rem;
    }
}
