/* ============================================================
   XBORDER Member — Design system
   Deep Navy #0A1B3D / Gold #D4AF37 / Warm White #F6F7FA.
   Premium, international, corporate — visually part of the XBORDER
   family (see xborder-admin/css/admin.css for the sibling system)
   while remaining clearly distinct from both the public marketing
   site and the internal Admin tool. System font stack only, no
   external font/network dependency.
   ============================================================ */

:root {
  --xm-navy: #0A1B3D;
  --xm-navy-700: #1B3266;
  --xm-gold: #D4AF37;
  --xm-gold-600: #B8952A;
  --xm-white: #F6F7FA;
  --xm-ink: #10182B;
  --xm-ink-muted: #4B5468;
  --xm-border: #E1E4EC;
  --xm-surface: #FFFFFF;
  --xm-danger: #B42318;
  --xm-danger-bg: #FEECEC;
  --xm-success: #1D7A4C;
  --xm-success-bg: #E6F6EC;
  --xm-warning-bg: #FFF4DE;
  --xm-warning-ink: #9A6A00;
  --xm-radius: 10px;
  --xm-radius-lg: 16px;
  --xm-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Thai",
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--xm-white);
  color: var(--xm-ink);
  font-family: var(--xm-font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.screen { min-height: 100vh; }

/* ---------- Auth pages (register/login/forgot/reset/confirm) ----
   LIVE QA v9: SURGICAL VISUAL CORRECTION. JARVIS/LEON rejected the
   v8 "centered SaaS card" treatment. The warm-white PAGE itself is
   now the canvas — no floating white card, no circular navy logo
   chip — reproducing the approved reference's full-page editorial
   composition: large logo lockup, thin gold dividers, outlined
   (not pill) fields, and a real Earth photograph anchored to the
   lower-left of the page. Still light/warm-white — the LIGHT
   counterpart to Admin's dark full-bleed treatment, never copied
   from it. */
.xm-auth-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background:
    radial-gradient(circle at 85% 8%, rgba(212, 175, 55, 0.06), transparent 40%),
    var(--xm-white);
  padding: 24px 20px 0;
  overflow: hidden;
  /* Shared with .xm-auth-content's bottom padding below (always
     40px taller) so the strap/divider — now the last element inside
     the content column — can never visually collide with the Earth
     artwork or its caption, at any viewport width. */
  --xm-earth-h: clamp(240px, 34vw, 460px);
}

/* Real Earth photograph (extracted from the same locked public-site
   source as the official logo mark — see xborder-member-earth-hero
   in the report) pinned to the bottom of the page. The source photo
   has a solid black backdrop; mix-blend-mode:screen makes black
   vanish into the warm-white page while the illuminated globe and
   city-light glow remain, so no separate light-background cutout of
   the photo was needed. Decorative only: aria-hidden, pointer-events
   none, never overlaps or blocks any control. */
.xm-auth-earth {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--xm-earth-h);
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
/* The source photo (same locked public-site asset as the official
   logo) has a solid black backdrop. Rather than a CSS blend mode
   (mix-blend-mode:screen only vanishes black against a DARK page —
   against Member's white it inverts the wrong way and washes the
   whole image out), the PNG itself was pre-processed so its alpha
   channel follows the photo's own luminance: the black background is
   genuinely transparent, the globe/city-light glow stays solidly
   visible. See report for the exact derivation. */
.xm-auth-earth-img {
  position: absolute;
  left: -10%;
  bottom: -22%;
  width: 82%;
  min-width: 620px;
  max-width: 1180px;
  height: auto;
}
.xm-auth-earth-caption {
  position: absolute;
  right: clamp(16px, 5vw, 64px);
  bottom: 20px;
  text-align: right;
  color: var(--xm-gold-600);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.65;
  margin: 0;
}

/* Compact segmented language control (TH / EN / 中文), aligned to
   the top-right of the central content column — not the bare corner
   of the viewport, and not three unrelated tiny buttons. */
.xm-auth-lang-row {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 4px;
}
.xm-lang-segmented {
  display: inline-flex;
  border: 1px solid var(--xm-border);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
}
.xm-lang-segmented .xm-lang-btn {
  border: none;
  border-radius: 0;
  padding: 6px 14px;
  background: transparent;
}
.xm-lang-segmented .xm-lang-btn + .xm-lang-btn {
  border-left: 1px solid var(--xm-border);
}
.xm-lang-segmented .xm-lang-btn[aria-pressed="true"] {
  background: var(--xm-gold);
  color: var(--xm-navy);
}

