/*
 * Tema "Easyfatt" del pannello ufficio.
 * Colori presi dagli screenshot di Easyfatt (docs/moduli/SCREENSHOT.md). È uno strumento di lavoro:
 * testo piccolo, righe fitte, poco spazio vuoto.
 */
:root {
    /* Carattere di sistema più nitido (richiesta dell'utente 29/10/2026): Segoe UI Variable su Windows 11 */
    --ef-font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --ef-text: #000;
    --ef-muted: #6d6d6d;
    --ef-toolbar-bg: #f0f0f0;
    --ef-toolbar-active: #91c9f7;
    --ef-toolbar-hover: #cce4f7;
    --ef-border: #d9d9d9;
    --ef-titlebar-bg: #2b2b2b;
    --ef-titlebar-text: #e6e6e6;
    --ef-blue: #0078d7;
    --ef-link: #1065ce;
    --ef-totals-bg: #e7eaea;
    --ef-input-border: #a9a9a9;
    --ef-disabled-bg: #e5e5e5;
    --ef-notice-bg: #ffffe1;
    --ef-notice-border: #e5c365;
    --ef-toolbar-h: 58px;
    --ef-titlebar-h: 30px;
    --ef-actions-h: 32px;
    /* caratteri un punto più grandi di quelli di Easyfatt (richiesta dell'utente, 02/11/2026: sul 27 pollici si leggeva
       piccolissimo); tutte le dimensioni del tema partono da qui */
    --ef-fs-plus: 1px;
}

