/* Proof Server — personalizzazioni sopra AdminLTE 4.10.1 (Bootstrap 5.3) */
:root {
  --ps-accent: #4f46e5;
  --ps-accent-2: #0ea5e9;
  --ps-radius: .75rem;
  --ps-card-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  /* PT Sans Narrow (vendor/fonts, OFL): stretto, quindi corpo e didascalie leggermente più grandi del solito */
  --bs-font-sans-serif: "PT Sans Narrow", "Arial Narrow", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);
  --bs-body-line-height: 1.45;
  --ps-sidebar-top: #151c2f;
  --ps-sidebar-bottom: #1b2440;
}
[data-bs-theme="dark"] { --ps-card-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
body.proof-server { font-family: var(--bs-font-sans-serif); letter-spacing: .01em; }
.proof-server code, .proof-server pre, .proof-server kbd { letter-spacing: 0; }

/* ---- barra laterale ---- */
.proof-server .app-sidebar { background: linear-gradient(180deg, var(--ps-sidebar-top) 0%, var(--ps-sidebar-bottom) 100%) !important; }
.proof-server .sidebar-brand { border-bottom: 1px solid rgba(255, 255, 255, .06); }
.proof-server .brand-link .brand-image { width: 34px; height: 34px; max-height: 34px; border-radius: 9px; box-shadow: 0 4px 14px rgba(79, 70, 229, .45); }
.proof-server .brand-link .brand-text { font-weight: 700 !important; letter-spacing: .06em; line-height: 1.1; display: inline-flex; flex-direction: column; vertical-align: middle; }
.proof-server .brand-link .brand-sub { font-weight: 400; font-size: .78rem; letter-spacing: .02em; color: rgba(255, 255, 255, .72); max-width: 150px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proof-server .sidebar-menu .nav-header { font-size: .76rem; letter-spacing: .12em; opacity: .65; padding-top: 1rem; }
.proof-server .sidebar-menu .nav-link { border-radius: .55rem; margin: 1px .5rem; width: auto; transition: background-color .15s ease; }
.proof-server .sidebar-menu .nav-link.active { background: linear-gradient(90deg, var(--ps-accent), #574fe8) !important; color: #fff !important;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .35); }
.proof-server .sidebar-menu .nav-link p { display: inline-flex; align-items: center; width: calc(100% - 2rem); }
.sidebar-foot { position: static; flex: none; padding: .9rem 1.25rem; font-size: .82rem; color: rgba(255, 255, 255, .7);
  border-top: 1px solid rgba(255, 255, 255, .06); }
.sidebar-collapse .sidebar-foot { display: none; }
/* spazio sotto il menu: con un gruppo lungo aperto (Guida) le ultime voci non finiscono sotto il piede */
.proof-server .sidebar-menu { padding-bottom: 1.5rem; } /* il piede è sotto il menu (non sovrapposto): una riga vuota dopo l'ultima voce */

/* collegamento "salta alla navigazione" di AdminLTE: fuori schermo anche con il carattere ingrandito */
.skip-link:not(:focus):not(:focus-visible) { top: -10rem !important; }

/* ---- intestazione ---- */
/* dimensione del carattere: A− A A+ accanto al selettore del tema */
.font-size-ctl .btn { padding: .25rem .45rem; font-weight: 700; line-height: 1; text-decoration: none; }
.font-size-ctl .btn:first-child { font-size: .85rem; }
.font-size-ctl .btn:nth-child(2) { font-size: 1rem; }
.font-size-ctl .btn:last-child { font-size: 1.15rem; }
.font-size-ctl .btn[aria-pressed="true"] { color: var(--ps-accent); }
.font-size-ctl .btn:disabled { opacity: .35; }
.tenant-chip { font-weight: 600; color: var(--bs-emphasis-color) !important; background: var(--bs-tertiary-bg); border-radius: 2rem; padding: .25rem .8rem !important; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; font-weight: 700; font-size: .85rem;
  color: #fff; background: linear-gradient(135deg, var(--ps-accent), var(--ps-accent-2)); }
.avatar-sm { width: 26px; height: 26px; font-size: .75rem; }
.page-title { font-weight: 600; letter-spacing: -.01em; }
.app-content-header { padding-bottom: .5rem; }

/* ---- schede ---- */
.proof-server .card { border: 1px solid var(--bs-border-color-translucent); border-radius: var(--ps-radius); box-shadow: var(--ps-card-shadow); }
.proof-server .card-header { background: transparent; border-bottom-color: var(--bs-border-color-translucent); }
.proof-server .card-title { font-weight: 600; font-size: 1rem; }
.proof-server .card > .card-header:first-child { border-radius: var(--ps-radius) var(--ps-radius) 0 0; }
.proof-server .small-box { border-radius: var(--ps-radius); overflow: hidden; }
.proof-server .small-box.kpi .inner h3 { font-weight: 700; letter-spacing: -.02em; }
.proof-server .small-box .small-box-icon { font-size: 3.6rem; opacity: .22; top: 14px; right: 16px; position: absolute; }
.proof-server .info-box { border-radius: var(--ps-radius); box-shadow: var(--ps-card-shadow); border: 1px solid var(--bs-border-color-translucent); min-height: 88px; }
.proof-server .info-box .info-box-icon { border-radius: .65rem; }
.proof-server .info-box-number { font-size: 1.35rem; font-weight: 700; }
.table > thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color); font-weight: 600;
  border-bottom-width: 1px; white-space: nowrap; }
.row-link { cursor: pointer; }
.text-truncate-cell { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.min-w-0 { min-width: 0; }
.entity-cell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- stati e severità ---- */
.status-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .35rem; flex: 0 0 auto; }
.badge.state { font-weight: 600; }
.badge.state .bi-circle-fill { font-size: .5rem; vertical-align: .15em; }
.badge.sev { font-weight: 700; letter-spacing: .04em; font-size: .76rem; }
.sev-0, .sev-1 { background: var(--bs-secondary-bg); color: var(--bs-secondary-color); }
.sev-2 { background: rgba(14, 165, 233, .14); color: #0369a1; }
.sev-3 { background: rgba(245, 158, 11, .18); color: #92400e; }
.sev-4 { background: rgba(220, 53, 69, .16); color: #b02a37; }
.sev-5 { background: #7f1d1d; color: #fff; }
[data-bs-theme="dark"] .sev-2 { color: #7dd3fc; }
[data-bs-theme="dark"] .sev-3 { color: #fcd34d; }
[data-bs-theme="dark"] .sev-4 { color: #fca5a5; }
.icon-pill { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: .6rem; flex: 0 0 auto; }
.os-badge { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: .55rem;
  background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); flex: 0 0 auto; }
.os-badge-lg { width: 40px; height: 40px; font-size: 1.25rem; }

/* ---- filtri a pillole ---- */
.state-filter { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .8rem; border-radius: 2rem; border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg); color: var(--bs-body-color); text-decoration: none; font-size: .88rem; transition: all .15s ease; }
.chip span:last-child { color: var(--bs-secondary-color); font-weight: 600; }
.chip:hover { border-color: var(--ps-accent); color: var(--ps-accent); }
.chip.active { background: var(--ps-accent); border-color: var(--ps-accent); color: #fff; }
.chip.active span:last-child { color: rgba(255, 255, 255, .85); }
.agent-tabs { gap: 0; flex-wrap: nowrap; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: thin; }
.agent-tabs .nav-link { white-space: nowrap; border-radius: .5rem; color: var(--bs-body-color); padding: .35rem .5rem; }
.agent-tabs .nav-link .bi { margin-right: .2rem !important; }
.agent-tabs .nav-link.active { background: var(--ps-accent); }

/* ---- barre di occupazione ---- */
.meter { height: 8px; background: var(--bs-secondary-bg); border-radius: 6px; overflow: hidden; }
.meter-fill { height: 100%; width: 0; border-radius: 6px; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.disk-cell { min-width: 160px; }
.disk-tile, .metric-tile { border: 1px solid var(--bs-border-color-translucent); border-radius: .7rem; padding: 1rem; background: var(--bs-body-bg); height: 100%; }
.disk-tile .meter { height: 10px; }
.metric-tile .label { font-size: .85rem; color: var(--bs-secondary-color); }
.metric-tile .value { font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; }
.metric-tile .hint { font-size: .78rem; color: var(--bs-secondary-color); }
.sensor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; }
.sensor-item { border: 1px solid var(--bs-border-color-translucent); border-radius: .6rem; padding: .7rem .9rem; }

/* ---- grafici ---- */
.chart-box { position: relative; height: 280px; }
.chart-box-sm { height: 190px; }
.legend-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; font-size: .9rem; }
.legend-list li { display: flex; align-items: center; }

/* ---- liste chiave/valore ---- */
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0; }
dl.kv dt { font-weight: 500; color: var(--bs-secondary-color); font-size: .88rem; }
dl.kv dd { margin: 0; word-break: break-word; }
dl.kv-stack { grid-template-columns: 1fr; gap: .15rem; }
dl.kv-stack dd { margin-bottom: .6rem; }

/* ---- stati vuoti ---- */
.empty-state { text-align: center; padding: 2.2rem 1rem; color: var(--bs-body-color); }
.empty-state > .bi { font-size: 2rem; color: var(--bs-secondary-color); display: block; margin-bottom: .4rem; opacity: .7; }

/* ---- comandi da copiare ---- */
.copy-block { position: relative; background: #0f172a; color: #e2e8f0; border-radius: .6rem; padding: .85rem 3rem .85rem 1rem; }
.copy-block code { color: inherit; font-size: .8rem; white-space: pre-wrap; word-break: break-all; }
.copy-btn { position: absolute; top: .5rem; right: .5rem; }
.copy-btn.copied { background: var(--bs-success); color: #fff; border-color: var(--bs-success); }

/* ---- passi ---- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; }
.step { display: flex; gap: .75rem; align-items: flex-start; padding: 1rem; border-radius: var(--ps-radius); background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color-translucent); box-shadow: var(--ps-card-shadow); }
.step-n { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--ps-accent), var(--ps-accent-2)); color: #fff; font-weight: 700; }
.action-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.secret code { letter-spacing: .03em; }

/* ---- casi ---- */
.hypothesis { padding: .9rem 0; border-bottom: 1px dashed var(--bs-border-color); }
.hypothesis:last-child { border-bottom: 0; }
.hypothesis .rank { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bs-secondary-bg); font-size: .75rem; margin-right: .5rem; }
.confidence { display: grid; grid-template-columns: 160px 1fr; gap: .75rem; align-items: center; }
.timeline-list { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--bs-border-color); }
.timeline-list li { padding: 0 0 .9rem 1rem; position: relative; }
.timeline-list li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--ps-accent); }
/* scheda Evidenze: riga raggiunta da un collegamento EV-xxxxx */
.evidence-table tr:target > td { background: rgba(79, 70, 229, .12); }
.evidence-table tr { scroll-margin-top: 80px; }
.chart-box.chart-sm { height: 200px; }
.code-block { background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color-translucent); border-radius: .5rem; padding: .75rem 1rem;
  font-size: .78rem; max-height: 480px; overflow: auto; white-space: pre-wrap; word-break: break-word; margin: .5rem 0 0; }
.code-block.code-tall { max-height: 75vh; }
/* grafo delle evidenze (SVG generato dal server) */
.case-graph { border: 1px solid var(--bs-border-color); border-radius: .5rem; background: var(--bs-body-bg); overflow: auto; max-height: 720px; color: var(--bs-secondary-color); }
.case-graph svg { display: block; }
.case-graph .node rect { fill: var(--bs-tertiary-bg); stroke: var(--bs-border-color); }
.case-graph .node.evidence rect { fill: var(--bs-body-bg); }
.case-graph .node.entity rect { fill: var(--bs-secondary-bg); }
.case-graph .node.sev-warn rect { stroke: var(--bs-warning); stroke-width: 1.4; }
.case-graph .node.sev-err rect { stroke: var(--bs-danger); stroke-width: 1.6; }
.case-graph .node.sev-crit rect { stroke: #7f1d1d; stroke-width: 2; }
.case-graph .node.trigger rect { stroke: var(--ps-accent); stroke-width: 3; }
.case-graph a .node rect:hover { stroke: var(--ps-accent); }
.case-graph .node text { fill: var(--bs-body-color); font-size: 11px; }
.case-graph .node text.k { fill: var(--bs-secondary-color); font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; }
.case-graph .edge { fill: none; stroke: var(--bs-secondary-color); stroke-width: 1.2; opacity: .55; }
.case-graph .edge.cause { stroke: var(--bs-danger); opacity: .85; stroke-width: 1.8; }
.case-graph .edge.struct { stroke-dasharray: 4 3; }
.graph-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .8rem; color: var(--bs-secondary-color); margin-top: .5rem; }
.graph-legend i { display: inline-block; width: 22px; height: 0; border-top: 2px solid var(--bs-secondary-color); vertical-align: middle; margin-right: 5px; }
.graph-legend i.cause { border-top-color: var(--bs-danger); }
.graph-legend i.struct { border-top-style: dashed; }
/* report Markdown */
.md-report h2 { font-size: 1.3rem; margin: .25rem 0 .75rem; }
.md-report h3 { font-size: 1.05rem; margin: 1.4rem 0 .5rem; padding-bottom: .25rem; border-bottom: 1px solid var(--bs-border-color); }
.md-report h4, .md-report h5 { font-size: .95rem; margin: 1rem 0 .4rem; }
.md-report blockquote { margin: .5rem 0; padding: .5rem .75rem; border-left: 3px solid var(--ps-accent); background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); }
.md-report table { font-size: .85rem; }
.log-msg { font-family: var(--bs-font-monospace); font-size: .8rem; white-space: pre-wrap; word-break: break-word; }

/* ---- accesso ---- */
.login-split { min-height: 100vh; background: var(--bs-body-bg); }
.login-wrap { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.login-brand { position: relative; overflow: hidden; color: #fff; display: flex; align-items: center; justify-content: center; padding: 3rem;
  background: radial-gradient(1200px 600px at 10% 10%, rgba(14, 165, 233, .35), transparent 60%),
              radial-gradient(900px 500px at 90% 90%, rgba(99, 102, 241, .45), transparent 60%), #0b1330; }
.login-brand::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
  linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 40px 40px; mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 75%); }
.login-brand-inner { position: relative; z-index: 1; max-width: 460px; }
.login-logo { width: 84px; height: 84px; border-radius: 20px; box-shadow: 0 18px 50px rgba(79, 70, 229, .55); margin-bottom: 1.5rem; }
.login-brand h1 { font-size: 3rem; font-weight: 700; letter-spacing: -.005em; }
.login-brand .lead { color: rgba(255, 255, 255, .8); }
.login-points { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .9rem; color: rgba(255, 255, 255, .85); }
.login-points .bi { color: #7dd3fc; margin-right: .6rem; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.login-card { width: 100%; max-width: 380px; }
@media (max-width: 991.98px) { .login-wrap { grid-template-columns: 1fr; } .login-brand { display: none; } }

/* ---- errori ---- */
.error-page { text-align: center; padding: 4rem 1rem; }
.error-code { font-size: 5rem; font-weight: 800; line-height: 1; letter-spacing: -.04em;
  background: linear-gradient(135deg, var(--ps-accent), var(--ps-accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

@media (max-width: 575.98px) {
  .confidence { grid-template-columns: 1fr; }
  dl.kv { grid-template-columns: 1fr; }
  .chart-box { height: 220px; }
}

/* Checkmk */
.cmk-tile { background: var(--bs-tertiary-bg); border-radius: .4rem; padding: .55rem .8rem; height: 100%; }
.cmk-tile-label { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color); }
.cmk-tile-value { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }

/* Chiedi a Proof */
.ask-example { font-size: .85rem; }
.ask-example:hover { background: var(--bs-secondary-bg) !important; }
.ask-section + .ask-section { border-top: 1px solid var(--bs-border-color-translucent); padding-top: .75rem; }

/* Checkmk · Presidio */
.presidio-table td, .presidio-table th { padding-top: .3rem; padding-bottom: .3rem; }
.presidio-count { display: inline-block; min-width: 1.8em; padding: 0 .4em; border-radius: .3rem; font-weight: 700; text-align: center; }

/* avvisi del site Checkmk: compressi a destra, si aprono al passaggio del mouse */
.cmk-notices { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; margin-bottom: .6rem; }
.cmk-notice { display: inline-flex; align-items: baseline; gap: .35rem; max-width: 100%; padding: .2rem .65rem; border-radius: 1rem; font-size: .82rem;
  background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); border: 1px solid var(--bs-warning-border-subtle); cursor: default; outline: none; }
.cmk-notice-head { font-weight: 600; white-space: nowrap; }
.cmk-notice-full { display: inline-block; max-width: 0; overflow: hidden; white-space: nowrap; vertical-align: bottom; opacity: 0;
  transition: max-width .35s ease, opacity .25s ease; }
.cmk-notice:hover, .cmk-notice:focus-visible { border-radius: .5rem; }
.cmk-notice:hover .cmk-notice-full, .cmk-notice:focus .cmk-notice-full { max-width: 60rem; opacity: 1; white-space: normal; }

/* scheda del host Checkmk */
.cmk-out { min-width: 22rem; }
.cmk-vals { max-width: 24rem; }
.cmk-perf { display: inline-block; margin-right: .6rem; white-space: nowrap; }

/* cluster */
.state-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; flex: none; }
.cluster-member { font-size: .85rem; background: var(--bs-body-bg); }
.cluster-import { max-height: 22rem; overflow-y: auto; }

/* architettura */
.arch-wrap { overflow: auto; max-height: 78vh; }
.arch-map { display: block; max-width: none; font-family: var(--bs-font-sans-serif); }
.arch-map a, .arch-map text { text-decoration: none; }
.arch-group rect { fill: var(--bs-tertiary-bg); stroke: var(--bs-border-color); stroke-width: 1; }
.arch-ext rect { fill: transparent; stroke-dasharray: 5 4; }
.arch-none rect { fill: transparent; }
.arch-group-title { font-size: 13px; font-weight: 700; fill: var(--bs-secondary-color); letter-spacing: .03em; }
.arch-group a:hover .arch-group-title { fill: var(--bs-link-color); }
.arch-edge { fill: none; stroke: var(--bs-secondary-color); stroke-width: 1.2; stroke-opacity: .45; stroke-dasharray: 4 3; }
.arch-edge.recent { stroke: var(--bs-primary); stroke-opacity: .75; stroke-dasharray: none; stroke-width: 1.6; }
.arch-edge:hover { stroke-opacity: 1; stroke-width: 2.6; }
.arch-arrow { fill: var(--bs-secondary-color); }
.arch-node rect { fill: var(--bs-body-bg); stroke: var(--bs-border-color); stroke-width: 1; }
.arch-node:hover rect:first-of-type { stroke: var(--bs-primary); stroke-width: 2; }
.arch-node.ext rect:first-of-type { stroke-dasharray: 4 3; }
.arch-node .arch-node-state { stroke: none; }
.arch-node.st-0 .arch-node-state { fill: var(--bs-success); }
.arch-node.st-1 .arch-node-state { fill: var(--bs-warning); }
.arch-node.st-2 .arch-node-state { fill: var(--bs-danger); }
.arch-node.st-3 .arch-node-state { fill: var(--bs-secondary); }
.arch-node.ext .arch-node-state { fill: var(--bs-secondary-bg); }
.arch-node-name { font-size: 12.5px; font-weight: 700; fill: var(--bs-body-color); }
.arch-node-sub { font-size: 10.5px; fill: var(--bs-secondary-color); }

/* menu a gruppi: il gruppo aperto ha lo sfondo un po' più chiaro; la voce padre non è "attiva" piena */
.proof-server .sidebar-menu > .nav-item.menu-open { background: rgba(255, 255, 255, .07); border-radius: .5rem; margin: .1rem .5rem; }
.proof-server .sidebar-menu > .nav-item.menu-open > .nav-link { margin: 0; }
.proof-server .sidebar-menu > .nav-item.menu-open > .nav-link.active,
.proof-server .sidebar-menu > .nav-item.menu-open > .nav-link { background: transparent !important; box-shadow: none; color: #fff; font-weight: 600; }
.proof-server .sidebar-menu .nav-treeview { padding-bottom: .3rem; }
.proof-server .sidebar-menu .nav-treeview > .nav-item > .nav-link { padding-left: 1.6rem; margin: .05rem .45rem; font-size: .95em; }
.proof-server .sidebar-menu .nav-arrow { transition: transform .2s ease; }
.proof-server .sidebar-menu .menu-open > .nav-link .nav-arrow { transform: rotate(90deg); }

/* LED di stato in fondo alla barra superiore (layout.html, leds.go) */
body:not(.fixed-header) .app-header { position: relative; }
.status-leds {
  position: absolute; left: 1rem; bottom: 4px;
  display: flex; gap: 5px; align-items: center; line-height: 0;
  pointer-events: auto;
}
.status-led {
  display: block; width: 16px; height: 4px; border-radius: 1px;
  background: #9aa3b2; opacity: .45;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
  transition: transform .15s ease, opacity .15s ease;
}
.status-led:hover, .status-led:focus-visible { transform: scaleY(1.75); opacity: 1; outline: none; }
.status-led.led-ok   { background: #22c55e; opacity: 1; box-shadow: 0 0 4px rgba(34,197,94,.65); }
.status-led.led-warn { background: #f59e0b; opacity: 1; box-shadow: 0 0 4px rgba(245,158,11,.7); }
.status-led.led-err  { background: #ef4444; opacity: 1; box-shadow: 0 0 5px rgba(239,68,68,.8); animation: led-blink 1.2s ease-in-out infinite; }
.status-led.led-off  { background: #9aa3b2; opacity: .45; box-shadow: none; }
.status-leds.leds-stale .status-led { background: #9aa3b2; opacity: .35; box-shadow: none; animation: none; }
@keyframes led-blink { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .status-led.led-err { animation: none; } }
[data-bs-theme="dark"] .status-led.led-off,
[data-bs-theme="dark"] .status-leds.leds-stale .status-led { background: #5b6475; }

/* tabelle: intestazioni ordinabili, ricerca e barra delle pagine (partials_table.html) */
.sort-link { color: inherit; text-decoration: none; white-space: nowrap; }
.sort-link:hover, .sort-link:focus-visible { text-decoration: underline; }
.sort-link .sort-idle { opacity: .3; font-size: .8em; }
.sort-link:hover .sort-idle { opacity: .7; }
.sort-link.active { color: var(--bs-primary); }
.table-search { min-width: 0; }
.table-search .input-group { min-width: 12rem; }
.table-pager .page-link { min-width: 2rem; text-align: center; }

/* ---- guida in linea ---- */
.guide-toc { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; }
.guide-toc-list .guide-toc-group { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--bs-secondary-color); margin: .6rem 0 .15rem .4rem; }
.guide-toc-link { display: flex; gap: .5rem; align-items: baseline; padding: .28rem .5rem; border-radius: .45rem; color: var(--bs-body-color); text-decoration: none; }
.guide-toc-link:hover { background: var(--bs-tertiary-bg); }
.guide-toc-link.active { background: var(--ps-accent); color: #fff; }
.guide-toc-link.active .guide-num { color: rgba(255, 255, 255, .8); }
.guide-toc-sub .guide-toc-link { padding-left: 1.1rem; }
.guide-num { color: var(--bs-secondary-color); font-variant-numeric: tabular-nums; }
.guide-toc-sections { margin: .15rem 0 .4rem 2.1rem; font-size: .92em; }
.guide-toc-sections a { display: block; padding: .1rem 0; color: var(--bs-secondary-color); text-decoration: none; }
.guide-toc-sections a:hover { color: var(--bs-link-color); }
.guide-results { max-height: 55vh; overflow-y: auto; border-top: 1px solid var(--bs-border-color); padding-top: .4rem; }
.guide-results a { display: block; padding: .35rem .4rem; border-radius: .4rem; text-decoration: none; color: var(--bs-body-color); }
.guide-results a:hover, .guide-results a:focus { background: var(--bs-tertiary-bg); }
.guide-results .guide-hit-title { font-weight: 600; }
.guide-results .guide-hit-chapter { font-size: .8em; color: var(--bs-secondary-color); }
.guide-results .guide-hit-text { font-size: .85em; color: var(--bs-secondary-color); }
.guide-results mark { padding: 0 .1em; }
.guide-content { font-size: 1.04rem; }
.guide-content .card-body { max-width: 72rem; }
.guide-section { scroll-margin-top: 1rem; }
.guide-section + .guide-section { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--bs-border-color-translucent); }
.guide-h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: .75rem; }
.guide-steps { counter-reset: gstep; list-style: none; padding-left: 0; }
.guide-steps > li { counter-increment: gstep; position: relative; padding: .1rem 0 .55rem 2.3rem; }
.guide-steps > li::before { content: counter(gstep); position: absolute; left: 0; top: 0; width: 1.65rem; height: 1.65rem; border-radius: 50%;
  background: var(--ps-accent); color: #fff; font-weight: 700; font-size: .85rem; display: flex; align-items: center; justify-content: center; }
.guide-content .callout { border-radius: .5rem; margin-bottom: 1rem; }
.guide-content .table { font-size: .97em; }
.guide-example { border-left: 4px solid var(--bs-primary); background: var(--bs-tertiary-bg); border-radius: .5rem; padding: .75rem 1rem; }
.guide-flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: .5rem; }
.guide-flow-step { flex: 1 1 11rem; border: 1px solid var(--bs-border-color); border-radius: .6rem; padding: .7rem .8rem; background: var(--bs-body-bg);
  display: flex; flex-direction: column; gap: .15rem; }
.guide-flow-step > i { font-size: 1.4rem; color: var(--ps-accent); }
.guide-flow-step > span { font-size: .88em; color: var(--bs-secondary-color); }
.guide-flow-arrow { align-self: center; color: var(--bs-secondary-color); font-size: .85em; white-space: nowrap; }
.guide-seq { border-left: 3px solid var(--ps-accent); padding-left: 1rem; display: grid; gap: .6rem; }
.guide-seq-step { position: relative; background: var(--bs-tertiary-bg); border-radius: .5rem; padding: .6rem .8rem; }
.guide-seq-step::before { content: ""; position: absolute; left: -1.42rem; top: .9rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--ps-accent);
  border: 2px solid var(--bs-body-bg); }
.guide-seq-step > b { display: block; }
.guide-seq-who { float: right; font-size: .78em; color: var(--bs-secondary-color); text-transform: uppercase; letter-spacing: .06em; }
.guide-card:hover { border-color: var(--ps-accent); }
.guide-faq dt, .guide-glossary dt { font-weight: 700; margin-top: .6rem; }
.guide-faq dd, .guide-glossary dd { margin-left: 0; color: var(--bs-body-color); }
.guide-pager .btn { max-width: 48%; text-align: left; }
.help-link { font-size: 1rem; vertical-align: middle; color: var(--bs-secondary-color); text-decoration: none; }
.help-link:hover { color: var(--bs-link-color); }
@media (max-width: 991.98px) { .guide-toc { position: static; max-height: none; } .guide-pager .btn { max-width: 100%; } }
@media print { .app-sidebar, .app-header, .guide-toc, .guide-pager, .app-footer { display: none !important; } .app-main { margin: 0 !important; } }

/* ---- LIVE: voce del menu, pulsanti e scelta della macchina (la pagina LIVE ha live.css) ---- */
.live-nav-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: #ff3d6e; box-shadow: 0 0 0 0 rgba(255, 61, 110, .6);
  animation: live-nav-pulse 2s ease-out infinite; vertical-align: .05em; flex: 0 0 auto; }
@keyframes live-nav-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 61, 110, .6); } 70% { box-shadow: 0 0 0 7px rgba(255, 61, 110, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 61, 110, 0); } }
.btn-live { --bs-btn-color: #d6194f; --bs-btn-border-color: rgba(214, 25, 79, .55); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #d6194f; --bs-btn-hover-border-color: #d6194f;
  --bs-btn-active-bg: #b0123f; --bs-btn-active-border-color: #b0123f; --bs-btn-active-color: #fff; font-weight: 700; letter-spacing: .08em; display: inline-flex; align-items: center; }
[data-bs-theme="dark"] .btn-live { --bs-btn-color: #ff6f95; --bs-btn-border-color: rgba(255, 111, 149, .5); }
.btn-live:hover .live-nav-dot { background: #fff; }
.btn-xs { --bs-btn-padding-y: .05rem; --bs-btn-padding-x: .4rem; --bs-btn-font-size: .72rem; --bs-btn-border-radius: .4rem; }
.live-pick-card { transition: transform .15s ease, box-shadow .15s ease; }
.live-pick-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16, 24, 40, .14); }
.live-pick-card.is-live { border-color: rgba(214, 25, 79, .55) !important; box-shadow: 0 0 0 1px rgba(214, 25, 79, .25), 0 10px 26px rgba(214, 25, 79, .12); }
.live-pick-card.is-off { opacity: .72; }
.live-badge { display: inline-flex; align-items: center; }
.live-badge .live-nav-dot { background: #fff; }
@media (prefers-reduced-motion: reduce) { .live-nav-dot { animation: none; } .live-pick-card { transition: none; } }

/* nomi degli indirizzi (internal/names): nome con l'icona della fonte, indirizzo con il nome accanto, produttore del MAC */
.ipname { white-space: nowrap; }
.ipname-src { font-size: .7em; margin-left: .25em; opacity: .55; vertical-align: .1em; }
.ipname-aside, .mac-vendor { font-size: .85em; }
.names-table td { vertical-align: middle; }
.names-table .ip-cell { font-family: var(--bs-font-monospace); white-space: nowrap; }
.names-table .name-cell { min-width: 14rem; }
