/* ─────────────────────────────────────────────────────────────
   HIDROTEKNIKA — tema premium nero + rosso
   ───────────────────────────────────────────────────────────── */
:root{
  --bg:#070707;
  --card:rgba(255,255,255,.04);
  --card-line:rgba(255,255,255,.08);
  --hair:rgba(255,255,255,.05);
  --txt:#F2F4F6;
  --txt2:#C9CCCF;
  --muted:#6E6E6E;
  --red:#E6332A;
  --red-l:#F26D63;
  --green:#9FD46A;
  --amber:#F2A23B;
}
*{ box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html{ margin:0; height:100%; width:100%; max-width:100%; overflow:hidden; }
body{ margin:0; height:100%; width:100%; max-width:100%; overflow:hidden; overscroll-behavior:none; }
body{
  background:var(--bg); color:var(--txt);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  -webkit-font-smoothing:antialiased;
}
#app{ width:100%; max-width:520px; margin:0 auto; height:100%; position:relative; overflow-x:hidden; overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; }
.screen{ width:100%; min-height:100%; display:flex; flex-direction:column; padding-top:env(safe-area-inset-top); overflow-x:hidden; }
button{ font-family:inherit; cursor:pointer; }
.hide{ display:none !important; }

/* glow di sfondo */
.glow{ position:absolute; border-radius:50%; pointer-events:none; z-index:0;
  background:radial-gradient(circle, rgba(230,51,41,.15) 0%, rgba(7,7,7,0) 66%); }

/* ── lingua ── */
.lang{ display:inline-flex; border:1px solid rgba(255,255,255,.14); border-radius:20px; overflow:hidden; }
.lang span{ font-size:11px; letter-spacing:1px; padding:5px 10px; color:var(--muted); }
.lang span.on{ background:rgba(230,51,41,.9); color:#fff; }

/* ── SPLASH ── */
.splash{ align-items:center; justify-content:flex-start; text-align:center; position:relative; z-index:1; }
.splash .lang{ position:absolute; top:calc(16px + env(safe-area-inset-top)); right:16px; }
.logo-wrap{ position:relative; width:120px; height:120px; display:flex; align-items:center; justify-content:center; margin-top:24vh; }
.halo{ position:absolute; width:190px; height:190px; border-radius:50%;
  background:radial-gradient(circle, rgba(230,51,41,.42) 0%, rgba(230,51,41,0) 70%);
  animation:glow 4s ease-in-out infinite; }
.ring{ position:absolute; inset:0; border-radius:50%; border:1px solid rgba(230,51,41,.45); animation:ring 3.6s ease-out infinite; }
.logo-h{ position:relative; animation:bob 4.5s ease-in-out infinite; }
.brand{ margin-top:48px; font-size:21px; font-weight:400; letter-spacing:5px; padding-left:5px; }
.brand-sub{ display:flex; align-items:center; gap:12px; margin:18px 0; }
.brand-sub .ln{ width:26px; height:1px; background:rgba(255,255,255,.2); }
.brand-sub .tld{ font-size:12px; letter-spacing:5px; color:var(--red); }
.spacer{ flex:1; }
.btn-enter{ margin-bottom:20px; padding:13px 0; width:224px; border-radius:30px;
  border:1px solid rgba(255,255,255,.16); background:rgba(255,255,255,.05); color:#EEF1F4;
  font-size:15px; letter-spacing:1px; display:flex; align-items:center; justify-content:center; gap:10px; }
.btn-enter:active{ transform:scale(.98); }
.note{ margin:0 0 32px; font-size:10px; letter-spacing:1.5px; color:#565656; }

/* ── AUTH ── */
.auth{ align-items:center; position:relative; z-index:1; }
.auth-top{ margin-top:44px; display:flex; align-items:center; gap:8px; }
.auth-top span{ font-size:12px; letter-spacing:3px; color:var(--txt2); }
.faceid-wrap{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.faceid-circle{ position:relative; width:120px; height:120px; display:flex; align-items:center; justify-content:center; }
.faceid-circle .halo{ width:150px; height:150px; animation:glow 2.6s ease-in-out infinite; }
.faceid-ico{ font-size:84px; color:var(--red-l); position:relative; animation:glow 2.6s ease-in-out infinite; }
.faceid-t{ margin:30px 0 0; font-size:18px; }
.faceid-h{ margin:8px 0 0; font-size:12px; color:var(--muted); }
.btn-pwd{ margin-bottom:36px; padding:10px 0; width:200px; border-radius:30px;
  border:1px solid rgba(255,255,255,.14); background:transparent; color:var(--txt2);
  font-size:13px; display:flex; align-items:center; justify-content:center; gap:8px; }

/* ── PIN ── */
.pin{ align-items:center; }
.pin-title{ margin:30px 0 0; font-size:16px; }
.pin-title.err{ color:var(--red-l); }
.pwd-box{ position:relative; width:230px; margin:24px 0 6px; }
.pwd-input{ width:100%; height:48px; border-radius:14px; border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05); color:#F2F4F6; font-size:18px; letter-spacing:2px;
  text-align:center; padding:0 42px 0 16px; outline:none; box-sizing:border-box; }
.pwd-input::placeholder{ color:#4F5762; letter-spacing:4px; -webkit-text-security:none; }
.pwd-input:focus{ border-color:rgba(230,51,41,.6); }
.pwd-mask{ -webkit-text-security:disc; }
.pwd-eye{ position:absolute; right:12px; top:50%; transform:translateY(-50%); color:#7A7A7A; font-size:20px; cursor:pointer; padding:6px; }
.btn-login{ margin-top:14px; padding:12px 0; width:230px; border-radius:30px;
  border:1px solid rgba(255,255,255,.16); background:rgba(230,51,41,.9); color:#fff;
  font-size:15px; letter-spacing:1px; display:flex; align-items:center; justify-content:center; gap:9px; }
.btn-login:active{ transform:scale(.98); }
.dots{ display:flex; gap:18px; margin:24px 0 8px; }
.dot{ width:16px; height:16px; border-radius:50%; border:1.5px solid rgba(255,255,255,.35); transition:background .12s ease; }
.dot.on{ background:var(--red-l); border-color:var(--red-l); }
.keypad{ margin-top:18px; display:grid; grid-template-columns:repeat(3,70px); gap:20px; justify-content:center; }
.key{ width:70px; height:70px; border-radius:50%; background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.09); display:flex; align-items:center; justify-content:center;
  font-size:27px; font-weight:400; color:#EEF1F4; cursor:pointer;
  user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.key:active{ background:rgba(255,255,255,.14); }
.key.fn{ background:transparent; border:none; color:var(--muted); }
.key.fn .ti-face-id{ color:var(--red-l); }
.key.ok{ background:rgba(230,51,41,.92); border:none; color:#fff; }
.key.ok:active{ background:rgba(230,51,41,1); }

/* ── HEADER comune schermate ── */
.hdr{ padding:20px 16px 10px; display:flex; align-items:center; gap:10px; position:relative; z-index:1; }
.hdr .back{ font-size:22px; color:var(--txt2); }
.hdr .ttl{ flex:1; font-size:18px; font-weight:400; }
.hdr .act{ font-size:20px; color:var(--txt2); }
.hdr .back, .hdr .act{ padding:6px; margin:-6px 0; cursor:pointer; }
.hdr .back:active, .hdr .act:active{ opacity:.55; }
.hello{ font-size:10px; letter-spacing:2px; color:var(--muted); }
.hello + .ttl-big{ font-size:20px; }

/* ── MENU lista ── */
.list{ padding:6px 14px 24px; display:flex; flex-direction:column; gap:11px; position:relative; z-index:1; touch-action:pan-y; }
.ac-drop{ margin:2px 16px 4px; background:rgba(20,16,16,.96); border:1px solid var(--card-line); border-radius:13px; overflow-y:auto; -webkit-overflow-scrolling:touch; max-height:340px; box-shadow:0 8px 20px rgba(0,0,0,.4); position:relative; z-index:5; }
.ac-row{ display:flex; align-items:center; gap:10px; padding:10px 14px; border-bottom:1px solid var(--hair); cursor:pointer; }
.ac-row:last-child{ border-bottom:none; }
.ac-row:active{ background:rgba(255,255,255,.05); }
.ac-row i{ color:var(--muted); font-size:15px; flex-shrink:0; }
.ac-row .n{ flex:1; font-size:13px; color:#EFF1F3; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* mini card del menu (4 in fila) */
.cards{ padding:16px 12px calc(20px + env(safe-area-inset-bottom)); display:grid; grid-template-columns:repeat(4,1fr); gap:9px; position:relative; z-index:2; }
.mcard{ background:var(--card); border:1px solid var(--card-line); border-radius:15px; padding:12px 4px; display:flex; flex-direction:column; align-items:center; gap:6px; cursor:pointer; }
.mcard:active{ background:rgba(255,255,255,.08); transform:scale(.97); }
.mcard i{ font-size:22px; color:var(--red-l); }
.mt{ margin:0; font-size:10px; color:var(--txt2); text-align:center; }
/* HOME stile Apple */
.menu-bg{ background:linear-gradient(180deg,#0c0809 0%,#070707 52%); }
.aurora{ position:absolute; bottom:-80px; left:50%; transform:translateX(-50%); width:130%; height:260px; border-radius:50%; background:radial-gradient(ellipse, rgba(230,51,41,.20) 0%, rgba(7,7,7,0) 68%); pointer-events:none; z-index:0; }
.greet{ padding:24px 22px 6px; position:relative; z-index:1; }
.greet-hi{ margin:0; font-size:26px; font-weight:300; color:#F4F6F8; }
.greet-date{ margin:6px 0 0; font-size:13px; color:#7A7A7A; }
.hero{ margin:14px 18px; padding:18px; border-radius:20px; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.08); position:relative; z-index:1; cursor:pointer; }
.hero:active{ background:rgba(255,255,255,.08); }
.hero-lab{ margin:0; font-size:10px; letter-spacing:1.5px; color:#8A8A8A; }
.hero-val{ margin:7px 0 0; font-size:31px; font-weight:400; color:#F4F6F8; }
.hero-chart{ display:flex; align-items:flex-end; gap:3px; height:28px; margin-top:12px; }
.hero-chart .hbar{ flex:1; border-radius:2px; background:rgba(242,109,99,.32); }
.hero-chart .hbar.hot{ background:var(--red); }
.hero-cn{ margin-top:14px; padding-top:14px; border-top:1px solid rgba(255,255,255,.08); display:flex; align-items:center; justify-content:space-between; }
.hero-cn-l{ font-size:11px; letter-spacing:1px; color:#8A8A8A; }
.hero-cn-v{ font-size:16px; color:var(--red-l); }
.cards2{ padding:6px 18px calc(18px + env(safe-area-inset-bottom)); display:grid; grid-template-columns:1fr 1fr; gap:10px; position:relative; z-index:1; }
.ncard{ background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.08); border-radius:16px; padding:11px 13px; cursor:pointer; }
.ncard:active{ background:rgba(255,255,255,.09); transform:scale(.98); }
.ncard i{ font-size:20px; color:var(--red-l); }
.ncard-t{ margin:8px 0 0; font-size:14px; color:#EFF1F3; }
/* personaggio animato */
.charwrap{ position:relative; height:188px; display:flex; align-items:center; justify-content:center; }
.halo2{ position:absolute; top:50%; left:50%; width:210px; height:210px; border-radius:50%; transform:translate(-50%,-50%); background:radial-gradient(circle, rgba(230,51,41,.32) 0%, rgba(7,7,7,0) 70%); animation:hk-halo2 4s ease-in-out infinite; }
.ring2{ position:absolute; top:50%; left:50%; width:170px; height:170px; border-radius:50%; transform:translate(-50%,-50%); border:1px solid rgba(230,51,41,.4); animation:hk-ring2 3.6s ease-out infinite; }
.charfloat{ position:relative; animation:hk-float2 4.5s ease-in-out infinite; }
.charimg{ width:166px; height:166px; border-radius:50%; object-fit:cover; border:2px solid rgba(255,255,255,.12); display:block; }
.charph{ width:166px; height:166px; border-radius:50%; background:rgba(255,255,255,.04); border:1px dashed rgba(255,255,255,.18); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; }
@keyframes hk-float2{ 0%,100%{ transform:translateY(0) } 50%{ transform:translateY(-9px) } }
@keyframes hk-halo2{ 0%,100%{ opacity:.5; transform:translate(-50%,-50%) scale(1) } 50%{ opacity:.95; transform:translate(-50%,-50%) scale(1.12) } }
@keyframes hk-ring2{ 0%{ transform:translate(-50%,-50%) scale(.7); opacity:.5 } 100%{ transform:translate(-50%,-50%) scale(1.45); opacity:0 } }
.row{ background:var(--card); border:1px solid var(--card-line); border-radius:16px;
  padding:15px 14px; display:flex; align-items:center; gap:12px; touch-action:pan-y; }
.row:active{ background:rgba(255,255,255,.07); }
.row .ic{ width:38px; height:38px; border-radius:11px; background:rgba(230,51,41,.14);
  display:flex; align-items:center; justify-content:center; color:var(--red-l); font-size:20px; }
.row .tx{ flex:1; min-width:0; }
.row .tx p{ margin:0; }
.row .tx .t{ font-size:14px; color:#EFF1F3; }
.row .tx .s{ font-size:10px; color:var(--muted); margin-top:2px; }
.row .chev{ font-size:16px; color:#565656; }

/* ── segmenti / chip ── */
.seg{ padding:4px 16px; display:flex; gap:6px; position:relative; z-index:1; }
.seg span{ flex:1; text-align:center; font-size:11px; padding:6px 0; border-radius:14px;
  color:var(--muted); border:1px solid var(--card-line); }
.seg span.on{ background:rgba(230,51,41,.9); color:#fff; border-color:transparent; }
.chips{ padding:12px 16px 8px; display:flex; gap:6px; position:relative; z-index:1; }
.chips span{ font-size:11px; padding:5px 12px; border-radius:14px; color:var(--muted); border:1px solid var(--card-line); }
.chips span.on{ background:rgba(230,51,41,.9); color:#fff; border-color:transparent; }
.period{ padding:12px 16px 4px; display:flex; align-items:center; justify-content:center; gap:14px; color:var(--txt2); font-size:13px; position:relative; z-index:1; }
.period .ti{ color:var(--muted); font-size:16px; }
.navbtn{ cursor:pointer; padding:6px; }
.navbtn:active{ opacity:.5; }
.period-label{ cursor:pointer; padding:6px 12px; border-radius:12px; display:inline-flex; align-items:center; gap:6px; min-width:120px; justify-content:center; }
.period-label:active{ background:rgba(255,255,255,.07); }
.period-label .ti{ font-size:13px; opacity:.6; }

/* ── cruscotto ── */
.kpi{ margin:6px 16px; background:var(--card); border:1px solid var(--card-line); border-radius:16px; padding:16px; position:relative; z-index:1; }
.kpi .lab{ margin:0; font-size:11px; color:var(--muted); }
.kpi .big{ margin:4px 0 0; font-size:26px; font-weight:400; }
.kpi .delta{ margin:6px 0 0; font-size:11px; }
.delta.up{ color:var(--green); } .delta.down{ color:var(--red-l); }
.bars{ padding:6px 16px; display:flex; flex-direction:column; gap:11px; position:relative; z-index:1; }
.bar .top{ display:flex; justify-content:space-between; font-size:12px; margin-bottom:5px; }
.bar .top .k{ color:var(--txt2); } .bar .top .v{ color:#EFF1F3; }
.bar .track{ height:6px; border-radius:3px; background:rgba(255,255,255,.07); }
.bar .fill{ height:6px; border-radius:3px; background:var(--red); }
/* ── GUADAGNO: filiali su una riga, % sul costo, campo netto, Conto finale ── */
.bar .top.gtop{ align-items:center; white-space:nowrap; gap:8px; }
.gtop .k{ overflow:hidden; text-overflow:ellipsis; }
.gtop .gright{ display:flex; align-items:center; gap:7px; flex-shrink:0; }
.gpct{ font-size:10px; color:var(--green); background:rgba(159,212,106,.12); padding:2px 7px; border-radius:8px; }
.gpct.off{ color:var(--muted); background:rgba(255,255,255,.05); }
.gfield{ margin:14px 16px 4px; padding:14px 16px; border-radius:16px; background:rgba(255,255,255,.05);
  border:1px solid var(--card-line); display:flex; align-items:center; justify-content:space-between; position:relative; z-index:1; }
.gfield-l{ font-size:11px; letter-spacing:1px; color:var(--muted); }
.gfield-v{ font-size:17px; color:#EFF1F3; }
.gsub{ margin:16px 16px 8px; font-size:9px; letter-spacing:1.5px; color:var(--muted); position:relative; z-index:1; }
.row.gconto{ margin:14px 16px 18px; position:relative; z-index:1; }
/* ── CONTO FINALE: riepilogo a righe ── */
.cfbox{ margin:14px 16px 4px; padding:4px 16px; border-radius:18px; background:rgba(255,255,255,.04);
  border:1px solid var(--card-line); position:relative; z-index:1; }
.cfrow{ display:flex; align-items:center; justify-content:space-between; padding:14px 0; }
.cfl{ font-size:13px; color:var(--txt2); }
.cfv{ font-size:15px; color:#EFF1F3; }
.cfv.pos{ color:var(--green); } .cfv.neg{ color:var(--red-l); }
.cfres .cfl{ font-weight:600; color:#EFF1F3; } .cfres .cfv{ font-weight:600; font-size:16px; }
/* ── LIKU · Tutti gli anni ── */
.lk-sum{ margin:12px 16px 6px; padding:8px 14px; border-radius:14px; background:rgba(242,109,99,.10); border:1px solid rgba(242,109,99,.30); position:relative; z-index:1; }
.lk-sum-h{ font-size:10px; letter-spacing:1.5px; color:#F2F4F6; font-weight:700; padding-bottom:5px; border-bottom:1px solid rgba(242,109,99,.25); margin-bottom:3px; }
.lk-srow{ display:flex; justify-content:space-between; align-items:center; padding:7px 2px; font-size:13px; border-bottom:1px solid var(--hair); }
.lk-srow:last-child{ border-bottom:none; }
.lk-sn{ color:var(--txt2); } .lk-sv{ color:#EFF1F3; }
.lk-stot .lk-sn, .lk-stot .lk-sv{ color:var(--red-l); font-weight:700; }
.lk-years{ padding:4px 16px; display:flex; flex-direction:column; gap:14px; position:relative; z-index:1; }
.lk-year .lk-yhead{ display:flex; justify-content:space-between; align-items:center; padding:5px 12px; border-radius:7px; background:rgba(242,109,99,.14); border:1px solid rgba(242,109,99,.26); font-size:12px; color:#F2F4F6; font-weight:600; letter-spacing:2px; cursor:pointer; }
.lk-ytot{ font-size:11px; color:var(--red-l); font-weight:600; letter-spacing:0; }
.lk-yrow{ display:flex; padding:8px 2px 2px; }
.lk-cell{ flex:1; text-align:center; min-width:0; }
.lk-cn{ font-size:9px; color:var(--muted); margin-bottom:4px; }
.lk-cv{ font-size:13px; color:#EFF1F3; }
/* ── RICERCA ARTICOLO ── */
.artbox{ margin:8px 16px 4px; display:flex; align-items:center; gap:9px; background:rgba(255,255,255,.06); border:1px solid rgba(242,109,99,.35); border-radius:13px; padding:11px 13px; position:relative; z-index:1; }
.artbox > i:first-child{ color:var(--red-l); font-size:17px; }
.artbox input{ flex:1; background:transparent; border:0; color:#EFF1F3; font-size:15px; font-family:inherit; min-width:0; outline:none; }
.artbox input::placeholder{ color:var(--muted); }
.artbox > i:last-child{ color:var(--muted); font-size:15px; }
#artresults{ position:relative; z-index:1; }
.art-list{ margin:2px 16px; background:rgba(20,16,16,.6); border:1px solid var(--card-line); border-radius:13px; overflow:hidden; }
.art-row{ display:flex; flex-direction:column; padding:11px 13px; border-bottom:1px solid var(--hair); }
.art-row:last-child{ border-bottom:none; }
.art-row:active{ background:rgba(255,255,255,.05); }
.art-top{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.art-code{ font-size:12px; color:var(--red-l); font-weight:600; }
.art-qty{ font-size:11px; color:var(--muted); flex-shrink:0; }
.art-name{ font-size:13px; color:#EFF1F3; margin-top:2px; line-height:1.35; word-break:break-word; }
.art-msg{ text-align:center; color:var(--muted); font-size:13px; padding:24px 16px; }
.art-empty{ display:flex; flex-direction:column; align-items:center; text-align:center; padding:46px 36px; position:relative; z-index:1; }
.art-empty-ic{ width:76px; height:76px; border-radius:22px; background:rgba(255,255,255,.04); border:1px solid var(--card-line); display:flex; align-items:center; justify-content:center; margin-bottom:16px; }
.art-empty-ic i{ font-size:34px; color:#4a4a4a; }
.art-empty-t{ margin:0; font-size:15px; color:var(--txt2); }
.art-empty-s{ margin:8px 0 0; font-size:12px; color:var(--muted); line-height:1.5; }
.art-photo{ margin:6px 16px 12px; min-height:120px; max-height:158px; border-radius:18px; background:rgba(255,255,255,.05); border:1px solid var(--card-line); display:flex; align-items:center; justify-content:center; overflow:hidden; position:relative; z-index:1; cursor:pointer; touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
.art-photo i{ font-size:46px; color:#4a4a4a; }
.art-photo img{ display:block; max-width:100%; max-height:148px; width:auto; height:auto; object-fit:contain; object-position:center; pointer-events:none; user-select:none; -webkit-user-drag:none; }
.art-photo-fs{ position:fixed; inset:0; z-index:10000; background:rgba(0,0,0,.94); display:none; align-items:center; justify-content:center; padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); cursor:pointer; }
.art-photo-fs.on{ display:flex; }
.art-photo-fs img{ max-width:100vw; max-height:100vh; width:auto; height:auto; object-fit:contain; object-position:center; pointer-events:none; }
.art-photo-fs-close{ position:absolute; top:max(12px, env(safe-area-inset-top)); right:max(12px, env(safe-area-inset-right)); width:36px; height:36px; border:none; border-radius:50%; background:rgba(255,255,255,.2); color:#fff; font-size:22px; line-height:1; cursor:pointer; z-index:1; }
.art-desc{ padding:0 16px; position:relative; z-index:1; }
.art-desc-c{ font-size:13px; color:var(--red-l); font-weight:600; }
.art-desc-n{ font-size:15px; color:#EFF1F3; margin-top:3px; line-height:1.3; }
.art-forn{ display:flex; align-items:baseline; gap:8px; margin-top:10px; padding-top:10px; border-top:1px solid rgba(255,255,255,.06); }
.art-forn-l{ font-size:9px; letter-spacing:1.2px; color:#6E6E6E; text-transform:uppercase; flex-shrink:0; }
.art-forn-v{ font-size:13px; color:#C8CDD2; line-height:1.35; }
.art-sec{ margin:14px 16px 7px; font-size:9px; letter-spacing:1.5px; color:#6E6E6E; position:relative; z-index:1; }
.art-price{ display:flex; align-items:center; gap:12px; margin:0 16px; position:relative; z-index:1; }
.art-price-sel{ position:relative; flex:1; }
.art-price-sel select{ width:100%; appearance:none; -webkit-appearance:none; background:rgba(255,255,255,.06); border:1px solid rgba(242,109,99,.35); border-radius:12px; padding:11px 34px 11px 14px; font-size:13px; color:#EFF1F3; font-family:inherit; outline:none; }
.art-price-sel i{ position:absolute; right:12px; top:50%; transform:translateY(-50%); color:var(--red-l); font-size:16px; pointer-events:none; }
.art-price-v{ font-size:18px; color:#EFF1F3; font-weight:500; min-width:60px; text-align:right; }
.art-ric-line{ margin:7px 16px 0; text-align:right; min-height:1px; position:relative; z-index:1; }
.art-ric{ font-size:11px; color:var(--green); background:rgba(159,212,106,.12); padding:3px 9px; border-radius:9px; }
.art-ric.neg{ color:var(--red-l); background:rgba(242,109,99,.12); }
.art-stock{ margin:12px 16px 0; background:rgba(255,255,255,.04); border:1px solid var(--card-line); border-radius:14px; padding:12px 15px; position:relative; z-index:1; }
.art-stock .lab{ margin:0; font-size:10px; letter-spacing:1.5px; color:var(--muted); }
.art-stock .big{ margin:4px 0 0; font-size:22px; color:var(--green); }
.art-stock .big span{ font-size:13px; color:var(--muted); }
.art-branches{ padding:0 16px; position:relative; z-index:1; }
.art-frow{ display:flex; justify-content:space-between; align-items:center; padding:8px 2px; border-bottom:1px solid var(--hair); font-size:13px; }
.art-fk{ color:var(--txt2); } .art-fv{ color:#EFF1F3; }
.art-storico-btn{ margin:16px 16px 18px; display:flex; align-items:center; gap:12px; padding:13px 15px; border-radius:14px; background:rgba(255,255,255,.05); border:1px solid var(--card-line); position:relative; z-index:1; }
.art-storico-btn .ic{ width:36px; height:36px; border-radius:11px; background:rgba(230,51,41,.14); display:flex; align-items:center; justify-content:center; color:var(--red-l); font-size:19px; }
.art-storico-btn .t{ flex:1; font-size:14px; color:#EFF1F3; }
.art-storico-btn .chev{ font-size:16px; color:#565656; }
.art-hsub{ padding:0 16px; font-size:12px; color:var(--muted); margin-top:2px; position:relative; z-index:1; }
.art-range{ display:flex; align-items:center; gap:6px; margin:0 16px; position:relative; z-index:1; overflow:hidden; }
.art-date{ flex:1 1 0; min-width:0; overflow:hidden; display:flex; align-items:center; gap:6px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.1); border-radius:11px; padding:9px 10px; }
.art-date i{ color:var(--red-l); font-size:14px; }
.art-date input{ flex:1; background:transparent; border:0; color:#EFF1F3; font-size:12px; font-family:inherit; min-width:0; outline:none; }
.art-date input::-webkit-calendar-picker-indicator{ filter:invert(.7); opacity:.6; }
.art-dash{ color:var(--muted); }
.cfsep{ height:1px; background:var(--hair); margin:2px 0; }
.cfnote{ margin:14px 18px; font-size:10px; color:var(--muted); line-height:1.5; text-align:center; position:relative; z-index:1; }
.chart{ margin-top:auto; padding:10px 16px 18px; display:flex; align-items:flex-end; gap:5px; height:80px; position:relative; z-index:1; }
.chart .col{ flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; }
.chart .cb{ width:100%; border-radius:3px; background:rgba(242,109,99,.4); }
.chart .cb.hot{ background:var(--red); }
.chart .cl{ font-size:8px; color:var(--muted); }
.subbox{ margin:10px 16px 16px; padding:12px 14px; background:rgba(255,255,255,.03); border:1px solid var(--card-line); border-radius:14px; position:relative; z-index:1; }
.subbox .h{ margin:0 0 8px; font-size:10px; letter-spacing:1px; color:var(--muted); }
.subbox .ln{ display:flex; justify-content:space-between; font-size:12px; margin-bottom:6px; }
.subbox .ln .k{ color:var(--txt2); } .subbox .ln .v{ color:#EFF1F3; }

/* ── elenco movimenti ── */
.feed{ padding:2px 14px 24px; position:relative; z-index:1; }
.feed .gl{ margin:14px 4px 6px; font-size:10px; letter-spacing:1px; color:var(--muted); }
.mv{ display:flex; align-items:center; gap:11px; padding:11px 8px; border-bottom:1px solid var(--hair); }
.mv .mic{ width:34px; height:34px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:18px; }
.mv .mic.in{ background:rgba(63,153,34,.16); color:var(--green); }
.mv .mic.out{ background:rgba(230,51,41,.16); color:var(--red-l); }
.mv .md{ flex:1; min-width:0; }
.mv .md p{ margin:0; } .mv .md .d{ font-size:13px; color:#EFF1F3; } .mv .md .m{ font-size:10px; color:var(--muted); margin-top:1px; }
.mv .amt{ font-size:13px; } .mv .amt.in{ color:var(--green); } .mv .amt.out{ color:var(--red-l); }

/* ── prodotti ── */
.search{ margin:4px 16px 8px; display:flex; align-items:center; gap:8px; background:rgba(255,255,255,.05); border:1px solid var(--card-line); border-radius:12px; padding:8px 11px; position:relative; z-index:1; }
.search .ti{ font-size:15px; color:var(--muted); } .search span{ font-size:12px; color:var(--muted); }
.prod .mic{ background:rgba(255,255,255,.05); color:var(--txt2); }
.qty{ font-size:14px; } .qty.ok{ color:var(--green); } .qty.low{ color:var(--amber); } .qty.zero{ color:var(--red-l); }

/* ── agenti ── */
.agent{ background:var(--card); border:1px solid var(--card-line); border-radius:14px; padding:12px; display:flex; align-items:center; gap:11px; margin-bottom:10px; }
.avatar{ width:38px; height:38px; border-radius:50%; background:rgba(230,51,41,.16); display:flex; align-items:center; justify-content:center; font-size:13px; color:var(--red-l); }
.agent .ai{ flex:1; } .agent .ai .n{ margin:0; font-size:13px; color:#EFF1F3; } .agent .ai .s{ margin:2px 0 0; font-size:10px; color:var(--muted); }
.agent .ar{ text-align:right; } .agent .ar .c{ margin:0; font-size:13px; color:var(--green); } .agent .ar .cl{ margin:1px 0 0; font-size:9px; color:var(--muted); }

/* ── footer riga ── */
.foot{ margin-top:auto; padding:12px 18px calc(18px + env(safe-area-inset-bottom)); border-top:1px solid var(--card-line); display:flex; justify-content:space-between; font-size:11px; position:relative; z-index:1; }
.foot .l{ color:var(--muted); } .foot .r{ color:var(--txt2); }

/* ── caricamento ── */
.loading{ flex:1; display:flex; align-items:center; justify-content:center; min-height:200px; position:relative; z-index:1; }
.spinner{ width:34px; height:34px; border-radius:50%; border:3px solid rgba(255,255,255,.12); border-top-color:var(--red); animation:spin .8s linear infinite; }
@keyframes spin{ to{ transform:rotate(360deg); } }

/* ── animazioni ── */
@keyframes glow{ 0%,100%{ opacity:.5; transform:scale(1);} 50%{ opacity:.9; transform:scale(1.08);} }
@keyframes bob{ 0%,100%{ transform:translateY(0);} 50%{ transform:translateY(-5px);} }
@keyframes ring{ 0%{ transform:scale(.55); opacity:.5;} 100%{ transform:scale(2); opacity:0;} }
.fade{ animation:fade .35s ease; }
@keyframes fade{ from{ opacity:0; transform:translateY(6px);} to{ opacity:1; transform:none;} }

/* ── Card fatture per filiale (drill-down Revenue day) ── */
.inv-cards{ display:flex; flex-direction:column; gap:12px; margin:14px 16px 6px; position:relative; z-index:1; }
.inv-card{ background:var(--card); border:1px solid var(--card-line); border-radius:14px; overflow:hidden; }
.inv-hdr{ display:flex; justify-content:space-between; align-items:center; padding:11px 14px; background:rgba(230,51,41,.08); border-bottom:1px solid var(--card-line); }
.inv-hdr-name{ font-size:13px; font-weight:600; color:#EFF1F3; letter-spacing:.3px; }
.inv-hdr-tot{ width:140px; text-align:right; display:inline-block; box-sizing:border-box; font-size:13px; font-weight:700; color:#fff; background:var(--card); border:1px solid #fff; padding:3px 12px; border-radius:8px; font-variant-numeric:tabular-nums; }
.inv-list{ display:flex; flex-direction:column; }
.inv-row{ display:flex; justify-content:space-between; align-items:center; padding:9px 14px; border-bottom:1px solid var(--hair); font-size:12px; }
.inv-row:last-child{ border-bottom:none; }
.inv-cli{ flex:1; color:var(--txt2); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding-right:10px; }
.inv-tot{ color:#EFF1F3; font-variant-numeric:tabular-nums; }
.inv-empty{ padding:11px 14px; color:var(--muted); font-size:12px; font-style:italic; text-align:center; }

/* ── Dettaglio fattura (schermata piena) ── */
.inv-row{ cursor:pointer; transition:background .1s; }
.inv-row:active{ background:rgba(255,255,255,.04); }
.inv-info{ padding:14px 18px; background:var(--card); border-bottom:1px solid var(--card-line); }
.inv-info-cli{ font-size:15px; font-weight:600; color:#EFF1F3; margin-bottom:4px; }
.inv-info-meta{ font-size:11px; color:var(--muted); }
.inv-info-meta strong{ color:var(--red-l); font-weight:600; }
.inv-lines-wrap{ padding:10px 4px 20px; overflow-x:auto; }
.inv-lines{ width:100%; border-collapse:collapse; font-size:11px; color:var(--txt2); }
.inv-lines th{ font-size:9px; text-transform:uppercase; text-align:left; padding:9px 6px; color:var(--muted); border-bottom:1px solid var(--card-line); font-weight:600; letter-spacing:.4px; }
.inv-lines th.ta-r, .inv-lines td.ta-r{ text-align:right; }
.inv-lines td{ padding:9px 6px; border-bottom:1px solid var(--hair); vertical-align:top; }
.inv-c-code{ font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:10px; color:var(--muted); white-space:nowrap; }
.inv-c-desc{ min-width:120px; max-width:240px; }
.inv-c-qty, .inv-c-price, .inv-c-total{ text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.inv-c-total{ color:#EFF1F3; font-weight:500; }

/* ── Bottone Condividi PDF nel dettaglio fattura ── */
.inv-share-btn{ display:inline-flex; align-items:center; gap:8px; margin-top:12px; padding:9px 16px;
  background:var(--red); color:#fff; border:none; border-radius:24px; font-size:13px; font-weight:600;
  cursor:pointer; transition:opacity .15s, transform .1s; -webkit-tap-highlight-color:transparent; }
.inv-share-btn:active{ transform:scale(0.97); opacity:.85; }
.inv-share-btn i{ font-size:16px; }
@keyframes spin-inv{ to{ transform:rotate(360deg); } }
.inv-share-btn .ti-loader-2{ display:inline-block; animation:spin-inv .8s linear infinite; }

/* ── Preventivi (Quotes) — variante blu delle fatture rosse ── */
.quote-screen{}
.quote-screen .kpi .big.blue{ color:#3B7DD8; }
.quote-screen .kpi .delta.up{ color:#3B7DD8; opacity:.85; }
.bar-blue .fill.fill-blue{ background:linear-gradient(90deg,#1D4E89 0%,#3B7DD8 100%); }
.quote-card .inv-hdr{ background:rgba(29,78,137,.10); }
.quote-card .inv-hdr-tot.quote-tot{ background:#1D4E89; color:#fff; border-color:#1D4E89; }
.quote-info .inv-info-meta strong.blue{ color:#3B7DD8; }
.quote-share-btn{ background:#1D4E89; }
.quote-lines th{ color:#3B7DD8; }

/* ── Action sheet stile iOS (con backdrop) ── */
.sheet-overlay{ position:fixed; inset:0; z-index:9999; display:flex; align-items:flex-end; justify-content:center;
  opacity:0; transition:opacity .18s ease; pointer-events:none; }
.sheet-overlay.show{ opacity:1; pointer-events:auto; }
.sheet-backdrop{ position:absolute; inset:0; background:rgba(0,0,0,.55); backdrop-filter:blur(4px); }
.sheet{ position:relative; width:100%; max-width:460px; margin:0 8px calc(8px + env(safe-area-inset-bottom)); padding:6px;
  background:#1c1c1e; border-radius:16px; display:flex; flex-direction:column; gap:1px; overflow:hidden;
  transform:translateY(30px); transition:transform .22s cubic-bezier(.2,.9,.2,1); }
.sheet-overlay.show .sheet{ transform:translateY(0); }
.sheet-title{ padding:14px 16px 4px; font-size:12px; font-weight:600; color:#8e8e93; text-align:center; letter-spacing:.5px; text-transform:uppercase; }
.sheet-sub{ padding:0 16px 12px; font-size:12px; color:#8e8e93; text-align:center; }
.sheet-btn{ background:#2c2c2e; color:#EFF1F3; border:none; padding:14px 16px; font-size:15px; font-weight:500; cursor:pointer;
  transition:background .1s; -webkit-tap-highlight-color:transparent; }
.sheet-btn:active{ background:#3a3a3c; }
.sheet-btn.primary{ color:#3B7DD8; font-weight:600; }
.sheet-btn.cancel{ margin-top:8px; border-radius:12px; color:#EFF1F3; font-weight:600; }

/* ── Anteprima PDF fullscreen (prima della share) ── */
.pdf-preview-overlay{ position:fixed; inset:0; z-index:10000; background:#1c1c1e; opacity:0; transition:opacity .2s ease; pointer-events:none; }
.pdf-preview-overlay.show{ opacity:1; pointer-events:auto; }
.pdf-preview{ position:absolute; inset:0; display:flex; flex-direction:column; }
.pdf-preview-hdr{ display:flex; align-items:center; gap:10px; padding:calc(env(safe-area-inset-top) + 10px) 12px 10px; background:#2c2c2e; border-bottom:1px solid rgba(255,255,255,.08); }
.pdf-preview-close{ background:transparent; border:none; color:#EFF1F3; font-size:22px; padding:8px 10px; cursor:pointer; border-radius:8px; -webkit-tap-highlight-color:transparent; display:flex; align-items:center; justify-content:center; }
.pdf-preview-close:active{ background:rgba(255,255,255,.06); }
.pdf-preview-ttl{ flex:1; text-align:center; font-size:14px; font-weight:500; color:#EFF1F3; }
.pdf-preview-share{ display:inline-flex; align-items:center; gap:6px; padding:8px 14px; border:none; border-radius:20px;
  color:#fff; font-size:13px; font-weight:600; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.pdf-preview-share i{ font-size:16px; }
.pdf-preview-share:active{ opacity:.85; transform:scale(.97); }
.acc-red .pdf-preview-share{ background:var(--red); }
.acc-blue .pdf-preview-share{ background:#1D4E89; }
.pdf-preview-frame{ flex:1; width:100%; border:none; background:#f4f4f4; }
.pdf-preview-scroll{ flex:1; overflow-y:auto; overflow-x:hidden; background:#333; padding:8px 0; -webkit-overflow-scrolling:touch; touch-action:pan-x pan-y pinch-zoom; overscroll-behavior:contain; min-height:0; }
.pdf-preview-page{ display:block; margin:0 auto 8px; max-width:100%; background:#fff; box-shadow:0 2px 8px rgba(0,0,0,.4); }
.pdf-preview-page:last-child{ margin-bottom:0; }

/* ── Coppia pulsanti Anteprima + Condividi (fatture/preventivi) ── */
.inv-btn-row{ display:flex; gap:8px; margin-top:12px; flex-wrap:wrap; }
.inv-btn-row .inv-share-btn{ margin-top:0; flex:1; min-width:130px; justify-content:center; }
.inv-preview-btn{ background:#2a2a2c !important; color:#EFF1F3 !important; border:1px solid rgba(255,255,255,.14) !important; }
.inv-preview-btn:active{ background:#3a3a3c !important; }
.quote-preview-btn{ border-color:rgba(59,125,216,.3) !important; }

/* ── Anteprima adattiva al device + zoom nativo iPhone ── */
.pdf-preview-frame{ touch-action:pan-x pan-y pinch-zoom !important; -webkit-overflow-scrolling:touch; min-height:0; }
@media (max-width: 480px) {
  .pdf-preview-hdr{ padding:calc(env(safe-area-inset-top) + 8px) 8px 8px; }
  .pdf-preview-ttl{ font-size:13px; }
  .pdf-preview-close{ font-size:20px; padding:6px 8px; }
  .pdf-preview-share{ padding:6px 10px; font-size:12px; }
  .pdf-preview-share span{ display:none; }
}

/* ── Note di credito — variante arancione #E65100 ── */
.cn-screen .kpi .big.orange{ color:#F57C00; }
.cn-screen .kpi .delta.up{ color:#F57C00; opacity:.85; }
.bar-orange .fill.fill-orange{ background:linear-gradient(90deg,#E65100 0%,#FB8C00 100%); }
.cn-card .inv-hdr{ background:rgba(230,81,0,.10); }
.cn-card .inv-hdr-tot.cn-tot{ background:#E65100; color:#fff; border-color:#E65100; }
.cn-info .inv-info-meta strong.orange{ color:#F57C00; }
.cn-share-btn{ background:#E65100 !important; }
.cn-preview-btn{ border-color:rgba(230,81,0,.3) !important; }
.cn-lines th{ color:#F57C00; }
.acc-orange .pdf-preview-share{ background:#E65100; }
.ncard.ncard-orange > i{ color:#F57C00; }

/* ── Note di vendita — variante verde #2E7D32 ── */
.sn-screen .kpi .big.green{ color:#66BB6A; }
.sn-screen .kpi .delta.up{ color:#66BB6A; opacity:.85; }
.bar-green .fill.fill-green{ background:linear-gradient(90deg,#2E7D32 0%,#66BB6A 100%); }
.sn-card .inv-hdr{ background:rgba(46,125,50,.10); }
.sn-card .inv-hdr-tot.sn-tot{ background:#2E7D32; color:#fff; border-color:#2E7D32; }
.sn-info .inv-info-meta strong.green{ color:#66BB6A; }
.sn-share-btn{ background:#2E7D32 !important; }
.sn-preview-btn{ border-color:rgba(46,125,50,.3) !important; }
.sn-lines th{ color:#66BB6A; }
.acc-green .pdf-preview-share{ background:#2E7D32; }
.ncard.ncard-green > i{ color:#66BB6A; }

/* ── Casse — colori entrata (verde) / uscita (rosso) sulle liste + KPI ── */
.cash-screen .kpi .big{ color:#EFF1F3; }
.bar-cash .fill.fill-cash{ background:linear-gradient(90deg,#4a4a4c 0%,#7a7a7c 100%); }
.cash-in{ color:#66BB6A; font-weight:600; }
.cash-out{ color:#E63329; font-weight:600; }
.cash-row .cash-time{ min-width:44px; color:var(--muted); font-size:11px; font-variant-numeric:tabular-nums; letter-spacing:.5px; }
.cash-row .cash-cur{ color:var(--muted); font-size:10px; opacity:.75; margin-left:4px; }

/* ── Placeholder "in preparazione" (usato in Casse in attesa endpoint per-cassa) ── */
.cash-soon{ display:flex; align-items:flex-start; gap:8px; margin:14px 18px; padding:12px 14px; border-radius:12px; background:rgba(255,255,255,.04); border:1px dashed rgba(255,255,255,.14); color:var(--muted); font-size:12px; line-height:1.5; }
.cash-soon i{ font-size:16px; opacity:.7; margin-top:1px; flex-shrink:0; }

/* ── Casse per singola cassa (lista raggruppata per valuta) ── */
.cash-group{ margin:14px 16px; border-radius:14px; background:var(--card); border:1px solid var(--card-line); overflow:hidden; }
.cash-group-hdr{ padding:10px 14px; background:rgba(255,255,255,.04); font-weight:700; font-size:12px; letter-spacing:1.5px; color:var(--txt); display:flex; align-items:center; justify-content:space-between; }
.cash-group-count{ color:var(--muted); font-size:10px; font-weight:normal; letter-spacing:.5px; }
.cash-reg-row{ display:flex; align-items:center; padding:10px 14px; border-top:1px solid var(--hair); gap:12px; }
.cash-reg-info{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; overflow:hidden; }
.cash-reg-code{ font-size:10px; color:var(--muted); font-family:ui-monospace,"SF Mono",Menlo,monospace; letter-spacing:.5px; }
.cash-reg-name{ font-size:13px; color:var(--txt); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cash-reg-amt{ font-size:14px; font-weight:600; font-variant-numeric:tabular-nums; white-space:nowrap; }
.cash-reg-amt.cash-pos{ color:#66BB6A; }
.cash-reg-amt.cash-neg{ color:#E63329; }
.cash-reg-amt.cash-zero{ color:var(--muted); }
.cash-group-sub{ padding:10px 14px; border-top:1px solid var(--hair); text-align:right; color:var(--txt2); font-size:12px; letter-spacing:.3px; background:rgba(255,255,255,.02); }

/* ── Stato pagamento fattura (pallino in lista + badge nel dettaglio) ── */
.pay-dot{ display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:8px; vertical-align:middle; }
.pay-dot-paid{ background:#66BB6A; box-shadow:0 0 0 2px rgba(102,187,106,.18); }
.pay-dot-partial{ background:#FFB300; box-shadow:0 0 0 2px rgba(255,179,0,.18); }
.pay-dot-unpaid{ background:#E63329; box-shadow:0 0 0 2px rgba(230,51,41,.18); }
.inv-paid-row{ margin-top:10px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; font-size:12px; }
.pay-badge{ display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:12px; font-size:11px; font-weight:600; letter-spacing:.3px; }
.pay-badge.pay-paid{ background:rgba(102,187,106,.14); color:#66BB6A; }
.pay-badge.pay-partial{ background:rgba(255,179,0,.14); color:#FFB300; }
.pay-badge.pay-unpaid{ background:rgba(230,51,41,.14); color:#E63329; }
.pay-detail{ color:var(--txt2); font-size:11px; line-height:1.5; }
.pay-detail strong{ color:var(--txt); font-weight:600; font-variant-numeric:tabular-nums; }

/* ── Barra filiale divisa verde (pagato) + rosso (da pagare) — usata in Fatturato e Note Vendita ── */
.track.track-split{ display:flex; overflow:hidden; }
.track.track-split .fill-paid{ height:100%; background:linear-gradient(90deg,#2E7D32 0%,#66BB6A 100%); }
.track.track-split .fill-unpaid{ height:100%; background:linear-gradient(90deg,#a02020 0%,#E63329 100%); }

/* ── Barre filiali con 3 pillole per riga + riga totali fullwidth (Fatturato / Note Vendita) ── */
.bars-pills{ padding:6px 16px; display:grid; grid-template-columns:1fr auto auto auto; column-gap:5px; row-gap:0; align-items:center; font-size:11px; font-weight:600; font-variant-numeric:tabular-nums; }
.bars-pills .bp-name{ font-size:13px; font-weight:600; color:var(--txt); }
.bars-pills .bp-pill{ border-radius:6px; width:74px; text-align:center; color:#fff; }
.bars-pills .bp-paid{ background:#2E7D32; padding:3px 0; }
.bars-pills .bp-unpaid{ background:#C0392B; padding:3px 0; }
.bars-pills .bp-total{ border:1px solid rgba(255,255,255,0.25); color:#EFF1F3; padding:2px 0; }
.bars-pills .bp-track{ grid-column:1 / -1; margin:5px 0 10px; height:5px; background:#2a2a2a; border-radius:2px; overflow:hidden; display:flex; }
.bars-pills .bp-fill-paid{ height:100%; background:linear-gradient(90deg,#2E7D32 0%,#66BB6A 100%); }
.bars-pills .bp-fill-unpaid{ height:100%; background:linear-gradient(90deg,#a02020 0%,#E63329 100%); }
.bars-pills .bp-div{ grid-column:1 / -1; height:1px; background:rgba(255,255,255,0.10); margin:2px 0 10px; }
.bars-pills .bp-totals{ grid-column:1 / -1; display:grid; grid-template-columns:1fr 1fr 1fr; gap:6px; font-size:13px; font-weight:700; }
.bars-pills .bp-totals .bp-pill{ width:auto; }
.bars-pills .bp-totals .bp-paid{ padding:7px 0; }
.bars-pills .bp-totals .bp-unpaid{ padding:7px 0; }
.bars-pills .bp-totals .bp-total{ padding:6px 0; border-width:1.5px; border-color:rgba(255,255,255,0.35); }

/* ── Importi lista fatture/note vendita: verde per pagate, 3 valori per parziali ── */
.pay-amt-paid{ color:#66BB6A; font-weight:700; font-variant-numeric:tabular-nums; }
.pay-parcial{ display:inline-flex; align-items:center; gap:6px; font-size:11px; font-variant-numeric:tabular-nums; }
.pay-p-paid{ color:#66BB6A; font-weight:700; }
.pay-p-unpaid{ color:#E63329; font-weight:700; }
.pay-p-total{ color:#EFF1F3; font-weight:700; }
.pay-p-sep{ color:#666; font-weight:400; }

/* ── Tagline splash "Sinonim i cilësisë" ── */
.brand-tagline{ margin:14px 0 0; font-size:16px; letter-spacing:2.2px; color:#b8b8b8; font-weight:400; text-align:center; }

/* ── Hero home: riga navigazione giorno con frecce ← → ── */
.hero-nav{ display:flex; align-items:center; justify-content:center; gap:6px; margin:0 0 4px; }
.hero-nav .hero-lab{ flex:1; text-align:center; margin:0; min-width:0; }
.hero-arrow{ background:transparent; border:none; color:#8A8A8A; padding:6px 10px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; border-radius:8px; -webkit-tap-highlight-color:transparent; flex-shrink:0; touch-action:manipulation; }
.hero-arrow:active{ background:rgba(255,255,255,.06); color:#EFF1F3; }
.hero-arrow.disabled{ color:#3a3a3a; pointer-events:none; }
.hero-arrow i{ font-size:18px; }

/* ── KPI enlarged (Fatturato day view) con Pagato / Da pagare ── */
.kpi.kpi-lg{ padding:22px 20px; border-radius:18px; }
.kpi-lg .kpi-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.kpi-lg .kpi-top .lab{ font-size:10px; letter-spacing:1.5px; color:#8a8a8a; font-weight:600; margin:0; }
.kpi-lg .kpi-top .delta{ margin:0; font-size:12px; font-weight:600; display:inline-flex; align-items:center; gap:3px; }
.kpi-lg .kpi-big{ font-size:34px; font-weight:400; letter-spacing:-.7px; margin:10px 0 14px; }
.kpi-lg .kpi-row{ display:flex; justify-content:space-between; align-items:baseline; padding:7px 0; }
.kpi-lg .kpi-lbl{ font-size:14px; }
.kpi-lg .kpi-val{ font-size:16px; font-weight:600; font-variant-numeric:tabular-nums; }
.kpi-lg .kpi-paid{ color:#66BB6A; }
.kpi-lg .kpi-due{ color:#E63329; }

/* ── Branch stack cards (una per filiale, sotto il KPI) ── */
.branch-stack{ padding:0 16px 6px; display:flex; flex-direction:column; gap:12px; position:relative; z-index:1; }
.branch-card{ background:var(--card); border:1px solid var(--card-line); border-radius:14px; padding:16px 18px; }
.branch-card-name{ font-size:16px; font-weight:600; letter-spacing:.3px; margin-bottom:12px; color:var(--txt); }
/* Grid con colonne FISSE: label (1fr) | € (fixed 22px) | numero (fixed 110px). Nessuna variazione tra righe → allineamento perfetto. */
.branch-card .branch-grid{ display:grid; grid-template-columns:1fr 22px 110px; align-items:baseline; column-gap:8px; row-gap:6px; padding:4px 0; }
.branch-card .branch-lbl{ font-size:14px; font-weight:500; }
.branch-card .branch-sym{ font-size:15px; font-weight:600; font-variant-numeric:tabular-nums; text-align:right; }
.branch-card .branch-val{ font-size:15px; font-weight:600; font-variant-numeric:tabular-nums; text-align:right; }
.branch-card .kpi-paid{ color:#66BB6A; }
.branch-card .kpi-due{ color:#E63329; }
/* Total: stessa font-size e stesso font-weight di Paid/Due, distinto solo da colore + border-top. */
.branch-card .branch-lbl-total{ color:#EFF1F3; padding-top:8px; border-top:1px solid rgba(255,255,255,.08); }
.branch-card .branch-sym-total, .branch-card .branch-val-total{ color:#EFF1F3; padding-top:8px; border-top:1px solid rgba(255,255,255,.08); }
/* Card totali documenti/agente — grid con colonne FISSE per allineamento perfetto. */
.mtot-card{ margin:6px 16px 6px; padding:12px 16px; border-radius:14px; background:rgba(255,255,255,.04); border:1px solid var(--card-line); }
.mtot-grid{ display:grid; grid-template-columns:1fr 22px 110px; align-items:baseline; column-gap:8px; row-gap:6px; }
.mtot-lbl{ font-size:12px; letter-spacing:.5px; color:var(--muted); text-transform:uppercase; }
.mtot-sym{ font-size:14px; font-weight:600; font-variant-numeric:tabular-nums; text-align:right; }
.mtot-val{ font-size:14px; font-weight:600; font-variant-numeric:tabular-nums; text-align:right; }
.mtot-lbl-total{ color:#EFF1F3; padding-top:8px; border-top:1px solid rgba(255,255,255,.08); }
.mtot-sym-total, .mtot-val-total{ color:#EFF1F3; padding-top:8px; border-top:1px solid rgba(255,255,255,.08); }

/* ── Drill-down filiali: collapsed di default, si espandono al tap ── */
.inv-card{ cursor:pointer; }
.inv-hdr{ cursor:pointer; -webkit-tap-highlight-color:transparent; }
.inv-hdr .inv-hdr-chev{ font-size:16px; color:var(--muted); transition:transform .18s ease; margin-left:6px; }
.inv-card.expanded .inv-hdr .inv-hdr-chev{ transform:rotate(180deg); color:#EFF1F3; }
.inv-card .inv-list{ display:none; }
.inv-card.expanded .inv-list{ display:block; }

/* ── Anello % pagato nelle branch cards ── */
.branch-ring-wrap{ display:flex; justify-content:center; margin:8px 0 14px; }
.branch-ring{ display:block; }

/* ── Striscia sottile pagato/da pagare in fondo alla branch-card ── */
.branch-strip{ height:2px; margin-top:12px; border-radius:1px; overflow:hidden; background:#1a1a1a; display:flex; }
.branch-strip-paid{ height:100%; background:#66BB6A; }
.branch-strip-due{ height:100%; background:#E63329; }

/* ── Privacy toggle sul hero fatturato ── */
.hero-val-row{ display:flex; align-items:center; gap:10px; }
.hero-val-row .hero-val{ flex:1; min-width:0; margin-top:0; }
.hero-val.hidden-amount{ color:#8a8a8a; letter-spacing:2px; }
.hero-eye{ background:transparent; border:none; color:#8a8a8a; padding:8px; cursor:pointer; border-radius:8px; display:inline-flex; align-items:center; justify-content:center; -webkit-tap-highlight-color:transparent; touch-action:manipulation; flex-shrink:0; }
.hero-eye:active{ background:rgba(255,255,255,.06); color:#EFF1F3; }
.hero-eye i{ font-size:20px; }


/* FIX SCROLL HOME 21/07/2026 */
button, a, .card, .cell, .row, .pill, .tab, .tag, .lang, .lang-btn, .nav-card, .home-tile, .doc-item, .icon-btn, .hero-arrow, .hero-eye, .section-header, .setting-row, .filter-chip { touch-action: manipulation; }
