/* internal/httpapi/static/src/styles/auth.css */
:root {
  color: #17211d;
  background: #f4f6f5;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe 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: #17211d;
  background:
    linear-gradient(
      90deg,
      #197149 0 5px,
      transparent 5px),
    #f4f6f5;
}
body[data-auth-bootstrap] #app {
  display: none;
}
button,
input {
  font: inherit;
  letter-spacing: 0;
}
.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: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: #197149;
  font-size: 18px;
  font-weight: 750;
}
.fe-auth-brand > span:last-child {
  display: grid;
  gap: 2px;
}
.fe-auth-brand strong {
  color: #17211d;
  font-size: 17px;
  line-height: 1.2;
}
.fe-auth-brand small {
  color: #66736d;
  font-size: 12px;
  line-height: 1.35;
}
.fe-auth-nav {
  display: flex;
  gap: 4px;
  align-items: center;
}
.fe-auth-nav button,
.fe-auth-text-button {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  color: #4f5d56;
  background: transparent;
  cursor: pointer;
}
.fe-auth-nav button:hover,
.fe-auth-text-button:hover {
  color: #135c3c;
  background: #e8efeb;
}
.fe-auth-panel {
  width: min(100%, 420px);
  justify-self: center;
  padding: 32px;
  border: 1px solid #d8dfdb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgb(23 33 29 / 8%);
}
.fe-auth-heading {
  margin-bottom: 24px;
}
.fe-auth-kicker {
  margin: 0 0 8px;
  color: #197149;
  font-size: 12px;
  font-weight: 700;
}
.fe-auth-heading h1 {
  margin: 0;
  color: #17211d;
  font-size: 26px;
  line-height: 1.2;
}
.fe-auth-heading > p:last-child {
  margin: 8px 0 0;
  color: #66736d;
  font-size: 14px;
  line-height: 1.55;
}
.fe-auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 40px;
  margin-bottom: 22px;
  padding: 3px;
  border: 1px solid #d8dfdb;
  border-radius: 8px;
  background: #f4f6f5;
}
.fe-auth-tabs button {
  min-width: 0;
  border: 0;
  border-radius: 5px;
  color: #66736d;
  background: transparent;
  cursor: pointer;
}
.fe-auth-tabs button[aria-selected=true] {
  color: #17211d;
  background: #ffffff;
  box-shadow: 0 1px 3px rgb(23 33 29 / 12%);
  font-weight: 650;
}
#auth-form {
  display: grid;
  gap: 10px;
}
#auth-form label {
  color: #33403a;
  font-size: 13px;
  font-weight: 650;
}
#auth-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cbd4cf;
  border-radius: 6px;
  outline: none;
  color: #17211d;
  background: #ffffff;
}
#auth-form input:hover {
  border-color: #9eaca5;
}
#auth-form input:focus {
  border-color: #197149;
  box-shadow: 0 0 0 3px rgb(25 113 73 / 14%);
}
.fe-auth-register-field {
  display: grid;
  gap: 10px;
}
.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: #4f5d56;
  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: #197149;
}
.fe-auth-text-button {
  min-height: 32px;
  padding-inline: 6px;
  color: #197149;
  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 #cbd4cf;
  border-radius: 6px;
  color: #33403a;
  background: #ffffff;
  cursor: pointer;
}
.fe-auth-secondary {
  min-height: 44px;
  padding: 0 12px;
}
.fe-auth-secondary:disabled {
  color: #98a29d;
  background: #f4f6f5;
  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 10px;
  border: 1px solid #d8dfdb;
  border-radius: 6px;
  color: #59665f;
  background: #f8faf9;
  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 rgb(213 152 56 / 15%);
}
.fe-auth-security.is-ready .fe-auth-security-indicator {
  background: #197149;
  box-shadow: 0 0 0 3px rgb(25 113 73 / 15%);
}
.fe-auth-security.is-error .fe-auth-security-indicator {
  background: #c34f45;
  box-shadow: 0 0 0 3px rgb(195 79 69 / 15%);
}
.fe-auth-retry {
  min-height: 28px;
  padding: 0 8px;
  color: #a43f37;
}
.fe-auth-notice,
.fe-auth-message {
  margin: 0;
  padding: 9px 10px;
  border-radius: 6px;
  color: #59665f;
  background: #f1f5f3;
  font-size: 12px;
  line-height: 1.5;
}
.fe-auth-notice[data-tone=success],
.fe-auth-message[data-tone=success] {
  color: #135c3c;
  background: #e9f5ef;
}
.fe-auth-notice[data-tone=warning] {
  color: #765319;
  background: #fff7e8;
}
.fe-auth-message[data-tone=error] {
  color: #963a33;
  background: #fff0ef;
}
.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: 46px;
  margin-top: 4px;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  background: #197149;
  font-weight: 700;
  cursor: pointer;
}
.fe-auth-submit:hover:not(:disabled) {
  background: #125f3c;
}
.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 rgb(25 113 73 / 24%);
  outline-offset: 2px;
}
.fe-auth-submit:disabled {
  color: #829089;
  background: #dfe5e2;
  cursor: not-allowed;
}
.fe-auth-footer {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-self: center;
  color: #7b8781;
  font-size: 12px;
}
.fe-auth-footer a {
  color: #4f6b5d;
}
.fe-auth-dialog-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(23 33 29 / 46%);
}
.fe-auth-dialog-backdrop[hidden] {
  display: none;
}
.fe-auth-dialog {
  width: min(100%, 440px);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  padding: 24px;
  border: 1px solid #d8dfdb;
  border-radius: 8px;
  color: #17211d;
  background: #ffffff;
  box-shadow: 0 20px 60px rgb(14 24 19 / 22%);
}
.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;
  line-height: 1.3;
}
.fe-auth-dialog p {
  color: #59665f;
  font-size: 14px;
  line-height: 1.6;
}
.fe-auth-dialog .fe-auth-kicker {
  margin: 0 0 5px;
  color: #197149;
  font-size: 12px;
  line-height: 1.4;
}
.fe-auth-dialog-close {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 0;
  border-radius: 5px;
  color: #59665f;
  background: #f1f5f3;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
#auth-forgot-form {
  display: grid;
  gap: 10px;
}
#auth-forgot-form > p:first-child {
  margin: 0 0 4px;
}
#auth-forgot-form label {
  color: #33403a;
  font-size: 13px;
  font-weight: 650;
}
#auth-forgot-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cbd4cf;
  border-radius: 6px;
  outline: none;
  color: #17211d;
  background: #ffffff;
}
#auth-forgot-form input:focus {
  border-color: #197149;
  box-shadow: 0 0 0 3px rgb(25 113 73 / 14%);
}
.fe-auth-support-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 6px;
  color: #ffffff;
  background: #197149;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.fe-auth-support-link:hover {
  background: #125f3c;
}
.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 (max-width: 560px) {
  .fe-auth-page {
    width: min(100% - 24px, 420px);
    padding: 20px 0 16px;
  }
  .fe-auth-panel {
    padding: 24px 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: 7px;
    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;
  }
}
