/* nova_manuale.css — Manuale qualità (sigla MA), cap 07.02. rev 2.1.0 (prototipo).
   Indice capitoli (4-10 = HLS) a sinistra + contenuto/storia revisioni a destra. */

.man-shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  height: 100%;
  background: #fff;
  overflow: hidden;
  min-height: 0;
  min-width: 0;
}
.man-index {
  border-right: 1px solid #e5e7eb;
  background: #f9fafb;
  overflow-y: auto;
  padding: 10px 8px;
  min-height: 0;
}
.man-idx-title { font-weight: 700; font-size: 12.5px; color: #111827; line-height: 1.3; }
.man-idx-sub { font-size: 10.5px; color: #6b7280; margin: 2px 0 8px; }
.man-idx-sec { font-size: 10px; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: .5px; margin: 8px 4px 4px; }
.man-idx-item { padding: 5px 6px; border-radius: 5px; font-size: 12px; color: #1f2937; cursor: pointer; line-height: 1.3; }
.man-idx-item:hover { background: #eef2f7; }
.man-idx-item.is-active { background: #e3f2fa; color: #0c4a6e; }
.man-idx-num { display: inline-block; min-width: 16px; font-weight: 700; color: #0369a1; }
.man-hls { font-size: 9px; background: #dbeafe; color: #1e3a8a; border-radius: 3px; padding: 0 4px; white-space: nowrap; }
.man-fuori { font-size: 9px; background: #f3f4f6; color: #6b7280; border-radius: 3px; padding: 0 4px; white-space: nowrap; }

.man-content { overflow-y: auto; padding: 16px 20px; min-height: 0; min-width: 0; }
.man-h { font-size: 15px; color: #111827; margin: 0 0 12px; border-bottom: 2px solid #e3f2fa; padding-bottom: 6px; line-height: 1.35; }
.man-body { font-size: 12.5px; color: #1f2937; line-height: 1.55; }

/* rev 2.1.1 — quadratino norma a lato del blocco + legenda (9001 nero · 14001 verde · 45001 azzurro · 9100 arancio) */
.man-norma-box { display: inline-block; width: 11px; height: 11px; border-radius: 2px; border: 1px solid rgba(0, 0, 0, .2); vertical-align: middle; margin-left: 3px; }
.man-legenda { font-size: 10.5px; color: #6b7280; margin: 0 0 12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.man-leg { display: inline-flex; align-items: center; gap: 4px; }
/* rev 2.1.3 — legenda norme nel menu sx (per chi sviluppa) + promemoria quadratini multi-norma */
.man-idx-leg { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #475569; padding: 1px 6px; }
.man-idx-note { font-size: 9.5px; color: #94a3b8; padding: 4px 6px; line-height: 1.3; font-style: italic; }
.man-nota { font-size: 10.5px; color: #6b7280; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 5px; padding: 5px 8px; margin: 0 0 12px; }

/* rev 2.1.1 — contenuto capitolo FEDELE (ODT→HTML LibreOffice): tabelle/immagini/testo come l'originale */
.man-body--html { font-size: 12px; color: #1f2937; }
.man-body--html table { border-collapse: collapse; max-width: 100%; margin: 8px 0; }
.man-body--html td, .man-body--html th { border: 1px solid #cbd5e1; padding: 3px 6px; vertical-align: top; font-size: 11px; line-height: 1.3; }
.man-body--html img { max-width: 100%; height: auto; }
.man-body--html p { margin: 4px 0; }
.man-allegati { margin: 0 0 12px; font-size: 11.5px; color: #475569; }
.man-all-btn { font-size: 11.5px; border: 1px solid #cbd5e1; background: #fff; border-radius: 5px; padding: 3px 8px; cursor: pointer; }
.man-all-btn:hover { background: #f1f5f9; }

/* rev 2.1.8 — CMP «Hyperlink Nova» (richiesta referente): UN solo stile per TUTTI i link (documenti, norme,
   allegati). Regola: sottolineatura blu intenso SOTTILE · NIENTE grassetto · NIENTE cambio colore del testo
   (resta leggibile). In Anteprima/Stampa la sottolineatura SPARISCE (vedi framedHtml). */
.man-doclink, .man-normlink, .man-alllink {
  color: inherit; font-weight: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-color: #1d4ed8;
  text-decoration-thickness: 1px; text-underline-offset: 2px;
}
.man-doclink:hover, .man-normlink:hover, .man-alllink:hover { text-decoration-color: #1e40af; background: transparent; }
/* rev 2.1.6 — vista di LAVORO: neutralizza il posizionamento assoluto ereditato dall'ODT (forme che scappavano fuori finestra) */
.man-body--html [style*="absolute"], .man-body--html .sd-abs-pos { position: static !important; top: auto !important; left: auto !important; }
.man-body--html img { max-width: 100%; height: auto; }
/* rev 2.1.7 — Anteprima/Stampa in-app (WKWebView blocca i popup): iframe isolato dentro finestra Nova */
.man-preview-wrap { display: flex; flex-direction: column; height: 100%; background: #e2e8f0; }
.man-preview-bar { display: flex; align-items: center; gap: 12px; padding: 6px 10px; background: #f8fafc; border-bottom: 1px solid #e5e7eb; flex-shrink: 0; }
.man-preview-hint { font-size: 11px; color: #6b7280; }
.man-preview { flex: 1; width: 100%; border: 0; background: #fff; min-height: 0; }
/* rev 2.1.4 — voce «Documenti» in fondo all'indice (allegati del manuale, apribili) */
.man-idx-doc { font-weight: 600; }

/* rev 2.1.5 — SEMAFORO norme citate (rosso = mancanti, verde = tutte presenti) */
.man-semaforo { font-size: 11px; border-radius: 5px; padding: 6px 9px; margin: 0 0 10px; line-height: 1.35; }
.man-semaforo--rosso { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; border-left: 4px solid #dc2626; }
.man-semaforo--verde { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; border-left: 4px solid #16a34a; }
/* rev 2.1.5 — editing-in-place */
.man-body--editing { outline: 2px dashed #2563eb; outline-offset: 4px; background: #fcfdff; min-height: 120px; }
.man-saved { font-size: 11.5px; background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; border-radius: 5px; padding: 6px 9px; margin: 0 0 10px; }
.man-storia { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.man-storia th, .man-storia td { border: 1px solid #e5e7eb; padding: 4px 7px; text-align: left; vertical-align: top; }
.man-storia th { background: #f1f5f9; font-weight: 600; }
.man-all-host { height: 100%; overflow: auto; }
