/* Stili delle singole sezioni. */

/* ---------- Testata di sezione ---------- */
.head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line-strong); }
.head h1 { font-size: var(--fs-2xl); letter-spacing: -.015em; }
.head p { color: var(--ink-2); margin-top: 4px; }
.head .row { margin-left: auto; }
.section { margin-top: 30px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-size: var(--fs-l); display: flex; align-items: center; gap: 9px; }
.section-head h2::before { content: ''; width: 4px; height: 16px; border-radius: 2px; background: var(--accent); flex: none; }
.section-head .muted { font-size: var(--fs-s); }
.section-head a, .section-head .link-btn { margin-left: auto; font-size: var(--fs-s); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-card); }
.card-pad { padding: 18px 20px; }

/* ---------- Adesso ---------- */
.now-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.now-lead { font-size: var(--fs-3xl); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.now-lead .num { font-weight: 700; }
.now-sub { color: var(--ink-2); margin-top: 8px; max-width: 62ch; }
.deals { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin-top: 22px; }
.deal-card {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 14px; padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); cursor: pointer; box-shadow: var(--shadow-card);
}
.deal-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.deal-img { grid-row: span 2; width: 64px; height: 64px; border-radius: var(--r-m); background: #fff; object-fit: contain; padding: 4px; border: 1px solid var(--line); }
.deal-name { font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deal-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--ink-3); }
.deal-foot { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
@media (min-width: 1900px) {
  .deals { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
  .now-grid { grid-template-columns: minmax(0, 1fr) 380px; }
  .settings { grid-template-columns: 230px minmax(0, 1fr); }
}
.deal-foot .tag { margin-right: auto; }
.deal-th { font-size: var(--fs-xs); color: var(--ink-2); text-align: right; line-height: 1.35; }
.deal-th b { color: var(--ink); font-variant-numeric: tabular-nums; }
.calm { margin-top: 22px; padding: 22px; border: 1px dashed var(--line-strong); border-radius: var(--r-l); color: var(--ink-2); }
.calm b { color: var(--ink); }

.near-list { display: flex; flex-direction: column; }
.near-row {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 110px 170px; gap: 14px; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.near-row:last-child { border-bottom: 0; }
.near-row:hover { background: var(--surface-2); }
.near-row img, .thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: contain; background: #fff; border: 1px solid var(--line); padding: 2px; }
/* Segnaposto quando la foto manca: stesse misure della foto che sostituisce */
.thumb-ph { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 6px; background: var(--sunken) !important; border: 1px solid var(--line); color: var(--ink-3); padding: 0 !important; }
.thumb-ph .i { width: 46%; height: 46%; stroke-width: 1.5; }
.thumb-ph.deal-img { width: 64px; height: 64px; border-radius: var(--r-m); }
.thumb-ph.pp-img { width: 96px; height: 96px; border-radius: var(--r-m); }
.rrow .thumb-ph, .found .thumb-ph { width: 48px; height: 48px; }
.preview-card .thumb-ph { width: 56px; height: 56px; }
.near-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.near-sub { font-size: var(--fs-xs); color: var(--ink-3); display: flex; gap: 8px; align-items: center; }

/* Movimenti delle ultime 24 ore */
.mv-row {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 132px minmax(180px, auto) 92px; gap: 14px; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer;
}
.mv-row:last-child { border-bottom: 0; }
.mv-row:hover { background: var(--surface-2); }
.mv-row > .badge, .mv-row > span:last-child { justify-self: end; }
.mv-kind { justify-self: start; font-size: var(--fs-xs); font-weight: 600; padding: 3px 8px; border-radius: 4px; background: var(--sunken); color: var(--ink-2); white-space: nowrap; }
.mv-kind.drop { background: var(--ok-soft); color: var(--ok); }
.mv-kind.appeared { background: var(--wh-soft); color: var(--wh); }
.mv-kind.blip { background: var(--warn-soft); color: var(--warn); }
.mv-change { display: flex; align-items: baseline; gap: 8px; justify-content: flex-end; white-space: nowrap; font-size: var(--fs-s); }
.mv-from { color: var(--ink-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-3) 60%, transparent); }
.mv-to { font-weight: 600; font-size: var(--fs-m); }
.mv-pct { font: 600 var(--fs-xs) var(--font-num); min-width: 44px; text-align: right; }
.mv-pct.drop { color: var(--ok); }
.mv-pct.rise { color: var(--bad); }
@media (max-width: 860px) {
  .mv-row { grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "i n k" "i c c"; gap: 4px 10px; }
  .mv-row > :nth-child(1) { grid-area: i; } .mv-row > :nth-child(2) { grid-area: n; } .mv-row > .mv-kind { grid-area: k; justify-self: end; }
  .mv-row > .mv-change { grid-area: c; justify-content: flex-start; } .mv-row > :last-child { display: none; }
}

.side-stack { display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--bar-h) + 20px); }
.stat-list { display: flex; flex-direction: column; }
.stat { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-s); }
.stat:last-child { border-bottom: 0; }
.stat span { color: var(--ink-2); flex: 1; }
.stat b { font: 600 var(--fs-m) var(--font-num); font-variant-numeric: tabular-nums; }
.side-title { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 6px; }
.side-title a { margin-left: auto; font-weight: 500; font-size: var(--fs-s); }
.mini-notif { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-s); cursor: pointer; }
.mini-notif:last-child { border-bottom: 0; }
.mini-notif .mn-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-notif .mn-when { color: var(--ink-3); font-size: var(--fs-xs); white-space: nowrap; }

