/*
  Cassaforte: stile e colori della dashboard Epil Point
  (epilpoint-dashboard/dashboard/resources/css/app.css).

  I token sono gli stessi, valore per valore: oro di marca #CC912E con la sua
  scala, neutri "ink", colori di stato. Le pagine non scrivono colori a mano.
  Pulsanti in oro con testo scuro (5,7:1): il bianco sull'oro darebbe 2,7:1.
*/

@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('instrument-sans-400.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('instrument-sans-500.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('instrument-sans-600.woff2') format('woff2'); }

:root {
  --brand-50: #fdf6ee;
  --brand-100: #f9ead6;
  --brand-200: #f3d7b1;
  --brand-300: #ebc084;
  --brand-400: #dfa958;
  --brand-500: #cc912e;
  --brand-600: #946300;
  --brand-700: #754e00;
  --brand-800: #603e00;
  --brand-900: #4a3000;

  --ink-50: #fafafa;
  --ink-100: #f5f5f5;
  --ink-200: #e0e0e0;
  --ink-300: #cfcccf;
  --ink-400: #9e9a9f;
  --ink-500: #757575;
  --ink-600: #6d676e;
  --ink-700: #575258;
  --ink-800: #3f3b40;
  --ink-900: #262327;

  --successo: #008000;
  --attenzione: #a86100;
  --errore: #b3261e;
  --errore-sfondo: #fdf0ef;

  --font: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ombra-sm: 0 1px 3px rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);
  --ombra-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--ink-100);
  color: var(--ink-600);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.43;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 { color: var(--ink-900); margin: 0; }
p { margin: 0 0 12px; }
a { color: var(--brand-700); font-weight: 500; text-decoration: none; }
a:hover { color: var(--brand-800); text-decoration: underline; }
b, strong { font-weight: 600; }
code, .mono { font-family: var(--mono); font-size: 13px; }

:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; }

