/* Adlesa auth pages — centered card + background */
:root {
  --bg: oklch(0.985 0.006 300);
  --bg-soft: oklch(0.965 0.018 285);
  --ink: oklch(0.20 0.04 285);
  --ink2: oklch(0.46 0.03 285);
  --ink3: oklch(0.62 0.02 285);
  --brand: oklch(0.55 0.22 280);
  --brand2: oklch(0.65 0.22 280);
  --brand-soft: oklch(0.94 0.04 280);
  --border: oklch(0.20 0.04 285 / 0.09);
  --dark: oklch(0.27 0.08 275);
  --danger: oklch(0.55 0.2 25);
  --ok: oklch(0.55 0.14 155);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; }
body.auth-body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
  position: relative;
  overflow-x: hidden;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Atmospheric background */
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, oklch(0.90 0.07 280 / 0.85), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 80%, oklch(0.92 0.05 300 / 0.55), transparent 50%),
    radial-gradient(ellipse 45% 35% at 0% 70%, oklch(0.93 0.04 60 / 0.4), transparent 50%),
    var(--bg);
}
.auth-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.75;
  animation: auth-float 18s ease-in-out infinite;
}
.auth-bg-orb-a {
  width: min(520px, 70vw);
  height: min(520px, 70vw);
  top: -8%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, oklch(0.78 0.14 280 / 0.55), transparent 70%);
}
.auth-bg-orb-b {
  width: min(380px, 55vw);
  height: min(380px, 55vw);
  bottom: 5%;
  right: -5%;
  background: radial-gradient(circle, oklch(0.82 0.1 300 / 0.45), transparent 70%);
  animation-delay: -6s;
  animation-duration: 22s;
}
.auth-bg-orb-c {
  width: min(320px, 45vw);
  height: min(320px, 45vw);
  bottom: 12%;
  left: -4%;
  background: radial-gradient(circle, oklch(0.88 0.08 60 / 0.35), transparent 70%);
  animation-delay: -11s;
  animation-duration: 26s;
}
.auth-bg-grid {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(oklch(0.20 0.04 285 / 0.04) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.20 0.04 285 / 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent 75%);
}
@keyframes auth-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(2%, 3%) scale(1.04); }
  66% { transform: translate(-2%, -2%) scale(0.98); }
}
.auth-bg-orb-a { animation-name: auth-float-a; }
@keyframes auth-float-a {
  0%, 100% { transform: translateX(-50%) translate(0, 0) scale(1); }
  33% { transform: translateX(-50%) translate(1.5%, 2.5%) scale(1.05); }
  66% { transform: translateX(-50%) translate(-1.5%, -1.5%) scale(0.97); }
}

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 28px;
  gap: 22px;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.auth-logo:hover { text-decoration: none; opacity: 0.88; }
.auth-logo-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, oklch(0.52 0.24 280), oklch(0.48 0.26 300));
  display: grid;
  place-items: center;
  box-shadow: 0 2px 10px oklch(0.52 0.24 280 / 0.4);
}
.auth-logo-mark svg { width: 18px; height: 18px; display: block; }

.auth-main {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  background: oklch(1 0 0 / 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid oklch(0.20 0.04 285 / 0.08);
  border-radius: 28px;
  padding: 36px 36px 32px;
  box-shadow:
    0 1px 0 oklch(1 0 0 / 0.7) inset,
    0 24px 60px -28px oklch(0.25 0.08 280 / 0.4);
}
.auth-card.is-wide { max-width: 560px; }

.auth-copy {
  text-align: center;
  margin-top: 18px;
  font-size: 12px;
  color: var(--ink3);
  line-height: 1.6;
}
.auth-copy a { color: var(--ink2); font-weight: 600; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg-soft);
  border-radius: 100px;
  padding: 5px;
  margin-bottom: 28px;
}
.auth-tabs a {
  text-align: center;
  padding: 10px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink2);
  text-decoration: none;
  transition: all .2s;
}
.auth-tabs a:hover { color: var(--ink); text-decoration: none; }
.auth-tabs a.is-active {
  background: white;
  color: var(--ink);
  box-shadow: 0 4px 12px -6px oklch(0.2 0.04 285 / 0.25);
}

