body {
    font-family: Arial, sans-serif;
    font-size: 11px;
}

/* ===== Таблица ===== */

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin-top: 10px;
}

th {
    background-color: #f2f2f2;
    font-weight: 600;
    text-align: center;   /* заголовки по центру */
    padding: 4px;
    border: 1px solid #ddd;
    font-size: 11px;
}

td {
    border: 1px solid #ddd;
    padding: 3px 4px;
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;   /* по умолчанию одна строка */
}

/* Чередование строк */
tr:nth-child(even) {
    background-color: #fafafa;
}

tr:hover {
    background-color: #eef6ff;
}

/* ===== Перенос ТОЛЬКО для нужных колонок ===== */

th:nth-child(1),
th:nth-child(2),
th:nth-child(3),
th:nth-child(6),
th:nth-child(7),
th:nth-child(8),
td:nth-child(1),
td:nth-child(2),
td:nth-child(3),
td:nth-child(6),
td:nth-child(7),
td:nth-child(8) {
    white-space: normal;      /* разрешаем перенос */
    word-break: break-word;   /* перенос длинных строк */
}

/* ===== Ширина колонок ===== */

th:nth-child(1), td:nth-child(1) {
    width: 2%;
    text-align: center;
}

th:nth-child(2), td:nth-child(2) {
    width: 17%;
}

th:nth-child(3), td:nth-child(3) {
    width: 17%;
}

/* Остальные колонки компактные */
th:nth-child(n+4), td:nth-child(n+4) {
    width: 4%;
    text-align: center;
}

th:nth-child(6), td:nth-child(6) {
    width: 17%;
    text-align: left;
}

th:nth-child(7), td:nth-child(7) {
    width: 9%;
}

th:nth-child(8), td:nth-child(8) {
    width: 9%;
}

/* ===== Поля формы ===== */

.input-user {
    max-width: 100px;
}

.input-query-id {
    width: 100px;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top: 4px solid #4CAF50;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  margin-left: 10px;
  display: inline-block;
  vertical-align: middle;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
