/* ============================================================
   AUTH PAGES — Login & Register
   Split layout: form (right RTL) + trust panel (left)
   ============================================================ */

@import '../../assets/css/mex-tokens.css';

/* Hide site header/footer chrome on auth pages */
.auth-page{
  background: var(--s0);
  color: var(--t1);
  min-height: 100vh;
}

.auth-shell{
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  min-height: 100vh;
  position: relative;
}

/* ===== Left side: Trust / Brand panel ===== */
.auth-panel{
  position: relative;
  padding: 50px 56px;
  background: var(--s1);
  border-inline-start: 1px solid var(--b1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}
.auth-panel::before{
  content:"";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--b1) 1px, transparent 1px),
    linear-gradient(90deg, var(--b1) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 70% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, black 30%, transparent 75%);
  pointer-events: none;
  z-index: 0;
  opacity: .5;
}
.auth-panel__inner{
  position: relative;
  z-index: 2;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.auth-brand{
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 38px;
}
.auth-brand__logo{
  height: 52px;
  width: auto;
  }
.auth-brand__back{
  margin-inline-start: auto;
  font-size: 13px;
  color: rgba(255,255,255,.65);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--b2);
  background: rgba(255,255,255,.02);
  transition: all .2s ease;
}
.auth-brand__back:hover{
  color: var(--t1);
  border-color: var(--b3);
  background: var(--accent-bg);
}

.auth-headline{
  font-family: 'Cairo', 'Tajawal', sans-serif;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 900;
  color: #fff;
  line-height: 1.25;
  margin: 0 0 16px;
  letter-spacing: -0.5px;
}
.auth-headline em{
  font-style: normal;
  /* Solid brand accent (no gradient text): always readable and the same hue
     as the app shell. --accent is defined in styles.css :root; the literal
     fallback keeps the word visible if that sheet fails to load. */
  color: var(--accent, #4f7cff);
}
.auth-sub{
  font-size: 15px;
  color: rgba(255,255,255,.72);
  line-height: 1.85;
  margin: 0 0 36px;
}

/* Stats grid (3 col) */
.auth-stats{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 34px;
}
.auth-stat{
  background: var(--s1);
  border: 1px solid var(--b2);
  border-radius: 12px;
  padding: 18px 14px;
  text-align: center;
  transition: border-color .25s ease, transform .25s ease;
}
.auth-stat:hover{ border-color: var(--b3); }
.auth-stat__val{
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 900;
  color: var(--t1);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}
.auth-stat__lbl{
  font-size: 11.5px;
  color: rgba(255,255,255,.6);
  font-weight: 600;
  letter-spacing: .3px;
}

/* Trust badges (regulators row) */
.auth-trust{
  margin-bottom: 28px;
}
.auth-trust__title{
  font-size: 11px;
  letter-spacing: 3px;
  font-weight: 800;
  color: var(--t3);
  text-transform: uppercase;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.auth-trust__title::before,
.auth-trust__title::after{
  content:"";
  flex: 1;
  height: 1px;
  background: var(--b2);
}
.auth-trust__row{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.auth-trust__chip{
  padding: 8px 14px;
  border-radius: 22px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--b2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  color: rgba(255,255,255,.85);
  letter-spacing: .5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .25s ease;
}
.auth-trust__chip:hover{
  border-color: var(--b3);
  background: var(--s3);
  color: #fff;
}
.auth-trust__chip:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }

/* Single trust line (login): one link to the licences page instead of a
   stats strip + chip wall. Keeps the form primary. */
.auth-trustline{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--b2);
  background: var(--s2);
  color: var(--t2);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 28px;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.auth-trustline svg{ color: var(--accent); flex-shrink: 0; }
.auth-trustline:hover{ border-color: var(--b3); color: var(--t1); }
.auth-trustline:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }

/* Security badges */
.auth-security{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: auto;
  padding-top: 28px;
}
.auth-sec-item{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--s2);
  border: 1px solid var(--b1);
  border-radius: 10px;
}
.auth-sec-item__icon{
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-line);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.auth-sec-item__icon svg{ width: 18px; height: 18px; }
.auth-sec-item__text strong{
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
}
.auth-sec-item__text span{
  font-size: 11px;
  color: rgba(255,255,255,.6);
}

