/* ============================================================
   Tema Welcomly — palette sabbia/terracotta.
   Condiviso da login e dashboard per coerenza visiva.
   Nessuna dipendenza esterna (font di sistema).
   ============================================================ */

:root {
  --sabbia: #f3ece2;
  --sabbia-scura: #ece2d4;
  --card: #ffffff;
  --bordo: #ece3d5;
  --terracotta: #b06a43;
  --terracotta-scura: #9c5c38;
  --testo: #2f2a25;
  --muto: #8c8177;
  --verde: #5f9e6e;
  --badge-bg: #efe1d2;
  --badge-testo: #a06a45;
  --ombra: 0 6px 24px rgba(60, 45, 30, 0.06);
  --raggio: 18px;
  /* Font ufficiali del brand Welcomly */
  --font-ui: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;   /* titoli, UI, logo */
  --font-body: "Mulish", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; /* testo */
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;       /* accenti display */
  --font-script: "Sacramento", "Cormorant Garamond", cursive;                    /* corsivo accento */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--testo);
  background: linear-gradient(180deg, #f6f0e8 0%, var(--sabbia) 40%, #efe6d9 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Titoli e UI in Jost */
h1, h2, h3, .logo, .btn, .tab, .badge, .sezione-titolo,
.avanz-top .perc, .avanz-top .titolo, .ordine-pill, .campo label {
  font-family: var(--font-ui);
}

/* Accento display (nome cliente): Cormorant Garamond corsivo */
.corsivo { font-family: var(--font-display); font-style: italic; color: var(--terracotta); font-weight: 600; }
/* Accento script (tagline): Sacramento */
.script { font-family: var(--font-script); font-style: normal; color: var(--terracotta); font-weight: 400; }

a { color: var(--terracotta); }

/* ---- Bottoni ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: 999px;
  background: var(--terracotta);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 0.7rem 1.4rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
  text-decoration: none;
}
.btn:hover { background: var(--terracotta-scura); }
.btn:active { transform: translateY(1px); }
.btn.ghost {
  background: transparent;
  color: var(--testo);
  border: 1px solid var(--bordo);
  padding: 0.4rem 1rem;
  font-weight: 500;
}
.btn.ghost:hover { background: #fff; }

/* ---- Barra superiore ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid var(--bordo);
}
.logo { font-weight: 500; font-size: 1.35rem; letter-spacing: -0.01em; color: #1e1b18; }
.logo span { color: var(--terracotta); }
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.topbar-email { color: var(--muto); font-size: 0.9rem; }

/* ---- Contenitore ---- */
.wrap { max-width: 60rem; margin: 0 auto; padding: 2.2rem 1.25rem 4rem; }

/* ---- Intestazione dashboard ---- */
.intestazione { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.intestazione h1 { font-size: 2rem; margin: 0 0 0.4rem; font-weight: 700; letter-spacing: -0.01em; }
.intestazione p { margin: 0; color: var(--muto); }
.ordine-pill {
  background: #fff;
  border: 1px solid var(--bordo);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  white-space: nowrap;
}
.ordine-pill .label { color: var(--muto); margin-right: 0.4rem; }
.ordine-pill .num { font-weight: 700; }

/* ---- Tab ---- */
.tabs { display: flex; gap: 1.75rem; border-bottom: 1px solid var(--bordo); margin: 1.75rem 0 1.5rem; }
.tab {
  background: none; border: none; font: inherit; cursor: pointer;
  color: var(--muto); padding: 0 0 0.75rem; position: relative; font-weight: 500;
}
.tab.attiva { color: var(--testo); }
.tab.attiva::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--terracotta); border-radius: 2px;
}

/* ---- Card generica ---- */
.card {
  background: var(--card);
  border: 1px solid var(--bordo);
  border-radius: var(--raggio);
  box-shadow: var(--ombra);
  padding: 1.5rem;
  margin-bottom: 1.1rem;
}

