/* ==========================================================================
   TradeX369 — member authentication
   ========================================================================== */

.auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 23% 34%, rgba(220, 174, 24, 0.16), transparent 29%),
    radial-gradient(circle at 14% 77%, rgba(141, 101, 10, 0.08), transparent 28%),
    radial-gradient(circle at 91% 2%, rgba(255, 255, 255, 0.025), transparent 24%),
    #060605;
}
html[data-theme='light'] .auth-body {
  background:
    radial-gradient(circle at 23% 34%, rgba(220, 174, 24, 0.14), transparent 29%),
    radial-gradient(circle at 93% 9%, rgba(183, 146, 37, 0.07), transparent 24%),
    #f1f0eb;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -70px;
  z-index: 999;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--primary-bright);
  color: var(--primary-ink);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

.auth-topbar {
  width: min(1146px, calc(100% - 48px));
  min-height: 62px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 11.5px;
  transition: color var(--transition), gap var(--transition);
}
.auth-back:hover { color: var(--gold-text); gap: 10px; }
.auth-topbar__right { display: flex; align-items: center; gap: 10px; }
.demo-chip {
  height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--dim);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
html[data-theme='light'] .demo-chip { background: rgba(255, 255, 255, 0.65); }
.auth-topbar .theme-toggle { height: 36px; font-size: 11px; }

