/* Pagine di accesso – usato solo da Pages/Shared/_AuthLayout.cshtml */
:root {
  --auth-bg: #F6F4EF;
  --auth-input-h: 3.6rem;
  --auth-radius: 1.75rem;
}

/* ---------- Sfondo chiaro con aloni in movimento ---------- */
.auth-body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--auth-bg);
  overflow-x: hidden;
}

/* Trama a puntini molto leggera, sfumata verso i bordi */
.auth-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(23, 25, 27, 0.07) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}

.auth-aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.8;
  will-change: transform;
}

.aurora-1 {
  top: -18vmax;
  left: -12vmax;
  width: 46vmax;
  height: 46vmax;
  background: radial-gradient(circle, rgba(253, 186, 116, 0.6), rgba(253, 186, 116, 0) 70%);
  animation: aurora-1 24s ease-in-out infinite alternate;
}

.aurora-2 {
  right: -10vmax;
  bottom: -20vmax;
  width: 42vmax;
  height: 42vmax;
  background: radial-gradient(circle, rgba(20, 145, 127, 0.42), rgba(20, 145, 127, 0) 70%);
  animation: aurora-2 28s ease-in-out infinite alternate;
}

.aurora-3 {
  top: -8vmax;
  right: 8vmax;
  width: 32vmax;
  height: 32vmax;
  background: radial-gradient(circle, rgba(147, 197, 253, 0.4), rgba(147, 197, 253, 0) 70%);
  animation: aurora-3 32s ease-in-out infinite alternate;
}

.auth-shell {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(1rem, 4vw, 3rem);
}

