/* ── Simply — Edit mode border ────────────────────────────────────
   Tre approcci sovrapposti per garantire visibilità su qualsiasi
   layout Filament:
   1. body::after pseudo-element (originale, può essere coperto)
   2. Outline CSS sul body (più affidabile, non coperto da overlay)
   3. Box-shadow inset sul .fi-main (target del contenuto principale)
   ──────────────────────────────────────────────────────────────── */
body.simply-edit-mode::after {
    content: '';
    position: fixed;
    inset: 0;
    border: 3px solid #f97316;
    pointer-events: none;
    z-index: 99999;
    border-radius: 0;
}
/* Banner edit mode in alto a destra come ulteriore feedback visivo */
body.simply-edit-mode::before {
    content: '✏ MODIFICA ATTIVA';
    position: fixed;
    top: 10px;
    right: 10px;
    background: #f97316;
    color: white;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px;
    z-index: 99999;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(249,115,22,.4);
    letter-spacing: .04em;
}

/* Simply — Compact table rows */
.fi-ta-row .fi-ta-cell {
    padding-top: 0.15rem !important;
    padding-bottom: 0.15rem !important;
    font-size: 0.75rem !important;
    line-height: 1rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.fi-ta-row .fi-ta-cell > div,
.fi-ta-row .fi-ta-cell > span,
.fi-ta-row .fi-ta-cell > a {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.fi-ta-row .fi-ta-cell:nth-child(3) {
    max-width: 250px !important;
}
.fi-ta-header-cell {
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
    font-size: 0.72rem !important;
}
.fi-ta-row .fi-badge {
    padding: 0 0.3rem !important;
    font-size: 0.65rem !important;
    line-height: 1.2rem !important;
}
.fi-ta-row .fi-ta-cell svg {
    width: 0.9rem !important;
    height: 0.9rem !important;
}

/* Simply — Active row highlight (keyboard nav + sidebar) */
tr.fi-ta-row.simply-row-active > td {
    background: rgb(var(--primary-50)) !important;
}
.dark tr.fi-ta-row.simply-row-active > td {
    background: rgba(var(--primary-900), .35) !important;
}

/* ── DROP_583 — azioni Filament dentro le toolbar custom dei documenti ──
   Un'azione Filament (Invia, Crea spedizione) messa in mezzo ai pulsanti
   `.sdoc-btn` arrivava piu' ALTA e "spessa" dei vicini, rompendo la linea
   della barra (segnalato da Raffaele). Qui le si riporta esattamente alle
   misure di .sdoc-btn: stesso padding, font, raggio e altezza. */
.sdoc-invia-documento .fi-btn,
.sdoc-crea-spedizione .fi-btn {
    padding: 5px 12px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    border-radius: 7px !important;
    min-height: 0 !important;
    line-height: 1.2 !important;
    gap: 5px !important;
}
.sdoc-invia-documento .fi-btn .fi-btn-icon,
.sdoc-crea-spedizione .fi-btn .fi-btn-icon {
    width: 13px !important;
    height: 13px !important;
}
/* il wrapper non deve aggiungere altezza propria */
.sdoc-invia-documento,
.sdoc-crea-spedizione {
    display: inline-flex;
    align-items: center;
}
