/* Componenti: pulsanti a pillola, campi, chip, schede, avvisi, fogli, tabelle. Stile azienda.borz.it. */

/* ---- Pulsanti ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--ctl); padding: 0 22px; border-radius: var(--pill);
  border: 0; background: var(--surface); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  font: 600 15px/1.1 var(--font-d); letter-spacing: .025em; text-decoration: none; white-space: nowrap;
  touch-action: manipulation; user-select: none;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.btn:hover { color: var(--link-hover); box-shadow: inset 0 0 0 1px var(--ring-hover), var(--shadow); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
.btn[aria-busy="true"] { cursor: progress; }
/* azione principale della pagina: blu Borz */
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: none; }
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); box-shadow: var(--shadow-hover); }
/* scuro come "Progettiamo" nel sito */
.btn-dark { background: var(--dark); color: var(--on-dark); box-shadow: none; }
.btn-dark:hover { background: var(--dark-hover); color: var(--on-dark); box-shadow: var(--shadow-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); }
.btn-ghost { background: transparent; box-shadow: none; color: var(--link); }
.btn-ghost:hover { background: var(--surface-2); color: var(--link-hover); box-shadow: none; }
.btn-danger { background: var(--danger); color: var(--on-danger); box-shadow: none; }
.btn-danger:hover { background: var(--danger); color: var(--on-danger); filter: brightness(.95); }
/* Arrivo e Uso: verde e rosso sobri */
.btn-in { background: var(--in-bg); color: var(--in); box-shadow: none; }
.btn-in:hover { background: var(--in-bg); color: var(--in); box-shadow: inset 0 0 0 1px var(--in); }
.btn-out { background: var(--out-bg); color: var(--out); box-shadow: none; }
.btn-out:hover { background: var(--out-bg); color: var(--out); box-shadow: inset 0 0 0 1px var(--out); }
.btn-xl { min-height: var(--tap); font-size: 16.5px; padding: 0 24px; }
.btn-xl .ico { width: 22px; height: 22px; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; gap: 6px; }
.btn-sm .ico { width: 17px; height: 17px; }
.btn-block { width: 100%; }
.btn-link { display: inline-flex; align-items: center; min-height: 44px; background: none; border: 0; padding: 0 4px; color: var(--link); font: 600 15px var(--font-d); letter-spacing: .025em; text-decoration: underline; text-underline-offset: 3px; }
.icon-btn {
  display: inline-grid; place-items: center; width: var(--ctl); height: var(--ctl); flex: none;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink); text-decoration: none;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:disabled { opacity: .3; cursor: default; }
@media (max-width: 899px) { .btn-sm { min-height: 44px; padding: 0 16px; } .icon-btn { width: 48px; height: 48px; } }

.actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.actions > .btn { flex: 0 0 auto; }
.actions-left { justify-content: flex-start; }
@media (max-width: 899px) {
  .actions-sticky { position: sticky; bottom: 0; padding: 14px 0 calc(4px + var(--safe-b)); background: linear-gradient(to top, var(--surface) 78%, transparent); z-index: 2; }
  .actions-sticky > .btn { flex: 1 1 0; }
  .actions-sticky > .btn[type="submit"] { flex: 2 1 0; }
  .main .actions-sticky { background: linear-gradient(to top, var(--bg) 78%, transparent); bottom: var(--tabbar-h); }
}
.menu-inline { display: flex; gap: 2px; flex-wrap: wrap; }

