:root {
  --auth-font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --auth-bg: #fbfbfa;
  --auth-surface: #fff;
  --auth-subtle: #f6f5f0;
  --auth-text: #111113;
  --auth-muted: #64646f;
  --auth-dim: #92929d;
  --auth-yellow: #f5c518;
  --auth-yellow-hover: #ffd62e;
  --auth-yellow-soft: #fff8cf;
  --auth-border: #e6e5e0;
  --auth-focus: rgba(245, 197, 24, .24);
  --auth-shadow: 0 24px 70px rgba(24, 24, 27, .09), 0 3px 14px rgba(24, 24, 27, .04);
}

*, *::before, *::after { box-sizing: border-box; }

html, body.ekomx-auth, body.ekomx-registration {
  min-height: 100%;
  margin: 0;
  background: var(--auth-bg);
  color: var(--auth-text);
  font-family: var(--auth-font);
  -webkit-font-smoothing: antialiased;
}

body.ekomx-auth, body.ekomx-registration { min-height: 100vh; }

button, input { font: inherit; }
a { color: inherit; }

.auth-stage-wrapper {
  position: relative;
  z-index: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  isolation: isolate;
}

.auth-stage-wrapper::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 92%, rgba(255, 218, 62, .22), transparent 28%),
    radial-gradient(circle at 92% 92%, rgba(112, 186, 215, .14), transparent 30%),
    radial-gradient(circle at 86% 5%, rgba(191, 177, 226, .10), transparent 24%);
}

.auth-top-bar {
  width: min(1180px, calc(100% - 40px));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  z-index: 4;
}

.auth-top-logo .ekomx-brand__text {
  color: var(--auth-text);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.045em;
}

.auth-top-logo .ekomx-brand__x { color: #b48c00; }

.auth-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--auth-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 8px 24px rgba(24, 24, 27, .06);
}

