body.auth-page {
  margin: 0;
  min-height: 100vh;
  background: #0f1014;
  color: #f7f7f8;
  font-family: 'Builder Sans', 'Segoe UI', Arial, sans-serif;
}

.auth-split {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: #0f1014;
}

.auth-panel {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  padding: 24px 36px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #0f1014;
  border-right: 1px solid rgba(255, 255, 255, .05);
  flex-shrink: 0;
}

.auth-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-mode-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 8px;
  background: #17181e;
  border: 1px solid #262934;
  gap: 2px;
}
.auth-mode-switch a {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #9ba0b0;
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
}
.auth-mode-switch a[aria-current='page'] {
  background: #335fff;
  color: #ffffff;
}
.auth-mode-switch a:not([aria-current='page']):hover {
  color: #f7f7f8;
}

.auth-panel-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: auto 0;
  padding: 24px 0;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
}
.auth-brand img {
  display: block;
  height: 28px;
  width: auto;
}

.auth-heading-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#auth-title {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f7f7f8;
}
.auth-subtitle {
  margin: 0;
  font-size: 14px;
  color: #9ba0b0;
  line-height: 1.4;
}

#account-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-field label,
.birthday-field legend,
.gender-field legend {
  font-size: 13px;
  font-weight: 600;
  color: #d7dae3;
  padding: 0;
}

.auth-field input,
.birthday-selects select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #2b2e38;
  background: #17181e;
  color: #f7f7f8;
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.auth-field input::placeholder { color: #717686; }
.auth-field input:focus,
.birthday-selects select:focus {
  border-color: #335fff;
  background: #1a1c23;
}

.birthday-field,
.gender-field {
  border: 0;
  margin: 0;
  padding: 0;
}
.birthday-field legend,
.gender-field legend {
  margin-bottom: 6px;
}
.birthday-selects {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 8px;
}

.password-input {
  position: relative;
  display: flex;
  align-items: center;
}
.password-input input {
  padding-right: 42px;
}
.password-toggle {
  position: absolute;
  right: 8px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #9ba0b0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.password-toggle:hover { color: #f7f7f8; }

.gender-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.gender-options button {
  height: 40px;
  gap: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid #2b2e38;
  background: #17181e;
  color: #d7dae3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.gender-options button[aria-pressed='true'] {
  border-color: #335fff;
  background: rgba(51, 95, 255, .16);
  color: #ffffff;
}

.signup-notice {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: #8f95a6;
}
.text-link {
  background: none;
  border: 0;
  padding: 0;
  color: #6b8cff;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; }

.auth-error {
  margin: 0;
  font-size: 13px;
  color: #f87171;
  min-height: 18px;
}
.auth-error:empty { display: none; }

.auth-submit {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: #335fff;
  color: #ffffff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 120ms ease, opacity 120ms ease;
}
.auth-submit:hover:not(:disabled) { background: #284fdb; }
.auth-submit:disabled {
  background: #232630;
  color: #7c8294;
  cursor: not-allowed;
}

.auth-discord-btn {
  width: 100%;
  height: 42px;
  border: 1px solid #2b2e38;
  border-radius: 8px;
  background: #17181e;
  color: #f7f7f8;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.auth-discord-btn:hover {
  background: #20222b;
  border-color: #5865F2;
}
.auth-discord-btn.is-linked {
  border-color: #22c55e;
  color: #4ade80;
}
.modal-modern #recovery-username,
.modal-modern #recovery-code,
.modal-modern #recovery-new-password,
.modal-modern #recovery-method {
  width: 100%;
  height: 42px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #2b2e38;
  background: #121317;
  color: #f7f7f8;
  font-size: 14px;
  box-sizing: border-box;
}

.login-options {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 2px;
}
.forgot-password { font-size: 13px; }
.signup-prompt,
.signup-existing {
  margin: 0;
  font-size: 14px;
  color: #9ba0b0;
  text-align: center;
}
.signup-prompt a,
.signup-existing a {
  color: #6b8cff;
  font-weight: 600;
  text-decoration: none;
}
.signup-prompt a:hover,
.signup-existing a:hover { text-decoration: underline; }

.auth-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 20px;
  font-size: 12px;
  color: #6f7485;
}
.auth-footer button {
  background: none;
  border: 0;
  padding: 0;
  color: #8f95a6;
  font: inherit;
  cursor: pointer;
}
.auth-footer button:hover { color: #f7f7f8; }

.auth-showcase {
  position: relative;
  flex: 1;
  min-height: 100vh;
  background: url('/assets/marketing_bg_2026.jpg') center / cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 32px 18px;
}
.auth-showcase::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #0f1014 0%, rgba(15, 16, 20, .82) 14%, rgba(15, 16, 20, .28) 45%, rgba(15, 16, 20, .35) 100%),
    linear-gradient(180deg, rgba(15, 16, 20, .15) 0%, rgba(15, 16, 20, .75) 100%);
  pointer-events: none;
}
.auth-home-pill {
  position: relative;
  z-index: 1;
  align-self: flex-end;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(15, 16, 20, .72);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #f7f7f8;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(8px);
}
.auth-home-pill:hover {
  background: rgba(27, 29, 36, .9);
  border-color: rgba(255, 255, 255, .28);
}
.auth-showcase-caption {
  position: relative;
  z-index: 1;
  align-self: flex-end;
  text-align: right;
  max-width: 460px;
}
.auth-showcase-caption h2 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .55);
}
.auth-showcase-caption p {
  margin: 0;
  font-size: 15px;
  color: #d7dae3;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .6);
}

