/* Login / auth surfaces — pairs with theme.css tokens */

.auth-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  overflow: hidden;
}

.auth-shell__ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.auth-shell__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  opacity: 0.35;
}

.auth-shell__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.55;
  animation: auth-orb-float 18s ease-in-out infinite;
}

.auth-shell__orb--a {
  width: min(42vw, 380px);
  height: min(42vw, 380px);
  background: var(--festivai-rose);
  top: -12%;
  left: -8%;
  animation-delay: 0s;
}

.auth-shell__orb--b {
  width: min(50vw, 420px);
  height: min(50vw, 420px);
  background: var(--festivai-plum);
  bottom: -18%;
  right: -10%;
  animation-delay: -6s;
  opacity: 0.35;
}

.auth-shell__orb--c {
  width: min(36vw, 320px);
  height: min(36vw, 320px);
  background: var(--festivai-mauve);
  top: 40%;
  left: 35%;
  animation-delay: -12s;
  opacity: 0.25;
}

@keyframes auth-orb-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(2%, 3%) scale(1.04);
  }
  66% {
    transform: translate(-2%, 1%) scale(0.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-shell__orb {
    animation: none;
  }
}

.auth-layout {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1024px;
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: stretch;
}

@media (min-width: 880px) {
  .auth-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 0;
    border-radius: 28px;
    overflow: hidden;
    box-shadow:
      0 4px 6px rgba(23, 11, 31, 0.04),
      0 24px 64px rgba(23, 11, 31, 0.12);
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
  }
}

/* Brand column */
.auth-brand {
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 3.25rem);
  background: var(--bg-sidebar-gradient);
  color: var(--text-on-dark);
  position: relative;
  overflow: hidden;
}

@media (min-width: 880px) {
  .auth-brand {
    display: flex;
  }
}

.auth-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 20% 80%, rgba(199, 138, 140, 0.35), transparent 55%);
  pointer-events: none;
}

.auth-brand__inner {
  position: relative;
  z-index: 1;
  max-width: 22rem;
}

.auth-brand__mark {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 14px;
  background: rgba(253, 246, 242, 0.12);
  border: 1px solid rgba(253, 246, 242, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.auth-brand__mark-icon {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  font-variation-settings: "SOFT" 40, "WONK" 0.9;
  line-height: 1;
}

.auth-brand__title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.65rem);
  font-weight: 600;
  font-variation-settings: "SOFT" 50, "WONK" 1;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.auth-brand__tagline {
  margin: 0.85rem 0 0;
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(253, 246, 242, 0.82);
  max-width: 20rem;
}

/* Form column */
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

@media (min-width: 880px) {
  .auth-main {
    padding: clamp(2rem, 4vw, 3rem);
    background: var(--bg-surface);
  }
}

.auth-card {
  width: 100%;
  max-width: 420px;
  border-radius: 22px;
  background: var(--bg-surface);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-elevated, 0 8px 30px rgba(23, 11, 31, 0.08));
  transition: box-shadow 0.25s ease;
}

@media (min-width: 880px) {
  .auth-card {
    box-shadow: none;
    border: none;
    border-radius: 0;
    max-width: none;
    padding: 0;
    background: transparent;
  }
}

@media (max-width: 879px) {
  .auth-card:hover {
    box-shadow: var(--shadow-soft);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-card {
    transition: none;
  }
}

/* Mobile: compact brand strip above card */
.auth-card__brand-mobile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 880px) {
  .auth-card__brand-mobile {
    display: none;
  }
}

.auth-brand__mark--compact {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--festivai-plum), var(--festivai-rose));
  border: none;
  box-shadow: 0 8px 20px rgba(90, 52, 91, 0.25);
}

.auth-brand__mark--compact .auth-brand__mark-icon {
  color: var(--text-on-dark);
}

.auth-brand__mark-label {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  font-variation-settings: "SOFT" 40, "WONK" 0.9;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.auth-card__header {
  margin-bottom: 1.35rem;
}

.auth-card__heading {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.auth-card__lede {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.form-field input {
  width: 100%;
  box-sizing: border-box;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-default);
  padding: 0.7rem 0.95rem;
  font-size: 0.9375rem;
  background: var(--bg-surface-subtle);
  color: var(--text-main);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

.form-field input::placeholder {
  color: var(--text-muted);
  opacity: 0.65;
}

.form-field input:hover {
  border-color: rgba(90, 52, 91, 0.28);
}

.form-field input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: var(--focus-ring);
  background: var(--bg-surface);
}

.password-wrapper {
  display: flex;
  align-items: stretch;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-default);
  background: var(--bg-surface-subtle);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

.password-wrapper:focus-within {
  border-color: var(--accent-primary);
  box-shadow: var(--focus-ring);
  background: var(--bg-surface);
}

.password-wrapper:hover:not(:focus-within) {
  border-color: rgba(90, 52, 91, 0.28);
}

.password-wrapper input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  border-radius: var(--radius-control);
  box-shadow: none;
}

.password-wrapper input:focus {
  box-shadow: none;
}

.password-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  border: none;
  border-left: 1px solid var(--border-subtle);
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.password-toggle:hover {
  color: var(--accent-primary);
  background: var(--accent-primary-soft);
}

.password-toggle__icon {
  display: block;
}

.password-toggle__icon--hide {
  display: none;
}

.password-toggle--visible .password-toggle__icon--show {
  display: none;
}

.password-toggle--visible .password-toggle__icon--hide {
  display: block;
}

.auth-alert {
  border-radius: var(--radius-control);
  padding: 0.65rem 0.85rem;
  background: var(--accent-primary-soft, rgba(199, 138, 140, 0.12));
  color: var(--accent-primary);
  font-size: 0.875rem;
  line-height: 1.45;
  border: 1px solid rgba(90, 52, 91, 0.15);
}

.auth-submit {
  margin-top: 0.15rem;
  min-height: 2.85rem;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-control);
}

.auth-footer {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
}