.auth-mode-btn {
  min-height: 40px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  color: var(--auth-muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.auth-mode-btn:hover { color: var(--auth-text); }
.auth-mode-btn:focus-visible { outline: 3px solid var(--auth-focus); outline-offset: 2px; }

.auth-mode-btn.active {
  color: var(--auth-text);
  background: var(--auth-yellow);
  box-shadow: 0 4px 13px rgba(245, 197, 24, .28);
}

.auth-free-pill {
  padding: 2px 7px;
  border-radius: 999px;
  background: #171719;
  color: #fff4a5;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.auth-viewport {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  padding: 18px 20px 70px;
}

.auth-slider-track {
  width: min(1120px, 100%);
  margin: auto;
  position: relative;
}

.auth-pane { display: none; width: 100%; }
[data-active-mode="login"] .auth-pane--login,
[data-active-mode="register"] .auth-pane--register { display: block; animation: auth-enter .34s cubic-bezier(.2,.75,.25,1) both; }
.auth-slider-track.slide-forward .auth-pane--register { animation-name: auth-enter-right; }
.auth-slider-track.slide-backward .auth-pane--login { animation-name: auth-enter-left; }

@keyframes auth-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes auth-enter-right { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes auth-enter-left { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }

.auth-shell {
  width: 100%;
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr);
  gap: clamp(36px, 5vw, 74px);
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.auth-shell--register { min-height: 690px; }

.auth-visual {
  min-width: 0;
  padding: clamp(34px, 4.5vw, 58px);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: visible;
  border-right: 0;
  background: transparent;
}

.auth-visual::after {
  content: "";
  position: absolute;
  inset: auto -18% -38% 8%;
  height: 55%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(245, 197, 24, .12), transparent 67%);
  pointer-events: none;
}

.auth-visual-copy { position: relative; z-index: 2; max-width: 480px; }
.auth-eyebrow, .auth-form-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  color: #6e5b11;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.auth-eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: var(--auth-yellow); box-shadow: 0 0 0 5px rgba(245,197,24,.14); }

.auth-visual h1 {
  max-width: 500px;
  margin: 0 0 14px;
  color: var(--auth-text);
  font-size: clamp(30px, 3.25vw, 48px);
  line-height: 1.04;
  letter-spacing: -.055em;
}

.auth-visual-copy p { max-width: 470px; margin: 0; color: var(--auth-muted); font-size: 15px; line-height: 1.65; }

.auth-object-stage {
  min-height: 310px;
  margin: 12px -18px -4px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.auth-object-halo {
  position: absolute;
  width: 72%;
  aspect-ratio: 1.65;
  bottom: 3%;
  left: 14%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(245,197,24,.18), rgba(245,197,24,.04) 48%, transparent 70%);
  transform: rotate(-5deg);
}

.auth-commerce-hub {
  position: relative;
  z-index: 1;
  display: block;
  width: min(112%, 590px);
  height: auto;
  margin: 0 -6% -2%;
  object-fit: contain;
  filter: drop-shadow(0 18px 16px rgba(24,24,27,.08));
  animation: auth-object-settle .55s .12s cubic-bezier(.2,.8,.25,1) both;
}

@keyframes auth-object-settle { from { opacity: 0; transform: translate3d(-18px,10px,0) scale(.98); } to { opacity: 1; transform: none; } }

.auth-status-card {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 142px;
  padding: 11px 13px;
  border: 1px solid rgba(220, 215, 196, .9);
  border-radius: 14px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 30px rgba(24,24,27,.09);
  animation: auth-card-settle .42s .34s cubic-bezier(.2,.8,.25,1) both;
}

.auth-status-card i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--auth-yellow-soft); color: #7b6200; }
.auth-status-card span { display: flex; flex-direction: column; gap: 2px; }
.auth-status-card b { font-size: 12px; }
.auth-status-card small { color: var(--auth-muted); font-size: 9.5px; }
.auth-status-card--one { left: 2%; bottom: 21%; }
.auth-status-card--two { right: 1%; bottom: 7%; animation-delay: .43s; }

@keyframes auth-card-settle { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }

.auth-capability-list {
  position: relative;
  z-index: 2;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  list-style: none;
  color: #38383f;
  font-size: 11.5px;
  font-weight: 650;
}

.auth-capability-list li { display: flex; align-items: center; gap: 7px; }
.auth-capability-list i { color: #8d7000; font-size: 10px; }

.auth-form-column {
  min-width: 0;
  padding: clamp(38px, 5vw, 64px) clamp(30px, 5vw, 58px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  border-radius: 24px;
  box-shadow: var(--auth-shadow);
}

.auth-form-column--register { padding: 32px clamp(28px, 4vw, 48px); }
.auth-header { margin-bottom: 28px; }
.auth-header--compact { margin-bottom: 19px; }
.auth-form-kicker { margin-bottom: 10px; }
.auth-header .auth-title { margin: 0 0 8px; outline: none; font-size: clamp(27px, 3vw, 36px); line-height: 1.12; letter-spacing: -.045em; }
.auth-header .auth-subtitle { margin: 0; color: var(--auth-muted); font-size: 14px; line-height: 1.55; }

.auth-form .form-group { margin-bottom: 20px; }
.auth-form label, .f-group label { display: block; margin-bottom: 7px; color: #29292e; font-size: 12.5px; font-weight: 700; }
.auth-password-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-password-header label { margin: 0; }
.auth-link { color: #4f4f57; font-size: 12.5px; font-weight: 700; text-decoration: none; }
.auth-link:hover { color: var(--auth-text); text-decoration: underline; text-underline-offset: 3px; }
.auth-link:focus-visible { outline: 3px solid var(--auth-focus); outline-offset: 3px; border-radius: 3px; }

.auth-input,
.f-group input {
  width: 100%;
  min-width: 0;
  height: 47px;
  padding: 0 14px;
  border: 1.5px solid #dedde0;
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: var(--auth-text);
  font-size: 13.5px;
  transition: border-color .17s ease, box-shadow .17s ease, background-color .17s ease;
}

.auth-input::placeholder, .f-group input::placeholder { color: #aaa9b0; }
.auth-input:focus, .f-group input:focus, .subdomain-box:focus-within { border-color: #cba20c; box-shadow: 0 0 0 4px var(--auth-focus); }
.auth-input.is-invalid { border-color: #dc2626; }
.auth-field-error { margin-top: 5px; color: #b42318; font-size: 12px; font-weight: 600; }

.password-field-wrap { position: relative; }
.password-field-wrap input { padding-right: 44px; }
.password-toggle-btn { position: absolute; top: 50%; right: 9px; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #777780; cursor: pointer; }
.password-toggle-btn:hover { background: #f5f4f0; color: var(--auth-text); }
.password-toggle-btn:focus-visible { outline: 3px solid var(--auth-focus); }

.auth-check-wrap { display: flex !important; align-items: center; gap: 9px; cursor: pointer; }
.auth-check-wrap input, .check-row input { width: 17px; height: 17px; flex: 0 0 auto; margin: 0; accent-color: #1c1c1e; }
.auth-check-label { margin: 0; color: var(--auth-muted); font-size: 12.5px; font-weight: 600; }

.btn-auth-submit, .btn-submit {
  width: 100%;
  min-height: 49px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid rgba(24,24,27,.08);
  border-radius: 11px;
  background: var(--auth-yellow);
  color: var(--auth-text);
  box-shadow: 0 10px 25px rgba(245,197,24,.22);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, background-color .18s ease, box-shadow .18s ease;
}

.btn-auth-submit:hover, .btn-submit:hover { background: var(--auth-yellow-hover); transform: translateY(-1px); box-shadow: 0 12px 27px rgba(245,197,24,.3); }
.btn-auth-submit:focus-visible, .btn-submit:focus-visible { outline: 3px solid var(--auth-focus); outline-offset: 3px; }
.btn-auth-submit:disabled, .btn-submit:disabled { cursor: wait; opacity: .72; transform: none; }
.auth-footer-prompt { margin-top: 25px; text-align: center; color: var(--auth-muted); font-size: 12.5px; }
.auth-footer-prompt a { color: var(--auth-text); font-weight: 800; text-decoration-color: #cba20c; text-underline-offset: 4px; }

.f-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.f-group { min-width: 0; margin-bottom: 13px; }
.f-group .opt { margin-left: 4px; color: var(--auth-dim); font-size: 10px; font-weight: 600; }
.auth-phone-verification { margin: 0 0 14px; padding: 12px; border: 1px solid var(--auth-border); border-radius: 10px; background: #fffdf3; }
.auth-phone-status { margin-bottom: 9px; color: var(--auth-muted); font-size: 11.5px; line-height: 1.45; }
.auth-phone-status.text-danger { color: #b42318 !important; font-weight: 650; }
.auth-phone-status.text-success { color: #17652d !important; font-weight: 650; }
.auth-phone-verification.is-verified { border-color: #95cfa6; background: #f2fbf4; }
.auth-phone-verification.is-verified .auth-phone-status { margin: 0; color: #17652d; font-weight: 700; }
.auth-otp-request, .auth-otp-controls button { min-height: 38px; padding: 0 13px; border: 1px solid #d2aa12; border-radius: 8px; background: var(--auth-yellow); color: var(--auth-text); font-size: 11.5px; font-weight: 800; cursor: pointer; }
.auth-otp-entry { margin-top: 12px; }
.auth-otp-entry label { display: block; margin-bottom: 7px; color: #29292e; font-size: 12px; font-weight: 700; }
.auth-otp-controls { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; }
.auth-otp-controls input { width: 100%; min-height: 40px; border: 1.5px solid #dedde0; border-radius: 8px; padding: 0 12px; font-size: 16px; letter-spacing: .18em; }
.auth-phone-verification button:focus-visible, .auth-otp-controls input:focus-visible { outline: 3px solid var(--auth-focus); outline-offset: 2px; }
.auth-phone-verification button:disabled { cursor: wait; opacity: .65; }
.auth-domain-group { margin-bottom: 13px; }
.auth-domain-group > small { display: block; margin-top: 6px; color: var(--auth-dim); font-size: 10.5px; }
.subdomain-box { display: flex; min-width: 0; overflow: hidden; border: 1.5px solid #dedde0; border-radius: 10px; transition: border-color .17s ease, box-shadow .17s ease; }
.subdomain-box input { min-width: 0; border: 0; border-radius: 0; box-shadow: none !important; }
.subdomain-suffix { display: flex; align-items: center; padding: 0 12px; border-left: 1px solid var(--auth-border); background: #f7f6f2; color: var(--auth-muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.check-row { display: flex; align-items: flex-start; gap: 9px; margin: 5px 0 16px; }
.check-row input { margin-top: 2px; }
.check-row label { margin: 0; color: var(--auth-muted); font-size: 10.5px; font-weight: 500; line-height: 1.55; }
.check-row a { color: #3d3d43; font-weight: 700; text-underline-offset: 2px; }
.captcha-wrap { margin-bottom: 12px; overflow-x: auto; }

.pwindicator { height: 3px; margin-top: 6px; overflow: hidden; border-radius: 999px; background: #ecebe8; }
.pwindicator .bar { height: 100%; width: 0; background: var(--auth-yellow); transition: width .2s ease; }
.pwindicator .label { display: none; }

.auth-bottom-aurora {
  position: fixed;
  z-index: -1;
  left: 0;
  right: 0;
  bottom: -125px;
  height: 250px;
  pointer-events: none;
  opacity: .38;
  overflow: hidden;
}

.auth-glow-gold, .auth-glow-neutral { position: absolute; bottom: -95px; width: 54%; height: 235px; border-radius: 50%; filter: blur(52px); }
.auth-glow-gold { left: 4%; background: radial-gradient(ellipse, rgba(245,197,24,.34), transparent 69%); }
.auth-glow-neutral { right: 2%; background: radial-gradient(ellipse, rgba(179,184,169,.2), transparent 69%); }

.admin-auth-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.admin-auth-card {
  width: min(460px, 100%);
  padding: clamp(32px, 5vw, 52px);
  border: 1px solid var(--auth-border);
  border-radius: 20px;
  background: var(--auth-surface);
  box-shadow: var(--auth-shadow);
  animation: auth-enter .34s cubic-bezier(.2,.75,.25,1) both;
}

.admin-auth-brand { margin-bottom: 38px; }
.admin-auth-brand .ekomx-brand__text { color: var(--auth-text); font-size: 20px; font-weight: 800; letter-spacing: -.04em; }
.admin-auth-brand .ekomx-brand__x { color: #b48c00; }
.admin-auth-header { margin-bottom: 30px; }
.admin-auth-header h1 { margin: 0 0 9px; color: var(--auth-text); font-size: clamp(30px, 5vw, 38px); line-height: 1.12; letter-spacing: -.04em; }
.admin-auth-header p { max-width: 38ch; margin: 0; color: var(--auth-muted); font-size: 14px; line-height: 1.6; }

@media (max-width: 980px) {
  .auth-shell { grid-template-columns: minmax(0, .9fr) minmax(390px, 1.1fr); }
  .auth-shell{gap:24px}
  .auth-visual { padding: 34px 20px; }
  .auth-visual h1 { font-size: 34px; }
  .auth-object-stage { min-height: 275px; margin-inline: -38px; }
  .auth-status-card { min-width: 128px; }
  .auth-status-card--one { left: -2%; }
  .auth-status-card--two { right: -2%; }
}

@media (max-width: 780px) {
  .auth-top-bar { width: min(100% - 28px, 620px); min-height: auto; padding: 15px 0 12px; }
  .auth-viewport { padding: 8px 14px 48px; align-items: flex-start; }
  .auth-slider-track { max-width: 620px; }
  .auth-shell, .auth-shell--register { min-height: 0; grid-template-columns: 1fr; gap:16px; border-radius: 0; }
  .auth-visual { min-height: 210px; padding: 25px 25px 0; border:0; }
  .auth-visual-copy { max-width: 88%; }
  .auth-visual h1 { font-size: 28px; margin-bottom: 8px; }
  .auth-visual-copy p { font-size: 12.5px; line-height: 1.5; }
  .auth-object-stage { min-height: 145px; height: 145px; margin: -4px -10px 0 auto; width: 62%; }
  .auth-commerce-hub { width: min(112%, 290px); margin: 0 -6% -2%; transform-origin: center bottom; }
  .auth-status-card { display: none; }
  .auth-capability-list { display: none; }
  .auth-form-column, .auth-form-column--register { padding: 30px 25px 34px; }
  .auth-header { margin-bottom: 23px; }
}

@media (max-width: 560px) {
  html, body.ekomx-auth, body.ekomx-registration { width: 100%; max-width: 100%; overflow-x: hidden; }
  .auth-top-bar { width: calc(100% - 24px); flex-direction: column; gap: 12px; }
  .auth-mode-switch { width: 100%; max-width: 360px; min-width: 0; }
  .auth-mode-btn { min-width: 0; flex: 1 1 0; padding-inline: 8px; font-size: 12px; white-space: nowrap; }
  .auth-slider-track, .auth-pane, .auth-shell, .auth-form-column, .auth-register-form, .f-row, .f-group { min-width: 0; max-width: 100%; }
  .auth-form-column { width: 100%; overflow: hidden; }
  .auth-input, .f-group input, .auth-phone-verification, .subdomain-box { max-width: 100%; }
  .auth-visual { min-height: 175px; padding: 21px 21px 0; }
  .auth-visual h1 { font-size: 24px; max-width: 330px; }
  .auth-visual-copy p { max-width: 300px; }
  .auth-object-stage { position: absolute; right: -24px; bottom: -5px; width: 49%; min-height: 130px; opacity: .76; }
  .auth-commerce-hub { width: min(115%, 220px); margin-right: -8%; }
  .auth-form-column, .auth-form-column--register { padding: 27px 20px 30px; }
  .auth-header .auth-title { font-size: 27px; }
  .f-row { grid-template-columns: 1fr; gap: 0; }
  .f-group { margin-bottom: 12px; }
  .subdomain-suffix { max-width: 48%; padding-inline: 9px; overflow: hidden; text-overflow: ellipsis; }
  .auth-bottom-aurora { height: 190px; bottom: -110px; opacity: .42; }
  .admin-auth-stage { align-items: start; padding: 24px 14px; }
  .admin-auth-card { padding: 30px 22px 34px; border-radius: 16px; }
  .admin-auth-brand { margin-bottom: 30px; }
}

@media (max-width: 380px) {
  .auth-free-pill { display: none; }
  .auth-mode-btn { font-size: 11.5px; }
  .auth-visual-copy { max-width: 100%; }
  .auth-visual-copy p { max-width: 235px; }
  .auth-object-stage { opacity: .52; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.auth-login-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 24px; border: 1px solid #e4e4e7; border-radius: 10px; background: #f5f5f4; }
.auth-login-tabs button { flex: 1; min-width: 0; min-height: 44px; padding: 10px 8px; border: 0; border-radius: 7px; background: transparent; color: #52525b; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.auth-login-tabs button[aria-selected="true"] { background: #facc15; color: #18181b; }
.auth-login-tabs button:focus-visible { outline: 2px solid #806600; outline-offset: 2px; }
.auth-otp-help { margin: 0 0 20px; color: #71717a; font-size: 14px; line-height: 1.6; }
#mobileLoginPanel[hidden], #loginForm[hidden] { display: none !important; }
