/**
 * Lumière — AuthPage.tsx + ForgotPasswordPage.tsx (gold shell)
 */

body.lumiere-page-auth .lumiere-main,
body.lumiere-page-auth .lumiere-site {
  min-height: 100vh;
  background: #fbf7ee;
}

body.lumiere-page-auth .lm-page-body--account {
  padding: 0;
  max-width: none;
}

.lm-auth-design {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.875rem, 6vw, 2.5rem) clamp(1rem, 3vw, 1.25rem);
  overflow: hidden;
  direction: rtl;
}

.lm-auth-design__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.lm-auth-design__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.15) saturate(0.8);
}

.lm-auth-design__bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(251, 247, 238, 0.96) 0%, rgba(245, 237, 216, 0.88) 50%, rgba(251, 247, 238, 0.92) 100%);
}

.lm-auth-design__corner {
  position: absolute;
  width: 44px;
  height: 44px;
  z-index: 1;
  pointer-events: none;
}

.lm-auth-design__corner--tr { top: 28px; right: 28px; border-top: 1px solid rgba(201, 169, 110, 0.4); border-right: 1px solid rgba(201, 169, 110, 0.4); }
.lm-auth-design__corner--tl { top: 28px; left: 28px; border-top: 1px solid rgba(201, 169, 110, 0.4); border-left: 1px solid rgba(201, 169, 110, 0.4); }
.lm-auth-design__corner--br { bottom: 28px; right: 28px; border-bottom: 1px solid rgba(201, 169, 110, 0.4); border-right: 1px solid rgba(201, 169, 110, 0.4); }
.lm-auth-design__corner--bl { bottom: 28px; left: 28px; border-bottom: 1px solid rgba(201, 169, 110, 0.4); border-left: 1px solid rgba(201, 169, 110, 0.4); }

.lm-auth-design__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 28.75rem;
}

.lm-auth-design__logo-wrap {
  text-align: center;
  margin-bottom: 2.25rem;
}

.lm-auth-design__logo {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}

.lm-auth-design__logo-title {
  display: block;
  font-size: 1.625rem;
  letter-spacing: 0.15em;
  line-height: 1;
  color: var(--lm-fg);
}

.lm-auth-design__logo-sub {
  display: block;
  color: var(--lm-primary);
  font-size: 0.5rem;
  letter-spacing: 0.5em;
  margin-top: 0.25rem;
}

.lm-auth-design__logo-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.125rem;
}

.lm-auth-design__logo-divider span:first-child,
.lm-auth-design__logo-divider span:last-child {
  height: 1px;
  width: 3.75rem;
  background: linear-gradient(to left, var(--lm-primary), transparent);
}

.lm-auth-design__logo-divider span:last-child {
  background: linear-gradient(to right, var(--lm-primary), transparent);
}

.lm-auth-design__logo-divider span:nth-child(2) {
  color: var(--lm-primary);
  font-size: 0.5625rem;
  opacity: 0.7;
}

.lm-auth-design__card {
  background: #fff;
  border: 1px solid rgba(201, 169, 110, 0.25);
  box-shadow: 0 20px 60px rgba(26, 18, 9, 0.12), 0 4px 16px rgba(26, 18, 9, 0.06);
}

.lm-auth-design__modes {
  display: flex;
  border-bottom: 1px solid rgba(201, 169, 110, 0.18);
}