.auth-wrap {
  flex: 1;
  width: min(1146px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 8px 0 24px;
}
.auth-card {
  position: relative;
  width: 100%;
  min-height: 783px;
  display: grid;
  grid-template-columns: 45.5% 54.5%;
  overflow: hidden;
  border: 1px solid rgba(220, 174, 24, 0.2);
  border-radius: 25px;
  background: #171715;
  box-shadow:
    0 42px 120px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    inset 0 1px rgba(255, 255, 255, 0.035);
}

/* ------------------------------------------------------------------ intro */
.auth-intro {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  padding: 50px 46px 36px 48px;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.055);
  background:
    radial-gradient(circle at 90% 8%, rgba(220, 174, 24, 0.07), transparent 33%),
    radial-gradient(circle at 5% 95%, rgba(220, 174, 24, 0.055), transparent 34%),
    linear-gradient(148deg, #171715 0%, #131311 54%, #0d0d0c 100%);
  color: #f5f3eb;
}
html[data-theme='light'] .auth-card { border-color: rgba(155, 120, 23, 0.22); background: #fff; box-shadow: 0 38px 100px rgba(38, 35, 25, 0.16); }
html[data-theme='light'] .auth-intro {
  --gold-text: #f5d259;
  border-right-color: rgba(24, 32, 42, 0.07);
  background:
    radial-gradient(circle at 90% 8%, rgba(220, 174, 24, 0.1), transparent 33%),
    linear-gradient(148deg, #1c1b17 0%, #151410 60%, #0e0e0c 100%);
  color: #f5f3eb;
}
.auth-intro__rings {
  position: absolute;
  z-index: -1;
  right: -106px;
  top: -124px;
  width: 475px;
  height: 475px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.025);
  box-shadow: 0 0 0 74px rgba(255, 255, 255, 0.012), 0 0 0 148px rgba(255, 255, 255, 0.009);
}
.auth-intro__rings i {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.035);
  inset: 55px;
}
.auth-intro__rings i:nth-child(2) { inset: 110px; border-color: rgba(220, 174, 24, 0.06); }
.auth-intro__rings i:nth-child(3) { inset: 176px; background: radial-gradient(circle, rgba(220, 174, 24, 0.07), transparent 70%); }
.auth-brand { display: inline-flex; width: fit-content; margin-bottom: 24px; }
.auth-brand img { width: 197px; height: auto; filter: drop-shadow(0 7px 22px rgba(220, 174, 24, 0.15)); }
.auth-intro .eyebrow { margin-bottom: 16px; color: var(--gold-text); font-size: 9px; letter-spacing: 0.19em; }
.auth-intro h1 {
  max-width: 390px;
  color: #f8f6ef;
  font-size: clamp(31px, 2.8vw, 38px);
  font-weight: 420;
  line-height: 1.13;
  letter-spacing: -0.045em;
}
.auth-intro > p {
  max-width: 390px;
  margin-top: 20px;
  color: #969892;
  font-size: 12px;
  line-height: 1.75;
}

.auth-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 36px;
  max-width: 420px;
}
.auth-steps li {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.02);
}
.auth-step__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(220, 174, 24, 0.3);
  border-radius: 9px;
  background: rgba(220, 174, 24, 0.11);
  color: var(--gold-text);
}
.auth-step__copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.auth-step__copy b { display: flex; align-items: center; gap: 10px; color: #efeee8; font-size: 11.5px; font-weight: 600; }
.auth-step__copy em { color: var(--gold-text); font-size: 8.5px; font-style: normal; font-weight: 750; letter-spacing: 0.1em; }
.auth-step__copy small { color: #777b76; font-size: 9.5px; line-height: 1.4; }
.auth-intro__note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 28px;
  color: #858983 !important;
  font-size: 10.5px !important;
}
.auth-intro__note .icon { color: var(--gold-text); }

/* ------------------------------------------------------------------ panel */
.auth-panel {
  min-width: 0;
  color: #1b1b18;
  background:
    radial-gradient(circle at 100% 0, rgba(220, 174, 24, 0.07), transparent 25%),
    linear-gradient(160deg, #fbf8ef 0%, #f8f4e8 100%);
}
html[data-theme='light'] .auth-panel { background: linear-gradient(160deg, #fbf8ef 0%, #f8f4e8 100%); }
.auth-panel__inner {
  padding: 50px 50px 38px;
}
.auth-tabs {
  height: 43px;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  border-radius: 9px;
  background: #ebe3cf;
  border: 1px solid #e3dbc8;
}
.auth-tab {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #7d755f;
  font-size: 11.5px;
  font-weight: 600;
  transition: var(--transition);
}
.auth-tab:hover { color: #544b35; }
.auth-tab.is-active {
  color: #1d1c18;
  background: #fffdf8;
  box-shadow: 0 1px 5px rgba(60, 49, 24, 0.11), inset 0 1px rgba(255, 255, 255, 0.8);
}
.auth-form-panel { padding-top: 34px; animation: fade-up 0.32s ease both; }
.auth-shield {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border: 1px solid #e5c55c;
  border-radius: 9px;
  background: linear-gradient(145deg, #f5df8d, #edcb55);
  color: #5e4609;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.4), 0 5px 14px rgba(157, 118, 13, 0.1);
}
.auth-form-panel h2 {
  color: #1c1b17;
  font-size: clamp(28px, 2.4vw, 32px);
  font-weight: 450;
  line-height: 1.15;
  letter-spacing: -0.04em;
}
.auth-subtitle { margin-top: 7px; color: #7e7867; font-size: 12.5px; line-height: 1.5; }
.auth-form { display: flex; flex-direction: column; gap: 18px; margin-top: 31px; }
.auth-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 15px; }
.auth-form .field { gap: 7px; }
.auth-form .label {
  color: #7c786b;
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: 0.13em;
}
.field-optional { margin-left: auto; color: #a39a84; font-size: 7.5px; font-weight: 600; letter-spacing: 0.06em; }
.auth-input {
  height: 44px;
  border-color: #e2dccd;
  border-radius: 7px;
  background: #fffdf8;
  color: #28261f;
  font-size: 12.5px;
  box-shadow: inset 0 1px 2px rgba(70, 59, 32, 0.025);
}
.auth-input::placeholder { color: #b8b09d; }
.auth-input:hover { border-color: #d3c8ad; }
.auth-input:focus {
  border-color: #c7a42c;
  box-shadow: 0 0 0 3px rgba(220, 174, 24, 0.14);
  background: #fff;
}
.auth-form select.auth-input { color: #5f594a; }
.auth-form select.auth-input option { background: #fff; color: #1b1b18; }
.auth-form .password-toggle { right: 4px; }
.auth-form .password-toggle:hover { color: #8a6808; background: rgba(220, 174, 24, 0.12); }
.auth-form .form-error {
  border-color: rgba(177, 48, 48, 0.22);
  color: #9c2d2d;
  background: rgba(199, 55, 55, 0.065);
}
.auth-form__grid .field--full { grid-column: 1 / -1; }
.auth-consent { color: #7d7665; font-size: 10.5px; line-height: 1.55; }
.auth-consent strong { color: #4d4638; }
.auth-consent input { border-color: #cfc4aa; background: #fffdf8; }
.auth-submit {
  --btn-h: 43px;
  width: 100%;
  border-radius: 7px;
  color: #161205;
  background: linear-gradient(96deg, #c18a09 0%, #f3d451 57%, #f7dc68 100%);
  border-color: rgba(255, 231, 143, 0.4);
  box-shadow: 0 10px 24px rgba(175, 132, 14, 0.19), inset 0 1px rgba(255, 255, 255, 0.35);
  font-size: 11.5px;
}
.auth-submit:hover { box-shadow: 0 13px 28px rgba(175, 132, 14, 0.27), inset 0 1px rgba(255, 255, 255, 0.4); }
.auth-help { display: flex; justify-content: center; margin-top: -3px; }
.auth-help .btn--link { color: #8b6b0a; font-size: 11.5px; font-weight: 600; }
.auth-help .btn--link:hover { color: #6e5405; }
.auth-trust-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 27px;
  padding-top: 16px;
  border-top: 1px solid #e7dfcd;
  color: #8a8475;
}
.auth-trust-note .icon { margin-top: 1px; color: #a17b0c; }
.auth-trust-note p { font-size: 9.5px; line-height: 1.6; }
.auth-trust-note strong { color: #625b4a; font-weight: 650; }
.auth-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 22px;
  color: #a39c8c;
  font-size: 8.5px;
  text-align: center;
}
.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8a6a08;
  font-size: 10px;
  font-weight: 600;
}
.auth-back-link:hover { color: #5f4805; }
#panel-recover .auth-form { margin-top: 24px; }
#panel-recover .field + .field { margin-top: 0; }

.auth-footer {
  width: min(1146px, calc(100% - 48px));
  margin: 0 auto;
  padding: 7px 0 22px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #5e615c;
  font-size: 8.5px;
}
html[data-theme='light'] .auth-footer { color: #8a8577; }

/* -------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .auth-card { min-height: 740px; grid-template-columns: 43% 57%; }
  .auth-intro { padding: 42px 34px 30px; }
  .auth-brand img { width: 164px; }
  .auth-steps { margin-top: 28px; }
  .auth-step__copy small { font-size: 9px; }
  .auth-panel__inner { padding: 40px 36px 32px; }
}

@media (max-width: 860px) {
  .auth-wrap { align-items: flex-start; padding-top: 10px; }
  .auth-card { min-height: 0; grid-template-columns: 1fr; }
  .auth-intro { padding: 32px 30px 28px; }
  .auth-intro__rings { right: -180px; top: -190px; }
  .auth-brand { margin-bottom: 20px; }
  .auth-brand img { width: 156px; }
  .auth-intro h1 { font-size: 28px; max-width: none; }
  .auth-intro > p { margin-top: 12px; max-width: 540px; font-size: 11.5px; }
  .auth-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 21px; max-width: none; }
  .auth-steps li { min-height: 84px; flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px; }
  .auth-step__icon { width: 27px; height: 27px; border-radius: 7px; }
  .auth-step__icon .icon { width: 13px; height: 13px; }
  .auth-step__copy b { display: block; font-size: 10px; line-height: 1.35; }
  .auth-step__copy em { display: none; }
  .auth-step__copy small { display: none; }
  .auth-intro__note { margin-top: 16px; padding-top: 0; font-size: 9.5px !important; }
  .auth-panel__inner { padding: 30px 30px 32px; }
  .auth-form-panel { padding-top: 28px; }
  .auth-form-panel h2 { font-size: 28px; }
  .auth-form { margin-top: 24px; }
  .auth-footer { padding-top: 0; }
}

@media (max-width: 580px) {
  .auth-topbar { width: calc(100% - 28px); min-height: 54px; }
  .auth-wrap { width: calc(100% - 22px); padding: 2px 0 18px; }
  .auth-card { border-radius: 18px; }
  .auth-intro { padding: 25px 21px 23px; }
  .auth-intro h1 { font-size: 25px; }
  .auth-intro > p { font-size: 10.5px; line-height: 1.7; }
  .auth-steps { display: none; }
  .auth-intro__note { margin-top: 17px; }
  .auth-panel__inner { padding: 22px 20px 26px; }
  .auth-tabs { height: 40px; }
  .auth-form-panel { padding-top: 25px; }
  .auth-form-panel h2 { font-size: 26px; }
  .auth-form__grid { grid-template-columns: 1fr; gap: 14px; }
  .auth-form { gap: 15px; }
  .auth-consent { font-size: 9.5px; }
  .auth-trust-note { margin-top: 22px; }
  .auth-secure { font-size: 8px; }
  .auth-footer { width: calc(100% - 30px); flex-direction: column; gap: 3px; padding-bottom: 16px; }
  .demo-chip { display: none; }
  .auth-back { font-size: 10.5px; }
}

/* --------------------------------------------------------------------------
   Non-custodial exchange trading, reviewed USDT custody — auth styles.
   New classes only; existing auth layout, colours and breakpoints untouched.
   -------------------------------------------------------------------------- */

.auth-badge {
  height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(220, 174, 24, 0.3);
  border-radius: 999px;
  background: rgba(220, 174, 24, 0.1);
  color: var(--gold-text);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}
.auth-badge .icon { width: 12px; height: 12px; }
html[data-theme='light'] .auth-badge {
  border-color: rgba(155, 120, 23, 0.32);
  background: rgba(220, 174, 24, 0.14);
  color: #7d6008;
}

/* Six-digit authenticator code: centred, spaced, tabular figures. */
.auth-input--code {
  max-width: 230px;
  height: 50px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-align: center;
}
.auth-input--code::placeholder { color: #cfc7b4; letter-spacing: 0.3em; }

/* Live password requirements. */
.auth-reqs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 13px;
  padding: 0;
  list-style: none;
}
.auth-req {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #847c69;
  font-size: 9.5px;
  line-height: 1.4;
  transition: color var(--transition);
}
.auth-req::before {
  content: '';
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border: 1px solid #d6cebb;
  border-radius: 50%;
  background: transparent;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.auth-req.is-met { color: #4e7330; font-weight: 600; }
.auth-req.is-met::before {
  border-color: #6f9a4a;
  background: #6f9a4a;
  box-shadow: inset 0 0 0 2px #fbf8ef;
}

/* Recovery question read-back panel. */
.auth-question {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid rgba(161, 123, 12, 0.24);
  border-radius: 8px;
  background: rgba(220, 174, 24, 0.07);
}
.auth-question__label {
  color: #8b6b0a;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.auth-question__text {
  color: #3f3a2c;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

/* Inline success / status notice (role="status"). */
.auth-form__notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(72, 128, 68, 0.28);
  border-radius: 7px;
  background: rgba(72, 128, 68, 0.09);
  color: #2f6b36;
  font-size: 10.5px;
  line-height: 1.5;
}

.auth-footer__link {
  color: var(--gold-text);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}
.auth-footer__link:hover { color: #f7dc68; }
html[data-theme='light'] .auth-footer__link { color: #8b6b0a; }
html[data-theme='light'] .auth-footer__link:hover { color: #6e5405; }

/* Recovery step animation for the revealed reset form. */
#recover-form:not(.hidden) { animation: fade-up 0.28s ease both; }

@media (max-width: 580px) {
  .auth-badge { display: none; }
  .auth-input--code { max-width: none; }
}

/* Recovery flow hides the tab strip; the back link is the way out. */
.auth-tabs[hidden] { display: none; }

/* Informational variant of the inline notice (2FA prompt). */
.auth-form__notice--info {
  border-color: rgba(220, 174, 24, 0.32);
  background: rgba(220, 174, 24, 0.1);
  color: #6f5908;
}

/* ---------------------------------------------------- new-device approval */
.device-wait {
  display: grid;
  gap: 1px;
  margin: 18px 0 14px;
  overflow: hidden;
  border: 1px solid #e7dfcd;
  border-radius: 8px;
  background: #e7dfcd;
}
.device-wait > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; background: #fffdf7; }
.device-wait dt { color: #8a8475; font-size: 11px; }
.device-wait dd { margin: 0; color: #2f2a1d; font-size: 11.5px; font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.device-status { display: inline-flex; align-items: center; gap: 6px; }
.device-status::before { width: 7px; height: 7px; border-radius: 50%; background: #c18a09; content: ""; }
.device-status[data-status='pending']::before { animation: device-pulse 1.6s ease-in-out infinite; }
.device-status[data-status='approved'] { color: #1f7a45; }
.device-status[data-status='approved']::before { background: #1f9d55; }
.device-status[data-status='denied'],
.device-status[data-status='revoked'],
.device-status[data-status='expired'] { color: #b42318; }
.device-status[data-status='denied']::before,
.device-status[data-status='revoked']::before,
.device-status[data-status='expired']::before { background: #d92d20; }
@keyframes device-pulse { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .device-status::before { animation: none !important; } }
.device-contact { display: grid; gap: 8px; margin-bottom: 16px; }
.device-contact__lead { color: #625b4a; font-size: 11.5px; line-height: 1.5; }
.device-contact__links { display: flex; flex-wrap: wrap; gap: 8px; }
.device-contact__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #e2d6b8;
  border-radius: 7px;
  background: #fffaf0;
  color: #6e5405;
  font-size: 11.5px;
  font-weight: 650;
  text-decoration: none;
}
.device-contact__link:hover { border-color: #c18a09; background: #fff4d6; }
.device-contact__hours { color: #8a8475; font-size: 10.5px; }
.device-message { min-height: 72px; padding-top: 10px; resize: vertical; }
.field-optional { margin-left: 4px; color: #a39c8c; font-size: 10px; font-weight: 500; }

/* Referral code locked to an invite link */
.field-locked { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; color: #8b6b0a; font-size: 10px; font-weight: 650; letter-spacing: 0.02em; }
.field-locked[hidden] { display: none; }
.field-locked svg { flex: none; }
.auth-input.is-locked,
.auth-input.is-locked:hover,
.auth-input.is-locked:focus { border-color: #dcc98f; background: #faf3df; color: #5c4708; font-weight: 650; letter-spacing: 0.06em; cursor: default; }
.auth-input.is-locked:focus { box-shadow: 0 0 0 3px rgba(220, 174, 24, 0.12); }
.referral-note { color: #7a6a3e; }
.referral-note[hidden] { display: none; }

/* New-device approval: where the member's link went. */
.device-sent {
  margin: 0 0 14px;
  padding: 11px 13px;
  border: 1px solid rgba(193, 138, 9, 0.28);
  border-radius: 12px;
  background: #fffaeb;
  color: #4a4130;
  font-size: 12.5px;
  line-height: 1.55;
}
.device-sent.is-warning { border-color: rgba(217, 45, 32, 0.3); background: #fff4f2; color: #8f1f15; }
