/* =====================================================================
   account-nuovo.css — pagine account (accesso, registrazione, verifiche,
   link delle email). Linguaggio della nuova home: fondo #04060D, luci
   ciano/viola/verde, «il filo» luminoso, vetro, tipografia grande.
   Componenti con prefisso .ac-* (nessuno scontro con .ms-* dell'area clienti).
   Animazioni solo su transform/opacity, tutte finite entro 5 s;
   movimento ridotto: nessuna animazione.
   ===================================================================== */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/Inter-latin.woff2) format('woff2'); }
/* Metriche di ripiego simili a Inter: nessun salto quando arriva il carattere. */
@font-face { font-family: 'Inter Fallback'; src: local('Arial'), local('Helvetica Neue'), local('Helvetica'); size-adjust: 107%; ascent-override: 90%; descent-override: 22.4%; line-gap-override: 0%; }

:root {
  color-scheme: dark;
  --ac-bg: #04060D;
  --ac-panel: #0A0F1C;
  --ac-line: rgba(168, 186, 224, .12);
  --ac-line-2: rgba(168, 186, 224, .22);
  --ac-field: #0B1120;
  --ac-field-line: #5E6A84;
  --ac-ink: #F3F6FC;
  --ac-ink-2: #C9D0DE;
  --ac-muted: #9AA4B9;
  --ac-cyan: #00E5FF;
  --ac-cyan-2: #7FE9FF;
  --ac-green: #00E676;
  --ac-violet: #7C4DFF;
  --ac-amber: #FFC062;
  --ac-lilac: #B49CFF;
  --ac-blue: #8DB4FF;
  --ac-red: #FF7A7A;
  --ac-red-ink: #FFC2C2;
  --ac-green-ink: #9CF5C6;
  --ac-cyan-ink: #A9F3FF;
  --ac-grad: linear-gradient(100deg, #00E5FF 0%, #38D8FF 30%, #00E676 100%);
  --ac-btn: linear-gradient(120deg, #2CC6D8 0%, #39BFB0 55%, #36B38A 100%);
  --ac-ease: cubic-bezier(.2, .8, .2, 1);
  --ac-gutter: clamp(16px, 4.4vw, 64px);
  --ac-font: 'Inter', 'Inter Fallback', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--ac-bg); color: var(--ac-ink); font: 400 16px/1.55 var(--ac-font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
h1, h2, h3, p, ol, ul { margin: 0; }
img, svg { display: block; }
a { color: var(--ac-cyan-2); text-decoration: underline; text-decoration-color: rgba(127, 233, 255, .45); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
button { font: inherit; color: inherit; }
::selection { background: rgba(0, 229, 255, .3); color: #fff; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ac-cyan-2); outline-offset: 3px; border-radius: 8px; }
[tabindex="-1"]:focus { outline: none; }
.ac-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ac-skip { position: fixed; left: 16px; top: -64px; z-index: 50; padding: 10px 16px; border-radius: 10px; background: #fff; color: #04060D; font-weight: 700; text-decoration: none; transition: top .2s; }
.ac-skip:focus { top: 12px; }

/* ---------- Fondo: luci, griglia, il filo ---------- */
.ac-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.ac-bg::before { content: ""; position: absolute; inset: -10%; background:
  radial-gradient(42% 38% at 12% 8%, rgba(0, 229, 255, .16), transparent 70%),
  radial-gradient(40% 40% at 92% 12%, rgba(124, 77, 255, .18), transparent 70%),
  radial-gradient(46% 40% at 70% 100%, rgba(0, 230, 118, .09), transparent 70%);
  animation: ac-glow 2.4s var(--ac-ease) both; }
.ac-bg::after { content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(168, 186, 224, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(168, 186, 224, .05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 20%, transparent 75%); mask-image: radial-gradient(70% 60% at 50% 30%, #000 20%, transparent 75%); }
.ac-thread { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 62%; overflow: visible; }
.ac-thread path { fill: none; stroke-linecap: round; }
.ac-thread .t-glow { stroke: url(#acThreadGrad); stroke-width: 7; opacity: .28; filter: blur(6px); }
.ac-thread .t-line { stroke: url(#acThreadGrad); stroke-width: 1.6; opacity: .85; stroke-dasharray: 1; stroke-dashoffset: 1; animation: ac-draw 2.2s .25s var(--ac-ease) forwards; }
.ac-thread .t-spark { stroke: #E9FDFF; stroke-width: 2.4; stroke-dasharray: .035 1; stroke-dashoffset: 1.04; opacity: 0; animation: ac-spark 1.6s 1.4s cubic-bezier(.45, 0, .2, 1) 2 both; }
@keyframes ac-glow { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
@keyframes ac-draw { to { stroke-dashoffset: 0; } }
@keyframes ac-spark { 0% { stroke-dashoffset: 1.04; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }

/* ---------- Struttura ---------- */
.ac-shell { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.ac-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px var(--ac-gutter) 0; }
.ac-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ac-ink); text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -.02em; border-radius: 10px; }
.ac-logo img { width: 32px; height: 32px; border-radius: 9px; background: #fff; }
.ac-toplink { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--ac-line-2); background: rgba(255, 255, 255, .03); color: var(--ac-ink-2); font-size: 14px; font-weight: 600; text-decoration: none; transition: color .2s, border-color .2s, background-color .2s; }
.ac-toplink:hover { color: var(--ac-ink); border-color: rgba(168, 186, 224, .4); background: rgba(255, 255, 255, .06); }
.ac-toplink svg { width: 15px; height: 15px; }
.ac-main { flex: 1; display: grid; place-items: center; padding: clamp(24px, 5vh, 56px) var(--ac-gutter); }
.ac-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding: 0 var(--ac-gutter) 24px; font-size: 13px; color: var(--ac-muted); }
.ac-foot a { color: var(--ac-muted); text-decoration-color: rgba(154, 164, 185, .4); }
.ac-foot a:hover { color: var(--ac-ink-2); }

/* Due colonne (accesso e registrazione) */
.ac-split { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); }
.ac-aside { display: none; }
@media (min-width: 1024px) {
  .ac-split { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); }
  .ac-aside { position: sticky; top: 0; align-self: start; min-height: calc(100vh - 72px); min-height: calc(100dvh - 72px); display: flex; flex-direction: column; justify-content: center; padding: 40px var(--ac-gutter) 56px; }
  .ac-split .ac-main { padding-left: 24px; }
}

/* ---------- Colonna del marchio ---------- */
.ac-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ac-ink-2); }
.ac-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ac-cyan); box-shadow: 0 0 0 4px rgba(0, 229, 255, .14), 0 0 14px rgba(0, 229, 255, .8); }
.ac-display { max-width: 620px; font-size: clamp(44px, 4.6vw, 72px); line-height: .98; font-weight: 800; letter-spacing: -.045em; text-wrap: balance; }
.ac-grad { background: var(--ac-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--ac-cyan); }
.ac-lead { max-width: 540px; margin-top: 22px; font-size: 18px; line-height: 1.6; color: var(--ac-ink-2); }
.ac-pipe { position: relative; max-width: 520px; margin-top: 36px; padding: 0; list-style: none; }
.ac-pipe::before { content: ""; position: absolute; left: 11px; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, var(--ac-cyan), var(--ac-amber) 30%, var(--ac-lilac) 52%, var(--ac-green) 76%, var(--ac-blue)); transform-origin: top; animation: ac-grow 1.2s .3s var(--ac-ease) both; opacity: .7; }
.ac-pipe li { position: relative; display: grid; grid-template-columns: 24px 34px minmax(0, 1fr); align-items: baseline; gap: 0 12px; padding: 9px 0; animation: ac-rise .7s var(--ac-ease) both; }
.ac-pipe li:nth-child(1) { --c: var(--ac-cyan); animation-delay: .35s; }
.ac-pipe li:nth-child(2) { --c: var(--ac-amber); animation-delay: .47s; }
.ac-pipe li:nth-child(3) { --c: var(--ac-lilac); animation-delay: .59s; }
.ac-pipe li:nth-child(4) { --c: var(--ac-green); animation-delay: .71s; }
.ac-pipe li:nth-child(5) { --c: var(--ac-blue); animation-delay: .83s; }
.ac-pipe-dot { position: relative; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--ac-bg); border: 2px solid var(--c); box-shadow: 0 0 16px -2px var(--c); }
.ac-pipe-dot::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--c); }
.ac-pipe-n { font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ac-muted); letter-spacing: .06em; }
.ac-pipe-t { font-size: 15px; color: var(--ac-ink-2); }
.ac-pipe-t strong { color: var(--ac-ink); font-weight: 700; margin-right: 6px; }
.ac-trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 36px; font-size: 14px; color: var(--ac-muted); }
.ac-trust span { display: inline-flex; align-items: center; gap: 8px; }
.ac-trust svg { width: 16px; height: 16px; color: var(--ac-green); }
.ac-offer { max-width: 540px; margin-top: 32px; padding: 20px 22px; border-radius: 18px; border: 1px solid var(--ac-line); background: linear-gradient(160deg, rgba(0, 229, 255, .07), rgba(124, 77, 255, .05) 60%, transparent); animation: ac-rise .8s .4s var(--ac-ease) both; }
.ac-offer dl { display: grid; gap: 12px; margin: 0; }
.ac-offer dt { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ac-muted); }
.ac-offer dd { margin: 2px 0 0; font-size: 15px; color: var(--ac-ink-2); }
@keyframes ac-grow { from { transform: scaleY(0); } to { transform: none; } }
@keyframes ac-rise { from { opacity: 0; transform: translate3d(0, 12px, 0); } to { opacity: 1; transform: none; } }

