* { box-sizing: border-box; }

body {
    font-family: -apple-system, 'Segoe UI', sans-serif;
    padding: 16px;
    margin: 0;
    background: #f5f7fa;
}

h1 { margin: 0 0 16px 0; font-size: 22px; }

.toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    background: white;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

select, button {
    padding: 8px 14px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

button {
    background: #1f6feb;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 500;
}
button:hover { background: #1858c4; }
button:disabled { background: #999; cursor: not-allowed; }

.tab {
    padding: 8px 16px;
    margin-right: 4px;
    background: #e0e0e0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}
.tab.active { background: #1f6feb; color: white; }
.tab:hover { background: #d0d0d0; }
.tab.active:hover { background: #1858c4; }

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
th, td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}
th {
    background: #f0f4f8;
    font-weight: 600;
    position: sticky;
    top: 0;
}
td.num, th.num { text-align: right; }

input[type="number"] {
    width: 80px;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    text-align: right;
}
input[type="text"] {
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.total-row { background: #f0f4f8; font-weight: 600; }

.loading { padding: 20px; text-align: center; color: #666; }
.error { background: #ffe0e0; color: #a00; padding: 12px; border-radius: 6px; margin: 12px 0; }
.result { margin-top: 16px; }

/* Вторичная кнопка (серая) */
.btn-secondary {
    background: #6c757d;
}
.btn-secondary:hover {
    background: #5a6268;
}

/* Скрытие элемента (вместо style="display:none") */
.hidden {
    display: none;
}

/* Отступ для блока настроек */
#month-settings-content {
    margin-top: 20px;
}

/* Контейнер для вкладок */
.tabs-container {
    margin-bottom: 16px;
}

/* Обёртка для кнопки "Сохранить ввод" */
.save-wrapper {
    margin-top: 12px;
}

/* Ширина полей ввода в настройках */
.input-fio {
    width: 180px;
}
.input-type {
    width: 100px;
}