.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* ZPL inline syntax-highlighted editor (PrintTemplateFormDialog).
   Pattern: a transparent <textarea> sits on top of a styled <pre> that holds the
   same content with regex-based coloring. Caret/selection happen in the textarea;
   the <pre> provides the visuals. CSS tricks:
   - Both layers MUST share font, size, line-height, padding, white-space and
     letter-spacing — otherwise characters drift and the colors don't line up.
   - The textarea's text is fully transparent; only the caret stays visible
     thanks to caret-color.
   - The <pre> is aria-hidden and pointer-events:none so the textarea owns
     all input. An onscroll handler on the textarea keeps the <pre> aligned.  */
.zpl-editor-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    border: 1px solid #333;
    border-radius: 4px;
    overflow: hidden;
    background: #1e1e1e;
}

.zpl-editor-highlight,
.zpl-editor-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 12px 14px;
    border: 0;
    box-sizing: border-box;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    letter-spacing: normal;
    tab-size: 4;
    white-space: pre-wrap;
    word-break: break-word;
    overflow: auto;
}

.zpl-editor-highlight {
    color: #d4d4d4;
    pointer-events: none;
    z-index: 1;
}

.zpl-editor-input {
    background: transparent;
    color: transparent;
    caret-color: #ffffff;
    resize: none;
    outline: none;
    z-index: 2;
}