/* ---------- Pannello di vetro ---------- */
.ac-card { position: relative; width: 100%; max-width: 468px; padding: clamp(26px, 4vw, 40px); border-radius: 26px; isolation: isolate;
  background: linear-gradient(180deg, rgba(17, 24, 42, .78), rgba(9, 13, 24, .86));
  box-shadow: 0 50px 120px -50px rgba(0, 0, 0, .9), 0 0 0 1px rgba(168, 186, 224, .13), inset 0 1px 0 rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
  animation: ac-rise .7s .05s var(--ac-ease) both; }
.ac-card--wide { max-width: 520px; }
.ac-card::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(0, 229, 255, .65), rgba(124, 77, 255, .35) 34%, rgba(168, 186, 224, 0) 60%, rgba(0, 230, 118, .3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.ac-card::after { content: ""; position: absolute; left: 10%; right: 10%; top: 0; height: 120px; z-index: -1; pointer-events: none; background: radial-gradient(60% 100% at 50% 0, rgba(0, 229, 255, .12), transparent 70%); }
.ac-card--center { text-align: center; }
.ac-card.is-done { display: flex; flex-direction: column; justify-content: center; } /* verify-email: esito alla stessa altezza dell'attesa */
.ac-title { font-size: clamp(28px, 3vw, 34px); line-height: 1.1; font-weight: 800; letter-spacing: -.035em; text-wrap: balance; }
.ac-sub { margin-top: 10px; font-size: 15px; color: var(--ac-ink-2); }
.ac-text { margin-top: 14px; font-size: 15px; line-height: 1.65; color: var(--ac-ink-2); }
.ac-text strong, .ac-sub strong { color: var(--ac-ink); font-weight: 700; }
.ac-email { display: inline-block; max-width: 100%; margin-top: 12px; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(0, 229, 255, .3); background: rgba(0, 229, 255, .07); color: var(--ac-cyan-ink); font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.ac-block { margin-top: 26px; }
.ac-stack { display: grid; gap: 12px; margin-top: 26px; }
.ac-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 8px; margin-top: 18px; font-size: 14px; color: var(--ac-muted); }

/* Icona di stato */
.ac-badge { position: relative; width: 68px; height: 68px; margin: 0 auto 22px; display: grid; place-items: center; border-radius: 22px; color: var(--ac-cyan); background: linear-gradient(160deg, rgba(0, 229, 255, .16), rgba(124, 77, 255, .10)); box-shadow: inset 0 0 0 1px rgba(0, 229, 255, .35), 0 18px 50px -18px rgba(0, 229, 255, .6); }
.ac-badge svg { width: 30px; height: 30px; }
.ac-badge--ok { color: var(--ac-green); background: linear-gradient(160deg, rgba(0, 230, 118, .18), rgba(0, 229, 255, .08)); box-shadow: inset 0 0 0 1px rgba(0, 230, 118, .4), 0 18px 50px -18px rgba(0, 230, 118, .6); }
.ac-badge--bad { color: var(--ac-red); background: linear-gradient(160deg, rgba(255, 122, 122, .16), rgba(124, 77, 255, .08)); box-shadow: inset 0 0 0 1px rgba(255, 122, 122, .4), 0 18px 50px -18px rgba(255, 122, 122, .45); }
.ac-badge--warn { color: var(--ac-amber); background: linear-gradient(160deg, rgba(255, 192, 98, .16), rgba(124, 77, 255, .08)); box-shadow: inset 0 0 0 1px rgba(255, 192, 98, .4), 0 18px 50px -18px rgba(255, 192, 98, .45); }
.ac-badge--wait::before, .ac-badge--wait::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; box-shadow: 0 0 0 1px rgba(0, 229, 255, .45); animation: ac-ring 2.2s var(--ac-ease) 2 both; }
.ac-badge--wait::after { animation-delay: .7s; }
.ac-badge--ok .ac-check { stroke-dasharray: 30; stroke-dashoffset: 30; animation: ac-tick .6s .2s var(--ac-ease) forwards; }
@keyframes ac-ring { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.55); } }
@keyframes ac-tick { to { stroke-dashoffset: 0; } }

