* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f1f3f5;
    color: #252a30;
    font: 14px/1.45 Arial, sans-serif;
}

.site-header {
    background: #263746;
    color: #fff;
    padding: 18px 24px;
}

.site-header h1 {
    margin: 0;
    font-size: 23px;
    font-weight: 600;
}

.site-header p {
    margin: 5px 0 0;
    color: #d4dee6;
}

.page-main {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 18px;
}

.panel {
    min-width: 0;
    background: #fff;
    border: 1px solid #d9dee3;
    border-radius: 7px;
    padding: 16px;
    margin-bottom: 16px;
}

h2 {
    font-size: 17px;
    margin: 0 0 14px;
}

.filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.filter-field {
    min-width: 0;
}

.filter-field-wide {
    grid-column: 1 / -1;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

select,
input {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 9px;
    border: 1px solid #c8ced4;
    border-radius: 4px;
    background: #fff;
    color: #252a30;
    font-size: 14px;
}

select:focus,
input:focus {
    outline: 2px solid #b7d7f2;
    border-color: #2468a2;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

button,
.reset {
    display: inline-block;
    padding: 9px 15px;
    border: 0;
    border-radius: 4px;
    background: #2468a2;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
}

button:hover {
    background: #1b527f;
}

.reset {
    background: #697782;
}

.reset:hover {
    background: #525e67;
}

.count {
    margin-bottom: 10px;
    color: #4b5560;
}

.results {
    display: grid;
    grid-template-columns: minmax(230px, 0.8fr) minmax(0, 2fr);
    gap: 16px;
    align-items: start;
}

.profile-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.profile-list li {
    border-bottom: 1px solid #e5e8eb;
}

.profile-list li:last-child {
    border-bottom: 0;
}

.profile-list a {
    display: block;
    padding: 10px;
    color: #243746;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.profile-list a:hover {
    background: #edf4fa;
}

.profile-list a.active {
    background: #dcecf9;
    font-weight: bold;
}

.sub {
    display: block;
    font-size: 12px;
    color: #6b747c;
    font-weight: normal;
}

.cancelled {
    color: #a52a2a;
    font-weight: bold;
}

.badge {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 4px;
    background: #e5f3e8;
    color: #246b37;
}

.badge.old {
    background: #fde8e7;
    color: #a52a2a;
}

.detail-panel {
    min-width: 0;
    overflow-wrap: anywhere;
}

.detail-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 5px;
}

.detail-meta {
    color: #606a73;
    margin-bottom: 16px;
}

.characteristics {
    width: 100%;
    margin-top: 14px;
    overflow-x: auto;
}

.characteristics table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #d9dee3;
    background: #fff;
}

.characteristics th,
.characteristics td {
    padding: 9px 10px;
    border: 1px solid #e3e7ea;
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.characteristics th {
    width: 55%;
    background: #f5f7f8;
    color: #4b5560;
    font-weight: 600;
}

.characteristics td {
    font-variant-numeric: tabular-nums;
}

.characteristics tr:nth-child(even) td {
    background: #fafbfc;
}

.notes {
    margin-top: 14px;
    padding: 12px;
    background: #f5f7f8;
    border: 1px solid #e3e7ea;
    border-radius: 4px;
    overflow-wrap: anywhere;
}

.notes div {
    margin-top: 5px;
}

.notes div:first-child {
    margin-top: 0;
}

.error {
    padding: 12px;
    background: #fff0f0;
    border: 1px solid #e2aaaa;
    margin-bottom: 14px;
    overflow-wrap: anywhere;
}

.warning {
    color: #755b15;
    font-size: 12px;
    margin-top: 12px;
}

.empty {
    padding: 20px;
    color: #666;
}

/* Чертёж поперечного сечения */

.section-drawing {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 480px;
    margin: 5px auto;
    padding: 2px;
    background: #fff;
    border: 1px solid #e3e7ea;
    border-radius: 5px;
}

.section-svg {
    display: block;
    width: 100%;
    height: auto;
    max-width: 440px;
    color: #263746;
}

.drawing-geometry path,
.drawing-geometry polygon {
    fill: #dce8f3;
    stroke: #355b7c;
    stroke-width: 1.8;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.drawing-dimension {
    fill: none;
    stroke: currentColor;
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.drawing-dimension line {
    fill: none;
    stroke: currentColor;
}

.drawing-dimension text {
    fill: currentColor;
    stroke: none;
    font-family: Arial, sans-serif;
    font-size: 11px;
    paint-order: stroke;
    stroke: #fff;
    stroke-width: 2.5px;
    stroke-linejoin: round;
}

.drawing-unit {
    fill: #69737c;
    font-family: Arial, sans-serif;
    font-size: 10px;
}

.drawing-empty {
    margin: 8px 0 12px;
    font-size: 13px;
    color: #69737c;
}

@media (max-width: 850px) {
    .filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .results {
        grid-template-columns: minmax(0, 1fr);
    }

    .section-drawing {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .page-main {
        padding: 10px;
    }

    .site-header {
        padding: 15px;
    }

    .site-header h1 {
        font-size: 20px;
    }

    .filters {
        grid-template-columns: minmax(0, 1fr);
    }

    .panel {
        padding: 12px;
    }

    .actions > * {
        text-align: center;
    }

    .detail-title {
        font-size: 20px;
    }

    .section-drawing {
        padding: 2px;
    }

    .characteristics th,
    .characteristics td {
        padding: 7px;
    }
}
/* ---------- Чертёж проката ---------- */
.drawing-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 4px;
}
.profile-drawing { display: block; max-width: 100%; height: auto; }
.drawing-caption {
    font: 600 13px/1.3 Arial, sans-serif;
    color: #1f3a5f;
    text-align: center;
    margin-top: 4px;
}
.drawing-meta {
    font: 12px/1.3 Arial, sans-serif;
    color: #666;
    text-align: center;
}
.drawing-empty {
    padding: 12px;
    border: 1px dashed #bbb;
    border-radius: 6px;
    color: #777;
    font: 13px/1.4 Arial, sans-serif;
    text-align: center;
}