.auth-frame {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  width: 100%;
  max-width: 1160px;
  min-height: 680px;
  overflow: hidden;
  border-radius: var(--auth-radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 40px 90px -40px rgba(31, 41, 55, 0.35),
    0 12px 30px -18px rgba(31, 41, 55, 0.18),
    0 0 0 1px rgba(23, 25, 27, 0.05);
  animation: auth-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* ---------- Pannello visivo (sinistra) ---------- */
.auth-visual {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  overflow: hidden;
  padding: 2.5rem;
  background:
    radial-gradient(80% 60% at 85% 15%, rgba(20, 145, 127, 0.2), transparent 70%),
    radial-gradient(70% 55% at 10% 90%, rgba(253, 186, 116, 0.3), transparent 70%),
    linear-gradient(160deg, #FFFAF4 0%, #FCF7F0 50%, #EFF8F5 100%);
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid rgba(23, 25, 27, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 4px 14px -6px rgba(23, 25, 27, 0.15);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 0.8rem;
  font-weight: 650;
}

.auth-badge .bi {
  color: var(--br-primary);
}

.auth-kicker {
  margin-bottom: 0.7rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--br-muted);
}

.auth-claim {
  max-width: 30rem;
  margin-bottom: 0.9rem;
  font-size: clamp(1.85rem, 2.6vw, 2.5rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.auth-lead {
  max-width: 31rem;
  margin-bottom: 1.4rem;
  color: #46505A;
}

.auth-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-features li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(23, 25, 27, 0.07);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 4px 14px -8px rgba(23, 25, 27, 0.2);
  font-size: 0.84rem;
  font-weight: 650;
}

.auth-features li:nth-child(1) .bi { color: var(--br-primary); }
.auth-features li:nth-child(2) .bi { color: var(--br-attention); }
.auth-features li:nth-child(3) .bi { color: var(--br-ready); }

/* ---------- Anteprima del prodotto: telefono e notifiche ---------- */
.auth-stage {
  position: relative;
  flex: 1;
  min-height: 300px;
}

.mock-phone {
  position: absolute;
  top: 50%;
  left: 30%;
  width: 196px;
  height: 330px;
  padding: 10px;
  border-radius: 2.1rem;
  background: #1C2024;
  box-shadow: 0 40px 60px -30px rgba(23, 25, 27, 0.55), inset 0 0 0 2px #2F353B;
  transform: translate(-50%, -50%) rotate(-5deg);
  animation: phone-float 11s ease-in-out infinite;
}

.mock-phone-notch {
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 2;
  width: 58px;
  height: 14px;
  border-radius: 999px;
  background: #1C2024;
  transform: translateX(-50%);
}

.mock-screen {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  height: 100%;
  overflow: hidden;
  padding: 2rem 0.7rem 0.7rem;
  border-radius: 1.6rem;
  background: #F7F8F6;
  font-size: 0.68rem;
}

.mock-venue {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 800;
}

.mock-venue-mark {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0.45rem;
  background: var(--br-primary);
  color: #FFFFFF;
  font-size: 0.7rem;
}

.mock-table {
  margin-left: auto;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: #E1F1EE;
  color: var(--br-primary-dark);
  font-size: 0.6rem;
  font-weight: 750;
}

.mock-cat {
  margin: 0.25rem 0 0;
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--br-muted);
}

.mock-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.55rem;
  border-radius: 0.65rem;
  background: #FFFFFF;
  box-shadow: 0 0 0 1px rgba(23, 25, 27, 0.05);
}

.mock-item strong {
  display: block;
  font-size: 0.7rem;
}

.mock-item small {
  color: var(--br-muted);
  font-size: 0.6rem;
}

.mock-item.is-out {
  opacity: 0.55;
}

.mock-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.12rem 0.3rem;
  border-radius: 999px;
  background: #F0F2EF;
  font-weight: 800;
}

.mock-qty .bi {
  display: grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #FFFFFF;
  font-size: 0.6rem;
}

.mock-cart {
  margin-top: auto;
  padding: 0.6rem;
  border-radius: 0.75rem;
  background: var(--br-primary);
  color: #FFFFFF;
  font-weight: 750;
  text-align: center;
  box-shadow: 0 10px 18px -10px rgba(14, 107, 99, 0.9);
}

.mock-card {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 15rem;
  padding: 0.65rem 0.85rem 0.65rem 0.65rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 36px -18px rgba(23, 25, 27, 0.45), 0 0 0 1px rgba(23, 25, 27, 0.05);
  font-size: 0.8rem;
  animation: card-float 9s ease-in-out infinite;
}

.mock-card strong {
  display: block;
  font-size: 0.82rem;
}

.mock-card small {
  display: block;
  color: var(--br-muted);
  font-size: 0.74rem;
  line-height: 1.3;
}

/* Notifiche impilate a destra del telefono, leggermente sfalsate */
.mock-card.card-new {
  top: 8%;
  right: 0;
}

.mock-card.card-ready {
  top: 38%;
  right: 7%;
  animation-delay: -3s;
}

.mock-card.card-split {
  top: 68%;
  right: 1%;
  animation-delay: -6s;
}

@media (max-width: 1199.98px) {
  .mock-card.card-ready {
    display: none;
  }
}

.mock-card.card-new .icon-tile {
  animation: ring 4s ease-in-out infinite;
}

/* ---------- Primo accesso: percorso a passi ---------- */
.onboarding-steps {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.onboarding-steps li {
  position: relative;
  display: flex;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
}

.onboarding-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 3.15rem;
  bottom: -0.6rem;
  left: 2.2rem;
  width: 2px;
  background: rgba(23, 25, 27, 0.12);
}

.onboarding-steps li.is-current {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 30px -18px rgba(23, 25, 27, 0.4), 0 0 0 1px rgba(14, 107, 99, 0.18);
}

.step-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.4rem;
  height: 2.4rem;
  border: 2px solid #C5CCC4;
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--br-muted);
  font-weight: 800;
}

.is-done .step-dot {
  border-color: #198754;
  background: #198754;
  color: #FFFFFF;
}

.is-current .step-dot {
  border-color: var(--br-primary);
  background: var(--br-primary);
  color: #FFFFFF;
  box-shadow: 0 0 0 0.35rem rgba(14, 107, 99, 0.15);
}

.onboarding-steps strong {
  display: block;
  margin-top: 0.1rem;
}

.onboarding-steps small {
  display: block;
  color: var(--br-muted);
  font-size: 0.85rem;
}

.auth-tip {
  display: flex;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(23, 25, 27, 0.07);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.86rem;
  color: #3F4850;
}

.auth-tip > .bi {
  flex-shrink: 0;
  font-size: 1.2rem;
  color: #B45309;
}

/* ---------- Pannello del form (destra) ---------- */
.auth-panel {
  display: flex;
  flex-direction: column;
  padding: 2.25rem clamp(1.5rem, 4vw, 3.75rem);
  background: #FFFFFF;
}

.auth-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.auth-logo {
  height: 40px;
  width: auto;
}

.auth-panel-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  align-self: center;
  width: 100%;
  max-width: 26rem;
}