/* ===== Right side: Form ===== */
.auth-form-wrap{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 50px;
  position: relative;
}
.auth-form{
  width: 100%;
  max-width: 460px;
}
.auth-form__head{
  margin-bottom: 32px;
}
.auth-form__eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 16px;
  border: 1px solid var(--b3);
  background: var(--accent-bg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 16px;
}
.auth-form__eyebrow::before{
  content:"";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.auth-form__title{
  font-family: 'Cairo', sans-serif;
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 900;
  color: #fff;
  line-height: 1.25;
  margin: 0 0 10px;
  letter-spacing: -0.3px;
}
.auth-form__subtitle{
  font-size: 14px;
  color: rgba(255,255,255,.7);
  line-height: 1.7;
  margin: 0;
}
.auth-form__subtitle a{ color: var(--accent); font-weight: 700; }
.auth-form__subtitle a:hover{ color: var(--t1); }

/* Prominent login prompt banner (register page) */
.auth-prompt{
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-top: 16px;
  background: var(--s2);
  border: 1px solid var(--b2);
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
  position: relative;
  overflow: hidden;
}
.auth-prompt::before{
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-bg);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.auth-prompt:hover{
  border-color: var(--b3);
}
.auth-prompt:hover::before{ opacity: 1; }
.auth-prompt__icon{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  flex-shrink: 0;
}
.auth-prompt__icon svg{ width: 19px; height: 19px; }
.auth-prompt__text{
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.auth-prompt__label{
  font-size: 12.5px;
  color: rgba(255,255,255,.72);
  font-weight: 600;
  letter-spacing: 0.1px;
}
.auth-prompt__cta{
  font-size: 15.5px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.2px;
}
.auth-prompt__arrow{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform .25s ease;
}
.auth-prompt__arrow svg{ width: 17px; height: 17px; }
.auth-prompt:hover .auth-prompt__arrow{ transform: translateX(4px); }
[dir="rtl"] .auth-prompt__arrow svg{ transform: scaleX(-1); }
[dir="rtl"] .auth-prompt:hover .auth-prompt__arrow{ transform: translateX(-4px); }

/* Form fields */
.auth-field{
  margin-bottom: 16px;
  position: relative;
}
.auth-field__label{
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  margin-bottom: 8px;
}
.auth-field__label-link{
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 600;
}
.auth-field__label-link:hover{ color: var(--t1); }
.auth-input-wrap{
  position: relative;
  display: flex;
  align-items: center;
  background: var(--s0);
  border: 1px solid var(--b2);
  border-radius: 10px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.auth-input-wrap:hover{ border-color: var(--b3); }
.auth-input-wrap:focus-within{
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-line);
  background: var(--s1);
}
.auth-input-wrap__icon{
  width: 20px; height: 20px;
  margin: 0 14px;
  color: rgba(255,255,255,.4);
  flex-shrink: 0;
  transition: color .2s ease;
}
.auth-input-wrap:focus-within .auth-input-wrap__icon{ color: var(--accent); }
.auth-input{
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 14px 14px;
  font-family: inherit;
  font-size: 14.5px;
  color: #fff;
  font-weight: 500;
  width: 100%;
  min-width: 0;
}
.auth-input::placeholder{ color: rgba(255,255,255,.35); }
.auth-input--phone{
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: .5px;
  padding-inline-start: 14px;
}
.auth-toggle-pwd{
  background: transparent;
  border: 0;
  padding: 0 14px;
  cursor: pointer;
  color: rgba(255,255,255,.4);
  display: flex;
  align-items: center;
  height: 100%;
  transition: color .2s ease;
}
.auth-toggle-pwd:hover{ color: var(--t1); }
.auth-toggle-pwd svg{ width: 20px; height: 20px; }

/* Phone field with country code */
.auth-input-wrap--phone .auth-cc{
  padding: 0 12px;
  background: rgba(0,0,0,.25);
  border-inline-start: 1px solid var(--b1);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--t1);
  height: 100%;
  display: flex;
  align-items: center;
  border-radius: 0;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a7b3c9' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: left 4px center;
  background-size: 12px;
  padding-inline-start: 22px;
  border: 0;
  outline: 0;
}
.auth-input-wrap--phone .auth-cc:focus{ background-color: rgba(0,0,0,.35); }

/* Select (country / currency) */
.auth-select-wrap{
  position: relative;
  display: flex;
  align-items: center;
  background: var(--s0);
  border: 1px solid var(--b2);
  border-radius: 10px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.auth-select-wrap:hover{ border-color: var(--b3); }
.auth-select-wrap:focus-within{
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-line);
}
.auth-select-wrap .auth-input-wrap__icon{ color: rgba(255,255,255,.4); }
.auth-select-wrap:focus-within .auth-input-wrap__icon{ color: var(--accent); }
.auth-select{
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  padding: 14px 0;
  padding-inline-end: 14px;
  font-family: inherit;
  font-size: 14.5px;
  color: #fff;
  font-weight: 500;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cfd5e6' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: left 14px center;
  background-size: 16px;
  padding-inline-start: 38px;
}
.auth-select option{ background: #0d1428; color: #fff; }

/* Password strength meter */
.auth-pwd-meter{
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.auth-pwd-meter__bar{
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,.08);
  transition: background .25s ease;
}
.auth-pwd-meter__bar.is-on-1{ background: var(--down); }
.auth-pwd-meter__bar.is-on-2{ background: var(--warn); }
.auth-pwd-meter__bar.is-on-3{ background: #84cc16; }
.auth-pwd-meter__bar.is-on-4{ background: var(--up); }
.auth-pwd-meter__txt{
  font-size: 11px;
  color: rgba(255,255,255,.55);
  margin-top: 6px;
  font-weight: 600;
}
.auth-pwd-meter__txt strong{ color: var(--t1); }

/* Two-column row inside form */
.auth-row-2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Checkbox / Radio */
.auth-check{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 16px;
  cursor: pointer;
  user-select: none;
}
.auth-check input{
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--b3);
  background: var(--s0);
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  position: relative;
  transition: all .2s ease;
}
.auth-check input:hover{ border-color: var(--accent); }
.auth-check input:checked{
  background: var(--accent);
  border-color: var(--accent);
}
.auth-check input:checked::after{
  content: "";
  position: absolute;
  top: 1px; left: 5px;
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.auth-check__text{
  font-size: 12.5px;
  color: rgba(255,255,255,.75);
  line-height: 1.65;
}
.auth-check__text a{ color: var(--accent); font-weight: 700; }
.auth-check__text a:hover{ color: var(--t1); }

/* Submit button */
.auth-submit{
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-family: 'Cairo', sans-serif;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .3px;
  cursor: pointer;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: background var(--dur) var(--ease), transform 80ms var(--ease);
  box-shadow: none;
}
.auth-submit:hover{ background: rgba(79,124,255,.88); }
.auth-submit:active{ transform: translateY(0.5px); }
/* Keyboard focus: same ring as the app shell (system.css :focus-visible) */
.auth-submit:focus-visible,
.auth-step-back:focus-visible,
.auth-brand__back:focus-visible,
.auth-toggle-pwd:focus-visible,
.auth-prompt:focus-visible,
.auth-check input:focus-visible,
.auth-tier:has(input:focus-visible){ outline: 2px solid var(--accent); outline-offset: 2px; }
.auth-submit svg{ width: 18px; height: 18px; }

/* Bottom link */
.auth-bottom{
  margin-top: 26px;
  text-align: center;
  font-size: 13.5px;
  color: rgba(255,255,255,.7);
}
.auth-bottom a{
  color: var(--accent);
  font-weight: 800;
  margin-inline-start: 4px;
}
.auth-bottom a:hover{ color: var(--t1); }

/* Legal footnote */
.auth-legal{
  margin-top: 20px;
  padding: 14px 16px;
  background: rgba(0,0,0,.25);
  border: 1px solid var(--b1);
  border-radius: 10px;
  font-size: 11px;
  color: rgba(255,255,255,.55);
  line-height: 1.75;
  text-align: center;
}
.auth-legal strong{ color: rgba(255,255,255,.75); }
.auth-legal a{ color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.auth-legal a:hover{ color: var(--t1); }

/* ===== Multi-step (Register only) ===== */
.auth-stepper{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}
.auth-step{
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}
.auth-step__num{
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--b2);
  background: var(--s0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 800;
  color: rgba(255,255,255,.5);
  transition: all .35s ease;
  z-index: 2;
  position: relative;
}
.auth-step__num svg{ width: 16px; height: 16px; display: none; }
.auth-step__lbl{
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.5);
  letter-spacing: .3px;
  transition: color .35s ease;
  text-align: center;
}
.auth-step::before{
  content:"";
  position: absolute;
  top: 16px;
  right: calc(50% + 18px);
  left: calc(50% + 18px);
  height: 2px;
  background: var(--accent-bg);
  z-index: 1;
}
.auth-step:first-child::before{ display: none; }
.auth-step.is-active .auth-step__num{
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-line);
}
.auth-step.is-active .auth-step__lbl{ color: var(--t1); }
.auth-step.is-done .auth-step__num{
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.auth-step.is-done .auth-step__num span{ display: none; }
.auth-step.is-done .auth-step__num svg{ display: block; }
.auth-step.is-done::before{ background: var(--accent); }
.auth-step.is-done .auth-step__lbl{ color: rgba(255,255,255,.85); }

.auth-step-pane{ display: none; }
.auth-step-pane.is-active{ display: block; animation: authPaneIn .35s ease; }
@keyframes authPaneIn{
  from{ opacity: 0; transform: translateX(20px); }
  to  { opacity: 1; transform: translateX(0); }
}

.auth-step-actions{
  display: flex;
  gap: 12px;
  margin-top: 8px;
}
.auth-step-actions .auth-submit{ flex: 1; margin-top: 0; }
.auth-step-back{
  padding: 16px 22px;
  border-radius: 12px;
  border: 1px solid var(--b2);
  background: transparent;
  color: rgba(255,255,255,.85);
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .2s ease;
}
.auth-step-back:hover{
  border-color: var(--b3);
  color: #fff;
  background: var(--s3);
}
.auth-step-back svg{ width: 16px; height: 16px; }

/* Account-tier cards (register step 2) */
.auth-tiers{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}
.auth-tier{
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid var(--b2);
  background: var(--s1);
  cursor: pointer;
  transition: all .25s ease;
  position: relative;
}
.auth-tier input{ position: absolute; opacity: 0; pointer-events: none; }
.auth-tier:hover{ border-color: var(--b3); }
.auth-tier:has(input:checked){
  border-color: var(--accent);
  background: var(--accent-bg);
  box-shadow: 0 0 0 3px var(--accent-line);
}
.auth-tier__name{
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}
.auth-tier__desc{
  font-size: 11.5px;
  color: rgba(255,255,255,.6);
  line-height: 1.5;
}
.auth-tier__badge{
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  font-size: 9px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 3px 7px;
  border-radius: 8px;
  letter-spacing: .5px;
}

/* Promo strip atop form */
.auth-promo{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--up-bg);
  border: 1px solid rgba(31,191,117,.3);
  border-radius: 10px;
  margin-bottom: 22px;
  font-size: 12px;
  color: rgba(255,255,255,.85);
  font-weight: 600;
}
.auth-promo__dot{
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--up);
  flex-shrink: 0;
}
.auth-promo strong{ color: var(--up); }

/* Side-panel feature list (register) */
.auth-features-list{
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-features-list li{
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: rgba(255,255,255,.85);
  font-weight: 500;
}
.auth-features-list li svg{
  width: 22px; height: 22px;
  flex-shrink: 0;
  color: var(--accent);
  background: var(--accent-bg);
  border-radius: 50%;
  padding: 4px;
  border: 1px solid var(--b2);
}

/* ===== Responsive ===== */
@media (max-width: 1024px){
  .auth-shell{ grid-template-columns: 1fr; }
  .auth-panel{
    border-inline-start: 0;
    border-bottom: 1px solid var(--b1);
    padding: 38px 28px;
  }
  .auth-panel__inner{ max-width: 720px; }
  .auth-form-wrap{ padding: 40px 28px; }
}

@media (max-width: 640px){
  .auth-panel{ padding: 28px 20px; }
  .auth-form-wrap{ padding: 30px 20px; }
  .auth-stats{ grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .auth-stat{ padding: 12px 6px; }
  .auth-stat__val{ font-size: 18px; }
  .auth-stat__lbl{ font-size: 10px; }
  .auth-security{ grid-template-columns: 1fr; }
  .auth-row-2{ grid-template-columns: 1fr; }
  .auth-tiers{ grid-template-columns: 1fr; }
  .auth-headline{ font-size: 26px; }
  .auth-form__title{ font-size: 22px; }
  .auth-step__lbl{ font-size: 10px; }
  .auth-trust__chip{ font-size: 10px; padding: 6px 10px; }
}

/* ===== Form input overflow safeguards (apply on all viewports) ===== */
.auth-form,
.auth-form-wrap,
.auth-form__body,
.auth-row-2,
.auth-field {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.auth-input-wrap,
.auth-select-wrap {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
/* The phone wrapper hosts the absolutely-positioned country-code dropdown:
   it must not clip it (mobile uses position:fixed so it was unaffected). */
.auth-input-wrap--phone { overflow: visible; }
.auth-input-wrap--phone .auth-cc-trigger { border-start-start-radius: 10px; border-end-start-radius: 10px; }
.auth-input-wrap--phone:has(.auth-cc-picker.is-open) { z-index: 60; }
.auth-field:has(.auth-cc-picker.is-open) { z-index: 60; position: relative; }
.auth-input {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  text-overflow: ellipsis;
}
.auth-input-wrap__icon { flex-shrink: 0; }

@media (max-width: 640px) {
  .auth-input {
    font-size: 15px; /* >= 16px would prevent iOS zoom; 15px is balance */
    padding: 12px 12px;
  }
  .auth-input--phone { padding-inline-start: 12px; }
  .auth-input-wrap__icon {
    width: 18px; height: 18px;
    margin: 0 10px;
  }
  .auth-input-wrap--phone .auth-cc {
    font-size: 12px;
    padding: 0 10px;
    padding-inline-start: 20px;
  }
  .auth-toggle-pwd { padding: 0 12px; }
  .auth-toggle-pwd svg { width: 18px; height: 18px; }
}

/* ============================================================
   Country Code Picker — custom dropdown w/ search
   ============================================================ */
.auth-cc-picker {
  position: relative;
  flex-shrink: 0;
  align-self: stretch;
}

.auth-cc-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  min-height: 50px;
  padding: 0 14px;
  padding-inline-start: 18px;
  background: rgba(0,0,0,.30);
  color: #fff;
  border: 0;
  border-inline-end: 1px solid rgba(255,255,255,.10);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s ease;
}
.auth-cc-trigger:hover { background: rgba(0,0,0,.42); }
.auth-cc-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.auth-cc-picker.is-open .auth-cc-trigger { background: rgba(0,0,0,.42); }

.auth-cc-trigger__flag { font-size: 18px; line-height: 1; }
.auth-cc-trigger__code { font-family: ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .3px; }
.auth-cc-trigger__caret { color: rgba(255,255,255,.55); transition: transform .2s ease; flex-shrink: 0; }
.auth-cc-picker.is-open .auth-cc-trigger__caret { transform: rotate(180deg); }

/* Panel */
.auth-cc-panel {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-start: 0;
  z-index: 50;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: var(--s2);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  box-shadow: var(--sh-pop);
  overflow: hidden;
  animation: ccFadeIn .18s ease-out;
}
.auth-cc-panel[hidden] { display: none !important; }
@keyframes ccFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-cc-search-wrap {
  position: relative;
  padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.02);
}
.auth-cc-search-icon {
  position: absolute;
  inset-inline-start: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,.45);
  pointer-events: none;
}
.auth-cc-search {
  width: 100%;
  height: 38px;
  padding: 0 14px;
  padding-inline-start: 36px;
  background: rgba(0,0,0,.40);
  color: #fff;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-cc-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-line);
}
.auth-cc-search::placeholder { color: rgba(255,255,255,.35); }

.auth-cc-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.20) transparent;
}
.auth-cc-list::-webkit-scrollbar { width: 8px; }
.auth-cc-list::-webkit-scrollbar-track { background: transparent; }
.auth-cc-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.18);
  border-radius: 4px;
}