@media (max-width: 900px) {
  .auth-showcase { display: none; }
  .auth-panel {
    max-width: none;
    padding: 24px 20px;
  }
}

.auth-field input:-webkit-autofill,
.auth-field input:-webkit-autofill:hover,
.auth-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f7f7f8;
  -webkit-box-shadow: 0 0 0 1000px #17181e inset;
  transition: background-color 5000s ease-in-out 0s;
}

dialog.modal-modern { border: 0; border-radius: 12px; padding: 0; background: #191a1f; color: #f7f7f8; width: min(440px, calc(100% - 24px)); box-shadow: 0 12px 36px rgba(0,0,0,.55); }
dialog.modal-modern::backdrop { background: rgba(0, 0, 0, .7); }
.modal-modern .modal-content { border-radius: 12px; }
.modal-modern .modal-header { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; justify-items: center; padding: 14px 16px; border-bottom: 1px solid #2b2e38; margin-bottom: 18px; }
.modal-modern .modal-modern-header-button { background: none; border: 0; color: #f7f7f8; font-size: 24px; line-height: 1; padding: 0; margin-right: auto; cursor: pointer; }
.modal-modern .modal-title { margin: 0; font-size: 18px; font-weight: 700; text-align: center; }
.modal-modern .modal-body { padding: 0 24px; text-align: center; }
.modal-modern .modal-lock-icon { width: 96px; height: 96px; margin: 0 auto 16px; background: url('/assets/icons/challenge-lock.svg') center/contain no-repeat; }
.modal-modern .modal-body p { margin-top: 0; margin-left: auto; margin-right: auto; font-size: 14px; line-height: 20px; color: #9ba0b0; }
.modal-modern .modal-body .modal-margin-bottom { margin-bottom: 14px; }
.modal-modern .modal-body .modal-margin-bottom-large { margin-bottom: 18px; }
.modal-modern #twostep-code { width: 100%; height: 42px; padding: 8px 12px; border-radius: 8px; border: 1px solid #2b2e38; background: #121317; color: #f7f7f8; font-size: 18px; text-align: center; letter-spacing: 3px; box-sizing: border-box; }
.modal-modern .modal-text-danger { color: #f87171; font-size: 13px; min-height: 18px; }
.modal-modern .modal-text-danger:empty { display: none; }
.modal-modern .twostep-trust { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: #9ba0b0; cursor: pointer; margin: 14px 0 18px; }
.modal-modern .modal-action-button { width: 100%; height: 40px; border: 0; border-radius: 8px; background: #335fff; color: #ffffff; font-size: 15px; font-weight: 700; cursor: pointer; }
.modal-modern .modal-action-button:disabled { opacity: .5; cursor: default; }
.modal-modern .modal-footer { padding: 14px 24px 20px; text-align: center; }
.modal-modern .twostep-help { margin: 0; font-size: 13px; color: #9ba0b0; }

#auth-info {
  border: 1px solid #2b2e38;
  border-radius: 12px;
  padding: 20px;
  background: #191a1f;
  color: #f7f7f8;
  max-width: 420px;
}
#auth-info::backdrop { background: rgba(0, 0, 0, .7); }
#auth-info .details-body { display: flex; flex-direction: column; gap: 12px; }
#auth-info h2 { margin: 0; font-size: 18px; }
#auth-info p { margin: 0; font-size: 14px; color: #9ba0b0; line-height: 1.5; }
#auth-info .primary-button { align-self: flex-end; height: 36px; padding: 0 16px; border: 0; border-radius: 8px; background: #335fff; color: #fff; font-weight: 600; cursor: pointer; }

.gender-icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  background-position: 0 center;
  background-repeat: no-repeat;
  background-size: 48px 24px;
}
.gender-options button[aria-pressed="true"] .gender-icon {
  background-position: -24px center;
}
.gender-female { background-image: url("/assets/icons/gender-female.png"); }
.gender-male { background-image: url("/assets/icons/gender-male.png"); }
