/* Altezza misurata da grid-viewport.js; fallback utilizzabile anche senza JS. */
.grid-fill {
    height: var(--grid-height, calc(100dvh - 270px));
    min-height: 160px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}
.mud-main-content,
.mud-tab-panel,
.mud-tabs-panels {
    min-width: 0;
}
.grid-fill > .e-grid { min-width: 0; max-width: 100%; }
.grid-users > .mud-table { height: 100%; }
.grid-users .mud-table-container { height: 100%; max-height: 100%; overflow: auto; }
.grid-pager {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}
.grid-pager-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    text-align: center;
}
.grid-pager-prev { justify-self: start; }
.grid-pager-next { justify-self: end; }
@media (max-width: 600px) {
    .grid-pager { grid-template-columns: 1fr 1fr; }
    .grid-pager-info { grid-column: 1 / -1; grid-row: 1; }
    .grid-pager-prev, .grid-pager-next { grid-row: 2; }
}

/* Syncfusion Grid - sfondo uguale al tema dark MudBlazor */
.e-grid {
    background-color: #1e1e2d;
    border-color: #33323e !important;
}
.e-grid .e-gridheader {
    background-color: #151521;
    border-color: #33323e !important;
}
.e-grid .e-headercell {
    background-color: #151521;
    color: #b2b0bf;
    border-color: #33323e !important;
}
.e-grid .e-rowcell {
    background-color: #1e1e2d;
    color: #b2b0bf;
    border-color: #33323e !important;
}
/* Righe alternate */
.e-grid .e-altrow .e-rowcell {
    background-color: #2a2833;
}
/* Hover */
.e-grid .e-row:hover .e-rowcell {
    background-color: #33323e !important;
}

/* Colori riga per deposito — 10 colori ciclici (assegnati via hash deterministico) */
.e-grid .e-row.dep-0 .e-rowcell { background-color: rgba(21,101,192,.10) !important; }
.e-grid .e-row.dep-1 .e-rowcell { background-color: rgba(46,125,50,.10) !important; }
.e-grid .e-row.dep-2 .e-rowcell { background-color: rgba(230,81,0,.10) !important; }
.e-grid .e-row.dep-3 .e-rowcell { background-color: rgba(106,27,154,.10) !important; }
.e-grid .e-row.dep-4 .e-rowcell { background-color: rgba(183,28,28,.10) !important; }
.e-grid .e-row.dep-5 .e-rowcell { background-color: rgba(0,105,92,.10) !important; }
.e-grid .e-row.dep-6 .e-rowcell { background-color: rgba(85,139,47,.10) !important; }
.e-grid .e-row.dep-7 .e-rowcell { background-color: rgba(173,20,87,.10) !important; }
.e-grid .e-row.dep-8 .e-rowcell { background-color: rgba(40,53,147,.10) !important; }
.e-grid .e-row.dep-9 .e-rowcell { background-color: rgba(0,131,143,.10) !important; }

/* SS Alert — disponibilità ≤ scorta sicurezza */
.e-grid .e-row.ss-alert .e-rowcell { background-color: rgba(183,28,28,.18) !important; }
