/* Ristolander — core.css
 * Design system condiviso: notte stellata, vetro, arancio Ristolander.
 * Font self-hosted (CSP font-src 'self'): Inter per il testo, Oswald per il marchio.
 */

/* ---------- Font ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/inter-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/oswald-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/oswald-latin-700-normal.woff2") format("woff2"); }

/* ---------- Token ---------- */
:root {
  --night-0: #080c20;
  --night-1: #0e1430;
  --night-2: #151d42;
  --nebula-violet: #4b2f8f;
  --nebula-indigo: #2a3a8c;
  --nebula-blue: #2b72c9;
  --dawn: #f2a24a;

  --accent: #f7a11a;
  --accent-hi: #ffb83d;
  --accent-ink: #1a1206;
  --accent-glow: 0 10px 34px -8px rgba(247, 161, 26, .55);

  --text: #f3f5ff;
  --text-2: #c9cfe8;
  --muted: #8f98bf;
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .26);
  --glass: rgba(20, 28, 64, .55);
  --glass-2: rgba(255, 255, 255, .045);

  --ok: #3ddc97;
  --warn: #ffc24a;
  --fail: #ff5d6c;

  --radius: 18px;
  --radius-sm: 12px;
  --pill: 999px;
  --gap: clamp(12px, 2.2vw, 22px);
  --pad: clamp(16px, 4vw, 40px);
  --maxw: 1240px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Oswald", "Arial Narrow", Impact, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--night-0); }
body {
  margin: 0;
  min-height: 100dvh;
  font: 400 16px/1.55 var(--font);
  color: var(--text);
  background-color: var(--night-0);
  background-image:
    url("../brand/stars.svg"),
    radial-gradient(1100px 620px at 85% 8%, rgba(75, 47, 143, .55), transparent 62%),
    radial-gradient(900px 560px at 8% 92%, rgba(43, 114, 201, .28), transparent 60%),
    radial-gradient(700px 420px at 60% 110%, rgba(242, 162, 74, .14), transparent 65%),
    linear-gradient(180deg, var(--night-1), var(--night-0) 70%);
  background-size: 480px 480px, auto, auto, auto, auto;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
h1, h2, h3, p { margin: 0; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent-hi); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Marchio ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); min-width: 0; }
.brand__emblem { width: 52px; height: 52px; border-radius: 10px; flex: none; box-shadow: 0 0 0 1px var(--line-strong), 0 6px 18px rgba(0, 0, 0, .45); }
.brand__text { display: grid; line-height: 1; min-width: 0; }
.brand__name { font: 700 30px/0.95 var(--display); letter-spacing: .01em; text-transform: uppercase; white-space: nowrap; }
.brand__name b { color: var(--accent); font-weight: 700; }
.brand__tag { font: 800 9.5px/1.2 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); margin-top: 5px; white-space: nowrap; }
.brand--lg .brand__emblem { width: 72px; height: 72px; border-radius: 14px; }
.brand--lg .brand__name { font-size: 42px; }
.brand--lg .brand__tag { font-size: 12px; }
@media (max-width: 380px) {
  .brand__emblem { width: 44px; height: 44px; }
  .brand__name { font-size: 25px; }
  .brand__tag { font-size: 8px; }
}

