﻿
/* ==========================================================================
   СИСТЕМНЫЕ УВЕДОМЛЕНИЯ JOOMLA 6 (ЧИСТЫЙ CSS / ШРИФТ Montserrat / ЦВЕТ #0F4C81)
   ========================================================================== */

/* Контейнер для всех всплывающих сообщений */
#system-message-container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
}

/* Базовый стиль плашки сообщения Joomla 6 */
joomla-alert {
  display: block;
  margin-bottom: 15px;
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  box-sizing: border-box;
}

/* 1. УСПЕШНОЕ ДЕЙСТВИЕ (Success) — использует ваш цвет #0F4C81 */
joomla-alert[type="success"], 
joomla-alert.alert-success {
  background-color: #f0fdfa !important;
  border: 1px solid rgba(0, 191, 165, 0.2) !important;
  color: #132f53 !important;
}

/* Добавляем красивую галочку перед текстом успешного сообщения */
joomla-alert[type="success"]::before,
joomla-alert.alert-success::before {
  content: "✓";
  color: #0F4C81 !important;
  font-weight: 700;
  margin-right: 10px;
  font-size: 1.1rem;
}

/* 2. СООБЩЕНИЕ ОБ ОШИБКЕ (Danger / Error) */
joomla-alert[type="danger"], 
joomla-alert[type="error"],
joomla-alert.alert-danger {
  background-color: #fff5f5 !important;
  border: 1px solid rgba(229, 62, 62, 0.15) !important;
  color: #132f53 !important;
}

joomla-alert[type="danger"]::before,
joomla-alert.alert-danger::before {
  content: "✕";
  color: #e53e3e !important;
  font-weight: 700;
  margin-right: 10px;
}

/* Кнопка закрытия сообщения (Крестик справа) */
joomla-alert .joomla-alert-button-close,
joomla-alert button.close,
joomla-alert .btn-close {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #718096;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  transition: color 0.2s ease;
}

joomla-alert .joomla-alert-button-close:hover {
  color: #132f53;
}

#system-message-container joomla-alert .alert-heading {
	display: none;
}

/* Выравниваем сам контейнер сообщения через Flexbox */
#system-message-container joomla-alert {
  display: flex !important;
  align-items: center; /* Центрирует иконку и текст строго по вертикали */
  /* Оставляем остальные ваши стили padding, border-radius и т.д. */
}

/* Стили для галочки (Успех) */
#system-message-container joomla-alert[type="success"]::before, 
#system-message-container joomla-alert.alert-success::before {
  content: "✓";
  color: #0F4C81 !important;
  font-weight: 700;
  font-size: 1.1rem;
  margin-right: 12px;
  margin-left: 15px;
  line-height: 1; /* Обнуляем высоту строки символа, чтобы он не косил */
  flex-shrink: 0; /* Защита от сжатия символа */
}

/* Стили для крестика (Ошибка) */
#system-message-container joomla-alert[type="danger"]::before, 
#system-message-container joomla-alert[type="error"]::before,
#system-message-container joomla-alert.alert-danger::before {
  content: "✕";
  color: #e53e3e !important;
  font-weight: 700;
  font-size: 1rem;
  margin-right: 12px;
  margin-left: 15px;
  line-height: 1; /* Обнуляем высоту строки символа */
  flex-shrink: 0; /* Защита от сжатия символа */
}


/* ==========================================================================
   СОВРЕМЕННЫЙ СТИЛЬ ТАБЛИЦЫ ПОКАЗАНИЙ (ЧИСТЫЙ CSS / БЕЗ BOOTSTRAP)
   ========================================================================== */

/* 1. Обертка карточки и адаптивный контейнер */
.card-body.p-0 {
  background-color: #ffffff;
  border: 1px solid #eef2f5;
  border-radius: 8px;
  overflow: hidden; /* Округляет углы таблицы по краям карточки */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.table-responsive {
  width: 100%;
  overflow-x: auto; /* Добавляет горизонтальную прокрутку, если таблица не влазит в мобильный экран */
  -webkit-overflow-scrolling: touch;
}

/* 2. Базовые стили таблицы */
.table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: collapse; /* Убирает двойные рамки */
  font-size: 0.9rem;
  color: #495057;
  text-align: center; /* Центрирование контента из класса text-center */
}

/* Выравнивание содержимого по центру по вертикали (align-middle) */
.table th,
.table td {
  padding: 12px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #eef2f5;
}

/* 3. Стилизация шапки таблицы (thead) */
.table thead.table-light {
  background-color: #f8f9fa;
}

.table th.text-muted.small.text-uppercase {
  color: #8a92a6 !important; /* Серый приглушенный цвет */
  font-size: 0.75rem; /* Уменьшенный размер текста */
  font-weight: 700;   /* Жирный шрифт для структуры */
  text-transform: uppercase; /* Все буквы заглавные */
  letter-spacing: 0.5px;    /* Небольшой межбуквенный интервал */
  border-bottom: 2px solid #eef2f5;
}

/* 4. Стилизация строк и ячеек (tbody) */
/* Эффект зебры — чередование цветов строк (table-striped) */
.table tbody tr:nth-of-type(odd) {
  background-color: #ffffff;
}

.table tbody tr:nth-of-type(even) {
  background-color: #fbfcfe; /* Мягкий нежно-голубой/серый оттенок для четных строк */
}

/* Эффект подсветки строки при наведении мыши (table-hover) */
.table tbody tr:hover {
  background-color: #f1f5fa;
  transition: background-color 0.15s ease-in-out;
}

/* Стили для ячейки с датой (text-muted small) */
.table td.text-muted.small {
  color: #6c757d;
  font-size: 0.85rem;
}

/* Стили для ячейки с показаниями (fw-bold text-dark) */
.table td .fw-bold.text-dark {
  font-weight: 700;
  color: #132f53; /* Фирменный глубокий темно-синий цвет для цифр */
}

/* Удаляем нижнюю рамку у последней строки таблицы */
.table tbody tr:last-child td {
  border-bottom: none;
}



/* ==========================================================================
   ХЛЕБНЫЕ КРОШКИ ВО ВСЮ ШИРИНУ ЭКРАНА (ЧИСТЫЙ CSS / БЕЗ BOOTSTRAP)
   ========================================================================= */

/* 1. Внешняя обертка (убираем ограничения контейнера) */
.breadcrumbs {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 16px 0 !important; /* Отступ только снизу, до контента */
  box-sizing: border-box;
}

/* 2. Основной список (растягиваем во всю ширину) */
.mod-breadcrumbs.breadcrumb {
 /*display: flex;
  flex-wrap: wrap;
  align-items: center;*/
  list-style: none;
  margin: 0;
  
  /* Внутренние отступы: 12px сверху/снизу, а боковые выравниваем по сетке сайта (20px) */
  padding: 12px 20px !important; 
  
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  
  /* Стили подложки */
  background-color: transparent; 
  border-top: 1px solid #eef2f5;
  border-bottom: 1px solid #d6d9da;
  border-left: none !important;  /* Убираем боковые рамки, так как полоса идет в край */
  border-right: none !important;
  border-radius: 0 !important;   /* Убираем скругление углов */
  font-size: 0.85rem;
  box-shadow: 0px 1px 0px #fff;
}

/* 3. Элементы списка (ссылки и разделители) */
.mod-breadcrumbs .breadcrumb-link {
  display: inline;
  /* align-items: center; */
  color: #6c757d;
}

/* Стилизация ссылок-путей */
.mod-breadcrumbs .breadcrumb-link a.pathway {
  color: #0F4C81;
  text-decoration: none;
  font-weight: normal;
  transition: color 0.2s ease-in-out;
}

.mod-breadcrumbs .breadcrumb-link a.pathway:hover {
  color: #132f53;
  text-decoration: underline;
}

/* Последний активный (текущий) пункт */
.mod-breadcrumbs .breadcrumb-link.active span {
  color: #495057;
  font-weight: normal;
  pointer-events: none;
}

