/* Справочники p_* — визуальный паритет с /clients и /tks */
.spr-page {
    color: #333;
    font-family: 'Open Sans', sans-serif;
    padding: 0 8px 24px;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}
.spr-head {
    background: #adc9d4;
    padding: 10px 15px 14px;
    margin: 0 0 12px;
    border-radius: 0 0 8px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.spr-head .heading {
    margin: 0;
    color: #0a3c5f;
    font-size: 1.15rem;
    font-weight: 600;
    text-transform: none;
}
.spr-head .btn {
    margin: 0;
    min-height: 36px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
}
.spr-card {
    background: #fff;
    border: 1px solid #c8d8e0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(10, 60, 95, 0.06);
    position: relative;
}
.spr-card.spr-card-table {
    padding: 0;
    overflow: hidden;
}
.spr-card h6 {
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2ebf0;
    color: #0a3c5f;
    font-size: 14px;
    font-weight: 600;
}
.spr-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 14px;
    align-items: stretch;
}
.spr-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
}
.spr-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 14px;
}
@media (max-width: 1100px) {
    .spr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .spr-page { padding: 0 6px 24px; }
    .spr-card { padding: 12px 10px; }
    .spr-card.spr-card-table { padding: 0; }
    .spr-grid,
    .spr-grid-2,
    .spr-grid-3 { grid-template-columns: 1fr; gap: 10px; }
    .spr-field-span { grid-column: 1 / -1; }
}
.spr-field {
    min-width: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.spr-field > label {
    font-size: 12px;
    font-weight: 600;
    color: #0a3c5f;
    margin: 0;
}
.spr-actions-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2ebf0;
}
.spr-actions-bar .btn {
    margin: 0;
    min-height: 40px;
    border-radius: 6px;
    font-weight: 600;
    min-width: 120px;
}
@media (max-width: 768px) {
    .spr-actions-bar { flex-direction: column; align-items: stretch; }
    .spr-actions-bar .btn {
        width: 100%;
        min-width: 0;
        min-height: 44px;
    }
}
.spr-page .form-control,
.spr-page select.form-control,
.spr-page textarea.form-control {
    width: 100% !important;
    min-height: 38px !important;
    border-radius: 6px !important;
    border: 1px solid #c5d5de !important;
    background: #fff !important;
    color: #333 !important;
    font-size: 13px !important;
    padding: 6px 10px !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}
.spr-page select.form-control,
.spr-page input.form-control {
    height: 38px !important;
}
.spr-page textarea.form-control {
    height: auto !important;
    min-height: 88px !important;
    line-height: 1.4 !important;
    resize: vertical;
}
/* Описание Avito: растёт по тексту (высоту ставит auto-grow с !important) */
.spr-page textarea.avito-desc-ta.form-control {
    min-height: 96px !important;
    max-height: none !important;
    overflow-y: hidden !important;
    resize: none !important;
}
.spr-page .form-control:focus,
.spr-page select.form-control:focus {
    border-color: #5b9bb8 !important;
    box-shadow: 0 0 0 2px rgba(91, 155, 184, 0.2) !important;
}
.spr-page .btn {
    margin: 0;
    min-height: 38px;
    border-radius: 6px;
    font-weight: 600;
}
.spr-page .ui-select-bootstrap > .ui-select-match > .btn {
    min-height: 38px;
    border-radius: 6px;
    border-color: #c5d5de;
}
.spr-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0;
}
.spr-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
}
.spr-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    min-width: 520px;
}
.spr-table.wide { min-width: 860px; }
.spr-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #0a3c5f;
    padding: 6px 8px;
    background: #e8f1f5;
    border-bottom: 1px solid #c8d8e0;
    white-space: nowrap;
}
.spr-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #e8eef2;
    vertical-align: middle;
    font-size: 13px;
    color: #333;
    background: #fff;
}
.spr-table tr:hover td { background: #f7fafb; }
.spr-table a { color: #0a3c5f; font-weight: 600; text-decoration: none; }
.spr-table a:hover { text-decoration: underline; }
.spr-actions-cell { white-space: nowrap; }
.spr-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #c8d8e0;
    background: #fff;
    color: #0a3c5f;
    margin-right: 4px;
    cursor: pointer;
    padding: 0;
    text-decoration: none !important;
    vertical-align: middle;
}
.spr-icon-btn:hover {
    background: #e8f1f5;
    border-color: #0a3c5f;
}
.spr-icon-btn.edit { color: #0a3c5f; }
.spr-icon-btn.del { color: #c0392b; }
.spr-icon-btn.print { color: #0d6efd; }
.spr-save-btn {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    vertical-align: middle;
}
.spr-muted {
    color: #8aa0ad;
    font-size: 13px;
    padding: 14px 12px;
}
.spr-loader { text-align: center; padding: 20px; }
.spr-denied {
    padding: 20px;
    color: #856404;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    margin: 12px 8px;
}
.spr-side-card {
    margin: 0 0 14px;
    background: #fff;
    border: 1px solid #c8d8e0;
    border-radius: 8px;
    padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(10, 60, 95, 0.06);
}
.spr-pagination {
    padding: 8px 12px;
}