.auth-head { margin-bottom: 24px; text-align: center; }
.auth-head h1 {
  font-family: 'Fraunces', serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 8px;
}
.auth-head h1 em { font-style: italic; color: var(--brand); font-weight: 500; }
.auth-head p { font-size: 14px; color: var(--ink2); line-height: 1.55; }

.auth-form { display: grid; gap: 14px; }
.auth-field > label,
.auth-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink2);
  margin-bottom: 7px;
}
.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field select {
  width: 100%;
  appearance: none;
  border: 1px solid var(--border);
  background: white;
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.auth-field input[type="text"]:focus,
.auth-field input[type="email"]:focus,
.auth-field input[type="password"]:focus,
.auth-field select:focus {
  border-color: oklch(0.55 0.22 280 / 0.45);
  box-shadow: 0 0 0 4px oklch(0.55 0.22 280 / 0.12);
}
.auth-field input.is-invalid,
.auth-field select.is-invalid {
  border-color: oklch(0.65 0.18 25);
}

/* Salutation segmented control */
.auth-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.auth-choice-option {
  position: relative;
  cursor: pointer;
  margin: 0;
}
.auth-choice-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.auth-choice-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: white;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink2);
  transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
  user-select: none;
}
.auth-choice-option span::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid oklch(0.20 0.04 285 / 0.22);
  background: white;
  box-shadow: inset 0 0 0 0 var(--brand);
  transition: border-color .15s, box-shadow .15s;
  flex-shrink: 0;
}
.auth-choice-option:hover span {
  border-color: oklch(0.55 0.22 280 / 0.35);
  color: var(--ink);
}
.auth-choice-option input:checked + span {
  border-color: oklch(0.55 0.22 280 / 0.55);
  background: var(--brand-soft);
  color: var(--ink);
  box-shadow: 0 0 0 3px oklch(0.55 0.22 280 / 0.12);
}
.auth-choice-option input:checked + span::before {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 4px var(--brand);
}
.auth-choice-option input:focus-visible + span {
  outline: 2px solid var(--brand2);
  outline-offset: 2px;
}
.auth-error {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--danger);
  font-weight: 600;
}
.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.auth-row-3 {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12px;
}
.auth-row-street {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr;
  gap: 12px;
}

.auth-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
}
.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.5;
}
.auth-check input {
  margin-top: 3px;
  accent-color: var(--brand);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: none;
  border-radius: 100px;
  padding: 14px 22px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  background: var(--brand);
  color: white;
  box-shadow: 0 4px 14px -2px oklch(0.55 0.22 280 / 0.45);
  transition: background .2s, transform .2s, box-shadow .2s;
}
.auth-btn:hover {
  background: var(--brand2);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -4px oklch(0.55 0.22 280 / 0.5);
}
.auth-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 14px;
  color: var(--ink2);
}
.auth-foot a { font-weight: 700; }

.auth-alert {
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 4px;
}
.auth-alert-danger {
  background: oklch(0.95 0.03 25);
  color: var(--danger);
  border: 1px solid oklch(0.8 0.08 25);
}
.auth-alert-success {
  background: oklch(0.95 0.04 155);
  color: var(--ok);
  border: 1px solid oklch(0.8 0.08 155);
}
.auth-alert-info {
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid oklch(0.55 0.22 280 / 0.2);
}

@media (max-width: 640px) {
  .auth-shell { padding: 24px 14px 22px; gap: 16px; justify-content: flex-start; padding-top: 28px; }
  .auth-card { padding: 28px 20px; border-radius: 24px; }
  .auth-head h1 { font-size: 26px; }
  .auth-row,
  .auth-row-3,
  .auth-row-street { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-bg-orb { animation: none; }
}