/* --- Struttura di Filament: niente barra superiore, niente menu laterale, niente margini --- */
body.fi-body {
    font-family: var(--ef-font); font-size: calc(13px + var(--ef-fs-plus)); color: var(--ef-text); background: #fff;
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
/* anche Tabulator e i campi usano lo stesso carattere */
.ef-grid-host.tabulator, .ef-in, .ef-push, .ef-btn, input, select, textarea, button { font-family: var(--ef-font); }
.fi-layout { flex-direction: column; min-height: 100vh; }
.fi-main-ctn { width: 100%; }
.fi-main { padding: 0 !important; max-width: none !important; margin: 0 !important; }
.fi-page > .fi-page-header-main-ctn, .fi-header { display: none; }

/* --- Barra superiore a icone --- */
.ef-toolbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: stretch; height: var(--ef-toolbar-h);
    background: var(--ef-toolbar-bg); border-bottom: 1px solid var(--ef-border);
    padding: 0 4px; user-select: none;
}
.ef-tb-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-width: 54px; padding: 2px 6px; color: var(--ef-text); text-decoration: none; position: relative;
    border: 1px solid transparent; font-size: calc(13px + var(--ef-fs-plus)); line-height: 1.1; white-space: nowrap; cursor: default;
}
.ef-tb-item svg { width: 26px; height: 26px; margin-bottom: 3px; }
a.ef-tb-item, button.ef-tb-item { cursor: pointer; }
a.ef-tb-item:hover, button.ef-tb-item:hover { background: var(--ef-toolbar-hover); border-color: #99d1ff; }
.ef-tb-item.is-active { background: var(--ef-toolbar-active); border-color: #66b3f0; }
.ef-tb-item.is-disabled { color: #9a9a9a; }
.ef-tb-item.is-disabled svg { opacity: .35; filter: grayscale(1); }
.ef-tb-sep { width: 1px; background: #c8c8c8; margin: 6px 6px; }
.ef-tb-spacer { flex: 1; }
.ef-tb-user { display: flex; align-items: center; gap: 8px; padding: 0 8px; color: var(--ef-muted); font-size: calc(12px + var(--ef-fs-plus)); }
.ef-tb-user > form button { color: var(--ef-link); text-decoration: underline; }
.ef-tb-username { cursor: pointer; color: inherit; }
.ef-tb-username:hover { color: var(--ef-link); text-decoration: underline; }
.ef-tb-menu {
    position: absolute; top: 100%; left: 0; z-index: 40; min-width: 200px;
    background: #fff; border: 1px solid #a0a0a0; box-shadow: 2px 2px 4px rgba(0,0,0,.2); padding: 2px 0;
}
.ef-tb-menu a, .ef-tb-menu span { display: block; padding: 4px 24px; color: var(--ef-text); text-decoration: none; text-align: left; }
.ef-tb-menu a:hover { background: var(--ef-toolbar-hover); }
.ef-tb-menu span { color: #9a9a9a; }

/* --- Pagina: barra del titolo, corpo, barra azioni --- */
.ef-page { display: flex; flex-direction: column; height: calc(100vh - var(--ef-toolbar-h) - 1px); }
.ef-titlebar {
    display: flex; align-items: center; height: var(--ef-titlebar-h); flex-shrink: 0;
    background: var(--ef-titlebar-bg); color: var(--ef-titlebar-text); padding: 0 0 0 8px;
}
.ef-titlebar-title { font-size: calc(17px + var(--ef-fs-plus)); flex: 1; white-space: nowrap; }
.ef-titlebar-search {
    width: 270px; height: 22px; margin-right: 16px; padding: 0 6px 0 22px; font-size: calc(13px + var(--ef-fs-plus));
    background: #3c3c3c url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23aaa'%3E%3Cpath d='M8 3a5 5 0 104.24 7.65l3.56 3.56 1.06-1.06-3.56-3.56A5 5 0 008 3zm0 1.5a3.5 3.5 0 110 7 3.5 3.5 0 010-7z'/%3E%3C/svg%3E") no-repeat 5px center / 12px;
    border: 1px solid #555; color: #fff; outline: none;
}
.ef-titlebar-search:focus { border-color: var(--ef-blue); }
.ef-titlebar-search::placeholder { color: #c4c4c4; opacity: 1; }
.ef-titlebar-cmd { padding: 0 9px; font-size: calc(13px + var(--ef-fs-plus)); color: #8a8a8a; cursor: default; }
.ef-body { display: flex; flex: 1; min-height: 0; }
.ef-actions {
    display: flex; align-items: center; height: var(--ef-actions-h); flex-shrink: 0; gap: 2px;
    border-top: 1px solid var(--ef-border); background: #fff; padding: 0 6px;
}
.ef-btn {
    display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; font-size: calc(13px + var(--ef-fs-plus));
    color: var(--ef-text); border: 1px solid transparent; background: none; cursor: pointer; white-space: nowrap;
}
.ef-btn svg { width: 16px; height: 16px; }
.ef-btn:hover:not(:disabled) { background: var(--ef-toolbar-hover); border-color: #99d1ff; }
.ef-btn:disabled { color: #a0a0a0; cursor: default; }
.ef-btn:disabled svg { opacity: .4; filter: grayscale(1); }
.ef-actions-sep { width: 1px; height: 20px; background: var(--ef-border); margin: 0 4px; }

/* --- Elenco a righe fitte --- */
.ef-list { flex: 1; display: flex; flex-direction: column; min-width: 0; outline: none; }
.ef-list-scroll { flex: 1; overflow: auto; }
.ef-grid { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: calc(13px + var(--ef-fs-plus)); }
.ef-grid th {
    position: sticky; top: 0; z-index: 1; background: #fff; text-align: left; font-weight: normal;
    padding: 1px 4px; border-right: 1px solid #e5e5e5; border-bottom: 1px solid #c8c8c8; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.ef-grid th:hover { background: #e5f3ff; }
.ef-grid th .ef-sort { color: #888; font-size: calc(9px + var(--ef-fs-plus)); margin-left: 3px; }
.ef-grid td {
    padding: 0 4px; height: 20px; border-right: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ef-grid tbody tr { cursor: default; }
.ef-grid tbody tr:hover td { background: #e5f3ff; }
.ef-grid tbody tr.is-selected td { background: var(--ef-blue); color: #fff; }
.ef-grid tbody tr.is-selected a { color: #fff; }
.ef-grid .ef-check { width: 20px; padding: 0 0 0 3px; }
.ef-grid .ef-check input { width: 12px; height: 12px; margin: 0; vertical-align: middle; border-radius: 0; }
.ef-grid .is-right { text-align: right; }
.ef-grid .is-negative { color: #c00000; }
.ef-grid tbody tr.is-selected .is-negative { color: #ffd0d0; }
.ef-grid a { color: var(--ef-link); text-decoration: underline; }
.ef-grid .ef-loading td { color: var(--ef-muted); font-style: italic; }
.ef-list-footer {
    display: flex; height: 22px; align-items: center; background: var(--ef-totals-bg);
    border-top: 1px solid #c8c8c8; padding: 0 8px; font-size: calc(13px + var(--ef-fs-plus)); flex-shrink: 0;
}
.ef-list-footer .ef-checked { margin-left: 16px; color: var(--ef-muted); }

/* --- Scheda a destra --- */
.ef-scheda { width: var(--ef-scheda-w, 500px); max-width: 75vw; flex-shrink: 0; border-left: 1px solid #c8c8c8; display: flex; flex-direction: column; background: #fff; }
.ef-tabs { display: flex; padding: 4px 4px 0; border-bottom: 1px solid #c8c8c8; background: #fff; flex-shrink: 0; }
.ef-tab {
    padding: 2px 6px; margin-right: -1px; border: 1px solid #c8c8c8; border-bottom: none; background: #f5f5f5;
    font-size: calc(13px + var(--ef-fs-plus)); cursor: pointer; position: relative; top: 1px;
}
.ef-tab.is-active { background: #fff; padding-top: 3px; top: 1px; border-bottom: 1px solid #fff; }
.ef-tab-body { flex: 1; overflow: auto; padding: 8px 10px; }
.ef-notice {
    background: var(--ef-notice-bg); border: 1px solid var(--ef-notice-border); padding: 4px 8px;
    margin: 6px 6px 0; font-size: calc(12px + var(--ef-fs-plus));
}
.ef-notice a { color: var(--ef-link); text-decoration: underline; }
.ef-section { font-weight: bold; margin: 12px 0 6px; }
.ef-section:first-child { margin-top: 2px; }
.ef-r { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.ef-r > label { width: 112px; flex-shrink: 0; white-space: nowrap; }
.ef-r > label.ef-inl { width: auto; margin-left: 8px; }
.ef-in {
    height: 22px; border: 1px solid var(--ef-input-border); padding: 0 3px; font-size: calc(13px + var(--ef-fs-plus)); background: #fff;
    color: var(--ef-text); min-width: 0; flex: 1; font-family: var(--ef-font);
}
.ef-in.is-combo { background: var(--ef-disabled-bg); }
.ef-in.is-right { text-align: right; }
.ef-in.is-muted { color: #8a8a8a; }
.ef-in.w-xs { flex: 0 0 52px; } .ef-in.w-s { flex: 0 0 90px; } .ef-in.w-m { flex: 0 0 150px; }
textarea.ef-in { height: auto; min-height: 60px; padding: 2px 3px; resize: none; }
.ef-chk { width: 14px; height: 14px; border-radius: 0; margin: 0; }
.ef-hint { color: var(--ef-muted); font-size: calc(12px + var(--ef-fs-plus)); white-space: nowrap; }
.ef-stat { display: flex; justify-content: space-between; max-width: 300px; line-height: 20px; }
.ef-stat.is-bold { font-weight: bold; }
.ef-mini-list { width: 100%; border-collapse: collapse; font-size: calc(12px + var(--ef-fs-plus)); margin-top: 4px; }
.ef-mini-list th { text-align: left; font-weight: normal; color: var(--ef-muted); border-bottom: 1px solid var(--ef-border); padding: 1px 3px; }
.ef-mini-list td { padding: 1px 3px; border-bottom: 1px solid #f0f0f0; }

/* --- Pagine semplici (Start, Importa) --- */
.ef-content { flex: 1; overflow: auto; padding: 16px 24px; }
.ef-content h1 { font-size: calc(22px + var(--ef-fs-plus)); color: var(--ef-link); text-align: center; margin: 4px 0 0; }
.ef-content .ef-subtitle { text-align: center; color: var(--ef-muted); font-size: calc(12px + var(--ef-fs-plus)); margin-bottom: 20px; }
.ef-block { display: flex; gap: 18px; margin: 0 auto 22px; max-width: 900px; }
.ef-block-icon { width: 54px; height: 54px; flex-shrink: 0; }
.ef-block h2 { font-size: calc(16px + var(--ef-fs-plus)); color: var(--ef-link); margin: 0 0 4px; }
.ef-block ul { margin: 2px 0 0 18px; list-style: disc; }
.ef-block li { margin: 2px 0; }
.ef-block a { color: var(--ef-link); text-decoration: underline; }
.ef-warn { color: #c00000; }
.ef-form-block { max-width: 760px; margin: 0 auto; }
.ef-form-block .ef-r > label { width: 190px; }
.ef-push { display: inline-flex; align-items: center; justify-content: center; height: 26px; padding: 0 16px; border: 1px solid #adadad; background: #e1e1e1; cursor: pointer; }
.ef-push:hover { background: #e5f1fb; border-color: var(--ef-blue); }
.ef-push:disabled { color: #a0a0a0; cursor: default; background: #f0f0f0; }
.ef-report { width: 100%; border-collapse: collapse; margin-top: 8px; }
.ef-report th, .ef-report td { border: 1px solid var(--ef-border); padding: 2px 6px; text-align: left; vertical-align: top; }
.ef-report th { background: #f5f5f5; font-weight: normal; }
.ef-error { color: #c00000; margin-top: 4px; }

/* --- Griglia (Tabulator) in stile Easyfatt --- */
.ef-grid-host { flex: 1; min-height: 0; }
.ef-grid-host.tabulator { border: none; background: #fff; font-size: calc(13px + var(--ef-fs-plus)); font-family: var(--ef-font); }
.ef-grid-host.tabulator .tabulator-header { background: #fff; border-bottom: 1px solid #c8c8c8; font-weight: normal; }
.ef-grid-host.tabulator .tabulator-header .tabulator-col { background: #fff; border-right: 1px solid #e5e5e5; }
.ef-grid-host.tabulator .tabulator-header .tabulator-col:hover { background: #e5f3ff; }
.ef-grid-host.tabulator .tabulator-header .tabulator-col .tabulator-col-content { padding: 1px 4px; }
.ef-grid-host.tabulator .tabulator-col-title { font-weight: normal; }
.ef-grid-host.tabulator .tabulator-tableholder .tabulator-table { background: #fff; }
.ef-grid-host .tabulator-row { min-height: 20px; border-bottom: 1px solid #f0f0f0; background: #fff; }
.ef-grid-host .tabulator-row.tabulator-row-even { background: #fff; }
.ef-grid-host .tabulator-row .tabulator-cell { padding: 1px 4px; height: 20px; line-height: 18px; border-right: 1px solid #f0f0f0; }
.ef-grid-host .tabulator-row:hover { background: #e5f3ff !important; cursor: default; }
.ef-grid-host .tabulator-row.tabulator-selected { background: #cce4f7 !important; }
.ef-grid-host .tabulator-row.ef-current, .ef-grid-host .tabulator-row.ef-current:hover { background: var(--ef-blue) !important; color: #fff; }
.ef-grid-host .tabulator-row .tabulator-cell.is-negative { color: #c00000; }
.ef-grid-host .tabulator-row.ef-current .tabulator-cell.is-negative { color: #ffd0d0; }
.ef-grid-host .tabulator-group { background: #f3f3f3; border-bottom: 1px solid #ddd; padding: 2px 6px; font-weight: bold; }
.ef-grid-host.tabulator .tabulator-col-resize-handle { width: 6px; }
.ef-grid-host .ef-col-check input { width: 12px; height: 12px; border-radius: 0; margin: 0; }
.ef-list-footer span { white-space: pre; }

/* --- Menu a discesa (Raggruppa, Seleziona, Colonne, Utilità) --- */
.ef-menu-wrap { position: relative; }
.ef-titlebar-cmd.is-on { color: var(--ef-titlebar-text); cursor: pointer; }
.ef-titlebar-cmd.is-on:hover { color: #fff; text-decoration: underline; }
.ef-menu {
    position: absolute; top: 100%; left: 0; z-index: 50; min-width: 210px; max-height: 70vh; overflow: auto;
    background: #fff; color: var(--ef-text); border: 1px solid #a0a0a0; box-shadow: 2px 2px 5px rgba(0,0,0,.25); padding: 2px 0;
}
.ef-menu.is-right { left: auto; right: 0; }
.ef-menu.is-up { top: auto; bottom: 100%; }
.ef-menu a, .ef-menu-check { display: flex; align-items: center; gap: 6px; padding: 4px 18px; color: var(--ef-text); cursor: pointer; text-decoration: none; white-space: nowrap; }
.ef-menu a:hover, .ef-menu-check:hover { background: var(--ef-toolbar-hover); }

/* --- Scheda modificabile --- */
.ef-in:focus { outline: none; border-color: var(--ef-blue); }
.ef-in.is-invalid { border-color: #c00000; background: #fff3f3; }
select.ef-in { background: #fff; padding: 0 1px; }
.ef-saved { margin-left: auto; align-self: center; padding-right: 6px; font-size: calc(11px + var(--ef-fs-plus)); color: var(--ef-muted); }
.ef-errors { margin-top: 10px; padding: 4px 8px; border: 1px solid #e0a0a0; background: #fff3f3; color: #c00000; font-size: calc(12px + var(--ef-fs-plus)); }

/* --- Finestre di dialogo (conferma, avviso, carico/scarico) --- */
.ef-dialog-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.15); display: flex; align-items: center; justify-content: center; }
.ef-dialog { background: #fff; border: 1px solid #7a7a7a; box-shadow: 4px 4px 12px rgba(0,0,0,.3); padding: 12px 16px; min-width: 380px; max-width: 640px; }
.ef-dialog-title { font-size: calc(16px + var(--ef-fs-plus)); color: var(--ef-link); margin-bottom: 8px; }
.ef-dialog-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.ef-dialog .ef-r > label { width: 130px; }

/* Freccia d'ordinamento solo sulla colonna ordinata: le intestazioni non si troncano (come in Easyfatt) */
.ef-grid-host.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { padding-right: 2px; }
.ef-grid-host.tabulator .tabulator-header .tabulator-col .tabulator-col-sorter { width: 10px; }
.ef-grid-host .tabulator-row .tabulator-cell { height: 20px !important; padding-top: 0; padding-bottom: 0; line-height: 19px; }
.ef-grid-host .tabulator-group .ef-group-count { margin-left: 8px; font-weight: normal; color: var(--ef-muted); }
.ef-grid-host.tabulator .tabulator-col-sorter { font-size: calc(9px + var(--ef-fs-plus)); color: #888; }
/* Il tema Tabulator riserva 25px alla freccia anche quando non c'è: le intestazioni si troncavano */
.ef-grid-host.tabulator .tabulator-header .tabulator-col.tabulator-sortable .tabulator-col-title { padding-right: 12px !important; }
.ef-grid-host.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter { right: 2px; }

/* --- Pulsantini accanto alle caselle (tabelle, codice automatico, cerca, apri link), come in Easyfatt --- */
.ef-icon-btn {
    flex: 0 0 24px; width: 24px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid #adadad; background: linear-gradient(#fbfbfb, #e8e8e8); cursor: pointer; padding: 0; font-size: calc(10px + var(--ef-fs-plus)); color: #333;
}
.ef-icon-btn:hover { border-color: var(--ef-blue); background: #e5f1fb; }
.ef-icon-btn svg { width: 14px; height: 14px; }
.ef-q { color: var(--ef-link); cursor: help; font-size: calc(12px + var(--ef-fs-plus)); }
.ef-link { color: var(--ef-link); text-decoration: underline; cursor: pointer; }
.ef-close { border: none; background: none; font-size: calc(18px + var(--ef-fs-plus)); line-height: 16px; color: #777; cursor: pointer; padding: 0 6px; align-self: center; }
.ef-close:hover { color: #c00000; }
.ef-thumb { display: block; max-width: 160px; max-height: 120px; margin-top: 8px; border: 1px solid var(--ef-border); cursor: zoom-in; }
.ef-image-large { display: block; max-width: 100%; max-height: 55vh; margin: 0 auto; border: 1px solid var(--ef-border); }
.ef-push { gap: 4px; }
.ef-push svg { width: 15px; height: 15px; }
.ef-push.is-default { border-color: var(--ef-blue); box-shadow: inset 0 0 0 1px var(--ef-blue); }

/* --- Conferma / Annulla in fondo alla scheda --- */
/* "Inserimento nuova voce / Voce in fase di modifica  Conferma  Annulla" in fondo alla scheda, come Easyfatt */
.ef-scheda-status { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-top: 1px solid #c8c8c8; background: #f3f3f3; flex-shrink: 0; font-size: calc(12px + var(--ef-fs-plus)); }
.ef-scheda-status .ef-link { font-size: calc(12px + var(--ef-fs-plus)); }

/* --- Menu (anche quelli di Tabulator: tasto destro sulle intestazioni) --- */
.ef-bullet, .ef-menu-tick { display: inline-block; width: 16px; color: var(--ef-text); font-size: calc(10px + var(--ef-fs-plus)); }
.ef-menu-sep { border: none; border-top: 1px solid #ddd; margin: 3px 0; }
.ef-menu-disabled { display: flex; padding: 4px 18px; color: #9a9a9a; white-space: nowrap; }
.tabulator-menu { font-family: var(--ef-font); font-size: calc(13px + var(--ef-fs-plus)); border: 1px solid #a0a0a0; box-shadow: 2px 2px 5px rgba(0,0,0,.25); }
.tabulator-menu .tabulator-menu-item { padding: 4px 18px 4px 6px; }
.tabulator-menu .tabulator-menu-item:hover { background: var(--ef-toolbar-hover); }

/* --- Ricerca come Easyfatt: casella + conteggio + freccia per campo e modo --- */
.ef-search-wrap { display: flex; align-items: center; margin-right: 16px; position: relative; }
.ef-search-wrap .ef-titlebar-search { margin-right: 0; }
/* Come Easyfatt: verde con una voce trovata, rossa con nessuna; messaggio sotto la casella; × per svuotare */
.ef-titlebar-search.is-found { background-color: #2e9b3a; border-color: #2e9b3a; }
.ef-titlebar-search.is-missing { background-color: #c62828; border-color: #c62828; }
.ef-titlebar-search::-webkit-search-cancel-button { display: none; }
.ef-search-clear { position: absolute; left: 6px; z-index: 1; color: #ddd; font-size: calc(14px + var(--ef-fs-plus)); line-height: 1; cursor: pointer; background: inherit; }
.ef-search-clear:hover { color: #fff; }
.ef-search-msg {
    position: absolute; top: 100%; left: 0; z-index: 30; margin-top: 2px; padding: 1px 5px; white-space: nowrap;
    background: #fff; color: var(--ef-text); border: 1px solid #a0a0a0; font-size: calc(12px + var(--ef-fs-plus)); box-shadow: 1px 1px 3px rgba(0,0,0,.2);
}
.ef-hide-x { margin-left: auto; color: #555; cursor: pointer; font-weight: normal; padding: 0 4px; }
.ef-hide-x:hover { color: #c00000; }
.ef-sep { border: none; border-top: 1px solid #d0d0d0; margin: 8px 0; }
.ef-menu a.is-disabled { color: #9a9a9a; cursor: default; }
.ef-menu a.is-disabled:hover { background: none; }
.ef-list-footer.is-bold, .ef-list-footer .is-bold { font-weight: bold; }
.ef-search-drop { height: 22px; width: 20px; border: 1px solid #555; border-left: none; background: #3c3c3c; color: #ddd; cursor: pointer; padding: 0; }
.ef-search-drop:hover { background: #4a4a4a; }
.ef-titlebar-cmd.is-active { color: #fff; text-decoration: underline; }

/* --- Filtra: riga dei filtri sotto le intestazioni, visibile solo con il comando attivo --- */
.ef-grid-host.tabulator:not(.ef-filters-on) .tabulator-header-filter { display: none; }
/* Filtra: freccia ▾ a sinistra del titolo (solo con Filtra attivo), blu se la colonna è filtrata */
.ef-filter-btn { display: none; margin-right: 3px; padding: 0 2px; color: #666; font-size: calc(10px + var(--ef-fs-plus)); cursor: pointer; border: 1px solid #c8c8c8; background: #fafafa; }
.ef-filters-on .ef-filter-btn { display: inline-block; }
.ef-filter-btn:hover { border-color: var(--ef-blue); color: var(--ef-blue); }
.ef-col-filtered .ef-filter-btn { background: var(--ef-blue); border-color: var(--ef-blue); color: #fff; }
.ef-filter-menu { z-index: 55; max-height: 60vh; }
.ef-filter-values { max-height: 45vh; overflow: auto; }
.ef-filter-values .ef-menu-check { padding: 2px 12px; }
.ef-grid-host.tabulator .tabulator-header-filter input { height: 18px; padding: 0 3px !important; font-size: calc(12px + var(--ef-fs-plus)); border: 1px solid #c8c8c8 !important; }
.ef-grid-host.tabulator .tabulator-header .tabulator-col .tabulator-col-content { padding: 1px 4px; }

/* --- Riga dei totali in fondo e totali parziali dei gruppi --- */
.ef-grid-host.tabulator .tabulator-footer { background: var(--ef-totals-bg); border-top: 1px solid #c8c8c8; font-weight: normal; }
.ef-grid-host.tabulator .tabulator-calcs-holder .tabulator-row { background: var(--ef-totals-bg) !important; font-weight: bold; }
.ef-grid-host.tabulator .tabulator-group .ef-group-total { margin-left: 16px; font-weight: normal; color: var(--ef-text); }

/* --- Finestre tabella: albero categorie, righe da scegliere --- */
/* Finestre "tabella" come Easyfatt: titolo blu + sottotitolo in una fascia bianca, contenuto, barra pulsanti in basso */
.ef-dialog.ef-win { padding: 0; }
.ef-win-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #fff; border-bottom: 1px solid #c8c8c8; }
.ef-win-title { font-size: calc(16px + var(--ef-fs-plus)); color: var(--ef-link); }
.ef-win-sub { font-size: calc(12px + var(--ef-fs-plus)); color: var(--ef-muted); }
.ef-win-icon { width: 28px; height: 28px; color: #d9a43a; }
.ef-win-bar { display: flex; align-items: center; gap: 2px; padding: 3px 6px; border-top: 1px solid #c8c8c8; background: #f3f3f3; }
.ef-image-view { position: relative; height: 55vh; display: flex; align-items: center; justify-content: center; overflow: auto; background: #fff; }
.ef-image-view.is-over { outline: 3px dashed var(--ef-blue); outline-offset: -8px; }
.ef-image-hint { background: #fff8d6; border: 1px solid #e8d68a; padding: 10px 18px; font-size: calc(13px + var(--ef-fs-plus)); }
.ef-image-info { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-top: 1px solid #ddd; background: #f3f3f3; font-size: calc(12px + var(--ef-fs-plus)); }
.ef-image-meta { display: grid; grid-template-columns: auto auto; gap: 0 8px; }
.ef-image-meta > span:nth-child(odd) { color: var(--ef-muted); text-align: right; }
.ef-formula-grid { display: grid; grid-template-columns: 1fr 140px; gap: 5px 10px; align-items: center; }
.ef-formula-grid label, .ef-formula-grid + div label { display: flex; align-items: center; gap: 6px; }
.ef-formula-grid label.is-disabled { color: #9a9a9a; }
.ef-formula-grid .ef-in:disabled { background: #f3f3f3; color: #9a9a9a; }
.ef-search-fields { display: grid; grid-template-columns: 110px 1fr 1fr 1fr auto; gap: 8px; padding: 8px 10px; }
.ef-search-fields label { display: flex; flex-direction: column; gap: 2px; font-size: calc(12px + var(--ef-fs-plus)); }
.ef-edit-list { margin: 0; font-size: calc(13px + var(--ef-fs-plus)); }
.ef-edit-list tr.is-selected td { background: #cce4f7; }
.ef-cell-in { width: 100%; border: none; background: transparent; font: inherit; padding: 1px 2px; outline: none; }
.ef-cell-in:focus { background: #fff; box-shadow: inset 0 0 0 1px var(--ef-blue); }
.ef-tree { border: 1px solid #c8c8c8; max-height: 45vh; overflow: auto; }
.ef-tree-row { padding: 2px 6px; cursor: default; }
.ef-tree-row.is-child { padding-left: 26px; }
.ef-tree-row:not(.is-child) { font-weight: bold; }
.ef-tree-row:hover { background: #e5f3ff; }
.ef-tree-row.is-selected { background: var(--ef-blue); color: #fff; }
.ef-pick { cursor: pointer; }
.ef-pick:hover td { background: #e5f3ff; }

/* --- Documenti: pannello filtri blu a destra (Periodo, Soggetto), come Easyfatt --- */
.ef-filter-panel { width: 190px; flex-shrink: 0; background: var(--ef-blue); color: #fff; padding: 10px 10px; overflow: auto; }
.ef-fp-title { font-size: calc(15px + var(--ef-fs-plus)); border-bottom: 1px solid rgba(255,255,255,.7); padding-bottom: 2px; margin-bottom: 4px; }
.ef-fp-item { display: block; padding: 2px 4px 2px 14px; color: #fff; cursor: pointer; position: relative; }
.ef-fp-item:hover { text-decoration: underline; }
.ef-fp-item.is-on { font-weight: bold; }
.ef-fp-item.is-on::before { content: "■"; position: absolute; left: 2px; font-size: calc(9px + var(--ef-fs-plus)); top: 4px; }
.ef-filter-panel .ef-in { color: var(--ef-text); }

/* --- Finestra del documento: finestra vera come Easyfatt (si sposta, si allarga dai bordi, Ingrandisci) --- */
.ef-win-backdrop { display: block; background: rgba(0,0,0,.08); }
.ef-dialog.ef-docwin { position: fixed; width: min(1180px, 96vw); height: min(720px, 94vh); max-width: none; min-width: 0; padding: 0;
    display: flex; flex-direction: column; border-color: #8a8a8a; box-shadow: 0 6px 24px rgba(0,0,0,.28); }
.ef-dialog.ef-docwin.is-max { border: none; box-shadow: none; }
.ef-docwin-title { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 0 0 10px; font-size: calc(13px + var(--ef-fs-plus));
    border-bottom: 1px solid #d0d0d0; background: #fff; cursor: default; user-select: none; touch-action: none; flex-shrink: 0; }
.ef-wbtn { width: 44px; height: 29px; border: none; background: transparent; font-size: calc(14px + var(--ef-fs-plus)); color: #333; cursor: default; }
.ef-wbtn:hover { background: #e5e5e5; }
.ef-wbtn.is-close:hover { background: #e81123; color: #fff; }
/* bordi e angoli per allargare la finestra */
.ef-rh { position: absolute; z-index: 5; touch-action: none; }
.ef-docwin.is-max .ef-rh { display: none; }
.ef-rh-n, .ef-rh-s { left: 6px; right: 6px; height: 6px; cursor: ns-resize; }
.ef-rh-e, .ef-rh-w { top: 6px; bottom: 6px; width: 6px; cursor: ew-resize; }
.ef-rh-n { top: -3px; } .ef-rh-s { bottom: -3px; } .ef-rh-e { right: -3px; } .ef-rh-w { left: -3px; }
.ef-rh-ne, .ef-rh-nw, .ef-rh-se, .ef-rh-sw { width: 12px; height: 12px; }
.ef-rh-ne { top: -3px; right: -3px; cursor: nesw-resize; } .ef-rh-sw { bottom: -3px; left: -3px; cursor: nesw-resize; }
.ef-rh-nw { top: -3px; left: -3px; cursor: nwse-resize; } .ef-rh-se { bottom: -3px; right: -3px; cursor: nwse-resize; }

/* casella con elenco (Causale, Cantiere), come le combo di Easyfatt */
.ef-combo { position: relative; display: flex; min-width: 0; }
.ef-combo > .ef-in { flex: 1; min-width: 0; padding-right: 20px; }
.ef-combo-arrow { position: absolute; right: 1px; top: 1px; bottom: 1px; width: 18px; border: none; background: #fff; color: #555; font-size: calc(11px + var(--ef-fs-plus)); cursor: pointer; }
.ef-combo-arrow:hover { background: #e5f1fb; }
.ef-combo-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; max-height: 260px; overflow: auto; margin: 0; padding: 0; list-style: none;
    background: #fff; border: 1px solid var(--ef-blue); box-shadow: 2px 3px 6px rgba(0,0,0,.2); font-size: calc(13px + var(--ef-fs-plus)); font-weight: 600; }
.ef-combo-list li { padding: 2px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default; }
.ef-combo-list li:hover { background: #e5f1fb; }
.ef-combo-list li.is-active { background: var(--ef-blue); color: #fff; }
.ef-combo-list li.ef-combo-sep { border-bottom: 1px solid #a0a0a0; margin-bottom: 2px; }

.ef-combo-float { position: fixed; right: auto; z-index: 95; font-weight: normal; }
.ef-cell-combo { width: 100%; height: 100%; border: none; outline: none; font: inherit; padding: 2px 3px; }

/* celle in modifica con i pulsanti (binocolo, Allarga cella) */
.ef-cell-editor { display: flex; align-items: flex-start; width: 100%; height: 100%; background: #fff; }
.ef-cell-editor input, .ef-cell-editor textarea { flex: 1; min-width: 0; border: none; outline: none; font: inherit; padding: 2px 3px; background: transparent; }
.ef-cell-editor textarea { height: 20px; resize: none; overflow: hidden; white-space: nowrap; }
.ef-cell-editor.is-wide textarea { height: 76px; overflow: auto; white-space: pre-wrap; }
.ef-cell-editor button { flex: 0 0 18px; height: 20px; border: none; background: transparent; color: #2e9b3a; padding: 3px 2px; cursor: pointer; }
.ef-cell-editor button + button { color: #555; }
.ef-cell-editor button:hover { background: #e5f1fb; }
.ef-cell-editor button svg { width: 13px; height: 13px; }
.ef-doc-lines .tabulator-cell.ef-cell-wrap { white-space: normal; }
.ef-doc-lines .tabulator-cell.tabulator-editing { padding: 0 !important; border: 1px solid var(--ef-blue) !important; }
.ef-doc-lines .tabulator-row .tabulator-cell { min-height: 22px; padding: 3px 4px; }
.ef-doc-head { border: none; margin: 0; padding: 6px 10px 2px; background: #f3f3f3; display: flex; flex-direction: column; gap: 4px; }
.ef-dh-row { display: flex; gap: 10px; align-items: flex-end; }
.ef-dh-row label { display: flex; flex-direction: column; gap: 1px; font-size: calc(13px + var(--ef-fs-plus)); }
.ef-dh-subject { flex: 1; }
.ef-link-box { display: block; color: var(--ef-link); text-decoration: underline; background: #fff; min-height: 22px; line-height: 20px; padding: 0 4px; }
.ef-doc-locked { background: var(--ef-notice-bg); border: 1px solid var(--ef-notice-border); margin: 4px 10px 0; padding: 3px 8px; font-size: calc(13px + var(--ef-fs-plus)); }
.ef-doc-tabs { display: flex; align-items: flex-end; gap: 0; padding: 4px 6px 0; background: #f3f3f3; border-bottom: 1px solid #c8c8c8; }
.ef-tab.is-disabled { color: #9a9a9a; cursor: default; }
.ef-doc-check { display: flex; align-items: center; gap: 4px; font-size: calc(13px + var(--ef-fs-plus)); margin-left: 14px; padding-bottom: 3px; }
.ef-doc-lines { flex: 1; min-height: 160px; background: #fff; }
.ef-doc-lines.tabulator, .ef-doc-lines .tabulator { border: none; font-size: calc(14px + var(--ef-fs-plus)); }
.ef-doc-lines .tabulator-cell.ef-cell-calc { background: #e7eaea; }
.ef-doc-lines .tabulator-row.tabulator-selected { background: #cce4f7; }
.ef-doc-addbar { display: flex; align-items: center; gap: 4px; padding: 2px 6px; border-top: 1px solid #c8c8c8; background: #f3f3f3; }
.ef-doc-arrows { display: flex; flex-direction: column; font-size: calc(14px + var(--ef-fs-plus)); line-height: 13px; color: #2f6eba; cursor: pointer; margin-right: 6px; padding: 0 3px; }
.ef-doc-arrows a:hover { color: var(--ef-blue); }
.ef-doc-addbar .ef-hint, .ef-doc-foot .ef-hint, .ef-doc-foot label { font-size: calc(13px + var(--ef-fs-plus)); }
.ef-doc-foot { display: flex; gap: 20px; padding: 6px 10px; background: #f3f3f3; border-top: 1px solid #d8d8d8; }
.ef-doc-totals { display: grid; grid-template-columns: auto 110px; gap: 1px 14px; font-size: calc(13px + var(--ef-fs-plus)); align-self: end; }
.ef-doc-totals > :nth-child(even) { text-align: right; }
.ef-link-select { border: none; background: transparent; color: var(--ef-link); text-decoration: underline; font: inherit; padding: 0; cursor: pointer; }

/* finestra con una pagina dentro (Selezione prodotti nei documenti) */
.ef-win-frame { flex: 1; width: 100%; border: none; background: #fff; }
body.ef-dragging iframe { pointer-events: none; }
.ef-btn.is-pressed { background: #cce4f7; border-color: #99c9ef; }
.ef-qty-spin { display: inline-flex; align-items: center; gap: 4px; margin: 0 4px; }
.ef-spin { display: flex; flex-direction: column; font-size: calc(12px + var(--ef-fs-plus)); line-height: 11px; color: #2f6eba; cursor: pointer; }

/* sezione Cantieri: righe dei totali nelle tabelline e riquadro del consuntivo */
.ef-mini-list tr.ef-mini-total td { background: var(--ef-total-bg, #e7eaea); font-weight: 600; }
/* spunta degli arrivi merce del cantiere (linguetta Documenti): consegnato tutto / in parte / liberato */
.ef-mark { font-weight: bold; font-size: calc(13px + var(--ef-fs-plus)); cursor: default; }
.ef-mark.is-tutto { color: #1e9e3a; }
.ef-mark.is-parte { color: #e08a00; }
.ef-mark.is-liberato { color: #8a8a8a; }
/* arrivo merce: articolo senza prezzo */
.ef-doc-lines .tabulator-cell.ef-cell-warn { background: #fde2e1; color: #b00020; }
/* documento già incluso in un altro dello stesso elenco: importo non contato nel totale */
.ef-mini-list tr.ef-mini-included td { color: #8a8a8a; }
.ef-kpi { display: grid; grid-template-columns: auto 120px 120px; gap: 4px 16px; max-width: 480px; align-items: baseline; }
.ef-kpi > :nth-child(3n+2), .ef-kpi > :nth-child(3n) { text-align: right; }

/* griglia delle righe come Easyfatt: titoli non in grassetto, colonne con menu blu sottolineate, spunta a quadratino */
.ef-doc-lines .tabulator-col .tabulator-col-title { font-weight: normal; font-size: calc(14px + var(--ef-fs-plus)); padding-right: 0; }
.ef-doc-lines .tabulator-col .tabulator-col-content { padding: 3px 2px; }
.ef-doc-lines .tabulator-col { cursor: pointer; }
.ef-col-menu { color: var(--ef-link); text-decoration: underline; }
.ef-box { display: inline-block; width: 13px; height: 13px; border: 1px solid #8a8a8a; background: #fff; vertical-align: middle; border-radius: 2px; }
.ef-box.is-on { background: var(--ef-blue); border-color: var(--ef-blue); position: relative; }
.ef-box.is-on::after { content: ""; position: absolute; left: 4px; top: 1px; width: 3px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ef-col-popup { min-width: 200px; }

/* avviso "prezzo inferiore a quello di acquisto": elenco dei prodotti in un riquadro che scorre */
.ef-below-cost { margin: 8px 0 4px; padding: 6px 6px 6px 22px; height: 150px; overflow: auto; border: 1px solid #c8c8c8; background: #fff; }

/* lente di Easyfatt accanto ai documenti collegati: apre il documento */
.ef-lens { display: inline-flex; vertical-align: middle; color: #2e9b3a; cursor: pointer; padding: 0 2px; }
.ef-lens svg { width: 13px; height: 13px; }
.ef-lens:hover { background: #e5f1fb; }

/* DDT: linguette Trasporto e Indirizzi, menu "Includi doc.", gruppi della finestra "Includi Arrivi merce dei cantieri" */
.ef-doc-panel { flex: 1; min-height: 160px; border: none; margin: 0; padding: 10px 12px; background: #fff; display: flex; flex-direction: column; gap: 10px; overflow: auto; }
.ef-doc-panel .ef-dh-row label { font-size: calc(13px + var(--ef-fs-plus)); }
/* fumetto "Includi documenti precedenti" (Easyfatt lo mette sotto il pulsante; qui sopra, perché la finestra arriva in
   fondo allo schermo e sotto verrebbe tagliato) */
.ef-include-hint { position: absolute; bottom: calc(100% + 6px); left: 0; width: 230px; background: #fff; border: 1px solid #a0a0a0;
    box-shadow: 2px 2px 5px rgba(0,0,0,.25); z-index: 21; padding: 5px 8px; font-size: calc(12px + var(--ef-fs-plus)); line-height: 1.35; cursor: default; }
.ef-include-hint b { display: flex; align-items: center; gap: 4px; color: #1065ce; font-weight: normal; font-size: calc(13px + var(--ef-fs-plus)); margin-bottom: 2px; }
.ef-include-hint b svg { width: 15px; height: 15px; }
.ef-include-menu { position: absolute; bottom: 100%; left: 0; min-width: 240px; background: #fff; border: 1px solid #a0a0a0; box-shadow: 2px 2px 5px rgba(0,0,0,.25); z-index: 20; padding: 2px 0; }
.ef-include-menu a { display: block; padding: 4px 14px; cursor: default; white-space: nowrap; }
.ef-include-menu a:hover { background: var(--ef-blue); color: #fff; }
.ef-include-group td { background: #f3f3f3; }

/* Casellina dello sconto % accanto a Sc % Auto (pulsantini nostri dei prezzi) */
.ef-in.ef-quick-discount { flex: 0 0 62px; background: #e8f1fb; color: #0b4f9c; }

/* Casella cambiata dal programma (formula, pulsantini): lampeggio breve */
@keyframes ef-flash { 0%, 40% { background-color: #ffe27a; } 100% { background-color: inherit; } }
.ef-in.ef-flash { animation: ef-flash 1.2s ease-out 1; }

/* Cantiere, linguetta Da fatturare: documenti in attesa da più di 60 giorni */
.ef-late { color: #c26a00; font-weight: bold; }

/* Elenchi: collegamento a un documento in una cella (Causale dei movimenti), blu come i link di Easyfatt */
.ef-grid-link { color: #1065ce; text-decoration: underline; cursor: pointer; }
.tabulator-row.ef-current .ef-grid-link { color: inherit; }
/* Pannello filtri: date di "Altro..." ed etichette di "Mostra solo" */
.ef-fp-dates { display: flex; flex-direction: column; gap: 4px; padding: 4px 0 0 14px; color: #fff; }
.ef-fp-dates label { display: flex; gap: 6px; align-items: center; }
.ef-fp-dates .ef-in { flex: 1; }
.ef-fp-label { display: block; color: #fff; margin: 4px 0 2px; }

/* Divisore trascinabile tra elenco e scheda: cursore ↔, evidenziato al passaggio */
.ef-splitter { width: 5px; margin-left: -2px; margin-right: -3px; flex-shrink: 0; cursor: col-resize; position: relative; z-index: 5; }
.ef-splitter:hover, .ef-splitter.is-dragging { background: var(--ef-blue); opacity: .45; }
body.ef-resizing, body.ef-resizing * { cursor: col-resize !important; user-select: none !important; }

/* Pannello filtri: giacenza iniziale / finale del prodotto scelto (Movimenti), come Easyfatt */
.ef-fp-stock { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; color: #fff; margin-top: 10px; }

/* Finestra Allegati dei documenti, come Easyfatt: anteprima in alto, dati del file, miniature in basso */
.ef-dialog.ef-att { width: min(820px, 96vw); max-width: none; padding: 0; display: flex; flex-direction: column; height: min(640px, 92vh); }
.ef-att-preview { position: relative; flex: 1 1 auto; min-height: 150px; overflow: auto; display: flex; align-items: center; justify-content: center; background: #fff; }
.ef-att-preview.is-over { background: #e5f1fb; outline: 2px dashed var(--ef-blue); outline-offset: -6px; }
.ef-att-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ef-att-preview iframe { width: 100%; height: 100%; border: 0; align-self: stretch; }
.ef-att-empty { display: flex; gap: 10px; align-items: center; padding: 12px 40px; background: #fffbd8; border: 1px solid #e8d36b; text-align: center; }
.ef-att-bigicon { width: 90px; height: 110px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 14px; font-weight: bold; color: #fff;
    background: linear-gradient(135deg, #b9dcf4 0 78%, #3aa0e0 78%); clip-path: polygon(0 0, 72% 0, 100% 24%, 100% 100%, 0 100%); }
.ef-att-rename { display: flex; align-items: center; gap: 6px; width: 90%; }
.ef-att-rename .ef-in { flex: 1; }
.ef-att-busy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.8); font-weight: bold; }
.ef-att-info { flex: none; min-height: 48px; padding: 3px 10px; background: #f0f0f0; border-top: 3px double #c8c8c8; border-bottom: 1px solid #c8c8c8; line-height: 1.4; }
.ef-att-info span { display: inline-block; width: 115px; white-space: nowrap; text-align: right; margin-right: 6px; color: #808080; }
.ef-att-info b { font-weight: normal; }
.ef-att-files { flex: none; height: 116px; overflow: auto hidden; display: flex; gap: 6px; padding: 6px 8px; background: #fff; }
.ef-att-file { flex: none; width: 92px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 3px; border: 1px solid transparent; cursor: default; }
.ef-att-file:hover { background: #e5f1fb; }
.ef-att-file.is-selected { background: #cce4f7; border-color: var(--ef-blue); }
.ef-att-file img { width: 80px; height: 70px; object-fit: contain; border: 1px solid var(--ef-border); background: #fff; }
.ef-att-icon { width: 60px; height: 70px; display: flex; align-items: center; justify-content: center; font-weight: bold; color: #fff; background: #8a8a8a; }
.ef-att-icon.is-pdf { background: #fff; color: #fff; box-shadow: inset 0 0 0 1px #c8c8c8; background: linear-gradient(#fff 0 35%, #c0283a 35% 60%, #fff 60%); }
.ef-att-name { width: 100%; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ef-att .ef-win-bar label.ef-btn, .ef-menu label.ef-menu-check { cursor: pointer; }
a.ef-btn.is-disabled { color: #a0a0a0; pointer-events: none; }

/* Ricerca prodotti (F3), compatta come Easyfatt: righe su una linea, colonne scelte con il menu Colonne */
.ef-dialog.ef-psearch { width: min(780px, 96vw); max-width: none; padding: 0; }
.ef-psearch-fields { display: grid; grid-template-columns: 150px 1fr 1fr auto; gap: 4px 10px; align-items: end; padding: 8px 10px 4px; background: #f3f3f3; }
.ef-psearch-fields label { display: flex; flex-direction: column; gap: 2px; width: auto; }
.ef-psearch-fields .ef-push { min-width: 90px; }
.ef-psearch-mode { display: flex; align-items: center; gap: 4px; padding: 4px 10px; background: #f3f3f3; border-bottom: 1px solid #c8c8c8; }
.ef-psearch-list { position: relative; height: 300px; overflow: auto; border-bottom: 1px solid #c8c8c8; }
.ef-psearch-list table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: calc(12px + var(--ef-fs-plus)); }
.ef-psearch-list th { position: sticky; top: 0; background: #fff; text-align: left; font-weight: normal; color: var(--ef-muted); border-bottom: 1px solid var(--ef-border); padding: 2px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ef-psearch-list td { padding: 1px 4px; height: 20px; border-bottom: 1px solid #f0f0f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default; }
.ef-psearch-list tr:hover td { background: #e5f1fb; }
.ef-psearch-list tr.is-selected td { background: var(--ef-blue); color: #fff; }
.ef-psearch-empty { position: absolute; inset: 40px 0 auto; text-align: center; }

/* Scheda prodotto di consultazione (link sulla descrizione in Ricerca e Selezione prodotti), come Easyfatt */
.ef-dialog.ef-pcard { width: min(470px, 96vw); max-width: none; padding: 0; }
.ef-pcard .ef-tab { border: 1px solid #c8c8c8; border-bottom: none; background: #f0f0f0; font: inherit; cursor: pointer; }
.ef-pcard .ef-tab.is-active { background: #fff; }
.ef-pcard-body { padding: 10px 14px; max-height: 70vh; overflow: auto; }
.ef-pcard-grid { display: grid; grid-template-columns: 120px 1fr; gap: 5px 10px; align-items: start; }
.ef-pcard-grid > label { color: var(--ef-text); padding-top: 2px; width: auto; }
.ef-pcard-val { min-height: 22px; padding: 2px 5px; border: 1px solid var(--ef-border); background: #fff; }
.ef-pcard-val.is-right { text-align: right; max-width: 130px; }
.ef-pcard-desc { min-height: 66px; white-space: pre-line; }
.ef-pcard-notes { min-height: 60px; white-space: pre-line; }
.ef-pcard-section { grid-column: 1 / -1; margin-top: 6px; }
.ef-pcard-img { height: 120px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--ef-border); background: #fff; }
.ef-pcard-img img { max-width: 100%; max-height: 116px; object-fit: contain; }
.ef-psearch-list td a.ef-link { cursor: pointer; }

/* Consuntivo del cantiere: tabella costo / vendita / margine e grafico a barre verticali */
.ef-cons-table td, .ef-cons-table th { padding: 3px 6px; }
.ef-neg { color: #c00000; }
.ef-cons-chart { display: flex; justify-content: space-around; align-items: flex-end; gap: 24px; height: 210px; margin-top: 16px; padding: 0 10px;
    border-bottom: 1px solid #a0a0a0; }
.ef-cons-group { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.ef-cons-bars { flex: 1; width: 100%; max-width: 230px; display: flex; align-items: flex-end; justify-content: center; gap: 8px; padding-top: 18px; }
.ef-cons-bar { position: relative; flex: 1; max-width: 56px; border-radius: 3px 3px 0 0; }
.ef-cons-bar span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 2px; white-space: nowrap;
    font-size: calc(10px + var(--ef-fs-plus)); color: var(--ef-text); }
.ef-cons-label { position: relative; top: 22px; height: 0; font-weight: bold; }
.ef-cons-bar.is-cost, .ef-cons-legend .is-cost { background: #9aa5b1; }
.ef-cons-bar.is-sale, .ef-cons-legend .is-sale { background: #0078d7; }
.ef-cons-bar.is-margin, .ef-cons-legend .is-margin { background: #3c9a3c; }
.ef-cons-bar.is-neg { background: #c0504d; }
.ef-cons-legend { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 46px; color: var(--ef-muted); }
.ef-cons-legend span { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-left: 10px; }

/* Strumenti → Utenti */
.ef-users-list { flex: 1; min-width: 0; overflow: auto; display: flex; flex-direction: column; background: #fff; }
.ef-users-list .ef-mini-list { margin: 0; }
.ef-users-list .ef-mini-list td, .ef-users-list .ef-mini-list th { padding: 3px 6px; }
.ef-users-list tr.is-off td { color: #9a9a9a; }
.ef-users-list .ef-list-footer { margin-top: auto; }
.ef-users-scheda .ef-r > label { width: 120px; flex: none; }
.ef-users-pwd { margin-top: 14px; padding-top: 10px; border-top: 1px solid #e0e0e0; }
.ef-pcard textarea.ef-in { resize: vertical; font: inherit; }
.ef-pcard-price { text-align: right; max-width: 130px; }
.ef-pcard-price[readonly] { background: #f0f0f0; color: #555; }
.ef-psearch-list tr.is-selected a.ef-link { color: #fff; }

/* Finestre spostabili trascinando il titolo, come in Easyfatt (easyfatt-grid.js, efDragDialogs) */
.ef-dialog .ef-win-head, .ef-dialog > .ef-dialog-title { cursor: move; user-select: none; }
.ef-cons-table tr.ef-cons-estimate td { font-style: italic; color: #555; }

/* Finestrelle come Easyfatt (06/11/2026): barra del titolo grigia, icona e testo, fascia grigia in basso con i pulsanti a destra.
   Valgono per tutti gli avvisi e le domande (.ef-dialog semplici); nelle finestre .ef-win cambia solo la fascia dei pulsanti */
.ef-dialog:not(.ef-win):not(.ef-docwin) { padding: 0; border: 1px solid #a8a8a8; border-radius: 8px; overflow: hidden; box-shadow: 0 8px 28px rgba(0,0,0,.28); }
.ef-dialog:not(.ef-win):not(.ef-docwin):not(:has(> .ef-dialog-title))::before { content: 'Gestionale'; display: block; padding: 7px 12px; background: #f0f0f0; cursor: move; }
.ef-dialog:not(.ef-win):not(.ef-docwin) > .ef-dialog-title { margin: 0; padding: 7px 12px; background: #f0f0f0; color: var(--ef-text); font-size: inherit; }
.ef-dialog:not(.ef-win):not(.ef-docwin) > :not(.ef-dialog-title):not(.ef-dialog-buttons) { margin-left: 16px; margin-right: 16px; }
.ef-dialog:not(.ef-win):not(.ef-docwin) > :not(.ef-dialog-title):not(.ef-dialog-buttons):first-of-type { margin-top: 12px; }
.ef-dialog:not(.ef-win):not(.ef-docwin) > p:has(+ .ef-dialog-buttons) { min-height: 34px; margin: 0; padding: 16px 18px 16px 62px; line-height: 1.35; white-space: pre-line;
    background: no-repeat 16px 14px / 34px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Ccircle cx='17' cy='17' r='16' fill='%230a84d6'/%3E%3Ctext x='17' y='24' font-family='Segoe UI,Arial' font-size='21' font-weight='600' text-anchor='middle' fill='%23fff'%3E%3F%3C/text%3E%3C/svg%3E"); }
.ef-dialog:not(.ef-win):not(.ef-docwin):has(> .ef-dialog-title) > p:has(+ .ef-dialog-buttons) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Ccircle cx='17' cy='17' r='16' fill='%23e8a317'/%3E%3Ctext x='17' y='25' font-family='Segoe UI,Arial' font-size='23' font-weight='700' text-anchor='middle' fill='%23fff'%3E!%3C/text%3E%3C/svg%3E"); }
.ef-dialog:not(.ef-win):not(.ef-docwin) > .ef-dialog-buttons, .ef-dialog.ef-win > .ef-dialog-buttons { margin: 0; padding: 10px 14px; background: #f0f0f0; border-top: 1px solid #dcdcdc; }
/* colori dei pulsanti: quelli comuni in fondo al file (ritocchi del 14/11/2026), qui solo la misura */
.ef-dialog .ef-dialog-buttons .ef-push { min-width: 88px; }

/* Gruppi di prodotti */
.ef-dialog.ef-groups { width: min(720px, 96vw); max-width: none; padding: 0; }
.ef-groups-body { display: flex; height: 340px; }
.ef-groups-list { flex: 0 0 240px; overflow: auto; border-right: 1px solid #c8c8c8; }
.ef-groups-list .ef-mini-list { margin: 0; }
.ef-groups-list tr { cursor: default; }
.ef-groups-detail { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 8px 10px; }
.ef-groups-items { flex: 1; overflow: auto; border: 1px solid #c8c8c8; }
.ef-groups-items .ef-mini-list { margin: 0; }
.ef-groups-bar { display: flex; align-items: center; gap: 4px; padding-top: 4px; }
.ef-groups-list td, .ef-groups-list th { padding: 1px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ef-groups-body { height: 400px; }

/* Analisi vendite (AnalisiVendite): tabella a sinistra, grafico al centro, come Easyfatt */
.ef-an-table { width: 300px; display: flex; flex-direction: column; border-right: 1px solid #c8c8c8; background: #fff; }
.ef-an-table > table { flex: 0; }
.ef-an-table { overflow: auto; }
.ef-an-foot { margin-top: auto; display: flex; justify-content: space-between; padding: 3px 6px; background: #e7eaea; border-top: 1px solid #c8c8c8; position: sticky; bottom: 0; }
.ef-an-chart { flex: 1; min-width: 0; padding: 16px; background: linear-gradient(#dfe8f3, #f7f9fb); display: flex; align-items: center; justify-content: center; }
@media print { .ef-toolbar, .ef-filter-panel, .ef-actions { display: none !important; } }

/* Selezione cliente → Crea un nuovo cliente (documenti) */
.ef-new-subject { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin: 4px 0 4px 20px; }
.ef-new-subject label { display: flex; flex-direction: column; font-size: 11px; width: auto; }

/* Note (barra in alto) */
.ef-notes-body { height: 60vh; overflow: auto; background: #fff; }
.ef-notes-grid { width: 100%; border-collapse: collapse; font-size: calc(12px + var(--ef-fs-plus)); }
.ef-notes-grid th { position: sticky; top: 0; background: #f0f0f0; border: 1px solid #d0d0d0; padding: 3px 6px; text-align: left; font-weight: normal; }
.ef-notes-grid td { border: 1px solid #e0e0e0; padding: 2px 6px; vertical-align: top; }
.ef-notes-grid tr.is-done .ef-notes-text { color: #888; text-decoration: line-through; }
.ef-notes-date { white-space: nowrap; color: #555; padding-top: 4px !important; }
.ef-notes-text { width: 100%; border: none; resize: none; overflow: hidden; font: inherit; padding: 2px 0; background: transparent; outline: none; }
.ef-notes-text:focus { background: #fffbe6; }

/* Opzioni applicazione */
.ef-opt-body { height: 470px; overflow: auto; padding: 8px 14px; background: #f7f7f7; }
.ef-opt-cols { display: flex; gap: 22px; }
/* le colonne non si allargano oltre la finestra per colpa del contenuto (un logo grande spingeva fuori la colonna di destra) */
.ef-opt-cols > div { min-width: 0; }
.ef-opt .ef-r > label.ef-inl { width: auto; }
.ef-opt-logo { height: 170px; border: 1px solid #c8c8c8; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 4px; }
.ef-opt-logo img { max-width: 100%; max-height: 100%; min-width: 0; object-fit: contain; }
.ef-opt-grid { width: 100%; border-collapse: collapse; background: #fff; font-size: calc(12px + var(--ef-fs-plus)); }
.ef-opt-grid th { background: #fff; border-bottom: 1px solid #d0d0d0; padding: 3px 4px; text-align: left; font-weight: normal; position: sticky; top: 0; }
.ef-opt-grid td { border-bottom: 1px solid #ececec; padding: 2px 4px; }
.ef-opt-grid tr.is-sel td { background: var(--ef-blue); color: #fff; }
.ef-opt-grid tr.is-off td { color: #a0a0a0; }
.ef-opt-group { font-weight: bold; padding-top: 10px !important; border-bottom: 1px solid #7aa7e0 !important; }
.ef-opt-cell { width: 100%; border: none; background: transparent; font: inherit; outline: none; }
.ef-opt-cell:focus { background: #fffbe6; }
.ef-opt-scroll { height: 360px; overflow: auto; border: 1px solid #c8c8c8; }
.ef-opt .ef-check { display: block; margin: 4px 0; }

/* Preventivo, scheda di costruzione (docs/moduli/preventivi/piano.md): lavoro in grassetto, righe interne rientrate e più
   chiare, colonne interne (Sc. acq., Costo, Ric. %, Guadagno) su fondo giallino perché non vanno in stampa */
.ef-row-work .tabulator-cell[tabulator-field="description"], .ef-row-title .tabulator-cell[tabulator-field="description"] { font-weight: bold; }
.ef-row-child .tabulator-cell { background: #f4f7fb; color: #404a57; }
.ef-row-child .tabulator-cell[tabulator-field="code"] { padding-left: 12px; }
.ef-row-child .tabulator-cell[tabulator-field="description"] { padding-left: 14px; }
.ef-cell-fold { cursor: pointer; color: #2f6eba; padding: 0 !important; user-select: none; }
.ef-cell-fold span { color: #9aa7b8; }
.tabulator-row .tabulator-cell.ef-cell-int { background: #fdf9e8; }
.tabulator-row.ef-row-child .tabulator-cell.ef-cell-int { background: #f8f5e6; }
.tabulator-cell.ef-cell-auto { font-style: italic; color: #555; }
.tabulator-cell.ef-cell-fixed { font-weight: bold; }
.ef-doc-sheet { display: grid; grid-template-columns: auto auto; gap: 1px 12px; align-content: center; margin-right: 26px; padding: 3px 10px;
    background: #fdf9e8; border: 1px solid #e6dfc0; font-size: calc(12px + var(--ef-fs-plus)); }
.ef-doc-sheet > span:nth-child(even) { text-align: right; }

/* Preventivo: linguetta Computo con l'indice dei capitoli a sinistra e la griglia su tutto il resto; le altre linguette */
.ef-quote { flex: 1; display: flex; min-height: 0; }
.ef-quote .ef-doc-lines { flex: 1; min-width: 0; }
.ef-quote-index { width: 200px; flex-shrink: 0; background: var(--ef-blue); color: #fff; padding: 8px 0; overflow-y: auto; display: flex; flex-direction: column; margin-bottom: var(--ef-quote-foot, 0px); }
.ef-quote:has(.ef-quote-index) { background: #f2f2f2; }
.ef-quote-index a { color: #fff; padding: 4px 12px; cursor: pointer; text-decoration: none; display: flex; justify-content: space-between; gap: 6px; }
.ef-quote-index a:hover { background: rgba(255,255,255,.15); }
.ef-quote-index a.ef-quote-index-title { font-weight: bold; font-size: calc(14px + var(--ef-fs-plus)); }
.ef-quote-index a.ef-quote-index-chapter { padding-left: 20px; }
.ef-quote-index a.ef-quote-index-chapter span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ef-quote-index a.ef-quote-index-chapter span:last-child { flex-shrink: 0; opacity: .9; }
.ef-quote-index a.is-active { background: #fff; color: var(--ef-blue); }
.ef-quote-index a.ef-quote-index-add { padding-left: 20px; opacity: .85; font-style: italic; }
.ef-quote-page { display: flex; flex-direction: column; gap: 8px; }
.ef-quote-page > textarea { flex: 1; min-height: 160px; resize: none; line-height: 1.45; }
.ef-quote-phrases { display: flex; flex-direction: column; gap: 4px; }
.ef-quote-phrases label { display: flex; gap: 6px; align-items: flex-start; cursor: pointer; }
.ef-quote-extras { border-collapse: collapse; width: 560px; background: #fff; }
.ef-quote-extras th { text-align: left; font-weight: 600; border-bottom: 1px solid #d0d0d0; padding: 3px 4px; }
.ef-quote-extras td { border-bottom: 1px solid #ececec; padding: 1px 2px; }
.ef-quote-preview { display: flex; flex-direction: column; gap: 6px; padding: 6px 10px; }
.ef-quote-preview .ef-dh-row { flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.ef-quote-col { display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }
.ef-quote-frame { flex: 1; width: 100%; border: 1px solid #c8c8c8; background: #808080; position: relative; }
.ef-quote-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ef-quote-frame iframe.is-loading { visibility: hidden; }
.ef-margins { min-width: 250px; }
.ef-margins a { justify-content: space-between; }
.ef-margins-grid { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; padding: 4px 18px 8px; }
.ef-margins-grid input { width: 50px; text-align: right; }
.ef-row-chapter .tabulator-cell { background: #e6f1fb !important; font-weight: bold; }
/* finestra Computo */
.ef-computo-search { display: flex; align-items: center; gap: 14px; padding: 6px 10px; background: #2b2b2b; color: #fff; }
.ef-computo-search input { width: 260px; }
.ef-computo-body { flex: 1; display: flex; min-height: 0; }
.ef-computo-groups { width: 200px; flex-shrink: 0; background: var(--ef-blue); color: #fff; padding: 8px 0; overflow-y: auto; display: flex; flex-direction: column; }
.ef-computo-groups a { color: #fff; padding: 4px 14px; cursor: pointer; }
.ef-computo-groups a.is-active { background: #fff; color: var(--ef-blue); font-weight: 600; }
.ef-computo-groups-title { padding: 0 14px 6px; font-weight: bold; }
.ef-computo-groups-cmd { margin-top: auto; padding-top: 10px; display: flex; flex-direction: column; }
.ef-computo-groups-cmd a { font-style: italic; opacity: .9; }
.ef-computo-list { flex: 1; min-width: 0; overflow: auto; background: #fff; }
.ef-computo-table { width: 100%; border-collapse: collapse; font-size: calc(13px + var(--ef-fs-plus)); }
.ef-computo-table th { position: sticky; top: 0; background: #f0f0f0; border-bottom: 1px solid #d6d6d6; padding: 4px 8px; text-align: left; font-weight: 600; }
.ef-computo-table td { border-bottom: 1px solid #ececec; padding: 3px 8px; cursor: default; }
.ef-computo-table tr.is-sel td { background: var(--ef-blue); color: #fff; }
.ef-computo-table tr.is-editing td { background: #fffbe6; padding: 2px 4px; }
.ef-computo-table.is-edit-all td { padding: 1px 2px; background: #fffbe6; }
.ef-computo-table.is-edit-all tr.is-sel td { background: #fff3c4; color: inherit; }
.ef-computo-table input.is-num { text-align: right; }
.ef-computo-foot { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid #d0d0d0; background: #f3f3f3; }

/* Relazione a righe */
.ef-report-lines { flex: 1; overflow-y: auto; border: 1px solid #c8c8c8; background: #fff; }
.ef-report-line { display: flex; align-items: flex-start; gap: 6px; padding: 2px 6px; border-bottom: 1px solid #ececec; }
.ef-report-line.is-sel { background: #e6f1fb; }
.ef-report-n { width: 22px; flex-shrink: 0; color: #888; text-align: right; padding-top: 4px; }
.ef-report-line textarea { flex: 1; resize: none; overflow: hidden; border-color: transparent; background: transparent; line-height: 1.4; }
.ef-report-line textarea:focus { border-color: var(--ef-blue); background: #fff; }
.ef-report-line textarea.is-bold { font-weight: bold; }
.ef-report-bar { flex-wrap: wrap; align-items: center; gap: 6px; }
.ef-row-bold .tabulator-cell[tabulator-field="description"] { font-weight: bold; }

/* Cantieri: stato dai documenti, totali del consuntivo (12/11/2026) */
.ef-site-state { display: inline-block; padding: 1px 8px; border-radius: 3px; font-weight: 600; }
.ef-site-state.is-da_fatturare { background: #fff1d6; color: #8a5a00; }
.ef-site-state.is-fatturato { background: #e2f0d9; color: #2e6b1f; }
.ef-site-state.is-vuoto, .ef-site-state.is-archiviato { background: #ececec; color: #666; }
.ef-fp-count { opacity: .8; }
.ef-fp-total { margin-top: 10px; padding: 6px 8px; background: rgba(255,255,255,.15); border-radius: 3px; }
.ef-cons-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.ef-cons-summary > div { border: 1px solid #d6d6d6; background: #f7f9fb; padding: 6px 10px; display: flex; flex-direction: column; }
.ef-cons-summary span { color: #555; }
.ef-cons-summary b { font-size: 1.25em; }
.ef-cons-summary small { color: #777; }
.ef-sites-list { width: 100%; }
.ef-sites-list tr { cursor: default; }
.ef-sites-list tr.is-selected td { background: var(--ef-blue); color: #fff; }
.ef-sites-list tr.is-archived td { color: #999; }
.ef-site-edit { margin-top: 8px; padding: 6px 8px; border: 1px solid #d6d6d6; background: #fafafa; }
.ef-site-bar { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
/* Cantiere nella riga delle linguette del documento (12/11/2026) */
.ef-doc-tabs .ef-doc-site { display: flex; align-items: center; gap: 6px; width: 340px; margin-right: 12px; padding-bottom: 3px; flex-direction: row; font-size: calc(13px + var(--ef-fs-plus)); }
.ef-doc-tabs .ef-doc-site > b { font-weight: normal; white-space: nowrap; }
/* "In quale cantiere lavori?" (13/11/2026) */
.ef-site-choice { display: flex; width: 100%; box-sizing: border-box; align-items: baseline; gap: 10px; padding: 7px 10px; margin-bottom: 4px; border: 1px solid #c8c8c8; background: #fff; text-align: left; cursor: pointer; font: inherit; }
.ef-site-choice:hover, .ef-site-choice:focus { background: #e6f1fb; border-color: var(--ef-blue); outline: none; }
.ef-site-choice span { color: #666; }
.ef-site-choice.is-generic { margin-top: 6px; border-style: dashed; }
/* corpo delle finestrelle con dei campi: margini uguali su tutti i lati (13/11/2026) */
.ef-dialog .ef-dialog-body { padding: 12px 16px 4px; margin: 0 !important; }
.ef-dialog .ef-dialog-body > p:first-child { margin-top: 0; }

/* Preventivo: riga con Oggetto e stato (14/11/2026) */
.ef-quote-head { align-items: flex-end; gap: 14px; }
.ef-quote-subject { flex: 1; min-width: 0; }
.ef-quote-subject input { width: 100%; font-weight: 600; }
.ef-quote-state { display: inline-flex; border: 1px solid #b9b9b9; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.ef-quote-state button { border: none; border-left: 1px solid #d0d0d0; background: #fafafa; padding: 4px 12px; font: inherit; cursor: pointer; color: #555; }
.ef-quote-state button:first-child { border-left: none; }
.ef-quote-state button:hover:not(:disabled) { background: #eef4fb; }
.ef-quote-state button:disabled { cursor: default; }
.ef-quote-state button.is-wait.is-on { background: #fff1c9; color: #7a5a00; font-weight: 600; }
.ef-quote-state button.is-ok.is-on { background: #d8efd0; color: #22631a; font-weight: 600; }
.ef-quote-state button.is-off.is-on { background: #e4e4e4; color: #444; font-weight: 600; text-decoration: line-through; }
/* colonna Stato dell'elenco preventivi */

/* Allegati del cantiere (14/11/2026) */
.ef-site-drop { display: flex; align-items: center; gap: 10px; padding: 14px; border: 2px dashed #b9c7d8; border-radius: 6px; background: #f7fafd; cursor: pointer; margin-bottom: 10px; }
.ef-site-drop.is-over { border-color: var(--ef-blue); background: #e6f1fb; }
.ef-site-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.ef-site-file { position: relative; border: 1px solid #ddd; border-radius: 4px; padding: 6px; background: #fff; }
.ef-site-thumb { display: flex; align-items: center; justify-content: center; height: 90px; background: #f3f3f3; overflow: hidden; }
.ef-site-thumb img { max-width: 100%; max-height: 100%; object-fit: cover; }
.ef-site-file-name { margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.ef-site-file-del { position: absolute; top: 4px; right: 4px; border: none; background: rgba(255,255,255,.9); color: #c00000; cursor: pointer; border-radius: 3px; }

/* Agenda (14/11/2026) */
.ef-agenda-nav { display: flex; align-items: center; gap: 4px; margin-left: 18px; }
.ef-agenda-btn { background: #3c3c3c; color: #fff; border: 1px solid #555; padding: 2px 10px; cursor: pointer; font: inherit; }
.ef-agenda-btn:hover { background: #4a4a4a; }
.ef-agenda-label { color: #fff; margin-left: 10px; font-weight: 600; }
.ef-agenda-views { display: flex; gap: 2px; margin-right: 8px; }
.ef-agenda-views a { color: #ddd; padding: 2px 10px; cursor: pointer; }
.ef-agenda-views a.is-on { background: var(--ef-blue); color: #fff; }
.ef-agenda-main { flex: 1; min-width: 0; overflow: auto; background: #fff; }
.ef-agenda-week { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); min-height: 100%; }
.ef-agenda-day { border-right: 1px solid #e2e2e2; padding: 0 4px 30px; position: relative; }
.ef-agenda-day.is-holiday, .ef-agenda-mday.is-holiday { background: #fafafa; }
.ef-agenda-day.is-today .ef-agenda-dayhead, .ef-agenda-mday.is-today .ef-agenda-mnum { background: var(--ef-blue); color: #fff; }
.ef-agenda-dayhead { padding: 4px 6px; margin: 0 -4px 4px; background: #f0f0f0; border-bottom: 1px solid #ddd; cursor: default; }
.ef-agenda-event { border-left: 4px solid #5b9bd5; background: #eef4fb; padding: 3px 5px; margin-bottom: 4px; cursor: pointer; border-radius: 2px; }
.ef-agenda-event:hover, .ef-agenda-chip:hover { filter: brightness(.95); }
.ef-agenda-event .ef-agenda-time { display: block; font-size: .85em; color: #555; }
.ef-agenda-event .ef-agenda-title { display: block; font-weight: 600; }
.ef-agenda-event .ef-agenda-who { display: block; font-size: .85em; color: #444; }
.ef-agenda-event.is-maint, .ef-agenda-chip.is-maint { border-left-color: #e8a317; background: #fff4dc; }
.ef-agenda-event.is-reminder, .ef-agenda-chip.is-reminder { border-left-color: #9b59b6; background: #f4ecf8; }
.ef-agenda-event.is-done, .ef-agenda-chip.is-done { opacity: .55; text-decoration: line-through; }
.ef-agenda-event.is-overdue, .ef-agenda-chip.is-overdue { border-left-color: #c00000; }
.ef-agenda-add { position: absolute; bottom: 6px; left: 8px; font-size: .85em; color: var(--ef-link); cursor: pointer; opacity: .7; }
.ef-agenda-month { display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: auto; grid-auto-rows: minmax(92px, 1fr); }
.ef-agenda-mhead { background: #f0f0f0; padding: 3px 6px; font-weight: 600; border-bottom: 1px solid #ddd; }
.ef-agenda-mday { border-right: 1px solid #e2e2e2; border-bottom: 1px solid #e2e2e2; padding: 2px 3px; overflow: hidden; }
.ef-agenda-mday.is-other { color: #aaa; background: #fcfcfc; }
.ef-agenda-mnum { display: inline-block; padding: 0 5px; border-radius: 3px; margin-bottom: 2px; }
.ef-agenda-chip { border-left: 3px solid #5b9bd5; background: #eef4fb; padding: 1px 4px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; font-size: .9em; }
.ef-agenda-more { font-size: .85em; color: var(--ef-link); cursor: pointer; }
.ef-agenda-list { padding: 6px; }
.ef-agenda-list tr.is-maint td:first-child { border-left: 3px solid #e8a317; }
.ef-fp-check { display: flex; align-items: center; gap: 6px; padding: 3px 0; cursor: pointer; }
.ef-agenda-form { width: min(560px, 94vw); }
.ef-agenda-form .ef-r > label:first-child { width: 80px; }

/* campo calcolato, in sola lettura: giallino (es. Inizio del cantiere = primo documento, 14/11/2026) */
.ef-in.ef-calc { background: var(--ef-notice-bg); color: #333; cursor: default; }

/* Caselle in rilievo, stile "C" (scelto il 14/11/2026): angoli smussati, ombra interna che le fa sembrare scavate nella
   scheda; la casella attiva ha il bordo blu e un alone leggero; le caselle che non si scrivono restano grigie */
.ef-in, .ef-pcard-val { border-color: #aab3bd; border-radius: 3px; box-shadow: inset 0 1px 2px #d5dae0; }
.ef-in:focus { border-color: var(--ef-blue); box-shadow: inset 0 1px 2px #d5dae0, 0 0 0 2px #cfe4f8; }
.ef-in[readonly], .ef-in:disabled, .ef-in.is-combo, .ef-pcard-price[readonly] { background: #eef0f2; box-shadow: inset 0 1px 2px #d0d4d9; }
.ef-in.ef-calc { background: var(--ef-notice-bg); }
.ef-report-line textarea.ef-in, .ef-report-line textarea.ef-in:focus { box-shadow: none; border-radius: 0; }
/* Scheda prodotto: linguette una sopra l'altra, la finestra non cambia misura */
.ef-pcard-body { display: grid; }
.ef-pcard-pane { grid-area: 1 / 1; align-content: start; }
.ef-pcard-pane.is-hidden { visibility: hidden; }

/* Finestre con gli angoli leggermente smussati (richiesta dell'utente, 14/11/2026); niente overflow:hidden, che taglierebbe
   le tendine: si arrotondano la prima e l'ultima fascia (testata e pulsanti) */
.ef-dialog { border-radius: 6px; }
.ef-dialog > :first-child { border-top-left-radius: 5px; border-top-right-radius: 5px; }
.ef-dialog > :last-child { border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; }
.ef-dialog.ef-docwin.is-max, .ef-dialog.ef-docwin.is-max > * { border-radius: 0; }

/* ---- Ritocchi grafici del 14/11/2026 (prototipo approvato dall'utente) ---- */
/* 1. testata delle finestre: icona prima del titolo, X di chiusura a destra (disegnata qui, il clic in easyfatt-grid.js) */
.ef-win-head { justify-content: flex-start; gap: 10px; position: relative; padding-right: 40px; }
.ef-win-head > .ef-win-icon { order: -1; flex-shrink: 0; }
.ef-win-head > div:not(.ef-win-title) { flex: 1; min-width: 0; }
.ef-win-head::after { content: "\2715"; position: absolute; right: 8px; top: 50%; translate: 0 -50%; width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center; border-radius: 4px; color: #666; font-size: 13px; cursor: pointer; }
.ef-win-head.is-x-hover::after { background: #e81123; color: #fff; }
.ef-docwin > .ef-win-head::after { content: none; }
/* 2. linguette con gli angoli in alto arrotondati */
.ef-tab { border-radius: 4px 4px 0 0; }
/* 3. pulsanti arrotondati; quello principale (Invio) pieno blu */
.ef-push { border-radius: 4px; background: #f3f4f6; border-color: #b8bec6; }
.ef-push:hover { background: #e5f1fb; border-color: var(--ef-blue); }
.ef-push.is-default { background: var(--ef-blue); color: #fff; border-color: #0067be; box-shadow: none; }
.ef-push.is-default:hover { background: #106ebe; }
.ef-push.is-default:disabled { background: #9cc3e6; border-color: #9cc3e6; color: #fff; }
.ef-push.is-default svg { color: #fff !important; }
/* 4. elenchi: una riga sì e una no azzurrina (la riga sotto il mouse e quella scelta restano come prima) */
.ef-grid-host:not(.ef-doc-lines) .tabulator-row.tabulator-row-even { background: #f7f9fb; }
/* 5. pannello filtri: la voce scelta su una fascia chiara arrotondata */
.ef-fp-item { border-radius: 3px; margin: 1px 0; }
.ef-fp-item.is-on { background: rgba(255,255,255,.2); }

/* Pagamenti (14/11/2026): finestre Pagamento, Giroconto e Saldo multiplo come Easyfatt, etichetta sopra la casella */
.ef-pay-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; padding: 12px 16px; align-items: end; }
.ef-pay-form > label { display: flex; flex-direction: column; gap: 2px; color: #333; min-width: 0; }
.ef-pay-form > label .ef-in { width: 100%; flex: none; }
.ef-pay-form > .is-wide { grid-column: span 2; }
.ef-pay-form > .is-wide2 { grid-column: span 3; }
.ef-pay-form > .is-wide3, .ef-pay-form > .is-full { grid-column: 1 / -1; }
.ef-pay-form > .ef-pay-check { flex-direction: row; align-items: center; gap: 6px; padding-bottom: 3px; }
.ef-pay-form > .ef-pay-more { align-self: center; justify-self: end; cursor: pointer; }
.ef-tb-menu-sep { border: none; border-top: 1px solid #d6d6d6; margin: 3px 6px; }
/* Ns. banche e risorse (14/11/2026) */
.ef-dialog.ef-res-win { width: min(760px, 96vw); max-width: none; padding: 0; }
.ef-res-body { display: flex; height: min(440px, 70vh); }
.ef-res-list { width: 300px; flex-shrink: 0; overflow: auto; border-right: 1px solid #d0d0d0; }
.ef-res-list tr.ef-res-group td { font-weight: bold; padding-top: 8px; border-bottom: 1px solid #9cc3e6; }
.ef-res-list tr.is-selected td { background: var(--ef-blue); color: #fff; }
.ef-res-scheda { flex: 1; padding: 10px 14px; overflow: auto; }
.ef-res-scheda .ef-r > label { width: 120px; }

/* linguetta Pagamento: riquadro Da saldare / Saldato / Abbuono / Eccedenza, come Easyfatt (v0.1.81) */
.ef-pay-state .ef-link, .ef-pay-state label { text-align: left; }
.ef-pay-state .is-abbuono { color: #d40000; }
.ef-pay-state .is-eccedenza { color: #2e8b2e; }

/* finestra Stampa del preventivo: margini del foglio (v0.1.82) */
.ef-print-margins { display: grid; grid-template-columns: 110px 1fr; gap: 6px 8px; margin-top: 10px; align-items: center; }
.ef-print-presets { display: flex; flex-wrap: wrap; gap: 4px; }
.ef-print-presets .ef-push { min-width: 0; padding: 2px 8px; }
.ef-print-mm { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.ef-print-mm .ef-in { width: 42px; text-align: right; }

/* finestra del documento, colore "C" scelto dall'utente il 14/11/2026: barra del titolo blu scuro e testata grigio-azzurra,
   così si stacca dalla barra bianca delle icone e sembra un programma, non una pagina web (v0.1.83) */
.ef-dialog.ef-docwin { border-color: #7f8fa3; }
.ef-docwin-title { background: #0078d7; color: #fff; border-bottom-color: #0067b8; } /* barra azzurra della prova B, scelta dall'utente il 14/11/2026 (testata della C) */
.ef-docwin-title svg { color: #fff !important; }
.ef-docwin-title .ef-wbtn { color: #fff; }
.ef-docwin-title .ef-wbtn:hover { background: rgba(255, 255, 255, .18); }
.ef-docwin-title .ef-wbtn.is-close:hover { background: #e81123; }
.ef-docwin .ef-doc-head, .ef-docwin .ef-doc-tabs { background: #dfe7f0; }
.ef-docwin .ef-doc-tabs { border-bottom-color: #b3c1d1; }
.ef-docwin .ef-doc-tabs .ef-tab { background: #cdd8e4; border-color: #b3c1d1; }
.ef-docwin .ef-doc-tabs .ef-tab.is-active { background: #fff; border-bottom-color: #fff; }
.ef-docwin .ef-doc-tabs .ef-tab.is-disabled { color: #8494a6; }
.ef-docwin .ef-doc-lines .tabulator-header, .ef-docwin .ef-doc-lines .tabulator-header .tabulator-col { background: #f3f6f9; }

/* righe dei documenti compatte come Easyfatt (15/11/2026): interlinea stretta, poco spazio sopra e sotto */
.ef-doc-lines .tabulator-row .tabulator-cell { padding: 2px 4px; line-height: 1.3; }

/* riga appena inserita dal Computo: lampeggia per far vedere dov'è finita (15/11/2026) */
@keyframes ef-row-flash { 0%, 60% { background: #fff3a6; } 100% { background: transparent; } }
.ef-doc-lines .tabulator-row.ef-row-flash .tabulator-cell:not(.ef-cell-calc) { animation: ef-row-flash 1.6s ease-out; }

/* Strumenti → Tabelle ▸ (sottomenu della barra) */
.ef-tb-sub { position: relative; }
.ef-tb-sub-label { display: block; padding: 4px 12px 4px 24px; color: var(--ef-text) !important; cursor: default; }
.ef-tb-sub:hover > .ef-tb-sub-label { background: var(--ef-toolbar-hover); }
.ef-tb-menu.ef-tb-submenu { left: 100%; top: -4px; }

/* finestra Tipi pagamento, come Easyfatt (15/11/2026) */
.ef-dialog.ef-pt-win { width: min(820px, 96vw); }
.ef-pt-win .ef-res-body { height: min(520px, 76vh); }
.ef-pt-scheda { display: flex; flex-direction: column; gap: 4px; }
.ef-pt-field { display: flex; flex-direction: column; gap: 1px; margin-bottom: 4px; }
.ef-pt-radio { display: flex; align-items: center; gap: 6px; min-height: 24px; }
.ef-pt-radio label, .ef-pt-check label { display: inline-flex; align-items: center; gap: 4px; }
.ef-pt-check { display: flex; align-items: center; gap: 6px; min-height: 24px; }
.ef-pt-rates { margin: 2px 0 0 22px; }
.ef-pt-rates .ef-mini-list { width: 100%; margin: 0; }
.ef-pt-rates tr.is-selected td { background: #cce4f7; }
.ef-pt-unit { display: flex; align-items: center; gap: 3px; justify-content: flex-end; }
.ef-pt-unit .ef-cell-in { width: 60px; }
.ef-pt-note { margin-top: 10px; white-space: normal; }
/* Computo: Importa listino, Preferiti, gruppi nuovi e bloccati */
.ef-dialog.ef-imp-win { width: min(1000px, 97vw); }
.ef-imp-body { padding: 10px 14px; max-height: 70vh; overflow: auto; }
.ef-imp-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 34px; border: 2px dashed #9cc3e6; cursor: pointer; text-align: center; margin-bottom: 10px; }
.ef-imp-drop:hover { background: #f3f8fd; }
.ef-imp-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.ef-imp-preview { overflow: auto; max-height: 50vh; border: 1px solid #d0d0d0; }
.ef-imp-preview table { margin: 0; table-layout: fixed; }
.ef-imp-preview td, .ef-imp-preview th { max-width: 260px; min-width: 70px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ef-imp-preview th.is-on { background: #cce4f7; }
.ef-imp-preview .is-off { color: #a0a0a0; background: #f6f6f6; }
.ef-imp-preview select { width: 100%; font-size: calc(11px + var(--ef-fs-plus)); padding: 1px; }
.ef-imp-letter { text-align: center; font-weight: normal; color: #808080; }
.ef-imp-list { margin: 2px 0 6px 22px; padding: 0; }
.ef-new-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #0078d7; flex: none; }
.ef-computo-groups a.is-new { font-weight: bold; }
.ef-computo-groups .ef-new-dot { background: #ffd54a; }
.ef-computo .ef-computo-groups { width: 300px; }
.ef-computo-busy { position: absolute; inset: 0; z-index: 5; background: rgba(255,255,255,.6); display: flex; align-items: center; justify-content: center; gap: 10px; font-size: calc(14px + var(--ef-fs-plus)); font-weight: bold; color: #1d4f91; }
.ef-spinner { width: 20px; height: 20px; border: 3px solid #b5d4f4; border-top-color: #0078d7; border-radius: 50%; animation: ef-spin .8s linear infinite; }
@keyframes ef-spin { to { transform: rotate(360deg); } }
.ef-computo-groups .ef-g-lock { color: #cfe3f7; flex: none; }
.ef-computo-groups a.is-active .ef-g-lock { color: #7fa7cf; }
.ef-computo-groups a.is-active .ef-new-dot { background: #0078d7; }
.ef-computo-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ef-computo-groups a { display: flex; align-items: center; gap: 4px; }
.ef-computo-groups a.is-child { padding-left: 22px; }
.ef-computo-groups a .ef-g-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ef-computo-groups a.is-fav { color: #b26a00; }
.ef-star { cursor: pointer; color: #c8c8c8; font-size: 15px; line-height: 1; user-select: none; }
.ef-star.is-on { color: #EF9F27; }
.ef-src-code { display: block; color: #9a9a9a; font-size: calc(10px + var(--ef-fs-plus)); }

/* Aliquote IVA e Conti d'acquisto (Strumenti → Tabelle) */
.ef-dialog.ef-iva-win { width: min(1040px, 97vw); }
.ef-iva-win .ef-res-body { height: min(520px, 72vh); }
.ef-iva-list { flex: 1; width: auto; }
.ef-iva-list td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.ef-iva-list td:first-child { min-width: 62px; }
.ef-iva-scheda { width: 220px; flex: none; background: #f4f4f4; }
.ef-iva-banner { margin: 0 8px 6px; padding: 3px 8px; background: #fff8d6; border: 1px solid #e8d48a; font-size: calc(11px + var(--ef-fs-plus)); }
.ef-dialog.ef-conti-win { width: min(560px, 96vw); }
.ef-conti-body { height: min(420px, 66vh); overflow: auto; border-top: 1px solid #d0d0d0; }
.ef-conti-body tr.is-picked td, .ef-conti-body tr.is-picked .ef-cell-in { background: #cce4f7; }
.ef-pt-editing { margin-top: auto; padding-top: 8px; display: flex; gap: 8px; align-items: center; font-size: calc(12px + var(--ef-fs-plus)); }

/* App del telefono: voci "Da sistemare" (giallo come nella bozza dell'app) */
.ef-fixbox { background: #fff7e0; border: 1px solid #f0d58a; padding: 4px 6px 6px; margin-bottom: 8px; }
.ef-fixbox-t { font-weight: 600; color: #7a5200; }
.ef-fixbox .ef-mini-list td { border-bottom-color: #f3e3b5; }
.ef-tag-fix { font-size: 11px; padding: 0 5px; background: #ffd54a; color: #5c3d00; font-weight: 600; white-space: nowrap; }