/* Иконка локации (домик) в самом начале */
.mod-breadcrumbs .icon-location {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 4px;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F4C81' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpath d='M9 22V12h6v10'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Современный стрелочный разделитель между пунктами */
.mod-breadcrumbs .breadcrumb-link:not(:first-child)::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 8px 0 2px;
  border-right: 1px solid #a0aec0;
  border-top: 1px solid #a0aec0;
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* Оптимизация для мобильных экранов */
@media (max-width: 576px) {
  .mod-breadcrumbs.breadcrumb {
    padding: 10px 15px !important; /* Немного зажимаем поля на смартфонах */
  }
  .mod-breadcrumbs .breadcrumb-link:not(:first-child)::before {
    margin: 0 8px;
  }
}


/* ==========================================================================
   СОВРЕМЕННЫЙ СТИЛЬ КАРТОЧКИ С ИСПОЛЬЗОВАНИЕМ ЦВЕТА #0F4C81
   ========================================================================== */

/* 1. Внешняя обертка и сам блок карточки */
.snt-cabinet-wrapper.my-3 {
  margin-top: 1rem !important;
  margin-bottom: 1rem !important;
  padding: 0 20px;
  box-sizing: border-box;
}

.snt-cabinet-wrapper .card {
	background-color: #ffffff;
	border-radius: 8px !important;
	border: 1px solid #e2e8f0;
	overflow: hidden;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* 2. Шапка карточки (Новый фирменный бирюзово-зеленый цвет) */
.snt-cabinet-wrapper .card-header.bg-success {
  background-color: #0F4C81 !important; /* Ваш новый цвет */
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}

.snt-cabinet-wrapper .card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 !important;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff !important;
}

/* Номер участка (Бейдж внутри новой шапки) */
.snt-cabinet-wrapper .badge.bg-light.text-success {
  background-color: #ffffff !important;
  color: #0F4C81 !important; /* Текст в цвет шапки */
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* 3. Тело карточки */
.snt-cabinet-wrapper .card-body.p-4 {
  padding: 1.5rem !important;
}

/* Флекс-сетка вместо Bootstrap */
.snt-cabinet-wrapper .row.g-3 {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Подписи полей */
.snt-cabinet-wrapper .text-muted.small.text-uppercase {
	color: #8a92a6 !important;
	font-size: 0.85rem;
	font-weight: 600;
	/* text-transform: uppercase; */
	/* letter-spacing: 0.5px; */
	display: block;
	margin-bottom: 4px;
}

/* Блок лицевого счета */
.snt-cabinet-wrapper .col-12.border-bottom {
  border-bottom: 1px solid #eef2f5 !important;
  padding-bottom: 1rem !important;
}

.snt-cabinet-wrapper .fs-5.text-dark {
  font-size: 1.25rem;
  font-weight: 700;
  color: #132f53 !important;
}

/* Адаптивное разделение на две колонки для ПК */
@media (min-width: 576px) {
  .snt-cabinet-wrapper .row.g-3 {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .snt-cabinet-wrapper .col-12 {
    width: 100%;
  }

  .snt-cabinet-wrapper .col-md-6 {
    width: calc(50% - 0.65rem);
  }
  
  .snt-cabinet-wrapper .col-md-6.border-end {
    border-end: none !important;
    border-right: 1px solid #eef2f5 !important;
    padding-right: 0.65rem;
  }
}

/* Стилизация цифр */
.snt-cabinet-wrapper .fs-4 {
  font-size: 1.5rem;
  font-weight: 700;
  display: block;
  margin-top: 2px;
}

.snt-cabinet-wrapper .text-primary {
  color: #2a69b8 !important; /* Наш синий */
}

.snt-cabinet-wrapper .text-success {
  color: #2ECC71 !important; /* К оплате 0.00 ₽ вашим новым цветом */
}

/* 4. Подвал карточки */
.snt-cabinet-wrapper .card-footer.bg-light {
  background-color: #f8f9fa;
  border-top: 1px solid #eef2f5;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.snt-cabinet-wrapper .ms-auto {
  margin-left: auto !important;
}

/* Строка об отсутствии долгов */
.snt-cabinet-wrapper .text-success.small {
  color: #2ECC71 !important; /* Текст инфо-строки вашим цветом */
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-block;
}

/* ==========================================================================
   СОВРЕМЕННЫЙ СТИЛЬ ДЛЯ ФУТЕРА КАРТОЧКИ (ОПЛАТА И КВИТАНЦИЯ)
   ========================================================================== */


/* Базовые общие стили для обеих кнопок */
.card-footer .btn {
  font-family: 'Montserrat', sans-serif;      /* Подключаем ваш фирменный шрифт */
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  padding: 10px 24px;
  border-radius: 8px;                     /* Трендовое скругление углов */
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 1. Кнопка «Открыть квитанцию (PDF)» */
.card-footer .btn-outline-success {
  color: #16a34a !important;             /* Насыщенный читаемый зеленый цвет */
  border: 1px solid #bbf7d0 !important;   /* Мягкая пастельная рамка вместо стандартной яркой */
  background-color: #ffffff;
}

/* Эффект при наведении на квитанцию */
.card-footer .btn-outline-success:hover {
  color: #ffffff !important;
  background-color: #16a34a !important;  /* Плавная заливка зеленым */
  border-color: #16a34a !important;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.15);
  transform: translateY(-1px);            /* Легкий интерактивный подъем */
}

/* Настройка иконки PDF внутри кнопки */
.card-footer .btn-outline-success svg {
  transition: transform 0.2s ease;
}
.card-footer .btn-outline-success:hover svg {
  transform: scale(1.1);                  /* Мягкое увеличение иконки при наведении */
}

/* 2. Кнопка «Оплатить онлайн» */
.card-footer .btn-danger {
  background-color: #e11d48 !important;  /* Современный кораллово-красный оттенок */
  border: 1px solid #e11d48 !important;
  color: #ffffff !important;
}

/* Эффект при наведении на оплату */
.card-footer .btn-danger:hover {
  background-color: #be123c !important;  /* Чуть более глубокий оттенок */
  border-color: #be123c !important;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.2);
  transform: translateY(-1px);
}

/* Эффект нажатия (активное состояние) для обеих кнопок */
.card-footer .btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   Адаптивность для мобильных телефонов (Ширина 575px и меньше)
   ========================================================================== */
@media (max-width: 575px) {
  
  /* Перестраиваем контейнер в вертикальный стек */
  .card-footer.d-flex {
    flex-direction: column !important;
    align-items: stretch !important;       /* Растягиваем кнопки на всю ширину экрана */
    gap: 12px;                             /* Расстояние между кнопками по вертикали */
    padding: 16px !important;
  }

  /* Выравниваем текст внутри ссылок и кнопок по центру */
  .card-footer .btn {
    width: 100% !important;
    justify-content: center;
    text-align: center;
    padding: 12px 16px;                   /* Увеличиваем высоту кнопок для удобного нажатия пальцем */
  }

  .snt-cabinet-wrapper .card-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .snt-cabinet-wrapper .badge {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
  
  .snt-cabinet-wrapper .card-footer {
    justify-content: center;
  }
  
  .snt-cabinet-wrapper .ms-auto {
    margin-left: 0 !important;
  }

/* Настройка иконки карты внутри кнопки оплаты */
.card-footer .btn-danger svg {
  transition: transform 0.2s ease;
}

/* Мягкое увеличение иконки карты при наведении на кнопку */
.card-footer .btn-danger:hover svg {
  transform: scale(1.1);
}

  .card-footer .btn-danger {
    justify-content: center; /* Центрируем иконку и текст внутри растянутой кнопки */
  }
}


/* ==========================================================================
   ФОРМА ПЕРЕДАЧИ ПОКАЗАНИЙ (ЧИСТЫЙ CSS / ШРИФТ Montserrat / ЦВЕТ #0F4C81)
   ========================================================================== */

/* 1. Основной контейнер карточки */
.snt-meters-wrapper.my-4 {
  margin-top: 1.5rem !important;
  margin-bottom: 1.5rem !important;
  padding: 0 20px;
  box-sizing: border-box;
}

.snt-meters-wrapper .card {
  background-color: #ffffff;
  border-radius: 8px !important; /* Соответствует rounded-3 */
  border: 1px solid #eef2f5 !important;
  box-shadow: 0 10px 30px rgba(19, 47, 83, 0.05) !important;
  overflow: hidden;
  font-family: 'Montserrat', sans-serif;
}

/* 2. Шапка карточки (Основной синий бренд-бар с иконкой спидометра) */
.snt-meters-wrapper .card-header.bg-primary {
  background-color: #0F4C81 !important;
  padding: 1rem 1.5rem !important;
}

.snt-meters-wrapper .card-title {
  display: flex;
  align-items: center;
  margin: 0 !important;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff !important;
}

/* Иконка спидометра в шапке */
.snt-meters-wrapper .card-title svg.bi-speedometer2 {
  margin-right: 10px;
  color: #ffffff;
  flex-shrink: 0;
}

/* 3. Тело формы */
.snt-meters-wrapper .card-body.p-4 {
  padding: 1.5rem !important;
}

/* Полноценная сетка для полей ввода (заменяет row g-4) */
.snt-meters-wrapper .row.g-4 {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .snt-meters-wrapper .row.g-4 {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .snt-meters-wrapper .col-md-6 {
    width: calc(50% - 0.75rem); /* Две колонки на ПК */
  }
  .snt-meters-wrapper .col-12 {
    width: 100%;
  }
}

/* Текстовые подписи (Labels) */
.snt-meters-wrapper .form-label.small.text-muted.text-uppercase.fw-bold {
  color: #8a92a6 !important;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 6px;
}

/* 4. Группы полей ввода с суффиксами (кВт, м³) */
.snt-meters-wrapper .input-group {
  display: flex;
  width: 100%;
  border: 1px solid #dcdfe6;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

/* Поля ввода (Инпуты) */
.snt-meters-wrapper .form-control.snt-calc-input {
  flex: 1;
  border: none !important;
  padding: 10px 14px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  color: #132f53;
  background-color: #ffffff;
  outline: none !important;
  margin: 0;
}

/* Суффиксы (Единицы измерения) */
.snt-meters-wrapper .input-group-text {
  background-color: #f4f6f9;
  color: #6c757d;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  border-left: 1px solid #dcdfe6;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* Эффект фокуса на поле ввода */
.snt-meters-wrapper .input-group:focus-within {
  border-color: #2a69b8;
  box-shadow: 0 0 0 3px rgba(42, 105, 184, 0.15);
}

/* Подстрочные блоки (Предыдущие показания и расчет) */
.snt-meters-wrapper .d-flex.justify-content-between.small.text-muted {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 6px;
}

.snt-meters-wrapper .d-flex.justify-content-between.small.text-muted strong {
  color: #132f53;
}

/* Скрытый по умолчанию промежуточный расчет по конкретному счетчику */
.snt-meters-wrapper .text-primary {
  color: #2a69b8 !important;
  font-weight: 600;
}

/* 5. Итоговая плашка расчета (Динамический блок) */
.snt-meters-wrapper #snt_total_box .p-3.bg-light.rounded-3.border {
  background-color: #f8f9fa !important;
  border: 1px solid #eef2f5 !important;
  border-radius: 8px;
  padding: 1rem 1.25rem !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

/* Итоговая сумма вашим фирменным цветом */
.snt-meters-wrapper #snt_total_sum {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0F4C81 !important; /* Ваш цвет */
}

/* 6. Подвал формы и синяя кнопка отправки */
.snt-meters-wrapper .text-end.mt-4.pt-2.border-top {
  border-top: 1px solid #eef2f5 !important;
  padding-top: 1.25rem !important;
  margin-top: 0.5rem !important;
  display: flex;
  justify-content: flex-end;
}

.snt-meters-wrapper .btn.btn-primary {
  background-color: #2a69b8 !important;
  color: #ffffff !important;
  border: none !important;
  padding: 12px 28px !important;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px !important;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.snt-meters-wrapper .btn.btn-primary:hover {
  background-color: #1c5297 !important; /* Более глубокий синий при наведении */
}

.snt-meters-wrapper .btn.btn-primary:active {
  transform: scale(0.98); /* Легкий отклик при физическом нажатии */
}

/* Оптимизация плашки расчета под экраны телефонов */
@media (max-width: 575.98px) {
  .snt-meters-wrapper #snt_total_box .p-3.bg-light.rounded-3.border {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .snt-meters-wrapper .btn.btn-primary {
    width: 100%; /* Кнопка на весь экран на телефонах */
    text-align: center;
  }
}

/* ==========================================================================
   УВЕДОМЛЕНИЕ ОБ УСПЕШНОЙ ПЕРЕДАЧЕ ПОКАЗАНИЙ (ЦВЕТ #0F4C81 / ШРИФТ Montserrat)
   ========================================================================== */

/* Контейнер тела карточки, в котором лежит плашка */
.card-body.p-4 {
  padding: 1.5rem !important;
  font-family: 'Montserrat', sans-serif;
}

/* Основной блок уведомления */
.card-body.p-4 .alert.alert-success {
  background-color: #f0fdfa !important; /* Сверхлегкий, мягкий пастельно-бирюзовый фон */
  border: 1px solid rgba(0, 191, 165, 0.15) !important; /* Тонкая рамка вашего цвета #0F4C81 */
  border-radius: 8px !important;
  padding: 1.25rem 1.5rem !important;
  margin-bottom: 0 !important;
  box-sizing: border-box;
  width: 100%;
}

/* Оболочка выравнивания иконки и текста (замена d-flex и align-items-center) */
.card-body.p-4 .alert .d-flex {
  display: flex !important;
  align-items: center !important;
  gap: 16px; /* Фиксированный отступ между иконкой галочки и текстом */
}

/* Иконка галочки (✓) */
.card-body.p-4 .alert strong.fs-4 {
  font-size: 1.75rem !important;
  line-height: 1;
  color: #0F4C81 !important; /* Ваш фирменный цвет */
  font-weight: 700;
  margin-right: 0 !important; /* Сбрасываем старый Bootstrap-отступ me-3 */
  user-select: none;
}

/* Текстовый контейнер */
.card-body.p-4 .alert p.fw-bold {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: #132f53 !important; /* Глубокий темно-синий для отличной читаемости главного текста */
  margin: 0 0 4px 0 !important; /* Небольшой отступ до подзаголовка */
  line-height: 1.4;
}

/* Дополнительное описание (Ожидайте формирования квитанций...) */
.card-body.p-4 .alert span.small.text-muted {
  font-size: 0.85rem !important;
  font-weight: 400;
  color: #6c757d !important; /* Спокойный серый цвет для второстепенного текста */
  display: block;
  line-height: 1.4;
}

/* Адаптивность под маленькие экраны телефонов */
@media (max-width: 480px) {
  .card-body.p-4 .alert .d-flex {
    flex-direction: column !important; /* На совсем маленьких экранах выстраиваем по вертикали */
    align-items: center !important;
    text-align: center;
    gap: 12px;
  }
}


/* ==========================================================================
   ТРЕНДОВОЕ СВЕТЛОЕ ВЕРТИКАЛЬНОЕ МЕНЮ (ШРИФТ Montserrat / ЦВЕТ #0F4C81)
   ========================================================================== */

/* Главный контейнер-карточка меню */
.snt-sidebar-nav {
  list-style: none !important;
  margin: 0 !important;
  padding: 8px !important;
  width: 100%;
  max-width: 290px; /* Трендовая ширина сайдбара */
  background-color: #ffffff;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(19, 47, 83, 0.02);
  font-family: 'Montserrat', sans-serif;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Строгие элементы списка */
.snt-sidebar-nav li.snt-sidebar-li {
  position: relative; /* Базовая точка отсчета для вылета подменю */
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block;
}

/* Ссылки (Пункты меню) */
.snt-sidebar-nav .snt-sidebar-link-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #4a5568 !important;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none !important;
  padding: 12px 14px !important;
  border-radius: 8px;
  background-color: transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  cursor: pointer;
}

/* Левая часть (иконка + текст) */
.snt-sidebar-nav .snt-menu-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Стилизация иконки */
.snt-sidebar-nav .menu-icon-img {
  color: #a0aec0; /* Спокойный серый цвет для иконок на ПК */
  transition: color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

/* Трендовый Apple-эффект наведения на пункт меню */
.snt-sidebar-nav li.snt-sidebar-li:hover > .snt-sidebar-link-btn {
  color: #1a202c !important;
  background-color: #f7fafc;
}

.snt-sidebar-nav li.snt-sidebar-li:hover .menu-icon-img {
  color: #2a69b8; /* Иконка загорается фирменным синим при наведении */
  transform: scale(1.05);
}

.snt-sidebar-nav .snt-menu-arrow {
  color: #cbd5e0;
  transition: transform 0.2s ease, color 0.2s;
}

/* АКТИВНЫЙ ПУНКТ (Ваш фирменный бирюзовый цвет #0F4C81) */
.snt-sidebar-nav li.is-current > .snt-sidebar-link-btn {
  color: #ffffff !important;
  background-color: #0F4C81 !important; /* Насыщенная бирюзовая заливка */
  font-weight: 600;
 /*  box-shadow: 0 4px 14px rgba(0, 191, 165, 0.2);*/
}

.snt-sidebar-nav li.is-current > .snt-sidebar-link-btn .menu-icon-img,
.snt-sidebar-nav li.is-current > .snt-sidebar-link-btn .snt-menu-arrow {
  color: #ffffff !important; /* Элементы становятся чисто белыми */
}

/* ==========================================================================
   ВЫЛЕТАЮЩЕЕ ВПРАВО ВТОРОЕ УРОВЕНЬ МЕНЮ (DROPDOWN RIGHT)
   ========================================================================== */
.snt-sidebar-nav ul.snt-sidebar-dropdown-right {
  position: absolute;
  top: -4px;         /* Идеальное выравнивание по верхней кромке активной кнопки */
  left: 100%;       /* Выталкиваем блок строго в правую сторону от сайдбара */
  width: 250px;     /* Ширина выпадающей панели */
  margin: 0 0 0 12px !important; /* Умный зазор в 12px между меню и подменю */
  padding: 6px !important;
  list-style: none !important;
  background-color: #ffffff;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  box-shadow: 15px 15px 35px rgba(19, 47, 83, 0.06); /* Премиальная мягкая тень */
  box-sizing: border-box;
  z-index: 500;
  
  /* Эффект плавного проявления со сдвигом */
  opacity: 0;
  visibility: hidden;
  transform: translateX(-8px);
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.2s;
}

/* Раскрытие подменю при наведении мыши (Hover) */
.snt-sidebar-nav li.snt-sidebar-li:hover > ul.snt-sidebar-dropdown-right {
  opacity: 1;
  visibility: visible;
  transform: translateX(0); /* Мягкое скольжение вправо */
}

/* Ссылки внутри выпадающего списка */
.snt-sidebar-nav ul.snt-sidebar-dropdown-right a {
  display: block;
  padding: 10px 14px !important;
  color: #4a5568 !important;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none !important;
  border-radius: 8px;
  transition: all 0.15s ease;
}

/* Hover для подпунктов второго уровня */
.snt-sidebar-nav ul.snt-sidebar-dropdown-right li:hover > a {
  color: #0F4C81 !important; /* Текст загорается бирюзовым */
  background-color: #f0fdfa; /* Мягкая пастельная подложка */
}

/* Активный подпункт */
.snt-sidebar-nav ul.snt-sidebar-dropdown-right li.is-current a,
.snt-sidebar-nav ul.snt-sidebar-dropdown-right li.active a {
  color: #0F4C81 !important;
  background-color: #f0fdfa;
  font-weight: 600;
}


/* ==========================================================================
   ПЛОСКОЕ ОДНОУРОВНЕВОЕ МЕНЮ (ШРИФТ Montserrat / ЦВЕТ #0F4C81)
   ========================================================================== */

/* Общие базовые стили карточки меню сохраняются */
.snt-sidebar-nav.snt-flat-menu {
  list-style: none !important;
  margin: 0 !important;
  padding: 8px !important;
  width: 100%;
  max-width: 320px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  font-family: 'Montserrat', sans-serif;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.snt-sidebar-nav.snt-flat-menu li.snt-sidebar-li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block;
}

/* Кнопки меню */
.snt-sidebar-nav.snt-flat-menu .snt-sidebar-link-btn {
  display: flex;
  align-items: center;
  color: #4a5568 !important;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none !important;
  padding: 12px 14px !important;
  border-radius: 8px;
  background-color: transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  cursor: pointer;
}

.snt-sidebar-nav.snt-flat-menu .snt-menu-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.snt-sidebar-nav.snt-flat-menu .menu-icon-img {
  color: #a0aec0;
  transition: color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

/* Hover эффект */
.snt-sidebar-nav.snt-flat-menu li.snt-sidebar-li:hover > .snt-sidebar-link-btn {
  color: #1a202c !important;
  background-color: #f7fafc;
}

.snt-sidebar-nav.snt-flat-menu li.snt-sidebar-li:hover .menu-icon-img {
  color: #008BD0;
  transform: scale(1.05);
}

/* Активный пункт меню (#0F4C81) */
.snt-sidebar-nav.snt-flat-menu li.is-current > .snt-sidebar-link-btn {
	color: #0F4C81 !important;
	background-color: #EFFAFF !important;
	font-weight: 600;
	/* box-shadow: 0 4px 14px rgba(0, 191, 165, 0.2); */
}

.snt-sidebar-nav.snt-flat-menu li.is-current > .snt-sidebar-link-btn .menu-icon-img {
  color: #0F4C81 !important;
}

/* СТИЛИЗАЦИЯ ВЛОЖЕННЫХ ПОДПУНКТОВ (Они теперь в общем ряду) */
.snt-sidebar-nav.snt-flat-menu li.snt-sub-item {
  padding-left: 0 !important; /* Трендовый сдвиг вправо для индикации вложенности */
}

.snt-sidebar-nav.snt-flat-menu li.snt-sub-item .snt-sidebar-link-btn {
  padding: 10px 14px !important; /* Чуть компактнее по высоте */
}

.snt-sidebar-nav.snt-flat-menu li.snt-sub-item .snt-menu-item-title {
  font-size: 0.9rem; /* Шрифт подпунктов слегка меньше */
  color: #718096;
}

.snt-sidebar-nav.snt-flat-menu li.snt-sub-item:hover .snt-menu-item-title {
  color: #1a202c;
}

/* Активный подпункт */
.snt-sidebar-nav.snt-flat-menu li.snt-sub-item.is-current .snt-menu-item-title {
  color: #0F4C81 !important;
}




/* ==========================================================
   МОБИЛЬНАЯ ВЕРСИЯ: Сворачиваемое меню (Спойлер) без смены HTML
   ========================================================== */
/* ==========================================================
   МОБИЛЬНАЯ ВЕРСИЯ: Стабильное меню-аккордеон
   ========================================================== */
@media (max-width: 767px) {
    /* Контейнер меню — ОБЯЗАТЕЛЬНО flex, чтобы работал подъем активного пункта наверх */
    ul.snt-sidebar-nav.snt-flat-menu {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
        margin: 0 0 20px 0 !important;
        list-style: none !important;
        border: 1px solid #cbd5e1 !important;
        border-radius: 8px !important;
        background: #ffffff !important;
        cursor: pointer !important;
        /* Свернуто по умолчанию под высоту одного пункта */
        max-height: 49px !important; 
        overflow: hidden !important;
        /* Плавная анимация раскрытия */
        transition: max-height 0.3s ease-in-out, border-color 0.3s ease !important;
    }

    /* Элементы списка */
    ul.snt-sidebar-nav.snt-flat-menu li.snt-sidebar-li {
        border-bottom: 1px solid #f1f5f9 !important;
        height: 50px !important; /* Четкая высота для корректного схлопывания */
        box-sizing: border-box !important;
        width: 100% !important;
    }
    
    ul.snt-sidebar-nav.snt-flat-menu li.snt-sidebar-li:last-child {
        border-bottom: none !important;
    }

    /* Ссылки-кнопки */
    .snt-sidebar-link-btn {
        display: flex !important;
        align-items: center !important;
        height: 100% !important;
        padding: 0 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* АКТИВНЫЙ ПУНКТ (поднимается на самый верх благодаря флекс-модели) */
    ul.snt-sidebar-nav.snt-flat-menu li.snt-sidebar-li.is-active {
        order: -1 !important; /* Теперь работает правильно! */
        background-color: #f8fafc !important;
        position: relative !important;
    }

    /* Стрелочка-уголок (Индикатор раскрытия) */
    ul.snt-sidebar-nav.snt-flat-menu li.snt-sidebar-li.is-active::after {
        content: "" !important;
        position: absolute !important;
        right: 18px !important;
        top: 50% !important;
        width: 6px !important;
        height: 6px !important;
        border-right: 2px solid #64748b !important;
        border-bottom: 2px solid #64748b !important;
        transform: translateY(-70%) rotate(45deg) !important;
        transition: transform 0.2s ease !important;
    }

    /* ==========================================================
       СОСТОЯНИЕ ОТКРЫТОГО МЕНЮ
       ========================================================== */
    ul.snt-sidebar-nav.snt-flat-menu.is-open {
        max-height: 400px !important; /* Раскрываем блок полностью */
    }

    /* Разворачиваем стрелочку вверх в открытом состоянии */
    ul.snt-sidebar-nav.snt-flat-menu.is-open li.snt-sidebar-li.is-active::after {
        transform: translateY(-30%) rotate(-135deg) !important;
    }

    /* Стили текста для активной вкладки */
    ul.snt-sidebar-nav.snt-flat-menu li.snt-sidebar-li.is-active .snt-menu-item-title {
        color: #0F4C81 !important;
        font-weight: 600 !important;
    }
}





/* ==========================================================
   ОБЩИЕ СТИЛИ ДЛЯ ВСЕХ 4 ФОРМ ВОССТАНОВЛЕНИЯ И СБРОСА
   ========================================================== */

/* 1. Общий контейнер для каждой из форм */
form.com-users-reset__form,
form.com-users-remind__form,
form.com-users-reset-confirm__form,
form.com-users-reset-complete__form {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px;
    max-width: 480px;
    margin: 30px auto;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
	font-family:'Montserrat', sans-serif;
    box-sizing: border-box;
}

/* 2. Сброс рамок fieldset и оформление заголовков */
form[class*="com-users-"] fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

form[class*="com-users-"] legend {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    display: block;
    width: 100%;
    line-height: 1.1;
}

/* Корректировка для формы напоминания логина, где текст legend слишком длинный */
form.com-users-remind__form legend {
    font-size: 1rem;
    font-weight: 600;
}

/* 3. Текст-инструкция внутри форм */
form[class*="com-users-"] fieldset p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #64748b; 
    margin-bottom: 24px;
    margin-top: 0;
}

/* 4. Контейнеры и метки полей (Labels) */
form[class*="com-users-"] .control-group {
    margin-bottom: 20px;
}

form[class*="com-users-"] .control-label {
    margin-bottom: 6px;
    display: block;
}

form[class*="com-users-"] label {
    font-weight: 600;
    color: #334155;
    font-size: 0.9rem;
    cursor: pointer;
}

form[class*="com-users-"] label .star {
    color: #ef4444;
    margin-left: 4px;
}

form[class*="com-users-"] .small.text-muted {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 8px;
    display: block;
}

/* 5. Общие стили для всех типов полей ввода (Email, Text, Password) */
form[class*="com-users-"] input[type="email"],
form[class*="com-users-"] input[type="text"],
form[class*="com-users-"] input[type="password"] {
    width: 100%;
    height: 44px;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    color: #0f172a;
    box-sizing: border-box;
    transition: all 0.2s ease;
font-family: 'Montserrat', sans-serif;	
}

/* Специфический отступ справа для полей ввода пароля, чтобы текст не заходил под глаз */
form.com-users-reset-complete__form input[type="password"],
form.com-users-reset-complete__form input[type="text"].js-password-strength {
    padding-right: 45px;
}

/* Эффект фокуса на полях ввода — ВАШ ЦВЕТ 0F4C81 */
form[class*="com-users-"] input:focus {
    outline: none;
    border-color: #0F4C81;
    box-shadow: 0 0 0 3px rgba(28, 142, 150, 0.15);
}

/* 6. Кнопка-глаз переключения видимости пароля */
form.com-users-reset-complete__form .input-group {
    display: flex;
    position: relative;
    width: 100%;
}

form.com-users-reset-complete__form .btn.input-password-toggle {
    position: absolute;
    right: 0;
    top: 0;
    height: 44px;
    width: 44px;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 10;
}

form.com-users-reset-complete__form .btn.input-password-toggle:hover {
    color: #0F4C81;
}

/* 7. Шкала надежности пароля (meter) */
form.com-users-reset-complete__form meter {
    width: 100%;
    height: 6px;
    display: block;
    margin-top: 6px;
    border-radius: 3px;
    background: #e2e8f0;
}

form.com-users-reset-complete__form output {
    font-size: 0.8rem;
    color: #64748b;
    display: block;
    margin-top: 4px;
}

/* 8. Основная кнопка "Отправить" — ВАШ ЦВЕТ 0F4C81 */

/*
form[class*="com-users-"] .btn-primary {
    width: 100%;
    height: 44px;
    background: #0F4C81;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

form[class*="com-users-"] .btn-primary:hover {
    background: #146970; 
}
*/
/* ==========================================================
   АДАПТИВНОСТЬ ПОД МОБИЛЬНЫЕ ТЕЛЕФОНЫ
   ========================================================== */
@media (max-width: 575px) {
    form.com-users-reset__form,
    form.com-users-remind__form,
    form.com-users-reset-confirm__form,
    form.com-users-reset-complete__form {
        padding: 24px 20px;
        margin: 15px;
        max-width: 100%;
    }
}







/* ==========================================================================
   Светлый современный интерфейс формы авторизации
   ========================================================================== */

/* 1. Контейнер формы */
.com-users-login.login {
  max-width: 420px;
  margin: 40px auto;
  padding: 32px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.09), 
              0 10px 15px -3px rgba(0, 0, 0, 0.09),
              0 0 0 1px rgba(0, 0, 0, 0.09);
  color: #1f2937;
  box-sizing: border-box;
  width: 100%;
}

.com-users-login.login h1 {
	font-size: 24px;
}

/* Сброс стилей fieldset */
.com-users-login__form fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

/* 2. Поля ввода и Лейблы */
.com-users-login__input {
  margin-bottom: 20px;
}

.com-users-login__input .control-label label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: #4b5563;
}

/* Звёздочка обязательного поля */
.com-users-login__input .control-label .star {
  color: #ef4444;
  margin-left: 2px;
}

/* Общий стиль для текстовых инпутов */
.com-users-login__form input[type="tel"],
.com-users-login__form input[type="text"],
.com-users-login__form input[type="password"] {
  width: 100%;
  height: 46px;
  padding: 10px 14px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  color: #111827;
  transition: all 0.2s ease-in-out;
  box-sizing: border-box;
  outline: none;
  margin-bottom: 0 !important; /* Убираем прыгающие отступы самого инпута */
}

/* Состояния фокуса для полей */
.com-users-login__form input[type="tel"]:focus,
.com-users-login__form input[type="text"]:focus,
.com-users-login__form input[type="password"]:focus {
  background: #ffffff;
  border-color: #008BD0;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

/* Элементы с ошибкой валидации */
.com-users-login__form input.invalid,
.com-users-login__form input.form-control-danger {
  border-color: #f87171 !important;
  background-color: #fef2f2 !important;
}
.com-users-login__form input.invalid:focus {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12) !important;
}

/* Текст ошибки под лейблом */
.com-users-login__form .form-control-feedback {
  display: block;
  font-size: 12px;
  color: #ef4444;
  margin-top: 4px;
  font-weight: 400;
}

/* 3. Группа пароля (Инпут + Иконка глаза) */
.password-group .input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.password-group .input-group input {
  padding-right: 46px; /* Место для кнопки */
}

/* Скрытая надпись для читалок */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Кнопка "Глаз" */
button.input-password-toggle {
	position: absolute;
	right: 4px;
	top: 4px;
	bottom: 4px;
	width: 38px;
	height: 38px;
	background: transparent;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	color: #9ca3af;
	transform:none;
}

button.input-password-toggle:hover {
	background: none;
	color: #4b5563;
	transform:none;  
}

/* Кастомная иконка глаза через псевдоэлемент, если шрифтовые иконки Joomla не подгрузились */
.icon-eye::before {
  content: "👁";
  font-style: normal;
  font-size: 16px;
}

.icon-eye-slash::before {
  content: "🙈";
  font-style: normal;
  font-size: 16px;
}

/* 4. Чекбокс "Запомнить меня" */
.com-users-login__remember {
  margin: 22px 0;
}

.form-check {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.form-check-input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #f9fafb;
  margin-right: 10px;
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: all 0.15s ease-in-out;
  padding: 3px;  
}

.form-check-input::before {
  content: "";
  width: 10px;
  height: 10px;
  transform: scale(0);
  transition: 0.1s transform ease-in-out;
  box-shadow: inset 1em 1em #ffffff;
  transform-origin: center;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);

}

.form-check-input:checked {
  background-color: #008BD0;
  border-color: #008BD0;
}

.form-check-input:checked::before {
  transform: scale(1);
}

.form-check-input:focus-visible {
  outline: 2px solid #008BD0;
  outline-offset: 2px;
}

.form-check-label {
  font-size: 14px;
  color: #4b5563;
  user-select: none;
  cursor: pointer;
}

/* 5. Кнопки отправки */
.com-users-login__submit {
  margin-bottom: 12px;
}

.com-users-login__submit .btn {
  width: 100%;
  height: 46px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, #008BD0 0%, #0063A8 100%);
  border: 1px solid #008BD0;
  color: #ffffff; 
  box-shadow:  0 4px 14px rgba(79, 70, 229, 0.25);
}


.com-users-login__submit .btn:hover {
  width: 100%;
  height: 46px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, #008BD0 0%, #0063A8 100%);
  border: 1px solid #008BD0;
  color: #ffffff; 
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);  
}

/* Основная кнопка "Войти" */
.btn-primary {
  background-color: #008BD0;
  border: 1px solid #008BD0;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  border-radius: 8px;
}

/* Эффект наведения мыши (Hover) */
.btn-primary:hover {
  background-color: #0077b3;          /* Чуть более насыщенный синий */
  border-color: #0077b3;
  box-shadow: 0 4px 12px rgba(0, 139, 208, 0.15); /* Мягкое свечение кнопки */
  transform: translateY(-1px);        /* Легкий интерактивный подъем кнопки */
}

/* Эффект физического нажатия (Active) */
.btn-primary:active {
  transform: translateY(1px);         /* Физический отклик клика (кнопка уходит вниз) */
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

/* Состояние фокуса (для доступности при навигации с клавиатуры кнопкой Tab) */
.btn-primary:focus-visible {
  outline: 2px solid #0F4C81;         /* Акцентная бирюзовая рамка-индикатор */
  outline-offset: 2px;
}

/* Состояние заблокированной кнопки (например, при отправке формы) */
.btn-primary:disabled {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;     /* Указатель мыши меняется на запрещающий знак */
  transform: none !important;
  box-shadow: none !important;
}

/* Кнопка "Войти без пароля" (Passkey) */
.plg_system_webauthn_login_button {
  background: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db !important;
}

.plg_system_webauthn_login_button:hover {
  background: #f9fafb;
  border-color: #9ca3af !important;
}

/* SVG иконка ключа */
.plg_system_webauthn_login_button svg {
  width: 20px;
  height: 20px;
  fill: #4b5563;
}

/* 6. Ссылки восстановления (Забыли пароль / логин) */
.com-users-login__options.list-group {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f3f4f6;
  display: block;
  line-height: 1.4;
}

.com-users-login__options a {
	font-size: 14px;
	color: #008BD0;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.15s ease;
	display: block;
	margin: 8px 0;
}

.com-users-login__options a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}


/* Переводим контейнер поля в относительный режим */
.com-users-login__input {
  position: relative; /* Критично для фиксации ошибки */
  margin-bottom: 28px; /* Немного увеличиваем отступ, бронируя место под ошибку */
}

/* Ошибка больше не влияет на геометрию и высоту формы */
.com-users-login__input .form-control-feedback {
  position: absolute;
  bottom: -20px; /* Выносим ошибку под инпут "в воздух" */
  left: 0;
  display: block;
  font-size: 11px;
  line-height: 1;
  color: #ef4444;
  font-weight: 500;
  /* Плавное проявление без изменения высоты */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none; /* Чтобы текст не мешал кликам */
  white-space: nowrap;  /* Защита от переноса строки */
}

/* Показываем ошибку только при активации валидации Joomla */
.com-users-login__input:has(input.invalid) .form-control-feedback,
.com-users-login__input:has(input.form-control-danger) .form-control-feedback,
.com-users-login__input .controls.has-danger .form-control-feedback {
  opacity: 1;
  visibility: visible;
  transform: translateY(0); /* Мягкое появление на своем месте */
}


/* 7. Адаптивность для мобильных телефонов */
@media (max-width: 767px) {
 
  .com-users-login__options.list-group {
    flex-direction: column; /* Ссылки встают друг под друга */
    align-items: center;
    gap: 10px;
  }
  
  .com-users-login__form input[type="tel"],
  .com-users-login__form input[type="text"],
  .com-users-login__form input[type="password"],
  .com-users-login__submit .btn {
    height: 48px; /* Чуть увеличиваем высоту для удобного нажатия пальцем */
    font-size: 16px; /* Предотвращает зум экрана в iOS при фокусе */
  }
}

/* ==========================================================================
   Светлый современный интерфейс профиля (Просмотр и Редактирование)
   ========================================================================== */

/* 1. Главный контейнер (для обеих страниц) */
.com-users-profile.profile,
.com-users-profile__edit.profile-edit {
  max-width: 680px;
  margin: 40px auto;
  padding: 40px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 
              0 10px 15px -3px rgba(0, 0, 0, 0.03),
              0 0 0 1px rgba(0, 0, 0, 0.04);
  color: #1f2937;
  box-sizing: border-box;
  width: 100%;
}

/* 2. Заголовки и разделители */
.com-users-profile.profile h1, 
.com-users-profile__edit.profile-edit h1,
.com-users-profile.profile legend,
.com-users-profile__edit.profile-edit legend {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin-top: 0;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.com-users-profile.profile legend,
.com-users-profile__edit.profile-edit legend {
  font-size: 18px;
  font-weight: 800;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 10px;
  margin-top: 32px;
  margin-bottom: 20px;
  width: 100%;
  display: block;
}

.com-users-profile.profile fieldset,
.com-users-profile__edit.profile-edit fieldset {
  border: none;
  padding: 0;
  margin: 0;
}



/* Сетка для списка параметров */
.com-users-profile__core .dl-horizontal,
.com-users-profile__custom .dl-horizontal{
    display: grid !important;
    grid-template-columns: max-content 1fr !important; /* Левая колонка по ширине текста, правая — всё остальное */
    gap: 16px 24px !important; /* Отступы: 16px между строками, 24px между колонками */
    margin: 0 !important;
}

/* Названия полей (Имя, Логин и т.д.) */
.com-users-profile__core dt, .com-users-profile__custom dt {
    font-weight: 600 !important;
    color: #64748b !important; /* Мягкий серый цвет для подписей */
    align-self: center !important;
}

/* Значения полей (Иванов И.И., uchastok45 и т.д.) */
.com-users-profile__core dd, .com-users-profile__custom dd {
    font-weight: 500 !important;
    color: #0f172a !important; /* Темный контрастный цвет для данных */
    margin: 0 !important; /* Сбрасываем стандартные отступы браузера */
    align-self: center !important;
}

/* 3. Строки данных (Двухколоночный Grid) */
.com-users-profile__edit fieldset .control-group {
  display: grid;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #f9fafb;
}

.com-users-profile fieldset dt:last-of-type,
.com-users-profile__edit fieldset .control-group:last-of-type {
  border-bottom: none;
}

/* Названия полей (Лейблы) */
.com-users-profile__edit .control-label,
.com-users-profile__edit .control-label label {
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
  margin: 0;
}

.com-users-profile__edit .star {
  color: #ef4444;
  margin-left: 2px;
}

/* Значения полей (только чтение) */
.com-users-profile dd {
  font-size: 15px;
  color: #111827;
  font-weight: 400;
  margin: 0;
  word-break: break-word;
}

/* 4. Поля ввода на странице редактирования */
.com-users-profile__edit input[type="tel"],
.com-users-profile__edit input[type="text"],
.com-users-profile__edit input[type="email"],
.com-users-profile__edit input[type="password"],
.com-users-profile__edit select {
  width: 100%;
  height: 44px;
  padding: 10px 14px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  color: #111827;
  transition: all 0.2s ease-in-out;
  box-sizing: border-box;
  outline: none;
}

/* Фокус инпутов */
.com-users-profile__edit input:focus,
.com-users-profile__edit select:focus {
  background: #ffffff;
  border-color: #008BD0;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

/* Кастомный Select */
.com-users-profile__edit select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}

/* 5. Кнопки управления */
.com-users-profile .btn-toolbar,
.com-users-profile__edit .control-group:has(.btn),
.com-users-profile__edit .btn-toolbar {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #f3f4f6;
  grid-template-columns: none;
	list-style: none;
	padding-left: 0;  
}

.com-users-profile .btn,
.com-users-profile__edit .btn {
  height: 46px;
  padding: 0 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
  box-sizing: border-box;
}

/* Кнопка "Сохранить" / "Редактировать" */
.com-users-profile .btn-primary,
.com-users-profile__edit button[type="submit"],
.com-users-profile__edit .btn-primary {
  background: #008BD0;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.com-users-profile .btn-primary:hover,
.com-users-profile__edit button[type="submit"]:hover,
.com-users-profile__edit .btn-primary:hover {
  background: #1d4ed8;
}

/* Кнопка "Отмена" */
.com-users-profile .btn-cancel,
.com-users-profile__edit .btn-cancel,
.com-users-profile__edit a.btn-secondary {
  background: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db !important;
}

.com-users-profile .btn-cancel:hover,
.com-users-profile__edit .btn-cancel:hover,
.com-users-profile__edit a.btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af !important;
}

/* Ошибки валидации */
.com-users-profile__edit .form-control-feedback {
  grid-column: 2;
  font-size: 12px;
  color: #ef4444;
  margin-top: 4px;
  font-weight: 500;
}

.com-users-profile__edit input.invalid {
  border-color: #f87171 !important;
  background-color: #fef2f2 !important;
}

/* ==========================================================================
   6. Адаптивность под мобильные (Ширина 767px и меньше)
   ========================================================================== */
@media (max-width: 767px) {
  .com-users-profile.profile,
  .com-users-profile__edit.profile-edit {
    margin: 16px auto;
    padding: 24px 16px;
    box-shadow: none;
    border: none;
  }

  /* Перестроение сетки в один ряд */
  .com-users-profile fieldset dt,
  .com-users-profile__edit fieldset .control-group {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 12px 0;
  }

  .com-users-profile dt,
  .com-users-profile__edit .control-label {
    font-size: 13px;
    color: #6b7280;
  }

  .com-users-profile dd {
    font-size: 16px;
  }

  /* Поля под мобильные пальцы */
  .com-users-profile__edit input[type="tel"],
  .com-users-profile__edit input[type="text"],
  .com-users-profile__edit input[type="email"],
  .com-users-profile__edit input[type="password"],
  .com-users-profile__edit select {
    height: 48px;
    font-size: 16px; /* Фикс автозума на iOS */
  }

  /* Кнопки на всю ширину */
  .com-users-profile .btn-toolbar,
  .com-users-profile__edit .control-group:has(.btn),
  .com-users-profile__edit .btn-toolbar {
    flex-direction: column;
    gap: 10px;
  }

  .com-users-profile .btn,
  .com-users-profile__edit .btn {
    width: 100%;
    height: 48px;
  }
}

/* ==========================================================================
   КОМПАКТНЫЙ СТИЛЬ: Широкие лейблы, инпуты выровнены по правому краю
   ========================================================================== */

/* 1. Двухколоночный Grid для строк формы */
.com-users-profile__edit fieldset .control-group {
  display: grid;
  /* Увеличиваем левую колонку до 240px, правая занимает остаток */
  grid-template-columns: 240px 1fr; 
  align-items: start;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid #f9fafb;
}

/* 2. Правая колонка с инпутами */
.com-users-profile__edit .controls {
  display: flex;
  flex-direction: column;
  width: 100%;
  /* Ограничиваем максимальную ширину полей, чтобы они не растягивались на весь экран */
  max-width: 320px; 
  /* Магия выравнивания: автоматически прижимает весь блок к правому краю */
  margin-left: auto; 
  box-sizing: border-box;
}

/* 3. Выравнивание группы паролей */
.com-users-profile__edit .password-group {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  box-sizing: border-box;
}

.com-users-profile__edit .password-group .input-group {
  position: relative !important;
  display: flex !important;
  width: 100% !important;
  box-sizing: border-box;
}

/* 4. Одинаковая геометрия для абсолютно всех инпутов и селектов */
.com-users-profile__edit input[type="tel"],
.com-users-profile__edit input[type="text"],
.com-users-profile__edit input[type="email"],
.com-users-profile__edit input[type="password"],
.com-users-profile__edit select {
  width: 100% !important;
  height: 44px !important;
  padding: 10px 14px !important;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  color: #111827;
  box-sizing: border-box;
  transition: all 0.2s ease-in-out;
}

/* Дополнительный отступ внутри инпута пароля под иконку глаза */
.com-users-profile__edit .password-group .input-group input[type="password"] {
  padding-right: 46px !important; 
}

/* 5. Кнопка "Глаз" строго внутри поля */
.com-users-profile__edit .password-group .input-password-toggle {
  position: absolute !important;
  right: 4px !important;
  top: 4px !important;
  bottom: 4px !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #9ca3af;
  z-index: 10;
}

.com-users-profile__edit .password-group .input-password-toggle:hover {
  background: #f3f4f6 !important;
  color: #374151;
}

/* 6. Служебные тексты (выравниваются по ширине инпута) */
.com-users-profile__edit .controls div[id*="-rules"] {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 6px;
  order: -1; /* Текст требований над инпутом */
}

.com-users-profile__edit meter[id^="progress-"] {
  width: 100% !important;
  height: 6px;
  border-radius: 8px;
  background: #e5e7eb;
  border: none;
  display: block;
  margin: 4px 0 0 0;
}

.com-users-profile__edit meter[id^="progress-"]::-webkit-meter-bar {
  background: #e5e7eb;
  border: none;
  border-radius: 8px;
  height: 6px;
}

.com-users-profile__edit meter[id^="progress-"]::-webkit-meter-optimum-value { background: #10b981; }
.com-users-profile__edit meter[id^="progress-"]::-webkit-meter-suboptimum-value { background: #f59e0b; }
.com-users-profile__edit meter[id^="progress-"]::-webkit-meter-even-less-good-value { background: #ef4444; }

.com-users-profile__edit output[id^="password-"] {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  display: block;
  margin-top: -2px;
}

.com-users-profile__edit .form-text {
  display: block;
  font-size: 12px;
  color: #9ca3af;
  margin-top: 6px;
  line-height: 1.4;
}

/* Выравнивание заголовка лейбла */
.com-users-profile__edit .control-label {
  padding-top: 10px;
}

/* ==========================================================================
   7. Адаптивность для мобильных телефонов (Ширина 767px и меньше)
   ========================================================================== */
@media (max-width: 767px) {
  .com-users-profile__edit fieldset .control-group {
    grid-template-columns: 1fr; /* На мобильных перестраиваем в одну колонку */
    gap: 6px;
  }

  .com-users-profile__edit .controls {
    max-width: 100%; /* На мобильных инпуты занимают всю ширину экрана для удобства */
    margin-left: 0;   /* Сбрасываем прижатие к правому краю */
  }

  .com-users-profile__edit .control-label {
    padding-top: 0;
  }

  .com-users-profile__edit input[type="tel"],
  .com-users-profile__edit input[type="text"],
  .com-users-profile__edit input[type="email"],
  .com-users-profile__edit input[type="password"],
  .com-users-profile__edit select {
    height: 48px !important; /* Крупнее под пальцы */
    font-size: 16px !important; /* Отключает автозум в iOS */
  }
}


/* ==========================================================================
   ИСПРАВЛЕНИЕ: Горизонтальное отображение кнопок "Сохранить" и "Отменить"
   ========================================================================== */

/* 1. Отменяем вертикальный ряд только для блока кнопок */
.com-users-profile__edit-submit.control-group .controls {
  flex-direction: row !important; /* Выстраиваем кнопки горизонтально */
  gap: 12px;                      /* Отступ между кнопками */
  justify-content: flex-end;     /* Если внутри блока будет свободное место, прижимаем вправо */
}

/* 2. Настройки самих кнопок на десктопе */
.com-users-profile__edit-submit.control-group .btn {
  flex: 1 1 auto;                 /* Кнопки делят ширину (320px) поровну */
  height: 44px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;                       /* Отступ между иконкой и текстом */
}

/* Стилизация иконок внутри кнопок Joomla 6 */
.com-users-profile__edit-submit.control-group .btn span[class^="icon-"] {
  font-size: 14px;
  opacity: 0.9;
}

/* ==========================================================================
   3. Адаптивность для мобильных телефонов (Ширина 767px и меньше)
   ========================================================================== */
@media (max-width: 767px) {
  /* На смартфонах возвращаем вертикальный ряд, чтобы кнопками было удобно пользоваться */
  .com-users-profile__edit-submit.control-group .controls {
    flex-direction: column !important;
    width: 100%;
    gap: 10px;
  }
  
  .com-users-profile__edit-submit.control-group .btn {
    width: 100% !important;
    height: 48px; /* Увеличиваем под мобильные пальцы */
    font-size: 16px;
  }
}










/* ==========================================================================
   СТИЛИЗАЦИЯ КАСТОМНЫХ ПОЛЕЙ (Лицевой счет, Начислено, Задолженность)
   ========================================================================== */

/* 1. На странице ПРОСМОТРА профиля (Режим "Только чтение") */
.com-users-profile fieldset:has(legend) {
  width: 100%;
}

/* Выравниваем текстовые значения кастомных полей по правому краю, как и инпуты */
.com-users-profile fieldset:has(legend) dd {
  margin-left: auto;
  text-align: right; /* Прижимаем сам текст к правому краю */
  font-size: 15px;
  font-weight: 600;  /* Делаем цифры счетов и задолженностей более заметными */
  color: #111827;
}

/* 2. На странице РЕДАКТИРОВАНИЯ профиля */
/* Защищаем инпуты кастомных полей, чтобы они унаследовали общие правила */
.com-users-profile__edit fieldset:has(legend) .control-group {
  display: grid;
  grid-template-columns: 240px 1fr; 
  align-items: start;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid #f9fafb;
}

/* Если какие-то кастомные поля выведены только для чтения (readonly) в режиме редактирования */
.com-users-profile__edit .controls:has(input[readonly]),
.com-users-profile__edit .controls .field-value {
  max-width: 320px;
  margin-left: auto;
  text-align: right;
}

/* 3. Адаптивность для мобильных телефонов (Ширина 767px и меньше) */
@media (max-width: 767px) {
  /* На смартфонах сбрасываем прижатие к правому краю для удобства чтения */
  .com-users-profile fieldset:has(legend) dd,
  .com-users-profile__edit .controls:has(input[readonly]),
  .com-users-profile__edit .controls .field-value {
    max-width: 100%;
    margin-left: 0;
    text-align: left; /* Переключаем текст налево */
  }
}
/* ==========================================================================
   ГАРАНТИРОВАННЫЙ ФИКС: Для цифровых кастомных полей (type="number")
   ========================================================================== */

/* 1. Включаем поддержку числовых инпутов в общую стилизацию */
.com-users-profile__edit input[type="number"] {
  width: 100% !important;
  height: 44px !important;
  padding: 10px 14px !important;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  color: #111827;
  box-sizing: border-box;
  transition: all 0.2s ease-in-out;
  outline: none;
}

/* Фокус для числовых полей */
.com-users-profile__edit input[type="number"]:focus {
  background: #ffffff;
  border-color: #008BD0;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

/* 2. Прячем стандартные стрелочки вверх/вниз у полей с числами для чистоты дизайна */
.com-users-profile__edit input[type="number"]::-webkit-outer-spin-button,
.com-users-profile__edit input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.com-users-profile__edit input[type="number"] {
  -moz-appearance: textfield; /* Для Firefox */
}

/* 3. Принудительное выравнивание строк с кастомными полями по правому краю */
.com-users-profile__edit .control-group:has(input[type="number"]) {
  display: grid !important;
  grid-template-columns: 240px 1fr !important;
  align-items: start !important;
  gap: 20px !important;
  padding: 16px 0 !important;
  border-bottom: 1px solid #f9fafb;
}

/* Прижимаем контейнер числового инпута вправо на 320px */
.com-users-profile__edit .control-group:has(input[type="number"]) .controls {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: 320px !important;
  margin-left: auto !important;
  box-sizing: border-box;
}

/* ==========================================================================
   4. Адаптивность для мобильных телефонов (Ширина 767px и меньше)
   ========================================================================== */
@media (max-width: 767px) {
  .com-users-profile__edit .control-group:has(input[type="number"]) {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }

  .com-users-profile__edit .control-group:has(input[type="number"]) .controls {
    max-width: 100% !important;
    margin-left: 0 !important;
  }

  .com-users-profile__edit input[type="number"] {
    height: 48px !important;
    font-size: 16px !important;
  }
}

/* ==========================================================================
   КНОПКА АВТОРИЗАЦИИ В ШАПКЕ (СВЕТЛЫЙ СТИЛЬ)
   ========================================================================== */

.header-actions {
  display: flex;
  align-items: center;
}

/* Оболочка для залогиненного состояния */
.lk-user-wrapper {
  display: flex;
  align-items: center;
  gap: 8px; /* Расстояние между кнопкой профиля и кнопкой выхода */
}

/* Базовый стиль вашей кнопки */
.lk-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #132f53;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.lk-button:hover {
  background: #e6eaf0;
  border-color: #d1d5db;
}

/* Модификатор кнопки, когда пользователь внутри аккаунта */
.lk-button--logged {
  background: #ffffff;
  border-color: rgba(0, 191, 165, 0.2); /* Акцентный полупрозрачный цвет #0F4C81 */
  padding: 4px 14px 4px 8px; /* Уменьшаем левый отступ, так как там круглый аватар */
}
.lk-button--logged:hover {
  background: #f0fdfa;
  border-color: #0F4C81;
}

/* Стильная круглая заглушка вместо аватара (первая буква имени) */
.lk-avatar-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0F4C81; /* Ваш фирменный цвет */
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  user-select: none;
}

/* Кнопка "Выйти" */
.lk-logout-form {
  margin: 0;
  display: flex;
}

.lk-logout-btn {
  width: 36px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(0, 191, 165, 0.2);
  background: #ffffff;
  color: #718096;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s ease;
}

.lk-logout-btn:hover {
  background: #fff5f5;
  border-color: #fca5a5;
  color: #e53e3e; /* Подсвечиваем красным при наведении на выход */
}

/* ==========================================================================
   УПРАВЛЕНИЕ КНОПКАМИ ВЫХОДА (ДЕСКТОП / МОБИЛЬНЫЙ БУРГЕР)
   ========================================================================== */

/* По умолчанию (на ПК) скрываем мобильную кнопку выхода в бургере */
.lk-logout-form--mobile {
  display: none !important;
}

/* Базовые десктопные стили для кнопки в шапке */
.lk-user-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Изменение внутренних элементов (иконки-замка) через currentColor */
.lk-button svg {
    flex-shrink: 0;
    /* Плавное движение дужки замка или микро-сдвиг при ховере (опционально) */
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Интерактивный микро-эффект для иконки при наведении */
.lk-button:hover svg {
    transform: scale(1.05); /* Замочек слегка и аккуратно увеличивается в объеме */
}

.lk-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: #2ECC71;
	border: 1px solid #2ECC71;
	border-radius: 8px;
	color: #fbfbfb;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
}

.lk-button--logged {
  background: #ffffff;
  border-color: rgba(0, 191, 165, 0.2);
  padding: 5px 14px 5px 8px;
  color: #333;
}

.lk-avatar-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0F4C81;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.lk-logout-btn {
  width: 36px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #718096;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s ease;
}
.lk-logout-btn:hover {
  background: #fff5f5;
  border-color: #fca5a5;
  color: #e53e3e;
}

/* ==========================================================================
   Адаптивность для мобильных телефонов (Ширина 767px и меньше)
   ========================================================================== */
  @media (max-width: 992px) {
  
  /* 2. В БУРГЕР-МЕНЮ: Включаем и стилизуем мобильную кнопку */
  .lk-logout-form--mobile {
    display: block !important;
    margin: 20px 0 20px; /* Отступы внутри панели бургер-меню */
  }

  .lk-mobile-logout-btn {
    width: 100%;
    height: 46px;
    background: #fff5f5;        /* Пастельно-красный мягкий фон */
    border: 1px solid #fee2e2;
    border-radius: 8px;
    color: #e53e3e;             /* Трендовый красный цвет текста */
    font-size: 15px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.15s;
  }
  
  .lk-mobile-logout-btn:hover {
	background: #e1e1e1;
	color: #222;
	border-color: #bebebe;
}
  
  .lk-mobile-logout-btn:active {
    background: #fde8e8;
  }
   
  }

@media (max-width: 767px) {
  
  /* 1. В ШАПКЕ: Скрываем десктопную кнопку выхода, оставляем только аватар */
  .lk-logout-form--desktop {
    display: none !important;
  }
  
  .lk-button--logged span {
    display: none; /* Прячем текст имени в шапке, экономим место */
  }
  
  .lk-button--logged {
    padding: 6px;
    border-radius: 50%;
  }


}


/* ==========================================================================
   Адаптивность для мобильных телефонов (Ширина 767px и меньше)
   ========================================================================== */
@media (max-width: 767px) {
  /* Если в мобильном меню мало места, прячем текст имени, оставляя только круглый аватар */
  .lk-button--logged span {
    display: none; 
  }
  
  .lk-button--logged {
    padding: 6px; /* Делаем кнопку идеально круглой/квадратной на мобильных */
    border-radius: 50%;
  }

  .lk-avatar-placeholder {
    width: 32px; /* Чуть увеличиваем аватар для удобного нажатия пальцем */
    height: 32px;
  }

  .lk-logout-btn {
    width: 44px; /* Крупный размер для мобильного тач-интерфейса */
    height: 44px;
  }
}
/* кнопка с инфой авторизованного пользователя в шапке */


/* ==========================================================================
   СТИЛИ ДЛЯ МОДУЛЯ ВЫХОДА (MOD-LOGIN-LOGOUT FORM-VERTICAL) БЕЗ BOOTSTRAP
   ========================================================================== */

/* Главный контейнер модуля */
.mod-login-logout.form-vertical {
  font-family: 'Montserrat', sans-serif;
  max-width: 320px;               /* Ограничиваем ширину для аккуратного вида */
  width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 20px;
  box-sizing: border-box;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Блок приветствия пользователя */
.mod-login-logout.form-vertical .login-greeting {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 16px;
  line-height: 1.4;
  text-align: left;
}

/* Контейнер кнопки (в вертикальной форме) */
.mod-login-logout.form-vertical .logout-button {
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Сама кастомная кнопка «Выйти» */
.mod-login-logout.form-vertical .btn-logout {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;                       /* Расстояние между иконкой и текстом */
  background-color: #e11d48;      /* Трендовый кораллово-красный */
  border: 1px solid #e11d48;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Эффект наведения (Hover) */
.mod-login-logout.form-vertical .btn-logout:hover {
  background-color: #be123c;      /* Более глубокий красный оттенок */
  border-color: #be123c;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.15);
  transform: translateY(-1px);    /* Легкий интерактивный подъем */
}

/* Эффект нажатия (Active) */
.mod-login-logout.form-vertical .btn-logout:active {
  transform: translateY(1px);     /* Физический отклик клика */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Стилизация SVG-иконки внутри кнопки */
.mod-login-logout.form-vertical .btn-logout svg {
  display: block;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

/* Анимация иконки при наведении (эффект движения двери/выхода) */
.mod-login-logout.form-vertical .btn-logout:hover svg {
  transform: translateX(2px);     /* Иконка стрелочки слегка сдвигается вправо */
}

/* Адаптивность для мобильных экранов */
@media (max-width: 575px) {
  .mod-login-logout.form-vertical {
    max-width: 100%;              /* На смартфонах растягивается на всю ширину родителя */
    padding: 16px;
  }
  
  .mod-login-logout.form-vertical .btn-logout {
    padding: 14px 20px;           /* Увеличиваем область нажатия для пальца */
  }
}


/* ==========================================================================
   СОВРЕМЕННЫЙ СТИЛЬ ДЛЯ ТЕГА BUTTON
   ========================================================================== */
button {
  /* 1. Полный сброс некрасивых заводских стилей браузера */
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  /* 3. Геометрия и шрифты */
	font-family: 'Montserrat', sans-serif;   /* Ваш основной шрифт */
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.01em;
  
  /* padding: 10px 24px; */
  border-radius: 8px;                 /* Трендовое мягкое скругление углов */
  box-sizing: border-box;
  color: #000000;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); /* Плавная микроанимация */
}
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px; /* Автоматический отступ между иконкой и текстом */
  padding: 10px 24px;
}

/* --- СОСТОЯНИЯ КНОПКИ --- */
/* Эффект наведения мыши (Hover) */
button:hover {
  transform: translateY(-1px);        /* Легкий интерактивный подъем кнопки */
}

/* Эффект физического нажатия (Active) */
button:active {
  transform: translateY(1px);         /* Физический отклик клика (кнопка уходит вниз) */
}

/* Состояние фокуса (для доступности при навигации с клавиатуры кнопкой Tab) */
button:focus-visible {
  outline: 2px solid #0F4C81;         /* Акцентная бирюзовая рамка-индикатор */
  outline-offset: 2px;
}

/* Состояние заблокированной кнопки (например, при отправке формы) */
button:disabled {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;     /* Указатель мыши меняется на запрещающий знак */
  transform: none !important;
  box-shadow: none !important;
}

/*
.full-width-gallery .inner-page-grid {
    display: block !important; 
}
*/

.full-width-gallery .inner-page-grid > div {
    width: 100% !important; /* Заставляем бывшую левую и правую колонки стать на 100% ширины */
    margin-bottom: 30px;
}
/* ==========================================================================
   Идеальная форма регистрации Joomla 6 (Под ваш HTML / Тренды 2026)
   ========================================================================== */

/* Главный контейнер формы */
#member-registration.com-users-registration__form {
	max-width: 520px;
	width: 100% !important;
	margin: 3rem auto;
	padding: 2.5rem;
	background: #ffffff;
	border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.09), 
              0 10px 15px -3px rgba(0, 0, 0, 0.09),
              0 0 0 1px rgba(0, 0, 0, 0.09);
	box-sizing: border-box;
}

/* Сбрасываем браузерные рамки fieldset */
#member-registration fieldset {
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    min-width: 0;
}

/* Красиво оформляем или скрываем легенды (заголовки блоков) */
#member-registration fieldset legend:not(.visually-hidden) {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 0.8rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

/* Полностью скрываем слово "Поля", так как оно выглядит не к месту */
#member-registration fieldset legend:not(.visually-hidden):contains('Поля'),
#member-registration fieldset:nth-of-type(2) legend:not(.visually-hidden) {
    display: none !important;
}

/* Блок каждого поля (Делаем вертикальным и во всю ширину) */
#member-registration .control-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    width: 100% !important;
}

/* Исправляем сжатие полей (убираем ограничения Bootstrap по ширине) */
#member-registration .controls,
#member-registration .password-group,
#member-registration .input-group {
    width: 100% !important;
    max-width: 100% !important;
}

/* Названия полей (Labels) */
#member-registration .control-label label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.com-users-registration__form.form-validate .form-control-feedback {
	color: #ff0000;
	margin-left: 15px;
}

/* Стилизация ВСЕХ типов инпутов (Текстовые, Email, Пароль, Числа) */
#member-registration input[type="tel"],
#member-registration input[type="text"],
#member-registration input[type="email"],
#member-registration input[type="password"],
#member-registration input[type="number"] {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.95rem;
    color: #111827;
    background-color: #F8FAFC;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    height: auto !important;
	font-family: 'Montserrat', sans-serif;   /* Основной шрифт */	
}

/* Инпуты в фокусе (Мягкое свечение ТОЛЬКО для текстовых и цифровых полей) */
#member-registration input[type="text"]:focus:not(:disabled),
#member-registration input[type="email"]:focus:not(:disabled),
#member-registration input[type="password"]:focus:not(:disabled),
#member-registration input[type="number"]:focus:not(:disabled),
#member-registration input[type="tel"]:focus:not(:disabled) {
    outline: none;
    background-color: #F8FAFC;
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}


/* Красивый стиль для заблокированных полей (Счет, Долг, Начисления) */
#member-registration input:disabled {
    background-color: #f3f4f6 !important;
    color: #9ca3af !important;
    border-color: #e5e7eb !important;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Метр сложности пароля */
#member-registration meter {
    width: 100%;
    margin-top: 0.5rem;
    height: 6px;
}

/* Блок с кнопкой "Показать пароль" */
#member-registration .input-group {
    display: flex;
    position: relative;
}
#member-registration .input-group input {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
#member-registration .input-password-toggle {
    border-top-right-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
    border: 1px solid #e5e7eb;
    border-left: none;
    background: #f3f4f6;
    padding: 0 1rem;
}

/* Скрываем ненужный пустой первый спейсер Joomla */
#member-registration .field-spacer {
    margin-bottom: 0 !important;
}

