/* Félicità customer authentication */

.auth-page {
  min-height: 100vh;
  background: #FFF8F5;
  color: #2F2F2F;
  overflow-x: hidden;
}

.auth-page__bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(232, 106, 141, 0.08), transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(201, 166, 107, 0.1), transparent 38%),
    #FFF8F5;
}

.auth-page__shape {
  position: absolute;
  border-radius: 999px;
  opacity: 0.45;
  animation: auth-float 12s ease-in-out infinite;
}

.auth-page__shape--1 {
  width: 280px;
  height: 280px;
  top: 8%;
  right: 12%;
  background: rgba(232, 106, 141, 0.06);
}

.auth-page__shape--2 {
  width: 180px;
  height: 180px;
  bottom: 14%;
  left: 8%;
  background: rgba(201, 166, 107, 0.08);
  animation-delay: -4s;
}

@keyframes auth-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-14px) scale(1.03); }
}

.auth-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Before Alpine hydrates, show only the server-rendered initial mode */
.auth-shell:not(.alpine-ready)[data-initial-mode="login"] .auth-left--register,
.auth-shell:not(.alpine-ready)[data-initial-mode="login"] [data-auth-register-only] {
  display: none !important;
}

.auth-shell:not(.alpine-ready)[data-initial-mode="register"] .auth-left--login,
.auth-shell:not(.alpine-ready)[data-initial-mode="register"] [data-auth-login-only] {
  display: none !important;
}

.auth-shell:not(.alpine-ready)[data-initial-mode="success"] .auth-left--login,
.auth-shell:not(.alpine-ready)[data-initial-mode="success"] .auth-left--register,
.auth-shell:not(.alpine-ready)[data-initial-mode="success"] [data-auth-forms] {
  display: none !important;
}

.auth-shell:not(.alpine-ready)[data-initial-mode="register"] [data-register-step] {
  display: none !important;
}

.auth-shell:not(.alpine-ready)[data-initial-mode="register"][data-initial-register-step="1"] [data-register-step="1"],
.auth-shell:not(.alpine-ready)[data-initial-mode="register"][data-initial-register-step="2"] [data-register-step="2"],
.auth-shell:not(.alpine-ready)[data-initial-mode="register"][data-initial-register-step="3"] [data-register-step="3"] {
  display: block !important;
}

@media (min-width: 1024px) {
  .auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
    align-items: start;
  }
}

.auth-left {
  width: 100%;
}

@media (min-width: 1024px) {
  .auth-left--login,
  .auth-left--register {
    min-height: 100vh;
  }
}

/* Left storytelling panel */
.auth-story {
  position: relative;
  min-height: 420px;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .auth-story {
    min-height: 100vh;
  }
}

.auth-story__slides {
  position: absolute;
  inset: 0;
}

.auth-story__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.auth-story__slide.is-active {
  opacity: 1;
}

.auth-story__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: auth-hero-zoom 18s ease-in-out infinite alternate;
}

.auth-story__slide.is-active img {
  animation-play-state: running;
}

@keyframes auth-hero-zoom {
  from { transform: scale(1.04); }
  to { transform: scale(1.12); }
}

.auth-story__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(47, 47, 47, 0.15) 0%, rgba(47, 47, 47, 0.72) 100%);
}

.auth-story__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100%;
  padding: 32px 28px 40px;
  color: #fff;
}

@media (min-width: 1024px) {
  .auth-story__content {
    padding: 48px 56px 56px;
  }
}

.auth-story__logo img {
  height: 88px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  background: transparent;
}

.auth-story__tag {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.auth-story__heading {
  margin-top: 28px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  max-width: 18ch;
}

.auth-story__text {
  margin-top: 16px;
  max-width: 46ch;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.88);
}

.auth-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  font-size: 12px;
  font-weight: 500;
  animation: auth-badge-float 8s ease-in-out infinite;
}

.auth-badge:nth-child(2) { animation-delay: -1.5s; }
.auth-badge:nth-child(3) { animation-delay: -3s; }
.auth-badge:nth-child(4) { animation-delay: -4.5s; }
.auth-badge:nth-child(5) { animation-delay: -6s; }

@keyframes auth-badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.auth-story__label {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 3;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #2F2F2F;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Right panel */
.auth-panel {
  display: flex;
  flex-direction: column;
  padding: 24px 20px 56px;
  overflow: visible;
}

@media (min-width: 1024px) {
  .auth-panel {
    padding: 40px 48px 64px;
  }
}

.auth-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.auth-panel__home {
  font-size: 13px;
  font-weight: 500;
  color: #777777;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-panel__home:hover {
  color: #E86A8D;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: #FFFFFF;
  border: 1px solid #EFE7E7;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(47, 47, 47, 0.08);
  padding: 28px 24px 32px;
  animation: auth-fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: visible;
}

@media (min-width: 640px) {
  .auth-card {
    padding: 32px 32px 36px;
  }
}

@keyframes auth-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}

