/* =====================================================================
   منصة ميكرز — صفحات الدخول والتسجيل
   Auth & entry pages — RTL + LTR safe, responsive.
   Uses logical properties (inline-start/end) so layout is correct in
   both dir=rtl (default) and dir=ltr.
   ===================================================================== */
body.auth {
  min-height: 100vh;
  background: var(--grad-soft);
  display: flex;
  align-items: center;
  font-family: "Tajawal", "Cairo", sans-serif;
}
.auth-wrap { width: 100%; padding: 30px 0; }

.auth-card {
  background: #fff; border-radius: 28px; box-shadow: var(--shadow-lg);
  overflow: hidden; display: grid; grid-template-columns: 1.05fr 1fr;
  align-items: stretch;
}

/* الجانب الترويجي */
.auth-side {
  background: var(--grad-primary); color: #fff; padding: 50px 44px;
  position: relative; overflow: hidden; display: flex; flex-direction: column;
}
.auth-side::before { content: ""; position: absolute; top: -100px; inset-inline-end: -80px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255,255,255,.12); }
.auth-side::after { content: ""; position: absolute; bottom: -120px; inset-inline-start: -60px; width: 300px; height: 300px; border-radius: 50%; background: rgba(255,255,255,.08); }
.auth-side > * { position: relative; z-index: 2; }
.auth-side .brand { display: flex; align-items: center; gap: 10px; font-family: "Cairo"; font-weight: 900; font-size: 1.4rem; }
.auth-side .brand .brand-badge { background: rgba(255,255,255,.18); box-shadow: none; }
.auth-side h2 { color: #fff; font-size: 1.9rem; margin: 28px 0 14px; line-height: 1.3; }
.auth-side p { line-height: 1.7; }
.auth-side .feat { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-weight: 600; line-height: 1.4; }
.auth-side .feat i { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.16); display: grid; place-items: center; font-size: 1.1rem; flex-shrink: 0; }
.auth-side a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 6px; }

/* الجانب النموذج */
.auth-form { padding: 50px 46px; display: flex; flex-direction: column; justify-content: center; }
/* شعار أعلى النموذج — يظهر فقط عند إخفاء اللوحة الجانبية (شاشات صغيرة) */
.auth-form-logo { display: none; }
.auth-form-logo img { height: 52px; width: auto; }
@media (max-width: 860px) {
  .auth-form-logo { display: block; text-align: center; margin-bottom: 22px; }
}
.auth-form h3 { font-size: 1.6rem; margin-bottom: 6px; }
.auth-form .form-label { font-weight: 700; font-size: .9rem; margin-bottom: .4rem; color: var(--body); }
.auth-form .form-control,
.auth-form .form-select { border-radius: 12px; padding: .72rem 1rem; min-height: 48px; border: 1px solid var(--line); transition: border-color var(--t), box-shadow var(--t); }
.auth-form .form-control:focus,
.auth-form .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(15,47,87,.15); }
.auth-form .form-control::placeholder { color: #cbd5e1; }

/* حقل بأيقونة داخلية — نجعل الصندوق LTR (البريد/كلمة المرور بيانات لاتينية)
   حتى تكون الأيقونة والحاشية على نفس الجهة في العربي والإنجليزي (يمنع تراكب الأيقونة على النص) */
.auth-form .input-icon { position: relative; direction: ltr; }
.auth-form .input-icon > i { position: absolute; inset-inline-end: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.auth-form .input-icon .form-control { padding-inline-end: 2.8rem; }

/* إظهار/إخفاء كلمة المرور — زر يوضَع مكان الأيقونة */
.auth-form .input-icon .toggle-pass {
  position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; display: grid; place-items: center;
  background: transparent; border: 0; border-radius: 8px;
  color: var(--muted); cursor: pointer; pointer-events: auto; transition: color var(--t), background var(--t);
}
.auth-form .input-icon .toggle-pass:hover { color: var(--primary); background: var(--bg-soft); }
.auth-form .input-icon .toggle-pass:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
/* عندما يكون هناك زر إظهار، اترك مساحة له بدل أيقونة القفل الثابتة */
.auth-form .input-icon.has-toggle .form-control { padding-inline-end: 2.9rem; }

/* checkbox / روابط */
.auth-form .form-check-input:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(15,47,87,.15); }
.auth-form a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

/* الأزرار — تناسق الحجم وحلقة التركيز */
.auth-form .btn-brand { min-height: 50px; font-weight: 800; }
.auth-form .btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.divider-or { display: flex; align-items: center; gap: 14px; color: var(--muted); margin: 22px 0; }
.divider-or::before, .divider-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-social { border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--body); font-weight: 700; padding: .7rem; transition: all var(--t); }
.btn-social:hover { border-color: var(--primary); background: var(--bg-soft); }

/* بطاقات النتيجة (وصول مرفوض / قيد المراجعة) */
.auth-status-card {
  background: #fff; border-radius: 24px; padding: 44px 32px;
  box-shadow: 0 24px 60px rgba(15,47,87,.18); text-align: center;
}
.auth-status-icon {
  width: 80px; height: 80px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; font-size: 2.3rem;
}
.auth-status-icon.is-danger { background: #fef2f2; color: #dc2626; }
.auth-status-icon.is-warn   { background: #fef3c7; color: #d97706; }

@media (max-width: 860px) {
  .auth-card { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-form { padding: 38px 26px; }
}

@media (max-width: 480px) {
  .auth-wrap { padding: 16px 0; }
  .auth-card { border-radius: 20px; }
  .auth-form { padding: 30px 20px; }
  .auth-form h3 { font-size: 1.4rem; }
  .auth-status-card { padding: 34px 22px; }
}
