body {
  margin: 0;
  font-family: Arial, sans-serif;
  display: flex;
  height: 100vh;
}

.sidebar {
  width: 250px;
  background: linear-gradient(180deg, #111, #1c1c1c);
  color: #fff;
  min-height: 100vh;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.3);
}

.sidebar li {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: #ccc;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.sidebar li.active {
  background: #333;
  color: #fff;
  border-left: 3px solid #4caf50;
}

.content {
  flex-grow: 1;
  padding: 20px;
  background: #f5f5f5;
  overflow-y: auto;
}

.btn {
  background: #222;
  color: #fff;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
}

.btn:hover {
  background: #444;
}

 /*== зафиксировать размер .btn везде */

.btn {
  background: #222;
  color: #fff;
  border: none;
  padding: 6px 10px; /* немного меньше, чтобы помещалось в таблицу */
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
  font-size: 14px;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px; /* 🔹 Фиксированная высота */
  min-width: 32px;
}

.btn.danger {
  background: #8b0000;
}

.btn.danger:hover {
  background: #a00000;
}



 /*== шапка разделов */

/* ===== Верхняя чёрная полоса ===== */
.section-header {
  display: flex;
  align-items: center;
  background: #000;
  color: #fff;
  padding: 10px 20px;
  font-weight: 600;
  border-radius: 4px;
  margin-bottom: 15px;
}

.section-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* === Иконка-бургер (три полоски меню) === */
.section-icon {
  width: 18px;                    /* ширина всей иконки */
  height: 10px;                   /* общая высота между первой и последней линией */
  display: flex;                  /* включаем флекс-контейнер */
  flex-direction: column;         /* располагаем линии вертикально */
  justify-content: space-between; /* равномерное распределение линий */
  cursor: pointer;                /* курсор-рука при наведении */
  align-self: center;             /* выравниваем по центру текста */
  transform: translateY(-1px);    /* регулирует всю иконку вверх/вниз */
}

/* === Полоски внутри иконки === */
.section-icon span {
  display: block;                 /* каждая полоска — блочный элемент */
  height: 2px;                    /* толщина линии */
  background-color: #fff;         /* белый цвет */
  border-radius: 1px;             /* скруглённые края */
  width: 100%;                    /* ширина на всю иконку */
}

/* === Верхняя полоска (без transform, чтобы не теряла яркость) === */
.section-icon span:first-child {
  margin-top: 0.3px;              /* 👈 используем margin вместо transform:
                                     ↑ меньшее значение — выше,
                                     ↓ большее — ниже */
}


/* === Заголовок раздела === */
.section-title {
  font-size: 16px;
  font-weight: 600;
}

/* === Селектор и стрелка === */
.section-location-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 5px;
}

.section-location-select {
  background: none;
  color: #fff;
  border: none;
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  outline: none;
  padding: 2px 0;
}

.section-location-select option {
  background: #000;
  color: #fff;
}

/* === Плоская треугольная стрелка === */
.section-arrow {
  display: inline-block;
  width: 8px;
  height: 5px;
  background-color: #fff;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transition: transform 0.25s ease;
  transform-origin: center;
  align-self: center;
}

.section-arrow.open {
  transform: rotate(180deg);
}


/* ===========================================
   🧩 Финальный фикс сжатия бокового меню
   — надёжно работает во всех браузерах
   =========================================== */

/* Боковое меню не должно сжиматься */
.sidebar {
  flex-shrink: 0; /* 🚫 запрещаем уменьшение ширины */
}

/* Контент не должен выталкивать sidebar */
.content {
  min-width: 0;        /* 💡 обязательно для flex-контейнера */
  overflow-x: auto;     /* если вдруг что-то выйдет за пределы */
  word-break: break-all; /* перенос любых длинных слов */
  overflow-wrap: anywhere;
}

/* Перенос текста в методических карточках */
.met-card,
.met-body,
.section-content,
.metodal-window,
.viewer-window {
  word-break: break-all;
  overflow-wrap: anywhere;
  white-space: normal;
}

/* На всякий случай ограничим ширину карточек */
.met-card {
  max-width: 100%;
  box-sizing: border-box;
}

/* CSS для сервиса */

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
}

.full-textarea {
  width: 100%;
  height: 70px;
  margin-top: 10px;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.total-line {
  text-align: right;
  margin-top: 10px;
  font-size: 16px;
}

.scroll-box {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fafafa;
  padding: 5px;
}

.footer-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Подсветка выбранной категории — зелёная линия снизу */
.category-btn.active-cat {
  position: relative;
}

.category-btn.active-cat::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -3px;
  height: 3px;
  background: #4caf50;
  border-radius: 3px;
}

/* =========================================
   🧾 ВИДЖЕТ КАССЫ ATOL (глобальный)
   ========================================= */

.atol-widget {
  margin-top: auto; /* прижат к низу */
  padding: 15px;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.2);
  font-size: 13px;

  text-align: center; /* 🔥 центрируем текст */
}

.atol-title {
  font-weight: 600;
  margin-bottom: 10px;
  color: #fff;
}

.atol-status {
  margin-bottom: 12px;
  line-height: 1.6;
}

.status-online {
  color: #4caf50;
  font-weight: 600;
}

.status-offline {
  color: #ff4d4d;
  font-weight: 600;
}

.shift-open {
  color: #4caf50;
  font-weight: 600;
}

.shift-closed {
  color: #ff4d4d;
  font-weight: 600;
}

.atol-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center; /* 🔥 центр кнопок */
}

.atol-widget .btn {
  width: 80%; /* 🔥 не во всю ширину, а аккуратно по центру */
}

/* =========================================
   🔧 МОДАЛКА НАСТРОЙКИ КАССЫ
   ========================================= */

#atolSettingsModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

#atolSettingsModal .modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 25px 30px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  animation: scaleIn 0.2s ease;
}

#atolSettingsModal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

#atolSettingsModal h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

#atolSettingsModal .modal-close {
  font-size: 20px;
  cursor: pointer;
  transition: 0.2s;
  opacity: 0.6;
}

#atolSettingsModal .modal-close:hover {
  opacity: 1;
}

#atolSettingsModal label {
  font-size: 14px;
  font-weight: 500;
  color: #444;
}

#atolCashierInput {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
  transition: 0.2s;
}

#atolCashierInput:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

#atolSettingsModal .modal-buttons {
  margin-top: 25px;
  display: flex;
  justify-content: flex-end;
}

#atolSettingsModal .btn.main {
  background: #4caf50;
}

#atolSettingsModal .btn.main:hover {
  background: #43a047;
}

/* Анимации */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}