:root {
  --Dash-Fill-Interactive-Strong: var(--arancio);
 --arancio: #e8590c; --arancio-chiaro: #fdeee6; --grigio: #6b6f76; --bordo: #e3e5e8; --verde: #2f9e44; --rosso: #d6336c; --testo: #111;
 --riga-selezionata: #eef0f4; --riga-selezionata-bordo: #adb5bd; }
* { box-sizing: border-box; }
body { font-family: "Helvetica Neue", Arial, sans-serif; background: #fff; color: var(--testo); margin: 0; font-size: 13px; }
body { caret-color: transparent; }
input, textarea, [contenteditable="true"], [contenteditable=""], [contenteditable="plaintext-only"] { caret-color: auto; }
a { color: var(--arancio); }
h1 { font-size: 1.9rem; font-weight: 700; margin: 2px 0 4px; letter-spacing: -0.01em; }
h3 { font-size: 1.05rem; font-weight: 700; margin: 0  0 10px; }
#corpo-confronto h3:first-child { margin-top: 0; }
.eyebrow { color: var(--arancio); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.sottotitolo { color: var(--grigio); font-size: 0.78rem; margin: 2px 0 10px; }
.non-disponibile, .nota-piccola { color: var(--grigio); font-size: 0.8rem; }
.errore { color: var(--rosso); padding: 12px 0; }

.topbar { display: flex; align-items: center; gap: 10px; padding: 14px clamp(16px, 4vw, 64px); border-bottom: 1px solid var(--bordo); font-weight: 700; font-size: 0.95rem; }
.logo-quadrato { width: 24px; height: 24px; object-fit: contain; display: inline-block; }
#contenuto { width: 100%; padding: 22px clamp(16px, 4vw, 64px) 70px; }

.login-box { max-width: 340px; margin: 90px auto; display: flex; flex-direction: column; gap: 12px; }
.login-box input { padding: 9px 10px; border: 1px solid var(--bordo); border-radius: 3px; }

.btn-primario { background: var(--arancio); color: #fff; border: 0; border-radius: 3px; padding: 11px 26px; font-weight: 700; font-size: 0.72rem; letter-spacing: 0.04em; cursor: pointer; }
.btn-secondario { background: #fff; color: var(--arancio); border: 1px solid var(--bordo); border-radius: 3px; padding: 11px 24px; font-weight: 700; font-size: 0.72rem; letter-spacing: 0.04em; cursor: pointer; }
.btn-pag { background: #fff; border: 1px solid var(--bordo); border-radius: 3px; padding: 4px 12px; cursor: pointer; }

.card-ricerca { border: 1px solid var(--bordo); border-radius: 4px; padding: 20px 22px; margin-top: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.riga-ricerca { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.campo-grande { flex: 1 1 320px; }
.campo-righe { width: 150px; }
label { font-weight: 700; font-size: 0.75rem; display: block; margin-bottom: 4px; }
.input-mock { width: 100%; height: 38px; border: 1px solid #333; border-radius: 2px; padding: 4px 10px; font-size: 0.85rem; }
.dropdown-mock .Select-control, .dropdown-mock > div > div { min-height: 38px; font-size: 0.85rem; }
.sezione-etichetta { color: var(--grigio); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; margin: 22px 0 6px; }
.gruppo { border-left: 2px solid var(--bordo); padding-left: 12px; margin: 10px 0 18px; }
.gruppo-titolo { font-weight: 700; font-size: 0.78rem; margin-bottom: 6px; }
.griglia-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.griglia-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.griglia-5 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.criteri { margin: 14px 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.72rem; }
.criteri-etichetta { color: var(--grigio); }
.chip-criterio { border: 1px solid var(--bordo); padding: 3px 8px; border-radius: 2px; }
.chip-x { background: none; border: 0; color: var(--arancio); font-weight: 700; margin-left: 6px; cursor: pointer; }
.link-btn { background: none; border: 0; color: var(--arancio); text-decoration: underline; cursor: pointer; font-size: 0.72rem; }

.scroll-x { overflow-x: auto; }
.scroll-x-piena { margin-left: -22px; margin-right: -22px; }
.scroll-x-piena .tabella-mock th:first-child, .scroll-x-piena .tabella-mock td:first-child { padding-left: 22px; }
.scroll-x-piena .tabella-mock th:last-child, .scroll-x-piena .tabella-mock td:last-child { padding-right: 22px; }
.tabella-mock { width: 100%; border-collapse: collapse; font-size: 0.75rem; }
.tabella-mock th { text-align: left; font-weight: 700; padding: 5px 8px; border-bottom: 1.5px solid #111; white-space: nowrap; }
.tabella-mock td { padding: 3px 8px; border-bottom: 1px solid var(--bordo); vertical-align: middle; }
.tabella-mock .num { text-align: right; }
.tabella-mock td.num { white-space: nowrap; }
.tabella-mock th.num { white-space: normal; line-height: 1.2; }
.tabella-mock th.num.col-posizione { white-space: nowrap; }
.tabella-mock .centro { text-align: center; }
.tabella-mock .col-barra { width: 22%; min-width: 120px; }
.tabella-mock small { color: var(--grigio); }
.tabella-lista { table-layout: fixed; }
.tabella-lista th, .tabella-lista td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.separatore { border: 0; border-top: 1px solid var(--bordo); margin: 14px 0; opacity: 1; }
.tabella-lista td:has(> .link-cella) { padding: 0; }
.link-cella { display: block; padding: 3px 8px; overflow: hidden; text-overflow: ellipsis; color: inherit; text-decoration: none; cursor: pointer; }
.tabella-lista tbody tr:hover td { background: var(--riga-selezionata); }
.th-ordina { background: none; border: 0; font-weight: 700; cursor: pointer; padding: 0; color: #111; font-size: 0.78rem; }
.th-ordina:hover { color: var(--arancio); }
.freccia-ord { color: #b5b8bd; font-size: 0.7rem; }
.freccia-ord.attiva { color: var(--arancio); }
.paginazione { display: flex; align-items: center; gap: 14px; justify-content: flex-end; margin-top: 14px; }
.riga-corrente td { background: var(--arancio-chiaro); font-weight: 700; }

.barra { position: relative; height: 10px; background: #d9d9d9; border-radius: 1px; }
.barra::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none;
  background-image: repeating-linear-gradient(to right, rgba(0, 0, 0, 0.22) 0, rgba(0, 0, 0, 0.22) 1px, transparent 1px, transparent 20%); }
.barra-riempimento { height: 100%; background: var(--arancio); }
.distribuzione-marginalita .barra { cursor: zoom-in; touch-action: manipulation; user-select: none; }
.distribuzione-marginalita[data-zoom] .barra { cursor: zoom-out; }
.barra-marker { position: absolute; top: -3px; bottom: -3px; border-left: 1.5px dashed #333; }
.ok { color: var(--arancio); font-weight: 700; }
.ko { color: #aaa; }
.tag-reale, .tag-stimato { display: inline-block; font-size: 0.6rem; font-weight: 700; padding: 1px 6px; border: 1px solid; border-radius: 2px; cursor: help; margin-top: 6px; }
.tag-reale { color: #666; border-color: #bbb; }
.tag-stimato { color: #1b5e50; border-color: #1b5e50; }

.torna { font-size: 0.78rem; text-decoration: none; display: inline-block; margin-bottom: 8px; }
.scheda-testata { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 28px; margin-top: 10px; }
.colonna-sinistra .foto-box { position: relative; height: 230px; border: 1px solid var(--bordo); display: flex; align-items: center; justify-content: center; background: #fff; overflow: hidden; }
.foto-ph { color: #aaa; font-size: 0.75rem; }
.foto-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.kv-riga { display: flex; justify-content: space-between; padding: 9px 4px; border-bottom: 1px solid var(--bordo); font-size: 0.72rem; }
.kv-riga span { color: var(--grigio); }
.kv-riga strong { text-align: right; }
.tab-planogram { width: 100%; margin-top: 14px; font-size: 0.8rem; text-align: center; border-collapse: collapse; }
.tab-planogram th { border-bottom: 1.5px solid #111; padding: 4px; }
.tab-planogram td { padding: 6px; }

.kpi-griglia { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 14px; }
.kpi-card { border: 1px solid var(--bordo); border-top: 2px solid var(--arancio); padding: 14px 14px 12px; background: #fff; }
.kpi-titolo { color: var(--grigio); font-size: 0.72rem; display: flex; gap: 6px; align-items: center; }
.kpi-titolo i { color: var(--arancio); }
.kpi-valore { font-size: 1.55rem; font-weight: 800; }
.kpi-unita { color: var(--grigio); font-size: 0.7rem; }
.kpi-var { font-size: 0.7rem; margin-top: 6px; color: var(--grigio); }
.freccia { font-size: 0.6rem; font-weight: 700; }
.var-positiva { color: var(--verde); }
.var-negativa { color: var(--rosso); }
.var-neutra { color: var(--grigio); }
.kpi-sotto { font-size: 0.68rem; color: var(--grigio); margin-top: 8px; }
.nota-stima { font-size: 0.68rem; color: var(--grigio); margin: 12px 0 18px; }
.prezzo { margin-top: 12px; font-size: 0.85rem; }

.titolo-con-fonte { display: flex; align-items: baseline; gap: 10px; }
.titolo-con-fonte h3 { margin-bottom: 8px; }
.fonte { color: var(--grigio); font-size: 0.7rem; }

.tabs-mock { margin-top: 6px; border-bottom: 1px solid var(--bordo); }
.tabs-mock .nav-link { color: #555; font-weight: 600; font-size: 0.78rem; border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; background: none; border-radius: 0; }
.tabs-mock .nav-link.active { color: var(--arancio); border-bottom-color: var(--arancio); background: none; }
.contenuto-tab { padding-top: 4px; }
.definizione { background: #f5f5f6; border-left: 3px solid var(--arancio); padding: 14px 18px; margin: 18px 0 8px; }
.definizione-titolo { color: var(--arancio); font-weight: 700; font-size: 0.65rem; letter-spacing: 0.05em; margin-bottom: 6px; }
.definizione-testo { font-size: 0.78rem; line-height: 1.55; }
.definizione-fonte { color: var(--grigio); font-size: 0.65rem; border-top: 1px solid var(--bordo); margin-top: 10px; padding-top: 8px; }

.kpi-box-riga { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border: 1px solid var(--bordo); }
.kpi-box-riga.quattro { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.kpi-box { padding: 12px 14px; border-right: 1px solid var(--bordo); border-bottom: 1px solid var(--bordo); margin: 0 -1px -1px 0; }
.kpi-box:last-child { border-right: 0; }
.kpi-box-titolo { color: var(--grigio); font-size: 0.7rem; }
.kpi-box-valore { font-size: 1.6rem; font-weight: 800; }
.kpi-box-valore.arancio { color: var(--arancio); }
.kpi-box-valore small { font-size: 0.9rem; }
.kpi-box-sotto { color: var(--grigio); font-size: 0.68rem; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-attributo { border: 1px solid var(--arancio); color: var(--arancio); padding: 3px 8px; font-size: 0.68rem; }
.chip-campo { border: 1px solid var(--bordo); padding: 2px 7px; font-size: 0.62rem; }
.chip-campo small { color: var(--grigio); font-size: 0.55rem; }
.foto-mini { width: 74px; height: 56px; flex: none; background: #f1f3f5; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.foto-mini img { max-width: 100%; max-height: 100%; }
.archetipo-card { display: flex; gap: 18px; border: 1px solid #f3b690; background: var(--arancio-chiaro); padding: 18px 22px; margin-bottom: 14px; }
.archetipo-icona { color: var(--arancio); font-size: 1.5rem; }
.archetipo-nome { font-size: 1.1rem; font-weight: 800; margin: 3px 0 6px; }
.archetipo-def { font-size: 0.8rem; }
.archetipo-geo { color: var(--grigio); font-size: 0.7rem; margin-top: 6px; }


.tabella-mock th.centro { font-size: 0.6rem; text-align: center; white-space: normal; min-width: 52px; line-height: 1.15; }
.tabella-mock td.centro { text-align: center; }

.tabella-mock th.colonna-allin-centrale { text-align: center; white-space: normal; }
.tabella-mock td.colonna-allin-centrale { text-align: center; }

.tabella-persistenza-x-insegna table { table-layout: fixed; width: 100%; }
.tabella-persistenza-x-insegna th, .tabella-persistenza-x-insegna td { width: 33.33%; }

.tabella-ordinabile th.th-ordinabile { cursor: pointer; user-select: none; }
.tabella-ordinabile th.th-ordinabile:hover { color: var(--arancio); }
.tabella-ordinabile th.th-ordinabile::after { content: "\2195"; display: inline-block; margin-left: 4px; opacity: 0.35; font-size: 0.9em; }
.tabella-ordinabile th.th-ordinabile.ord-asc::after { content: "\2191"; opacity: 1; color: var(--arancio); }
.tabella-ordinabile th.th-ordinabile.ord-desc::after { content: "\2193"; opacity: 1; color: var(--arancio); }

@media (max-width: 900px) {
  .scheda-testata { grid-template-columns: 1fr; }
  .colonna-sinistra { max-width: 420px; position: static; max-height: none; }
  .riga-ricerca { flex-direction: column; align-items: stretch; }
  .campo-righe { width: 100%; }
  .tabs-mock { overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; }
  h1 { font-size: 1.45rem; }
}
.paginazione { margin: 10px 0 8px; }

body:has(.login-pagina) .topbar { display: none; }
body:has(.login-pagina) #contenuto { padding: 0; }
.login-pagina { min-height: 100vh; display: flex; flex-direction: column; font-family: Arial, sans-serif; background-color: #000;
  background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('/assets/sfondo_login.jpg'); background-size: cover; background-position: center; background-attachment: fixed; }
.login-centro { flex: 1; display: flex; justify-content: center; align-items: center; padding-top: 24px; }
.login-box { width: 360px; max-width: 92vw; padding: 40px; text-align: center; display: flex; flex-direction: column; align-items: center; margin: 0; }
.login-modulo { font-size: 0.95rem; font-weight: 700; letter-spacing: 0.04em; color: #fff; margin: -14px 0 22px; text-transform: uppercase; }
.login-logo { width: 160%; margin-left: -10%; margin-bottom: 30px; display: block; }
.login-gruppo { display: flex; align-items: center; width: 100%; margin-bottom: 20px; position: relative; justify-content: center; }
.login-gruppo label { position: absolute; right: 100%; margin: 0 12px 0 0; font-size: 22px; font-weight: 600; color: #fff; white-space: nowrap; }
.login-gruppo input { width: 220px; height: 45px; padding: 0 12px; line-height: 45px; font-size: 16px; border-radius: 4px; border: 1px solid #ccc; }
.login-pulsante { width: 220px; padding: 12px; background: #f37021; color: #fff; border: 0; border-radius: 4px; cursor: pointer; font-weight: bold; font-size: 15px; letter-spacing: 1px; margin-top: 25px; }
.login-errore { margin-top: 20px; width: 100%; box-sizing: border-box; color: #e30613; font-size: 13px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; background: rgba(255,255,255,0.9); padding: 0; border-radius: 3px; }
.login-errore:not(:empty) { padding: 8px 12px; }
.login-assistenza { margin-top: auto; padding: 24px 0 8vh; width: 100%; text-align: center; }
.login-link-assistenza { display: inline-block; width: 220px; padding: 12px; background: #eee; color: #333; text-decoration: none; font-weight: bold; font-size: 15px; letter-spacing: 1px; border-radius: 4px; box-sizing: border-box; }
.login-email { font-size: 0.9rem; font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,0.85); user-select: all; }
@media (max-width: 700px) {
  .login-gruppo { flex-direction: column; align-items: stretch; }
  .login-gruppo label { position: static; margin: 0 0 4px; font-size: 16px; text-align: left; }
  .login-gruppo input, .login-pulsante, .login-link-assistenza { width: 100%; }
  .login-logo { width: 100%; margin-left: 0; }
}

.login-riga-email { margin-top: 8px; display: flex; justify-content: center; align-items: center; gap: 8px; }
.login-copia { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid #fff; border-radius: 4px; padding: 2px 10px; font-size: 0.8rem; cursor: pointer; }
.login-testo-webmail { color: #fff; font-size: 0.85rem; text-shadow: 0 1px 3px rgba(0,0,0,0.85); }
.login-link-webmail { color: #fff; font-size: 0.85rem; text-decoration: underline; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,0.85); }
.login-riga-webmail { margin-top: 6px; }

.topbar { justify-content: flex-start; }
.btn-esci { margin-left: auto; background: none; border: 1px solid var(--bordo); border-radius: 3px; padding: 4px 14px; font-size: 0.75rem; cursor: pointer; color: #333; }
.btn-esci:hover { border-color: var(--arancio); color: var(--arancio); }

.breadcrumb-merc { color: var(--grigio); font-size: 0.78rem; margin: 4px 0 2px; }
.contesto { margin-top: 28px; }

.topbar-link { margin-left: 18px; font-weight: 600; font-size: 0.8rem; color: var(--testo); text-decoration: none; }
.topbar-link:hover { color: var(--arancio); }
.poc-scroll { max-height: 70vh; overflow: auto; border: 1px solid var(--bordo); }
.tabella-poc { width: max-content; min-width: 100%; font-size: 0.72rem; }
.tabella-poc thead th { position: sticky; z-index: 3; background: #fff; }
.tabella-poc thead tr:first-child th { top: 0; color: #fff; text-align: center; letter-spacing: 0.06em; font-size: 0.7rem; padding: 8px; border-bottom: 0; }
.tabella-poc thead tr:nth-child(2) th { top: 33px; border-bottom: 1.5px solid #111; }
.fascia-circana { background: #2c5f7c !important; }
.fascia-megamark { background: #e8590c !important; }
.tabella-poc th.th-circana { background: #eaf1f5; }
.tabella-poc th.th-megamark { background: #fdeee6; }
.tabella-poc td, .tabella-poc th { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabella-poc .fissa { position: sticky; left: 0; z-index: 2; background: #fff; }
.tabella-poc thead .fissa { z-index: 4; }
.tabella-poc td.fissa:nth-child(2), .tabella-poc th.fissa:nth-child(2) { left: 240px; }
.tabella-poc td.cella-vuota { background: #f4f5f6; color: #b0b4ba; }
.tabella-poc td.num { font-variant-numeric: tabular-nums; }
.tabella-poc th.fissa:nth-child(1), .tabella-poc td.fissa:nth-child(1) { min-width: 240px; max-width: 240px; }
.tabella-poc th.fissa:nth-child(2), .tabella-poc td.fissa:nth-child(2) { min-width: 120px; }
.fascia-testo { position: sticky; left: 400px; display: inline-block; }
.tabella-poc thead tr:first-child th { height: 32px; padding: 0 8px; line-height: 32px; }
.tabella-poc thead tr:nth-child(2) th { top: 32px; }
.tabella-poc thead tr:first-child th { text-align: left; }
.pannello-metriche { border: 1px solid var(--bordo); padding: 10px 16px; margin: 12px 0 18px; }
.pannello-metriche summary { cursor: pointer; font-weight: 700; font-size: 0.9rem; padding: 4px 0; }
.gruppo-metriche { margin-top: 14px; }
.gruppo-metriche-titolo { font-size: 0.82rem; margin-bottom: 4px; }
.etichetta-fonte { color: #fff; padding: 2px 8px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.05em; }
.fonte-circana { background: #2c5f7c; } .fonte-megamark { background: #e8590c; }
.tabella-metriche { font-size: 0.74rem; } .tabella-metriche .grigio, .gruppo-metriche-titolo .grigio { color: var(--grigio); }
.tabella-metriche th.num, .tabella-metriche td.num { text-align: right; width: 110px; }
.pannello-metriche[open] { max-height: 340px; overflow: auto; }

.esito-ok { color: var(--verde); font-weight: 700; }
.esito-ko { color: var(--rosso); font-weight: 700; }
.sql-prova { background: #f6f7f8; border: 1px solid var(--bordo); border-radius: 6px; padding: 10px; font-size: 12px; white-space: pre-wrap; overflow-x: auto; }

.sezione-ricerca { border: 1px solid var(--bordo); border-radius: 4px; padding: 14px 16px 16px; margin-top: 14px; background: #fafafa; }
.sezione-ricerca .sezione-etichetta { margin-top: 0; }
.riga-bottoni { display: flex; gap: 12px; margin: 16px 0 6px; }

.pillola { color: #fff; font-weight: 700; font-size: 0.85rem; padding: 3px 14px; border-radius: 16px; }
.pillola-ean { background: #6a4c93; }
.pillola-mm { background: var(--arancio); }

.barra-dettaglio { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.scheda-titolo { margin: 6px 0 14px; }
.scheda-titolo h1 { font-size: 1.5rem; margin: 2px 0; }
.colonna-sinistra { position: sticky; top: 12px; align-self: start; max-height: calc(100vh - 24px); overflow-y: auto; padding-right: 2px; }

.pillola { user-select: text; cursor: text; display: inline-block; line-height: 1.3; }
.pillola-padre { background: var(--grigio); }
.kv .pillola, .tabella-mock .pillola, .attr-riga .pillola { font-size: 0.72rem; padding: 2px 11px; white-space: nowrap; }
.tab-planogram .pillola { font-size: 0.72rem; padding: 2px 11px; }

.attr-etichetta { color: var(--grigio); }
.attr-nd { color: #b4b8be; font-style: italic; }
.attr-mancante .attr-etichetta { color: #b4b8be; }
.titolo-con-fonte h3 { font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; }

.sintesi { margin-top: 18px; }
.sintesi-titolo { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.sintesi-scheda {
    display: grid; grid-template-columns: 340px repeat(4, minmax(0, 1fr)); align-items: center; gap: 6px 14px;
    border: 1px solid var(--bordo); border-radius: 6px; padding: 10px 12px; margin-bottom: 8px; background: #fff;
}
.sintesi-titolo-cella { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sintesi-etichetta { color: var(--arancio); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.05em; }
.sintesi-nome { font-weight: 700; font-size: 0.82rem; overflow-wrap: anywhere; white-space: normal; }
.sintesi-indicatore { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sintesi-indicatore span { display: block; color: var(--grigio); font-size: 0.62rem; }
.sintesi-indicatore strong { font-size: 0.78rem; }
@media (max-width: 700px) {
    .sintesi-scheda { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sintesi-titolo-cella { grid-column: 1 / -1; }
}

.pillola, .kv-riga .pillola, .tabella-mock .pillola, .attr-riga .pillola { color: #fff; }

.attr-titolo { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; color: #0b4f4a; font-size: 0.76rem; border-bottom: 1px solid var(--bordo); }
.attr-conteggio { color: var(--grigio); font-size: 0.62rem; font-weight: 600; }
.attr-riga { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 12px; border-bottom: 1px solid #f1f2f4; font-size: 0.72rem; line-height: 1.3; }
.attr-riga:last-child { border-bottom: 0; }
.attr-testo { text-align: left; overflow-wrap: anywhere; }

.attr-schede { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 14px; margin-top: 6px; }
.attr-scheda { min-width: 0; background: #fff; border: 1px solid var(--bordo); border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); overflow: hidden; }
@media (max-width: 1200px) {
    .attr-schede { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .attr-schede { grid-template-columns: minmax(0, 1fr); }
}
.btn-dettaglio { background: #fff; color: var(--arancio); border: 1px solid var(--arancio); border-radius: 3px; padding: 3px 10px; font-size: 0.72rem; font-weight: 700; cursor: pointer; }
.btn-dettaglio:hover { background: var(--arancio); color: #fff; }
.tabella-confronto th small { display: block; font-weight: 400; color: var(--grigio); }
.tabella-confronto { table-layout: fixed; }
.tabella-confronto td.attr-nome { color: var(--grigio); width: 26%; }
.tabella-confronto .riga-tema { background: #f3f4f6; font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
.tabella-confronto th, .tabella-confronto td { white-space: normal; overflow-wrap: break-word; word-break: break-word; }
.tabella-confronto-scroll { max-height: 65vh; overflow-y: auto; overflow-x: hidden; }
.tabella-confronto thead th { position: sticky; top: 0; z-index: 3; background: #fff; }

.tabella-dati, .tabella-dati * { font-family: "Helvetica Neue", Arial, sans-serif !important; }
.tabella-dati .dash-spreadsheet-container { font-size: 0.78rem; }
.tabella-dati .dash-filter--case { display: none; }
.tabella-dati .dash-filter input[type="text"] { width: 100%; font-size: 0.72rem; text-align: left !important; border: 1px solid var(--bordo); border-radius: 2px; background: #fff; padding: 2px 6px; }
.tabella-dati .dash-filter input[type="text"]::placeholder { color: #9aa0a6 !important; opacity: 1 !important; }
.tabella-dati th.dash-header { background: #fff; }
.tabella-dati tr:hover td { background: var(--riga-selezionata) !important; }
.righe-cliccabili td.dash-cell { cursor: pointer; }
.tabella-dati .pillola { font-size: 0.72rem; padding: 2px 11px; white-space: nowrap; display: inline-block; line-height: 1.3; }
.tabella-dati td p { margin: 0; }
.tabella-dati .previous-next-container { display: none; }
.tabella-dati, .tabella-dati * { scrollbar-width: thin; scrollbar-color: #c9cdd2 transparent; }
.paginazione { display: flex; align-items: center; justify-content: flex-end; margin: 10px 0 8px; }
.pager { display: flex; align-items: center; gap: 14px; }
.pager button { width: 38px; height: 32px; border: 1px solid var(--bordo); background: #fff; border-radius: 3px; font-size: 1.1rem; cursor: pointer; }
.pager button:hover:not(:disabled) { border-color: var(--arancio); color: var(--arancio); }
.pager button:disabled { opacity: 0.35; cursor: default; }
.pag-info { font-size: 0.9rem; color: var(--testo); }
.tabella-dati .dash-spreadsheet-container { scrollbar-width: auto; scrollbar-color: auto; }
.tabella-dati .dash-spreadsheet-container::-webkit-scrollbar { width: 8px; height: 0; }
.tabella-dati .dash-spreadsheet-container::-webkit-scrollbar-thumb { background: #c9cdd2; border-radius: 4px; }
.comandi-scorrimento-alto { position: sticky; top: var(--offset-scorrimento-alto, 0px); z-index: 19; display: flex; align-items: flex-end; margin-bottom: 4px; background: #fff; }
.comandi-scorrimento-alto[hidden] { display: none; }
.comandi-scorrimento-alto:not([hidden]) + .scroll-x,
.tabella-dati:has(> .comandi-scorrimento-alto:not([hidden])) .dash-spreadsheet-container { overflow-x: hidden !important; }
.comandi-scorrimento-alto > button { flex: 0 0 18px; display: grid; place-items: center; height: var(--altezza-traccia, 14px); padding: 0; border: 0; background: transparent; color: #4b5260; font-size: 10px; line-height: 1; cursor: pointer; }
.scorrimento-alto { flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; height: 14px; scrollbar-width: auto; }
.scorrimento-alto > div { height: 1px; }
.scorrimento-alto::-webkit-scrollbar { height: 10px; }
.scorrimento-alto::-webkit-scrollbar-thumb { background: #b5b9be; border-radius: 5px; }
.scorrimento-alto::-webkit-scrollbar-track { background: #eceef0; border-radius: 5px; }
.guida-ricerca { color: var(--testo); font-size: 0.85rem; margin: 4px 0 12px; max-width: 900px; }
.tabella-dati th[data-dash-column="apri"] .column-header--sort, .tabella-dati th[data-dash-column="apri"] input { display: none; }
.tabella-dati .icona-apri { color: var(--arancio); font-size: 0.8rem; border: 1px solid var(--arancio); border-radius: 3px; padding: 2px 6px; }
.tabella-dati td[data-dash-column="apri"]:hover .icona-apri { background: var(--arancio); color: #fff; }
.tabella-dati .dash-cell-value::selection, .tabella-dati .dash-cell-value *::selection, .tabella-dati td .dash-cell-value.unfocused.selectable::selection { background-color: #ffd9bf !important; color: inherit !important; }
.tabella-dati td.dash-cell, .tabella-dati td.dash-cell * { user-select: text; -webkit-user-select: text; }
.cella-completa { cursor: copy; position: fixed; z-index: 3000; max-width: 560px; min-width: 220px; background: #fff; border: 1px solid var(--bordo); border-left: 3px solid var(--arancio); border-radius: 4px; box-shadow: 0 6px 18px rgba(0,0,0,0.15); padding: 10px 12px; font-size: 0.85rem; user-select: text; }
.cella-completa-testo { white-space: normal; overflow-wrap: anywhere; line-height: 1.4; user-select: text; }
.cella-completa-esito { color: var(--arancio); font-size: 0.75rem; font-weight: 700; min-height: 1em; margin-top: 6px; }
.link-apri, .link-ean { text-decoration: none; color: inherit; }
.riga-archetipi-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 14px; }
.gruppo-etichetta { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grigio); margin-left: 6px; }
.gruppo-etichetta:first-child { margin-left: 0; }
.chip-archetipo { background: #fff; border: 1px solid var(--arancio); color: var(--arancio); border-radius: 12px; padding: 2px 12px; font-size: 0.75rem; font-weight: 700; cursor: pointer; }
.chip-archetipo:hover { background: var(--arancio); color: #fff; }
.chip-cluster { display: inline-block; background: #f1f2f4; border: 1px solid var(--bordo); border-radius: 3px; padding: 1px 8px; font-size: 0.72rem; font-weight: 700; margin-right: 4px; }
.popover-archetipo { max-width: 420px; font-size: 0.8rem; }
.blocco-trafila { margin-top: 22px; }

/* scheda prodotto come nel riferimento */
.scheda-m4 { display: flex; flex-direction: column; gap: 16px; }
.scheda-m4 .eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--arancio); }
.card-m4 { background: #fff; border: 1px solid #d8d8d8; border-radius: 4px; }
.card-anagrafica { background: #fff; border: 1px solid #d8d8d8; border-radius: 4px; }
.testata-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: stretch; }
@media (max-width: 1000px) { .testata-grid { grid-template-columns: 1fr; } }
.testata-grid-sola { display: block; }
.testata-card { display: flex; flex-direction: column; gap: 10px; }
.testata-corpo { display: flex; gap: 16px; align-items: stretch; }
.prod-img { width: 140px; height: 140px; flex-shrink: 0; border: 1px solid #d8d8d8; background: #fff; display: grid; place-items: center; overflow: hidden; padding: 4px; }
.prod-img .foto-img { position: static; inset: auto; width: 100%; height: 100%; object-fit: cover; display: block; }
.testata-testi { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.testata-testi h1 { font-size: 24px; line-height: 30px; margin: 0; }
.crumb-m4 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 8px; }
.tag-livello { display: inline-block; border: 1px solid #d8d8d8; background: #fff; padding: 1px 8px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.tag-livello small { font-size: 0.62rem; color: #767676; font-weight: 400; }
.crumb-sep { color: #767676; font-size: 0.75rem; }
.meta-griglia { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 4px 16px; }
.meta-etichetta { display: block; font-size: 0.72rem; color: #717171; line-height: 16px; }
.meta-valore { display: block; font-size: 0.85rem; font-weight: 700; color: #000; line-height: 20px; }
.separatore-m4 { border: 0; border-top: 1px solid #d8d8d8; margin: 4px 0; opacity: 1; }
.riga-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.gruppo-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gruppo-etichetta { font-size: 0.78rem; color: #717171; }
.badge-m4 { display: inline-block; font-size: 0.78rem; line-height: 18px; font-weight: 700; padding: 1px 8px; border: 1px solid #d8d8d8; color: #000; white-space: nowrap; font-variant-numeric: tabular-nums; background: #fff; }
.badge-m4-ean, .badge-m4-cod { color: #fff !important; border: 1px; border-color:white; border-radius: 16px; padding: 3px 14px; font-size: 0.85rem; line-height: 1.3; }
.badge-m4-ean { background: #6a4c93; }
.badge-m4-cod { background: var(--arancio); }
.badge-m4-cluster { background: #ececec; border-color: #ccc; letter-spacing: 0.02em; }
.badge-m4-arch { border-color: #121212; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font-family: inherit; }
.badge-m4-arch:hover { background: rgba(0, 0, 0, 0.04); }
.icona-i { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 10px; line-height: 1; font-weight: 700; font-style: normal; }
.btn-trafila { display: inline-flex; align-items: center; gap: 8px; font-family: inherit; font-size: 0.78rem; font-weight: 700; padding: 3px 10px; background: #fff; border: 1px solid var(--arancio); color: var(--arancio); cursor: pointer; }
.btn-trafila:hover { background: rgba(0, 0, 0, 0.04); }
.btn-trafila-spento { border-color: #d8d8d8; color: #767676; cursor: default; font-weight: 400; }
.btn-trafila-spento:hover { background: #fff; }
.card-laterale { display: flex; flex-direction: column; gap: 10px; }
.voce-laterale .tile-etichetta { display: block; font-size: 0.78rem; color: #717171; }
.voce-laterale .tile-valore { display: block; font-size: 24px; line-height: 30px; font-weight: 700; color: #000; }
.nota-corsivo { margin-top: auto; font-size: 0.75rem; color: #767676; font-style: italic; }
.gruppi-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.gruppi-kpi-vendite { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
@media (max-width: 1400px) { .gruppi-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .gruppi-kpi { grid-template-columns: 1fr; } }
.gruppo-kpi { display: flex; flex-direction: column; gap: 6px; }
.riga-tile { display: flex; flex-wrap: wrap; border: 1px solid #d8d8d8; background: #fff; flex: 1 1 auto; }
.scheda-m4 > .contenuto-tab .riga-tile, .contenuto-tab .riga-tile { margin-bottom: 8px; }
.tile-m4 { flex: 1 1 150px; padding: 12px 14px; border-right: 1px solid #d8d8d8; display: flex; flex-direction: column; gap: 2px; }
.tile-m4:last-child { border-right: 0; }
.tile-etichetta { font-size: 0.78rem; line-height: 18px; color: #717171; }
.tile-valore { font-size: 28px; line-height: 36px; font-weight: 700; color: #000; }
.tile-hero { color: var(--arancio); }
.tile-sotto { font-size: 0.75rem; line-height: 16px; color: #767676; font-style: italic; }
.delta-riga { display: inline-flex; align-items: center; gap: 4px; font-size: 0.8rem; font-weight: 700; }
.delta-segno { font-size: 0.6rem; }
.delta-su { color: #07c29f; }
.delta-giu { color: #cc0000; }
.delta-piatto { color: #717171; }
.q-badge { display: inline-block; font-size: 0.65rem; line-height: 16px; font-weight: 700; padding: 0 6px; margin-left: 4px; border: 1px solid; color: #000; vertical-align: middle; text-transform: none; }
.q-badge-reale { background: #daf2ed; border-color: #07c29f; }
.q-badge-stimato { background: #fbe9a6; border-color: #f1c21b; }
.q-livello { font-weight: 400; text-transform: none; }
.aiuto { color: #717171; font-size: 0.85rem; margin: 0; }
.attr-flusso { display: flex; flex-direction: column; gap: 14px; }
.attr-gruppo { padding: 10px 14px;}
.attr-gruppo h4 { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--arancio); padding-bottom: 2px; border-bottom: 1px solid #d8d8d8; margin: 0 0 6px; }
.attr-griglia { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 24px; }
.attr-m4 { display: flex; flex-direction: column; }
.attr-valore { display: flex; align-items: flex-end; min-width: 0; font-size: 0.9rem; line-height: 22px; color: #000; border-bottom: 1px solid #d8d8d8; min-height: 24px; padding-bottom: 1px; }
.attr-nome-m4 { font-size: 0.65rem; line-height: 16px; letter-spacing: 0.04em; text-transform: uppercase; color: #717171; margin-top: 1px; }
.attr-m4.nd .attr-valore { color: #767676; }
.anag-wrap { display: flex; flex-direction: column; gap: 16px; }
.riga-prezzi { display: flex; align-items: flex-start; gap: 16px; }
.riga-prezzi > :first-child { flex: 3 1 0; min-width: 0; }
.riga-prezzi > :last-child { flex: 1 1 0; min-width: 220px; }
.colonna-acquisto { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.nota-riferimento { padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.nota-riferimento .nota-piccola { margin: 0; }
.freccia-riferimento { color: var(--arancio); font-weight: 700; margin-right: 6px; }
@media (max-width: 900px) {
    .riga-prezzi { flex-direction: column; }
    .riga-prezzi > :first-child, .riga-prezzi > :last-child { flex: 1 1 auto; width: 100%; }
}
.griglia-prezzi { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 24px; margin-top: 8px; }
.griglia-prezzi-fissa { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1150px) { .griglia-prezzi-fissa { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .griglia-prezzi-fissa { grid-template-columns: minmax(0, 1fr); } }
.griglia-prezzi .tabella-mock { table-layout: fixed; }
.griglia-prezzi .tabella-mock th, .griglia-prezzi .tabella-mock td { padding: 2px 8px; font-size: 0.8rem; width: 45%; }
.griglia-prezzi .tabella-mock .prezzo-col { width: 55%; }
.tabella-mock th.prezzo-col, .tabella-mock td.prezzo-col { text-align: left; white-space: nowrap; }
.griglia-prezzi td.prezzo-frequente { background: #fdeee3; font-weight: 700; color: #000; }
.legenda-frequente { display: inline-block; width: 14px; height: 14px; background: #fdeee3; border: 1px solid var(--arancio); margin-right: 6px; vertical-align: middle; }
.colonne-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 32px; margin-top: 16px; }
.tabella-mock th.col-hl, .tabella-mock td.col-hl { background: #fdeee3; font-weight: 700; color: #000; }
.tabella-mock th.col-hl { box-shadow: inset 0 3px 0 var(--arancio); }
.cella-barra { display: flex; align-items: center; gap: 8px; }
.cella-barra .barra { width: 120px; }
.valore-barra { font-size: 0.78rem; color: #767676; font-variant-numeric: tabular-nums; white-space: nowrap; }
.riga-gruppo { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; color: var(--arancio); }
.btn-info { min-width: 28px; font-style: italic; font-family: serif; font-weight: 700; border-radius: 50%; padding: 1px 8px; }
.riga-chip { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.modale-m4 .modal-title { font-size: 1.2rem; font-weight: 700; }
.modale-m4 .modal-content { border-radius: 0; border: 1px solid #121212; }
.legenda-riga { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; margin: 4px 0 10px; }
.legenda { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; }
.legenda-q { display: inline-block; width: 14px; height: 14px; border: 1px solid #d8d8d8; }
.cmp-uguale { background: #daf2ed; }
.cmp-diverso { background: #fbe9a6; }
.tabella-confronto td.centro { text-align: center; font-weight: 700; width: 36px; }
.cmp-desc { font-weight: 700; color: #000; }
.cmp-codici { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }

/* rifinitura estetica della scheda */
body { background: #f6f7f9; }
.topbar { background: #fff; box-shadow: 0 1px 6px rgba(16, 24, 40, 0.06); border-bottom: 0; }
.card-m4 { border: 0; border-radius: 12px; box-shadow: 0 2px 4px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06); padding: 18px 22px; }
.card-anagrafica { border: 0; border-radius: 12px; box-shadow: 0 2px 4px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06); padding: 18px 22px; }
.prod-img { border-radius: 10px; border-color: #e7e9ee; background: #fafbfc; }
.testata-testi h1 { font-size: 26px; letter-spacing: -0.01em; }
.tag-livello { border-radius: 14px; background: #f3f4f7; border-color: #e3e5e8; padding: 2px 11px; }
.btn-trafila { border-radius: 16px; padding: 4px 14px; background: var(--arancio-chiaro); border-color: transparent; }
.btn-trafila:hover { background: #fbdcc9; }
.badge-m4-cluster { border-radius: 12px; background: #eef0f4; border-color: transparent; padding: 1px 10px; }
.badge-m4-arch { border-radius: 14px; background: #fff; padding: 2px 11px; }
.gruppo-kpi { gap: 0; min-width: 0; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 4px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06); }
.gruppo-kpi > .eyebrow { padding: 14px 16px 8px; margin-bottom: 0; min-height: 49px; border-bottom: 1px solid var(--bordo); }
.gruppi-kpi-vendite .eyebrow { margin-top: 0; }
.riga-tile { border: 0; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 2px 4px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06); }
.gruppo-kpi > .riga-tile { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 0; box-shadow: none; }
.gruppo-kpi .tile-m4 { min-width: 0; }
.gruppo-kpi .tile-etichetta { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 42px; }
.gruppo-kpi .tile-etichetta .q-badge { margin-left: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-m4 { border-right: 1px solid #eef0f4; padding: 14px 16px; }
.tile-valore { letter-spacing: -0.01em; }
.q-badge { border-radius: 10px; padding: 0 8px; }
.delta-riga { padding: 1px 8px; border-radius: 10px; background: #f3f4f7; }
.tabs-mock { background: #fff; border-radius: 12px 12px 0 0; padding: 4px 12px 0; box-shadow: 0 2px 4px rgba(16, 24, 40, 0.04); }
.tabs-mock .nav-link { padding: 12px 14px; border-bottom-width: 3px; }
.tabs-mock .nav-link:hover { color: var(--arancio); }
.contenuto-tab { background: #fff; border-radius: 0 0 12px 12px; padding: 20px 22px; box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06); }
.tabella-mock th { background: #fafbfc; border-bottom: 2px solid #e3e5e8; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; color: #4b5260; }
.tabella-mock th:is(.col-hl:first-child, .col-posizione + .col-hl) {
  background: #fafbfc;
  box-shadow: none;
  color: #4b5260;
  font-size: 0.72rem;
}
.tabella-mock:has(th.col-hl:first-child, th.col-posizione + th.col-hl) th,
.tabella-persistenza-x-insegna .tabella-mock th.colonna-allin-centrale {
  line-height: 1.2;
  text-align: left;
  vertical-align: middle;
}
.tabella-mock:has(th.col-hl:first-child, th.col-posizione + th.col-hl) th:not(.col-kpi-compatta),
.tabella-persistenza-x-insegna .tabella-mock th.colonna-allin-centrale {
  white-space: nowrap;
}
.tabella-mock th.col-kpi-compatta { width: 1%; min-width: 5.5rem; }
.tabella-mock th.col-margine-format { width: 9%; }
.tabella-mock:has(th.col-hl:first-child) th.num.col-variazione-penetrazione { text-align: right; }
.tabella-mock:has(th.col-variazione-penetrazione) {
  width: 100%;
  max-width: 820px;
  min-width: 650px;
  table-layout: fixed;
}
.tabella-mock:has(th.col-variazione-penetrazione) th:first-child { width: 18%; }
.tabella-mock:has(th.col-variazione-penetrazione) th:nth-child(2) { width: 26%; }
.tabella-mock:has(th.col-variazione-penetrazione) th.col-barra { width: 42%; }
.tabella-mock:has(th.col-variazione-penetrazione) th:last-child { width: 14%; }
.distribuzione-marginalita .tabella-mock:has(th.col-margine-format) th.num { text-align: right; }
.tabella-mock th:is(.col-hl:first-child, .col-posizione + .col-hl),
.tabella-persistenza-x-insegna .tabella-mock th.colonna-allin-centrale:not(:last-child) { font-weight: 800; }
.tabella-persistenza-x-insegna .tabella-mock { table-layout: auto; }
.tabella-mock tbody tr:nth-child(even) td { background: #fafbfc; }
.tabella-mock tbody tr:hover td { background: var(--arancio-chiaro); }
.tabella-mock td { padding: 2px 8px; line-height: 1.25; }
.tabella-mock th { padding-top: 4px; padding-bottom: 4px; }
.attr-gruppo h4 { border-bottom: 2px solid var(--arancio); border-image: linear-gradient(to right, var(--arancio), transparent) 1; padding-bottom: 4px; }
.attr-valore { border-bottom-color: #e7e9ee; }
.definizione { border-radius: 8px; background: #fff8f3; border-left-width: 4px; }
.modale-m4 .modal-content, .modal-content { border-radius: 14px; border: 0; box-shadow: 0 20px 60px rgba(16, 24, 40, 0.25); }
.cmp-uguale,
.tabella-mock.tabella-confronto td.cmp-uguale { background: #e3f6f1; }
.cmp-diverso,
.tabella-mock.tabella-confronto td.cmp-diverso { background: #fdf0bd; }

.zona-schede { position: relative; }
.barra-prodotto { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--arancio); border-bottom: 1px solid #e7e9ee; border-radius: 0 12px 12px 12px; box-shadow: 0 4px 10px rgba(16, 24, 40, 0.06); }
.barra-prodotto .eyebrow { color: white; }
.barra-prodotto .badge-m4-cod { border: 1px solid #fff; }
.barra-prodotto-nome { font-weight: 700; font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; color: white;}

/* righe apribili con il clic: il passaggio del mouse e grigio, la referenza aperta e lilla, cosi non si confondono con l arancio dei pulsanti */
.tabella-mock tbody tr.riga-apribile { cursor: pointer; }
.tabella-mock tbody tr:hover td { background: #eef0f4; }
.tabella-mock tbody tr.riga-corrente td, .tabella-mock tbody tr.riga-corrente:nth-child(even) td, .tabella-mock tbody tr.riga-corrente:hover td { background: #e9e3f5; font-weight: 700; }
.tabella-mock tbody tr.riga-corrente td:first-child { box-shadow: inset 4px 0 0 #6b7280; }
.distribuzione-marginalita .tabella-mock tbody tr.riga-corrente td { background: #e5e7eb; }
.distribuzione-marginalita .q-badge-stimato { white-space: nowrap; }
.tabella-mock tbody td { user-select: text; }

.eyebrow-circana, .scheda-m4 .eyebrow.eyebrow-circana { color: #6a4c93; }
.celle-codici { display: flex; gap: 6px; align-items: center; justify-content: space-between; flex-wrap: nowrap; }
.tabella-mock tbody tr:not(:hover) td.col-hl { background: #fdeee3; }


.testo-troncato { display: inline; white-space: nowrap; }
.testo-troncato.troncato-lungo { display: inline-block; width: 240px; white-space: normal; line-height: 1.2; vertical-align: middle; padding: 2px 0; }
.tabella-mock th.descrizione-su-una-riga { white-space: nowrap; }
.descrizione-su-una-riga .testo-troncato.troncato-lungo {
  display: inline;
  width: auto;
  white-space: nowrap;
  line-height: inherit;
  padding: 0;
}
.tabella-mock th, .tabella-mock td { padding-left: 6px; padding-right: 6px; }
.scheda-m4, .contenuto-tab, .card-m4 { min-width: 0; max-width: 100%; }

/* indicatore di sostituibilita: cinque barre, come il segnale del telefono */
.segnale { display: inline-flex; align-items: flex-end; gap: 3px; height: 20px; vertical-align: middle; }
.segnale-barra { display: inline-block; width: 6px; background: #d8d8d8; border-radius: 1px; }
.segnale-barra:nth-child(1) { height: 5px; }
.segnale-barra:nth-child(2) { height: 9px; }
.segnale-barra:nth-child(3) { height: 13px; }
.segnale-barra:nth-child(4) { height: 17px; }
.segnale-barra:nth-child(5) { height: 20px; }
.segnale-barra.attiva { background: var(--arancio); }
.tabella-mock th { white-space: normal; line-height: 1.2; }

/* dettaglio piu compatto: meno spazio fra i gruppi e fra le coppie valore e nome, valori un po piu piccoli */
.card-anagrafica { padding: 12px 18px; }
.attr-flusso { gap: 4px; }
.attr-gruppo { padding: 4px 8px; }
.attr-gruppo h4 { margin-bottom: 3px; padding-bottom: 2px; }
.attr-griglia { gap: 2px 20px; }
.attr-valore { font-size: 0.85rem; line-height: 18px; min-height: 18px; }
.attr-nome-m4 { font-size: 0.62rem; line-height: 13px; margin-top: 0; }

/* scheletro grigio al posto della pagina bianca, durante l'avvio e il caricamento della scheda */
@keyframes sk-pulsa { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.scheletro { padding: 16px 0; }
/* Allinea lo scheletro sotto la barra superiore anche quando la scheda è ancora vuota. */
#caricamento-scheda { align-items: flex-start !important; }
.sk-blocco, ._dash-loading::before { background: linear-gradient(90deg, #e9ebef 25%, #f3f4f6 50%, #e9ebef 75%); background-size: 200% 100%; animation: sk-pulsa 1.3s linear infinite; border-radius: 12px; }
.sk-riga { display: grid; gap: 16px; margin-bottom: 16px; }
.sk-riga-testata { grid-template-columns: 3fr 1fr; }
.sk-riga-kpi { grid-template-columns: repeat(4, 1fr); }
.sk-testata { height: 190px; }
.sk-laterale { height: 190px; }
.sk-kpi { height: 130px; }
.sk-tabs { height: 44px; margin-bottom: 16px; }
.sk-tabella { height: 320px; }
._dash-loading { display: block; font-size: 0; color: transparent; min-height: 100vh; background: #f4f5f7; position: relative; }
._dash-loading::before { content: ""; position: absolute; left: 24px; right: 24px; top: 84px; height: 200px; }
.scheletro-tab { padding: 20px 22px; background: #fff; border-radius: 0 0 12px 12px; }
.sk-titolo { height: 22px; width: 280px; margin-bottom: 16px; }
.tabella-html { display: block; }

/* il cambio di tab non deve far saltare la pagina: la barra di scorrimento occupa sempre il suo posto e l'area della tab non si accorcia mentre carica */
html { scrollbar-gutter: stable; }
#contenuto-tab { min-height: 70vh; }
.scheletro-tab { min-height: 70vh; }

/* lo scheletro sta dentro lo spinner di dash, che lo centra e lo restringe: gli diamo una larghezza esplicita */
.scheletro { width: 92vw; max-width: 1500px; margin: 0 auto; box-sizing: border-box; }
.scheletro.scheletro-tab { width: 82vw; max-width: 1320px; }
.scheletro .sk-blocco { min-width: 40px; }

/* avviso sopra i kpi per un prodotto lanciato di recente: lo storico dell anno precedente e incompleto */
.avviso-lancio { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 9px 14px; border-radius: 8px; background: #fff4e0; border: 1px solid #f3c98b; color: #7a4a00; font-size: 0.8rem; }
.avviso-lancio i { color: #e08a00; font-size: 1rem; }

/* testo della scala quando le barre di distribuzione sono ingrandite: letto dall attributo del contenitore, senza aggiungere elementi alla pagina */
.distribuzione-marginalita[data-zoom-testo]::after { content: "Scala ingrandita: " attr(data-zoom-testo) " · doppio clic per tornare alla scala da 0% a 100%"; display: block; margin-top: 6px; font-size: 0.68rem; color: var(--grigio); }
.distribuzione-marginalita .barra-riempimento { transition: width 0.18s ease-out; }
.distribuzione-marginalita .barra-marker { transition: left 0.18s ease-out; }
.tabella-mock tbody tr.riga-etichetta-rank td, .tabella-mock tbody tr.riga-etichetta-rank:nth-child(even) td { background: #f3f4f6; color: #6b7280; text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 6px 10px; border-top: 2px solid #d1d5db; }
