/* ============================================================
   Fluff System — صفحات الدخول والتسجيل (مملوك لوكيل: auth)
   الماركب: resources/views/filament/auth/{layout,page}.blade.php
   الصفحات: App\Filament\Auth\{AdminLogin,PortalLogin} + Portal\Pages\RegisterMarketer

   كل حاجة هنا تحت .fx-auth (روت الـ layout) — مفيش ولا قاعدة بتطلع برّه.
   الملف ده بيتحمّل بعد base.css؛ قواعد الفورم هنا specificity أعلى عشان تكسب.
   الفهرس:
     0. التوكنز          1. الخلفية والمربعات المنوّرة
     2. الكارت الزجاج     3. نص الفورم (هيدر/حقول/زرار/أو/فوتر)
     4. اللوحة البصرية    5. الحركة       6. الموبايل      7. تقليل الحركة
   ============================================================ */

/* ---------- 0. التوكنز ---------- */
.fx-auth {
    /* الخلفية */
    --fxa-bg-1: #0b1214;          /* فحمي */
    --fxa-bg-2: #0a1d1e;
    --fxa-bg-3: #05302d;          /* تيل غامق */

    /* الكارت (فاتح: أبيض زجاج) */
    --fxa-card-bg: linear-gradient(160deg, rgb(255 255 255 / .97), rgb(250 253 253 / .9) 55%, rgb(244 250 250 / .86));
    --fxa-card-border: rgb(255 255 255 / .7);
    --fxa-card-hi: rgb(255 255 255 / .9);
    --fxa-card-shadow: 0 60px 120px -40px rgb(0 0 0 / .8), 0 24px 48px -24px rgb(0 0 0 / .5);
    --fxa-text: #0e1a1c;
    --fxa-muted: #4d5b60;          /* على أبيض ≈ 7:1 */
    --fxa-faint: #56656a;          /* ≈ 5:1 على الكارت */
    --fxa-divider: rgb(14 40 44 / .1);

    /* الحقول */
    --fxa-input-bg: #eff3f4;
    --fxa-input-bg-hover: #e8eef0;
    --fxa-input-bg-focus: #fff;
    --fxa-input-ring: rgb(14 40 44 / .07);
    --fxa-placeholder: #8a989c;

    /* الزرار (700 تحت الكلام الأبيض = AA مع أي درجة primary معقولة) */
    --fxa-btn-from: color-mix(in oklab, var(--primary-500) 55%, var(--primary-700));
    --fxa-btn-to: var(--primary-700);
    --fxa-link: var(--primary-700);

    /* اللوحة البصرية — admin: تيل → أخضر غامق */
    --fxa-v-1: #0f766e;
    --fxa-v-2: #0b4f4a;
    --fxa-v-3: #032925;
    --fxa-v-blob-a: #14b8a6;
    --fxa-v-blob-b: #0e7490;
    --fxa-v-blob-c: #5eead4;
    --fxa-v-blob-d: #fb7185;
    --fxa-v-accent: #5eead4;

    --fxa-ease: cubic-bezier(.22, 1, .36, 1);
    --fxa-radius: 28px;
}

.fx-auth--portal {
    --fxa-v-1: #047857;
    --fxa-v-2: #065f46;
    --fxa-v-3: #022c22;
    --fxa-v-blob-a: #10b981;
    --fxa-v-blob-b: #0d9488;
    --fxa-v-blob-c: #6ee7b7;
    --fxa-v-blob-d: #fbbf24;
    --fxa-v-accent: #6ee7b7;
    --fxa-bg-3: #06301f;
}