/* The central editorial column — the page IS the canvas, this is
   just a width constraint for readable line-length, not a card. */
.xm-auth-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0 calc(var(--xm-earth-h) + 40px);
}

.xm-auth-content form {
  width: 100%;
}

.xm-auth-brand {
  text-align: center;
  margin-bottom: 20px;
}

/* Large, unwrapped logo lockup — no chip/plate of any kind. Uses the
   navy+gold light-background variant (see report: the achromatic
   "white" stroke of the one official mark asset was remapped to
   navy so it reads on a light page; the gold stroke/star are the
   asset's original, untouched pixels; geometry/aspect ratio
   unchanged). */
.xm-auth-logo {
  display: block;
  width: clamp(108px, 15vw, 176px);
  height: auto;
  aspect-ratio: 454 / 296;
  object-fit: contain;
  margin: 4px auto 8px;
}

.xm-auth-wordmark-main {
  display: block;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: 0.09em;
  color: var(--xm-navy);
  margin: 2px 0 0;
}

.xm-auth-wordmark-sub {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--xm-gold-600);
  margin: 5px 0 0;
}

.xm-auth-tagline {
  color: var(--xm-gold-600);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 14px 0 0;
  line-height: 1.7;
}

.xm-auth-divider {
  width: 56px;
  height: 2px;
  background: var(--xm-gold);
  border: none;
  margin: 18px 0 16px;
}

.xm-auth-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--xm-navy);
  margin: 0 0 4px;
  text-align: center;
}

/* Small dashboard-header logo chip only (30px, on the still-navy
   dashboard header — see .xm-header-mark below). NOT used on the
   auth pages any more (see .xm-auth-logo above, unwrapped). */
.xm-logo-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--xm-navy);
  margin-bottom: 12px;
}

.xm-mark {
  width: 56px;
  height: 56px;
  padding: 8px;
}

.xm-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.xm-auth-subtitle {
  color: var(--xm-ink-muted);
  font-size: 13.5px;
  margin: 0 0 22px;
  text-align: center;
}

.xm-auth-strap {
  position: relative;
  z-index: 1;
  color: var(--xm-ink-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  margin: 20px 0 0;
}

.xm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--xm-navy);
}

.xm-field input {
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  padding: 11px 13px;
  border-radius: var(--xm-radius);
  border: 1px solid var(--xm-border);
  background: var(--xm-surface);
  color: var(--xm-ink);
}

.xm-field input:focus {
  outline: none;
  border-color: var(--xm-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

.xm-field-error {
  color: var(--xm-danger);
  font-size: 12px;
  font-weight: 500;
  min-height: 1em;
}

/* Icon-prefixed inputs (email/lock glyphs), used only on the auth
   screens — matches the reference mockup's field styling. Icons are
   inline SVG (no new asset/network dependency), purely decorative
   (aria-hidden), positioned over the input's own left padding. */
.xm-field-icon {
  position: relative;
  display: block;
}
.xm-field-icon svg {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--xm-ink-muted);
  pointer-events: none;
}
.xm-field-icon input {
  padding-left: 42px;
}

/* Password-visibility toggle — real, functional, purely a client-
   side display switch (input[type]); never touches auth/session
   logic. Reused on every password field across the Member auth
   flow (login, register x2, reset x2). */
.xm-password-wrap {
  position: relative;
}
.xm-password-wrap input {
  padding-right: 42px;
}
.xm-password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 50%;
  color: var(--xm-ink-muted);
  cursor: pointer;
  padding: 0;
}
.xm-password-toggle:hover { color: var(--xm-navy); background: rgba(10, 27, 61, 0.06); }
.xm-password-toggle svg { width: 18px; height: 18px; }

.xm-visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.xm-login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 2px 0 18px;
}

.xm-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--xm-ink-muted);
  cursor: pointer;
}

.xm-auth-link-line {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--xm-ink-muted);
}

.xm-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--xm-radius);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  width: 100%;
  transition: background-color 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
}

/* LIVE QA v6: gold primary actions on the light Member surface (see
   brief Section B) — was navy, which read correctly on the old navy
   auth background but loses contrast/brand distinction on light. */