/* ---------- Campi ---------- */
.ac-form { display: grid; gap: 18px; margin-top: 26px; }
.ac-form--tight { margin-top: 0; }
.ac-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 420px) { .ac-grid2 { grid-template-columns: 1fr; gap: 18px; } }
.ac-field { display: grid; gap: 8px; min-width: 0; text-align: left; }
.ac-labelrow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ac-label { font-size: 14px; font-weight: 600; color: var(--ac-ink-2); }
.ac-opt { font-weight: 500; color: var(--ac-muted); }
.ac-labelrow a { font-size: 14px; font-weight: 600; }
.ac-input-wrap { position: relative; }
.ac-input { width: 100%; height: 52px; padding: 0 16px 0 46px; border-radius: 14px; border: 1px solid var(--ac-field-line); background: var(--ac-field); color: var(--ac-ink); font: 500 16px/1 var(--ac-font); transition: border-color .2s, box-shadow .2s, background-color .2s; }
.ac-input--plain { padding-left: 16px; }
.ac-input--pw { padding-right: 52px; }
.ac-input::placeholder { color: #8792A8; opacity: 1; }
.ac-input:hover { border-color: #75819C; }
.ac-input:focus { outline: none; border-color: var(--ac-cyan); background: #0D1426; box-shadow: 0 0 0 4px rgba(0, 229, 255, .16), 0 10px 30px -14px rgba(0, 229, 255, .55); }
.ac-input[aria-invalid="true"] { border-color: var(--ac-red); }
.ac-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(255, 122, 122, .18); }
.ac-input:-webkit-autofill { -webkit-text-fill-color: var(--ac-ink); -webkit-box-shadow: 0 0 0 40px #0D1426 inset; caret-color: var(--ac-ink); }
.ac-ico { position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: #8792A8; pointer-events: none; transition: color .2s; }
.ac-input-wrap:focus-within .ac-ico { color: var(--ac-cyan); }
.ac-eye { position: absolute; right: 6px; top: 6px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: #A7B0C3; cursor: pointer; transition: color .2s, background-color .2s; }
.ac-eye:hover { color: var(--ac-ink); background: rgba(255, 255, 255, .06); }
.ac-eye svg { width: 19px; height: 19px; }
.ac-eye .i-off, .ac-eye[aria-pressed="true"] .i-on { display: none; }
.ac-eye[aria-pressed="true"] .i-off { display: block; }
.ac-help { font-size: 13px; color: var(--ac-muted); }
.ac-err { display: flex; align-items: flex-start; gap: 6px; font-size: 13.5px; font-weight: 500; color: var(--ac-red-ink); }
.ac-err::before { content: ""; flex: none; width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; background: var(--ac-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M7 3.5v4.2M7 9.8v.2' stroke='%2304060D' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.ac-err:empty { display: none; }

/* Misuratore della password: spazio sempre riservato (nessun salto) */
.ac-meter { display: grid; grid-template-columns: repeat(4, 1fr) auto; align-items: center; gap: 6px; min-height: 18px; }
.ac-meter i { height: 4px; border-radius: 4px; background: rgba(168, 186, 224, .16); transition: background-color .25s; }
.ac-meter[data-score="1"] i:nth-child(-n+1) { background: var(--ac-red); }
.ac-meter[data-score="2"] i:nth-child(-n+2) { background: var(--ac-amber); }
.ac-meter[data-score="3"] i:nth-child(-n+3) { background: #5CF2C4; }
.ac-meter[data-score="4"] i:nth-child(-n+4) { background: var(--ac-green); }
.ac-meter span { min-width: 92px; padding-left: 6px; text-align: right; font-size: 12.5px; font-weight: 600; color: var(--ac-muted); }
.ac-rules { display: grid; gap: 6px; padding: 0; list-style: none; font-size: 13.5px; color: var(--ac-muted); }
.ac-rules li { display: flex; align-items: center; gap: 8px; }
.ac-rules li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px #75819C; transition: background-color .2s, box-shadow .2s; }
.ac-rules li.ok { color: var(--ac-green-ink); }
.ac-rules li.ok::before { box-shadow: none; background: var(--ac-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-5' fill='none' stroke='%2304060D' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }

/* Caselle di spunta */
.ac-check-row { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 14px; line-height: 1.5; color: var(--ac-ink-2); text-align: left; }
.ac-check-row input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 0; border-radius: 7px; border: 1.5px solid var(--ac-field-line); background: var(--ac-field); cursor: pointer; display: grid; place-items: center; transition: background-color .2s, border-color .2s; }
.ac-check-row input::after { content: ""; width: 12px; height: 12px; transform: scale(0); transition: transform .2s var(--ac-ease); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.2 2.2 4.8-5' fill='none' stroke='%2304060D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.ac-check-row input:checked { background: var(--ac-cyan); border-color: var(--ac-cyan); }
.ac-check-row input:checked::after { transform: scale(1); }
.ac-check-row input[aria-invalid="true"] { border-color: var(--ac-red); }
.ac-check-row label { cursor: pointer; }

/* Codice SMS */
.ac-otp { height: 64px; padding: 0 16px; text-align: center; font: 700 28px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .5em; text-indent: .5em; font-variant-numeric: tabular-nums; }

/* ---------- Pulsanti ---------- */
.ac-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 22px; border: 0; border-radius: 999px; font-size: 16px; font-weight: 700; letter-spacing: -.01em; text-decoration: none; cursor: pointer; overflow: hidden; -webkit-tap-highlight-color: transparent;
  transition: transform .35s var(--ac-ease), box-shadow .35s var(--ac-ease), background-color .2s, border-color .2s, color .2s, opacity .2s; }
.ac-btn svg { width: 18px; height: 18px; flex: none; }
.ac-btn--primary { color: #04161C; background: var(--ac-btn); box-shadow: 0 10px 26px -18px rgba(44, 198, 216, .45), inset 0 1px 0 rgba(255, 255, 255, .28); }
.ac-btn--primary::before { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .22), transparent); transform: translateX(-120%) skewX(-18deg); pointer-events: none; }
@media (hover: hover) {
  .ac-btn--primary:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 14px 30px -18px rgba(44, 198, 216, .55), inset 0 1px 0 rgba(255, 255, 255, .3); }
  .ac-btn--primary:hover::before { transform: translateX(420%) skewX(-18deg); transition: transform .9s var(--ac-ease); }
  .ac-btn--ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(168, 186, 224, .45); transform: translateY(-1px); }
}
.ac-btn:active { transform: scale(.985); }
.ac-btn--ghost { color: var(--ac-ink); background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--ac-line-2); }
.ac-btn--google svg { width: 20px; height: 20px; }
.ac-btn--quiet { width: auto; min-height: 44px; padding: 0 16px; color: var(--ac-ink-2); background: transparent; font-weight: 600; font-size: 15px; }
.ac-btn--quiet:hover { color: var(--ac-ink); background: rgba(255, 255, 255, .05); }
.ac-btn[disabled], .ac-btn[aria-disabled="true"] { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
.ac-btn.loading, .ac-btn[aria-busy="true"] { color: transparent !important; pointer-events: none; opacity: 1; }
.ac-btn.loading svg, .ac-btn[aria-busy="true"] svg { opacity: 0; }
.ac-btn.loading::after, .ac-btn[aria-busy="true"]::after { content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 2.5px solid rgba(3, 17, 24, .28); border-top-color: #031118; animation: ac-spin .7s linear infinite; }
.ac-btn--ghost.loading::after, .ac-btn--ghost[aria-busy="true"]::after { border-color: rgba(243, 246, 252, .25); border-top-color: var(--ac-ink); }
.ac-linkbtn { padding: 0; border: 0; background: none; color: var(--ac-cyan-2); font-weight: 600; font-size: inherit; text-decoration: underline; text-decoration-color: rgba(127, 233, 255, .45); text-underline-offset: 3px; cursor: pointer; }
.ac-linkbtn:hover { text-decoration-color: currentColor; }
.ac-linkbtn[disabled] { color: var(--ac-muted); text-decoration: none; cursor: default; }
@keyframes ac-spin { to { transform: rotate(360deg); } }
.ac-spinner { width: 28px; height: 28px; margin: 0 auto; border-radius: 50%; border: 3px solid rgba(0, 229, 255, .18); border-top-color: var(--ac-cyan); animation: ac-spin .8s linear infinite; }

.ac-or { display: flex; align-items: center; gap: 14px; margin: 22px 0; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ac-muted); }
.ac-or::before, .ac-or::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--ac-line-2), transparent); }

/* ---------- Avvisi ---------- */
.ac-alert { display: none; align-items: flex-start; gap: 10px; margin-top: 20px; padding: 13px 15px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; text-align: left; }
.ac-alert.show { display: flex; animation: ac-pop .35s var(--ac-ease) both; }
.ac-form .ac-alert { margin-top: 0; }
.ac-alert svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.ac-alert > span { min-width: 0; overflow-wrap: anywhere; }
.ac-alert a { color: inherit; font-weight: 700; }
.ac-alert--error { color: var(--ac-red-ink); background: rgba(255, 82, 82, .09); box-shadow: inset 0 0 0 1px rgba(255, 122, 122, .36); }
.ac-alert--success { color: var(--ac-green-ink); background: rgba(0, 230, 118, .08); box-shadow: inset 0 0 0 1px rgba(0, 230, 118, .32); }
.ac-alert--info { color: var(--ac-cyan-ink); background: rgba(0, 229, 255, .07); box-shadow: inset 0 0 0 1px rgba(0, 229, 255, .3); }
.ac-alert .i-ok, .ac-alert .i-info { display: none; }
.ac-alert--success .i-err, .ac-alert--info .i-err { display: none; }
.ac-alert--success .i-ok, .ac-alert--info .i-info { display: block; }
@keyframes ac-pop { from { opacity: 0; transform: translate3d(0, -4px, 0); } to { opacity: 1; transform: none; } }

.ac-note { margin-top: 18px; font-size: 13px; line-height: 1.55; color: var(--ac-muted); text-align: left; }
.ac-note a { color: var(--ac-ink-2); }
.ac-switch { margin-top: 22px; font-size: 15px; color: var(--ac-ink-2); text-align: center; }
.ac-switch a { font-weight: 700; }
.ac-timer { min-height: 22px; margin-top: 10px; font-size: 13.5px; color: var(--ac-muted); font-variant-numeric: tabular-nums; }
.ac-auto { display: flex; justify-content: center; align-items: flex-start; gap: 8px; margin-top: 18px; font-size: 13.5px; color: var(--ac-muted); text-align: left; }
.ac-auto::before { content: ""; flex: none; margin-top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--ac-green); box-shadow: 0 0 0 4px rgba(0, 230, 118, .14); }

/* Passi numerati */
.ac-steps { position: relative; display: grid; gap: 14px; margin-top: 24px; padding: 0; list-style: none; counter-reset: ac; text-align: left; }
.ac-steps li { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 14.5px; color: var(--ac-ink-2); counter-increment: ac; }
.ac-steps li::before { content: counter(ac); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 13px; font-weight: 800; color: var(--ac-cyan-ink); background: rgba(0, 229, 255, .08); box-shadow: inset 0 0 0 1px rgba(0, 229, 255, .32); }
.ac-steps li span { padding-top: 4px; }
.ac-steps strong { color: var(--ac-ink); }

/* Utente già collegato */
.ac-who { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 14px; border-radius: 18px; background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--ac-line); text-align: left; }
.ac-avatar { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--ac-btn); color: #031118; font-weight: 800; font-size: 16px; }
.ac-who-t { min-width: 0; }
.ac-who-t strong { display: block; font-size: 16px; overflow-wrap: anywhere; }
.ac-who-t span { display: block; font-size: 14px; color: var(--ac-muted); overflow-wrap: anywhere; }

/* Contesto (pagina di download, bozza) */
.ac-context { margin-top: 18px; padding: 12px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; color: var(--ac-cyan-ink); background: rgba(0, 229, 255, .07); box-shadow: inset 0 0 0 1px rgba(0, 229, 255, .28); }

/* ---------- Telefono e tablet ---------- */
@media (max-width: 1023px) {
  .ac-top { padding-top: 16px; }
}
@media (max-width: 520px) {
  .ac-main { padding-top: 22px; padding-bottom: 28px; place-items: start center; }
  .ac-card { padding: 26px 20px 24px; border-radius: 22px; }
  .ac-title { font-size: 27px; }
  .ac-toplink span { display: none; }
  .ac-toplink { width: 40px; padding: 0; justify-content: center; }
  .ac-badge { width: 60px; height: 60px; border-radius: 19px; margin-bottom: 18px; }
}

/* ---------- Movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .ac-thread .t-line { stroke-dashoffset: 0; }
  .ac-thread .t-spark, .ac-badge--wait::before, .ac-badge--wait::after { display: none; }
  .ac-btn.loading::after, .ac-btn[aria-busy="true"]::after, .ac-spinner { animation: ac-spin 1.6s linear infinite !important; }
}
@media (forced-colors: active) {
  .ac-btn, .ac-input, .ac-card { border: 1px solid CanvasText; }
  .ac-grad { -webkit-text-fill-color: currentColor; background: none; }
}
