:root {
  --bg: #f6f4ee;
  --bg-2: #ece7da;
  --surface: rgba(255,255,255,.92);
  --surface-2: #fffdf8;
  --ink: #24312c;
  --muted: #68766f;
  --line: #ddd4c2;
  --line-2: #cfc3ad;
  --primary: #5a7d2b;
  --primary-2: #476521;
  --accent: #d8a83d;
  --accent-2: #f0d69b;
  --button-color: #5a7d2b;
  --ok: #2f7c54;
  --warn: #956b1d;
  --danger: #9a4242;
  --shadow: 0 16px 48px rgba(72, 63, 34, .12);
  --shadow-soft: 0 8px 24px rgba(72, 63, 34, .08);
  --rad-xl: 28px;
  --rad-lg: 22px;
  --rad-md: 16px;
  --rad-sm: 12px;
}
* { box-sizing: border-box; }
html { font-family: Arial, Helvetica, sans-serif; background: var(--bg); color: var(--ink); }
body { margin:0; min-height:100vh; }
.participant-body {
  background:
    radial-gradient(circle at 0 0, rgba(255,255,255,.95), transparent 25%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid rgba(90,125,43,.28); outline-offset: 2px; }

.app-shell { width:min(100%, 1100px); margin:0 auto; padding:16px 14px calc(28px + env(safe-area-inset-bottom)); }
.screen { background: var(--surface); border:1px solid rgba(71,101,33,.12); border-radius: var(--rad-xl); box-shadow: var(--shadow); padding: 22px; }
.topbar, .toolbar, .hero-features, .stat-grid, .choice-summary, .final-grid, .dashboard-grid, .admin-grid { display:grid; gap:12px; }
.topbar { grid-template-columns:1fr auto; align-items:center; margin-bottom:16px; }
.badge, .chip, .status-badge, .kpi-badge, .mini-pill { display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; font-size:.82rem; font-weight:800; }
.badge { background: #edf4e3; color: var(--primary-2); }
.status-badge { background: #f8eed4; color:#7b5a1b; }
.kpi-badge { background:#f0f3eb; color:var(--muted); }
.mini-pill { background:#f3efe4; color:var(--muted); font-size:.75rem; }
.eyebrow { font-size:.78rem; font-weight:900; text-transform:uppercase; letter-spacing:.12em; color:var(--primary); }
h1, h2, h3, p { margin-top:0; }
h1, h2, h3, .store-title, .aisle-name, .profile-title, .stat-value { font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif; }
h1 { font-size:clamp(2rem, 5.4vw, 3.95rem); line-height:.95; letter-spacing:-.05em; margin-bottom:10px; }
h2 { font-size:clamp(1.45rem, 3.8vw, 2.45rem); line-height:1.05; letter-spacing:-.03em; margin-bottom:10px; }
h3 { font-size:1rem; margin-bottom:8px; }
p { color:var(--muted); line-height:1.55; }
.hero { display:grid; grid-template-columns:1.1fr .9fr; gap:16px; align-items:stretch; }
.panel, .card, .stat-card, .question-card, .dashboard-card, .admin-card, .basket-card { background: var(--surface-2); border:1px solid var(--line); border-radius: var(--rad-lg); box-shadow: var(--shadow-soft); }
.panel { padding:22px; }
.hero-mark { width:78px; height:78px; border-radius:24px; display:grid; place-items:center; background: linear-gradient(145deg, var(--primary), var(--primary-2)); color:#fff; font-size:1.9rem; box-shadow:0 12px 28px rgba(90,125,43,.22); margin-bottom:16px; }
.hero-features { grid-template-columns:1fr; }
.card { padding:16px; }
.card p:last-child { margin-bottom:0; }
.feature-title { font-weight:900; margin-bottom:4px; }
.btn, .btn-secondary, .btn-ghost, .icon-btn { border:0; border-radius:15px; font-weight:800; transition:transform .12s ease, opacity .12s ease, background .12s ease; }
.btn:hover,.btn-secondary:hover,.btn-ghost:hover,.icon-btn:hover { transform:translateY(-1px); }
.btn { width:100%; color:#fff; background: var(--button-color); padding:15px 18px; box-shadow:0 12px 24px rgba(90,125,43,.22); }
.btn-secondary { width:100%; background: #fbf3df; color:#6e551d; padding:15px 18px; }
.btn-ghost { width:100%; background:#fff; color:var(--primary-2); padding:15px 18px; border:1px solid var(--line); }
.btn[disabled], .btn-secondary[disabled], .btn-ghost[disabled] { opacity:.45; cursor:not-allowed; transform:none; }
.icon-btn { background:#fff; border:1px solid var(--line); color:var(--primary-2); padding:10px 12px; }
.actions { display:flex; gap:10px; margin-top:18px; }
.actions > * { flex:1; }
.sticky-actions { position:sticky; bottom:0; padding-top:14px; background: linear-gradient(180deg, rgba(255,253,248,0), rgba(255,253,248,.84) 34%, rgba(255,253,248,.98)); }
.info-box { padding:14px 16px; background:#fbf8ef; border:1px solid #eadfbf; border-radius:16px; margin:14px 0; }
.progress-wrap { margin-bottom:18px; }
.progress-meta { display:flex; justify-content:space-between; gap:10px; font-size:.82rem; color:var(--muted); margin-bottom:8px; }
.progress { height:10px; background:#ece7db; border-radius:999px; overflow:hidden; }
.progress span { display:block; height:100%; background: linear-gradient(90deg, var(--primary), #86a843); border-radius:inherit; }
.option-grid { display:grid; gap:10px; margin-top:16px; }
.option { width:100%; text-align:left; padding:15px 16px; background:#fff; border:1px solid var(--line); border-radius:16px; color:var(--ink); font-weight:700; }
.option.selected { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background:#f7fbf1; }
.option-title { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
.option small { display:block; margin-top:6px; color:var(--muted); }
.checkbox-line { display:flex; gap:10px; align-items:flex-start; margin:12px 0; }
.checkbox-line input { margin-top:4px; }
.stat-grid, .final-grid, .admin-grid { grid-template-columns:repeat(4, minmax(0,1fr)); }
.stat-card, .dashboard-card, .admin-card, .basket-card { padding:18px; }
.stat-label { font-size:.8rem; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin-bottom:8px; }
.stat-value { font-size:clamp(1.6rem, 4vw, 2.8rem); line-height:1; font-weight:950; color:var(--primary-2); }

/* Shelf */
.store-hero { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:16px; }
.store-title { margin-bottom:0; }
.search-wrap { display:flex; gap:10px; align-items:center; margin:10px 0 14px; }
.search-input { flex:1; padding:14px 15px; border-radius:14px; border:1px solid var(--line); background:#fff; }
.category-chips { display:flex; gap:8px; overflow:auto; padding-bottom:4px; margin-bottom:12px; }
.chip { background:#f4f1e7; color:var(--ink); border:1px solid #e3dccd; white-space:nowrap; }
.chip.active { background:#edf4e3; color:var(--primary-2); border-color:#d7e4bf; }
.shelf-meta { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.store-layout { display:grid; grid-template-columns:1.5fr .9fr; gap:16px; align-items:start; }
.shelf-panel { position:relative; padding:14px; background:linear-gradient(180deg, #f8f3e8, #f6f0e4); border:1px solid var(--line); border-radius:22px; overflow:hidden; }
.shelf-panel:before, .shelf-panel:after { content:""; position:absolute; left:12px; right:12px; height:10px; background:linear-gradient(180deg, #c08c44, #9e6f35); border-radius:10px; opacity:.22; }
.shelf-panel:before { top:33%; }
.shelf-panel:after { top:66%; }
.shelf-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:14px; position:relative; }
.product-card { display:flex; flex-direction:column; gap:10px; padding:14px; background:#fffdf8; border:1px solid #ddd4c2; border-radius:18px; box-shadow:0 7px 18px rgba(72,63,34,.08); position:relative; }
.product-card.selected { border-color:var(--primary); box-shadow: inset 0 0 0 1px var(--primary), 0 10px 18px rgba(90,125,43,.09); background:#fafdf4; }
.product-card header { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
.product-card h3 { font-size:1rem; line-height:1.1; margin-bottom:0; }
.product-card .price { font-weight:900; color:var(--primary-2); background:#f0f5e9; border-radius:12px; padding:8px 10px; white-space:nowrap; }
.product-card .tag { display:inline-flex; padding:6px 9px; border-radius:999px; background:#fbf3df; color:#6f551b; font-size:.73rem; font-weight:800; }
.product-card .meta { display:grid; gap:6px; font-size:.9rem; color:var(--muted); }
.product-card .meta span { display:flex; gap:8px; align-items:flex-start; }
.product-actions { display:flex; gap:8px; margin-top:auto; }
.product-actions > * { flex:1; }
.details-panel { font-size:.88rem; color:var(--muted); padding:12px; border:1px dashed var(--line-2); border-radius:14px; background:#fff; }
.basket-wrap { position:sticky; top:14px; display:grid; gap:12px; }
.basket-list { display:grid; gap:8px; max-height:50vh; overflow:auto; }
.basket-item { display:flex; justify-content:space-between; gap:10px; padding:10px 12px; border-radius:14px; background:#f7f4ea; font-size:.9rem; }
.basket-item strong { display:block; color:var(--ink); }
.basket-empty { padding:18px; text-align:center; color:var(--muted); border:1px dashed var(--line-2); border-radius:16px; background:#fff; }
.basket-progress { display:flex; justify-content:space-between; align-items:center; gap:10px; font-weight:800; }
.basket-progress .count { font-size:1.25rem; color:var(--primary-2); }
.barline { height:10px; background:#ece7db; border-radius:999px; overflow:hidden; margin-top:10px; }
.barline span { display:block; height:100%; background:linear-gradient(90deg, var(--accent), #e7c06f); }
.review-mini { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }

/* Comparison / final */
.compare-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.compare-card { padding:18px; border-radius:22px; border:1px solid var(--line); background:#fffdf8; box-shadow:var(--shadow-soft); }
.compare-card.user { border-color:#cfe0b2; background:#f8fdf0; }
.compare-card.ai { border-color:#eadfbf; background:#fffbf1; }
.metric-list { display:grid; gap:10px; margin-top:12px; }
.metric-item { display:flex; justify-content:space-between; gap:12px; padding:10px 12px; background:#fff; border-radius:14px; border:1px solid #ede6d8; }
.metric-item span:last-child { font-weight:900; color:var(--primary-2); }
.list-compact { display:grid; gap:8px; margin-top:12px; max-height:34vh; overflow:auto; }
.list-compact .row { display:flex; gap:10px; justify-content:space-between; padding:10px 12px; border-radius:14px; background:#fff; border:1px solid #ede6d8; }
.profile-panel { padding:20px; border-radius:24px; color:#fff; background:linear-gradient(160deg, #586f22 0%, #496020 50%, #344517 100%); box-shadow:0 18px 34px rgba(71,101,33,.22); }
.profile-title { font-size:1.6rem; font-weight:950; margin:6px 0; letter-spacing:-.03em; }
.metric { margin-top:14px; }
.metric-head { display:flex; justify-content:space-between; gap:10px; font-size:.86rem; margin-bottom:5px; }
.metric-bar { height:8px; background:rgba(255,255,255,.22); border-radius:999px; overflow:hidden; }
.metric-bar span { display:block; height:100%; background:#fff; border-radius:inherit; }
.note { font-size:.82rem; color:rgba(255,255,255,.84); margin-top:10px; }

/* Packaging */
.pack-stage { display:grid; place-items:center; min-height:138px; padding:6px; background:linear-gradient(180deg,#faf8f2,#ede5d3); border-radius:14px; }
.mock-pack { position:relative; width:100px; height:124px; background:#fcfbf7; border:1px solid #cbc8bf; color:#26332d; display:flex; flex-direction:column; align-items:center; text-align:center; padding:10px 8px 8px; box-shadow:0 8px 18px rgba(52,69,23,.12); overflow:hidden; }
.pack-box { border-radius:8px; }
.pack-bag { border-radius:10px 10px 18px 18px; clip-path:polygon(4% 0,96% 0,100% 8%,97% 100%,3% 100%,0 8%); }
.pack-cup { width:106px; height:112px; clip-path:polygon(8% 0,92% 0,83% 100%,17% 100%); border-radius:12px 12px 28px 28px; }
.pack-jar { width:95px; height:116px; border-radius:12px 12px 18px 18px; margin-top:8px; }
.pack-jar:before { content:""; position:absolute; top:-10px; left:10px; right:10px; height:18px; background:#d7d2c5; border-radius:7px 7px 0 0; border:1px solid #c8c1b2; }
.pack-tray { width:110px; height:102px; border-radius:18px; }
.pack-tub { width:112px; height:104px; border-radius:14px 14px 22px 22px; }
.pack-pouch { width:100px; height:124px; clip-path:polygon(8% 0,92% 0,100% 10%,96% 100%,4% 100%,0 10%); border-radius:10px; }
.pack-bottle { width:76px; height:132px; border-radius:20px 20px 16px 16px; }
.pack-bottle:before { content:""; position:absolute; top:-10px; left:28px; width:18px; height:18px; background:#d8a83d; border-radius:5px 5px 0 0; }
.pack-topline { font-size:.54rem; font-weight:900; letter-spacing:.15em; color:#496020; }
.pack-art { width:84%; height:34px; border-radius:11px; margin:7px 0 8px; position:relative; overflow:hidden; }
.pack-art span,.pack-art i,.pack-art b { position:absolute; display:block; border-radius:999px; opacity:.94; }
.pack-art span { width:44px; height:44px; left:-8px; top:11px; background:rgba(255,255,255,.36); }
.pack-art i { width:30px; height:30px; right:7px; top:3px; background:rgba(255,255,255,.28); }
.pack-art b { width:56px; height:56px; right:-12px; bottom:-18px; background:rgba(255,255,255,.3); }
.pack-line { font-size:.52rem; letter-spacing:.16em; font-weight:900; color:#496020; }
.pack-name { font-size:.74rem; line-height:1.04; font-weight:900; letter-spacing:-.02em; }
.pack-footer { margin-top:auto; font-size:.47rem; color:#6d7867; font-weight:800; }
.motif-avena{background:linear-gradient(145deg,#fbefd8,#e9d7a6)} .motif-mela{background:linear-gradient(145deg,#eef9d8,#d6efb1)} .motif-latte{background:linear-gradient(145deg,#f8fbff,#dce9f5)} .motif-cacao{background:linear-gradient(145deg,#ead7cd,#cfb09d)} .motif-grano{background:linear-gradient(145deg,#fff3d3,#f2dfaa)} .motif-pomodoro{background:linear-gradient(145deg,#ffe3df,#ffc9c2)} .motif-verdure{background:linear-gradient(145deg,#ddf6dc,#c5e8bc)} .motif-vegetale{background:linear-gradient(145deg,#ddf6dc,#bfe6bb)} .motif-albicocca{background:linear-gradient(145deg,#ffe9cf,#ffd199)}

/* Dashboard */
.dashboard-body { background:linear-gradient(180deg, #344517, #4a6321 50%, #5f7d2a); color:#fff; }
.dashboard-shell { width:min(1480px, 100%); margin:0 auto; padding:24px; }
.dashboard-title { display:flex; justify-content:space-between; gap:20px; align-items:flex-start; margin-bottom:18px; }
.dashboard-title h1 { color:#fff; margin-bottom:8px; }
.dashboard-title p, .dashboard-card p { color:#e7efd1; }
.toolbar { grid-template-columns: repeat(auto-fit, minmax(140px, max-content)); margin-bottom:16px; }
.toolbar .icon-btn { background:rgba(255,255,255,.1); color:#fff; border-color:rgba(255,255,255,.18); }
.toolbar .icon-btn.active { background:rgba(255,255,255,.18); }
.dashboard-grid { grid-template-columns:repeat(4, minmax(0,1fr)); }
.dashboard-card { background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.12); color:#fff; }
.dashboard-card h3 { font-size:.84rem; letter-spacing:.08em; text-transform:uppercase; color:#f3f7e6; }
.dashboard-card .stat-value { color:#fff; }
.dashboard-card.wide { grid-column: span 2; }
.bar-list { display:grid; gap:10px; margin-top:12px; }
.bar-row { display:grid; grid-template-columns: 160px 1fr 50px; gap:10px; align-items:center; }
.bar-row .line { height:10px; background:rgba(255,255,255,.16); border-radius:999px; overflow:hidden; }
.bar-row .line span { display:block; height:100%; background:#ffd88b; border-radius:inherit; }
.timeline { display:grid; grid-template-columns:repeat(6,1fr); gap:8px; align-items:end; height:170px; margin-top:12px; }
.timeline .col { background:rgba(255,255,255,.12); border-radius:10px 10px 0 0; position:relative; }
.timeline .col span { position:absolute; left:50%; transform:translateX(-50%); bottom:100%; margin-bottom:6px; font-size:.74rem; font-weight:800; }
.timeline-labels { display:grid; grid-template-columns:repeat(6,1fr); gap:8px; margin-top:8px; font-size:.74rem; color:#eef5db; }
.access-box { margin-top:12px; padding:12px 14px; border-radius:14px; background:rgba(255,255,255,.12); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow:auto; }

/* Admin */
.admin-body { background: linear-gradient(180deg, #ece7da, #f6f4ee); }
.admin-shell { width:min(1320px, 100%); margin:0 auto; padding:24px 14px 34px; }
.admin-links { display:flex; flex-wrap:wrap; gap:10px; }
.admin-links a { display:inline-flex; gap:8px; align-items:center; padding:10px 14px; border-radius:14px; background:#fff; border:1px solid var(--line); text-decoration:none; font-weight:800; }
.table-wrap { overflow:auto; margin-top:8px; }
.table { width:100%; border-collapse: collapse; font-size:.88rem; }
.table th,.table td { padding:10px 8px; border-top:1px solid var(--line); text-align:left; }
.table th { font-size:.78rem; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.login-box { width:min(560px,100%); margin:8vh auto 0; }
.input { width:100%; padding:15px; border-radius:16px; border:1px solid var(--line); background:#fff; }

@media (max-width: 1040px) {
  .store-layout, .hero, .compare-grid { grid-template-columns:1fr; }
  .dashboard-grid, .stat-grid, .final-grid, .admin-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .screen { padding:18px; border-radius:22px; }
  .topbar { grid-template-columns:1fr; }
  .shelf-grid { grid-template-columns:1fr; }
  .actions { flex-direction:column; }
  .dashboard-grid, .stat-grid, .final-grid, .admin-grid { grid-template-columns:1fr; }
  .dashboard-card.wide { grid-column: span 1; }
  .bar-row { grid-template-columns:120px 1fr 40px; }
  .timeline { height:130px; }
}

/* v6: supermarket aisle presentation */
h1, h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 700; }
.aisle { margin-bottom: 20px; position: relative; }
.aisle-title { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px 12px; background:#e8ddc6; border:1px solid #d7c8aa; border-radius:12px 12px 6px 6px; font-weight:900; color:#4c4a32; }
.aisle-title span:last-child { font-size:.78rem; color:#7d745e; font-weight:700; }
.aisle-shelf { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(175px, 1fr); gap:12px; overflow-x:auto; padding:12px 8px 18px; border-left:10px solid #d4bd8e; border-right:10px solid #d4bd8e; border-bottom:12px solid #b9894f; background:linear-gradient(180deg,#fbf8f0,#f2eadb); scroll-snap-type:x proximity; box-shadow: inset 0 -5px 0 rgba(91,60,28,.12); }
.aisle-shelf .product-card { min-width:175px; scroll-snap-align:start; }
.aisle-shelf::-webkit-scrollbar { height:9px; }
.aisle-shelf::-webkit-scrollbar-thumb { background:#c3ad83; border-radius:999px; }
.shelf-panel { padding:12px; background:linear-gradient(180deg,#f3ecde,#eee4d1); }
.shelf-panel:before,.shelf-panel:after { display:none; }
.product-card { min-height: 100%; }
.product-card header { min-height:64px; }
.product-card h3 { font-family: Inter, system-ui, sans-serif; }
@media (max-width:720px) {
  .aisle-shelf { grid-auto-columns: minmax(72vw, 72vw); }
  .aisle-title { position:sticky; left:0; z-index:1; }
}

/* v7 catalog admin */
.product-photo-stage { min-height: 155px; background: #fff; padding: 10px; }
.product-photo { width: 100%; height: 145px; object-fit: contain; display:block; border-radius: 10px; }
.admin-heading { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; margin:8px 0 18px; }
.admin-nav { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:18px; padding:6px; background:#f3efe4; border:1px solid var(--line); border-radius:16px; }
.admin-nav-btn { border:0; background:transparent; color:var(--muted); font-weight:800; padding:11px 14px; border-radius:12px; cursor:pointer; }
.admin-nav-btn span { display:inline-flex; min-width:24px; justify-content:center; margin-left:6px; padding:2px 6px; border-radius:999px; background:#fff; color:var(--primary-2); font-size:.75rem; }
.admin-nav-btn.active { background:#fff; color:var(--primary-2); box-shadow:var(--shadow-soft); }
.admin-add { width:auto; min-width:180px; }
.catalog-toolbar { display:grid; grid-template-columns:2fr 1fr 1fr; gap:10px; margin-bottom:12px; }
.catalog-summary { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:14px; }
.catalog-table td { vertical-align:middle; }
.admin-thumb { width:62px; height:62px; object-fit:contain; border-radius:12px; background:#fff; border:1px solid var(--line); display:grid; place-items:center; }
.admin-thumb.placeholder { color:var(--muted); font-size:.72rem; font-weight:900; background:#f7f4ea; }
.row-actions { display:flex; gap:7px; flex-wrap:wrap; }
.danger-btn { color:#8e3b3b; border-color:#e6caca; background:#fff7f7; }
.danger-text { color:#8e3b3b; }
.state-dot { display:inline-flex; align-items:center; gap:6px; padding:6px 9px; border-radius:999px; font-size:.75rem; font-weight:800; }
.state-dot.ok { background:#e9f5e8; color:#2e6d40; }
.state-dot.danger { background:#faeaea; color:#8d3f3f; }
.state-dot.muted { background:#efefec; color:#777; }
.editor-layout { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(280px,.7fr); gap:16px; align-items:start; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.field { display:grid; gap:7px; }
.field span { font-size:.82rem; font-weight:800; color:var(--muted); }
.field-wide { grid-column:1/-1; }
.textarea { min-height:104px; resize:vertical; }
.checkbox-field { display:flex; align-items:center; gap:10px; padding:12px 0; }
.checkbox-field input { width:18px; height:18px; }
.image-editor { position:sticky; top:12px; }
.image-preview { min-height:240px; display:grid; place-items:center; border-radius:18px; border:1px dashed var(--line-2); background:#faf8f2; margin:12px 0; overflow:hidden; }
.image-preview img { width:100%; height:260px; object-fit:contain; background:#fff; }
.image-placeholder { text-align:center; color:var(--muted); font-weight:800; }
.form-narrow { max-width:760px; }
@media (max-width:900px) {
  .catalog-toolbar, .editor-layout { grid-template-columns:1fr; }
  .image-editor { position:static; }
}
@media (max-width:650px) {
  .admin-heading { flex-direction:column; }
  .admin-add { width:100%; }
  .form-grid { grid-template-columns:1fr; }
  .field-wide { grid-column:auto; }
}


/* Branding v8 */
.home-logos {
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:22px;
  padding:8px 12px 22px;
}
.home-logo {
  display:block;
  max-width:min(240px, 42vw);
  max-height:92px;
  width:auto;
  height:auto;
  object-fit:contain;
}
.home-logo-secondary { max-height:78px; }
.branding-preview {
  border:1px solid var(--line);
  border-radius:22px;
  overflow:hidden;
  background:var(--branding-bg, var(--bg));
}
.branding-preview-head {
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:105px;
  gap:20px;
  padding:20px;
  background:rgba(255,255,255,.82);
  border-bottom:1px solid var(--line);
}
.branding-preview-head img { max-width:180px; max-height:72px; object-fit:contain; }
.branding-preview-body { padding:22px; }
.branding-preview-body h2 { color:var(--branding-text, var(--ink)); margin-bottom:8px; }
.branding-preview-body p { color:var(--branding-text, var(--ink)); opacity:.72; }
.branding-preview-button {
  display:inline-flex;
  margin-top:10px;
  padding:12px 18px;
  border-radius:14px;
  color:#fff;
  font-weight:800;
  background:var(--branding-button, var(--button-color));
}
.branding-grid { display:grid; grid-template-columns:1.1fr .9fr; gap:18px; align-items:start; }
.logo-admin-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.logo-admin-card { padding:16px; border:1px solid var(--line); border-radius:18px; background:#fff; }
.logo-admin-preview { min-height:120px; display:grid; place-items:center; background:#f8f6ef; border:1px dashed var(--line-2); border-radius:14px; padding:14px; margin-bottom:12px; }
.logo-admin-preview img { max-width:100%; max-height:90px; object-fit:contain; }
.color-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.color-field { display:grid; grid-template-columns:54px 1fr; gap:10px; align-items:center; }
.color-field input[type="color"] { width:54px; height:44px; padding:2px; border:1px solid var(--line); border-radius:12px; background:#fff; }
@media (max-width: 900px) {
  .branding-grid, .logo-admin-grid { grid-template-columns:1fr; }
}

/* v9 — Totem Mac */
.totem-body { min-height:100vh; overflow:hidden; background:var(--bg); }
.totem-shell { min-height:100vh; display:grid; grid-template-columns:1fr 1fr; }
.totem-left, .totem-right { min-height:100vh; padding:clamp(28px,4vw,64px); display:flex; flex-direction:column; justify-content:center; }
.totem-left { background:linear-gradient(160deg, #ffffff 0%, #faf7ef 100%); border-right:1px solid var(--line); align-items:center; text-align:center; }
.totem-right { background:linear-gradient(160deg, var(--primary-2), var(--primary)); color:#fff; }
.totem-right p { color:rgba(255,255,255,.88); }
.totem-logo-row { display:flex; gap:18px; align-items:center; justify-content:center; flex-wrap:wrap; min-height:64px; margin-bottom:18px; }
.totem-logo-row img { max-width:170px; max-height:72px; object-fit:contain; background:#fff; border-radius:14px; padding:8px 12px; }
.totem-qr-card { width:min(72vh, 520px); max-width:90%; background:#fff; border-radius:34px; padding:24px; box-shadow:0 24px 60px rgba(36,49,44,.16); border:1px solid var(--line); }
.totem-qr-card img { display:block; width:100%; aspect-ratio:1; }
.totem-qr-url { margin-top:14px; padding:12px 14px; background:#f4f1e7; border-radius:14px; font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-weight:800; overflow-wrap:anywhere; color:var(--ink); }
.totem-cta { display:inline-flex; align-items:center; gap:10px; margin-bottom:14px; font-weight:900; color:var(--accent-2); text-transform:uppercase; letter-spacing:.08em; }
.totem-right h1 { color:#fff; font-size:clamp(3rem,5vw,6.2rem); max-width:900px; }
.totem-kpis { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:22px; }
.totem-kpi { padding:18px; border-radius:20px; background:rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.16); }
.totem-kpi strong { display:block; font-size:clamp(1.8rem,3vw,3.3rem); line-height:1; color:#fff; }
.totem-kpi span { display:block; margin-top:8px; color:rgba(255,255,255,.82); }
.totem-foot { margin-top:22px; font-size:.84rem; color:rgba(255,255,255,.7); }

/* v9 — Full analytics dashboard */
.results-login { width:min(580px, calc(100% - 32px)); margin:8vh auto; background:#fff; padding:28px; border-radius:26px; color:var(--ink); box-shadow:var(--shadow); }
.results-actions { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:18px; }
.results-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.results-card { background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14); border-radius:22px; padding:18px; color:#fff; }
.results-card h3 { color:#f3f7e6; font-size:.82rem; letter-spacing:.08em; text-transform:uppercase; }
.results-card p { color:#e7efd1; }
.results-card.wide { grid-column:span 2; }
.results-card.full { grid-column:1/-1; }
.chart-bars { display:grid; gap:10px; margin-top:14px; }
.chart-bar-row { display:grid; grid-template-columns:minmax(120px,180px) 1fr 52px; gap:10px; align-items:center; }
.chart-bar-row .bar-track { height:12px; background:rgba(255,255,255,.14); border-radius:999px; overflow:hidden; }
.chart-bar-row .bar-track span { display:block; height:100%; background:#ffd88b; border-radius:inherit; }
.chart-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:12px; }
.chart-pair .metric-box { padding:14px; border-radius:16px; background:rgba(255,255,255,.09); }
.chart-pair .metric-box strong { display:block; font-size:2rem; }
.donut-wrap { display:flex; align-items:center; gap:18px; flex-wrap:wrap; margin-top:14px; }
.donut { width:150px; height:150px; border-radius:50%; display:grid; place-items:center; position:relative; }
.donut:after { content:""; width:96px; height:96px; border-radius:50%; background:var(--primary-2); position:absolute; }
.donut strong { position:relative; z-index:1; font-size:1.55rem; }
.results-table-wrap { overflow:auto; margin-top:12px; max-height:420px; }
.results-table { width:100%; border-collapse:collapse; color:#fff; font-size:.88rem; }
.results-table th,.results-table td { padding:10px 8px; border-top:1px solid rgba(255,255,255,.12); text-align:left; }
.results-table th { color:#dfeaca; position:sticky; top:0; background:var(--primary-2); }

@media (max-width: 1000px) {
  .totem-shell { grid-template-columns:1fr; }
  .totem-left,.totem-right { min-height:auto; }
  .totem-body { overflow:auto; }
  .results-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .totem-kpis,.results-grid,.chart-pair { grid-template-columns:1fr; }
  .results-card.wide { grid-column:span 1; }
  .chart-bar-row { grid-template-columns:100px 1fr 42px; }
}

/* controlli operativi */
.system-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; align-items:center; }
.system-strip > div { display:grid; gap:6px; min-width:0; }
.system-strip strong { font-size:.78rem; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); }
.system-strip span:not(.state-dot) { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ops-warnings { display:grid; gap:8px; margin-bottom:12px; }
.danger-zone { border-color:#e4b9b9 !important; background:#fff9f9 !important; }
.danger-zone h3 { color:#8d3434; }
.totem-status-pill { display:inline-flex; align-items:center; gap:8px; padding:9px 14px; border-radius:999px; font-size:.82rem; font-weight:900; background:rgba(255,255,255,.14); color:#fff; }
.totem-status-pill.closed { background:rgba(154,66,66,.2); color:#fff1f1; }
.totem-closed-card { width:min(500px,100%); padding:28px; border-radius:24px; background:#fff; color:var(--ink); box-shadow:var(--shadow); text-align:center; }
.totem-closed-card h2 { margin-bottom:8px; }
.event-label { display:inline-flex; padding:7px 11px; border-radius:999px; background:#fbf3df; color:#6f551b; font-weight:800; font-size:.76rem; margin-bottom:12px; }
.readiness-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
@media (max-width: 900px) { .system-strip { grid-template-columns:1fr 1fr; } }
@media (max-width: 620px) { .system-strip,.readiness-grid { grid-template-columns:1fr; } }
.totem-fullscreen-btn { position:fixed; right:18px; bottom:18px; z-index:20; opacity:.78; }
.totem-fullscreen-btn:hover { opacity:1; }

/* controlli ricerca */
.toggle-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:12px; }
.toggle-row { display:flex; gap:12px; align-items:flex-start; padding:14px; border:1px solid var(--line); border-radius:16px; background:#fff; }
.toggle-row input { margin-top:3px; transform:scale(1.15); }
.toggle-row span { display:grid; gap:4px; }
.toggle-row small { color:var(--muted); line-height:1.35; }
.quality-ok { color:#2f7c54; }
.quality-review { color:#9a4242; }
@media (max-width:720px){ .toggle-grid{grid-template-columns:1fr;} }

/* esperienza supermercato */
.store-header-real { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:14px; }
.cart-status-card { min-width:132px; padding:14px 16px; border-radius:18px; background:#fff; border:1px solid var(--line); box-shadow:var(--shadow-soft); text-align:right; }
.cart-status-card span { display:block; font-size:.7rem; letter-spacing:.12em; font-weight:900; color:var(--muted); }
.cart-status-card strong { display:block; font-size:1.7rem; line-height:1.1; color:var(--primary-2); }
.cart-status-card small { display:block; margin-top:4px; font-weight:800; color:#7a6c4c; }
.store-nav-real { position:sticky; top:0; z-index:20; margin:0 -4px 14px; padding:10px 4px 6px; background:linear-gradient(180deg,var(--surface) 82%,rgba(255,255,255,0)); }
.shelf-departments { padding:2px 0 8px; margin-bottom:0; }
.store-layout-real { grid-template-columns:minmax(0,1.7fr) 320px; }
.shelf-panel-real { padding:16px; background:linear-gradient(180deg,#eee8db,#e5dccb); border-color:#d4c6ae; }
.aisle-real { margin-bottom:26px; }
.aisle-sign { display:flex; justify-content:space-between; align-items:center; gap:12px; background:linear-gradient(180deg,#f7f2e8,#ebe2d2); border:1px solid #d0c0a7; border-bottom:0; padding:11px 14px; border-radius:13px 13px 0 0; box-shadow:inset 0 -1px rgba(255,255,255,.7); }
.aisle-sign > div { display:flex; align-items:center; gap:10px; }
.aisle-sign small { display:block; font-size:.58rem; letter-spacing:.16em; font-weight:900; color:#877d69; }
.aisle-sign strong { display:block; color:#3f463f; font-size:1rem; }
.aisle-sign > span { color:#82745d; font-size:.76rem; font-weight:800; }
.aisle-icon { font-size:1.45rem; }
.shelf-fixture { background:linear-gradient(180deg,#f7f2e7 0,#eee5d4 82%,#b98c56 82%,#9b6f3f 100%); border-left:9px solid #c9b48f; border-right:9px solid #c9b48f; border-bottom:8px solid #8c6338; padding:12px 6px 0; box-shadow:inset 0 -11px 0 rgba(63,42,18,.09), 0 6px 10px rgba(72,63,34,.09); }
.aisle-shelf-real { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(166px, 166px); gap:8px; overflow-x:auto; padding:0 5px 18px; border:0; background:transparent; scroll-snap-type:x proximity; }
.shelf-plank { height:12px; margin:0 -6px; background:linear-gradient(180deg,#c89b63,#9b6d3c); border-top:1px solid #e0bc86; box-shadow:0 5px 7px rgba(60,38,14,.17); }
.product-card-real { min-width:166px; padding:9px 9px 0; border-radius:10px 10px 4px 4px; gap:7px; background:#fffefb; box-shadow:0 4px 9px rgba(61,52,34,.09); border-color:#ddd6c7; }
.product-card-real.selected { transform:translateY(-2px); }
.product-visual-button { appearance:none; display:block; width:100%; padding:0; border:0; background:transparent; position:relative; cursor:zoom-in; }
.product-visual-button .pack-stage { min-height:128px; background:linear-gradient(180deg,#fcfaf4,#eee7da); }
.product-zoom-hint { position:absolute; right:6px; bottom:6px; padding:4px 7px; border-radius:999px; background:rgba(36,49,44,.82); color:#fff; font-size:.62rem; font-weight:800; opacity:.88; }
.product-copy-real { display:flex; flex-direction:column; gap:4px; min-height:94px; }
.product-copy-real h3 { font-size:.9rem; line-height:1.08; margin:0; }
.product-origin { font-size:.72rem; color:var(--muted); font-weight:700; }
.product-claim { display:block; margin-top:1px; padding:4px 6px; background:#f5efe2; color:#6d5d3c; border-radius:6px; font-size:.62rem; font-weight:800; line-height:1.15; }
.shelf-edge { margin:2px -9px 0; padding:7px 7px 8px; background:linear-gradient(180deg,#f6f1e7,#eae1d1); border-top:1px solid #d7ccb8; display:grid; grid-template-columns:74px 1fr; gap:6px; align-items:stretch; }
.shelf-price-ticket { appearance:none; border:1px solid #dad3c5; background:#fff; padding:5px 6px; border-radius:5px; text-align:left; box-shadow:0 1px 2px rgba(0,0,0,.05); }
.shelf-price-ticket span { display:block; font-size:.46rem; letter-spacing:.12em; color:#797165; font-weight:900; }
.shelf-price-ticket strong { display:block; color:#1f2622; font-size:1rem; letter-spacing:-.03em; }
.shelf-price-ticket.large { width:150px; padding:10px 12px; margin-top:14px; }
.shelf-price-ticket.large strong { font-size:1.5rem; }
.cart-add-real { border:0; border-radius:7px; padding:8px 7px; font-weight:900; font-size:.68rem; background:var(--primary); color:#fff; }
.cart-add-real.selected { background:#e5efda; color:var(--primary-2); border:1px solid #cbdab5; }
.basket-wrap-real { top:84px; }
.basket-summary-real { background:linear-gradient(180deg,#fffefb,#f8f2e5); }
.basket-total-line { display:flex; justify-content:space-between; gap:10px; align-items:center; margin-top:12px; padding-top:10px; border-top:1px solid var(--line); }
.basket-total-line span { color:var(--muted); font-size:.8rem; }
.basket-total-line strong { color:var(--primary-2); }
.basket-item-button { width:100%; appearance:none; border:0; text-align:left; cursor:zoom-in; }
.checkout-icon { font-size:1.7rem; margin-bottom:5px; }
.basket-checkout h3 { margin-bottom:5px; }
.product-modal-backdrop { position:fixed; inset:0; z-index:1000; display:grid; place-items:center; padding:18px; background:rgba(25,30,27,.62); backdrop-filter:blur(7px); }
.product-modal { width:min(880px,100%); max-height:min(88vh,780px); overflow:auto; position:relative; background:#fffdf8; border:1px solid rgba(255,255,255,.8); border-radius:26px; box-shadow:0 35px 90px rgba(0,0,0,.28); padding:22px; }
.modal-close { position:absolute; top:12px; right:12px; z-index:3; width:40px; height:40px; border-radius:999px; border:1px solid var(--line); background:#fff; font-size:1.65rem; line-height:1; color:var(--ink); }
.product-modal-grid { display:grid; grid-template-columns:minmax(260px,.8fr) minmax(0,1.2fr); gap:26px; align-items:start; }
.product-modal-visual { display:grid; justify-items:center; padding:20px; border-radius:20px; background:linear-gradient(180deg,#f2ecdf,#e7dece); border:1px solid #d8cbb5; }
.product-modal-visual .pack-stage { min-height:280px; width:100%; }
.product-modal-visual .mock-pack { transform:scale(1.55); }
.product-modal-visual .product-photo { max-height:280px; object-fit:contain; }
.product-modal-copy h2 { margin-top:10px; }
.product-facts { display:grid; gap:8px; margin:14px 0; }
.product-facts > div { display:grid; grid-template-columns:130px 1fr; gap:12px; align-items:start; padding:10px 12px; border-radius:12px; background:#f8f5ed; }
.product-facts span { font-size:.72rem; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); font-weight:800; }
.product-facts strong { font-size:.88rem; }
.label-sheet { margin-top:14px; background:#fff; border:2px solid #252c28; padding:13px; color:#1e2420; }
.label-sheet-head { padding-bottom:8px; border-bottom:6px solid #252c28; margin-bottom:9px; }
.label-sheet-head span { display:block; font-size:.58rem; letter-spacing:.13em; font-weight:900; }
.label-sheet-head strong { font-size:1.15rem; }
.label-sheet p { color:#1e2420; margin:0; font-size:.9rem; line-height:1.45; }
.modal-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:16px; }
.benchmark-hero-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:16px 0; }
.benchmark-position-card { padding:18px; border:1px solid var(--line); background:linear-gradient(180deg,#fffdf8,#f7f2e7); border-radius:20px; box-shadow:var(--shadow-soft); }
.benchmark-position-card > span { display:block; font-size:.7rem; letter-spacing:.12em; font-weight:900; color:var(--muted); }
.benchmark-position-card > strong { display:block; margin:5px 0 8px; font-size:2.25rem; line-height:1; color:var(--primary-2); }
.benchmark-position-card p { margin:10px 0 5px; }
.benchmark-position-card small { color:var(--muted); }
.benchmark-scale { position:relative; height:12px; margin:14px 0 9px; border-radius:999px; background:linear-gradient(90deg,#e9ece7,#dce8cb 50%,#f0dba8); }
.benchmark-scale:before { content:""; position:absolute; left:50%; top:-4px; bottom:-4px; width:1px; background:#6b736d; opacity:.4; }
.benchmark-scale i { position:absolute; top:50%; width:18px; height:18px; border:3px solid #fff; border-radius:50%; background:var(--primary); box-shadow:0 2px 6px rgba(0,0,0,.18); transform:translate(-50%,-50%); }
@media (max-width:1040px) { .store-layout-real { grid-template-columns:1fr; } .basket-wrap-real { position:static; } .product-modal-grid { grid-template-columns:1fr; } }
@media (max-width:720px) { .store-header-real { display:grid; grid-template-columns:1fr auto; } .cart-status-card { min-width:104px; } .aisle-shelf-real { grid-auto-columns:minmax(160px,160px); } .benchmark-hero-grid { grid-template-columns:1fr; } .product-modal { padding:16px; border-radius:20px; } .product-modal-visual .pack-stage { min-height:220px; } .modal-actions { grid-template-columns:1fr; } .product-facts > div { grid-template-columns:1fr; gap:3px; } }

/* dashboard filtri e sottogruppi */
.dashboard-filter-panel { margin:0 0 16px; padding:14px; border-radius:18px; background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.15); backdrop-filter:blur(10px); }
.dashboard-filter-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px; }
.dashboard-filter-head strong { display:block; color:#fff; font-size:1rem; }
.dashboard-filter-head span { display:block; margin-top:3px; color:#e5edd3; font-size:.78rem; }
.dashboard-filters { display:grid; grid-template-columns:repeat(5,minmax(130px,1fr)); gap:8px; }
.dashboard-filters select { width:100%; min-width:0; appearance:auto; border-radius:12px; border:1px solid rgba(255,255,255,.2); background:rgba(255,255,255,.95); color:#26312d; padding:10px 11px; font:inherit; font-size:.78rem; }
.segment-table-wrap { overflow:auto; }
.segment-table td, .segment-table th { white-space:nowrap; }
.heat-cell { display:inline-block; min-width:56px; padding:5px 8px; border-radius:9px; text-align:center; font-weight:900; background:linear-gradient(90deg,rgba(255,216,139,.28) var(--heat),rgba(255,255,255,.07) var(--heat)); }
@media (max-width:1100px){ .dashboard-filters{grid-template-columns:repeat(3,minmax(130px,1fr));} }
@media (max-width:700px){ .dashboard-filters{grid-template-columns:1fr 1fr;} .dashboard-filter-head{align-items:flex-start;flex-direction:column;} }

/* resilienza e funnel */
.network-status-banner{position:fixed;left:50%;bottom:calc(10px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:9999;padding:8px 13px;border-radius:999px;font-size:.76rem;font-weight:800;box-shadow:0 8px 24px rgba(0,0,0,.16);transition:.2s ease;max-width:calc(100vw - 24px);text-align:center;pointer-events:none}
.network-status-banner.online{background:rgba(240,248,235,.94);color:#416123;border:1px solid #cddfba;opacity:.72}
.network-status-banner.offline{background:#fff3df;color:#805a18;border:1px solid #e7ca91;opacity:1}
.funnel-admin,.dashboard-funnel{display:grid;gap:12px;margin-top:14px}
.funnel-admin-row,.dashboard-funnel-row{display:grid;grid-template-columns:minmax(180px,1.2fr) minmax(180px,2fr) auto;gap:12px;align-items:center}
.funnel-admin-row>div:first-child,.dashboard-funnel-row>div:first-child{display:grid;gap:3px}
.funnel-admin-row span,.dashboard-funnel-row span{font-size:.8rem;color:var(--muted)}
.dashboard-body .dashboard-funnel-row span,.dashboard-body .dashboard-funnel-row small{color:#dfe9ca}
.dashboard-body .dashboard-funnel-row .bar-track{background:rgba(255,255,255,.14)}
.dashboard-body .dashboard-funnel-row .bar-track span{background:#ffd88b}
@media(max-width:720px){.funnel-admin-row,.dashboard-funnel-row{grid-template-columns:1fr}.network-status-banner{font-size:.7rem}}

/* profili e autenticazione */
.profile-switcher{display:flex;flex-wrap:wrap;gap:6px;padding:5px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.15);border-radius:14px}
.profile-switcher a{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:8px 12px;border-radius:10px;text-decoration:none;font-size:.82rem;font-weight:800;color:inherit;opacity:.85}
.profile-switcher a.active{background:#fff;color:var(--primary-2);opacity:1;box-shadow:0 4px 12px rgba(0,0,0,.08)}
.admin-body .profile-switcher{background:#f1eee5;border-color:var(--line)}
.admin-body .profile-switcher a{color:var(--muted)}
.admin-body .profile-switcher a.active{color:var(--primary-2)}
.account-tools,.dashboard-accountbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px}
.dashboard-accountbar{margin:0 0 14px}
.user-chip{display:inline-flex;align-items:center;min-height:36px;padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.12);font-size:.78rem;font-weight:800;color:inherit}
.admin-body .user-chip{background:#f1eee5;color:var(--ink)}
.user-form-grid{display:grid;grid-template-columns:1fr 1.4fr 1.2fr .9fr;gap:10px;align-items:center}
.role-help{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:14px}
.role-help>div{padding:12px;border:1px solid var(--line);border-radius:14px;background:#faf8f2}
.role-help strong,.role-help span{display:block}.role-help span{margin-top:5px;font-size:.8rem;color:var(--muted);line-height:1.4}
.input.compact{padding:9px 10px;border-radius:10px;min-width:110px}
.login-box label{font-weight:800;font-size:.86rem;color:var(--muted)}
@media(max-width:900px){.user-form-grid{grid-template-columns:1fr 1fr}.role-help{grid-template-columns:1fr}.account-tools,.dashboard-accountbar{justify-content:flex-start}}
@media(max-width:560px){.user-form-grid{grid-template-columns:1fr}.profile-switcher{width:100%}.profile-switcher a{flex:1}.user-chip{width:100%;justify-content:center}}

/* Admin Control Room · definitive */
.control-heading .row-actions{align-items:center;flex-wrap:wrap}.control-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.control-card{display:flex;justify-content:space-between;align-items:center;gap:12px;text-align:left;background:#fffdf8;border:1px solid var(--line);border-radius:18px;padding:16px;box-shadow:var(--shadow-soft);color:var(--ink)}.control-card:hover{transform:translateY(-1px);border-color:#c9d7b1}.control-card span:first-child{display:block;font-size:.76rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:800}.control-card strong{display:block;margin-top:5px;font-size:.97rem}.control-light{display:inline-flex;padding:7px 9px;border-radius:999px;font-size:.7rem;font-weight:900;white-space:nowrap}.control-light.ok{background:#e7f4e9;color:#21633e}.control-light.warn{background:#fff2cf;color:#7b5916}.control-light.bad{background:#fbe6e4;color:#8a3333}.readiness-title{display:flex;justify-content:space-between;align-items:center;gap:14px}.readiness-title p{margin-bottom:0}.go-badge,.nogo-badge{display:grid;place-items:center;min-width:64px;height:64px;border-radius:50%;font-weight:950}.go-badge{background:#e1f3e4;color:#27643f}.nogo-badge{background:#f9e2df;color:#8a3434}.readiness-list{display:grid;gap:8px;margin-top:14px}.readiness-row{display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 12px;background:#faf8f2;border-radius:14px}.readiness-row small{display:block;color:var(--muted);margin-top:2px}.readiness-row>span:last-child{font-size:.72rem;color:var(--muted);font-weight:800}.readiness-icon{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;font-weight:950}.readiness-icon.ok{background:#e7f4e9;color:#21633e}.readiness-icon.warn{background:#fff2cf;color:#7b5916}.readiness-icon.bad{background:#fbe6e4;color:#8a3333}.attention-card{border-color:#e6c36c;background:#fffcf4}.success-card{border-color:#bdd9ad;background:#fbfff8}.notification-list{display:grid;gap:8px}.notification-item{padding:10px 12px;background:#fff;border:1px solid #eadfca;border-radius:12px}.catalog-actions{display:flex;justify-content:space-between;gap:18px;align-items:center;margin-bottom:14px}.row-actions.wrap{flex-wrap:wrap;justify-content:flex-end}.validation-pill{display:inline-flex;padding:6px 9px;border-radius:999px;font-size:.72rem;font-weight:900;white-space:nowrap}.validation-pill.validated{background:#e6f4e8;color:#28623e}.validation-pill.disagreement{background:#fbe5e2;color:#8b3434}.validation-pill.consensus_pending{background:#e5eefb;color:#385e8e}.validation-pill.partial{background:#fff1d1;color:#7a5818}.validation-pill.pending{background:#efede7;color:#66645e}.validation-table .validation-select{min-width:120px}.validation-table .validation-note{min-width:180px}.role-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.role-card{padding:14px;border:1px solid var(--line);border-radius:14px;background:#faf8f2}.role-card p{margin:6px 0 0;font-size:.86rem}.shelf-preview-card{position:sticky;top:14px}.mini-shelf{padding:18px 10px 8px;background:linear-gradient(180deg,#f8f2e5,#eee3cf);border-radius:16px}.mini-shelf-board{display:grid;grid-template-columns:82px 1fr auto;gap:12px;align-items:center;background:#fffdf8;border:1px solid #d9cfba;border-radius:14px;padding:12px;box-shadow:0 8px 18px rgba(72,63,34,.09)}.mini-shelf-board img,.mini-pack{width:76px;height:88px;object-fit:contain;border-radius:10px;background:#f7f4ec;border:1px solid #ded6c8}.mini-pack{display:grid;place-items:center;text-align:center;padding:6px;font-size:.7rem;font-weight:900;color:#52662e}.mini-shelf-copy span{font-size:.68rem;text-transform:uppercase;color:var(--muted);font-weight:800}.mini-shelf-copy strong{display:block;margin:5px 0;line-height:1.1}.mini-shelf-copy small{color:var(--muted)}.mini-price{font-size:1.08rem;font-weight:950;background:#f2f6e9;color:#46631f;padding:8px;border-radius:10px}.mini-shelf-edge{height:10px;background:#b88a4b;opacity:.34;border-radius:2px 2px 8px 8px;margin:0 3px}.user-role{min-width:130px}
@media(max-width:1050px){.control-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.role-grid{grid-template-columns:1fr}.catalog-actions{align-items:flex-start;flex-direction:column}.catalog-actions .row-actions{justify-content:flex-start}}@media(max-width:680px){.control-grid{grid-template-columns:1fr}.readiness-row{grid-template-columns:30px 1fr}.readiness-row>span:last-child{grid-column:2}.mini-shelf-board{grid-template-columns:64px 1fr}.mini-shelf-board img,.mini-pack{width:58px;height:72px}.mini-price{grid-column:2;justify-self:start}}

/* Profilazione guidata */
.profile-wizard-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:14px}
.profile-privacy-badge{display:inline-flex;align-items:center;gap:7px;padding:9px 12px;border-radius:999px;background:#eef5e5;color:var(--primary-2);font-size:.8rem;font-weight:850;white-space:nowrap}
.profile-stepper{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:16px 0 20px}
.profile-step{appearance:none;border:1px solid var(--line);background:#fff;border-radius:16px;padding:10px 8px;display:flex;align-items:center;gap:9px;text-align:left;color:var(--muted);font-weight:750}
.profile-step span{width:28px;height:28px;display:grid;place-items:center;border-radius:999px;background:#f0ede5;color:var(--muted);font-size:.8rem;font-weight:900;flex:0 0 auto}
.profile-step small{font-size:.76rem;line-height:1.15;font-weight:800}
.profile-step.active{border-color:#bfd39b;background:#f7fbf1;color:var(--primary-2);box-shadow:inset 0 0 0 1px #d5e4bb}
.profile-step.active span{background:var(--primary);color:#fff}
.profile-step:disabled{opacity:.48;cursor:not-allowed}
.profile-question-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start}
.profile-question{position:relative;background:#fffdf8;border:1px solid var(--line);border-radius:22px;padding:18px;box-shadow:var(--shadow-soft)}
.profile-question-wide{margin-top:14px}
.profile-question-number{display:inline-flex;align-items:center;justify-content:center;width:34px;height:26px;border-radius:999px;background:#f3ecd9;color:#73571c;font-size:.73rem;font-weight:900;letter-spacing:.08em;margin-bottom:9px}
.profile-question h3{font-size:1.08rem;line-height:1.25;margin-bottom:8px}
.question-help{font-size:.84rem;margin-bottom:10px}
.compact-options{margin-top:10px}
.compact-options .option{padding:12px 14px}
.profile-horizontal-options{grid-template-columns:repeat(5,minmax(0,1fr))}
.profile-priority-title{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.profile-priority-title p{margin:0}
.selection-counter{display:grid;place-items:center;min-width:48px;height:42px;border-radius:14px;background:#f1eee5;color:var(--muted);font-weight:950}
.selection-counter.complete{background:#eaf4df;color:var(--primary-2)}
.profile-priority-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
.profile-review-grid{display:grid;gap:10px;margin:16px 0}
.profile-review-card{display:grid;grid-template-columns:auto 1fr auto;gap:13px;align-items:center;background:#fffdf8;border:1px solid var(--line);border-radius:18px;padding:14px 15px}
.profile-review-card p{margin:4px 0 0;font-size:.9rem}
.profile-review-icon{width:42px;height:42px;border-radius:14px;background:#f2efe5;display:grid;place-items:center;font-size:1.2rem}
.profile-review-note{margin-top:14px}

/* Control Home */
.control-body{background:linear-gradient(145deg,#ece7da 0%,#f7f5ef 48%,#eef3e7 100%);min-height:100vh}
.control-shell{width:min(1180px,100%);margin:0 auto;padding:24px 16px 40px}
.control-hero{display:grid;grid-template-columns:1.2fr .8fr;gap:16px;align-items:stretch}
.control-title-card,.control-status-card,.control-nav-card{background:rgba(255,255,255,.94);border:1px solid var(--line);border-radius:26px;box-shadow:var(--shadow);padding:22px}
.control-title-card h1{font-size:clamp(2rem,5vw,3.6rem);margin-bottom:10px}
.control-nav-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:18px}
.control-nav-card{text-decoration:none;color:var(--ink);transition:transform .14s ease,box-shadow .14s ease}
.control-nav-card:hover{transform:translateY(-2px);box-shadow:0 18px 38px rgba(72,63,34,.14)}
.control-nav-icon{width:52px;height:52px;border-radius:17px;display:grid;place-items:center;background:#eef4e4;font-size:1.4rem;margin-bottom:14px}
.control-nav-card h3{font-size:1.2rem;margin-bottom:6px}
.control-nav-card p{margin-bottom:0}
.control-status-list{display:grid;gap:10px;margin-top:14px}
.control-status-row{display:flex;justify-content:space-between;gap:14px;padding:12px 14px;border-radius:14px;background:#f8f5ec}
.control-status-row strong{color:var(--ink)}
.control-ok{color:var(--ok);font-weight:900}.control-warn{color:var(--warn);font-weight:900}
.control-address{padding:12px 14px;border-radius:14px;background:#26332d;color:#f5f7f1;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;overflow:auto;margin-top:10px}
.control-footer{margin-top:16px;display:flex;justify-content:space-between;gap:10px;align-items:center;color:var(--muted);font-size:.82rem}

@media(max-width:900px){
  .profile-question-grid{grid-template-columns:1fr}
  .profile-horizontal-options,.profile-priority-grid{grid-template-columns:1fr 1fr}
  .control-hero{grid-template-columns:1fr}
}
@media(max-width:640px){
  .profile-wizard-head{display:block}.profile-privacy-badge{margin-top:8px}
  .profile-stepper{grid-template-columns:1fr 1fr}.profile-step small{font-size:.72rem}
  .profile-horizontal-options,.profile-priority-grid{grid-template-columns:1fr}
  .control-nav-grid{grid-template-columns:1fr}
  .profile-review-card{grid-template-columns:auto 1fr}.profile-review-card .icon-btn{grid-column:1/-1}
}
.totem-operator-nav{position:fixed;right:18px;bottom:18px;z-index:20;display:flex;gap:8px;align-items:center}
.totem-operator-nav .icon-btn{opacity:.82;text-decoration:none}
.totem-operator-nav .icon-btn:hover{opacity:1}
.totem-operator-nav .totem-fullscreen-btn{position:static;right:auto;bottom:auto}
.brand-logo-strip{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-bottom:18px}
.brand-logo-strip img{display:block;max-width:150px;max-height:54px;object-fit:contain;background:#fff;border:1px solid var(--line);border-radius:12px;padding:7px 10px}

/* Content editor */
.content-editor-sections{display:grid;gap:14px;margin-top:16px}.content-editor-card{padding:0;overflow:hidden}.content-editor-card summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;padding:17px 18px;background:#fffdf8}.content-editor-card summary span{font-size:.78rem;color:var(--muted);font-weight:700}.content-editor-card[open] summary{border-bottom:1px solid var(--line)}.content-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:18px}.content-field{display:grid;gap:7px;align-content:start}.content-field span{font-size:.8rem;font-weight:850;color:var(--muted)}.content-field textarea{width:100%;min-height:92px;resize:vertical;padding:13px 14px;border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--ink);font:inherit;line-height:1.45}.content-field textarea:focus{border-color:var(--primary)}@media(max-width:780px){.content-editor-grid{grid-template-columns:1fr}}


/* FOOD CHOICE LAB · UI patch 1.3.2
   Palette campionata dalla locandina Villaggio Coldiretti fornita dall'utente:
   giallo #FCDB09 · verde #1D8C40 · rosso #B43529 · antracite #241F0E */
:root{
  --villaggio-yellow:#FCDB09;
  --villaggio-green:#1D8C40;
  --villaggio-red:#B43529;
  --villaggio-dark:#241F0E;
}

/* Tipografia più editoriale e meno "app generica" */
.participant-body{
  font-family:Arial, Helvetica, sans-serif;
  color:var(--ink);
}
.participant-body h1,
.participant-body h2,
.participant-body h3,
.participant-body .store-title,
.participant-body .aisle-name,
.participant-body .profile-title{
  font-family:"Arial Narrow","Helvetica Neue",Arial,sans-serif;
  font-weight:800;
  letter-spacing:-.015em;
}
.participant-body h1{font-size:clamp(1.9rem,4.2vw,3.25rem);line-height:1.02;}
.participant-body h2{font-size:clamp(1.38rem,3vw,2rem);line-height:1.12;}
.participant-body .eyebrow{letter-spacing:.08em;font-weight:800;}

/* Superfici più piatte: meno look "AI card" */
.participant-body .screen{border-radius:16px;box-shadow:0 5px 18px rgba(36,31,14,.08);}
.participant-body .panel,
.participant-body .card,
.participant-body .stat-card,
.participant-body .question-card,
.participant-body .basket-card,
.participant-body .compare-card{border-radius:12px;box-shadow:0 2px 8px rgba(36,31,14,.06);}
.participant-body .btn,
.participant-body .btn-secondary,
.participant-body .btn-ghost,
.participant-body .icon-btn{border-radius:7px;box-shadow:none;}
.participant-body .progress{height:7px;border-radius:2px;}
.participant-body .progress span{border-radius:2px;}

/* Richiamo grafico del Villaggio: verde + giallo, senza imitare il logo */
.participant-body .topbar{border-top:5px solid var(--accent);padding-top:10px;}
.participant-body .badge,
.participant-body .mini-pill{border-radius:5px;}
.participant-body .chip.active{background:var(--accent);color:var(--villaggio-dark);border-color:var(--accent);}
.participant-body .product-card-real.selected{border-color:var(--primary);box-shadow:inset 0 0 0 2px var(--primary);}
.participant-body .product-card-real .price-ticket{background:var(--accent);color:var(--villaggio-dark);}

/* Intro al supermercato semplificata: niente card "Restituzione finale / Benchmark" */
.task-intro{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(240px,.55fr);gap:14px;align-items:stretch;}
.task-intro-main{display:flex;flex-direction:column;}
.task-brief{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin:16px 0 0;}
.task-brief>div{padding:14px 14px 13px;border-right:1px solid var(--line);}
.task-brief>div:last-child{border-right:0;}
.task-brief strong{display:block;font-family:"Arial Narrow","Helvetica Neue",Arial,sans-serif;font-size:1.7rem;line-height:1;color:var(--primary);font-weight:800;}
.task-brief span{display:block;margin-top:5px;color:var(--muted);font-size:.78rem;line-height:1.25;text-transform:uppercase;letter-spacing:.045em;font-weight:700;}
.task-method-note{display:grid;grid-template-columns:auto 1fr;gap:10px;align-items:start;margin-top:14px;padding:11px 12px;background:#fff;border-left:5px solid var(--accent);}
.task-method-note strong{font-size:.82rem;color:var(--primary);text-transform:uppercase;letter-spacing:.05em;}
.task-method-note span{font-size:.88rem;line-height:1.4;color:var(--muted);}
.task-instruction{background:var(--accent);color:var(--villaggio-dark);border:1px solid rgba(36,31,14,.15);padding:18px;border-radius:12px;}
.task-instruction-label{display:inline-block;font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em;border-bottom:2px solid var(--primary);margin-bottom:13px;padding-bottom:3px;}
.task-instruction h3{font-size:1.18rem;line-height:1.15;margin-bottom:10px;color:var(--villaggio-dark);}
.task-instruction p{color:rgba(36,31,14,.82);font-size:.92rem;line-height:1.48;}
.task-tip{margin-top:16px;padding-top:12px;border-top:1px solid rgba(36,31,14,.22);font-size:.82rem;font-weight:800;}

/* Confronto e schermata finale più compatti */
.benchmark-position-card{border-radius:12px;padding:15px;box-shadow:none;}
.benchmark-position-card>strong{font-size:1.75rem;}
.benchmark-position-card>span{font-size:.66rem;letter-spacing:.07em;line-height:1.25;}
.compare-card{border-radius:12px!important;box-shadow:none!important;}
.profile-panel{border-radius:12px;box-shadow:none;padding:17px;}
.profile-title{font-size:1.25rem;letter-spacing:0;}
.final-grid .stat-card{padding:13px 14px;}
.final-grid .stat-label{font-size:.68rem;letter-spacing:.045em;}
.final-grid .stat-value{font-size:1.7rem;}

@media(max-width:720px){
  .task-intro{grid-template-columns:1fr;}
  .task-brief{grid-template-columns:repeat(3,1fr);}
  .task-brief>div{padding:11px 8px;}
  .task-brief strong{font-size:1.45rem;}
  .task-brief span{font-size:.66rem;letter-spacing:.02em;}
  .task-method-note{grid-template-columns:1fr;gap:4px;}
  .task-instruction{padding:15px;}
  .participant-body .screen{padding:16px 13px;border-radius:10px;}
  .benchmark-position-card>strong{font-size:1.55rem;}
}
