.materials-content {
    min-width: 0;
    padding: 20px 22px 34px;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
}

.materials-content .topbar {
    align-items: center;
    margin-bottom: 12px;
}

.materials-content .topbar h1 {
    font-size: 28px;
    font-weight: 650;
    letter-spacing: -.025em;
}

.materials-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) minmax(210px, .8fr) 160px auto;
    align-items: end;
    gap: 9px;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #e0e7ee;
    border-radius: 10px;
    background: #fff;
}

.materials-toolbar label {
    display: grid;
    gap: 5px;
    color: #526273;
    font-size: 11px;
    font-weight: 550;
}

.materials-toolbar input,
.materials-toolbar select {
    width: 100%;
    min-height: 35px;
    padding: 6px 10px;
    border: 1px solid #d7e0e9;
    border-radius: 8px;
    background: #fff;
    color: #203b55;
    font: inherit;
    font-size: 12px;
}

.materials-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 35px;
    padding: 6px 12px;
    border: 1px solid #d7e0e9;
    border-radius: 8px;
    background: #fff;
    color: #295274;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}

.materials-panel {
    overflow: hidden;
    border: 1px solid #dfe7ef;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(32, 80, 137, .05);
}

.materials-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.materials-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
    table-layout: fixed;
}

.materials-table th,
.materials-table td {
    padding: 7px 9px;
    border-bottom: 1px solid #e9eef3;
    color: #344b61;
    font-size: 11px;
    line-height: 1.25;
    text-align: left;
}

.materials-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f4f7fa;
    color: #6e7d8c;
    font-size: 10px;
    font-weight: 600;
}

.materials-table tbody tr:hover td {
    background: #f8fafc;
}

.materials-table tbody tr[data-material-card] {
    cursor: pointer;
}

.materials-table tbody tr[data-material-card]:focus-visible td {
    background: #edf5fc;
    outline: 2px solid #4b81b8;
    outline-offset: -2px;
}

.materials-table th:nth-child(1) { width: 115px; }
.materials-table th:nth-child(2) { width: auto; }
.materials-table th:nth-child(3) { width: 70px; }
.materials-table th:nth-child(4) { width: 95px; }
.materials-table th:nth-child(5) { width: 190px; }
.materials-table th:nth-child(6) { width: 70px; }

.materials-code {
    color: #205089 !important;
    font-weight: 600;
    white-space: nowrap;
}

.materials-name {
    color: #1f3952 !important;
    font-weight: 520;
}

.materials-stock {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.materials-stock.negative {
    color: #b13c30;
}

.materials-empty {
    padding: 28px 12px !important;
    color: #7b8997 !important;
    text-align: center !important;
}

.materials-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 11px;
    border-top: 1px solid #e2e9f0;
    color: #718092;
    font-size: 10px;
}

.materials-pagination div {
    display: flex;
    gap: 6px;
}

.materials-pagination button {
    width: auto;
    min-height: 31px;
    margin: 0;
    padding: 5px 10px;
    border-radius: 7px;
    font-size: 10px;
}

@media (max-width: 820px) {
    .materials-content {
        padding: 14px 11px 28px;
    }

    .materials-toolbar {
        grid-template-columns: 1fr;
        padding: 8px;
    }
}

/* Кликабельные строки справочника ТМЦ */
#materials-body tr[data-material-card] {
    cursor: pointer;
}

#materials-body tr[data-material-card]:hover td {
    background: #eef5fc;
}

#materials-body tr[data-material-card]:focus {
    outline: 2px solid #205089;
    outline-offset: -2px;
}
