/* ===== AUTH PAGE — MA-ZAL Global Nexus - assets/css/auth.css ===== */

body.mz-auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  margin: 0;
  background:
    radial-gradient(ellipse 900px 600px at 20% -10%, rgba(168, 146, 74, 0.18), transparent 60%),
    radial-gradient(ellipse 700px 500px at 85% 10%,  rgba(168, 146, 74, 0.10), transparent 60%),
    radial-gradient(ellipse 600px 400px at 50% 90%,  rgba(168, 100, 30, 0.07), transparent 60%),
    linear-gradient(180deg, #080808 0%, #0d0d0d 100%);
  overflow-x: hidden;
}

.mz-auth-back {
  position: fixed;
  top: 20px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(201, 168, 76, 0.65);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  z-index: 100;
  transition: color .2s;
  letter-spacing: 0.02em;
}

[dir="rtl"] .mz-auth-back { left: auto; right: 24px; }
.mz-auth-back:hover { color: rgba(201, 168, 76, 1); }
.mz-auth-back svg { transition: transform .2s; }
.mz-auth-back:hover svg { transform: translateX(-3px); }
[dir="rtl"] .mz-auth-back:hover svg { transform: translateX(3px) scaleX(-1); }

.mz-auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 56px;
  margin-bottom: 28px;
  z-index: 10;
  position: relative;
}

.mz-auth-brand img { height: 34px; width: auto; }

.mz-auth-brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #f8fafc;
  text-transform: uppercase;
}

/* Modal في وضع صفحة Auth */
#mz101AuthModal.mz-auth-page-open {
  position: relative !important;
  inset: auto !important;
  display: flex !important;
  align-items: flex-start;
  justify-content: center;
  padding: 0 20px 60px;
  z-index: auto !important;
  width: 100%;
  box-sizing: border-box;
}

#mz101AuthModal.mz-auth-page-open .mz-modal-backdrop {
  display: none !important;
}

#mz101AuthModal.mz-auth-page-open .mz-modal-panel {
  position: relative;
  width: min(520px, 100%);
  max-height: none;
  overflow-y: visible;
  border: 1px solid rgba(201, 168, 76, 0.22);
  background: linear-gradient(155deg, #1E1608 0%, #181208 60%, #120E06 100%);
  box-shadow:
    0 0 0 1px rgba(201, 168, 76, 0.06),
    0 32px 80px rgba(0, 0, 0, 0.55),
    0 8px 24px rgba(0, 0, 0, 0.30);
}

#mz101AuthModal.mz-auth-page-open .mz-modal-close {
  display: none !important;
}

body.mz-auth-page .mz101-field input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(201, 168, 76, 0.18);
  transition: border-color .2s, background .2s;
}

body.mz-auth-page .mz101-field input:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(201, 168, 76, 0.45);
  outline: none;
}

/* Reset Password */
.mz-auth-reset-wrapper {
  width: min(520px, 100%);
  margin: 0 20px 60px;
  padding: 32px;
  border-radius: 20px;
  border: 1px solid rgba(201, 168, 76, 0.22);
  background: linear-gradient(155deg, #1E1608 0%, #181208 60%, #120E06 100%);
  box-shadow:
    0 0 0 1px rgba(201, 168, 76, 0.06),
    0 32px 80px rgba(0, 0, 0, 0.55);
  position: relative;
  box-sizing: border-box;
}

.mz-auth-reset-wrapper::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(201, 168, 76, 0.60), rgba(201, 168, 76, 0.90), rgba(201, 168, 76, 0.60), transparent);
  border-radius: 20px 20px 0 0;
  pointer-events: none;
}

.mz-auth-reset-wrapper h2 {
  color: #F4F1E8;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 24px;
  text-align: center;
}

[dir="rtl"] .mz-auth-reset-wrapper h2 { text-align: right; }

.mz-auth-reset-wrapper input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(201, 168, 76, 0.18);
  color: #F4F1E8;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
  margin-bottom: 12px;
  outline: none;
  transition: border-color .2s, background .2s;
  direction: ltr;
}

.mz-auth-reset-wrapper input[type="password"]:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(201, 168, 76, 0.45);
}

.mz-auth-reset-wrapper button[type="submit"] {
  width: 100%;
  background: linear-gradient(135deg, #C6AE61, #A8924A);
  color: #111;
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity .2s, transform .15s;
  letter-spacing: 0.02em;
}

.mz-auth-reset-wrapper button[type="submit"]:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

/* ===== AUTH PAGE HARD FIX — standalone layout ===== */
html:has(body.mz-auth-page),
body.mz-auth-page {
  min-height: 100%;
  background-color: #05070C;
}

body.mz-auth-page {
  justify-content: center;
  padding: 42px 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(168,146,74,.16), transparent 34%),
    radial-gradient(circle at 12% 16%, rgba(168,146,74,.12), transparent 28%),
    linear-gradient(180deg, #05070C 0%, #080806 54%, #05070C 100%);
}

body.mz-auth-page::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(168,146,74,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168,146,74,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, black, transparent 78%);
}

