/* ===== Общие стили страницы «Бланки ЧОП» ===== */
* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #f3f5f7;
    color: #1f2430;
}

.page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 20px 40px;
}

.page-title { font-size: 24px; margin: 0 0 20px; }

.card {
    background: #fff;
    border-radius: 10px;
    padding: 24px 28px 28px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}

.card h2 {
    margin: 0 0 4px;
    font-size: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e6e9ee;
}

.alert {
    background: #fff1f1;
    border: 1px solid #f0b4b4;
    color: #a40000;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

/* ===== Блок 1: Бланки ЛКО ===== */
.lko form { max-width: 980px; }

.lko h3 { margin: 0; font-size: 17px; }

.lko .form-row {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 15px;
    align-items: center;
    margin-top: 16px;
}

.lko label { font-weight: 600; }

.lko input,
.lko select {
    width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid #cbd2d9;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
    font-family: inherit;
}

.lko input[readonly] { background: #f1f3f5; }

.lko .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: 28px 0 14px;
}

.lko .table-wrap { overflow-x: auto; }

.lko table { width: 100%; border-collapse: collapse; }

.lko th,
.lko td {
    padding: 10px;
    border: 1px solid #dfe3e7;
    text-align: left;
}

.lko th { background: #f5f6f8; }
.lko .col-action { width: 120px; }

.lko .button {
    border: 0;
    border-radius: 6px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.lko .button.primary {
    margin-top: 20px;
    background: #1f6feb;
    color: #fff;
    font-size: 16px;
    padding: 12px 22px;
}
.lko .button.primary:hover { background: #1a5ed0; }

.lko .button.secondary { background: #e9ecef; color: #20252b; }
.lko .button.danger { background: #dc3545; color: #fff; }

.lko .errors {
    margin-top: 16px;
    padding: 12px 15px;
    border-radius: 6px;
    background: #fff1f1;
    border: 1px solid #f0b4b4;
    color: #a40000;
    line-height: 1.5;
}

/* ===== Блок 2: Реестр ===== */
.reestr .top-fields {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin: 16px 0 20px;
}

.reestr .field { display: flex; flex-direction: column; gap: 6px; }

.reestr .field label { font-size: 13px; font-weight: 600; color: #444; }

.reestr .req { color: #d1453b; }

.reestr select,
.reestr input[type=date],
.reestr textarea {
    font-family: inherit;
    font-size: 14px;
    padding: 8px 10px;
    border: 1px solid #cdd2da;
    border-radius: 6px;
    background: #fff;
    resize: vertical;
}

.reestr select { min-width: 280px; }

.reestr .table-scroll { overflow-x: auto; margin-bottom: 12px; }

.reestr table { border-collapse: collapse; width: 100%; min-width: 1300px; }

.reestr th,
.reestr td {
    border: 1px solid #d7dbe2;
    padding: 6px 8px;
    vertical-align: middle;
    text-align: left;
    font-size: 13px;
}

.reestr thead th { background: #eef1f6; font-weight: 600; text-align: center; }

.reestr .col-num { width: 40px; text-align: center; }
.reestr .col-actions { width: 150px; text-align: center; white-space: nowrap; }

.reestr td textarea { width: 100%; min-height: 34px; border: 1px solid #dfe3e9; }

.reestr .row-number { text-align: center; font-weight: 600; }

.reestr .btn {
    display: inline-block;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 14px;
    cursor: pointer;
}

.reestr .btn-primary { background: #1f6feb; color: #fff; font-size: 16px; font-weight: 600; padding: 12px 22px; }
.reestr .btn-primary:hover { background: #1a5ed0; }

.reestr .btn-secondary { background: #e9ecef; color: #1f2430; margin-bottom: 16px; font-weight: 600; }
.reestr .btn-secondary:hover { background: #dde1e6; }

.reestr .btn-mini {
    border: 1px solid #cdd2da;
    background: #fff;
    border-radius: 5px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    margin: 2px;
}

.reestr .btn-clear:hover { background: #fff6e0; border-color: #e8c766; }
.reestr .btn-delete:hover { background: #ffecec; border-color: #e39a9a; }

.reestr .submit-row { margin-top: 10px; }

.reestr .form-error {
    background: #fff0ef;
    border: 1px solid #e6a7a3;
    color: #9c2c26;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 14px;
}

@media (max-width: 700px) {
    .lko .form-row { grid-template-columns: 1fr; }
    .lko .section-header { align-items: flex-start; flex-direction: column; }
    .card { padding: 18px; }
}
