* {
    box-sizing: border-box;
}

body {
    padding: 0;
    margin: 0;
    font-family: Arial, sans-serif;
    font-size: 13px;
    background: #f5f5f5;
}

/* ── Шапка базы ────────────────────────── */
.headerbox {
    width: 100%;
    color: #ffd900;
    background: #741b00;
    padding: 8px 12px;
    margin: 0 0 6px 0;
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* ── Шрифт и стили полей ────────────────── */
input[type="text"],
textarea {
    width: 95%;
    margin: 1px 0;
    padding: 1px 3px;
    text-align: left;
    height: 18px;
    border: 1px solid #ccc;
    border-radius: 2px;
    font-size: 12px;
    background: #fafafa;
    resize: none;
}

textarea.prim_box {
    width: 95%;
    height: 54px;
    resize: none;
}

select {
    width: 90%;
    font-size: 12px;
}

/* ── Строка карточки ─────────────────────────
   7 колонок:
   1. №      2%
   2. ФИО    26%
   3. Год    9%
   4. Метки  9%   ← "Нас.пункт / Волость / Уезд"
   5. Значения 15% ← сами textarea
   6. Фото   6%
   7. Примечание 30%
   Итого ≈ 97% (2%+ gap)
──────────────────────────────────────────── */
.flex-container3 {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    min-height: 62px;
    border-bottom: 1px solid #ddd;
    background: #fff;
}

.flex-container3:hover {
    background: #fff8f0;
}

/* Все дочерние div */
.flex-container3 > div {
    padding: 3px 2px;
    text-align: center;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 12px;
}

/* 1. Номер */
.flex-container3 > div:nth-of-type(1) {
    width: 2%;
    min-width: 24px;
    font-size: 11px;
    color: #666;
}

/* 2. ФИО */
.flex-container3 > div:nth-of-type(2) {
    width: 26%;
}

/* 3. Год рождения */
.flex-container3 > div:nth-of-type(3) {
    width: 9%;
}

/* 4. Метки места рождения */
.flex-container3 > div:nth-of-type(4) {
    width: 9%;
    text-align: right;
    font-size: 11px;
    color: #555;
    padding-right: 4px;
    justify-content: space-around;
}

/* 5. Значения места рождения */
.flex-container3 > div:nth-of-type(5) {
    width: 17%;
    justify-content: space-around;
}

/* 6. Фото */
.flex-container3 > div:nth-of-type(6) {
    width: 6%;
    font-size: 11px;
}

/* 7. Примечание */
.flex-container3 > div:nth-of-type(7) {
    width: 28%;
    text-align: left;
}

/* ── Заголовочная строка ────────────────── */
.flex-container3.header-row {
    background: #741b00;
    color: #ffd900;
    font-weight: bold;
    min-height: 32px;
    border-bottom: 2px solid #5a1500;
}

.flex-container3.header-row > div {
    font-size: 12px;
    color: #ffd900;
}

/* ── Полоса с результатами ──────────────── */
.result-list {
    width: 100%;
    max-height: 70vh;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-radius: 3px;
}

/* ── Фильтр ─────────────────────────────── */
.filter-bar {
    background: #f0ece4;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px;
    margin-bottom: 8px;
}

.filter-bar input,
.filter-bar textarea,
.filter-bar select {
    background: #fff;
}

/* ── Кнопки ─────────────────────────────── */
input[type="submit"],
input[type="reset"],
input[type="button"] {
    padding: 4px 12px;
    margin: 2px;
    border: 1px solid #741b00;
    border-radius: 3px;
    background: #741b00;
    color: #ffd900;
    cursor: pointer;
    font-size: 12px;
}

input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover {
    background: #9a2500;
}

input[type="reset"] {
    background: #888;
    border-color: #888;
    color: #fff;
}

/* ── Счётчик / разделители ──────────────── */
hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 6px 0;
}

a {
    color: #741b00;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: #c02800;
}