.dark .fx-auth {
    --fxa-bg-1: #070c0d;
    --fxa-bg-2: #08161a;
    --fxa-bg-3: #04231f;

    --fxa-card-bg: linear-gradient(160deg, rgb(22 31 34 / .8), rgb(14 21 24 / .72));
    --fxa-card-border: rgb(255 255 255 / .09);
    --fxa-card-hi: rgb(255 255 255 / .07);
    --fxa-text: #eef4f5;
    --fxa-muted: rgb(238 244 245 / .7);
    --fxa-faint: rgb(238 244 245 / .55);
    --fxa-divider: rgb(255 255 255 / .09);

    --fxa-input-bg: rgb(255 255 255 / .055);
    --fxa-input-bg-hover: rgb(255 255 255 / .075);
    --fxa-input-bg-focus: rgb(255 255 255 / .08);
    --fxa-input-ring: rgb(255 255 255 / .09);
    --fxa-placeholder: rgb(238 244 245 / .38);

    --fxa-btn-from: var(--primary-600);
    --fxa-btn-to: var(--primary-700);
    --fxa-link: var(--primary-300);
}
.dark .fx-auth--portal { --fxa-bg-3: #04241a; }

/* ---------- 1. الخلفية والمربعات المنوّرة ---------- */
.fi-body:has(> .fx-auth),
.fi-body:has(.fx-auth) { background-color: var(--fxa-bg-1, #0b1214); }
/* خلفية الثيم العامة مش محتاجينها هنا (عندنا خلفيتنا) */
.fi-body:has(.fx-auth) .fx-ambient { display: none; }

.fx-auth {
    position: relative;
    z-index: 1;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 2.5rem 1.5rem;
    color: var(--fxa-text);
    background:
        radial-gradient(60rem 36rem at 85% -8%, rgb(20 184 166 / .2), transparent 62%),
        radial-gradient(52rem 38rem at -5% 108%, rgb(6 95 70 / .38), transparent 60%),
        linear-gradient(160deg, var(--fxa-bg-1) 0%, var(--fxa-bg-2) 48%, var(--fxa-bg-3) 100%);
}

.fx-auth-sky {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
/* فينيت خفيف على الأطراف */
.fx-auth-sky::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 85% 75% at 50% 45%, transparent 55%, rgb(0 0 0 / .45));
}
/* هالة واسعة بتتحرك ببطء ورا الكارت */
.fx-auth-aurora {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70rem;
    height: 44rem;
    margin: -22rem 0 0 -35rem;
    border-radius: 50%;
    background:
        radial-gradient(closest-side at 30% 45%, rgb(45 212 191 / .16), transparent),
        radial-gradient(closest-side at 72% 60%, rgb(16 185 129 / .12), transparent);
    animation: fxa-aurora 26s ease-in-out infinite alternate;
    will-change: transform;
}

.fx-auth-p {
    --c: #2dd4bf;
    --g: rgb(45 212 191 / .55);
    --o: .7;
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--s);
    height: var(--s);
    border-radius: 28%;
    background: var(--c);
    box-shadow: 0 0 calc(var(--s) * 1.5) calc(var(--s) * .15) var(--g);
    opacity: 0;
    animation: fxa-float var(--d) ease-in-out var(--dl) infinite;
    will-change: transform, opacity;
}
.fx-auth-p--mint { --c: #a7f3d0; --g: rgb(167 243 208 / .45); --o: .5; }
.fx-auth-p--coral { --c: #fb7185; --g: rgb(251 113 133 / .5); --o: .6; }

/* ---------- 2. الكارت الزجاج ---------- */
.fx-auth-main {
    width: 100%;
    max-width: 66rem;
    outline: none;
}
.fx-auth-page { width: 100%; }

.fx-auth-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
    gap: .75rem;
    min-height: min(41rem, calc(100dvh - 5rem));
    padding: .75rem;
    border-radius: var(--fxa-radius);
    background: var(--fxa-card-bg);
    border: 1px solid var(--fxa-card-border);
    box-shadow: inset 0 1px 0 var(--fxa-card-hi), var(--fxa-card-shadow);
    -webkit-backdrop-filter: blur(28px) saturate(1.6);
    backdrop-filter: blur(28px) saturate(1.6);
    /* backwards بس: الـ transform مايفضلش على العنصر بعد الحركة */
    animation: fxa-card-in .9s var(--fxa-ease) backwards;
}

/* ---------- 3. نص الفورم ---------- */
.fx-auth-pane {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 2.25rem clamp(1.5rem, 4.2vw, 3.5rem) 1.25rem;
}
.fx-auth-pane > * { width: 100%; max-width: 24.5rem; margin-inline: auto; }

.fx-auth-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.75rem;
    animation: fxa-rise .7s var(--fxa-ease) .12s backwards;
}
.fx-auth-head .fx-auth-logo { height: 2.5rem !important; margin-bottom: 1.75rem; }
.fx-auth-head .fx-brand-name { font-size: 1.375rem; color: var(--fxa-text); }
.fx-auth-heading {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.35;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--fxa-text);
}
.fx-auth-subheading {
    margin: .4rem 0 0;
    font-size: .95rem;
    line-height: 1.7;
    color: var(--fxa-muted);
}
.fx-auth-subheading a { color: var(--fxa-link); font-weight: 700; }

