/* Фоновое изображение для всей секции */
#g-mainbar {
    background-image: url(/templates/g5_helium/custom/images/sampledata/pexels-67117688-8286.jpg.jpg?69b850c2);
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    display: flex; /* Центрируем форму по вертикали */
    align-items: center;
}

/* Универсальный контейнер для Логина, Регистрации, Сброса и Напоминания */
.com-users-login.login, 
.com-users-registration.registration, 
.com-users-remind.remind, 
.com-users-reset.reset,
.com-users-profile.profile-edit {
    max-width: 400px; /* Увеличил для комфортной регистрации */
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Скрытие системных рамок Joomla */
.com-users-login__form.well,
.com-users-registration__form.well,
.com-users-remind__form.well,
.com-users-reset__form.well {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

/* Заголовки страниц (Registration, Forgot Password и т.д.) */
.page-header h1 {
    font-size: 22px;
    text-align: center;
    color: #444;
    margin-bottom: 20px;
    font-weight: 700;
}

/* Группы полей и лейблы */
.control-group {
    margin-bottom: 5px;
    margin-top: 10px;
    position: relative;
}

.control-label label {
    display: block;
    font-weight: 600;
    color: #444;
    font-size: 14px;
    margin-bottom: 5px;
}

/* Универсальные поля ввода */
.form-control, 
input[type="text"], 
input[type="password"], 
input[type="email"],
select {
    width: 100% !important;
    padding: 12px 15px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    transition: all 0.3s ease;
    background-color: #fcfcfc;
    box-sizing: border-box;
}

.form-control:focus, 
input:focus {
    border-color: #99864b !important;
    outline: none;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(153, 134, 75, 0.15) !important;
}

/* Исправление для группы пароля (кнопка "глаз") */
.password-group .input-group,
.input-group {
    display: flex;
    width: 100%;
}

.input-password-toggle, .btn-secondary {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-left: none;
    border-radius: 0 6px 6px 0;
    color: #888;
    padding: 0 15px;
    cursor: pointer;
}

.password-group .form-control, .input-group .form-control {
    border-radius: 6px 0 0 6px !important;
    width: 1% !important;
}

/* Чекбоксы */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.form-check-input {
    margin: 0;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Кнопки Submit (Основная кнопка) */

.com-users-login.login .btn-primary, 
.com-users-registration.registration .btn-primary, 
.com-users-remind.remind .btn-primary, 
.com-users-reset.reset .btn-primary,
.com-users-profile.profile-edit .btn-primary {
    width: 100%;
    padding: 12px;
    background-color: #99864b !important;
    border: none !important;
    border-radius: 6px;
    color: #fff !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 10px;
}
fieldset{
    margin-bottom: 0rem;
}

button[type="submit"]:hover, 
.btn-primary:hover {
    background-color: #7a6b3c !important;
}

/* Нижние ссылки опций (Забыли пароль и т.д.) */
.com-users-login__options, .list-group {
    margin-top: 25px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.list-group-item {
    display: block;
    color: #99864b !important;
    text-decoration: none;
    font-size: 13px;
    padding: 5px 0;
    border: none !important;
    background: transparent !important;
}

.list-group-item:hover {
    color: #444 !important;
    text-decoration: underline;
}

/* Описание под заголовком */
.com-users-login__description.login-description,
.com-users-registration__description {
    text-align: center;
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Ошибки валидации */
.invalid, .is-invalid {
    border-color: #dc3545 !important;
}

.form-control-feedback, .invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    position: absolute;
    top: 100%;
    right: 0;
}

/* Скрываем Passkey везде */
.plg_system_webauthn_login_button {
    display: none !important;
}
.plg_system_webauthn_login_button{
    display: none !important;
}
.com-users-login__description.login-description{
    text-align: center;
    width: 80%;
    margin: 0 auto;
}
/* Кнопки */
.com-users-login__submit .btn-primary {
    width: 100%;
    padding: 12px;
    background-color: #99864b;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.com-users-login__submit .btn-primary:hover {
    background-color: #7a6b3c;
}
.com-users-login.login legend, 
.com-users-registration.registration legend, 
.com-users-remind.remind legend, 
.com-users-reset.reset legend,
.com-users-profile.profile-edit legend{
    font-size: 18px;
    margin: 0;
}