html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.controls {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding: 8px 12px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.controls input {
    padding: 6px 8px;
    font-size: 14px;
    width: 220px;
}

.controls button {
    padding: 6px 10px;
    font-size: 14px;
}

.info {
    margin-left: auto;
    font-size: 12px;
    color: #666;
}

/* КОНТЕЙНЕР ТАБЛИЦЫ ПРИКОЛОЧЕН К ЭКРАНУ */
.table-wrap {
    position: fixed;
    left: 0;
    right: 0;
    /* top зададим из JS = низ панели; если панели нет, можно сразу top:0; */
    bottom: 0;
    overflow: auto;
    background: #fff;
    border-top: 1px solid #ddd;
}

table {
    border-spacing: 0;
    width: 100%;
}

thead {
    /*position: relative;*/
    z-index: 10;
}

thead th {
    position: sticky;
    top: 0; /* липко внутри .table-wrap */
    background: #fff;
    z-index: 10; /* поверх tbody */
    padding: 8px 6px;
    /*border-bottom: 1px solid #ccc;*/
    border: 1px solid gray;
    text-align: center;
    box-shadow: 0 2px 0 rgba(0, 0, 0, .03);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

tbody {
    position: relative;
    z-index: 1;
}

tbody tr {
    height: 32px;
}

td {
    padding: 6px 6px;
    border: 1px solid gray;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


tbody tr:nth-child(even) td {
    background-color: #f3f3ff;
}

tbody tr:nth-child(odd) td {
    background-color: #ffffff;
}


tbody tr:hover td {
    background: #fff3e5;
}

.spacer {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 0;
    z-index: 100;
    margin-bottom: 0;
    padding-bottom: 0;
}

.scroller {
    overflow: auto; /* или overflow-y: auto / overflow-x: auto */
    -ms-overflow-style: none; /* старый Edge/IE */
    scrollbar-width: none; /* Firefox */

}

.scroller::-webkit-scrollbar { /* Chromium / Safari */
    width: 0;
    height: 0;
}


tbody tr:nth-child(even) td.ok,
tbody tr:nth-child(odd) td.ok {
    background-color: lightgreen;
}

tbody tr:nth-child(even) td.bad,
tbody tr:nth-child(odd) td.bad {
    background-color: lightcoral;
}

.cell-item {
    max-width: 22px;
    min-width: 22px;
    overflow-wrap: normal;
    text-align: center;
    vertical-align: center;
    overflow: visible;
    text-overflow: clip;
}