.auth-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 999px;
  background: #FFF8F5;
  border: 1px solid #EFE7E7;
  margin-bottom: 28px;
}

.auth-toggle__pill {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: #FFFFFF;
  box-shadow: 0 4px 16px rgba(232, 106, 141, 0.15);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-toggle__pill.is-register {
  transform: translateX(100%);
}

.auth-toggle__btn {
  position: relative;
  z-index: 1;
  border: none;
  background: none;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #777777;
  cursor: pointer;
  transition: color 0.25s;
}

.auth-toggle__btn.is-active {
  color: #E86A8D;
}

.auth-card__title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: #2F2F2F;
  margin-bottom: 8px;
}

.auth-card__subtitle {
  font-size: 14px;
  line-height: 1.65;
  color: #777777;
  margin-bottom: 24px;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form__row {
  display: grid;
  gap: 16px;
}

@media (min-width: 640px) {
  .auth-form__row--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.auth-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #2F2F2F;
  margin-bottom: 6px;
}

.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="tel"],
.auth-field input[type="date"] {
  width: 100%;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid #EFE7E7;
  background: #FFFFFF;
  font-size: 14px;
  color: #2F2F2F;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.auth-field input:focus {
  outline: none;
  border-color: #E86A8D;
  box-shadow: 0 0 0 4px rgba(232, 106, 141, 0.12);
}

.auth-field input.is-invalid {
  border-color: #dc2626;
}

.auth-field-error {
  margin-top: 6px;
  font-size: 12px;
  color: #dc2626;
}

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.auth-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-check__box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid #EFE7E7;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  margin-top: 1px;
}

.auth-check input:checked + .auth-check__box {
  background: #E86A8D;
  border-color: #E86A8D;
}

.auth-check input:checked + .auth-check__box::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
}

.auth-check__label {
  font-size: 13px;
  line-height: 1.5;
  color: #2F2F2F;
}

.auth-check__label a {
  color: #E86A8D;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-checks-grid {
  display: grid;
  gap: 10px;
}

.auth-checks-grid .auth-check__label {
  font-size: 12px;
  color: #777777;
}

.auth-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-link {
  font-size: 13px;
  font-weight: 500;
  color: #E86A8D;
  text-decoration: none;
}

.auth-link:hover {
  color: #C9A66B;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 24px;
  border: none;
  border-radius: 999px;
  background: #E86A8D;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 0.25s, background 0.25s, box-shadow 0.25s;
  box-shadow: 0 8px 24px rgba(232, 106, 141, 0.28);
}

.auth-btn:hover {
  background: #d85a7d;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(232, 106, 141, 0.32);
}

.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-btn--outline {
  background: #fff;
  color: #2F2F2F;
  border: 1px solid #EFE7E7;
  box-shadow: none;
}

.auth-btn--outline:hover {
  background: #FFF8F5;
  border-color: #E86A8D;
  color: #E86A8D;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #777777;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #EFE7E7;
}

.auth-social {
  display: grid;
  gap: 10px;
}

.auth-social__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  border-radius: 999px;
  border: 1px solid #EFE7E7;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #777777;
  cursor: not-allowed;
  opacity: 0.72;
}

.auth-switch {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: #777777;
}

.auth-switch button {
  border: none;
  background: none;
  color: #E86A8D;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.auth-switch button:hover {
  color: #C9A66B;
}

.auth-form-panel {
  animation: auth-panel-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes auth-panel-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: none; }
}

.auth-form-panel.is-login {
  animation-name: auth-panel-in-left;
}

@keyframes auth-panel-in-left {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: none; }
}

/* Success state */
.auth-success {
  text-align: center;
  padding: 12px 0 8px;
  animation: auth-fade-up 0.6s ease;
}

.auth-success__emoji {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 16px;
}

.auth-success__title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.auth-success__text {
  font-size: 14px;
  color: #777777;
  line-height: 1.65;
  margin-bottom: 20px;
}

.auth-success__list {
  text-align: left;
  display: grid;
  gap: 8px;
  margin: 0 auto 28px;
  max-width: 320px;
  font-size: 13px;
  color: #2F2F2F;
}

.auth-success__actions {
  display: grid;
  gap: 10px;
}

/* Login feature rotator */
.auth-feature-rotator {
  position: relative;
  min-height: 88px;
  margin-top: 24px;
}

.auth-feature-card {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}

.auth-feature-card.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.auth-feature-card__icon {
  font-size: 1.35rem;
  flex-shrink: 0;
}

