/* Il portale dei clienti: quello che il kit V4 non ha. Solo token del kit, cosi' vale
   uguale nel tema chiaro e nello scuro. Lo stile della firma sta qui e non nel kit (regola
   del pezzo firma-aqs). */

/* La firma AQSolutions: [logo] @AQSolutions | Ver. x.y rel. abc1234 */
.firma-aqs { display: inline-flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; color: var(--muted); font-size: 1.15rem; }
.firma-aqs-link { display: inline-flex; align-items: center; gap: 0.5rem; color: inherit; text-decoration: none; }
.firma-aqs-link:hover > span, .firma-aqs-link:focus-visible > span { text-decoration: underline; }
.firma-aqs img { display: block; height: 1.4em; width: auto; }
.firma-aqs .aqs-chiaro { display: none; }
:root[data-theme="light"] .firma-aqs .aqs-chiaro { display: block; }
:root[data-theme="light"] .firma-aqs .aqs-scuro { display: none; }
.login-firma { margin-top: 1.6rem; text-align: center; }


.nv-pt-vuoto { margin: 0.4rem 1rem; font-size: 1.25rem; }
.nv-pt-testa p { margin-top: 0.4rem; }
.nv-pt-schede { margin: 0; }
/* Le schede del progetto sono link veri (si aprono in un'altra scheda, si ricaricano): lo
   stesso aspetto dei bottoni .tabs del kit. */
.nv-pt-schede a { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1.3rem; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; }
.nv-pt-schede a:hover { background: var(--hover-wash); color: var(--text); }
.nv-pt-schede a.active { background: var(--elevated); color: var(--text); box-shadow: var(--shadow-lift); }
.nv-pt-form { display: grid; gap: 1rem; max-width: 44rem; }
.nv-pt-form label { display: grid; gap: 0.4rem; color: var(--muted); }
.nv-pt-form button { justify-self: start; }

/* La barra in basso del kit ha cinque posti; il portale ha tre voci (Progetti, Profilo,
   Menu): le si da' un terzo a testa invece di lasciarle a sinistra. */
@media (max-width: 820px) { .nv-bottom { grid-template-columns: repeat(3, 1fr); } }

/* --- La chat con Pepper ------------------------------------------------------------------
   La pagina e' una finestra sul lavoro che Pepper fa sul server: bolle del cliente a destra,
   di Pepper a sinistra, i passi di Pepper raggruppati in un riquadro che si apre. */
