/* Flow Manager — interfaccia smartphone comune a tutte le app (www/fm_ui/fm-mobile.css)
   Si attiva solo sotto i 760px: barra in alto compatta, menu a tutto schermo, barra in basso con ＋ (come FM Bilancio). */
.fmm-burger,.fmm-tabbar,.fmm-extra{display:none}
body.fmm{--fmm-c:#1d6fe0}
body.fmm .fmm-hide{display:none!important}
body.fmm input:not([type=checkbox]):not([type=radio]),body.fmm select,body.fmm textarea{font-size:16px}
/* barra in alto */
body.fmm .fmm-head{position:sticky;top:0;z-index:9991}
body.fmm .fmm-burger{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;margin-left:4px;border:0;background:none;
  font-size:24px;line-height:1;color:inherit;cursor:pointer;border-radius:10px;flex:none}
body.fmm .fmm-burger:active{background:rgba(0,0,0,.06)}
/* menu a tutto schermo */
body.fmm .fmm-nav{display:none!important}
body.fmm.fmm-open{overflow:hidden}
body.fmm.fmm-open .fmm-nav{display:flex!important;flex-direction:column;flex-wrap:nowrap;align-items:stretch;gap:2px;position:fixed;left:0;right:0;top:var(--fmm-top,60px);bottom:0;
  z-index:9990;margin:0;max-width:none;width:auto;padding:10px 12px 110px;background:#fff;overflow-y:auto;-webkit-overflow-scrolling:touch;border:0;box-shadow:none}
body.fmm.fmm-open .fmm-nav a,body.fmm.fmm-open .fmm-nav button{display:flex;align-items:center;gap:12px;width:100%;margin:0;padding:13px 12px;font-size:16px;
  text-align:left;justify-content:flex-start;border:0;border-radius:10px;background:none;color:#1e293b;text-decoration:none;white-space:normal;box-shadow:none;min-height:46px}
body.fmm.fmm-open .fmm-nav a:active,body.fmm.fmm-open .fmm-nav button:active{background:#f1f5f9}
body.fmm.fmm-open .fmm-nav a.on,body.fmm.fmm-open .fmm-nav button.on,body.fmm.fmm-open .fmm-nav a.aperto{background:color-mix(in srgb,var(--fmm-c) 12%,#fff);color:var(--fmm-c);font-weight:600}
body.fmm.fmm-open .fmm-nav svg{width:20px;height:20px;flex:none}
body.fmm.fmm-open .fmm-exp{display:flex!important;flex-direction:column;position:static!important;box-shadow:none!important;border:0!important;padding:0 0 0 14px!important;min-width:0!important;background:none!important}
body.fmm.fmm-open .fmm-exp>*{font-size:15px!important}
body.fmm.fmm-open .fmm-nav .fmm-extra{display:flex;flex-direction:column;gap:2px;border-top:1px solid #e2e8f0;margin-top:10px;padding-top:10px}
body.fmm.fmm-open .fmm-nav .fmm-user{padding:6px 12px 10px;color:#64748b;font-size:14px}
body.fmm.fmm-open .fmm-nav .fmm-extra .fmm-out{color:#dc2626}
/* barra in basso */
body.fmm.fmm-in{padding-bottom:calc(78px + env(safe-area-inset-bottom))}
body.fmm.fmm-in .fmm-tabbar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:9993;justify-content:space-around;align-items:center;
  background:rgba(255,255,255,.97);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-top:1px solid #e2e8f0;
  padding:6px 4px;padding-bottom:max(6px,env(safe-area-inset-bottom));font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif}
.fmm-tabbar a{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:58px;color:#475569;text-decoration:none;font-size:20px;line-height:1.1;cursor:pointer;-webkit-tap-highlight-color:transparent}
.fmm-tabbar a span{font-size:11px;font-weight:500}
.fmm-tabbar a.on{color:var(--fmm-c)}
.fmm-tabbar a.on span{font-weight:700}
.fmm-tabbar .fmm-plus{width:54px;height:54px;min-width:54px;border-radius:50%;background:var(--fmm-c);color:#fff;font-size:30px;justify-content:center;
  box-shadow:0 4px 14px color-mix(in srgb,var(--fmm-c) 45%,transparent);margin-top:-24px}
.fmm-tabbar .fmm-plus span{display:none}
.fmm-tabbar svg{width:22px;height:22px}
/* assistente sopra la barra */
body.fmm.fmm-in #fma-btn{bottom:88px!important;right:14px!important}
body.fmm.fmm-in #fma{bottom:152px!important;height:calc(100vh - 172px)!important}
body.fmm.fmm-open #fma-btn{display:none!important}
@media print{.fmm-tabbar,.fmm-burger{display:none!important}body.fmm.fmm-in{padding-bottom:0}}
/* foglio azioni del ＋ */
.fmm-sheet{position:fixed;inset:0;z-index:9995;background:rgba(15,23,42,0);display:flex;align-items:flex-end;pointer-events:none;transition:background .2s}
.fmm-sheet.on{background:rgba(15,23,42,.4);pointer-events:auto}
.fmm-sh{width:100%;background:#fff;border-radius:18px 18px 0 0;padding:14px 12px calc(14px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:4px;
  transform:translateY(100%);transition:transform .22s ease;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;max-height:80vh;overflow-y:auto}
.fmm-sheet.on .fmm-sh{transform:none}
.fmm-sh>b{text-align:center;color:#64748b;font-size:13px;font-weight:600;padding:2px 0 8px}
.fmm-sh button{display:flex;align-items:center;gap:12px;border:0;background:#f8fafc;border-radius:12px;padding:14px;font-size:16px;color:#0f172a;text-align:left;cursor:pointer;font-family:inherit}
.fmm-sh button span{width:26px;text-align:center;font-size:20px}
.fmm-sh .fmm-annulla{justify-content:center;background:none;color:var(--fmm-c,#1d6fe0);font-weight:600;margin-top:4px}
/* l'intestazione non deve "contenere" il menu fisso (backdrop-filter/transform creano un nuovo riferimento) */
body.fmm .fmm-head{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;transform:none!important;filter:none!important}
body.fmm .fmm-burger{order:99}
/* campi che escono dalla scheda sul telefono (data su iPhone, select lunghe) */
body.fmm input:not([type=checkbox]):not([type=radio]),body.fmm select,body.fmm textarea{max-width:100%;box-sizing:border-box;min-width:0}
body.fmm input[type=date],body.fmm input[type=time],body.fmm input[type=datetime-local]{-webkit-appearance:none;appearance:none;min-height:42px}
body.fmm [class*=grid]>*,body.fmm [class*=cols]>*,body.fmm [class*=row]>*{min-width:0}
/* un solo menu: con la barra in basso il ☰ in alto non serve */
body.fmm.fmm-in .fmm-burger{display:none}
body.fmm .fmm-head .brand span{display:inline!important}
/* ===== rev. 6/11/2026 — telefono: barra in basso, campi data/ora, assistente ===== */
body.fmm input[type=date],body.fmm input[type=time],body.fmm input[type=datetime-local]{display:block;width:100%;text-align:left}
body.fmm input::-webkit-date-and-time-value{text-align:left}
body.fmm.fmm-in{padding-bottom:calc(150px + env(safe-area-inset-bottom))}
.fmm-tabbar a{flex:1;min-width:0;min-height:46px;justify-content:flex-end;font-size:22px}
.fmm-tabbar a span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fmm-tabbar .fmm-plus{flex:0 0 54px;justify-content:center;min-height:54px}
.fmm-tabbar svg{display:block;flex:none}
body.fmm.fmm-in #fma-btn{width:46px!important;height:46px!important;bottom:calc(86px + env(safe-area-inset-bottom))!important;right:12px!important;font-size:20px!important}
/* ===== rev. 8/11/2026 — icone a linea nella barra in basso (al posto del pallino) ===== */
.fmm-tabbar .fmm-ic{display:flex;align-items:center;justify-content:center;height:24px;font-style:normal}
.fmm-tabbar svg{width:22px;height:22px}
.fmm-tabbar .fmm-plus svg{width:26px;height:26px}
.fmm-sh button span{display:flex;align-items:center;justify-content:center;color:var(--fmm-c,#1d6fe0)}
.fmm-sh button span svg{width:22px;height:22px}
