/* detail-components-v2: restyle pagine di dettaglio, solo sotto body.nh-v2. Specifica: docs/PianoRestyleDettaglio.md. Ritorno: tag pre-restyle-dettaglio o git revert. */

/* ---------- Scala dei livelli (BlazorLevelScale) ---------- */
body.nh-v2 .nh-scale {
  position: relative;
}

body.nh-v2 .nh-scale::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 19px;
  bottom: 19px;
  width: 2px;
  border-radius: 2px;
  background: var(--border-strong);
}

body.nh-v2 .nh-scale-slot {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: none;
  cursor: pointer;
}

body.nh-v2 .nh-scale-slot:hover {
  background: rgba(var(--primary-rgb), .07);
}

body.nh-v2 .nh-scale-slot:focus-visible,
body.nh-v2 .nh-scale-tag.is-grab:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

body.nh-v2 .nh-scale-other,
body.nh-v2 .nh-scale-me {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  pointer-events: none;
  transition: transform .32s cubic-bezier(.16, 1, .3, 1);
}

body.nh-v2 .nh-scale-other {
  z-index: 2;
  color: var(--muted);
}

body.nh-v2 .nh-scale-me {
  z-index: 3;
}

body.nh-v2 .nh-scale-num {
  position: relative;
  z-index: 1;
  display: grid;
  flex: none;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transition: border-color .2s, background .2s, color .2s;
}

body.nh-v2 .nh-scale-num.is-moved {
  border-color: var(--warning);
  background: var(--warning-soft);
  color: #b45309;
}