.nv-pt-chat { display: grid; gap: 1rem; padding-bottom: 1.2rem; }
.nv-pt-chat-testa { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.nv-pt-chat-testa button { display: inline-flex; align-items: center; gap: 0.5rem; }
.nv-pt-messaggi { display: flex; flex-direction: column; gap: 1rem; min-height: 24rem; max-height: calc(var(--visual-height, 100vh) - 34rem); overflow-y: auto; padding: 0.4rem 0.2rem; overscroll-behavior: contain; }
.nv-pt-bolla { position: relative; max-width: min(72rem, 88%); padding: 1rem 1.3rem 1.8rem; border: 1px solid var(--line); border-radius: var(--r-lg); line-height: 1.55; overflow-wrap: anywhere; }
.nv-pt-bolla time { position: absolute; right: 1.1rem; bottom: 0.5rem; font-size: 1.05rem; color: var(--faint); }
.nv-pt-cliente { align-self: flex-end; background: var(--accent-soft); border-color: var(--accent-line); }
.nv-pt-pepper { align-self: flex-start; background: var(--panel-2); }
.nv-pt-bolla p { margin: 0 0 0.7rem; }
.nv-pt-bolla p:last-of-type { margin-bottom: 0; }
.nv-pt-bolla ul, .nv-pt-bolla ol { margin: 0 0 0.7rem; padding-left: 2.2rem; }
.nv-pt-bolla li { margin: 0.25rem 0; }
.nv-pt-bolla code { font-family: var(--mono); font-size: 0.92em; padding: 0.1rem 0.4rem; border-radius: 0.5rem; background: var(--well); }
.nv-pt-codice { margin: 0 0 0.7rem; padding: 0.9rem 1.1rem; border-radius: var(--r-sm); background: var(--well); overflow-x: auto; font-size: 1.2rem; }
.nv-pt-codice code { padding: 0; background: none; }
.nv-pt-titoletto { font-weight: 700; }
.nv-pt-chip { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0.6rem 0.6rem 0 0; padding: 0.2rem 0.8rem; border: 1px solid var(--line); border-radius: var(--pill); font-size: 1.15rem; background: var(--panel); }
.nv-pt-chip button { padding: 0 0.3rem; border: 0; background: none; color: var(--muted); }
.nv-pt-avviso { align-self: center; display: flex; gap: 0.8rem; align-items: flex-start; max-width: 64rem; padding: 0.7rem 1.2rem; border-radius: var(--r); font-size: 1.25rem; text-align: left; }
.nv-pt-avviso.muted { background: var(--well); }
.nv-pt-avviso.bad { background: var(--wash-bad); color: var(--red); }
.nv-pt-richiesta { border: 1px solid var(--tint-ok); background: var(--wash-ok); }
.nv-pt-richiesta .nv-icon { color: var(--green); flex: none; margin-top: 0.2rem; }
.nv-pt-passi { align-self: flex-start; max-width: min(72rem, 92%); font-size: 1.2rem; color: var(--muted); }
.nv-pt-passi summary { cursor: pointer; padding: 0.3rem 0; }
.nv-pt-passi ol { margin: 0.4rem 0 0; padding-left: 2.2rem; display: grid; gap: 0.3rem; }
.nv-pt-passi li span { font-family: var(--mono); font-size: 1.1rem; overflow-wrap: anywhere; }
.nv-pt-esito summary { font-size: 1.1rem; }
.nv-pt-esito pre { margin: 0.3rem 0 0.5rem; padding: 0.6rem 0.8rem; max-height: 20rem; overflow: auto; border-radius: var(--r-sm); background: var(--well); font-size: 1.1rem; white-space: pre-wrap; }
.nv-pt-esito.bad summary { color: var(--red); }
.nv-pt-lavora { display: grid; gap: 0.6rem; }
.nv-pt-parziale { opacity: 0.85; }
.nv-pt-pallini { display: inline-flex; gap: 0.4rem; padding: 0.4rem 0.2rem; }
.nv-pt-pallini span { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--accent); animation: nv-pt-pallino 1.2s infinite ease-in-out; }
.nv-pt-pallini span:nth-child(2) { animation-delay: 0.15s; }
.nv-pt-pallini span:nth-child(3) { animation-delay: 0.3s; }
@keyframes nv-pt-pallino { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-0.3rem); } }
@media (prefers-reduced-motion: reduce) { .nv-pt-pallini span { animation: none; opacity: 0.7; } }
.nv-pt-scrivi { display: grid; gap: 0.6rem; }
.nv-pt-allegati:empty { display: none; }
.nv-pt-riga { display: flex; align-items: flex-end; gap: 0.6rem; }
.nv-pt-riga textarea { flex: 1; min-height: 4.4rem; max-height: 24rem; }
.nv-pt-riga button { display: inline-flex; align-items: center; gap: 0.5rem; }
.nv-pt-graffetta { position: relative; cursor: pointer; flex: none; }
.nv-pt-graffetta input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.nv-pt-errore { margin: 0; min-height: 1.2em; }
@media (max-width: 820px) {
  .nv-pt-messaggi { max-height: none; min-height: 18rem; }
  .nv-pt-riga button span { display: none; }
  .nv-pt-bolla { max-width: 94%; }
}

/* --- I file e le richieste ---------------------------------------------------------------- */
.nv-pt-carica { position: relative; display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 2.4rem 1.6rem; border: 2px dashed var(--line-strong); border-radius: var(--r-lg); color: var(--muted); cursor: pointer; text-align: center; }
.nv-pt-carica:hover, .nv-pt-carica.sopra { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
.nv-pt-carica input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.nv-pt-file, .nv-pt-richieste { display: grid; gap: 0.6rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.nv-pt-file li, .nv-pt-richieste li { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 0.8rem 1rem; border: 1px solid var(--line-soft); border-radius: var(--r); }
.nv-pt-file a { display: inline-flex; align-items: center; gap: 0.6rem; flex: 1; min-width: 0; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.nv-pt-file a:hover span { text-decoration: underline; }
.nv-pt-richiesta-testo { flex: 1; min-width: 16rem; }

/* --- Pubblica -------------------------------------------------------------------------------- */
.nv-pt-pronte { margin: 0 0 1.2rem; padding-left: 2.2rem; display: grid; gap: 0.3rem; }
.nv-pt-incorso { display: flex; align-items: center; gap: 1rem; }
.warn { color: var(--amber); }
