
/* ── Auth design tokens ── */
.auth-page {
  --auth-hero-bg: #071220;
  --auth-hero-accent: #3b82f6;
  --auth-hero-glow: rgba(59, 130, 246, 0.45);
  --auth-panel-bg: #e8eef6;
  --auth-card-bg: rgba(255, 255, 255, 0.88);
  --auth-card-border: rgba(255, 255, 255, 0.72);
  --auth-card-shadow: 0 4px 6px rgba(15, 23, 42, 0.04), 0 24px 48px rgba(15, 23, 42, 0.12);
  --auth-input-bg: rgba(248, 250, 252, 0.9);
  --auth-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-page--sage {
  --auth-hero-bg: #062412;
  --auth-hero-accent: #00a651;
  --auth-hero-glow: rgba(0, 166, 81, 0.42);
}

.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: var(--font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  color: var(--color-text, #1a2535);
  background: var(--auth-hero-bg);
  -webkit-font-smoothing: antialiased;
}

.auth-page--split {
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
}

.auth-shell {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
}

.auth-hero {
  display: none;
  flex: 1 1 52%;
  position: relative;
  padding: clamp(40px, 6vw, 72px);
  color: #e8f0fa;
  background:
    radial-gradient(ellipse 120% 80% at 0% 0%, rgba(37, 99, 235, 0.22) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 100% 100%, rgba(16, 185, 129, 0.12) 0%, transparent 45%),
    linear-gradient(165deg, #050d18 0%, #0c1a30 42%, #0a1628 100%);
  overflow: hidden;
  isolation: isolate;
}

.auth-hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 30%,
    rgba(255, 255, 255, 0.06) 70%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 2;
}

.auth-page--split .auth-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.auth-hero__mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(31, 95, 178, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 75%, rgba(26, 122, 74, 0.22) 0%, transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.04) 0%, transparent 40%);
  pointer-events: none;
}

.auth-hero__grid {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, black 15%, transparent 92%);
  pointer-events: none;
}

.auth-hero__orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.auth-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.55;
  animation: auth-orb-float 16s ease-in-out infinite;
}
.auth-hero__orb--1 {
  width: 320px;
  height: 320px;
  left: -80px;
  top: 8%;
  background: radial-gradient(circle, rgba(31, 95, 178, 0.55) 0%, transparent 70%);
  animation-duration: 18s;
}
.auth-hero__orb--2 {
  width: 260px;
  height: 260px;
  right: -60px;
  bottom: 6%;
  background: radial-gradient(circle, rgba(26, 122, 74, 0.4) 0%, transparent 70%);
  animation-duration: 22s;
  animation-delay: -6s;
}
.auth-hero__orb--3 {
  width: 200px;
  height: 200px;
  left: 42%;
  bottom: -60px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.35) 0%, transparent 70%);
  animation-duration: 20s;
  animation-delay: -3s;
}
@keyframes auth-orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(24px, -20px) scale(1.08); }
}

.auth-feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.auth-feature {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.04) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(241, 245, 249, 0.95);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: background 0.22s var(--auth-ease), transform 0.22s var(--auth-ease),
              border-color 0.22s ease, box-shadow 0.22s ease;
  animation: auth-feature-in 0.55s var(--auth-ease) both;
}
@keyframes auth-feature-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.auth-feature:nth-child(1) { animation-delay: 0.05s; }
.auth-feature:nth-child(2) { animation-delay: 0.14s; }
.auth-feature:nth-child(3) { animation-delay: 0.23s; }
.auth-feature:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.08) 100%);
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.auth-feature__icon {
  flex-shrink: 0;
  color: #5eead4;
  filter: drop-shadow(0 0 6px rgba(94, 234, 212, 0.35));
}

.auth-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  margin-inline: auto;
  text-align: center;
  animation: auth-fade-in 0.55s ease both;
}

.auth-hero__logo-wrap {
  position: relative;
  width: 176px;
  height: 176px;
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: auth-logo-in 0.75s var(--auth-ease) both;
}
.auth-hero__logo-wrap::before {
  content: '';
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05) 58%, transparent 72%);
  box-shadow: 0 0 36px rgba(59, 130, 246, 0.28);
  pointer-events: none;
}
.auth-hero__logo-glow {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.42) 0%, rgba(251, 191, 36, 0.14) 38%, transparent 68%);
  filter: blur(8px);
  animation: auth-glow-breathe 5s ease-in-out infinite;
}
.auth-hero__logo-ring,
.auth-hero__logo-ring--delay {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(147, 197, 253, 0.28);
  animation: auth-ring-pulse 3.6s ease-out infinite;
  pointer-events: none;
}
.auth-hero__logo-ring--delay {
  animation-delay: 1.2s;
}
.auth-hero__logo {
  position: relative;
  z-index: 1;
  width: 156px;
  height: 156px;
  object-fit: contain;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.35));
  animation: auth-logo-float 6s ease-in-out 0.8s infinite;
}
.auth-hero__logo-monogram {
  position: relative;
  z-index: 1;
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
}
.auth-hero__product {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(147, 197, 253, 0.92);
  animation: auth-fade-in 0.6s ease 0.12s both;
}
@keyframes auth-ring-pulse {
  0%   { transform: scale(0.92); opacity: 0.55; }
  70%  { transform: scale(1.18); opacity: 0; }
  100% { transform: scale(1.18); opacity: 0; }
}

.auth-hero__brand {
  margin-bottom: var(--space-4, 24px);
}

.auth-brand--hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.auth-brand--hero .auth-brand__plate {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 132px;
  min-height: 84px;
  padding: 18px 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 12px 40px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.auth-brand--hero.auth-brand--wide .auth-brand__plate {
  min-width: 220px;
  max-width: min(320px, 72vw);
  padding: 20px 32px;
}

.auth-brand--hero.auth-brand--tall .auth-brand__plate {
  min-width: 100px;
  padding: 20px 22px;
}

.auth-brand--hero .auth-brand__plate::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0%, transparent 48%);
  pointer-events: none;
}

.auth-brand--hero .auth-brand__plate--monogram {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(232, 242, 255, 0.95) 100%);
}