.auth-cc-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  color: rgba(255,255,255,.92);
  transition: background .12s ease;
  user-select: none;
}
.auth-cc-opt:hover { background: var(--accent-bg); }
.auth-cc-opt.is-selected {
  background: var(--accent-bg);
  color: #fff;
}
.auth-cc-opt.is-selected::before {
  content: "✓";
  position: absolute;
  inset-inline-end: 14px;
  color: var(--accent);
}
.auth-cc-opt { position: relative; }

.auth-cc-opt__flag { font-size: 18px; line-height: 1; flex-shrink: 0; }
.auth-cc-opt__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-cc-opt__dial {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 12.5px;
  color: rgba(255,255,255,.55);
  letter-spacing: .3px;
  margin-inline-end: 18px;
  flex-shrink: 0;
}

.auth-cc-empty {
  padding: 24px 16px;
  text-align: center;
  color: rgba(255,255,255,.45);
  font-size: 13px;
}

/* Mobile: full-width panel from screen edges */
@media (max-width: 640px) {
  .auth-cc-trigger {
    min-height: 46px;
    padding: 0 10px;
    padding-inline-start: 14px;
    font-size: 13px;
    gap: 4px;
  }
  .auth-cc-trigger__flag { font-size: 16px; }
  .auth-cc-trigger__caret { width: 9px; height: 5px; }

  .auth-cc-panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0 !important;
    right: 0 !important;
    width: 100%;
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    animation: ccSlideUp .22s ease-out;
  }
  @keyframes ccSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
  .auth-cc-list { max-height: none; flex: 1; }
  .auth-cc-search-wrap { padding: 14px; }
  .auth-cc-search-icon { inset-inline-start: 26px; }
  .auth-cc-opt { padding: 12px 16px; font-size: 15px; }
  .auth-cc-opt__flag { font-size: 20px; }
}

