/* Bikeroom Shipping · richieste LDV (dealer + Bikeroom). Guscio, token e componenti da ../assets/css/app.css
   (la stessa base della demo /shipping-demo/app/); qui solo i pezzi nuovi. Mobile first: prima il telefono. */
.seg--lang button { padding: 4px 9px; font-size: 12px; }
.req { color: var(--red); margin-left: 2px; }
.invalid .input, .invalid .select, .invalid .textarea, .input.invalid { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.gate { max-width: 420px; margin: 14vh auto 0; text-align: center; padding: 0 16px; }
.gate img { height: 20px; margin: 0 auto 22px; }
.gate h1 { font-size: 20px; margin-bottom: 6px; }
.gate p { color: var(--muted); margin-bottom: 16px; }
.logo-w { display: none; }
:root[data-theme="dark"] .logo-b { display: none; }
:root[data-theme="dark"] .logo-w { display: block; }
.side__status .lang { margin-left: auto; }
.side .seg { background: var(--sb-accent); }
.side .seg button.on { background: #262626; border-color: #333; color: var(--sb-accent-fg); }
a.chip { text-decoration: none; }
/* le colonne della griglia possono stringersi sotto il contenuto (sul telefono 1fr ne usciva) */
.grid > * { min-width: 0; }
.rowlink { font-weight: 600; color: var(--text); }
.rowlink:hover { text-decoration: underline; }
/* «Nuova richiesta» e lingua in alto solo quando il menu laterale è nascosto */
@media (min-width: 901px) { .only-narrow { display: none !important; } }

/* sezioni ricorrenti */
.sec-t { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sec-t .btn { text-transform: none; letter-spacing: 0; }
.addr { white-space: pre-line; font-size: 13.5px; line-height: 1.55; }
.addr--box { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border); color: inherit; }
.li:first-child { border-top: 0; }
a.li:hover, button.li:hover { background: color-mix(in oklab, var(--bg3) 55%, transparent); }
button.li { width: 100%; text-align: left; }
.li .grow { flex: 1; min-width: 0; }
.li .grow b { display: block; font-weight: 600; font-size: 13.5px; }
.li .grow small { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bg3); color: var(--muted); flex: none; }
.li .ico--ok { background: var(--green-bg); color: var(--green); }
.li .ico--warn { background: var(--amber-bg); color: var(--amber); }
.li .ico--pri { background: var(--primary-tint); color: var(--primary); }
.li .side-r { text-align: right; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.tbl td .sub { display: block; font-size: 12px; color: var(--muted); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.steps { list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-size: 13.5px; }
.steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; background: var(--primary-tint); color: var(--primary); font-weight: 600; font-size: 12.5px; display: grid; place-items: center; }
.steps li b { display: block; font-weight: 600; }
.steps li span { color: var(--muted); font-size: 13px; }
.tips { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.tips li { display: grid; grid-template-columns: 16px 1fr; gap: 9px; color: var(--muted); line-height: 1.45; }
.tips li svg { color: var(--primary); margin-top: 2px; }
.tips li b { color: var(--text); font-weight: 600; }
.help { background: var(--primary-tint); border: 1px solid color-mix(in oklab, var(--primary) 25%, transparent); border-radius: var(--radius-lg); padding: 16px 18px; }
.help h4 { font-size: 13.5px; font-weight: 600; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.help h4 svg { color: var(--primary); }
.help .tips li { color: var(--text); }
.contact { display: flex; gap: 12px; align-items: center; }
.contact .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--bg3); display: grid; place-items: center; color: var(--muted); flex: none; }
.contact b { display: block; font-weight: 600; font-size: 13.5px; }
.contact a { color: var(--primary); font-size: 13px; }

/* form a passi */
.pk { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.pk + .pk { margin-top: 10px; }
.pk__h { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 600; }
.pk__type { grid-column: 1 / -1; }
.pk .input--unit i { right: 8px; }
.pk .input--unit .input { padding-right: 30px; }
.pk__sum { font-size: 12.5px; color: var(--muted); }
.filebox { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; border: 1px dashed var(--border-hi); border-radius: 12px; font-size: 13px; }
.filebox input[type=file] { font-size: 12.5px; max-width: 100%; }
.pick { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pick .select { flex: 1; min-width: 200px; }
.wstep__f .btn { min-height: 38px; }
.review { display: flex; flex-direction: column; }
.review > div { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; border-top: 1px solid var(--border); }
.review > div:first-child { border-top: 0; padding-top: 0; }
.review h4 { font-size: 13px; font-weight: 600; }
.review .addr, .review p { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.review .editlink { font-size: 12.5px; color: var(--primary); font-weight: 500; }
.sum .tips { padding: 0 4px; }

/* sezioni dentro un passo o una pagina (Contenuto, Carta intestata) */
.fsec + .fsec { border-top: 1px solid var(--border); padding-top: 18px; }
.fsec h3 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 12px; }
.lhform { display: flex; flex-direction: column; gap: 20px; }
/* colli: scatola salvata e «Salva come scatola» */
.pk__wide, .pk__f { grid-column: 1 / -1; }
.pk__f { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.pk__f[hidden] { display: none; }
.pk__f--draft .field { flex: 1; min-width: 200px; }
.fgrid.dims { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
/* documenti per la dogana */
.doclist { display: flex; flex-direction: column; gap: 10px; }
.doc { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.doc .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.doc .grow b { font-weight: 600; font-size: 13.5px; }
.doc .grow small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.doc .filebox { margin-top: 8px; }
.doc.invalid, .banner.invalid { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.doc__ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--bg3); color: var(--muted); flex: none; }
.doc__ico--ok { background: var(--green-bg); color: var(--green); }
/* nomi dei documenti e quando servono: su più righe, non tagliati */
.dl > div b.wrap, .list--wrap .li .grow small { white-space: normal; }
.cpsc { margin-top: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; }
.cpsc h4 { font-size: 13.5px; font-weight: 600; }
.cpsc > p { font-size: 12.5px; color: var(--muted); margin: 4px 0 12px; line-height: 1.45; }
/* carta intestata: l'anteprima è un foglio, bianca anche col tema scuro */
.imgbox { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px; border: 1px dashed var(--border-hi); border-radius: 12px; }
.imgbox img { max-height: 48px; max-width: 160px; object-fit: contain; background: #fff; border-radius: 6px; padding: 4px; }
.imgbox__empty { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 10px; background: var(--bg3); color: var(--dim); }
.lhprev { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; padding: 16px; border-radius: 10px; background: #fff; color: #111827; border: 1px solid var(--border); }
.lhprev__logo img { max-height: 40px; max-width: 120px; object-fit: contain; }
.lhprev__txt { text-align: right; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lhprev__txt b { font-size: 13px; }
.lhprev__txt small { font-size: 11px; color: #6b7280; overflow-wrap: anywhere; }

/* dettaglio richiesta */
.dl { display: flex; flex-direction: column; gap: 10px; }
.dl > div { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg2); }
.dl > div .grow { flex: 1; min-width: 0; }
.dl > div b { font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl > div small { display: block; color: var(--muted); font-size: 12px; }
.trk { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; }
.bigdl { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border-radius: var(--radius-lg); background: var(--green-bg); border: 1px solid color-mix(in oklab, var(--green) 30%, transparent); }
.bigdl h3 { font-size: 15px; display: flex; gap: 8px; align-items: center; }
.bigdl h3 svg { color: var(--green); }
.bigdl p { font-size: 13px; color: var(--text); }
.bigdl .row { flex-wrap: wrap; }
.actions { display: flex; flex-direction: column; gap: 14px; }
.copyrows { display: flex; flex-direction: column; }
.copyrow { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--border); font-size: 13px; }
.copyrow:first-child { border-top: 0; }
.copyrow span { color: var(--muted); }
.copyrow b { font-weight: 500; overflow-wrap: anywhere; }
.copyrow .iconbtn { width: 28px; height: 28px; }
.copyrows h5 { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); padding: 14px 0 4px; }
.copyrows h5:first-child { padding-top: 0; }

/* guida */
.guide { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.toc { display: none; }
.gsec { scroll-margin-top: 80px; }
.gsec .card__b { font-size: 14px; line-height: 1.6; }
.gsec .card__b p + p, .gsec .card__b p + ul, .gsec .card__b ul + p { margin-top: 10px; }
.gsec .card__b ul { padding-left: 18px; }
.gsec .card__b li + li { margin-top: 4px; }
.gsec .card__h h3 { display: flex; gap: 10px; align-items: center; }
.gsec .card__h h3 svg { color: var(--primary); }
.limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 4px 0 12px; }
.limits div { border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: var(--bg); }
.limits b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.limits small { color: var(--muted); font-size: 12px; }
.stlist { display: flex; flex-direction: column; gap: 10px; }
.stlist div { display: grid; grid-template-columns: 170px 1fr; gap: 10px; align-items: start; font-size: 13.5px; }
.stlist div > span:last-child { color: var(--muted); }
details.faq { border-top: 1px solid var(--border); padding: 12px 0; }
details.faq:first-child { border-top: 0; padding-top: 0; }
details.faq summary { cursor: pointer; font-weight: 600; font-size: 13.5px; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
details.faq summary::after { content: "+"; color: var(--muted); font-weight: 500; }
details.faq[open] summary::after { content: "–"; }
details.faq p { margin-top: 8px; color: var(--muted); font-size: 13.5px; }

@media (min-width: 981px) {
  .guide { grid-template-columns: 220px minmax(0, 1fr); }
  .toc { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 84px; }
  .toc a { padding: 6px 10px; border-radius: 8px; font-size: 13px; color: var(--muted); }
  .toc a:hover { background: var(--bg3); color: var(--text); }
}
@media (min-width: 641px) {
  .pk { grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr)); }
  .pk__type { grid-column: auto; }
}
@media (max-width: 640px) {
  .tbl-hide-sm { display: none; }
  .kpi--wide-only { display: none; }
  .kpi--span-sm { grid-column: 1 / -1; }
  /* col pollice: tasti e icone almeno 40 px, testo secondario più grande */
  .btn, .btn--sm { min-height: 40px; }
  .iconbtn, .copyrow .iconbtn { width: 40px; height: 40px; }
  .seg--lang button { min-height: 34px; min-width: 38px; }
  .li .grow small, .tbl td .sub, .tips, .steps li span, .kpi span { font-size: 13px; }
  .copyrow { grid-template-columns: 1fr auto; }
  .copyrow span { grid-column: 1 / -1; font-size: 12px; }
  .limits { grid-template-columns: 1fr; }
  .stlist div { grid-template-columns: 1fr; gap: 2px; }
  .wstep__f { flex-wrap: wrap; }
  .li { padding: 12px 16px; }
  .li .side-r { display: none; }
}

/* prezzi da listino (fase manuale) */
.sum__price { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.sum__price span { font-size: 13px; color: var(--muted); }
.sum__price b { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.sum__price small { flex-basis: 100%; font-size: 12px; color: var(--muted); line-height: 1.4; }
.pk__price { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.pk__price--warn { color: var(--warn, #b45309); }
.price-big { font-size: 26px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 4px; }
.tbl tfoot td { border-top: 1px solid var(--border); padding-top: 12px; padding-bottom: 12px; }
.ztbl td, .ztbl th { white-space: nowrap; }
.ztbl .sub { white-space: normal; max-width: 280px; }
.tbl .rowlink.mono { white-space: nowrap; }

/* login del team (/admin) */
.login { display: grid; gap: 12px; width: min(340px, 100%); margin: 6px auto 0; text-align: left; }
.login__err { color: var(--warn, #b45309); margin: 0; }
@media (max-width: 900px) { .only-wide { display: none !important; } }
