:root {
  /* BC-228: stessa palette del pannello Platform Owner (era una palette
     scura indipendente, che lasciava il resto del sito — login, Progetti,
     Master Console — visivamente un prodotto diverso). */
  --bg: #f5f7fb;
  --card: #ffffff;
  --testo: #172033;
  --secondario: #657188;
  --bordo: #d8e0ec;
  --accento: #2f65d9;
  --errore: #c62828;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--testo);
  font: 15px/1.5 -apple-system, "Helvetica Neue", Arial, sans-serif;
}

.barra {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--bordo);
}

.marchio {
  color: var(--testo);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
}
.marchio-logo { height: 28px; width: auto; max-width: 140px; object-fit: contain; }
.pagina-marchio { height: 44px; width: auto; object-fit: contain; margin-bottom: 20px; display: block; }

.barra nav { display: flex; align-items: center; gap: 12px; }
.chi { color: var(--secondario); font-size: 13px; }

main { max-width: 720px; margin: 0 auto; padding: 40px 24px; }

.scheda-centrale {
  max-width: 380px;
  margin: 60px auto;
  background: var(--card);
  border: 1px solid var(--bordo);
  border-radius: 12px;
  padding: 28px;
}

.pagina { }

.intestazione-pagina {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

h1 { font-size: 20px; margin: 0 0 16px; }

label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--secondario);
}

input[type="email"], input[type="password"], input[type="text"] {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px 10px;
  background: #ffffff;
  border: 1px solid var(--bordo);
  border-radius: 8px;
  color: var(--testo);
  font-size: 14px;
}

button.primario, a.primario {
  display: inline-block;
  background: var(--accento);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}

button.link {
  background: none;
  border: none;
  color: var(--secondario);
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}

.inline { display: inline; }

.errore { color: var(--errore); font-size: 13px; margin-bottom: 12px; }
.successo { color: #1a7f37; font-size: 13px; margin-bottom: 12px; }
.secondario { color: var(--secondario); font-size: 13px; margin-top: 16px; }
.nota { color: var(--secondario); font-size: 13px; }

.tabella-utenti { width: 100%; border-collapse: collapse; margin: 16px 0; }
.tabella-utenti th, .tabella-utenti td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--bordo);
  font-size: 14px;
}
.link-token {
  display: block;
  word-break: break-all;
  background: var(--card);
  border: 1px solid var(--bordo);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13px;
}

.elenco-progetti { list-style: none; padding: 0; margin: 0; }
.elenco-progetti li { border-bottom: 1px solid var(--bordo); }
.elenco-progetti a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4px;
  color: var(--testo);
  text-decoration: none;
}
.nome-progetto { font-weight: 600; }

.riga-organizzazione {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4px;
  margin: 0;
}
.riga-organizzazione button.link {
  font-size: 15px;
  color: var(--testo);
}

.etichetta-gestito {
  font-size: 11px;
  color: var(--accento);
  border: 1px solid var(--accento);
  border-radius: 999px;
  padding: 2px 9px;
}

.vuoto { color: var(--secondario); }

.dettagli-progetto { margin-top: 20px; }
.dettagli-progetto dt { color: var(--secondario); font-size: 12px; margin-top: 12px; }
.dettagli-progetto dd { margin: 4px 0 0; }