.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tenue { color: var(--ink-500); }
.a-capo-no { white-space: nowrap; }
.nascosto {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.fuori-schermo { position: fixed; left: -9999px; top: 0; opacity: 0; }
.caricamento { padding: 48px 16px; text-align: center; color: var(--ink-500); }

/* ——— Pulsanti: pillola in oro, secondari bianchi ——————————————— */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--brand-500); color: var(--ink-900);
  padding: 8px 16px; font: inherit; font-size: 14px; font-weight: 600; line-height: 20px;
  box-shadow: var(--ombra-sm); cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--brand-400); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.vuoto { background: #fff; border-color: var(--ink-300); color: var(--ink-700); box-shadow: none; }
.btn.vuoto:hover { background: var(--ink-50); color: var(--ink-900); }
.btn.piccolo { padding: 4px 12px; font-size: 12.5px; line-height: 18px; }
.btn.largo { width: 100%; padding: 12px 16px; }
.btn.largo .ico { transition: transform .15s; }
.btn.largo:hover .ico { transform: translateX(2px); }
.btn.pericolo { color: var(--errore); border-color: rgb(179 38 30 / .3); }
.btn.pericolo:hover { background: var(--errore-sfondo); color: var(--errore); }
.btn.pericolo-pieno { background: var(--errore); color: #fff; }
.btn.pericolo-pieno:hover { background: #8f1e18; }

.icona-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none;
  border: 0; border-radius: 8px; background: none; color: var(--ink-500); cursor: pointer;
  transition: background-color .15s, color .15s;
}
.icona-btn:hover { background: var(--ink-100); color: var(--ink-900); text-decoration: none; }
.icona-btn.stella.attiva { color: var(--brand-600); }
.icona-btn.stella.attiva .ico { fill: var(--brand-500); }

.x {
  display: inline-grid; place-items: center; width: 32px; height: 32px; margin-right: -6px;
  border: 0; border-radius: 8px; background: none; color: var(--ink-600);
  font-size: 22px; line-height: 1; cursor: pointer;
}
.x:hover { background: var(--ink-100); color: var(--ink-900); }

/* ——— Campi ——————————————————————————————————————————————————— */

input, select, textarea {
  display: block; width: 100%;
  font: inherit; font-size: 14px; color: var(--ink-900);
  background: var(--ink-50); border: 1px solid var(--ink-300); border-radius: 8px;
  padding: 9px 12px; transition: border-color .15s, background-color .15s;
}
input::placeholder, textarea::placeholder { color: var(--ink-400); }
input:focus, select:focus, textarea:focus { border-color: var(--brand-600); background: #fff; }
textarea { resize: vertical; min-height: 76px; }
input[type=checkbox], input[type=radio], input[type=range] { display: inline-block; width: auto; padding: 0; accent-color: var(--brand-600); }
input[type=checkbox] { width: 16px; height: 16px; margin: 0; }
input[type=file] { background: #fff; padding: 7px 8px; }
input.mono { font-family: var(--mono); font-size: 13.5px; }

.campo { margin-bottom: 20px; }
.campo > label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; color: var(--ink-700); }
.aiuto { display: block; margin-top: 6px; font-size: 12px; line-height: 16px; color: var(--ink-500); }
.griglia2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.con-pulsanti { display: flex; gap: 8px; }
.con-pulsanti input { flex: 1; min-width: 0; }
.spunta { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-700); cursor: pointer; }

.forza { display: flex; align-items: center; gap: 10px; margin-top: 8px; min-height: 16px; }
.forza-barra { flex: 1; height: 6px; border-radius: 999px; background: var(--ink-200); overflow: hidden; }
.forza-barra i { display: block; width: 0; height: 100%; border-radius: inherit; transition: width .2s, background-color .2s; }
.forza small { min-width: 56px; font-size: 12px; color: var(--ink-500); }
.forza.livello-1 i { width: 25%; background: var(--errore); }
.forza.livello-2 i { width: 50%; background: var(--attenzione); }
.forza.livello-3 i { width: 75%; background: var(--brand-500); }
.forza.livello-4 i { width: 100%; background: var(--successo); }

.generatore {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 10px; padding: 10px 14px;
  background: var(--ink-50); border: 1px solid var(--ink-200); border-radius: 8px;
}
.generatore label { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-700); }
.generatore input[type=range] { width: 140px; }

/* ——— Messaggi ———————————————————————————————————————————————— */

.errore {
  margin: 0 0 16px; padding: 12px 16px; border-radius: 8px;
  border: 1px solid rgb(179 38 30 / .3); background: var(--errore-sfondo); color: var(--errore);
}
.info {
  margin: 16px 0 0; padding: 12px 16px; border-radius: 8px;
  border: 1px solid var(--ink-200); background: var(--ink-50); color: var(--ink-700);
}
.attenzione {
  margin: 0 0 16px; padding: 12px 16px; border-radius: 8px;
  border: 1px solid var(--brand-200); background: var(--brand-50); color: var(--brand-900);
}

.etichetta {
  display: inline-block; padding: 2px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--ink-100); color: var(--ink-600); font-size: 12px; font-weight: 500; line-height: 18px;
}
.etichetta.allerta { background: rgb(168 97 0 / .1); color: var(--attenzione); }

#avvisi {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: calc(100vw - 32px);
}
.notifica {
  max-width: 440px; padding: 12px 16px; border-radius: 8px; box-shadow: var(--ombra-lg);
  border: 1px solid rgb(0 128 0 / .3); background: #fff; color: var(--successo);
  animation: entra .2s ease-out;
}
.notifica-errore { border-color: rgb(179 38 30 / .3); background: var(--errore-sfondo); color: var(--errore); }
@keyframes entra { from { opacity: 0; transform: translateY(6px); } }

/* ——— Accesso: come la pagina di login della dashboard ——————————————— */