/* Mobile sheet backdrop */
@media (max-width: 640px) {
  .auth-cc-picker.is-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 49;
    animation: ccBackdropFadeIn .18s ease;
  }
  @keyframes ccBackdropFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

/* ============================================================
   Country Picker — Full-width variant (residence country select)
   ============================================================ */
.auth-cc-picker--full {
  width: 100%;
  align-self: stretch;
  background: var(--s0);
  border: 1px solid var(--b2);
  border-radius: 10px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.auth-cc-picker--full:hover { border-color: var(--b3); }
.auth-cc-picker--full.is-open,
.auth-cc-picker--full:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-line);
  background: var(--s1);
}

.auth-cc-trigger--full {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 0 14px;
  min-height: 50px;
  gap: 10px;
}
.auth-cc-trigger--full:hover { background: transparent; }
.auth-cc-picker--full.is-open .auth-cc-trigger--full { background: transparent; }
.auth-cc-trigger--full .auth-input-wrap__icon {
  width: 20px;
  height: 20px;
  margin: 0;
  margin-inline-end: 4px;
  color: rgba(255,255,255,.4);
  flex-shrink: 0;
  transition: color .2s ease;
}
.auth-cc-picker--full.is-open .auth-input-wrap__icon,
.auth-cc-picker--full:focus-within .auth-input-wrap__icon { color: var(--accent); }