/* ---- Campi ---- */
.stack { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; align-content: start; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > label, .field > legend { font: 600 14px var(--font-d); letter-spacing: .02em; padding: 0; }
.opt { font: 400 13px var(--font); letter-spacing: 0; color: var(--muted); }
.hint { color: var(--muted); font-size: 14px; }
.hint-warn { color: var(--warn); }
.field-error { color: var(--danger); font-size: 14px; font-weight: 600; }
input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="tel"], input[type="date"], input[type="number"], input:not([type]), select, textarea {
  width: 100%; min-height: var(--ctl); padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--surface); color: var(--ink); font-size: 16px; transition: border-color .2s, box-shadow .2s;
}
input[type="file"] { width: 100%; padding: 8px; border: 1px dashed var(--line-strong); border-radius: var(--r); background: var(--surface); min-height: var(--tap); }
input[type="file"]::file-selector-button { min-height: 40px; margin-right: 12px; padding: 0 18px; border: 0; border-radius: var(--pill); background: var(--dark); color: var(--on-dark); font: 600 14px var(--font-d); letter-spacing: .025em; cursor: pointer; }
textarea { padding: 12px 14px; min-height: 76px; resize: vertical; line-height: 1.5; }
select { padding-right: 36px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
[aria-invalid="true"] { border-color: var(--danger) !important; box-shadow: inset 0 0 0 1px var(--danger); }
input[readonly] { background: var(--surface-2); color: var(--muted); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .85; }
.input-code { font-family: var(--font-d); font-weight: 600; letter-spacing: .05em; }
.input-xl { min-height: var(--tap) !important; font: 600 28px var(--font-d) !important; text-align: center; }
.with-unit { display: flex; align-items: stretch; }
.with-unit > input { border-top-right-radius: 0; border-bottom-right-radius: 0; min-width: 0; }
.with-unit .unit { display: grid; place-items: center; padding: 0 14px; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 var(--r) var(--r) 0; background: var(--surface-2); color: var(--muted); font-size: 15px; white-space: nowrap; }
.price-row, .select-add { display: flex; gap: 8px; }
.price-row > .with-unit { flex: 1; }
.price-row > select { flex: 0 0 auto; width: auto; }
.select-add > select { flex: 1; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: var(--ctl); cursor: pointer; font-weight: 500; }
.check input { width: 22px; height: 22px; accent-color: var(--primary); flex: none; margin: 0; }
.field-check { align-content: end; }
.grid-2 { display: grid; gap: 16px 18px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.form-error, .note {
  display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap;
  padding: 14px 16px; border-radius: var(--r); font-weight: 500;
}
.form-error { background: var(--out-bg); color: var(--out); }
.form-error > span { flex: 1 1 200px; }
.note-info { background: var(--tint); color: var(--ink); }
.note-info .ico { color: var(--link); }
.note-ok { background: var(--in-bg); color: var(--in); }
.note-warn { background: var(--warn-bg); color: var(--warn); }
.note > span { flex: 1 1 200px; }
.pw-wrap { display: flex; }
.pw-wrap input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.pw-toggle { border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 var(--r) var(--r) 0; background: var(--surface-2); padding: 0 16px; font: 600 14px var(--font-d); letter-spacing: .025em; color: var(--link); min-width: 96px; }
details.more { border-radius: var(--r); background: var(--surface-2); }
details.more > summary { display: flex; align-items: center; gap: 8px; min-height: var(--ctl); padding: 0 16px; cursor: pointer; font: 600 15px var(--font-d); letter-spacing: .02em; color: var(--ink); list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "+"; margin-left: auto; font-size: 22px; font-weight: 400; color: var(--link); }
details.more[open] > summary::after { content: "−"; }
details.more > :not(summary) { margin: 0 16px 16px; }

/* ---- Selettore segmentato (tema, raggruppamenti) ---- */
.theme-switch, .seg-group { display: inline-flex; border: 0; box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--pill); padding: 4px; gap: 2px; margin: 0; background: var(--surface); }
.seg { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: var(--pill); cursor: pointer; font: 600 14px var(--font-d); letter-spacing: .02em; color: var(--muted); }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg .ico { width: 17px; height: 17px; }
.seg:has(input:checked) { background: var(--sel); color: var(--on-sel); }
.seg:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 1px; }
.theme-big .seg, .seg-group .seg { min-height: 48px; padding: 0 18px; font-size: 15px; }