body.nh-v2 .nh-scale-other .nh-scale-name {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.nh-v2 .nh-scale-me .nh-scale-num {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(var(--primary-rgb), .18);
  color: #fff;
  font-size: 15px;
}

body.nh-v2 .nh-scale-tag {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: var(--primary-ink);
  box-shadow: 0 10px 20px -10px rgba(30, 58, 138, .7);
  color: #fff;
}

body.nh-v2 .nh-scale-tag b {
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.nh-v2 .nh-scale-tag.is-grab {
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: box-shadow .15s;
}

body.nh-v2 .nh-scale-tag.is-grab:hover {
  box-shadow: 0 12px 24px -10px rgba(30, 58, 138, .8);
}

body.nh-v2 .nh-scale.is-dragging .nh-scale-me {
  transition: none;
}

body.nh-v2 .nh-scale.is-dragging .nh-scale-tag.is-grab {
  cursor: grabbing;
  box-shadow: 0 16px 28px -10px rgba(30, 58, 138, .85);
}

/* ---------- Dati collegati (BlazorLinkedDataTable) ---------- */
body.nh-v2 .nh-linked-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 800;
}

body.nh-v2 .nh-linked-count {
  padding: 1px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

body.nh-v2 .nh-linked-search {
  margin: 0 0 12px;
}

body.nh-v2 .nh-linked-none {
  padding: 18px 2px;
  color: var(--muted);
  font-size: 14px;
}

body.nh-v2 .nh-linked-scroll {
  position: relative;
  max-height: 296px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

body.nh-v2 .nh-linked-scroll.is-fit {
  max-height: none;
  overflow: visible;
}

/* Senza scorrimento l'intestazione non deve restare "appiccicata". */
body.nh-v2 .nh-linked-scroll.is-fit .nh-linked-table th {
  position: static;
}

body.nh-v2 .nh-linked-scroll:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

body.nh-v2 .nh-linked-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

body.nh-v2 .nh-linked-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0 8px 10px 2px;
  border-bottom: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

body.nh-v2 .nh-linked-table td {
  padding: 12px 8px 12px 2px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  vertical-align: top;
}

body.nh-v2 .nh-linked-table td:nth-child(2) {
  color: var(--muted);
  font-weight: 500;
}

body.nh-v2 .nh-linked-table td:last-child,
body.nh-v2 .nh-linked-table th:last-child {
  padding-right: 2px;
  text-align: right;
  white-space: nowrap;
}

body.nh-v2 .nh-linked-table td:last-child {
  color: var(--muted);
  font-weight: 500;
}

/* Sfumatura sul bordo basso: nascosta di default (senza animation-timeline coprirebbe sempre l'ultima riga);
   compare solo dove il browser sa spegnerla a fine scorrimento. Lo scorrimento pilotato non e' movimento: vale anche con reduced-motion. */
body.nh-v2 .nh-linked-fade {
  display: none;
  position: sticky;
  bottom: 0;
  height: 44px;
  margin-top: -44px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--surface) 85%);
  pointer-events: none;
}

@supports (animation-timeline: scroll()) {
  body.nh-v2 .nh-linked-fade {
    display: block;
    animation: nh-linked-fade-out linear both;
    animation-timeline: scroll(nearest block);
    animation-range: calc(100% - 60px) 100%;
  }
}

@keyframes nh-linked-fade-out {
  to { opacity: 0; }
}

@media (max-width: 560px) {
  /* Intestazione nascosta alla vista ma letta dalle tecnologie assistive (display:none le toglierebbe). */
  body.nh-v2 .nh-linked-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  body.nh-v2 .nh-linked-table,
  body.nh-v2 .nh-linked-table tbody,
  body.nh-v2 .nh-linked-table tr,
  body.nh-v2 .nh-linked-table td {
    display: block;
  }

  body.nh-v2 .nh-linked-table tr {
    padding: 12px 2px;
    border-bottom: 1px solid var(--border);
  }

  body.nh-v2 .nh-linked-table td {
    padding: 0;
    border: 0;
  }

  /* Seconda linea: tipo e dettaglio affiancati. */
  body.nh-v2 .nh-linked-table td:nth-child(2),
  body.nh-v2 .nh-linked-table td:nth-child(3) {
    display: inline;
    font-size: 13px;
    text-align: left;
    white-space: normal;
  }

  body.nh-v2 .nh-linked-table td:nth-child(2)::after {
    content: " \00b7 ";
  }

  body.nh-v2 .nh-linked-table td:nth-child(1) {
    margin-bottom: 2px;
  }
}

/* Sezione dati collegati sotto il form di una pagina di dettaglio. */
body.nh-v2 .nh-detail-linked {
  margin: 24px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

/* ---------- Campo composto (non <label>): etichetta + scala/valore precedente ---------- */
/* Stesso aspetto delle etichette dei campi (forms-v2.css, label.field > span:first-child). */
body.nh-v2 .nh-field-block > .nh-field-label {
  display: block;
  margin-bottom: 8px;
  color: #334155;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 15px;
  letter-spacing: 0;
  text-transform: none;
}

/* Testo per le tecnologie assistive (livello in sola lettura). */
body.nh-v2 .nh-scale-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Valore precedente (BlazorFieldWas) ---------- */
body.nh-v2 .nh-was {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  padding: 9px 9px 9px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 18px -10px rgba(15, 23, 42, .28);
}

body.nh-v2 .nh-was-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.nh-v2 .nh-was .btn {
  flex: none;
  text-decoration: none;
}

@media (max-width: 560px) {
  body.nh-v2 .nh-was .btn {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.nh-v2 .nh-scale-other,
  body.nh-v2 .nh-scale-me,
  body.nh-v2 .nh-scale-num {
    transition: none;
  }
}

/* ---------- Scala dei livelli a elenco (BlazorLevelScaleList, livelli del flusso) ----------
   Stesso linguaggio della scala del ruolo: gradino da 50px, cerchio col numero, etichetta; qui ogni etichetta e' afferrabile. */
body.nh-v2 .nh-scale.is-flow {
  max-width: 960px;
}

body.nh-v2 .nh-scale.is-flow::before {
  top: 25px;
  bottom: 25px;
}

body.nh-v2 .nh-scale-row {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  pointer-events: none;
  transition: transform .32s cubic-bezier(.16, 1, .3, 1);
}

body.nh-v2 .nh-scale-row.is-lifted {
  z-index: 4;
  transition: none;
}

body.nh-v2 .nh-scale-row .nh-scale-num.is-active {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(var(--primary-rgb), .18);
  color: #fff;
}

/* Etichette chiare per tutte le righe; quella afferrata prende il blu del livello "corrente" della scala del ruolo (il fuoco da tastiera ha solo l'outline). */
body.nh-v2 .nh-scale.is-flow .nh-scale-tag {
  gap: 18px;
  height: 40px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: none;
  color: var(--text);
}

body.nh-v2 .nh-scale.is-flow .nh-scale-tag.is-grab:hover {
  border-color: var(--border-strong);
  box-shadow: none;
}

body.nh-v2 .nh-scale.is-flow .nh-scale-tag.is-grab:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

body.nh-v2 .nh-scale-row.is-lifted .nh-scale-tag {
  border-color: var(--primary-ink);
  background: var(--primary-ink);
  box-shadow: 0 16px 28px -10px rgba(var(--primary-rgb), .5);
  color: #fff;
}

body.nh-v2 .nh-scale-row.is-lifted .nh-scale-sub,
body.nh-v2 .nh-scale-row.is-lifted .table-name-link {
  color: #fff;
}

/* Nome (link in sola lettura), approvatore e modalita' sulle stesse colonne in tutte le righe. */
body.nh-v2 .nh-scale-tag .nh-scale-name {
  flex: none;
  width: 200px;
  max-width: 40%;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 800;
  font-size: 14px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
}

body.nh-v2 .nh-scale-tag .nh-scale-name:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

body.nh-v2 .nh-scale-tag .nh-scale-sub {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.nh-v2 .nh-scale-tag .nh-scale-sub.is-mode {
  flex: none;
  margin-left: auto;
}

body.nh-v2 .nh-scale-actions {
  flex: none;
  pointer-events: auto;
}

body.nh-v2 .nh-scale.is-flow.is-busy {
  cursor: wait;
}

body.nh-v2 .nh-scale.is-flow.is-readonly .nh-scale-tag {
  cursor: default;
}

@media (prefers-reduced-motion: reduce) {
  body.nh-v2 .nh-scale-row {
    transition: none;
  }
}

/* ---------- Percorso di approvazione (BlazorFlowPath, livelli del flusso) ----------
   Nodo Richiesta, una scheda per livello collegata da un connettore pieno, nodo Approvata. Il connettore e' un'azione ("+"), in coda lo slot.
   Prototipo approvato: docs/PropostaFlussoPercorso.html. Tutto sotto body.nh-v2; ritorno: tag pre-flusso-percorso o git revert. */
body.nh-v2 .nhp-path {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  row-gap: 30px;
  padding: 20px 0 52px;
}

body.nh-v2 .nhp-path.is-dragging,
body.nh-v2 .nhp-path.is-dragging * {
  cursor: grabbing !important;
}

/* nodi iniziale e finale */
body.nh-v2 .nhp-node {
  position: relative;
  flex: none;
  align-self: center;
  width: 48px;
  height: 48px;
}

body.nh-v2 .nhp-node-ring,
body.nh-v2 .nhp-node-ok {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

body.nh-v2 .nhp-node-ring {
  border: 3px solid var(--primary);
  background: var(--surface);
}

body.nh-v2 .nhp-node-ring::after {
  content: "";
  position: absolute;
  left: 19px;
  top: 14px;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent var(--primary);
}

body.nh-v2 .nhp-node-ok {
  background: var(--success);
  box-shadow: 0 4px 10px -3px rgba(15, 23, 42, .35);
}

body.nh-v2 .nhp-node-ok::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 11px;
  width: 12px;
  height: 22px;
  border: solid #fff;
  border-width: 0 4px 4px 0;
  transform: rotate(45deg);
}

body.nh-v2 .nhp-node-label {
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

/* connettore (e punto di inserimento / rilascio) */
body.nh-v2 .nhp-gap {
  position: relative;
  flex: none;
  align-self: stretch;
  width: 32px;
  padding: 0;
  border: 0;
  background: none;
  cursor: default;
}

body.nh-v2 .nhp-gap::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 2px;
  background: var(--primary);
}

body.nh-v2 button.nhp-gap {
  cursor: pointer;
}

body.nh-v2 .nhp-plus {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  background: var(--primary-ink);
  box-shadow: 0 0 0 3px var(--surface), 0 4px 10px -2px rgba(15, 23, 42, .35);
  opacity: 0;
  transform: scale(.4);
  transition: opacity .18s, transform .32s cubic-bezier(.16, 1, .3, 1);
}

body.nh-v2 .nhp-plus::before,
body.nh-v2 .nhp-plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 1px;
  background: #fff;
}

body.nh-v2 .nhp-plus::before {
  width: 12px;
  height: 3px;
  margin: -1.5px 0 0 -6px;
}

body.nh-v2 .nhp-plus::after {
  width: 3px;
  height: 12px;
  margin: -6px 0 0 -1.5px;
}

body.nh-v2 button.nhp-gap:hover .nhp-plus,
body.nh-v2 button.nhp-gap:focus-visible .nhp-plus {
  opacity: 1;
  transform: scale(1);
}

body.nh-v2 button.nhp-gap:focus-visible {
  outline: none;
}

body.nh-v2 .nhp-path.is-dragging .nhp-gap > .nhp-plus {
  display: none;
}

body.nh-v2 .nhp-gap.is-target::after {
  content: "";
  position: absolute;
  z-index: 3;
  left: 50%;
  top: -6px;
  bottom: -6px;
  width: 6px;
  margin-left: -3px;
  border-radius: 3px;
  background: var(--primary-ink);
  box-shadow: 0 0 0 3px var(--surface);
}

/* elemento del cammino: connettore + scheda */
body.nh-v2 .nhp-step {
  display: flex;
  flex: 1 1 216px;
  min-width: 0;
  max-width: 264px;
  transition: transform .32s cubic-bezier(.16, 1, .3, 1);
}

body.nh-v2 .nhp-step.is-away {
  display: none;
}

body.nh-v2 .nhp-step.nhp-slotstep {
  flex: 0 0 140px;
}

body.nh-v2 .nhp-step.nhp-end {
  flex: 0 0 80px;
}

body.nh-v2 .nhp-step.nhp-slotstep.is-big {
  flex: 1 1 360px;
  max-width: 520px;
}

/* scheda */
body.nh-v2 .nhp-card {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  min-height: 232px;
  padding: 12px 12px 14px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 10px 20px -10px rgba(15, 23, 42, .2);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: box-shadow .2s, border-color .2s;
}

body.nh-v2 .nhp-card:hover {
  border-color: rgba(var(--primary-rgb), .6);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 14px 26px -10px rgba(var(--primary-rgb), .36);
}

body.nh-v2 .nhp-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

body.nh-v2 .nhp-path.is-readonly .nhp-card {
  cursor: default;
}

body.nh-v2 .nhp-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.nh-v2 .nhp-num-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.nh-v2 .nhp-num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

body.nh-v2 .nhp-num.is-moved {
  border: 3px solid var(--warning);
}

body.nh-v2 .nhp-was {
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
}

body.nh-v2 .nhp-actions {
  flex: none;
}

body.nh-v2 .nhp-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary-ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
}

body.nh-v2 .nhp-name:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

body.nh-v2 .nhp-approver {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

body.nh-v2 .nhp-approver b {
  display: block;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

body.nh-v2 .nhp-approver small {
  display: block;
  margin-top: 1px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

body.nh-v2 .nhp-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

/* segno del tipo di approvatore: ruolo = quadrato arrotondato, gruppo = due cerchi, utente = cerchio con iniziali */
body.nh-v2 .nhp-sign {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

body.nh-v2 .nhp-sign.is-ruolo {
  border-radius: 9px;
  background: var(--primary-ink);
}

body.nh-v2 .nhp-sign.is-utente {
  border-radius: 50%;
  background: var(--text);
  font-size: 13px;
  letter-spacing: .02em;
}

body.nh-v2 .nhp-sign.is-gruppo i {
  position: absolute;
  top: 5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

body.nh-v2 .nhp-sign.is-gruppo i:first-child {
  left: 0;
  background: var(--primary);
}

body.nh-v2 .nhp-sign.is-gruppo i:last-child {
  right: 0;
  background: var(--primary-ink);
  box-shadow: 0 0 0 2px var(--surface);
}

body.nh-v2 .nhp-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .02em;
}

body.nh-v2 .nhp-badge.is-uno {
  background: var(--primary);
  color: #fff;
}

body.nh-v2 .nhp-badge.is-tutti {
  background: var(--text);
  color: #fff;
}

body.nh-v2 .nhp-badge.is-quorum {
  background: var(--warning);
  color: var(--text);
}

body.nh-v2 .nhp-badge.is-eredita {
  border-style: dashed;
  border-color: var(--primary);
  background: var(--surface);
  color: var(--primary-ink);
}

body.nh-v2 .nhp-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-soft);
  color: #334155;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

/* scheda sollevata durante il trascinamento */
body.nh-v2 .nhp-card.is-ghost {
  position: fixed;
  z-index: 1500;
  left: 0;
  top: 0;
  margin: 0;
  cursor: grabbing;
  pointer-events: none;
  border-color: var(--primary-ink);
  box-shadow: 0 30px 46px -14px rgba(var(--primary-rgb), .55), 0 0 0 1px var(--primary-ink);
}

body.nh-v2 .nhp-card.is-ghost.is-landing {
  transition: transform .32s cubic-bezier(.16, 1, .3, 1), box-shadow .32s;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 10px 20px -10px rgba(15, 23, 42, .2);
}

/* slot di aggiunta: e' esso stesso l'azione */
body.nh-v2 .nhp-slot {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 2px dashed var(--primary);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--primary-ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  transition: background .2s;
}

body.nh-v2 .nhp-slot:hover {
  background: var(--primary-soft);
}

body.nh-v2 .nhp-slot:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

body.nh-v2 .nhp-slot .nhp-plus {
  position: relative;
  left: auto;
  top: auto;
  flex: none;
  margin: 0;
  opacity: 1;
  transform: none;
}

body.nh-v2 .nhp-slotstep.is-big .nhp-slot {
  min-height: 232px;
  font-size: 18px;
}

/* barra di conferma dell'ordine in bozza */
body.nh-v2 .nhp-draftbar {
  position: sticky;
  z-index: 40;
  top: calc(var(--topbar-height, 72px) + 8px);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px 8px 8px 14px;
  border: 1px solid var(--warning);
  border-radius: var(--radius);
  background: var(--warning-soft);
  color: #78350f;
  font-size: 14.5px;
  font-weight: 800;
  box-shadow: 0 8px 16px -10px rgba(15, 23, 42, .3);
}

body.nh-v2 .nhp-draftbar-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

@media (prefers-reduced-motion: reduce) {
  body.nh-v2 .nhp-step,
  body.nh-v2 .nhp-plus,
  body.nh-v2 .nhp-card,
  body.nh-v2 .nhp-slot {
    transition: none;
  }
}