.ingresso {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; min-height: 100vh;
  background: #fff; color: var(--ink-800);
}
.filo-oro { height: 4px; background: var(--brand-500); }
.anelli span { position: absolute; z-index: -1; border-radius: 50%; border: solid var(--brand-50); pointer-events: none; }
.anelli span:first-child { right: -192px; top: -192px; width: 576px; height: 576px; border-width: 72px; }
.anelli span:last-child { left: -160px; bottom: -256px; width: 480px; height: 480px; border-width: 56px; }
.ingresso-centro { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 16px; }
.ingresso-colonna { width: 100%; max-width: 26rem; }
.ingresso-marchio { text-align: center; }
.ingresso-marchio img { display: block; height: 64px; width: auto; margin: 0 auto; }
.sopratitolo {
  display: flex; align-items: center; justify-content: center; gap: 12px; margin: 24px 0 0;
  font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-500);
}
.sopratitolo span { width: 32px; height: 1px; background: var(--brand-300); }
.ingresso-scheda {
  margin-top: 32px; padding: 32px; border-radius: 16px; background: #fff;
  box-shadow: 0 0 0 1px var(--ink-200), 0 20px 25px -5px rgb(38 35 39 / .05), 0 8px 10px -6px rgb(38 35 39 / .05);
}
.ingresso-scheda h1 { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -.01em; }
.ingresso-scheda .sub { margin: 4px 0 0; }
.ingresso-scheda > .campo:first-of-type { margin-top: 24px; }
.ingresso-scheda .btn + .btn { margin-top: 10px; }
.riservato { display: flex; align-items: flex-start; justify-content: center; gap: 8px; margin: 24px 0 0; font-size: 12px; color: var(--ink-500); }
.riservato .ico { width: 14px; height: 14px; margin-top: 1px; }
.piede { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 16px 24px; font-size: 12px; color: var(--ink-500); }

/* ——— Applicazione: barra oro, menu bianco, contenuto su grigio ———————— */

.guscio { display: flex; flex-direction: column; min-height: 100vh; }

.barra { position: relative; z-index: 30; background: var(--brand-500); }
.barra-dentro { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 32px; }
.barra-marchio { display: flex; align-items: center; gap: 14px; min-width: 0; }
.barra-marchio img { display: block; height: 36px; width: auto; flex: none; }
.barra-app { padding-left: 14px; border-left: 1px solid rgb(38 35 39 / .25); color: var(--ink-900); font-weight: 600; white-space: nowrap; }
.barra-destra { display: flex; align-items: center; gap: 6px; }
.barra-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 0; border-radius: 999px;
  background: none; color: var(--ink-900); font: inherit; font-weight: 500; cursor: pointer; transition: background-color .15s;
}
.barra-btn:hover { background: rgb(148 99 0 / .2); }

.profilo { position: relative; }
.profilo > summary {
  display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 999px;
  color: var(--ink-900); cursor: pointer; list-style: none; transition: background-color .15s;
}
.profilo > summary::-webkit-details-marker { display: none; }
.profilo > summary:hover { background: rgb(148 99 0 / .2); }
.profilo > summary .ico { width: 16px; height: 16px; transition: transform .15s; }
.profilo[open] > summary .ico { transform: rotate(180deg); }
.profilo-nome { font-weight: 500; }
.iniziali {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: #fff; color: var(--brand-800); font-size: 13px; font-weight: 600;
}
.profilo-menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 256px; padding: 8px 0;
  background: #fff; border: 1px solid var(--ink-200); border-radius: 12px; box-shadow: var(--ombra-lg);
}
.profilo-chi { padding: 4px 16px 12px; border-bottom: 1px solid var(--ink-200); }
.profilo-chi b { display: block; color: var(--ink-900); overflow: hidden; text-overflow: ellipsis; }
.profilo-chi .ruolo { display: inline-flex; margin-top: 6px; padding: 2px 8px; border-radius: 999px; background: var(--brand-100); color: var(--brand-800); font-size: 12px; font-weight: 500; }
.profilo-voci { padding-top: 4px; }
.profilo-voci + .profilo-voci { margin-top: 4px; border-top: 1px solid var(--ink-200); }
.profilo-voce {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 16px; border: 0; background: none;
  font: inherit; color: var(--ink-700); text-align: left; cursor: pointer; transition: background-color .15s;
}
.profilo-voce .ico { width: 16px; height: 16px; color: var(--ink-400); }
.profilo-voce:hover { background: var(--ink-100); color: var(--ink-900); }
.profilo-voce.esci { font-weight: 600; color: var(--brand-800); }
.profilo-voce.esci .ico { color: currentColor; }
.profilo-voce.esci:hover { background: var(--brand-50); }

