/* iFixx — stile del sito e dell'area admin */
html, body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
/* Layout: Apple-store rhythm — alternating white/grey bands, centered 1080px column, big tight headlines, sticky configurator summary. Light only, like apple.com. */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --card: #ffffff;
  --fg: #1d1d1f;
  --fg-2: #6e6e73;
  --line: #d2d2d7;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-fg: #ffffff;
  --accent-soft: rgba(0, 113, 227, 0.08);
  --ok: #1a8f3c;
  --warn: #b25e09;
  --danger: #d70015;
  --glass: rgba(255, 255, 255, 0.78);
  --phone-frame: #2c2c2e;
  --screen-a: #0b2440;
  --screen-b: #050608;
  --screen-glow: #2f8cff;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r-lg: 22px;
  --r-md: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 17px; line-height: 1.47; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }

.wrap { max-width: 1080px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.band { padding-block: clamp(64px, 10vw, 112px); }
.alt { background: var(--bg-alt); }

/* Nav */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 24px; height: 52px; }
.logo { font-weight: 700; font-size: 21px; letter-spacing: -0.03em; color: var(--fg); }
.logo span { color: var(--accent); }
.logo:hover { text-decoration: none; }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 13px; }
.nav-links a { color: var(--fg); opacity: .82; }
.nav-links a:hover { opacity: 1; text-decoration: none; }
@media (max-width: 640px) { .nav-links .hide-sm { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 980px; padding: 12px 22px; font-size: 17px; font-weight: 500; cursor: pointer; background: var(--accent); color: var(--accent-fg); transition: background .2s; }
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--accent); padding-inline: 4px; }
.btn.ghost:hover { text-decoration: underline; background: transparent; }
.btn.block { width: 100%; }
.btn.sm { padding: 6px 14px; font-size: 14px; }
.btn.line { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
.btn.line:hover { box-shadow: inset 0 0 0 1px var(--fg-2); }
.btn.danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1px var(--line); }
.btn.danger.armed { background: var(--danger); color: var(--accent-fg); box-shadow: none; }