.auth-cc-trigger__name {
  flex: 1;
  min-width: 0;
  text-align: start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14.5px;
  font-weight: 500;
  color: #fff;
}
.auth-cc-trigger__name--placeholder {
  color: rgba(255,255,255,.35);
  font-weight: 400;
}
.auth-cc-trigger--full .auth-cc-trigger__flag:empty { display: none; }
.auth-cc-trigger--full .auth-cc-trigger__flag {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
}

.auth-cc-panel--full {
  width: 100%;
  max-width: 100%;
  inset-inline-start: 0;
  inset-inline-end: 0;
}

@media (max-width: 640px) {
  .auth-cc-trigger--full {
    min-height: 46px;
    padding: 0 12px;
    gap: 8px;
  }
  .auth-cc-trigger--full .auth-input-wrap__icon { width: 18px; height: 18px; }
  .auth-cc-trigger__name { font-size: 14px; }
  .auth-cc-trigger--full .auth-cc-trigger__flag { font-size: 16px; }
}

/* ============================================================
   Live Account Counters — per-country in dropdown
   ============================================================ */
.auth-cc-opt--with-live { padding-inline-end: 14px; }
.auth-cc-opt--with-live.is-selected::before { display: none; }
.auth-cc-opt--with-live.is-selected {
  background: var(--accent-bg);
  box-shadow: inset 2px 0 0 var(--accent);
}
[dir="rtl"] .auth-cc-opt--with-live.is-selected,
.auth-cc-opt--with-live.is-selected {
  box-shadow: inset -2px 0 0 var(--accent);
}