/* ---- Chip ---- */
.chips { display: flex; gap: 8px; align-items: center; }
.chips-wrap { flex-wrap: wrap; }
.chips-scroll { overflow-x: auto; scrollbar-width: none; padding: 2px 18px 2px 2px; margin-right: -18px; scroll-snap-type: x proximity; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; flex: none; position: relative;
  min-height: 44px; padding: 0 16px; border-radius: var(--pill); border: 0; box-shadow: inset 0 0 0 1px var(--line);
  background: var(--surface); color: var(--nav-ink); font: 600 14.5px/1 var(--font-d); letter-spacing: .02em; text-decoration: none; cursor: pointer;
  scroll-snap-align: start; transition: box-shadow .2s, background-color .2s, color .2s;
}
.chip:hover { box-shadow: inset 0 0 0 1px var(--ring-hover); color: var(--ink); }
.chip.on, .chip:has(input:checked) { background: var(--sel); color: var(--on-sel); box-shadow: none; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.chip-count { font-size: 13px; font-weight: 500; opacity: .7; }
.chip-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.chip-below.on { background: var(--below); color: var(--on-yellow); }
.chip-clear { box-shadow: none; color: var(--link); }
.chip-clear .ico { width: 17px; height: 17px; }
.chip .ico { width: 17px; height: 17px; }
.chip-radio legend { margin-bottom: 8px; }
.facet-label { flex: none; font: 500 13px var(--font); color: var(--muted); min-width: 64px; }

/* ---- Etichette ---- */
.code-tag { display: inline-block; font: 600 12.5px/1.4 var(--font-d); letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
.flags { display: flex; flex-wrap: wrap; gap: 6px; }
.flag { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; padding: 3px 10px; border-radius: var(--pill); font: 600 12.5px/1.3 var(--font-d); letter-spacing: .02em; background: var(--surface-2); color: var(--muted); }
.flag .ico { width: 14px; height: 14px; }
.flag-sm { font-size: 11.5px; padding: 1px 8px; margin-left: 8px; vertical-align: 1px; }
.flag-below { background: var(--warn-bg); color: var(--warn); }
.flag-below::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--below); }
.flag-remnant { background: transparent; color: var(--muted); padding-left: 0; padding-right: 0; }
.flag-sm.flag-remnant { margin-left: 10px; }
.flag-current { background: var(--in-bg); color: var(--in); }
.pill { display: inline-block; padding: 2px 10px; border-radius: var(--pill); background: var(--surface-2); font: 600 12.5px/1.5 var(--font-d); letter-spacing: .02em; }
.pill-create { background: var(--in-bg); color: var(--in); }
.pill-update { background: var(--tint); color: var(--link); }
.pill-error { background: var(--out-bg); color: var(--out); }
.sub { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }

/* ---- Liste semplici ---- */
.kv-list { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; }
.kv { display: contents; }
.kv dt, .kv dd { padding: 11px 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); padding-right: 12px; }
.kv dd { font-weight: 500; overflow-wrap: anywhere; }
.mini-list { display: grid; gap: 8px; }
.mini-art { display: flex; align-items: center; gap: 12px; justify-content: space-between; min-height: 52px; padding: 10px 16px; border-radius: var(--r); background: var(--surface-2); color: var(--ink); text-decoration: none; transition: background-color .2s; }
.mini-art:hover { background: var(--soft); color: var(--ink); }
.mini-art.is-below { box-shadow: inset 3px 0 0 var(--below); }
.mini-title { font-weight: 500; min-width: 0; }
.mini-qty { font: 600 16px var(--font-d); white-space: nowrap; }
.plain-list { display: grid; gap: 4px; }
.big-list { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 22px; overflow: hidden; box-shadow: var(--shadow); }
.big-list li + li { border-top: 1px solid var(--line); }
.big-link { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 18px; color: var(--ink); text-decoration: none; font: 500 17px var(--font-d); }
.big-link > span:first-of-type { flex: 1; }
.big-link .ico { color: var(--muted); }
.big-link .chev { color: var(--steel-300); width: 18px; height: 18px; }