/* ==========================================================================
   Новые компактные и одинаковые Радио-кнопки (Ваш Статус)
   ========================================================================== */

/* Внутренний контейнер радиокнопок из вашего HTML */
#member-registration .radio.required,
#member-registration div.radio {
    display: grid !important;
    grid-template-columns: 1fr 0.5fr !important; /* Ровно 50% на 50% */
    gap: 0.75rem !important;
    width: 100% !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Убираем отступы у оберток Bootstrap (.form-check) */
#member-registration  .radio .form-check {
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Скрываем круглые нативные точки */
#member-registration .form-check-input[type="radio"] {
    position: absolute !important;
    top: 0;
    left: 0;
    opacity: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    cursor: pointer;
    z-index: 2;
}

/* Одинаковые аккуратные плитки кнопок */
#member-registration  .radio  .form-check-label {
    width: 100% !important;
    height: 100%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem !important; /* Уменьшили паддинг, чтобы они не были огромными */
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important; /* Тонкая стильная рамка */
    border-radius: 8px !important; /* Скругление как у инпутов */
    font-size: 0.95rem;
    font-weight: 600;
    color: #4b5563 !important;
    transition: all 0.2s ease;
    text-align: center;
    margin: 0 !important;
    box-sizing: border-box;
    cursor: pointer;
}

