
.auth-page {
  --bg: #020713;
  --panel: rgba(9, 18, 34, 0.74);
  --panel-strong: rgba(7, 14, 28, 0.92);
  --panel-soft: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.105);
  --line-strong: rgba(96, 165, 250, 0.38);
  --text: #f8fbff;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --blue: #2563eb;
  --blue-2: #3b82f6;
  --cyan: #38bdf8;
  --violet: #7c3aed;
  --purple: #a855f7;
  --green: #22c55e;
  --amber: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 34px 120px rgba(0, 0, 0, 0.52);
  --radius: 30px;
}






.auth-page {
  min-height: 100vh;
  padding: 18px;
  position: relative;
  isolation: isolate;
}

.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 17% 18%, rgba(37, 99, 235, 0.32), transparent 31%),
    radial-gradient(circle at 82% 8%, rgba(124, 58, 237, 0.24), transparent 32%),
    radial-gradient(circle at 70% 90%, rgba(14, 165, 233, 0.16), transparent 28%);
  z-index: -3;
}

.auth-page::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.34;
  z-index: -2;
  mask-image: radial-gradient(circle at 70% 30%, black, transparent 72%);
}

.auth-page .shell {
  width: min(1580px, 100%);
  min-height: calc(100vh - 36px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(410px, 0.78fr) minmax(620px, 1.12fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(145deg, rgba(4, 11, 22, 0.94), rgba(5, 13, 27, 0.78));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-page .hero-panel {
  min-height: 820px;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--line-strong);
  background-image:
    linear-gradient(90deg, rgba(3, 7, 18, 0.96) 0%, rgba(3, 7, 18, 0.76) 46%, rgba(3, 7, 18, 0.20) 100%),
    linear-gradient(180deg, rgba(3, 7, 18, 0.16), rgba(3, 7, 18, 0.84) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: 58% 50%;
}

.auth-page .hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 42%, rgba(37, 99, 235, 0.34), transparent 34%),
    linear-gradient(180deg, transparent 56%, rgba(3, 7, 18, 0.94) 100%);
  pointer-events: none;
}

.auth-page .hero-inner {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 46px 34px;
}

.auth-page .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: white;
}

.auth-page .brand-mark {
  width: 42px;
  height: 42px;
  position: relative;
  filter: drop-shadow(0 0 24px rgba(37, 99, 235, 0.7));
}

.auth-page .brand-mark::before, .auth-page .brand-mark::after {
  content: "";
  position: absolute;
  background: linear-gradient(135deg, #60a5fa, #1d4ed8 75%);
  border-radius: 6px 6px 9px 9px;
  transform-origin: bottom center;
}

.auth-page .brand-mark::before {
  width: 16px;
  height: 38px;
  left: 9px;
  top: 2px;
  transform: rotate(-35deg) skewY(12deg);
}

.auth-page .brand-mark::after {
  width: 16px;
  height: 32px;
  left: 24px;
  top: 7px;
  transform: rotate(35deg) skewY(-12deg);
  opacity: 0.95;
}

.auth-page .brand-word {
  font-size: clamp(26px, 2.2vw, 36px);
  letter-spacing: -0.06em;
  font-weight: 900;
}

.auth-page .brand-word span {
  color: #60a5fa;
  font-size: 0.58em;
  letter-spacing: -0.03em;
  margin-left: 1px;
}

.auth-page .hero-copy {
  width: min(560px, 100%);
  margin-top: 108px;
}

.auth-page .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #bfdbfe;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.auth-page .hero-copy h1 {
  margin: 0;
  font-size: clamp(44px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.auth-page .hero-copy h1 .blue {
  color: var(--blue-2);
  text-shadow: 0 0 34px rgba(37, 99, 235, 0.40);
}

.auth-page .hero-copy p {
  max-width: 520px;
  margin: 28px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.75;
}

.auth-page .benefits {
  display: grid;
  gap: 18px;
  margin-top: 44px;
  width: min(530px, 100%);
}

.auth-page .benefit {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 15px;
  align-items: center;
}

.auth-page .benefit-icon, .auth-page .trust-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.30), rgba(37, 99, 235, 0.10));
  border: 1px solid rgba(168, 85, 247, 0.32);
  color: #c4b5fd;
  box-shadow: 0 0 34px rgba(124, 58, 237, 0.18);
}

.auth-page .benefit h3, .auth-page .trust h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 900;
}

.auth-page .benefit p, .auth-page .trust p {
  margin: 4px 0 0;
  color: #aebbd0;
  font-size: 14px;
  line-height: 1.55;
}

.auth-page .hero-bottom {
  margin-top: 54px;
}

.auth-page .stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  background: rgba(4, 12, 26, 0.62);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
}