.fx-auth-body { animation: fxa-rise .7s var(--fxa-ease) .2s backwards; }

/* الليبلز */
.fx-auth-body .fi-fo-field-label-content { font-size: .875rem; font-weight: 600; color: var(--fxa-text); }
.fx-auth-body .fi-fo-field-label-required-mark { color: var(--danger-600); }
.dark .fx-auth-body .fi-fo-field-label-required-mark { color: var(--danger-400); }
.fx-auth-body .fi-fo-field-wrp-helper-text,
.fx-auth-body .fi-fo-field-helper-text,
.fx-auth-body .fi-sc-text { color: var(--fxa-faint); font-size: .8rem; }

/* الحقول: رمادي فاتح من غير حدود واضحة → أبيض + رينج البراند وقت الفوكس */
.fx-auth .fx-auth-body .fi-input-wrp {
    border-radius: 12px;
    background-color: var(--fxa-input-bg);
    --tw-ring-color: var(--fxa-input-ring);
    --tw-shadow: 0 0 #0000; /* مش none: none جوّه قايمة box-shadow بتبوّظ الرينج كله */
    transition: background-color .18s ease, box-shadow .2s ease;
}
@media (hover: hover) {
    .fx-auth .fx-auth-body .fi-input-wrp:not(.fi-disabled):not(.fi-invalid):hover {
        background-color: var(--fxa-input-bg-hover);
        --tw-ring-color: var(--fxa-input-ring);
    }
}
.fx-auth .fx-auth-body .fi-input-wrp:not(.fi-disabled):not(:has(.fi-ac-action:focus)):focus-within {
    background-color: var(--fxa-input-bg-focus);
    --tw-ring-color: var(--primary-500);
    --tw-shadow: 0 0 0 4px color-mix(in oklab, var(--primary-500) 18%, transparent);
}
.dark .fx-auth .fx-auth-body .fi-input-wrp:not(.fi-disabled):not(:has(.fi-ac-action:focus)):focus-within {
    --tw-ring-color: var(--primary-400);
    --tw-shadow: 0 0 0 4px color-mix(in oklab, var(--primary-400) 22%, transparent);
}
/* غلط: لون أحمر خفيف + هزة صغيرة مرة واحدة */
.fx-auth .fx-auth-body .fi-input-wrp.fi-invalid {
    background-color: color-mix(in oklab, var(--danger-500) 7%, var(--fxa-input-bg-focus));
    --tw-ring-color: var(--danger-600);
    animation: fxa-shake .42s ease both;
}
.dark .fx-auth .fx-auth-body .fi-input-wrp.fi-invalid {
    background-color: color-mix(in oklab, var(--danger-500) 10%, transparent);
    --tw-ring-color: var(--danger-400);
}
.fx-auth .fx-auth-body .fi-input-wrp.fi-invalid:not(.fi-disabled):focus-within {
    --tw-ring-color: var(--danger-600);
    --tw-shadow: 0 0 0 4px color-mix(in oklab, var(--danger-500) 16%, transparent);
}

.fx-auth-body .fi-input {
    padding-block: .8rem;
    font-size: .95rem;
    color: var(--fxa-text);
}
.fx-auth-body .fi-input::placeholder { color: var(--fxa-placeholder); opacity: 1; }
/* الإيميل والموبايل والباسورد بيتكتبوا LTR بس بيتصفّوا يمين مع الفورم */
[dir='rtl'] .fx-auth-body .fi-input[dir='ltr'] { text-align: right; }
.fx-auth-body .fi-input-wrp-suffix { border: 0; padding-inline: .25rem .5rem; }
.fx-auth-body .fi-input-wrp-suffix .fi-icon-btn { color: var(--fxa-faint); }
@media (hover: hover) {
    .fx-auth-body .fi-input-wrp-suffix .fi-icon-btn:hover { color: var(--fxa-text); background-color: transparent; }
}