.auth-cc-opt__live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-inline-start: auto;
  padding-inline-start: 10px;
}
.auth-cc-opt__live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: ccPulseDot 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes ccPulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .35; transform: scale(.65); }
}
.auth-cc-opt__count {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .25px;
  color: var(--t2);
  min-width: 56px;
  text-align: end;
  font-variant-numeric: tabular-nums;
  transition: color .25s ease;
}
.auth-cc-opt__count.is-bumped {
  animation: ccCountBump .45s ease;
}
@keyframes ccCountBump {
  0%   { transform: translateY(0);     color: var(--t2); }
  35%  { transform: translateY(-2px);  color: #fff; }
  100% { transform: translateY(0);     color: var(--t2); }
}

@media (max-width: 640px) {
  .auth-cc-opt__count { font-size: 11.5px; min-width: 50px; }
  .auth-cc-opt__live { gap: 5px; padding-inline-start: 8px; }
}

/* ============================================================
   Welcome Modal — post-registration celebration
   ============================================================ */
.wmodal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.wmodal[hidden] { display: none !important; }

.wmodal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7,10,18,.82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .35s ease;
}
.wmodal.is-open .wmodal__backdrop { opacity: 1; }

.wmodal__card {
  position: relative;
  width: min(540px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--s1);
  border: 1px solid var(--b2);
  border-radius: 16px;
  padding: 44px 36px 32px;
  text-align: center;
  box-shadow: var(--sh-modal);
  transform: scale(.85) translateY(40px);
  opacity: 0;
  transition: transform .55s cubic-bezier(.34,1.56,.64,1), opacity .35s ease;
}
.wmodal.is-open .wmodal__card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Subtle gradient border glow */
.wmodal__card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--b2);
  -webkit-mask: linear-gradient(#000,#000) content-box, linear-gradient(#000,#000);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity .8s ease .3s;
}
.wmodal.is-open .wmodal__card::before { opacity: 1; }

/* Decorative orbits */
.wmodal__orbit {
  position: absolute;
  border: 1px solid var(--b1);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .8s ease .4s;
}
.wmodal.is-open .wmodal__orbit { opacity: 1; }
.wmodal__orbit--1 { top: -120px; left: 50%; transform: translateX(-50%); width: 380px; height: 380px; animation: wmOrbit 14s linear infinite; }
.wmodal__orbit--2 { top: -60px;  left: 50%; transform: translateX(-50%); width: 260px; height: 260px; border-color: var(--b1); animation: wmOrbit 10s linear infinite reverse; }
.wmodal__orbit--3 { top: -20px;  left: 50%; transform: translateX(-50%); width: 180px; height: 180px; border-color: var(--b2); animation: wmOrbit 7s linear infinite; }
@keyframes wmOrbit {
  to { transform: translateX(-50%) rotate(360deg); }
}

/* Success ring */
.wmodal__ring {
  position: relative;
  display: inline-flex;
  margin-bottom: 22px;
}
.wmodal__ring svg { display: block; }
.wmodal__ring-bg {
  fill: none;
  stroke: rgba(255,255,255,.06);
  stroke-width: 4;
}
.wmodal__ring-fg {
  fill: none;
  stroke: url(#wmRingGrad);
  stroke-width: 4;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
  stroke-dasharray: 226;
  stroke-dashoffset: 226;
}
.wmodal.is-open .wmodal__ring-fg {
  animation: wmRingDraw .9s ease-out .3s forwards;
}
@keyframes wmRingDraw {
  to { stroke-dashoffset: 0; }
}
.wmodal__check {
  fill: none;
  stroke: var(--up);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
}
.wmodal.is-open .wmodal__check {
  animation: wmCheckDraw .45s ease-out 1.05s forwards;
}
@keyframes wmCheckDraw {
  to { stroke-dashoffset: 0; }
}

/* Sparkles burst */
.wmodal__sparkles {
  position: absolute;
  top: 84px;
  left: 50%;
  width: 0; height: 0;
  pointer-events: none;
}
.wmodal__spark {
  position: absolute;
  top: 0; left: 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%,-50%);
  opacity: 0;
}
.wmodal.is-open .wmodal__spark {
  animation: wmSparkBurst 1.1s ease-out forwards;
  animation-delay: calc(1.1s + var(--d, 0s));
}
@keyframes wmSparkBurst {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.4); }
  20%  { opacity: 1; }
  100% {
    opacity: 0;
    transform:
      translate(-50%, -50%)
      rotate(var(--ang, 0deg))
      translateX(110px)
      scale(.6);
  }
}

