/* ============================================================
   إنشاء حساب / تسجيل الدخول — تصميم فيغما (node 183:2495)
   كل القواعد مقيَّدة بـ.auth-v2 حتى لا تتسرّب لبقية الصفحات.
   ============================================================ */

.auth-v2 {
  --av-navy: #0e2846;
  --av-teal: #028e94;
  --av-teal-lit: #07959a;
  --av-muted: #c3c6d7;
  --av-ph: #879394;
}

/* خلفية سينمائية: هالتان ضبابيتان خلف المحتوى */
.auth-v2 .av-stage {
  position: relative;
  background: var(--av-navy);
  overflow: hidden;
  padding: 40px 0;
}

.auth-v2 .av-stage::before,
.auth-v2 .av-stage::after {
  content: '';
  position: absolute;
  border-radius: 9999px;
  background: #14335a;
  pointer-events: none;
}

.auth-v2 .av-stage::before {
  width: 896px;
  height: 800px;
  inset-inline-end: -64px;
  top: -114px;
  filter: blur(70px);
}

.auth-v2 .av-stage::after {
  width: 512px;
  height: 457px;
  inset-inline-start: -128px;
  top: 229px;
  filter: blur(60px);
}

.auth-v2 .av-wrap {
  position: relative;
  z-index: 1;
  width: min(100% - 32px, 1280px);
  margin-inline: auto;
  display: grid;
  /* في RTL أول عمود يقع يميناً => الصورة يميناً والنموذج يساراً */
  grid-template-columns: 61.25% 38.75%;
  align-items: stretch;
  min-height: 813px;
}

/* ── لوحة الصورة (يمين) ── */
.auth-v2 .av-visual {
  position: relative;
  overflow: hidden;
  border-start-start-radius: 88px;
  background: var(--av-navy);
}

.auth-v2 .av-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── لوحة النموذج (يسار) ── */
.auth-v2 .av-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 64px;
  background: var(--av-navy);
  border-end-end-radius: 85px;
}

.auth-v2 .av-brand {
  margin: 0;
  font-size: 48px;
  line-height: 48px;
  font-weight: 800;
  background: linear-gradient(112.6deg, #fff 0%, var(--av-teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-align: start;
}

.auth-v2 .av-tagline {
  margin: 12px 0 0;
  color: var(--av-muted);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: .35px;
  opacity: .8;
}

.auth-v2 .av-form { margin-top: 40px; display: flex; flex-direction: column; gap: 19px; }

.auth-v2 .av-field { display: flex; flex-direction: column; gap: 6px; }

.auth-v2 .av-label {
  color: #fff;
  font-size: 15px;
  line-height: 16.5px;
  font-weight: 700;
  letter-spacing: 1.1px;
}

/* الحقل: أيقونة داخل الحافة اليمنى، وزر الإظهار على اليسار */
.auth-v2 .av-input {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-v2 .av-input input,
.auth-v2 .av-input select {
  width: 100%;
  padding: 18px 49px 19px 17px;
  border: 1px solid #fff;
  border-radius: 16px;
  background: #fff;
  font-family: inherit;
  font-size: 16px;
  color: #0f2b4b;
  outline: none;
  transition: box-shadow .2s, border-color .2s;
}

.auth-v2 .av-input input::placeholder { color: var(--av-ph); }

.auth-v2 .av-input input:focus,
.auth-v2 .av-input select:focus {
  border-color: var(--av-teal);
  box-shadow: 0 0 0 3px rgba(2, 142, 148, .25);
}

/* حقل كلمة المرور فيه زرّ إظهار فيحتاج حشواً على الجهتين */
.auth-v2 .av-input--pw input { padding-inline-start: 49px; }

.auth-v2 .av-icon {
  position: absolute;
  inset-inline-end: 16px;
  width: 18px;
  height: 18px;
  color: var(--av-ph);
  pointer-events: none;
  display: grid;
  place-items: center;
  font-size: 15px;
}

.auth-v2 .av-toggle {
  position: absolute;
  inset-inline-start: 16px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--av-ph);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 15px;
}

.auth-v2 .av-toggle:hover { color: var(--av-teal); }

/* ── اختيار الدور ── */
.auth-v2 .av-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.auth-v2 .av-role {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 12px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 16px;
  background: rgba(255, 255, 255, .06);
  color: var(--av-muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
}

.auth-v2 .av-role input { position: absolute; opacity: 0; pointer-events: none; }
.auth-v2 .av-role:hover { border-color: rgba(255, 255, 255, .5); color: #fff; }

.auth-v2 .av-role:has(input:checked) {
  background: rgba(2, 142, 148, .18);
  border-color: var(--av-teal);
  color: #fff;
}

/* ── الشروط ── */
.auth-v2 .av-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--av-muted);
  font-size: 13px;
  line-height: 20px;
}

.auth-v2 .av-terms input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--av-teal); flex: none; }
.auth-v2 .av-terms a { color: var(--av-teal); text-decoration: underline; }

/* ── الزر ── */
.auth-v2 .av-submit {
  width: 100%;
  padding: 17px 16px 16px;
  border: 0;
  border-radius: 16px;
  background: var(--av-teal);
  color: #fff;
  font-family: inherit;
  font-size: 20px;
  line-height: 28px;
  font-weight: 700;
  cursor: pointer;
  filter: drop-shadow(0 0 10px rgba(2, 142, 148, .4));
  transition: .22s;
}

.auth-v2 .av-submit:hover { background: #03a3aa; transform: translateY(-1px); }

/* ── الفاصل وجوجل ── */
.auth-v2 .av-or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--av-muted);
  font-size: 12px;
  opacity: .7;
}

.auth-v2 .av-or::before,
.auth-v2 .av-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, .18);
}

.auth-v2 .av-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 16px;
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: .2s;
}

.auth-v2 .av-google:hover { background: rgba(255, 255, 255, .12); }

/* ── التذييل ── */
.auth-v2 .av-alt {
  margin-top: 32px;
  text-align: center;
  color: var(--av-muted);
  font-size: 14px;
  line-height: 20px;
}

.auth-v2 .av-alt a {
  color: var(--av-teal);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(2, 142, 148, .3);
}

.auth-v2 .av-copy {
  margin-top: 40px;
  text-align: center;
  color: var(--av-muted);
  font-size: 10px;
  line-height: 15px;
  letter-spacing: 2px;
  opacity: .6;
}

/* ── الأخطاء ── */
.auth-v2 .av-errors {
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(239, 68, 68, .12);
  border: 1px solid rgba(239, 68, 68, .35);
  color: #fecaca;
  font-size: 13.5px;
  line-height: 1.8;
}

.auth-v2 .av-errors div + div { margin-top: 4px; }

/* ── الاستجابة ── */
@media (max-width: 1024px) {
  .auth-v2 .av-wrap { grid-template-columns: 1fr; min-height: 0; }
  .auth-v2 .av-visual { border-start-start-radius: 24px; border-start-end-radius: 24px; height: 260px; order: -1; }
  .auth-v2 .av-panel { border-end-end-radius: 24px; border-end-start-radius: 24px; padding: 36px 28px; }
}

@media (max-width: 560px) {
  .auth-v2 .av-stage { padding: 20px 0; }
  .auth-v2 .av-wrap { width: min(100% - 20px, 1280px); }
  .auth-v2 .av-panel { padding: 28px 20px; }
  .auth-v2 .av-brand { font-size: 36px; line-height: 40px; }
  .auth-v2 .av-roles { grid-template-columns: 1fr; }
  .auth-v2 .av-visual { height: 180px; }
}
