/* Velstra · console licenze — design system Velstra (velstra.it) */
@font-face { font-family: "Space Grotesk"; src: url("/fonts/SpaceGrotesk-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/Newsreader-Variable.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  color-scheme: dark;
  --ink: #141615; --ink-2: #1b1d1c; --ink-3: #242725;
  --paper: #efefe8; --lime: #dcf84b; --lime-soft: #c4d468; --olive: #4d5a12;
  --muted: rgb(239 239 232 / 0.6); --faint: rgb(239 239 232 / 0.4);
  --line: rgb(239 239 232 / 0.1); --line-2: rgb(239 239 232 / 0.16);
  --red: #ff8f7e; --amber: #f2cf6b;
  --serif: "Ivar Headline", "Newsreader", ui-serif, Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.5 "Space Grotesk", ui-sans-serif, system-ui, sans-serif; font-weight: 400; font-synthesis: none; background: var(--ink); color: var(--paper); -webkit-font-smoothing: antialiased; }
b, strong, th, h1, h2, h3 { font-weight: 400; }
::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }
.nascosto { display: none !important; }
button { font: inherit; cursor: pointer; color: inherit; }
input, select, textarea { font: inherit; color: var(--paper); padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--ink-2); width: 100%; }
select option { background: var(--ink-2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgb(220 248 75 / 0.6); }
input[type=checkbox] { accent-color: var(--lime); }
textarea { min-height: 70px; resize: vertical; }
label { display: block; margin: 12px 0 4px; color: var(--muted); font-size: 13px; }
label input, label select, label textarea { margin-top: 5px; }
label.spunta { display: flex; gap: 8px; align-items: center; }
label.spunta input { width: auto; margin: 0; }
.eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

.primario { background: var(--lime); color: var(--ink); border: 1px solid var(--lime); border-radius: 999px; padding: 8px 18px; transition: box-shadow .3s, scale .3s; }
.primario:hover { box-shadow: 0 0 34px -6px rgb(220 248 75 / 0.6); }
.primario:active { scale: .97; }
.secondario, .pericolo { border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 16px; color: var(--paper);
  background: linear-gradient(var(--lime), var(--lime)) no-repeat 0 100% / 0% 100%; transition: background-size .5s var(--ease), color .3s, border-color .3s; }
.secondario:hover { background-size: 100% 100%; color: var(--ink); border-color: var(--lime); }
.pericolo { color: var(--red); border-color: rgb(255 143 126 / 0.35); background-image: linear-gradient(var(--red), var(--red)); }
.pericolo:hover { background-size: 100% 100%; color: var(--ink); border-color: var(--red); }
.link { background: none; border: 0; padding: 0; color: var(--paper); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.link:hover { color: var(--lime); text-decoration-color: var(--lime); }
.errore { color: var(--red); min-height: 1em; margin: 8px 0 0; }
.nota { color: var(--faint); font-size: 12.5px; }

.marchio { display: inline-flex; align-items: center; gap: 12px; }
.marchio img { height: 22px; display: block; }
.marchio .eyebrow { padding-left: 12px; border-left: 1px solid var(--line-2); }
.marchio.grande { flex-direction: column; width: 100%; gap: 10px; margin-bottom: 10px; }
.marchio.grande img { height: 30px; }
.marchio.grande .eyebrow { border: 0; padding: 0; }

.accesso { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(60% 50% at 50% 0%, rgb(220 248 75 / 0.07), transparent 70%); }
.accesso-box { width: 360px; }
.accesso-box .primario { width: 100%; margin-top: 18px; padding: 11px; }
.scheda { background: var(--ink-2); border: 1px solid var(--line); border-radius: 22px; padding: 22px; }
.scheda h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 24px; letter-spacing: -0.015em; }

.barra { display: flex; align-items: center; gap: 26px; padding: 0 26px; height: 66px; background: rgb(20 22 21 / 0.85); backdrop-filter: blur(18px); border-bottom: 1px solid rgb(239 239 232 / 0.07); position: sticky; top: 0; z-index: 5; }
.barra nav { display: flex; gap: 2px; }
.barra nav button { background: none; border: 0; padding: 7px 13px; border-radius: 999px; color: var(--muted); }
.barra nav button:hover { color: var(--paper); }
.barra nav button.attivo { background: var(--lime); color: var(--ink); }
.io { margin-left: auto; display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: 13px; }
main { padding: 26px 26px 50px; max-width: 1400px; margin: 0 auto; }

.riepilogo { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.cifra { background: var(--ink-2); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.cifra b { display: block; font-family: var(--serif); font-size: 34px; line-height: 1.1; letter-spacing: -0.02em; }
.cifra span { color: var(--faint); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.strumenti { display: flex; gap: 10px; margin-bottom: 14px; align-items: center; }
.strumenti input { max-width: 320px; border-radius: 999px; }
.strumenti select { max-width: 210px; border-radius: 999px; }
.spazio { flex: 1; }

.tabella { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--ink-2); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.tabella th { text-align: left; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); padding: 12px 12px; border-bottom: 1px solid var(--line); }
.tabella td { padding: 12px; border-bottom: 1px solid rgb(239 239 232 / 0.06); vertical-align: top; }
.tabella tr:last-child td { border-bottom: 0; }
.tabella tbody tr.cliccabile:hover td { background: rgb(239 239 232 / 0.04); cursor: pointer; }
.tabella.compatta td { padding: 7px 12px; font-size: 13px; }
.tabella td b { font-family: var(--serif); font-size: 18px; letter-spacing: -0.01em; }
.dx { text-align: right; }
.sotto { color: var(--faint); font-size: 12.5px; }
.vuoto { text-align: center; color: var(--muted); padding: 36px !important; }

.badge { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 11.5px; border: 1px solid var(--line-2); color: var(--muted); }
.badge.attiva, .badge.online { color: var(--lime); border-color: rgb(220 248 75 / 0.35); background: rgb(220 248 75 / 0.08); }
.badge.sospesa, .badge.offline, .badge.scaduta { color: var(--red); border-color: rgb(255 143 126 / 0.35); background: rgb(255 143 126 / 0.08); }
.badge.da_attivare, .badge.ritardo { color: var(--amber); border-color: rgb(242 207 107 / 0.35); background: rgb(242 207 107 / 0.08); }
.punto { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; background: var(--faint); position: relative; vertical-align: middle; }
.punto.online { background: var(--lime); }
.punto.online::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--lime); animation: ping 2.2s var(--ease) infinite; }
.punto.ritardo { background: var(--amber); } .punto.offline { background: var(--red); }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(3.2); opacity: 0; } }

