/* =============================================================================
   Clinica Mobile · cm-prenotazioni — NUMERO VERDE (numeroverde.clinicamobile.org)
   Strumento da scrivania per chi sta al telefono: copione a sinistra, campi a
   destra. Estende app.css (token, form, btn, alert). Stile neumorfico, come il
   resto della piattaforma.
   ============================================================================= */
body.nv { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }

/* ===== Barra in alto ===== */
.nv-top {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 22px; margin: 16px 16px 0;
  background: var(--bg); border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}
.nv-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nv-brand:hover { text-decoration: none; }
.nv-brand img { border-radius: 50%; background: #fff; padding: 4px; box-shadow: var(--shadow-sm); }
.nv-brand b { display: block; font-size: 16px; font-weight: 800; color: var(--deep); letter-spacing: -.2px; }
.nv-brand small { font-size: 11.5px; color: var(--muted); }
.nv-top__nav { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nv-top__nav a { font-size: 13px; font-weight: 700; color: var(--brand); text-decoration: none; }
.nv-op {
  font-size: 12.5px; font-weight: 700; color: var(--deep);
  padding: 7px 14px; border-radius: 20px; background: var(--bg); box-shadow: var(--inset);
}
.nv-esci { border: none; background: none; color: var(--muted); font-size: 13px; cursor: pointer; padding: 6px; }
.nv-esci:hover { color: var(--error); }

.nv-main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 18px 16px 30px; }
.nv-foot { padding: 0 16px 22px; text-align: center; font-size: 11.5px; color: var(--muted); }

/* ===== Card ===== */
.nv-card {
  background: var(--bg); border-radius: var(--r-lg); padding: 24px 26px; margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.nv-card--stretta { max-width: 430px; margin: 40px auto; }
.nv-card h1 { font-size: 21px; font-weight: 800; color: var(--deep); margin: 0 0 6px; letter-spacing: -.3px; }
.nv-card h2 { font-size: 15px; font-weight: 800; color: var(--deep); margin: 22px 0 10px; }
.nv-riga { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.nv-hint { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

.btn--sm { padding: 9px 16px; font-size: 13px; }

/* ===== Accesso col PIN ===== */
.nv-pin-form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.nv-pin-form label { font-size: 12px; font-weight: 700; color: var(--deep); }
.nv-pin-form input {
  font-size: 26px; letter-spacing: .5em; text-align: center; padding: 14px;
}

/* ===== Le due selezioni ===== */
.nv-step {
  font-size: 12px !important; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted) !important; font-weight: 700 !important;
}
.nv-scelte, .nv-eventi { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.nv-scelta { display: block; cursor: pointer; }
.nv-scelta input { position: absolute; opacity: 0; width: 0; height: 0; }
.nv-scelta__box {
  display: block; padding: 16px 18px; border-radius: var(--r-md); background: var(--bg);
  box-shadow: var(--shadow-sm); transition: box-shadow .18s, transform .18s;
}
.nv-scelta__box b { display: block; font-size: 14.5px; font-weight: 800; color: var(--deep); margin-bottom: 4px; }
.nv-scelta__box small { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.nv-scelta:hover .nv-scelta__box { transform: translateY(-2px); }
.nv-scelta input:checked + .nv-scelta__box { box-shadow: var(--inset); }
.nv-scelta input:checked + .nv-scelta__box b { color: var(--brand); }
.nv-scelta input:focus-visible + .nv-scelta__box { box-shadow: var(--shadow-sm), 0 0 0 3px rgba(236,64,122,.4); }
.nv-avvia { margin-top: 22px; }

/* ===== Elenchi brevi ===== */
.nv-lista { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.nv-lista a {
  display: block; padding: 13px 16px; border-radius: var(--r-sm); background: var(--bg);
  box-shadow: var(--shadow-sm); text-decoration: none;
}
.nv-lista a:hover { text-decoration: none; transform: translateY(-1px); }
.nv-lista b { display: block; font-size: 14px; color: var(--deep); }
.nv-lista small { font-size: 12px; color: var(--muted); }

/* ===== Scheda: intestazione, fasi, due colonne ===== */
.nv-scheda__top {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 22px; background: var(--bg); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.nv-scheda__titolo { margin: 0; font-size: 18px; font-weight: 800; color: var(--deep); letter-spacing: -.2px; }
.nv-scheda__sub { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.nv-scheda__stato { margin-left: auto; }
.nv-timer {
  display: inline-block; min-width: 86px; text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 19px; font-weight: 700;
  color: var(--deep); padding: 9px 16px; border-radius: 20px; background: var(--bg); box-shadow: var(--inset);
}
.nv-timer.tiepido { color: var(--warn); }
.nv-timer.lungo   { color: var(--error); }
.nv-chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 8px 15px; border-radius: 18px; box-shadow: var(--inset); }
.nv-chip--chiusa { color: var(--ok); }
.nv-chip--aperta { color: var(--brand); }

.nv-fasi { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; padding: 7px; border-radius: 30px; box-shadow: var(--inset); }
.nv-fase {
  display: flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 24px;
  font-size: 12.5px; font-weight: 700; color: var(--muted); text-decoration: none;
}
.nv-fase span {
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); box-shadow: var(--shadow-sm); font-size: 11px;
}
.nv-fase:hover { color: var(--deep); text-decoration: none; }
.nv-fase.on { color: var(--brand); background: var(--bg); box-shadow: var(--shadow-sm); }

.nv-griglia { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }

/* Colonna del copione */
.nv-copione {
  background: var(--bg); border-radius: var(--r-lg); padding: 22px 24px;
  box-shadow: var(--shadow); position: sticky; top: 16px;
}
.nv-copione h2 { margin: 0 0 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.nv-dire {
  margin: 0 0 12px; padding: 13px 16px; border-radius: var(--r-sm);
  background: var(--bg); box-shadow: var(--shadow-sm);
  font-size: 15px; line-height: 1.6; color: var(--ink);
}
/* La frase sulla privacy e' una proposta non ancora validata: sta incassata
   invece che in rilievo, cosi' si distingue dalle frasi da dire davvero. */
.nv-dire--proposta { box-shadow: var(--inset); color: var(--muted); }
.nv-nota { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); line-height: 1.55; padding-left: 14px; position: relative; }
.nv-nota::before { content: "·"; position: absolute; left: 4px; color: var(--brand); font-weight: 800; }
.nv-casi { margin-top: 18px; }
.nv-casi summary { cursor: pointer; font-weight: 700; color: var(--brand); font-size: 13px; list-style: none; padding: 8px 0; }
.nv-casi summary::-webkit-details-marker { display: none; }
.nv-casi dl { margin: 6px 0 0; font-size: 12.5px; }
.nv-casi dt { font-weight: 700; color: var(--deep); margin-top: 10px; }
.nv-casi dd { margin: 3px 0 0; color: var(--muted); line-height: 1.55; }

/* Colonna dei campi */
.nv-campi { background: var(--bg); border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--shadow); }
.nv-campi h2 { margin: 0 0 16px; font-size: 16px; font-weight: 800; color: var(--deep); }
.nv-campi label { display: block; font-size: 12px; font-weight: 700; color: var(--deep); margin-bottom: 12px; }
.nv-campi label.check { font-weight: 500; font-size: 13.5px; color: var(--ink); margin-bottom: 4px; }
.nv-campi input, .nv-campi select, .nv-campi textarea { margin-top: 5px; }
.nv-campi label.check input { margin-top: 0; }
.nv-due { display: grid; gap: 0 14px; grid-template-columns: 1fr 1fr; }
.nv-check-alta { align-self: end; margin-bottom: 18px !important; }
.nv-cf { text-transform: uppercase; letter-spacing: .08em; }
.nv-radio { border: none; margin: 0 0 14px; padding: 0; }
.nv-radio legend { font-size: 12px; font-weight: 700; color: var(--deep); padding: 0 0 4px; }

.nv-domanda { padding: 14px 0; border-top: 1px solid var(--line); }
.nv-domanda:first-of-type { border-top: none; }
.nv-domanda__testo { margin: 0 0 8px; font-size: 14px; line-height: 1.5; color: var(--ink); }
.nv-domanda__testo span {
  display: inline-block; margin-right: 7px; font-size: 11px; font-weight: 800; color: var(--brand);
  padding: 2px 8px; border-radius: 12px; box-shadow: var(--inset);
}
.nv-domanda__si-no { display: flex; gap: 22px; margin-bottom: 8px; }
.nv-domanda__si-no .check { padding: 4px 0; }

.nv-azioni { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* ===== La visita: schede grandi, regge anche sei o sette esami ===== */
.nv-esami__barra { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.nv-esami__conta { font-size: 12.5px; font-weight: 700; color: var(--deep); }
.nv-mini { border: none; background: none; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--brand); cursor: pointer; padding: 4px 0; }
.nv-mini:hover { text-decoration: underline; }

.nv-esami { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.nv-esame { display: block; cursor: pointer; margin: 0; }
.nv-esame input { position: absolute; opacity: 0; width: 0; height: 0; }
.nv-esame__box {
  display: block; height: 100%; padding: 16px 18px 16px 48px; border-radius: var(--r-md);
  background: var(--bg); box-shadow: var(--shadow-sm); position: relative;
  transition: box-shadow .18s, transform .18s;
}
/* Il segno della scelta: un cerchio che si riempie, come una spunta vera. */
.nv-esame__box::before {
  content: ""; position: absolute; left: 17px; top: 18px;
  width: 19px; height: 19px; border-radius: 50%; box-shadow: var(--inset);
}
.nv-esame:hover .nv-esame__box { transform: translateY(-2px); }
.nv-esame input:checked + .nv-esame__box { box-shadow: var(--inset); }
.nv-esame input:checked + .nv-esame__box::before { background: var(--brand); box-shadow: none; }
.nv-esame input:checked + .nv-esame__box::after {
  content: "✓"; position: absolute; left: 21px; top: 16px;
  color: #fff; font-size: 12px; font-weight: 800;
}
.nv-esame input:focus-visible + .nv-esame__box { box-shadow: var(--shadow-sm), 0 0 0 3px rgba(236,64,122,.4); }
.nv-esame__box b { display: block; font-size: 14.5px; font-weight: 800; color: var(--deep); line-height: 1.35; }
.nv-esame__box small { display: block; margin-top: 5px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.nv-esame__box em {
  display: inline-block; margin-top: 9px; font-style: normal;
  font-size: 11.5px; font-weight: 700; color: var(--brand);
}

/* ===== Conferma GDPR mancante: si deve vedere subito ===== */
.nv-rosso { color: var(--error); font-weight: 800; letter-spacing: .02em; }
.nv-scheda__gdpr { margin: 0 0 0 auto; font-size: 13px; }

.nv-vuota {
  margin: 0; padding: 22px; border-radius: var(--r-md); text-align: center;
  font-size: 13.5px; color: var(--muted); box-shadow: var(--inset);
}

/* ===== Chi ha gia' chiamato ===== */
.nv-cerca { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0 4px; }
.nv-cerca input { flex: 1 1 320px; min-height: 44px; }

.nv-pratica { padding: 18px 0; border-top: 1px solid var(--line); }
.nv-pratica:first-of-type { border-top: none; }
.nv-pratica__testa { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nv-pratica__nome { margin: 0; font-size: 15.5px; font-weight: 800; color: var(--deep); }
.nv-pratica__sub { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.nv-pratica__testa .nv-chip { margin-left: auto; }
.nv-pratica__dati {
  display: grid; gap: 10px 22px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin: 14px 0 0;
}
.nv-pratica__dati dt { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.nv-pratica__dati dd { margin: 3px 0 0; font-size: 13.5px; color: var(--ink); font-weight: 600; }

.nv-messaggi { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.nv-messaggi li {
  display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: baseline;
  font-size: 12.5px; padding: 9px 12px; border-radius: var(--r-sm); box-shadow: var(--shadow-sm);
}
.nv-messaggi__chi { font-weight: 800; color: var(--brand); }
.nv-messaggi li.out .nv-messaggi__chi { color: var(--muted); }
.nv-messaggi__testo { color: var(--ink); line-height: 1.5; }
.nv-messaggi__ora { color: var(--muted); font-size: 11.5px; white-space: nowrap; }

/* ===== Tabella delle schede ===== */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 620px; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 0 12px 12px; font-weight: 700; }
.table td { padding: 12px; border-top: 1px solid var(--line); vertical-align: top; }
.table .num { text-align: right; }
.table--compact th, .table--compact td { padding: 9px 10px; font-size: 12.5px; }

/* ===== Schermi stretti: il copione va sopra i campi ===== */
@media (max-width: 900px) {
  .nv-griglia { grid-template-columns: 1fr; }
  .nv-copione { position: static; }
  .nv-due { grid-template-columns: 1fr; }
}