/* رسالة الغلط */
.fx-auth-body .fi-fo-field-wrp-error-message {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    font-weight: 600;
    color: var(--danger-700);
    animation: fxa-rise .35s var(--fxa-ease) backwards;
}
.fx-auth-body .fi-fo-field-wrp-error-message::before {
    content: "!";
    display: grid;
    place-items: center;
    flex: none;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    font-size: .7rem;
    line-height: 1;
    color: #fff;
    background-color: var(--danger-600);
}
.dark .fx-auth-body .fi-fo-field-wrp-error-message { color: var(--danger-300); }
.dark .fx-auth-body .fi-fo-field-wrp-error-message::before { background-color: var(--danger-500); }

/* سطر "افتكرني" + "نسيت كلمة السر" */
.fx-auth-remember { justify-content: space-between; gap: .75rem; }
.fx-auth-remember .fi-fo-field-label { gap: .55rem; cursor: pointer; }
.fx-auth-remember .fi-fo-field-label-content { font-weight: 500; color: var(--fxa-muted); }
.fx-auth-body .fi-checkbox-input {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 6px;
    background-color: var(--fxa-input-bg);
    --tw-ring-color: color-mix(in oklab, var(--fxa-text) 22%, transparent);
}
.fx-auth-hint { font-size: .825rem; color: var(--fxa-faint); white-space: nowrap; }
.fx-auth-link {
    font-weight: 700;
    color: var(--fxa-link);
    text-decoration: none;
    text-underline-offset: 3px;
    border-radius: 4px;
}
.fx-auth-link:hover { text-decoration: underline; }
.fx-auth-link:focus-visible { outline: 2px solid var(--primary-500); outline-offset: 2px; }
.fx-auth-remember .fx-auth-link { font-size: .825rem; }

/* الزرار الأساسي: عرض كامل + لمعة بتعدّي + ضغطة */
.fx-auth-body .fi-sc-actions { margin-top: .5rem; }
.fx-auth .fx-auth-body .fi-sc-actions .fi-btn.fi-color:not(.fi-outlined) {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 3rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background-color: var(--fxa-btn-to);
    background-image: linear-gradient(180deg, var(--fxa-btn-from), var(--fxa-btn-to));
    /* بنلغي لمعة الثيم العامة (background-position) — هنا اللمعة ::after */
    background-size: 100% 100%;
    background-position: 0 0;
    background-repeat: no-repeat;
    --tw-ring-color: transparent;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .22),
        0 1px 2px color-mix(in oklab, var(--primary-900) 30%, transparent),
        0 10px 24px -10px color-mix(in oklab, var(--primary-600) 70%, transparent);
    transition: translate .18s var(--fxa-ease), scale .12s ease, box-shadow .25s var(--fxa-ease), filter .2s ease;
}
.fx-auth .fx-auth-body .fi-sc-actions .fi-btn.fi-color:not(.fi-outlined) > * { position: relative; z-index: 1; }
.fx-auth .fx-auth-body .fi-sc-actions .fi-btn.fi-color:not(.fi-outlined)::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 45%;
    background: linear-gradient(100deg, transparent, rgb(255 255 255 / .35) 50%, transparent);
    transform: translateX(-120%) skewX(-18deg);
    pointer-events: none;
}
@media (hover: hover) {
    .fx-auth .fx-auth-body .fi-sc-actions .fi-btn.fi-color:not(.fi-outlined):not([disabled]):hover {
        translate: 0 -1px;
        filter: brightness(1.06);
        background-position: 0 0;
        box-shadow: inset 0 1px 0 rgb(255 255 255 / .25),
            0 2px 4px color-mix(in oklab, var(--primary-900) 30%, transparent),
            0 16px 32px -12px color-mix(in oklab, var(--primary-600) 80%, transparent);
    }
    .fx-auth .fx-auth-body .fi-sc-actions .fi-btn.fi-color:not(.fi-outlined):not([disabled]):hover::after {
        animation: fxa-shine .85s var(--fxa-ease);
    }
}
.fx-auth .fx-auth-body .fi-sc-actions .fi-btn.fi-color:not(.fi-outlined):not([disabled]):active {
    translate: 0 0;
    scale: .98;
    filter: brightness(.97);
}
.fx-auth .fx-auth-body .fi-sc-actions .fi-btn.fi-color:not(.fi-outlined):focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 3px;
}
.fx-auth .fx-auth-body .fi-sc-actions .fi-btn[disabled],
.fx-auth .fx-auth-body .fi-sc-actions .fi-btn.fi-processing { filter: saturate(.85); cursor: progress; }

