/* -------------------------------------------------------------
   Общие стили проекта
   ------------------------------------------------------------- */
body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    margin: 0;
    padding: 0;
}

/* Контейнер, в котором отображается основной контент (таблица,
   форма и т.п.).  Переиспользуется в base.html. */
.container {
    max-width: 1200px;
    margin: 20px auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

/* -------------------------------------------------------------
   Навигация (menu) – уже работает, оставляем без изменений
   ------------------------------------------------------------- */
.main-nav {
    background: #2c3e50;
    padding: 10px 0;
}
.main-nav ul {
    list-style: none;
    margin: 0;
    display: flex;
    gap: 30px;
    justify-content: center;
}
.main-nav a {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 500;
}
.main-nav a.active {
    color: #f1c40f;
    border-bottom: 2px solid #f1c40f;
}

/* -------------------------------------------------------------
   Таблицы (записи и города)
   ------------------------------------------------------------- */
.records-table,
.city-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 13px;
}
.records-table th,
.records-table td,
.city-table th,
.city-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}
.records-table th,
.city-table th {
    background: #3498db;
    color: #fff;
}

/* -------------------------------------------------------------
   Сообщения (успех / ошибка)
   ------------------------------------------------------------- */
.message {
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    text-align: center;
}
.message.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.message.error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* -------------------------------------------------------------
   Форма ввода (новый блок)
   ------------------------------------------------------------- */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    align-items: flex-end;
}
.form-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
label {
    font-weight: bold;
    color: #34495e;
}
select,
input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}
select:disabled { background-color: #e9ecef; cursor: not-allowed; }
input[type="number"] {
    width: 70px;
    text-align: right;
}

/* -------------------------------------------------------------
   Блок «Итого» (summary)
   ------------------------------------------------------------- */
.summary {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-top: 20px;
    align-items: center;
    font-weight: bold;
    flex-wrap: wrap;
    background: #ecf0f1;
    padding: 15px;
    border-radius: 4px;
}
.summary-item { font-size: 16px; }

/* -------------------------------------------------------------
   Кнопки
   ------------------------------------------------------------- */
button {
    padding: 12px 24px;
    border: none;
    background: #3498db;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}
button:hover { background: #2980b9; }
button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* -------------------------------------------------------------
   Подсказки тарифов рядом с полями ввода
   ------------------------------------------------------------- */
.tariff-hint {
    font-size: 11px;
    color: #7f8c8d;
    margin-left: 4px;
}

/* -------------------------------------------------------------
   Список городов (динамический блок)
   ------------------------------------------------------------- */
#citiesBlock .loading,
#citiesBlock .error-text {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 20px;
}
#citiesBlock .error-text { color: #e74c3c; font-weight: bold; }

/* -------------------------------------------------------------
   Таблица последних записей (обёртка)
   ------------------------------------------------------------- */
.records-list { margin-top: 30px; }
.records-list h2 { color: #2c3e50; border-bottom: 2px solid #3498db; padding-bottom: 10px; }
