/* ============================================================
   مبادرة — Register + Login (بنية مشتركة)
   يخدم register.php و login.php معًا
   login.css يعتمد على هذا الملف — لا تحذف تنسيقاته المشتركة
   ============================================================ */

/* ============ الغلاف والحاوية ============ */
.mb-reg-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background: var(--bg);
}

.mb-reg-container {
  width: 100%;
  max-width: 960px;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

@media (min-width: 860px) {
  .mb-reg-container {
    grid-template-columns: 340px 1fr;
    min-height: 560px;
  }
}

/* ============ اللوحة الجانبية ============ */
.mb-reg-side {
  display: none;
  background: var(--accent);
  color: var(--on-accent);
  padding: var(--space-7) var(--space-6);
  flex-direction: column;
  gap: var(--space-6);
  position: relative;
  overflow: hidden;
}
.mb-reg-side::before {
  content: '';
  position: absolute;
  inset-inline-end: -70px;
  bottom: -70px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}
.mb-reg-side::after {
  content: '';
  position: absolute;
  inset-inline-start: -50px;
  top: -50px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}
@media (min-width: 860px) {
  .mb-reg-side { display: flex; }
}

.mb-reg-side__brand {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  position: relative;
  z-index: 1;
}
.mb-reg-side__brand-name {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
}
.mb-reg-side__brand-tag {
  font-size: var(--text-xs);
  opacity: 0.8;
}

.mb-reg-side__label {
  font-size: var(--text-2xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.7;
  position: relative;
  z-index: 1;
}

/* ============ مؤشر خطوات التسجيل (في اللوحة) ============ */
.mb-reg-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
  z-index: 1;
}
.mb-reg-steps__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  opacity: 0.55;
  transition: opacity var(--duration-base) var(--ease-out);
}
.mb-reg-steps__item.is-active { opacity: 1; }
.mb-reg-steps__item.is-done   { opacity: 0.8; }

.mb-reg-steps__num {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  flex-shrink: 0;
  transition: all var(--duration-base) var(--ease-out);
}
.mb-reg-steps__item.is-active .mb-reg-steps__num {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.85);
}
.mb-reg-steps__item.is-done .mb-reg-steps__num {
  background: rgba(255, 255, 255, 0.12);
}
.mb-reg-steps__text {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
}

/* ============ صندوق التلميح في اللوحة ============ */
.mb-reg-side__hint {
  margin-block-start: auto;
  background: rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
  position: relative;
  z-index: 1;
}
.mb-reg-side__hint-title {
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  margin-block-end: var(--space-1);
}

/* ============ المحتوى الرئيسي ============ */
.mb-reg-main {
  padding: var(--space-6) var(--space-5);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (min-width: 860px) {
  .mb-reg-main {
    padding: var(--space-8) var(--space-8);
  }
}

/* ============ الخطوات ============ */
.mb-reg-step[hidden] { display: none; }

.mb-reg-step__head {
  margin-block-end: var(--space-6);
}
.mb-reg-step__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--ink);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  margin-block-end: var(--space-2);
}
.mb-reg-step__desc {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: var(--leading-relaxed);
}

.mb-reg-step__body {
  display: block;
}

.mb-reg-step__nav {
  margin-block-start: var(--space-6);
}
.mb-reg-step__nav--split {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
}

/* ============ ملاحظة الخصوصية تحت خيارات الجنس ============ */
.mb-reg-privacy {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-block-start: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--accent-subtle);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  color: var(--accent);
  line-height: var(--leading-relaxed);
}
.mb-reg-privacy .mb-icon {
  flex-shrink: 0;
  margin-block-start: 1px;
}

/* ============ حقل كلمة المرور مع زر الإظهار ============ */
.mb-reg-pw {
  position: relative;
}
.mb-reg-pw .mb-input {
  padding-inline-end: 44px;
}
.mb-reg-pw__toggle {
  position: absolute;
  inset-inline-end: var(--space-1);
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast) var(--ease-out);
}
.mb-reg-pw__toggle:hover { color: var(--body); }

/* ============ موافقة الشروط ============ */
.mb-reg-terms {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
  padding: var(--space-4);
  background: var(--surface-sunk);
  border-radius: var(--radius-md);
  margin-block-start: var(--space-5);
  transition: background var(--duration-fast) var(--ease-out);
}
.mb-reg-terms:hover { background: var(--stone-100); }
.mb-reg-terms input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.mb-reg-terms__box {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-accent);
  background: var(--surface);
  flex-shrink: 0;
  margin-block-start: 1px;
  transition:
    background var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}
.mb-reg-terms__box svg {
  width: 13px;
  height: 13px;
  opacity: 0;
  transform: scale(0.5);
  transition:
    opacity var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-spring);
}
.mb-reg-terms input:checked ~ .mb-reg-terms__box {
  background: var(--accent);
  border-color: var(--accent);
}
.mb-reg-terms input:checked ~ .mb-reg-terms__box svg {
  opacity: 1;
  transform: scale(1);
}
.mb-reg-terms__text {
  flex: 1;
  font-size: var(--text-xs);
  color: var(--body);
  line-height: var(--leading-relaxed);
}
.mb-reg-terms__text a {
  color: var(--accent);
  font-weight: var(--weight-semibold);
  text-decoration: none;
}
.mb-reg-terms__text a:hover { text-decoration: underline; }

/* ============ الرابط السفلي ============ */
.mb-reg-bottom {
  text-align: center;
  margin-block-start: var(--space-6);
  font-size: var(--text-sm);
  color: var(--muted);
}
.mb-reg-bottom .mb-link {
  margin-inline-start: var(--space-1);
}

/* ============ الجوال: نموذج نظيف بعرض كامل ============ */
@media (max-width: 859px) {
  .mb-reg-wrap {
    align-items: flex-start;
    padding: var(--space-5) var(--space-4);
  }
  .mb-reg-container {
    border: 0;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
    max-width: 480px;
  }
  .mb-reg-main {
    padding: var(--space-2) 0;
  }
  .mb-reg-step__title { font-size: var(--text-xl); }
}

/* ============ آيباد عمودي (768-859): نموذج مركزي مريح ============ */
@media (min-width: 600px) and (max-width: 859px) {
  .mb-reg-wrap { align-items: center; }
  .mb-reg-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    max-width: 520px;
  }
  .mb-reg-main { padding: var(--space-7) var(--space-6); }
}

/* ============ شاشات كبيرة: لوحة أوسع ============ */
@media (min-width: 1200px) {
  .mb-reg-container { max-width: 1040px; }
  .mb-reg-container { grid-template-columns: 380px 1fr; }
}
