/* Dealer Station 2.0 — pagine di accesso (Views/Shared/_LayoutIdentity.cshtml e Areas/Identity).
   Usa le variabili di ds2.css: marchio e colori del tenant si cambiano li'.
   Tutto lo schermo e' blu ops! mobile; a sinistra la SIM in movimento (accesso.js) e il benvenuto,
   a destra il foglio bianco con il contenuto. Su telefono il foglio sale dal basso. */

.ds-auth-body {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; color: #fff;
  background:
    radial-gradient(60% 70% at 18% 30%, rgba(80, 140, 255, .55) 0%, transparent 70%),
    radial-gradient(50% 60% at 100% 100%, rgba(255, 255, 255, .10) 0%, transparent 70%),
    linear-gradient(160deg, var(--ds-brand) 0%, var(--ds-brand-deep) 62%, #071E63 100%);
}

.ds-auth-top { display: flex; align-items: center; padding: 1.25rem clamp(1rem, 4vw, 3rem); }
.ds-auth-logo { height: 52px; width: auto; }

.ds-auth {
  flex: 1; display: grid; grid-template-columns: 1fr minmax(360px, 460px); align-items: center; gap: clamp(2rem, 6vw, 6rem);
  width: 100%; max-width: 1180px; margin: 0 auto; padding: 1rem clamp(1rem, 4vw, 3rem) 3rem;
}

/* Benvenuto con la SIM ops! mobile. La SIM fluttua, ruota piano e si inclina seguendo il puntatore (accesso.js);
   il riflesso scorre solo sulla SIM grazie alla maschera con la stessa immagine. */
.ds-auth-hero { display: grid; justify-items: start; gap: 1.5rem; }
.ds-auth-sim-stage { position: relative; width: clamp(220px, 23vw, 340px); aspect-ratio: 759 / 597; perspective: 1200px; }
.ds-auth-sim {
  position: absolute; inset: 0;
  transform: translate3d(0, var(--fy, 0px), var(--lift, 0px)) rotateX(var(--rx, 8deg)) rotateY(var(--ry, -12deg)) rotateZ(var(--rz, 0deg));
  filter: drop-shadow(0 26px 30px rgba(3, 14, 60, .40));
}
.ds-auth-sim img { display: block; width: 100%; height: 100%; }
.ds-auth-sim-sheen {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
  -webkit-mask: url(../images/sim-ops-mobile.webp) center / 100% 100% no-repeat;
  mask: url(../images/sim-ops-mobile.webp) center / 100% 100% no-repeat;
  background:
    radial-gradient(45% 60% at var(--sx, 30%) var(--sy, 25%), rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, 0) 65%),
    linear-gradient(115deg, transparent 25%, rgba(255, 255, 255, .55) calc(var(--sx, 30%) + 5%), transparent 65%);
}
.ds-auth-sim-shadow {
  position: absolute; left: 14%; right: 14%; bottom: -12%; height: 14%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(2, 10, 45, .45), transparent); filter: blur(8px);
  transform: scale(var(--shadow, 1));
}

.ds-auth-welcome { max-width: 32rem; }
.ds-auth-eyebrow {
  display: inline-block; margin-bottom: .8rem; padding: .3rem .8rem; border-radius: 999px;
  background: rgba(255, 255, 255, .16); font-size: .85rem; font-weight: 600; letter-spacing: .04em;
}
.ds-auth-title {
  margin: 0 0 .75rem; font-family: var(--ds-font-display); font-weight: 600; line-height: 1.12; letter-spacing: -.015em;
  font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.6rem);
}
.ds-auth-sub { margin: 0; color: rgba(255, 255, 255, .85); font-size: 1.05rem; line-height: 1.5; }

/* Foglio bianco con il contenuto della pagina */
.ds-auth-main { min-width: 0; }
.ds-auth-panel {
  background: var(--ds-surface); color: var(--ds-ink); border-radius: 28px;
  padding: clamp(1.5rem, 3vw, 2.25rem); box-shadow: 0 30px 60px rgba(3, 14, 60, .35);
}
.ds-auth-panel h1 { margin: 0 0 .35rem; font-size: 1.6rem; font-weight: 600; letter-spacing: -.01em; }
.ds-auth-lead { color: var(--ds-ink-2); margin-bottom: 1.5rem; }
/* Il foglio e' gia' la scheda: il riquadro interno delle pagine resta senza bordo */
.ds-auth-card { background: none; border: 0; box-shadow: none; padding: 0; }

.ds-auth-field { margin-bottom: 1.1rem; }
.ds-auth-field .form-label { font-weight: 600; }
.ds-auth-panel .form-control { min-height: 52px; border-radius: 14px; font-size: 1.05rem; }
.ds-auth-pass { position: relative; }
.ds-auth-pass .form-control { padding-right: 3.4rem; }
.ds-auth-pass-toggle {
  position: absolute; top: 4px; right: 4px; bottom: 4px; width: 44px; border: 0; background: transparent;
  color: var(--ds-ink-2); border-radius: 10px; font-size: 1.15rem;
}
.ds-auth-pass-toggle:hover { color: var(--ds-brand-ink); background: var(--ds-brand-wash); }

.ds-auth-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin: .25rem 0 1.4rem; }
.ds-auth-row .form-check { margin: 0; min-height: 44px; display: flex; align-items: center; gap: .55rem; padding-left: 0; }
.ds-auth-row .form-check-input { float: none; margin: 0; width: 1.25rem; height: 1.25rem; border: 1.5px solid #8A93A8; }
.ds-auth-row a { font-weight: 650; min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.ds-auth-row a:hover { text-decoration: underline; }

/* Pulsante principale arrotondato, come nelle app bancarie */
.ds-auth-panel .btn-lg.btn-primary { min-height: 54px; border-radius: 999px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.ds-auth-safe { display: flex; align-items: center; justify-content: center; gap: .45rem; margin: 1.1rem 0 0; color: var(--ds-ink-3); font-size: .88rem; }

.ds-auth-links { margin: 1.25rem 0 0; text-align: center; }
.ds-auth-links a { font-weight: 650; }

/* Riepilogo degli errori del modulo (asp-validation-summary): stile ds-alert solo quando contiene errori */
.ds-auth-summary.validation-summary-valid { display: none; }
.ds-auth-summary.validation-summary-errors {
  display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem; margin-bottom: 1.25rem;
  border-radius: var(--ds-radius); border: 1px solid #F4C7C2; background: var(--ds-err-wash); color: #8A1C13; font-weight: 600;
}
.ds-auth-summary ul { margin: 0; padding: 0; list-style: none; }

/* Pagine predefinite di Identity (blocco, uscita, accesso negato): titoli leggibili */
.ds-auth-panel > header h1 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }

/* Telefono e tablet: SIM piccola e benvenuto in alto, il foglio sale dal basso */
@media (max-width: 991.98px) {
  .ds-auth-top { padding: 1rem; }
  .ds-auth-logo { height: 40px; }
  .ds-auth { grid-template-columns: 1fr; gap: 1.5rem; padding: .25rem 0 0; align-items: stretch; }
  .ds-auth-hero { justify-items: center; text-align: center; padding: 0 1rem; gap: 1rem; }
  .ds-auth-sim-stage { width: min(60%, 230px); }
  .ds-auth-title { font-size: 1.5rem; margin-bottom: .3rem; }
  .ds-auth-sub { font-size: .98rem; }
  .ds-auth-main { display: flex; }
  .ds-auth-panel { flex: 1; border-radius: 28px 28px 0 0; padding: 1.75rem 1rem 2rem; box-shadow: 0 -10px 30px rgba(3, 14, 60, .25); }
}
