/* ═══════════════════════════════════════════════════════
   LUXE — Auth Pages (Login / Register)
   Modern, clean, white — editorial luxury feel
   ═══════════════════════════════════════════════════════ */

/* ── Auth Page Layout ─────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - 100px);
  display: grid;
  grid-template-columns: 1fr;
  background: #ffffff;
}

@media (min-width: 900px) {
  .auth-page {
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
  }
}

/* ── Left Panel — Visual ──────────────────────────────── */
.auth-visual {
  display: none;
  position: relative;
  overflow: hidden;
  background: #0a0a0a;
}
@media (min-width: 900px) { .auth-visual { display: block; } }

.auth-visual-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
  transform: scale(1.05);
  transition: transform 8s ease;
}
.auth-visual:hover .auth-visual-img { transform: scale(1); }

.auth-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.5) 100%);
}
.auth-visual-content {
  position: absolute;
  bottom: 48px;
  left: 40px;
  right: 40px;
  z-index: 2;
}
.rtl .auth-visual-content { left: 40px; right: 40px; }
.auth-visual-quote {
  font-family: 'Bodoni Moda', Georgia, serif;
  font-size: clamp(22px, 3vw, 32px);
  font-style: italic;
  color: #ffffff;
  line-height: 1.4;
  margin-bottom: 16px;
}
.auth-visual-cite {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #B8860B;
}

/* ── Right Panel — Form ───────────────────────────────── */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: #ffffff;
  min-height: inherit;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border: none;
  border-radius: 0;
  padding: 0;
  /* No box shadow on the card — clean */
}