/* ---- Badge ---- */
.badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--badge-bg); color: var(--badge-testo);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.3rem 0.7rem; border-radius: 999px;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Chip "Guida 1 di 3" — distingue N schede dello stesso tipo */
.chip-num { display: inline-block; margin-left: 0.4rem; font-family: var(--font-ui); font-size: 0.72rem;
  font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #7a5a37;
  background: #ede2d2; border-radius: 999px; padding: 0.25rem 0.6rem; vertical-align: middle; }

/* ---- Barra avanzamento ---- */
.avanz-top { display: flex; align-items: center; justify-content: space-between; }
.avanz-top .titolo { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muto); }
.avanz-top .perc { font-size: 1.5rem; font-weight: 700; color: var(--terracotta); }
.barra { position: relative; height: 10px; border-radius: 999px; background: var(--sabbia-scura); margin: 1rem 0 0.6rem; }
.barra .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, #c98a5f, var(--terracotta)); transition: width 0.4s ease; }
.barra .thumb {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 26px; height: 20px; border-radius: 6px; background: var(--terracotta);
  display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.barra .flag { position: absolute; right: -2px; top: 50%; transform: translateY(-50%); color: #b8ab97; }
.avanz-labels { display: flex; justify-content: space-between; font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muto); }
.avanz-labels span:nth-child(2) { text-align: center; }
.avanz-labels span:last-child { text-align: right; }

/* ---- Lista passi ---- */
.passi { list-style: none; margin: 1.2rem 0 1.4rem; padding: 0; }
.passi li { display: flex; gap: 0.8rem; margin-bottom: 1rem; }
.passi .cerchio {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700;
  background: var(--sabbia-scura); color: var(--muto);
}
.passi li.fatto .cerchio { background: var(--verde); color: #fff; }
.passi li.corrente .cerchio { background: var(--terracotta); color: #fff; }
.passi .testo strong { display: block; font-size: 0.95rem; }
.passi .testo span { color: var(--muto); font-size: 0.88rem; }

/* ---- Nota lingue ---- */
.nota { display: flex; align-items: center; gap: 0.7rem; }
.nota .globo { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #4aa3a0, #2e7d7a); flex: 0 0 auto; }
.nota p { margin: 0; color: var(--muto); font-size: 0.92rem; }

/* ---- QR ---- */
.qr-box { display: flex; align-items: center; gap: 1rem; margin-top: 0.5rem; flex-wrap: wrap; }
.qr-box canvas { border: 1px solid var(--bordo); border-radius: 10px; background: #fff; }

/* ---- Strumenti guida pronta (cartello, link modifica) ---- */
.strum { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.8rem; }
.strum-item { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap;
  background: #faf6ef; border: 1px solid var(--bordo); border-radius: 12px; padding: 1rem; }
.strum-item > div { flex: 1; min-width: 15rem; }
.strum-item .strum-titolo { display: block; font-weight: 700; margin-bottom: 0.35rem; color: var(--testo); }
.strum-item p { margin: 0; color: var(--muto); font-size: 0.9rem; line-height: 1.5; }
.strum-item p strong { font-weight: 700; color: var(--testo); } /* grassetto INLINE, non spezza */
.strum-item .btn { flex: none; }
.editbox-cli { margin-top: 0.5rem; background: #fff; border: 1px solid var(--bordo); border-radius: 8px;
  padding: 0.5rem 0.7rem; word-break: break-all; font-size: 0.82rem; color: #6b4f93; }

/* ---- Upsell ---- */
.sezione-titolo { margin: 2.2rem 0 0.35rem; font-size: 1.3rem; font-weight: 600; }
.sezione-titolo .script { font-size: 1.7rem; margin-left: 0.5rem; line-height: 1; }
/* Sottotitolo di sezione: dice in una riga la differenza tra "Espandi"
   (rifai quello che hai già) e "Scopri anche" (prodotti nuovi). Senza,
   le due griglie si leggerebbero come la stessa cosa ripetuta. */
.sezione-sub { margin: 0 0 1rem; color: var(--muto); font-size: 0.88rem; }
.upsell-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.upsell { background: var(--card); border: 1px solid var(--bordo); border-radius: var(--raggio); overflow: hidden; box-shadow: var(--ombra); display: flex; flex-direction: column; }
/* Slot immagine delle card upsell.
   aspect-ratio invece di un'altezza fissa: lo spazio è PRENOTATO prima che
   l'immagine arrivi (niente salti di layout) e su mobile si adatta da solo.
   16/9 = le stesse proporzioni delle foto, quindi nessun ritaglio.
   Lo sfondo caldo resta sotto: se una foto non carica, si vede quello (o
   l'illustrazione di riserva), mai un riquadro rotto. */
.upsell .immagine {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #efe3d4, #e7d4c1);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.upsell .immagine > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block; border: 0;
}
/* Illustrazione/emoji di riserva: sta sotto la foto, si vede solo se manca. */
.upsell .immagine .ill-riserva { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.upsell .corpo { padding: 1.2rem; display: flex; flex-direction: column; gap: 0.6rem; }
.upsell h3 { margin: 0.2rem 0 0; font-size: 1.1rem; }
.upsell p { margin: 0; color: var(--muto); font-size: 0.9rem; line-height: 1.45; }
.upsell .btn { align-self: flex-start; margin-top: 0.4rem; }

/* Variante compatta — sezione "Espandi" (aggiungi un'altra guida / un altro
   sito). Niente foto: riquadro icona a sinistra e testo a destra. La forma
   diversa è ciò che impedisce alle card "rifai quello che hai" e a quelle
   cross-sell "scopri cosa non hai" di sembrare in competizione. */
.upsell.compatta { flex-direction: row; align-items: stretch; }
.upsell.compatta .icona {
  flex: none; width: 5.5rem;
  background: linear-gradient(160deg, #f6ece0, #ecdbc7);
  border-right: 1px solid var(--bordo);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem; line-height: 1;
}
.upsell.compatta .corpo { padding: 1.05rem 1.15rem; }
.upsell.compatta h3 { font-size: 1rem; }
.upsell.compatta p { font-size: 0.85rem; }

/* Illustrazioni semplici per le card upsell */
.mini-sito { width: 78%; height: 74%; background: #fff; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); padding: 10px; }
.mini-sito .barra-top { display: flex; gap: 4px; margin-bottom: 8px; }
.mini-sito .barra-top i { width: 6px; height: 6px; border-radius: 50%; background: #d9c4ad; }
.mini-sito .riga { height: 8px; border-radius: 4px; background: #e6d3bf; margin-bottom: 6px; }
.mini-sito .riga.corta { width: 55%; }
.mini-quadri { display: flex; gap: 8px; }
.mini-quadri span { width: 46px; height: 56px; border: 3px solid #2f2a25; border-radius: 3px; background: linear-gradient(135deg, #c98a5f, #8a5a3a); }
.mini-quadri span:last-child { background: linear-gradient(135deg, #7fae82, #4f8a5f); transform: rotate(-4px); }

/* ---- Upsell illimitati (tab Aggiornamenti) ---- */
.agg-box { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; background: linear-gradient(180deg, #fbf6ef, #fff); }
.agg-box .prezzo { text-align: right; }
.agg-box .prezzo .cifra { font-size: 2.4rem; font-weight: 800; color: var(--terracotta); line-height: 1; }
.agg-box .prezzo .sotto { color: var(--muto); font-size: 0.85rem; }
.checklist { list-style: none; padding: 0; margin: 1rem 0; }
.checklist li { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; color: #4a443c; }
.checklist li::before { content: "✓"; color: var(--terracotta); font-weight: 700; }
.usati { margin-top: 1rem; }
.usati .etichetta { font-size: 0.85rem; color: var(--muto); }
.usati .barra { height: 8px; margin-top: 0.4rem; }

/* ---- Recensione ---- */
.recensione { text-align: center; padding: 2.5rem 1.5rem; }
.stelle { color: var(--terracotta); font-size: 1.5rem; letter-spacing: 0.2rem; }
.recensione h2 { margin: 0.6rem 0 0.5rem; }
.recensione p { color: var(--muto); max-width: 26rem; margin: 0 auto 1.4rem; }

/* ---- Login ---- */
.login-wrap { max-width: 26rem; margin: 6vh auto 0; padding: 0 1.25rem; }
.login-card { text-align: center; }
.login-card .logo { display: inline-block; margin-bottom: 1rem; font-size: 1.5rem; }
.login-card h1 { font-size: 1.5rem; margin: 0.2rem 0 0.4rem; }
.login-card p.intro { color: var(--muto); margin: 0 0 1.5rem; }
.campo { text-align: left; margin-bottom: 1rem; }
.campo label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.35rem; }
.campo input {
  width: 100%; padding: 0.75rem 0.9rem; border: 1px solid var(--bordo); border-radius: 12px;
  font: inherit; background: #fdfbf8;
}
.campo input:focus { outline: 2px solid var(--terracotta); outline-offset: 1px; border-color: transparent; }
.login-card .btn { width: 100%; margin-top: 0.5rem; }
.msg { min-height: 1.3rem; margin-top: 0.8rem; color: #b0473f; font-size: 0.9rem; }
.msg.ok { color: var(--verde); }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .intestazione h1 { font-size: 1.6rem; }
  .tabs { gap: 1.1rem; overflow-x: auto; }
  .upsell-grid { grid-template-columns: 1fr; }
  .upsell.compatta .icona { width: 4.25rem; font-size: 1.6rem; }
  .agg-box .prezzo { text-align: left; }
  .wrap { padding-top: 1.5rem; }
  .topbar { padding: 0.8rem 1rem; }
  .topbar-email { display: none; }
}

.hidden { display: none !important; }
