body {
  font-family: 'Segoe UI', sans-serif;
  background: #f0f4fc;
  margin: 0;
  padding: 20px;
  color: #333;
  line-height: 1.5;
}

form {
  max-width: 400px;
  margin: 40px auto;
  background: #ffffff;
  padding: 30px 25px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

form h2 {
  margin-bottom: 20px;
  font-size: 20px;
  color: #333;
  text-align: center;
}

input[type="text"] {
  width: 100%;
  padding: 14px;
  border: 1px solid #bcdffb;
  border-radius: 10px;
  font-size: 16px;
  margin-bottom: 15px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

input[type="text"]:focus {
  border-color: #1d84e3;
  outline: none;
}

button[type="submit"] {
  width: 100%;
  padding: 14px;
  background-color: #1d84e3;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  transition: background 0.3s ease;
}

button[type="submit"]:hover {
  background-color: #1668bb;
}

#message, #status {
  text-align: center;
  font-size: 14px;
  margin-top: 10px;
}

#main-content {
  max-width: 1500px;
  margin: 20px auto;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

h2 {
  margin-bottom: 20px;
  font-size: 22px;
  color: #1d4e89;
}

#cityButtons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
//  margin-bottom: 20px;
//  padding: 10px;
}

#cityButtons button {
  background-color: #e1f0ff;
  color: #0056a3;
  border: 1px solid #99cfff;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#cityButtons button:hover {
  background-color: #c2e2ff;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 15px;
  table-layout: fixed;
}
th:nth-child(1), td:nth-child(1) { width: 3%; }
th:nth-child(2), td:nth-child(2) { width: 5%; }
th:nth-child(3), td:nth-child(3) { width: 8%; }
th:nth-child(4), td:nth-child(4) { width: 8%; }
th:nth-child(5), td:nth-child(5) { width: 30%; }
th:nth-child(6), td:nth-child(6) { width: 8%; }
th:nth-child(7), td:nth-child(7) { width: 30%; }
th:nth-child(8), td:nth-child(8) { width: 8%; }


/* Показываем заголовок */
thead {
  display: table-header-group; /* по умолчанию, но можно явно указать */
  background-color: #1d4e89; /* тёмно-синий фон */
  color: #ecf0f1; /* светлый цвет текста */
  font-weight: bold;
  font-size: 16px;
  text-align: center;
  border-bottom: 3px solid #2980b9;
}

/* Отступы и выравнивание для ячеек заголовка */
thead th {
  padding: 12px 15px;
  border-right: 1px solid #34495e;
  cursor: default; /* чтобы указатель мыши не менялся */
  user-select: none; /* запрет выделения текста, если нужно */
}

/* Убираем правую границу у последнего заголовка */
thead th:last-child {
  border-right: none;
}

/* Можно добавить эффект при наведении, если нужно */
thead th:hover {
  background-color: #34495e;
}

tbody tr:not(.details-row) {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

tbody tr:not(.details-row) td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

tbody tr:not(.details-row) td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

td {
  padding: 12px;
  vertical-align: top;
}

td.toggle {
  width: 14px;
  text-align: center;
  font-weight: bold;
  /*background-color: #d2eaff;*/
  cursor: pointer;
  font-size: 18px;
}

tr.details-row {
  display: none;
  background-color: #e3f2ff;
  font-size: 14px;
  color: #333;
  transition: all 0.3s ease;
}

tr.details-row td {
  padding: 12px 18px;
  vertical-align: top;
}

tr.details-row td[colspan="5"] {
  padding: 12px 16px;
/*background-color: #cce7ff;*/
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
  width: 50%;
  border-spacing: 10px 15px;
  border-right: 2px solid #a7d4ff; /* 🟦 разделитель */
}

tr.details-row td[colspan="2"] {
  padding: 12px 16px;
  background-color: #f0faff;
  border-left: 2px solid #a7d4ff;  /* 🟦 тот же разделитель */
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  width: 50%;
}


tr.details-row[style*="display: table-row"] {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.stats-flex {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.stats-table-wrapper {
  flex: 1 1 50%;
  min-width: 300px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  padding: 20px;
  box-sizing: border-box;
}

.stats-table {
  width: 40%;
  border-collapse: separate;
  border-spacing: 0 10px;
  font-size: 14px;
  color: #333;
}

.stats-table th {
  text-align: left;
  font-weight: 600;
  padding: 10px;
  color: #1d4e89;
  background: #f2f8ff;
  border-radius: 8px;
}

.stats-table td {
  padding: 10px;
  background: #f9fcff;
  border-radius: 8px;
}

.stats-table tr {
  transition: background 0.3s ease;
}

.stats-table tr:hover td {
  background-color: #eaf4ff;
}

.stats-table tbody tr:first-child td {
  font-weight: 700;
  color: #1d4e89; /* можно усилить цвет */
}

tr.main-row td {
  position: relative;
  background: #fff;
}

/* Вертикальная линия между ячейками */
tr.main-row td:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 15%;
  bottom: 15%;
  right: 0;
  width: 1px;
  background-color: #d0d7e2;
  opacity: 0.8;
}



@media (max-width: 768px) {
  table, thead, tbody, th, td, tr {
    display: block;
    width: 100%;
  }

  tbody tr:not(.details-row) {
    margin-bottom: 20px;
    border-radius: 12px;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    padding: 16px;
    overflow: hidden;
  }

  tbody tr:not(.details-row) td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border: none;
    font-size: 15px;
    border-bottom: 1px solid #eee;
  }

  tbody tr:not(.details-row) td:last-child {
    border-bottom: none;
  }

  tbody tr:not(.details-row) td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #444;
  }

  tr.details-row {
    background: #edf6ff;
    margin: -10px 0 20px;
    padding: 10px 16px;
    border-radius: 8px;
  }

  tr.details-row td {
    display: block;
    padding: 6px 0;
  }
  
    @media print {
  /* 🔹 принудительно печатаем цвета и фоны */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    background: white !important;
  }
}

  
}