.xm-btn-primary { background: var(--xm-gold); color: var(--xm-navy); }
.xm-btn-primary:hover { background: var(--xm-gold-600); }
.xm-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.xm-btn-secondary {
  background: var(--xm-surface);
  color: var(--xm-navy);
  border-color: var(--xm-border);
}
.xm-btn-secondary:hover { border-color: var(--xm-navy); }

.xm-btn-link {
  background: none;
  border: none;
  color: var(--xm-navy-700);
  font-weight: 600;
  width: auto;
  padding: 0;
  text-decoration: underline;
}

.xm-form-banner {
  border-radius: var(--xm-radius);
  padding: 12px 14px;
  font-size: 13px;
  margin: 0 0 16px;
}
.xm-form-banner.is-error { background: var(--xm-danger-bg); color: var(--xm-danger); }
.xm-form-banner.is-success { background: var(--xm-success-bg); color: var(--xm-success); }

.xm-auth-links {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--xm-ink-muted);
  flex-wrap: wrap;
  gap: 8px;
}

.xm-lang-switcher {
  display: flex;
  gap: 6px;
}
/* Default (light-bg) styling — used on the auth shell, which is now
   warm-white. The dark .xm-header override below restores the
   original light-on-navy styling for the (still navy) dashboard
   header context. */
.xm-lang-btn {
  background: transparent;
  border: 1px solid var(--xm-border);
  color: var(--xm-navy);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.xm-lang-btn[aria-pressed="true"] {
  background: var(--xm-gold);
  border-color: var(--xm-gold);
  color: var(--xm-navy);
}

/* ---------- Centered informational screens ---------- */
.xm-center-card {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px;
  text-align: center;
  max-width: 460px;
  margin: 0 auto;
}
.xm-center-card h1 { color: var(--xm-navy); font-size: 20px; margin: 0; }
.xm-center-card p { color: var(--xm-ink-muted); margin: 0; }
.xm-center-card .xm-btn { width: auto; padding-left: 24px; padding-right: 24px; }

.xm-spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--xm-border);
  border-top-color: var(--xm-gold);
  animation: xm-spin 0.8s linear infinite;
}
@keyframes xm-spin { to { transform: rotate(360deg); } }

.xm-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.xm-status-badge[data-status="pending"] { background: var(--xm-warning-bg); color: var(--xm-warning-ink); }
.xm-status-badge[data-status="approved"] { background: var(--xm-success-bg); color: var(--xm-success); }
.xm-status-badge[data-status="suspended"] { background: var(--xm-danger-bg); color: var(--xm-danger); }

/* ---------- Dashboard shell (v13 — approved-design reproduction) ---------- */
.xm-welcome-card {
  background: var(--xm-surface);
  border: 1px solid var(--xm-border);
  border-radius: var(--xm-radius-lg);
  padding: 28px;
  margin-bottom: 24px;
}
.xm-welcome-name { font-size: 22px; color: var(--xm-navy); margin: 0 0 14px; }

.xm-card-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 16px; }
.xm-shell-card {
  background: var(--xm-surface);
  border: 1px solid var(--xm-border);
  border-radius: var(--xm-radius-lg);
  padding: 22px;
}
.xm-shell-card h2 { font-size: 15px; color: var(--xm-navy); margin: 0; }
.xm-shell-card p { font-size: 13px; color: var(--xm-ink-muted); margin: 10px 0 0; }
.xm-shell-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.xm-coming-soon {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--xm-ink-muted); background: var(--xm-white); border: 1px solid var(--xm-border);
  border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}

.xm-profile-form { max-width: 420px; }
.xm-readonly-field {
  padding: 11px 13px;
  border-radius: var(--xm-radius);
  border: 1px solid var(--xm-border);
  background: var(--xm-white);
  color: var(--xm-ink-muted);
  font-size: 14px;
}

/* Overall two-column shell: fixed left sidebar + scrollable main column. */
.xm-dash-shell {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
  background: var(--xm-white);
}

.xm-dash-sidebar {
  width: 260px;
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
  padding: 32px 24px;
  border-right: 1px solid var(--xm-border);
  background: var(--xm-surface);
}
.xm-dash-sidebar-brand { margin-bottom: 32px; }
.xm-dash-logo { display: block; width: 100%; max-width: 180px; height: auto; }
.xm-dash-tagline {
  margin: 14px 0 0;
  color: var(--xm-gold-600);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.7;
}
.xm-dash-tagline span { display: block; }

