/* Дополнения к шаблону Stisla (static/stisla). Основные стили — там. */

/* Nunito из Stisla содержит только латиницу — добавляем кириллицу */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("stisla/fonts/nunito-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Фирменные цвета: главный #1677E8, акцент #FFD34E, белый #FFFFFF.
   Главный и акцент подставлены прямо в CSS Stisla (primary и warning); здесь — тёмный текст на жёлтом,
   белый на нём не читается. */
.btn-warning, .btn-warning.disabled, .btn-warning:hover, .btn-warning:focus, .btn-warning:active,
.btn-outline-warning:hover, .badge.badge-warning, .alert.alert-warning, .alert.alert-warning .alert-title {
  color: #0b2f6b !important;
}
.card.card-statistic-1 .card-icon.bg-warning .fas { color: #0b2f6b; }

/* Аватар-буква в шапке вместо картинки */
.avatar-initial {
  display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 6px; border-radius: 50%;
  background: #ffd34e; color: #0b2f6b; font-weight: 800; font-size: 14px; vertical-align: middle;
}
.main-navbar .dropdown-menu form .dropdown-item { cursor: pointer; }

/* Логотип */
.sidebar-brand a { display: inline-flex; align-items: center; gap: 10px; }
.sidebar-brand img { height: 46px; width: auto; }
.main-sidebar .sidebar-brand.sidebar-brand-sm a { justify-content: center; width: 100%; }
.sidebar-brand-sm img { height: 40px; width: auto; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.login-brand img { height: 170px; width: auto; }
.page-error img { height: 110px; width: auto; }

/* Меню: бейдж справа */
.main-sidebar .sidebar-menu li a .badge { margin-left: auto; }

/* Карточки статистики — кликабельные, иконки в кругах */
a.card-statistic-1:hover { box-shadow: 0 4px 12px rgba(22, 119, 232, .25); }
.card.card-statistic-1 .card-icon {
  width: 64px; height: 64px; margin: 18px 14px 18px 18px; border-radius: 50%;
  display: grid; place-items: center; line-height: 1;
}
.card.card-statistic-1 .card-icon .fas, .card.card-statistic-1 .card-icon .fab { font-size: 24px; }

/* Подписки */
.card.card-statistic-1 .card-body.billing-sum { font-size: 18px; white-space: nowrap; }

/* Метки классов/групп на странице учреждения */
.unit-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.unit-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 12px; border-radius: 30px;
  background: #f4f6f9; border: 1px solid #dbe7fb;
}
.unit-chip button { border: 0; background: none; color: #98a6ad; padding: 0 6px; border-radius: 30px; cursor: pointer; }
.unit-chip button:hover { background: #fc544b; color: #fff; }
.unit-chip button.unit-edit:hover { background: #1677e8; }
.unit-chip button.unit-edit { font-size: 11px; }

.empty-state h2 { font-size: 16px; }
.badge-light { color: #6c757d; }
.table td, .table th { vertical-align: middle; }

/* Списки с поиском (Select2) */
.form-inline .select2-container { min-width: 180px; margin: 0 .5rem .5rem 0; }
.screen-tools .select2-container { min-width: 220px; }
.select2-results__option { padding: 8px 12px; }
.select2-results__group { padding: 8px 12px 4px; color: #98a6ad; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }

/* Экран КПП */
.screen-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.screen-tools select { width: auto; min-width: 200px; }
.screen-unlock { display: block; width: 100%; border: 0; font-size: 18px; font-weight: 700; cursor: pointer; text-align: center; }
.screen-unlock span { display: block; font-size: 13px; font-weight: 400; margin-top: 4px; }
.screen-unlock[hidden], #scr-empty[hidden] { display: none; }
.screen-card .card-body { display: flex; flex-direction: column; gap: 6px; }
.screen-card.new { animation: screen-pulse 1.2s ease-in-out infinite; }
.screen-card-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.screen-child { font-size: 28px; font-weight: 700; line-height: 1.15; color: #34395e; margin-top: 4px; }
.screen-place { font-size: 18px; font-weight: 600; color: #1677e8; }
.screen-actions { display: flex; gap: 10px; margin-top: 10px; }
.screen-actions .btn { flex: 1; padding: 14px; font-size: 18px; }
.screen-actions .btn:disabled { opacity: .5; cursor: wait; }
@keyframes screen-pulse { 50% { box-shadow: 0 0 0 6px rgba(252, 84, 75, .25); } }
@media (prefers-reduced-motion: reduce) { .screen-card.new { animation: none; box-shadow: 0 0 0 4px rgba(252, 84, 75, .25); } }

/* Полноэкранный режим экрана КПП: прячем меню и шапку */
body.kiosk .main-sidebar, body.kiosk .main-navbar, body.kiosk .navbar-bg, body.kiosk .main-footer { display: none; }
body.kiosk .main-content { padding-left: 30px !important; padding-top: 30px; }

@media (max-width: 575.98px) {
  .screen-child { font-size: 24px; }
  .screen-tools { width: 100%; }
  .screen-tools > * { flex: 1 1 auto; }
}

/* Экран КПП: родитель уже у КПП */
.screen-arrived { margin-top: .35rem; font-weight: 700; color: #1b8a3a; }

/* Страница входа: выбор языка — раскрывается при наведении, на сенсорных экранах — по нажатию */
.lang-dropdown .dropdown-menu { width: auto; min-width: 140px; margin-top: 0; }
@media (hover: hover) {
  .lang-dropdown:hover .dropdown-menu { display: block; }
}