/* فاصل "أو" + لينك بديل */
.fx-auth-or {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-block: 1.5rem 1rem;
    font-size: .75rem;
    font-weight: 600;
    color: var(--fxa-faint);
    animation: fxa-fade .7s ease .3s backwards;
}
.fx-auth-or::before,
.fx-auth-or::after { content: ""; flex: 1; height: 1px; background: var(--fxa-divider); }
.fx-auth-or span {
    display: grid;
    place-items: center;
    min-width: 2rem;
    height: 2rem;
    padding-inline: .5rem;
    border-radius: 999px;
    border: 1px solid var(--fxa-divider);
}
.fx-auth-alt {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .35rem;
    font-size: .9rem;
    color: var(--fxa-muted);
    animation: fxa-fade .7s ease .34s backwards;
}
.fx-auth-foot {
    margin: 1.75rem 0 0;
    padding-top: 1rem;
    text-align: center;
    font-size: .75rem;
    color: var(--fxa-faint);
}

/* فورم طويل (التسجيل): مسافات أقل */
.fx-auth-page--compact .fx-auth-pane { padding-top: 1.5rem; }
.fx-auth-page--compact .fx-auth-pane > * { max-width: 26rem; }
.fx-auth-page--compact .fx-auth-head { margin-bottom: 1.25rem; }
.fx-auth-page--compact .fx-auth-head .fx-auth-logo { height: 2.1rem !important; margin-bottom: 1rem; }
.fx-auth-page--compact .fx-auth-heading { font-size: 1.5rem; }
.fx-auth-page--compact .fx-auth-body .fi-sc-form > .fi-sc,
.fx-auth-page--compact .fx-auth-body .fi-sc-form .fi-sc-has-gap { row-gap: 1rem; }
.fx-auth-page--compact .fx-auth-body .fi-input { padding-block: .7rem; }
.fx-auth-page--compact .fx-auth-or { margin-block: 1rem .75rem; }
.fx-auth-page--compact .fx-auth-foot { margin-top: 1rem; }

