.auth-choice-page {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 42px);
  overflow-x: clip;
  background:
    radial-gradient(circle at 8% 88%, rgb(49 89 212 / 7%), transparent 26rem),
    radial-gradient(circle at 92% 12%, rgb(124 58 237 / 4.5%), transparent 24rem),
    var(--auth-page);
}

.auth-choice-page::before,
.auth-choice-page::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(88px);
}

.auth-choice-page::before {
  right: -110px;
  top: 16%;
  background: rgb(49 89 212 / 9%);
}

.auth-choice-page::after {
  bottom: -120px;
  left: 8%;
  background: rgb(22 163 74 / 5%);
}

.auth-choice-shell {
  width: min(100%, 920px);
  margin: auto;
  padding: clamp(24px, 3.4vw, 40px);
  overflow: hidden;
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius-card);
  background: rgb(255 255 255 / 97%);
  box-shadow:
    0 24px 70px rgb(49 89 212 / 8%),
    var(--auth-shadow);
}

.auth-choice-header {
  display: flex;
  min-height: 58px;
  justify-content: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--auth-line-soft);
}

.choice-intro {
  width: min(100%, 560px);
  margin: clamp(26px, 3.5vw, 36px) auto 0;
  text-align: center;
}

.choice-intro h1 {
  margin: 0;
  font-size: clamp(27px, 2.5vw, 32px);
  font-weight: 900;
  letter-spacing: -.4px;
  line-height: 1.5;
}

.choice-intro p {
  margin: 8px 0 0;
  color: var(--auth-muted);
  font-size: clamp(13px, 1vw, 14px);
  font-weight: 600;
  line-height: 1.9;
}

.role-options {
  display: grid;
  width: min(100%, 740px);
  margin: clamp(28px, 4vw, 42px) auto 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.role-option {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: clamp(284px, 25vw, 312px);
  padding: clamp(20px, 2.4vw, 28px);
  grid-template-rows: auto auto 1fr auto;
  justify-items: center;
  overflow: hidden;
  border: 1px solid var(--auth-line);
  border-radius: 11px;
  background: var(--auth-surface-soft);
  color: var(--auth-text);
  text-align: center;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.role-option::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background: var(--auth-blue);
  opacity: 0;
  transition: opacity 160ms ease;
}

.role-option:hover {
  border-color: var(--auth-blue-line);
  background: #fff;
  box-shadow: 0 14px 30px rgb(49 89 212 / 8%);
  transform: translateY(-2px);
}

.role-option:hover::before { opacity: 1; }
.role-option:active { transform: translateY(1px); }

.role-art {
  display: grid;
  width: clamp(68px, 6.5vw, 80px);
  aspect-ratio: 1;
  margin-bottom: 18px;
  place-items: center;
  border: 1px solid #dce4fb;
  border-radius: 50%;
  background: var(--auth-blue-soft);
}

.briefcase-icon {
  position: relative;
  width: clamp(38px, 3.8vw, 46px);
  aspect-ratio: 1.42;
  border-radius: 4px 4px 7px 7px;
  background: var(--auth-blue);
  box-shadow: 0 6px 12px rgb(49 89 212 / 16%);
}

.briefcase-icon::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 32%;
  width: 36%;
  height: 11px;
  border: 3px solid var(--auth-blue);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}

.briefcase-icon::after {
  content: "";
  position: absolute;
  top: 45%;
  left: 0;
  width: 100%;
  height: 4px;
  border-top: 1px solid rgb(255 255 255 / 45%);
  background: linear-gradient(90deg, transparent 44%, #fff 44% 56%, transparent 56%);
}

.backpack-icon {
  position: relative;
  width: clamp(38px, 3.8vw, 45px);
  aspect-ratio: .9;
  border: 2px solid var(--auth-blue);
  border-radius: 11px 11px 7px 7px;
  background: var(--auth-blue);
  box-shadow: -6px 1px 0 -3px rgb(49 89 212 / 28%), 6px 1px 0 -3px rgb(49 89 212 / 28%), 0 7px 13px rgb(49 89 212 / 18%);
}

.backpack-icon::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 28%;
  width: 35%;
  height: 10px;
  border: 3px solid var(--auth-blue);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
}

