/* KM42 Reports — palette "Pista": blu notte, arancio energia, blu elettrico */
@font-face { font-family: "Roboto"; font-weight: 400; font-display: swap; src: url("../fonts/roboto-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 500; font-display: swap; src: url("../fonts/roboto-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 700; font-display: swap; src: url("../fonts/roboto-latin-700-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --navy: #0f1b3d;          /* barra superiore */
  --side: #16244f;          /* menu laterale */
  --side-ink: #d7ddf0;
  --page: #f4f6fb;
  --surface: #ffffff;
  --tile: #eef1f8;
  --ink: #1d2742;
  --title: #0f1b3d;
  --text-secondary: #5b6684;
  --text-muted: #7c86a2;
  --border: #e3e7f0;
  --border-strong: #c9d0e2;
  --accent: #1e6bff;        /* link, filtri, valori */
  --accent-soft: #e3ecff;
  --orange: #ff5a1f;        /* azioni e selezioni */
  --orange-soft: #fff1ea;
  --orange-ink: #8a2a07;
  --brand-blue: #1e6bff;
  --brand-orange: #ff5a1f;
  --total: #fff1ea;         /* righe di totale */
  --good: #0e9f6e;
  --bad: #d92d20;
  --radius: 8px;
  --side-w: 232px;
  --font: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--ink); font: 14px/1.5 var(--font); font-variant-numeric: tabular-nums; }
a { color: var(--accent); }
h1 { font-size: 22px; font-weight: 500; margin: 0; color: var(--title); }
h2 { font-size: 16px; font-weight: 500; margin: 0 0 2px; color: var(--title); display: flex; align-items: center; gap: 8px; }
h2 .ico { color: var(--orange); }
.sub { color: var(--text-secondary); font-size: 13px; margin: 0 0 12px; }
.ico { flex: none; vertical-align: middle; }

/* ---- barra superiore ---- */
.topbar { position: sticky; top: 0; z-index: 30; height: 56px; background: var(--navy); color: #fff; display: flex; align-items: center; gap: 12px; padding: 0 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 500; font-size: 16px; white-space: nowrap; }
.brand .logo { background: #fff; border-radius: 6px; padding: 3px 6px; display: flex; }
.brand .logo img { height: 30px; width: auto; display: block; }
.topbar .spacer { flex: 1; }
.user { display: flex; gap: 14px; align-items: center; font-size: 13px; color: #cfd8e3; white-space: nowrap; }
.iconbtn { background: none; border: 0; color: inherit; padding: 6px; border-radius: var(--radius); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font: inherit; }
.iconbtn:hover { background: rgba(255, 255, 255, .1); }
.menubtn { display: none; }

/* ---- menu laterale: stretto (solo icone) di serie, largo con il pulsante ☰ ---- */
:root { --rail-w: 80px; }
.menubtn { display: inline-flex; }
.shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: calc(100vh - 56px); transition: grid-template-columns .2s ease; }
.nav-wide .shell { grid-template-columns: var(--side-w) minmax(0, 1fr); }
.side { background: var(--side); color: var(--side-ink); padding: 10px 0 24px; position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; overflow-x: hidden; }
.side .group { padding: 6px 18px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #8f9bc2; height: 26px; }
.side .sep { height: 1px; background: rgba(255, 255, 255, .1); margin: 10px 14px; }
.side a { display: flex; align-items: center; gap: 12px; margin: 3px 10px; padding: 10px 14px; border-radius: 12px; color: var(--side-ink); text-decoration: none; font-size: 14px; white-space: nowrap; }
.side a:hover { background: rgba(255, 255, 255, .08); }
.side a.active { background: var(--orange); color: #fff; font-weight: 500; }
/* menu stretto: icona con il nome breve sotto */
.side .short { display: none; }
html:not(.nav-wide) .side .label, html:not(.nav-wide) .side .glabel { display: none; }
html:not(.nav-wide) .side .short { display: block; font-size: 10.5px; line-height: 1.15; letter-spacing: .01em; }
html:not(.nav-wide) .side a { flex-direction: column; justify-content: center; gap: 4px; padding: 8px 2px; margin: 3px 8px; text-align: center; }
.scrim { display: none; }

main { padding: 16px 24px 32px; min-width: 0; max-width: 1600px; width: 100%; }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--accent); margin-bottom: 8px; }
.crumbs span { color: var(--text-secondary); }
.head { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 12px; }
.freshness { font-size: 12.5px; color: var(--text-muted); }

/* ---- filtri ---- */
.filters { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; background: var(--surface); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
.filters label { font-size: 13px; color: var(--ink); display: flex; gap: 6px; align-items: center; }
.filters .sp { font-weight: 500; }
.filters .dates { display: flex; align-items: center; gap: 6px; color: var(--orange); }
.presets { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
input, select, button { font: inherit; font-size: 14px; color: var(--ink); }
input[type=date], input[type=email], input[type=password], input[type=search], select { height: 34px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn { height: 32px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { background: var(--tile); }
.btn[aria-pressed=true] { background: var(--orange-soft); border-color: var(--orange); color: var(--orange-ink); font-weight: 500; }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; display: inline-flex; align-items: center; gap: 4px; }

/* riepilogo in alto a destra (come "Reso totale / Venduto totale") */
.summary { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px 28px; margin: 4px 0 12px; text-align: right; }
.summary:empty { display: none; }
.summary div b { display: block; font-size: 11px; font-weight: 500; letter-spacing: .02em; color: var(--ink); }
.summary div span { color: var(--accent); font-size: 15px; }

/* ---- indicatori ---- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border-radius: 10px; padding: 12px 16px; color: #fff; }
.kpi:nth-child(4n+1) { background: var(--orange); }
.kpi:nth-child(4n+2) { background: var(--brand-blue); }
.kpi:nth-child(4n+3) { background: var(--navy); }
.kpi:nth-child(4n+4) { background: var(--orange-soft); color: var(--orange-ink); }
.kpi .label { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; opacity: .9; }
.kpi .value { font-size: 26px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.kpi .delta { font-size: 12.5px; opacity: .92; }
.kpi .delta .up, .kpi .delta .down { color: inherit; font-weight: 700; }
.delta .up { color: var(--good); font-weight: 500; }
.delta .down { color: var(--bad); font-weight: 500; }

/* ---- card e griglia ---- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.card { grid-column: span 12; background: var(--surface); border-radius: 12px; padding: 14px 16px; min-width: 0; border: 1px solid var(--border); }
.card.half { grid-column: span 6; }
.card.third { grid-column: span 4; }
.card.twothird { grid-column: span 8; }
.chart { width: 100%; height: 320px; }
.chart.tall { height: 420px; }
.chart.short { height: 260px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-secondary); margin: 4px 0 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 0; border-top: 2px solid; display: inline-block; }
.legend i.dash { border-top-style: dashed; }
.legend i.box { width: 10px; height: 10px; border: 0; border-radius: 2px; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid #eef1f5; }
th { font-weight: 500; color: var(--ink); font-size: 12px; background: var(--tile); border-bottom-color: var(--border); }
td.num, th.num { text-align: right; }
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.state { padding: 40px; text-align: center; color: var(--text-muted); }
.alert { padding: 10px 14px; border-radius: var(--radius); background: var(--surface); border-left: 3px solid var(--accent); margin-bottom: 16px; font-size: 14px; }
.alert.err { color: var(--bad); border-left-color: var(--bad); }
.badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--tile); }
.badge.ok { color: var(--good); background: #e5f4ea; }
.badge.error, .badge.partial { color: var(--bad); background: #fbe9e7; }

/* ---- accesso ---- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--navy); }
.login form { width: 100%; max-width: 380px; background: var(--surface); border-radius: 12px; padding: 28px; display: grid; gap: 14px; border-top: 4px solid var(--brand-orange); }
.login .logo { display: block; width: 190px; max-width: 70%; margin: 0 auto 4px; }
.login h1 { text-align: center; font-size: 20px; }
.login .sub { text-align: center; margin: 0; }
.login label { display: grid; gap: 4px; font-size: 13px; color: var(--text-secondary); }
.login input[type=email], .login input[type=password] { width: 100%; height: 40px; }
.login .btn { height: 40px; justify-content: center; }
.err-text { color: var(--bad); font-size: 13px; margin: 0; }

/* ---- report scarpe: tabella pivot, numeri grandi e leggibili ---- */
.pivotwrap { overflow: auto; max-height: 82vh; border: 1px solid var(--border); border-radius: 10px; -webkit-overflow-scrolling: touch; }
.pivot { font-size: 15px; border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.pivot th, .pivot td { padding: 8px 12px; border-bottom: 1px solid #eef1f6; text-align: right; white-space: nowrap; background: var(--surface); }
.pivot td { font-weight: 500; color: var(--ink); }
.pivot tbody tr:nth-child(even) td { background: #f9fafd; }
.pivot tbody tr:hover td { background: #fff7f2; }
.pivot thead th { position: sticky; top: 0; z-index: 2; text-align: center; color: #fff; font-weight: 700; font-size: 14px; letter-spacing: .02em; background: var(--navy); padding: 9px 12px; }
.pivot thead tr:nth-child(2) th { top: 38px; font-weight: 500; font-size: 12px; background: var(--tile); color: var(--title); padding: 6px 12px; }
.pivot th.rowhead, .pivot td.rowhead { position: sticky; left: 0; z-index: 1; text-align: left; border-right: 2px solid var(--border-strong); font-weight: 500; }
.pivot thead th.rowhead { z-index: 3; background: var(--navy); color: #fff; }
.pivot .brandstart { border-left: 2px solid var(--border-strong); }
.pivot td.tot { font-weight: 700; color: var(--title); background: #f1f4fb; font-size: 16px; }
.pivot tbody tr:nth-child(even) td.tot { background: #eaeef8; }
.pivot thead th.tot { background: var(--tile); color: var(--title); font-weight: 700; }
.pivot thead th.tot[rowspan] { background: var(--orange); color: #fff; }
.pivot td.tot.brandstart:last-child { background: var(--orange-soft); color: var(--orange-ink); }
.pivot tr.yeartot td { font-weight: 700; background: var(--total) !important; border-top: 2px solid #ffc9b0; border-bottom: 2px solid #ffc9b0; font-size: 16px; color: var(--orange-ink); }
.pivot tr.grandtot td { font-weight: 700; background: #ffe0d1 !important; font-size: 16px; color: var(--orange-ink); }
.pivot td.zero { color: #b3bacb; font-weight: 400; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; margin: 10px 0 12px; font-size: 13px; color: var(--text-secondary); }
.toolbar label { display: inline-flex; gap: 6px; align-items: center; }
.ranks { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 18px; }
.ranks > div { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.ranks h3 { font-size: 15px; margin: 0; padding: 8px 12px; text-transform: capitalize; color: #fff; background: var(--navy); font-weight: 500; }
.ranks table { font-size: 14.5px; }
.ranks td, .ranks th { padding: 6px 10px; }
.ranks td.num { font-weight: 500; }
.ranks td:nth-child(3) { font-weight: 700; color: var(--title); }
.ranks td:first-child { color: var(--text-muted); width: 34px; }
.ranks tr.yeartot td { background: var(--total); }
.ranks tr.hl td { background: var(--orange-soft); font-weight: 500; }
.note { font-size: 13px; color: var(--text-muted); margin: 8px 0 0; }

/* pillole marca/modello */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-size: 13px; white-space: nowrap; }
.pill:hover { background: var(--tile); }
.pill[aria-pressed=true] { background: var(--orange); border-color: var(--orange); color: #fff; }
.pill .pill-n { color: var(--text-muted); font-size: 12px; margin-left: 2px; }
.pill[aria-pressed=true] .pill-n { color: rgba(255, 255, 255, .85); }
.pill[hidden] { display: none; }
.pills-label { font-size: 13px; color: var(--title); font-weight: 500; }
.pill-search { height: 30px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 99px; background: var(--surface); width: 200px; }
#model-box { border-top: 1px solid var(--border); margin-top: 10px; }

/* ---- tablet e telefono: menu a scomparsa ---- */
@media (max-width: 1023px) {
  .shell, .nav-wide .shell { grid-template-columns: minmax(0, 1fr); }
  html .side .label, html .side .glabel { display: inline !important; }
  html .side .short { display: none !important; }
  html .side a { flex-direction: row !important; justify-content: flex-start !important; padding: 10px 14px !important; margin: 3px 10px !important; }
  .side { position: fixed; top: 56px; left: 0; bottom: 0; width: 270px; height: auto; z-index: 25; transform: translateX(-100%); transition: transform .2s ease; }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 56px 0 0 0; background: rgba(15, 23, 34, .45); z-index: 20; }
  .card.half, .card.third, .card.twothird { grid-column: span 12; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  main { padding: 12px 12px 24px; }
  .topbar { padding: 0 8px; gap: 6px; }
  .brand .name, .user .who { display: none; }
  h1 { font-size: 19px; }
  .presets { margin-left: 0; flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; }
  .filters { padding: 10px; }
  .filters .dates input[type=date] { width: 138px; }
  .summary { justify-content: space-between; background: var(--tile); padding: 6px 10px; border-radius: var(--radius); text-align: center; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 10px 12px; }
  .kpi .value { font-size: 20px; }
  .chart { height: 260px; }
  .chart.tall { height: 360px; }
  .ranks { grid-template-columns: 1fr; }
  .pill-search { width: 100%; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.seg { display: inline-flex; background: var(--tile); border-radius: 99px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 28px; padding: 0 12px; border-radius: 99px; cursor: pointer; font-size: 13px; color: var(--text-secondary); }
.seg button[aria-pressed=true] { background: var(--orange); color: #fff; font-weight: 500; }
.cardhead { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-start; justify-content: space-between; }

.bigtable table { font-size: 15px; }
.bigtable td { padding: 8px 10px; }
.bigtable td.num { font-weight: 700; color: var(--title); }
.clickable tr.hlrow td { background: var(--orange-soft); }
.clickable .linkbtn { font-weight: 500; }
/* la colonna del menu resta scura per tutta l'altezza della pagina */
.shell { background: linear-gradient(90deg, var(--side) 0 var(--rail-w), var(--page) 0); }
.nav-wide .shell { background: linear-gradient(90deg, var(--side) 0 var(--side-w), var(--page) 0); }
@media (max-width: 1023px) { .shell, .nav-wide .shell { background: var(--page); } }

/* ---- cruscotto negozi ---- */
.totbox { background: var(--navy); color: #fff; border-radius: 12px; padding: 16px 20px; display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 14px 20px; margin-bottom: 16px; }
.totbox .l { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: #aab3d1; }
.totbox .v { font-size: 22px; font-weight: 500; }
.totbox .big { font-size: 32px; font-weight: 700; line-height: 1.2; }
.totbox .dl { font-size: 12.5px; }
.totbox .up { color: #6ee7b7; font-weight: 500; }
.totbox .down { color: #fca5a5; font-weight: 500; }
.totbox .muted { color: #aab3d1; }
.stores { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.store { display: block; background: var(--surface); border: 1px solid var(--border); border-top: 5px solid var(--orange); border-radius: 12px; padding: 16px; color: var(--ink); text-decoration: none; transition: box-shadow .15s ease, transform .15s ease; }
.store:hover { box-shadow: 0 6px 20px rgba(15, 27, 61, .12); transform: translateY(-2px); }
.store .hd { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--orange); }
.store .nm { font-size: 18px; font-weight: 500; color: var(--title); }
.store .rk { margin-left: auto; font-size: 12px; background: var(--orange-soft); color: var(--orange-ink); border-radius: 99px; padding: 2px 10px; font-weight: 500; }
.store .inc { font-size: 30px; font-weight: 700; color: var(--title); line-height: 1.15; }
.store .dl { font-size: 13px; margin: 3px 0 10px; }
.store .up { color: var(--good); font-weight: 500; }
.store .down { color: var(--bad); font-weight: 500; }
.store .muted { color: var(--text-muted); }
.store .share { height: 7px; background: var(--tile); border-radius: 99px; overflow: hidden; }
.store .share i { display: block; height: 100%; background: var(--orange); border-radius: 99px; }
.store .shl { font-size: 12px; color: var(--text-secondary); margin: 4px 0 12px; }
.store .mt { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.store .mt > div { background: var(--page); border-radius: 8px; padding: 8px 10px; }
.store .mt .l { font-size: 11.5px; color: var(--text-secondary); }
.store .mt .v { font-size: 17px; font-weight: 700; color: var(--ink); }
.store .ft { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--text-secondary); margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.store .ft b { color: var(--ink); font-weight: 500; }
.store .go { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 12.5px; color: var(--accent); margin-top: 8px; font-weight: 500; }
@media (max-width: 1023px) { .totbox { grid-template-columns: repeat(2, minmax(0, 1fr)); } .totbox .main { grid-column: 1 / 3; } }
@media (max-width: 640px) { .stores { grid-template-columns: 1fr; } .totbox { padding: 14px; } .totbox .big { font-size: 26px; } .store .inc { font-size: 26px; } }

/* ---- demo pubblica ---- */
.demomain { margin: 0 auto; }
.demotag { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; background: var(--orange); color: #fff; border-radius: 99px; padding: 3px 12px; }
.demolink { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.demolink input { flex: 1 1 320px; min-width: 0; font: inherit; padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--page); color: var(--ink); }
.demolink a.btn { text-decoration: none; display: inline-flex; align-items: center; }

/* ---- configurazione ---- */
.setuptabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 16px; border-bottom: 1px solid var(--border); }
.setuptabs a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; color: var(--text-secondary); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; font-weight: 500; }
.setuptabs a.on { color: var(--ink); border-bottom-color: var(--orange); }
.levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 16px; }
.level { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--navy); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--text-secondary); }
.level b { color: var(--ink); font-size: 14px; }
.level.admin { border-left-color: var(--accent); }
.level.staff { border-left-color: var(--orange); }
.rolepill { display: inline-block; font-size: 12px; font-weight: 500; padding: 2px 10px; border-radius: 99px; background: var(--navy); color: #fff; }
.rolepill.admin { background: var(--accent); }
.rolepill.staff { background: var(--orange-soft); color: var(--orange-ink); }
table.users td { vertical-align: middle; }
table.users tr.off td { opacity: .55; }
.muted { color: var(--text-muted); font-size: 12.5px; }
.userform { display: flex; flex-direction: column; gap: 12px; }
.userform label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-secondary); }
.userform label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; }
.userform input[type=text], .userform input[type=email], .userform input[type=password], .userform select { height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); font-size: 14px; color: var(--ink); width: 100%; box-sizing: border-box; }
.userform .actions { display: flex; gap: 8px; flex-wrap: wrap; }
form.danger { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
form.danger .btn { color: var(--bad); border-color: var(--bad); }

/* ---- esportazione e negozio fisso ---- */
.head .exports { display: flex; gap: 6px; margin-left: auto; order: 3; }
.head .exports .btn { height: 30px; font-size: 13px; font-weight: 500; }
.head .exports .btn .ico { color: var(--orange); }
.head .exports .btn.busy { opacity: .6; cursor: progress; }
.spfixed { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--radius); background: var(--orange-soft); color: var(--orange-ink); font-weight: 500; font-size: 14px; }
.whostore { color: var(--orange); font-weight: 500; }
a.who { color: inherit; text-decoration: none; }
a.who:hover { text-decoration: underline; }
@media print { .head .exports { display: none; } }
.store .inc .unit { font-size: 16px; font-weight: 500; color: var(--text-secondary); }
[hidden] { display: none !important; }
a.btn { text-decoration: none; color: var(--ink); }

/* ---- modelli: marche da controllare ---- */
.brandfix { margin-bottom: 16px; }
.fixform { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fixform select { height: 32px; }
.fixform .hint { font-size: 12.5px; color: var(--orange-ink); background: var(--orange-soft); border-radius: 99px; padding: 2px 8px; }
details.saved { margin-top: 10px; font-size: 13.5px; }
details.saved summary { cursor: pointer; color: var(--accent); font-weight: 500; }
details.saved ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.totrow td { font-weight: 700; background: var(--orange-soft); }