/* ---------- Barra superiore ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 14, 36, .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  padding-top: env(safe-area-inset-top);
}
.topbar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.topbar__actions { display: flex; align-items: center; gap: 10px; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: var(--pad); display: grid; gap: var(--gap); }

/* ---------- Tipografia ---------- */
.eyebrow { font: 600 14px/1.3 var(--font); color: var(--text-2); }
.display {
  font: 800 clamp(34px, 6.2vw, 64px)/1.04 var(--font);
  letter-spacing: -.025em;
}
.display em { font-style: normal; color: var(--accent); }
.lead { font-size: clamp(16px, 2vw, 19px); color: var(--text-2); max-width: 62ch; }
.note { font-size: 14px; color: var(--muted); max-width: 56ch; }
code { font-family: var(--mono); font-size: .9em; }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: var(--pill);
  border: 1.5px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font: 700 15px/1 var(--font);
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:hover { border-color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .05); }
.btn:active { transform: scale(.98); }
.btn--primary {
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
  border-color: transparent;
  color: var(--accent-ink);
  box-shadow: var(--accent-glow);
}
.btn--primary:hover { background: linear-gradient(180deg, #ffc55c, var(--accent-hi)); border-color: transparent; }
.btn--caps { text-transform: uppercase; letter-spacing: .04em; }
.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn--icon { gap: 8px; }
.btn--icon svg { width: 20px; height: 20px; flex: none; }

/* ---------- Superfici in vetro ---------- */
.glass {
  background: linear-gradient(180deg, rgba(30, 40, 88, .55), rgba(16, 22, 52, .62));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
}

/* ---------- Riquadri di stato ---------- */
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
@media (min-width: 820px) { .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { position: relative; display: grid; align-content: start; gap: 10px; min-height: 146px; padding: 20px; }
.tile--wide { grid-column: span 2; }
.tile--accent { border-color: rgba(247, 161, 26, .55); box-shadow: 0 0 0 1px rgba(247, 161, 26, .25), 0 20px 50px -24px rgba(247, 161, 26, .35); }
.tile__label { font: 600 12px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tile__value { font: 800 clamp(24px, 3.4vw, 32px)/1.05 var(--font); letter-spacing: -.02em; }
.tile__value--mono { font-family: var(--mono); font-weight: 600; letter-spacing: 0; }
.tile__meta { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.tile__meta--mono { font-family: var(--mono); }
.tile__row { display: flex; flex-wrap: wrap; gap: 10px; }
.tile__row--stack { flex-direction: column; align-items: stretch; }
.tile[data-state]::after {
  position: absolute;
  top: 16px;
  right: 16px;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: var(--pill);
  font: 800 13px/1 var(--font);
}
.tile[data-state="ok"]::after { content: "✓"; background: rgba(61, 220, 151, .16); color: var(--ok); box-shadow: inset 0 0 0 1px rgba(61, 220, 151, .5); }
.tile[data-state="warn"]::after { content: "!"; background: rgba(255, 194, 74, .16); color: var(--warn); box-shadow: inset 0 0 0 1px rgba(255, 194, 74, .5); }
.tile[data-state="fail"]::after { content: "✕"; background: rgba(255, 93, 108, .16); color: var(--fail); box-shadow: inset 0 0 0 1px rgba(255, 93, 108, .5); }

/* ---------- Hero ---------- */
.hero { display: grid; gap: 28px; align-items: center; padding-block: clamp(20px, 5vw, 56px) 8px; }
.hero__copy { display: grid; gap: 18px; justify-items: start; }
.hero__art { position: relative; justify-self: center; width: min(420px, 82vw); aspect-ratio: 1; }
.hero__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 62%, transparent 71%);
  mask-image: radial-gradient(circle at 50% 50%, #000 62%, transparent 71%);
}
.hero__art::before {
  content: "";
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 162, 74, .28), transparent 66%);
  filter: blur(12px);
  z-index: -1;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.15fr .85fr; }
}

/* ---------- Banner ---------- */
.banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(247, 161, 26, .14);
  border: 1px solid rgba(247, 161, 26, .5);
  font-weight: 700;
}

/* ---------- Moduli ---------- */
.field { display: grid; gap: 6px; }
.field__label { font: 600 13px/1 var(--font); color: var(--text-2); }
.input-wrap { position: relative; }
.input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1.5px solid var(--line-strong);
  background: rgba(8, 12, 32, .45);
  color: var(--text);
  font-size: 16px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.input::placeholder { color: var(--muted); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(247, 161, 26, .18); }
.input-wrap .input { padding-right: 54px; }
.input-wrap__btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.input-wrap__btn svg { width: 22px; height: 22px; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.divider { display: flex; align-items: center; gap: 14px; color: var(--text-2); font-size: 15px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.link-accent { color: var(--accent); font-weight: 700; text-decoration: none; }
.link-accent:hover { text-decoration: underline; }

/* ---------- Accesso ---------- */
.auth { min-height: 100dvh; display: grid; }
.auth__art { display: none; position: relative; overflow: hidden; }
.auth__panel { display: grid; place-items: center; padding: calc(var(--pad) + env(safe-area-inset-top)) var(--pad) var(--pad); }
.auth__card { width: min(460px, 100%); padding: clamp(24px, 5vw, 40px); display: grid; gap: 18px; }
.auth__head { display: grid; justify-items: center; gap: 14px; text-align: center; }
.auth__title { font: 800 clamp(30px, 5vw, 38px)/1.1 var(--font); letter-spacing: -.02em; }
.auth__sub { color: var(--text-2); }
.auth__foot { text-align: center; color: var(--text-2); }
.passkey {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 6px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.passkey:hover { background: rgba(255, 255, 255, .04); }
.passkey__ring {
  width: 64px;
  height: 64px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--accent), var(--nebula-blue), var(--accent));
  padding: 2.5px;
}
.passkey__ring span { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%; background: var(--night-1); color: var(--accent); }
.passkey__ring svg { width: 34px; height: 34px; }
.passkey__title { font-weight: 800; font-size: 17px; }
.passkey__sub { color: var(--text-2); font-size: 14px; }
@media (min-width: 960px) {
  .auth { grid-template-columns: 1fr 1fr; }
  .auth__art { display: block; }
  .auth__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
  .auth__art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(8, 12, 32, .92) 88%), linear-gradient(90deg, transparent 70%, rgba(8, 12, 32, .55));
  }
  .auth__caption { position: absolute; left: 9%; right: 9%; bottom: 8%; z-index: 1; display: grid; gap: 8px; }
  .auth__caption h2 { font: 800 28px/1.15 var(--font); }
  .auth__caption p { color: var(--text-2); max-width: 44ch; }
}