.backpack-icon::after {
  content: "";
  position: absolute;
  right: 15%;
  bottom: 12%;
  left: 15%;
  height: 34%;
  border: 1px solid rgb(255 255 255 / 32%);
  border-radius: 5px;
  background: rgb(24 57 164 / 36%);
}

.role-name {
  margin-bottom: 6px;
  color: var(--auth-text);
  font-size: clamp(18px, 1.45vw, 20px);
  font-weight: 900;
}

.role-description {
  display: block;
  max-width: 34ch;
  color: #4e596e;
  font-size: clamp(12.5px, .95vw, 13.5px);
  font-weight: 650;
  line-height: 2;
}

.role-cta {
  display: flex;
  width: 100%;
  min-height: 46px;
  margin-top: 20px;
  padding: 9px 14px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--auth-blue-line);
  border-radius: 8px;
  background: #fff;
  color: var(--auth-blue-dark);
  font-size: clamp(13px, .95vw, 14px);
  font-weight: 900;
  line-height: 1.5;
  box-shadow: 0 6px 16px rgb(49 89 212 / 7%);
  transition: border-color 140ms ease, background-color 140ms ease;
}

.role-option:hover .role-cta {
  border-color: var(--auth-blue);
  background: var(--auth-blue-soft);
}

.role-cta::after {
  content: "←";
  flex: 0 0 auto;
  font-family: Tahoma, sans-serif;
  font-size: 13px;
}

.existing-account {
  width: min(100%, 740px);
  margin: clamp(28px, 4vw, 38px) auto 0;
  text-align: center;
}

.account-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
}

.account-divider span { height: 1px; background: #dfe4ec; }
.account-divider p { margin: 0; color: #626d80; font-size: 12px; font-weight: 700; white-space: nowrap; }

.login-action {
  display: flex;
  width: min(100%, 280px);
  min-height: 46px;
  margin: 12px auto 0;
  padding: 8px 16px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #dbe3f2;
  border-radius: 8px;
  background: var(--auth-surface);
  color: var(--auth-blue-dark);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 6px 16px rgb(49 89 212 / 6%);
  text-decoration: none;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.login-action:hover { border-color: var(--auth-blue-line); background: #f8faff; }
.login-action:active { transform: translateY(1px); }

.login-arrow { direction: ltr; font-family: Tahoma, sans-serif; font-size: 13px; }

.auth-choice-footer {
  margin-top: clamp(22px, 3vw, 30px);
  color: #667085;
  font-size: 10px;
  font-weight: 650;
  text-align: center;
}

.role-option:focus-visible,
.login-action:focus-visible,
.magnetis-brand:focus-visible { outline: 3px solid var(--auth-focus); outline-offset: 3px; }

@media (min-width: 1024px) {
  .auth-choice-shell { width: min(100%, 920px); }
  .role-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .auth-choice-shell { width: min(100%, 760px); padding: clamp(30px, 5vw, 44px); }
  .role-options { width: min(100%, 650px); }
}

@media (max-width: 767px) {
  .auth-choice-page { place-items: stretch; padding: 0; background: var(--auth-surface); }
  .auth-choice-shell { width: 100%; min-height: 100dvh; padding: clamp(20px, 6vw, 30px) clamp(16px, 6vw, 28px); border: 0; border-radius: 0; box-shadow: none; }
  .auth-choice-page::before,
  .auth-choice-page::after { display: none; }
  .choice-intro { margin-top: clamp(24px, 7vw, 36px); }
  .role-options { width: min(100%, 480px); grid-template-columns: 1fr; margin-top: 26px; }
  .role-option { min-height: 0; padding: 20px 18px; grid-template-columns: 1fr; grid-template-rows: auto auto 1fr auto; justify-items: center; text-align: center; }
  .role-art { grid-row: auto; margin: 0 0 14px; }
  .role-name { align-self: auto; margin-bottom: 5px; }
  .role-description { align-self: auto; }
  .role-cta { grid-column: auto; margin-top: 16px; }
}

@media (max-width: 360px) {
  .role-option { grid-template-columns: 1fr; }
  .role-art { width: 60px; }
  .role-description { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .role-option,
  .role-option::before,
  .role-cta,
  .login-action { transition: none; }
}