/* Эффект наведения */
#member-registration .form-check:hover .form-check-label {
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
    color: #111827 !important;
}

/* Выбранная радиокнопка (Член СНТ или Собственник) */
#member-registration .form-check-input[type="radio"]:checked + .form-check-label {
    background: #eef2ff !important;
    border-color: #4f46e5 !important;
    color: #4f46e5 !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08) !important;
}

/* ==========================================================================
   Кнопка "Регистрация" (Основной призыв)
   ========================================================================== */
#member-registration button[type="submit"].com-users-registration__register {
    width: 100% !important;
    padding: 0.875rem 1.5rem !important;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
	background: linear-gradient(135deg, #008BD0 0%, #0063A8 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
    transition: all 0.2s ease;
    margin-top: 1rem;
}

#member-registration button[type="submit"].com-users-registration__register:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}
/* Прячем поле-ловушку Honeypot от людей */
#member-registration .control-group:has(#jform_com_fields_fake_email) {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
}

/* ==========================================================================
   Монолитная строка чекбокса (Чекбокс слева, весь текст справа)
   ========================================================================== */

/* Контейнер строки (запрещаем перенос чекбокса и текста друг под друга) */
#member-registration .form-check-inline {
    display: flex !important;
    flex-direction: row !important; /* Строго в одну линию */
    align-items: flex-start !important; /* Выравнивание по верху первой строки */
    gap: 0.75rem !important; /* Фиксированный зазор между флажком и текстом */
    width: 100% !important;
    margin: 1.5rem 0 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