/* ---------- Pagine d'errore / offline ---------- */
.is-minimal { display: grid; place-items: center; padding: var(--pad); }
.fault { width: min(560px, 100%); display: grid; gap: 16px; justify-items: start; padding: clamp(24px, 5vw, 40px); }
.fault__code { font: 700 clamp(72px, 20vw, 128px)/.9 var(--display); color: var(--accent); text-shadow: 0 0 40px rgba(247, 161, 26, .35); }
.fault__title { font: 800 clamp(24px, 5vw, 34px)/1.1 var(--font); letter-spacing: -.02em; }
.fault__text { color: var(--text-2); }
.fault__ref { font-size: 14px; color: var(--text-2); }
.fault__ref code { background: rgba(255, 255, 255, .08); padding: 3px 8px; border-radius: 8px; color: var(--text); }
.fault__detail { width: 100%; margin: 0; padding: 12px; overflow: auto; font: 12px/1.45 var(--mono); background: rgba(0, 0, 0, .45); border-radius: 10px; white-space: pre-wrap; }

/* =====================================================================
 * Gestionale e amministrazione (F1)
 * ===================================================================== */

/* Navigazione a pillole (scorre orizzontalmente su smartphone) */
.subnav { border-bottom: 1px solid var(--line); background: rgba(10, 14, 36, .5); }
.subnav__inner { max-width: var(--maxw); margin: 0 auto; padding: 8px var(--pad); display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.subnav__inner::-webkit-scrollbar { display: none; }
.subnav a {
  flex: none;
  padding: 9px 16px;
  border-radius: var(--pill);
  color: var(--text-2);
  font: 600 14px/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
}
.subnav a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.subnav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent); }

.who { display: flex; align-items: center; gap: 10px; }
.who__name { font: 600 14px/1.2 var(--font); color: var(--text-2); max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .who__name { display: none; } }
.inline-form { display: inline; margin: 0; }

/* Intestazione di pagina */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; padding-top: 8px; }
.page-head__title { font: 800 clamp(26px, 4vw, 36px)/1.1 var(--font); letter-spacing: -.02em; }
.page-head__sub { color: var(--text-2); margin-top: 6px; }
.crumb { font-size: 14px; color: var(--muted); text-decoration: none; }
.crumb:hover { color: var(--text); }

/* Messaggi */
.flash { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--radius-sm); border: 1px solid; font-weight: 600; }
.flash--success { background: rgba(61, 220, 151, .1); border-color: rgba(61, 220, 151, .45); }
.flash--error { background: rgba(255, 93, 108, .1); border-color: rgba(255, 93, 108, .5); }
.flash--info { background: rgba(43, 114, 201, .14); border-color: rgba(43, 114, 201, .5); }
.flash::before { font-weight: 800; }
.flash--success::before { content: "✓"; color: var(--ok); }
.flash--error::before { content: "!"; color: var(--fail); }
.flash--info::before { content: "i"; color: #7fb2ff; }

/* Schede */
.card { padding: clamp(18px, 3vw, 26px); display: grid; gap: 16px; align-content: start; }
.card__title { font: 800 19px/1.2 var(--font); }
.card__sub { color: var(--text-2); font-size: 14px; margin-top: -8px; }
.grid-2 { display: grid; gap: var(--gap); }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-2 > .span-2 { grid-column: span 2; } }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat { padding: 18px 20px; display: grid; gap: 6px; text-decoration: none; color: var(--text); }
.stat__n { font: 800 34px/1 var(--font); letter-spacing: -.02em; }
.stat__l { font-size: 13px; color: var(--text-2); }
a.stat:hover { border-color: rgba(247, 161, 26, .6); }