.auth-page .stat {
  padding: 19px 12px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.auth-page .stat:last-child {
  border-right: 0;
}

.auth-page .stat strong {
  display: block;
  color: #3b82f6;
  font-size: clamp(22px, 2.1vw, 32px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.auth-page .stat span {
  display: block;
  margin-top: 9px;
  color: #b5c2d6;
  font-size: 12px;
}

.auth-page .hero-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 42px;
  color: #94a3b8;
  font-size: 13px;
}

.auth-page .hero-footer a {
  color: inherit;
  text-decoration: none;
}

.auth-page .hero-footer a:hover {
  color: #dbeafe;
}

.auth-page .form-panel {
  position: relative;
  min-height: 820px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 54px 48px;
  background:
    radial-gradient(circle at 45% 4%, rgba(37, 99, 235, 0.18), transparent 35%),
    radial-gradient(circle at 82% 74%, rgba(124, 58, 237, 0.10), transparent 30%),
    linear-gradient(145deg, rgba(5, 13, 27, 0.94), rgba(3, 8, 18, 0.78));
}

.auth-page .form-topbar {
  position: absolute;
  top: 36px;
  right: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-page .lang-toggle {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.auth-page .lang-toggle button, .auth-page .icon-button {
  min-width: 42px;
  height: 40px;
  color: #cbd5e1;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  transition: 0.18s ease;
}

.auth-page .lang-toggle button.is-active {
  color: #0f172a;
  background: #f8fafc;
}

.auth-page .icon-button {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.auth-page .icon-button:hover, .auth-page .lang-toggle button:not(.is-active):hover {
  background: rgba(255, 255, 255, 0.09);
}

.auth-page .form-wrap {
  width: min(920px, 100%);
}

.auth-page .mobile-brand {
  display: none;
  margin-bottom: 28px;
}

.auth-page .auth-tabs {
  width: min(560px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 auto 28px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.036);
}

.auth-page .auth-tab {
  min-height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #cbd5e1;
  background: transparent;
  font-weight: 900;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.auth-page .auth-tab[data-mode="login"].is-active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 0 42px rgba(37, 99, 235, 0.35);
  color: white;
}

.auth-page .auth-tab[data-mode="register"].is-active {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  box-shadow: 0 0 42px rgba(124, 58, 237, 0.36);
  color: white;
}

.auth-page .auth-tab:hover {
  transform: translateY(-1px);
}

.auth-page .auth-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.54), rgba(3, 7, 18, 0.55));
  box-shadow: 0 24px 100px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(20px);
}

.auth-page .auth-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background:
    radial-gradient(circle at 30% 0%, rgba(37, 99, 235, 0.16), transparent 36%),
    radial-gradient(circle at 70% 0%, rgba(124, 58, 237, 0.12), transparent 42%);
  pointer-events: none;
}

/* ============== 3D FLIP CARD ============== */
.auth-page .dual-forms {
  position: relative;
  display: block;
  padding: 56px 56px;
  min-height: 820px;
  overflow: visible;
  perspective: 1800px;
  perspective-origin: 50% 30%;
}
.auth-page[data-mode="register"] .dual-forms { min-height: 880px; }
.auth-page[data-mode="login"]    .dual-forms { min-height: 720px; }
.auth-page .dual-forms .divider { display: none; }

/* Wrapper that holds both faces */
.auth-page .dual-forms::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(37,99,235,0.20), transparent 50%),
    radial-gradient(ellipse at 70% 100%, rgba(124,58,237,0.0), transparent 50%);
  transition: background 600ms ease;
  z-index: 0;
}
.auth-page[data-mode="register"] .dual-forms::before {
  background:
    radial-gradient(ellipse at 30% 0%, rgba(37,99,235,0.0), transparent 50%),
    radial-gradient(ellipse at 70% 100%, rgba(124,58,237,0.30), transparent 50%);
}

/* The form-block face. Both share same area, flipped with 3D */
.auth-page .form-block {
  position: absolute;
  top: 56px;
  left: 56px;
  right: 56px;
  margin: 0 auto;
  max-width: 460px;
  min-width: 0;
  width: calc(100% - 112px);
  transform-origin: center center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition:
    transform 780ms cubic-bezier(0.6, -0.05, 0.2, 1.25),
    opacity 480ms ease,
    filter 520ms ease;
  will-change: transform, opacity, filter;
}

/* Active login: face front, neutral */
.auth-page .form-block.login-block {
  transform: rotateY(0deg) translateZ(0) scale(1);
  opacity: 1;
  filter: none;
  visibility: visible;
  z-index: 2;
}
/* Inactive login: flip away counter-clockwise + scale down */
.auth-page .form-block.login-block.is-dimmed {
  transform: rotateY(-90deg) translateZ(-20px) scale(0.94);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    transform 560ms cubic-bezier(0.6, -0.05, 0.2, 1.25),
    opacity 320ms ease 0ms,
    visibility 0s linear 560ms;
  z-index: 1;
}

