 /* Базовые стили */
    body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      background: #f4f7fa;
      margin: 20px;
      padding: 0;
      box-sizing: border-box;
    }

    form, .filters, table, .summary, #logSection {
      background: white;
      padding: 15px 20px;
      border-radius: 10px;
      box-shadow: 0 0 10px rgba(0,0,0,0.05);
      margin-bottom: 20px;
    }

    /* Форма и фильтры */
    form input, form select, form button,
    .filters input, .filters button {
      padding: 8px 12px;
      margin: 5px 10px 5px 0;
      border-radius: 6px;
      border: 1px solid #ccc;
      font-size: 14px;
      width: auto;
      max-width: 100%;
      box-sizing: border-box;
    }

    form button, .filters button {
      background: #007bc4;
      color: white;
      border: none;
      cursor: pointer;
      transition: background-color 0.3s ease;
    }

    form button:hover, .filters button:hover {
      background: #005fa3;
    }

    /* Таблица */
table {
  width: 100% !important; /* растягиваем таблицу на всю ширину контейнера */
  border-collapse: collapse;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0,0,0,0.05);
  table-layout: fixed; /* фиксированная ширина колонок */
}

thead tr {
  background-color: #007bc4;
  color: white;
  user-select: none;
}

th, td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

th {
  cursor: pointer;
}

tr:hover {
  background: #f1f9ff;
}

    /* Кнопки действий */
    button.action-btn {
      background: transparent;
      border: none;
      cursor: pointer;
      font-size: 18px;
      margin-right: 8px;
      padding: 0;
    }

    button.action-btn:hover {
      color: #005fa3;
    }

    /* Секция с графиком */
    #chart {
      max-width: 100%;
      height: 300px !important;
      display: block;
      margin: 0 auto;
    }

    /* Секция журнала */
    #logList {
      max-height: 200px;
      overflow-y: auto;
      padding-left: 0;
      list-style: none;
      font-size: 14px;
    }

    /* Медиа-запрос для экранов до 600px */
    @media (max-width: 600px) {

      body {
        margin: 10px;
      }

      form input, form select, form button,
      .filters input, .filters button {
        margin: 8px 0;
        width: 100%;
      }

     @media (max-width: 600px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }
  thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  tr {
    border: 1px solid #ccc;
    margin-bottom: 15px;
    border-radius: 10px;
    padding: 10px;
    background: white;
  }
  td {
    border: none;
    border-bottom: 1px solid #eee;
    padding-left: 50%;
    position: relative;
    white-space: normal;
  }
  td:before {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: 600;
    content: attr(data-label);
    color: #555;
  }
  td:last-child {
    padding-left: 12px;
    text-align: center;
  }
}

      /* Уменьшаем шрифт для мелких экранов */
      form h2, .filters h2, #logSection h3 {
        font-size: 18px;
      }
    }