/* ---- Sezioni: pannelli bianchi, bordi sottili, ombra morbida ---- */
.panel-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow); }
.sec-title { font: 600 20px/1.2 var(--font-d); letter-spacing: -.02em; margin-bottom: 14px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.sec-head .sec-title { margin-bottom: 0; }
.sec-count { color: var(--muted); font-weight: 400; }
.sub-title { font: 600 17px var(--font-d); margin: 20px 0 10px; }
.form-sec { display: grid; gap: 16px; }
.form-sec + .form-sec { padding-top: 8px; }
.form-narrow { max-width: 460px; }

.empty { padding: 44px 16px; text-align: center; color: var(--muted); display: grid; gap: 18px; justify-items: center; }
.empty p { max-width: 46ch; }
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 20px 0; }
.spinner { width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--indicator); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Tabelle ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow); }
.grid { width: 100%; font-size: 15px; }
.grid th, .grid td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid thead th { position: sticky; top: 0; background: var(--surface); font: 600 13px var(--font-d); letter-spacing: .02em; color: var(--muted); z-index: 1; white-space: nowrap; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid .num { text-align: right; white-space: nowrap; }
.grid-compact th, .grid-compact td { padding: 8px 12px; }
.panel-sec > .grid { border: 1px solid var(--line); border-radius: var(--r); }
.th-btn { all: unset; display: inline-flex; gap: 4px; align-items: center; cursor: pointer; min-height: 28px; }
.th-btn:hover { color: var(--ink); }
.th-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.num .th-btn { justify-content: flex-end; }
.sort-ind { font-size: 9px; color: var(--indicator); min-width: 10px; }
.grid tr.muted td { color: var(--muted); }

/* ---- Movimenti ---- */
.mv-list { display: grid; gap: 0; }
.mv { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.mv:last-child { border-bottom: 0; }
.mv-delta { font: 600 21px/1.1 var(--font-d); text-align: right; padding-top: 2px; letter-spacing: -.01em; }
.mv-in .mv-delta { color: var(--in); }
.mv-out .mv-delta { color: var(--out); }
.mv-adjust .mv-delta, .mv-import .mv-delta { color: var(--link); }
.mv-body { min-width: 0; display: grid; gap: 3px; }
.mv-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.mv-type { font: 600 12px var(--font-d); letter-spacing: .02em; padding: 1px 8px; border-radius: var(--pill); background: var(--surface-2); }
.type-in { background: var(--in-bg); color: var(--in); }
.type-out { background: var(--out-bg); color: var(--out); }
.type-adjust, .type-import { background: var(--tint); color: var(--link); }
.mv-art { font-weight: 600; color: var(--ink); text-decoration: none; }
.mv-art:hover { text-decoration: underline; color: var(--ink); }
.mv-meta, .mv-details { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 14px; }
.mv-details a { display: inline-flex; gap: 4px; align-items: center; }
.mv-details .ico { width: 16px; height: 16px; }
.mv-ref { color: var(--ink); font-weight: 500; }
.mv-undone .mv-delta, .mv-undone .mv-art, .mv-undone .mv-meta { text-decoration: line-through; opacity: .55; }
.mv-undone-note { font-size: 13px; color: var(--muted); font-style: italic; }
@media (max-width: 899px) {
  .mv { grid-template-columns: 52px 1fr; column-gap: 10px; }
  .mv > .btn { grid-column: 2; justify-self: start; margin-left: -12px; }
  .mv-delta { font-size: 19px; }
}
.mv-list-full { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0 18px; box-shadow: var(--shadow); }

/* ---- Avvisi (toast) ---- */
.toasts {
  position: fixed; z-index: 60; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + 10px); width: min(560px, calc(100% - 20px));
  display: grid; gap: 8px; pointer-events: none;
}
@media (min-width: 900px) { .toasts { bottom: 24px; left: calc(50% + 128px); } }
.toast {
  pointer-events: auto; position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 8px; padding: 10px 8px 10px 20px;
  background: var(--dark); color: var(--on-dark); border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  animation: toast-in .2s ease-out;
}
.toast-text { flex: 1; font-weight: 500; font-size: 15px; }
.toast-success::before, .toast-error::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.toast-success::before { background: var(--in); }
.toast-error::before { background: var(--out); }
.toast-action {
  display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 18px; border-radius: var(--pill);
  border: 0; background: var(--brand-400); color: var(--ink-0); font: 600 15px var(--font-d); letter-spacing: .025em; flex: none;
}
.toast-action .ico { width: 19px; height: 19px; }
.toast-close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; color: inherit; opacity: .75; flex: none; border-radius: 50%; }
.toast :focus-visible { outline-color: var(--brand-400); }
.toast-timer { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--brand-400); transform-origin: left; animation: toast-timer linear forwards; }
.toast.paused .toast-timer { animation-play-state: paused; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }
@keyframes toast-timer { to { transform: scaleX(0); } }

