/* صفحة الدخول — بلغة الصفحة الرئيسية البصرية (home.css: hm-*)، فالانتقال منها إلى الرئيسية بعد الدخول بلا قفزة.
   بطاقة الدخول أولاً في الترتيب (لوحة المفاتيح والهاتف)، وبجانبها الواجهة الداكنة المتحركة. والحركة دائمة بقرار المالك. */

/* ── رابطا الشريط العلوي: اللغة الأخرى واكتشف إتقان ───────────────── */
/* الشريط الفعلي = --topbar-h وحشوة Bootstrap (.5rem من كل جهة)، فيُزاح بقدرها ليتوسّط */
.lg-topbar {
  position: fixed;
  z-index: 1040;
  top: .5rem;
  left: 1.25rem;
  height: var(--topbar-h);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.lg-topbar i { font-size: .75rem; }

/* ── الشبكة ──────────────────────────────────────────────────────── */
.lg-shell {
  grid-template-columns: minmax(340px, 460px) minmax(0, 1fr);
  align-items: stretch;
  gap: 1.5rem;
  max-width: 1440px;
  min-height: calc(100vh - var(--topbar-h) - 70px);
  margin-inline: auto;
  padding: 1.5rem 1.5rem 1rem;
}

/* ── بطاقة الدخول ────────────────────────────────────────────────── */
.lg-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.4rem 2.2rem;
  border: 1px solid var(--hm-line);
  border-radius: 22px;
  background: var(--hm-card);
  box-shadow: 0 1px 2px rgba(15, 27, 51, .04), 0 24px 48px -28px rgba(15, 27, 51, .4);
}

.lg-card-logo { width: 104px; margin-bottom: 1.6rem; }
.lg-card h1 { margin: 0 0 .35rem; font-size: 1.6rem; font-weight: 800; color: var(--hm-ink); }
.lg-card-sub { margin: 0 0 1.6rem; color: var(--hm-muted); font-size: .92rem; }

.lg-form { display: grid; gap: 1.05rem; }

.lg-error {
  padding: .7rem .9rem;
  border: 1px solid #f3c2c2;
  border-radius: 12px;
  background: #fff5f5;
  color: #8a1c1c;
  font-size: .86rem;
}

.lg-error ul { margin: 0; padding-inline-start: 1.1rem; }
.lg-error.validation-summary-valid { display: none; }

.lg-field { display: grid; gap: .4rem; }
.lg-field label { font-size: .85rem; font-weight: 700; color: var(--hm-ink); }
.lg-input { position: relative; }

.lg-input > i {
  position: absolute;
  top: 50%;
  inset-inline-start: .95rem;
  transform: translateY(-50%);
  color: var(--hm-muted);
  pointer-events: none;
}

.lg-input .form-control {
  height: 50px;
  padding-inline: 2.6rem;
  border: 1px solid #d6deeb;
  border-radius: 12px;
  background: #f8fafd;
  font-size: .95rem;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.lg-input .form-control:focus {
  border-color: var(--hm-navy);
  background: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--hm-navy) 14%, transparent);
}

.lg-input:focus-within > i { color: var(--hm-navy); }

.lg-eye {
  position: absolute;
  top: 50%;
  inset-inline-end: .45rem;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--hm-muted);
}

.lg-eye:hover { background: #eef2f8; color: var(--hm-navy); }
/* بقيمة احتياطية: التذييل خارج .hm-shell الذي يعرّف --hm-navy، فبلاها يسقط outline كله */
.lg-eye:focus-visible, .lg-link:focus-visible, .lg-new a:focus-visible, .lg-footer a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--hm-navy, #0b3d91) 45%, transparent);
  outline-offset: 2px;
}

.lg-options { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: .86rem; }
.lg-link { color: var(--hm-navy); font-weight: 700; text-decoration: none; }
.lg-link:hover { text-decoration: underline; }

.lg-submit {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  height: 52px;
  margin-top: .3rem;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--hm-navy) 0%, #1b5fd0 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 14px 28px -16px rgba(11, 61, 145, .9);
  transition: transform .25s var(--hm-ease), box-shadow .25s var(--hm-ease);
}

