/* =========================================================
   HYPERVEX — scheda «Oggi» della Nutrizione del cliente, lato coach (js/nutri-oggi.js)   (3/11/2026)
   ---------------------------------------------------------
   Tutto sotto .nto. Colori dai token dell'app (--surface*, --line*, --txt*, --red = accento scelto dal coach, --ok) e --ny-over, lo stesso
   arancione del diario dell'atleta per «oltre l'obiettivo». Sul computer il contenitore è .card, sul telefono .cm-card (coach-mobile.css):
   qui dentro solo l'interno. Nessun ingresso animato: la scheda si ridisegna da sola ogni 30 s e deve restare ferma (le barre cambiano
   misura, il resto no). prefers-reduced-motion: niente transizioni.
   ========================================================= */
.nto-wrap{ min-width:0; }
.nto{ display:flex; flex-direction:column; gap:14px; min-width:0; }
.nto-head{ display:flex; align-items:center; gap:9px; min-height:32px; }
.nto-head > .ic{ color:var(--red); width:21px; height:21px; flex:none; }
.nto-head > b{ font-size:16.5px; font-weight:900; letter-spacing:-.3px; }
.nto-date{ min-width:0; font-size:12.5px; font-weight:800; color:var(--txt-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.nto-sp{ flex:1; }
.nto-ref{ flex:none; width:40px; height:40px; margin:-4px -4px -4px 0; border-radius:12px; display:grid; place-items:center; cursor:pointer;
  color:var(--txt-2); background:var(--surface-2); border:1px solid var(--line); transition:background .18s, border-color .18s, transform .16s cubic-bezier(.2,.8,.2,1); }
.nto-ref .ic{ width:18px; height:18px; transition:transform .35s cubic-bezier(.2,.8,.2,1); }
.nto-ref:active{ transform:scale(.93); }
.nto-ref:active .ic{ transform:rotate(180deg); }
.nto-ref:focus-visible{ outline:2px solid var(--red); outline-offset:2px; }
@media (hover:hover){ .nto-ref:hover{ border-color:color-mix(in srgb, var(--red) 42%, var(--line)); color:var(--txt); } }

/* ---------- calorie ---------- */
.nto-top{ display:flex; flex-direction:column; gap:4px; }
.nto-kcal{ display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.nto-kcal b{ font-size:34px; line-height:1; font-weight:900; letter-spacing:-1px; font-variant-numeric:tabular-nums; }
.nto-kcal span{ font-size:15px; font-weight:800; color:var(--txt-3); }
.nto-sub{ font-size:13.5px; font-weight:800; color:var(--txt-2); line-height:1.4; }
.nto-sub.over{ color:var(--ny-over, #FF8A33); }

/* ---------- barre (macro e acqua) ---------- */
.nto-bar{ height:6px; border-radius:99px; background:var(--surface-3); overflow:hidden; }
.nto-bar i{ display:block; height:100%; border-radius:inherit; background:var(--red); transition:width .5s cubic-bezier(.2,.8,.2,1); }
.nto-bar i.over{ background:var(--ny-over, #FF8A33); }
.nto-bar.w i{ background:#58A6FF; }
.nto-top > .nto-bar{ height:8px; margin:6px 0 2px; }

/* ---------- macro ---------- */
.nto-macs{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px; }
.nto-mac{ min-width:0; }
.nto-mac .l{ font-size:11px; font-weight:900; letter-spacing:.4px; text-transform:uppercase; color:var(--txt-3); margin-bottom:7px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.nto-mac .v{ margin-top:7px; font-size:15px; font-weight:900; font-variant-numeric:tabular-nums; line-height:1.25; }
.nto-mac .v span{ font-size:12px; font-weight:800; color:var(--txt-3); }

/* ---------- acqua ---------- */
.nto-water{ display:flex; align-items:center; gap:9px; flex-wrap:wrap; font-size:13.5px; font-weight:800; color:var(--txt-2); }
.nto-water > .ic{ width:18px; height:18px; color:#58A6FF; flex:none; }
.nto-water b{ color:var(--txt); font-variant-numeric:tabular-nums; }
.nto-water .nto-bar{ flex:1 1 90px; min-width:90px; }

/* ---------- pasti ---------- */
.nto-meals{ display:flex; flex-direction:column; border-top:1px solid var(--line-soft); }
.nto-meal{ display:grid; grid-template-columns:14px minmax(0, 1fr) auto; column-gap:10px; row-gap:3px; align-items:center; padding:11px 0; border-bottom:1px solid var(--line-soft); }
.nto-meal:last-child{ border-bottom:0; padding-bottom:2px; }
.nto-mdot{ width:10px; height:10px; border-radius:50%; border:2px solid var(--txt-3); box-sizing:border-box; justify-self:center; }
.nto-meal.ok .nto-mdot{ background:var(--ok); border-color:var(--ok); }
.nto-meal.over .nto-mdot{ background:var(--ny-over, #FF8A33); border-color:var(--ny-over, #FF8A33); }
.nto-mt{ min-width:0; display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
.nto-mt b{ font-size:14.5px; font-weight:900; overflow-wrap:anywhere; }
.nto-mt i{ font-style:normal; font-size:12px; font-weight:800; color:var(--txt-3); }
.nto-mk{ font-size:14.5px; font-weight:900; font-variant-numeric:tabular-nums; text-align:right; white-space:nowrap; }
.nto-mk small{ font-size:12px; font-weight:800; color:var(--txt-3); }
.nto-mi{ grid-column:2 / -1; font-size:13px; font-weight:700; color:var(--txt-2); line-height:1.45; overflow-wrap:anywhere; }
.nto-mi em{ font-style:normal; color:var(--txt-3); font-weight:800; }
.nto-meal.todo .nto-mt b{ color:var(--txt-2); }
.nto-meal.todo .nto-mk{ color:var(--txt-3); }
.nto-meal.todo .nto-mi{ color:var(--txt-3); }

/* ---------- cliente nuovo, niente da mostrare: una riga ---------- */
.nto-bare{ gap:8px; }

/* ---------- avvisi e piede ---------- */
.nto-empty{ font-size:13.5px; font-weight:800; color:var(--txt-3); }
.nto-note{ font-size:12.5px; font-weight:700; color:var(--txt-3); line-height:1.45; padding:9px 11px; border-radius:12px; background:var(--surface-2); border:1px solid var(--line-soft); }
.nto-foot{ font-size:11.5px; font-weight:700; color:var(--txt-3); }

/* telefono: dentro .cm-card il respiro è già dato dal contenitore */
body.coach-m .nto{ gap:12px; }
body.coach-m .nto-kcal b{ font-size:30px; }

@media (prefers-reduced-motion: reduce){
  .nto-bar i, .nto-ref, .nto-ref .ic{ transition:none !important; }
}