/* ---- Foglio / finestra ---- */
.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 100%; max-height: 92dvh;
  border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--surface); color: var(--ink);
  display: flex; flex-direction: column; box-shadow: var(--shadow-pop);
}
.sheet:not([open]) { display: none; }
.sheet::backdrop { background: var(--scrim); }
.sheet[open] { animation: sheet-up .22s ease-out; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 16px 10px 10px 22px; }
.sheet-head::before { content: ""; position: absolute; left: 50%; top: 7px; width: 40px; height: 4px; border-radius: 2px; background: var(--line); transform: translateX(-50%); }
.sheet-title { flex: 1; font: 600 21px/1.2 var(--font-d); letter-spacing: -.02em; padding-top: 6px; }
.sheet-body { padding: 8px 22px 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(18px + var(--safe-b)); }
.sheet-body .actions-sticky { bottom: 0; }
@media (max-width: 899px) { .sheet .actions-sticky > button[type="button"] { display: none; } }
@media (min-width: 900px) {
  .sheet { margin: auto; width: min(560px, calc(100% - 48px)); border-radius: var(--r-xl); max-height: 86dvh; }
  .sheet-wide { width: min(760px, calc(100% - 48px)); }
  .sheet-head::before { display: none; }
  .sheet[open] { animation: none; }
  .sheet-head { padding: 20px 14px 6px 28px; }
  .sheet-body { padding: 8px 28px 26px; }
}

/* Pannello Info */
.help { display: grid; gap: 18px; }
.help-intro { font-size: 17px; line-height: 1.55; }
.help-list { display: grid; gap: 14px; }
.help-item { display: grid; gap: 3px; padding-left: 14px; box-shadow: inset 2px 0 0 var(--indicator); }
.help-item dt { font: 600 15px var(--font-d); letter-spacing: .01em; }
.help-item dd { color: var(--muted); }

/* ---- Stepper quantità ---- */
.stepper { display: grid; gap: 10px; }
.stepper-row { display: grid; grid-template-columns: 64px 1fr 64px; gap: 8px; }
.step-btn { display: grid; place-items: center; min-height: 64px; border: 0; border-radius: var(--pill); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.step-btn .ico { width: 26px; height: 26px; stroke-width: 2.2; }
.step-btn:active { background: var(--soft); }
.stepper-field { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); padding-right: 14px; }
.stepper-field:focus-within { border-color: var(--focus); outline: 3px solid var(--focus); outline-offset: 1px; }
.stepper-input { border: 0 !important; outline: none !important; box-shadow: none !important; min-height: 62px !important; text-align: center; font: 600 34px/1 var(--font-d) !important; background: transparent !important; padding: 0 4px 0 12px !important; }
.stepper-unit { color: var(--muted); font: 500 15px var(--font-d); white-space: nowrap; }
.stepper-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quick-btn { min-height: 52px; border-radius: var(--pill); border: 0; box-shadow: inset 0 0 0 1px var(--line); background: var(--surface); font: 600 17px var(--font-d); color: var(--ink); }
.quick-btn:active { background: var(--surface-2); }
@media (min-width: 900px) {
  .stepper-row { grid-template-columns: 52px 1fr 52px; }
  .step-btn { min-height: 52px; }
  .stepper-input { min-height: 50px !important; font-size: 28px !important; }
  .quick-btn { min-height: 40px; font-size: 15px; }
}

/* ---- Riquadri numerici ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 8px 0 16px; }
.tile { border-radius: var(--r); padding: 12px 16px; background: var(--surface-2); }
.tile dt { color: var(--muted); font-size: 14px; }
.tile dd { font: 600 28px/1.1 var(--font-d); letter-spacing: -.02em; }
.tile-create dd { color: var(--in); }
.tile-update dd { color: var(--link); }
.tile-error dd, .tile-archive dd { color: var(--out); }
.pager { display: flex; align-items: center; gap: 12px; justify-content: center; margin-top: 14px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .search, .toolbar > input, .toolbar > select { flex: 1 1 240px; max-width: 520px; }
.error-list { margin: 6px 0 0; padding-left: 18px; list-style: disc; font-weight: 400; }