.xm-dash-nav { display: flex; flex-direction: column; gap: 4px; }
.xm-dash-nav-item {
  appearance: none;
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  border-radius: var(--xm-radius);
  border: none;
  background: transparent;
  color: var(--xm-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.xm-dash-nav-item:hover { background: var(--xm-white); }
.xm-dash-nav-item:first-child { background: var(--xm-gold-bg, rgba(212, 175, 55, 0.14)); color: var(--xm-navy); }

.xm-dash-sidebar-strap {
  margin-top: auto;
  padding-top: 24px;
  color: var(--xm-ink-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.8;
}

.xm-dash-main-col {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.xm-dash-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 40px 0;
  flex-wrap: wrap;
}
.xm-dash-topbar-heading h1 {
  margin: 0;
  font-size: 26px;
  color: var(--xm-navy);
}
.xm-dash-topbar-heading p {
  margin: 4px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--xm-gold-600);
}
.xm-dash-topbar-actions { display: flex; align-items: center; gap: 12px; }

.xm-dashboard-main {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 40px 60px;
  position: relative;
  z-index: 1;
}

.xm-welcome-eyebrow {
  margin: 0;
  font-size: 13px;
  color: var(--xm-ink-muted);
}
.xm-welcome-body {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--xm-ink-muted);
  max-width: 520px;
}
.xm-welcome-strap {
  margin: 16px 0 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--xm-ink-muted);
}

.xm-info-card {
  background: var(--xm-surface);
  border: 1px solid var(--xm-border);
  border-radius: var(--xm-radius-lg);
  padding: 20px 22px;
}
.xm-info-card h2 { margin: 0; font-size: 15px; color: var(--xm-navy); }
.xm-info-card-meta { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.xm-info-card-meta dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--xm-ink-muted); margin: 0; }
.xm-info-card-meta dd { margin: 0; font-size: 14px; font-weight: 700; color: var(--xm-navy); }
.xm-info-card-body { margin: 10px 0 0; font-size: 13px; color: var(--xm-ink-muted); }

/* Bottom Earth band — same official asset/technique as the auth screens
   (object-fit:cover, bottom-anchored, caption baked into the image). */
.xm-dash-earth {
  position: relative;
  z-index: 0;
  width: 100%;
  height: clamp(160px, 20vw, 260px);
  overflow: hidden;
  margin-top: 24px;
}
.xm-dash-earth-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

@media (max-width: 900px) {
  .xm-dash-shell { flex-direction: column; }
  .xm-dash-sidebar {
    width: auto; flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    padding: 16px 20px;
    border-right: none;
    border-bottom: 1px solid var(--xm-border);
    gap: 16px;
  }
  .xm-dash-sidebar-brand { margin-bottom: 0; display: flex; align-items: center; }
  .xm-dash-logo { max-width: 120px; }
  .xm-dash-tagline { display: none; }
  .xm-dash-nav { flex-direction: row; margin-left: auto; gap: 2px; }
  .xm-dash-nav-item { padding: 8px 10px; font-size: 13px; white-space: nowrap; }
  .xm-dash-sidebar-strap { display: none; }
  .xm-dash-topbar { padding: 20px 20px 0; }
  .xm-dash-topbar-heading h1 { font-size: 21px; }
  .xm-dashboard-main { padding: 18px 20px 40px; }
  .xm-card-row { grid-template-columns: 1fr; }
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .xm-auth-shell { padding: 18px 16px 0; --xm-earth-h: clamp(200px, 60vw, 320px); }
  .xm-auth-earth-img { min-width: 480px; left: -22%; bottom: -16%; }
  .xm-dashboard-main { padding: 20px 16px 48px; }
  .xm-meta-grid { grid-template-columns: 1fr; }
  .xm-header { padding: 12px 16px; }
}

