/* ===== خلفية ومساحة الصفحة ===== */
.register-page {
  max-width: 1200px;
  margin: 18px auto 34px auto;
  padding: 0 18px 34px;
}

/* ===== قسم الهيرو (صورة مستطيلة بدون إطار دائري) ===== */
.register-hero {
  margin-top: 20px;
  margin-bottom: 20px;
}

.register-hero-inner {
  border-radius: 28px;
  background: radial-gradient(circle at top, #dbeafe 0, #eff6ff 45%, #f9fafb 100%);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: center;
}
body.dark-mode .register-hero-inner {
  background: radial-gradient(circle at top, #020617 0, #020617 55%, #030712 100%);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.9);
}

/* الصورة نفسها – مستطيلة بلا إطار ولا خلفية */
.register-hero-image-wrap {
  width: 100%;
}
.register-hero-image {
  width: 100%;
  height: auto;
  max-height: none;
  display: block;
  border-radius: 18px;
  object-fit: contain;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.3);
  background: transparent;
}

/* نص الهيرو */
.register-hero-text {
  text-align: right;
}
.register-hero-title {
  margin: 0 0 8px 0;
  font-size: 30px;
  font-weight: 900;
  color: #020617;
}
.register-hero-subtitle {
  margin: 0;
  font-size: 18px;
  line-height: 1.9;
  color: #4b5563;
}

/* في الوضع الداكن نزيد الكونتراست قليلاً */
body.dark-mode .register-hero-title {
  color: #f9fafb;
}
body.dark-mode .register-hero-subtitle {
  color: #e5e7eb;
}

/* ===== كارت الفورم ===== */
.register-layout {
  display: flex;
  justify-content: center;
}
.register-card {
  width: 100%;
  max-width: 950px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 26px;
  padding: 22px 24px 24px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
  border: 1px solid rgba(148, 163, 184, 0.3);
  backdrop-filter: blur(10px);
}
body.dark-mode .register-card {
  background: rgba(15, 23, 42, 0.97);
  border-color: rgba(37, 99, 235, 0.6);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.9);
}

.register-card-header {
  margin-bottom: 14px;
}
.register-title {
  margin: 0 0 6px 0;
  font-size: 24px;
  font-weight: 900;
  color: #0f172a;
}
.register-subtitle {
  margin: 0;
  font-size: 16px;
  color: #6b7280;
}
body.dark-mode .register-title {
  color: #f9fafb;
}
body.dark-mode .register-subtitle {
  color: #e5e7eb;
}

/* ===== شبكة الحقول ===== */
.register-form {
  margin-top: 6px;
}
.register-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 12px;
}
.register-form-row-full {
  grid-column: 1 / -1;
}

.reg-label {
  display: block;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
  color: #111827;
}
body.dark-mode .reg-label {
  color: #e5e7eb;
}
.reg-required {
  color: #f97373;
  margin-inline-start: 2px;
}

/* الحقول */
.reg-input,
.reg-select {
  width: 100%;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 10px 16px;
  font-size: 16px;
  font-weight: 600;
  background: #f9fafb;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    transform 0.08s ease;
}
.reg-input:focus,
.reg-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.18);
  background: #ffffff;
}
.reg-input:active,
.reg-select:active {
  transform: scale(0.995);
}

body.dark-mode .reg-input,
body.dark-mode .reg-select {
  background: #020617;
  border-color: #1f2937;
  color: #f9fafb;
}
body.dark-mode .reg-input::placeholder,
body.dark-mode .reg-select::placeholder {
  color: #9ca3af;
}

/* النص المساعد */
.reg-help {
  font-size: 13px;
  color: #6b7280;
  margin-top: 2px;
  font-weight: 700;
}
body.dark-mode .reg-help {
  color: #cbd5f5;
}

/* حاوية السنتر والمجموعة */
.reg-center-extra {
  margin-top: 4px;
  padding: 12px 14px 12px;
  border-radius: 20px;
  background: #fef2f2;
  border: 1px dashed #fecaca;
}
body.dark-mode .reg-center-extra {
  background: rgba(127, 29, 29, 0.14);
  border-color: #fecaca;
}
.reg-row-inline {
  display: flex;
  gap: 12px;
}
.reg-col {
  flex: 1 1 0;
}
.reg-row-full {
  margin-top: 10px;
}

/* ===== الأزرار والرسائل ===== */
.register-actions {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.register-primary-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 28px;
  font-size: 17px;
  font-weight: 900;
  background: linear-gradient(120deg, #22c55e, #0ea5e9, #a855f7);
  background-size: 200% 200%;
  color: #f9fafb;
  cursor: pointer;
  box-shadow: 0 18px 45px rgba(22, 163, 74, 0.55);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background-position 0.5s ease;
}
.register-primary-btn:hover {
  background-position: 100% 0%;
  transform: translateY(-1px);
  box-shadow: 0 22px 55px rgba(22, 163, 74, 0.65);
}
.register-primary-btn:active {
  transform: scale(0.97);
}

.register-note {
  font-size: 14px;
  color: #6b7280;
  font-weight: 700;
}
body.dark-mode .register-note {
  color: #cbd5f5;
}

.register-msg {
  margin-top: 6px;
  font-size: 15px;
  min-height: 20px;
  font-weight: 700;
}

/* ===== مودال النجاح ===== */
.success-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.success-modal.is-visible {
  display: flex;
}
.success-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}
.success-modal-dialog {
  position: relative;
  z-index: 1;
  max-width: 380px;
  width: 90%;
  background: #ecfdf5;
  border-radius: 20px;
  padding: 20px 20px 18px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}
.success-icon {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  margin: 0 auto 10px;
  background: #22c55e;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ecfdf5;
  font-size: 32px;
  box-shadow: 0 14px 40px rgba(22, 163, 74, 0.7);
}
.success-text {
  margin: 0 0 4px 0;
  font-weight: 900;
  font-size: 16px;
  color: #14532d;
}
.success-subtext {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #166534;
}
body.dark-mode .success-modal-dialog {
  background: #020617;
}
body.dark-mode .success-text {
  color: #bbf7d0;
}
body.dark-mode .success-subtext {
  color: #4ade80;
}

/* ===== استجابة الشاشات الصغيرة ===== */
@media (max-width: 992px) {
  .register-hero-inner {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }
  .register-hero-text {
    text-align: center;
  }
  .register-hero-image {
    max-height: 260px;
    object-fit: cover;
  }
}

@media (max-width: 768px) {
  .register-page {
    padding: 0 14px 26px;
  }

  .register-hero-inner {
    padding: 12px 12px 14px;
  }
  .register-hero-title {
    font-size: 26px;
  }

  .register-card {
    padding: 16px 16px 20px;
  }

  .register-form-grid {
    grid-template-columns: 1fr;
  }
  .register-form-row-full {
    grid-column: 1 / 2;
  }

  .reg-row-inline {
    flex-direction: column;
  }

  .register-actions {
    align-items: stretch;
  }
  .register-primary-btn {
    width: 100%;
    justify-content: center;
  }
}