/* Il pannello di Nexus Preview: token e componenti del kit, foglio chiaro
   su sfondo scuro come il portale. Testi in italiano: e' lo strumento di chi
   vende, come l'Admin Console. */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--nexus-font-family); color: var(--nexus-text-primary); background: var(--nx-canvas); display: flex; flex-direction: column; min-height: 100vh; }
a { color: var(--nx-teal-700, #0b7a75); }
.pn-top { display: flex; align-items: center; gap: 28px; padding: 14px 28px; color: #fff; }
.pn-brand { color: #fff; font-weight: 600; font-size: 22px; text-decoration: none; }
.pn-brand span { color: var(--nx-teal); } .pn-brand em { font-style: normal; font-weight: 400; color: #A8B8CC; font-size: 14px; margin-left: 6px; }
.pn-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.pn-nav__link { color: #D6E0EA; text-decoration: none; padding: 7px 12px; border-radius: 8px; font-size: 14px; }
.pn-nav__link:hover { background: rgba(255,255,255,.08); }
.pn-nav__link--on { background: rgba(255,255,255,.14); color: #fff; }
.pn-user { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.pn-user__name { color: #fff; text-decoration: none; font-size: 14px; }
.pn-inline { display: inline; margin: 0; }
.pn-main { flex: 1; padding: 0 28px 28px; }
.pn-sheet { max-width: 1180px; margin: 0 auto; background: var(--nx-sheet); border-radius: var(--nx-radius-sheet); padding: 28px 32px 36px; }
.pn-sheet--narrow { max-width: 520px; margin-top: 8vh; }
.pn-foot { color: #8FA3B8; font-size: 12px; padding: 14px 28px 20px; max-width: 1240px; margin: 0 auto; width: 100%; }
h1 { font-size: 24px; margin: 0 0 6px; } h2 { font-size: 18px; margin: 22px 0 10px; }
.pn-lead { color: var(--nexus-text-secondary); margin: 0 0 22px; max-width: 760px; }
.pn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; } .pn-wide { grid-column: 1 / -1; }
@media (max-width: 760px) { .pn-grid { grid-template-columns: 1fr; } .pn-top { flex-wrap: wrap; gap: 12px; } .pn-main { padding: 0 12px 20px; } .pn-sheet { padding: 20px 16px; } }
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--nexus-text-secondary); margin-bottom: 4px; }
input[type=text], input[type=password], input[type=email], select, textarea { width: 100%; border: 0; border-radius: var(--nx-radius-sm); background: var(--nx-field); color: var(--nx-text); font: inherit; font-size: 14px; padding: 9px 10px; }
textarea { min-height: 180px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: none; box-shadow: var(--nx-focus); }
.pn-hint { font-size: 12px; color: var(--nexus-text-muted); margin-top: 4px; }
.pn-actions { display: flex; gap: 10px; margin-top: 18px; align-items: center; flex-wrap: wrap; }
.pn-check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--nx-text); }
.pn-check input { width: auto; }
.pn-flash { max-width: 1180px; margin: 0 auto 14px; background: #E6F7F5; color: #0b5e5a; border-left: 4px solid var(--nx-teal); padding: 10px 14px; border-radius: 8px; }
.pn-flash--errore { background: #FDECEC; color: #8a1f1f; border-left-color: #D64545; }
.pn-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pn-table th { text-align: left; font-size: 12px; color: var(--nexus-text-secondary); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--nx-line, #E3E8EE); }
.pn-table td { padding: 10px; border-bottom: 1px solid var(--nx-line, #EEF1F5); vertical-align: top; }
.pn-table .pn-num { text-align: right; font-variant-numeric: tabular-nums; }
.pn-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #E9EEF3; color: #3A4A5C; }
.pn-chip--ok { background: #DDF5F1; color: #0b5e5a; } .pn-chip--warn { background: #FFF1D6; color: #8a5a00; } .pn-chip--bad { background: #FDECEC; color: #8a1f1f; } .pn-chip--run { background: #E3EEFF; color: #1d4e9a; }
.pn-log { background: var(--nx-surface); border-radius: var(--nx-radius-card); box-shadow: var(--nx-shadow-card); padding: 14px 16px; font-family: var(--nexus-font-mono); font-size: 12.5px; white-space: pre-wrap; min-height: 60px; max-height: 360px; overflow: auto; }
.pn-card { background: var(--nx-surface); border-radius: var(--nx-radius-card); box-shadow: var(--nx-shadow-card); padding: 16px 18px; margin-top: 14px; }
.pn-md { font-size: 14px; line-height: 1.55; } .pn-md table { border-collapse: collapse; font-size: 13px; } .pn-md th, .pn-md td { border: 1px solid #E3E8EE; padding: 5px 8px; vertical-align: top; } .pn-md code { background: #EEF1F5; padding: 1px 4px; border-radius: 4px; }
.pn-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; margin: 0; } .pn-kv dt { color: var(--nexus-text-secondary); } .pn-kv dd { margin: 0; }
.pn-mono { font-family: var(--nexus-font-mono); font-size: 13px; }
.pn-danger { color: #8a1f1f; }
.nx-cmd--sm { padding: 5px 10px; font-size: 13px; }
.pn-empty { color: var(--nexus-text-muted); font-style: italic; }

/* ---- Generazione in corso: spinner, barra, fasi e racconto (docs/online.md par. 2) ---- */
.pn-spinner { display: inline-block; width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgb(28 207 201 / .22); border-top-color: var(--nx-teal, #1CCFC9); animation: pn-spin .8s linear infinite; flex: none; vertical-align: middle; }
.pn-spinner--xs { width: 11px; height: 11px; border-width: 2px; margin-right: 6px; }
.pn-spinner--on-btn { border-color: rgb(8 23 43 / .2); border-top-color: currentColor; }
.pn-spinner--done { animation: none; border-color: var(--nx-teal, #1CCFC9); background: var(--nx-teal, #1CCFC9); }
@keyframes pn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pn-spinner { animation-duration: 2.4s; } .pn-story__item { animation: none; } }
.pn-busy { pointer-events: none; opacity: .85; }
.pn-chip .pn-spinner--xs { margin: -1px 5px 0 0; border-color: rgb(29 78 154 / .2); border-top-color: currentColor; }
.pn-run { background: var(--nx-surface); border-radius: var(--nx-radius-card); box-shadow: var(--nx-shadow-card); padding: 20px 22px 18px; margin-top: 20px; }
.pn-run__head { display: flex; align-items: center; gap: 14px; }
.pn-run__title { margin: 0; font-size: 19px; }
.pn-run__eta { color: var(--nexus-text-secondary); font-size: 14.5px; margin-top: 2px; }
.pn-run__clock { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--nexus-text-muted); font-size: 13px; }
.pn-bar { height: 6px; border-radius: 999px; background: #E6ECF2; overflow: hidden; margin: 16px 0 14px; }
.pn-bar__fill { height: 100%; width: 2%; background: var(--nx-teal, #1CCFC9); border-radius: inherit; transition: width .9s ease; }
.pn-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; }
.pn-step { display: inline-flex; align-items: center; gap: 2px; padding: 5px 12px 5px 9px; border-radius: 999px; background: #EEF2F6; color: var(--nexus-text-secondary); font-size: 13px; font-weight: 600; }
.pn-step__dot { display: inline-grid; place-items: center; width: 14px; height: 14px; margin-right: 5px; border-radius: 50%; border: 2px solid #B8C4D0; }
.pn-step__dot svg { width: 10px; height: 10px; }
.pn-step--done { background: var(--nexus-teal-100, #E6F8F7); color: var(--nx-teal-ink, #0B7B77); }
.pn-step--done .pn-step__dot { border-color: var(--nx-teal, #1CCFC9); background: var(--nx-teal, #1CCFC9); color: var(--nx-navy-deep, #08172B); }
.pn-step--now { background: var(--nx-navy-deep, #08172B); color: #fff; }
.pn-step--now .pn-spinner--xs { border-color: rgb(28 207 201 / .3); border-top-color: var(--nx-teal, #1CCFC9); }
.pn-run__label { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--nx-teal-ink, #0B7B77); margin-bottom: 6px; }
.pn-story { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow: auto; }
.pn-story__item { display: grid; grid-template-columns: 20px 42px 1fr; align-items: start; gap: 8px; padding: 7px 2px; font-size: 15.5px; line-height: 1.45; color: var(--nexus-text-secondary); animation: pn-in .35s ease both; }
.pn-story__item + .pn-story__item { border-top: 1px solid #EEF1F5; }
.pn-story__item--live, .pn-story__item:last-child { color: var(--nx-text, #0F1B2D); }
.pn-story__item--live .pn-story__text { font-weight: 600; }
.pn-story__icon { display: grid; place-items: center; width: 20px; height: 22px; color: var(--nx-teal-ink, #0B7B77); }
.pn-story__icon svg { width: 16px; height: 16px; }
.pn-story__dot { width: 8px; height: 8px; border-radius: 50%; background: #B8C4D0; }
.pn-story__item--live .pn-story__dot { background: var(--nx-teal, #1CCFC9); box-shadow: 0 0 0 4px rgb(28 207 201 / .18); animation: pn-pulse 1.4s ease-in-out infinite; }
.pn-story__item--fix .pn-story__icon { color: #B7791F; }
.pn-story__item--fail .pn-story__icon, .pn-story__item--fail { color: #8a1f1f; }
.pn-story__item--end .pn-story__icon { color: var(--nx-teal, #1CCFC9); }
.pn-story__item--end .pn-story__text { font-weight: 700; color: var(--nx-teal-ink, #0B7B77); }
.pn-story__t { color: var(--nexus-text-muted); font-size: 12px; font-variant-numeric: tabular-nums; padding-top: 3px; }
@keyframes pn-in { from { opacity: 0; transform: translateY(4px); } }
@keyframes pn-pulse { 50% { box-shadow: 0 0 0 7px rgb(28 207 201 / .06); } }
.pn-techlog { margin-top: 14px; }
.pn-techlog summary { cursor: pointer; font-size: 12.5px; color: var(--nexus-text-muted); }
.pn-techlog .pn-log { margin-top: 8px; max-height: 260px; }
@media (max-width: 760px) { .pn-story__item { grid-template-columns: 20px 1fr; } .pn-story__t { display: none; } }
/* A corsa finita la pagina non si ricarica da sola: il pulsante prende il posto dell'orologio. */
.pn-run__next { margin-left: auto; white-space: nowrap; }
.pn-spinner--fail { animation: none; border-color: #D64545; background: #D64545; }
