/* nh-login.css — schermata login condivisa (SoT, NH#4/#5) 2026-06-13
   Estratta da itsmops/login.html. TUTTO scopato sotto `.nhlogin` per non
   collidere con gli stili dei portali SPA (Desk usa .field/.btn globali).
   Montata da shared/nh-login.js · parametrica via profilo portale. */

.nhlogin {
  --bg:        #f3f5f8;
  --surface:   rgba(255,255,255,.92);
  --surface-2: #f6f8fb;
  --border:    rgba(15,23,42,.10);
  --text-1:    #0f172a;
  --text-2:    #374151;
  --text-3:    #6b7280;
  --text-4:    #9ca3af;
  --blue:      #2563eb;
  --blue-2:    #4f46e5;
  --red:       #dc2626;
  --shadow:    0 24px 60px -12px rgba(15,23,42,.18), 0 8px 20px -8px rgba(15,23,42,.10);
  --glow:      0 0 0 3px rgba(37,99,235,.14);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-1);
  background: var(--bg);
  position: fixed; inset: 0; z-index: 1;
  overflow: hidden;
}
html[data-theme="dark"] .nhlogin {
  --bg:        #0b1220;
  --surface:   rgba(16,24,40,.72);
  --surface-2: #0f172a;
  --border:    rgba(255,255,255,.08);
  --text-1:    #f1f5f9;
  --text-2:    #cbd5e1;
  --text-3:    #94a3b8;
  --text-4:    #64748b;
  --blue:      #60a5fa;
  --blue-2:    #818cf8;
  --red:       #f87171;
  --glow:      0 0 0 3px rgba(96,165,250,.25);
}
.nhlogin * { box-sizing: border-box; }

/* ═══ LAYOUT SPLIT ═══ */
/* width:100% → riempie anche dentro un host display:flex (es. Desk #login-screen),
   evitando la centratura che lasciava bande ai lati. */
.nhlogin .split { display: grid; grid-template-columns: 1.1fr .9fr; width: 100%; height: 100vh; position: relative; }

/* ═══ HERO ═══ */
.nhlogin .hero {
  position: relative; overflow: hidden;
  background: var(--nhlogin-hero-bg, url('/shared/brand/exocortex-background.svg') center/cover no-repeat), #0b1220;
  color: #f1f5f9;
  --hero-text: #f8fafc; --hero-text-muted: #cbd5e1; --hero-text-dim: #94a3b8;
  --hero-surface: rgba(255,255,255,.07); --hero-border: rgba(255,255,255,.10);
  padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between; isolation: isolate;
}
.nhlogin .hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(700px 500px at 20% 10%, rgba(99,102,241,.35), transparent 60%),
    radial-gradient(600px 400px at 90% 80%, rgba(236,72,153,.22), transparent 60%),
    radial-gradient(500px 500px at 50% 100%, rgba(34,211,238,.18), transparent 60%);
}
.nhlogin .hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 30% 40%, black 20%, transparent 70%);
}
.nhlogin .hero > * { position: relative; z-index: 1; }

