:root { color-scheme: light;
  --bg: #ffffff; --field: #ffffff; --card: #ffffff; --ink: #1d231c; --muted: #66705f; --line: #dfe3d9;
  --accent: #1565c0; --accent-2: #2196f3; --accent-ink: #ffffff; --accent-soft: #e3f1fd;
  --warn: #9a5b00; --warn-soft: #fdf1dc; --bad: #a3262a; --bad-soft: #fbe5e5; --ok: #0d47a1;
  --radius: 12px; --shadow: 0 1px 2px rgba(0,0,0,.06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--ink); padding-bottom: 84px; }
a { color: var(--accent); }
header.top { position: sticky; top: 0; z-index: 5; background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
header.top .brand { font-weight: 700; text-decoration: none; color: var(--ink); }
header.top .spacer { flex: 1; }
header.top .user { color: var(--muted); font-size: 14px; text-decoration: none; }
main { max-width: 980px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 4px 0 14px; }
h2 { font-size: 18px; margin: 22px 0 10px; }
h3 { font-size: 16px; margin: 14px 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.flash { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 10px 14px; margin-bottom: 14px; }
.errori { background: var(--bad-soft); border: 1px solid var(--bad); color: var(--ink); border-radius: var(--radius);
  padding: 10px 14px; margin-bottom: 14px; }
.errori li { margin-left: -12px; }

/* pulsanti grandi */
.azioni { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.primario { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--accent-ink); border-color: var(--accent); }
.btn.grande { min-height: 64px; font-size: 17px; }
.btn.piccolo { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn.pericolo { color: var(--bad); border-color: var(--bad); }
.btn.fatto { background: var(--accent-soft); color: var(--ok); border-color: var(--accent); }
.btn:disabled { opacity: .5; }

/* form */
form .campo { margin-bottom: 12px; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
input, select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; color: var(--ink);
  background: var(--field); border: 1px solid #c9cfc4; border-radius: 10px; }
textarea { min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.riga { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.riga3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 0 0 14px; }
legend { font-weight: 700; padding: 0 6px; }
.info-live { font-size: 14px; margin-top: 6px; min-height: 20px; }
.info-live.ok { color: var(--ok); } .info-live.bad { color: var(--bad); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.check input { width: 22px; min-height: 22px; }

/* elenchi / tabelle */
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
.tabella-scroll { overflow-x: auto; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--accent-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.grigio { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.task { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0;
  border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task .t-main { flex: 1; min-width: 0; }
.task .t-tit { font-weight: 700; font-size: 17px; }
.task.fatta .t-tit { text-decoration: line-through; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; }
.kv dt { color: var(--muted); font-size: 14px; } .kv dd { margin: 0; font-weight: 600; }
.prep { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.prep .card { margin: 0; }
.big { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.filtri { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.paginazione { display: flex; gap: 10px; justify-content: center; align-items: center; margin: 14px 0; }

/* barra in basso stile app */
nav.bottom { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; background: var(--card);
  border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom); }
nav.bottom a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 10px;
  text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600; }
nav.bottom a svg { width: 24px; height: 24px; }
nav.bottom a.on { color: var(--accent); }

@media (min-width: 760px) {
  .azioni { grid-template-columns: repeat(3, 1fr); }
  .filtri { grid-template-columns: repeat(5, 1fr) auto; align-items: end; }
  .prep { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) { .riga3 { grid-template-columns: 1fr 1fr; } }
@media print { nav.bottom, header.top, .no-print { display: none !important; } body { padding: 0; } }
.filtri > *, .riga > *, .riga3 > * { min-width: 0; }
input[type=date], input[type=time] { min-width: 0; }
.solo-mobile { display: none; }
@media (max-width: 700px) { .solo-desktop { display: none; } .solo-mobile { display: block; } }
.voce { padding: 10px 0; border-bottom: 1px solid var(--line); }
.voce:last-child { border-bottom: 0; }

/* numero del vitello colorato per sesso */
a.num-m, .num-m { color: #1565c0; }
a.num-f, .num-f { color: #d81b60; }
/* selettore SÌ / NO */
.sino { display: inline-flex; border: 1px solid #c9cfc4; border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.sino input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.sino label { margin: 0; padding: 10px 18px; font-size: 15px; cursor: pointer; color: var(--muted); }
.sino input:checked + label { background: var(--accent); color: var(--accent-ink); }
.sino input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: -2px; }
[hidden] { display: none !important; }
th.prod, td.prod { text-align: center; padding-left: 3px; padding-right: 3px; }
th.prod { font-size: 11px; }
td.prod .badge { padding: 2px 6px; }
@media (max-width: 480px) {
  th, td { padding: 8px 4px; }
  .card.tabella-scroll { padding: 8px 10px; }
  td .badge { font-size: 11px; padding: 2px 6px; }
}

/* header */
header.top .brand { color: var(--accent); letter-spacing: .06em; font-size: 20px; font-weight: 800; }
header.top .ingranaggio { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink);
  font-size: 14px; font-weight: 600; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; }
header.top .ingranaggio svg { width: 18px; height: 18px; }
/* avviso triangolo */
button.avviso { background: none; border: 0; padding: 0 6px 0 0; cursor: pointer; vertical-align: middle; min-height: 0; }
.toast { position: fixed; left: 16px; right: 16px; bottom: 90px; z-index: 20; background: #b71c1c; color: #fff;
  padding: 14px 16px; border-radius: 12px; font-weight: 600; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
/* login */
.logo-login { font-size: 44px; font-weight: 800; letter-spacing: .12em; color: var(--accent); margin: 0; }
.riga3.fascia, .riga3.giorni-prodotto { grid-template-columns: 1fr 1fr 1fr !important; }
.azioni > :last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 760px) { .azioni > :last-child:nth-child(odd) { grid-column: auto; } }
.simbolo { font-weight: 700; }
/* schede delle Liste */
.schede { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 14px; padding-bottom: 2px; }
.schede a { flex: 0 0 auto; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none;
  color: var(--ink); font-weight: 600; font-size: 14px; }
.schede a.on { background: var(--accent); border-color: var(--accent); color: #fff; }
/* sposta */
.scelta-vitello { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.scelta-vitello input { width: 24px; min-height: 24px; flex-shrink: 0; }
.scelta-vitello:has(input:checked) { background: var(--accent-soft); }
.barra-sposta { position: sticky; bottom: 76px; background: #fff; padding: 10px 0; border-top: 1px solid var(--line); }
.riga-box { display: grid; grid-template-columns: 64px 1fr auto; gap: 6px 10px; align-items: center; padding: 10px 0;
  border-bottom: 1px solid var(--line); }
.riga-box input.box-ordine, .riga-box input.box-nome { min-height: 40px; padding: 6px 10px; }
.riga-box .box-flag { grid-column: 2 / -1; display: flex; gap: 18px; }
.riga-box .box-flag .check { margin: 0; }
.tit-box { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.score-inline { display: flex; gap: 6px; align-items: center; }
.score-inline input { width: 84px; min-height: 38px; padding: 6px 8px; }
.kv { grid-template-columns: 150px 1fr; }
/* finestra di conferma */
.conferma-sfondo { position: fixed; inset: 0; background: rgba(10, 25, 50, .45); z-index: 50; display: flex;
  align-items: flex-end; justify-content: center; padding: 16px; }
@media (min-width: 600px) { .conferma-sfondo { align-items: center; } }
.conferma-box { background: #fff; border-radius: 16px; width: 100%; max-width: 460px; padding: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,.3); max-height: 85vh; overflow: auto; }
.conferma-box h3 { margin: 0 0 12px; font-size: 18px; }
.conferma-box dl { margin: 0 0 16px; display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 15px; }
.conferma-box dt { color: var(--muted); } .conferma-box dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.conferma-box .bottoni { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.riga-box .box-flag { flex-wrap: wrap; gap: 6px 18px; }
.sezioni { display: grid; gap: 10px; }
@media (min-width: 760px) { .sezioni { grid-template-columns: 1fr 1fr; } }
.sezione { display: block; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none;
  color: var(--ink); background: #fff; box-shadow: var(--shadow); }
.sezione strong { display: block; font-size: 17px; margin-bottom: 4px; color: var(--accent); }
.sezione span { font-size: 14px; color: var(--muted); }
.sezione:active { background: var(--accent-soft); }
/* vaccini */
.legenda { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.leg { padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--line); }
.leg.in_eta, .vac-in_eta { background: #e3f1fd; }
.leg.ritardo { background: var(--bad-soft); color: var(--bad); }
.leg.completo { color: var(--muted); }
.vac-ritardo { background: #fff4f4; box-shadow: inset 4px 0 0 var(--bad); }
.vac-in_eta { box-shadow: inset 4px 0 0 var(--accent); }
.vac-completo { opacity: .6; }
.dosi-chip { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chip { font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.chip.fatta { background: var(--accent-soft); color: var(--ok); border-color: transparent; font-weight: 700; }
.chip.prossima { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.stato-vac { font-size: 11px; font-weight: 800; color: var(--accent); text-align: right; min-width: 56px; }
.vac-ritardo .stato-vac { color: var(--bad); }
.vac-completo .stato-vac { color: var(--muted); }
.scelta-vitello:has(input:checked) { background: var(--accent-soft) !important; }
.scelta-vitello .kg { width: 76px; min-height: 38px; padding: 6px 8px; flex-shrink: 0; }
.scelta-vitello .kg:disabled { opacity: .35; }
.riga3.dose { grid-template-columns: 58px 1fr 1fr !important; }
.schede { flex-wrap: wrap; overflow: visible; }
/* logo DATTO */
@font-face { font-family: "Lilita One"; src: url("/static/fonts/lilita-one.woff2") format("woff2"); font-display: swap; }
header.top .brand, .logo-login { font-family: "Lilita One", system-ui, sans-serif; font-weight: 400;
  background: linear-gradient(135deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text;
  color: transparent; letter-spacing: .08em; }
header.top .brand { font-size: 26px; line-height: 1; }
.logo-login { font-size: 64px; line-height: 1.05; }
/* capitoli apribili della home */
details.capitolo { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px;
  box-shadow: var(--shadow); }
details.capitolo > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  padding: 16px; min-height: 64px; flex-wrap: wrap; }
details.capitolo > summary::-webkit-details-marker { display: none; }
details.capitolo > summary::after { content: ""; width: 10px; height: 10px; margin-left: auto; flex-shrink: 0;
  border-right: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(45deg);
  transition: transform .15s; order: 3; }
details.capitolo[open] > summary::after { transform: rotate(-135deg); }
details.capitolo[open] > summary { border-bottom: 1px solid var(--line); }
.cap-tit { font-size: 18px; font-weight: 800; }
.cap-info { display: flex; gap: 6px; flex-wrap: wrap; order: 2; }
.cap-corpo { padding: 14px 16px 16px; }
.cap-corpo .card { box-shadow: none; }
@media print { details.capitolo > summary::after { display: none; } }
.prep > * { min-width: 0; }
.prep .kv { grid-template-columns: max-content 1fr; }
@media (max-width: 480px) { .cap-corpo { padding: 12px 10px 14px; } details.capitolo > summary { padding: 14px 12px; } }
/* tasto Indietro */
header.top .indietro { display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px 8px 8px; min-height: 42px;
  border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; text-decoration: none;
  box-shadow: 0 2px 6px rgba(21, 101, 192, .3); }
header.top .indietro svg { width: 22px; height: 22px; }
header.top .indietro:active { transform: scale(.97); }
header.top { gap: 10px; }
@media (max-width: 400px) {
  header.top .testo-imp { display: none; }
  header.top .ingranaggio { padding: 8px; }
  header.top .brand { font-size: 22px; }
}
.conferma-box .bottoni.tre { grid-template-columns: 1fr; }
/* barra in basso: Oggi · + · Consulta */
nav.bottom { grid-template-columns: 1fr 96px 1fr; align-items: end; }
nav.bottom .piu { justify-self: center; width: 64px; height: 64px; margin-top: -26px; margin-bottom: 8px; border-radius: 50%;
  border: 4px solid #fff; background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #fff;
  box-shadow: 0 6px 16px rgba(21, 101, 192, .4); display: flex; align-items: center; justify-content: center; cursor: pointer; }
nav.bottom .piu svg { width: 30px; height: 30px; }
nav.bottom .piu:active { transform: scale(.95); }
nav.bottom a { font-size: 12px; }
/* foglio delle azioni */
.foglio-sfondo { position: fixed; inset: 0; z-index: 40; background: rgba(10, 25, 50, .45); display: flex; align-items: flex-end; justify-content: center; }
.foglio { background: #fff; width: 100%; max-width: 520px; border-radius: 20px 20px 0 0; padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
  display: grid; gap: 10px; animation: sali .18s ease-out; }
@keyframes sali { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.foglio-testa { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.foglio-testa strong { font-size: 18px; }
.foglio .chiudi { border: 1px solid var(--line); background: #fff; border-radius: 50%; width: 40px; height: 40px; font-size: 18px; cursor: pointer; }
.foglio .btn.grande { justify-content: flex-start; padding-left: 20px; }
/* consulta */
.cerca-grande label { font-size: 16px; }
.sezione.disattiva { opacity: .55; }
.sezione.disattiva strong { color: var(--muted); }
/* barra: lente solo icona */
nav.bottom a.lente svg { width: 30px; height: 30px; }
nav.bottom a.lente { justify-content: center; }
/* archivio */
.grandi { display: grid; gap: 12px; }
@media (min-width: 760px) { .grandi { grid-template-columns: 1fr 1fr; } }
.grande-voce { display: grid; grid-template-columns: 48px 1fr; gap: 2px 12px; align-items: center; padding: 18px 16px;
  border-radius: var(--radius); background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #fff; text-decoration: none;
  box-shadow: 0 3px 10px rgba(21, 101, 192, .25); }
.grande-voce .ico { grid-row: span 2; font-size: 32px; text-align: center; }
.grande-voce strong { font-size: 19px; }
.grande-voce span:not(.ico) { font-size: 14px; opacity: .9; }
.grande-voce.disattiva { background: #eef1f5; color: var(--muted); box-shadow: none; }
.grande-voce:active { transform: scale(.99); }
.schede.sotto a { font-size: 13px; padding: 6px 12px; }
/* ecografie */
.riga-eco { padding: 10px 0; border-bottom: 1px solid var(--line); }
.riga-eco:last-child { border-bottom: 0; }
.riga-eco-testa { margin-bottom: 6px; }
.punti { display: flex; gap: 6px; align-items: center; }
.punti input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.punti label { width: 44px; height: 44px; margin: 0; display: flex; align-items: center; justify-content: center; border-radius: 10px;
  border: 1px solid #c9cfc4; font-weight: 800; font-size: 18px; cursor: pointer; color: var(--ink); }
.punti input:checked + label.p0 { background: #2e7d32; border-color: #2e7d32; color: #fff; }
.punti input:checked + label.p1, .punti input:checked + label.p2 { background: #ef8f00; border-color: #ef8f00; color: #fff; }
.punti input:checked + label.p3, .punti input:checked + label.p4 { background: #c62828; border-color: #c62828; color: #fff; }
.punti input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.punti .azzera { margin-left: 4px; border: 0; background: none; color: var(--muted); font-size: 16px; cursor: pointer; width: 32px; height: 32px; }
.punteggio { display: inline-flex; width: 34px; height: 34px; border-radius: 8px; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; background: #2e7d32; }
.punteggio.p1, .punteggio.p2 { background: #ef8f00; }
.punteggio.p3, .punteggio.p4 { background: #c62828; }
.btn.btn-rosso { background: #c62828; border-color: #c62828; color: #fff; margin-top: 6px; }
/* dashboard */
.schede.periodo a { font-size: 13px; padding: 6px 12px; }
.indice { font-size: 14px; margin: 0 0 14px; color: var(--muted); }
.card.dash h2 { margin-top: 0; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 8px; }
@media (min-width: 760px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.tile-val { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tile-et { font-size: 13px; color: var(--muted); }
.tile-nota { font-size: 12px; color: var(--muted); margin-top: 2px; }
.torta-box { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.graf-torta { width: 180px; height: 180px; flex-shrink: 0; }
.legenda-graf { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 180px; }
.legenda-graf li { display: grid; grid-template-columns: 14px 1fr auto 52px; gap: 8px; align-items: center; padding: 5px 0;
  border-bottom: 1px solid var(--line); font-size: 15px; }
.legenda-graf li span.muted { text-align: right; font-size: 13px; }
.pallino { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; }
.legenda-inline { display: flex; gap: 16px; margin: 0 0 6px; }
.graf-scroll { overflow-x: auto; }
.graf-barre { display: block; max-width: 100%; height: auto; min-width: 320px; }
.graf-barre [data-tip]:hover, .graf-torta [data-tip]:hover { opacity: .8; }
tr.totale td { border-top: 2px solid var(--line); }
.hbarre { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 38%) 1fr 40px; gap: 8px; align-items: center; font-size: 14px; }
.hbar-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-traccia { background: #f1f3ee; border-radius: 4px; height: 14px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.hbar strong { text-align: right; font-variant-numeric: tabular-nums; }
.due-col { display: grid; gap: 16px; }
@media (min-width: 760px) { .due-col { grid-template-columns: 1fr 1fr; } }
.tip-graf { position: fixed; z-index: 60; background: #1d231c; color: #fff; font-size: 13px; padding: 6px 10px; border-radius: 8px;
  pointer-events: none; white-space: nowrap; }
/* loghi */
header.top .brand { display: inline-flex; align-items: center; gap: 8px; }
header.top .brand .logo-testa { height: 30px; width: auto; }
.testata-login { text-align: center; margin-bottom: 22px; }
.testata-login .logo-vitello { width: 150px; height: auto; display: block; margin: 0 auto 6px; }
.testata-login .logo-login { margin: 0; }
.testata-login .sottotitolo { margin: 2px 0 12px; font-size: 17px; }
.powered { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: var(--muted); }
.powered img { height: 22px; width: auto; }
.powered strong { color: #7b1e3a; }

/* altri farmaci o integratori */
.prodotto-extra { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 2px; margin-bottom: 10px; }
.score-riga { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.score-riga:last-child { border-bottom: 0; }
.score-riga .info { flex: 1; min-width: 0; }
.score-riga input { width: 90px; flex: none; }
.prodotto-extra .riga3 { grid-template-columns: 1fr 1fr 1fr !important; }

img.emoji { width: 1.15em; height: 1.15em; vertical-align: -0.2em; display: inline-block; }
.dosi .riga.dose { grid-template-columns: 1fr !important; }
.dosi .riga.dose .campo { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dosi .riga.dose label { margin: 0; }
.dosi .riga.dose input { max-width: 110px; }

.eco-input { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ric { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; margin: 0; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer; white-space: nowrap; }
.ric input { width: 18px; min-height: 18px; margin: 0; }
.ric:has(input:checked) { border-color: var(--accent); background: #e3f1fd; color: var(--accent); }
.nota-ric { margin-top: 3px; }
.riga-eco.ricontrollo { box-shadow: inset 4px 0 0 #eda100; padding-left: 10px; }

/* report */
.solo-stampa { display: none; }
.scorciatoie { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.scorciatoie .btn.on { border-color: var(--accent); color: var(--accent); background: #e3f1fd; }
.rep h2 { margin-top: 0; }
.rep-data { font-size: 15px; margin: 16px 0 4px; padding-bottom: 4px; border-bottom: 2px solid var(--accent); color: var(--accent); }
.rep-vac { font-size: 17px; margin: 18px 0 0; }
.rep-tab { width: 100%; border-collapse: collapse; }
.rep-tab td { padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
.rep-tab td.rep-num { width: 1%; white-space: nowrap; padding-right: 12px; }
@media print {
  .solo-stampa { display: block; }
  .rep { break-inside: auto; border: 0; box-shadow: none; padding: 0; }
  .rep-data { break-after: avoid; }
  .rep-tab tr { break-inside: avoid; }
  a.num-m, a.num-f { text-decoration: none; }
}

/* cronologia del vitello */
.crono { border-left: 3px solid var(--line); margin: 0 0 18px 6px; padding-left: 14px; }
.crono-voce { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.crono-voce::before { content: ""; position: absolute; left: -22px; top: 16px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent); border: 2px solid #fff; }
.crono-data { margin-bottom: 4px; font-size: 14px; }
.crono-terapia::before { background: #e34948; }
.crono-ecografia::before { background: #e87ba4; }
.crono-vaccino::before { background: #1baf7a; }
.crono-spostamento::before { background: #9a998f; }
.crono-morte { border-color: var(--bad); }
.crono-morte::before { background: #000; }

.scelta-vitello .transp { width: 84px; flex: none; min-height: 38px; padding: 6px 8px; }

/* piano box: riordino e X rossa */
.riga-box { grid-template-columns: 32px 1fr auto auto !important; }
.riga-box .box-flag { grid-column: 2 / -1; }
.maniglia { font-size: 22px; color: var(--muted); cursor: grab; touch-action: none; user-select: none; text-align: center; line-height: 40px; }
.riga-box.trascina { background: #e3f1fd; border-radius: 10px; box-shadow: 0 4px 14px rgba(21, 101, 192, .25); }
.x-rossa { border: 0; background: none; color: var(--bad); font-size: 20px; font-weight: 700; cursor: pointer; padding: 4px 8px; line-height: 1; }
.x-rossa:hover { background: var(--bad-soft); border-radius: 8px; }
.uscite { display: grid; gap: 12px; }
.tipo-vendita { width: 110px; flex: none; min-height: 38px; padding: 4px 6px; }
.kg-vendita { width: 70px; flex: none; min-height: 38px; padding: 4px 6px; }
.nota-voce { padding: 6px 0; border-bottom: 1px solid var(--line); }
.nota-voce:last-child { border-bottom: 0; }
.scelta-vitello.con-campi { flex-wrap: wrap; }
.uscita-campi { display: flex; gap: 8px; flex-basis: 100%; padding-left: 34px; }
.uscita-campi .tipo-vendita { flex: 1; width: auto; }
.uscita-campi .kg-vendita { width: 90px; }

/* piano latte: fasce trascinabili */
#fasce .fascia { display: grid; grid-template-columns: 28px 1fr 1fr 1fr auto; gap: 8px; align-items: end; padding: 6px 0; }
#fasce .fascia .maniglia { line-height: 44px; }
#fasce .fascia .campo { margin: 0; }
#fasce .fascia .f-da { background: #f3f5f8; color: var(--muted); }
#fasce .fascia .x-rossa { margin-bottom: 8px; }
#fasce .fascia.trascina { background: #e3f1fd; border-radius: 10px; }
.scelta-box { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.scelta-box .check { margin: 0; }
#fasce .f-a.errata { border-color: var(--bad); background: var(--bad-soft); }
tr.riga-oltre td { background: #fdecea; }
tr.riga-oltre + tr.riga-oltre td { border-top: 0; }
.nota-oltre { font-size: 12px; font-weight: 700; color: var(--bad); min-width: 150px; line-height: 1.3; margin-top: 2px; }
.testa-vaccino { display: flex; gap: 10px; align-items: flex-end; }
.testa-vaccino .maniglia { line-height: 44px; }
.testa-vaccino .x-rossa { margin-bottom: 8px; }
.vaccino.trascina { background: #e3f1fd; box-shadow: 0 4px 14px rgba(21, 101, 192, .25); }