.auth-brand--hero .auth-brand__img {
  position: relative;
  z-index: 1;
  max-height: 76px;
  max-width: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.auth-brand--hero.auth-brand--wide .auth-brand__img {
  max-height: 68px;
  max-width: min(280px, 62vw);
}

.auth-brand--hero.auth-brand--tall .auth-brand__img {
  max-height: 88px;
  max-width: 120px;
}

.auth-brand--hero .auth-brand__monogram {
  position: relative;
  z-index: 1;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(135deg, #1f5fb2 0%, #2563c4 45%, #17467f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-brand--hero .auth-brand__caption {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(232, 240, 250, 0.72);
}

.auth-hero__emblem {
  position: absolute;
  top: 6%;
  right: -4%;
  width: min(360px, 50vw);
  height: min(280px, 38vh);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
  opacity: 0.13;
  filter: blur(0.5px);
}

.auth-hero__emblem--wide {
  top: 4%;
  right: -6%;
  width: min(440px, 58vw);
  height: min(200px, 28vh);
  opacity: 0.11;
}

.auth-hero__emblem--tall {
  width: min(260px, 40vw);
  height: min(320px, 42vh);
}

.auth-hero__emblem-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.auth-hero__emblem-monogram {
  font-size: clamp(6rem, 18vw, 11rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1;
}

.auth-hero__brand .auth-brand__img {
  max-height: 64px;
  max-width: 220px;
}

.auth-hero__brand .auth-brand__text {
  color: #fff;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.auth-hero__headline {
  margin: 0 0 var(--space-3, 16px);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.035em;
  background: linear-gradient(135deg, #ffffff 0%, #c7ddf7 55%, #93c5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-hero__text {
  margin: 0 0 var(--space-5, 32px);
  font-size: 1.02rem;
  line-height: 1.65;
  color: rgba(203, 213, 225, 0.88);
  max-width: 38ch;
}

.auth-hero__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-hero__list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  color: rgba(232, 240, 250, 0.92);
  line-height: 1.45;
}

.auth-hero__list-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(31, 95, 178, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  color: transparent;
  margin-top: 2px;
  position: relative;
}
.auth-hero__list-icon::after {
  border-color: #fff;
  margin-top: -1px;
}

.auth-panel {
  flex: 1 1 48%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vw, 56px);
  background:
    radial-gradient(ellipse 90% 70% at 100% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 0% 100%, rgba(31, 95, 178, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #eef2f8 0%, var(--auth-panel-bg) 45%, #e2e9f2 100%);
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.auth-page--split .auth-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(31, 95, 178, 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.auth-panel__watermark {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}
.auth-panel__watermark-img {
  max-width: min(400px, 76vw);
  max-height: min(240px, 36vh);
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.12;
  filter: blur(4px) saturate(1.12);
  transform: scale(1.02);
  animation: auth-watermark-float 18s ease-in-out infinite;
}

.auth-panel__watermark--wide .auth-panel__watermark-img {
  max-width: min(520px, 90vw);
  max-height: min(150px, 22vh);
  opacity: 0.1;
}

.auth-panel__watermark--tall .auth-panel__watermark-img {
  max-width: min(280px, 55vw);
  max-height: min(300px, 40vh);
}

.auth-panel__watermark--has-logo .auth-panel__watermark-glow {
  width: min(520px, 88vw);
  height: min(200px, 32vh);
  border-radius: 40%;
}

.auth-panel__watermark-monogram {
  font-size: clamp(7rem, 22vw, 12rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  color: rgba(31, 95, 178, 0.09);
  user-select: none;
  animation: auth-watermark-float 18s ease-in-out infinite;
}
.auth-panel__watermark-glow {
  position: absolute;
  width: min(420px, 80vw);
  height: min(320px, 50vh);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(31, 95, 178, 0.14) 0%, transparent 68%);
  filter: blur(24px);
}
.auth-panel__watermark-name {
  position: absolute;
  bottom: 12%;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(31, 95, 178, 0.06);
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
}
@keyframes auth-watermark-float {
  0%, 100% { transform: scale(1.05) translateY(0); }
  50% { transform: scale(1.08) translateY(-6px); }
}

.auth-page:not(.auth-page--split) .auth-panel {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  padding: var(--space-4, 24px);
  background: linear-gradient(145deg, #0f2744 0%, #1a3d6b 45%, #0d2138 100%);
}

.auth-page:not(.auth-page--split) .auth-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(31, 95, 178, 0.28) 0%, transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(28, 138, 85, 0.14) 0%, transparent 40%);
  pointer-events: none;
}

.auth-layout {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  animation: auth-slide-up 0.55s var(--auth-ease) both;
}

.auth-page--split:has(.auth-brand-lockup--wide) .auth-layout {
  max-width: 440px;
}

.auth-card {
  position: relative;
  background: var(--auth-card-bg);
  padding: 38px 38px 30px;
  border-radius: 22px;
  box-shadow: var(--auth-card-shadow);
  border: 1px solid var(--auth-card-border);
  width: 100%;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  transition: box-shadow 0.35s var(--auth-ease), transform 0.35s var(--auth-ease);
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1f5fb2, #3b82f6, #22c55e, #3b82f6, #1f5fb2);
  background-size: 200% 100%;
  animation: auth-accent-shift 8s linear infinite;
}

.auth-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0.2) 40%,
    rgba(31, 95, 178, 0.15) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@keyframes auth-accent-shift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.auth-card:focus-within {
  box-shadow:
    0 8px 16px rgba(31, 95, 178, 0.08),
    0 28px 56px rgba(15, 23, 42, 0.14),
    0 0 0 1px rgba(31, 95, 178, 0.14);
  transform: translateY(-2px);
}

.auth-page:not(.auth-page--split) .auth-card {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.auth-card__brand {
  margin-bottom: var(--space-2, 12px);
  text-align: center;
  position: relative;
  z-index: 1;
}

.auth-brand-lockup {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 4px 0 2px;
}

.auth-brand-lockup__halo {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 108px;
  height: 108px;
  border-radius: 28px;
  background: radial-gradient(circle, rgba(31, 95, 178, 0.22) 0%, rgba(31, 95, 178, 0) 68%);
  filter: blur(10px);
  pointer-events: none;
}

.auth-brand-lockup__frame {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  padding: 12px;
  border-radius: 20px;
  background: linear-gradient(165deg, #ffffff 0%, #f1f5f9 100%);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 12px 32px rgba(31, 95, 178, 0.16),
    0 4px 10px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  transition: transform 0.35s var(--auth-ease), box-shadow 0.35s var(--auth-ease);
}
.auth-card:hover .auth-brand-lockup__frame {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 16px 40px rgba(31, 95, 178, 0.2),
    0 6px 14px rgba(15, 23, 42, 0.08);
}

.auth-brand-lockup--has-logo .auth-brand-lockup__frame {
  width: auto;
  height: auto;
  min-height: 72px;
  padding: 14px 18px;
}

.auth-brand-lockup--has-logo.auth-brand-lockup--wide .auth-brand-lockup__frame {
  min-width: min(268px, 82vw);
  max-width: min(300px, 88vw);
  padding: 16px 22px;
  border-radius: 18px;
}

.auth-brand-lockup--has-logo.auth-brand-lockup--balanced .auth-brand-lockup__frame {
  min-width: 140px;
  max-width: 220px;
  padding: 14px 20px;
}

.auth-brand-lockup--has-logo.auth-brand-lockup--tall .auth-brand-lockup__frame {
  width: 96px;
  height: auto;
  min-height: 96px;
  padding: 14px 16px;
}

.auth-brand-lockup--has-logo .auth-brand-lockup__halo {
  width: 120px;
  height: 120px;
  border-radius: 28px;
}

.auth-brand-lockup--has-logo.auth-brand-lockup--wide .auth-brand-lockup__halo {
  width: min(280px, 84vw);
  height: 96px;
  border-radius: 22px;
  top: 10px;
}

.auth-brand-lockup__img {
  max-width: 100%;
  max-height: 64px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.auth-brand-lockup--has-logo.auth-brand-lockup--wide .auth-brand-lockup__img {
  max-height: 56px;
  max-width: min(256px, 76vw);
}

.auth-brand-lockup--has-logo.auth-brand-lockup--balanced .auth-brand-lockup__img {
  max-height: 60px;
  max-width: 200px;
}

.auth-brand-lockup--has-logo.auth-brand-lockup--tall .auth-brand-lockup__img {
  max-height: 80px;
  max-width: 72px;
}

/* Product/system logo: transparent spherical PNG */
.auth-brand-lockup--system {
  gap: 6px;
  padding: 2px 0 8px;
}
.auth-brand-lockup--system .auth-brand-lockup__frame {
  width: 108px;
  height: 108px;
  min-width: 108px;
  max-width: 108px;
  min-height: 108px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  animation: auth-logo-in 0.7s var(--auth-ease) both;
}
.auth-brand-lockup--system .auth-brand-lockup__frame::after {
  display: none;
}
.auth-brand-lockup--system .auth-brand-lockup__halo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -62%);
  background: radial-gradient(circle, rgba(59, 130, 246, 0.38) 0%, rgba(251, 191, 36, 0.12) 42%, transparent 70%);
  animation: auth-glow-breathe 4.5s ease-in-out infinite;
}
.auth-brand-lockup--system .auth-brand-lockup__img {
  width: 108px;
  height: 108px;
  max-width: 108px;
  max-height: 108px;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.22));
  animation: auth-logo-float 5.5s ease-in-out 0.7s infinite;
}
.auth-card:hover .auth-brand-lockup--system .auth-brand-lockup__frame {
  transform: none;
  box-shadow: none;
}
.auth-brand-lockup--system .auth-brand-lockup__name {
  margin-top: 2px;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}
.auth-brand-lockup__tag {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #64748b;
}
.auth-page:not(.auth-page--split) .auth-brand-lockup__name {
  color: #f8fafc;
}
.auth-page:not(.auth-page--split) .auth-brand-lockup__tag {
  color: rgba(226, 232, 240, 0.72);
}

@keyframes auth-logo-in {
  from { opacity: 0; transform: scale(0.82); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes auth-logo-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
@keyframes auth-glow-breathe {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}
@keyframes auth-glow-breathe {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.06); }
}

.auth-brand-lockup--has-logo {
  padding: 10px 0 6px;
  margin-bottom: 4px;
}

.auth-brand-lockup--has-logo.auth-brand-lockup--wide .auth-brand-lockup__frame {
  min-width: min(280px, 86vw);
  max-width: min(300px, 92vw);
  padding: 18px 24px;
  border-radius: 16px;
}

.auth-brand-lockup--has-logo.auth-brand-lockup--wide .auth-brand-lockup__img {
  max-height: 64px;
  max-width: min(270px, 80vw);
}

.auth-page--split .auth-brand-lockup--has-logo + .auth-card__eyebrow {
  margin-top: 6px;
}

.auth-brand-lockup__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(31, 95, 178, 0.35), rgba(255, 255, 255, 0.1) 42%, rgba(26, 122, 74, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.auth-brand-lockup__monogram {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(135deg, #1f5fb2 0%, #2d6fd4 50%, #17467f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-brand-lockup__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text, #14253c);
  line-height: 1.25;
  max-width: 280px;
}

.auth-brand-lockup__rule {
  margin: 2px 0 0;
  width: 48px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(31, 95, 178, 0.55), transparent);
}

.auth-page--split .auth-card__brand {
  margin-bottom: 6px;
}

.auth-page--split .auth-card__brand .auth-brand__img {
  display: none;
}

.auth-page--split .auth-card__eyebrow {
  margin-top: 6px;
}

.auth-page--split .auth-brand-lockup--has-logo + .auth-card__eyebrow {
  margin-top: 2px;
}

.auth-brand__img {
  max-height: 72px;
  max-width: 240px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.auth-brand__text {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary, #1f5fb2);
  letter-spacing: -0.02em;
  text-align: center;
}

.auth-card__eyebrow {
  margin: 0 0 6px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-primary, #1f5fb2);
  opacity: 0.9;
}

.auth-card__title {
  margin: 0 0 10px;
  font-size: 1.72rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.auth-page:not(.auth-page--split) .auth-card__title,
.auth-page:not(.auth-page--split) .auth-card__subtitle {
  text-align: center;
}

.auth-card__subtitle {
  margin: 0 0 var(--space-4, 24px);
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.55;
}

/* Multi-tenant sign-in: shown when the link carries ?c=<company code>, so the
   user can see which organisation they are about to sign in to. */
.auth-card__company {
  margin: 0 0 18px;
  padding: 9px 14px;
  border-radius: 8px;
  background: #eef4fd;
  border: 1px solid #cfe0f7;
  color: #34495f;
  font-size: 0.88rem;
  text-align: center;
}

.auth-card__company strong {
  display: block;
  margin-top: 2px;
  color: #16273f;
  font-size: 0.98rem;
}

.auth-card .form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: ui-fade-in-fast 0.4s ease both;
}
.auth-field:nth-of-type(1) { animation-delay: 0.06s; }
.auth-field:nth-of-type(2) { animation-delay: 0.12s; }

.auth-field .form__label {
  display: block;
  font-weight: 600;
  font-size: 0.84rem;
  color: var(--color-text-secondary, #334155);
}

.auth-field__wrap {
  position: relative;
  transition: transform 0.2s var(--auth-ease);
}
.auth-field__wrap:focus-within {
  transform: translateY(-1px);
}
.auth-field__wrap:focus-within .auth-field__icon {
  color: var(--color-primary, #1f5fb2);
}

.auth-field__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
  line-height: 0;
  transition: color 0.2s ease;
}

.auth-field__icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.auth-card .form__input {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.95rem;
  border-radius: 12px;
  border: 1.5px solid #d1dae6;
  background: var(--auth-input-bg);
  color: var(--color-text, #1a2535);
  transition: border-color 0.2s ease, box-shadow 0.2s var(--auth-ease),
              background 0.2s ease, transform 0.2s var(--auth-ease);
}

.auth-field__wrap .form__input {
  padding-left: 42px;
}

.auth-field__wrap--password .form__input {
  padding-right: 44px;
}

.auth-field__toggle {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: var(--btn-radius, 999px);
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.14s ease, background 0.14s ease;
}

.auth-field__toggle:hover {
  color: var(--color-primary, #1f5fb2);
  background: rgba(31, 95, 178, 0.08);
}

.auth-field__toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(31, 95, 178, 0.35);
}

.auth-field__toggle.is-visible {
  color: var(--color-primary, #1f5fb2);
}

.auth-field__toggle svg {
  display: block;
  width: 18px;
  height: 18px;
}

.auth-card .form__input::placeholder {
  color: #94a3b8;
}

.auth-card .form__input:hover {
  border-color: #a8b4c4;
  background: #fff;
}

.auth-card .form__input:focus {
  border-color: var(--color-primary, #1f5fb2);
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 4px rgba(31, 95, 178, 0.14), 0 4px 12px rgba(31, 95, 178, 0.08);
}

.auth-card .btn--primary {
  position: relative;
  margin-top: 6px;
  width: 100%;
  padding: 13px 20px;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: var(--btn-radius, 999px);
  background: linear-gradient(135deg, #1a56b8 0%, #2563eb 45%, #1d4ed8 100%);
  border: none;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(29, 78, 216, 0.2), 0 8px 24px rgba(31, 95, 178, 0.32);
  transition: transform 0.2s var(--auth-ease), box-shadow 0.2s var(--auth-ease), filter 0.2s ease;
  overflow: hidden;
}

.auth-card .btn--primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform 0.55s var(--auth-ease);
}

.auth-card .btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(29, 78, 216, 0.25), 0 14px 32px rgba(31, 95, 178, 0.38);
  filter: brightness(1.05);
}
.auth-card .btn--primary:hover::before {
  transform: translateX(120%);
}

.auth-card .btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(31, 95, 178, 0.25);
}

.auth-page--sage .auth-card .btn--primary {
  background: linear-gradient(135deg, #067a32 0%, #00a651 45%, #008c3a 100%);
  box-shadow: 0 2px 4px rgba(0, 140, 58, 0.2), 0 8px 24px rgba(0, 140, 58, 0.28);
}
.auth-page--sage .auth-card .btn--primary:hover {
  box-shadow: 0 4px 8px rgba(0, 140, 58, 0.25), 0 14px 32px rgba(0, 140, 58, 0.36);
}

.auth-card .btn--primary.is-loading {
  color: transparent;
  pointer-events: none;
}
.auth-card .btn--primary.is-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.auth-otp-input {
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.5em;
  padding-left: 14px !important;
}
.auth-field__wrap .auth-otp-input { padding-left: 42px !important; }

#resendOtpBtn:disabled {
  color: var(--color-muted, #94a3b8);
  cursor: not-allowed;
  opacity: 0.8;
}
#resendOtpBtn:disabled:hover { text-decoration: none; }

.auth-card__links {
  margin-top: var(--space-4, 24px);
  padding-top: var(--space-3, 16px);
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  text-align: center;
  font-size: 0.88rem;
}

.auth-card__links a,
.auth-card__links .link-btn {
  color: var(--color-primary, #1f5fb2);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.auth-card__links a:hover,
.auth-card__links .link-btn:hover:not(:disabled) {
  color: #17467f;
  text-decoration: underline;
}

.auth-footer {
  margin-top: var(--space-4, 24px);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #94a3b8;
  text-align: center;
  opacity: 0.85;
}

.auth-page:not(.auth-page--split) .auth-footer {
  color: rgba(255, 255, 255, 0.5);
}

.auth-card .alert {
  margin-bottom: var(--space-3, 16px);
  border-radius: var(--radius-md, 10px);
  font-size: 0.88rem;
  line-height: 1.45;
}

.auth-card .alert--error {
  background: linear-gradient(135deg, #fef2f2 0%, #fff5f5 100%);
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.06);
}

.auth-card .alert--info {
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
  border: 1px solid #bfdbfe;
  color: #1e40af;
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
}

.auth-card__success {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  padding: 11px 14px;
  border-radius: var(--radius-md, 10px);
  margin-bottom: var(--space-3, 16px);
  font-size: 0.88rem;
  line-height: 1.45;
}

.auth-card .form__input.is-valid {
  border-color: var(--color-success, #1a7a4a);
  box-shadow: 0 0 0 3px rgba(26, 122, 74, 0.12);
}
.auth-card .form__input.is-invalid {
  border-color: var(--color-danger, #c0372c);
  box-shadow: 0 0 0 3px rgba(192, 55, 44, 0.12);
  animation: shake 0.3s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-5px); }
  75%       { transform: translateX(5px); }
}

@keyframes auth-slide-up {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes auth-fade-in {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

.auth-hero__dots {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.auth-hero__dot {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  animation: float-dot linear infinite;
}
@keyframes float-dot {
  from { transform: translateY(0) rotate(0deg); opacity: 0.06; }
  50%  { opacity: 0.14; }
  to   { transform: translateY(-60px) rotate(180deg); opacity: 0.06; }
}

@media (max-width: 900px) {
  .auth-shell {
    flex-direction: column;
  }

  .auth-page--split .auth-hero {
    display: block;
    flex: none;
    padding: 32px 24px 28px;
    text-align: center;
  }

  .auth-hero__inner {
    max-width: 520px;
    margin: 0 auto;
  }

  .auth-hero__brand {
    margin-bottom: 14px;
    align-items: center;
  }

  .auth-brand--hero {
    align-items: center;
  }

  .auth-hero__brand .auth-brand__plate {
    margin: 0 auto;
  }

  .auth-hero__emblem {
    display: none;
  }

  .auth-hero__brand .auth-brand__img {
    max-height: 56px;
    margin: 0 auto;
  }

  .auth-brand--hero.auth-brand--wide .auth-brand__img {
    max-height: 52px;
    max-width: min(240px, 78vw);
  }

  .auth-brand-lockup--has-logo.auth-brand-lockup--wide .auth-brand-lockup__frame {
    min-width: min(240px, 90vw);
    max-width: 100%;
    padding: 14px 16px;
  }

  .auth-brand-lockup--has-logo.auth-brand-lockup--wide .auth-brand-lockup__img {
    max-height: 48px;
    max-width: min(220px, 82vw);
  }

  .auth-hero__headline {
    font-size: 1.3rem;
    margin-bottom: 10px;
  }

  .auth-hero__text {
    margin-bottom: 16px;
    font-size: 0.88rem;
    max-width: none;
  }

  .auth-feature-row {
    justify-content: center;
  }

  .auth-hero__list {
    display: none;
  }

  .auth-hero::after {
    display: none;
  }

  .auth-panel {
    flex: 1;
    padding: 28px 20px 36px;
    justify-content: flex-start;
  }

  .auth-page--split .auth-card__brand {
    display: block;
    margin-bottom: 10px;
  }

  .auth-card {
    padding: 28px 24px 24px;
  }
}

@media (max-width: 900px) {
  .auth-page--login .auth-hero {
    padding: max(14px, env(safe-area-inset-top)) 20px 16px;
    text-align: center;
  }
  .auth-page--login .auth-hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: none;
  }
  .auth-page--login .auth-hero__logo-wrap {
    width: 88px;
    height: 88px;
    margin: 0 auto 6px;
  }
  .auth-page--login .auth-hero__logo {
    width: 80px;
    height: 80px;
  }
  .auth-page--login .auth-hero__headline,
  .auth-page--login .auth-hero__text,
  .auth-page--login .auth-feature-row {
    display: none;
  }
  .auth-page--login .auth-hero__product {
    margin: 0;
    font-size: 0.72rem;
  }
  .auth-page--login .auth-card__brand {
    display: none;
  }
  .auth-page--login .auth-panel {
    padding: 20px 16px max(24px, env(safe-area-inset-bottom));
    justify-content: flex-start;
  }
  .auth-page--login .auth-layout {
    max-width: 440px;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 22px 16px 18px;
    border-radius: 16px;
  }

  .auth-card__title {
    font-size: 1.38rem;
  }

  .auth-card .form__input {
    font-size: 16px;
  }

  .auth-page:not(.auth-page--split) .auth-panel {
    padding: 16px;
  }

  .auth-page--login .auth-hero {
    padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  }
  .auth-page--login .auth-hero__logo-wrap {
    width: 76px;
    height: 76px;
  }
  .auth-page--login .auth-hero__logo {
    width: 70px;
    height: 70px;
  }
}

@media (max-width: 360px) {
  .auth-card {
    padding: 18px 14px 16px;
  }
  .auth-card__title {
    font-size: 1.28rem;
  }
  .auth-page--login .auth-hero__logo-wrap {
    width: 64px;
    height: 64px;
  }
  .auth-page--login .auth-hero__logo {
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
  .auth-page--login .auth-hero {
    display: none;
  }
  .auth-page--login .auth-card__brand {
    display: block;
    margin-bottom: 8px;
  }
  .auth-page--login .auth-brand-lockup--system .auth-brand-lockup__frame,
  .auth-page--login .auth-brand-lockup--system .auth-brand-lockup__img {
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
    max-width: 64px;
    max-height: 64px;
  }
  .auth-page--login .auth-panel {
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
    justify-content: center;
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-panel__watermark-img,
  .auth-panel__watermark-monogram {
    animation: none;
    transform: scale(1.05);
  }
  .auth-hero__orb,
  .auth-card::before,
  .auth-hero__logo-glow,
  .auth-hero__logo-ring,
  .auth-hero__logo-ring--delay,
  .auth-hero__logo,
  .auth-brand-lockup--system .auth-brand-lockup__frame,
  .auth-brand-lockup--system .auth-brand-lockup__img,
  .auth-brand-lockup--system .auth-brand-lockup__halo {
    animation: none;
  }
  .auth-field,
  .auth-feature,
  .auth-layout,
  .auth-hero__inner,
  .auth-hero__product,
  .auth-card:focus-within {
    animation: none;
    transform: none;
  }
  .auth-card .btn--primary::before {
    display: none;
  }
}

/* Login: lock the split layout to one viewport (100vh) with no page scroll. */
html:has(.auth-page--login) {
  height: 100%;
  overflow: hidden;
}

.auth-page--login {
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.auth-page--login.auth-page--split {
  overflow: hidden;
}

.auth-page--login .auth-shell {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.auth-page--login .auth-hero {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding: clamp(16px, 4vh, 48px) clamp(28px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.auth-page--login .auth-hero__inner {
  flex: 0 0 auto;
  align-self: center;
  width: 100%;
  max-width: 460px;
  min-height: 0;
  margin-block: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.auth-page--login .auth-hero__logo-wrap {
  width: clamp(88px, 16vh, 132px);
  height: clamp(88px, 16vh, 132px);
  margin: 0 0 clamp(8px, 1.5vh, 16px);
}

.auth-page--login .auth-hero__logo {
  width: clamp(80px, 14vh, 120px);
  height: clamp(80px, 14vh, 120px);
}

.auth-page--login .auth-hero__headline {
  font-size: clamp(1.4rem, 2.2vw + 1vh, 2.05rem);
  margin-bottom: clamp(8px, 1.2vh, 14px);
}

.auth-page--login .auth-hero__text {
  margin-bottom: clamp(12px, 2vh, 22px);
  font-size: clamp(0.9rem, 1.35vh, 1.02rem);
}

.auth-page--login .auth-panel {
  min-height: 0;
  align-items: center;
  justify-content: safe center;
  padding: clamp(8px, 2vh, 28px);
  overflow-x: hidden;
  overflow-y: auto;
}

.auth-page--login .auth-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 420px;
  margin: auto;
  max-height: none;
  overflow: visible;
}

.auth-page--login .auth-card {
  margin-inline: auto;
  width: 100%;
  text-align: center;
  overflow: visible;
  padding: clamp(14px, 2.2vh, 22px) clamp(18px, 2.5vw, 28px) clamp(12px, 2vh, 18px);
}

.auth-page--login .auth-card__brand {
  display: none;
}

.auth-page--login .auth-card__eyebrow,
.auth-page--login .auth-card__title,
.auth-page--login .auth-card__subtitle {
  text-align: center;
}

.auth-page--login .auth-card .form {
  text-align: left;
  gap: clamp(10px, 1.6vh, 16px);
}

.auth-page--login .auth-card:focus-within {
  transform: none;
}

.auth-page--login .auth-card__subtitle {
  margin-bottom: clamp(10px, 1.6vh, 16px);
  font-size: 0.86rem;
}

.auth-page--login .auth-card .form__input {
  min-height: 42px;
}

.auth-page--login .auth-card .btn--primary {
  min-height: 42px;
}

.auth-page--login .auth-card__title {
  font-size: clamp(1.38rem, 2.2vh, 1.6rem);
  margin-bottom: 6px;
}

.auth-page--login .auth-card__links {
  margin-top: clamp(10px, 1.5vh, 16px);
  padding-top: clamp(8px, 1.2vh, 12px);
}

.auth-page--login .auth-footer {
  margin-top: clamp(8px, 1.4vh, 14px);
}

.auth-field__hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--color-muted, #64748b);
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: clamp(8px, 1.2vh, 14px) 0;
  color: var(--color-muted, #94a3b8);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-or::before,
.auth-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border, #e2e8f0);
}

.auth-register-copy {
  margin: 0 0 8px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--color-text-secondary, #4c5a6d);
}

.auth-register-btn {
  width: 100%;
  padding: 11px 18px;
  font-weight: 700;
  border-radius: var(--btn-radius, 999px);
}

.auth-register-alt {
  margin: 8px 0 0;
  text-align: center;
  font-size: 0.78rem;
}

.auth-register-alt a {
  color: var(--color-primary, #1f5fb2);
  font-weight: 600;
  text-decoration: none;
}

.auth-register-alt a:hover {
  text-decoration: underline;
}

.auth-page--login .auth-or {
  margin: clamp(4px, 0.8vh, 8px) 0;
}

.auth-page--login .auth-register-copy {
  margin: 0 0 4px;
  font-size: 0.78rem;
}

.auth-page--login .auth-register-btn {
  padding: 8px 16px;
}

.auth-page--login .auth-register-alt,
.auth-page--login .auth-field__hint {
  display: none;
}

.auth-page--login .auth-card__links {
  margin-top: clamp(6px, 1.1vh, 12px);
}

.auth-page--login .auth-panel {
  align-items: center;
  justify-content: safe center;
  overflow-x: hidden;
  overflow-y: auto;
}

.auth-page.auth-page--login .auth-card .form__input,
.auth-page.auth-page--login .auth-card .btn--primary {
  min-height: 42px;
}

/* Supplier register modal — zoom/pop overlay, page stays 100vh */
body.auth-modal-open {
  overflow: hidden;
}

.auth-or,
.auth-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: clamp(8px, 1.2vh, 14px) 0;
  color: var(--color-muted, #94a3b8);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-modal__lede {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--color-muted, #64748b);
}

.auth-modal[hidden] {
  display: none !important;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}

.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 18, 32, 0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.auth-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(90vh, 760px);
  outline: none;
  transform: scale(0.92);
  opacity: 0;
  transition: transform 0.28s var(--auth-ease, cubic-bezier(0.22, 1, 0.36, 1)),
              opacity 0.22s ease;
}

.auth-modal.is-open .auth-modal__backdrop {
  opacity: 1;
}

.auth-modal.is-open .auth-modal__dialog {
  transform: scale(1);
  opacity: 1;
}

.auth-modal__card {
  background: var(--auth-card-bg, #fff);
  border: 1px solid var(--auth-card-border, rgba(255, 255, 255, 0.72));
  border-radius: 20px;
  box-shadow: var(--auth-card-shadow, 0 24px 48px rgba(15, 23, 42, 0.18));
  max-height: min(90vh, 760px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 22px 24px 22px;
}

.auth-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.auth-modal__title {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text, #0f172a);
}

.auth-modal__lede {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--color-muted, #64748b);
}

.auth-modal__close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: var(--color-btn-bg, #eaedf2);
  color: var(--color-text, #16202f);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.auth-modal__close:hover,
.auth-modal__close:focus-visible {
  background: var(--color-primary-light, #e8f0fb);
  color: var(--color-primary, #1f5fb2);
  outline: none;
}

.auth-modal__close:focus-visible {
  box-shadow: 0 0 0 3px rgba(31, 95, 178, 0.28);
}

.auth-modal__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-modal__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-modal .auth-field__wrap .form__input {
  padding-left: 14px;
}

.auth-textarea {
  min-height: 64px;
  resize: vertical;
}

.auth-cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.auth-cat {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--color-border, #dde3ec);
  border-radius: 10px;
  background: var(--auth-input-bg, #f8fafc);
  font-size: 0.82rem;
  cursor: pointer;
}

.auth-cat:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(31, 95, 178, 0.2);
}

.auth-modal__alert {
  background: var(--color-danger-soft, #fdecea);
  border: 1px solid var(--color-danger-border, #f5c6c0);
  color: var(--color-danger-text, #c0372c);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.86rem;
}

.auth-modal__success {
  background: var(--color-success-soft, #e8f7ee);
  color: var(--color-success-text, #1a7a4a);
  border: 1px solid var(--color-success-border, #b5e0c8);
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.auth-modal__success .btn {
  margin-top: 12px;
  width: 100%;
}

.auth-modal .form__label,
.auth-modal .form__label,
.auth-modal .form__label {
  display: block;
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.auth-modal .form__input,
.auth-modal .form__input,
.auth-modal .form__input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid #d1dae6;
  background: var(--auth-input-bg, #f8fafc);
}

.auth-modal .form__input:focus,
.auth-modal .form__input:focus {
  outline: none;
  border-color: var(--color-primary, #1f5fb2);
  box-shadow: 0 0 0 4px rgba(31, 95, 178, 0.14);
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: clamp(8px, 1.2vh, 14px) 0;
  color: var(--color-muted, #94a3b8);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-or::before,
.auth-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border, #e2e8f0);
}

.auth-register-copy { margin: 0 0 8px; text-align: center; font-size: 0.84rem; color: var(--color-text-secondary, #4c5a6d); }
.auth-register-btn { width: 100%; }
.auth-register-alt { margin: 8px 0 0; text-align: center; font-size: 0.78rem; }
.auth-modal__lede { margin: 0; font-size: 0.88rem; line-height: 1.5; color: var(--color-muted, #64748b); }
.auth-cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.auth-file {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 600;
}

.auth-or { display: flex; align-items: center; gap: 10px; margin: clamp(8px, 1.2vh, 14px) 0; color: var(--color-muted, #94a3b8); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.auth-or::before,
.auth-or::after { content: ''; flex: 1; height: 1px; background: var(--color-border, #e2e8f0); }
.auth-register-copy { margin: 0 0 8px; text-align: center; font-size: 0.84rem; color: var(--color-text-secondary, #4c5a6d); }
.auth-register-btn { width: 100%; padding: 11px 18px; font-weight: 700; border-radius: var(--btn-radius, 999px); }
.auth-register-alt { margin: 8px 0 0; text-align: center; font-size: 0.78rem; }
.auth-register-alt a { color: var(--color-primary, #1f5fb2); font-weight: 600; text-decoration: none; }
.auth-modal__lede { margin: 0; font-size: 0.88rem; line-height: 1.5; color: var(--color-muted, #64748b); }
.auth-cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

@media (max-width: 700px) {
  .auth-modal__grid,
  .auth-cat-grid,
  .auth-cat-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-modal__backdrop,
  .auth-modal__dialog {
    transition: opacity 0.2s ease;
  }
  .auth-modal__dialog,
  .auth-modal.is-open .auth-modal__dialog {
    transform: none;
  }
  .auth-hero__orb {
    animation: none;
  }
}

@media (max-width: 900px) {
  html:has(.auth-page--login) {
    height: auto;
    overflow: auto;
  }

  .auth-page--login,
  .auth-page--login.auth-page--split {
    height: auto;
    max-height: none;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .auth-page--login .auth-shell {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: none;
    overflow: visible;
  }

  .auth-page--login .auth-panel {
    overflow: visible;
  }
}

/* ==========================================================================
   Login / register visual refresh
   ========================================================================== */
html.auth-html,
html.auth-html[data-theme="dark"] {
  color-scheme: light;
}

.auth-page--login [hidden] {
  display: none !important;
}

.auth-page--login {
  --auth-ink: #07111f;
  --auth-navy: #0b1c33;
  --auth-panel: #eef2f7;
  --auth-card: #ffffff;
  --auth-line: #d5dee9;
  --auth-muted: #5b6b80;
}

.auth-page--login .auth-hero {
  flex: 1 1 46%;
  justify-content: center;
  align-items: center;
  padding: clamp(28px, 5vh, 56px) clamp(32px, 5vw, 64px) clamp(24px, 4vh, 40px);
  background:
    radial-gradient(ellipse 90% 70% at 0% 0%, rgba(37, 99, 235, 0.28) 0%, transparent 52%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(13, 148, 136, 0.16) 0%, transparent 48%),
    linear-gradient(165deg, #06101c 0%, #0b1c33 48%, #0a2438 100%);
}

.auth-page--login .auth-hero__inner {
  max-width: 440px;
  width: 100%;
  margin-inline: auto;
  margin-block: auto;
  align-self: center;
  align-items: center;
  text-align: center;
}

.auth-page--login .auth-hero__copy {
  width: 100%;
  text-align: center;
}

.auth-page--login .auth-hero__product,
.auth-page--login .auth-hero__headline {
  text-align: center;
}

.auth-page--login .auth-hero__logo-wrap {
  margin-inline: auto;
}

.auth-page--login .auth-hero__text {
  margin-inline: auto;
}

.auth-page--login .auth-hero__headline {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: #fff;
  font-size: clamp(1.7rem, 2.4vw + 0.6rem, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.auth-page--login .auth-hero__text {
  color: rgba(226, 232, 240, 0.88);
  max-width: 38ch;
  font-size: 1.02rem;
}

.auth-hero__foot {
  position: relative;
  z-index: 1;
  margin: 24px 0 0;
  color: rgba(148, 163, 184, 0.85);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-page--login .auth-hero__foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(16px, 3vh, 32px);
  margin: 0;
  text-align: center;
}

.auth-page--login .auth-panel {
  flex: 1 1 54%;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(31, 95, 178, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #f5f7fb 0%, #e8eef5 100%);
}

.auth-page--login .auth-stage {
  width: 100%;
  max-width: 440px;
  margin: auto;
}

.auth-page--login .auth-stage--register,
.auth-page--login #supplierRegisterModal.auth-stage {
  max-width: 560px;
}

.auth-page--login .auth-card {
  text-align: left;
  background: var(--auth-card, #fff);
  border: 1px solid var(--auth-line, #d5dee9);
  box-shadow:
    0 1px 1px rgba(15, 23, 42, 0.04),
    0 14px 32px rgba(15, 23, 42, 0.08),
    0 28px 56px rgba(15, 23, 42, 0.06);
  padding: 28px 28px 24px;
}

.auth-page--login .auth-card::before {
  display: none;
}

.auth-page--login .auth-card__eyebrow,
.auth-page--login .auth-card__title,
.auth-page--login .auth-card__subtitle {
  text-align: left;
}

.auth-page--login .auth-card__title {
  color: var(--auth-ink, #0f172a);
  font-size: 1.7rem;
}

.auth-page--login .auth-card__subtitle {
  color: var(--auth-muted, #526277);
  font-size: 0.92rem;
}

.auth-page--login .auth-card .form__label,
.auth-page--login .auth-card .form__label {
  color: #1e293b;
  font-weight: 650;
}

.auth-page--login .auth-card .form__input,
.auth-page--login .auth-card .form__input {
  min-height: 48px;
  border: 1.5px solid #c9d4e3;
  background: #fff;
  color: #0f172a;
}

.auth-page--login .auth-card .form__input:focus,
.auth-page--login .auth-card .form__input:focus {
  border-color: var(--color-primary, #1f5fb2);
  box-shadow: 0 0 0 4px rgba(31, 95, 178, 0.16);
}

.auth-page--login .auth-card .btn--primary {
  min-height: 48px;
  background: var(--color-primary, #1f5fb2);
  background-image: linear-gradient(180deg, #2563c4 0%, #1f5fb2 100%);
  color: #fff;
}

/* Sign-in card — compact product login */
.auth-page--login .auth-card--signin {
  padding: 28px 30px 0;
  border-radius: 20px;
  overflow: hidden;
}

.auth-page--login .auth-card--signin::before {
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #1f5fb2 0%, #3b82f6 52%, #22c55e 100%);
  animation: none;
  background-size: 100% 100%;
}

.auth-page--login .auth-card--signin .auth-card__head {
  margin: 4px 0 22px;
}

.auth-page--login .auth-card--signin .auth-card__eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--color-primary-light, #e8f0fb);
  color: var(--color-primary, #1f5fb2);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-page--login .auth-card--signin .auth-card__title {
  margin: 0 0 6px;
  font-size: clamp(1.7rem, 1.4rem + 1.1vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.12;
  color: var(--auth-ink, #07111f);
}

.auth-page--login .auth-card--signin .auth-card__subtitle {
  margin: 0;
  max-width: 34ch;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--auth-muted, #5b6b80);
}

.auth-page--login .auth-card--signin .auth-card__form {
  gap: 16px;
}

.auth-page--login .auth-card--signin .auth-field {
  gap: 7px;
}

.auth-page--login .auth-field__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.auth-page--login .auth-card__forgot {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary, #1f5fb2);
  text-decoration: none;
  white-space: nowrap;
}

.auth-page--login .auth-card__forgot:hover {
  text-decoration: underline;
}

.auth-page--login .auth-card--signin .auth-field__wrap,
.auth-page--login .auth-card--signin .auth-field__wrap {
  display: flex;
  align-items: center;
  width: 100%;
  background: #f3f6fb;
  border: 1.5px solid #e1e8f2;
  border-radius: 12px;
  transition: border-color 0.18s ease, box-shadow 0.18s var(--auth-ease), background 0.18s ease;
}

.auth-page--login .auth-card--signin .auth-field__wrap:hover,
.auth-page--login .auth-card--signin .auth-field__wrap:hover {
  background: #fff;
  border-color: #c5d3e6;
}

.auth-page--login .auth-card--signin .auth-field__wrap:focus-within,
.auth-page--login .auth-card--signin .auth-field__wrap:focus-within {
  background: #fff;
  border-color: var(--color-primary, #1f5fb2);
  box-shadow: 0 0 0 4px rgba(31, 95, 178, 0.14);
  transform: none;
}

.auth-page--login .auth-card--signin .auth-field__icon,
.auth-page--login .auth-card--signin .auth-field__icon {
  position: static;
  transform: none;
  flex-shrink: 0;
  margin: 0 0 0 14px;
  color: #7b8ba1;
}

.auth-page--login .auth-card--signin .auth-field__wrap .form__input,
.auth-page--login .auth-card--signin .auth-field__wrap .form__input {
  padding-left: 10px;
}

.auth-page--login .auth-card--signin .auth-field__wrap--password .form__input,
.auth-page--login .auth-card--signin .auth-field__wrap--password .form__input {
  padding-right: 8px;
}

.auth-page--login .auth-card--signin .auth-field__toggle,
.auth-page--login .auth-card--signin .auth-field__toggle {
  position: static;
  transform: none;
  flex-shrink: 0;
  margin-right: 4px;
}

.auth-page--login .auth-card--signin .auth-field__wrap:focus-within .auth-field__icon,
.auth-page--login .auth-card--signin .auth-field__wrap:focus-within .auth-field__icon {
  color: var(--color-primary, #1f5fb2);
}

.auth-page--login .auth-card--signin .form__input,
.auth-page--login .auth-card--signin .form__input {
  min-height: 48px;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 12px;
}

.auth-page--login .auth-card--signin .form__input:hover,
.auth-page--login .auth-card--signin .form__input:focus,
.auth-page--login .auth-card--signin .form__input:hover,
.auth-page--login .auth-card--signin .form__input:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.auth-page--login .auth-card--signin .auth-card__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
  min-height: 50px;
  border-radius: 12px;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}

.auth-page--login .auth-card--signin .auth-card__submit-icon {
  display: block;
  flex-shrink: 0;
}

.auth-page--login .auth-card--signin .btn--primary.is-loading .auth-card__submit-icon {
  opacity: 0;
}

.auth-page--login .auth-card__aside {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 22px -30px 0;
  padding: 15px 30px 16px;
  background: #f5f7fb;
  border-top: 1px solid #e7edf5;
  color: var(--auth-muted, #5b6b80);
  font-size: 0.86rem;
}

.auth-page--login .auth-card__text-action {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-primary, #1f5fb2);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.auth-page--login .auth-card__text-action:hover,
.auth-page--login .auth-card__aside a:hover {
  text-decoration: underline;
}

.auth-page--login .auth-card__aside a {
  color: var(--color-primary, #1f5fb2);
  font-weight: 750;
  text-decoration: none;
}

.auth-page--login .auth-card__inline-form {
  display: inline;
  margin: 0;
}

.auth-page--login .auth-card--signin .auth-card__company {
  margin: 0 0 16px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--color-primary-light, #e8f0fb);
  border: 1px solid #cfe0f7;
  color: #34495f;
  font-size: 0.84rem;
  text-align: left;
}

.auth-page--login .auth-register-btn,
.auth-page--login .btn--ghost {
  min-height: 46px;
  border: 1.5px solid #c5d3e6;
  background: #fff;
  color: #1f5fb2;
  font-weight: 700;
}

.auth-page--login .auth-register-btn:hover,
.auth-page--login .btn--ghost:hover {
  background: #eef4fb;
  border-color: #1f5fb2;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: none;
  color: #1f5fb2;
  font-size: 0.86rem;
  font-weight: 650;
  cursor: pointer;
}

.auth-back:hover {
  text-decoration: underline;
}

.auth-stepper {
  display: flex;
  gap: 8px;
  margin: 18px 0 20px;
  padding: 0;
  list-style: none;
}

.auth-stepper li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.auth-stepper li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.72rem;
}

.auth-stepper li.is-current,
.auth-stepper li.is-current {
  color: #1f5fb2;
}

.auth-stepper li.is-current span,
.auth-stepper li.is-current span {
  background: #1f5fb2;
  color: #fff;
}

.auth-stepper li.is-done span,
.auth-stepper li.is-done span {
  background: #0f9f6e;
  color: #fff;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-step-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.auth-step-actions .btn {
  flex: 1;
}

.auth-register-alert {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fdecea;
  border: 1px solid #f5c6c0;
  color: #c0372c;
  font-size: 0.86rem;
}

.auth-register-success {
  text-align: center;
  padding: 12px 8px 4px;
}

.auth-register-success__mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e8f7ee;
  color: #1a7a4a;
}

.auth-register-success h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.auth-page--login .auth-cat {
  background: #f8fafc;
  border: 1.5px solid #d5dee9;
}

.auth-page--login .auth-cat:has(input:checked) {
  border-color: #1f5fb2;
  background: #eef4fb;
}

.auth-file {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 10px;
  padding: 12px 14px;
  border: 1.5px dashed #c5d3e6;
  border-radius: 12px;
  background: #f8fafc;
  font-size: 0.84rem;
  font-weight: 650;
  color: #1e293b;
}

.auth-file__title {
  font-weight: 700;
}

.auth-file__hint {
  font-weight: 500;
  color: #64748b;
  font-size: 0.75rem;
}

.auth-page--login.is-registering .auth-panel {
  overflow-y: auto;
  align-items: flex-start;
  padding-top: 24px;
  padding-bottom: 24px;
}

@media (max-width: 900px) {
  .auth-hero__foot,
  .auth-hero__copy p {
    display: none;
  }

  .auth-page--login .auth-hero__headline {
    font-size: 1.15rem;
    text-align: center;
  }

  .auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-page--login.is-registering .auth-hero {
    display: none;
  }
}

@media (max-width: 640px) {
  .auth-stepper li {
    font-size: 0;
    justify-content: center;
  }
  .auth-stepper li span {
    font-size: 0.75rem;
  }
}


/* ── Wrapper-app lockup ───────────────────────────────────────────────────
   The Windows / Android installers open the portal with ?app=…, and the
   sign-in card then carries the product logo and full name itself. The hero
   column normally does that job, so this only shows where the hero cannot:
   short landscape screens, which is how a phone in the wrapper app spends a
   good share of its time. */

.auth-app-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.auth-app-lockup__img {
  width: auto;
  max-width: min(190px, 60vw);
  max-height: 46px;
  object-fit: contain;
}

.auth-app-lockup__name {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--color-text, #1a2535);
}

@media (min-width: 901px) {
  /* The hero column is on screen and already carries the mark. */
  .auth-page--login .auth-card__brand {
    display: none;
  }
}

/* ── Sage Evolution skin ──────────────────────────────────────────────────
   ?app=sage re-skins the auth pages for the Sage Evolution installers. This
   block sits last on purpose: the login-specific rules further up (the hero
   background, and the .auth-page--login button gradient around line 2336)
   have the same specificity as the earlier .auth-page--sage rules and were
   winning on source order, which left the Sage page wearing CatVision blue.

   The Sage mark is also a wide wordmark, not the square logo the hero column
   was built for, so it gets a plate shaped to fit rather than being dropped
   into a 176px circle. */

.auth-page--sage {
  --auth-sage: #00a651;
  --auth-sage-bright: #00d639;
  --auth-sage-deep: #007a3d;
  --auth-hero-bg: #05190d;
  --auth-hero-accent: var(--auth-sage);
  --auth-hero-glow: rgba(0, 214, 57, 0.4);
}

.auth-page--sage .auth-hero {
  background:
    radial-gradient(ellipse 120% 80% at 0% 0%, rgba(0, 166, 81, 0.3) 0%, transparent 52%),
    radial-gradient(ellipse 80% 60% at 100% 100%, rgba(0, 214, 57, 0.16) 0%, transparent 46%),
    linear-gradient(165deg, #041209 0%, #0a2d18 44%, #05190d 100%);
}

.auth-page--sage .auth-hero__mesh {
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(0, 166, 81, 0.4) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 75%, rgba(0, 214, 57, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.04) 0%, transparent 40%);
}

.auth-page--sage .auth-hero__orb--1 {
  background: radial-gradient(circle, rgba(0, 166, 81, 0.5) 0%, transparent 70%);
}
.auth-page--sage .auth-hero__orb--2 {
  background: radial-gradient(circle, rgba(0, 214, 57, 0.34) 0%, transparent 70%);
}
.auth-page--sage .auth-hero__orb--3 {
  background: radial-gradient(circle, rgba(74, 222, 128, 0.3) 0%, transparent 70%);
}

/* Wide wordmark: a rounded plate sized to the logo, not a circle sized to a
   square icon. */
.auth-page--sage .auth-hero__logo-wrap {
  width: min(340px, 78%);
  height: auto;
  padding: 22px 30px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(2px);
}

.auth-page--sage .auth-hero__logo-wrap::before {
  display: none;
}

.auth-page--sage .auth-hero__logo-glow {
  inset: -34% -14%;
  border-radius: 44px;
  background: radial-gradient(ellipse, rgba(0, 214, 57, 0.38) 0%, transparent 66%);
}

.auth-page--sage .auth-hero__logo {
  width: 100%;
  height: auto;
  max-height: 86px;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.45));
}

.auth-page--sage .auth-hero__product {
  color: rgba(134, 239, 172, 0.95);
}

.auth-page--sage .auth-card__eyebrow,
.auth-page--sage.auth-page--login .auth-card--signin .auth-card__eyebrow {
  color: var(--auth-sage-deep);
  background: #e3f6ea;
}

.auth-page--sage .auth-card--signin::before {
  background: linear-gradient(90deg, var(--auth-sage-deep), var(--auth-sage-bright));
}

.auth-page--sage .auth-card__forgot,
.auth-page--sage .auth-card__text-action,
.auth-page--sage .auth-card__aside a {
  color: var(--auth-sage-deep);
}

.auth-page--sage .auth-card .form__input:focus,
.auth-page--sage .auth-card .form__input:focus-visible {
  border-color: var(--auth-sage);
  box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.18);
}

.auth-page--sage.auth-page--login .auth-card .btn--primary,
.auth-page--sage .auth-card .btn--primary {
  background: var(--auth-sage);
  background-image: linear-gradient(180deg, var(--auth-sage) 0%, var(--auth-sage-deep) 100%);
  box-shadow: 0 2px 4px rgba(0, 122, 61, 0.22), 0 8px 24px rgba(0, 122, 61, 0.3);
}

.auth-page--sage.auth-page--login .auth-card .btn--primary:hover,
.auth-page--sage .auth-card .btn--primary:hover {
  box-shadow: 0 4px 8px rgba(0, 122, 61, 0.26), 0 14px 32px rgba(0, 122, 61, 0.36);
}

.auth-page--sage .auth-app-lockup__name {
  color: var(--auth-sage-deep);
}

/* Non-split Sage pages (forgot / reset) — the split login styles above do not
   reach them, so the page ground and the card accent need their own green. */
.auth-page--sage:not(.auth-page--split) {
  background: linear-gradient(165deg, #041209 0%, #0a2d18 46%, #05190d 100%);
}

.auth-page--sage:not(.auth-page--split) .auth-panel {
  background:
    radial-gradient(ellipse 90% 70% at 100% 0%, rgba(0, 214, 57, 0.1) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 0% 100%, rgba(0, 166, 81, 0.08) 0%, transparent 50%),
    transparent;
}

.auth-page--sage .auth-card::before {
  background: linear-gradient(90deg, var(--auth-sage-deep), var(--auth-sage-bright), var(--auth-sage), var(--auth-sage-bright), var(--auth-sage-deep));
  background-size: 200% 100%;
}

.auth-page--sage .auth-card__links a {
  color: var(--auth-sage-deep);
}

.auth-captcha-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  background: color-mix(in srgb, var(--color-text, #0f172a) 45%, transparent);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.auth-captcha-modal.is-open { display: flex; }
.auth-captcha-modal__card {
  width: min(420px, 100%);
  background: var(--color-surface, #fff);
  color: var(--color-text, #1a2535);
  border-radius: var(--radius-lg, 16px);
  border: 1px solid var(--color-border, #d5dee8);
  box-shadow: var(--shadow-lg, 0 24px 48px rgba(15, 23, 42, 0.18));
  padding: 1.35rem 1.4rem 1.2rem;
}
.auth-captcha-modal__card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}
.auth-captcha-modal__lead {
  margin: 0 0 1rem;
  color: var(--color-muted, #5b6b7c);
}
.auth-captcha-modal__q {
  margin: 0 0 1rem;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-primary, #1f5fb2);
}
.auth-captcha-modal__actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.auth-page--console .auth-card--signin {
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(255, 255, 255, .45);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 24px 70px rgba(16, 40, 72, .18);
}