/* Квадратик флажка (с гарантированной белой птичкой) */
#member-registration input[type="checkbox"].form-check-input {
    width: 18px !important;
    height: 18px !important;
    margin: 2px 0 0 0 !important;
    cursor: pointer;
    flex-shrink: 0;
    display: block !important;
    position: relative !important;
    opacity: 1 !important;
    
    /* Сбрасываем системные стили шаблона, которые могли скрыть птичку */
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    
    /* Базовый вид пустого чекбокса */
    background-color: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 4px !important; /* Легкое трендовое скругление углов */
    transition: all 0.2s ease;
}

/* Эффект при наведении на пустой чекбокс */
#member-registration input[type="checkbox"].form-check-input:hover {
    border-color: #4f46e5 !important;
    background-color: #ffffff !important;
}

/* Состояние, КОГДА НАЖАЛИ (Флажок выбран) */
#member-registration input[type="checkbox"].form-check-input:checked {
    background-color: #0082C7 !important; /* Фирменный фон */
    border-color: #4f46e5 !important;
    
    /* Встраиваем гарантированную белоснежную птичку через SVG-код */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
    background-size: 100% 100% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}


/* Текст согласия и ссылка (идут единым потоком) */
#member-registration label.form-check-label[for="jform_com_fields_privacy0"] {
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    color: #4b5563 !important;
    line-height: 1.4 !important;
    cursor: pointer;
    margin: 0 !important;
    display: inline !important; /* Позволяет ссылке прилипнуть к концу текста */
    width: auto !important;
    padding: 0 !important;
}