/* Hero */
.hero { padding-top: clamp(48px, 8vw, 96px); padding-bottom: 0; text-align: center; overflow: hidden; }
.eyebrow { font-size: 19px; font-weight: 600; color: var(--accent); margin-bottom: 10px; }
.hero h1 { font-size: clamp(44px, 8.4vw, 92px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 700; }
.hero h1 .soft { color: var(--fg-2); }
.hero .lede { font-size: clamp(19px, 2.4vw, 24px); line-height: 1.35; color: var(--fg-2); max-width: 34ch; margin: 20px auto 0; letter-spacing: -0.015em; }
.hero-cta { display: flex; gap: 20px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 28px; }
.stage { position: relative; margin-top: 56px; height: clamp(300px, 46vw, 470px); display: flex; justify-content: center; align-items: flex-start; }
.stage svg { height: 118%; width: auto; max-width: 100%; }
.crack { stroke: rgba(255,255,255,.85); stroke-width: 1.4; fill: none; stroke-linecap: round; animation: heal 1.4s ease-in .9s forwards; }
.shards { animation: heal 1.4s ease-in .9s forwards; }
.healed { opacity: 0; animation: reveal .9s ease-out 2.1s forwards; }
@keyframes heal { to { opacity: 0; } }
@keyframes reveal { to { opacity: 1; } }

/* Repair tiles */
.head { max-width: 680px; margin-bottom: 44px; }
.head h2, h2.big { font-size: clamp(34px, 5.2vw, 56px); line-height: 1.07; letter-spacing: -0.03em; font-weight: 700; }
.head p { color: var(--fg-2); font-size: 19px; margin-top: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.tile { background: var(--card); border-radius: var(--r-lg); padding: 28px; display: flex; flex-direction: column; gap: 10px; min-height: 210px; }
.tile svg { width: 40px; height: 40px; color: var(--accent); }
.tile h3 { font-size: 24px; letter-spacing: -0.02em; font-weight: 600; margin-top: 6px; }
.tile p { color: var(--fg-2); font-size: 15px; }
.tile .from { margin-top: auto; font-size: 15px; color: var(--fg); }
.tile .from b { font-weight: 600; }

/* Steps */
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin: 0; padding: 0; }
@media (max-width: 860px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .flow { grid-template-columns: 1fr; } }
.flow li { list-style: none; border-top: 1px solid var(--line); padding-top: 18px; }
.flow .n { font-size: 15px; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.flow h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin: 6px 0 8px; }
.flow p { color: var(--fg-2); font-size: 15px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 64px; }
@media (max-width: 700px) { .facts { grid-template-columns: 1fr; } }
.fact { text-align: center; padding: 28px 16px; border-radius: var(--r-lg); background: var(--bg-alt); }
.fact b { display: block; font-size: clamp(40px, 5vw, 56px); letter-spacing: -0.04em; line-height: 1; font-weight: 700; }
.fact span { color: var(--fg-2); font-size: 15px; display: block; margin-top: 8px; }

/* Configurator */
.cfg { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
@media (max-width: 900px) { .cfg { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.steps { display: flex; flex-direction: column; gap: 44px; min-width: 0; }
.step h3 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 4px; }
.step .hint { color: var(--fg-2); font-size: 15px; margin-bottom: 16px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.opt { position: relative; display: flex; flex-direction: column; gap: 2px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; cursor: pointer; transition: border-color .15s, box-shadow .15s; min-width: 0; }
.opt:hover:not(:disabled) { border-color: var(--fg-2); }
.opt[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.opt:disabled { cursor: not-allowed; background: var(--bg-alt); border-style: dashed; }
.opt:disabled .t, .opt:disabled .p { color: var(--fg-2); }
.opt .t { font-weight: 600; font-size: 17px; }
.opt .d { color: var(--fg-2); font-size: 13px; line-height: 1.35; }
.opt .p { font-size: 15px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.opt.center { align-items: center; text-align: center; padding: 18px 12px; }
.series { font-size: 13px; color: var(--fg-2); text-transform: uppercase; letter-spacing: .06em; margin: 18px 0 8px; font-weight: 600; }
.series:first-child { margin-top: 0; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13px; color: var(--fg-2); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--card); font-size: 17px; }
.field input:focus, .field select:focus, .field textarea:focus, .ptable input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--fg-2); }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.infobox { background: var(--card); border-radius: var(--r-md); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); }
.infobox b { font-size: 17px; }
.infobox p { color: var(--fg-2); font-size: 15px; }

.summary { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 72px); background: var(--card); border-radius: var(--r-lg); padding: 26px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 900px) { .summary { position: static; } }
.summary .dev { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.lines { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; }
.line { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.line span:first-child { min-width: 0; }
.line .v { font-variant-numeric: tabular-nums; white-space: nowrap; }
.line.minus .v { color: var(--ok); }
.line small { display: block; color: var(--fg-2); font-size: 12px; }
.total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 16px; }
.total b { font-size: 32px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.deposit { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.deposit .line { font-size: 14px; }
.muted { color: var(--fg-2); font-size: 13px; }
.empty { color: var(--fg-2); font-size: 15px; }
.mbar { display: none; }
@media (max-width: 900px) {
  .mbar { display: block; position: sticky; bottom: 0; z-index: 10; background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 1px solid var(--line); margin-top: 32px; }
  .mbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .mbar b { font-size: 21px; font-variant-numeric: tabular-nums; }
}

/* Booking */
.book { max-width: 760px; margin: 0 auto; }
.progress { display: flex; gap: 8px; margin: 24px 0 36px; flex-wrap: wrap; }
.progress span { font-size: 13px; padding: 6px 12px; border-radius: 980px; background: var(--bg-alt); color: var(--fg-2); }
.progress span.on { background: var(--fg); color: var(--bg); }
.progress span.done { color: var(--fg); }
.panel { display: flex; flex-direction: column; gap: 24px; }
.panel h3 { font-size: 28px; letter-spacing: -0.025em; font-weight: 600; }
.mode { padding: 22px; gap: 6px; }
.mode svg { width: 32px; height: 32px; color: var(--accent); margin-bottom: 8px; }
.days { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.days .opt { flex: none; min-width: 92px; align-items: center; text-align: center; padding: 12px; }
.days .opt .t { font-size: 22px; font-variant-numeric: tabular-nums; }
.times { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.times .opt { align-items: center; padding: 12px; font-variant-numeric: tabular-nums; }
.nav-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.err { color: var(--danger); font-size: 14px; min-height: 20px; }
.ok-msg { color: var(--ok); font-size: 14px; min-height: 20px; }
.recap { background: var(--bg-alt); border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.paybtn { background: var(--fg); color: var(--bg); font-weight: 600; }
.paybtn:hover { background: var(--fg); opacity: .88; }
.paybtn i { font-style: italic; font-weight: 800; letter-spacing: -0.02em; }
.note { font-size: 13px; color: var(--fg-2); border-left: 2px solid var(--line); padding-left: 12px; }
.done-box { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.done-box .tick { width: 72px; height: 72px; border-radius: 50%; background: var(--ok); color: var(--bg); display: grid; place-items: center; }
.code { font-family: var(--mono); font-size: 28px; letter-spacing: .06em; padding: 10px 18px; border-radius: 12px; background: var(--bg-alt); }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* FAQ */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { cursor: pointer; font-size: 19px; font-weight: 600; letter-spacing: -0.015em; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 400; font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--fg-2); margin-top: 10px; max-width: 62ch; }

footer { background: var(--bg-alt); border-top: 1px solid var(--line); font-size: 12px; color: var(--fg-2); }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 22px; }
footer a { color: var(--fg-2); }

/* Admin */
.admin-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.seg { display: inline-flex; background: var(--bg-alt); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 16px; border-radius: 8px; font-size: 14px; cursor: pointer; color: var(--fg); }
.seg button[aria-pressed="true"] { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.12); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
@media (max-width: 600px) { .stats { grid-template-columns: 1fr; } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; }
.stat b { display: block; font-size: 30px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--fg-2); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-h .code { font-size: 15px; padding: 4px 10px; border-radius: 8px; }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; font-size: 14px; }
@media (max-width: 720px) { .cols { grid-template-columns: 1fr; } }
.cols h4 { margin: 0 0 4px; font-size: 12px; color: var(--fg-2); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.cols div { min-width: 0; overflow-wrap: anywhere; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 980px; background: var(--bg-alt); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.s-nuovo { color: var(--accent); }
.s-attesa, .s-riparazione { color: var(--warn); }
.s-ricevuto, .s-verificato, .s-pronto, .s-consegnato { color: var(--ok); }
.s-annullato { color: var(--danger); }
.tag { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--bg-alt); color: var(--warn); white-space: nowrap; }
.list { display: flex; flex-direction: column; gap: 12px; }
.slotday { border-top: 1px solid var(--line); padding-top: 14px; }
.slotday h4 { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 12px; font-size: 14px; font-variant-numeric: tabular-nums; background: var(--card); }
.chip.booked { border-color: var(--ok); }
.chip.booked em { font-style: normal; color: var(--ok); font-size: 12px; font-weight: 600; padding-right: 6px; }
.x { border: 0; background: var(--bg-alt); width: 26px; height: 26px; border-radius: 7px; cursor: pointer; color: var(--fg-2); }
.x:hover { color: var(--danger); }
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.form-card h3 { font-size: 19px; }
.form-card .row { align-items: end; }
.banner { background: var(--accent-soft); border-radius: 12px; padding: 12px 16px; font-size: 14px; margin-bottom: 20px; }
.gate { text-align: center; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.mrow { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); }
.mrow > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 18px; flex-wrap: wrap; }
.mrow > summary::-webkit-details-marker { display: none; }
.mrow > summary::after { content: "›"; margin-left: auto; color: var(--fg-2); font-size: 20px; transition: transform .15s; }
.mrow[open] > summary::after { transform: rotate(90deg); }
.mrow > summary b { font-weight: 600; }
.mbody { border-top: 1px solid var(--line); padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.tablewrap { overflow-x: auto; }
.ptable { border-collapse: collapse; width: 100%; min-width: 460px; font-size: 14px; }
.ptable th { text-align: left; font-size: 12px; color: var(--fg-2); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; padding: 0 8px 8px; }
.ptable td { padding: 6px 8px; border-top: 1px solid var(--line); }
.ptable td:first-child { font-weight: 500; white-space: nowrap; }
.ptable input { width: 100%; min-width: 80px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--card); font-variant-numeric: tabular-nums; text-align: right; }
.ptable.no-orig td:last-child input, .ptable.no-orig th:last-child { opacity: .4; }
.groupname { font-size: 13px; color: var(--fg-2); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin: 14px 0 2px; }