/* Inactive register: start flipped */
.auth-page .form-block.register-block.is-dimmed {
  transform: rotateY(90deg) translateZ(-20px) scale(0.94);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    transform 560ms cubic-bezier(0.6, -0.05, 0.2, 1.25),
    opacity 320ms ease 0ms,
    visibility 0s linear 560ms;
  z-index: 1;
}
/* Active register: face front */
.auth-page .form-block.register-block {
  transform: rotateY(0deg) translateZ(0) scale(1);
  opacity: 1;
  filter: none;
  visibility: visible;
  z-index: 2;
}

/* Field stagger reveal when active */
.auth-page .form-block:not(.is-dimmed) > h2, .auth-page .form-block:not(.is-dimmed) > .intro, .auth-page .form-block:not(.is-dimmed) .fields .field, .auth-page .form-block:not(.is-dimmed) .form-row, .auth-page .form-block:not(.is-dimmed) .primary-button, .auth-page .form-block:not(.is-dimmed) .social-divider, .auth-page .form-block:not(.is-dimmed) .socials, .auth-page .form-block:not(.is-dimmed) .terms {
  animation: vh-rise 540ms cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
}
.auth-page .form-block:not(.is-dimmed) > h2          { animation-delay: 120ms; }
.auth-page .form-block:not(.is-dimmed) > .intro      { animation-delay: 180ms; }
.auth-page .form-block:not(.is-dimmed) .fields .field:nth-of-type(1) { animation-delay: 240ms; }
.auth-page .form-block:not(.is-dimmed) .fields .field:nth-of-type(2) { animation-delay: 290ms; }
.auth-page .form-block:not(.is-dimmed) .fields .field:nth-of-type(3) { animation-delay: 340ms; }
.auth-page .form-block:not(.is-dimmed) .fields .field:nth-of-type(4) { animation-delay: 390ms; }
.auth-page .form-block:not(.is-dimmed) .fields .field:nth-of-type(5) { animation-delay: 430ms; }
.auth-page .form-block:not(.is-dimmed) .form-row     { animation-delay: 430ms; }
.auth-page .form-block:not(.is-dimmed) .primary-button { animation-delay: 480ms; }
.auth-page .form-block:not(.is-dimmed) .social-divider { animation-delay: 540ms; }
.auth-page .form-block:not(.is-dimmed) .socials      { animation-delay: 580ms; }
.auth-page .form-block:not(.is-dimmed) .terms        { animation-delay: 640ms; }

@keyframes vh-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============== TABS — elastic spring pill ============== */
.auth-page .auth-tabs { position: relative; }
.auth-page .auth-tabs::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 9px;
  width: calc(50% - 14px);
  height: calc(100% - 18px);
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 12px 40px rgba(37, 99, 235, 0.55),
    inset 0 0 20px rgba(255,255,255,0.08);
  transition:
    transform 720ms cubic-bezier(0.34, 1.56, 0.64, 1),
    background 320ms ease,
    box-shadow 320ms ease;
  z-index: 0;
  pointer-events: none;
  animation: vh-pill-pulse 3.2s ease-in-out infinite;
}
.auth-page .auth-tabs[data-mode="register"]::before {
  transform: translateX(calc(100% + 10px));
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 12px 40px rgba(124, 58, 237, 0.55),
    inset 0 0 20px rgba(255,255,255,0.08);
}
@keyframes vh-pill-pulse {
  0%, 100% { filter: brightness(1) saturate(1); }
  50%      { filter: brightness(1.18) saturate(1.15); }
}
.auth-page .auth-tab {
  position: relative;
  z-index: 1;
  background: transparent !important;
  box-shadow: none !important;
  color: #cbd5e1;
  transition: color 280ms ease, transform 180ms ease;
}
.auth-page .auth-tab.is-active {
  color: white !important;
}
.auth-page .auth-tab:not(.is-active):hover {
  color: #fff;
  transform: translateY(-1px);
}

/* Whole card subtle morph based on mode */
.auth-page .auth-card {
  transition: box-shadow 600ms ease, border-color 600ms ease;
}
.auth-page[data-mode="login"] .auth-card {
  box-shadow:
    0 24px 100px rgba(0,0,0,0.36),
    0 0 60px rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.20);
}
.auth-page[data-mode="register"] .auth-card {
  box-shadow:
    0 24px 100px rgba(0,0,0,0.36),
    0 0 60px rgba(124, 58, 237, 0.18);
  border-color: rgba(124, 58, 237, 0.25);
}