/* Title */
.wmodal__title {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 14px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease;
  transition-delay: 1.2s;
}
.wmodal.is-open .wmodal__title { opacity: 1; transform: translateY(0); }
.wmodal__name {
  color: var(--accent);
  font-weight: 900;
  display: inline-block;
  padding: 0 4px;
}
.wmodal__wave {
  display: inline-block;
  font-size: 24px;
  margin-inline-start: 4px;
  animation: wmWave 1.6s ease-in-out infinite;
  transform-origin: 70% 70%;
}
@keyframes wmWave {
  0%, 100% { transform: rotate(0deg); }
  20%      { transform: rotate(15deg); }
  40%      { transform: rotate(-10deg); }
  60%      { transform: rotate(15deg); }
  80%      { transform: rotate(-5deg); }
}

/* Message */
.wmodal__message {
  font-size: 14.5px;
  line-height: 1.85;
  color: rgba(255,255,255,.75);
  margin: 0 0 22px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s ease 1.45s, transform .5s ease 1.45s;
}
.wmodal__message strong {
  color: #fff;
  font-weight: 700;
}
.wmodal.is-open .wmodal__message { opacity: 1; transform: translateY(0); }

/* Stats */
.wmodal__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 24px;
  padding: 16px 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
}
.wmodal__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .45s ease, transform .45s ease;
}
.wmodal__stat:nth-child(1){ transition-delay: 1.6s; }
.wmodal__stat:nth-child(2){ transition-delay: 1.75s; }
.wmodal__stat:nth-child(3){ transition-delay: 1.9s; }
.wmodal.is-open .wmodal__stat { opacity: 1; transform: translateY(0); }

.wmodal__stat-num {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 20px;
  font-weight: 800;
  color: var(--t1);
  letter-spacing: .3px;
}
.wmodal__stat-lbl {
  font-size: 11.5px;
  color: rgba(255,255,255,.55);
  font-weight: 500;
}

/* CTA button */
.wmodal__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 800;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: none;
  transition: transform .2s ease, background .2s ease;
  opacity: 0;
  transform: translateY(8px);
  position: relative;
  overflow: hidden;
}
.wmodal.is-open .wmodal__cta {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .45s ease 2.05s, transform .45s ease 2.05s, background .2s ease;
}
.wmodal__cta:hover:not(:disabled){ background: rgba(79,124,255,.88); }
.wmodal__cta:focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }
.wmodal__cta:active:not(:disabled){ transform: translateY(0); }
.wmodal__cta:disabled{ opacity: .8; cursor: wait; animation: none; }
.wmodal__cta.is-loading{
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: rgba(255,255,255,.85);
}
.wmodal__cta svg { transition: transform .25s ease; }
.wmodal__cta:hover:not(:disabled) svg { transform: translateX(-4px); }

[dir="ltr"] .wmodal__cta:hover:not(:disabled) svg { transform: translateX(4px); }

/* Hint text below CTA */
.wmodal__hint {
  margin: 14px 0 0;
  font-size: 12.5px;
  color: rgba(255,255,255,.4);
  opacity: 0;
  transition: opacity .5s ease 2.3s;
}
.wmodal.is-open .wmodal__hint { opacity: 1; }

/* ----- Mobile ----- */
@media (max-width: 640px) {
  .wmodal { padding: 14px; }
  .wmodal__card {
    padding: 36px 22px 24px;
    border-radius: 18px;
    max-height: calc(100vh - 28px);
  }
  .wmodal__title { font-size: 21px; }
  .wmodal__message { font-size: 13.5px; line-height: 1.8; }
  .wmodal__stats { gap: 6px; padding: 12px 8px; }
  .wmodal__stat-num { font-size: 17px; }
  .wmodal__stat-lbl { font-size: 10.5px; }
  .wmodal__cta { padding: 14px 20px; font-size: 14.5px; }
  .wmodal__orbit--1 { width: 280px; height: 280px; top: -90px; }
  .wmodal__orbit--2 { width: 200px; height: 200px; top: -50px; }
  .wmodal__orbit--3 { width: 140px; height: 140px; top: -20px; }
}
@media (max-width: 380px) {
  .wmodal__stats { grid-template-columns: 1fr; gap: 4px; padding: 10px; }
  .wmodal__stat { flex-direction: row; gap: 8px; padding: 4px 0; }
}

