/* AI Actions · foglio di stile unico, dalla guida del ridisegno (ottobre 2026).
   Ordine: token per modo (giorno, notte, alto contrasto giorno, alto contrasto notte), base, impalcatura,
   componenti, pagine. Un solo arrotondamento per i rettangoli (16px), pillole per pulsanti e selettori. */

/* ================================================================ token: giorno */
:root {
  color-scheme: light;
  --fg: #18181B; --fg-input: #141726; --muted: #505870; --placeholder: #8A92A6; --chevron: #5F6780;
  --frame: #FFFFFF; --main-bg: #F1F2FA; --panel: #FFFFFF; --line: #E8EBF1; --grey: #E4E7EE; --grey-hover: #DDE1EA;
  --ghost-hover: #ECEEF4; --row-hover: #F5F6FA; --seg-bg: #EEF0F5; --thead: #FFFFFF; --track: #E6E9F0;
  --accent: #4F46E5; --accent-hover: #4338CA; --accent-soft: #E0E7FF; --accent-tint: #EEF2FF; --accent-text: #4338CA; --link-hover: #4338CA;
  --dot-ok: #16A34A; --dot-warn: #F08A1C; --dot-bad: #E0383B;
  --warn-text: #A84B05; --bad-text: #C62828; --ok-text: #1E7A45;
  --danger: #C21F23; --danger-hover: #A3171B;
  --notice-bad: #FDEBEB; --notice-warn: #FEF1E2; --count-bad: #C62828;
  --log-warn: #C25A0A; --log-ok: #1E8A4C;
  --field-border: 1.5px solid #C6CDD9; --field-bg: #FFFFFF; --field-shadow: 0 1px 2px rgba(20,24,60,.05), 0 4px 12px rgba(20,24,60,.05);
  --dash-del: 1.5px dashed #E2B9B9; --dash-todo: 1.5px dashed #C9D0DC; --dash-up: 1.5px dashed var(--line-ext); --drop-bg: var(--panel);
  --panel-shadow: 0 1px 2px rgba(20,24,60,.05), 0 8px 24px rgba(20,24,60,.07);
  --main-grad: radial-gradient(700px 520px at 0% 0%, #E0E4FF 0%, transparent 70%), radial-gradient(640px 560px at 100% 100%, #E6E9FF 0%, transparent 70%);
  --main-inset: none;
  --btn-dark: #18181B; --btn-dark-fg: #FFFFFF; --btn-dark-hover: #34343A;
  --seg-fg: #3F4557; --seg-hover: rgba(255,255,255,.7); --seg-hover-fg: #3F4557; --seg-ring: none;
  --nav-on-bg: var(--accent-soft); --nav-on-fg: #141726; --nav-on-icon: var(--accent); --nav-hover: #F3F4F8;
  --nav-n-bg: #141726; --nav-n-fg: #FFFFFF; --nav-fg: #1F2333;
  --line-hd: #D9DEE8; --line-row: #E6E9EE; --line-ext: #D6D6DA; --th-fg: #141726;
  --fase-bg: #E4E7EE; --btn-fg: #18181B; --fbar-shadow: none; --line-list: #E7E7E9; --vmlink-dot: #A9B1C0; --trl-go: #4338CA;
  --ip-bg: #F8F8F9; --warn-strong: #A14C05; --cap-ok: #15803D; --underline: #6B7389; --pill-fg: #3F4557; --sel-fg: #18181B; --theme-fg: #3F4557; --cell-border: var(--field-border); --fase-hero-fg: var(--offline-fg); --step-ok-bg: #E7F6EC; --step-ok-fg: #166534; --line-prow: #F1F1F4; --line-prhead: var(--line-hd);
  --sq-bg: var(--grey); --sq-fg: var(--fg);
  --nav-sub-fg: var(--muted); --nav-foot-fg: #4E566A; --user-fg: #141726; --brand-fg: var(--fg); --strip-bg: var(--panel);
  --login-muted: var(--muted); --login-shadow: var(--panel-shadow); --login-bg: var(--panel); --login-field-border: 1px solid #C6CDD9;
  --ph-btn-shadow: 0 1px 2px rgba(20,24,60,.05), 0 4px 12px rgba(20,24,60,.05);
  --tab-count: #EFEFF1;
  --online-fg: #166534; --online-bg: #E3F4E8; --offline-fg: #3F4557;
  --chip-fg: #312E81; --chip-border: #C7D2FE;
  --pager-border: 1.5px solid #CBD2DE;
  --switch-on: #4F46E5;
  --toast-bg: #18181B; --toast-fg: #FFFFFF;
  --card-todo-bg: rgba(255,255,255,.55);
  --logo-sub: #6B7389;
  --r: 16px;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ================================================================ token: notte */
[data-theme="dark"] {
  color-scheme: dark;
  --fg: #F2F2F3; --fg-input: #F1F3F7; --muted: #ACB1BD; --placeholder: #8189A0; --chevron: #AAB0BE;
  --frame: #202025; --main-bg: #09090F; --panel: #26262B; --line: #36363D; --grey: #37373E; --grey-hover: #45454D;
  --ghost-hover: #34343B; --row-hover: #2E2E34; --seg-bg: #2E2E34; --thead: #26262B; --track: rgba(255,255,255,.12);
  --accent-soft: #4F46E5; --accent-tint: #25235A; --accent-text: #A5B4FC; --link-hover: #A5B4FC;
  --dot-ok: #2FC266; --dot-warn: #F59E3D; --dot-bad: #F05A5D;
  --warn-text: #FFB070; --bad-text: #FF8E90; --ok-text: #5BD08A;
  --notice-bad: rgba(239,68,68,.16); --notice-warn: rgba(242,140,40,.14);
  --log-warn: #FFB070; --log-ok: #5BD08A;
  --field-border: 1.5px solid #4A4A52; --field-bg: #1A1A1E; --field-shadow: none;
  --dash-del: 1.5px dashed #6A3A3A; --dash-todo: 1.5px dashed #4A4A52; --drop-bg: #1A1A1D;
  --panel-shadow: inset 0 0 0 1px rgba(255,255,255,.10), 0 8px 24px rgba(0,0,0,.35);
  --main-grad: radial-gradient(700px 520px at 0% 0%, rgba(79,70,229,.16) 0%, transparent 70%), radial-gradient(640px 560px at 100% 100%, rgba(79,70,229,.08) 0%, transparent 70%);
  --main-inset: inset 0 0 0 1px rgba(255,255,255,.06);
  --btn-dark: #EEF0F4; --btn-dark-fg: #141417; --btn-dark-hover: #FFFFFF;
  --seg-fg: #D2D6E0; --seg-hover: rgba(255,255,255,.1); --seg-hover-fg: #FFFFFF;
  --nav-on-bg: var(--accent); --nav-on-fg: #FFFFFF; --nav-on-icon: #FFFFFF; --nav-hover: #2E2E34;
  --nav-n-bg: #2E2E34; --nav-n-fg: #C3C8D3; --nav-fg: #E4E7EE;
  --line-hd: #44444C; --line-row: #36363D; --line-ext: #3E3E44; --th-fg: #FFFFFF;
  --nav-sub-fg: #C3C8D3; --nav-foot-fg: #C3C8D3; --user-fg: #E4E7EE; --strip-bg: #232327;
  --line-list: #2E2E33; --sq-fg: #F1F3F7; --trl-go: #A5B4FC; --warn-strong: #FFB870; --ip-bg: #222226; --cap-ok: #2FC266; --line-prow: #232328; --underline: #878D9C; --pill-fg: #E4E7EE; --sel-fg: #F1F3F7; --theme-fg: #D2D6E0; --nav-n-on-fg: #4338CA; --fase-hero-fg: #E4E7EE; --step-ok-bg: #16301F; --step-ok-fg: #2FC266;
  --login-muted: #C3C8D3; --login-shadow: 0 18px 50px rgba(0,0,0,.5); --login-field-border: 1px solid #4A4A52;
  --fase-bg: #37373E; --btn-fg: #F1F3F7; --fbar-shadow: inset 0 0 0 1px rgba(255,255,255,.10), 0 8px 24px rgba(0,0,0,.35);
  --ph-btn-shadow: none;
  --tab-count: #26262B;
  --online-fg: #86EFAC; --online-bg: rgba(34,197,94,.18); --offline-fg: #F1F3F7;
  --chip-fg: #C7D2FE; --chip-border: #3730A3;
  --pager-border: 1.5px solid #4A4A52;
  --switch-on: #818CF8;
  --toast-bg: #EEF0F4; --toast-fg: #141417;
  --card-todo-bg: rgba(255,255,255,.03);
  --logo-sub: #B4B4BE;
}

/* ================================================================ token: alto contrasto giorno */
[data-contrast="alto"] {
  --muted: #262B3B; --placeholder: #8189A0;
  --main-bg: #D6DCF2; --grey: #D6DBE5; --grey-hover: #CBD2DE; --ghost-hover: #E4E7EE; --row-hover: #F1F3F8; --seg-bg: #DCE0E9; --thead: #DFE3EC; --track: #D6DBE5;
  --accent: #3730A3; --accent-hover: #312E81; --accent-soft: #C7D2FE;
  --dot-ok: #15803D; --dot-warn: #D9700A; --dot-bad: #C62828;
  --bad-text: #B42318; --danger: #9A1418; --danger-hover: #7E1013;
  --log-warn: #C25A0A;
  --field-border: 2px solid #6E7891;
  --panel-shadow: inset 0 0 0 1.5px #A6AFC0;
  --main-grad: radial-gradient(700px 520px at 0% 0%, #A5B4FC 0%, transparent 70%), radial-gradient(640px 560px at 100% 100%, #CBD3FF 0%, transparent 70%);
  --seg-fg: #22273A;
  --nav-on-bg: #C7D2FE;
  --online-fg: #0B6B2E; --online-bg: #C6EBD3;
  --line-hd: #A6AFC0; --line-row: #D2D7E1; --line-ext: #A9A9B3; --tab-count: #DEDEE4; --line-list: #CFCFD6; --cell-border: 1.5px solid #C6CDD9; --ip-bg: #E4E4EA; --cap-ok: #0B6B2E; --underline: #353B4D; --step-ok-bg: #C6EBD3; --step-ok-fg: #166534;
  --nav-fg: #000000; --nav-sub-fg: #505870; --nav-foot-fg: #262B3B; --nav-n-bg: #DCE0E9; --nav-n-fg: #141726;
  --login-muted: #505870; --login-shadow: 0 1px 2px rgba(20,24,60,.05), 0 8px 24px rgba(20,24,60,.07); --login-field-border: var(--field-border);
}

/* ================================================================ token: alto contrasto notte */
[data-theme="dark"][data-contrast="alto"] {
  --fg: #FFFFFF; --muted: #DCE0E9; --placeholder: #9EA4B3;
  --frame: #26262C; --main-bg: #000000; --panel: #2E2E35; --grey: #46464E; --grey-hover: #50505A; --ghost-hover: #3A3A42; --row-hover: #34343B; --seg-bg: #1C1C20; --thead: #2E2E35;
  --dot-ok: #2FC266; --dot-warn: #F59E3D; --dot-bad: #F05A5D;
  --bad-text: #FF8E90; --log-warn: #FFB070;
  --field-border: 2px solid #8A8A94;
  --panel-shadow: inset 0 0 0 1.5px rgba(255,255,255,.28);
  --main-grad: radial-gradient(700px 520px at 0% 0%, rgba(79,70,229,.18) 0%, transparent 70%);
  --main-inset: inset 0 0 0 1px rgba(255,255,255,.16);
  --seg-fg: #F1F3F7; --seg-ring: inset 0 0 0 1px rgba(255,255,255,.22);
  --nav-on-bg: #3730A3; --nav-on-fg: #FFFFFF;
  --online-fg: #9BF0B8; --online-bg: rgba(34,197,94,.22);
  --line-hd: #6A6A74; --line-row: #46464E; --line-ext: #3E3E44; --tab-count: #34343B; --line-list: #2E2E33; --ip-bg: #2C2C33; --cap-ok: #4ADE80; --underline: #C8CDD8; --line-prhead: #44444C; --cell-border: 2px solid #8A8A94; --sel-fg: #F1F3F7; --step-ok-bg: #16301F; --step-ok-fg: #4ADE80;
  --sq-bg: #37373E; --track: rgba(255,255,255,.12);
  --offline-fg: #FFFFFF; --btn-fg: #FFFFFF; --field-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
  --nav-fg: #FFFFFF; --nav-sub-fg: #C3C8D3; --nav-foot-fg: #FFFFFF; --nav-n-bg: #3A3A42; --nav-n-fg: #FFFFFF; --brand-fg: #F2F2F3;
  --login-muted: #C3C8D3; --login-shadow: 0 18px 50px rgba(0,0,0,.5); --login-bg: #26262B;
}

/* ================================================================ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--frame); color: var(--fg);
  font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
b, strong { font-weight: 650; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
[hidden] { display: none !important; }
.mono, code, kbd { font-family: 'JetBrains Mono', ui-monospace, monospace; font-weight: 500; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ok-t { color: var(--ok-text); } .warn-t { color: var(--warn-text); } .bad-t { color: var(--bad-text); }

/* ================================================================ impalcatura: cornice, barra laterale, area destra */
.app { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; background: var(--frame); }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px;
  padding: 14px 14px 10px 18px; background: var(--frame); overflow-y: auto;
}
.main {
  margin: 20px 20px 20px 0; border-radius: var(--r); min-height: calc(100vh - 40px);
  background: var(--main-grad), var(--main-bg); box-shadow: var(--main-inset); min-width: 0;
}
.view { padding: 34px 32px 40px; min-width: 0; }

.brand { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 999px; text-decoration: none; color: var(--brand-fg); }
.mark3d { width: 42px; height: 33px; flex: none; position: relative; perspective: 260px; animation: aal-float 4.5s ease-in-out infinite; }
.m3 { position: absolute; inset: 0; transform-style: preserve-3d; animation: aal-spin 9s cubic-bezier(.65,0,.35,1) infinite; }
.brand:hover .m3 { animation-duration: 2.6s; }
@keyframes aal-spin { 0% { transform: rotateX(10deg) rotateY(0deg); } 38% { transform: rotateX(10deg) rotateY(360deg); } 100% { transform: rotateX(10deg) rotateY(360deg); } }
@keyframes aal-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .m3, .mark3d, .lg-m3, .lg-mark { animation: none; } }
.m3 svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: translateZ(calc(var(--z) * -1.1px)); }
.m3 svg:not(:first-child) { filter: brightness(.5) saturate(1.3); }
.m3 svg:last-child { filter: brightness(.35); }
.brand .word { width: 124px; height: 35px; }
/* Di notte la scritta «AI» si perde sul fondo scuro: solo lei si schiarisce (guida indaco). */
[data-theme="dark"] .brand .word { filter: contrast(.5) brightness(1.5) saturate(1.4); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 14px; border-radius: 999px;
  font: 500 15px/1.5 var(--sans); color: var(--nav-fg); text-decoration: none;
}
.nav a svg { width: 20px; height: 20px; flex: none; }
.nav a:hover { background: var(--nav-hover); }
.nav a[aria-current="page"], .nav a.sub[aria-current="page"], .side-foot .nav a[aria-current="page"] { background: var(--nav-on-bg); color: var(--nav-on-fg); font-weight: 600; box-shadow: 0 1px 0 rgba(0,0,0,.03); }
.nav a[aria-current="page"] svg { color: var(--nav-on-icon); }
.nav a.sub { height: 36px; margin: -2px 0 0 30px; padding: 0 14px; font-size: 14px; color: var(--nav-sub-fg); }
.nav .n {
  margin-left: auto; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center;
  font: 600 12px/18px var(--sans); background: var(--nav-n-bg); color: var(--nav-n-fg);
}
.nav a[aria-current="page"] .n { background: var(--accent); color: #fff; }
[data-theme="dark"] .nav a[aria-current="page"] .n { background: #fff; color: var(--nav-n-on-fg); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 12px; }
.side-foot .nav a { height: 34px; padding: 0 0 0 16px; gap: 8px; font-size: 13px; color: var(--nav-foot-fg); }
.side-foot .nav a svg { width: 18px; height: 18px; }
.user { display: flex; align-items: center; gap: 10px; padding: 10px 6px 4px 6px; border-top: 1px solid var(--line); }
.user a { text-decoration: none; color: var(--user-fg); font-weight: 600; font-size: 15px; line-height: 1.25; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user a:hover { color: var(--link-hover); }
.av {
  width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font: 650 14px/1 var(--sans); background: var(--fase-bg); color: var(--pill-fg);
}
.user .av { width: 40px; height: 40px; font: 600 15px/1.25 var(--sans); background: #4F46E5; }
.av.me { background: var(--accent); color: #fff; }
.user .av { color: #fff; }
.iconbtn {
  margin-left: auto; width: 36px; height: 36px; border-radius: 999px; border: 0; background: none; color: var(--muted);
  display: inline-grid; place-items: center; cursor: pointer;
}
.iconbtn:hover { background: var(--ghost-hover); color: var(--fg); }
.iconbtn svg { width: 19px; height: 19px; }

/* note lasciate a una persona: un riquadro in cima alla pagina */
.nota { margin-bottom: 20px; }

/* ================================================================ intestazioni di pagina */
.back { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 10px; font: 500 14.5px/1.5 var(--sans); color: var(--muted); text-decoration: none; }
.back:hover { color: var(--fg); }
.ph { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.phl { flex: 1; min-width: 0; }
.ph h1 { font: 500 34px/1.15 var(--sans); letter-spacing: -.02em; }
.ph .sub { margin-top: 6px; font-size: 16.5px; color: var(--muted); max-width: 90ch; }
.ph .sum { margin-top: 6px; font-size: 16.5px; color: var(--muted); }
.ph .sum b { color: var(--fg); font-weight: 650; }
.pa { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; max-width: 100%; min-width: 0; }

.hero {
  display: flex; align-items: center; gap: 18px 24px; flex-wrap: wrap; margin: 6px 0 20px;
  padding: 22px 24px; background: var(--panel); border-radius: var(--r); box-shadow: var(--panel-shadow);
}
.hero-l { flex: 1; min-width: 0; }
.hero h1 {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font: 650 28px/1.15 'Archivo', sans-serif; font-stretch: 116%; overflow-wrap: anywhere;
}
.hero .data { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; margin-top: 2px; font-size: 14px; color: var(--muted); }
.hero .data > span { display: inline-flex; align-items: center; line-height: 1; white-space: pre; }
.hero .data b { color: var(--fg); font-weight: 600; }
.hero .pa { align-self: center; }
.rename { width: 32px; height: 32px; border-radius: 999px; border: 0; background: none; color: var(--muted); cursor: pointer; display: inline-grid; place-items: center; }
.rename:hover { background: var(--ghost-hover); color: var(--fg); }
.rename svg { width: 17px; height: 17px; }

/* avviso sotto il titolo */
.note-in {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%; margin: 18px 0 26px; padding: 7px 12px;
  border-radius: 12px; font-size: 14px; line-height: 1.4; background: var(--notice-warn); color: var(--fg);
}
.note-in.bad { background: var(--notice-bad); }
.note-in .sdot { flex: none; }

/* ================================================================ riquadri */
.panel { background: var(--panel); border-radius: var(--r); box-shadow: var(--panel-shadow); min-width: 0; display: flex; flex-direction: column; }
/* riquadri uno sotto l'altro: 20px; affiancati in una griglia nessun margine (si allineano alti uguali) */
.panel + .panel, .stack > * + *, .panel + .grid2, .grid2 + .panel, .panel + .grid3, .grid3 + .panel, .home-grid + .panel { margin-top: 20px; }
.home-grid > *, .grid2 > *, .grid3 > *, .cards > *, .cols > * { margin-top: 0 !important; }
.hd { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 16px 0 22px; border-bottom: 1px solid var(--line-hd); }
.hd h2 { font: 700 16.5px/1.2 var(--sans); letter-spacing: -.005em; }
.hd .meta { font-size: 14px; color: var(--muted); }
.hd .r { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.bd { padding: 18px 22px; flex: 1; }
.bd.flush { padding: 0; }
.bd p + p { margin-top: 10px; }
.ft { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--line); font-size: 14.5px; }
.ft .r { margin-left: auto; display: flex; gap: 8px; }
.panel.closed .bd, .panel.closed .ft { display: none; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.grid2 > .panel + .panel, .grid3 > .panel + .panel, .grid2 > * + *, .grid3 > * + * { margin-top: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.cols > .stack, .cols > .panel { margin-top: 0; }
.empty { padding: 26px 22px; text-align: center; color: var(--muted); font-size: 14.5px; }
.cnt {
  display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 9px; border-radius: 999px;
  background: var(--count-bad); color: #fff; font: 700 14px/21px var(--sans);
}

/* righe dentro un riquadro: etichetta a sinistra, valore, azione a destra */
.set { display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-top: 1px solid var(--line-list); }
.set > svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.set-l { flex: 1; min-width: 0; }
.set-l b { font-weight: 700; }
.set-l small, .set-l .help { display: block; color: var(--muted); font-size: 14px; }
/* etichetta · valore con la spiegazione sotto · azioni */
.setrow { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line-list); }
.setrow .lb { font-weight: 600; }
.setrow .vl b { font-weight: 600; }
.setrow .vl p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.setrow .ct { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.set-a { display: flex; gap: 8px; align-items: center; flex: none; }

/* specifiche: chiave · valore */
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); padding: 4px 22px 10px; font-size: 14.5px; }
.kv > div { padding: 9px 0; border-top: 1px solid var(--line-list); }
.kv > div:nth-child(-n+2) { border-top: 0; }
.kv > div:nth-child(odd) { color: var(--muted); padding-right: 12px; }
.kv > div:nth-child(even) { overflow-wrap: anywhere; }

/* ================================================================ pulsanti */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 999px;
  border: 1px solid transparent; background: var(--grey); color: var(--btn-fg); font: 600 15px/1.5 var(--sans);
  text-decoration: none; cursor: pointer; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.btn:hover { background: var(--grey-hover); }
.btn.pri { background: var(--accent); color: #fff; font-weight: 650; }
.btn.pri:hover { background: var(--accent-hover); }
.btn.sec { background: var(--btn-dark); color: var(--btn-dark-fg); }
.btn.sec:hover { background: var(--btn-dark-hover); }
.btn.ghost { background: none; color: var(--muted); }
.btn.ghost:hover { background: var(--ghost-hover); color: var(--fg); }
.btn.del { background: none; border: 0; color: var(--bad-text); padding: 0 8px; }
.btn.del:hover { text-decoration: underline; background: none; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 14.5px; }
.btn.xs { height: 32px; padding: 0 12px; font-size: 13.5px; }
.btn.golive { height: 32px; padding: 0 14px; gap: 6px; font-size: 13.5px; }
.t td.a .btn.golive { width: 124px; margin: 3px 0; }
.ph .pa .btn.sec { border: 0; box-shadow: var(--ph-btn-shadow); }
.btn.del.sm, .btn.del.xs { padding: 0 8px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
form.inline { display: inline-flex; margin: 0; }

/* link */
.lnk { font: 650 14.5px/1.5 var(--sans); color: var(--fg); text-decoration: underline; text-decoration-color: var(--underline); text-underline-offset: 3px; }
.lnk:hover { color: var(--link-hover); }
.lnkbtn { border: 0; background: none; padding: 0; cursor: pointer; color: var(--fg); font: 600 13.5px/1.5 var(--sans); text-decoration: underline; text-decoration-color: var(--underline); text-underline-offset: 3px; }
.lnkbtn:hover { text-decoration-color: currentColor; }
.more { font: 600 14.5px/1.3 var(--sans); color: var(--fg); text-decoration: none; }
.more:hover { color: var(--link-hover); }
.alink { font: 600 14px/1.3 var(--sans); color: var(--accent-text); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.alink:hover { text-decoration: underline; }
.nm { font-weight: 650; color: var(--fg); text-decoration: none; }
.nm:hover { color: var(--link-hover); text-decoration: underline; }
.vmlink { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.vmlink:hover, .vmlink:focus-visible { border-bottom-color: currentColor; }
.t.sites .vmlink { font-size: 14.5px; line-height: 1.35; }
.hero .data a.vmlink { color: var(--fg); font-weight: 600; border-bottom: 1px dotted var(--vmlink-dot); }
.hero .data a.vmlink:hover { border-bottom: 1px solid currentColor; }

/* ================================================================ linguette */
.tabs {
  display: inline-flex; gap: 4px; padding: 5px; margin-bottom: 18px; border-radius: 999px;
  background: var(--panel); box-shadow: var(--panel-shadow); max-width: 100%; overflow-x: auto;
}
.tabs a, .tabs button {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; border: 0; background: none;
  font: 500 15px/1.5 var(--sans); color: var(--muted); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.tabs a:hover, .tabs button:hover { color: var(--fg); }
.tabs [aria-selected="true"], .tabs .on { background: var(--accent); color: #fff; font-weight: 600; }
.tabs .c { display: inline-grid; place-items: center; height: 20px; padding: 0 6px; border-radius: 999px; font: 600 12.5px/1.5 var(--sans); background: var(--tab-count); color: var(--muted); }
.tabs [aria-selected="true"] .c, .tabs .on .c { background: rgba(0,0,0,.22); color: #fff; }

/* ================================================================ ricerca e filtri */
.fbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; border-radius: 20px; box-shadow: var(--fbar-shadow); }
.fsearch { flex: 1 1 280px; position: relative; display: block; }
.fsearch svg { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--fg-input); pointer-events: none; }
.fsearch input { padding: 0 14px 0 46px !important; }
.fsel { position: relative; display: inline-block; flex: none; }
.fsel::after { content: ''; position: absolute; right: 18px; top: 50%; width: 7px; height: 7px; margin-top: -6px; border: solid var(--muted); border-width: 0 1.7px 1.7px 0; transform: rotate(45deg); pointer-events: none; }
.fsel select { padding: 0 40px 0 18px !important; font-weight: 500 !important; appearance: none; cursor: pointer; }
.fsel.on select { border-color: var(--accent) !important; background: var(--accent-tint) !important; }
.fend { margin-left: auto; font-size: 14.5px; color: var(--muted); white-space: nowrap; }
.fend b { color: var(--fg); font: 700 16px/1.5 var(--sans); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -6px 0 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--accent-tint); color: var(--chip-fg); border: 1px solid var(--chip-border); font-size: 13.5px; font-weight: 600; cursor: pointer; }

/* ================================================================ campi */
.in, .fbar input, .fbar select, .fld input:not([type="checkbox"]):not([type="radio"]), .fld select, .fld textarea {
  width: 100%; height: 48px; padding: 0 16px; border-radius: var(--r); border: var(--field-border);
  background: var(--field-bg); color: var(--fg-input); font: 400 15px/1.5 var(--sans); box-shadow: var(--field-shadow);
}
.fld textarea, textarea.in { height: 120px; padding: 12px 16px; font: 500 13.5px/1.5 'JetBrains Mono', monospace; resize: vertical; }
.in::placeholder, .fbar input::placeholder, .fld input::placeholder, .fld textarea::placeholder { color: var(--placeholder); }
.in:focus, .fbar input:focus, .fbar select:focus, .fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,.18); }
.fld select, select.in { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 21px, calc(100% - 17px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.in.sm, .fld select.sm { height: 38px; padding-left: 14px; box-shadow: none; color: var(--sel-fg); font-size: 14.5px; background-position: calc(100% - 20px) 16px, calc(100% - 15px) 16px; }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld > label, .lab { font: 600 14px/1.5 var(--sans); color: var(--fg); }
/* campi dei moduli: senza ombra, come nella bozza (l'ombra resta solo a ricerca e filtri); 13px di lato nei riquadri, 14 nei passi */
.fld input:not([type="checkbox"]):not([type="radio"]), .fld select, .fld textarea { padding-left: 13px; padding-right: 13px; box-shadow: none; }
.fstep .fld input:not([type="checkbox"]):not([type="radio"]), .fstep .fld textarea { padding-left: 14px; padding-right: 14px; }
.fstep .fld select { padding-left: 14px; }
.fld select { padding-right: 40px; }
.fld > label.mono { font: 600 12.6px/1.5 'JetBrains Mono', ui-monospace, monospace; }
/* campi in una riga di riquadro (Impostazioni PHP) */
.frow { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; padding: 14px 20px; border-top: 1px solid var(--line-list); }
.frow > .fgrid { flex: 1; }
.help, .note { font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fgrid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fgrid .w2 { grid-column: span 2; }
.fgrid + .fgrid, .fgrid + .fld, .fld + .fld, .fgrid + .note, .seg + .help { margin-top: 16px; }
.seg + .help { margin-top: 10px; }
/* Aspetto e Contrasto nel mio account: gli stessi bottoni, senza il bordo */
.seg.theme { border: 0; }
.seg.theme label span { color: var(--theme-fg); }
.seg.theme input:checked + span { color: #fff; }
.alab { margin: 18px 0 6px; font: 600 13px/1.5 var(--sans); color: var(--muted); }
/* Team: persona con l'avatar, stato a pallino */
.tm-p { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tm-p b { display: block; font-weight: 600; }
.stc.tm-s { gap: 8px; font-size: 15px; line-height: 1.5; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex: none; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check b { display: block; font-weight: 600; }
.check small { display: block; color: var(--muted); font-size: 13.5px; }
.err { padding: 10px 14px; border-radius: 12px; background: var(--notice-bad); font-size: 14px; }
.okmsg { padding: 10px 14px; border-radius: 12px; background: var(--online-bg); color: var(--online-fg); font-size: 14px; font-weight: 600; }

/* selettore a pillola */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--line-list); background: var(--seg-bg); box-shadow: var(--seg-ring); max-width: 100%; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; min-width: 44px; padding: 9px 18px; border-radius: 999px; text-align: center; font: 550 14.5px/1.5 var(--sans); color: var(--seg-fg); }
.seg label:hover span { background: var(--seg-hover); color: var(--seg-hover-fg); }
.seg input:checked + span { background: var(--accent); color: #fff; font-weight: 650; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* interruttore */
.switch { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .sw { position: relative; width: 40px; height: 24px; flex: none; border-radius: 999px; background: var(--grey-hover); transition: background .15s; margin-top: 1px; }
.switch .sw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .sw { background: var(--switch-on); }
.switch input:checked + .sw::after { transform: translateX(16px); }
.switch input:focus-visible + .sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch b { display: block; font-weight: 600; }
.switch small { display: block; margin-top: 2px; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
/* regole: un interruttore per riga, con la linea sopra */
.switch.rule { gap: 14px; padding: 14px 20px; border-top: 1px solid var(--line-list); }
.switch.rule b { display: inline; }
.switch.rule small { margin-top: 3px; font-size: 14.5px; line-height: 1.5; }
.frow .fld textarea { padding: 10px 13px; font: 400 15px/1.5 'JetBrains Mono', ui-monospace, monospace; }
.frow .fld input.corto { width: 100px; }
.frow .help { font-size: 13.5px; line-height: 1.45; }
/* celle modificabili delle taglie */
.in.cell { width: 80px; padding: 0 14px; border: var(--cell-border); box-shadow: none; color: var(--sel-fg); font: 400 15px/normal 'JetBrains Mono', ui-monospace, monospace; }
.t td.nm { font-weight: 600; }
.stack > #r-taglie { margin-top: 18px; }

/* passi dei moduli */
.fstep { padding: 22px 24px; border-top: 1px solid var(--line-list); }
.fstep:first-child { border-top: 0; }
.online-f .fstep { padding: 20px; }
.fstep h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font: 650 18px/1.2 'Archivo', var(--sans); }
.fstep h3 .num { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--sq-bg); color: var(--sq-fg); }
.fstep-end { padding: 13px 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14.5px; }
details.adv > summary { list-style: none; }
details.adv > summary::-webkit-details-marker { display: none; }
details.adv > summary .chev { display: inline-block; transition: transform .15s; }
details.adv[open] > summary .chev { transform: rotate(180deg); }
details.adv > .adv-in { margin-top: 14px; }

/* zona di caricamento */
.drop { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r); border: var(--dash-up); background: var(--drop-bg); }
.drop.over, .drop:hover { border-color: var(--accent); border-style: dashed; }
.drop-t { flex: 1; min-width: 0; }
.drop-t b { display: block; font: 600 14.5px/1.5 var(--sans); }
.drop-t small { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop .bar { margin-top: 8px; }

/* ================================================================ stati, fasi, icone */
.sdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--dot-ok); flex: none; }
.sdot.warn { background: var(--dot-warn); } .sdot.bad { background: var(--dot-bad); } .sdot.off { background: var(--muted); opacity: .6; }
.stc { display: inline-flex; align-items: center; gap: 9px; font-size: 14.5px; line-height: 1.3; white-space: nowrap; }
.stc small { font-size: 14px; color: var(--muted); }
.fase { display: inline-block; padding: 3px 10px; border-radius: 999px; font: 600 13px/1.5 var(--sans); background: var(--fase-bg); color: var(--offline-fg); white-space: nowrap; }
.hero .fase { color: var(--fase-hero-fg); }
.fase.online, .hero .fase.online { background: var(--online-bg); color: var(--online-fg); }
.kind { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.sq { width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--sq-bg); color: var(--sq-fg); display: inline-grid; place-items: center; }
.sq svg { width: 19px; height: 19px; }
.ai { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none; color: var(--muted); }
.ai svg { width: 20px; height: 20px; stroke-width: 2; }
.ai.warn { color: var(--log-warn); } .ai.bad { color: var(--bad-text); } .ai.ok { color: var(--log-ok); }

/* ================================================================ tabelle */
.tw { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
.t th {
  height: 52px; padding: 0 16px; text-align: left; font: 650 13px/1.2 var(--sans); color: var(--th-fg);
  line-height: 1.5; background: var(--thead); border-bottom: 1px solid var(--line-hd); white-space: nowrap;
}
.t td { padding: 18px 16px; border-bottom: 1px solid var(--line-row); vertical-align: middle; }
.t tbody tr:hover { background: var(--row-hover); }
.t th button.sort { all: unset; cursor: pointer; display: inline-flex; gap: 5px; align-items: center; }
.t th button.sort .ar { color: inherit; }
.t th button.sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.t td.a { text-align: right; white-space: nowrap; }
.t.sites td.a { padding-left: 20px; padding-right: 24px; }
.t td.a > * + * { margin-left: 6px; }
.t .sub2 { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.t a.sub2 { margin-top: 6px; font-size: 13.5px; line-height: 1.5; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t a.sub2:hover { text-decoration: underline; }
.sn { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sn .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* L'etichetta «Redirect» accanto al nome, nella lista Siti. */
.tag-redir { flex: none; padding: 1px 8px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-text); font: 650 12px/1.6 var(--sans); }
.ext { width: 26px; height: 26px; flex: none; border-radius: 999px; display: inline-grid; place-items: center; border: 1px solid var(--line-ext); color: var(--muted); }
.ext svg { width: 14px; height: 14px; transform: rotate(45deg); }
.ext:hover { color: var(--accent); border-color: var(--accent); }
.pager { display: flex; align-items: center; gap: 12px; padding: 13px 20px; font-size: 14.5px; }
.pager .pg-t { color: var(--muted); }
.pager .btn { border: var(--pager-border); }
.pager .btn[disabled] { opacity: .45; cursor: default; }
.pager .r { margin-left: auto; display: flex; gap: 8px; }
.show-more { display: flex; justify-content: center; gap: 12px; padding: 13px 20px; font-size: 14.5px; }
.lg-w { display: flex; align-items: flex-start; gap: 12px; }
.lg-w b { font-weight: 600; }
.lg-w p { margin-top: 3px; font-size: 14px; line-height: 1.45; color: var(--muted); max-width: 90ch; }
.dayhead { padding: 18px 20px 8px; font: 600 15px/1 'Archivo', var(--sans); color: var(--muted); }
.t td.lg-h { font-size: 13.5px; font-weight: 400; }
.lg-w .ai { width: 22px; height: 22px; place-items: start; }

/* ================================================================ righe di lista cliccabili */
.row2 { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); text-decoration: none; color: var(--fg); }
.row2:first-child { border-top: 0; }
a.row2:hover { background: var(--row-hover); }
.row2-t { flex: 1; min-width: 0; }
.row2-t b { display: block; font-weight: 700; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row2-t p { margin-top: 3px; font-size: 14.5px; line-height: 1.45; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-bad { color: var(--bad-text); font-weight: 700; } .pb-warn { color: var(--warn-text); font-weight: 700; }
.go { color: var(--chevron); font-size: 20px; line-height: 30px; }

/* «Da fare» con urgenza */
.todo { position: relative; display: flex; align-items: center; gap: 10px 20px; padding: 14px 20px 14px 22px; border-top: 1px solid var(--line-list); }
.todo::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: transparent; }
.todo.u-bad::before { background: var(--dot-bad); }
.todo.u-warn::before { background: var(--dot-warn); }
.todo:first-child { border-top: 0; }
.todo-t { flex: 1; min-width: 0; }
.todo-t b { display: block; font-weight: 600; }
.todo-t p { margin-top: 3px; font-size: 14.5px; color: var(--muted); }
.todo-t p.cut { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-a { display: flex; gap: 8px; align-items: center; flex: none; flex-wrap: wrap; justify-content: flex-end; }
details.what > summary { cursor: pointer; list-style: none; display: inline-block; margin-top: 4px; }
details.what > summary::-webkit-details-marker { display: none; }
details.what[open] + .cut, .todo-t:has(details.what[open]) p.cut { display: none; }
details.what ol, details.what ul { margin: 6px 0 0; padding-left: 20px; font-size: 14px; color: var(--muted); }

/* voci a riquadretto */
.tools { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 18px 22px 22px; }
.tool { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 11px; font-weight: 500; text-decoration: none; color: var(--fg); min-width: 0; }
.tool .sq svg { width: 18px; height: 18px; }
.tool:hover { background: var(--row-hover); }
.tool:hover .tool-t b, .tool:hover .sq { color: var(--link-hover); }
.tool-t { min-width: 0; }
.tool-t b { display: block; font: 500 15px/1.25 var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-t small { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.3; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Proposte: righe a griglia sito · proposta · quando · azioni */
.prow { position: relative; display: grid; grid-template-columns: 230px minmax(0, 1fr) 88px 290px; gap: 12px 20px; align-items: start; padding: 18px 22px; border-top: 1px solid var(--line-prow); }
.prhead { padding: 16px 22px 10px; font: 600 13px/1.5 var(--sans); color: var(--th-fg); border-top: 0; border-bottom: 1.5px solid var(--line-prhead); }
.prhead + [data-lista] > .prow:first-child { border-top: 0; }
.prow.u-warn::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--dot-warn); }
.pr-site { min-width: 0; }
.pr-site .nm { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-site .sub { display: block; margin-top: 3px; font-size: 13.5px; color: var(--muted); }
.pr-what b { font-size: 15.5px; font-weight: 600; }
.pr-what p.cut { margin-top: 4px; color: var(--muted); font-size: 14.5px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-what details.what > summary { margin-top: 4px; }
.pr-what .what[open] ~ p.cut, .pr-what:has(details.what[open]) p.cut { display: none; }
.pr-when { font-size: 14px; color: var(--muted); white-space: nowrap; }
.pr-act { justify-self: end; display: flex; gap: 8px; }

/* righe con il quadratino dell'icona (server cPanel e lotti) */
.conn { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 20px; border-top: 1px solid var(--line-list); }
.conn .sq svg { width: 20px; height: 20px; }
.conn b { font-size: 16px; font-weight: 600; }
.conn p { margin-top: 5px; font-size: 14.5px; color: var(--muted); }
.conn .ac { display: flex; gap: 8px; }

/* «Cosa ha fatto AI Action» nella pagina del sito: icona, testo, ora */
.act { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: start; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--line-list); }
.act:first-child { border-top: 0; }
.act .ai { width: 24px; height: 24px; margin-top: 1px; }
.act b { font-weight: 600; }
.act p { margin-top: 3px; font-size: 14.5px; color: var(--muted); }
.act .ah { padding-top: 2px; font: 400 13.5px/1.5 'JetBrains Mono', ui-monospace, monospace; color: var(--muted); white-space: nowrap; }

/* consigli: titolo e spiegazione */
.tip { padding: 14px 20px; border-top: 1px solid var(--line-list); }
.tip b { font-weight: 600; }
.tip p { margin-top: 3px; color: var(--muted); font-size: 14.5px; max-width: 90ch; }
/* «Altri consigli» in fondo a «Da fare»: una tendina che si apre lì sotto. */
.altri-consigli { border-top: 1px solid var(--line); }
.altri-consigli > summary { list-style: none; cursor: pointer; padding: 14px 22px; font-size: 14.5px; }
.altri-consigli > summary::-webkit-details-marker { display: none; }
.altri-consigli > summary::after { content: "›"; display: inline-block; margin-left: 6px; font-weight: 650; transition: transform .15s; }
.altri-consigli[open] > summary::after { transform: rotate(90deg); }
.altri-consigli > summary:hover .lnk { color: var(--link-hover); }
.altri-consigli .tip { padding-left: 22px; padding-right: 22px; }

/* numeri grandi in griglia (Velocità) */
.big { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-list); }
.big > div { padding: 16px 20px; border-right: 1px solid var(--line-list); border-bottom: 1px solid var(--line-list); }
.big > div:nth-child(3n) { border-right: 0; }
.big > div:nth-last-child(-n+3) { border-bottom: 0; }
.big b { display: block; font: 600 24px/1.2 'Archivo', var(--sans); }
.big span { font-size: 14px; color: var(--muted); }

/* trasferimenti di un sito: righe cliccabili */
.trl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 18px; align-items: center; padding: 16px 22px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.trl-row:first-child { border-top: 0; }
.trl-row:hover { background: var(--row-hover); }
.trl-t b { display: block; font-weight: 650; }
.trl-t small { color: var(--muted); font-size: 13.5px; }
.trl-go { font-size: 14px; font-weight: 600; color: var(--trl-go); }

/* riga tratteggiata «Elimina» */
.delrow { display: flex; align-items: center; gap: 16px; margin-top: 20px; padding: 16px 22px; border-radius: var(--r); border: var(--dash-del); }
.delrow-t { flex: 1; min-width: 0; }
.delrow-t b { display: block; font-weight: 650; }
.delrow-t p { font-size: 14px; color: var(--muted); }

/* ================================================================ KPI e barre */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 22px 24px; background: var(--panel); border-radius: var(--r); box-shadow: var(--panel-shadow); }
.kpi .k { font-size: 14.5px; font-weight: 500; color: var(--muted); }
.kpi .v { margin-top: 8px; font: 500 36px/1.1 var(--sans); font-stretch: 112%; letter-spacing: -.02em; }
.kpi .s { font-size: 14px; color: var(--muted); }
.kpi a.s { color: var(--warn-strong); font-weight: 600; text-decoration: none; }
.kpi a.s:hover { text-decoration: underline; }
.meter { padding: 12px 0; border-top: 1px solid var(--line); }
.meter:first-child { padding-top: 4px; border-top: 0; }
.meter > small { display: block; margin-bottom: 2px; font-size: 14px; color: var(--muted); }
.meter .mv { font-weight: 600; color: var(--muted); }
.meter .mv b { color: var(--fg); font-weight: 600; }
.meter .bar { margin-top: 8px; }
.bar { height: 7px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--dot-ok); }
.bar i.warn { background: var(--dot-warn); } .bar i.bad { background: var(--dot-bad); }
.cellbar { min-width: 120px; }
.cellbar b { font-weight: 600; }
.cellbar .bar { margin: 7px 0; }
.cellbar small { display: block; margin-top: 2px; font-size: 14px; line-height: 1.3; color: var(--muted); white-space: nowrap; }
/* consumi: valore e tetto affiancati, barra sottile sotto */
.cm-v { display: flex; align-items: baseline; gap: 8px; font-size: 14.5px; white-space: nowrap; }
.cm-v small { font-size: 13px; color: var(--muted); }
.cm .bar { height: 5px; margin-top: 7px; }

/* ================================================================ panoramica */
.prop-strip {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin-bottom: 20px; border-radius: var(--r); border: 1px solid transparent;
  background: var(--strip-bg); text-decoration: none; color: var(--fg);
}
[data-theme="dark"] .prop-strip, [data-contrast="alto"] .prop-strip { box-shadow: var(--panel-shadow); }
.prop-strip:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.ps-n { width: 40px; height: 40px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; background: #18181B; color: #fff; font: 700 16px/24px var(--sans); }
[data-theme="dark"] .ps-n { background: #F1F3F7; color: #18181B; }
.prop-strip > div { flex: 1; min-width: 0; }
.prop-strip b { display: block; font: 650 16px/1.5 var(--sans); }
.prop-strip small { display: block; margin-top: 2px; font-size: 13.5px; color: var(--muted); }
.home-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; align-items: stretch; }
.home-grid .hd h2 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel.fatto .hd h2 { font-size: 15px; line-height: 1.2; }
.panel.fatto .t td { padding: 12px 16px 11px; font-size: 13.5px; font-weight: 400; line-height: 1.5; }

/* ================================================================ schede dei collegamenti */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.gtitle { display: flex; align-items: center; gap: 10px; margin: 28px 0 14px; font: 650 17px/1.2 var(--sans); }
.gtitle .c { padding: 2px 9px; border-radius: 999px; background: var(--fase-bg); color: var(--pill-fg); font: 650 13px/1.2 var(--sans); }
.card { display: flex; flex-direction: column; padding: 22px 24px; background: var(--panel); border-radius: var(--r); box-shadow: var(--panel-shadow); min-width: 0; }
.card > * + *, .card > form > * { margin-top: 14px; }
.card.todo-c { background: var(--card-todo-bg); border: var(--dash-todo); }
.card-h { display: flex; align-items: flex-start; gap: 14px; }
.card-h .sq { background: var(--fase-bg); }
.card-h .sq svg { width: 20px; height: 20px; }

.card-h .t { flex: 1; min-width: 0; }
.card-h .t b { display: block; font: 650 16.5px/1.5 var(--sans); }
form.card > .card-h .t b { font-size: 17px; }
.card-h .t small { display: block; font-size: 13.5px; color: var(--muted); }
form.card > .card-h .t small { margin-top: 2px; }
.card-st { padding-top: 4px; gap: 7px; font-size: 14px; font-weight: 650; line-height: 1.5; white-space: nowrap; }
.card-st.ok { color: var(--ok-text); } .card-st.warn { color: var(--warn-text); } .card-st.off { color: var(--muted); }
.card .why { font-size: 14px; color: var(--muted); }
.card .tech { padding-top: 14px; border-top: 1px solid var(--line-list); font-size: 14.5px; overflow-wrap: anywhere; }
.card .tech + .tech { border-top: 0; padding-top: 0; }
.card .lab { margin-top: 20px; }
.card-f { margin-top: auto !important; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 16px; }
form.card > .card-f { padding-top: 18px; }
.card-f .r { margin-left: auto; display: flex; gap: 6px; }

/* regole: elenchi semplici */
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 13px 22px; border-top: 1px solid var(--line-list); font-size: 15px; line-height: 1.4; }
.plain li:first-child { border-top: 0; }
/* elenco con le righe come nei riquadri (Da sapere) */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: center; padding: 13px 20px; border-top: 1px solid var(--line-list); }
.plain li small { display: block; margin-top: 2px; font-size: 13.5px; color: var(--muted); }

/* ================================================================ messaggi, conferme, caricamenti */
.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 50; max-width: 420px; padding: 12px 18px; border-radius: 12px;
  background: var(--toast-bg); color: var(--toast-fg); font-size: 14.5px; font-weight: 500;
  transform: translateY(20px); opacity: 0; pointer-events: none; transition: transform .2s, opacity .2s;
}
.toast.su { transform: none; opacity: 1; }
dialog.confirm { border: 0; padding: 0; border-radius: var(--r); background: var(--panel); color: var(--fg); box-shadow: 0 20px 60px rgba(0,0,0,.3); width: min(460px, calc(100vw - 32px)); }
dialog.confirm::backdrop { background: rgba(20,14,10,.4); }
dialog.confirm .bd { padding: 22px 24px 8px; }
dialog.confirm h2 { font: 700 17px/1.3 var(--sans); margin-bottom: 8px; }
dialog.confirm p { color: var(--muted); font-size: 14.5px; }
dialog.confirm .ft { border-top: 0; justify-content: flex-end; padding: 16px 24px 22px; }
.skel { background: var(--grey); border-radius: 8px; min-height: 14px; }

/* ================================================================ accesso (misure della bozza, pagina «login4») */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px; padding: 16px; background: var(--frame); }
.login-art {
  border-radius: 16px; display: grid; place-items: center; overflow: hidden; position: relative;
  background: radial-gradient(520px 460px at 22% 18%, #A5B4FC 0%, transparent 70%), radial-gradient(560px 520px at 85% 90%, #3730A3 0%, transparent 70%), linear-gradient(150deg, #6366F1, #4338CA);
}
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lg-mark { width: 240px; height: 185px; position: relative; perspective: 900px; animation: aal-float 5s ease-in-out infinite; }
.lg-m3 { position: absolute; inset: 0; transform-style: preserve-3d; animation: aal-spin 9s cubic-bezier(.65,0,.35,1) infinite; }
.lg-m3 svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: translateZ(calc(var(--z) * -1.6px)); }
.lg-m3 svg:first-child { filter: brightness(0) invert(1); }
.lg-m3 svg:not(:first-child) { filter: brightness(0) invert(.86) sepia(.25); }
.lg-m3 svg:last-child { filter: brightness(0) invert(.72) sepia(.3); }
.login-word { width: 220px; height: 64px; filter: url(#solid-white); color: #fff; --logo-sub: #fff; }
.login-form { border-radius: 16px; background: var(--login-bg); box-shadow: var(--login-shadow); display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 40px 24px; }
.login-box { width: 400px; max-width: 100%; display: flex; flex-direction: column; gap: 16px; }
.login-box form { display: flex; flex-direction: column; gap: 16px; }
.login-box h1 { margin: 0 0 6px; font: 600 30px/1.15 var(--sans); letter-spacing: -.015em; }
.login-box .sub { margin: -8px 0 8px; font-size: 15.5px; line-height: 1.5; color: var(--login-muted); }
.login-box label { display: flex; flex-direction: column; gap: 6px; font: 600 14px/1.5 var(--sans); }
.login-box input { height: 48px; padding: 0 14px; border-radius: 16px; border: var(--login-field-border); background: var(--field-bg); color: var(--fg-input); font: 400 15px/1.5 var(--sans); }
.login-box input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,.18); }
.login-box .btn { width: 100%; height: 52px; margin-top: 6px; font-size: 16px; font-weight: 650; border: 0; }
.login-box .foot { margin-top: 4px; font-size: 14px; color: var(--login-muted); text-align: center; }

/* ================================================================ adattamento */
@media (max-width: 1200px) {
  .home-grid, .cols { grid-template-columns: minmax(0, 1fr); }
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) { .cards { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .fgrid, .fgrid.c3, .grid2, .grid3, .kpis { grid-template-columns: minmax(0, 1fr); }
  .fgrid .w2 { grid-column: auto; }
  .kv { grid-template-columns: 120px minmax(0, 1fr); }
  .login { grid-template-columns: minmax(0, 1fr); grid-template-rows: 240px auto; }
  .lg-mark { width: 150px; height: 116px; }
  .login-word { width: 160px; height: 46px; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; padding: 12px 16px; }
  .side .nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .side .nav a.sub { padding-left: 12px; }
  .side-foot { flex-direction: row; align-items: center; }
  .user { border-top: 0; padding: 0; margin-left: auto; }
  .main { margin: 0 8px 8px; }
  .view { padding: 24px 16px 32px; }
  .ph h1 { font-size: 28px; }
  .hero h1 { font-size: 23px; }
  .tools { grid-template-columns: minmax(0, 1fr); }
  .t thead { display: none; }
  .t, .t tbody, .t tr, .t td { display: block; width: 100%; }
  .t tr { padding: 12px 16px; border-top: 1px solid var(--line); }
  .t tbody tr:first-child { border-top: 0; }
  .t td { padding: 4px 0 !important; border: 0; }
  .t td.a { text-align: left; padding-top: 10px !important; }
  .t td[data-l]::before { content: attr(data-l); display: block; font-size: 12.5px; color: var(--muted); }
  .todo, .set, .delrow { flex-wrap: wrap; }
  .setrow { grid-template-columns: minmax(0, 1fr); }
  .big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .big > div { border-right: 1px solid var(--line-list) !important; border-bottom: 1px solid var(--line-list) !important; }
  .trl-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .prow { grid-template-columns: minmax(0, 1fr) auto; }
  .prhead { display: none; }
  .pr-what { grid-column: 1 / -1; grid-row: 2; }
  .pr-when { grid-row: 1; grid-column: 2; }
  .pr-act { grid-column: 1 / -1; justify-self: start; flex-wrap: wrap; }
  .fend { margin-left: 0; }
}

/* ================================================================ aggiunte delle pagine */
/* VM: pulsante grigio che copia l'IP (lista VM e pagina della VM) e rinomina con la matita accanto al titolo (§7.2) */
.ipcopy { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 4px 8px; border: 1px solid var(--line-ext); border-radius: 999px; background: var(--ip-bg); color: var(--fg); font-size: 14px; cursor: pointer; vertical-align: middle; }
.ipcopy .mono { font: 400 14px/1.5 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.ipcopy svg { width: 14px; height: 14px; color: var(--muted); }
.ipcopy:hover { border-color: var(--accent); }
.ipcopy:hover svg { color: var(--accent); }
.t td .ipcopy { margin-top: 9px; }
.hero .data .ipcopy { margin-left: 8px; }
.hero-t { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-t .rename { width: 34px; height: 34px; margin-left: -6px; border-radius: 50%; }
.hero-t .rename svg { width: 18px; height: 18px; }
/* tabella delle VM: celle più strette */
.t.vmt th { padding: 0 12px; }
.t.vmt td { padding: 18px 12px; }
.vm-n { display: flex; flex-wrap: wrap; gap: 8px 12px; line-height: 1.35; }
.t.vmt td b { font-weight: 700; }
.t.vmt td .cellbar b { font-weight: 600; }
.t.vmt td b.ok-t { color: var(--cap-ok); }
.kv .stc { line-height: inherit; }
.ren { position: relative; }
.ren > summary { list-style: none; }
.ren > summary::-webkit-details-marker { display: none; }
.ren-f { position: absolute; left: 0; top: 40px; z-index: 5; display: flex; gap: 8px; align-items: center; width: min(440px, calc(100vw - 64px)); padding: 12px; border-radius: var(--r); background: var(--panel); box-shadow: var(--panel-shadow), 0 12px 32px rgba(0,0,0,.18); }
.ren-f .in { flex: 1; min-width: 0; }
/* campi affiancati in una griglia: niente spazio sopra il secondo (lo dà già il gap) */
.fgrid > .fld + .fld { margin-top: 0; }

/* trasferimenti (v-trasferisci.tsx, v-trasferimento.tsx): spazi dentro i passi, link «Opzioni avanzate», errori in cima al riquadro, elenco degli account del lotto, passi con la spunta, Prima e dopo */
.fstep .lab { display: block; margin: 22px 0 8px; }
.fstep .note, .fstep .check + .fgrid { margin-top: 10px; }
.fstep .note b { font-weight: 700; }
.adv-in > .lab:first-child { margin-top: 0; }
details.adv { margin-top: 16px; }
details.adv > summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font: 600 14px/1.5 var(--sans); color: var(--accent-text); }
details.adv > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.panel > .err { margin: 22px 24px 0; }
.drop { cursor: pointer; }
.drop .bar { display: block; }
.lotto-tutti { align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.lista-acc { max-height: 440px; overflow: auto; }
.lista-acc li { padding: 10px 4px; }
.check.off { opacity: .55; cursor: not-allowed; }
/* Passi della messa online e del trasferimento: quelli di prima del ridisegno (Nico, 22/10: «andavano bene»), con lo
   stile nuovo. Cerchi uniti da una linea, verdi quelli fatti, rosso quello fermo, l'anello che gira su quello in corso. */
.passi { list-style: none; margin: 0; padding: 18px 20px; }
.passi li { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 14px; position: relative; padding-bottom: 18px; font-size: 15px; }
.passi li:last-child { padding-bottom: 0; }
.passi li::before { content: ""; position: absolute; left: 16px; top: 34px; bottom: 0; width: 2px; background: var(--line-hd); }
.passi li:last-child::before { display: none; }
.passi li.fatto::before { background: var(--step-ok-fg); opacity: .45; }
.passi .pn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; position: relative; border: 2px solid var(--line-hd); background: var(--panel); font: 600 14px/1 'JetBrains Mono', ui-monospace, monospace; color: var(--muted); }
.passi li.fatto .pn { border-color: var(--step-ok-fg); background: var(--step-ok-bg); color: var(--step-ok-fg); }
.passi li.errore .pn { border-color: var(--bad-text); background: var(--notice-bad); color: var(--bad-text); }
.passi li.corso .pn { background: var(--accent-tint); }
.passi li.corso .pn::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--accent); border-right-color: var(--accent); animation: passo-gira 1s linear infinite; }
@keyframes passo-gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .passi li.corso .pn::after { animation: none; border-color: var(--accent); } }
.passi li > div { padding-top: 6px; min-width: 0; }
.passi b { font-weight: 600; }
.passi p { margin-top: 3px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.prima-dopo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.prima-dopo b { display: block; font: 600 26px/1.2 'Archivo', var(--sans); }
.prima-dopo span { font-size: 13.5px; color: var(--muted); }
.bd > .note-in { margin: 14px 0 0; }
.prima-dopo + .note { margin-top: 10px; }
.bd > .note-in + .note { margin-top: 12px; }
/* Trasferimento fermo con la stanza rimasta sulla VM: il motivo, poi le azioni per toglierla. */
.fermo-motivo { padding: 16px 20px; overflow-wrap: anywhere; }
/* Il registro dettagliato del trasferimento: scorre dal basso, così le righe nuove sono già in vista. */
.registro { max-height: 460px; overflow: auto; display: flex; flex-direction: column-reverse; }
.registro pre { margin: 0; padding: 14px 20px; font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.registro .rg-t { color: var(--muted); margin-right: 8px; font-variant-numeric: tabular-nums; }
