/* Metalplus Agenti - stile app (namespace .mpa) */
body.mpa-page { margin: 0; background: #f5f6f8; }
/* Layout: app a schermo intero, testata scura in alto, barra con 4 sezioni in basso, schede che salgono dal fondo */
.mpa {
  --ink: #1c1f24; --ink-2: #555c66; --ink-3: #8a919b;
  --paper: #ffffff; --steel: #eceef1; --steel-2: #f5f6f8; --line: #d9dde2;
  --green: #1f7a4a; --green-2: #e3f1e9; --red: #b3202a; --red-2: #f8e4e5; --amber: #a86a12; --amber-2: #fbefd9;
  --dst: #2c5fb8; --fta: #7a3b2e;
  --f-ui: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --nav-h: 64px;
  font-family: var(--f-ui); font-size: 16px; line-height: 1.45; color: var(--ink); background: var(--steel-2);
  min-height: 100vh; min-height: 100dvh; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
.mpa *, .mpa *::before, .mpa *::after { box-sizing: border-box; }
.mpa h1, .mpa h2, .mpa h3, .mpa p, .mpa ul, .mpa ol, .mpa dl, .mpa dd { margin: 0; padding: 0; }
.mpa ul, .mpa ol { list-style: none; }
.mpa img { display: block; max-width: 100%; }
.mpa a { color: inherit; text-decoration: none; }
.mpa [hidden] { display: none !important; }
.mpa button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; box-shadow: none !important; text-transform: none !important; letter-spacing: normal; white-space: normal !important; line-height: inherit; border-radius: 0; min-height: 0; }
.mpa input, .mpa textarea, .mpa select { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 11px 12px; width: 100%; margin: 0; box-shadow: none; outline: none; min-height: 0; height: auto; }
.mpa input:focus, .mpa textarea:focus, .mpa select:focus { border-color: var(--ink); }
.mpa :focus-visible { outline: 3px solid var(--dst); outline-offset: 2px; }
.mpa svg { flex: 0 0 auto; }

/* testata */
.mpa-top { position: sticky; top: 0; z-index: 30; background: var(--ink); color: #fff; padding-top: env(safe-area-inset-top, 0px); }
.mpa-top__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; max-width: 900px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.mpa-logo { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 8px; line-height: 1; }
.mpa-logo span { font-stretch: 125%; font-weight: 300; font-size: 17px; letter-spacing: .04em; }
.mpa-logo b { font-weight: 800; }
.mpa-logo i { grid-row: 2; height: 2px; margin-top: 4px; background: linear-gradient(90deg, #009246 0 33.3%, #e6e6e6 33.3% 66.6%, #ce2b37 66.6%); }
.mpa-logo em { grid-row: 1 / 3; grid-column: 2; font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #aeb5be; border-left: 1px solid #454b53; padding-left: 8px; }
.mpa .mpa-ctx { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 58%; background: #2c3138; border-radius: 999px; padding: 7px 12px; font-size: 14px; font-weight: 600; color: #fff; }
.mpa-ctx__t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mpa-ctx__dot { width: 8px; height: 8px; border-radius: 50%; background: #3ccf7f; flex: 0 0 auto; }
.mpa-ctx__dot.is-off { background: #e0a23a; }
.mpa-demo { background: var(--amber-2); color: #5a3a06; font-size: 13px; padding: 7px max(16px, env(safe-area-inset-right, 0px)) 7px max(16px, env(safe-area-inset-left, 0px)); text-align: center; }
.mpa-demo button { font-weight: 700; text-decoration: underline; }

.mpa-main { max-width: 900px; margin: 0 auto; padding: 18px max(16px, env(safe-area-inset-right, 0px)) calc(var(--nav-h) + 28px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.mpa-view { display: grid; gap: 14px; animation: mpaIn .25s ease-out; }
@keyframes mpaIn { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.mpa-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.mpa h1 { font-stretch: 115%; font-weight: 800; font-size: 28px; letter-spacing: -.02em; line-height: 1.1; }
.mpa-count { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ricerca */
.mpa-searchrow { display: flex; gap: 8px; }
.mpa-search { position: relative; display: block; flex: 1; min-width: 0; }
.mpa-search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--ink-3); stroke-width: 2; }
.mpa .mpa-search input { padding-left: 38px; border-radius: 10px; height: 46px; background: var(--paper); }
.mpa .mpa-iconbtn { width: 46px; height: 46px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.mpa-iconbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* chip categorie */
.mpa-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding: 2px max(16px, env(safe-area-inset-left, 0px)); }
.mpa-chips::-webkit-scrollbar { display: none; }
.mpa .mpa-chips button { flex: 0 0 auto; white-space: nowrap !important; font-size: 14px; font-weight: 600; padding: 7px 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--ink-2); display: inline-flex; align-items: center; gap: 7px; }
.mpa-chips button i { width: 8px; height: 8px; border-radius: 2px; background: var(--k, var(--ink-3)); }
.mpa .mpa-chips button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.mpa .mpa-pricectx { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--ink-2); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.mpa-pricectx b { color: var(--ink); }
.mpa-pricectx button { font-weight: 700; color: var(--dst); margin-left: auto; }

/* liste */
.mpa-list { display: grid; gap: 8px; }
.mpa .mpa-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; transition: border-color .15s, transform .1s; }
.mpa .mpa-row:active { transform: scale(.99); }
.mpa .mpa-row:hover { border-color: var(--ink-3); }
.mpa-row__main { min-width: 0; display: grid; gap: 2px; }
.mpa-row__t { font-weight: 700; font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.mpa-row__s { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.mpa-row__end { text-align: right; display: grid; gap: 4px; justify-items: end; }
.mpa-av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px; color: #fff; background: var(--k, var(--ink-2)); flex: 0 0 auto; }
.mpa-thumb { width: 54px; height: 54px; border-radius: 8px; background: var(--steel); overflow: hidden; display: grid; place-items: center; flex: 0 0 auto; position: relative; }
.mpa-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.mpa-thumb span { font-size: 10px; font-weight: 800; color: #fff; background: var(--k, var(--ink-3)); position: absolute; inset: auto 0 0 0; text-align: center; padding: 2px 0; letter-spacing: .04em; }
.mpa-code { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 13px; letter-spacing: .02em; color: var(--ink-2); }
.mpa-price { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 17px; white-space: nowrap; }
.mpa-price--old { font-weight: 500; font-size: 12px; color: var(--ink-3); text-decoration: line-through; }
.mpa-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border-radius: 4px; white-space: nowrap; }
.mpa-pill--dst { background: #e3ebf8; color: var(--dst); }
.mpa-pill--fta { background: #f3e5e1; color: var(--fta); }
.mpa-pill--ok { background: var(--green-2); color: var(--green); }
.mpa-pill--q { background: var(--amber-2); color: var(--amber); }
.mpa-pill--off { background: var(--steel); color: var(--ink-2); }
.mpa .mpa-more { justify-self: center; font-weight: 700; color: var(--dst); padding: 10px 16px; }

.mpa-empty { background: var(--paper); border: 1px dashed var(--line); border-radius: 12px; padding: 26px 18px; text-align: center; color: var(--ink-2); display: grid; gap: 12px; justify-items: center; }
.mpa-empty b { color: var(--ink); font-size: 17px; }

/* pulsanti */
.mpa .mpa-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 18px; border-radius: 10px; font-weight: 700; font-size: 16px; background: var(--ink); color: #fff; text-align: center; transition: background .15s, opacity .15s; }
.mpa .mpa-btn:hover { background: #33383f; }
.mpa .mpa-btn--green { background: var(--green); }
.mpa .mpa-btn--green:hover { background: #18663c; }
.mpa .mpa-btn--line { background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); }
.mpa .mpa-btn--line:hover { background: var(--steel); }
.mpa .mpa-btn--light { background: #fff; color: var(--ink); }
.mpa .mpa-btn--danger { background: var(--paper); color: var(--red); border: 1.5px solid var(--red-2); }
.mpa .mpa-btn--small { min-height: 38px; padding: 8px 12px; font-size: 14px; }
.mpa .mpa-btn[disabled] { opacity: .5; cursor: not-allowed; }
.mpa-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.mpa-btns { display: grid; gap: 8px; }
.mpa-btns--2 { grid-template-columns: 1fr 1fr; }
.mpa .mpa-link { font-weight: 700; color: var(--dst); }

/* segmenti */
.mpa-seg { display: flex; background: var(--steel); border-radius: 10px; padding: 4px; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.mpa .mpa-seg button { flex: 1; min-width: max-content; padding: 9px 12px; border-radius: 7px; font-weight: 700; font-size: 14px; color: var(--ink-2); white-space: nowrap !important; }
.mpa .mpa-seg button[aria-selected="true"], .mpa .mpa-seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12) !important; }
.mpa .mpa-seg--lst button[data-l="DST"][aria-pressed="true"] { background: var(--dst); color: #fff; }
.mpa .mpa-seg--lst button[data-l="FTA"][aria-pressed="true"] { background: var(--fta); color: #fff; }

/* blocchi e campi */
.mpa-card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 12px; min-width: 0; }
.mpa-card h2 { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.mpa-field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; min-width: 0; }
.mpa-field small { font-weight: 500; color: var(--ink-3); font-size: 12px; }
.mpa-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mpa-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
.mpa-kv dt { color: var(--ink-2); }
.mpa-kv dd { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.mpa-kv a { color: var(--dst); }
.mpa-note { border-left: 3px solid var(--line); padding: 2px 0 2px 10px; font-size: 15px; }
.mpa-note time { display: block; font-size: 12px; color: var(--ink-3); }
.mpa-calc { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.mpa-calc b { color: var(--green); }

/* scheda a comparsa */
.mpa-sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.mpa-sheet__bg { position: absolute; inset: 0; background: rgba(20,22,26,.5); animation: mpaFade .2s ease-out; }
.mpa-sheet__box { position: relative; width: 100%; max-width: 640px; max-height: 92vh; max-height: 92dvh; background: var(--steel-2); border-radius: 18px 18px 0 0; display: flex; flex-direction: column; animation: mpaUp .28s cubic-bezier(.2,.8,.2,1); padding-bottom: env(safe-area-inset-bottom, 0px); }
@keyframes mpaUp { from { transform: translateY(40%); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes mpaFade { from { opacity: 0; } to { opacity: 1; } }
.mpa-sheet__bar { display: flex; justify-content: flex-end; padding: 10px 12px 0; position: relative; }
.mpa-sheet__bar::before { content: ""; position: absolute; left: 50%; top: 8px; width: 40px; height: 4px; border-radius: 2px; background: var(--line); transform: translateX(-50%); }
.mpa .mpa-sheet__x { width: 38px; height: 38px; border-radius: 50%; background: var(--steel); display: grid; place-items: center; }
.mpa-sheet__x svg { width: 18px; height: 18px; stroke: var(--ink); stroke-width: 2; }
.mpa-sheet__body { overflow-y: auto; padding: 4px max(16px, env(safe-area-inset-right, 0px)) 22px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 14px; -webkit-overflow-scrolling: touch; }
.mpa-sheet__body h2.mpa-st { font-stretch: 110%; font-size: 22px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.mpa-hero { background: var(--paper); border-radius: 12px; height: 230px; min-height: 230px; width: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; flex: 0 0 auto; }
.mpa-hero img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; padding: 12px; box-sizing: border-box; }
.mpa-hero span { font-weight: 800; color: var(--ink-3); }
.mpa-prices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mpa-prices div { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 2px; }
.mpa-prices div.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.mpa-prices small { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.mpa-prices b { font-variant-numeric: tabular-nums; font-size: 18px; }
.mpa-prices div.is-net { background: var(--green-2); border-color: var(--green-2); }
.mpa-prices div.is-net b { color: var(--green); }

/* quantità */
.mpa-qty { display: inline-flex; align-items: center; border: 1.5px solid var(--ink); border-radius: 10px; overflow: hidden; background: var(--paper); }
.mpa .mpa-qty button { width: 44px; height: 44px; font-size: 22px; font-weight: 600; display: grid; place-items: center; }
.mpa .mpa-qty input { width: 56px; border: 0; border-radius: 0; text-align: center; font-weight: 800; font-size: 17px; padding: 0; height: 44px; font-variant-numeric: tabular-nums; }
.mpa-qty--s button { width: 34px !important; height: 34px !important; font-size: 18px !important; }
.mpa-qty--s input { width: 40px !important; height: 34px !important; font-size: 15px !important; }

/* righe ordine */
.mpa-line { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; }
.mpa-line__top { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; }
.mpa-line__d { font-weight: 700; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.mpa-line__bot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.mpa-line__sc { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.mpa .mpa-line__sc input { width: 86px; padding: 7px 8px; font-size: 14px; }
.mpa .mpa-x { color: var(--ink-3); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; }
.mpa .mpa-x:hover { background: var(--red-2); color: var(--red); }
.mpa-x svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; }
.mpa-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 2px; }
.mpa-total span { font-size: 14px; color: var(--ink-2); }
.mpa-total b { font-stretch: 115%; font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* barra in basso */
.mpa-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--paper); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(var(--nav-n, 5), 1fr); padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.mpa .mpa-nav button { position: relative; height: var(--nav-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.mpa-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mpa .mpa-nav button[aria-current="page"] { color: var(--ink); }
.mpa .mpa-nav button[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--green); }
.mpa-badge { position: absolute; top: 8px; left: calc(50% + 6px); min-width: 19px; height: 19px; border-radius: 10px; background: var(--green); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 5px; font-variant-numeric: tabular-nums; animation: mpaPop .3s; }
.mpa-badge--warn { background: var(--amber); }
@keyframes mpaPop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: none; } }

/* toast */
.mpa-toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 80; background: var(--ink); color: #fff; font-weight: 600; font-size: 15px; padding: 11px 16px; border-radius: 10px; max-width: calc(100% - 32px); transition: opacity .2s, transform .2s; text-align: center; }
.mpa-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* lettore codici */
.mpa-scan { position: fixed; inset: 0; z-index: 90; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: #fff; padding: env(safe-area-inset-top, 0px) 16px env(safe-area-inset-bottom, 0px); }
.mpa-scan video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mpa-scan__frame { position: relative; width: min(78vw, 360px); aspect-ratio: 2 / 1; border: 3px solid #3ccf7f; border-radius: 12px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
.mpa-scan p, .mpa-scan button { position: relative; }

/* sezione ufficio */
.mpa-office summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mpa-office summary::-webkit-details-marker { display: none; }
.mpa-office summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--ink-3); }
.mpa-office[open] summary::after { content: "\2212"; }
.mpa-office[open] { gap: 12px; }
.mpa-office:not([open]) > :not(summary) { display: none; }

/* lead fiera */
.mpa-photo { display: flex; gap: 10px; align-items: center; }
.mpa-photo img { width: 72px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.mpa-ints { display: flex; flex-wrap: wrap; gap: 6px; }
.mpa .mpa-ints button { font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); }
.mpa .mpa-ints button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }

.mpa-links { display: grid; gap: 8px; }
.mpa-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-weight: 700; }
.mpa-links a small { display: block; font-weight: 500; color: var(--ink-2); font-size: 13px; }
.mpa-links svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-3); stroke-width: 2; }

@media (min-width: 760px) {
  .mpa h1 { font-size: 34px; }
  .mpa-list--items { grid-template-columns: 1fr 1fr; }
  .mpa-sheet { align-items: center; }
  .mpa-sheet__box { border-radius: 18px; }
}
@media (max-width: 380px) {
  .mpa-prices { grid-template-columns: 1fr 1fr; }
  .mpa-btns--2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .mpa *, .mpa *::before, .mpa *::after { animation: none !important; transition: none !important; }
}

/* ---------- aggiunte versione con accesso ---------- */
.mpa.is-office { --nav-n: 6; }
.mpa-boot { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; background: var(--ink); color: #fff; padding: 24px; }
.mpa-boot__in { width: 100%; max-width: 380px; display: grid; gap: 22px; }
.mpa-boot .mpa-logo span { font-size: 24px; }
.mpa-boot .mpa-logo em { font-size: 12px; }
.mpa-boot h1 { color: #fff; font-size: 30px; }
.mpa-boot p { color: #aeb5be; font-size: 15px; }
.mpa-boot form { display: grid; gap: 12px; }
.mpa-boot label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: #d9dde2; }
.mpa .mpa-boot input { background: #2c3138; border-color: #454b53; color: #fff; height: 50px; font-size: 17px; }
.mpa .mpa-boot input:focus { border-color: #fff; }
.mpa-boot__err { background: #4a1f23; color: #ffd9dc; border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.mpa-boot__err:empty { display: none; }
.mpa-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #454b53; border-top-color: #3ccf7f; animation: mpaSpin .8s linear infinite; justify-self: center; }
@keyframes mpaSpin { to { transform: rotate(360deg); } }
.mpa .mpa-pass { position: relative; }
.mpa .mpa-pass button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 13px; font-weight: 700; color: #aeb5be; padding: 8px; }

.mpa select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.mpa-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mpa-toolbar > * { flex: 0 0 auto; }
.mpa-toolbar .mpa-search { flex: 1 1 220px; }
.mpa .mpa-toolbar select { width: auto; max-width: 100%; height: 46px; border-radius: 10px; }
.mpa-addbtn { position: relative; }
.mpa-sync { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.mpa-sync i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.mpa-sync.is-wait i { background: var(--amber); }
.mpa-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.mpa-stat { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; }
.mpa-stat b { font-stretch: 115%; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.mpa-stat span { font-size: 13px; color: var(--ink-2); }
.mpa-stat.is-warn b { color: var(--amber); }
.mpa-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mpa-table th { text-align: left; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); padding: 8px 6px; border-bottom: 1px solid var(--line); }
.mpa-table td { padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.mpa-table tr[data-act] { cursor: pointer; }
.mpa-table tr[data-act]:hover td { background: var(--steel-2); }
.mpa-table .n { text-align: right; font-variant-numeric: tabular-nums; }
.mpa-check { display: flex; gap: 10px; align-items: center; font-size: 15px; font-weight: 600; }
.mpa .mpa-check input { width: 20px; height: 20px; accent-color: var(--green); padding: 0; flex: 0 0 auto; }
.mpa-cred { background: var(--ink); color: #fff; border-radius: 12px; padding: 16px; display: grid; gap: 6px; font-size: 15px; }
.mpa-cred b { font-variant-numeric: tabular-nums; font-size: 17px; letter-spacing: .02em; overflow-wrap: anywhere; }
.mpa-cred small { color: #aeb5be; }
.mpa-pill--new { background: #e3ebf8; color: var(--dst); }
.mpa-pill--warn { background: var(--red-2); color: var(--red); }
.mpa-inline { display: flex; gap: 8px; align-items: end; }
.mpa-inline > :first-child { flex: 1; min-width: 0; }
.mpa-progress { height: 6px; border-radius: 3px; background: var(--steel); overflow: hidden; }
.mpa-progress i { display: block; height: 100%; background: var(--green); width: 0; transition: width .2s; }
.mpa-muted { color: var(--ink-3); }
@media (max-width: 420px) { .mpa .mpa-nav button span { font-size: 11px; } .mpa.is-office .mpa-nav button span { font-size: 10px; letter-spacing: -.01em; } }

/* a schermo intero sopra il tema */
html.mpa-html { margin-top: 0 !important; }
body.mpa-on { margin: 0 !important; padding: 0 !important; background: #f5f6f8 !important; }
body.mpa-on > *:not(#mpa):not(script):not(style):not(link) { display: none !important; }
.mpa .mpa-row--stack { grid-template-columns: auto 1fr; }
.mpa-row--stack .mpa-row__end { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; justify-items: start; text-align: left; }

/* ---------- configuratore casellari ---------- */
.cf-layout { display: flex; flex-direction: column; gap: 14px; }
.cf-col { display: grid; gap: 14px; min-width: 0; }
/* telefono: il disegno sta in alto, così si vede subito cosa cambia */
@media (max-width: 859px) {
  .cf-col--side { display: contents; }
  .cf-prev { order: -1; position: sticky; top: 60px; z-index: 5; box-shadow: 0 6px 14px -10px rgba(0,0,0,.35); }
  .cf-art { height: clamp(140px, 24vh, 200px); }
  .cf-prev { padding: 8px; gap: 0; }
  .cf-prev > p { display: none; }
}
@media (min-width: 860px) {
  .cf-layout { display: grid; align-items: start; }
  .mpa-main:has(#v-config:not([hidden])) { max-width: 1180px; }
  .cf-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  .cf-col--side { position: sticky; top: 72px; }
}
.cf-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cf-opts--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) { .cf-opts--3 { grid-template-columns: 1fr; } }
.mpa .cf-opt { text-align: left; display: grid; gap: 4px; align-content: start; padding: 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); }
.cf-opt b { font-size: 15px; }
.cf-opt span { font-size: 12.5px; color: var(--ink-2); line-height: 1.35; }
.mpa .cf-opt[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink) !important; background: var(--steel-2); }
.mpa .mpa-seg button[disabled] { opacity: .4; cursor: not-allowed; }
.cf-sub { margin-left: 30px; }
.cf-warn { background: var(--amber-2); color: #5a3a06; border-radius: 8px; padding: 9px 12px; font-size: 13.5px; }
.cf-prev { padding: 10px; }
.cf-art { background: #f4f5f6; border-radius: 8px; overflow: hidden; height: clamp(200px, 42vh, 380px); display: flex; }
.cf-art svg { width: 100%; height: 100%; display: block; }
.cf-blocks { display: grid; gap: 6px; }
.cf-block { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.cf-block:last-child { border-bottom: 0; }
.cf-block span { display: grid; font-size: 15px; }
.cf-block small { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.cf-lines { display: grid; }
.cf-lines li { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cf-lines li .mpa-line__d { font-size: 14px; }
.cf-lines s { color: var(--ink-3); }
.mpa .cf-ptable input { padding: 7px 8px; font-size: 14px; min-width: 84px; }
.mpa .cf-ptable td.n input { text-align: right; width: 96px; }
.mpa .cf-ptable td:nth-child(2) input { width: 110px; }
.mpa .cf-ptable input::placeholder { color: var(--ink-3); }