.auth-page { font-family: var(--font-ui); font-size: 14px; line-height: 1.6; }
.auth-page :is(input,button,select,textarea) { font-family: inherit; }
.auth-shell { grid-template-columns: minmax(280px,.8fr) minmax(440px,1.2fr); max-width: 1180px; min-height: 100svh; margin-inline: auto; align-items: center; gap: 40px; padding: 48px 32px; }
.auth-panel { padding: 32px 0; background: transparent; border: 0; overflow: visible; }
.auth-panel::before { display: none; }
.auth-panel__inner { max-width: 390px; }
.auth-brand { margin-bottom: 48px; gap: 16px; flex-wrap: wrap; }
.auth-brand__logo { height: 52px; max-width: 190px; object-fit: contain; }
.auth-brand__back { font-size: 12px; color: var(--t2); }
.auth-headline { font-size: 32px; line-height: 1.4; font-weight: 600; letter-spacing: -.02em; }
.auth-headline em { color: var(--accent-text); -webkit-text-fill-color: var(--accent-text); background: none; font-style: normal; }
.auth-sub { color: var(--t2); font-size: 14px; line-height: 1.8; }
.auth-trustline { font-size: 12px; color: var(--t2); line-height: 1.7; margin-top: 24px; }
.auth-form-wrap { padding: 0; background: transparent; }
.auth-form { width: 100%; max-width: 480px; padding: 32px; background: var(--s1); border: 1px solid var(--b1); border-radius: var(--r4); box-shadow: none; }
.auth-form__head { margin-bottom: 28px; }
.auth-form__eyebrow { color: var(--accent-text); font-size: 11px; letter-spacing: .06em; font-weight: 600; }
.auth-form__title { font-size: 24px; font-weight: 600; line-height: 1.5; }
.auth-form__subtitle { font-size: 13px; line-height: 1.8; color: var(--t2); }
.auth-form a { color: var(--accent-text); }
.auth-field { margin-bottom: 20px; }
.auth-field__label { font-size: 13px; color: var(--t2); font-weight: 500; margin-bottom: 8px; }
.auth-field__label-link { font-size: 12px; }
.auth-input, .auth-select { min-height: 46px; border-radius: var(--r2); background: var(--s0); border: 1px solid var(--b2); color: var(--t1); font-size: 15px; box-shadow: none; }
.auth-input:focus, .auth-select:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); box-shadow: none; }
.auth-input-wrap { border: 1px solid var(--b2); border-radius: var(--r2); background: var(--s0); }
.auth-input-wrap:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: none; border-color: var(--accent); }
.auth-input-wrap > .auth-input { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.auth-input-wrap > .auth-input:focus { outline: none; box-shadow: none; }
.auth-input-wrap__icon { color: var(--t3); width: 18px; height: 18px; }
.auth-toggle-pwd { min-width: 44px; min-height: 44px; color: var(--t2); }
.auth-check__text { font-size: 12px; color: var(--t2); line-height: 1.7; }
.auth-check input { accent-color: var(--accent); }
.auth-submit { min-height: 46px; border-radius: var(--r2); background: var(--action); color: #fff; border: 0; font-size: 14px; font-weight: 600; box-shadow: none; }
.auth-submit:hover:not(:disabled) { background: var(--action-hover); box-shadow: none; transform: none; }
.auth-submit:disabled { opacity: .55; cursor: not-allowed; }
.auth-submit::before, .auth-submit::after { display: none; }
.auth-bottom { font-size: 13px; margin-top: 22px; }
.auth-legal { border-color: var(--b1); color: var(--t3); font-size: 12px; line-height: 1.8; margin-top: 22px; }
.auth-page :is(button,a):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.auth-cc-picker { border-radius: var(--r2); }
.auth-cc-panel { border: 1px solid var(--b2); background: var(--s2); box-shadow: var(--sh-pop); }
.auth-cc-opt { min-height: 44px; }
.wmodal__orbit, .wmodal__sparkles { display: none; }
.wmodal__card { border-radius: var(--r4); box-shadow: var(--sh-modal); }
.wmodal__cta { background: var(--action); border-radius: var(--r2); }
@media(max-width: 900px) {
  .auth-shell { display: flex; flex-direction: column; align-items: stretch; max-width: 560px; padding: 28px 24px; gap: 20px; }
  .auth-panel { display: block; padding: 0; }
  .auth-panel__inner { max-width: none; }
  .auth-brand { margin-bottom: 16px; justify-content: space-between; }
  .auth-brand__logo { height: 32px; }
  .auth-headline { font-size: 22px; margin-block: 12px 0; }
  .auth-sub { display: none; }
  .auth-trustline { margin-top: 12px; }
  .auth-form { max-width: none; padding: 28px; }
}
@media(max-width: 480px) {
  .auth-shell { padding: calc(20px + env(safe-area-inset-top,0px)) 16px calc(32px + env(safe-area-inset-bottom,0px)); gap: 18px; }
  .auth-form { padding: 24px 18px; }
  .auth-form__title { font-size: 22px; }
  .auth-input, .auth-select { font-size: 16px; }
  .auth-headline { font-size: 20px; }
  .auth-brand__logo { height: 28px; }
  .auth-form__head { margin-bottom: 24px; }
}
@media(prefers-reduced-motion: reduce) {
  .auth-page *, .auth-page *::before, .auth-page *::after { animation: none !important; transition-duration: 0ms !important; scroll-behavior: auto !important; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .wmodal__orbit, .wmodal__wave, .wmodal__cta, .wmodal__spark, .wmodal__ring-fg, .wmodal__check,
  .auth-step-pane.is-active, .auth-cc-panel, .auth-cc-picker.is-open::before,
  .auth-cc-opt__live-dot, .auth-cc-opt__count.is-bumped { animation: none !important; }
  .wmodal__ring-fg, .wmodal__check { stroke-dashoffset: 0; }
  .wmodal__card, .wmodal__title, .wmodal__message, .wmodal__stat, .wmodal__cta, .wmodal__hint {
    transition-duration: .1s !important;
    transform: none !important;
  }
}
