/* صفحة الدخول: هوية مركز الأجيال المشرقة (واجهة فقط) */
:root {
  --lg-navy: #0f3049;
  --lg-navy-2: #16507a;
  --lg-blue: #1677b8;
  --lg-lime: #9ccb57;
  --lg-bg: #f3f7fa;
  --lg-surface: #ffffff;
  --lg-text: #12283a;
  --lg-muted: #5b7183;
  --lg-border: #d9e4ec;
  --lg-error: #c2402f;
  --lg-error-soft: #fbe5e1;
  --lg-font: "IBM Plex Sans Arabic", "Inter", "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }
body.lg-body {
  margin: 0;
  font-family: var(--lg-font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--lg-text);
  background: var(--lg-bg);
  direction: rtl;
}

.lg-shell {
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

/* ---------- brand side ---------- */
.lg-brand {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, var(--lg-navy) 0%, var(--lg-navy-2) 62%, var(--lg-blue) 100%);
  color: #fff;
  padding: 44px 52px 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
/* the lime ring from the logo, drawn large behind the photos */
.lg-brand::before {
  content: "";
  position: absolute;
  width: 720px;
  height: 260px;
  left: -160px;
  bottom: 40px;
  border: 26px solid rgba(156, 203, 87, 0.55);
  border-radius: 50%;
  transform: rotate(-10deg);
  pointer-events: none;
}
.lg-brand-top { display: flex; align-items: center; gap: 12px; position: relative; }
.lg-logo {
  width: 52px; height: 52px; flex: none;
  border-radius: 14px;
  background: #fff;
  display: grid; place-items: center;
}
.lg-logo img { width: 80%; height: auto; }
.lg-brand-name b { display: block; font-size: 16px; font-weight: 700; line-height: 1.3; }
.lg-brand-name small { color: #cfe2f0; font-size: 13px; }

.lg-brand-copy { position: relative; max-width: 30rem; }
.lg-brand-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 700;
  line-height: 1.35;
  text-wrap: balance;
}
.lg-brand-copy p { margin: 0; color: #d4e5f2; font-size: 16px; max-width: 40ch; }

.lg-brand-kids {
  position: relative;
  flex: 1;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
}
.lg-kid {
  height: auto;
  max-height: 380px;
  width: auto;
  max-width: 46%;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(5, 20, 35, 0.35));
}
.lg-kid-boy { margin-inline-start: -4%; }

.lg-brand-points {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 16px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #dcebf6;
  font-size: 14px;
}
.lg-brand-points li { display: flex; align-items: center; gap: 10px; }
.lg-brand-points i { font-size: 18px; color: var(--lg-lime); }

/* ---------- form side ---------- */
.lg-main {
  display: grid;
  place-items: center;
  padding: 40px max(20px, env(safe-area-inset-right)) 32px max(20px, env(safe-area-inset-left));
  background: var(--lg-surface);
}
.lg-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 26px; }
.lg-mobile-brand { display: none; }

.lg-head h1 { margin: 0 0 6px; font-size: 28px; font-weight: 700; }
.lg-head p { margin: 0; color: var(--lg-muted); }

.lg-form { display: flex; flex-direction: column; gap: 18px; }
.lg-field { display: flex; flex-direction: column; gap: 7px; }
.lg-field label { font-size: 14px; font-weight: 600; }
.lg-input {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--lg-border);
  border-radius: 12px;
  background: var(--lg-bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.lg-input:focus-within {
  border-color: var(--lg-blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(22, 119, 184, 0.14);
}
.lg-input > i { font-size: 20px; color: var(--lg-muted); flex: none; }
.lg-input input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 16px; /* no zoom on iOS */
  color: var(--lg-text);
}
.lg-input input::placeholder { color: #9aacba; }
.lg-eye {
  width: 40px; height: 40px;
  border: 0; border-radius: 10px;
  background: transparent;
  color: var(--lg-muted);
  font-size: 20px;
  display: grid; place-items: center;
  cursor: pointer;
}
.lg-eye:hover { background: rgba(18, 40, 58, 0.06); color: var(--lg-text); }
.lg-help { color: var(--lg-muted); font-size: 13px; }

.lg-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--lg-error-soft);
  color: var(--lg-error);
  font-size: 14px;
  font-weight: 500;
}

.lg-submit {
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  background: var(--lg-blue);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.lg-submit:hover { background: #12659c; }
.lg-submit:disabled { opacity: 0.7; cursor: progress; }

.lg-forgot {
  align-self: center;
  border: 0;
  background: none;
  color: var(--lg-blue);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
}
.lg-forgot:hover { background: rgba(22, 119, 184, 0.08); }
.lg-forgot-note {
  margin: -8px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--lg-bg);
  color: var(--lg-muted);
  font-size: 13.5px;
  text-align: center;
}

.lg-foot { color: #8a9cab; font-size: 12.5px; text-align: center; }

:focus-visible { outline: 2px solid var(--lg-blue); outline-offset: 2px; }

/* ---------- tablet & phone ---------- */
@media (max-width: 900px) {
  .lg-shell { grid-template-columns: 1fr; }
  .lg-brand { display: none; }
  .lg-main {
    align-items: start;
    padding-top: calc(28px + env(safe-area-inset-top));
    background:
      radial-gradient(120% 60% at 100% 0%, rgba(22, 119, 184, 0.10), transparent 60%),
      radial-gradient(80% 50% at 0% 100%, rgba(156, 203, 87, 0.12), transparent 60%),
      var(--lg-surface);
  }
  .lg-mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
  }
  .lg-mobile-brand .lg-logo { width: 46px; height: 46px; border: 1px solid var(--lg-border); }
  .lg-head h1 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