/* Moduli */
.form { display: grid; gap: 16px; }
.form-grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid .span-2 { grid-column: span 2; } }
.field__hint { font-size: 13px; color: var(--muted); }
.field__error { font-size: 13px; color: var(--fail); font-weight: 600; }
.input--error { border-color: rgba(255, 93, 108, .8); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
select.input option { background: var(--night-1); color: var(--text); }
textarea.input { min-height: 120px; padding: 14px 18px; resize: vertical; }
input[type="color"].input { padding: 6px; height: 54px; cursor: pointer; }
input[type="file"].input { padding: 13px 14px; }
.actions-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* Interruttori (funzioni attive) */
.switches { display: grid; gap: 4px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.switch:last-child { border-bottom: 0; }
.switch input { appearance: none; width: 48px; height: 28px; border-radius: var(--pill); background: rgba(255, 255, 255, .14); position: relative; flex: none; cursor: pointer; transition: background .2s ease; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(20px); }
.switch input:disabled { opacity: .5; cursor: not-allowed; }

/* Tabelle (diventano schede su smartphone) */
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font: 600 12px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line-strong); }
.table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table a { color: var(--text); font-weight: 700; text-decoration: none; }
.table a:hover { color: var(--accent); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .muted { color: var(--text-2); font-size: 14px; }
@media (max-width: 760px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .table td { border: 0; padding: 4px 2px; }
  .table td[data-label]::before { content: attr(data-label) " · "; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
  .table .num { text-align: left; }
}
.table-wrap { overflow-x: auto; }

/* Matrice permessi */
.matrix { border-collapse: separate; border-spacing: 0; font-size: 14px; min-width: 760px; }
.matrix th, .matrix td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; position: sticky; left: 0; background: var(--night-1); z-index: 1; min-width: 230px; }
.matrix thead th { font: 700 12px/1.2 var(--font); color: var(--text-2); vertical-align: bottom; }
.matrix .group td { font: 700 12px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); text-align: left; padding-top: 18px; }
.matrix input { width: 20px; height: 20px; accent-color: var(--accent); }
.matrix .yes { color: var(--ok); font-weight: 800; }
.matrix .no { color: var(--muted); }

/* Badge di stato (testo + colore) */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--pill); font: 700 12px/1.2 var(--font); background: rgba(255, 255, 255, .08); color: var(--text-2); white-space: nowrap; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--ok { color: var(--ok); background: rgba(61, 220, 151, .12); }
.badge--warn { color: var(--warn); background: rgba(255, 194, 74, .12); }
.badge--fail { color: var(--fail); background: rgba(255, 93, 108, .12); }
.badge--accent { color: var(--accent); background: rgba(247, 161, 26, .14); }
.badge--plain::before { display: none; }

/* Link da copiare */
.copybox { display: grid; gap: 10px; padding: 16px; border-radius: var(--radius-sm); background: rgba(247, 161, 26, .1); border: 1px solid rgba(247, 161, 26, .5); }
.copybox__row { display: flex; gap: 8px; }
.copybox__row .input { font-family: var(--mono); font-size: 13px; min-height: 46px; }
.copybox__title { font-weight: 800; }
.copybox__text { font-size: 14px; color: var(--text-2); }

/* Liste semplici */
.list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.empty { color: var(--muted); padding: 18px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* TOTP */
.qr { width: 220px; height: 220px; padding: 14px; background: #fff; border-radius: 14px; justify-self: center; }
.qr svg { width: 100%; height: 100%; }
.secret { font: 600 15px/1.6 var(--mono); letter-spacing: .12em; text-align: center; word-break: break-all; padding: 10px; border-radius: 10px; background: rgba(255, 255, 255, .06); }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--text-2); }
.code-input { font: 700 26px/1 var(--mono); letter-spacing: .4em; text-align: center; }

/* Pagina pubblica del locale */
.tenant-hero { display: grid; justify-items: center; text-align: center; gap: 18px; padding: clamp(36px, 8vw, 80px) var(--pad) 20px; }
.tenant-hero__logo { width: 132px; height: 132px; border-radius: 28px; object-fit: contain; background: rgba(255, 255, 255, .04); box-shadow: 0 0 0 1px var(--line-strong), 0 20px 50px -20px rgba(0, 0, 0, .8); }
.tenant-hero__name { font: 800 clamp(34px, 7vw, 58px)/1.05 var(--font); letter-spacing: -.025em; }
.tenant-footer { text-align: center; padding: 30px var(--pad) 40px; color: var(--muted); font-size: 13px; }
.tenant-footer a { color: var(--text-2); }
.icon-preview { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.icon-preview img { border-radius: 22%; box-shadow: 0 0 0 1px var(--line-strong); }
.brand__name { overflow: hidden; text-overflow: ellipsis; max-width: min(46vw, 520px); }
.narrow { max-width: 680px; }
@media (max-width: 640px) {
  .who__label { display: none; }
  .who__account { padding: 0 11px; }
  .who .btn--sm { min-height: 40px; padding: 0 12px; }
  .brand__name { max-width: 42vw; }
  .topbar__inner { gap: 10px; }
}
@media (min-width: 960px) {
  .auth__art { position: sticky; top: 0; height: 100dvh; align-self: start; }
}