body.mz-auth-page .mz-auth-brand {
  display: none !important;
}

body.mz-auth-page .mz-auth-back {
  top: 28px;
  right: 30px;
  left: auto;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid rgba(201,168,76,.24);
  background: rgba(5,7,12,.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(244,241,232,.78);
  font-weight: 700;
  box-shadow: 0 16px 42px rgba(0,0,0,.25);
}

body.mz-auth-page .mz-auth-back:hover {
  color: #F4F1E8;
  border-color: rgba(201,168,76,.46);
  background: rgba(168,146,74,.10);
}

body.mz-auth-page .mz-auth-back svg {
  transform: scaleX(-1);
}

body.mz-auth-page[dir="rtl"] .mz-auth-back,
html[dir="rtl"] body.mz-auth-page .mz-auth-back {
  right: 30px;
  left: auto;
  flex-direction: row-reverse;
}

body.mz-auth-page[dir="rtl"] .mz-auth-back svg,
html[dir="rtl"] body.mz-auth-page .mz-auth-back svg {
  transform: none;
}

#mz101AuthModal.mz-auth-page-open {
  position: relative !important;
  inset: auto !important;
  width: min(620px, 100%);
  min-height: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  z-index: 5 !important;
}

#mz101AuthModal.mz-auth-page-open .mz-modal-panel {
  width: min(580px, 100%);
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  padding: 34px 34px 30px;
  border-radius: 26px;
  border: 1px solid rgba(168,146,74,.34);
  background:
    linear-gradient(180deg, rgba(168,146,74,.06), transparent 32%),
    linear-gradient(145deg, rgba(32,24,10,.96), rgba(13,10,5,.98));
  box-shadow:
    0 0 0 1px rgba(168,146,74,.08),
    0 36px 120px rgba(0,0,0,.62),
    inset 0 1px 0 rgba(255,255,255,.035);
}

#mz101AuthModal.mz-auth-page-open .mz-auth-panel-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  color: #F4F1E8;
}

#mz101AuthModal.mz-auth-page-open .mz-auth-panel-brand img {
  height: 34px;
  width: auto;
}

#mz101AuthModal.mz-auth-page-open .mz-auth-panel-brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .18em;
}

body.mz-auth-page .mz-modal-head {
  justify-content: center;
  text-align: center;
  padding: 18px 10px 22px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(168,146,74,.16);
}

body.mz-auth-page .mz-modal-title {
  font-size: clamp(26px, 4vw, 34px);
  color: #D7BC62;
  letter-spacing: 0;
}

body.mz-auth-page .mz-modal-sub {
  max-width: 410px;
  margin: 9px auto 0;
  color: rgba(244,241,232,.64);
  font-size: 14px;
}

body.mz-auth-page .mz-auth-tabs {
  padding: 5px;
  border-radius: 16px;
  background: rgba(0,0,0,.32);
  border-color: rgba(168,146,74,.22);
}

body.mz-auth-page .mz-auth-tab {
  min-height: 44px;
  border-radius: 12px;
  font-size: 14px;
}

body.mz-auth-page .mz-auth-tab--active {
  background: linear-gradient(180deg, rgba(168,146,74,.23), rgba(168,146,74,.11));
  box-shadow: inset 0 0 0 1px rgba(215,188,98,.32);
}

body.mz-auth-page .mz101-field label {
  display: block;
  margin-bottom: 9px;
  color: rgba(215,188,98,.68);
  font-size: 13px;
  font-weight: 700;
}

body.mz-auth-page .mz101-field input {
  width: 100%;
  min-height: 56px;
  border-radius: 14px;
  padding: 0 17px;
  background: rgba(244,241,232,.075);
  color: #F4F1E8;
  border: 1px solid rgba(168,146,74,.26);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

body.mz-auth-page .mz101-field input::placeholder {
  color: rgba(244,241,232,.34);
}

body.mz-auth-page .mz101-field input:focus {
  background: rgba(244,241,232,.105);
  border-color: rgba(215,188,98,.64);
  box-shadow: 0 0 0 4px rgba(168,146,74,.12);
}

body.mz-auth-page .mz-auth-actions {
  margin-top: 18px;
  gap: 14px;
}

body.mz-auth-page .mz-auth-submit,
body.mz-auth-page .mz-btn-primary {
  min-height: 56px;
  border-radius: 999px;
  background: linear-gradient(135deg, #D9B83A, #A8924A);
  color: #fff;
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
  box-shadow: 0 14px 38px rgba(168,146,74,.22);
}

body.mz-auth-page .mz101-btn-link {
  color: rgba(215,188,98,.70);
}

@media (max-width: 640px) {
  body.mz-auth-page { padding: 76px 14px 24px; }
  body.mz-auth-page .mz-auth-back { top: 18px; right: 16px; }
  #mz101AuthModal.mz-auth-page-open .mz-modal-panel { padding: 26px 20px 24px; border-radius: 22px; }
  body.mz-auth-page .mz-auth-actions { flex-direction: column; align-items: stretch; }
}