/* ---------- 4. اللوحة البصرية (رسمة CSS — مفيش صور) ---------- */
.fx-auth-visual {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 2rem 2.25rem 1.75rem;
    border-radius: calc(var(--fxa-radius) - .75rem + 4px);
    color: #fff;
    background: linear-gradient(155deg, var(--fxa-v-1) 0%, var(--fxa-v-2) 52%, var(--fxa-v-3) 100%);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / .08);
    animation: fxa-fade 1s ease .15s backwards;
}
/* ضلمة تحت عشان الكلام الأبيض يبقى مقروء (AA) */
.fx-auth-visual::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 58%;
    z-index: -1;
    background: linear-gradient(to top, rgb(1 20 18 / .62), rgb(1 20 18 / .25) 55%, transparent);
    pointer-events: none;
}
.fx-auth-mesh { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.fx-auth-blob {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(closest-side, var(--b) 0%, color-mix(in oklab, var(--b) 40%, transparent) 45%, transparent 100%);
    will-change: transform;
}
.fx-auth-blob--1 { --b: var(--fxa-v-blob-a); width: 85%; aspect-ratio: 1; top: -28%; inset-inline-start: -22%; opacity: .85; animation: fxa-drift-1 19s ease-in-out infinite alternate; }
.fx-auth-blob--2 { --b: var(--fxa-v-blob-b); width: 90%; aspect-ratio: 1; bottom: -38%; inset-inline-end: -30%; opacity: .8; animation: fxa-drift-2 23s ease-in-out infinite alternate; }
.fx-auth-blob--3 { --b: var(--fxa-v-blob-c); width: 48%; aspect-ratio: 1; top: 22%; inset-inline-end: -8%; opacity: .32; animation: fxa-drift-3 17s ease-in-out infinite alternate; }
.fx-auth-blob--4 { --b: var(--fxa-v-blob-d); width: 30%; aspect-ratio: 1; bottom: 26%; inset-inline-start: 6%; opacity: .22; animation: fxa-drift-1 21s ease-in-out -7s infinite alternate-reverse; }
/* شبكة خفيفة بتختفي ناحية الأطراف */
.fx-auth-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgb(255 255 255 / .07) 1px, transparent 1px),
        linear-gradient(90deg, rgb(255 255 255 / .07) 1px, transparent 1px);
    background-size: 34px 34px;
    background-position: center;
    -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 10%, transparent 75%);
    mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 10%, transparent 75%);
}
/* حبيبات (noise) — SVG جوّه الملف */
.fx-auth-grain {
    position: absolute;
    inset: 0;
    opacity: .16;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.fx-auth-stage {
    position: relative;
    flex: 1;
    display: grid;
    place-items: center;
    min-height: 15rem;
    animation: fxa-pop .9s var(--fxa-ease) .3s backwards;
}

/* كارت الزجاج اللي في النص */
.fx-auth-glass {
    position: relative;
    width: min(19.5rem, 88%);
    padding: 1.5rem 1.5rem 1.35rem;
    border-radius: 22px;
    background: linear-gradient(150deg, rgb(255 255 255 / .2), rgb(255 255 255 / .07));
    border: 1px solid rgb(255 255 255 / .24);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 30px 60px -22px rgb(0 0 0 / .5);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    backdrop-filter: blur(16px) saturate(1.4);
    animation: fxa-bob 7s ease-in-out infinite alternate;
}
.fx-auth-glass::before {
    /* انعكاس ضوء على الحافة */
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(115deg, rgb(255 255 255 / .22), transparent 32%);
    pointer-events: none;
}
.fx-auth-glass-brand { height: 3rem; display: flex; justify-content: center; }
.fx-auth-glass .fx-brand { gap: .75rem; }
.fx-auth-glass .fx-brand-mark {
    background: linear-gradient(145deg, var(--fxa-v-accent), var(--fxa-v-1) 70%);
    color: var(--fxa-v-2);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), 0 10px 22px -8px rgb(0 0 0 / .45);
}
.fx-auth-glass .fx-brand-name { font-size: 1.5rem; color: #fff; }
.fx-auth-glass .fx-brand-suffix { color: rgb(255 255 255 / .72); }

/* المسار: أوردر → تأكيد → شحن → تحصيل */
.fx-auth-flow {
    --cycle: 6s;
    position: relative;
    display: flex;
    justify-content: space-between;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}
.fx-auth-flow li {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .45rem;
    width: 3.5rem;
    font-size: .72rem;
    font-weight: 600;
    color: rgb(255 255 255 / .88);
}
.fx-auth-flow li i {
    width: .8rem;
    height: .8rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0 0 4px rgb(255 255 255 / .14);
    animation: fxa-ping var(--cycle) linear calc(var(--k) / (var(--n) - 1) * var(--cycle) * .72) infinite;
}
.fx-auth-flow-track {
    position: absolute;
    top: calc(.4rem - 1px);
    inset-inline: 1.75rem;
    height: 2px;
    border-radius: 2px;
    background: rgb(255 255 255 / .2);
    overflow: hidden;
}
.fx-auth-flow-track > span {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--fxa-v-accent), #fff);
    transform-origin: left;
    animation: fxa-fill var(--cycle) linear infinite;
}
[dir='rtl'] .fx-auth-flow-track > span { transform-origin: right; background: linear-gradient(270deg, var(--fxa-v-accent), #fff); }

/* شارات صغيرة طايرة */
.fx-auth-chip {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .8rem .45rem .55rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
    color: #0e1a1c;
    background: rgb(255 255 255 / .9);
    box-shadow: 0 12px 28px -10px rgb(0 0 0 / .45), inset 0 0 0 1px rgb(255 255 255 / .6);
    white-space: nowrap;
}
[dir='rtl'] .fx-auth-chip { padding: .45rem .55rem .45rem .8rem; }
.fx-auth-chip b {
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    font-size: .8rem;
    color: #fff;
    background: var(--fxa-v-1);
}
.fx-auth-chip--1 { top: 8%; inset-inline-end: 2%; animation: fxa-bob 6s ease-in-out -2s infinite alternate; }
.fx-auth-chip--2 { bottom: 10%; inset-inline-start: 0; animation: fxa-bob 8s ease-in-out -5s infinite alternate-reverse; }
.fx-auth-chip--2 b { background: #e11d48; }
.fx-auth--portal .fx-auth-chip--2 b { background: #b45309; }

/* الجمل اللي بتلف + النقط */
.fx-auth-captions { position: relative; padding-top: 1rem; }
.fx-auth-taglines { display: grid; }
.fx-auth-tagline {
    grid-area: 1 / 1;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .6s ease, transform .7s var(--fxa-ease);
    pointer-events: none;
}
.fx-auth-tagline.is-active { opacity: 1; transform: none; pointer-events: auto; }
.fx-auth-tagline p { margin: 0; }
.fx-auth-tagline-title {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.55;
    text-wrap: balance;
    text-shadow: 0 1px 12px rgb(0 0 0 / .25);
}
.fx-auth-tagline-body {
    margin-top: .35rem !important;
    font-size: .9rem;
    line-height: 1.7;
    color: rgb(255 255 255 / .84);
}
.fx-auth-dots { display: flex; gap: .4rem; margin-top: 1.1rem; }
.fx-auth-dot {
    position: relative;
    overflow: hidden;
    width: .5rem;
    height: .5rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgb(255 255 255 / .38);
    cursor: pointer;
    transition: width .45s var(--fxa-ease), background-color .3s ease;
}
.fx-auth-dot:hover { background: rgb(255 255 255 / .6); }
.fx-auth-dot:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.fx-auth-dot.is-active { width: 2rem; background: rgb(255 255 255 / .3); }
.fx-auth-dot > span {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left;
}
[dir='rtl'] .fx-auth-dot > span { transform-origin: right; }
.fx-auth-dot.is-active > span { animation: fxa-progress var(--fxa-interval, 4200ms) linear forwards; }
.fx-auth-visual.is-paused .fx-auth-dot.is-active > span { animation-play-state: paused; }

/* ---------- 5. الحركة ---------- */
@keyframes fxa-card-in {
    from { opacity: 0; transform: translateY(22px) scale(.97); }
    to { opacity: 1; transform: none; }
}
@keyframes fxa-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}
@keyframes fxa-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fxa-pop {
    from { opacity: 0; transform: scale(.92) translateY(10px); }
    to { opacity: 1; transform: none; }
}
@keyframes fxa-float {
    0% { opacity: 0; transform: translate3d(0, 40px, 0) rotate(0deg) scale(.7); }
    18% { opacity: var(--o); }
    50% { opacity: calc(var(--o) * .55); }
    80% { opacity: var(--o); }
    100% { opacity: 0; transform: translate3d(var(--dx), -120px, 0) rotate(70deg) scale(1); }
}
@keyframes fxa-aurora {
    from { transform: translate3d(-6%, -4%, 0) rotate(-6deg) scale(1); }
    to { transform: translate3d(6%, 5%, 0) rotate(8deg) scale(1.12); }
}
@keyframes fxa-drift-1 {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(14%, 12%, 0) scale(1.15); }
}
@keyframes fxa-drift-2 {
    from { transform: translate3d(0, 0, 0) scale(1.05); }
    to { transform: translate3d(-12%, -16%, 0) scale(.92); }
}
@keyframes fxa-drift-3 {
    from { transform: translate3d(0, 0, 0) scale(.9); }
    to { transform: translate3d(-22%, 18%, 0) scale(1.15); }
}
@keyframes fxa-bob {
    from { transform: translateY(-5px); }
    to { transform: translateY(6px); }
}
@keyframes fxa-fill {
    0% { transform: scaleX(0); opacity: 1; }
    72% { transform: scaleX(1); opacity: 1; }
    88% { transform: scaleX(1); opacity: 1; }
    100% { transform: scaleX(1); opacity: 0; }
}
@keyframes fxa-ping {
    0% { box-shadow: 0 0 0 4px rgb(255 255 255 / .14), 0 0 0 0 rgb(255 255 255 / .55); }
    12% { box-shadow: 0 0 0 4px rgb(255 255 255 / .3), 0 0 0 10px rgb(255 255 255 / 0); }
    100% { box-shadow: 0 0 0 4px rgb(255 255 255 / .14), 0 0 0 10px rgb(255 255 255 / 0); }
}
@keyframes fxa-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}
@keyframes fxa-shine {
    from { transform: translateX(-120%) skewX(-18deg); }
    to { transform: translateX(330%) skewX(-18deg); }
}
@keyframes fxa-shake {
    0%, 100% { transform: none; }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(2px); }
}