/* Ссылка на политику конфиденциальности */
#member-registration a.js-privacy-link {
    font-size: 0.83rem !important;
    line-height: 1.4 !important;
    color: #333 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    display: inline !important; /* Идет в один поток с текстом */
    transition: color 0.2s ease;
    cursor: pointer;
}

#member-registration a.js-privacy-link:hover {
    text-decoration: underline !important;
    color: #3730a3 !important;
}

/* Полностью скрываем блоки Имя, Логин, пароли и шкалу сложности от пользователя */
#member-registration .control-group:has(#jform_com_fields_snt_account),
#member-registration .control-group:has(#jform_com_fields_snt_nachisleno),
#member-registration .control-group:has(#jform_com_fields_snt_dolg),
#member-registration .field-spacer,
#member-registration .control-group:has(#jform_name),
#member-registration .control-group:has(#jform_username),
#member-registration .control-group:has(#jform_password1),
#member-registration .control-group:has(#jform_password2),
#member-registration .password-group {
    display: none !important;
}

.control-label #jform_com_fields_privacy-lbl {
	display: none !important;
}

legend > span {
    font-size: 0.9rem;
    font-weight: 400;
    color: #4b5563;
}

div.text-submit {
	font-size: 0.9rem !important;
	font-weight: 500 !important;
	color: #4b5563 !important;
	line-height: 1.4 !important;
}

