/* Общие стили */
body {
  font-family: "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 20px;
  background: #f9f9fb;
  color: #333;
}

/* Поле поиска */
#search {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
}

#search:focus {
  outline: none;
  border-color: #2196f3;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

/* Таблица */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

thead {
  background-color: #f1f3f5;
  text-align: left;
}

td, th {
  padding: 14px 16px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 15px;
}
 
th {
  font-weight: 600;
  color: #555;
}

/* Цветовые блоки по трое строк */
tr.group-1 {
  background-color: #ffffff;
}
tr.group-2 {
  background-color: #f9f9fc;
}
tr.group-3 {
  background-color: #f1f5ff;
}

tr:last-child td {
  border-bottom: none;
}

/* Группировка строк по 3 разными цветами */
tbody tr:nth-child(3n+1) {
  background-color: #ffffff;
}

tbody tr:nth-child(3n+2) {
  background-color: #f7faff;
}

tbody tr:nth-child(3n+3) {
  background-color: #eef6ff;
}

/* Эффект наведения */
tbody tr:hover {
  background-color: #e3f2fd !important;
}

/* Граница между блоками по 3 строки — опционально */
tbody tr:nth-child(3n) td {
  border-bottom: 2px solid #d0d7e0;
}

/* Drag-and-drop */
tr.dragging {
  opacity: 0.4;
  background: #d6ecff !important;
  border: 1px dashed #2196f3;
}

/* Столбец ID */
.is_id {
  width: 80px;
  text-align: center;
  vertical-align: middle;
  font-family: monospace;
  color: #666;
  padding: 8px;
}

/* Центрируем чекбокс внутри ячейки */
.is_id input[type="checkbox"] {
  margin: 0;
  display: inline-block;
  vertical-align: middle;
}

/* Сортировка */
#sort-id {
  cursor: pointer;
  user-select: none;
  color: #2196f3;
  transition: color 0.2s;
}

#sort-id:hover {
  text-decoration: underline;
  color: #1976d2;
}

/* Адаптивность */
@media (max-width: 600px) {
  td, th {
    padding: 10px 12px;
    font-size: 14px;
  }

  #search {
    padding: 10px 12px;
    font-size: 15px;
  }
}

/* Размытие только контента внутри #app */
#app.blurred {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

/* Оверлей с сообщением об ошибке */
#error-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 10000;
  background: rgba(255, 255, 255, 0.6); /* Полупрозрачный белый фон */
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
}

/* Сообщение об ошибке */
#error-overlay .error-message {
  background: #ffffff;
  border: 2px solid #f44336;
  color: #f44336;
  font-size: 18px;
  font-weight: 600;
  padding: 20px 32px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  text-align: center;
}

/* Класс для скрытия элементов */
.hidden {
  display: none !important;
}