/* ---------- 6. الموبايل ---------- */
@media (max-width: 1023px) {
    .fx-auth-card { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); }
    .fx-auth-chip { display: none; }
}

@media (max-width: 767px) {
    .fx-auth { padding: .75rem; place-items: start center; }
    .fx-auth-card {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
        gap: 0;
        padding: .5rem;
        border-radius: 24px;
    }
    /* اللوحة البصرية بتبقى شريط قصير فوق الفورم */
    .fx-auth-visual {
        order: -1;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        min-height: 8.5rem;
        padding: 1.1rem 1.25rem;
        border-radius: 18px;
    }
    .fx-auth-visual::after { height: 100%; background: linear-gradient(to top, rgb(1 20 18 / .5), rgb(1 20 18 / .1)); }
    .fx-auth-stage { flex: none; min-height: 0; display: block; animation: none; }
    .fx-auth-glass { width: auto; padding: .7rem; border-radius: 18px; animation: none; }
    .fx-auth-glass-brand { height: 2.6rem; }
    .fx-auth-glass .fx-brand-name,
    .fx-auth-flow,
    .fx-auth-tagline-body { display: none; }
    /* مخفية بس لسه شغالة (حركة الشريط هي اللي بتلف الجمل) */
    .fx-auth-dots { position: absolute; visibility: hidden; }
    .fx-auth-captions { flex: 1; min-width: 0; padding: 0; }
    .fx-auth-tagline-title { font-size: 1rem; line-height: 1.6; }

    .fx-auth-pane,
    .fx-auth-page--compact .fx-auth-pane { padding: 1.75rem 1.25rem 1rem; }
    .fx-auth-head { margin-bottom: 1.5rem; }
    .fx-auth-head .fx-auth-logo { display: none !important; }
    .fx-auth-heading { font-size: 1.5rem; }
    .fx-auth-or { margin-block: 1.25rem .85rem; }
    .fx-auth-foot { margin-top: 1.25rem; }
}

/* ---------- 7. تقليل الحركة: مفيش مربعات ولا بقع بتتحرك ولا لف أوتوماتيك ---------- */
@media (prefers-reduced-motion: reduce) {
    .fx-auth-p,
    .fx-auth-aurora { display: none; }
    .fx-auth-blob,
    .fx-auth-glass,
    .fx-auth-chip,
    .fx-auth-flow li i,
    .fx-auth-flow-track > span,
    .fx-auth-dot > span,
    .fx-auth .fx-auth-body .fi-input-wrp.fi-invalid,
    .fx-auth .fx-auth-body .fi-sc-actions .fi-btn::after { animation: none !important; }
    .fx-auth-flow-track > span { transform: none; }
    .fx-auth-dot.is-active > span { transform: none; }
    .fx-auth-tagline { transition: none; transform: none; }
}
