/* soniafattura.it — vista DENSA e TABELLARE (fondatore, 19/09/2026: «serve una UI densa per contabilità,
   non da CFO come la nostra nativa, ma densa e tabellare»). Si applica solo con body.sf: stesso prodotto,
   stesse pagine, meno aria. Tema sempre chiaro. Nessun colore letterale fuori dai token qui sotto. */
:root, :root[data-theme="dark"], :root:not([data-theme="light"]) {
  --bg:#ffffff; --surface:#ffffff; --card:#ffffff; --line:#d6d0cc; --ink:#1e1e22; --smoke:#5a5660;
  --cipria-soft:#f4efec; --accent:#C2867F; --accent-deep:#A85E56; --srv-primaria:#A85E56;
  --ent-shadow:none; --serif:Inter,system-ui,sans-serif; --sf-zebra:#faf8f6; --sf-head:#f1ecea; --sf-sel:#fbeeea;
  color-scheme:light;
}
body.sf{background:var(--bg);color:var(--ink);font-family:Inter,system-ui,sans-serif;font-size:13px;line-height:1.35}
body.sf h1,body.sf h2,body.sf h3,body.sf h4{font-family:Inter,system-ui,sans-serif;letter-spacing:0}
body.sf h1{font-size:18px;margin:6px 0 8px}body.sf h2{font-size:15px;margin:6px 0 6px}body.sf h3{font-size:13.5px;margin:4px 0}
body.sf p{margin:4px 0}
body.sf small,body.sf .muted,body.sf .smoke{font-size:12px}

/* schede: contenitori piatti, bordo 1px, nessun raggio, nessuna ombra */
body.sf .card,body.sf .ent-card,body.sf .sa-card,body.sf .stz-card,body.sf .lnd-card,body.sf .asd-card,body.sf .bk-card,body.sf .kb-col,body.sf .pipe-col{
  border-radius:0!important;box-shadow:none!important;padding:8px 10px!important;border:1px solid var(--line)!important;border-top:2px solid var(--accent-deep)!important;margin-bottom:8px}
body.sf .ha{border-radius:0;box-shadow:none;padding:6px 9px;gap:1px}
body.sf .ha b{font-size:13px}body.sf .ha small{font-size:11.5px}

/* tabelle: la casa della contabilità */
body.sf table{border-collapse:collapse;width:100%;font-size:12.5px;font-variant-numeric:tabular-nums}
body.sf th{background:var(--sf-head);color:var(--smoke);font-size:11px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;text-align:left;padding:5px 7px;border:1px solid var(--line);white-space:nowrap;position:sticky;top:0;z-index:1}
body.sf td{padding:4px 7px;border:1px solid var(--line);vertical-align:middle;line-height:1.3}
body.sf tbody tr:nth-child(even) td{background:var(--sf-zebra)}
body.sf tbody tr:hover td{background:var(--sf-sel)}
body.sf td.n,body.sf th.n,body.sf td[data-num],body.sf td[style*="text-align:right"]{text-align:right}
body.sf td a{text-decoration:none;color:var(--accent-deep);font-weight:600}
body.sf .erp-row{padding:5px 0;font-size:13px;border-top:1px solid var(--line)}
body.sf .erp-row:first-child{border-top:0}