/* ==========================================================================
   Модальное окно Политики Конфиденциальности (Чистый JS)
   ========================================================================== */
body.contentpane.component {
	padding: 25px;
	background-color: white;
}
   
/* Основной контейнер окна (изначально скрыт) */
.p-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Эффект при активации модального окна */
.p-modal.p-modal-active {
    opacity: 1;
    visibility: visible;
}

/* Затемняющий фон с трендовым размытием (Glassmorphism) */
.p-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4); /* Полупрозрачный темный цвет */
    backdrop-filter: blur(8px); /* Размытие заднего фона сайта */
}

/* Контейнер самого окна с контентом */
.p-modal-container {
    position: relative;
    width: 90%;
    max-width: 800px;
    height: 80vh;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 10;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Анимация увеличения окна при открытии */
.p-modal.p-modal-active .p-modal-container {
    transform: scale(1) translateY(0);
}

/* Кнопка "Закрыть" (Крестик) */
.p-modal-close {
    position: absolute;
    top: 1rem;
    right: 3rem;
    background: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 34px;
    color: #4b5563;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 15;
}

.p-modal-close:hover {
    background: #ef4444;
    color: #ffffff;
    transform: rotate(90deg);
}

/* Внутренний контент модального окна */
.p-modal-content {
    flex: 1;
    width: 100%;
    height: 100%;
    padding: 3rem 1.5rem 1.5rem 1.5rem;
    box-sizing: border-box;
}

/* Адаптивный фрейм для подгрузки страницы без шапки и подвала */
#privacy-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    background: #ffffff;
}


/* Контейнер формы (Замена устаревшего .well) */
#contact-form.form-horizontal.well {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 2.5rem;
    max-width: 650px;
    margin: 2rem auto;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Заголовок формы */