.auth-feature-card__title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.auth-feature-card__desc {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

/* Registration left panel */
.auth-register-panel {
  background: linear-gradient(135deg, #FFF8F5 0%, #FAEEF3 100%);
  min-height: 420px;
  padding: 40px 24px 48px;
}

@media (min-width: 1024px) {
  .auth-register-panel {
    min-height: 100vh;
    padding: 56px 48px 64px;
    display: flex;
    align-items: center;
  }
}

.auth-register-panel__inner {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.auth-register-panel__logo img {
  height: 72px;
  width: auto;
  max-width: 180px;
  background: transparent;
  object-fit: contain;
}

.auth-register-panel__tag {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #C9A66B;
}

.auth-register-panel__title {
  margin-top: 20px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: #2F2F2F;
  line-height: 1.2;
}

.auth-register-panel__intro {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.7;
  color: #777777;
  max-width: 48ch;
}

.auth-benefits-grid {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 28px;
}

@media (min-width: 768px) {
  .auth-benefits-grid {
    display: grid;
  }
  .auth-benefits-carousel {
    display: none;
  }
}

.auth-benefit-card {
  background: #FFFFFF;
  border: 1px solid #EFE7E7;
  border-radius: 18px;
  padding: 18px;
  transition: box-shadow 0.25s, transform 0.25s;
}

.auth-benefit-card:hover {
  box-shadow: 0 12px 32px rgba(47, 47, 47, 0.06);
  transform: translateY(-2px);
}

.auth-benefit-card__icon {
  font-size: 1.35rem;
  display: block;
  margin-bottom: 8px;
}

.auth-benefit-card__title {
  font-size: 14px;
  font-weight: 700;
  color: #2F2F2F;
  margin-bottom: 6px;
}

.auth-benefit-card__desc {
  font-size: 12px;
  line-height: 1.6;
  color: #777777;
}

.auth-benefits-carousel {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.auth-benefits-carousel::-webkit-scrollbar {
  display: none;
}

.auth-benefit-card--slide {
  flex: 0 0 min(280px, 85vw);
  scroll-snap-align: start;
}

/* Card logo */
.auth-card__logo {
  text-align: center;
  margin-bottom: 24px;
}

.auth-card__logo img {
  height: 72px;
  width: auto;
  max-width: 180px;
  margin: 0 auto;
  display: block;
  background: transparent;
  object-fit: contain;
}

.auth-card__logo-text {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  font-style: italic;
  color: #2F2F2F;
}

/* Wizard */
.auth-wizard-progress {
  margin-bottom: 24px;
}

.auth-wizard-progress__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #C9A66B;
  margin-bottom: 10px;
}

.auth-wizard-progress__dots {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.auth-wizard-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #EFE7E7;
  transition: background 0.25s, transform 0.25s;
}

.auth-wizard-dot.is-active {
  background: #E86A8D;
}

.auth-wizard-dot.is-current {
  transform: scale(1.15);
}

.auth-wizard-progress__steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #777777;
}

.auth-wizard-progress__steps span.is-active {
  color: #E86A8D;
}

.auth-wizard-progress__arrow {
  color: #EFE7E7;
  font-size: 10px;
}

.auth-wizard-step__title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #2F2F2F;
  margin-bottom: 18px;
}

.auth-wizard-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.auth-optional {
  color: #777777;
  font-weight: 400;
}

.auth-field__group-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #2F2F2F;
  margin-bottom: 10px;
}

.auth-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid #EFE7E7;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.auth-radio:has(input:checked) {
  border-color: #E86A8D;
  background: #FFF8F5;
}

.auth-radio input {
  accent-color: #E86A8D;
}

.auth-radio__label {
  font-size: 13px;
  font-weight: 500;
  color: #2F2F2F;
}

.auth-success-pop {
  animation: auth-success-pop 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes auth-success-pop {
  0% { opacity: 0; transform: scale(0.96) translateY(12px); }
  100% { opacity: 1; transform: none; }
}

.auth-success-pop .auth-success__emoji {
  animation: auth-success-bounce 0.8s ease 0.15s both;
}

@keyframes auth-success-bounce {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

.auth-left--login,
.auth-left--register {
  animation: auth-fade-up 0.5s ease;
}

@media (prefers-reduced-motion: reduce) {
  .auth-story__slide img,
  .auth-page__shape,
  .auth-feature-card,
  .auth-card,
  .auth-success-pop,
  .auth-left--login,
  .auth-left--register {
    animation: none !important;
    transition: none !important;
  }

  .auth-feature-card {
    position: relative;
    opacity: 1;
    transform: none;
  }

  .auth-feature-card:not(.is-active) {
    display: none;
  }
}