/* ==========================================================================
   MEMBER AUTH — SHARED VISUAL SYSTEM (v12)
   Originally built as the v11 Login-only rebuild (.xm-login-* classes).
   v12 extends it into one shared system used by ALL FIVE Member auth
   screens (Login, Register, Forgot Password, Reset Password, Confirm
   Email): every selector below matches BOTH the original .xm-login-*
   classes (still the only classes present in Login's markup, untouched
   this round) AND the new .xm-authx-* classes (added this round to
   Register/Forgot/Reset/Confirm-Email's markup). Same declarations, same
   visual result — Login is not re-pointed to the new classnames, so its
   rendering cannot regress, and the four other screens now render
   identically to it without a second, diverging rule set.
   Uses the approved official assets directly on every screen:
     - xborder-logo-member-official.png (full lockup: mark + wordmark)
     - xborder-member-auth-bg-official.jpg (Earth artwork, caption baked in)
   Neither asset is redrawn, recolored, or reconstructed.
   ========================================================================== */

.xm-login-shell,
.xm-authx-shell {
  padding: 32px 24px 0;
  --xm-login-earth-h: clamp(200px, 26vw, 380px);
}

/* Earth artwork: full-bleed width, bottom-anchored, aspect ratio
   preserved via object-fit:cover (crops, never stretches/distorts). The
   source image's top ~55% is empty canvas (pure compositional headroom),
   so cropping to a shorter band reveals the horizon + baked-in caption
   without altering a single pixel of the image itself. */
.xm-login-earth,
.xm-authx-earth {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--xm-login-earth-h);
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.xm-login-earth-img,
.xm-authx-earth-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

.xm-login-lang-row,
.xm-authx-lang-row {
  max-width: 520px;
}

/* One content column. Everything below shares this same 520px system —
   no independently-scaled elements. */
.xm-login-content,
.xm-authx-content {
  max-width: 520px;
  padding: 4px 0 calc(var(--xm-login-earth-h) + 36px);
}

.xm-login-brand,
.xm-authx-brand { margin-bottom: 22px; }

/* Official lockup used directly — mark, wordmark and trademark are all
   part of this one image; nothing is retyped or redrawn next to it. */
.xm-login-logo,
.xm-authx-logo {
  display: block;
  width: min(58%, 300px);
  height: auto;
  margin: 0 auto 22px;
}

.xm-login-tagline,
.xm-authx-tagline {
  margin-top: 0;
}
.xm-login-tagline span,
.xm-authx-tagline span {
  display: block;
}

.xm-login-divider,
.xm-authx-divider {
  margin-left: auto;
  margin-right: auto;
}

.xm-login-heading, .xm-authx-heading { font-size: 30px; }
.xm-login-subtitle, .xm-authx-subtitle { font-size: 18px; }

/* Form column: one layout system for the fields, the utility row and the
   submit button, so every edge lines up exactly. */
.xm-login-form, .xm-authx-form { width: 100%; }

.xm-login-field .xm-field-icon,
.xm-login-field .xm-password-wrap,
.xm-authx-field .xm-field-icon,
.xm-authx-field .xm-password-wrap {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.xm-login-field .xm-field-icon input,
.xm-authx-field .xm-field-icon input {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  min-height: 56px;
  border-radius: 12px;
  font-size: 16px;
}
/* Leading icon stays anchored to the field's own left edge (already
   correct via the shared rule); only the nested toggle button's icon
   needs resetting back to normal in-button flow, since the shared
   ".xm-field-icon svg" descendant selector also matches it. */
.xm-login-field .xm-password-toggle svg,
.xm-authx-field .xm-password-toggle svg {
  position: static;
  left: auto;
  top: auto;
  transform: none;
}
.xm-login-field .xm-password-toggle,
.xm-authx-field .xm-password-toggle {
  min-width: 44px;
  min-height: 44px;
}

.xm-login-submit,
.xm-authx-submit {
  min-height: 56px;
  border-radius: 12px;
  font-size: 16px;
}

.xm-login-link-line, .xm-authx-link-line { margin-top: 20px; }

@media (max-width: 600px) {
  .xm-login-shell, .xm-authx-shell { padding: 20px 16px 0; --xm-login-earth-h: clamp(150px, 34vw, 240px); }
  .xm-login-logo, .xm-authx-logo { width: 220px; max-width: 62%; }
  .xm-login-heading, .xm-authx-heading { font-size: 24px; }
  .xm-login-subtitle, .xm-authx-subtitle { font-size: 15px; }
  .xm-login-content, .xm-authx-content { padding-bottom: calc(var(--xm-login-earth-h) + 28px); }
}

/* Confirm-Email has no form; its lone action button still needs to align
   to the same 520px column and match the other screens' submit height. */
.xm-authx-content .xm-btn-secondary.xm-authx-submit {
  width: 100%;
}