.area { flex: 1; display: flex; align-items: stretch; min-height: 0; }
.nav { width: 248px; flex: none; padding: 16px 12px 24px; background: #fff; border-right: 1px solid var(--ink-200); }
.nav-gruppo { display: flex; flex-direction: column; gap: 4px; }
.nav-titolo { margin: 20px 12px 6px; font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-500); }
.navbtn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 8px 12px; border: 0; border-radius: 8px; background: none;
  font: inherit; font-weight: 500; color: var(--ink-600); text-align: left; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.navbtn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navbtn b { flex: none; font-size: 12px; font-weight: 500; color: var(--ink-500); }
.navbtn:hover { background: var(--ink-100); color: var(--ink-900); }
.navbtn[aria-current="true"] { background: var(--brand-100); color: var(--brand-800); }
.navbtn[aria-current="true"] b { color: var(--brand-800); }

.principale { flex: 1; min-width: 0; max-width: 104rem; padding: 28px 32px 64px; }
.testata { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.testata h1 { font-size: 20px; line-height: 28px; font-weight: 600; }
.sub { margin: 4px 0 0; font-size: 14px; color: var(--ink-500); }
.testata-azioni { display: flex; flex-wrap: wrap; gap: 8px; }

.ricerca { position: relative; margin-bottom: 16px; }
.ricerca > .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-500); pointer-events: none; }
.ricerca input { padding-left: 40px; padding-right: 44px; background: #fff; }
.ricerca kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  padding: 1px 7px; border: 1px solid var(--ink-300); border-radius: 6px; background: var(--ink-50);
  font-family: var(--mono); font-size: 12px; color: var(--ink-500);
}

/* position: relative tiene dentro il riquadro anche i testi nascosti (.nascosto)
   delle tabelle: senza, sfuggono allo scorrimento e allargano la pagina sul telefono. */
.pannello { position: relative; background: #fff; border: 1px solid var(--ink-200); border-radius: 12px; overflow: hidden; }
.pannello.scorre { overflow-x: auto; }

.spiegazione { margin: 0; padding: 12px 20px; background: var(--brand-50); border-bottom: 1px solid var(--ink-200); color: var(--brand-900); }

.elenco-vuoto { padding: 48px 20px; text-align: center; color: var(--ink-500); }
.elenco-vuoto b { display: block; margin-bottom: 4px; color: var(--ink-900); font-size: 15px; }
td.elenco-vuoto { padding: 24px 20px; }
.elenco-vuoto-azioni { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }

/* ——— Righe delle credenziali —————————————————————————————————— */

.riga {
  display: grid; align-items: center; gap: 16px;
  /* Colonna delle azioni a misura fissa, con il posto per "2FA": ogni riga è
     una griglia a sé e le colonne restano allineate solo se misurano uguale. */
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.15fr) minmax(0, 1.25fr) 132px;
  padding: 10px 16px 10px 20px; border-top: 1px solid var(--ink-200);
  transition: background-color .15s;
}
.spiegazione + .riga, .riga:first-child { border-top: 0; }
.riga:hover { background: var(--ink-50); }