/* Mobile: skip 3D flip, simple slide */
@media (max-width: 720px) {
  .auth-page .dual-forms { perspective: none; min-height: 0; padding: 32px 22px; position: relative; }
  .auth-page .form-block { position: relative; top: auto; left: auto; right: auto; width: 100%; max-width: 100%; transform-style: flat; }
  .auth-page .form-block.login-block, .auth-page .form-block.register-block {
    transform: translateX(0);
    filter: none;
  }
  .auth-page .form-block.login-block.is-dimmed { transform: translateX(-30px); filter: blur(0); display: none; }
  .auth-page .form-block.register-block.is-dimmed { transform: translateX(30px); filter: blur(0); display: none; }
}

.auth-page .form-block h2, .auth-page .forgot-shell h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.04em;
  font-weight: 950;
}

.auth-page .form-block .intro, .auth-page .forgot-shell .intro {
  margin: 8px 0 0;
  color: #aebbd0;
  line-height: 1.55;
}

.auth-page .fields {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.auth-page .field {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.auth-page .field:focus-within {
  border-color: rgba(96, 165, 250, 0.62);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.11);
}

.auth-page .field-icon {
  position: absolute;
  left: 0;
  top: 0;
  width: 54px;
  height: 100%;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
  color: #a78bfa;
  background: rgba(124, 58, 237, 0.10);
}

.auth-page .field input, .auth-page .field select {
  width: 100%;
  height: 58px;
  padding: 8px 48px 8px 70px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f8fafc;
  appearance: none;
}

.auth-page .field input::placeholder {
  color: #708098;
}

.auth-page .field select {
  color: #dbeafe;
}

.auth-page .field option {
  background: #020713;
  color: #f8fafc;
}

.auth-page .field-right {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.auth-page .reveal-pass {
  background: transparent;
  color: #94a3b8;
  display: grid;
  place-items: center;
}

.auth-page .reveal-pass:hover {
  color: white;
}

.auth-page .form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  color: #b6c1d2;
  font-size: 14px;
}

.auth-page .check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
}

.auth-page .check input {
  width: 16px;
  height: 16px;
  accent-color: #8b5cf6;
}

.auth-page .link-button {
  background: transparent;
  color: #c084fc;
  font-weight: 900;
}

.auth-page .link-button:hover {
  color: #e9d5ff;
}

.auth-page .primary-button {
  width: 100%;
  height: 58px;
  margin-top: 26px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: white;
  font-weight: 950;
  letter-spacing: -0.02em;
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

.auth-page .primary-button.blue {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 18px 60px rgba(37, 99, 235, 0.30);
}

.auth-page .primary-button.violet {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow: 0 18px 60px rgba(124, 58, 237, 0.30);
}

.auth-page .primary-button.amber {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 18px 60px rgba(245, 158, 11, 0.24);
}

.auth-page .primary-button:hover {
  transform: translateY(-1px) scale(1.01);
  filter: brightness(1.06);
}

.auth-page .primary-button:active {
  transform: translateY(0) scale(0.99);
}

.auth-page .social-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin: 30px 0 18px;
  color: #77869b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-page .social-divider::before, .auth-page .social-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.auth-page .socials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.auth-page .social {
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: #e2e8f0;
  font-weight: 800;
  transition: 0.16s ease;
}

.auth-page .social:hover {
  background: rgba(255, 255, 255, 0.085);
  border-color: rgba(255, 255, 255, 0.20);
}

.auth-page .social-logo {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 950;
}

.auth-page .social-logo.google {
  background: conic-gradient(from 45deg, #4285f4, #34a853, #fbbc05, #ea4335, #4285f4);
}

.auth-page .social-logo.ms {
  background: linear-gradient(90deg, #f25022 0 50%, #7fba00 50% 100%);
  position: relative;
}

.auth-page .social-logo.id {
  border: 1px solid #2563eb;
  color: #60a5fa;
  background: rgba(37, 99, 235, 0.14);
}

.auth-page .terms {
  margin: 17px 0 0;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.65;
}

.auth-page .terms a {
  color: #c084fc;
  text-decoration: none;
  font-weight: 850;
}

.auth-page .role-chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.auth-page .role-chip {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: 0.16s ease;
}

.auth-page .role-chip.is-active, .auth-page .role-chip:hover {
  background: rgba(124, 58, 237, 0.18);
  border-color: rgba(168, 85, 247, 0.45);
  color: #f8fafc;
}

.auth-page .forgot-view {
  display: none;
  position: relative;
  padding: 56px 42px;
}

.auth-page[data-mode="forgot"] .dual-forms {
  display: none;
}

.auth-page[data-mode="forgot"] .forgot-view {
  display: block;
}

.auth-page .forgot-shell {
  width: min(520px, 100%);
  margin: 0 auto;
  text-align: center;
}

.auth-page .forgot-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 158, 11, 0.34);
  border-radius: 24px;
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  box-shadow: 0 0 46px rgba(245, 158, 11, 0.12);
}