/* BC-193 */
.tabella { width: 100%; border-collapse: collapse; margin: 16px 0; }
.tabella th, .tabella td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--bordo, #ddd); }
.dettagli dt { color: var(--secondario, #666); font-size: 12px; margin-top: 12px; }
.dettagli dd { margin: 4px 0 0; }
.bottone { display: inline-block; padding: 8px 14px; border-radius: 6px; background: var(--primario, #2b5fd9); color: #fff; text-decoration: none; }
.ok { color: #1a7f37; font-size: 12px; margin-left: 6px; }
.avviso { color: #b45309; font-size: 12px; margin-left: 6px; }

/* BC-195: Master web — BC-242: lo stile Console approvato dal Master
   (barra bianca, sidebar con icone, carte, tabelle). I token vivono qui e
   sono gli stessi della shell Platform Owner dove hanno senso. */
body.gub-body {
  --gub-verde: #16a34a;
  --gub-verde-scuro: #15803d;
  --gub-verde-chiaro: #e7f7ed;
  --gub-verde-logo: #00dd66;
  --gub-bg: #f6f8fa;
  --gub-superficie: #ffffff;
  --gub-testo: #101828;
  --gub-muto: #667085;
  --gub-bordo: #e5e7eb;
  --gub-bordo-forte: #d0d5dd;
  background: var(--gub-bg);
  color: var(--gub-testo);
}
main.master { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 0; max-width: none; padding: 0; min-height: calc(100vh - 60px); background: var(--gub-bg); }

/* ── barra superiore ─────────────────────────────────────────────── */
.gub-topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  min-height: 60px; padding: 8px 20px;
  background: var(--gub-superficie);
  border-bottom: 1px solid var(--gub-bordo);
}
.gub-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; flex: 0 0 auto; }
.gub-brand-ixmas { height: 32px; width: auto; max-width: 150px; object-fit: contain; }
.gub-nav-pillole { display: flex; align-items: center; gap: 4px; }
.gub-nav-pillole a {
  padding: 7px 12px; border-radius: 8px; text-decoration: none;
  color: var(--gub-testo, var(--testo)); font-size: 14px; font-weight: 600;
}
.gub-nav-pillole a:hover { background: #f2f4f7; }
.gub-nav-pillole a.attiva { background: var(--gub-verde-chiaro, #e7f6ec); color: var(--gub-verde, #16a34a); }
.gub-progetto { display: flex; align-items: center; gap: 8px; }
.gub-progetto .etichettina { margin: 0; }
.gub-progetto select {
  width: auto; min-width: 150px; margin: 0; padding: 7px 10px;
  border: 1px solid var(--gub-bordo-forte); border-radius: 8px;
  font-size: 14px; font-weight: 600; background: var(--gub-superficie);
}
.gub-spia {
  font-size: 11px; font-weight: 700; letter-spacing: .03em;
  padding: 5px 11px; border-radius: 999px;
  background: var(--gub-verde-chiaro); color: var(--gub-verde-scuro);
  border: 1px solid #c7ecd5; white-space: nowrap;
}
.gub-spia.avviso { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.gub-ricerca { position: relative; flex: 1 1 260px; max-width: 520px; margin: 0 auto; }
.gub-ricerca.piccola { flex: 0 0 auto; width: 220px; margin: 0; }
.gub-ricerca input {
  width: 100%; margin: 0; padding: 9px 12px 9px 34px;
  border: 1px solid var(--gub-bordo-forte); border-radius: 10px;
  background: #f9fafb; font-size: 14px; color: var(--gub-testo);
}
.gub-ricerca input::placeholder { color: var(--gub-muto); }
.gub-lente {
  position: absolute; left: 11px; top: 50%; width: 11px; height: 11px;
  margin-top: -7px; border: 1.6px solid var(--gub-muto); border-radius: 50%;
}
.gub-lente::after { content: ""; position: absolute; left: 8px; top: 8px; width: 6px; height: 1.6px; background: var(--gub-muto); transform: rotate(45deg); }
.gub-strumenti { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.gub-tondo {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px; color: var(--gub-muto); text-decoration: none;
}
.gub-tondo:hover { background: #f2f4f7; color: var(--gub-testo); }
.gub-pallino-conta {
  position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 999px; background: #dc2626; color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
}
.gub-utente { position: relative; }
.gub-utente > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 9px;
  padding: 4px 8px; border-radius: 10px;
}
.gub-utente > summary::-webkit-details-marker { display: none; }
.gub-utente > summary:hover { background: #f2f4f7; }
.gub-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--gub-verde-chiaro); color: var(--gub-verde-scuro);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.gub-utente-testo { display: flex; flex-direction: column; line-height: 1.2; max-width: 210px; }
.gub-utente-testo strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gub-utente-testo small { color: var(--gub-muto); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; }
.gub-chevron { width: 8px; height: 8px; border-right: 1.6px solid var(--gub-muto); border-bottom: 1.6px solid var(--gub-muto); transform: rotate(45deg) translate(-2px, -2px); }
.gub-utente-menu {
  position: absolute; right: 0; top: 48px; min-width: 220px; z-index: 40;
  background: var(--gub-superficie); border: 1px solid var(--gub-bordo);
  border-radius: 12px; box-shadow: 0 12px 30px rgba(16,24,40,.14); padding: 6px;
}
.gub-utente-org { padding: 8px 10px; color: var(--gub-muto); font-size: 12px; }
.gub-utente-menu a, .gub-utente-menu button {
  display: block; width: 100%; text-align: left; padding: 9px 10px;
  border-radius: 8px; text-decoration: none; color: var(--gub-testo);
  font-size: 13.5px; background: none; border: 0; cursor: pointer;
}
.gub-utente-menu a:hover, .gub-utente-menu button:hover { background: #f2f4f7; }

/* ── sidebar ─────────────────────────────────────────────────────── */
.lato {
  border-right: 1px solid var(--gub-bordo, #ddd);
  padding: 14px 12px 18px;
  background: var(--gub-superficie, #fff);
  display: flex; flex-direction: column;
  position: sticky; top: 60px; align-self: start;
  height: calc(100vh - 60px); overflow: auto;
}
.lato-piede { margin-top: auto; padding-top: 18px; }
.lato-marchio { height: 20px; width: auto; max-width: 100%; object-fit: contain; display: block; margin: 0 0 6px; opacity: .9; }
.lato-stato { display: flex; align-items: center; gap: 7px; color: var(--gub-muto, #666); font-size: 12px; }
.pallino { width: 8px; height: 8px; border-radius: 50%; background: #98a2b3; display: inline-block; }
.pallino.verde { background: #22c55e; }
.pallino.ambra { background: #f59e0b; }
.pallino.arancio { background: #f97316; }
.progetto-attivo select { width: 100%; font-size: 15px; font-weight: 600; padding: 6px; margin: 4px 0; }
.etichettina { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--gub-muto, #666); }
.menu { display: flex; flex-direction: column; gap: 2px; }
.menu a {
  padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--gub-testo, inherit);
  display: flex; align-items: center; gap: 10px; font-size: 14px; min-height: 38px;
}
.menu .menu-nome { flex: 1; }
.menu a:hover { background: #f2f4f7; }
.menu a.attiva { background: var(--gub-verde-chiaro, rgba(22,163,74,.12)); color: var(--gub-verde-scuro, #15803d); font-weight: 650; }
.menu a:focus-visible, .gub-topbar a:focus-visible, .gub-pillola:focus-visible,
.gub-chevron-btn:focus-visible, .gub-cartella summary:focus-visible {
  outline: 2px solid var(--gub-verde, #16a34a); outline-offset: 2px;
}

/* ── contenuto: briciole, testata, carte, tabelle ─────────────────── */
.pannello { padding: 16px clamp(16px, 2.4vw, 30px) 28px; min-width: 0; }
.gub-briciole { display: flex; align-items: center; gap: 8px; color: var(--gub-muto, #666); font-size: 12.5px; margin-bottom: 12px; }
.gub-briciole a { color: var(--gub-muto, #666); text-decoration: none; }
.gub-briciole a:hover { color: var(--gub-verde-scuro, #15803d); }
.gub-briciole strong { color: var(--gub-testo, #111); font-weight: 600; }
.gub-hamburger { display: none; }
.testata { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 0; }
.testata-titolo { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.testata-icona {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px; flex: 0 0 46px;
  background: var(--gub-verde-chiaro, #e7f7ed); color: var(--gub-verde-scuro, #15803d);
}
.testata-icona .gub-icona { width: 22px; height: 22px; flex-basis: 22px; }
.testata h1 { margin: 0; font-size: 26px; line-height: 1.2; letter-spacing: -.01em; }
.testata-sottotitolo { margin: 3px 0 0; color: var(--gub-muto, #666); font-size: 13.5px; }
.azioni-testata { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.azioni-testata .bottone {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px; border-radius: 9px; font-size: 14px; font-weight: 600; text-decoration: none;
}
.azioni-testata .bottone.secondario-btn { background: var(--gub-superficie, #fff); color: var(--gub-testo, #111); border: 1px solid var(--gub-bordo-forte, #ccc); }
.azioni-testata .bottone.secondario-btn:hover { border-color: var(--gub-verde, #16a34a); color: var(--gub-verde-scuro, #15803d); }
.azioni-testata .bottone.primario { background: var(--gub-verde, #16a34a); color: #fff; border: 1px solid var(--gub-verde, #16a34a); }
.azioni-testata .bottone.primario:hover { background: var(--gub-verde-scuro, #15803d); }
.pannello button.primario, .pannello a.primario {
  background: var(--gub-verde, #16a34a); border-radius: 9px; font-weight: 600;
}
.pannello button.primario:hover, .pannello a.primario:hover { background: var(--gub-verde-scuro, #15803d); }
.pannello button:not(.primario):not(.link):not(.gub-pillola):not(.gub-chevron-btn) {
  background: var(--gub-superficie, #fff); color: var(--gub-testo, #111);
  border: 1px solid var(--gub-bordo-forte, #ccc); border-radius: 9px;
  padding: 8px 14px; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.pannello .riquadro h2, .pannello .carta h3 { font-size: 16.5px; margin-top: 0; }
.pannello .metriche { gap: 12px; margin-bottom: 16px; }
.pannello .metrica {
  flex: 1 1 130px; padding: 14px 16px; border-radius: 12px;
  background: var(--gub-superficie, #fff); border: 1px solid var(--gub-bordo, #e5e7eb);
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.pannello .metrica b { font-size: 26px; }
.pannello .metrica span { color: var(--gub-muto, #666); }
.pannello .riquadro, .pannello .carta {
  background: var(--gub-superficie, #fff);
  border: 1px solid var(--gub-bordo, #e5e7eb);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
  padding: 16px 18px;
}
.gub-card {
  background: var(--gub-superficie, #fff);
  border: 1px solid var(--gub-bordo, #e5e7eb);
  border-radius: 12px;
  padding: 16px 18px 12px;
  margin: 0 0 16px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.gub-card-testa { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.gub-card-testa h2 { margin: 0; font-size: 16.5px; }
.gub-card-strumenti { display: flex; align-items: center; gap: 10px; }
.gub-card-strumenti .bottone, .gub-card-strumenti button.secondario-btn {
  background: var(--gub-superficie, #fff); color: var(--gub-testo, #111);
  border: 1px solid var(--gub-bordo-forte, #ccc); border-radius: 9px;
  padding: 8px 14px; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.gub-card-strumenti .bottone:hover, .gub-card-strumenti button.secondario-btn:hover {
  border-color: var(--gub-verde, #16a34a); color: var(--gub-verde-scuro, #15803d);
}
.gub-conta { color: var(--gub-muto, #666); font-weight: 600; }
.gub-pillole { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px; margin-bottom: 12px; background: #f2f4f7; border-radius: 10px; }
.gub-pillola {
  display: inline-flex; align-items: center; gap: 7px;
  border: 0; background: none; border-radius: 8px; padding: 7px 13px;
  font-size: 13.5px; font-weight: 600; color: var(--gub-muto, #666); cursor: pointer;
}
.gub-pillola:hover { color: var(--gub-testo, #111); }
.gub-pillola.attiva { background: var(--gub-verde, #16a34a); color: #fff; }
.gub-pillola.attiva .gub-conta { color: rgba(255,255,255,.85); }
.gub-tabella-scorre { overflow-x: auto; }
.gub-card .tabella { margin: 0; }
.gub-card .tabella thead th {
  background: #f9fafb; color: var(--gub-muto, #666);
  font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  border-bottom: 1px solid var(--gub-bordo, #e5e7eb); white-space: nowrap;
}
.gub-card .tabella td { border-bottom: 1px solid var(--gub-bordo, #e5e7eb); vertical-align: top; font-size: 13.5px; }
.gub-card .tabella tbody tr:hover { background: #fbfdfc; }
.gub-piede-tabella { display: flex; justify-content: space-between; align-items: center; color: var(--gub-muto, #666); font-size: 12.5px; padding: 10px 2px 2px; }
.gub-col-chevron { width: 34px; }
.gub-chevron-btn {
  width: 22px; height: 22px; border: 0; background: none; cursor: pointer; padding: 0;
  position: relative; color: var(--gub-muto, #666);
}
.gub-chevron-btn::before {
  content: ""; position: absolute; left: 6px; top: 6px; width: 7px; height: 7px;
  border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s ease;
}
.gub-chevron-btn[aria-expanded="true"]::before { transform: rotate(45deg); }
.gub-riga-dettaglio td { background: #f9fafb; font-size: 13px; }
.visivamente-nascosto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.viva { color: #15803d; font-weight: 700; }
.priorita.alta { color: #b42318; font-weight: 700; }
.priorita.urgente { color: #b42318; font-weight: 700; }
.priorita.media { color: #b54708; font-weight: 600; }
.priorita.bassa { color: var(--gub-muto, #666); }
.gub-albero { border-top: 1px solid var(--gub-bordo, #e5e7eb); }
.gub-cartella > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 9px;
  padding: 9px 4px; border-bottom: 1px solid var(--gub-bordo, #e5e7eb); font-size: 13.5px;
}
.gub-cartella > summary::-webkit-details-marker { display: none; }
.gub-cartella > summary:hover { background: #fbfdfc; }
.gub-file { list-style: none; margin: 0; padding: 0; }
.gub-file li {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 4px 7px 26px; border-bottom: 1px solid var(--gub-bordo, #e5e7eb); font-size: 13px;
}
.gub-file-radice li { padding-left: 4px; }
.gub-nome-file { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.gub-tipo { color: var(--gub-muto, #666); font-size: 12px; }
.gub-piede {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--gub-bordo, #e5e7eb);
  color: var(--gub-muto, #666); font-size: 12.5px;
}
.gub-piede-stato { display: inline-flex; align-items: center; gap: 7px; }
.gub-nav-toggle { display: none; }

/* icone lineari: stessa tecnica della shell Platform Owner */
.gub-icona { position: relative; width: 18px; height: 18px; flex: 0 0 18px; color: currentColor; display: inline-block; }
.gub-icona::before, .gub-icona::after { content: ""; position: absolute; border-color: currentColor; background: currentColor; }
.icon-sez-dashboard::before { inset: 2px; border: 1.8px solid currentColor; background: transparent; border-radius: 50%; }
.icon-sez-dashboard::after { left: 8px; top: 4px; width: 1.8px; height: 6px; transform: rotate(35deg); transform-origin: bottom; }
.icon-sez-chat::before { left: 1px; top: 3px; right: 4px; height: 9px; border: 1.8px solid currentColor; background: transparent; border-radius: 3px; }
.icon-sez-chat::after { left: 4px; top: 12px; width: 4px; height: 4px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.icon-sez-collaudi::before { inset: 2px; border: 1.8px solid currentColor; background: transparent; border-radius: 4px; }
.icon-sez-collaudi::after { left: 5px; top: 8px; width: 6px; height: 3px; border-left: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; background: transparent; transform: rotate(-45deg); }
.icon-sez-bc::before { left: 2px; top: 3px; width: 3px; height: 3px; box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor; }
.icon-sez-bc::after { left: 8px; top: 4px; right: 2px; height: 1.6px; box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor; }
.icon-sez-imp::before { left: 3px; top: 2px; width: 12px; height: 14px; border: 1.8px solid currentColor; background: transparent; border-radius: 2px; }
.icon-sez-imp::after { left: 6px; top: 6px; width: 6px; height: 1.5px; box-shadow: 0 4px 0 currentColor; }
.icon-sez-commesse::before { left: 3px; top: 2px; width: 12px; height: 4px; border: 1.6px solid currentColor; background: transparent; border-radius: 2px; }
.icon-sez-commesse::after { left: 3px; top: 8px; width: 12px; height: 8px; border: 1.6px solid currentColor; background: transparent; border-radius: 2px; }
.icon-sez-workspace::before, .icon-cartella::before { left: 2px; top: 4px; width: 14px; height: 11px; border: 1.7px solid currentColor; background: transparent; border-radius: 2px; }
.icon-sez-workspace::after, .icon-cartella::after { left: 2px; top: 2px; width: 6px; height: 3px; border-radius: 2px 2px 0 0; }
.icon-file::before { left: 3px; top: 2px; width: 11px; height: 14px; border: 1.6px solid currentColor; background: transparent; border-radius: 2px; }
.icon-file::after { left: 6px; top: 7px; width: 5px; height: 1.4px; box-shadow: 0 3px 0 currentColor; }
.icon-sez-blocchi::before { inset: 2px; border: 1.8px solid currentColor; background: transparent; border-radius: 50%; }
.icon-sez-blocchi::after { left: 4px; top: 8px; width: 10px; height: 1.8px; transform: rotate(-45deg); }
.icon-sez-modifiche::before { left: 3px; top: 10px; width: 11px; height: 1.8px; transform: rotate(-45deg); }
.icon-sez-modifiche::after { left: 12px; top: 2px; width: 4px; height: 4px; transform: rotate(45deg); }
.icon-sez-nuovo-lavoro::before { left: 8px; top: 2px; width: 1.8px; height: 14px; }
.icon-sez-nuovo-lavoro::after { left: 2px; top: 8px; width: 14px; height: 1.8px; }
.icon-sez-connessione::before { left: 1px; right: 1px; top: 8px; height: 1.6px; }
.icon-sez-connessione::after { width: 5px; height: 5px; border-radius: 50%; left: 1px; top: 6px; box-shadow: 11px 0 0 currentColor; }
.icon-sez-schedulazione::before { inset: 2px; border: 1.8px solid currentColor; background: transparent; border-radius: 50%; }
.icon-sez-schedulazione::after { left: 8px; top: 5px; width: 1.6px; height: 5px; box-shadow: 2px 4px 0 -0.5px currentColor; }
.icon-sez-utilizzo-ai::before { left: 3px; bottom: 2px; width: 3px; height: 6px; box-shadow: 5px -4px 0 currentColor, 10px -8px 0 currentColor; }
.icon-sez-utilizzo-ai::after { left: 1px; bottom: 1px; right: 1px; height: 1.4px; }
.icon-sez-sessioni::before { left: 1px; top: 2px; width: 11px; height: 8px; border: 1.6px solid currentColor; background: transparent; border-radius: 3px; }
.icon-sez-sessioni::after { left: 6px; top: 8px; width: 11px; height: 8px; border: 1.6px solid currentColor; background: var(--gub-superficie, #fff); border-radius: 3px; }
.icon-sez-futuri::before { inset: 2px; border: 1.8px solid currentColor; background: transparent; border-radius: 50%; }
.icon-sez-futuri::after { left: 8px; top: 5px; width: 1.6px; height: 5px; }
.icon-campana::before { left: 4px; top: 2px; width: 10px; height: 10px; border: 1.7px solid currentColor; background: transparent; border-radius: 5px 5px 0 0; }
.icon-campana::after { left: 2px; top: 12px; width: 14px; height: 1.7px; box-shadow: -5px 3px 0 -4px currentColor; }
.icon-griglia::before { left: 2px; top: 2px; width: 3px; height: 3px; box-shadow: 5px 0 0 currentColor, 10px 0 0 currentColor, 0 5px 0 currentColor, 5px 5px 0 currentColor, 10px 5px 0 currentColor, 0 10px 0 currentColor, 5px 10px 0 currentColor, 10px 10px 0 currentColor; }
.icon-aggiorna::before { inset: 2px; border: 1.7px solid currentColor; background: transparent; border-radius: 50%; clip-path: polygon(0 0, 100% 0, 100% 60%, 50% 60%, 50% 100%, 0 100%); }
.icon-aggiorna::after { right: 1px; top: 1px; width: 5px; height: 5px; clip-path: polygon(100% 0, 100% 100%, 0 0); }

.pannello .stato { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pannello .stato.attesa_master { background: #fef3c7; color: #92400e; }
.pannello .stato.bloccato { background: #fee2e2; color: #b42318; }
.pannello .stato.in_lavorazione { background: #dbeafe; color: #1d4ed8; }
.pannello .stato.attesa_agente { background: #f2f4f7; color: #475467; }
.pannello .stato.chiuso { background: var(--gub-verde-chiaro, #e7f7ed); color: var(--gub-verde-scuro, #15803d); opacity: 1; }
.pannello .stato[class*="imp-da-valutare"] { background: #dbeafe; color: #1d4ed8; }
.pannello .stato[class*="imp-completato"] { background: var(--gub-verde-chiaro, #e7f7ed); color: var(--gub-verde-scuro, #15803d); }
.pannello .stato[class*="imp-bloccato"], .pannello .stato[class*="imp-non-approvato"] { background: #fee2e2; color: #b42318; }
.pannello .stato[class*="imp-verifica"] { background: #fef3c7; color: #92400e; }
.badge.grigio { background: #f2f4f7; color: #475467; text-decoration: none; }
.badge.rosso { background: #fee2e2; color: #b42318; }
.spia { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 10px; margin-left: 8px; vertical-align: middle; }
.spia.ok { background: rgba(26,127,55,.18); color: #1a7f37; } .spia.avviso { background: rgba(180,83,9,.18); color: #b45309; }
.badge { font-size: 11px; background: #b45309; color: #fff; border-radius: 10px; padding: 1px 7px; margin-left: 6px; }
.metriche { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.metrica { min-width: 110px; padding: 10px 14px; border: 1px solid var(--bordo, #ddd); border-radius: 8px; }
.metrica b { font-size: 24px; display: block; } .metrica span { font-size: 12px; color: var(--secondario, #666); }
.metrica.rosso b { color: #c62828; } .metrica.arancio b { color: #b45309; }
.stato { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 9px; background: rgba(127,127,127,.15); }
.stato.bloccato { background: rgba(198,40,40,.18); color: #c62828; } .stato.attesa_master { background: rgba(180,83,9,.18); color: #b45309; }
.stato.in_lavorazione { background: rgba(43,95,217,.16); color: #2b5fd9; } .stato.chiuso { opacity: .7; }
.carta { border: 1px solid var(--bordo, #ddd); border-radius: 8px; padding: 12px 14px; margin: 10px 0; }
.carta h3, .carta summary { margin: 0 0 6px; font-size: 15px; }
.azioni { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.azioni input[type=text] { min-width: 220px; }
.elenco { list-style: none; padding: 0; } .elenco li { padding: 4px 0; border-bottom: 1px solid rgba(127,127,127,.15); }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; } .piccolo { font-size: 12px; }
tr.chiusa { opacity: .6; }
.modulo label { display: block; margin: 10px 0; } .modulo input, .modulo textarea, .modulo select { width: 100%; }
.scelte { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.scelta { display: block; padding: 14px 16px; border: 1px solid var(--bordo, #ddd); border-radius: 8px; text-decoration: none; color: inherit; }
.scelta:hover { border-color: #2b5fd9; } .scelta strong { display: block; margin-bottom: 4px; } .scelta span { color: var(--secondario, #666); font-size: 13px; }
.riquadro { border: 1px solid var(--bordo, #ddd); border-radius: 8px; padding: 12px 16px; margin: 14px 0; }
.passi { font-size: 12px; color: var(--secondario, #666); text-transform: uppercase; letter-spacing: .04em; }
.bottone.piccolo { padding: 5px 10px; font-size: 12px; }
@media (max-width: 980px) {
  main.master { grid-template-columns: minmax(0, 1fr); }
  .gub-hamburger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 30px; margin-right: 4px; cursor: pointer;
    border: 1px solid var(--gub-bordo-forte, #ccc); border-radius: 8px;
  }
  .gub-hamburger span, .gub-hamburger span::before, .gub-hamburger span::after {
    content: ""; display: block; width: 14px; height: 1.8px; border-radius: 2px; background: currentColor;
  }
  .gub-hamburger span { position: relative; }
  .gub-hamburger span::before, .gub-hamburger span::after { position: absolute; left: 0; }
  .gub-hamburger span::before { top: -4.5px; }
  .gub-hamburger span::after { top: 4.5px; }
  .lato {
    position: fixed; inset: 60px auto 0 0; width: min(80vw, 300px); height: calc(100vh - 60px);
    z-index: 25; transform: translateX(-100%); transition: transform .18s ease;
    box-shadow: 14px 0 30px rgba(16,24,40,.12);
  }
  .gub-nav-toggle:checked + .lato { transform: translateX(0); }
  .gub-ricerca { order: 9; flex-basis: 100%; max-width: none; margin: 0; }
  .gub-topbar { flex-wrap: wrap; row-gap: 8px; }
  .gub-utente-testo { display: none; }
}
@media (max-width: 620px) {
  .gub-brand-ixmas { height: 26px; }
  .gub-progetto .etichettina { display: none; }
  .testata h1 { font-size: 21px; }
}

/* BC-211/227: Console Platform Owner */
body.admin-body {
  background: #f5f7fb;
  color: #172033;
}
main.admin-shell {
  --admin-bg: #f5f7fb;
  --admin-surface: #ffffff;
  --admin-surface-soft: #eef3fb;
  --admin-text: #172033;
  --admin-muted: #657188;
  --admin-border: #d8e0ec;
  --admin-accent: #2f65d9;
  --admin-accent-soft: #e8efff;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 0;
  max-width: none;
  padding: 0;
  min-height: 100vh;
  background: var(--admin-bg);
  color: var(--admin-text);
}
.admin-nav-toggle { display: none; }
.admin-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid var(--admin-border);
  padding: 18px 14px 22px;
  background: #fbfcff;
  display: flex;
  flex-direction: column;
}
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 14px; }
.admin-brand-mark {
  height: 32px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}
.admin-brand strong { display: block; font-size: 15px; line-height: 1.2; }
.admin-brand span { display: block; color: var(--admin-muted); font-size: 12px; }
.admin-back {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 48px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  color: var(--admin-text);
  text-decoration: none;
  background: var(--admin-surface);
  font-size: 13px;
  font-weight: 600;
}
.admin-back { width: 100%; margin-top: auto; padding: 0 12px; }
.admin-back:hover { border-color: var(--admin-accent); color: var(--admin-accent); }
.admin-nav { display: flex; flex-direction: column; gap: 18px; margin-top: 4px; padding-bottom: 22px; }
.admin-nav-group { display: flex; flex-direction: column; gap: 4px; }
.admin-nav-label {
  padding: 0 10px 3px;
  color: var(--admin-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--admin-text);
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 560;
}
.admin-nav a.attiva {
  background: var(--admin-accent-soft);
  color: #1747a6;
  box-shadow: inset 3px 0 0 var(--admin-accent);
}
.admin-nav a:hover { background: #edf2fa; color: #1747a6; }
.admin-icona {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: currentColor;
}
.admin-icona::before, .admin-icona::after {
  content: "";
  position: absolute;
  border-color: currentColor;
  background: currentColor;
}
.icon-home::before { inset: 3px; border: 2px solid currentColor; background: transparent; border-radius: 4px; }
.icon-network::before { left: 2px; right: 2px; top: 8px; height: 2px; }
.icon-network::after { width: 6px; height: 6px; border-radius: 50%; box-shadow: 10px 0 0 currentColor; left: 1px; top: 6px; }
.icon-ai::before { inset: 2px; border: 2px solid currentColor; background: transparent; border-radius: 50%; }
.icon-ai::after { width: 4px; height: 4px; border-radius: 50%; left: 7px; top: 7px; }
.icon-payments::before { left: 4px; right: 4px; top: 4px; bottom: 4px; border: 2px solid currentColor; background: transparent; border-radius: 3px; }
.icon-payments::after { left: 5px; right: 5px; top: 8px; height: 2px; }
.icon-plans::before, .icon-subscriptions::before { inset: 3px; border: 2px solid currentColor; background: transparent; border-radius: 3px; }
.icon-plans::after { left: 6px; right: 6px; top: 5px; bottom: 5px; border-left: 2px solid currentColor; border-right: 2px solid currentColor; background: transparent; }
.icon-subscriptions::after { left: 5px; right: 5px; top: 7px; height: 2px; box-shadow: 0 4px 0 currentColor; }
.icon-organizations::before { width: 6px; height: 6px; border-radius: 50%; left: 6px; top: 2px; box-shadow: -5px 8px 0 currentColor, 5px 8px 0 currentColor; }
.icon-users::before { width: 7px; height: 7px; border-radius: 50%; left: 5px; top: 2px; }
.icon-users::after { left: 3px; right: 3px; bottom: 3px; height: 7px; border-radius: 8px 8px 3px 3px; }
/* BC-251: la busta della sezione Email — stesso stile a due pseudo-elementi
   delle altre voci di sidebar, nessuna icona esterna da caricare. */
.icon-email::before { left: 2px; top: 4px; right: 2px; bottom: 4px; border: 2px solid currentColor; background: transparent; border-radius: 3px; }
.icon-email::after { left: 4px; top: 4px; width: 7px; height: 7px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; background: transparent; transform: rotate(-45deg); }
.icon-secrets::before { left: 4px; top: 7px; width: 10px; height: 8px; border-radius: 3px; }
.icon-secrets::after { left: 6px; top: 2px; width: 6px; height: 7px; border: 2px solid currentColor; background: transparent; border-radius: 8px 8px 0 0; }
.icon-audit::before { left: 3px; right: 3px; top: 4px; height: 2px; box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor; }
.icon-system::before { inset: 3px; border: 2px solid currentColor; background: transparent; border-radius: 50%; }
.icon-system::after { left: 8px; top: 1px; width: 2px; height: 16px; transform: rotate(45deg); }
.icon-back::before { left: 3px; top: 8px; width: 13px; height: 2px; }
.icon-back::after { left: 3px; top: 5px; width: 7px; height: 7px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; background: transparent; transform: rotate(45deg); }
.admin-content {
  min-width: 0;
  padding: 22px clamp(20px, 4vw, 48px) 56px;
  color: var(--admin-text);
}
.admin-topbar-left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.admin-product {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--admin-text);
  text-decoration: none;
  white-space: nowrap;
}
.admin-product:hover { color: var(--admin-accent); }
.admin-product-mark {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.admin-product strong { display: block; font-size: 14px; line-height: 1.05; }
.admin-product small { display: block; color: var(--admin-muted); font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.admin-hamburger {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
  color: var(--admin-text);
  font-weight: 650;
  cursor: pointer;
}
.admin-hamburger span,
.admin-hamburger span::before,
.admin-hamburger span::after {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}
.admin-hamburger span { position: relative; }
.admin-hamburger span::before,
.admin-hamburger span::after { position: absolute; left: 0; }
.admin-hamburger span::before { top: -5px; }
.admin-hamburger span::after { top: 5px; }
.admin-topbar {
  min-height: 58px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: -22px calc(clamp(20px, 4vw, 48px) * -1) 24px;
  padding: 10px clamp(20px, 4vw, 48px);
  border-bottom: 1px solid var(--admin-border);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 4;
}
.admin-topbar-right { display: flex; align-items: center; gap: 14px; }
.admin-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #e9f8ee;
  color: #137a32;
  font-size: 13px;
  font-weight: 650;
}
.admin-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; }
.admin-account { display: flex; flex-direction: column; line-height: 1.15; }
.admin-account strong { font-size: 13px; }
.admin-account small { color: var(--admin-muted); font-size: 12px; }
.admin-logout { color: var(--admin-muted); }
.admin-alert { padding: 10px 12px; border-radius: 8px; background: var(--admin-surface); border: 1px solid var(--admin-border); }
.breadcrumb { color: var(--admin-muted); font-size: 12px; }
.breadcrumb a { color: var(--admin-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--admin-accent); }
.testata-admin {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  border-bottom: 1px solid var(--admin-border);
  padding-bottom: 16px;
  margin-bottom: 18px;
}
.testata-admin h1 { font-size: 28px; line-height: 1.15; margin-bottom: 5px; color: var(--admin-text); }
.admin-grid, .cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.admin-grid.compact { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.admin-overview-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.admin-panel, .admin-tile, .admin-card, .admin-status-band, .metrica {
  border: 1px solid var(--admin-border);
  background: var(--admin-surface);
  box-shadow: 0 1px 2px rgba(23,32,51,.04);
}
.admin-panel { border-radius: 8px; padding: 16px; }
.admin-panel h2 { margin: 0 0 12px; font-size: 16px; }
.admin-tile {
  border-radius: 8px;
  padding: 14px;
  color: var(--admin-text);
  text-decoration: none;
}
.admin-tile:hover { border-color: var(--admin-accent); background: #fbfdff; }
.admin-tile strong { display: block; margin-bottom: 4px; }
.admin-tile span { color: var(--admin-muted); font-size: 13px; }
.admin-card { position: relative; min-height: 210px; border-radius: 8px; }
.admin-status-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.admin-status-band > div { display: flex; align-items: center; gap: 10px; }
.admin-status-band p { margin: 0; }
.admin-metriche { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.admin-health-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.admin-health-list li {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--admin-border);
}
.admin-health-list li:last-child { border-bottom: 0; }
.admin-health-list strong { font-weight: 650; }
.admin-health-list li > span:last-child { color: var(--admin-muted); font-size: 13px; }
.admin-alert-list { display: flex; flex-direction: column; gap: 10px; }
.admin-notice {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border: 1px solid #dce6f5;
  border-radius: 8px;
  padding: 13px 14px;
  background: #f3f7fd;
}
.admin-notice.ok { border-color: #ccefd8; background: #eefaf2; }
.admin-notice span { color: var(--admin-muted); font-size: 13px; }
.card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.card-head p { margin: 3px 0 0; }
.admin-popover { min-width: 0; }
.admin-popover > summary {
  list-style: none;
  cursor: pointer;
  display: inline-block;
  padding: 9px 16px;
  border-radius: 8px;
  background: var(--admin-accent, #2f65d9);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
}
.admin-popover > summary::-webkit-details-marker { display: none; }
main.admin-shell .admin-popover[open]::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .38);
  z-index: 60;
}
main.admin-shell .admin-popover[open] > summary {
  position: fixed;
  top: 22px;
  right: min(420px, 92vw);
  transform: translateX(calc(100% + 14px));
  z-index: 62;
  background: transparent;
  color: #fff;
}
.admin-form {
  margin-top: 12px;
  min-width: 280px;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 14px;
}
main.admin-shell .admin-popover[open] > .admin-form {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(420px, 92vw);
  margin: 0;
  border-radius: 0;
  border: 0;
  border-left: 1px solid var(--admin-border);
  box-shadow: -12px 0 28px rgba(15, 23, 42, .18);
  overflow-y: auto;
  padding: 24px 22px 90px;
  z-index: 61;
  animation: admin-drawer-in .16s ease-out;
}
@keyframes admin-drawer-in {
  from { transform: translateX(24px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.admin-drawer-titolo { font-size: 17px; font-weight: 700; margin: 0 0 4px; color: var(--admin-text); }
.admin-drawer-azioni { display: flex; gap: 10px; margin-top: 16px; }
.admin-drawer-azioni .link { color: var(--admin-muted); background: none; border: 1px solid var(--admin-border); border-radius: 8px; padding: 8px 14px; cursor: pointer; }
.admin-empty {
  border: 1px dashed var(--admin-border);
  border-radius: 10px;
  padding: 40px 20px;
  text-align: center;
  color: var(--admin-muted);
  background: var(--admin-surface);
  margin-top: 16px;
}
.admin-empty strong { display: block; color: var(--admin-text); font-size: 15px; margin-bottom: 4px; }
.admin-outcome { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 9px; letter-spacing: .02em; }
.admin-outcome.success { background: rgba(26,127,55,.14); color: #1a7f37; }
.admin-outcome.denied { background: rgba(198,40,40,.14); color: #c62828; }
.admin-outcome.error { background: rgba(198,40,40,.14); color: #c62828; }
.admin-outcome.warning { background: rgba(180,83,9,.14); color: #b45309; }
.admin-outcome.info { background: rgba(43,95,217,.12); color: #2b5fd9; }
main.admin-shell .secondario,
main.admin-shell .nota,
main.admin-shell .vuoto,
main.admin-shell .inline-dl dt { color: var(--admin-muted); }
main.admin-shell .carta { border-color: var(--admin-border); background: var(--admin-surface); }
main.admin-shell .metrica { border-radius: 8px; padding: 12px 14px; }
main.admin-shell .metrica b { color: var(--admin-text); }
main.admin-shell .metrica span { color: var(--admin-muted); }
main.admin-shell .metrica.rosso b { color: #c62828; }
main.admin-shell .metrica.arancio b { color: #b45309; }
main.admin-shell .tabella th,
main.admin-shell .tabella td,
main.admin-shell .tabella-utenti th,
main.admin-shell .tabella-utenti td { border-bottom-color: var(--admin-border); }
main.admin-shell a { color: #235bbf; }
main.admin-shell .admin-nav a,
main.admin-shell .admin-tile,
main.admin-shell .admin-back { color: inherit; }
main.admin-shell input[type="email"],
main.admin-shell input[type="password"],
main.admin-shell input[type="text"],
main.admin-shell select,
main.admin-shell textarea {
  background: #fff;
  border-color: var(--admin-border);
  color: var(--admin-text);
}
select, textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px 10px;
  background: #ffffff;
  border: 1px solid var(--bordo);
  border-radius: 8px;
  color: var(--testo);
  font-size: 14px;
}
.filtri { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 16px; align-items: flex-end; }
.filtri select { width: auto; min-width: 180px; }
.filtri button, .menu-progetto button, .menu-progetto a {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--testo);
  text-decoration: none;
  padding: 7px 9px;
  cursor: pointer;
}
.menu-progetto { position: absolute; right: 10px; bottom: 10px; }
.menu-progetto summary { cursor: pointer; color: var(--secondario); }
.menu-progetto[open] { background: var(--card); border: 1px solid var(--bordo); border-radius: 8px; padding: 6px; z-index: 2; min-width: 150px; }
main.admin-shell .filtri button,
main.admin-shell .menu-progetto button,
main.admin-shell .menu-progetto a { color: var(--admin-text); }
main.admin-shell .menu-progetto[open] { background: var(--admin-surface); border-color: var(--admin-border); }
.stato.unknown { background: rgba(101,113,136,.14); color: #657188; }
.stato.online, .stato.ok, .stato.configured { background: rgba(26,127,55,.14); color: #1a7f37; }
.stato.offline, .stato.down, .stato.revoked { background: rgba(180,83,9,.16); color: #b45309; }
.stato.error, .stato.degraded { background: rgba(198,40,40,.14); color: #c62828; }
@media (max-width: 900px) {
  main.admin-shell { grid-template-columns: 1fr; }
  .admin-hamburger { display: inline-flex; }
  .admin-product { display: none; }
  .admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(84vw, 320px);
    height: 100vh;
    z-index: 20;
    transform: translateX(-100%);
    transition: transform .18s ease;
    border-right: 1px solid var(--admin-border);
    border-bottom: 0;
    box-shadow: 16px 0 34px rgba(23,32,51,.14);
  }
  .admin-nav-toggle:checked + .admin-sidebar { transform: translateX(0); }
  .admin-back { margin-top: 12px; }
  .admin-nav { gap: 12px; }
  .admin-overview-grid { grid-template-columns: 1fr; }
  .admin-topbar { position: static; align-items: flex-start; flex-direction: column; margin-top: -22px; }
  .admin-topbar-left { width: 100%; justify-content: space-between; }
  .admin-topbar-right { flex-wrap: wrap; }
}

/* BC-196 */
.inline-dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 8px 0; }
.inline-dl dt { margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--secondario, #666); align-self: center; }
.inline-dl dd { margin: 0; font-size: 13px; }
/* BC-251: pagina Email. L'esito negativo si vede senza leggere la frase, e
   il dettaglio tecnico resta chiuso finche' qualcuno non lo chiede. */
.esito-ko { color: #c62828; }
.dettaglio-tecnico { margin-top: 10px; font-size: 12px; }
.dettaglio-tecnico summary { cursor: pointer; color: var(--secondario, #666); }
.dettaglio-tecnico pre {
  margin: 8px 0 0;
  padding: 8px 10px;
  background: rgba(101,113,136,.10);
  border-radius: 6px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 11.5px;
}
.carta.in-corso { opacity: .7; }

.pericolo-link { color: #c62828; display: inline-block; margin-top: 6px; }
button.pericolo { background: #c62828; color: #fff; border: 0; padding: 8px 14px; border-radius: 6px; }

/* BC-228: menu azioni standard (sostituisce la freccina "..." di .menu-progetto
   sulla pagina Intelligenza Artificiale — area cliccabile vera, icona+testo,
   azioni distruttive in rosso, voci disabilitate spiegate). */
.admin-kebab { position: relative; }
.admin-kebab > summary {
  list-style: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  color: var(--admin-muted, var(--secondario));
  border: 1px solid transparent;
}
.admin-kebab > summary::-webkit-details-marker { display: none; }
.admin-kebab > summary:hover { background: var(--admin-surface-soft, rgba(127,127,127,.12)); color: var(--admin-text, inherit); }
.admin-kebab > summary:focus-visible { outline: 2px solid var(--admin-accent, #2f65d9); outline-offset: 1px; }
.admin-kebab[open] > summary { background: var(--admin-surface-soft, rgba(127,127,127,.12)); border-color: var(--admin-border, var(--bordo)); }
.admin-kebab-menu {
  position: absolute;
  right: 0;
  top: 38px;
  background: var(--admin-surface, var(--card));
  border: 1px solid var(--admin-border, var(--bordo));
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15,23,42,.14);
  min-width: 240px;
  padding: 6px;
  z-index: 50;
}
.admin-kebab-menu form,
.admin-kebab-menu > details { margin: 0; }
.admin-kebab-menu button,
.admin-kebab-menu summary {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 9px 10px;
  border-radius: 7px;
  font-size: 13.5px;
  color: var(--admin-text, inherit);
  cursor: pointer;
  list-style: none;
}
.admin-kebab-menu summary::-webkit-details-marker { display: none; }
.admin-kebab-menu button:hover,
.admin-kebab-menu summary:hover { background: var(--admin-surface-soft, rgba(127,127,127,.1)); }
.admin-kebab-menu button:focus-visible,
.admin-kebab-menu summary:focus-visible { outline: 2px solid var(--admin-accent, #2f65d9); outline-offset: -2px; }
.admin-kebab-menu button:disabled { color: var(--admin-muted, #999); cursor: not-allowed; opacity: .55; }
.admin-kebab-menu button:disabled:hover { background: none; }
.admin-kebab-menu summary.pericolo,
.admin-kebab-menu button.pericolo { color: #c62828; }
.admin-kebab-menu summary.pericolo:hover { background: rgba(198,40,40,.08); }
.admin-kebab-sep { height: 1px; background: var(--admin-border, var(--bordo)); margin: 6px 4px; }
.admin-kebab-sub[open] > summary { background: var(--admin-surface-soft, rgba(127,127,127,.1)); }
.admin-kebab-form { padding: 8px 10px 4px; }
.admin-kebab-form label { font-size: 12px; margin: 8px 0; }
.admin-kebab-form input, .admin-kebab-form select { font-size: 13px; padding: 6px 8px; }

.admin-ai-card { position: relative; }
.admin-ai-card-azioni { display: flex; align-items: center; gap: 8px; }
.admin-ai-endpoint { display: flex; align-items: baseline; gap: 6px; margin: 10px 0 8px; flex-wrap: wrap; }
.admin-ai-endpoint code { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; background: var(--admin-surface-soft, rgba(127,127,127,.08)); padding: 2px 6px; border-radius: 5px; }
.admin-ai-foot { display: flex; justify-content: space-between; align-items: center; margin: 6px 0 8px; font-size: 13px; }
.admin-ai-modelli summary { cursor: pointer; color: var(--admin-accent, #2f65d9); }
.admin-ai-modelli .badge { background: var(--admin-accent-soft, #e8efff); color: var(--admin-accent, #2f65d9); }

/* BC-234: pannello Chat — vive dentro .pannello della Master Console e ne
   riusa colori, bordi e tipografia. Nessun tema proprio. */
.chat { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; align-items: stretch; }
.chat.lato-chiuso { grid-template-columns: 28px minmax(0, 1fr); }
.chat-lato { border: 1px solid var(--bordo, #ddd); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.chat-lato-testa { display: flex; gap: 6px; align-items: center; }
.chat-nuova { flex: 1; }
.chat-comprimi, .chat-espandi { border: 1px solid var(--bordo, #ddd); background: none; border-radius: 6px; cursor: pointer; padding: 4px 7px; color: inherit; }
.chat-espandi { align-self: start; }
.chat-cerca span { display: block; margin-bottom: 2px; }
.chat-cerca input { width: 100%; }
.chat-elenco { list-style: none; padding: 0; margin: 0; overflow: auto; max-height: 52vh; }
.chat-elenco li { border-bottom: 1px solid rgba(127,127,127,.15); }
.chat-elenco a { display: block; padding: 7px 8px; border-radius: 6px; text-decoration: none; color: inherit; }
.chat-elenco a.attiva { background: rgba(43,95,217,.16); font-weight: 600; }
.chat-voce-titolo { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-corpo { display: flex; flex-direction: column; min-width: 0; gap: 10px; }
.chat-barra { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.chat-campo { display: flex; flex-direction: column; min-width: 160px; }
.chat-stato { font-size: 12px; margin-left: auto; }
.chat-stato.attesa { color: var(--secondario, #666); }
.chat-stato.attesa::before { content: "◌ "; }
.chat-stato.ok { color: #1a7f37; }
.chat-stato.errore { color: var(--errore, #c62828); }
.chat-messaggi { border: 1px solid var(--bordo, #ddd); border-radius: 8px; padding: 12px; min-height: 320px; max-height: 58vh; overflow: auto; background: var(--card, #fff); }
.chat-bolla { border: 1px solid var(--bordo, #ddd); border-radius: 10px; padding: 9px 12px; margin: 0 0 10px; max-width: 82%; }
.chat-bolla.mia { margin-left: auto; background: rgba(43,95,217,.10); }
.chat-bolla.sua { background: rgba(127,127,127,.06); }
.chat-bolla.in-attesa { color: var(--secondario, #666); font-style: italic; }
.chat-bolla.in-errore { border-color: var(--errore, #c62828); }
.chat-mittente { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--secondario, #666); margin-bottom: 4px; }
.chat-testo { white-space: pre-wrap; word-wrap: break-word; }
.chat-dettaglio summary { cursor: pointer; color: var(--accento, #2f65d9); margin-top: 6px; }
.chat-azioni { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.chat-invio { display: flex; gap: 8px; align-items: flex-end; }
.chat-invio textarea { flex: 1; resize: vertical; }
.chat-modale { border: 1px solid var(--bordo, #ddd); border-radius: 10px; padding: 18px 20px; max-width: 560px; width: 92%; }
.chat-modale h2 { margin-top: 0; }
.chat-modale label { display: block; margin: 10px 0; }
.chat-modale input, .chat-modale textarea, .chat-modale select { width: 100%; }
.chat-modale::backdrop { background: rgba(0,0,0,.35); }
@media (max-width: 860px) {
  .chat, .chat.lato-chiuso { grid-template-columns: minmax(0, 1fr); }
  .chat-elenco { max-height: 30vh; }
  .chat-bolla { max-width: 100%; }
  .chat-stato { margin-left: 0; }
}

/* ── BC-244: pagina Progetti — stesso vocabolario della Console (BC-242),
   piu' il menu ⋮ per riga e lo stato vuoto. Il verde e' quello di casa:
   sfiorato = verde chiaro, aperto = verde pieno con i punti bianchi. ── */
main.pannello { max-width: 1160px; margin: 0 auto; padding: 22px clamp(16px, 3vw, 34px) 44px; }
.gub-nome-progetto { font-weight: 650; color: var(--gub-testo, #111); text-decoration: none; }
.gub-nome-progetto:hover { color: var(--gub-verde-scuro, #15803d); text-decoration: underline; }
.gub-stato {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .02em;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.gub-stato.verde { background: var(--gub-verde-chiaro, #e7f7ed); color: var(--gub-verde-scuro, #15803d); }
.gub-stato.grigio { background: #f2f4f7; color: #475467; }
.gub-col-azioni { width: 52px; text-align: right; }
.gub-card .tabella td.gub-col-azioni { vertical-align: middle; }

.gub-avviso {
  border: 1px solid var(--gub-bordo, #e5e7eb); border-radius: 10px;
  background: var(--gub-superficie, #fff); padding: 11px 14px; margin: 0 0 14px;
  font-size: 13.5px;
}
.gub-avviso.errore { border-color: #fecdca; background: #fef3f2; color: #b42318; }
.gub-avviso.successo { border-color: #abefc6; background: var(--gub-verde-chiaro, #e7f7ed); color: var(--gub-verde-scuro, #15803d); }

.gub-kebab { position: relative; display: inline-block; }
.gub-kebab > summary {
  list-style: none; cursor: pointer; width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid transparent; color: var(--gub-muto, #667085);
}
.gub-kebab > summary::-webkit-details-marker { display: none; }
.gub-kebab-punti { position: relative; display: block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.gub-kebab-punti::before, .gub-kebab-punti::after {
  content: ""; position: absolute; left: 0; width: 3px; height: 3px; border-radius: 50%; background: currentColor;
}
.gub-kebab-punti::before { top: -5px; }
.gub-kebab-punti::after { top: 5px; }
.gub-kebab > summary:hover { background: var(--gub-verde-chiaro, #e7f7ed); color: var(--gub-verde-scuro, #15803d); }
.gub-kebab > summary:focus-visible { outline: 2px solid var(--gub-verde, #16a34a); outline-offset: 1px; }
.gub-kebab[open] > summary { background: var(--gub-verde, #16a34a); color: #fff; border-color: var(--gub-verde, #16a34a); }
.gub-kebab-menu {
  position: absolute; right: 0; top: 38px; text-align: left;
  background: var(--gub-superficie, #fff); border: 1px solid var(--gub-bordo, #e5e7eb);
  border-radius: 10px; box-shadow: 0 12px 30px rgba(16,24,40,.14);
  min-width: 190px; padding: 6px; z-index: 60;
}
.gub-kebab-menu form { margin: 0; }
.gub-kebab-menu a, .gub-kebab-menu button {
  display: block; width: 100%; text-align: left; box-sizing: border-box;
  background: none; border: 0; padding: 8px 10px; border-radius: 7px;
  font: inherit; font-size: 13.5px; color: var(--gub-testo, #111);
  text-decoration: none; cursor: pointer;
}
.gub-kebab-menu a:hover, .gub-kebab-menu button:hover { background: var(--gub-verde-chiaro, #e7f7ed); color: var(--gub-verde-scuro, #15803d); }
.gub-kebab-menu a:focus-visible, .gub-kebab-menu button:focus-visible { outline: 2px solid var(--gub-verde, #16a34a); outline-offset: -2px; }
.gub-kebab-sep { height: 1px; background: var(--gub-bordo, #e5e7eb); margin: 6px 4px; }
.gub-kebab-menu a.pericolo, .gub-kebab-menu button.pericolo { color: #b42318; }
.gub-kebab-menu a.pericolo:hover, .gub-kebab-menu button.pericolo:hover { background: #fef3f2; color: #b42318; }
/* Il pannello dà a ogni button un bordo: qui le voci sono righe di menu. */
.pannello .gub-kebab-menu button:not(.primario):not(.link) { border: 0; background: none; padding: 8px 10px; }
.pannello .gub-kebab-menu button:not(.primario):not(.link):hover { background: var(--gub-verde-chiaro, #e7f7ed); }

.gub-vuoto { text-align: center; padding: 34px 16px 30px; color: var(--gub-muto, #667085); }
.gub-vuoto-icona {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 12px;
  background: var(--gub-verde-chiaro, #e7f7ed); color: var(--gub-verde-scuro, #15803d);
}
.gub-vuoto-icona .gub-icona { width: 22px; height: 22px; flex-basis: 22px; }
.gub-vuoto-titolo { margin: 0 0 4px; font-size: 15.5px; font-weight: 650; color: var(--gub-testo, #111); }
.gub-vuoto-testo { margin: 0 0 16px; font-size: 13.5px; max-width: 460px; margin-left: auto; margin-right: auto; }

/* ── BC-244: eliminazione progetto — la stessa carta, e il modulo di
   conferma sempre visibile: non dipende piu' da un onclick. ── */
.gub-elimina { max-width: 720px; margin: 0 auto; }
.gub-elimina .scelta { border-radius: 10px; border-color: var(--gub-bordo, #e5e7eb); background: var(--gub-superficie, #fff); }
.gub-elimina .scelta:hover { border-color: var(--gub-verde, #16a34a); }
.gub-elimina .scelta.consigliata { border-color: var(--gub-verde, #16a34a); box-shadow: 0 0 0 1px var(--gub-verde-chiaro, #e7f7ed); }
.gub-etichetta-consigliata { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: var(--gub-verde-chiaro, #e7f7ed); color: var(--gub-verde-scuro, #15803d); border-radius: 999px; padding: 2px 8px; margin-left: 8px; }
.gub-conferma { margin-top: 18px; }
.gub-conferma label { display: block; font-size: 13.5px; margin-bottom: 10px; }
.gub-conferma input { display: block; width: 100%; box-sizing: border-box; margin-top: 6px; padding: 8px 10px; border: 1px solid var(--gub-bordo-forte, #d0d5dd); border-radius: 8px; font: inherit; }
button.pericolo, .pannello button.pericolo { background: #b42318; color: #fff; border: 1px solid #b42318; border-radius: 8px; padding: 9px 16px; font: inherit; cursor: pointer; }
button.pericolo:hover:not(:disabled), .pannello button.pericolo:hover:not(:disabled) { background: #912018; }
button.pericolo:disabled, .pannello button.pericolo:disabled { background: #f2f4f7; color: #98a2b3; border-color: var(--gub-bordo, #e5e7eb); cursor: not-allowed; }
.gub-blocchi { border-color: #fecdca; background: #fef3f2; }
.gub-blocchi ul { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; }
/* Il menu ⋮ vive dentro una tabella che scorre in orizzontale: mentre e'
   aperto il contenitore non deve tagliarlo. `.scorre-aperto` lo mette
   progetti.js; `:has()` copre anche il caso senza JavaScript. */
.gub-tabella-scorre.scorre-aperto,
.gub-tabella-scorre:has(details[data-kebab][open]) { overflow: visible; }
/* Dentro il menu le voci sono righe, non bottoni con il bordo del pannello. */
main.pannello .gub-kebab-menu button:not(.primario):not(.link):not(.gub-pillola):not(.gub-chevron-btn) {
  border: 0; background: none; padding: 8px 10px; border-radius: 7px; width: 100%;
  text-align: left; font-weight: 400; font-size: 13.5px; color: var(--gub-testo, #111);
}
main.pannello .gub-kebab-menu button:not(.primario):not(.link):not(.gub-pillola):not(.gub-chevron-btn):hover {
  background: var(--gub-verde-chiaro, #e7f7ed); color: var(--gub-verde-scuro, #15803d);
}
/* I collegamenti di servizio del pannello non sono link blu di sistema. */
main.pannello .secondario a { color: var(--gub-muto, #667085); }
main.pannello .secondario a:hover { color: var(--gub-verde-scuro, #15803d); }
/* Il bottone di cancellazione e' rosso, non un bottone qualsiasi: batte la
   regola generica dei bottoni del pannello. */
main.pannello button.pericolo:not(.primario):not(.link):not(.gub-pillola):not(.gub-chevron-btn) {
  background: #b42318; color: #fff; border: 1px solid #b42318; border-radius: 8px; padding: 9px 16px;
}
main.pannello button.pericolo:not(.primario):not(.link):not(.gub-pillola):not(.gub-chevron-btn):hover:not(:disabled) {
  background: #912018; border-color: #912018;
}
main.pannello button.pericolo:not(.primario):not(.link):not(.gub-pillola):not(.gub-chevron-btn):disabled {
  background: #f2f4f7; color: #98a2b3; border-color: var(--gub-bordo, #e5e7eb); cursor: not-allowed;
}

/* ── BC-250: inviti. Tre aggiunte piccole e niente altro: il badge
   «Invitato» (ambra: non e' un errore, e' un'attesa), la stessa cosa nel
   vocabolario della Console, e la pagina di attivazione — che e' una
   pagina pubblica come login/registrati e ne riusa il corpo. ── */
.stato.invitato { background: rgba(180,83,9,.16); color: #b45309; }
.gub-stato.ambra { background: #fef3c7; color: #b45309; }
main.pannello .gub-invita { margin: 0; }
main.pannello .gub-invita summary {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
  background: var(--gub-verde, #1a7f37); color: #fff; border-radius: 8px;
  padding: 9px 16px; font-size: 13.5px; font-weight: 600;
}
main.pannello .gub-invita summary::-webkit-details-marker { display: none; }
main.pannello .gub-invita[open] > .gub-invita-form {
  display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  align-items: end; margin-top: 14px; padding: 16px;
  border: 1px solid var(--gub-bordo, #e5e7eb); border-radius: 10px;
  background: var(--gub-sfondo, #f8fafc);
}
main.pannello .gub-invita-form label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--gub-muto, #667085); }
main.pannello .gub-invita-form input, main.pannello .gub-invita-form select {
  font: inherit; font-weight: 400; padding: 9px 11px; border-radius: 8px;
  border: 1px solid var(--gub-bordo, #e5e7eb); background: #fff; color: var(--gub-testo, #111);
}
main.pannello .gub-invita-form .gub-invita-azioni { display: flex; gap: 10px; align-items: center; }
main.pannello .gub-col-invito { width: 140px; white-space: nowrap; text-align: right; }

/* ═══════════════════════════════════════════════════════════════════════
   HVPS — adattatore. Sopra: style.css della Console Gubernium/IXmas,
   copiato tale e quale (stessa famiglia grafica). Sotto: le sole classi
   che login.js usa nei propri rendering (tabelle, badge, stat, drawer,
   terminale) tradotte sui token Gubernium, cosi' il codice delle sezioni
   non cambia. Nessun font esterno, nessuna dipendenza.
   ═══════════════════════════════════════════════════════════════════════ */
[hidden] { display: none !important; }
body { --hv-verde: #16a34a; --hv-verde-scuro: #15803d; --hv-verde-chiaro: #e7f7ed; --hv-blu: #2f65d9; --hv-blu-scuro: #1747a6; --hv-blu-chiaro: #e8efff;
       --hv-muto: #667085; --hv-bordo: #e5e7eb; --hv-bordo-forte: #d0d5dd; --hv-testo: #101828; }
.gub-brand-ixmas { height: 34px; max-width: 160px; }
/* Il wordmark HVPS sta centrato sopra la scheda (in Gubernium e' a sinistra
   nella colonna: qui la scheda e' l'unica cosa in pagina, e vanno allineati). */
.pagina-marchio { height: 54px; margin: 0 auto 20px; }
.lato-marchio { height: 24px; }
.admin-brand-mark, .admin-product-mark { height: 34px; width: 34px; }
.scheda-centrale .msg { margin: 10px 0 0; }
.scheda-centrale .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.scheda-centrale button:not(.primario):not(.link) {
  background: #fff; color: var(--testo); border: 1px solid var(--bordo); border-radius: 8px; padding: 9px 16px; font-size: 14px; cursor: pointer;
}
.scheda-centrale textarea { margin-top: 6px; }
.auth-links { margin-top: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; color: var(--secondario); font-size: 13px; }
.auth-links button.link { display: inline; font-size: 13px; }
.msg { font-size: 13px; min-height: 1.2em; color: #1a7f37; margin: 12px 0 0; }
.msg.bad { color: var(--errore); }
.msg:empty { margin: 0; }
.muted { color: var(--hv-muto); font-size: 13px; }
.faint { color: #98a2b3; font-size: 12px; }
.small { font-size: 12px; }
.nw { white-space: nowrap; }
/* pillole della barra: la voce «Platform Owner» non va a capo */
.gub-nav-pillole a { white-space: nowrap; }
.gub-progetto .gub-org-nome { font-weight: 650; font-size: 14px; }
.gub-progetto .gub-org-nome small { display: block; font-weight: 500; font-size: 11px; color: var(--hv-muto); font-family: ui-monospace, Menlo, monospace; }
.gub-progetto select { min-width: 130px; }
.gub-utente-menu form { margin: 0; }
.lato .lato-org { padding: 4px 10px 12px; font-weight: 650; font-size: 14px; }
/* ── rendering delle sezioni (login.js) ──────────────────────────────── */
.pannello .row, .admin-content .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.pannello .row:first-child, .admin-content .row:first-child { margin-top: 0; }
.pannello button.primary, .admin-content button.primary {
  background: var(--hv-verde); color: #fff; border: 1px solid var(--hv-verde); border-radius: 9px; padding: 9px 15px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.admin-content button.primary { background: var(--hv-blu); border-color: var(--hv-blu); }
.pannello button.primary:hover { background: var(--hv-verde-scuro); }
.admin-content button.primary:hover { background: var(--hv-blu-scuro); }
.pannello button:not(.primary):not(.link):not(.gub-pillola):not(.gub-chevron-btn):not(.pericolo),
.admin-content button:not(.primary):not(.link):not(.pericolo):not(.primario) {
  background: #fff; color: var(--hv-testo); border: 1px solid var(--hv-bordo-forte); border-radius: 9px; padding: 8px 14px; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.pannello button.danger, .admin-content button.danger { color: #b42318 !important; border-color: #f3c9c9 !important; }
.pannello button.danger:hover, .admin-content button.danger:hover { background: #fef3f2 !important; border-color: #b42318 !important; }
.pannello button:disabled, .admin-content button:disabled { opacity: .5; cursor: not-allowed; }
.pannello button.link, .admin-content button.link { background: none; border: 0; padding: 0; color: var(--hv-muto); font-size: 13px; cursor: pointer; }
.pannello button.link:hover, .admin-content button.link:hover { color: var(--hv-verde-scuro); text-decoration: underline; }
td .row { margin-top: 0 !important; gap: 6px; }
td button { padding: 5px 10px !important; font-size: 12.5px !important; }
.panel {
  background: #fff; border: 1px solid var(--hv-bordo); border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.04); overflow: hidden; margin-bottom: 16px;
}
.panel.pad { padding: 16px 18px; }
.panel h2 { margin: 0 0 12px; font-size: 16.5px; }
.panel table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.panel th { background: #f9fafb; color: var(--hv-muto); font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--hv-bordo); white-space: nowrap; }
.panel td { padding: 10px 12px; border-bottom: 1px solid var(--hv-bordo); vertical-align: top; }
.panel tbody tr:last-child td { border-bottom: 0; }
.panel tbody tr:hover { background: #fbfdfc; }
.table-scroll { overflow-x: auto; }
/* Azioni sempre visibili: la colonna resta fissata a destra anche quando la tabella scorre. */
.panel th.col-azioni, .panel td.col-azioni { position: sticky; right: 0; white-space: nowrap; box-shadow: -10px 0 10px -10px rgba(16,24,40,.22); }
.panel td.col-azioni { background: #fff; }
.panel th.col-azioni { background: #f9fafb; z-index: 1; }
.panel tbody tr:hover td.col-azioni { background: #fbfdfc; }
.pannello ul.mono li, .admin-content ul.mono li { padding: 6px 0; border-bottom: 1px solid var(--hv-bordo); font-size: 12.5px; }
.pannello h3, .admin-content h3 { font-size: 16px; margin: 20px 0 10px; }
.badge, .stato {
  display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; margin: 0;
}
.badge.ok, .stato.online, .stato.ok, .stato.configured { background: var(--hv-verde-chiaro); color: var(--hv-verde-scuro); }
.badge.off, .stato.unknown, .stato.disabled { background: #f2f4f7; color: #475467; }
.badge.warn, .stato.invitato, .stato.offline, .stato.revoked, .stato.pending { background: #fef3c7; color: #92400e; }
.badge.crit, .stato.error, .stato.degraded { background: #fee2e2; color: #b42318; }
.badge.info { background: var(--hv-blu-chiaro); color: var(--hv-blu-scuro); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--hv-bordo); border-radius: 12px; padding: 14px 16px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.stat .n { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.stat .l { font-size: 12px; color: var(--hv-muto); margin-top: 3px; }
.stat.clickable { cursor: pointer; }
.stat.clickable:hover { border-color: var(--hv-verde); }
.admin-content .stat.clickable:hover { border-color: var(--hv-blu); }
.placeholder { border: 1px dashed var(--hv-bordo-forte); border-radius: 10px; padding: 40px 20px; text-align: center; color: var(--hv-muto); background: #fff; font-size: 14px; }
.notice { display: flex; flex-direction: column; gap: 3px; border: 1px solid #dce6f5; border-radius: 10px; padding: 12px 14px; background: #f3f7fd; font-size: 13.5px; margin: 0 0 14px; }
.notice.ok { border-color: #abefc6; background: var(--hv-verde-chiaro); }
.notice.warn { border-color: #fde68a; background: #fffbeb; }
.notice.bad { border-color: #fecdca; background: #fef3f2; color: #b42318; }
.notice span, .notice small { color: var(--hv-muto); font-size: 13px; }
.link-token { margin-top: 8px; }
.card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.card-head p { margin: 3px 0 0; color: var(--hv-muto); font-size: 13px; }
.card-head strong { font-size: 15px; }
.cards-grid .panel.pad { display: flex; flex-direction: column; margin: 0; }
.cards-grid .panel.pad > .row { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--hv-bordo); }
.panel.off { opacity: .6; }
.form-grid { display: grid; gap: 4px 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: end; }
.form-grid label { margin: 10px 0 0; font-size: 12.5px; font-weight: 600; color: var(--hv-muto); }
.form-grid input, .form-grid select { margin-top: 5px; font-weight: 400; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .full.row { margin-top: 12px; gap: 18px; }
label.check { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--hv-testo); font-size: 14px; }
label.check input { width: auto; margin: 0; }
details.drawer { margin: 0 0 14px; }
details.drawer > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 9px; background: var(--hv-verde); color: #fff; font-weight: 600; font-size: 14px; }
.admin-content details.drawer > summary { background: var(--hv-blu); }
details.drawer > summary::-webkit-details-marker { display: none; }
details.drawer[open] > summary { background: var(--hv-verde-scuro); }
.admin-content details.drawer[open] > summary { background: var(--hv-blu-scuro); }
details.drawer > .drawer-body { margin-top: 12px; background: #fff; border: 1px solid var(--hv-bordo); border-radius: 12px; padding: 4px 16px 16px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.dettaglio-tecnico { margin-top: 10px; }
label.inline { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--hv-muto); }
label.inline select { width: auto; margin: 0; padding: 7px 10px; min-width: 150px; font-weight: 600; }
.role-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.role-chip.master { background: var(--hv-verde-chiaro); color: var(--hv-verde-scuro); }
.role-chip.owner { background: var(--hv-blu-chiaro); color: var(--hv-blu-scuro); }
/* Barra indeterminata per un passo di provisioning lungo. */
.prov-progress { height: 6px; border-radius: 999px; background: #f2f4f7; overflow: hidden; }
.prov-progress-bar { height: 100%; width: 40%; border-radius: 999px; background: var(--hv-verde); animation: prov-progress-slide 1.4s ease-in-out infinite; }
@keyframes prov-progress-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .prov-progress-bar { animation: none; width: 100%; opacity: .5; } }
/* Terminale grezzo del cambio password di default (xterm.js): cornice
   chiara, terminale nero. */
.term-modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.38); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.term-modal-box { background: #fff; border: 1px solid var(--hv-bordo); border-radius: 12px; width: min(920px, 100%); height: min(620px, 100%); display: flex; flex-direction: column; box-shadow: 0 18px 48px rgba(15,23,42,.22); overflow: hidden; }
.term-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--hv-bordo); flex: none; }
.term-modal-header h3 { margin: 0; font-size: 15px; }
.term-modal-body { flex: 1; padding: 12px 16px 16px; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.term-modal-hint { margin: 0 0 10px; flex: none; }
.term-modal-container { flex: 1; min-height: 0; background: #0b0e12; border-radius: 8px; overflow: hidden; }

.badge.bad { background: #fef3f2; color: #b42318; border-color: #fecdca; }

/* ---- Scheda VPS: testata, menu di sezioni, menu a tre puntini ---- */
.vps-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 6px 0 2px; }
.vps-head h3 { margin: 0 0 4px; }
.vps-head p { margin: 0; }
.vps-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--hv-bordo, #e5e7eb); margin: 12px 0 16px; }
.vps-tabs button { background: none !important; border: 0 !important; border-bottom: 2px solid transparent !important; border-radius: 0 !important;
  padding: 8px 12px !important; color: var(--hv-muto, #667085) !important; font-weight: 600; font-size: 13.5px; cursor: pointer; box-shadow: none !important; }
.vps-tabs button:hover:not(:disabled) { color: var(--hv-testo, #101828) !important; }
.vps-tabs button.attiva { color: var(--hv-verde-scuro, #067647) !important; border-bottom-color: var(--hv-verde-scuro, #067647) !important; }
.vps-tabs button:disabled { opacity: .45; cursor: not-allowed; }
.kebab { position: relative; flex: none; }
.kebab-btn { width: 36px; height: 36px; padding: 0 !important; font-size: 20px; line-height: 1; letter-spacing: 1px; border-radius: 9px !important; }
.kebab-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 250px; background: #fff;
  border: 1px solid var(--hv-bordo-forte, #d0d5dd); border-radius: 10px; box-shadow: 0 14px 32px rgba(16,24,40,.16); padding: 6px; }
.kebab-menu[hidden] { display: none; }
.kebab-menu button { display: block; width: 100%; text-align: left; background: none !important; border: 0 !important; box-shadow: none !important;
  padding: 7px 10px !important; font-size: 13.5px !important; font-weight: 500 !important; border-radius: 6px !important; color: var(--hv-testo, #101828); }
.kebab-menu button:hover:not(:disabled) { background: #f2f4f7 !important; }
.kebab-menu button.danger { color: #b42318 !important; }
.kebab-menu button.danger:hover:not(:disabled) { background: #fef3f2 !important; }
.kebab-menu button:disabled { opacity: .45; cursor: not-allowed; }
.kebab-label { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--hv-muto, #667085); padding: 6px 10px 2px; }
.kebab-sep { height: 1px; background: var(--hv-bordo, #e5e7eb); margin: 6px 0; }
.link-vps { background: none !important; border: 0 !important; padding: 0 !important; color: var(--hv-testo, #101828); font-weight: 600; cursor: pointer; text-align: left; box-shadow: none !important; }
.link-vps:hover { color: var(--hv-verde-scuro, #067647); text-decoration: underline; }
td .kebab-btn { width: 30px; height: 30px; font-size: 18px; }
td .kebab-menu { right: 0; }
td .kebab-menu button { padding: 7px 10px !important; font-size: 13.5px !important; }

/* ---- Dettaglio dei controlli: riepilogo e schede leggibili ---- */
.scan-summary { display: flex; flex-wrap: wrap; gap: 28px; padding: 14px 18px; margin-bottom: 12px; }
.scan-summary > div { min-width: 120px; }
.scan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 12px; align-items: start; }
.scan-card { padding: 14px 18px; margin: 0; }
.scan-card h4 { margin: 0 0 8px; font-size: 14.5px; }
.scan-kv { display: grid; grid-template-columns: minmax(150px, 40%) 1fr; gap: 6px 14px; margin: 0; font-size: 13.5px; }
.scan-kv dt { color: var(--hv-muto, #667085); }
.scan-kv dd { margin: 0; word-break: break-word; }
.scan-kv dd.wide { grid-column: 1 / -1; margin-bottom: 4px; }
.scan-sub { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--hv-bordo, #e5e7eb); }
.scan-sub h5 { margin: 0 0 6px; font-size: 12.5px; letter-spacing: .03em; color: var(--hv-muto, #667085); text-transform: uppercase; }
.scan-table { overflow-x: auto; }
.scan-table table { width: 100%; font-size: 12.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: #f2f4f7; border-radius: 999px; padding: 2px 10px; font-size: 12.5px; }