/* ── Brand Mark ───────────────────────────────────────── */
.auth-brand {
  margin-bottom: 40px;
}
.auth-brand a {
  font-family: 'Bodoni Moda', Georgia, serif;
  font-size: 28px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #1a1a1a;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.auth-brand a span { color: #B8860B; }
.auth-brand-sub {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #c0b8ae;
  margin-top: 4px;
}

/* ── Heading ──────────────────────────────────────────── */
.auth-title {
  font-family: 'Bodoni Moda', Georgia, serif;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 400;
  color: #1a1a1a;
  margin-bottom: 8px;
  line-height: 1.2;
}
.auth-subtitle {
  font-size: 14px;
  color: #9a9188;
  margin-bottom: 36px;
  line-height: 1.6;
}

/* ── Form Fields ──────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 0; }

.form-group {
  margin-bottom: 20px;
  position: relative;
}
.form-group label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9a9188;
  margin-bottom: 8px;
}
.forgot-link {
  font-size: 11px;
  color: #B8860B;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  transition: opacity 0.2s;
}
.forgot-link:hover { opacity: 0.7; }

.form-input {
  width: 100%;
  height: 48px;
  background: #ffffff;
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 0 16px;
  font-size: 14px;
  color: #1a1a1a;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: 'Outfit', system-ui, sans-serif;
}
.form-input:focus {
  border-color: #B8860B;
  box-shadow: 0 0 0 3px rgba(184,134,11,0.1);
}
.form-input::placeholder { color: #c8c0b8; }
.form-input.error { border-color: #e05252; }

/* Password wrapper */
.password-input-wrap { position: relative; }
.password-input-wrap .form-input { padding-right: 44px; }
.rtl .password-input-wrap .form-input { padding-right: 16px; padding-left: 44px; }
.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #c0b8ae;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
.rtl .toggle-password { right: auto; left: 14px; }
.toggle-password:hover { color: #1a1a1a; }

/* Password strength */
.password-strength {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.strength-bar {
  height: 3px;
  border-radius: 2px;
  flex: 1;
  transition: background 0.3s;
}
.strength-bar.weak { background: #e05252; width: 33%; flex: 0 0 33%; }
.strength-bar.medium { background: #f59e0b; width: 66%; flex: 0 0 66%; }
.strength-bar.strong { background: #52b788; width: 100%; flex: 0 0 100%; }
.strength-bar.weak + span { color: #e05252; }
.strength-bar.medium + span { color: #f59e0b; }
.strength-bar.strong + span { color: #52b788; }

/* Two-col row */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 380px) { .form-row { grid-template-columns: 1fr; } }

/* Checkbox */
.form-check label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: #5d564e;
  cursor: pointer;
}
.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #B8860B;
  cursor: pointer;
  flex-shrink: 0;
}
.form-check a { color: #B8860B; text-decoration: underline; }

/* ── Submit Button ────────────────────────────────────── */
.btn-primary {
  background: #1a1a1a;
  color: #ffffff;
  border: none;
  font-family: 'Outfit', system-ui, sans-serif;
}
.btn-primary:hover {
  background: #B8860B;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(184,134,11,0.25);
}
.btn-large { height: 52px; font-size: 13px; letter-spacing: 0.12em; }
.btn-block { width: 100%; }
.btn.btn-primary.btn-large.btn-block {
  margin-top: 4px;
  border-radius: 8px;
}

/* ── Alerts ───────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert::before { font-size: 16px; flex-shrink: 0; }
.alert-error {
  background: rgba(224,82,82,0.06);
  border: 1px solid rgba(224,82,82,0.2);
  color: #c0392b;
}
.alert-error::before { content: '✕'; }
.alert-success {
  background: rgba(82,183,136,0.06);
  border: 1px solid rgba(82,183,136,0.2);
  color: #27ae60;
}
.alert-success::before { content: '✓'; }
.alert-info {
  background: rgba(184,134,11,0.06);
  border: 1px solid rgba(184,134,11,0.2);
  color: #B8860B;
}
.alert-info::before { content: 'ℹ'; }

/* ── Divider ──────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0,0,0,0.08);
}
.auth-divider span {
  font-size: 12px;
  color: #c0b8ae;
  white-space: nowrap;
  padding: 0 4px;
}

/* ── Switch Link ─────────────────────────────────────── */
.auth-switch {
  text-align: center;
  font-size: 14px;
  color: #9a9188;
  margin-top: 4px;
}
.auth-switch a {
  color: #B8860B;
  font-weight: 600;
  transition: opacity 0.2s;
}
.auth-switch a:hover { opacity: 0.75; }

/* ── Progress dots (register multi-step feel) ─────────── */
.auth-progress {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 32px;
}
.auth-progress-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0,0,0,0.1);
  transition: all 0.3s;
}
.auth-progress-dot.active {
  background: #B8860B;
  width: 20px;
  border-radius: 3px;
}

/* ── Floating label effect (enhancement) ─────────────── */
.form-group.floating { position: relative; }
.form-group.floating .form-input {
  padding-top: 18px;
  padding-bottom: 6px;
  height: 52px;
}
.form-group.floating label {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  color: #c0b8ae;
  pointer-events: none;
  transition: all 0.2s;
  margin: 0;
}
.rtl .form-group.floating label { left: auto; right: 16px; }
.form-group.floating .form-input:focus + label,
.form-group.floating .form-input:not(:placeholder-shown) + label {
  top: 7px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #B8860B;
}

/* ── Mobile adjustments ───────────────────────────────── */
@media (max-width: 480px) {
  .auth-container { padding: 32px 20px 48px; }
  .auth-title { font-size: 26px; }
  .auth-brand a { font-size: 24px; }
}

/* ═══════════════════════════════════════════════════════
   🎨 تحسينات صفحة تسجيل الدخول — مستوى فاخر احترافي
   Login Page — Premium Enhancements (Desktop + Mobile)
   ═══════════════════════════════════════════════════════ */

/* خلفية الصفحة بتدرج فاخر */
body.rtl .auth-page,
body[dir="rtl"] .auth-page,
html[dir="rtl"] .auth-page {
  background: linear-gradient(135deg, #fdfbf7 0%, #f8f4ec 100%);
  position: relative;
}

/* إطار ذهبي رقيق حول بطاقة الدخول */
.auth-card {
  background: #fff;
  border-radius: 20px !important;
  padding: 48px 40px !important;
  box-shadow:
    0 0 0 1px rgba(201, 169, 110, .15),
    0 20px 60px -15px rgba(10, 10, 10, .25),
    0 1px 2px rgba(0, 0, 0, .04) !important;
  position: relative;
  overflow: hidden;
}

/* شريط ذهبي علوي فاخر */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, #C9A96E 50%, transparent 100%);
  pointer-events: none;
}

/* تحسين عنوان الشعار LUXE */
.auth-brand a {
  font-family: 'Bodoni Moda', Georgia, serif !important;
  font-size: 42px !important;
  letter-spacing: 0.25em !important;
  background: linear-gradient(135deg, #1a1a1a 0%, #3a3a3a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  font-weight: 500 !important;
}
.auth-brand a span { color: #C9A96E !important; -webkit-text-fill-color: #C9A96E; }

.auth-brand-sub {
  color: #C9A96E !important;
  font-size: 11px !important;
  letter-spacing: 0.35em !important;
  text-transform: uppercase !important;
  margin-top: 8px !important;
  font-weight: 600 !important;
}

/* عنوان الترحيب */
.auth-title {
  font-size: 36px !important;
  font-weight: 500 !important;
  line-height: 1.1 !important;
  margin-bottom: 8px !important;
  color: #1a1a1a;
}

body.rtl .auth-title,
html[dir="rtl"] .auth-title {
  font-family: 'Amiri', 'Noto Kufi Arabic', serif !important;
  font-weight: 700 !important;
  font-size: 42px !important;
}

.auth-subtitle {
  color: #8a7f72 !important;
  font-size: 15px !important;
  margin-bottom: 32px !important;
  line-height: 1.6;
}

body.rtl .auth-subtitle,
html[dir="rtl"] .auth-subtitle {
  font-family: 'Tajawal', 'Cairo', sans-serif !important;
  font-size: 16px !important;
}

/* حقول الإدخال — تصميم modern luxe */
.auth-form .form-input,
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
  background: #faf8f4 !important;
  border: 1.5px solid #ece6d9 !important;
  border-radius: 12px !important;
  padding: 14px 18px !important;
  font-size: 15px !important;
  font-family: inherit !important;
  color: #1a1a1a !important;
  transition: all .25s cubic-bezier(.4,0,.2,1) !important;
  width: 100% !important;
}

.auth-form .form-input:focus,
.auth-card input:focus {
  border-color: #C9A96E !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px rgba(201, 169, 110, .12) !important;
  outline: none !important;
}

.auth-form .form-input::placeholder,
.auth-card input::placeholder {
  color: #b8ad9c !important;
  font-weight: 400 !important;
}

/* التسميات */
.auth-form label,
.auth-card label {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #4a4a4a !important;
  margin-bottom: 8px !important;
  display: flex !important;
  justify-content: space-between;
  align-items: center;
}

body.rtl .auth-form label,
html[dir="rtl"] .auth-form label {
  font-family: 'Tajawal', 'Cairo', sans-serif !important;
  font-size: 14px !important;
}

.forgot-link {
  color: #C9A96E !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
}
.forgot-link:hover { text-decoration: underline !important; }

/* زر "إظهار كلمة المرور" */
.password-input-wrap { position: relative; }
.toggle-password {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  color: #8a7f72 !important;
  padding: 8px !important;
  display: flex !important;
  align-items: center;
  transition: color .2s !important;
}
html[dir="rtl"] .toggle-password { left: 6px !important; right: auto !important; }
html[dir="ltr"] .toggle-password { right: 6px !important; left: auto !important; }
.toggle-password:hover { color: #C9A96E !important; }

/* زر تسجيل الدخول الرئيسي — فخم */
.auth-form .btn-primary,
.auth-card .btn-primary {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
  color: #fff !important;
  padding: 16px 32px !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  letter-spacing: 0.05em !important;
  border: none !important;
  cursor: pointer !important;
  transition: all .3s cubic-bezier(.4,0,.2,1) !important;
  position: relative;
  overflow: hidden;
  width: 100% !important;
}

.auth-form .btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #C9A96E 0%, #a07c3e 100%);
  opacity: 0;
  transition: opacity .3s;
}
.auth-form .btn-primary:hover::before { opacity: 1; }
.auth-form .btn-primary > * { position: relative; z-index: 1; }
.auth-form .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -8px rgba(201, 169, 110, .4) !important;
}

body.rtl .auth-form .btn-primary,
html[dir="rtl"] .auth-form .btn-primary {
  font-family: 'Tajawal', 'Cairo', sans-serif !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}

/* الفاصل "أو" */
.auth-divider {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 28px 0 !important;
  color: #b8ad9c !important;
  font-size: 12px !important;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ece6d9, transparent);
}

/* رابط إنشاء حساب */
.auth-switch {
  text-align: center !important;
  color: #6b6357 !important;
  font-size: 14px !important;
  margin-top: 20px !important;
}
.auth-switch a {
  color: #C9A96E !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  border-bottom: 1.5px solid transparent;
  transition: border-color .2s;
}
.auth-switch a:hover { border-bottom-color: #C9A96E !important; }

body.rtl .auth-switch,
html[dir="rtl"] .auth-switch {
  font-family: 'Tajawal', sans-serif !important;
  font-size: 15px !important;
}

/* تنبيهات نظيفة */
.auth-card .alert {
  border-radius: 10px !important;
  padding: 12px 16px !important;
  font-size: 14px !important;
  margin-bottom: 20px !important;
  border: 1px solid transparent !important;
}
.auth-card .alert-error {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border-color: #fecaca !important;
}
.auth-card .alert-success {
  background: #f0fdf4 !important;
  color: #15803d !important;
  border-color: #bbf7d0 !important;
}

/* Checkbox "إبقائي مسجلة الدخول" */
.form-check label {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  cursor: pointer !important;
  font-weight: 500 !important;
  color: #4a4a4a !important;
  justify-content: flex-start !important;
}
.form-check input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: #C9A96E;
  cursor: pointer;
}

/* ════════ تحسين اللوحة البصرية اليسار ════════ */
.auth-visual-quote {
  font-family: 'Bodoni Moda', Georgia, serif !important;
  font-size: 28px !important;
  line-height: 1.5 !important;
  font-weight: 400 !important;
  font-style: italic;
  color: #fff !important;
  letter-spacing: 0.02em;
}

body.rtl .auth-visual-quote,
html[dir="rtl"] .auth-visual-quote {
  font-family: 'Amiri', 'Noto Kufi Arabic', serif !important;
  font-style: normal;
  font-weight: 400 !important;
  font-size: 32px !important;
  line-height: 1.7 !important;
}

.auth-visual-cite {
  color: #C9A96E !important;
  font-size: 13px !important;
  letter-spacing: 0.3em !important;
  text-transform: uppercase !important;
  font-weight: 600 !important;
  margin-top: 20px;
  display: inline-block;
}

/* ════════ Mobile — هاتف نقال ════════ */
@media (max-width: 768px) {
  .auth-page {
    min-height: 100vh !important;
    padding: 0 !important;
    background: linear-gradient(180deg, #fdfbf7 0%, #fff 40%) !important;
  }
  .auth-container {
    padding: 24px 16px !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .auth-card {
    padding: 32px 24px !important;
    border-radius: 20px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-shadow:
      0 0 0 1px rgba(201, 169, 110, .12),
      0 10px 40px -10px rgba(10, 10, 10, .15) !important;
  }
  .auth-brand a { font-size: 34px !important; }
  .auth-title {
    font-size: 28px !important;
    margin-bottom: 6px !important;
  }
  html[dir="rtl"] .auth-title {
    font-size: 34px !important;
  }
  .auth-subtitle {
    font-size: 14px !important;
    margin-bottom: 24px !important;
  }
  .auth-form .form-input {
    padding: 13px 16px !important;
    font-size: 16px !important; /* 16px يمنع zoom على iPhone */
  }
  .auth-form .btn-primary {
    padding: 15px 24px !important;
    font-size: 15px !important;
  }
}

@media (max-width: 380px) {
  .auth-card { padding: 28px 20px !important; }
  .auth-brand a { font-size: 30px !important; }
  .auth-title { font-size: 26px !important; }
  html[dir="rtl"] .auth-title { font-size: 30px !important; }
}