.lm-auth-design__mode {
  flex: 1;
  padding: 1.125rem;
  text-align: center;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  color: var(--lm-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.lm-auth-design__mode.is-active {
  color: var(--lm-primary);
  background: rgba(201, 169, 110, 0.05);
  border-bottom-color: var(--lm-primary);
}

.lm-auth-design__body {
  padding: 2rem 2.25rem 2.25rem;
}

.lm-auth-design__title {
  margin: 0 0 0.3125rem;
  font-weight: 400;
  font-size: 1.375rem;
  color: var(--lm-fg);
}

.lm-auth-design__lead {
  margin: 0 0 1.625rem;
  color: var(--lm-muted);
  font-size: 0.75rem;
  line-height: 1.6;
}

.lm-auth-design__back-wrap {
  text-align: center;
  margin-top: 1.25rem;
}

.lm-auth-design__back {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--lm-muted);
  font-size: 0.75rem;
  text-decoration: none;
}

.lm-auth-design__back:hover {
  color: var(--lm-primary);
}

/* ——— دمج مع lm-auth-* الموجود ——— */
.lm-auth-design .lm-auth-page {
  background: transparent;
  padding: 0;
  min-height: 0;
  flex: none;
}

.lm-auth-design .lm-auth-page__wrap {
  max-width: none;
}

.lm-auth-design .lm-auth-brand,
.lm-auth-design .lm-auth-back {
  display: none;
}

.lm-auth-design .lm-auth-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.lm-auth-design .lm-auth-label {
  color: var(--lm-primary);
  font-size: 0.5625rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.lm-auth-design .lm-auth-label__icon {
  display: none;
}

.lm-auth-design .lm-auth-input-wrap .input-text,
.lm-auth-design .lm-auth-input-wrap input {
  background: #fff;
  border: 1px solid rgba(201, 169, 110, 0.22);
  padding: 0.8125rem 1rem;
  font-size: 0.875rem;
  border-radius: 0;
}

.lm-auth-design .lm-auth-input-wrap .input-text:focus,
.lm-auth-design .lm-auth-input-wrap input:focus {
  border-color: var(--lm-primary);
  outline: none;
  box-shadow: none;
}

.lm-auth-design .lm-auth-phone-prefix {
  display: flex;
}

.lm-auth-design .lm-auth-phone-prefix__code {
  background: rgba(201, 169, 110, 0.06);
  border: 1px solid rgba(201, 169, 110, 0.22);
  border-left: none;
  padding: 0.8125rem 0.875rem;
  color: var(--lm-primary);
  font-size: 0.75rem;
  white-space: nowrap;
}

.lm-auth-design .lm-auth-phone-prefix input {
  flex: 1;
  border-right: none;
}

.lm-auth-design .lm-auth-tabs {
  border: 1px solid rgba(201, 169, 110, 0.22);
  margin-bottom: 1.375rem;
}

.lm-auth-design .lm-auth-tab {
  flex: 1;
  padding: 0.6875rem 0.5rem;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  border-bottom: 2px solid transparent;
  background: #fff;
  color: var(--lm-muted);
}

.lm-auth-design .lm-auth-tab.is-active {
  background: rgba(201, 169, 110, 0.08);
  color: var(--lm-primary);
  border-bottom-color: var(--lm-primary);
}

.lm-auth-design .lm-auth-tab + .lm-auth-tab {
  border-right: 1px solid rgba(201, 169, 110, 0.22);
}

.lm-auth-design .lm-auth-submit,
.lm-auth-design .woocommerce-button.button {
  background: linear-gradient(135deg, var(--lm-primary), #e8c98e) !important;
  border: none !important;
  color: #1a1209 !important;
  padding: 0.9375rem !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.16em !important;
  font-weight: 700 !important;
  width: 100%;
  border-radius: 0 !important;
  box-shadow: 0 0 20px rgba(201, 169, 110, 0.4);
  margin-top: 0.5rem;
}

.lm-auth-design .lm-auth-submit:hover,
.lm-auth-design .woocommerce-button.button:hover {
  filter: brightness(1.03);
}

.lm-auth-design .lm-auth-link,
.lm-auth-design .lm-auth-footer a {
  color: var(--lm-primary);
  border-bottom: 1px solid rgba(201, 169, 110, 0.35);
  text-decoration: none;
}

.lm-auth-design .lm-auth-footer {
  text-align: center;
  margin-top: 1.375rem;
  font-size: 0.75rem;
  color: var(--lm-muted);
}

.lm-auth-design .lm-auth-forgot-visual {
  display: none;
}

.lm-auth-design .lm-auth-otp-digits input {
  width: 2.875rem;
  height: 3.5rem;
  text-align: center;
  font-size: 1.375rem;
  border: 1px solid rgba(201, 169, 110, 0.22);
}

.lm-auth-design .lm-auth-otp-digits input:focus {
  border-color: var(--lm-primary);
  background: rgba(201, 169, 110, 0.08);
}

.lm-auth-design .lm-auth-pass-strength {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  margin-top: 0.5rem;
}

.lm-auth-design .lm-auth-pass-strength span {
  flex: 1;
  height: 3px;
  background: rgba(180, 150, 100, 0.2);
  transition: background 0.3s;
}

.lm-auth-design .lm-auth-pass-strength span.is-on {
  background: var(--lm-primary);
}

.lm-auth-design .lm-auth-pass-strength small {
  color: var(--lm-muted);
  font-size: 0.625rem;
  white-space: nowrap;
}

.lm-auth-design .lm-auth-forgot-success__icon {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.25rem;
  background: linear-gradient(135deg, var(--lm-primary), #e8c98e);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(201, 169, 110, 0.45);
}

.lm-auth-design .lm-auth-forgot-success__title {
  color: var(--lm-primary);
  font-weight: 400;
  font-size: 1.375rem;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════
   Auth — مطابق لـ React Login/Register (split screen)  (.lm-auth-split)
   ═══════════════════════════════════════════════════════════════ */
.lm-auth-split {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
  padding: 0;
  background: var(--background);
  align-items: stretch;
}
@media (min-width: 768px) { .lm-auth-split { grid-template-columns: 1fr 1fr; } }

/* neutralize legacy decorative layers if present */
.lm-auth-split .lm-auth-design__bg,
.lm-auth-split .lm-auth-design__corner,
.lm-auth-split .lm-auth-design__logo-wrap { display: none; }

/* Form panel */
.lm-auth-split__form { display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; background: var(--background); }
.lm-auth-split__form-inner { width: 100%; max-width: 24rem; }

.lm-auth-split__logo-m { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 2rem; text-decoration: none; color: var(--foreground); }
@media (min-width: 768px){ .lm-auth-split__logo-m { display: none; } }
.lm-auth-split__logo-mark { width: 1.75rem; height: 1.75rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
.lm-auth-split__logo-name { font-family: 'Scheherazade New','Amiri',serif; font-weight: 700; }

.lm-auth-split__card { background: transparent; border: none; box-shadow: none; padding: 0; }

/* Mode tabs (email/phone-like segmented) */
.lm-auth-split__modes { display: flex; padding: .25rem; background: var(--secondary); border-radius: .75rem; margin-bottom: 1.5rem; }
.lm-auth-split__mode { flex: 1; text-align: center; padding: .5rem; border-radius: .5rem; font-size: .875rem; font-weight: 500; text-decoration: none; color: var(--muted-foreground); transition: all .2s; }
.lm-auth-split__mode.is-active { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); color: var(--foreground); }

.lm-auth-split__back-wrap { margin-top: 1.5rem; text-align: center; }
.lm-auth-split__back { display: inline-flex; align-items: center; gap: .375rem; font-size: .8125rem; color: var(--muted-foreground); text-decoration: none; transition: color .2s; }
.lm-auth-split__back:hover { color: var(--foreground); }

/* Visual panel */
.lm-auth-split__visual { position: relative; overflow: hidden; display: none; flex-direction: column; justify-content: space-between; padding: 3rem; order: 2; }
@media (min-width: 768px){ .lm-auth-split__visual { display: flex; } }
.lm-auth-split__visual-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .4; }
.lm-auth-split__visual-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0,0,0,.8), rgba(0,0,0,.4)); }
.lm-auth-split__visual-top { position: relative; z-index: 1; display: flex; align-items: center; gap: .5rem; }
.lm-auth-split__visual-brand { font-family: 'Scheherazade New','Amiri',serif; font-weight: 700; font-size: 1.25rem; color: #fff; }
.lm-auth-split__visual-quote { position: relative; z-index: 1; }
.lm-auth-split__quote { font-family: 'Scheherazade New','Amiri',serif; font-style: italic; font-size: 1.5rem; line-height: 1.6; color: #fff; margin-bottom: 1rem; }
.lm-auth-split__quote-by { font-size: .875rem; color: rgba(255,255,255,.6); }

/* Ensure nested form card is flat inside split (belt-and-suspenders) */
.lm-auth-split .lm-auth-page,
.lm-auth-split .lm-auth-page__wrap { background: transparent; padding: 0; min-height: 0; max-width: none; margin: 0; }
.lm-auth-split .lm-auth-card { background: transparent; border: none; box-shadow: none; padding: 0; border-radius: 0; }

/* ═══════════ Auth form fields — React clean parity (.lm-auth-split) ═══════════ */
.lm-auth-split .lm-auth-label {
  display: flex; align-items: center; gap: .4rem;
  font-size: .875rem; font-weight: 500; color: var(--foreground);
  letter-spacing: normal; text-transform: none; margin: 0 0 .5rem;
}
.lm-auth-split .lm-auth-label__icon { width: 1rem; height: 1rem; color: var(--muted-foreground); }
.lm-auth-split .lm-auth-label__icon svg { width: 100%; height: 100%; }
.lm-auth-split .lm-auth-input-wrap,
.lm-auth-split .lm-auth-phone-prefix { margin-bottom: 1rem; }
.lm-auth-split input.input-text,
.lm-auth-split .lm-auth-input-wrap input,
.lm-auth-split .woocommerce-Input,
.lm-auth-split input[type="text"],
.lm-auth-split input[type="email"],
.lm-auth-split input[type="password"],
.lm-auth-split input[type="tel"] {
  background: var(--input-background); border: 1.5px solid var(--border); border-radius: 0.875rem;
  padding: .75rem 1rem; width: 100%; color: var(--foreground); font-size: .875rem;
  font-family: 'Tajawal', sans-serif; outline: none; transition: border-color .2s, box-shadow .2s; box-shadow: none;
}
.lm-auth-split input.input-text:focus,
.lm-auth-split .lm-auth-input-wrap input:focus,
.lm-auth-split .woocommerce-Input:focus,
.lm-auth-split input:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(184,138,68,.12);
}
.lm-auth-split .lm-auth-phone-prefix { display: flex; align-items: stretch; gap: .5rem; }
.lm-auth-split .lm-auth-phone-prefix__code { display: flex; align-items: center; padding: 0 .75rem; background: var(--secondary); border: 1.5px solid var(--border); border-radius: .75rem; font-size: .8125rem; color: var(--foreground); white-space: nowrap; }
.lm-auth-split .lm-auth-phone-prefix input { flex: 1; margin: 0; }
.lm-auth-split .lm-auth-input-wrap--password { position: relative; }
.lm-auth-split .lm-auth-toggle-pass { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--muted-foreground); cursor: pointer; padding: 0; }
.lm-auth-split .lm-auth-submit {
  width: 100%; padding: .875rem; border-radius: .75rem; border: none;
  background: linear-gradient(135deg, #B88A44, #C9A87A); color: #fff; font-weight: 600; font-size: .9375rem;
  box-shadow: 0 4px 15px rgba(184,138,68,.3); cursor: pointer; transition: transform .2s, box-shadow .2s; margin-top: .5rem;
}
.lm-auth-split .lm-auth-submit:hover { transform: translateY(-1px); box-shadow: 0 8px 25px rgba(184,138,68,.4); }
.lm-auth-split .lm-auth-check { display: flex; align-items: flex-start; gap: .5rem; font-size: .8125rem; color: var(--muted-foreground); margin: .5rem 0; }
.lm-auth-split .lm-auth-check a { color: var(--primary); }
.lm-auth-split .lm-auth-footer { text-align: center; font-size: .875rem; color: var(--muted-foreground); margin-top: 1.5rem; }
.lm-auth-split .lm-auth-footer a { color: var(--primary); font-weight: 500; }
.lm-auth-split .lm-auth-note { font-size: .8125rem; color: var(--muted-foreground); }

/* ═══════════ Auth login/register inner elements — React parity ═══════════ */
/* Heading */
.lm-auth-split .lm-auth-design__title { font-family: 'Scheherazade New','Amiri',serif; font-size: 1.5rem; font-weight: 500; color: var(--foreground); margin: 0 0 .25rem; letter-spacing: 0; }
.lm-auth-split .lm-auth-design__lead { color: var(--muted-foreground); font-size: .875rem; margin: 0 0 1.5rem; }

/* Email/OTP segmented tabs */
.lm-auth-split .lm-auth-tabs { display: flex; padding: .25rem; background: var(--secondary); border-radius: .75rem; margin-bottom: 1.5rem; }
.lm-auth-split .lm-auth-tab { flex: 1; padding: .5rem; border: none; background: none; border-radius: .5rem; font-size: .875rem; font-weight: 500; color: var(--muted-foreground); cursor: pointer; transition: all .2s; }
.lm-auth-split .lm-auth-tab.is-active { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); color: var(--foreground); }

/* Remember / forgot row */
.lm-auth-split .lm-auth-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .25rem 0 1rem; }
.lm-auth-split .lm-auth-remember { display: inline-flex; align-items: center; gap: .375rem; font-size: .8125rem; color: var(--muted-foreground); cursor: pointer; }
.lm-auth-split .lm-auth-remember input { width: auto; }
.lm-auth-split .lm-auth-link { font-size: .8125rem; color: var(--primary); text-decoration: none; }
.lm-auth-split .lm-auth-link:hover { text-decoration: underline; }
.lm-auth-split .lm-auth-hint { font-size: .75rem; color: var(--muted-foreground); margin: -.5rem 0 1rem; }