.riga-titolo {
  display: flex; align-items: center; gap: 12px; min-width: 0; padding: 0; border: 0; background: none;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.riga-nomi { display: flex; flex-direction: column; min-width: 0; }
.riga-nomi b, .riga-nomi small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.riga-nomi b { color: var(--ink-900); font-weight: 600; }
.riga-nomi small { font-size: 12px; color: var(--ink-500); }
.riga-titolo:hover .riga-nomi b { color: var(--brand-700); }

.avatar {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 8px;
  font-size: 15px; font-weight: 600;
}
.avatar.t0 { background: var(--brand-100); color: var(--brand-800); }
.avatar.t1 { background: var(--brand-200); color: var(--brand-900); }
.avatar.t2 { background: var(--ink-200); color: var(--ink-800); }
.avatar.t3 { background: var(--brand-500); color: var(--ink-900); }
.avatar.t4 { background: var(--ink-800); color: var(--brand-200); }
.avatar.t5 { background: var(--brand-50); color: var(--brand-700); box-shadow: inset 0 0 0 1px var(--brand-200); }

.riga-utente { min-width: 0; }
.copiabile {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin-left: -8px; padding: 4px 8px;
  border: 0; border-radius: 6px; background: none; font: inherit; color: var(--ink-700); cursor: pointer;
}
.copiabile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copiabile .ico { width: 15px; height: 15px; color: var(--ink-400); }
.copiabile:hover { background: var(--ink-100); color: var(--ink-900); }
.copiabile:hover .ico { color: var(--ink-700); }

.riga-password { display: flex; align-items: center; gap: 2px; min-width: 0; }
.riga-password code { min-width: 0; margin-right: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.riga-password .etichetta { margin-left: 6px; }
.puntini { color: var(--ink-400); letter-spacing: .08em; }
.in-chiaro { padding: 2px 6px; border-radius: 6px; background: var(--brand-50); color: var(--ink-900); }

.riga-azioni { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.riga-azioni .btn { margin-right: 4px; }

/* ——— Finestre ——————————————————————————————————————————————— */

.modale-sfondo {
  position: fixed; inset: 0; z-index: 50; overflow: auto;
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 24px;
  background: rgb(38 35 39 / .5);
}
.modale {
  width: 100%; max-width: 640px; background: #fff; border-radius: 16px;
  box-shadow: 0 0 0 1px var(--ink-200), 0 25px 50px -12px rgb(0 0 0 / .25);
  animation: entra .15s ease-out;
}
.modale header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--ink-200); }
.modale header h3 { font-size: 18px; line-height: 26px; font-weight: 600; }
.modale .corpo { padding: 20px 24px; }
.modale .corpo > p:last-child, .modale .corpo > .campo:last-child { margin-bottom: 0; }
.modale footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 24px;
  border-top: 1px solid var(--ink-200); background: var(--ink-50); border-radius: 0 0 16px 16px;
}
.modale .errore { margin: 16px 0 0; }
.spazio { flex: 1; }

