/* Design system IÈUMÌ (token da MastrAIx/SIMULÌ): Nunito Sans, blu #2563eb, pannelli arrotondati. */
@font-face{font-family:"Nunito Sans";font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/NunitoSans-Regular.ttf') format('truetype');}
@font-face{font-family:"Nunito Sans";font-style:normal;font-weight:600;font-display:swap;src:url('/fonts/NunitoSans-SemiBold.ttf') format('truetype');}
@font-face{font-family:"Nunito Sans";font-style:normal;font-weight:700;font-display:swap;src:url('/fonts/NunitoSans-Bold.ttf') format('truetype');}
@font-face{font-family:"Nunito Sans";font-style:normal;font-weight:800;font-display:swap;src:url('/fonts/NunitoSans-ExtraBold.ttf') format('truetype');}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
:root{
  --blue:#2563eb;--blue-h:#1d4ed8;--blue-soft:#eff6ff;--blue-tint:#f8fbff;
  --ink:#334155;--mist:#f8fafc;--border:#e2e8f0;
  --muted:#64748b;--muted2:#475569;--bg:#f1f5f9;
  --green:#10b981;--amber:#f59e0b;--red:#ef4444;
}
html,body{font-family:"Nunito Sans","Segoe UI",sans-serif;font-size:14px;line-height:1.5;background:var(--mist);color:var(--ink);}
a{color:var(--blue);}
.mono{font-family:ui-monospace,"JetBrains Mono",monospace;font-size:11px;word-break:break-all;}

/* Topbar */
.topbar{height:72px;background:#fff;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 32px;}
.topbar-logo img{height:44px;width:auto;display:block;}
.lpill{position:relative;display:flex;align-items:center;gap:8px;padding:6px 12px;border-radius:999px;border:1px solid var(--border);background:#fff;font-size:13px;font-weight:700;color:var(--ink);cursor:pointer;user-select:none;}
.lpill:hover{border-color:var(--blue);color:var(--blue);}
.lpill svg{width:18px;height:18px;border-radius:50%;flex-shrink:0;}
.ldd{display:none;position:absolute;top:calc(100% + 8px);right:0;background:#fff;border:1px solid var(--border);border-radius:14px;box-shadow:0 10px 24px rgba(15,23,42,.12);min-width:150px;overflow:hidden;z-index:50;}
.lpill.open .ldd{display:block;}
.lopt{display:flex;align-items:center;gap:8px;padding:10px 14px;font-size:14px;font-weight:600;cursor:pointer;color:var(--ink);}
.lopt:hover{background:var(--blue-soft);color:var(--blue);}
.lopt svg.flag{width:18px;height:18px;border-radius:50%;flex-shrink:0;}

/* Struttura */
.wrap{max-width:1120px;margin:0 auto;padding:32px 16px 96px;}
.pfooter{position:fixed;bottom:0;left:0;right:0;text-align:center;padding:8px;font-size:11px;color:var(--muted);background:var(--mist);border-top:1px solid var(--border);}

/* Landing: il pannello d'accesso sta al centro dello schermo */
.wrap-center{min-height:calc(100vh - 72px);display:flex;align-items:center;justify-content:center;padding-top:16px;padding-bottom:72px;}
.wrap-center .shell{width:100%;}

/* Pannello grande (schermata d'accesso) */
.shell{background:#fff;border:1px solid var(--border);border-radius:28px;box-shadow:0 20px 50px rgba(15,23,42,.06);overflow:hidden;}
.shell-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:28px 32px;border-bottom:1px solid var(--border);flex-wrap:wrap;}
.shell-head h1{font-size:26px;font-weight:800;letter-spacing:-.01em;color:#1e293b;}
.shell-head p{margin-top:4px;font-size:14px;color:var(--muted);}
.pill{display:inline-flex;align-items:center;padding:10px 18px;border-radius:999px;background:var(--blue-soft);color:var(--blue);font-weight:800;font-size:14px;white-space:nowrap;}
.shell-body{display:grid;grid-template-columns:1fr 1fr;}
.shell-side{background:var(--blue-tint);padding:36px 32px;border-right:1px solid var(--border);}
.shell-main{padding:36px 32px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;}
.iconbox{width:76px;height:76px;border-radius:22px;background:#fff;box-shadow:0 8px 22px rgba(37,99,235,.10);display:flex;align-items:center;justify-content:center;margin-bottom:24px;}
.iconbox svg{width:38px;height:38px;stroke:var(--blue);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
.shell-side h2{font-size:19px;font-weight:800;color:#1e293b;margin-bottom:10px;}
.shell-side p{font-size:14px;color:var(--muted);margin-bottom:22px;}
.steps{list-style:none;display:flex;flex-direction:column;gap:14px;}
.steps li{display:flex;align-items:center;gap:12px;font-size:14px;font-weight:600;color:var(--ink);}
.steps .n{width:28px;height:28px;border-radius:50%;background:var(--blue);color:#fff;font-size:12px;font-weight:800;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.shell-main h2{font-size:26px;font-weight:800;color:#1e293b;margin-bottom:10px;}
.shell-main p{font-size:14px;color:var(--muted);max-width:380px;margin-bottom:24px;}
.shell-main form{width:100%;max-width:360px;}
.code-input{width:100%;height:60px;border:1px solid var(--border);border-radius:22px;padding:0 20px;font:inherit;font-size:18px;font-weight:700;text-align:center;letter-spacing:.08em;outline:none;background:#fff;}
.code-input:focus{border-color:var(--blue);box-shadow:0 0 0 4px rgba(37,99,235,.12);}
.err{color:var(--red);font-size:13px;font-weight:600;margin-top:10px;}
@media (max-width:820px){.shell-body{grid-template-columns:1fr;}.shell-main{order:-1;}.shell-side{border-right:0;border-bottom:1px solid var(--border);}}

/* Sezioni */
.section-title{text-align:center;font-size:24px;font-weight:800;color:#1e293b;margin:48px 0 4px;letter-spacing:-.01em;}
.eyebrow{text-align:center;font-size:11px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:var(--blue);margin-top:48px;}
.eyebrow + .section-title{margin-top:4px;}
.section-text{max-width:680px;margin:10px auto 0;text-align:center;font-size:14px;color:var(--muted);}
.flow{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-top:24px;}
.flow-card{background:#fff;border:1px solid var(--border);border-radius:22px;box-shadow:0 2px 8px rgba(15,23,42,.04);padding:20px 20px 24px;text-align:center;}
.flow-card .step{font-size:11px;font-weight:800;letter-spacing:.14em;color:var(--blue);text-transform:uppercase;margin-bottom:12px;}
.flow-card svg{width:100%;height:auto;max-height:190px;display:block;margin:0 auto 14px;}
.flow-card b{display:block;font-size:16px;font-weight:800;color:#1e293b;}
.flow-card > span{display:block;font-size:13px;color:var(--muted);margin-top:4px;}
.flow-note{text-align:center;font-size:14px;color:var(--muted);margin-top:18px;}
@media (max-width:820px){.flow{grid-template-columns:1fr;}}
.norms{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin-top:24px;}
.norm{padding:16px 18px;}
.norm b{display:block;font-size:14px;font-weight:800;color:var(--blue);margin-bottom:4px;}
.norm span{font-size:13px;color:var(--muted);}

/* SVG illustrazioni */
.il-card{fill:#fff;stroke:var(--border);}
.il-soft{fill:var(--blue-soft);stroke:var(--border);}
.il-line{fill:var(--border);}
.il-blue{fill:var(--blue);}
.il-blue-o{fill:none;stroke:var(--blue);stroke-width:1.8;}
.il-stroke{stroke:var(--blue);stroke-width:1.8;fill:none;}
.il-dash{stroke:var(--blue);stroke-width:1.6;stroke-dasharray:4 4;fill:none;}
.il-ink{fill:#334155;}
.il-tint{fill:#dbeafe;stroke:var(--blue);}
.il-txt{font-family:"Nunito Sans",sans-serif;font-size:11px;font-weight:800;fill:var(--blue);}

/* Hero (wizard) */
.hero{text-align:center;padding:28px 0 20px;}
.hero h1{font-size:28px;font-weight:800;color:#1e293b;margin-bottom:8px;letter-spacing:-.01em;}
.hero p{color:var(--muted);font-size:15px;}

/* Card e componenti (usati da wizard e risultato) */
.card{background:#fff;border:1px solid var(--border);border-radius:22px;box-shadow:0 2px 8px rgba(15,23,42,.04);margin-bottom:16px;overflow-wrap:anywhere;}
.btn{border:none;border-radius:14px;font:inherit;font-size:14px;font-weight:800;cursor:pointer;padding:10px 18px;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;transition:all .2s;}
.btn:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(37,99,235,.35);}
.btn-primary{background:var(--blue);color:#fff;box-shadow:0 10px 24px rgba(37,99,235,.20);}
.btn-primary:hover{background:var(--blue-h);}
.btn-outline{background:#fff;color:var(--ink);border:1px solid var(--border);}
.btn-outline:hover{border-color:var(--blue);color:var(--blue);}
.btn-sm{padding:5px 12px;font-size:12px;border-radius:10px;}
.overlay{display:none;position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:400;align-items:center;justify-content:center;}
.overlay.open{display:flex;}
.modal{background:#fff;border-radius:24px;padding:24px;max-width:480px;width:94%;border:1px solid var(--border);box-shadow:0 20px 50px rgba(15,23,42,.25);}
.modal-title{font-size:18px;font-weight:800;color:#1e293b;margin-bottom:14px;}
.fg{margin-bottom:14px;}
.flbl{font-size:12px;font-weight:800;color:var(--muted2);margin-bottom:6px;display:block;}
.finp{width:100%;padding:11px 14px;border:1px solid var(--border);border-radius:14px;font:inherit;font-size:14px;outline:none;background:#fff;}
.finp:focus{border-color:var(--blue);box-shadow:0 0 0 4px rgba(37,99,235,.12);}
.badge{display:inline-flex;padding:4px 14px;border-radius:999px;font-size:12px;font-weight:800;}
.b-sealed{color:var(--blue);background:var(--blue-soft);}
.b-certified{color:#047857;background:#ecfdf5;}
.tbl{width:100%;border-collapse:collapse;}
.tbl td{padding:11px 4px;font-size:14px;border-bottom:1px solid #f1f5f9;vertical-align:top;}
.tbl tr:last-child td{border-bottom:0;}
.tbl td:first-child{color:var(--muted);font-weight:700;}
.toast{display:none;position:fixed;bottom:56px;left:50%;transform:translateX(-50%);background:#1e293b;color:#fff;padding:10px 20px;border-radius:14px;font-weight:700;z-index:600;}
.steps.roomy{gap:18px;}
.steps.roomy li{align-items:flex-start;}
.steps.roomy .n{width:32px;height:32px;font-size:14px;margin-top:1px;}
.steps b{display:block;font-size:15px;font-weight:800;color:#1e293b;}
.steps small{display:block;font-size:13px;font-weight:600;color:var(--muted);}
.hint{margin-top:6px;font-size:12px;color:var(--muted);}

/* Wizard: pannelli, righe dinamiche, chip */
.panel{padding:20px 24px;}
.ptitle{font-size:18px;font-weight:800;margin-bottom:6px;color:#1e293b;}
.psub{font-size:13px;color:var(--muted);margin-bottom:20px;}
.panel > .ptitle:not(:first-child){margin-top:0;}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.grid3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;}
@media (max-width:560px){.grid2,.grid3{grid-template-columns:1fr;}}
.sect{display:flex;align-items:center;justify-content:space-between;margin:22px 0 8px;padding-top:16px;border-top:1px solid var(--border);font-size:15px;font-weight:800;color:#1e293b;}
.sum{font-size:12px;font-weight:800;padding:3px 10px;border-radius:999px;}
.sum.ok{color:#047857;background:#ecfdf5;}
.sum.ko{color:#b45309;background:#fffbeb;}
.rows{display:flex;flex-direction:column;gap:8px;margin-bottom:10px;}
.row{display:grid;gap:8px;align-items:center;}
.row-comp{grid-template-columns:2fr 1fr 1fr auto;}
.row-cert{grid-template-columns:1.4fr 1.2fr 1.2fr auto;}
.row-extra{grid-template-columns:1fr 1fr auto;}
@media (max-width:560px){.row-comp,.row-cert{grid-template-columns:1fr 1fr auto;}.row-comp input:first-child,.row-cert input:first-child{grid-column:1 / -1;}}
.row .finp{padding:9px 12px;}
.rm{border:none;background:#f1f5f9;color:var(--muted2);width:32px;height:32px;border-radius:10px;cursor:pointer;font-size:13px;}
.rm:hover{background:#fee2e2;color:var(--red);}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0;}
.chip{border:1px solid var(--border);background:#fff;color:var(--ink);border-radius:999px;padding:8px 16px;font:inherit;font-size:13px;font-weight:700;cursor:pointer;transition:all .15s;}
.chip:hover{border-color:var(--blue);color:var(--blue);}
.chip-blank{background:#e0f2fe;border-color:#7dd3fc;color:#0369a1;}
.chip-blank:hover{background:#bae6fd;border-color:#0ea5e9;color:#0369a1;}
.chip.on{background:var(--blue);border-color:var(--blue);color:#fff;box-shadow:0 6px 16px rgba(37,99,235,.22);}
.more{margin-top:18px;border-top:1px solid var(--border);padding-top:14px;}
.more summary{cursor:pointer;font-weight:800;font-size:14px;color:var(--ink);}

/* Progress della creazione */
.prog{display:flex;align-items:center;gap:10px;padding:8px 0;font-size:13px;color:var(--muted);}
.prog .dot{width:22px;height:22px;border-radius:50%;background:#e5e7eb;color:#9ca3af;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;}
.prog.run{color:var(--blue);} .prog.run .dot{background:var(--blue);color:#fff;}
.prog.ok{color:var(--green);} .prog.ok .dot{background:var(--green);color:#fff;}
.prog.ko{color:var(--red);} .prog.ko .dot{background:var(--red);color:#fff;}
html[data-lang-fixed] #lpill{display:none;}
