        .fi, i[class^="fi-rr-"], i[class*=" fi-rr-"] {
            line-height: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            vertical-align: middle;
        }
        .fi:before, i[class^="fi-rr-"]:before, i[class*=" fi-rr-"]:before {
            font-family: uicons-regular-rounded !important;
            font-style: normal;
            font-weight: normal !important;
            line-height: 1;
        }

        *, ::before, ::after { box-sizing: border-box; }

        /*--- قلبة السمة: الطبقة الجديدة تُقصّ بدائرة، كما في داخل النظام ---*/
        ::view-transition-old(root),
        ::view-transition-new(root) {
            animation: none;
            mix-blend-mode: normal;
        }
        ::view-transition-old(root) { z-index: 1; }
        ::view-transition-new(root) { z-index: 2147483646; }

        html.theme-wipe * { transition: none !important; }

        body {
            margin: 0;
            min-height: 100vh;
            /*
             | dvh بعد vh لا بدلاً منه.
             |
             | 100vh في متصفّح الهاتف يُقاس على الشاشة وشريطُ العنوان مطويّ،
             | فيزيد عن المساحة المرئية بقدره — وتظهر صفحةٌ تسعُ الشاشة
             | وكأنها أطول منها، فتُسحب سحبةً لا معنى لها. وdvh يتبع المساحة
             | المرئية فعلاً. ومن لا يعرفها من المتصفّحات يبقى على السطر قبله.
            */
            min-height: 100dvh;
            background: #fff;
            color: #0f172a;
        }

        /* ── حركة الدخول ──
              عناصر النموذج تصعد متتابعة، واللوحة تنزلق من جهتها، والقرصان
              يتمدّدان من الزاويتين. كلها opacity و transform فقط فلا تُعيد
              تخطيط الصفحة أثناء الحركة. */
        @keyframes rise {
            from { opacity: 0; transform: translateY(14px); }
            to   { opacity: 1; transform: none; }
        }
        @keyframes slide-art {
            from { opacity: 0; transform: translateX(-28px) scale(0.97); }
            to   { opacity: 1; transform: none; }
        }
        @keyframes bloom {
            from { opacity: 0; transform: scale(0.4); }
            to   { opacity: 1; transform: scale(1); }
        }

        .l-form > .shape1,
        .l-form > .shape2 {
            opacity: 0;
            animation: bloom 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }
        .l-form > .shape2 { animation-delay: 0.12s; }

        .page-head {
            opacity: 0;
            animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.05s forwards;
        }

        .form__art {
            opacity: 0;
            animation: slide-art 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.14s forwards;
        }

        .form__content > * {
            opacity: 0;
            animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }
        .form__content > *:nth-child(1) { animation-delay: 0.16s; }
        .form__content > *:nth-child(2) { animation-delay: 0.23s; }
        .form__content > *:nth-child(3) { animation-delay: 0.30s; }
        .form__content > *:nth-child(4) { animation-delay: 0.37s; }
        .form__content > *:nth-child(5) { animation-delay: 0.44s; }

        /* وداخل النموذج نفسه: الحقول ثم الخيارات ثم الزر */
        .form__fields > *,
        .form__row,
        .form__button {
            opacity: 0;
            animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }
        .form__fields > *:nth-child(1) { animation-delay: 0.34s; }
        .form__fields > *:nth-child(2) { animation-delay: 0.41s; }
        .form__row    { animation-delay: 0.48s; }
        .form__button { animation-delay: 0.55s; }

        @media (prefers-reduced-motion: reduce) {
            .l-form > .shape1,
            .l-form > .shape2,
            .form__art,
            .form__content > *,
            .form__fields > *,
            .form__row,
            .form__button {
                animation: none;
                opacity: 1;
                transform: none;
            }
        }

        /* ── الهيكل ── */
        .l-form {
            position: relative;
            min-height: 100vh;
            min-height: 100dvh;   /* كما في body: المساحة المرئية لا الشاشة */
            display: flex;
            align-items: center;
            overflow: hidden;
        }

        /*
         | الرأس والمحتوى كتلة واحدة تتوسّط الشاشة. لو ثُبّت الرأس في أعلى
         | الصفحة والمحتوى في وسطها لبقي بينهما شريط فارغ يتّسع كلما طالت الشاشة.
         */
        .page {
            position: relative;
            z-index: 1;
            width: 100%;
            display: flex;
            flex-direction: column;
            gap: 2rem;
            padding: 2rem 1.5rem;
        }
        @media screen and (min-width: 968px) {
            .page { gap: 2.5rem; padding: 2.5rem 3rem; }
        }

        /* قرصان متدرّجان يحملان لون العلامة إلى الزاويتين */
        .shape1,
        .shape2 {
            position: absolute;
            border-radius: 50%;
            pointer-events: none;
        }
        .shape1 {
            width: 200px;
            height: 200px;
            top: -7rem;
            inset-inline-start: -3.5rem;
            background: linear-gradient(180deg, #0D3B66 0%, rgba(13, 59, 102, 0) 100%);
        }
        .shape2 {
            width: 200px;
            height: 200px;
            bottom: -6rem;
            inset-inline-end: -5.5rem;
            /* التدرّج مقلوب باللون لا بـ transform، كي لا يصطدم بحركة الدخول */
            background: linear-gradient(0deg, #F2B233 0%, rgba(242, 178, 51, 0) 100%);
        }

        /*
         | عمودٌ واحد يملأ العرض على الجوّال.
         |
         | كانت الشبكة بـjustify-content: center بلا أعمدةٍ معرَّفة، فالعمود
         | يأخذ عرض محتواه لا عرض الشاشة — و width:100% داخله يُحسب على ذلك
         | العرض المنكمش، فينزل النموذج إلى مئتي بكسل في شاشة ٣٧٥. أعمدةُ
         | الحاسوب معرَّفة في نقطة ٩٦٨، فما كان للجوّال تعريف.
        */
        .form {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            justify-items: center;
            align-items: center;
            gap: 2.5rem;
        }

        .form__art { display: none; }

        .form__content {
            width: 100%;
            max-width: 21rem;
            margin-inline: auto;
            position: relative;
            z-index: 1;
        }

        /* ── رأس الصفحة: العلامة عريضة في الأعلى، خارج النموذج ── */
        .page-head {
            display: flex;
            justify-content: center;
            width: 100%;
            max-width: 62.5rem;
            margin-inline: auto;
            padding-bottom: 1.25rem;
            border-bottom: 1px solid #f1f5f9;
        }

        .brand { display: flex; align-items: center; gap: 1.125rem; min-width: 0; }
        .brand__logo {
            height: 4rem;
            width: auto;
            object-fit: contain;
            flex-shrink: 0;
        }
        @media screen and (min-width: 968px) {
            .brand__logo { height: 5.25rem; }
        }
        /* سطر الحقوق: الرقم والعلامة في صفٍّ واحد متوسّط */
        .form__foot-line--brand {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
        }
        .num { font-variant-numeric: tabular-nums; }

        .brand__sep { width: 1px; align-self: stretch; margin-block: 0.25rem; background: #e2e8f0; flex-shrink: 0; }
        .brand__text { display: flex; flex-direction: column; justify-content: center; gap: 0.1875rem; min-width: 0; }
        .brand__name {
            font-size: 0.8125rem;
            font-weight: 800;
            letter-spacing: -0.01em;
            white-space: nowrap;
            text-align: start;
        }
        @media screen and (min-width: 968px) {
            .brand__name { font-size: 1.125rem; }
        }
        .brand__sub {
            font-size: 0.75rem;
            font-weight: 800;
            letter-spacing: 0.04em;
            color: #0D3B66;
            opacity: 0.8;
            text-align: start;
        }

        .form__title {
            font-size: 1.75rem;
            font-weight: 800;
            letter-spacing: -0.02em;
            margin: 0;
        }
        .form__lead {
            font-size: 0.75rem;
            color: #64748b;
            margin: 0.375rem 0 1.75rem;
        }

        .form__fields { display: flex; flex-direction: column; gap: 0.875rem; }

        .form__row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            margin: 0.75rem 0 1.25rem;
        }
        .form__remember {
            display: inline-flex;
            align-items: center;
            gap: 0.4375rem;
            font-size: 0.6875rem;
            font-weight: 700;
            color: #64748b;
            cursor: pointer;
            user-select: none;
        }
        .form__remember input { width: 0.9375rem; height: 0.9375rem; accent-color: #0D3B66; cursor: pointer; }
        .form__remember:hover { color: #0D3B66; }
        .form__forgot {
            font-size: 0.6875rem;
            font-weight: 700;
            color: #0D3B66;
            text-decoration: none;
        }
        .form__forgot:hover { text-decoration: underline; }

        .form__button {
            width: 100%;
            height: 2.75rem;
            font-size: 0.8125rem;
            border-radius: 0.75rem;
            gap: 0.5rem;
        }
        /* الظل عند التمرير من القالب الأصلي، بلون العلامة */
        .form__button:hover:not(:disabled) { box-shadow: 0 15px 36px -12px rgba(13, 59, 102, 0.55); }

        .form__foot {
            margin-top: 2.5rem;
            padding-top: 1.125rem;
            border-top: 1px solid #f1f5f9;
            text-align: center;
        }
        .form__foot-line {
            margin: 0;
            font-size: 0.625rem;
            font-weight: 600;
            color: #94a3b8;
            line-height: 1.8;
        }
        .form__foot-dev {
            margin: 0.375rem 0 0;
            font-size: 0.5625rem;
            font-weight: 700;
            color: #cbd5e1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.25rem;
        }
        .form__foot-dev a {
            color: #0D3B66;
            text-decoration: none;
            border-bottom: 1px solid transparent;
            transition: border-color 0.15s ease;
        }
        .form__foot-dev a:hover { border-bottom-color: currentColor; }

        /* ── تنبيه ── */
        .form__alert {
            display: flex;
            align-items: flex-start;
            gap: 0.5rem;
            margin-bottom: 1.125rem;
            padding: 0.625rem 0.75rem;
            border-radius: 0.625rem;
            background: #fff1f2;
            border: 1px solid #ffe4e6;
            color: #9f1239;
            font-size: 0.6875rem;
            font-weight: 600;
            line-height: 1.7;
        }
        .form__alert i { flex-shrink: 0; margin-top: 0.125rem; color: #e11d48; }

        /* ── زر السمة ── */
        .theme-btn {
            position: absolute;
            top: 1.25rem;
            inset-inline-end: 1.25rem;
            z-index: 3;
            width: 2.25rem;
            height: 2.25rem;
            border-radius: 0.625rem;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid #e2e8f0;
            background: #fff;
            color: #64748b;
            cursor: pointer;
            transition: color 0.15s ease, border-color 0.15s ease;
        }
        .theme-btn:hover { color: #0D3B66; border-color: #cbd5e1; }
        .theme-btn__icons { position: relative; width: 0.875rem; height: 0.875rem; }
        .theme-btn__icons i {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8125rem;
            transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.32, 0.72, 0, 1);
        }
        .theme-btn__moon { opacity: 1; transform: rotate(0) scale(1); }
        .theme-btn__sun  { opacity: 0; transform: rotate(-90deg) scale(0.5); }
        html[data-theme="dark"] .theme-btn__moon { opacity: 0; transform: rotate(90deg) scale(0.5); }
        html[data-theme="dark"] .theme-btn__sun  { opacity: 1; transform: rotate(0) scale(1); }

        /*
         | الترويسة على الهاتف: الشعار فوق الاسم لا بجانبه.
         |
         | الاسم الإنجليزيّ مكتوبٌ بـnowrap ليبقى سطراً واحداً على الحاسوب،
         | واسمٌ طويل مثل «Integrated Resource Management Platform» يمتدّ
         | أربعمئةً وخمسة وثلاثين بكسلاً في حاويةٍ عرضُها ثلاثمئة وسبعة
         | وعشرون — فيخرج من حدّه ويصطدم بالشعار.
         |
         | فيُكسر السطر هنا، ويقف الشعار فوق الاسم، ويصغر: أربعُ سنتيمترات
         | من الشعار على شاشةِ هاتفٍ تأكل ثلث الترويسة.
        */
        @media screen and (max-width: 640px) {
            .page-head { flex-direction: column; gap: 0.875rem; }

            .brand {
                flex-direction: column;
                align-items: center;
                gap: 0.625rem;
                width: 100%;
            }
            .brand__sep { display: none; }
            .brand__logo { height: 3rem; }

            .brand__text { align-items: center; width: 100%; }
            .brand__name {
                white-space: normal;
                text-align: center;
                line-height: 1.5;
            }
            .brand__sub { text-align: center; }
        }

        /* ── الشاشات الكبيرة: اللوحة البصرية بجانب النموذج ── */
        @media screen and (min-width: 968px) {
            .shape1 { width: 400px; height: 400px; top: -11rem; inset-inline-start: -6.5rem; }
            .shape2 { width: 300px; height: 300px; inset-inline-end: -6.5rem; }

            .form {
                grid-template-columns: minmax(0, 24rem) minmax(0, 32rem);
                justify-content: center;
                justify-items: stretch;
                gap: 4.5rem;
                align-items: center;
            }
            .form__art { display: block; width: 100%; }
            .form__content { width: 100%; max-width: 24rem; }
            .form__title { font-size: 2rem; }
        }

        /* ── السمة الداكنة ── */
        html[data-theme="dark"] body            { background: #0a1424; color: #e8eef6; }
        html[data-theme="dark"] .shape1         { background: linear-gradient(180deg, #1C74B0 0%, rgba(28, 116, 176, 0) 100%); }
        html[data-theme="dark"] .brand__sep  { background: #1e3352; }
        html[data-theme="dark"] .page-head   { border-bottom-color: #16263f; }
        html[data-theme="dark"] .brand__sub  { color: #3d8ec9; opacity: 1; }
        html[data-theme="dark"] .form__lead,
        html[data-theme="dark"] .form__foot-line { color: #6b8099; }
        html[data-theme="dark"] .form__foot      { border-top-color: #1e3352; }
        html[data-theme="dark"] .form__foot-dev  { color: #47607d; }
        html[data-theme="dark"] .form__foot-dev a { color: #3d8ec9; }
        html[data-theme="dark"] .form__remember  { color: #9fb0c6; }
        html[data-theme="dark"] .form__forgot    { color: #3d8ec9; }
        html[data-theme="dark"] .theme-btn       { background: #101d33; border-color: #1e3352; color: #9fb0c6; }
        html[data-theme="dark"] .theme-btn:hover { color: #3d8ec9; border-color: #3d8ec9; }
        html[data-theme="dark"] .form__alert     { background: rgba(244, 63, 94, 0.12); border-color: rgba(244, 63, 94, 0.28); color: #fda4af; }
        html[data-theme="dark"] .form__button:hover:not(:disabled) { box-shadow: 0 15px 36px -12px rgba(28, 116, 176, 0.5); }