.auth-heading h1 {
  margin-bottom: 0.4rem;
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.auth-heading p {
  margin-bottom: 1.5rem;
  color: var(--br-muted);
}

/* Fumetto "Primo accesso?" */
.auth-hint {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid #CFE7E2;
  border-radius: 0.95rem;
  background: #F0F8F6;
  font-size: 0.86rem;
  color: #24443F;
}

.auth-hint > .bi {
  flex-shrink: 0;
  margin-top: 0.05rem;
  font-size: 1.15rem;
  color: var(--br-primary);
}

.auth-hint strong {
  display: block;
  color: var(--br-ink);
}

/* Campi */
.auth-form .form-floating > .form-control {
  height: var(--auth-input-h);
  min-height: var(--auth-input-h);
  padding-inline: 1.1rem;
  border: 1.5px solid #E1E5E0;
  border-radius: 0.9rem;
  background-color: #F8F9F7;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.auth-form .form-floating > label {
  padding-inline: 1.15rem;
}

.auth-form .form-control:hover {
  border-color: #CBD1CA;
}

.auth-form .form-control:focus {
  background-color: #FFFFFF;
  border-color: var(--br-primary);
  box-shadow: 0 0 0 0.3rem rgba(14, 107, 99, 0.12);
}

.auth-form .password-toggle {
  top: calc(var(--auth-input-h) / 2);
  transform: translateY(-50%);
}

.auth-alert {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-left: 4px solid #B42318;
  font-size: 0.9rem;
}

.auth-alert.alert-info {
  border-left-color: var(--br-ready);
}

.auth-note {
  display: flex;
  gap: 0.5rem;
  margin: 1.75rem 0 0;
  font-size: 0.84rem;
  color: var(--br-muted);
}

.auth-panel-footer {
  margin-top: 2rem;
  font-size: 0.8rem;
  text-align: center;
  color: var(--br-muted);
}

/* ---------- Animazioni ---------- */
@keyframes auth-in {
  from { opacity: 0; transform: translateY(16px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

@keyframes phone-float {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  50% { translate: 0 -10px; rotate: 1.5deg; }
}

@keyframes card-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}

@keyframes ring {
  0%, 82%, 100% { rotate: 0deg; }
  86% { rotate: -14deg; }
  90% { rotate: 12deg; }
  94% { rotate: -8deg; }
}

@keyframes aurora-1 {
  to { transform: translate3d(12vmax, 8vmax, 0) scale(1.15); }
}

@keyframes aurora-2 {
  to { transform: translate3d(-14vmax, -6vmax, 0) scale(1.1); }
}

@keyframes aurora-3 {
  to { transform: translate3d(-10vmax, 12vmax, 0) scale(0.9); }
}

/* ---------- Tablet e telefono: visivo in alto, form come "foglio" ---------- */
@media (max-width: 991.98px) {
  .auth-shell {
    align-items: stretch;
    padding: 0;
  }

  .auth-frame {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    min-height: 100vh;
    min-height: 100dvh;
    max-width: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .auth-visual {
    gap: 1rem;
    padding: calc(1.25rem + env(safe-area-inset-top)) 1.5rem 3rem;
    background: transparent;
  }

  .auth-stage,
  .auth-kicker,
  .auth-lead,
  .auth-features,
  .auth-tip,
  .onboarding-steps small {
    display: none;
  }

  .auth-claim {
    margin-bottom: 0;
    font-size: 1.6rem;
  }

  .onboarding-steps {
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    margin-top: 1rem;
  }

  .onboarding-steps li {
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.25rem;
    font-size: 0.8rem;
    text-align: center;
  }

  .onboarding-steps li:not(:last-child)::after {
    display: none;
  }

  .auth-panel {
    position: relative;
    z-index: 2;
    margin-top: -1.75rem;
    padding: 1.75rem 1.5rem calc(1.25rem + env(safe-area-inset-bottom));
    border-radius: var(--auth-radius) var(--auth-radius) 0 0;
    box-shadow: 0 -16px 40px -24px rgba(31, 41, 55, 0.35);
  }

  .auth-panel-header,
  .auth-panel-body,
  .auth-panel-footer {
    align-self: center;
    width: 100%;
    max-width: 30rem;
  }

  .auth-panel-header {
    margin-bottom: 1.5rem;
  }

  .auth-logo {
    height: 34px;
  }

  .auth-panel-body {
    justify-content: flex-start;
  }

  .auth-heading h1 {
    font-size: 1.7rem;
  }
}