/* avanzamento a puntini, come nella nav del sito */
.barra-avanz { height: 6px; margin: 6px 0 3px; width: 150px; background-image: radial-gradient(circle, rgb(239 239 232 / 0.18) 1px, transparent 1.4px); background-size: 6px 6px; background-position: 0 50%; }
.barra-avanz i { display: block; height: 100%; background-image: radial-gradient(circle, var(--lime) 1.3px, transparent 1.7px); background-size: 6px 6px; background-position: 0 50%; filter: drop-shadow(0 0 3px rgb(220 248 75 / 0.6)); }

.interruttore { position: relative; width: 44px; height: 24px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--ink-3); transition: background .2s, border-color .2s; }
.interruttore::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--faint); transition: left .25s var(--ease), background .2s; }
.interruttore.on { background: rgb(220 248 75 / 0.2); border-color: var(--lime); }
.interruttore.on::after { left: 23px; background: var(--lime); }

.pannello { position: fixed; inset: 0; background: rgb(8 9 9 / 0.6); backdrop-filter: blur(3px); display: flex; justify-content: flex-end; z-index: 20; }
.pannello-box { width: min(780px, 100%); background: var(--ink-2); border-left: 1px solid var(--line); height: 100%; overflow: auto; padding: 28px 32px; position: relative; animation: entra .45s var(--ease); }
@keyframes entra { from { translate: 40px 0; opacity: 0; } }
.chiudi { position: absolute; top: 12px; right: 16px; border: 0; background: none; font-size: 28px; color: var(--muted); }
.chiudi:hover { color: var(--lime); }
.pannello h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 34px; letter-spacing: -0.02em; line-height: 1.05; }
.griglia { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.griglia .intero { grid-column: 1 / -1; }
.sezione { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }
.sezione h3 { margin: 0 0 10px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.azioni { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 6px 14px; font-size: 13.5px; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.codice { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; background: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 12px; word-break: break-all; white-space: pre-wrap; color: rgb(239 239 232 / 0.85); }
.chiave { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 19px; letter-spacing: .5px; padding: 16px; background: var(--ink); border: 1px solid rgb(220 248 75 / 0.35); color: var(--lime); border-radius: 14px; text-align: center; }
.due-colonne { display: grid; grid-template-columns: 1fr 360px; gap: 18px; align-items: start; }
.avviso { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--paper); color: var(--ink); padding: 10px 20px; border-radius: 999px; z-index: 30; box-shadow: 0 20px 40px -14px rgb(0 0 0 / 0.7); }
@media (max-width: 900px) {
  .due-colonne, .griglia { grid-template-columns: 1fr; }
  .barra { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
  .tabella th:nth-child(3), .tabella td:nth-child(3), .tabella th:nth-child(6), .tabella td:nth-child(6) { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
