/* تسجيل الدخول — نصف داكن للهوية ونصف أبيض للنموذج */
html body.lg-body:not(#fx) { background: #fff !important; color: #14110a !important; }
html body.lg-body .lg-page:not(#fx) { min-height: 100dvh; }

.lg-shell {
  --lg-font: "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif;
  --lg-ink: #070a0f;
  --lg-orange: #4A7FB5;
  --lg-amber: #4A7FB5;
  --lg-sand: #EEF3F9;
  --lg-line: #1b1b1b;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100dvh;
  background: #fff;
  font-family: var(--lg-font);
}

/* ---------- الجانب الداكن ---------- */
.lg-hero {
  --lg-px: clamp(1.2rem, 3.4vw, 3rem);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1.5rem;
  padding: clamp(1.2rem, 3vw, 2.4rem) var(--lg-px) 0;
  background: linear-gradient(180deg, #3F6E9E 0%, #4A7FB5 100%);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.lg-hero-media { position: absolute; top: 0; inset-inline: 0; aspect-ratio: 647 / 426; z-index: -1; }
.lg-hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(1.1) brightness(1.15); }
/* تلوين الصورة الداكنة بالأزرق ليتناسق مع الثيم، وتلاشٍ سفلي يصلها بخلفية الغلاف بلا حافة */
.lg-hero-media::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(74,127,181,.55) 0%, rgba(74,127,181,.35) 55%, #4A7FB5 100%); mix-blend-mode: screen; }
.lg-hero-media::before { content: ""; position: absolute; inset: auto 0 0 0; height: 35%; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(74,127,181,0) 0%, #4A7FB5 100%); }

.lg-badge {
  position: absolute; top: clamp(1rem, 2.6vw, 2rem); inset-inline-start: var(--lg-px);
  display: flex; align-items: center; gap: .55rem; margin: 0;
}
.lg-badge-text {
  padding: .3rem .95rem .34rem; background: #FFFFFF; color: #2F5F91; border-radius: 8px;
  font: 800 .88rem/1.4 var(--lg-font); box-shadow: 0 4px 14px rgba(31,42,55,.22);
}
.lg-badge-ico { display: block; width: 3.1rem; height: 3.1rem; filter: drop-shadow(0 4px 10px rgba(74,127,181,.35)); }
.lg-badge-ico svg { width: 100%; height: 100%; display: block; }

.lg-hero-copy { display: grid; gap: 1.15rem; justify-items: start; }
.lg-brand-row { display: flex; align-items: center; gap: .9rem; }
.lg-logo {
  display: grid; place-items: center; width: 4.4rem; height: 4.4rem; flex: none;
  border: 1.5px solid rgba(255,255,255,.75);
}
.lg-logo svg { width: 3.1rem; height: 3.1rem; }
.lg-brand { margin: 0; font: 800 clamp(2rem, 2.9vw, 2.9rem)/1.1 var(--lg-font); color: #fff; }
.lg-sub { margin: .15rem 0 0; color: #EAF2FA; font: 700 .95rem/1.4 var(--lg-font); }
.lg-lead { margin: .2rem 0 0; max-width: 40rem; color: #FFFFFF; font: 600 clamp(.85rem, 1.15vw, 1rem)/1.75 var(--lg-font); text-shadow: 0 1px 6px rgba(31,42,55,.35); }

.lg-pills { display: flex; flex-wrap: wrap; gap: .9rem; list-style: none; margin: .7rem 0 0; padding: 0; }
.lg-pills li {
  padding: .42rem 1rem; color: #2F5F91; font: 700 .85rem/1.4 var(--lg-font);
  border: 0; border-radius: 999px;
  background: #FFFFFF;
  box-shadow: 0 3px 10px rgba(31,42,55,.22);
}

.lg-chart { display: block; width: calc(100% + 2 * var(--lg-px)); max-width: none; height: auto; margin: .6rem calc(-1 * var(--lg-px)) 0; }
.lg-chart-grid line { stroke: rgba(255,255,255,.28); stroke-width: 2; }
.lg-chart-line { fill: none; stroke: #FFFFFF; stroke-width: 2.2; stroke-linejoin: round; }
.lg-chart-tick { stroke: rgba(255,255,255,.55); stroke-width: 2; }
.lg-chart-base { stroke: #FFFFFF; stroke-width: 2.4; }
.lg-chart-dots circle { fill: #FFFFFF; }
.lg-chart-months text { fill: #EAF2FA; font: 500 13px "Montserrat", var(--lg-font); text-anchor: middle; }

/* ---------- جانب النموذج ---------- */
.lg-panel { display: grid; place-items: center; padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem); background: #fff; }
.lg-card {
  position: relative; width: min(100%, 33rem);
  padding: 1.7rem clamp(1.4rem, 9vw, 4.9rem) 3rem;
  border-radius: 2.2rem;
  background: #FFFFFF;
  border: 2px solid #4A7FB5; border-top: 8px solid #4A7FB5;
  box-shadow: 0 18px 44px rgba(74,127,181,.32);
  font-family: var(--lg-font);
}
.lg-avatar {
  display: grid; place-items: center; width: 4.9rem; height: 4.9rem; border-radius: 50%;
  margin: 0 auto 1.7rem; background: #4A7FB5; box-shadow: 0 6px 18px rgba(74,127,181,.4);
}
.lg-avatar svg { width: 2.9rem; height: 2.9rem; fill: none; stroke: #FFFFFF; stroke-width: 1.5; stroke-linejoin: round; }

.lg-card-head { margin-bottom: 2.2rem; }
.lg-title { margin: 0; font: 800 1.3rem/1.4 var(--lg-font); color: #4A7FB5; }
.lg-tagline { margin: .15rem 0 0; font: 600 .82rem/1.5 var(--lg-font); color: #3B4A5C; }

.lg-form { display: grid; gap: 1.2rem; }
.lg-field label { display: block; margin-bottom: .55rem; font: 700 1.05rem/1.4 var(--lg-font); color: #1F2A37; }
.lg-input { position: relative; }
.lg-input svg {
  position: absolute; top: 50%; inset-inline-end: 1.1rem; transform: translateY(-50%);
  width: 1.4rem; height: 1.4rem; fill: #4A7FB5; stroke: none; pointer-events: none;
}
.lg-input input {
  width: 100%; height: 2.95rem; box-sizing: border-box;
  padding: 0 3.4rem 0 clamp(1rem, 19%, 4.9rem); direction: ltr; text-align: left;
  border: 1.5px solid #4A7FB5; border-radius: .9rem; background: #fff; color: #1F2A37;
  font: 400 .85rem "Montserrat", var(--lg-font); letter-spacing: .02em;
}
.lg-input input::placeholder { color: #6B7785; opacity: 1; }
.lg-input input:focus-visible { outline: 3px solid #4A7FB5; outline-offset: 2px; }

.lg-submit {
  justify-self: center; display: inline-flex; align-items: center; justify-content: center; gap: 1.1rem;
  width: min(100%, 16.2rem); height: 3.05rem; margin-top: 1.1rem; cursor: pointer;
  border: 0; border-radius: .6rem; color: #FFFFFF;
  background: linear-gradient(180deg, #5A8EC4 0%, #4A7FB5 55%, #3F6E9E 100%);
  font: 700 1.05rem var(--lg-font);
  box-shadow: 0 8px 20px rgba(74,127,181,.45);
  transition: transform .15s ease, box-shadow .15s ease;
}
.lg-submit svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; }
.lg-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(74,127,181,.42); }
.lg-submit:focus-visible { outline: 3px solid #14110a; outline-offset: 3px; }

.lg-error {
  display: flex; align-items: center; gap: .6rem; margin: 0 0 1.1rem; padding: .6rem .9rem;
  border: 1.5px solid #be123c; border-radius: .8rem; background: #ffe4e6; color: #9f1239; font-weight: 600; font-size: .9rem;
}
.lg-error svg { width: 1.2rem; height: 1.2rem; flex: none; fill: none; stroke: #E57373; stroke-width: 2; stroke-linecap: round; }

/* ---------- الشاشات الصغيرة ---------- */
@media (max-width: 900px) {
  .lg-shell { grid-template-columns: 1fr; }
  .lg-hero { padding-top: 5.2rem; padding-bottom: 1.6rem; gap: 1rem; }
  .lg-hero-media { aspect-ratio: auto; bottom: 0; }
  .lg-hero-media img { object-position: 70% 30%; opacity: .75; }
  .lg-lead, .lg-chart { display: none; }
  .lg-pills { gap: .5rem; }
  .lg-pills li { font-size: .75rem; padding: .35rem .7rem; }
}

@media (prefers-reduced-motion: reduce) {
  .lg-submit { transition: none; }
}