/* Notices */
.lm-auth-split .lm-auth-notices:empty { display: none; }
.lm-auth-split .lm-auth-otp-gateway-notice { background: rgba(184,138,68,.08); color: var(--foreground); border-radius: .5rem; padding: .625rem .75rem; font-size: .75rem; margin-bottom: 1rem; }

/* OTP digit inputs */
.lm-auth-split .lm-auth-otp-digits { display: flex; gap: .75rem; justify-content: center; margin: .5rem 0 1rem; }
.lm-auth-split .lm-auth-otp-digit { width: 3.25rem; height: 3.25rem; text-align: center; font-size: 1.25rem; font-weight: 700; border: 2px solid var(--border); border-radius: .75rem; background: var(--input-background); outline: none; padding: 0; }
.lm-auth-split .lm-auth-otp-digit:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(184,138,68,.12); }

/* Register OTP send / continue buttons + register panels */
.lm-auth-split .lm-auth-otp-send { width: 100%; padding: .75rem; border-radius: .75rem; border: 1.5px solid var(--primary); background: transparent; color: var(--primary); font-weight: 500; font-size: .875rem; cursor: pointer; margin-top: .5rem; }
.lm-auth-split .lm-auth-otp-send:hover { background: rgba(184,138,68,.06); }
.lm-auth-split .lm-auth-otp-hint { font-size: .75rem; color: var(--muted-foreground); margin: .5rem 0 0; }
.lm-auth-split .lm-auth-note { font-size: .8125rem; color: var(--muted-foreground); }