/* لمعة تمرّ على الزر كل بضع ثوانٍ */
.lg-submit::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-18deg);
  animation: lg-sweep 5s ease-in-out 1.5s infinite;
}

@keyframes lg-sweep { 0%, 70% { inset-inline-start: -60%; } 100% { inset-inline-start: 130%; } }

.lg-submit:hover, .lg-submit:focus-visible { color: #fff; transform: translateY(-2px); box-shadow: 0 20px 34px -16px rgba(11, 61, 145, .95); }
.lg-submit:focus-visible { outline: 3px solid color-mix(in srgb, var(--hm-navy) 45%, transparent); outline-offset: 3px; }
.lg-submit i { transition: transform .25s var(--hm-ease); }
[dir="rtl"] .lg-submit:hover i { transform: translateX(-4px); }
[dir="ltr"] .lg-submit:hover i { transform: translateX(4px); }

.lg-new { margin: 1.6rem 0 0; padding-top: 1.2rem; border-top: 1px solid var(--hm-line); color: var(--hm-muted); font-size: .86rem; }
.lg-new a { color: var(--hm-navy); font-weight: 700; text-decoration: none; }
.lg-new a:hover { text-decoration: underline; }

/* ── الواجهة الداكنة ─────────────────────────────────────────────── */
/* النص أعلى، ثم مشهد رحلة المستند في الخانة الممتدة، ثم الأرقام والبلاطات */
.lg-hero {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto auto;
  align-items: start;
  gap: 1.2rem;
  min-height: 100%;
  padding: 2.6rem 2.6rem 2.2rem;
  border-radius: 22px;
}

.lg-hero .hm-hero-mark { width: 300px; bottom: -40px; inset-inline-end: 6%; }

.lg-hero h2 {
  margin: .6rem 0 .7rem;
  font-size: clamp(2rem, 3.4vw, 3.1rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.01em;
  background: linear-gradient(90deg, #fff 0%, #cfe8ff 40%, #ffe2b8 60%, #fff 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hm-shine 6s linear infinite;
}

.lg-hero-copy p { max-width: 620px; margin: 0; color: rgba(255, 255, 255, .84); font-size: 1.02rem; line-height: 1.8; }

/* دعوة التعريف: زر ذهبي بارز على الخلفية الداكنة، لمن يزور الصفحة ولا يعرف النظام */
.lg-discover {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-top: 1.1rem;
  padding: .7rem 1.35rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe2b8, #d4a24f);
  color: #0b2a5e;
  font-weight: 800;
  font-size: .98rem;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(212, 162, 79, .35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.lg-discover:hover { color: #0b2a5e; transform: translateY(-2px); box-shadow: 0 14px 34px rgba(212, 162, 79, .5); }
.lg-discover:hover .bi-arrow-left { transform: translateX(-4px); }
.lg-discover:hover .bi-arrow-right { transform: translateX(4px); }
.lg-discover .bi { transition: transform .2s ease; }
.lg-discover:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* حسابا التواصل: كبسولتان زجاجيتان بحدٍّ ذهبي، تمتلئ أيقونتهما بلون المنصة ويمرّ عليهما بريق عند المرور */
.lg-social { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .7rem; margin-top: 1rem; }
.lg-social-label { color: rgba(255, 255, 255, .7); font-size: .86rem; font-weight: 700; letter-spacing: .02em; }
.lg-soc {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding-block: .38rem;
  padding-inline: .5rem 1rem;
  border: 1px solid rgba(255, 226, 184, .38);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(10px);
  color: #fff;
  text-decoration: none;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.lg-soc::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 226, 184, .45) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s ease;
  pointer-events: none;
}
.lg-soc:hover::after, .lg-soc:focus-visible::after { transform: translateX(120%); }
.lg-soc-ic {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 50%;
  color: #fff;
  font-size: 1.25rem;
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease;
}
.lg-soc--ig .lg-soc-ic { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); box-shadow: 0 6px 18px rgba(214, 36, 159, .45); }
.lg-soc--yt .lg-soc-ic { background: linear-gradient(145deg, #ff4d5e, #ff0033 55%, #c4001f); box-shadow: 0 6px 18px rgba(255, 0, 51, .42); }
/* هالة تنبض بلون المنصة حول الأيقونة */
.lg-soc-ic::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .7); opacity: 0; }
.lg-soc:hover .lg-soc-ic::before, .lg-soc:focus-visible .lg-soc-ic::before { animation: lg-soc-ring 1.2s ease-out infinite; }
@keyframes lg-soc-ring { 0% { opacity: .9; transform: scale(.9); } 100% { opacity: 0; transform: scale(1.35); } }
.lg-soc-txt { display: grid; line-height: 1.15; }
.lg-soc-txt b { font-size: .92rem; font-weight: 800; }
.lg-soc-txt bdi { font-size: .76rem; color: rgba(255, 255, 255, .72); font-family: var(--hm-font-num, inherit); }
.lg-soc:hover, .lg-soc:focus-visible { color: #fff; transform: translateY(-3px); border-color: #ffe2b8; background: rgba(255, 255, 255, .14); }
.lg-soc:hover .lg-soc-ic, .lg-soc:focus-visible .lg-soc-ic { transform: rotate(-8deg) scale(1.12); }
.lg-soc--ig:hover .lg-soc-ic { box-shadow: 0 10px 26px rgba(214, 36, 159, .65); }
.lg-soc--yt:hover .lg-soc-ic { box-shadow: 0 10px 26px rgba(255, 0, 51, .6); }
.lg-soc--ig:hover { box-shadow: 0 12px 30px rgba(214, 36, 159, .22); }
.lg-soc--yt:hover { box-shadow: 0 12px 30px rgba(255, 0, 51, .2); }
.lg-soc:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  .lg-soc, .lg-soc-ic, .lg-soc::after { transition: none; }
  .lg-soc:hover, .lg-soc:hover .lg-soc-ic { transform: none; }
  .lg-soc:hover .lg-soc-ic::before { animation: none; }
}

/* أرقام القدرات */
.lg-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }

.lg-stat {
  display: grid;
  gap: .25rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 16px;
  background: rgba(255, 255, 255, .07);
  backdrop-filter: blur(10px);
}

.lg-stat strong {
  font-family: 'Inter', 'Tajawal', sans-serif;
  font-size: clamp(1.8rem, 2.6vw, 2.4rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #fff;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
}

/* «100%» كما تُكتب النسب في بقية النظام، لا «%100» */
[dir="rtl"] .lg-stat strong { text-align: right; }

.lg-stat strong small { margin-inline-start: 2px; font-size: .55em; opacity: .8; }
.lg-stat strong .bi { color: #ffe2b8; filter: drop-shadow(0 0 12px rgba(255, 226, 184, .45)); }
.lg-stat span { font-size: .82rem; color: rgba(255, 255, 255, .78); }

/* بلاطات الوحدات: تظهر واحدة بعد الأخرى */
.lg-modules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin: 0; padding: 0; list-style: none; }

.lg-modules li {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .7rem .8rem;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  color: rgba(255, 255, 255, .92);
  font-size: .84rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  animation: hm-rise .7s var(--hm-ease) forwards;
  transition: background .25s, border-color .25s;
}

.lg-modules li:hover { background: rgba(255, 255, 255, .11); border-color: rgba(255, 255, 255, .26); }

.lg-modules li i {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .1);
  color: #ffe2b8;
}

.lg-modules li:nth-child(1) { animation-delay: .55s; }
.lg-modules li:nth-child(2) { animation-delay: .62s; }
.lg-modules li:nth-child(3) { animation-delay: .69s; }
.lg-modules li:nth-child(4) { animation-delay: .76s; }
.lg-modules li:nth-child(5) { animation-delay: .83s; }
.lg-modules li:nth-child(6) { animation-delay: .9s; }
.lg-modules li:nth-child(7) { animation-delay: .97s; }
.lg-modules li:nth-child(8) { animation-delay: 1.04s; }
.lg-modules li:nth-child(9) { animation-delay: 1.11s; }

/* ── رحلة المستند: فاتورة ← قيد ← ميزان ← ختم الترحيل ← تقرير ─────────────
   يديرها account-login.js بأصناف تراكمية على .lg-flow (is-invoice ثم is-entry ثم is-balance ثم is-stamp ثم is-report)،
   وموضع نقطة الضوء في --p (0 عند المحطة الأولى و100 عند الأخيرة). وبلا سكربت (لا data-run) تبقى الحالة النهائية ظاهرة. */
.lg-flow {
  --p: 0;
  --gap: 1rem;
  position: relative;
  align-self: center;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  padding-block: 1rem 1.9rem;
}

/* المسار تحت المحطات لا خلفها، فنقطة الضوء ظاهرة دائماً تحت المحطة النشطة (مراجعة #631، م1).
   وطرفاه في مركزَي المحطتين الأولى والأخيرة: عرض المحطة (100% - 3 فجوات) / 4، ونصفه الثُّمن */
.lg-flow-track {
  position: absolute;
  bottom: .55rem;
  inset-inline: calc((100% - 3 * var(--gap)) / 8);
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .35) 0 8px, transparent 8px 16px);
  background-size: 32px 2px;
  animation: lg-dash 1.2s linear infinite;
}

@keyframes lg-dash { to { background-position: 32px 0; } }
[dir="rtl"] .lg-flow-track { animation-direction: reverse; }

.lg-flow-dot {
  position: absolute;
  top: 50%;
  inset-inline-start: calc(var(--p) * 1%);
  z-index: 2;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  margin-inline-start: -7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 226, 184, .35), 0 0 22px 6px rgba(255, 226, 184, .75);
  transition: inset-inline-start .7s var(--hm-ease), opacity .3s;
}