.nhlogin .brand { display: flex; align-items: center; gap: 12px; }
.nhlogin .brand img { width: 40px; height: 40px; border-radius: 10px; }
.nhlogin .brand-name { font-weight: 700; font-size: 15px; letter-spacing: .3px; }
.nhlogin .brand-tag  { font-size: 11px; color: var(--hero-text-dim, #94a3b8); font-weight: 500; }

.nhlogin .hero-center { max-width: 540px; }
.nhlogin .hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 100px;
  background: rgba(96,165,250,.10); border: 1px solid rgba(96,165,250,.25);
  color: #bfdbfe; font-size: 11px; font-weight: 600; letter-spacing: .3px; margin: 11px 0 22px;
}
.nhlogin .hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.25); }
.nhlogin .hero-title { font-size: 44px; font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 18px; color: #fff; }
.nhlogin .hero-sub { font-size: 15px; line-height: 1.6; color: var(--hero-text-muted, #cbd5e1); margin-bottom: 32px; max-width: 480px; }

.nhlogin .feat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 28px; }
.nhlogin .feat {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  background: var(--hero-surface, rgba(255,255,255,.04)); border: 1px solid var(--hero-border, rgba(255,255,255,.08));
  font-size: 12px; color: var(--hero-text-muted, #e2e8f0);
}
.nhlogin .feat .fico { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nhlogin .feat.f1 .fico { background: rgba(96,165,250,.18); color: #93c5fd; }
.nhlogin .feat.f2 .fico { background: rgba(236,72,153,.18); color: #f9a8d4; }
.nhlogin .feat.f3 .fico { background: rgba(52,211,153,.18); color: #6ee7b7; }
.nhlogin .feat.f4 .fico { background: rgba(250,204,21,.18); color: #fde68a; }

.nhlogin .modules { padding: 14px; border-radius: 14px; background: var(--hero-surface, rgba(255,255,255,.03)); border: 1px solid var(--hero-border, rgba(255,255,255,.08)); backdrop-filter: blur(8px); max-width: 440px; }
.nhlogin .modules-title { font-size: 10px; color: var(--hero-text-dim, #94a3b8); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 10px; font-weight: 600; }
.nhlogin .mod-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.nhlogin .mod-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--hero-text-muted, #e2e8f0); padding: 4px 0; }
.nhlogin .mod-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.2); flex-shrink: 0; }
.nhlogin .mod-name { flex: 1; font-weight: 500; }
.nhlogin .mod-tag  { font-size: 10px; color: #64748b; font-family: 'JetBrains Mono', monospace; }

.nhlogin .compl { display: flex; gap: 20px; align-items: center; font-size: 11px; color: #94a3b8; position: relative; top: 8px; }
.nhlogin .compl-item { display: flex; align-items: center; gap: 6px; }
.nhlogin .compl-item .shield { width: 14px; height: 14px; color: #60a5fa; }

/* ═══ FORM ═══ */
.nhlogin .form-side { background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 40px; position: relative; }
.nhlogin .form-side::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(400px 300px at 80% 20%, rgba(99,102,241,.06), transparent 60%), radial-gradient(400px 300px at 20% 80%, rgba(236,72,153,.04), transparent 60%);
}
.nhlogin .form-box { width: 100%; max-width: 400px; position: relative; z-index: 1; animation: nhl-fadeUp .55s cubic-bezier(.2,.9,.3,1) both; }
@keyframes nhl-fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.nhlogin .form-title { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 6px; }
.nhlogin .form-sub   { font-size: 13px; color: var(--text-3); margin-bottom: 28px; }

.nhlogin .fields { display: flex; flex-direction: column; gap: 14px; }
/* 🆕 2026-06-14 — etichetta SOPRA l'input (statica), niente più "floating" sul bordo
   che la faceva sembrare coperta dalla textbox. padding-top fa spazio alla label. */
.nhlogin .field  { position: relative; padding-top: 18px; }
.nhlogin .field label {
  position: absolute; top: 0; left: 2px; z-index: 2; line-height: 1; background: none; padding: 0;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--text-3);
}
.nhlogin .field input {
  width: 100%; padding: 15px 14px 15px 42px; background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: 12px; font: 500 14px/1.2 'Inter', sans-serif; color: var(--text-1); outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.nhlogin .field input::placeholder { color: var(--text-4); font-weight: 400; }
.nhlogin .field input:focus { border-color: var(--blue); box-shadow: var(--glow); }
.nhlogin .field input:focus ~ label { color: var(--blue); }
/* +9px compensa il padding-top:18px del .field così icona/toggle restano centrati sull'input */
.nhlogin .field .ic { position: absolute; left: 14px; top: calc(50% + 9px); transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); pointer-events: none; transition: color .18s; }
.nhlogin .field input:focus + .ic { color: var(--blue); }
.nhlogin .field .toggle-pass { position: absolute; right: 10px; top: calc(50% + 9px); transform: translateY(-50%); background: transparent; border: none; cursor: pointer; color: var(--text-3); padding: 7px; border-radius: 8px; }
.nhlogin .field .toggle-pass:hover { color: var(--text-1); background: var(--surface-2); }
.nhlogin .field.uppercase input { text-transform: uppercase; }
.nhlogin .field.mfa input { letter-spacing: 12px; font-size: 22px; text-align: center; font-family: 'JetBrains Mono', 'SF Mono', monospace; font-weight: 600; padding-left: 14px; }
.nhlogin .field.mfa .ic { display: none; }
.nhlogin .mfa-hint { font-size: 11px; color: var(--text-3); text-align: center; margin-top: 4px; }

.nhlogin .remember-row { display: flex; justify-content: flex-end; align-items: center; margin-top: 6px; font-size: 12px; }
.nhlogin .forgot { color: var(--text-3); text-decoration: none; font-weight: 500; cursor: pointer; }
.nhlogin .forgot:hover { color: var(--blue); }

.nhlogin .btn {
  width: 100%; padding: 15px; margin-top: 22px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-2) 100%); color: #fff; border: none; border-radius: 12px;
  font: 600 14px/1 'Inter', sans-serif; letter-spacing: .2px; cursor: pointer;
  transition: transform .12s, box-shadow .18s, filter .2s; box-shadow: 0 12px 28px -10px rgba(37,99,235,.55), inset 0 1px 0 rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center; gap: 8px; position: relative; overflow: hidden;
}
.nhlogin .btn:hover { filter: brightness(1.06); }
.nhlogin .btn:active { transform: translateY(1px); }
.nhlogin .btn:disabled { opacity: .65; cursor: wait; filter: grayscale(.2); }
.nhlogin .btn .spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: nhl-spin 0.8s linear infinite; display: none; }
.nhlogin .btn.loading .spinner { display: inline-block; }
.nhlogin .btn .arrow { transition: transform .2s; }
.nhlogin .btn:hover .arrow { transform: translateX(3px); }
@keyframes nhl-spin { to { transform: rotate(360deg); } }

.nhlogin .sso-btn { width: 100%; margin-top: 12px; padding: 12px; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 12px; color: var(--text-1); font: 600 13px 'Inter', sans-serif; cursor: pointer; }
.nhlogin .sso-btn:hover { border-color: var(--blue); }
.nhlogin .divider { text-align: center; font-size: 11px; color: var(--text-4); margin: 16px 0 4px; }

.nhlogin .err { margin-top: 14px; padding: 11px 13px; background: rgba(239,68,68,.10); border: 1px solid rgba(239,68,68,.30); border-radius: 10px; font-size: 12px; color: var(--red); display: none; align-items: flex-start; gap: 8px; }
.nhlogin .err::before { content: "⚠"; font-size: 13px; }
.nhlogin .err.show { display: flex; }

.nhlogin .form-footer { text-align: center; margin-top: 28px; font-size: 11px; color: var(--text-4); display: flex; align-items: center; justify-content: center; gap: 10px; }
.nhlogin .form-footer .bullet { opacity: .35; }
.nhlogin .form-footer a { color: var(--text-4); text-decoration: none; }

.nhlogin .theme-tog {
  position: fixed; top: 20px; right: 20px; z-index: 10; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  width: 40px; height: 40px; border-radius: 12px; cursor: pointer; color: #f1f5f9; display: flex; align-items: center; justify-content: center; font-size: 16px; backdrop-filter: blur(10px); transition: transform .2s, background .2s;
}
.nhlogin .theme-tog:hover { transform: translateY(-1px); background: rgba(255,255,255,.14); }
html[data-theme="light"] .nhlogin .theme-tog { background: rgba(15,23,42,.06); border-color: rgba(15,23,42,.12); color: #374151; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 960px) {
  .nhlogin .split { grid-template-columns: 1fr; }
  .nhlogin .hero  { display: none; }
  .nhlogin .form-side { padding: 24px; min-height: 100vh; }
}
@media (max-width: 480px) {
  .nhlogin .form-box { max-width: 100%; }
  .nhlogin .form-title { font-size: 22px; }
}
