/**
 * Стили форм входа, регистрации и «Забыли пароль» (split-layout, periwinkle blue).
 * Без анкеты по культуре безопасности.
 */
body.auth-page nav.navbar,
body.auth-page header,
body.auth-page .message-alert {
    display: none !important;
}
.container-fluid.auth-full {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    min-height: 100vh;
    display: flex !important;
    flex-direction: column !important;
}
.container-fluid.auth-full .auth-wrap {
    flex: 1;
}

.auth-wrap {
    min-height: 100vh;
    display: flex;
    flex-wrap: wrap;
    background: #f8f9fa;
    transition: background 0.3s ease;
}
/* Изначально: слева форма входа, справа синяя панель с кнопкой «Регистрация» */
.auth-panel {
    transition: flex 0.35s ease, border-radius 0.3s ease;
    flex: 1 1 45%;
    min-height: 50vh;
    min-width: 280px;
    background: linear-gradient(135deg, #6b7fd7 0%, #5a6fc6 100%);
    border-radius: 0 1.5rem 1.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #fff;
    text-align: center;
}
.auth-wrap.auth-login .auth-panel { order: 2; border-radius: 1.5rem 0 0 1.5rem; }
.auth-wrap.auth-register .auth-panel { order: 1; border-radius: 1.5rem 0 0 1.5rem; }
.auth-wrap.auth-forgot .auth-panel { order: 2; border-radius: 1.5rem 0 0 1.5rem; }

.auth-panel h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.auth-panel p {
    opacity: 0.95;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}
.auth-panel .btn-outline-light {
    border: 2px solid #fff;
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    font-weight: 600;
    transition: all 0.2s;
}
.auth-panel .btn-outline-light:hover {
    background: #fff;
    color: #6b7fd7;
}

.auth-form-side {
    flex: 1 1 55%;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #fff;
    transition: opacity 0.3s ease, flex 0.35s ease;
}
.auth-form-side .auth-card {
    width: 100%;
    max-width: 420px;
    border-radius: 1.25rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    padding: 2.5rem;
}
.auth-brand {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, #6b7fd7 0%, #5a6fc6 100%);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(107, 127, 215, 0.25);
}
.auth-form-side .auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
}

.auth-input-wrap {
    display: flex;
    align-items: stretch;
    width: 100%;
    background: #f0f1f3;
    border: 1px solid #e2e4e8;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1rem;
}
.auth-input-wrap:focus-within {
    border-color: #6b7fd7;
    box-shadow: 0 0 0 3px rgba(107, 127, 215, 0.2);
}
.auth-input-wrap .form-control {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.875rem 1rem 0.875rem 1.25rem;
    font-size: 1rem;
}
.auth-input-wrap .form-control::placeholder {
    color: #9ca3af;
}
.auth-input-wrap .input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    color: #6b7280;
    font-size: 1.1rem;
}

.auth-btn-primary {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    border: none;
    background: linear-gradient(135deg, #6b7fd7 0%, #5a6fc6 100%);
    color: #fff;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
}
.auth-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(107, 127, 215, 0.4);
    color: #fff;
}
a.auth-btn-primary {
    display: block;
    text-align: center;
    text-decoration: none;
    color: #fff;
}
a.auth-btn-primary:hover { color: #fff; }

.auth-forgot-link {
    display: block;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    text-decoration: none;
}
.auth-forgot-link:hover {
    color: #6b7fd7;
}

.auth-divider {
    text-align: center;
    color: #9ca3af;
    font-size: 0.85rem;
    margin: 1rem 0;
}
.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
}
.auth-switch p { margin: 0; color: #6b7280; font-size: 0.95rem; }
.auth-switch a { color: #6b7fd7; font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* Блок формы регистрации: скрыт по умолчанию, при .auth-show-register — справа, панель уезжает влево */
.auth-register-side {
    display: none;
    flex: 1;
    min-width: 280px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #fff;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.35s ease, flex 0.35s ease;
}
.auth-wrap.auth-show-register .auth-form-side {
    display: none !important;
}
.auth-wrap.auth-show-register .auth-panel {
    flex: 0 0 38%;
    min-width: 260px;
    order: 1;
    border-radius: 1.5rem 0 0 1.5rem;
}
.auth-wrap.auth-show-register .auth-register-side {
    display: flex !important;
    order: 2;
    opacity: 1;
}
.auth-register-side .auth-card {
    width: 100%;
    max-width: 520px;
}

@media (max-width: 767px) {
    .auth-panel { min-height: 180px; border-radius: 0 0 1.5rem 1.5rem !important; }
    .auth-wrap.auth-login .auth-panel,
    .auth-wrap.auth-forgot .auth-panel { order: 1; border-radius: 0 0 1.5rem 1.5rem !important; }
    .auth-wrap.auth-register .auth-panel { order: 1; border-radius: 0 0 1.5rem 1.5rem !important; }
    .auth-form-side { order: 2; padding: 1.5rem 1rem; }
    .auth-wrap.auth-show-register .auth-panel { flex: 0 0 auto; min-height: 160px; }
    .auth-wrap.auth-show-register .auth-register-side { padding: 1.5rem 1rem; }
}

/* Подсветка полей с ошибками — красная рамка (работает после POST с ошибками валидации) */
.auth-form-side .form-control.is-invalid,
.auth-form-side .form-select.is-invalid,
.auth-register-side .form-control.is-invalid,
.auth-register-side .form-select.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}