.lg-flow.is-reset .lg-flow-dot { opacity: 0; transition: none; }

.lg-st {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: .42rem;
  min-height: 124px;
  padding: .75rem .8rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  background: rgba(10, 30, 80, .62);
  transition: opacity .5s var(--hm-ease), transform .5s var(--hm-ease), box-shadow .5s;
}

.lg-st > b { display: flex; align-items: center; gap: .35rem; font-size: .76rem; font-weight: 700; color: rgba(255, 255, 255, .9); white-space: nowrap; }
.lg-st > b .bi { color: #ffe2b8; }

/* المحطة تخفت حتى يصلها المستند، ثم تضيء */
.lg-flow[data-run] .lg-st { opacity: .38; transform: translateY(6px); }
.lg-flow.is-invoice .lg-st--invoice,
.lg-flow.is-entry .lg-st--entry,
.lg-flow.is-balance .lg-st--scale,
.lg-flow.is-report .lg-st--report { opacity: 1; transform: none; box-shadow: 0 0 0 1px rgba(255, 226, 184, .35), 0 18px 34px -18px rgba(0, 0, 0, .7); }

/* 1. الفاتورة: ورقة بيضاء تُكتب سطورها */
.lg-st--invoice { background: #f8fafc; border-color: #fff; }
.lg-st--invoice > b { color: var(--hm-navy); }
.lg-st--invoice > b .bi { color: var(--hm-navy); }
.lg-ln { display: block; height: 7px; border-radius: 99px; background: #e2e8f0; overflow: hidden; }
.lg-ln i { display: block; height: 100%; border-radius: 99px; background: #94a3b8; transform-origin: var(--lg-start, right); transition: transform .45s var(--hm-ease); }
[dir="ltr"] .lg-flow { --lg-start: left; }
.lg-ln:nth-of-type(1) i { width: 86%; }
.lg-ln:nth-of-type(2) i { width: 62%; transition-delay: .3s; }
.lg-ln:nth-of-type(3) i { width: 74%; transition-delay: .6s; }
.lg-ln--total { margin-top: auto; background: transparent; }
.lg-ln--total i { width: 48%; margin-inline-start: auto; background: var(--hm-navy); transition-delay: 1s; }
.lg-flow[data-run] .lg-ln i { transform: scaleX(0); }
.lg-flow.is-invoice .lg-ln i { transform: scaleX(1); }

/* 2. القيد: مدين ودائن يمتلئان حتى يتساويا، ثم يهبط ختم الترحيل */
.lg-dc { display: grid; grid-template-columns: 2.6em minmax(0, 1fr); align-items: center; gap: .4rem; }
.lg-dc em { font-style: normal; font-size: .7rem; color: rgba(255, 255, 255, .75); }
.lg-dc-bar { height: 9px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.lg-dc-bar i { display: block; width: 100%; height: 100%; border-radius: 99px; transform-origin: var(--lg-start, right); transition: transform .6s var(--hm-ease); }
.lg-dc--dr .lg-dc-bar i { background: linear-gradient(90deg, #10b981, #34d399); }
.lg-dc--cr .lg-dc-bar i { background: linear-gradient(90deg, #d4a24f, #ffe2b8); transition-delay: .35s; }
.lg-flow[data-run] .lg-dc-bar i { transform: scaleX(0); }
.lg-flow.is-entry .lg-dc-bar i { transform: scaleX(1); }

.lg-stamp {
  position: absolute;
  inset-inline-end: .55rem;
  bottom: .5rem;
  padding: .08rem .5rem;
  border: 2px solid #e0b878;
  border-radius: 6px;
  color: #ffe2b8;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .03em;
  transform: rotate(-12deg);
  box-shadow: 0 0 14px rgba(224, 184, 120, .35);
}

.lg-flow[data-run] .lg-stamp { opacity: 0; }
.lg-flow.is-stamp .lg-stamp { opacity: 1; animation: lg-stamp .5s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes lg-stamp { from { opacity: 0; transform: rotate(-12deg) scale(2.4); } to { opacity: 1; transform: rotate(-12deg) scale(1); } }

/* 3. الميزان: مائل حتى يصل القيد، ثم يتأرجح ويستقر */
.lg-scale { width: 100%; height: 66px; margin-top: auto; overflow: visible; }
.lg-scale path { fill: none; stroke: rgba(255, 255, 255, .85); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.lg-scale .lg-scale-cord { stroke-width: 1.4; stroke: rgba(255, 255, 255, .55); }
.lg-scale .lg-scale-pan { fill: rgba(255, 226, 184, .22); stroke: #ffe2b8; stroke-width: 2; }
.lg-scale-pin { fill: #ffe2b8; }
.lg-scale-beam { transform-box: view-box; transform-origin: 60px 22px; }
.lg-flow[data-run] .lg-scale-beam { transform: rotate(-13deg); }
.lg-flow.is-balance .lg-scale-beam { animation: lg-swing 1.6s cubic-bezier(.3, .7, .3, 1) forwards; }
@keyframes lg-swing { 0% { transform: rotate(-13deg); } 30% { transform: rotate(9deg); } 55% { transform: rotate(-5deg); } 78% { transform: rotate(2deg); } 100% { transform: rotate(0); } }

.lg-st > .lg-scale-ok { justify-content: center; color: #6ee7b7; transition: opacity .4s, transform .4s var(--hm-ease); }
.lg-st > .lg-scale-ok .bi { color: #34d399; }
.lg-flow[data-run] .lg-scale-ok { opacity: 0; transform: scale(.7); }
.lg-flow.is-balance .lg-scale-ok { opacity: 1; transform: none; transition-delay: 1.35s; }

/* 4. التقرير: أعمدة تنمو، وآخرها يلمع */
.lg-cols { display: flex; align-items: flex-end; gap: 5px; height: 62px; margin-top: auto; }
.lg-cols i { flex: 1; border-radius: 4px 4px 1px 1px; background: linear-gradient(180deg, #22d3ee, #0891b2); transform-origin: bottom; transition: transform .55s var(--hm-ease); }
.lg-cols i:nth-child(1) { height: 38%; }
.lg-cols i:nth-child(2) { height: 58%; transition-delay: .12s; }
.lg-cols i:nth-child(3) { height: 47%; transition-delay: .24s; }
.lg-cols i:nth-child(4) { height: 74%; transition-delay: .36s; }
.lg-cols i:nth-child(5) { height: 100%; transition-delay: .48s; background: linear-gradient(180deg, #ffe2b8, #d4a24f); box-shadow: 0 0 16px rgba(255, 226, 184, .55); }
.lg-flow[data-run] .lg-cols i { transform: scaleY(0); }
.lg-flow.is-report .lg-cols i { transform: scaleY(1); }

/* الإعادة: يختفي كل شيء دفعة واحدة بلا حركة رجوع، إلا الخط المتقطع فيبقى يسري.
   والإيقاف (التبويب مخفي أو المشهد خارج الشاشة) يوقف الخط أيضاً */
.lg-flow.is-reset .lg-st, .lg-flow.is-reset .lg-st *, .lg-flow.is-reset .lg-flow-dot { transition: none !important; animation: none !important; }
.lg-flow.is-paused .lg-flow-track { animation-play-state: paused; }

/* الحواسيب المحمولة القصيرة: المشهد والبلاطات أقصر كي تبقى الصفحة في الشاشة */
@media (min-width: 1100px) and (max-height: 820px) {
  .lg-hero { padding: 1.9rem 2.2rem 1.7rem; gap: .9rem; }
  .lg-hero h2 { margin-block: .35rem .45rem; font-size: clamp(1.8rem, 3vw, 2.5rem); }
  .lg-flow { padding-block: .4rem 1.6rem; }
  .lg-st { min-height: 104px; padding: .6rem .7rem; }
  .lg-scale { height: 52px; }
  .lg-cols { height: 48px; }
  .lg-stat { padding: .75rem .9rem; }
  .lg-modules li { padding: .5rem .7rem; }
  .lg-card { padding-block: 1.8rem; }
  .lg-card-logo { margin-bottom: 1rem; }
}
/* ── التذييل ─────────────────────────────────────────────────────── */
.lg-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 1.5rem;
  max-width: 1440px;
  margin-inline: auto;
  padding: .6rem 1.5rem 1.4rem;
  color: #5b677a;
  font-size: .8rem;
}

.lg-footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.lg-footer a { color: #5b677a; text-decoration: none; }
.lg-footer a:hover { color: #0b3d91; }
.lg-footer .bi-instagram { color: #d6249f; }
.lg-footer .bi-youtube { color: #ff0033; }

/* ── الشاشات الأصغر: البطاقة أولاً ثم الواجهة ────────────────────── */
@media (max-width: 1099.98px) {
  .lg-shell { grid-template-columns: minmax(0, 1fr); max-width: 680px; min-height: 0; }
  .lg-hero { min-height: 0; }
}

@media (max-width: 575.98px) {
  .lg-topbar { top: 0; left: .75rem; }
  .lg-shell { padding: 1rem .75rem; }
  .lg-card { padding: 1.8rem 1.3rem; }
  .lg-hero { padding: 1.8rem 1.3rem; }
  .lg-stats { gap: .5rem; }
  .lg-stat { padding: .8rem .7rem; }
  .lg-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg-flow { --gap: .4rem; padding-block: .5rem 1.5rem; }
  .lg-st { min-height: 96px; padding: .5rem .45rem; gap: .3rem; }
  .lg-st > b { font-size: .6rem; }
  .lg-st > b:not(.lg-scale-ok) { display: block; overflow: hidden; text-overflow: ellipsis; }
  .lg-st > b .bi { display: none; }
  .lg-scale { height: 44px; }
  .lg-cols { height: 42px; gap: 3px; }
  .lg-stamp { font-size: .58rem; inset-inline-end: .3rem; bottom: .3rem; }
  .lg-st--entry { padding-bottom: 2rem; }
  .lg-dc { grid-template-columns: 1fr; gap: .15rem; }
  .lg-dc em { font-size: .58rem; }
  .lg-footer { justify-content: center; text-align: center; }
  .lg-footer-links { justify-content: center; }
}
