/* internal/httpapi/static/src/styles/auth.css */
:root {
  color: #101936;
  background: #f7f9fd;
  font-family:
    "Inter",
    "Segoe UI Variable Text",
    "Segoe UI",
    system-ui,
    -apple-system,
    "PingFang SC",
    "HarmonyOS Sans SC",
    "Microsoft YaHei UI",
    "Microsoft YaHei",
    sans-serif;
  font-synthesis: none;
  letter-spacing: 0;
}
* {
  box-sizing: border-box;
}
body[data-auth-bootstrap] {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: #101936;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(
      900px 420px at 82% -160px,
      rgba(18, 103, 255, .1),
      transparent 70%),
    radial-gradient(
      720px 420px at -120px 105%,
      rgba(116, 87, 255, .07),
      transparent 70%),
    linear-gradient(
      180deg,
      #f9fbff 0,
      #f5f8fd 60%,
      #f7f9fd 100%);
}
body[data-auth-bootstrap] #app {
  display: none;
}
button,
input {
  font: inherit;
  letter-spacing: 0;
}
::selection {
  background: rgba(18, 103, 255, .16);
}
.fe-auth-page {
  width: min(100% - 40px, 1080px);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template: auto 1fr auto / minmax(0, 1fr);
  align-items: center;
  padding: 32px 0 24px;
}
.fe-auth-topbar {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.fe-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
}
.fe-auth-brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background:
    linear-gradient(
      135deg,
      #2f80ff 0,
      #1267ff 55%,
      #0756df 100%);
  box-shadow: 0 1px 2px rgba(7, 86, 223, .3), 0 8px 20px rgba(18, 103, 255, .28);
  font-size: 18px;
  font-weight: 750;
}
.fe-auth-brand > span:last-child {
  display: grid;
  gap: 2px;
}
.fe-auth-brand strong {
  color: #101936;
  font-size: 17px;
  line-height: 1.2;
}
.fe-auth-brand small {
  color: #657493;
  font-size: 12px;
  line-height: 1.35;
}
.fe-auth-nav {
  display: flex;
  gap: 6px;
  align-items: center;
}
.fe-auth-nav button,
.fe-auth-text-button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  color: #43526f;
  background: transparent;
  cursor: pointer;
  transition: background .14s ease, color .14s ease;
}
.fe-auth-nav button:hover,
.fe-auth-text-button:hover {
  color: #0756df;
  background: #edf4ff;
}
.fe-auth-panel {
  width: min(100%, 430px);
  justify-self: center;
  padding: 36px 34px 32px;
  border: 1px solid #e4eaf6;
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 2px rgba(16, 25, 54, .04), 0 24px 64px rgba(38, 71, 132, .12);
}
.fe-auth-heading {
  margin-bottom: 26px;
}
.fe-auth-kicker {
  margin: 0 0 8px;
  color: #1267ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}
.fe-auth-heading h1 {
  margin: 0;
  color: #101936;
  font-size: 27px;
  font-weight: 750;
  line-height: 1.2;
}
.fe-auth-heading > p:last-child {
  margin: 8px 0 0;
  color: #657493;
  font-size: 14px;
  line-height: 1.55;
}
.fe-auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 42px;
  margin-bottom: 22px;
  padding: 4px;
  border: 1px solid #e4eaf6;
  border-radius: 11px;
  background: #f1f5fb;
}
.fe-auth-tabs button {
  min-width: 0;
  border: 0;
  border-radius: 8px;
  color: #657493;
  background: transparent;
  cursor: pointer;
  transition:
    background .14s ease,
    color .14s ease,
    box-shadow .14s ease;
}
.fe-auth-tabs button[aria-selected=true] {
  color: #0756df;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 25, 54, .08), 0 3px 10px rgba(38, 71, 132, .1);
  font-weight: 650;
}
#auth-form {
  display: grid;
  gap: 11px;
}
#auth-form label {
  color: #33415f;
  font-size: 13px;
  font-weight: 650;
}
#auth-form input {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid #d9e2f1;
  border-radius: 10px;
  outline: none;
  color: #101936;
  background: #ffffff;
  transition: border-color .14s ease, box-shadow .14s ease;
}
#auth-form input:hover {
  border-color: #b9c8e4;
}
#auth-form input:focus {
  border-color: #1267ff;
  box-shadow: 0 0 0 3px rgba(18, 103, 255, .16);
}
.fe-auth-register-field {
  display: grid;
  gap: 11px;
}
.fe-auth-register-field[hidden] {
  display: none;
}
.fe-auth-session-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
}
.fe-auth-checkbox {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: #43526f;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
#auth-form .fe-auth-checkbox input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: #1267ff;
}
.fe-auth-text-button {
  min-height: 32px;
  padding-inline: 8px;
  color: #1267ff;
  font-size: 13px;
}
.fe-auth-inline-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.fe-auth-secondary,
.fe-auth-retry {
  border: 1px solid #d9e2f1;
  border-radius: 10px;
  color: #33415f;
  background: #ffffff;
  cursor: pointer;
  transition:
    border-color .14s ease,
    background .14s ease,
    color .14s ease;
}
.fe-auth-secondary {
  min-height: 46px;
  padding: 0 14px;
}
.fe-auth-secondary:hover:not(:disabled) {
  border-color: #b9ccf0;
  background: #f4f7fd;
}
.fe-auth-secondary:disabled {
  color: #98a4ba;
  background: #f4f6fb;
  cursor: not-allowed;
}
.fe-auth-security {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 42px;
  margin-top: 4px;
  padding: 9px 11px;
  border: 1px solid #e4eaf6;
  border-radius: 10px;
  color: #56637f;
  background: #f7f9fd;
  font-size: 12px;
  line-height: 1.4;
}
.fe-auth-security-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d59838;
  box-shadow: 0 0 0 3px rgba(213, 152, 56, .15);
}
.fe-auth-security.is-ready .fe-auth-security-indicator {
  background: #0f8a5f;
  box-shadow: 0 0 0 3px rgba(15, 138, 95, .16);
}
.fe-auth-security.is-error .fe-auth-security-indicator {
  background: #b42318;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, .14);
}
.fe-auth-retry {
  min-height: 28px;
  padding: 0 8px;
  color: #b42318;
}
.fe-auth-notice,
.fe-auth-message {
  margin: 0;
  padding: 9px 11px;
  border-radius: 10px;
  color: #56637f;
  background: #f1f5fb;
  font-size: 12px;
  line-height: 1.5;
}
.fe-auth-notice[data-tone=success],
.fe-auth-message[data-tone=success] {
  color: #0f8a5f;
  background: #e9f8f0;
}
.fe-auth-notice[data-tone=warning] {
  color: #b45309;
  background: #fff4df;
}
.fe-auth-message[data-tone=error] {
  color: #b42318;
  background: #fff0ed;
}
.fe-auth-turnstile[hidden],
.fe-auth-notice[hidden],
.fe-auth-message[hidden],
.fe-auth-retry[hidden],
.fe-auth-tabs[hidden],
.fe-auth-session-row[hidden],
.fe-auth-security[hidden],
.fe-auth-text-button[hidden] {
  display: none;
}
.fe-auth-submit {
  min-height: 48px;
  margin-top: 6px;
  border: 0;
  border-radius: 10px;
  color: #ffffff;
  background:
    linear-gradient(
      180deg,
      #2f80ff 0,
      #1267ff 100%);
  box-shadow: 0 1px 2px rgba(7, 86, 223, .28), 0 8px 20px rgba(18, 103, 255, .26);
  font-weight: 700;
  cursor: pointer;
  transition:
    background .15s ease,
    box-shadow .15s ease,
    transform .15s ease;
}
.fe-auth-submit:hover:not(:disabled) {
  background:
    linear-gradient(
      180deg,
      #1e74ff 0,
      #0756df 100%);
  box-shadow: 0 1px 2px rgba(7, 86, 223, .32), 0 10px 24px rgba(18, 103, 255, .32);
}
.fe-auth-submit:active:not(:disabled) {
  transform: translateY(1px);
}
.fe-auth-submit:focus-visible,
.fe-auth-tabs button:focus-visible,
.fe-auth-secondary:focus-visible,
.fe-auth-retry:focus-visible,
.fe-auth-nav button:focus-visible,
.fe-auth-text-button:focus-visible,
.fe-auth-dialog-close:focus-visible,
.fe-auth-support-link:focus-visible {
  outline: 3px solid rgba(18, 103, 255, .28);
  outline-offset: 2px;
}
.fe-auth-submit:disabled {
  color: #8b97ad;
  background: #e3e9f4;
  box-shadow: none;
  cursor: not-allowed;
}
.fe-auth-footer {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-self: center;
  color: #8b97ad;
  font-size: 12px;
}
.fe-auth-footer a {
  color: #43526f;
}
.fe-auth-dialog-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(13, 22, 44, .42);
  backdrop-filter: blur(8px);
}
.fe-auth-dialog-backdrop[hidden] {
  display: none;
}
.fe-auth-dialog {
  width: min(100%, 440px);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  padding: 26px;
  border: 1px solid #e4eaf6;
  border-radius: 16px;
  color: #101936;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(16, 25, 54, .06), 0 32px 80px rgba(13, 22, 44, .28);
}
.fe-auth-dialog > header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}
.fe-auth-dialog h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 750;
  line-height: 1.3;
}
.fe-auth-dialog p {
  color: #56637f;
  font-size: 14px;
  line-height: 1.6;
}
.fe-auth-dialog .fe-auth-kicker {
  margin: 0 0 5px;
  color: #1267ff;
  font-size: 12px;
  line-height: 1.4;
}
.fe-auth-dialog-close {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 0;
  border-radius: 9px;
  color: #56637f;
  background: #f1f5fb;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background .14s ease, color .14s ease;
}
.fe-auth-dialog-close:hover {
  color: #101936;
  background: #e6edf9;
}
#auth-forgot-form {
  display: grid;
  gap: 11px;
}
#auth-forgot-form > p:first-child {
  margin: 0 0 4px;
}
#auth-forgot-form label {
  color: #33415f;
  font-size: 13px;
  font-weight: 650;
}
#auth-forgot-form input {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid #d9e2f1;
  border-radius: 10px;
  outline: none;
  color: #101936;
  background: #ffffff;
  transition: border-color .14s ease, box-shadow .14s ease;
}
#auth-forgot-form input:focus {
  border-color: #1267ff;
  box-shadow: 0 0 0 3px rgba(18, 103, 255, .16);
}
.fe-auth-support-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  color: #ffffff;
  background:
    linear-gradient(
      180deg,
      #2f80ff 0,
      #1267ff 100%);
  box-shadow: 0 1px 2px rgba(7, 86, 223, .28), 0 8px 20px rgba(18, 103, 255, .26);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: background .15s ease, box-shadow .15s ease;
}
.fe-auth-support-link:hover {
  background:
    linear-gradient(
      180deg,
      #1e74ff 0,
      #0756df 100%);
}
.fe-auth-legal-copy {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}
.fe-auth-legal-copy p {
  margin: 0;
}
.codex-recharge {
  width: min(100%, 520px);
  margin: 8vh auto 0;
  padding: 28px;
  border: 1px solid #d8dfdb;
  border-radius: 8px;
  color: #17211d;
  background: #ffffff;
  box-shadow: 0 20px 60px rgb(14 24 19 / 16%);
}
.codex-recharge-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
}
.codex-recharge-heading {
  min-width: 0;
}
.codex-recharge-kicker {
  margin: 0 0 5px;
  color: #197149;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
.codex-recharge h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}
.codex-recharge-description {
  margin: 10px 0 0;
  color: #59665f;
  font-size: 14px;
  line-height: 1.6;
}
.codex-recharge-exit {
  min-height: 36px;
  flex: 0 0 auto;
  padding: 0 11px;
  border: 1px solid #cbd4cf;
  border-radius: 6px;
  color: #33403a;
  background: #ffffff;
  cursor: pointer;
}
.codex-recharge-identity {
  display: flex;
  gap: 16px;
  align-items: baseline;
  justify-content: space-between;
  margin: 24px 0 18px;
  padding: 13px 14px;
  border: 1px solid #dfe6e2;
  border-radius: 6px;
  background: #f5f8f6;
}
.codex-recharge-identity span {
  color: #657169;
  font-size: 13px;
}
.codex-recharge-identity strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.codex-recharge-form {
  display: grid;
  gap: 10px;
}
.codex-recharge-form label {
  color: #33403a;
  font-size: 13px;
  font-weight: 650;
}
.codex-recharge-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cbd4cf;
  border-radius: 6px;
  outline: none;
  color: #17211d;
  background: #ffffff;
}
.codex-recharge-form input:focus {
  border-color: #197149;
  box-shadow: 0 0 0 3px rgb(25 113 73 / 14%);
}
.codex-recharge-form button[type=submit] {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  background: #197149;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.codex-recharge-form button[type=submit]:hover:not(:disabled) {
  background: #125f3c;
}
.codex-recharge-form button[type=submit]:disabled {
  cursor: wait;
  opacity: 0.68;
}
.codex-recharge-message {
  margin: 2px 0 0;
  color: #59665f;
  font-size: 13px;
  line-height: 1.5;
}
.codex-recharge-message[data-tone=success] {
  color: #197149;
}
.codex-recharge-message[data-tone=error] {
  color: #a33a33;
}
@media (prefers-reduced-motion: reduce) {
  .fe-auth-submit,
  .fe-auth-support-link,
  .fe-auth-tabs button,
  .fe-auth-nav button,
  .fe-auth-text-button,
  .fe-auth-secondary,
  .fe-auth-retry,
  .fe-auth-dialog-close,
  #auth-form input,
  #auth-forgot-form input {
    transition: none;
  }
}
@media (max-width: 560px) {
  .fe-auth-page {
    width: min(100% - 24px, 420px);
    padding: 20px 0 16px;
  }
  .fe-auth-panel {
    padding: 26px 20px;
  }
  .fe-auth-brand small {
    max-width: 220px;
  }
  .fe-auth-topbar {
    align-items: flex-start;
  }
  .fe-auth-brand small {
    display: none;
  }
  .fe-auth-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .fe-auth-nav button {
    min-height: 34px;
    padding-inline: 8px;
    font-size: 12px;
  }
  .fe-auth-footer {
    flex-wrap: wrap;
    gap: 8px 14px;
    justify-content: center;
  }
  .codex-recharge {
    margin-top: 3vh;
    padding: 22px 18px;
  }
  .codex-recharge-header {
    align-items: flex-start;
  }
  .codex-recharge-identity {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}
