/* صفحات الحساب: تسجيل الدخول وإنشاء حساب */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-wrap: wrap;
}

/* اللوحة الجانبية بهوية الموقع الداكنة */
.auth-aside {
  position: relative;
  overflow: hidden;
  flex: 1;
  min-width: min(420px, 100%);
  background: linear-gradient(155deg, var(--hero-from) 0%, var(--hero-via) 52%, var(--hero-to) 100%);
  color: var(--hero-text);
  padding: 56px 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
}
.auth-aside::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 85%, rgba(1,113,51,.28), transparent 45%),
    radial-gradient(circle at 88% 10%, rgba(15,53,94,.9), transparent 55%);
  pointer-events: none;
}
.auth-aside > * { position: relative; }

.auth-glyph {
  position: absolute;
  font-weight: 700;
  color: rgba(255,255,255,.05);
  pointer-events: none;
  user-select: none;
}

.auth-brand { display: flex; align-items: center; gap: 12px; color: var(--hero-text); }
.auth-brand-mark {
  width: 44px; height: 44px; border-radius: 13px;
  background: var(--cta); color: var(--on-cta);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
}

.auth-points { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.auth-points li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 15.5px; line-height: 1.9; color: var(--hero-muted);
}
.auth-points b { color: var(--hero-text); font-weight: 600; }
.auth-points .tick {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(1,113,51,.28); border: 1px solid rgba(1,113,51,.5);
  color: var(--hero-accent); display: flex; align-items: center; justify-content: center;
  font-size: 13px; margin-top: 2px;
}

/* لوحة النموذج */
.auth-main {
  flex: 1;
  min-width: min(440px, 100%);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
}

.auth-card {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: fadeUp .55s ease both;
}

.auth-card h1 { margin: 0; font-size: 28px; font-weight: 700; color: var(--heading); }
.auth-card .sub { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.9; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.field input {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 15px;
  font-family: inherit;
  font-size: 15.5px;
  color: var(--text);
  background: var(--surface);
  transition: border-color .18s, box-shadow .18s;
}
.field input:focus {
  outline: none;
  border-color: var(--navy2);
  box-shadow: 0 0 0 3px rgba(15,53,94,.12);
}
.field input[dir="ltr"] { text-align: left; }
.field .hint { font-size: 12.5px; color: var(--muted); }

.pw-wrap { position: relative; display: flex; }
/* الحشو يحجز مكان زر «إظهار» فوق الحقل: عرض الكلمة مع حشوها ثم هامش */
.pw-wrap input { flex: 1; padding-inline-start: 62px; }
.pw-toggle {
  position: absolute;
  inset-inline-start: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-family: inherit;
  padding: 6px 8px;
  border-radius: 8px;
}
.pw-toggle:hover { color: var(--navy); background: var(--infobg); }

.btn-submit {
  background: var(--cta);
  color: var(--on-cta);
  border: none;
  border-radius: 13px;
  padding: 14px 0;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.btn-submit:hover:not(:disabled) { background: var(--cta-hover); transform: translateY(-1px); }
.btn-submit:disabled { background: var(--border); cursor: not-allowed; transform: none; }

.auth-error {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-fg);
  border-radius: 12px;
  padding: 12px 15px;
  font-size: 14.5px;
  line-height: 1.9;
}

.auth-alt { font-size: 14.5px; color: var(--muted); text-align: center; }
.auth-alt a { color: var(--cta); font-weight: 700; }
.auth-alt a:hover { color: var(--cta-hover); }

.auth-back { font-size: 14px; color: var(--muted); }
.auth-back:hover { color: var(--heading); }

@media (max-width: 900px) {
  .auth-aside { padding: 40px 26px; min-width: 100%; order: 2; }
  .auth-main  { padding: 40px 22px; min-width: 100%; order: 1; }
  .auth-glyph { display: none; }
}

/* ── أهداف اللمس ── */
@media (pointer: coarse) {
  .btn-submit { min-height: 44px; }
  /* رابط داخل جملة: الحشو الرأسي على عنصر سطري يوسّع منطقة اللمس
     إلى 44px دون أن يزيح السطر. */
  .auth-alt a { padding-block: 11px; }
  /* الزر يعلو الحقل، فالتوسيع يمتد للداخل ولا يزيح شيئاً */
  .pw-toggle { min-width: 44px; min-height: 44px; }
  /* داخل عمود مرن يتمدد الرابط على العرض كله — والتصميم يضعه عند بداية السطر */
  .auth-back {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-height: 44px;
  }
}