.scheda-testata { display: flex; align-items: center; gap: 12px; min-width: 0; }
.scheda-testata small { display: block; font-size: 12px; color: var(--ink-500); }
.scheda { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 14px 16px; align-items: baseline; margin: 0; }
.scheda dt { font-weight: 500; color: var(--ink-500); }
.scheda dd { margin: 0; min-width: 0; color: var(--ink-900); overflow-wrap: anywhere; }
.scheda dd a { display: inline-flex; align-items: center; gap: 6px; }
.scheda dd a .ico { width: 15px; height: 15px; }
.con-azioni { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.con-azioni code { padding: 4px 8px; border: 1px solid var(--ink-200); border-radius: 6px; background: var(--ink-50); color: var(--ink-900); overflow-wrap: anywhere; }
.con-azioni code.puntini { color: var(--ink-400); }
.con-azioni code.in-chiaro { background: var(--brand-50); border-color: var(--brand-200); }
.totp { font-size: 17px; font-weight: 600; letter-spacing: .08em; }
.scadenza { font-size: 12px; color: var(--ink-500); min-width: 82px; }
.scheda .note { white-space: pre-wrap; color: var(--ink-700); }
.modale .attenzione { margin: 20px 0 0; }
.piede-scheda { margin: 20px 0 0; padding-top: 14px; border-top: 1px solid var(--ink-200); font-size: 12px; color: var(--ink-500); }

.elenco-puntato { margin: 0 0 14px; padding-left: 20px; }
.elenco-puntato li { margin: 4px 0; }

.password-grande {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px;
  padding: 12px 16px; border: 1px solid var(--brand-200); border-radius: 8px; background: var(--brand-50);
}
.password-grande code { font-size: 18px; font-weight: 600; color: var(--ink-900); overflow-wrap: anywhere; }

/* ——— Tabelle: utenti e registro ———————————————————————————————— */

table { width: 100%; border-collapse: collapse; text-align: left; }
th {
  padding: 12px 20px; background: var(--ink-50); border-bottom: 1px solid var(--ink-200);
  font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-500); white-space: nowrap;
}
td { padding: 12px 20px; border-top: 1px solid var(--ink-200); color: var(--ink-700); vertical-align: middle; }
tbody tr:first-child td { border-top: 0; }
td b { color: var(--ink-900); font-weight: 500; }
td select { width: auto; min-width: 160px; padding: 6px 10px; }
.cella-azioni { text-align: right; white-space: nowrap; }
.cella-azioni .btn + .btn { margin-left: 6px; }

.legenda { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 24px 0 0; }
.legenda div { padding: 20px; background: #fff; border: 1px solid var(--ink-200); border-radius: 12px; }
.legenda dt { font-weight: 600; color: var(--ink-900); }
.legenda dd { margin: 8px 0 0; color: var(--ink-600); }

/* ——— Schermi stretti ————————————————————————————————————————— */

@media (max-width: 1023px) {
  .barra-dentro { padding: 12px 16px; }
  .profilo-nome { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .area { flex-direction: column; }
  /* Il menu diventa una sola riga che scorre: i titoli dei gruppi restano
     come separatori sottili, e per chi usa un lettore di schermo. */
  .nav {
    display: flex; align-items: center; gap: 4px; width: auto; padding: 8px 12px;
    overflow-x: auto; scrollbar-width: none; border-right: 0; border-bottom: 1px solid var(--ink-200);
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav-gruppo { display: contents; }
  .nav-titolo { flex: none; align-self: stretch; width: 1px; margin: 6px 6px; overflow: hidden; color: transparent; font-size: 0; background: var(--ink-200); }
  .navbtn { width: auto; flex: none; }
  .principale { padding: 24px 16px 56px; }
  .legenda { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .barra-app { display: none; }
  .barra-btn { padding: 8px; }
  .barra-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .riga { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px 12px 12px 16px; }
  .riga-titolo { grid-column: 1 / -1; }
  .riga-utente, .riga-password { padding-left: 48px; }
  .riga-utente { grid-column: 1 / -1; }
  .riga-password { grid-column: 1; }
  .riga-azioni { grid-column: 2; }
  .griglia2 { grid-template-columns: 1fr; }
  .scheda { grid-template-columns: 1fr; gap: 4px; }
  .scheda dd { margin-bottom: 10px; }
  .modale-sfondo { padding: 12px; }
  .modale header, .modale .corpo, .modale footer { padding-left: 16px; padding-right: 16px; }
  .con-pulsanti { flex-wrap: wrap; }
  .con-pulsanti input { flex-basis: 100%; }
  #avvisi { left: 16px; right: 16px; bottom: 16px; align-items: stretch; }
}

@media (max-width: 639px) {
  .anelli { display: none; }
  .ingresso-scheda { padding: 24px; }
  .ingresso-marchio img { height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