#contact-form > fieldset {
  border: 0;
}

#contact-form legend {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

/* Строка с пометкой "* Обязательное поле" */
#contact-form .field-spacer {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #64748b;
}
#contact-form .field-spacer .red {
    color: #ef4444;
    font-weight: bold;
}

/* Блок каждого поля (Строка) */
#contact-form .control-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Лейблы (Названия полей) */
#contact-form .control-label label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    display: inline-flex; /* Исправлено: inline-flex изолирует элемент и не ломает общую высоту строки */
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.25rem; /* Задаем стабильный отступ снизу */
    vertical-align: middle;
    line-height: 1.2; /* Фиксируем высоту строки, чтобы текст не прыгал */
}


/* Звездочка обязательного поля */
#contact-form .control-label .star {
    color: #ef4444;
    font-size: 1.1rem;
}

/* Инпуты, Текстареа и Селекторы (Включая кастомные поля, которые появятся позже) */
#contact-form .form-control,
#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea,
#contact-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #1e293b;
    background-color: #f8fafc;
    background-clip: padding-box;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
  border: 1px solid #cbd5e1 !important; /* Четко фиксируем толщину в 1px */
    box-sizing: border-box !important;   /* Включаем рамку внутрь размера поля */
}

/* Эффект при клике/фокусе на поле */
#contact-form .form-control:focus,
#contact-form input:focus,
#contact-form textarea:focus,
#contact-form select:focus {
    color: #0f172a;
    background-color: #ffffff;
    border-color: #3b82f6;
    outline: 0;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

/* Стилизация текстового поля обращения */
#contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

/* ==========================================================================
   ИНДИКАЦИЯ ВАЛИДАЦИИ (Успех / Ошибка)
   ========================================================================== */

/* Сообщение об ошибке под полем */
#contact-form .form-control-feedback {
    display: block;
    font-size: 0.825rem;
    color: #ef4444;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Состояние ОШИБКИ (Красная рамка) */
#contact-form .has-danger .form-control,
#contact-form .invalid,
#contact-form .form-control-danger {
    border-color: #fca5a5 !important;
    background-color: #fff5f5 !important;
}
#contact-form .has-danger .form-control:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
    border-color: #ef4444 !important;
}

/* Состояние УСПЕХА (Мягкая зеленая рамка для заполненных полей) */
#contact-form .has-success .form-control,
#contact-form .valid,
#contact-form .form-control-success {
    border-color: #cbd5e1; /* Не делаем кислотно-зеленым, оставляем спокойным благородным */
    background-color: #f8fafc;
}

/* ==========================================================================
   КНОПКА ОТПРАВКИ И НИЖНЯЯ ПАНЕЛЬ
   ========================================================================== */

/* Блок с кнопкой */
#contact-form .control-group:last-of-type {
    margin-top: 2rem;
    margin-bottom: 0;
}

/* Кнопка отправки */
#contact-form button.btn-primary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%; /* На мобильных на всю ширину */
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background-color: #2563eb; /* Трендовый насыщенный синий */
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2), 0 2px 4px -1px rgba(37, 99, 235, 0.1);
}

/* Эффекты кнопки при наведении */
#contact-form button.btn-primary:hover {
    background-color: #1d4ed8;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.25), 0 4px 6px -4px rgba(37, 99, 235, 0.25);
    transform: translateY(-1px);
}

/* Эффект кнопки при нажатии */
#contact-form button.btn-primary:active {
    background-color: #1e40af;
    transform: translateY(0);
}

/* Адаптивность для больших экранов */
@media (min-width: 576px) {
    #contact-form button.btn-primary {
        width: auto; /* На десктопе кнопка становится аккуратного своего размера */
        min-width: 160px;
    }
}


/* ==========================================================================
   СОВРЕМЕННЫЙ БЛОК УВЕДОМЛЕНИЯ ПЕРЕД ФОРМОЙ СНТ
   ========================================================================== */
.com-contact__misc.alert.alert-info {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(8px); /* Размытие заднего фона (поддерживается всеми современными браузерами) */
    -webkit-backdrop-filter: blur(8px);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  font-family: 'Onest', sans-serif;
    padding: 1.5rem 1.75rem;
    margin: 24px auto;
    color: #475569;

    font-size: 0.95rem;
    line-height: 1.6;
}
.com-contact__misc.alert.alert-info h3,
.com-contact__misc.alert.alert-info strong {
    color: #1e293b !important;
    font-weight: 600;
}


/* Оформление списков (если сроки выведены через тег <ul> / <li>) */
.com-contact__misc.alert.alert-info ul {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    padding-left: 1.25rem;
}

.com-contact__misc.alert.alert-info li {
    margin-bottom: 0.25rem;
    list-style-type: disc;
}

/* Небольшой интерактивный эффект при наведении, как у формы */
.com-contact__misc.alert.alert-info:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease-in-out;
}
/* Полностью скрываем стандартный блок текстового поля Тема с экрана */
#contact-form .control-group:has(#jform_contact_emailmsg) {
    display: none !important;
}
/* Полностью скрываем блоки полей СНТ и ФИО с экрана */
#contact-form .control-group:has([id*="snt_nomer_uchastka"]),
#contact-form .control-group:has([id*="snt_street_name"]),
#contact-form .control-group:has([id*="snt_phone"]),
#contact-form .control-group:has(#jform_contact_name),
#contact-form .control-group:has(#jform_contact_email),
#contact-form .control-group.field-spacer {
    display: none !important;
}

/* Позиционируем блок загрузки файла между Темой и Текстом */
#contact-form .control-group:has([id*="snt-file"]),
#contact-form .control-group:has([id*="snt_file"]) {
    display: block !important;
    order: 2 !important;
    margin-bottom: 1.2rem !important;
}

/* Красиво оформляем лейбл над кнопкой */
#contact-form .control-group:has([id*="snt-file"]) .control-label label {
    font-weight: 600 !important;
    color: #475569 !important;
    margin-bottom: 0.35rem !important;
}

/* СТИЛИЗУЕМ САМ НАВЕДЕННЫЙ ИНПУТ КАК КНОПКУ */
#contact-form input.snt-file-input-clean[type="file"] {
    display: inline-block !important;
    width: auto !important;
    min-width: 210px !important;
    border: 1px solid #cbd5e1 !important;
    padding: 0.5rem 1rem !important;
    padding-left: 38px !important; /* Отступ под иконку скрепки */
    border-radius: 6px !important;
    background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13'/%3E%3C/svg%3E") no-repeat 12px center !important;
    background-size: 16px !important;
    color: #475569 !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.15s ease-in-out;
}

/* Эффект наведения мышки или тапа */
#contact-form input.snt-file-input-clean[type="file"]:hover {
    background-color: #f8fafc !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
}


/* Стилизация новой строки приветствия СНТ */
.snt-user-welcome {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  max-width: 650px;
  margin: 0 auto 1.5rem auto;
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.6;
  box-sizing: border-box;
  display: block;
  width: 100%;
  text-align: left;
}

.snt-user-welcome strong {
    color: #0f172a !important;
    font-weight: 600 !important;
}

/* Стилизация серых плашек (участок, линия) */
.snt-user-badge {
    background-color: #e2e8f0 !important;
    color: #475569 !important;
    padding: 0.15rem 0.5rem !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    
    /* inline-flex изолирует плашку, чтобы шаблон не растягивал её на всю ширину столбца */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important; /* Запрещаем перенос текста внутри плашки */
    vertical-align: baseline !important;
    margin: 0 0.2rem !important;
}


/* 2. Прячем служебные заголовки fieldset (Легенды "Отправка письма" и "Данные обращения") */
#contact-form legend {
    display: none !important;
}

/* 3. Превращаем саму форму в вертикальную гибкую ленту */
#contact-form {
    display: flex !important;
    flex-direction: column !important;
}

/* 4. Выталкиваем ВТОРОЙ fieldset (где остался только выпадающий список темы) на 1-е место */
#contact-form fieldset:last-of-type {
    order: 1 !important;
    margin-bottom: 1rem !important;
}

/* 5. Ставим ПЕРВЫЙ fieldset (где осталось только окно Текста) на 2-е место */
#contact-form fieldset:first-of-type {
    order: 2 !important;
    margin-bottom: 1.5rem !important;
}

/* 6. Блок с кнопкой "Отправить" железно фиксируем в самом низу */
#contact-form > .control-group:last-of-type {
    order: 3 !important;
}

/* Если на странице контактов появляется системное сообщение об успехе */
body:has(.alert-success) #contact-form,
body:has(.alert-message) #contact-form {
    display: none !important;
}

/* Дополнительно скрываем строку приветствия садовода после отправки */
body:has(.alert-success) .snt-user-welcome,
body:has(.alert-message) .snt-user-welcome {
    display: none !important;
}

/* Стили для таблицы истории обращений */
.snt-history-table th {
    font-weight: 600;
    padding: 0.75rem 1rem !important;
}

.snt-history-table td {
    padding: 0.5rem !important;
    font-size: 0.925rem;
    vertical-align: top;
}

/* Ограничиваем высоту слишком длинных сообщений скроллом */
.snt-msg-text {
    max-height: 120px;
    overflow-y: auto;
    white-space: pre-line;
    color: #475569;
    background: #f8fafc;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.snt-history-table .badge {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
}

/* Адаптивные стили для истории обращений СНТ */
@media screen and (max-width: 768px) {
    /* 1. Скрываем стандартную шапку таблицы */
    .snt-history-table thead {
        display: none !important;
    }

    /* 2. Превращаем каждую строку таблицы в отдельную карточку */
    .snt-history-table tr {
        display: block !important;
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 12px !important;
        padding: 1rem !important;
        margin-bottom: 1rem !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
    }

    /* 3. Превращаем ячейки в блоки и настраиваем их расположение */
    .snt-history-table td {
        display: block !important;
        width: 100% !important;
        padding: 0.9rem 0 !important;
        border: none !important;
        text-align: left !important;
    }

    /* 4. Выстраиваем Дату, Адресата и Статус в одну компактную верхнюю линию */
    .snt-history-table td:nth-child(1) {
        font-size: 0.85rem !important;
        display: inline-block !important;
        width: auto !important;
        margin-right: 0.5rem;
    }
    
    .snt-history-table td:nth-child(2) {
        display: inline-block !important;
        width: auto !important;
        margin-right: 0.5rem;
    }

    .snt-history-table td:nth-child(5) {
        display: block !important;
        float: right !important; /* Уводим бейдж статуса в правый верхний угол карточки */
        padding: 0 !important;
        margin-top: -3px;
    }

    /* Очистка флоата для корректного вывода следующих строк */
    .snt-history-table tr::after {
        content: "";
        display: table;
        clear: both;
    }

    /* 5. Стилизуем заголовок темы внутри карточки */
    .snt-history-table td:nth-child(3) {
        font-size: 1.05rem !important;
        color: #0f172a !important;
        margin-top: 0.5rem !important;
        border-top: 1px dashed #e2e8f0 !important;
        padding-top: 0.5rem !important;
    }

    /* 6. Настраиваем блок текста обращения под мобильный экран */
    .snt-history-table td:nth-child(4) {
        padding-top: 0.25rem !important;
    }
    
    .snt-history-table .snt-msg-text {
        max-height: 160px !important; /* Чуть увеличиваем высоту скролла на мобильных для удобства тапа */
        background-color: #f8fafc !important;
        font-size: 0.875rem !important;
    }
    
    /* Корректируем отступы пагинации на смартфонах */
    #snt-pagination {
        margin-top: 1.5rem !important;
        flex-wrap: wrap; /* Если страниц будет много, они плавно перенесутся на новую строку */
    }
}