/* moduli: campi bassi, angoli squadrati, etichette piccole */
body.sf .kinp,body.sf input:not([type=checkbox]):not([type=radio]):not([type=file]),body.sf select,body.sf textarea{
  border-radius:2px!important;padding:4px 7px!important;font-size:13px!important;min-height:0!important;line-height:1.3!important;border:1px solid var(--line)!important;background:#fff!important;color:var(--ink)!important}
body.sf textarea{padding:6px 7px!important}
body.sf .klbl,body.sf label{font-size:11px;font-weight:700;color:var(--smoke);margin:0 0 2px;text-transform:uppercase;letter-spacing:.03em}
body.sf button,body.sf .btn,body.sf .asd-btn,body.sf .sp-btn,body.sf .bk-btn,body.sf a.btn{border-radius:2px!important;padding:5px 10px!important;font-size:12.5px!important;font-weight:600!important;min-height:0!important;line-height:1.3!important}
body.sf .tabs{gap:0;margin:0 0 6px}
body.sf .tab{border-radius:0;padding:5px 10px;font-size:12.5px;border:1px solid transparent;border-bottom:0}
body.sf .tab.on,body.sf .tab[aria-current]{border-color:var(--line);background:var(--sf-head)}

/* KPI: numeri grandi ridotti a riga di sintesi */
body.sf .ent-kpi,body.sf .kpi-btn,body.sf .asd-kpi{border-radius:0!important;padding:6px 10px!important;box-shadow:none!important}
body.sf .ent-kpi b,body.sf .kpi-btn b,body.sf .asd-kpi b{font-size:18px!important}
body.sf .dk-tit{font-size:10.5px;margin-bottom:5px}
body.sf .dk-sez{margin-top:8px;padding-top:6px}

/* colonna di navigazione compatta */
body.sf nav a,body.sf .navc a,body.sf .nav-voce{padding:3px 10px!important;font-size:12.5px!important;border-radius:0!important;line-height:1.5!important}
body.sf .navc-n{font-size:10px}
body.sf .nav-gruppo,body.sf .navc-grp{margin:4px 0 2px!important;font-size:10.5px!important}

/* fumetto SonIA: resta, ma piccolo */
body.sf #soniaFab{padding:8px 12px;font-size:12.5px;border-radius:4px;box-shadow:none;border:1px solid var(--accent-deep)}
body.sf #soniaPanel{border-radius:4px}

/* la firma della scheda nella vista densa e' gia' il bordo alto: niente doppio bordo */
body.sf .card.kb-card{border-top:1px solid var(--line)!important}
@media print{body.sf th{position:static}}

/* 19/09 (dal primo sguardo del fondatore): KPI e azioni rapide diventano righe compatte, la tabella sale */
body.sf .ent-kpi-row{display:flex;flex-wrap:wrap;gap:4px;margin:4px 0 6px}
body.sf .ent-kpi{flex:1 1 170px;flex-direction:row!important;align-items:baseline!important;justify-content:flex-start!important;gap:6px;padding:3px 8px!important;text-align:left!important;border-top:1px solid var(--line)!important}
body.sf .ent-kpi .k-val{font-size:13.5px!important;font-family:Inter,system-ui,sans-serif}
body.sf .ent-kpi .k-lbl{font-size:10.5px;margin:0;white-space:nowrap}
body.sf .ent-kpi .k-delta{display:none!important}
body.sf .ent-kpi .k-arr{font-size:9px;color:var(--smoke)}
body.sf .hero-actions{display:flex;flex-wrap:wrap;gap:4px;margin:4px 0 2px}
body.sf .ha{flex-direction:row;align-items:center;gap:6px;padding:3px 9px!important;border-top:1px solid var(--line)!important}
body.sf .ha small{display:none}
body.sf .ha .hic svg{width:13px;height:13px}
body.sf .ent-shell{padding-top:0}
body.sf .tabs{border-bottom:1px solid var(--line)}
body.sf .tabs .tab{letter-spacing:0!important;text-transform:none!important;font-size:12.5px!important;padding:4px 9px!important}
body.sf .ent-table-wrap{border-radius:0;box-shadow:none;border:0}
body.sf .ent-table th,body.sf .ent-table td{padding:3px 7px!important}
body.sf .kpi-dd{border-radius:0;padding:6px 8px}
body.sf .ent-eyebrow,body.sf .eyebrow{font-size:10px!important;margin:0!important}
body.sf .k-val,body.sf .num{font-variant-numeric:tabular-nums}

/* 19/09 v3: testata a sinistra e bassa, KPI su una riga senza a capo, tab di area in minuscolo */
body.sf .ask-wrap{padding:6px 0 0!important;text-align:left!important;max-width:none!important}
body.sf .eyebrow{font-size:10px!important;letter-spacing:.06em}
body.sf .ask-title{font-size:16px!important;margin:2px 0 0!important;font-family:Inter,system-ui,sans-serif!important}
body.sf .ask-sub{font-size:12px!important;margin:0 0 6px!important;max-width:none!important}
body.sf .ent-kpi{flex:0 1 auto}
body.sf .ent-kpi .k-val{white-space:nowrap}
body.sf .tabs{gap:2px}
body.sf .tabs a,body.sf .tabs .tab{text-transform:none!important;letter-spacing:0!important;font-size:12.5px!important;padding:4px 9px!important;border-radius:0!important}
body.sf .ent-shell .card[role=status]{padding:5px 8px!important;margin-bottom:6px!important;font-size:12.5px}
body.sf details summary{font-size:12.5px;padding:3px 0}

/* 19/09 passo 2: la barra alta senza la piazza (ricerca persone, messaggi, tema); resta «Chiedi a SonIA» */
body.sf form.search{display:none!important}
body.sf a.topnav-bell[href="/messaggi"],body.sf .theme-toggle{display:none!important}
body.sf .toolrail a[href="/feed"],body.sf .toolrail a[href="/chat"],body.sf .toolrail a[href="/messaggi"]{display:none!important}

/* 19/09: il tasto del ritorno, sempre in alto */
body.sf .sf-home{display:inline-flex;align-items:center;gap:6px;margin-left:10px;padding:5px 10px!important;border:1px solid var(--accent-deep);border-radius:2px;color:var(--accent-deep);font-weight:700;font-size:12.5px;text-decoration:none;white-space:nowrap}
body.sf .sf-home:hover,body.sf .sf-home.on{background:var(--accent-deep);color:#fff}

/* 19/09 (regola del fondatore): gli elenchi lunghi scorrono nella loro finestra, le colonne restano ordinabili */
body.sf .sf-scad-in .ent-table-wrap{max-height:420px;overflow:auto;border:1px solid var(--line)}
body.sf .sf-scad-in .ent-table-wrap table{min-width:0}
body.sf .sf-scad-in th{position:sticky;top:0;z-index:2;background:var(--sf-head)}
body.sf .sf-scad-in th.srt{cursor:pointer}
body.sf .sf-scad-in th[data-dir="asc"]::after{content:" ▲";font-size:9px}body.sf .sf-scad-in th[data-dir="desc"]::after{content:" ▼";font-size:9px}
body.sf .cr-due>div{max-height:360px;overflow:auto}
/* nella vista soniafattura il Cantiere (proponi/modifica funzione) non si mostra: restano «Chiedi a SonIA» e l import */
/* 06/10 fondatore: il Cantiere lo hanno TUTTI gli account, anche nella veste Fattura: il tasto resta visibile */
body.sf #cantiereBox{bottom:24px!important}

/* 19/09: la colonna di soniafattura, pulita, gruppi chiusi che si aprono al clic */
body.sf .toolrail{width:236px}
body.sf .sfc{padding:6px 0 30px;font-size:13.5px}
body.sf .sfc-v{display:flex;align-items:center;gap:10px;padding:9px 14px!important;color:var(--ink);text-decoration:none;cursor:pointer;list-style:none;border-radius:0!important;font-size:13.5px!important;line-height:1.3!important;position:relative}
body.sf .sfc-v::-webkit-details-marker{display:none}
body.sf .sfc-v svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;color:var(--smoke);flex:none}
body.sf .sfc-v:hover{background:var(--sf-zebra)}
body.sf a.sfc-v.on{background:var(--accent-deep);color:#fff}body.sf a.sfc-v.on svg{color:#fff}
body.sf .sfc-fr{margin-left:auto;width:7px;height:7px;border-right:1.5px solid var(--smoke);border-bottom:1.5px solid var(--smoke);transform:rotate(-45deg);transition:transform .15s}
body.sf details[open]>.sfc-v .sfc-fr{transform:rotate(45deg)}
body.sf details[open]>.sfc-v{font-weight:700}
body.sf .sfc-f{display:flex;flex-direction:column;padding:2px 0 6px}
body.sf .sfc-f a{padding:6px 14px 6px 41px!important;color:var(--ink);text-decoration:none;font-size:13px!important;border-radius:0!important;line-height:1.3!important}
body.sf .sfc-f a:hover{background:var(--sf-zebra)}
body.sf .sfc-f a.on{color:var(--accent-deep);font-weight:700;background:var(--sf-sel)}
body.sf .toolrail>*:not(.sfc):not(.tr-pin):not(.tr-open){display:none!important}

body.sf .sfc{padding-top:8px}

/* 19/09 (fondatore: «manca il tasto esci»): Esci in fondo alla colonna e in alto accanto all avatar */
body.sf .sfc-esci{margin-top:14px;border-top:1px solid var(--line);color:var(--smoke)}
body.sf .sfc-esci:hover{color:var(--accent-deep)}
body.sf .sf-esci-top{display:inline-flex;align-items:center;gap:6px;margin-left:6px;padding:5px 10px!important;border:1px solid var(--line);border-radius:2px;color:var(--smoke);font-weight:600;font-size:12.5px;text-decoration:none;white-space:nowrap}
body.sf .sf-esci-top:hover{border-color:var(--accent-deep);color:var(--accent-deep)}

/* 19/09 (fondatore: «ordina tasti e funzioni in alto»): stessa altezza, stessa forma, stesso carattere per tutta la barra */
body.sf .sf-home,body.sf .sf-esci-top,body.sf .ask-cta,body.sf .topnav-link.tools-btn{height:34px!important;display:inline-flex!important;align-items:center!important;gap:7px!important;padding:0 13px!important;border-radius:3px!important;font:600 13px Inter,system-ui,sans-serif!important;line-height:1!important;box-shadow:none!important;margin:0!important;white-space:nowrap}
body.sf .ask-cta{background:var(--accent-deep)!important;color:#fff!important;border:1px solid var(--accent-deep)!important;margin-left:6px!important}
body.sf .ask-cta svg{width:15px;height:15px}
body.sf .sf-home{border:1px solid var(--accent-deep)!important;color:var(--accent-deep)!important;background:#fff!important;margin-left:10px!important}
body.sf .sf-home.on,body.sf .sf-home:hover{background:var(--accent-deep)!important;color:#fff!important}
body.sf .topnav-link.tools-btn{border:1px solid var(--line)!important;color:var(--ink)!important;background:#fff!important;margin-left:6px!important}
body.sf .topnav-link.tools-btn:hover,body.sf .topnav-link.tools-btn.on{border-color:var(--accent-deep)!important;color:var(--accent-deep)!important}
body.sf .sf-esci-top{border:1px solid var(--line)!important;color:var(--smoke)!important;background:#fff!important;margin-right:6px!important}
body.sf .sf-esci-top:hover{border-color:var(--accent-deep)!important;color:var(--accent-deep)!important}
body.sf .topnav-bell{width:34px;height:34px;border-radius:3px}
body.sf .topnav-right{gap:4px}

/* 19/09 (fondatore: «sistema queste colonne, lo spazio c e»): celle su una riga, colonne larghe quanto il contenuto,
   la colonna dei tasti a destra compatta; se non ci sta, scorre in orizzontale il riquadro, non la pagina */
body.sf .ent-table-wrap{overflow-x:auto}
body.sf table.ent-table{min-width:0;width:100%;table-layout:auto}
body.sf .ent-table th,body.sf .ent-table td{white-space:nowrap;vertical-align:middle}
body.sf .ent-table td.doc{font-size:12.5px}
body.sf .ent-table td .ent-badge,body.sf .ent-table td .badge{white-space:nowrap}
body.sf .ent-table td.ent-azioni,body.sf .ent-table th.ent-azioni{text-align:right;width:1%}
body.sf .ent-table td.ent-azioni .btn,body.sf .ent-table td.ent-azioni a.btn,body.sf .ent-table td.ent-azioni button{display:inline-flex;align-items:center;height:26px;padding:0 9px!important;margin:0 0 0 4px;font-size:12px!important;vertical-align:middle}
body.sf .ent-table td a{border-bottom:0}
body.sf .ent-table td:first-child{font-variant-numeric:tabular-nums}
/* colonne testuali lunghe (descrizioni, note) restano leggibili: a capo con un tetto */
body.sf .ent-table td.desc,body.sf .ent-table td.descr,body.sf .ent-table td.note,body.sf .ent-table td.pobz-cont{white-space:normal;max-width:38ch}

/* 19/09 (fondatore, da iPhone: «scorre fuori dallo schermo»): Safari ingrandisce la pagina sui campi sotto i 16 px e non torna
   indietro. Sul telefono i campi sono 16 px e la pagina non scorre in orizzontale. */
@media(max-width:768px){
  body.sf{overflow-x:hidden;max-width:100vw}
  body.sf input:not([type=checkbox]):not([type=radio]):not([type=file]),body.sf select,body.sf textarea,body.sf .kinp{font-size:16px!important}
  body.sf .ent-table-wrap,body.sf .sf-scad-in .ent-table-wrap,body.sf .cr-due>div{max-width:100vw;overflow-x:auto}
}

/* 19/09 (fondatore, da iPhone: nomi lunghi sopra la colonna accanto): ogni cella ha un tetto e i puntini, mai sovrapposizioni */
body.sf .ent-table td{max-width:36ch;overflow:hidden;text-overflow:ellipsis}
body.sf .ent-table td.ent-ell,body.sf .ent-table td.strong{max-width:30ch}
body.sf .ent-table td.num,body.sf .ent-table td.mono,body.sf .ent-table td.ent-azioni{max-width:none;overflow:visible}
@media(max-width:768px){body.sf .ent-table td{max-width:24ch}body.sf .ent-table td.ent-ell,body.sf .ent-table td.strong{max-width:22ch}}

/* 19/09 (fondatore, da iPhone: «migliora la barra on-top»): una riga sola, icone al posto delle parole, Esci sta nel menu */
@media(max-width:768px){
  body.sf .sf-esci-top,body.sf .topnav-bell.navk-open{display:none!important}
  body.sf .sf-home,body.sf .ask-cta{font-size:0!important;width:38px!important;height:38px!important;padding:0!important;justify-content:center!important;gap:0!important;margin:0 0 0 6px!important;border-radius:3px!important}
  body.sf .sf-home svg,body.sf .ask-cta svg{width:18px!important;height:18px!important;margin:0!important}
  body.sf .topnav-bell{width:38px;height:38px}
  body.sf .topbar,body.sf .topnav-right{gap:4px!important}
  body.sf .topbar .ask-cta{flex:0 0 auto!important;order:0!important}
  body.sf .logo{margin-right:auto}
}

/* 19/09: il menu del telefono e la colonna di soniafattura */
body.sf .mnav-body .sfc{padding:4px 0 12px}
body.sf .mnav-body .sfc-v{padding:11px 10px!important;font-size:15px!important}
body.sf .mnav-body .sfc-f a{padding:9px 10px 9px 40px!important;font-size:14.5px!important}
body.sf .mnav-foot .mnav-theme{display:none}

/* 19/09 (fondatore, consiglio di Fabio Sartini: spunti da NetSuite): stessa densita', pelle piu' moderna.
   Barra alta scura con icone chiare; pagina grigio caldo; pannelli bianchi con raggio 6 e ombra leggera;
   titoli di sezione sottili con puntino; tabelle a righe fine; bottoni piatti. */
body.sf{background:#F1EEEC!important}
/* 27/10 (fondatore: il nome dell'azienda nero sul verde di SonIA Ambiente): la barra scura dichiara il colore dei suoi testi; i comandi
   della testata (cambio d'azienda, lingua) li leggono con un ripiego per le barre chiare. Contrasto AA: regola m del cancello d'impaginazione. */
body.sf .topbar{--barra-testo:#F4EFE9;--barra-bordo:rgba(255,255,255,.45);--barra-bordo-vivo:#fff;--barra-hover:rgba(255,255,255,.12);--barra-fuoco:#fff;--barra-opacita:1}
body.sf .topbar{background:#23222a!important;border-bottom:0!important;box-shadow:0 1px 0 rgba(255,255,255,.06),0 6px 20px rgba(30,30,34,.18)!important;height:56px!important}
body.sf .topbar .row{height:56px!important;padding:0 18px!important}
body.sf .topbar .logo,body.sf .topbar .logo-txt{color:#fff!important;font-size:22px!important}
body.sf .topbar .logo-txt span{color:var(--accent)!important}
/* 17/11 RIPARAZIONI DELLA FABBRICA (fondatore: a 390 px nel tema scuro il logo era un rettangolo bianco): logo_sonia.png e' OPACO,
   il filtro brightness(0) invert(1) lo rendeva tutto bianco. Nella barra scura delle pagine sf resta la scritta del marchio
   (bianca, IA nel colore della veste) finche' non arriva il logo trasparente. Regola o_logo_vuoto del cancello d'impaginazione. */
body.sf .topbar .logo-official{display:none!important}
html[data-theme="dark"] body.sf .topbar .logo .logo-txt{display:inline!important}
body.sf .sf-home{border-color:rgba(255,255,255,.25)!important;color:#fff!important;background:rgba(255,255,255,.06)!important}
body.sf .sf-home.on,body.sf .sf-home:hover{background:var(--accent-deep)!important;border-color:var(--accent-deep)!important}
body.sf .ask-cta{background:var(--accent-deep)!important;border-color:var(--accent-deep)!important}
body.sf .topnav-link.tools-btn{background:transparent!important;border-color:rgba(255,255,255,.18)!important;color:#e9e4e1!important}
body.sf .topnav-link.tools-btn:hover,body.sf .topnav-link.tools-btn.on{border-color:var(--accent)!important;color:#fff!important}
body.sf .sf-esci-top{background:transparent!important;border-color:rgba(255,255,255,.18)!important;color:#c9c2bd!important}
body.sf .sf-esci-top:hover{color:#fff!important;border-color:var(--accent)!important}
body.sf .topnav-bell,body.sf .topnav-bell svg{color:#e9e4e1!important}
body.sf .topnav-bell:hover{background:rgba(255,255,255,.08)}
body.sf .topbar .avatar{border-radius:6px!important;box-shadow:0 0 0 2px rgba(255,255,255,.15)}
body.sf .topbar .search input{background:rgba(255,255,255,.08);color:#fff;border-color:transparent}
body.sf .mnav-burger{color:#fff}
body.sf .toolrail{top:56px!important;padding-top:10px!important;background:#fff!important;border-right:1px solid #e3ddd9!important}
body.sf .ent-shell,body.sf .cr,body.sf main.container{padding-top:10px}
/* pannelli */
body.sf .card,body.sf .ent-card,body.sf .sa-card,body.sf .stz-card,body.sf .asd-card,body.sf .bk-card,body.sf .cr-sez,body.sf .ent-kpi,body.sf .ha,body.sf .ent-toolbar,body.sf .kpi-dd{
  border-radius:6px!important;border:1px solid #e3ddd9!important;border-top:1px solid #e3ddd9!important;box-shadow:0 1px 2px rgba(30,30,34,.05),0 6px 18px rgba(30,30,34,.05)!important;background:#fff}
body.sf .cr-sez>h2{background:#fff;border-bottom:1px solid #ECE6E2;color:var(--ink);letter-spacing:.02em;font-size:12.5px;text-transform:none;padding:9px 12px;border-radius:6px 6px 0 0}
body.sf .cr-sez>h2::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--accent-deep);margin-right:9px;vertical-align:1px}
body.sf .cr-sez>h2 a{color:var(--accent-deep)}
body.sf .cr-kpi a{border-color:#ECE6E2}
body.sf .cr-kpi .v{letter-spacing:-.01em}
body.sf .sec-title,body.sf .t-title{font-size:13px!important;letter-spacing:.01em}
/* tabelle: intestazione chiara, righe fine, hover morbido */
body.sf th,body.sf .ent-table th{background:#FAF8F7!important;color:#6E6A70!important;border-color:#ECE6E2!important;font-size:10.5px!important;letter-spacing:.05em}
body.sf td,body.sf .ent-table td{border-color:#EFEAE7!important;border-left:0!important;border-right:0!important}
body.sf tbody tr:nth-child(even) td{background:#FCFBFA}
body.sf tbody tr:hover td{background:#FBF1EE}
body.sf .ent-table-wrap{border:1px solid #ECE6E2;border-radius:6px;overflow:hidden}
body.sf .ent-table-wrap.mag-scroll{overflow:auto}   /* 20/09: la finestra scorre anche nella veste */
/* bottoni piatti, un solo accento */
body.sf .btn,body.sf button.btn,body.sf .asd-btn,body.sf .bk-btn{border-radius:4px!important;border:1px solid #d9d4d0!important;background:#fff!important;color:var(--ink)!important;box-shadow:none!important}
body.sf .btn.btn-primary,body.sf .btn-primary,body.sf .asd-btn.p,body.sf .sf-btn.p{background:var(--accent-deep)!important;border-color:var(--accent-deep)!important;color:#fff!important}
body.sf .btn:hover,body.sf .asd-btn:hover{border-color:var(--accent-deep)!important}
/* colonna */
body.sf .sfc-v{border-radius:4px!important;margin:1px 8px}
body.sf a.sfc-v.on{background:#FBF1EE!important;color:var(--accent-deep)!important;font-weight:700}
body.sf a.sfc-v.on svg{color:var(--accent-deep)!important}
body.sf details[open]>.sfc-v{background:#FAF8F7}
body.sf .sfc-f a.on{border-left:3px solid var(--accent-deep);padding-left:38px!important}
@media(max-width:768px){body.sf .topbar,body.sf .topbar .row{height:auto!important;min-height:52px}body.sf .toolrail{top:0!important}}
/* 28/10 cancello impaginazione (tablet 820 px): fra 769 e 1199 px la barra va su due righe; con l altezza fissa di 56 px la seconda riga
   (cambio azienda, lingua, Esci) usciva dalla barra e si sovrapponeva ai tasti della pagina (52 voci nel debito, regola f) */
@media(min-width:769px) and (max-width:1199px){body.sf .topbar,body.sf .topbar .row{height:auto!important;min-height:56px}}

body.sf .cr-sez>h2{justify-content:flex-start}body.sf .cr-sez>h2 a{margin-left:auto}

/* 19/09 (fondatore): comandi della barra alta allineati a destra; il logo sta in testa alla colonna, centrato */
body.sf .topbar .row{justify-content:flex-end!important}
body.sf .topbar .logo{display:none!important}
body.sf .topbar .topnav-right{margin-left:0!important}
body.sf .sfc-logo{display:block;text-align:center;font:800 24px/1 'Playfair Display',Georgia,serif;color:var(--ink);text-decoration:none;padding:14px 10px 12px;margin:0 8px 6px;border-bottom:1px solid var(--line);letter-spacing:-.01em}
body.sf .sfc-logo span{color:var(--accent-deep)}
body.sf .sfc-logo small{display:block;font:600 11px Inter,system-ui,sans-serif;letter-spacing:.14em;text-transform:uppercase;color:var(--smoke);margin-top:5px}
body.sf .mnav-body .sfc-logo{display:none}
body.sf .toolrail{padding-top:0!important}
@media(max-width:768px){body.sf .topbar .logo{display:inline-flex!important}body.sf .topbar .row{justify-content:space-between!important}}

body.sf nav.sfc a.sfc-logo{font-size:24px!important;line-height:1!important;padding:14px 10px 12px!important;border-radius:0!important;display:block!important}
body.sf nav.sfc a.sfc-logo small{font-size:11px!important;line-height:1!important}

/* 19/09 (fondatore): si vede sempre dove si e'; Indietro sempre in barra */
body.sf .sf-back{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 12px 0 8px;border:1px solid rgba(255,255,255,.18);border-radius:3px;background:transparent;color:#e9e4e1;font:600 13px Inter,system-ui,sans-serif;cursor:pointer;margin-right:2px}
body.sf .sf-back:hover{border-color:var(--accent);color:#fff}
body.sf a.sfc-v.on,body.sf .sfc-f a.on{background:#F6E3DE!important;color:var(--accent-deep)!important;font-weight:700}
body.sf a.sfc-v.on svg{color:var(--accent-deep)!important}
body.sf details[open]>.sfc-v{background:#FBF1EE}
@media(max-width:768px){body.sf .sf-back span{display:none}body.sf .sf-back{width:38px;padding:0;justify-content:center}}

/* 19/09 (fondatore): una sola mappa, la colonna; le tendine Business/Setting di asksonia non si mostrano nella vista */
body.sf .topnav .topnav-link.tools-btn,body.sf .topnav .av-menu.tools-menu,body.sf nav.topnav{display:none!important}

/* 19/09 sera: dentro la veste niente cantiere (banner bussola) e niente scheda Moduli; nell app le aree scorrono su una riga */
body.sf .bussola-strip{display:none!important}
body.sf a.tab[href="/erp?tab=moduli"]{display:none!important}
@media(max-width:768px){body.sf .erp-aree{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch}body.sf .erp-area{white-space:nowrap;padding:8px 10px}}

/* 19/09 sera (fondatore, dall app iPhone: «sembra una pagina adattata dal web»): su telefono la pagina /erp si compone come
   un app — testata bassa, azioni in griglia 2x2 con tasti uguali, KPI in schede 2 colonne con etichetta sopra e valore sotto,
   aree e schede come segmenti che scorrono, barra dell elenco ordinata: titolo, ricerca larga, due filtri affiancati, Nuovo largo. */
@media(max-width:768px){
  body.sf .sf-web-solo{display:none!important}
  body.sf .ask-wrap{padding:8px 12px 0!important}
  body.sf .ask-wrap .eyebrow{display:none!important}
  body.sf .ask-title{font-size:20px!important;font-weight:800!important;letter-spacing:-.01em;margin:0!important}
  body.sf .ask-sub{font-size:13px!important;margin:2px 0 8px!important}
  body.sf .hero-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 10px!important}
  body.sf .ha{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:9px;min-height:48px;padding:0 12px!important;background:#fff;border:1px solid var(--line)!important;border-radius:12px!important;font-size:14px;box-shadow:0 1px 2px rgba(30,30,34,.05)}
  body.sf .ha .hic{width:30px;height:30px;border-radius:9px;background:var(--sf-sel,#f4e6e3);display:inline-flex;align-items:center;justify-content:center;flex:none}
  body.sf .ha .hic svg{width:16px!important;height:16px!important}
  body.sf .ha b{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.sf .ha[data-testid="identity-alert"]{grid-column:1/-1}
  body.sf .ent-kpi-row{display:grid!important;grid-template-columns:1fr 1fr;gap:8px;margin:0 0 10px!important}
  body.sf .ent-kpi{flex:1 1 auto!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;gap:2px;padding:10px 12px!important;border-radius:12px!important;background:#fff;min-height:60px;box-shadow:0 1px 2px rgba(30,30,34,.05)}
  body.sf .ent-kpi .k-lbl{order:-1;font-size:10.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--smoke);white-space:normal}
  body.sf .ent-kpi .k-val{font-size:17px!important;font-weight:800!important}
  body.sf .ent-kpi .k-arr{display:none}
  body.sf .erp-nav{margin:0!important}
  body.sf .erp-aree{display:flex;gap:6px;border:0!important;padding:2px 0 8px;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none}
  body.sf .erp-aree::-webkit-scrollbar{display:none}
  body.sf .erp-area{border:1px solid var(--line)!important;border-radius:999px!important;padding:7px 13px!important;font-size:12.5px!important;font-weight:600!important;text-transform:none!important;letter-spacing:0!important;background:#fff;color:var(--ink)!important;margin:0!important;white-space:nowrap}
  body.sf .erp-area.on{background:var(--accent-deep)!important;color:#fff!important;border-color:var(--accent-deep)!important}
  body.sf .erp-tabs{display:flex;gap:4px;overflow-x:auto;flex-wrap:nowrap!important;padding:0 0 8px!important;scrollbar-width:none}
  body.sf .erp-tabs::-webkit-scrollbar{display:none}
  body.sf .erp-tabs .tab{white-space:nowrap;border-radius:8px!important;padding:7px 11px!important;font-size:13px!important;border:0!important}
  body.sf .erp-tabs .tab.on{background:var(--sf-sel,#f4e6e3);font-weight:700;color:var(--accent-deep)}
  body.sf .ent-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;align-items:stretch;margin:4px 0 8px!important}
  body.sf .ent-toolbar>*{min-width:0}
  body.sf .ent-toolbar .t-title{grid-column:1/-1;order:0;margin:2px 0 0!important;font-size:16px!important;font-family:Inter,system-ui,sans-serif!important}
  body.sf .ent-toolbar .t-search{grid-column:1/-1;order:1}
  body.sf .ent-toolbar .t-search input{width:100%;min-width:0;border-radius:10px;padding:11px 12px 11px 34px}
  body.sf .ent-toolbar select.t-filter{order:2;width:100%;border-radius:10px;padding:10px 12px;border:1px solid var(--line);background:#fff;min-height:44px}
  body.sf .ent-toolbar a.btn:not(.btn-primary){order:2!important}
  body.sf .ent-toolbar .btn{margin:0!important;border-radius:10px!important;min-height:44px;display:inline-flex;align-items:center;justify-content:center;width:100%;font-size:13.5px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.sf .ent-toolbar .btn.btn-primary{grid-column:1/-1;order:3!important}
  body.sf .ent-toolbar form{grid-column:1/-1;order:4}
}

/* 19/09 sera (fondatore: «tutta l app, ogni pagina: griglie regolari, tasti uguali, filtri ordinati»): regole di sistema su telefono.
   I gruppi di tasti li riconosce sf_mobile.js (classe sf-griglia); campi e schede seguono la misura da app (44px, raggio 10-12). */
@media(max-width:768px){
  body.sf .sf-griglia{display:grid!important;grid-template-columns:1fr 1fr;gap:8px!important;align-items:stretch}
  body.sf .sf-griglia>*{width:100%!important;margin:0!important;min-width:0}
  body.sf .sf-griglia>form{display:flex}body.sf .sf-griglia>form>.btn,body.sf .sf-griglia>form>button{flex:1}
  body.sf .sf-griglia .btn,body.sf .sf-griglia button{min-height:44px;display:inline-flex!important;align-items:center;justify-content:center;border-radius:10px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13.5px!important;padding:0 10px!important}
  body.sf .sf-griglia>.sf-largo,body.sf .sf-griglia>.btn-primary:last-child{grid-column:1/-1}
  body.sf .ent-shell .kinp,body.sf .ent-shell input[type=text],body.sf .ent-shell input[type=search],body.sf .ent-shell input[type=email],body.sf .ent-shell input[type=number],body.sf .ent-shell input[type=date],body.sf .ent-shell select,body.sf main .kinp,body.sf main select{width:100%;min-height:44px;border-radius:10px;box-sizing:border-box}
  body.sf .ent-shell .card,body.sf .ent-shell .ent-card,body.sf main .card{border-radius:12px!important}
  body.sf .ent-shell .klbl,body.sf main .klbl{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--smoke)}
  body.sf .ent-shell h1,body.sf main h1{font-size:20px!important}
  body.sf .ent-shell h2,body.sf main h2{font-size:16px!important}
}

/* 19/09 sera, seconda passata (36 pagine controllate al telefono): la testata «Fatture & contabilita'» con azioni e KPI si
   ripeteva su ogni scheda di /erp e occupava il primo schermo — al telefono resta solo il titolo, i numeri vivono nella
   Situazione. Nessuna pagina scorre in orizzontale: griglie e file in linea vanno a una colonna, le larghezze minime
   dichiarate in linea si azzerano, le immagini si adattano. */
@media(max-width:768px){
  body.sf .ask-wrap>.hero-actions,body.sf .ask-wrap>.ent-kpi-row,body.sf .ask-wrap>p.ask-sub,body.sf .ask-wrap>.q-anno{display:none!important}
  body.sf .ent-shell,body.sf main{max-width:100vw!important;overflow-x:hidden;box-sizing:border-box}
  body.sf .ent-shell [style*="grid-template-columns"]:not(.sf-griglia):not(.ent-kpi-row),body.sf main [style*="grid-template-columns"]:not(.sf-griglia){grid-template-columns:1fr!important}
  body.sf .ent-shell [style*="display:flex"]:not(.sf-griglia),body.sf main [style*="display:flex"]:not(.sf-griglia){flex-wrap:wrap!important}
  body.sf .ent-shell [style*="min-width"],body.sf main [style*="min-width"]{min-width:0!important}
  body.sf .ent-shell [style*="max-width"],body.sf main [style*="max-width"]{max-width:100%!important}
  body.sf .ent-shell img,body.sf main img{max-width:100%;height:auto}
  body.sf .ent-shell .card,body.sf main .card,body.sf .ent-shell .ent-card{max-width:100%;box-sizing:border-box}
  body.sf .dk-griglia,body.sf .bc-form,body.sf .pn-griglia,body.sf .gu-griglia{grid-template-columns:1fr!important}
  body.sf .bc-tab th,body.sf .bc-tab td{white-space:normal}
  body.sf .bc-top,body.sf .bc-az{flex-wrap:wrap}
  body.sf .ent-shell pre,body.sf main pre{white-space:pre-wrap;word-break:break-word}
  body.sf .ent-shell table:not(.ent-table):not(.bc-tab){display:block;max-width:100%;overflow-x:auto}
  /* 10/10 (simulazioni commercialista, telefono 390 px): anche le tabelle della Suite fuori da .ent-shell (F24, bilancio,
     cespiti, liquidazione) scorrono dentro se stesse invece di restare tagliate dal bordo della pagina */
  body.sf main table:not(.bc-tab),body.sf .wrap table:not(.bc-tab),body.sf .ask-wrap table:not(.bc-tab){display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  body.sf .wrap,body.sf main,body.sf .ask-wrap{overflow-wrap:anywhere}
  body.sf .wrap [style*="display:grid"]>*,body.sf main [style*="display:grid"]>*,body.sf .ask-wrap [style*="display:grid"]>*{min-width:0}
  body.sf .wrap .card,body.sf .ask-wrap .card{max-width:100%;box-sizing:border-box}
  body.sf .wrap [style*="nowrap"],body.sf .ask-wrap [style*="nowrap"],body.sf .ask-wrap .ent-badge,body.sf .wrap .ent-badge{white-space:normal!important}
}

/* 19/09 sera, terza passata: le griglie in linea fuori da .ent-shell (scheda Azienda), l imbuto del CRM, i tasti della
   cancellazione, la tabella dei conti collegati che diventa schede. */
@media(max-width:768px){
  body.sf [style*="grid-template-columns"]:not(.sf-griglia):not(.ent-kpi-row):not(.topbar *):not(.sfc *):not(.mnav *){grid-template-columns:1fr!important}
  body.sf [style*="display:flex"]:not(.sf-griglia):not(.topbar *):not(.topnav *):not(.sfc *):not(.mnav *):not(.sf-back):not(.sf-home){flex-wrap:wrap!important}
  body.sf [style*="min-width"]:not(.topbar *):not(.sfc *):not(.mnav *){min-width:0!important}
  /* residuo 1 (fondatore 19/09 sera): l imbuto del CRM su una riga sola, numero sopra e nome sotto, scorrevole */
  body.sf .funnel{flex-wrap:nowrap!important;gap:6px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:4px 0 8px}
  body.sf .funnel::-webkit-scrollbar{display:none}
  body.sf .fstep{flex:0 0 auto!important;min-width:0!important;flex-direction:column;align-items:flex-start;gap:2px;padding:8px 12px!important;border-radius:10px!important}
  body.sf .fstep b{font-size:16px;line-height:1}body.sf .fstep .fl{font-size:11px;white-space:nowrap}
  body.sf .farr{display:none!important}
  body.sf .ca-az{display:grid!important;grid-template-columns:1fr 1fr}body.sf .ca-az .btn{width:100%;min-height:44px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px!important;margin:0}
  body.sf .bc-tab thead{display:none}
  body.sf .bc-tab,body.sf .bc-tab tbody{display:block;width:100%}
  body.sf .bc-tab tr{display:grid;grid-template-columns:1fr 1fr;gap:4px 10px;padding:10px 0;border-bottom:1px solid var(--line)}
  body.sf .bc-tab td{border:0!important;padding:2px 0!important;white-space:normal}
  body.sf .bc-tab td.bc-az{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:6px}
  body.sf .bc-tab td.bc-az form{display:flex!important;flex-direction:column;gap:6px;margin:0}
  body.sf .bc-tab td.bc-az .btn{width:100%;min-height:44px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px!important}
}

/* 19/09 sera: dentro l app nativa niente porte agli inserimenti lunghi e alle schede fuori perimetro (il web le ha tutte) */
body.sf.app a[href="/erp/fattura/nuova"],body.sf.app a[href^="/erp/fattura/nuova?"],body.sf.app a.tab[href="/erp?tab=ddt"],body.sf.app a.tab[href="/erp?tab=listino"],body.sf.app a.tab[href="/erp?tab=ordforn"],body.sf.app a.tab[href="/erp?tab=fornitori"],body.sf.app a.erp-area[href="/erp?tab=fornitori"],body.sf.app a[href="/prepariamo"],body.sf.app a[href="/erp/contabilita/export-studio"],body.sf.app a[href="/erp/stampa/personalizza"],body.sf.app a[href="/regole"],body.sf.app a[href="/articoli"],body.sf.app a[href="/magazzino"],body.sf.app a[href="/banco"]{display:none!important}

/* 19/09 sera: nel menu del telefono Esci c e gia in fondo al cassetto: la voce della colonna non si ripete */
body.sf .mnav-body .sfc-esci{display:none!important}

/* 19/09 sera (fondatore, dal Controllo di gestione nell app: «troppi tasti, troppo caos»): nell app la striscia delle aree
   non esiste (si naviga dal menu e dalla barra in basso), il Cubo e le sue viste restano sul web, il ciclo di cassa va su
   due righe con i quattro numeri della stessa misura. */
body.sf.app .erp-nav,body.sf.app .sf-app-fuori,body.sf.app #cubo-chat{display:none!important}
@media(max-width:768px){
  body.sf [style*="flex:1;min-width:150px"]{flex:1 1 42%!important;min-width:42%!important;border-radius:12px!important}
  body.sf [style*="font-size:26px;color:var(--smoke);font-weight:300"]{display:none!important}
  body.sf .sec-title{font-size:15px!important}
}

/* residuo 3 (fondatore 19/09 sera): il Banco operativo entra nella veste — testata, schede e zona file senza uscire dal bordo */
body.sf .bk-drop{border-radius:4px!important;margin:8px 0!important;padding:12px!important}
body.sf [class^="bk-"],body.sf [class*=" bk-"]{max-width:100%;box-sizing:border-box}
@media(max-width:768px){body.sf [class*="bk-"][style*="display:flex"],body.sf .bk-head,body.sf .bk-tabs,body.sf .bk-top{flex-wrap:wrap!important;overflow-x:auto}body.sf [class*="bk-"]{min-width:0!important}}

/* residuo 2 (fondatore 19/09 sera), seconda stesura: schede PER TABELLA nell app — soggetto e importo sulla prima riga,
   numero/data/stato sulla seconda, azioni sulla terza; colonne di dettaglio nascoste. Le tabelle non elencate restano scorrevoli. */
@media(max-width:768px){
  body.sf.app #tbl-fatture,body.sf.app #tbl-cli,body.sf.app [data-testid="art-tabella"],body.sf.app .agn-tbl,body.sf.app #tbl-costi,body.sf.app #tbl-prev,body.sf.app #tbl-ord,body.sf.app #tbl-scad,body.sf.app #tbl-paga,body.sf.app #tbl-contatti{display:block;width:100%;min-width:0!important}
body.sf.app #tbl-fatture tbody,body.sf.app #tbl-cli tbody,body.sf.app [data-testid="art-tabella"] tbody,body.sf.app .agn-tbl tbody,body.sf.app #tbl-costi tbody,body.sf.app #tbl-prev tbody,body.sf.app #tbl-ord tbody,body.sf.app #tbl-scad tbody,body.sf.app #tbl-paga tbody,body.sf.app #tbl-contatti tbody{display:block}
body.sf.app #tbl-fatture thead,body.sf.app #tbl-fatture tfoot,body.sf.app #tbl-cli thead,body.sf.app #tbl-cli tfoot,body.sf.app [data-testid="art-tabella"] thead,body.sf.app [data-testid="art-tabella"] tfoot,body.sf.app .agn-tbl thead,body.sf.app .agn-tbl tfoot,body.sf.app #tbl-costi thead,body.sf.app #tbl-costi tfoot,body.sf.app #tbl-prev thead,body.sf.app #tbl-prev tfoot,body.sf.app #tbl-ord thead,body.sf.app #tbl-ord tfoot,body.sf.app #tbl-scad thead,body.sf.app #tbl-scad tfoot,body.sf.app #tbl-paga thead,body.sf.app #tbl-paga tfoot,body.sf.app #tbl-contatti thead,body.sf.app #tbl-contatti tfoot{display:none!important}
body.sf.app .ent-table-wrap:has(#tbl-fatture),body.sf.app .ent-table-wrap:has(#tbl-cli),body.sf.app .ent-table-wrap:has([data-testid="art-tabella"]),body.sf.app .ent-table-wrap:has(.agn-tbl),body.sf.app .ent-table-wrap:has(#tbl-costi),body.sf.app .ent-table-wrap:has(#tbl-prev),body.sf.app .ent-table-wrap:has(#tbl-ord),body.sf.app .ent-table-wrap:has(#tbl-scad),body.sf.app .ent-table-wrap:has(#tbl-paga),body.sf.app .ent-table-wrap:has(#tbl-contatti){border:0!important;overflow:visible!important;max-height:none!important}
body.sf.app #tbl-fatture tbody tr,body.sf.app #tbl-cli tbody tr,body.sf.app [data-testid="art-tabella"] tbody tr,body.sf.app .agn-tbl tbody tr,body.sf.app #tbl-costi tbody tr,body.sf.app #tbl-prev tbody tr,body.sf.app #tbl-ord tbody tr,body.sf.app #tbl-scad tbody tr,body.sf.app #tbl-paga tbody tr,body.sf.app #tbl-contatti tbody tr{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;padding:10px 12px;border-bottom:1px solid var(--line);background:#fff}
body.sf.app #tbl-fatture tbody tr::before,body.sf.app #tbl-cli tbody tr::before,body.sf.app [data-testid="art-tabella"] tbody tr::before,body.sf.app .agn-tbl tbody tr::before,body.sf.app #tbl-costi tbody tr::before,body.sf.app #tbl-prev tbody tr::before,body.sf.app #tbl-ord tbody tr::before,body.sf.app #tbl-scad tbody tr::before,body.sf.app #tbl-paga tbody tr::before,body.sf.app #tbl-contatti tbody tr::before{content:"";display:block;flex-basis:100%;height:0;order:3}
body.sf.app #tbl-fatture td,body.sf.app #tbl-cli td,body.sf.app [data-testid="art-tabella"] td,body.sf.app .agn-tbl td,body.sf.app #tbl-costi td,body.sf.app #tbl-prev td,body.sf.app #tbl-ord td,body.sf.app #tbl-scad td,body.sf.app #tbl-paga td,body.sf.app #tbl-contatti td{display:inline;border:0!important;padding:0!important;max-width:none!important;white-space:normal;font-size:12px;color:var(--smoke);order:4;background:transparent!important}
  body.sf.app #tbl-fatture td:nth-child(4){display:block;order:1;flex:1 1 55%;min-width:0;font-weight:700;font-size:14px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.sf.app #tbl-fatture td:nth-child(7){display:block;order:2;margin-left:auto;font-weight:700;font-size:14px;color:var(--ink);white-space:nowrap;text-align:right}
  body.sf.app #tbl-fatture td:nth-child(2)::after{content:" · ";color:var(--line)}
  body.sf.app #tbl-fatture td:nth-child(3)::after{content:" · ";color:var(--line)}
  body.sf.app #tbl-fatture td:nth-child(1){display:none!important}
  body.sf.app #tbl-fatture td:nth-child(5){display:none!important}
  body.sf.app #tbl-fatture td:nth-child(6){display:none!important}
  body.sf.app #tbl-fatture td:nth-child(9){display:none!important}
  body.sf.app #tbl-cli td:nth-child(1){display:block;order:1;flex:1 1 55%;min-width:0;font-weight:700;font-size:14px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.sf.app #tbl-cli td:nth-child(3){display:block;order:2;margin-left:auto;font-weight:700;font-size:14px;color:var(--ink);white-space:nowrap;text-align:right}
  body.sf.app #tbl-cli td:nth-child(2)::after{content:" · ";color:var(--line)}
  body.sf.app [data-testid="art-tabella"] td:nth-child(2){display:block;order:1;flex:1 1 55%;min-width:0;font-weight:700;font-size:14px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.sf.app [data-testid="art-tabella"] td:nth-child(6){display:block;order:2;margin-left:auto;font-weight:700;font-size:14px;color:var(--ink);white-space:nowrap;text-align:right}
  body.sf.app [data-testid="art-tabella"] td:nth-child(1)::after{content:" · ";color:var(--line)}
  body.sf.app [data-testid="art-tabella"] td:nth-child(3)::after{content:" · ";color:var(--line)}
  body.sf.app [data-testid="art-tabella"] td:nth-child(4){display:none!important}
  body.sf.app [data-testid="art-tabella"] td:nth-child(5){display:none!important}
  body.sf.app [data-testid="art-tabella"] td:nth-child(7){display:none!important}
  body.sf.app .agn-tbl td:nth-child(1){display:block;order:1;flex:1 1 55%;min-width:0;font-weight:700;font-size:14px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.sf.app .agn-tbl td:nth-child(7){display:block;order:2;margin-left:auto;font-weight:700;font-size:14px;color:var(--ink);white-space:nowrap;text-align:right}
  body.sf.app .agn-tbl td:nth-child(3)::after{content:" · ";color:var(--line)}
  body.sf.app .agn-tbl td:nth-child(4)::after{content:" · ";color:var(--line)}
  body.sf.app .agn-tbl td:nth-child(5)::after{content:" · ";color:var(--line)}
  body.sf.app .agn-tbl td:nth-child(2){display:none!important}
  body.sf.app #tbl-costi td:nth-child(1){display:block;order:1;flex:1 1 55%;min-width:0;font-weight:700;font-size:14px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.sf.app #tbl-costi td:nth-child(7){display:block;order:2;margin-left:auto;font-weight:700;font-size:14px;color:var(--ink);white-space:nowrap;text-align:right}
  body.sf.app #tbl-costi td:nth-child(2)::after{content:" · ";color:var(--line)}
  body.sf.app #tbl-costi td:nth-child(5)::after{content:" · ";color:var(--line)}
  body.sf.app #tbl-costi td:nth-child(3){display:none!important}
  body.sf.app #tbl-costi td:nth-child(4){display:none!important}
  body.sf.app #tbl-costi td:nth-child(6){display:none!important}
  body.sf.app #tbl-prev td:nth-child(3){display:block;order:1;flex:1 1 55%;min-width:0;font-weight:700;font-size:14px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.sf.app #tbl-prev td:nth-child(4){display:block;order:2;margin-left:auto;font-weight:700;font-size:14px;color:var(--ink);white-space:nowrap;text-align:right}
  body.sf.app #tbl-prev td:nth-child(1)::after{content:" · ";color:var(--line)}
  body.sf.app #tbl-prev td:nth-child(2)::after{content:" · ";color:var(--line)}
  body.sf.app #tbl-prev td:nth-child(7){display:flex;order:5;flex-basis:100%;gap:6px;justify-content:flex-end;margin-top:6px}
  body.sf.app #tbl-prev td:nth-child(7) .btn{min-height:36px;border-radius:8px!important}
  body.sf.app #tbl-prev td:nth-child(5){display:none!important}
  body.sf.app #tbl-ord td:nth-child(3){display:block;order:1;flex:1 1 55%;min-width:0;font-weight:700;font-size:14px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.sf.app #tbl-ord td:nth-child(4){display:block;order:2;margin-left:auto;font-weight:700;font-size:14px;color:var(--ink);white-space:nowrap;text-align:right}
  body.sf.app #tbl-ord td:nth-child(1)::after{content:" · ";color:var(--line)}
  body.sf.app #tbl-ord td:nth-child(2)::after{content:" · ";color:var(--line)}
  body.sf.app #tbl-ord td:nth-child(7){display:flex;order:5;flex-basis:100%;gap:6px;justify-content:flex-end;margin-top:6px}
  body.sf.app #tbl-ord td:nth-child(7) .btn{min-height:36px;border-radius:8px!important}
  body.sf.app #tbl-ord td:nth-child(5){display:none!important}
  body.sf.app #tbl-scad td:nth-child(1){display:block;order:1;flex:1 1 55%;min-width:0;font-weight:700;font-size:14px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.sf.app #tbl-scad td:nth-child(4){display:block;order:2;margin-left:auto;font-weight:700;font-size:14px;color:var(--ink);white-space:nowrap;text-align:right}
  body.sf.app #tbl-scad td:nth-child(2)::after{content:" · ";color:var(--line)}
  body.sf.app #tbl-scad td:nth-child(3)::after{content:" · ";color:var(--line)}
  body.sf.app #tbl-scad td:nth-child(7){display:flex;order:5;flex-basis:100%;gap:6px;justify-content:flex-end;margin-top:6px}
  body.sf.app #tbl-scad td:nth-child(7) .btn{min-height:36px;border-radius:8px!important}
  body.sf.app #tbl-scad td:nth-child(6){display:none!important}
  body.sf.app #tbl-paga td:nth-child(1){display:block;order:1;flex:1 1 55%;min-width:0;font-weight:700;font-size:14px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.sf.app #tbl-paga td:nth-child(4){display:block;order:2;margin-left:auto;font-weight:700;font-size:14px;color:var(--ink);white-space:nowrap;text-align:right}
  body.sf.app #tbl-paga td:nth-child(2)::after{content:" · ";color:var(--line)}
  body.sf.app #tbl-paga td:nth-child(5){display:flex;order:5;flex-basis:100%;gap:6px;justify-content:flex-end;margin-top:6px}
  body.sf.app #tbl-paga td:nth-child(5) .btn{min-height:36px;border-radius:8px!important}
  body.sf.app #tbl-contatti td:nth-child(1){display:block;order:1;flex:1 1 55%;min-width:0;font-weight:700;font-size:14px;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.sf.app #tbl-contatti td:nth-child(2)::after{content:" · ";color:var(--line)}
  body.sf.app #tbl-contatti td:nth-child(3)::after{content:" · ";color:var(--line)}
  body.sf.app #tbl-contatti td:nth-child(5){display:flex;order:5;flex-basis:100%;gap:6px;justify-content:flex-end;margin-top:6px}
  body.sf.app #tbl-contatti td:nth-child(5) .btn{min-height:36px;border-radius:8px!important}
  body.sf.app .ent-table td .ent-badge{vertical-align:baseline}
}

/* 19/09 sera: nessuna riga piu' larga dello schermo — griglie e flex non allargano mai la pagina */
@media(max-width:768px){body.sf .sf-griglia>*,body.sf .hero-actions>*,body.sf .ent-kpi-row>*{min-width:0}body.sf .ent-shell,body.sf main,body.sf .ent-shell>*{max-width:100vw;box-sizing:border-box}}

/* 19/09 sera (fondatore: «nel CRM i numerini 1-2-3-4 sono nella posizione sbagliata»): nella veste i passi stanno in fila, il numero e' un tondo davanti al testo */
body.sf .ha{position:relative}
body.sf .ha .hn{position:static!important;order:-1;width:18px;height:18px;font-size:10.5px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:var(--sf-sel);color:var(--accent-deep);flex:none;margin-right:2px}

/* 19/09 notte (fondatore, dall app: «i numeri escono dal quadrante» nell Aging crediti del Controllo di gestione): la tabella
   con le barre diventa righe a schede (fascia e importo sulla stessa riga, barra sotto); ogni tabella fuori da un contenitore
   scorrevole non allarga mai la pagina. */
@media(max-width:768px){
  body.sf .ent-table:has(.age-bar){display:block;width:100%;min-width:0!important}
  body.sf .ent-table:has(.age-bar) thead{display:none}
  body.sf .ent-table:has(.age-bar) tbody{display:block}
  body.sf .ent-table:has(.age-bar) tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 10px;padding:8px 0;border-bottom:1px solid var(--line);align-items:center}
  body.sf .ent-table:has(.age-bar) td{display:block;border:0!important;padding:0!important;max-width:none!important;white-space:normal;background:transparent!important}
  body.sf .ent-table:has(.age-bar) td:nth-child(2){grid-column:1/-1;order:3}
  body.sf .ent-table:has(.age-bar) td.num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
  body.sf .ent-table:has(.age-bar) .age-bar{width:100%;height:6px}
  body.sf .card>.ent-table,body.sf .ent-card>.ent-table,body.sf section>.ent-table{display:block;max-width:100%;overflow-x:auto}
}

/* 19/09 notte (fondatore: «testata incasinata, una riga sola, ordinata e simmetrica»): dentro l app la barra alta e' UNA riga
   di tasti uguali — menu, Situazione, Chiedi a sinistra; campanella e profilo a destra. Il logo e il tasto Indietro non si
   ripetono: li ha gia la cornice nativa dell app. */
@media(max-width:768px){
  body.sf.app .topbar{height:52px!important}
  body.sf.app .topbar .row{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:space-between!important;height:52px!important;padding:0 10px!important;gap:8px!important}
  body.sf.app .topbar .row>*{flex:0 0 auto}
  body.sf.app .topbar .logo,body.sf.app .topbar .sf-back{display:none!important}
  body.sf.app .topnav-right,body.sf.app .topbar .row>div:last-child{margin-left:auto;display:flex!important;align-items:center;gap:8px}
  body.sf.app .topbar button,body.sf.app .topbar .btn,body.sf.app .topbar .sf-home,body.sf.app .topbar .ask-cta,body.sf.app .topbar .topnav-bell,body.sf.app .topbar .avatar,body.sf.app .topbar .mnav-open{width:38px!important;height:38px!important;min-width:38px;padding:0!important;margin:0!important;border-radius:8px!important;display:inline-flex!important;align-items:center;justify-content:center;font-size:0!important}
  body.sf.app .topbar svg{width:18px!important;height:18px!important;margin:0!important}
  body.sf.app .topbar .avatar{font-size:13px!important;border-radius:50%!important}
}

/* 19/09 notte: nell app la fila pulita — via ricerca, tema, secondo fumetto, Esci e menu strumenti dalla barra alta */
@media(max-width:768px){
  body.sf.app .topbar form.search,body.sf.app .topbar .search,body.sf.app .topbar .theme-toggle,body.sf.app .topbar .topnav-bell.navk-open,body.sf.app .topbar .tools-btn,body.sf.app .topbar .sf-esci-top,body.sf.app .topbar .topnav-link,body.sf.app .topbar .tools-menu,body.sf.app .topbar .topnav-bell[href="/messaggi"]{display:none!important}
  body.sf.app .topbar .ask-cta{outline:0!important;box-shadow:none!important}
}

/* 19/09 notte: nell app le viste pronte del Cubo restano sul web */
body.sf.app .cube-chips{display:none!important}

/* 20/09 (fondatore): menu di asksonia in MACRO AREE chiuse; il logo parte in alto */
body.sf .sfc-m{margin:2px 0}
body.sf .sfc-mv{display:flex;align-items:center;gap:8px;padding:9px 14px;font:700 11px/1 Inter,system-ui,sans-serif;letter-spacing:.12em;text-transform:uppercase;color:var(--smoke);cursor:pointer;list-style:none;border-top:1px solid var(--line)}
body.sf .sfc-mv::-webkit-details-marker{display:none}
body.sf .sfc-mv:hover{color:var(--ink);background:var(--sf-zebra)}
body.sf details.sfc-m[open]>.sfc-mv{color:var(--accent-deep)}
body.sf .sfc-mf{padding:2px 0 6px}
body.sf .sfc-mf .sfc-f a{padding-left:28px!important}
body.sf .sfc-mf .sfc-g .sfc-f a{padding-left:41px!important}
body.sf.erp .sfc{padding-top:0!important}
body.sf.erp nav.sfc a.sfc-logo{padding:8px 10px 10px!important;margin-top:0}
body.sf.erp .toolrail{padding-top:0!important}

/* 20/09 (fondatore): Dashboard come voce singola sopra le macro aree */
body.sf.erp .sfc-home{margin:2px 0 4px;font-weight:700}

/* 20/09 notte: barre di ricerca larghe e con l icona a posto anche nella veste; tabelle standard */
body.sf .t-search{flex:1 1 320px;min-width:260px;max-width:560px}
body.sf .t-search>input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),body.sf .ent-toolbar .t-search input:not([type="checkbox"]):not([type="radio"]):not([type="file"]){padding:9px 12px 9px 36px!important;width:100%}   /* specificita' pari alla regola generale degli input della veste */
body.sf .ent-toolbar{flex-wrap:wrap;gap:10px}
/* 06/10 regia Configurazione: la colonna parte sotto la barra (56px) e finisce al bordo dello schermo: con height:100% le ultime voci
   (Layout documenti, Esci) restavano sotto il bordo, irraggiungibili. Spazio in fondo alla pagina per i due tasti flottanti. */
@media(min-width:960px){body.sf .toolrail{height:auto!important;bottom:0!important;padding-bottom:24px!important}}
body.sf::after{content:"";display:block;height:120px}
/* 06/10 regia Configurazione: il tasto che chiude/apre la colonna sta nella barra scura in alto: fisso a 84px copriva le voci del menu quando la colonna scorre */
@media(min-width:960px){body.sf .tr-pin,body.sf .tr-open{top:8px!important}}
/* 27/10: il tasto della colonna sta nell'angolo sinistro della barra (come «apri», 12px) e la fila dei comandi gli lascia il suo posto:
   a left:188px finiva sopra «Indietro»/«Situazione» appena la fila si allargava (regola f del cancello). */
@media(min-width:960px){body.sf .tr-pin{left:12px!important}body.sf .topbar .row{padding-left:64px!important}}
/* 06/10 bug 3 (fondatore): margine destro uguale allo spazio tra la spalla e il contenuto (24px), nel contenitore principale e non pagina per pagina;
   su mobile 16px per lato. Le tabelle larghe scorrono dentro il loro riquadro. Il tasto della colonna nella barra scura prende i suoi colori. */
@media(min-width:960px){body.sf .toolrail ~ :where(main, section, article, aside, div):not([class*="modal"]):not([class*="overlay"]):not([class*="toast"]):not([class*="drawer"]):not([class*="popup"]):not([hidden]):not([style*="position:fixed"]):not(.cookie-bar){margin-right:24px!important}}
@media(max-width:959px){body.sf .toolrail ~ :where(main, section, article, aside, div):not([class*="modal"]):not([class*="overlay"]):not([class*="toast"]):not([class*="drawer"]):not([class*="popup"]):not([hidden]):not([style*="position:fixed"]):not(.cookie-bar){padding-left:16px!important;padding-right:16px!important;box-sizing:border-box}}
@media(min-width:960px){body.sf .tr-pin,body.sf .tr-open{background:transparent!important;border-color:rgba(255,255,255,.28)!important;color:#fff!important;box-shadow:none!important}}
/* 06/10 regia Configurazione: la freccia delle macro aree gira quando la macro e' aperta (come i gruppi) */
body.sf details[open]>.sfc-mv .sfc-fr{transform:rotate(45deg)}
/* 14/10 NOTAI-VESTE: icona della voce di menu dal set di icone SonIA (app/icone_sonia.py), nello spazio a sinistra */
body.sf .sfc-f a .sfc-ic{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;vertical-align:-3px;margin:0 6px 0 -21px;color:var(--smoke)}
body.sf .sfc-f a.on .sfc-ic{color:currentColor}