.auth-page .back-button {
  margin-top: 17px;
  background: transparent;
  color: #93c5fd;
  font-weight: 900;
}

.auth-page .back-button:hover {
  color: white;
}

.auth-page .trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 28px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
}

.auth-page .trust {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 13px;
  align-items: start;
}

.auth-page .trust-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
}

.auth-page .trust-icon.green {
  background: rgba(34, 197, 94, 0.13);
  border-color: rgba(34, 197, 94, 0.25);
  color: #86efac;
}

.auth-page .trust-icon.blue {
  background: rgba(37, 99, 235, 0.13);
  border-color: rgba(96, 165, 250, 0.25);
  color: #93c5fd;
}

.auth-page .trust-icon.violet {
  background: rgba(124, 58, 237, 0.15);
  border-color: rgba(168, 85, 247, 0.27);
  color: #c4b5fd;
}

.auth-page .trust-icon.amber {
  background: rgba(245, 158, 11, 0.13);
  border-color: rgba(245, 158, 11, 0.25);
  color: #fcd34d;
}

.auth-page .toast {
  position: fixed;
  z-index: 99;
  right: 24px;
  bottom: 24px;
  max-width: 380px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(34, 197, 94, 0.24);
  border-radius: 18px;
  background: rgba(5, 20, 18, 0.92);
  color: #dcfce7;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(14px);
  transform: translateY(22px);
  opacity: 0;
  pointer-events: none;
  transition: 0.22s ease;
}

.auth-page .toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.auth-page .toast-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(34, 197, 94, 0.13);
  color: #86efac;
}

.auth-page .toast strong {
  display: block;
  font-size: 14px;
}

.auth-page .toast span {
  display: block;
  margin-top: 3px;
  color: #bbf7d0;
  font-size: 13px;
  line-height: 1.45;
}

.auth-page .svg {
  width: 20px;
  height: 20px;
  display: inline-block;
}

@media (max-width: 1220px) {
  .auth-page .shell {
    grid-template-columns: 1fr;
  }

  .auth-page .hero-panel {
    display: none;
  }

  .auth-page .mobile-brand {
    display: inline-flex;
  }

  .auth-page .form-panel {
    min-height: calc(100vh - 36px);
  }
}

