/* Accesso e registrazione: modulo a sinistra, pannello del marchio a destra. */
.auth{margin:0;min-height:100vh;background:#fff;color:#0f172a;
  font:15px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif}
.auth *{box-sizing:border-box}
.auth-wrap{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);min-height:100vh}

/* ---- colonna del modulo ---- */
.auth-main{display:flex;flex-direction:column;padding:28px 48px 24px}
.auth-top{display:flex;align-items:center;gap:14px}
.auth-brand{display:flex;align-items:center;gap:9px;font-weight:800;font-size:19px;color:#0f172a;text-decoration:none;letter-spacing:-.01em}
.auth-brand .mark{width:34px;height:34px;border-radius:10px;background:#4f46e5;display:flex;align-items:center;justify-content:center;box-shadow:0 6px 16px -6px rgba(79,70,229,.6)}
.auth-brand .mark svg{width:19px;height:19px;fill:#fff}
.auth-top .sp{flex:1}
.auth-top .alt{font-size:14px;color:#475569;white-space:nowrap}
.auth-top .alt a{color:#4f46e5;font-weight:600;text-decoration:none}
.auth-top select{border:1px solid #e2e8f0;border-radius:8px;padding:6px 8px;background:#fff;font:inherit;font-size:13px}
.auth-box{width:100%;max-width:420px;margin:auto;padding:40px 0}
.auth-step{font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#4f46e5;margin-bottom:10px}
.auth-box h1{font-size:32px;line-height:1.15;letter-spacing:-.02em;margin:0 0 10px;font-weight:800}
.auth-box .lead{color:#475569;font-size:16px;margin:0 0 26px}
.auth-perks{display:flex;flex-wrap:wrap;gap:8px 16px;margin:18px 0 0;padding:0;list-style:none;font-size:13.5px;color:#334155}
.auth-perks li{display:flex;align-items:center;gap:6px}
.auth-perks li::before{content:"";width:16px;height:16px;border-radius:50%;flex:none;background:#dcfce7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/11px no-repeat}

.auth .field{margin-bottom:16px}
.auth .field label,.auth .lbl-row{display:flex;justify-content:space-between;align-items:baseline;font-weight:600;font-size:13.5px;margin-bottom:6px;color:#1e293b}
.auth .lbl-row a{font-weight:500;color:#4f46e5;text-decoration:none;font-size:13px}
.auth input:not([type=hidden]):not([type=checkbox]){width:100%;border:1px solid #cbd5e1;border-radius:11px;padding:12px 14px;font:inherit;font-size:15.5px;background:#fff;color:#0f172a;transition:border-color .15s,box-shadow .15s}
.auth input:focus{outline:none;border-color:#4f46e5;box-shadow:0 0 0 4px rgba(79,70,229,.15)}
.auth input::placeholder{color:#94a3b8}
.auth .hint{font-size:12.5px;color:#64748b;margin-top:6px}
.auth .pw{position:relative}
.auth .pw input{padding-inline-end:76px}
.auth .pw button{position:absolute;inset-inline-end:8px;top:50%;transform:translateY(-50%);border:0;background:none;color:#4f46e5;font-weight:600;font-size:13px;cursor:pointer;padding:6px 8px;border-radius:7px}
.auth .pw button:hover{background:#eef2ff}
.auth .grid2{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}
.auth-btn{width:100%;border:0;border-radius:11px;padding:14px 18px;background:#4f46e5;color:#fff;font:inherit;font-weight:700;font-size:16px;cursor:pointer;
  box-shadow:0 10px 24px -10px rgba(79,70,229,.7);transition:background .15s,transform .05s}
.auth-btn:hover{background:#4338ca}
.auth-btn:active{transform:translateY(1px)}
.auth-btn:disabled{opacity:.6;cursor:default}
.auth-ghost{width:100%;border:1px solid #cbd5e1;border-radius:11px;padding:12px 18px;background:#fff;color:#0f172a;font:inherit;font-weight:600;cursor:pointer}
.auth-ghost:disabled{opacity:.6}
.auth-link{border:0;background:none;color:#4f46e5;font:inherit;font-weight:600;cursor:pointer;padding:0;text-decoration:none}
.auth-back{display:inline-flex;align-items:center;gap:6px;margin-bottom:18px;color:#475569;font-weight:600;font-size:14px}
.auth-back:hover{color:#0f172a}
.auth .alert{border-radius:11px;padding:11px 14px;margin-bottom:16px;font-size:14px}
.auth .alert.error{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}
.auth .alert.ok{background:#f0fdf4;color:#166534;border:1px solid #bbf7d0}
.auth .email-chip{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:11px;padding:10px 14px;margin-bottom:18px;font-size:14px}
.auth .email-chip b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.auth details.code{margin:4px 0 18px}
.auth details.code summary{cursor:pointer;color:#4f46e5;font-weight:600;font-size:14px;list-style:none}
.auth details.code summary::-webkit-details-marker{display:none}
.auth details.code[open] summary{margin-bottom:8px}
.auth .code-ok{display:flex;gap:10px;align-items:flex-start;background:#f0fdf4;border:1px solid #bbf7d0;color:#166534;border-radius:11px;padding:11px 14px;margin-bottom:18px;font-size:14px;font-weight:600}
.auth .foot{text-align:center;margin-top:22px;color:#475569;font-size:14px}
.auth .foot a{color:#4f46e5;font-weight:600;text-decoration:none}
.auth .hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.auth .sent{text-align:center}
.auth .sent .big{width:64px;height:64px;border-radius:18px;background:#eef2ff;display:flex;align-items:center;justify-content:center;margin:0 auto 18px}
.auth .sent .big svg{width:30px;height:30px;fill:none;stroke:#4f46e5;stroke-width:1.8}
.auth-legal{font-size:12px;color:#94a3b8;text-align:center}

/* ---- pannello del marchio ---- */
.auth-side{position:relative;overflow:hidden;color:#fff;padding:56px 56px 40px;display:flex;flex-direction:column;justify-content:center;
  background:radial-gradient(1200px 600px at 110% -10%,rgba(129,140,248,.55),transparent 60%),
             radial-gradient(800px 500px at -20% 110%,rgba(56,189,248,.35),transparent 60%),
             linear-gradient(150deg,#1e1b4b 0%,#312e81 45%,#4f46e5 100%)}
.auth-side::after{content:"";position:absolute;inset:0;background-image:radial-gradient(rgba(255,255,255,.08) 1px,transparent 1px);background-size:22px 22px;pointer-events:none}
.auth-side > *{position:relative;z-index:1;max-width:520px}
.auth-side .kick{display:inline-flex;align-items:center;gap:8px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.2);border-radius:999px;padding:5px 12px;font-size:13px;font-weight:600;width:max-content}
.auth-side .kick i{width:8px;height:8px;border-radius:50%;background:#4ade80;box-shadow:0 0 0 4px rgba(74,222,128,.25)}
.auth-side h2{font-size:34px;line-height:1.15;letter-spacing:-.02em;margin:18px 0 22px;font-weight:800}
.auth-side ul{list-style:none;margin:0 0 30px;padding:0;display:flex;flex-direction:column;gap:12px;font-size:15.5px;color:#e0e7ff}
.auth-side li{display:flex;gap:12px;align-items:flex-start}
.auth-side li svg{flex:none;width:22px;height:22px;padding:4px;border-radius:7px;background:rgba(255,255,255,.14);stroke:#fff;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}

/* anteprima della chat */
.mock{background:#fff;color:#0f172a;border-radius:18px;box-shadow:0 30px 60px -20px rgba(15,23,42,.6);overflow:hidden;max-width:400px}
.mock-head{display:flex;align-items:center;gap:10px;padding:12px 14px;background:#4f46e5;color:#fff}
.mock-head .av{width:32px;height:32px;border-radius:50%;background:#f59e0b;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px}
.mock-head b{display:block;font-size:14px}
.mock-head small{font-size:12px;opacity:.85}
.mock-body{padding:14px;display:flex;flex-direction:column;gap:8px;background:#f8fafc}
.mock .b{max-width:82%;padding:9px 12px;border-radius:14px;font-size:13.5px;line-height:1.4}
.mock .b.v{align-self:flex-end;background:#4f46e5;color:#fff;border-bottom-right-radius:4px}
.mock .b.a{align-self:flex-start;background:#fff;border:1px solid #e2e8f0;border-bottom-left-radius:4px}
.mock .b.a em{display:block;font-style:normal;font-size:11px;font-weight:700;color:#4f46e5;margin-bottom:2px}
.mock .typing{align-self:flex-start;font-size:12px;color:#64748b;display:flex;align-items:center;gap:6px}
.mock .typing span{display:inline-flex;gap:3px}
.mock .typing span i{width:5px;height:5px;border-radius:50%;background:#94a3b8;animation:dot 1.2s infinite}
.mock .typing span i:nth-child(2){animation-delay:.15s}
.mock .typing span i:nth-child(3){animation-delay:.3s}
@keyframes dot{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-2px)}}
.auth-side .trust{display:flex;flex-wrap:wrap;gap:8px 18px;margin-top:26px;font-size:13px;color:#c7d2fe}
.auth-side .trust a{color:#fff;font-weight:600}
[dir=rtl] .mock .b.v{border-bottom-right-radius:14px;border-bottom-left-radius:4px}
[dir=rtl] .mock .b.a{border-bottom-left-radius:14px;border-bottom-right-radius:4px}

@media (max-width:980px){
  .auth-wrap{grid-template-columns:1fr}
  .auth-side{display:none}
  .auth-main{padding:20px 22px}
  .auth-box{padding:28px 0}
}
@media (max-width:520px){
  .auth-box h1{font-size:27px}
  .auth .grid2{grid-template-columns:1fr}
  .auth-top .alt{display:none}
  .auth-box{margin:8px auto auto}
}
@media (prefers-reduced-motion:reduce){.mock .typing span i{animation:none}}
.auth [hidden]{display:none!important}
