.badge-soft {
  background: #e9eef8;
  color: #3b4c6b;
}

.section-title {
  color: #111;
  font-size: 1.125rem;
  font-weight: 600;
}

.page-subtitle {
  color: #687492;
  font-size: 0.95rem;
}

.chart-placeholder {
  height: 220px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f3f6fb, #ffffff);
  border: 1px dashed #d1d8e6;
}

.toast-container {
  z-index: 1080;
}


.brand-text {
  font-weight: 800;
  font-size: 1.75rem;
  color: #ffffff !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand-text-mini {
  font-weight: 800;
  font-size: 1.15rem;
  color: #ffffff !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 16px 20px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

:root {
  --field-height: 42px;
  --field-radius: 0.35rem;
}

.form-group > label,
.col-form-label {
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.dropdown .btn.dropdown-toggle {
  height: var(--field-height);
  padding: 0.375rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--field-radius);
}

.form-control,
.custom-select {
  height: var(--field-height);
  line-height: 1.25;
  border-radius: var(--field-radius);
}

textarea.form-control {
  min-height: 110px;
  height: auto;
  line-height: 1.4;
}

/* Общие стили для всех кнопок */
.btn:not(.btn-sm):not(.btn-lg) {
  padding: 0.375rem 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  border-radius: var(--field-radius);
}

/* Обычные кнопки (submit, button) */
.btn:not(.btn-sm):not(.btn-lg):not(.dropdown-toggle) {
  margin-top: 20px;
  height: var(--field-height);
}

/* Dropdown кнопки */
.btn.dropdown-toggle:not(.btn-sm):not(.btn-lg) {
  height: var(--field-height);
  margin-top: 0; /* Убираем margin для dropdown */
}

/* Если dropdown находится в группе с инпутами */
.btn.dropdown-toggle.w-100:not(.btn-sm):not(.btn-lg) {
  margin-top: 0;
  justify-content: flex-start; /* Выравнивание текста влево */
}

.btn .mdi,
.btn .fa {
  line-height: 1;
}

.input-group > .form-control,
.input-group > .custom-select,
.input-group > .input-group-prepend > .btn,
.input-group > .input-group-append > .btn {
  height: var(--field-height);
}

/* Выравнивание для групп форм */
.form-group {
  margin-bottom: 1rem;
}

/* Если dropdown не имеет лейбла, добавляем небольшой отступ сверху */
.form-group .btn.dropdown-toggle.w-100:not(.btn-sm):not(.btn-lg) {
  /* margin-top: 0.25rem; */
}

/* Для кнопок отправки формы */
.btn[type="submit"]:not(.btn-sm):not(.btn-lg) {
  /* margin-top: 1rem; */
}

/* Для dropdown в формах без лейбла */
.form-group:first-child .btn.dropdown-toggle.w-100:not(.btn-sm):not(.btn-lg) {
  margin-top: 0;
}

.input-group > .input-group-prepend > .btn,
.input-group > .input-group-append > .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.table th,
.table td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

.table .btn-sm {
  min-height: 32px;
  padding: 0.25rem 0.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.table .badge {
  vertical-align: middle;
}

.card .form-row > [class*="col-"],
.card .row > [class*="col-"] {
  display: flex;
  flex-direction: column;
}

/* Базовая карточка приложения: единый легкий shadow + без рамки */
.cf-card {
  border: 0 !important;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Аутентификация */
.cf-auth-card {
  border-radius: 0.5rem;
}

.cf-auth-logo-image {
  max-height: 72px;
  width: auto;
}

/* Переопределяем legacy правило темы .auth .brand-logo img { width: 150px; } */
.auth .cf-auth-logo .cf-auth-logo-image {
  width: auto !important;
  max-width: 100%;
  max-height: 72px;
}

.cf-auth-title {
  margin-bottom: 0.5rem;
}

.cf-auth-subtitle {
  margin-bottom: 0;
}

.cf-auth-actions .cf-auth-submit {
  margin-top: 0;
}

@media (max-width: 767.98px) {
  .cf-auth-card {
    padding: 1.5rem !important;
  }

  .cf-auth-logo-image {
    max-height: 56px;
  }

  .auth .cf-auth-logo .cf-auth-logo-image {
    max-height: 56px;
  }
}

/* Кнопки-экшены в фильтрах/поиске: компактно, в одну строку */
.cf-inline-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cf-inline-actions .btn:not(.dropdown-toggle) {
  margin-top: 0;
  width: auto;
}

.cf-sidebar-user-icon {
  font-size: 32px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.9);
}

.sidebar .nav .nav-item.sidebar-user-actions .sidebar-user-menu .nav-link.active {
  color: #ffffff;
  font-weight: 600;
}

/* Стабильный, нативный вид чекбоксов без legacy helper-разметки темы */
.form-check.cf-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding-left: 0;
  margin-top: 0;
  margin-bottom: 0;
}

/* Показываем нативный checkbox */
.form-check.cf-check .form-check-input {
  position: static;
  opacity: 1 !important;
  filter: none !important;
  z-index: auto;
  margin-left: 0;
  margin-top: 0.15rem;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Метка без смещений из темы */
.form-check.cf-check .form-check-label {
  margin: 0 !important;
  padding: 0;
  line-height: 1.5;
  cursor: pointer;
}

/* Отключаем декоративный helper темы */
.form-check.cf-check .form-check-label .input-helper {
  display: none !important;
}

.form-check .form-check-label .input-helper,
.form-check .form-check-label .input-helper::before,
.form-check .form-check-label .input-helper::after {
  display: none !important;
  content: none !important;
}