/* ---------- Prodotti ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.search-box { position: relative; flex: 1 1 260px; max-width: 380px; }
.search-box .i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search-box input { padding-left: 36px !important; }
.toolbar select { width: auto; }
.toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.toggle-label { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-s); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.filter-line { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.filter-line .chips { flex: 1; }
.result-line { display: flex; align-items: center; gap: 10px; font-size: var(--fs-s); color: var(--ink-3); white-space: nowrap; }
.kbd-hint { margin-top: 10px; font-size: var(--fs-xs); color: var(--ink-3); }
.kbd-hint kbd { font-size: 10.5px; padding: 2px 5px; }
.prow:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 0; }
@media (max-width: 860px) { .kbd-hint { display: none; } .toolbar-right { margin-left: 0; } }
.result-line .link-btn { font-size: var(--fs-s); }

/* overflow: clip (non hidden) per non rompere l'intestazione che resta in alto */
.ptable { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: clip; box-shadow: var(--shadow-card); }
.prow, .phead {
  display: grid;
  grid-template-columns: 34px 44px minmax(220px, 1fr) 128px 112px 150px 168px 78px 76px;
  align-items: center; gap: 12px; padding: 9px 14px;
}
.phead { position: sticky; top: var(--bar-h); z-index: 5; background: var(--head-bg); border-bottom: 1px solid var(--line-strong); font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); padding-top: 9px; padding-bottom: 9px; }
.phead button { border: 0; background: none; padding: 0; color: inherit; font: inherit; text-align: left; display: inline-flex; gap: 4px; align-items: center; }
.phead button.on { color: var(--ink); }
.phead .r, .prow .r { text-align: right; justify-self: end; }
.prow { border-bottom: 1px solid var(--line); cursor: pointer; min-height: 62px; }
.prow:hover { background: var(--surface-2); }
.prow.sel { background: var(--accent-soft); }
.prow.paused { opacity: .55; }
.prow.flash { animation: flash 2s ease-out; }
@keyframes flash { 0%, 30% { background: var(--tag-soft); } }
.prow input[type="checkbox"], .phead input[type="checkbox"], .ghead input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.pname { min-width: 0; }
.pname-t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pname-m { display: flex; align-items: center; gap: 6px; margin-top: 3px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--ink-3); }
.pbest { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.pbest-sub { display: flex; align-items: center; gap: 5px; font-size: var(--fs-xs); color: var(--ink-3); }
.pth { justify-self: end; }
.th-edit {
  display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 8px; border: 1px dashed transparent; border-radius: 6px;
  background: none; color: var(--ink-2); font: 500 var(--fs-m) var(--font-num); font-variant-numeric: tabular-nums;
}
.th-edit:hover { border-color: var(--line-strong); color: var(--ink); }
.th-edit.empty { color: var(--ink-3); font-family: var(--font); font-size: var(--fs-s); }
.th-input { width: 96px !important; height: 30px !important; text-align: right; font-family: var(--font-num) !important; }
.th-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.th-stack small { font-size: 10.5px; color: var(--ink-3); }
.pstores { display: flex; gap: 4px; flex-wrap: wrap; }
.sp {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 6px; border-radius: 5px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  font: 500 var(--fs-xs) var(--font-num); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.sp:hover { border-color: var(--line-strong); color: var(--ink); text-decoration: none; }
.sp.best { border-color: var(--ink-3); color: var(--ink); }
.sp.deal { background: var(--tag); border-color: var(--tag); color: var(--tag-ink); }
.sp.none { color: var(--ink-3); padding: 0 4px; opacity: .55; }
.sp i { font-style: normal; color: var(--wh); font-weight: 700; }
.pupd { font-size: var(--fs-xs); color: var(--ink-3); text-align: right; white-space: nowrap; }
.pupd.stale { color: var(--warn); font-weight: 600; }
.pact { display: flex; justify-content: flex-end; gap: 0; }

.ghead {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: var(--group-bg); border-bottom: 1px solid var(--line); cursor: pointer; user-select: none; box-shadow: inset 3px 0 0 var(--accent);
}
.ghead:hover { background: color-mix(in srgb, var(--group-bg) 80%, var(--accent) 8%); }
.ghead h3 { color: var(--group-ink); }
.ghead .chev { transition: transform .15s; color: var(--ink-3); }
.ghead.open .chev { transform: rotate(90deg); }
.ghead h3 { font-size: var(--fs-m); }
.ghead .gcount { font-size: var(--fs-xs); color: var(--ink-3); }
.ghead .grange { margin-left: auto; font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ghead .grange b { color: var(--ink-2); font-weight: 600; }

.bulk {
  position: sticky; bottom: 16px; z-index: 15; margin-top: 14px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px 10px 16px; border-radius: var(--r-l); background: var(--ink); color: var(--paper); box-shadow: var(--shadow-lg);
}
.bulk b { margin-right: 6px; font-variant-numeric: tabular-nums; }
.bulk .btn { background: transparent; color: var(--paper); border-color: color-mix(in srgb, var(--paper) 30%, transparent); }
.bulk .btn:hover { border-color: var(--paper); }
.bulk .btn-danger { color: #ff9b94; }

@media (max-width: 1439px) {
  .prow, .phead { grid-template-columns: 34px 44px minmax(200px, 1fr) 124px 108px 140px 74px 72px; }
  .pstores, .phead .h-stores { display: none !important; }
}
/* Schermi medi (portatili piccoli, finestre affiancate): una colonna in Adesso, tabella senza "Letto" */
@media (max-width: 1200px) {
  .now-grid { grid-template-columns: minmax(0, 1fr); }
  .side-stack { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
  .prow, .phead { grid-template-columns: 34px 44px minmax(150px, 1fr) 116px 100px 110px 72px; }
  .pupd, .phead [data-sort="updated"] { display: none !important; }
  .promo { grid-template-columns: repeat(3, minmax(0, 1fr)) auto auto; }
}
@media (max-width: 860px) {
  .phead { display: none; }
  .prow { grid-template-columns: 26px 44px minmax(0, 1fr) auto; grid-template-areas: "c i n b" "c i g t"; gap: 6px 10px; padding: 12px; }
  .prow > .c-check { grid-area: c; align-self: start; padding-top: 3px; }
  .prow > .c-img { grid-area: i; align-self: start; }
  .prow > .pname { grid-area: n; }
  .prow > .pbest { grid-area: b; }
  .prow > .c-gap { grid-area: g; }
  .prow > .pth { grid-area: t; }
  .prow > .pupd, .prow > .pact, .prow > .pstores { display: none; }
  .ghead { gap: 8px; padding: 10px 12px; }
  .ghead .grange, .ghead [data-gedit] span { display: none; }
  .ghead [data-gedit] { margin-left: auto; padding: 0 8px; }
  .ghead h3 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pname-t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
  .head .row .btn-primary { display: none; }
  .near-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .near-row .gap { display: none; }
  .now-lead { font-size: var(--fs-2xl); }
  .bulk { bottom: 76px; }
}

/* ---------- Notifiche ---------- */
.day { margin-top: 22px; }
.day h3 { font-size: var(--fs-s); color: var(--ink-3); font-weight: 600; margin-bottom: 8px; }
.nrow { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.nrow:last-child { border-bottom: 0; }
.nrow time { font-size: var(--fs-s); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.nrow-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nrow-name button { all: unset; cursor: pointer; }
.nrow-name button:hover { text-decoration: underline; }
.nrow-meta { display: flex; gap: 4px 6px; flex-wrap: wrap; align-items: center; font-size: var(--fs-xs); color: var(--ink-3); margin-top: 2px; }
.nrow-acts { display: flex; gap: 4px; align-items: center; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-l); box-shadow: var(--shadow-card); }
.kpi b { display: block; font: 600 var(--fs-xl)/1.15 var(--font-num); font-variant-numeric: tabular-nums; }
.kpi span { font-size: var(--fs-s); color: var(--ink-2); }
@media (max-width: 860px) { .nrow { grid-template-columns: 44px minmax(0, 1fr) auto; } .nrow-acts .btn { display: none; } }

/* ---------- Radar ---------- */
.rrow { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.rrow:last-child { border-bottom: 0; }
.rrow img, .rrow .thumb-ph { width: 48px; height: 48px; }
.rrow-name { font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.rrow-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: var(--fs-xs); color: var(--ink-3); margin-top: 3px; }
.rrow-price { text-align: right; }
.rrow-price s { display: block; font-size: var(--fs-xs); color: var(--ink-3); }
.rrow-acts { display: flex; gap: 6px; }
.speed { font-weight: 600; }
.speed.win { color: var(--ok); }
.speed.loss { color: var(--bad); }
@media (max-width: 860px) { .rrow { grid-template-columns: 48px minmax(0, 1fr) auto; } .rrow-acts { grid-column: 2 / -1; } }

/* ---------- Motore ---------- */
.health { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.health .dot { margin-top: 7px; width: 10px; height: 10px; }
.health h2 { font-size: var(--fs-xl); }
.health p { color: var(--ink-2); margin-top: 4px; max-width: 80ch; }
.turn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-top: 12px; border-radius: var(--r-l); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.turn-side { padding: 16px 18px; background: var(--surface); }
.turn-side + .turn-side { border-left: 1px solid var(--line); }
.turn-side.active { background: var(--accent-soft); }
.turn-side h3 { display: flex; align-items: center; gap: 8px; font-size: var(--fs-m); }
.turn-side .state { font-size: var(--fs-s); color: var(--ink-2); margin-top: 4px; }
.turn-side .big { font: 600 var(--fs-2xl)/1.1 var(--font-num); font-variant-numeric: tabular-nums; margin-top: 10px; }
.turn-side .big small { font-size: var(--fs-s); font-weight: 500; color: var(--ink-3); font-family: var(--font); }
.turn-bar { height: 4px; background: var(--sunken); margin-top: 12px; border-radius: 2px; overflow: hidden; }
.turn-bar i { display: block; height: 100%; background: var(--accent); }
.lanes { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.lane { display: grid; grid-template-columns: 22px 1fr 64px 60px; gap: 10px; align-items: center; font-size: var(--fs-s); }
.lane-bar { height: 6px; background: var(--sunken); border-radius: 3px; overflow: hidden; }
.lane-bar i { display: block; height: 100%; background: var(--ink-3); border-radius: 3px; }
.lane .num { text-align: right; }
.stores-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.store-card { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); box-shadow: var(--shadow-card); }
.store-card .row { gap: 8px; }
.store-card p { font-size: var(--fs-s); color: var(--ink-2); margin-top: 6px; }
.log { font: 12px/1.6 ui-monospace, 'Cascadia Mono', Consolas, monospace; background: var(--sunken); border-radius: var(--r-m); padding: 12px 14px; overflow-x: auto; color: var(--ink-2); white-space: pre; }
@media (max-width: 700px) { .turn { grid-template-columns: 1fr; } .turn-side + .turn-side { border-left: 0; border-top: 1px solid var(--line); } }

/* ---------- Impostazioni ---------- */
.settings { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: calc(var(--bar-h) + 20px); }
.settings-nav button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; border-radius: var(--r-m); background: none; color: var(--ink-2); font-weight: 500; text-align: left; }
.settings-nav button:hover { background: var(--surface); color: var(--ink); }
.settings-nav button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-card), inset 3px 0 0 var(--accent); }
.settings-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px 20px; box-shadow: var(--shadow-card); }
.sbox-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.sbox-head h3 { font-size: var(--fs-l); }
.sbox-head p { color: var(--ink-2); font-size: var(--fs-s); margin-top: 3px; }
.sbox-head > div { flex: 1; min-width: 0; }
.save-bar { display: flex; justify-content: flex-end; gap: 8px; }
.promo { display: grid; grid-template-columns: 1.3fr 1.2fr 1fr 1fr 1.2fr auto auto; gap: 8px; align-items: end; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.promo.gone { opacity: .55; }
.promo-amt { display: flex; gap: 4px; }
.promo-amt select { width: 58px; flex: none; padding: 0 6px; }
.promo-amt input { min-width: 0; flex: 1; }
/* Sotto i 1200 px le schede delle impostazioni vanno in riga sopra il contenuto, che prende tutta la larghezza */
@media (max-width: 1200px) {
  .settings { grid-template-columns: 1fr; gap: 14px; }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; }
  .settings-nav button { white-space: nowrap; }
  .settings-nav button.on { box-shadow: var(--shadow-card), inset 0 -3px 0 var(--accent); }
  .promo { grid-template-columns: repeat(3, minmax(0, 1fr)) auto auto; }
}
@media (max-width: 860px) {
  .promo { grid-template-columns: 1fr 1fr; }
}

/* ---------- Pannello prodotto ---------- */
.pp-top { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; align-items: start; }
.pp-img { width: 96px; height: 96px; border-radius: var(--r-m); border: 1px solid var(--line); background: #fff; object-fit: contain; padding: 6px; }
.pp-prices { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-end; }
.pp-price-label { font-size: var(--fs-xs); color: var(--ink-3); margin-bottom: 4px; }
.pp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.cond-help { font-size: var(--fs-xs); color: var(--ink-3); }
.th-stats { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; font-size: var(--fs-s); }
.th-stat { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; border-radius: var(--r-m); background: var(--surface-2); border: 1px solid var(--line); min-width: 120px; }
.th-stat span { font-size: var(--fs-xs); color: var(--ink-3); }
.th-stat b { font-size: var(--fs-l); }
.th-stat small { font-size: var(--fs-xs); color: var(--ink-3); }
.th-stat.ok { background: var(--tag-soft); border-color: transparent; }
.th-stats .link-btn { align-self: center; margin-left: 4px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: var(--fs-xs); color: var(--ink-3); }
.quick button { height: 26px; padding: 0 9px; border-radius: 13px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.quick button:hover { border-color: var(--line-strong); color: var(--ink); }
.variant { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-m); cursor: pointer; }
.variant.off { opacity: .5; }
.variant .vl { flex: 1; }
.keepa { border: 1px solid var(--line); border-radius: var(--r-m); background: #fff; padding: 6px; min-height: 160px; display: grid; place-items: center; }

/* Aggiungi */
.found { display: grid; grid-template-columns: 24px 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-m); cursor: pointer; }
.found:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.found img, .found .thumb-ph { width: 48px; height: 48px; }
.found-name { font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.found-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.preview-card { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r-m); background: var(--surface-2); border: 1px solid var(--line); }
.preview-card img, .preview-card .thumb-ph { width: 56px; height: 56px; }

/* Assistente */
.chat { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 10px 13px; border-radius: 12px; line-height: 1.5; font-size: var(--fs-s); white-space: pre-wrap; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: var(--sunken); border-bottom-left-radius: 4px; }
.brief { padding: 14px 16px; border-radius: var(--r-m); background: var(--surface-2); border: 1px solid var(--line); font-size: var(--fs-s); line-height: 1.55; }
.brief h4 { font-size: var(--fs-s); margin: 10px 0 4px; }
.brief ul { margin: 4px 0; padding-left: 18px; }