.zpl-editor-input::placeholder { color: #666; }

.zpl-editor-highlight .zpl-cmd { color: #569cd6; }
.zpl-editor-highlight .zpl-delim { color: #c586c0; font-weight: 600; }
.zpl-editor-highlight .zpl-placeholder { color: #6a9955; font-weight: 600; }

/* Mini-drawer (56px) cleanup quando chiuso: nasconde la freccia di expand del
   MudNavGroup e centra le icone, così la sidebar collassata mostra solo
   un'icona pulita per ogni voce/gruppo (chevron resta visibile su hover quando
   il drawer si espande a 200px). Senza questo, la freccia ▼ ruba spazio e
   sposta l'icona dal centro dando aspetto disallineato.
   La classe `armonya-drawer-collapsed` è applicata via Blazor su _drawerOpen=false —
   più affidabile che dipendere dai nomi-classe interni di MudBlazor. */
.armonya-drawer-collapsed .mud-nav-link-expand-icon {
    display: none !important;
}

.armonya-drawer-collapsed .mud-nav-link {
    justify-content: center;
}

/* Toolbar dei filtri sopra le liste paginate.
   I figli sono wrappati in <div> espliciti dal Razor (vedi p.es. Plans.razor)
   con flex sizing controllato a livello del wrapper, non sul controllo Mud.
   Niente hack CSS qui — il layout e' deciso interamente dal markup. */

/* Monitor dashboard editor — gridstack tiles. */
.grid-stack-item-content {
    /* Without border-box the dash-tile padding pushes the visible tile past
       the gridstack item's calculated height, so the resize handle (which
       sits on the gridstack item's bottom edge) appears mid-tile. */
    box-sizing: border-box;
    /* Make the inner .dash-tile actually fill the resized item. Without
       these, height: 100% on .dash-tile doesn't always resolve under v11's
       absolute-positioned content wrapper, so the tile keeps its intrinsic
       height even when the user grows the gridstack item. */
    display: flex !important;
    flex-direction: column;
}
.dash-area-grid .dash-tile {
    flex: 1 1 auto;
    min-height: 0;
}
/* Gridstack v11 insets .grid-stack-item-content by the configured margin
   (we use margin: 8 in JS init), but resize handles attach to .grid-stack-item
   itself. Without nudging them inward they sit ~8px below/right of the visible
   tile bottom-right, which looks broken. Pull each handle in by the same
   margin so it lands on the visible tile edge. */
.dash-area-grid .grid-stack-item > .ui-resizable-handle.ui-resizable-se { bottom: 8px; right: 8px; }
.dash-area-grid .grid-stack-item > .ui-resizable-handle.ui-resizable-sw { bottom: 8px; left: 8px; }
.dash-area-grid .grid-stack-item > .ui-resizable-handle.ui-resizable-ne { top: 8px; right: 8px; }
.dash-area-grid .grid-stack-item > .ui-resizable-handle.ui-resizable-nw { top: 8px; left: 8px; }
.dash-area-grid .grid-stack-item > .ui-resizable-handle.ui-resizable-s  { bottom: 8px; }
.dash-area-grid .grid-stack-item > .ui-resizable-handle.ui-resizable-n  { top: 8px; }
.dash-area-grid .grid-stack-item > .ui-resizable-handle.ui-resizable-e  { right: 8px; }
.dash-area-grid .grid-stack-item > .ui-resizable-handle.ui-resizable-w  { left: 8px; }
.dash-tile {
    height: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border-radius: 6px;
    background: #1e293b;
    color: #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
    cursor: grab;
}
.dash-tile-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.dash-tile-title {
    font-weight: 600;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dash-tile-actions { display: flex; gap: 4px; }
.dash-tile-btn {
    background: rgba(255,255,255,0.1);
    color: #e2e8f0;
    border: none;
    border-radius: 4px;
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
}
.dash-tile-btn:hover { background: rgba(255,255,255,0.2); }
.dash-tile-btn-danger:hover { background: #b91c1c; }
.dash-tile-meta {
    display: flex;
    gap: 8px;
    font-size: 0.75rem;
    color: #94a3b8;
}
.dash-tile-type {
    background: rgba(59,130,246,0.2);
    color: #93c5fd;
    padding: 1px 6px;
    border-radius: 3px;
}
.dash-tile-size { color: #94a3b8; }
.dash-tile-ds {
    font-size: 0.8rem;
    color: #cbd5e1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Body slot — non-live mock content for the editor preview. The runtime
   widget in Armonya.Monitor renders the real value at the same position;
   here we just give the admin a feel of the layout. */
.dash-tile-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 6px 0;
    overflow: hidden;
}
.dash-tile-foot {
    /* Editor-only metadata (type, dataSourceKey, size). Hidden by default —
       reveals on tile hover so the design canvas stays uncluttered and feels
       closer to what the user will see in the runtime monitor. */
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.7rem;
    color: #94a3b8;
    flex-wrap: wrap;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.dash-tile:hover .dash-tile-foot,
.dash-tile:focus-within .dash-tile-foot {
    opacity: 1;
}
.dash-tile-foot .dash-tile-ds {
    flex: 1 1 auto;
    min-width: 0;
}
.dash-tile-mock {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #cbd5e1;
}
.dash-tile-mock-counter .mock-counter-value {
    font-size: 2.4rem;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1;
}
.dash-tile-mock-counter .mock-counter-suffix {
    font-size: 0.75rem;
    opacity: 0.65;
    margin-top: 4px;
}
.mock-kv-table {
    width: 90%;
    font-size: 0.78rem;
    border-collapse: collapse;
}
.mock-kv-table td {
    padding: 2px 6px;
    border-bottom: 1px dashed rgba(203,213,225,0.2);
}
.mock-kv-table td:last-child {
    text-align: right;
    font-weight: 600;
    color: #f1f5f9;
}
.mock-list-table {
    width: 95%;
    font-size: 0.7rem;
    border-collapse: collapse;
}
.mock-list-table th, .mock-list-table td {
    padding: 2px 6px;
    text-align: left;
}
.mock-list-table thead {
    background: rgba(15,23,42,0.4);
    color: #93c5fd;
}
.mock-list-table tbody tr {
    border-top: 1px dashed rgba(203,213,225,0.15);
}
.dash-tile-mock-progress {
    width: 90%;
}
.dash-tile-mock-progress .mock-progress-bar {
    width: 100%;
    height: 14px;
    background: rgba(203,213,225,0.2);
    border-radius: 7px;
    overflow: hidden;
}
.dash-tile-mock-progress .mock-progress-fill {
    height: 100%;
    background: #3b82f6;
    border-radius: 7px;
}
.dash-tile-mock-progress .mock-progress-label {
    margin-top: 6px;
    font-size: 0.75rem;
    text-align: center;
}
.dash-tile-mock-card .mock-card-text {
    font-size: 0.85rem;
    text-align: center;
    padding: 0 8px;
    color: #f1f5f9;
}
.dash-tile-mock-unknown {
    font-style: italic;
    opacity: 0.6;
    font-size: 0.75rem;
}
.grid-stack { background: #f1f5f9; padding: 4px; border-radius: 6px; min-height: 240px; }
.grid-stack-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    height: 200px;
    font-style: italic;
}

/* Monitor dashboard editor — root is a 12-col CSS grid. Areas place
   themselves with grid-column / grid-row styles driven by their X/Y/W/H
   from the layout JSON. The "ungrouped" pile is parked full-width below.
   Each .dash-area embeds its own GridStack inside .dash-area-grid; areas
   are NOT gridstack items themselves. */
.dash-root {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: 80px;
    gap: 16px;
}
.dash-area {
    border-radius: 6px;
    background: rgba(59,130,246,0.08);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}
.dash-area-grid {
    /* GridStack injects children here; default to a sensible min-height so
       even an empty area is visible as a drop target. */
    min-height: 80px;
    padding: 8px;
}
.dash-area-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: rgba(15,23,42,0.05);
    border-bottom: 1px solid rgba(15,23,42,0.1);
}
.dash-area-actions { display: flex; gap: 2px; }
.dash-area-title {
    font-weight: 700;
    font-size: 1rem;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dash-area-ungrouped {
    background: rgba(100,116,139,0.06);
    border: 1px dashed rgba(100,116,139,0.4);
}
.dash-area-primary    { background: rgba(59,130,246,0.10);  border:1px solid rgba(59,130,246,0.4);  }
.dash-area-secondary  { background: rgba(139,92,246,0.10);  border:1px solid rgba(139,92,246,0.4);  }
.dash-area-info       { background: rgba(6,182,212,0.10);   border:1px solid rgba(6,182,212,0.4);   }
.dash-area-success    { background: rgba(16,185,129,0.10);  border:1px solid rgba(16,185,129,0.4);  }
.dash-area-warning    { background: rgba(245,158,11,0.10);  border:1px solid rgba(245,158,11,0.4);  }
.dash-area-error      { background: rgba(239,68,68,0.10);   border:1px solid rgba(239,68,68,0.4);   }
.dash-area-default    { background: rgba(100,116,139,0.10); border:1px solid rgba(100,116,139,0.4); }
/* Sturdier separator borders (rendered when admin enables a side). */
.dash-area.area-border-top    { border-top: 4px solid currentColor; }
.dash-area.area-border-right  { border-right: 4px solid currentColor; }
.dash-area.area-border-bottom { border-bottom: 4px solid currentColor; }
.dash-area.area-border-left   { border-left: 4px solid currentColor; }

/* Audit filter — popover Tipo Evento.
   Il campo MudSelect è dense e largo ~220px nella toolbar dei filtri, ma le voci
   con chip [Module] + EventType sforano quella larghezza. RelativeWidth="Adaptive"
   permette al popover di espandersi; queste regole gli danno un min/max ragionevole
   così la lista è leggibile senza occupare mezza pagina. */
.audit-event-type-popover {
    min-width: 360px;
    max-width: 520px;
}

/* ── KPI dashboard (US #6325 unify UX) ─────────────────────────────────
   Edit mode = gridstack single-grid con preview HTML.
   View mode = CSS grid 12-col speculare (stessa cellHeight=80px, stesso
   layout 2D). Cosi' la posizione/dimensione tra edit e view e' 1:1.
*/
.kpi-grid {
    width: 100%;
    min-height: 200px;
}
.kpi-tile-host {
    width: 100%;
    height: 100%;
}
.kpi-view-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    /* minmax(80px, 80px): forza tutte le righe implicite a 80px esatti.
       grid-auto-rows da solo non basta perche' permette ai contenuti di
       espandere la riga oltre il minimo. Cosi' una tile h=3 occupa
       3*80px + 2*8px (gap) = 256px, esattamente come gridstack edit. */
    grid-auto-rows: minmax(80px, 80px);
    gap: 8px;
    width: 100%;
    /* align-items: stretch sui figli del grid (default) garantisce che
       ogni cell-wrapper riempia interamente le righe span. */
    align-items: stretch;
}
.kpi-view-cell {
    min-width: 0;
    min-height: 0;
    /* Senza display:flex il KpiTile interno (MudPaper) non eredita
       height: 100% perche' il grid-cell non ha height esplicito (e' span).
       Flex column + stretch porta l'altezza dal grid al figlio. */
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.kpi-view-cell > * {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
}
/* MudPaper dentro KpiTile fa fit-to-content di default — forziamo
   l'occupazione della cell cosi' le tile riempiono la riga span come
   in edit mode (anche per Counter dove il numero e' compatto). */
.kpi-view-cell .mud-paper {
    height: 100%;
    box-sizing: border-box;
}
/* Edit mode tile: stessa estetica del view mode (MudPaper Elevation=2 like). */
.kpi-tile-edit {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .04);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.kpi-tile-edit.kpi-inactive { opacity: .55; }
.kpi-tile-edit-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
    cursor: grab;
    background: #fafafa;
}
.kpi-tile-edit-grip {
    color: #999;
    user-select: none;
    font-weight: bold;
    letter-spacing: -1px;
}
.kpi-tile-edit-title {
    flex: 1;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.kpi-tile-edit-actions {
    display: flex;
    gap: 2px;
}
.kpi-tile-btn {
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.2;
}
.kpi-tile-btn:hover {
    background: rgba(0, 0, 0, .06);
    border-color: rgba(0, 0, 0, .12);
}
.kpi-tile-btn-danger:hover {
    background: rgba(255, 0, 0, .08);
    border-color: rgba(255, 0, 0, .3);
    color: #b00;
}
.kpi-tile-edit-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
}
.kpi-mock-counter {
    font-size: 36px;
    font-weight: 600;
    color: #ccc;
}
.kpi-mock-card { font-size: 18px; }
.kpi-mock-list { font-size: 12px; line-height: 1.6; }
.kpi-mock-kv { font-size: 13px; }
.kpi-mock-progress {
    width: 80%;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}
.kpi-mock-progress > div {
    height: 100%;
    background: #ccc;
}
.kpi-tile-edit-foot {
    display: flex;
    gap: 10px;
    padding: 4px 10px;
    border-top: 1px solid rgba(0, 0, 0, .06);
    font-size: 11px;
    color: #999;
    background: #fafafa;
}
.kpi-tile-edit-foot code { font-size: 10px; }

/* Gridstack resize handle visibility in edit mode (le 4 maniglie d'angolo). */
.kpi-grid .grid-stack-item > .ui-resizable-handle.ui-resizable-se {
    background: rgba(0, 100, 220, .3);
    border-radius: 0 0 4px 0;
}

/* ── Operational panels (US #6340) ─────────────────────────────────────── */
/* Edit-mode grid: stessa cell-height del KPI per coerenza visiva tra le
   due pagine admin che usano gridstack. */
.panel-grid {
    min-height: 200px;
}
/* View mode runtime: CSS grid 12-col speculare al gridstack edit, identico
   pattern alla KPI view-grid (vedi commenti sopra). */
.panel-view-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(80px, 80px);
    gap: 8px;
    width: 100%;
    align-items: stretch;
}
.panel-view-cell {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.panel-view-cell > * {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
}

/* Edit tile (admin /admin/panels). Stile identico al KPI ma con palette
   per il "colore preset" del pulsante. */
.panel-tile-edit {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .04);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.panel-tile-edit-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
    cursor: grab;
    background: #fafafa;
}
.panel-tile-edit-grip {
    color: #999;
    user-select: none;
    font-weight: bold;
    letter-spacing: -1px;
}
.panel-tile-edit-title {
    flex: 1;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.panel-tile-edit-actions {
    display: flex;
    gap: 2px;
}
.panel-tile-btn {
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.2;
}
.panel-tile-btn:hover {
    background: rgba(0, 0, 0, .06);
    border-color: rgba(0, 0, 0, .12);
}
.panel-tile-btn-danger:hover {
    background: rgba(255, 0, 0, .08);
    border-color: rgba(255, 0, 0, .3);
    color: #b00;
}
.panel-tile-edit-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.panel-tile-mock {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #555;
}
.panel-tile-mock-icon { font-size: 22px; opacity: .7; }
.panel-tile-mock-label { font-size: 14px; }
.panel-tile-edit-foot {
    display: flex;
    gap: 10px;
    padding: 4px 10px;
    border-top: 1px solid rgba(0, 0, 0, .06);
    font-size: 11px;
    color: #999;
    background: #fafafa;
}
.panel-tile-edit-foot code { font-size: 10px; }

/* Runtime tile = pulsante shopfloor. Grande, contrasto alto, padding generoso
   (touch a 5px di distanza dall'occhio non perdona). */
.panel-tile-run {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    padding: 8px 12px;
    transition: filter 100ms ease-out, transform 100ms ease-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .12);
    position: relative;
}
.panel-tile-run:hover { filter: brightness(1.06); }
.panel-tile-run:active { transform: translateY(1px); filter: brightness(.96); }
.panel-tile-run-icon { font-size: 28px; line-height: 1; }
.panel-tile-run-label { font-size: 18px; line-height: 1.2; text-align: center; }
.panel-tile-run-badge {
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 14px;
    opacity: .85;
}

/* Palette colori (Mud-like, mantengono coerenza con MudBlazor Color enum). */
.panel-tile-color-primary { background: #594ae2; }
.panel-tile-color-secondary { background: #ff4081; }
.panel-tile-color-success { background: #00c853; }
.panel-tile-color-warning { background: #ff9800; color: #1a1a1a; }
.panel-tile-color-error { background: #f44336; }
.panel-tile-color-info { background: #2196f3; }
.panel-tile-color-default { background: #757575; }

/* US-7434: MudPagination v8 usa <li> .mud-pagination-item senza reset dei marker,
   che apparivano come pallini. Reset globale (app.css è caricato dopo MudBlazor.css). */
.mud-pagination ul { list-style: none; margin: 0; padding: 0; }
.mud-pagination li,
.mud-pagination .mud-pagination-item { list-style: none; }
.mud-pagination li::marker,
.mud-pagination .mud-pagination-item::marker { content: ""; }
