/* ============================================================
   Navigator Hub — RĘCZNA ZMIANA ETAPU (WZÓR, 27.10): okno „Zmień etap”, link „Cofnij” w historii kontaktu.
   Szkielet okna = .nh-dlg* (ui/patient-card-v2.css). Tu tylko to, czego szkielet nie ma. Wyłącznie tokeny.
   ============================================================ */

/* Okno przy GÓRZE ekranu (reguła okien 23.10): zmiana wysokości treści nie rusza górnej krawędzi. */
.nh-dlg.nh-dlg--gora {
  margin: var(--nh-okno-top) auto auto;
  max-height: calc(100vh - var(--nh-okno-top) - var(--nh-okno-dol));
  max-height: calc(100dvh - var(--nh-okno-top) - var(--nh-okno-dol));
}
.nh-dlg [hidden] { display: none; }   /* pola okna ukrywane atrybutem (mocniej niż .nh-dlg-field / .nh-dlg-box) */

/* Lista etapów: fazy z NH.stages, etap = wiersz z kropką (jak pasek etapów w karcie) */
.nh-ze-list { display: grid; gap: var(--space-3); margin-top: var(--space-2); }
.nh-ze-phase { display: grid; gap: 2px; }
.nh-ze-ph { font-family: var(--nh-font-head); font-size: var(--nh-text-2xs); font-weight: 500; letter-spacing: var(--nh-ls-section); text-transform: uppercase; color: var(--nh-text-muted); margin-bottom: 2px; }
.nh-ze-opt { position: relative; display: flex; align-items: center; gap: var(--space-2); min-height: 36px; padding: 6px var(--space-3); border: 1px solid var(--nh-line); border-radius: var(--nh-r-sm); background: var(--nh-surface); cursor: pointer; font-size: var(--nh-text-sm); color: var(--nh-text); }
.nh-ze-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.nh-ze-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--nh-chip-br); flex: 0 0 auto; }
.nh-ze-opt:hover { background: var(--nh-field); }
.nh-ze-opt:has(input:checked) { border-color: var(--nh-navy); background: var(--nh-navy); color: var(--nh-text-on-dark); }
.nh-ze-opt:has(input:checked) .nh-ze-dot { border-color: var(--nh-text-on-dark); background: var(--nh-text-on-dark); }
.nh-ze-opt:has(input:focus-visible) { outline: 2px solid var(--nh-accent); outline-offset: 2px; }
.nh-ze-opt small { margin-left: auto; font-size: var(--nh-text-xs); color: var(--nh-text-2); text-align: right; }
.nh-ze-opt:has(input:checked) small { color: var(--nh-ondark-txt2); }
.nh-ze-opt.is-off, .nh-ze-opt.is-off:hover { cursor: default; background: var(--nh-field); color: var(--nh-text-2); border-color: var(--nh-line-soft); }
.nh-ze-opt.is-now, .nh-ze-opt.is-now:hover { cursor: default; border-style: dashed; background: var(--nh-surface); }
.nh-ze-auto { display: flex; align-items: center; gap: var(--space-2); padding: 6px var(--space-3); border-radius: var(--nh-r-sm); background: var(--nh-field); color: var(--nh-text-2); font-size: var(--nh-text-xs); --icon-color: var(--nh-text-2); }

/* Historia kontaktu: „Cofnij” = cichy link w wierszu; „cofnięta” = neutralna plakietka */
.nh-ze-undo { background: none; border: 0; padding: 0; font: 500 var(--nh-text-xs) var(--nh-font-body); color: var(--nh-accent); cursor: pointer; display: inline-flex; align-items: center; gap: 3px; --icon-color: var(--nh-accent); }
.nh-ze-undo:hover { text-decoration: underline; }
.nh-ze-undo:focus-visible { outline: 2px solid var(--nh-accent); outline-offset: 2px; }
.nh-ze-done { font-size: var(--nh-text-xs); padding: 1px 7px; border-radius: var(--nh-r-badge); background: var(--nh-chip-bg); color: var(--nh-chip-tx); }