@media (max-width: 880px) {
  .auth-page {
    padding: 0;
  }

  .auth-page .shell {
    min-height: 100vh;
    border-radius: 0;
    border: 0;
  }

  .auth-page .form-panel {
    min-height: 100vh;
    padding: 86px 18px 24px;
  }

  .auth-page .form-topbar {
    top: 18px;
    right: 18px;
  }

  .auth-page .form-wrap {
    width: 100%;
  }

  .auth-page .auth-tabs {
    position: sticky;
    top: 14px;
    z-index: 10;
  }

  .auth-page .auth-card {
    border-radius: 22px;
  }

  .auth-page .dual-forms {
    display: block;
    padding: 28px 18px;
  }

  .auth-page .divider {
    display: none;
  }

  .auth-page[data-mode="login"] .register-block, .auth-page[data-mode="register"] .login-block {
    display: none;
  }

  .auth-page .form-block.is-dimmed {
    opacity: 1;
    filter: none;
  }

  .auth-page .forgot-view {
    padding: 38px 18px;
  }

  .auth-page .trust-grid {
    grid-template-columns: 1fr 1fr;
    padding: 18px;
  }

  .auth-page .socials {
    grid-template-columns: 1fr;
  }

  .auth-page .role-chips {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .auth-page .form-panel {
    padding-inline: 12px;
  }

  .auth-page .auth-tab {
    min-height: 52px;
    font-size: 14px;
  }

  .auth-page .form-block h2, .auth-page .forgot-shell h2 {
    font-size: 24px;
  }

  .auth-page .field input, .auth-page .field select {
    height: 56px;
    padding-left: 62px;
  }

  .auth-page .field-icon {
    width: 50px;
  }

  .auth-page .trust-grid {
    grid-template-columns: 1fr;
  }

  .auth-page .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
}

/* === Social logins hidden temporarily — re-enable later by removing this block === */
.auth-page .form-block .social-divider, .auth-page .form-block .socials { display: none !important; }

/* PNG logo replaces old SVG brand-mark */
.auth-page .brand.brand-img { display: inline-flex; align-items: center; }
.auth-page .brand.brand-img img { height: 82px; width: auto; display: block; }
.auth-page .brand.brand-img .brand-mark, .auth-page .brand.brand-img .brand-word { display: none !important; }
.auth-page .mobile-brand.brand-img img { height: 62px; }

/* When benefit-icon holds a full PNG button, drop gradient & border */
.auth-page .benefit-icon.benefit-icon-img {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  width: 56px;
  height: 56px;
  padding: 0;
  overflow: visible;
}
.auth-page .benefit-icon.benefit-icon-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* trust-icon PNG variant — strip gradient/border, show full PNG */
.auth-page .trust-icon.trust-icon-img {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  width: 48px;
  height: 48px;
  padding: 0;
  overflow: visible;
}
.auth-page .trust-icon.trust-icon-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ============ Light theme override for auth page ============ */
html[data-theme="light"] .auth-page {
  --bg: #f4f6fb;
  --panel: rgba(255, 255, 255, 0.95);
  --panel-strong: #ffffff;
  --panel-soft: rgba(0, 0, 0, 0.025);
  --line: rgba(20, 25, 60, 0.10);
  --line-strong: rgba(37, 99, 235, 0.35);
  --text: #0b1030;
  --muted: #525a78;
  --muted-2: #7a8298;
  --shadow: 0 24px 80px rgba(20, 25, 60, 0.10);
}
html[data-theme="light"] .auth-page::before {
  background:
    radial-gradient(circle at 17% 18%, rgba(37, 99, 235, 0.14), transparent 31%),
    radial-gradient(circle at 82% 8%,  rgba(124, 58, 237, 0.10), transparent 32%),
    radial-gradient(circle at 70% 90%, rgba(14, 165, 233, 0.08), transparent 28%);
}
html[data-theme="light"] .auth-page::after {
  background-image:
    linear-gradient(rgba(20, 25, 60, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 25, 60, 0.05) 1px, transparent 1px);
  opacity: 0.7;
}
html[data-theme="light"] .shell {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 254, 0.92));
}
html[data-theme="light"] .form-panel {
  background:
    radial-gradient(circle at 45% 4%, rgba(37, 99, 235, 0.06), transparent 35%),
    radial-gradient(circle at 82% 74%, rgba(124, 58, 237, 0.04), transparent 30%),
    #ffffff;
}
html[data-theme="light"] .hero-panel::before {
  background:
    radial-gradient(circle at 78% 42%, rgba(37, 99, 235, 0.18), transparent 34%),
    linear-gradient(180deg, transparent 56%, rgba(255, 255, 255, 0.78) 100%);
}
html[data-theme="light"] .hero-copy h1, html[data-theme="light"] .form-block h2 { color: #0b1030; }
html[data-theme="light"] .hero-copy p, html[data-theme="light"] .form-block .intro, html[data-theme="light"] .benefit p, html[data-theme="light"] .trust p { color: #525a78; }
html[data-theme="light"] .lang-toggle button.is-active { background: #0b1030; color: #f8fafc; }
html[data-theme="light"] .field {
  background: rgba(20, 25, 60, 0.04);
  border: 1px solid rgba(20, 25, 60, 0.10);
}
html[data-theme="light"] .field input, html[data-theme="light"] .field select { color: #0b1030; }
html[data-theme="light"] .auth-tabs {
  background: rgba(20, 25, 60, 0.04);
  border-color: rgba(20, 25, 60, 0.10);
}
html[data-theme="light"] .auth-tab { color: #525a78; }

/* ============ Light theme — more overrides ============ */
html[data-theme="light"] .form-block, html[data-theme="light"] .form-block * { color: #0b1030; }
html[data-theme="light"] .form-block h2 { color: #0b1030; }
html[data-theme="light"] .form-block .intro { color: #525a78; }
html[data-theme="light"] .form-row, html[data-theme="light"] .form-row .check { color: #525a78; }
html[data-theme="light"] .form-row .link-button { color: #2563eb; }
html[data-theme="light"] .terms { color: #7a8298; }
html[data-theme="light"] .terms a { color: #2563eb; }

/* Field input wrapper */
html[data-theme="light"] .field {
  background: #f4f6fb !important;
  border-color: rgba(20, 25, 60, 0.10) !important;
}
html[data-theme="light"] .field input, html[data-theme="light"] .field select, html[data-theme="light"] .field .field-icon, html[data-theme="light"] .field .field-right { color: #0b1030 !important; }
html[data-theme="light"] .field input::placeholder { color: #7a8298 !important; }

/* Tabs */
html[data-theme="light"] .auth-tabs { background: #f4f6fb !important; border-color: rgba(20,25,60,0.10) !important; }
html[data-theme="light"] .auth-tab { color: #525a78 !important; }
html[data-theme="light"] .auth-tab.is-active { color: #ffffff !important; }

/* Role chips */
html[data-theme="light"] .role-chip {
  background: #ffffff;
  border: 1px solid rgba(20, 25, 60, 0.10);
  color: #0b1030;
}
html[data-theme="light"] .role-chip.is-active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

/* Hero panel left — keep dark (over truck image), but eyebrow text needs to remain light */
html[data-theme="light"] .hero-panel .hero-copy h1, html[data-theme="light"] .hero-panel .hero-copy p, html[data-theme="light"] .hero-panel .brand, html[data-theme="light"] .hero-panel .brand-word, html[data-theme="light"] .hero-panel .hero-footer, html[data-theme="light"] .hero-panel .benefit h3, html[data-theme="light"] .hero-panel .benefit p { color: #f8fbff; }
html[data-theme="light"] .hero-panel .eyebrow {
  background: rgba(37, 99, 235, 0.22);
  border-color: rgba(96, 165, 250, 0.45);
  color: #bfdbfe;
}

/* Trust row (still on dark hero) */
html[data-theme="light"] .hero-panel .trust h3 { color: #f8fbff; }
html[data-theme="light"] .hero-panel .trust p { color: #aebbd0; }

/* Stat strip on dark hero */
html[data-theme="light"] .hero-panel .stat strong { color: #3b82f6; }
html[data-theme="light"] .hero-panel .stat span { color: #b5c2d6; }

/* Social divider line text */
html[data-theme="light"] .social-divider { color: #7a8298; }
html[data-theme="light"] .social-divider::before, html[data-theme="light"] .social-divider::after { background: rgba(20, 25, 60, 0.12); }

/* Lang toggle */
html[data-theme="light"] .lang-toggle { background: rgba(20, 25, 60, 0.05); border-color: rgba(20, 25, 60, 0.10); }
html[data-theme="light"] .lang-toggle button { color: #525a78; }
html[data-theme="light"] .lang-toggle button.is-active { color: #ffffff; background: #2563eb; }

/* Icon toggle button */
html[data-theme="light"] .icon-button { color: #0b1030; border: 1px solid rgba(20, 25, 60, 0.10); background: rgba(20, 25, 60, 0.04); }

/* Primary submit button stays blue */
html[data-theme="light"] .primary-button { color: white; }

/* Card border colors for "kiirviited" cards on landing in light */
html[data-theme="light"] .quick-link:hover { background: rgba(20, 25, 60, 0.04) !important; }

/* ============================================================
   VEOHALDUS.EE Auth — Light theme repair
   Keeps the exact same component structure, but makes it usable,
   high-contrast and premium in light mode.
   ============================================================ */
html[data-theme="light"] .auth-page {
  --bg: #f4f7fb;
  --panel: rgba(255,255,255,0.84);
  --panel-strong: rgba(255,255,255,0.96);
  --panel-soft: rgba(20, 25, 60, 0.035);
  --line: rgba(20,25,60,0.10);
  --line-strong: rgba(37,99,235,0.20);
  --text: #071027;
  --muted: #5b647a;
  --muted-2: #7b8496;
  --shadow: 0 30px 100px rgba(20,25,60,0.12);
  color: var(--text);
  background: #f4f7fb;
}
html[data-theme="light"] .auth-page::before {
  background:
    radial-gradient(circle at 18% 18%, rgba(37, 99, 235, 0.11), transparent 32%),
    radial-gradient(circle at 82% 8%, rgba(124, 58, 237, 0.08), transparent 34%),
    radial-gradient(circle at 70% 90%, rgba(14, 165, 233, 0.08), transparent 30%);
}
html[data-theme="light"] .auth-page::after {
  background-image:
    linear-gradient(rgba(15,23,42,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,0.055) 1px, transparent 1px);
  opacity: 0.42;
}
html[data-theme="light"] .auth-page .shell {
  background: linear-gradient(145deg, rgba(255,255,255,0.97), rgba(244,247,251,0.88));
  border-color: rgba(20,25,60,0.10);
  box-shadow: 0 28px 90px rgba(20,25,60,0.12);
}
html[data-theme="light"] .auth-page .hero-panel {
  border-right-color: rgba(37,99,235,0.14);
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0) 60%, rgba(244,247,251,0.55) 100%),
    url('assets/hero-truck-light.png');
  background-position: 60% 50%;
}
html[data-theme="light"] .auth-page .hero-panel::before {
  background:
    radial-gradient(circle at 78% 42%, rgba(37,99,235,0.08), transparent 40%),
    linear-gradient(180deg, transparent 75%, rgba(244,247,251,0.6) 100%);
}
html[data-theme="light"] .auth-page .brand,
html[data-theme="light"] .auth-page .form-block h2,
html[data-theme="light"] .auth-page .forgot-shell h2,
html[data-theme="light"] .auth-page .benefit h3,
html[data-theme="light"] .auth-page .trust h3,
html[data-theme="light"] .auth-page .hero-copy h1 {
  color: #071027;
}
html[data-theme="light"] .auth-page .hero-copy p,
html[data-theme="light"] .auth-page .form-block .intro,
html[data-theme="light"] .auth-page .forgot-shell .intro,
html[data-theme="light"] .auth-page .benefit p,
html[data-theme="light"] .auth-page .trust p,
html[data-theme="light"] .auth-page .terms,
html[data-theme="light"] .auth-page .form-row {
  color: #5b647a;
}
html[data-theme="light"] .auth-page .eyebrow {
  color: #1d4ed8;
  background: rgba(37,99,235,0.08);
  border-color: rgba(37,99,235,0.18);
}
html[data-theme="light"] .auth-page .stat-strip,
html[data-theme="light"] .auth-page .auth-card,
html[data-theme="light"] .auth-page .trust-grid,
html[data-theme="light"] .auth-page .auth-tabs,
html[data-theme="light"] .auth-page .field,
html[data-theme="light"] .auth-page .social,
html[data-theme="light"] .auth-page .role-chip,
html[data-theme="light"] .auth-page .lang-toggle,
html[data-theme="light"] .auth-page .icon-button {
  background: rgba(255,255,255,0.82);
  border-color: rgba(20,25,60,0.10);
  box-shadow: 0 12px 34px rgba(20,25,60,0.06);
}
html[data-theme="light"] .auth-page .auth-card {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(37,99,235,0.06), transparent 52%),
    radial-gradient(ellipse at 80% 100%, rgba(124,58,237,0.06), transparent 52%),
    rgba(255,255,255,0.84);
}
html[data-theme="light"] .auth-page[data-mode="login"] .auth-card {
  box-shadow: 0 24px 90px rgba(20,25,60,0.10), 0 0 46px rgba(37,99,235,0.08);
  border-color: rgba(37,99,235,0.16);
}
html[data-theme="light"] .auth-page[data-mode="register"] .auth-card {
  box-shadow: 0 24px 90px rgba(20,25,60,0.10), 0 0 46px rgba(124,58,237,0.10);
  border-color: rgba(124,58,237,0.16);
}
html[data-theme="light"] .auth-page .auth-tab { color: #5b647a; }
html[data-theme="light"] .auth-page .auth-tab:not(.is-active):hover { color: #071027; }
html[data-theme="light"] .auth-page .auth-tab.is-active { color: #fff !important; }
html[data-theme="light"] .auth-page .field:focus-within {
  background: #ffffff;
  border-color: rgba(37,99,235,0.42);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.10);
}
html[data-theme="light"] .auth-page .field-icon {
  border-right-color: rgba(20,25,60,0.09);
  background: rgba(124,58,237,0.075);
  color: #7c3aed;
}
html[data-theme="light"] .auth-page .field input,
html[data-theme="light"] .auth-page .field select,
html[data-theme="light"] .auth-page .social,
html[data-theme="light"] .auth-page .role-chip,
html[data-theme="light"] .auth-page .check,
html[data-theme="light"] .auth-page .reveal-pass {
  color: #071027;
}
html[data-theme="light"] .auth-page .field input::placeholder { color: #8a93a5; }
html[data-theme="light"] .auth-page .field option { background: #fff; color: #071027; }
html[data-theme="light"] .auth-page .role-chip.is-active,
html[data-theme="light"] .auth-page .role-chip:hover {
  background: rgba(124,58,237,0.10);
  border-color: rgba(124,58,237,0.26);
  color: #4c1d95;
}
html[data-theme="light"] .auth-page .link-button,
html[data-theme="light"] .auth-page .terms a { color: #7c3aed; }
html[data-theme="light"] .auth-page .link-button:hover,
html[data-theme="light"] .auth-page .back-button:hover { color: #4c1d95; }
html[data-theme="light"] .auth-page .back-button { color: #2563eb; }
html[data-theme="light"] .auth-page .hero-footer,
html[data-theme="light"] .auth-page .stat span,
html[data-theme="light"] .auth-page .social-divider { color: #667085; }
html[data-theme="light"] .auth-page .toast {
  background: rgba(240,253,244,0.96);
  color: #14532d;
  border-color: rgba(34,197,94,0.20);
  box-shadow: 0 18px 54px rgba(20,25,60,0.14);
}
html[data-theme="light"] .auth-page .toast span { color: #166534; }
