/* كادر — ملف مدموج تلقائياً (includes/css-bundle.php). لا تعدّله: عدّل الملفات الأصلية. */

/* ══ kdr-font.css ══ */
/* ═══ خط كادر: Zain (رخصة OFL مجانية — النص بـ assets/fonts/Zain-OFL.txt) ═══
   - نسخة مقصوصة (عربي + إنكليزي + أرقام إنكليزية) ~25KB لكل وزن
   - اسم خاص «Kadar Zain» حتى ما يتلخبط ويا أي خط منصّب بجهاز الزائر
   - الأيقونات (Font Awesome) والكود مستثناة حتى ما تخرب */
@font-face { font-family: 'Kadar Zain'; src: url('/assets/fonts/zain-400.woff2') format('woff2'); font-weight: 100 500; font-style: normal; font-display: swap; size-adjust: 112%; }
@font-face { font-family: 'Kadar Zain'; src: url('/assets/fonts/zain-700.woff2') format('woff2'); font-weight: 600 700; font-style: normal; font-display: swap; size-adjust: 112%; }
@font-face { font-family: 'Kadar Zain'; src: url('/assets/fonts/zain-800.woff2') format('woff2'); font-weight: 800 1000; font-style: normal; font-display: swap; size-adjust: 112%; }

:root, html:root { --kdr-font: 'Kadar Zain', 'Cairo', 'Segoe UI', Tahoma, sans-serif; } /* html:root يغلب أي ملف قديم يعيد تعريفه */

html, body,
body :where(h1, h2, h3, h4, h5, h6, p, a, span, b, strong, em, small, li, dt, dd, label, td, th, caption, figcaption,
            blockquote, summary, legend, div, section, article, header, footer, nav, main, aside,
            button, input, select, textarea, option):not(i):not(.fa):not(.fas):not(.far):not(.fab):not(.fa-solid):not(.fa-regular):not(.fa-brands) {
    font-family: var(--kdr-font) !important;
    font-synthesis: none;
}
body { letter-spacing: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body :where(p, li, td, dd, small, label, input, textarea, select) { line-height: 1.8; }
/* الأرقام بعرض ثابت بالأسعار والجداول حتى ما «ترقص» */
body :where(td, th, .price, [class*="price"], [class*="amount"], [class*="balance"], [class*="stat"]) { font-variant-numeric: tabular-nums; }
body :where(code, pre, kbd, samp, .mono, [dir="ltr"].mono) { font-family: 'JetBrains Mono', Consolas, monospace !important; }


/* ══ kdr-brand.css ══ */
/* ═══════════════════════════════════════════════════════════════
   ألوان كادر — من اللوگو (#FFFFFF #9048B7 #7744B6 #2E5EC3 #403492)
   الفاتح هو الأساس، والداكن اختياري (زر القمر بالهيدر).
   كل الألوان بالموقع صارت var(--k-…, اللون-القديم): إذا هذا الملف
   ما انحمّل، الصفحة ترجع بألوانها القديمة بدون ما تخرب.
   ═══════════════════════════════════════════════════════════════ */
:root {
    color-scheme: light;
    /* الأسطح */
    --k-bg: #F6F5FA;          --k-bg-rgb: 246,245,250;
    --k-surface: #FFFFFF;     --k-surface-rgb: 255,255,255;
    --k-surface-2: #F1EFF8;   --k-surface-2-rgb: 241,239,248;
    --k-line: #E5E1F0;
    /* الزجاج: rgba(أبيض, a) القديم يصير بطاقة بيضاء شبه صلبة */
    --k-glass-rgb: 255,255,255; --k-gk: 1.4; --k-gb: .72;
    /* النص */
    --k-ink: #1E1A3C; --k-ink-2: #4A4566; --k-ink-3: #827C9C;
    --k-fg-rgb: 30,26,60;
    --k-hl-rgb: 255,255,255;
    /* الظلال والتوهج */
    --k-shadow-rgb: 64,52,146; --k-sk: .32; --k-glow: .18;
    /* البراند */
    --k-brand: #7744B6;  --k-brand-rgb: 119,68,182;  --k-brand-soft: #7744B6; --k-brand-deep: #403492;
    --k-mag: #9048B7;    --k-mag-rgb: 144,72,183;    --k-mag-soft: #9048B7;   --k-mag-deep: #6A2F8F;
    --k-accent: #2E5EC3; --k-accent-rgb: 46,94,195;  --k-accent-soft: #2E5EC3; --k-accent-deep: #24489A;
    /* الحالات */
    --k-ok: #12805C;   --k-ok-rgb: 18,128,92;   --k-ok-soft: #12805C;   --k-ok-deep: #0B5E43;
    --k-warn: #B7791F; --k-warn-rgb: 183,121,31; --k-warn-soft: #B7791F; --k-warn-deep: #8A5A12;
    --k-gold: #C98A00; --k-gold-rgb: 201,138,0;  --k-gold-soft: #C98A00; --k-gold-deep: #8F6400;
    --k-bad: #C2364A;  --k-bad-rgb: 194,54,74;  --k-bad-soft: #C2364A;  --k-bad-deep: #8F2333;
    /* جاهزة للاستخدام */
    --k-grad: linear-gradient(135deg, #9048B7 0%, #7744B6 45%, #2E5EC3 100%);
    --k-card-shadow: 0 1px 2px rgba(30,26,60,.05), 0 8px 24px rgba(64,52,146,.08);
    --k-radius: 18px;
    --k-on-solid: #FFFFFF; /* كتابة فوق زر ملون */
}

/* الداكن: كحلي بنفسجي هادي (مو أسود فاحم، وبدون نيون) */
:root[data-mode="dark"] {
    color-scheme: dark;
    --k-bg: #0F0C1F;          --k-bg-rgb: 15,12,31;
    --k-surface: #17132D;     --k-surface-rgb: 23,19,45;
    --k-surface-2: #211C3E;   --k-surface-2-rgb: 33,28,62;
    --k-line: rgba(255,255,255,.09);
    --k-glass-rgb: 255,255,255; --k-gk: 1; --k-gb: 0;
    --k-ink: #F3F1FA; --k-ink-2: #C9C4DD; --k-ink-3: #8F89A8;
    --k-fg-rgb: 255,255,255;
    --k-hl-rgb: 255,255,255;
    --k-shadow-rgb: 0,0,0; --k-sk: 1; --k-glow: .45;
    --k-brand: #9A70E0;  --k-brand-rgb: 154,112,224; --k-brand-soft: #C9B3F5; --k-brand-deep: #5B47C9;
    --k-mag: #C27BE0;    --k-mag-rgb: 194,123,224;   --k-mag-soft: #DDB0F0;   --k-mag-deep: #7E3AA8;
    --k-accent: #5A84F0; --k-accent-rgb: 90,132,240; --k-accent-soft: #A9C1FF; --k-accent-deep: #3557B8;
    --k-ok: #34D399;   --k-ok-rgb: 52,211,153;   --k-ok-soft: #86EFC0;   --k-ok-deep: #0F7A57;
    --k-warn: #F5A524; --k-warn-rgb: 245,165,36; --k-warn-soft: #FBD08A; --k-warn-deep: #9A5B00;
    --k-gold: #FFC940; --k-gold-rgb: 255,201,64; --k-gold-soft: #FFE08A; --k-gold-deep: #A87800;
    --k-bad: #FF6B81;  --k-bad-rgb: 255,107,129; --k-bad-soft: #FFA3B0;  --k-bad-deep: #A3243A;
    --k-card-shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px rgba(0,0,0,.35);
    --k-on-solid: initial; /* بالداكن ترجع للون الأصلي (الأزرار فاتحة) */
}

/* ── الأساس ── */
html, body { background-color: var(--k-bg) !important; color: var(--k-ink); }
body { background-image: none !important; }
::selection { background: rgba(var(--k-brand-rgb), .22); color: var(--k-ink); }
:focus-visible { outline: 2px solid var(--k-accent); outline-offset: 2px; }
a { -webkit-tap-highlight-color: rgba(var(--k-brand-rgb), .12); }
input::placeholder, textarea::placeholder { color: var(--k-ink-3) !important; opacity: 1; }
hr { border-color: var(--k-line); }

/* بالفاتح: نطفي التوهج والجزيئات وخلفيات النيون */
:root:not([data-mode="dark"]) .particles-bg,
:root:not([data-mode="dark"]) .stars-bg,
:root:not([data-mode="dark"]) .glow-orb,
:root:not([data-mode="dark"]) .bg-orbs,
:root:not([data-mode="dark"]) .noise-overlay,
:root:not([data-mode="dark"]) .landing-orb,
:root:not([data-mode="dark"]) .mouse-cursor,
:root:not([data-mode="dark"]) #kadar-particles { display: none !important; }
/* الموبايل والتابلت: الجزيئات والكرات الضبابية تثقّل التمرير (والآيفون يرسم blur الكبير غلط ← لون بنفسجي) */
@media (max-width: 1024px), (prefers-reduced-motion: reduce), (hover: none) {
    .particles-bg, .landing-orb, .mouse-cursor, #kadar-particles, .bg-orb { display: none !important; }
}
:root:not([data-mode="dark"]) :is(h1, h2, h3, h4, .section-title, .glow-text, .neon-text) { text-shadow: none !important; }

/* سكرول بار هادي */
* { scrollbar-color: rgba(var(--k-fg-rgb), .22) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(var(--k-fg-rgb), .18); border-radius: 10px; border: 2px solid var(--k-bg); }

/* ── زر الوضع (فاتح/داكن) ── */
.kdr-mode-btn { position: relative; overflow: hidden; }
.kdr-mode-btn .kdr-mode-sun, .kdr-mode-btn .kdr-mode-moon { transition: transform .35s ease, opacity .25s ease; }
:root:not([data-mode="dark"]) .kdr-mode-btn .kdr-mode-sun { position: absolute; opacity: 0; transform: translateY(14px) rotate(-40deg); }
:root[data-mode="dark"] .kdr-mode-btn .kdr-mode-moon { position: absolute; opacity: 0; transform: translateY(-14px) rotate(40deg); }

/* انتقال ناعم وقت التبديل بس (مو بكل تحميل) */
html.kdr-mode-anim, html.kdr-mode-anim * { transition: background-color .3s ease, color .3s ease, border-color .3s ease, fill .3s ease !important; }

/* ── رسومات كادر 3D ── */
.k3d { display: inline-block; width: var(--s, 64px); height: var(--s, 64px); object-fit: contain; flex-shrink: 0; user-select: none; -webkit-user-drag: none; }
.k-hero3d { display: block; margin: 0 auto 8px; }
.k3d-xs { --s: 28px; } .k3d-sm { --s: 44px; } .k3d-md { --s: 72px; } .k3d-lg { --s: 112px; } .k3d-xl { --s: 168px; }
:root[data-mode="dark"] .k3d { filter: drop-shadow(0 6px 14px rgba(0,0,0,.35)); }
:root:not([data-mode="dark"]) .k3d { filter: drop-shadow(0 6px 12px rgba(64,52,146,.14)); }

/* حالة فاضية موحدة */
.k-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 36px 18px; color: var(--k-ink-2); }
.k-empty .k3d { --s: 120px; margin-bottom: 4px; }
.k-empty h3, .k-empty strong { margin: 0; font-size: 1.15rem; color: var(--k-ink); }
.k-empty p { margin: 0; max-width: 34ch; line-height: 1.8; color: var(--k-ink-3); }
.k-empty .k-btn { margin-top: 8px; }
.k-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 14px; border: 0; background: var(--k-grad); color: #fff !important; font-weight: 700; text-decoration: none !important; cursor: pointer; box-shadow: 0 8px 20px rgba(var(--k-brand-rgb), .25); }
.k-btn:hover { filter: brightness(1.06); }
.k-btn-ghost { background: var(--k-surface); color: var(--k-brand-deep) !important; border: 1px solid var(--k-line); box-shadow: none; }
:root[data-mode="dark"] .k-btn-ghost { color: var(--k-ink) !important; }

/* حاوية الأيقونة: الرسمة 3D ما تحتاج دائرة ملونة وراها */
.k3d-wrap { background: none !important; border: 0 !important; box-shadow: none !important; display: inline-flex !important; align-items: center; justify-content: center; font-size: 0 !important; width: auto !important; height: auto !important; padding: 0 !important; }
.kdr-chip .k3d { margin-inline-end: 2px; filter: none !important; }

/* الحالات الفاضية القديمة: الرسمة فوق والنص جواها */
:is(.mk-empty, .or-empty, .empty-glass, .no-results, .empty-state, .np-empty, .no-works-ios, .empty-history, .glass-card.text-center, .category-card, .ab-card) > .k3d { display: block; margin: 0 auto 12px; }
.mk-empty b, .or-empty b { display: block; }

/* زر الدخول بالقائمة: كتابة بيضاء واضحة فوق التدرج */
.nav-links a.btn-glow, .nav-links a.btn-glow * { color: #fff !important; opacity: 1 !important; }
.nav-links a.btn-glow { background: var(--k-grad) !important; }

/* لوحة الهيرو (كمبيوتر/آيباد): رسومات كادر حول الخزنة */
.k-hero-art { position: relative; width: min(100%, 460px); aspect-ratio: 1; margin-inline: auto; }
.k-hero-ring { position: absolute; inset: 9%; border-radius: 50%; background: radial-gradient(circle at 50% 45%, rgba(var(--k-brand-rgb), .16), rgba(var(--k-accent-rgb), .07) 55%, transparent 70%); border: 1px dashed rgba(var(--k-brand-rgb), .22); }
.k-ha-main { position: absolute; --s: 46%; width: 46%; height: 46%; left: 27%; top: 25%; animation: kFloat 6s ease-in-out infinite; }
.k-ha { position: absolute; --s: 23%; width: 23%; height: 23%; animation: kFloat 7s ease-in-out infinite; }
.k-ha-1 { top: 4%; right: 14%; animation-delay: -1s; }
.k-ha-2 { top: 14%; left: 4%; animation-delay: -3s; }
.k-ha-3 { bottom: 8%; right: 4%; animation-delay: -2s; }
.k-ha-4 { bottom: 20%; left: 0; animation-delay: -4s; }
.k-ha-card { position: absolute; left: 50%; bottom: -2%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; white-space: nowrap; background: var(--k-surface); border: 1px solid var(--k-line); border-radius: 16px; padding: 10px 14px; box-shadow: var(--k-card-shadow); }
.k-ha-card b { display: block; color: var(--k-ink); font-size: 1rem; font-variant-numeric: tabular-nums; }
.k-ha-card small { display: block; color: var(--k-ok); font-size: .8rem; }
@keyframes kFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .k-ha-main, .k-ha { animation: none; } }

/* الشاشات المكبّرة (zoom): الهيرو ما ياخذ أكثر من الشاشة */
@media (min-width: 1800px) { .kdr-hero { min-height: auto !important; padding-top: 150px !important; padding-bottom: 70px !important; } }

/* خطوات «شلون يشتغل» */
.k-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: none; }
.k-step { position: relative; background: var(--k-surface); border: 1px solid var(--k-line); border-radius: 22px; padding: 26px 20px 22px; text-align: center; box-shadow: var(--k-card-shadow); }
.k-step .k3d { --s: 92px; margin: 0 auto 10px; display: block; }
.k-step h3 { margin: 0 0 8px; font-size: 1.12rem; color: var(--k-ink); }
.k-step p { margin: 0; font-size: .93rem; line-height: 1.85; color: var(--k-ink-2); }
.k-step-n { position: absolute; top: 14px; inset-inline-start: 14px; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: .95rem; color: #fff; background: var(--k-grad); }
@media (max-width: 1023px) { .k-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) {
    .k-steps { grid-template-columns: 1fr; gap: 12px; }
    .k-step { display: grid; grid-template-columns: 72px 1fr; column-gap: 14px; text-align: start; padding: 16px; align-items: center; }
    .k-step .k3d { --s: 72px; grid-row: span 2; margin: 0; }
    .k-step h3 { font-size: 1.02rem; margin-bottom: 4px; align-self: end; }
    .k-step p { font-size: .88rem; align-self: start; }
    .k-step-n { top: 10px; inset-inline-start: auto; inset-inline-end: 10px; width: 24px; height: 24px; font-size: .8rem; border-radius: 8px; }
}

/* صفحات الدخول والتسجيل: الستايل كله صار بـ auth-ios.css (على الألوان) — هنا بس البطاقة الزجاج */
.auth-orb { display: none !important; }
.auth-card-ios.lg { background: var(--lg-tint-strong, var(--k-surface)) !important; border-color: transparent !important; }

/* شعارات الدفع (كي كارد / زين كاش / FIB) */
.k-paylogos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; }
.k-paylogos img { width: 36px; height: 36px; object-fit: contain; display: block; }
.k-paylogos span { font-size: .8rem; font-weight: 700; color: var(--k-ink-2); background: var(--k-surface-2); border: 1px solid var(--k-line); border-radius: 9px; padding: 4px 9px; line-height: 1.4; }
.k-paylogos small { flex-basis: 100%; text-align: center; font-size: .78rem; color: var(--k-ink-3); }
.k-paylogos-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin-top: 18px; }
.k-paylogos-row .k-paylogos { margin: 0; }
@media (max-width: 599px) { .k-step .k-paylogos { grid-column: 2; justify-content: flex-start; margin-top: 8px; } .k-step .k-paylogos img { width: 30px; height: 30px; } }

/* اختيار طريقة الاستلام بالشعارات */
.k-paypick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 6px 0 12px; border: 0; padding: 0; }
.k-paypick label { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; cursor: pointer; background: var(--k-surface); border: 1.5px solid var(--k-line); color: var(--k-ink); font-weight: 700; font-size: .92rem; line-height: 1.4; transition: border-color .15s, box-shadow .15s; }
.k-paypick label:hover { border-color: rgba(var(--k-brand-rgb), .45); }
.k-paypick input { position: absolute; opacity: 0; pointer-events: none; }
.k-paypick img { width: 38px; height: 38px; flex: none; object-fit: contain; }
.k-paypick label:has(input:checked) { border-color: var(--k-brand); box-shadow: 0 0 0 3px rgba(var(--k-brand-rgb), .16); }
.k-paypick label:has(input:focus-visible) { outline: 2px solid var(--k-accent); outline-offset: 2px; }
@media (max-width: 360px) { .k-paypick { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
    html.kdr-mode-anim, html.kdr-mode-anim * { transition: none !important; }
}


/* ══ kdr-responsive.css ══ */
/* ═══════════════════════════════════════════════════════════════
   مقاسات كادر — كل جهاز ياخذ حقه
   ┌─ موبايل صغير / غطاء الفليب ............ ≤ 360px
   ├─ آيفون وأندرويد .................... 361 – 599px
   ├─ الفولد المفتوح / آيباد ميني ........ 600 – 899px
   ├─ آيباد / تابلت عرضي ................ 900 – 1279px
   ├─ لابتوب وشاشات عادية ............... 1280 – 1799px
   ├─ شاشات 27" (2K) .................... 1800 – 2399px
   └─ شاشات 34" العريضة (3440) و 4K ...... ≥ 2400px
   + الأجهزة القابلة للطي بشاشتين (Surface Duo / Fold بوضع الكتاب)
   ═══════════════════════════════════════════════════════════════ */

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: clip; }
img, video, svg, canvas, iframe { max-width: 100%; }
img, video { height: auto; }
/* ما نخلي كلمة طويلة (رابط/إيميل) تفتق الصفحة */
:where(p, li, td, h1, h2, h3, h4, a, small) { overflow-wrap: break-word; }
:where(input, select, textarea, button) { max-width: 100%; }
table { max-width: 100%; }

/* الحافات الآمنة (النوتش + الجزيرة + الآيفون بالعرض) */
@supports (padding: max(0px)) {
    body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
}

/* ── موبايل صغير جداً / غطاء الفليب ── */
@media (max-width: 360px) {
    html { font-size: 15px; }
    :where(h1) { font-size: clamp(1.6rem, 9vw, 2.1rem) !important; line-height: 1.35 !important; }
    :where(h2) { font-size: clamp(1.25rem, 7vw, 1.6rem) !important; }
    .kdr-container, .container { padding-left: 12px !important; padding-right: 12px !important; }
    /* v61: الزرين بالرئيسية يبقون جنب بعض (kdr-home-v2.css يصغّرهم) — قبل هنا جانوا ينقلبون عمود */
    .k-steps { grid-template-columns: 1fr !important; }
}
/* غطاء الفليب الصغير (أقل من 300px) */
@media (max-width: 300px) {
    html { font-size: 14px; }
    .search-trigger.kt-help-btn { display: none !important; }
}

/* ── الفولد المفتوح وآيباد ميني (عمودي) ── */
@media (min-width: 600px) and (max-width: 899px) {
    .kdr-features-grid, .kdr-tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .kdr-creators-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .k-steps { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* ── آيباد / تابلت ── */
@media (min-width: 900px) and (max-width: 1279px) {
    .kdr-container { max-width: 1040px; }
}

/* ── الشاشات الكبيرة: نكبّر كل شي بنسبة وحدة بدل ما تبقى الصفحة صغيرة بالنص ── */
@media (min-width: 1800px) { body { zoom: 1.1; } }
@media (min-width: 2400px) { body { zoom: 1.25; } }
@media (min-width: 3200px) { body { zoom: 1.4; } }
/* الشاشات العريضة جداً (21:9 مثل 34"): نخلي المحتوى بالنص ونمنع الأسطر الطويلة */
@media (min-aspect-ratio: 21/9) and (min-width: 2400px) {
    .kdr-container { max-width: 1320px; }
    :where(p) { max-width: 75ch; }
    .kdr-section-sub, .kdr-hero-desc { margin-inline: auto; }
}

/* ── التابلت والآيباد بالعرض: لمس مريح ── */
@media (pointer: coarse) and (min-width: 600px) {
    .kdr-chip, .nav-links a { min-height: 44px; }
}

/* ── الأجهزة بشاشتين (المفصل بالنص) ── */
@media (horizontal-viewport-segments: 2) {
    :root { --k-hinge: calc(env(viewport-segment-left 1 0, 0px) - env(viewport-segment-right 0 0, 0px)); }
    .kdr-hero-inner { column-gap: calc(var(--k-hinge) + 32px) !important; }
    .kdr-features-grid, .kdr-tools-grid, .k-steps { column-gap: calc(var(--k-hinge) + 20px) !important; }
}
@media (vertical-viewport-segments: 2) {
    /* الفولد بوضع اللابتوب: الهيرو فوق المفصل والمحتوى جواه */
    .kdr-hero { min-height: env(viewport-segment-bottom 0 0, 50vh) !important; }
}

/* ── الطباعة: وصل/فاتورة تطلع نظيفة ── */
@media print {
    .navbar, .glass-nav, .mobile-dock-wrapper, .announcement-bar, footer, .particles-bg, .scroll-progress-container, .kdr-mode-btn { display: none !important; }
    html, body { background: #fff !important; color: #000 !important; zoom: 1 !important; }
}


/* ══ kdr-motion.css ══ */
/* ═══════════════════════════════════════════════════════════════
   كادر — الحركة والتنقل (ينحمّل بكل الصفحات عبر kdr-head.php)
   • انتقال ناعم بين كل الصفحات (حتى الدخول والدفع)
   • شريط تحميل فوق من تضغط رابط والنت بطيء
   • تدرّج هادي للألوان بالأزرار والروابط
   • الروابط الداخلية (#) ما تختفي تحت الهيدر
   ═══════════════════════════════════════════════════════════════ */
:root {
    --k-ease: cubic-bezier(.2, .8, .2, 1);       /* خروج ناعم — للظهور والحركة */
    --k-ease-in: cubic-bezier(.4, 0, 1, 1);      /* للاختفاء */
    --k-dur-1: .15s; --k-dur-2: .25s; --k-dur-3: .4s;
}

/* ── انتقال الصفحات (Chrome / Edge / Safari 18.2+) — نفس كادر بكل مكان ── */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: kdrPgOut .16s var(--k-ease-in) both; }
::view-transition-new(root) { animation: kdrPgIn .3s var(--k-ease) both; }
@keyframes kdrPgOut { to { opacity: 0; } }
@keyframes kdrPgIn { from { opacity: 0; transform: translateY(8px); } }

/* ── التمرير ── */
html { scroll-behavior: smooth; scroll-padding-top: calc(84px + env(safe-area-inset-top, 0px)); -webkit-tap-highlight-color: transparent; }
@media (max-width: 599px) { html { scroll-padding-top: calc(70px + env(safe-area-inset-top, 0px)); } }

/* ── اللمس: بلا تأخير الضغطة المزدوجة ── */
:where(a, button, label, summary, select, input, textarea, [role="button"], [onclick]) { touch-action: manipulation; }

/* ── تدرّج ألوان هادي (بأقل أولوية — أي ستايل قديم يغلبه) ── */
:where(a, button, [role="button"], .btn, .k-btn, .k-btn-ghost, input, select, textarea, summary) {
    transition: color var(--k-dur-2) ease, background-color var(--k-dur-2) ease, border-color var(--k-dur-2) ease,
                box-shadow var(--k-dur-2) ease, opacity var(--k-dur-2) ease;
}
.k-btn, .k-btn-ghost { transition: transform var(--k-dur-1) var(--k-ease), box-shadow var(--k-dur-2) ease, background-color var(--k-dur-2) ease, border-color var(--k-dur-2) ease, color var(--k-dur-2) ease; }
.k-btn:active, .k-btn-ghost:active { transform: scale(.97); }

/* ── شريط تحميل الصفحة ── */
.k-navprog {
    position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 100000; pointer-events: none;
    transform-origin: right center; transform: scaleX(0); opacity: 0;
    background: var(--k-grad, linear-gradient(90deg, #9048B7, #7744B6, #2E5EC3));
    transition: transform 8s cubic-bezier(.1, .7, .1, 1), opacity .2s ease;
}
[dir="ltr"] .k-navprog { transform-origin: left center; }
.k-navprog.on { opacity: 1; transform: scaleX(.9); }
.k-navprog.done { opacity: 0; transform: scaleX(1); transition: transform .2s ease, opacity .3s ease .15s; }

@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
    html { scroll-behavior: auto; }
    .k-btn:active, .k-btn-ghost:active { transform: none; }
    .k-navprog { transition: opacity .2s ease; }
}


/* ══ kdr-chrome.css ══ */
/* ═══════════════════════════════════════════════════════════════
   كادر — الهيدر + الشريط السفلي (نفس الشكل بكل الصفحات)
   ينحمّل من kdr-head.php بعد كل الستايلات القديمة، فيغلب عليها
   ═══════════════════════════════════════════════════════════════ */

/* ── الهيدر: ما يدخل تحت شريط الساعة بالآيفون ──
   iOS 26 يخلي الصفحة تمشي تحت شريط الساعة، فالهيدر الثابت كان ينكطع فوك */
.navbar { top: calc(14px + max(env(safe-area-inset-top, 0px), var(--kdr-ann, 0px))); }
.navbar.scrolled { top: calc(10px + max(env(safe-area-inset-top, 0px), var(--kdr-ann, 0px))); }
@media (max-width: 900px) { .navbar, .navbar.scrolled { top: calc(10px + max(env(safe-area-inset-top, 0px), var(--kdr-ann, 0px))); } }
@media (max-width: 480px) { .navbar, .navbar.scrolled { top: calc(8px + max(env(safe-area-inset-top, 0px), var(--kdr-ann, 0px))); } }
.announcement-bar { padding-top: env(safe-area-inset-top, 0px); }
.ann-inner { font-family: inherit !important; }

/* ── الشعار: «كادر» كان الراء منكطع من تحت (التدرج ينقص على حدود السطر) ── */
.logo { flex-shrink: 0; min-width: 0; }
.site-name-text {
  font-family: inherit !important; font-weight: 800;
  display: inline-block; line-height: 1.5; padding: .04em .02em .16em;
  background: linear-gradient(135deg, var(--k-ink, #1E1A3C) 20%, var(--k-brand, #7744B6)) !important;
  -webkit-background-clip: text !important; background-clip: text !important;
  -webkit-text-fill-color: transparent !important; color: var(--k-ink, #1E1A3C);
}

/* ── أزرار الهيدر: دوائر زجاج بنفس الحجم والمسافة ── */
.nav-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.nav-actions .nav-btn,
.nav-actions > #openSearch.nav-btn {
  position: relative; flex: 0 0 auto;
  width: 40px !important; height: 40px !important; min-width: 0 !important;
  margin: 0 !important; padding: 0 !important;
  border: 0 !important; border-radius: 50% !important;
  color: var(--k-ink, #1E1A3C) !important; font-size: 15px !important; line-height: 1 !important;
  background: var(--lg-tint, rgba(255,255,255,.6)) !important;
  box-shadow: 0 2px 8px rgba(var(--k-shadow-rgb, 30,20,80), .08), var(--lg-inset, inset 0 0 0 1px rgba(0,0,0,.06)) !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  transform: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform .22s var(--k-ease, cubic-bezier(.2,.8,.2,1)), background-color .2s, color .2s !important;
}
.nav-actions .nav-btn:not(.hamburger-menu) { display: inline-grid !important; place-items: center; }
.nav-actions .hamburger-menu { align-items: center; justify-content: center; }
.nav-actions .nav-btn i { font-size: 15px; color: inherit !important; filter: none !important; }
@media (hover: hover) {
  .nav-actions .nav-btn:hover { transform: translateY(-1px) !important; color: var(--k-brand, #7744B6) !important; background: rgba(var(--k-brand-rgb, 119,68,182), .10) !important; }
}
.nav-actions .nav-btn:active { transform: scale(.92) !important; }
.nav-actions .nav-btn:focus-visible { outline: 2px solid var(--k-brand, #7744B6); outline-offset: 2px; }
.nav-actions .notification-badge {
  top: -3px !important; right: -3px !important; min-width: 18px; width: auto !important; height: 18px !important; padding: 0 4px;
  border-radius: 999px !important; font-size: 10px !important; line-height: 1;
  border: 2px solid var(--k-surface, #fff); box-sizing: border-box;
}
/* القائمة ☰ */
.nav-actions .hamburger-menu span {
  width: 16px !important; height: 2px !important; left: auto !important; right: 12px !important;
  background: currentColor !important; border-radius: 2px;
}
.nav-actions .hamburger-menu span:nth-child(1) { transform: translateY(-5px); }
.nav-actions .hamburger-menu span:nth-child(2) { width: 11px !important; transform: none; opacity: 1; }
.nav-actions .hamburger-menu span:nth-child(3) { transform: translateY(5px); }
.nav-actions .hamburger-menu.active span:nth-child(1) { transform: rotate(45deg); }
.nav-actions .hamburger-menu.active span:nth-child(2) { transform: none; opacity: 0; }
.nav-actions .hamburger-menu.active span:nth-child(3) { transform: rotate(-45deg); }

@media (max-width: 420px) {
  .nav-actions { gap: 5px; }
  .nav-actions .nav-btn, .nav-actions > #openSearch.nav-btn { width: 38px !important; height: 38px !important; }
  .nav-actions .hamburger-menu span { right: 11px !important; }
}
@media (max-width: 370px) {
  .nav-actions { gap: 4px; }
  .nav-actions .nav-btn, .nav-actions > #openSearch.nav-btn { width: 35px !important; height: 35px !important; font-size: 14px !important; }
  .nav-actions .kfx-nav-toggle { display: none !important; }
  .nav-actions .hamburger-menu span { right: 10px !important; width: 15px !important; }
}

/* ── الشريط السفلي ──
   1) الـ view-transition-name كان على الغلاف الخارجي، وهذا يقطع الـ blur
      (المتصفح يعتبره «جذر» للخلفية) — فبالآيفون جان النص اللي وراه ينقرا. نقلناه للشريط نفسه.
   2) الإخفاء وقت النزول صار حركة للشريط نفسه بدل الشفافية (الشفافية على الأب هم تطفي الـ blur). */
.mobile-dock-wrapper.kdr-dock-hide { transform: none !important; opacity: 1 !important; }
.mobile-dock-container {
  position: relative; gap: 0 !important;
  transition: transform .38s var(--k-ease, cubic-bezier(.2,.8,.2,1)) !important;
}
.mobile-dock-wrapper.kdr-dock-hide .mobile-dock-container { transform: translateY(calc(100% + 16px + env(safe-area-inset-bottom, 0px))) !important; }

/* المؤشر: ينزلق للزر اللي تضغطه فوراً */
.dock-pill {
  position: absolute; top: 6px; bottom: 6px; right: 6px; z-index: 0; pointer-events: none;
  width: calc((100% - 12px) / 5); border-radius: 16px;
  background: rgba(var(--k-brand-rgb, 119,68,182), .12);
  box-shadow: inset 0 0 0 1px rgba(var(--k-brand-rgb, 119,68,182), .16), inset 1px 1px 1px -1px rgba(255,255,255,.7);
  transform: translateX(calc(var(--di, 0) * -100%));
  transition: transform .45s cubic-bezier(.3, 1.25, .5, 1), opacity .2s;
}
[dir="ltr"] .dock-pill { right: auto; left: 6px; transform: translateX(calc(var(--di, 0) * 100%)); }
.mobile-dock-container[data-di="-1"] .dock-pill { opacity: 0; }
:root[data-mode="dark"] .dock-pill { background: rgba(var(--k-brand-rgb, 154,112,224), .22); box-shadow: inset 0 0 0 1px rgba(var(--k-brand-rgb, 154,112,224), .28), inset 1px 1px 1px -1px rgba(255,255,255,.25); }

.dock-item { position: relative; z-index: 1; color: var(--k-ink-2, #4A4566) !important; }
.dock-item span { font-family: inherit !important; font-size: 10.5px; }
.dock-item i { transition: transform .2s var(--k-ease, ease) !important; }
.dock-item:active i { transform: scale(.84) !important; }
.dock-item.active, .dock-item.active:hover { background: transparent !important; box-shadow: none !important; color: var(--k-brand, #7744B6) !important; }
.dock-item:hover { background: transparent !important; }
@media (hover: hover) { .dock-item:not(.active):hover { color: var(--k-ink, #1E1A3C) !important; } }

@media (prefers-reduced-motion: reduce) {
  .dock-pill, .mobile-dock-container { transition: none !important; }
}

/* ═══ الانتقال بين الصفحات ═══
   قبل: الهيدر والشريط السفلي ينصوّرون لوحدهم وقت الانتقال، والآيفون يرسمهم مستطيلات
   (بدون الزوايا والزجاج) وتبقى معلّقة لحد ما الصفحة الجديدة تفتح — خصوصاً للدخول (ماكو هيدر هناك).
   هسه: الصفحة كلها صورة وحدة، تلاشي متطابق بالضبط (القديم يطفى بنفس سرعة ما الجديد يشتعل)،
   فالهيدر والشريط — لأنهم نفسهم بالصفحتين — يبقون ثابتين وبس المحتوى يتبدّل. */
.navbar, .mobile-dock-wrapper, .mobile-dock-container { view-transition-name: none !important; }
::view-transition-old(root), ::view-transition-new(root) {
  animation-duration: .24s !important; animation-timing-function: cubic-bezier(.4, 0, .2, 1) !important; animation-fill-mode: both !important;
}
::view-transition-old(root) { animation-name: kdrXOut !important; }
::view-transition-new(root) { animation-name: kdrXIn !important; }
@keyframes kdrXOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes kdrXIn { from { opacity: 0; } to { opacity: 1; } }

/* الآيفون (وكل سفاري) + الموبايل: بلا view transition.
   سفاري يصوّر الصفحة وقت الانتقال بدون الـ blur (الـ blur عنده يترسم بكارت الشاشة ويطيح من الصورة)،
   فجان الهيدر والشريط السفلي يطلعون بلا زجاج لحد ما يخلص الانتقال.
   بداله: الهيدر والشريط ما يتحركون أبد (الزجاج يبقى شغّال)، وبس المحتوى (main) يطلع بنعومة. */
@keyframes kdrMainIn { from { opacity: 0; transform: translateY(10px); } }
@media (hover: none) and (pointer: coarse) {
  @view-transition { navigation: none; }
  main { animation: kdrMainIn .34s cubic-bezier(.2, .8, .2, 1) backwards; }
}
@supports (font: -apple-system-body) and (-webkit-appearance: none) {
  @view-transition { navigation: none; }
  main { animation: kdrMainIn .34s cubic-bezier(.2, .8, .2, 1) backwards; }
}
@media (prefers-reduced-motion: reduce) { main { animation: none !important; } }

/* ═══ القائمة (☰) بالموبايل: لوحة زجاج تطلع من الزر ═══
   قبل: كانت داخل الهيدر، والهيدر بيه transform + blur، فالقائمة تتموضع نسبةً له مو للشاشة:
   حافتها وظلها يبينون خط على يمين الشاشة حتى وهي مسكّرة، والـ blur مالها ما يشتغل.
   هسه kdr-ux.js ينقلها للـ body بالموبايل (#navLinks.kdr-sheet). */
:root { --kdr-sheet-top: calc(70px + max(env(safe-area-inset-top, 0px), var(--kdr-ann, 0px))); }
@media (max-width: 900px) {
  .navbar #navLinks:not(.active) { visibility: hidden !important; box-shadow: none !important; }
  #navLinks.kdr-sheet {
    position: fixed !important; z-index: 1001 !important;
    top: var(--kdr-sheet-top) !important; left: 10px !important; right: auto !important; bottom: auto !important;
    width: min(calc(100vw - 20px), 330px) !important; height: auto !important;
    max-height: calc(100dvh - var(--kdr-sheet-top) - 16px - env(safe-area-inset-bottom, 0px)) !important;
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    margin: 0 !important; padding: 8px !important; gap: 2px !important; list-style: none;
    display: flex !important; flex-direction: column !important;
    border: 0 !important; border-radius: 26px !important;
    background: var(--lg-tint-sheet, rgba(255,255,255,.8)) !important;
    -webkit-backdrop-filter: blur(26px) saturate(190%) !important; backdrop-filter: blur(26px) saturate(190%) !important;
    box-shadow: 0 24px 60px rgba(var(--k-shadow-rgb, 20,14,60), .24), var(--lg-inset, inset 0 0 0 1px rgba(0,0,0,.06)) !important;
    transform-origin: 12% 0;
    transform: translateY(-10px) scale(.92) !important; opacity: 0 !important; visibility: hidden !important; pointer-events: none;
    transition: transform .42s cubic-bezier(.2, .9, .25, 1.05), opacity .2s ease, visibility 0s linear .42s !important;
  }
  #navLinks.kdr-sheet.active {
    transform: none !important; opacity: 1 !important; visibility: visible !important; pointer-events: auto;
    transition: transform .42s cubic-bezier(.2, .9, .25, 1.05), opacity .18s ease, visibility 0s !important;
  }
  #navLinks.kdr-sheet li { width: 100%; list-style: none; opacity: 0; transform: translateY(-6px); transition: opacity .2s ease, transform .3s var(--k-ease, ease); }
  #navLinks.kdr-sheet.active li { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 26ms + 50ms); }
  #navLinks.kdr-sheet li a {
    display: flex !important; align-items: center; gap: 12px; width: 100% !important; box-sizing: border-box; position: relative;
    min-height: 52px; padding: 7px 10px !important; border-radius: 18px !important;
    font-family: inherit !important; font-size: 1rem !important; font-weight: 700 !important; letter-spacing: 0 !important;
    color: var(--k-ink, #1E1A3C) !important; background: transparent !important; border: 0 !important;
    box-shadow: none !important; transform: none !important; text-decoration: none;
  }
  #navLinks.kdr-sheet li a::before, #navLinks.kdr-sheet li a::after { content: none !important; display: none !important; }
  #navLinks.kdr-sheet li a i {
    width: 38px; height: 38px; flex: 0 0 38px; display: grid !important; place-items: center; border-radius: 12px;
    font-size: .95rem !important; opacity: 1 !important; transform: none !important;
    color: var(--k-brand, #7744B6) !important; background: rgba(var(--k-brand-rgb, 119,68,182), .10);
  }
  #navLinks.kdr-sheet li a:active { background: rgba(var(--k-fg-rgb, 30,26,60), .06) !important; }
  #navLinks.kdr-sheet li a.active { background: rgba(var(--k-brand-rgb, 119,68,182), .12) !important; color: var(--k-brand, #7744B6) !important; }
  #navLinks.kdr-sheet li a.active i { background: var(--k-grad); color: #fff !important; }
  #navLinks.kdr-sheet li a > span[style*="absolute"] { top: 50% !important; left: 12px !important; transform: translateY(-50%); }
  /* فاصل قبل لوحة التحكم / تسجيل الخروج / الدخول */
  #navLinks.kdr-sheet li:has(.admin-link),
  #navLinks.kdr-sheet li:not(:has(.admin-link)) + li:has(.logout-link),
  #navLinks.kdr-sheet li:has(.btn-glow) { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--k-line, rgba(0,0,0,.08)); }
  #navLinks.kdr-sheet li a.logout-link { color: var(--k-bad, #C2364A) !important; }
  #navLinks.kdr-sheet li a.logout-link i { color: var(--k-bad, #C2364A) !important; background: rgba(var(--k-bad-rgb, 194,54,74), .10); }
  #navLinks.kdr-sheet li a.btn-glow { justify-content: center; background: var(--k-grad) !important; color: #fff !important; }
  #navLinks.kdr-sheet li a.btn-glow i { background: rgba(255,255,255,.2); color: #fff !important; }

  /* الهيدر: الأزرار بآخر السطر (كان يبقى فراغ على اليسار) */
  .navbar .nav-container { width: 100%; box-sizing: border-box; }
  .navbar .nav-actions { margin-inline-start: auto; }
}
/* خلفية القائمة: تعتيم خفيف (blur ثابت والشفافية بس تتحرك — أخف على الآيفون) */
.menu-overlay {
  background: rgba(12, 9, 30, .22) !important;
  -webkit-backdrop-filter: blur(4px) !important; backdrop-filter: blur(4px) !important;
  transition: opacity .3s ease, visibility 0s linear .3s !important;
}
.menu-overlay.active { transition: opacity .3s ease, visibility 0s !important; }

/* ═══ الإشعارات: لوحة زجاج ثابتة تحت الهيدر (قبل كانت تطلع بأعلى الصفحة لو نازل) ═══ */
#notificationDropdown {
  position: fixed !important; z-index: 1002 !important;
  top: var(--kdr-sheet-top) !important; left: auto !important; right: max(16px, calc((100vw - 1200px) / 2 + 40px)) !important;
  width: 390px !important; max-height: min(72vh, 600px) !important;
  border: 0 !important; border-radius: 24px !important; overflow: hidden;
  background: var(--lg-tint-sheet, rgba(255,255,255,.85)) !important;
  -webkit-backdrop-filter: blur(26px) saturate(190%) !important; backdrop-filter: blur(26px) saturate(190%) !important;
  box-shadow: 0 24px 60px rgba(var(--k-shadow-rgb, 20,14,60), .24), var(--lg-inset, inset 0 0 0 1px rgba(0,0,0,.06)) !important;
  transform-origin: 85% 0;
  transform: translateY(-10px) scale(.94) !important; opacity: 0 !important; visibility: hidden !important;
  transition: transform .4s cubic-bezier(.2, .9, .25, 1.05), opacity .2s ease, visibility 0s linear .4s !important;
}
#notificationDropdown.active {
  transform: none !important; opacity: 1 !important; visibility: visible !important;
  transition: transform .4s cubic-bezier(.2, .9, .25, 1.05), opacity .18s ease, visibility 0s !important;
}
@media (max-width: 900px) {
  #notificationDropdown { left: 10px !important; right: 10px !important; width: auto !important; max-height: calc(100dvh - var(--kdr-sheet-top) - 100px - env(safe-area-inset-bottom, 0px)) !important; }
}
#notificationDropdown .notif-header { padding: 14px 16px 12px; background: transparent; border-bottom: 1px solid var(--k-line, rgba(0,0,0,.08)); }
#notificationDropdown .notif-header h4 { color: var(--k-ink); font-size: 1.1rem; font-weight: 800; }
#notificationDropdown .mark-read-btn {
  font-family: inherit; font-size: .82rem; font-weight: 700; padding: 6px 12px; border-radius: 999px;
  color: var(--k-brand); background: rgba(var(--k-brand-rgb), .10);
}
#notificationDropdown .notif-settings-link { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--k-ink-3); background: rgba(var(--k-fg-rgb, 30,26,60), .05); }
#notificationDropdown .notif-list { max-height: none; flex: 1 1 auto; padding: 6px; overscroll-behavior: contain; }
#notificationDropdown .notif-item {
  position: relative; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 2px;
  border: 0; border-radius: 16px; color: var(--k-ink); background: transparent;
}
#notificationDropdown .notif-item:active { background: rgba(var(--k-fg-rgb, 30,26,60), .06); }
@media (hover: hover) { #notificationDropdown .notif-item:hover { background: rgba(var(--k-brand-rgb), .06); } }
#notificationDropdown .notif-item.unread { background: rgba(var(--k-brand-rgb), .08); padding-left: 28px; }
#notificationDropdown .notif-item.unread::after { content: ""; position: absolute; left: 12px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--k-brand); }
#notificationDropdown .notif-item.notif-admin { background: rgba(var(--k-warn-rgb, 183,121,31), .10); border-right: 0; }
#notificationDropdown .notif-avatar-wrap, #notificationDropdown .notif-avatar { width: 44px; height: 44px; }
#notificationDropdown .notif-type-icon { border-color: var(--k-surface, #fff); color: #fff; }
#notificationDropdown .notif-content { min-width: 0; }
#notificationDropdown .notif-content div { color: var(--k-ink); font-size: .93rem; font-weight: 600; line-height: 1.5; }
#notificationDropdown .notif-time { color: var(--k-ink-3); font-size: .78rem; margin-top: 2px; }
#notificationDropdown .empty-notif { color: var(--k-ink-3); }
#notificationDropdown .notif-footer { padding: 14px; color: var(--k-brand); font-weight: 800; background: transparent; border-top: 1px solid var(--k-line, rgba(0,0,0,.08)); }

@media (prefers-reduced-motion: reduce) {
  #navLinks.kdr-sheet, #navLinks.kdr-sheet li, #notificationDropdown, .menu-overlay { transition: none !important; }
}

/* حقول البحث داخل صف (flex): بالآيفون الحقل جان يرفض يصغر ويدخل تحت زر «بحث» */
input[type="search"] { min-width: 0; -webkit-appearance: none; appearance: none; }
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }


/* ══ kdr-search.css ══ */
/* ═══════════════════════════════════════════════════════════════
   كادر — البحث السريع (assets/js/kdr-search.js)
   الموبايل: شاشة كاملة زجاج (مثل بحث الآيفون) · الكمبيوتر: لوحة بالنص فوق
   كله على ألوان كادر (فاتح/داكن)
   ═══════════════════════════════════════════════════════════════ */
.ks { position: fixed; inset: 0; z-index: 100050; /* فوق نافذة «نزّل التطبيق» والشريط الإعلاني */ visibility: hidden; pointer-events: none; font-family: inherit; color: var(--k-ink, #1E1A3C); }
.ks.open { visibility: visible; pointer-events: auto; }
html.ks-lock, html.ks-lock body { overflow: hidden !important; }

.ks-backdrop {
  position: absolute; inset: 0; background: rgba(var(--k-shadow-rgb, 20,14,60), .26);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .25s ease;
}
.ks.open .ks-backdrop { opacity: 1; }

.ks-panel {
  position: absolute; top: calc(9vh + env(safe-area-inset-top, 0px)); left: 50%;
  width: min(680px, calc(100vw - 32px)); max-height: min(78vh, 760px);
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 26px;
  background: var(--lg-tint-sheet, rgba(252,251,255,.86));
  -webkit-backdrop-filter: blur(26px) saturate(180%); backdrop-filter: blur(26px) saturate(180%);
  box-shadow: 0 30px 80px rgba(var(--k-shadow-rgb, 20,14,60), .28), var(--lg-inset, inset 0 0 0 1px rgba(255,255,255,.5));
  opacity: 0; transform: translate(-50%, -10px) scale(.98); transform-origin: 50% 0;
  transition: opacity .22s ease, transform .34s cubic-bezier(.2, .9, .25, 1.08);
}
.ks.open .ks-panel { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* شريط البحث */
.ks-bar { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px; margin: 0; border-bottom: 1px solid var(--k-line, #E5E1F0); }
.ks-field { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; margin: 0; cursor: text; }
.ks-ico { position: absolute; inset-inline-start: 15px; color: var(--k-ink-3, #827C9C); font-size: .95rem; pointer-events: none; }
.ks-input {
  width: 100%; min-width: 0; height: 48px; margin: 0; box-sizing: border-box;
  padding: 0 44px; border-radius: 16px; border: 1px solid transparent;
  background: var(--k-surface-2, #F1EFF8); color: var(--k-ink, #1E1A3C);
  font: inherit; font-size: 16px; font-weight: 600; outline: none;
  -webkit-appearance: none; appearance: none; transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.ks-input::-webkit-search-cancel-button, .ks-input::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.ks-input::placeholder { color: var(--k-ink-3, #827C9C); font-weight: 500; opacity: 1; }
.ks-input:focus { border-color: rgba(var(--k-brand-rgb, 119,68,182), .45); box-shadow: 0 0 0 4px rgba(var(--k-brand-rgb, 119,68,182), .12); background: var(--k-surface, #fff); }
.ks-clear { position: absolute; inset-inline-end: 6px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--k-ink-3, #827C9C); font-size: 1rem; cursor: pointer; display: grid; place-items: center; }
.ks-cancel { flex: none; border: 0; background: transparent; color: var(--k-brand, #7744B6); font: inherit; font-size: .98rem; font-weight: 700; padding: 10px 6px; cursor: pointer; }

/* المحتوى */
.ks-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 4px 14px calc(18px + env(safe-area-inset-bottom, 0px)); transition: opacity .15s; }
.ks-busy .ks-body > :not(.ks-sec:has(.ks-sk)) { opacity: .55; }
.ks-sec { margin-top: 16px; }
.ks-sec > header { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 9px; }
.ks-sec h3 { margin: 0; font-size: .82rem; font-weight: 700; color: var(--k-ink-3, #827C9C); letter-spacing: 0; }
.ks-link { border: 0; background: none; padding: 4px 2px; font: inherit; font-size: .84rem; font-weight: 700; color: var(--k-brand, #7744B6); text-decoration: none; cursor: pointer; }

.ks-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ks-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px;
  background: var(--k-surface, #fff); border: 1px solid var(--k-line, #E5E1F0); color: var(--k-ink-2, #4A4566);
  font: inherit; font-size: .88rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color .15s, transform .15s;
}
.ks-chip i { color: var(--k-ink-3, #827C9C); font-size: .78em; }
.ks-chip:active { transform: scale(.96); }
.ks-catchips { margin-top: 12px; }
.ks-chip-on { background: rgba(var(--k-brand-rgb, 119,68,182), .10); border-color: rgba(var(--k-brand-rgb, 119,68,182), .24); color: var(--k-brand, #7744B6); font-weight: 700; }
.ks-chip-on i { color: inherit; }
.ks-arr { font-size: .7em !important; }

.ks-cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.ks-cat {
  display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 4px 10px; border-radius: 18px;
  background: var(--k-surface, #fff); border: 1px solid var(--k-line, #E5E1F0); color: var(--k-ink, #1E1A3C);
  font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; transition: transform .15s, border-color .15s;
  animation: ksIn .32s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 25ms);
}
.ks-cat span { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 1.05rem; color: var(--k-brand, #7744B6);
  background: linear-gradient(135deg, rgba(var(--k-mag-rgb, 144,72,183), .14), rgba(var(--k-accent-rgb, 46,94,195), .12)); }
.ks-cat:active { transform: scale(.95); }

/* القوائم (مبدعين / خدمات) */
.ks-list { display: flex; flex-direction: column; gap: 2px; padding: 5px; border-radius: 20px; background: var(--k-surface, #fff); border: 1px solid var(--k-line, #E5E1F0); }
.ks-person, .ks-svc { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 15px; color: inherit; text-decoration: none; outline: none; transition: background-color .15s; }
.ks-person:active, .ks-svc:active, .ks-person:focus-visible, .ks-svc:focus-visible { background: var(--k-surface-2, #F1EFF8); }
@media (hover: hover) { .ks-person:hover, .ks-svc:hover { background: var(--k-surface-2, #F1EFF8); } }
.ks-person img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none; background: var(--k-surface-2, #F1EFF8); }
.ks-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ks-tx b { font-size: .96rem; font-weight: 700; color: var(--k-ink, #1E1A3C); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ks-tx small { font-size: .78rem; color: var(--k-ink-3, #827C9C); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ks-v { color: var(--k-accent, #2E5EC3); font-size: .78em; }
.ks-go { color: var(--k-ink-3, #827C9C); font-size: .72rem; opacity: .7; }
.ks-sth { position: relative; width: 52px; height: 52px; border-radius: 13px; overflow: hidden; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(var(--k-brand-rgb, 119,68,182), .14), rgba(var(--k-accent-rgb, 46,94,195), .10)); color: var(--k-brand, #7744B6); }
.ks-sth img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ks-price { font-weight: 800; color: var(--k-accent, #2E5EC3); font-size: .92rem; white-space: nowrap; }
.ks-price small { font-weight: 600; font-size: .7rem; color: var(--k-ink-3, #827C9C); }

/* الأعمال: شبكة صور */
.ks-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ks-work { display: flex; flex-direction: column; gap: 5px; min-width: 0; color: inherit; text-decoration: none; outline: none;
  animation: ksIn .32s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 35ms); }
.ks-th { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(var(--k-mag-rgb, 144,72,183), .16), rgba(var(--k-accent-rgb, 46,94,195), .12));
  box-shadow: inset 0 0 0 1px rgba(var(--k-fg-rgb, 30,26,60), .06); transition: transform .2s; }
.ks-th > i { color: var(--k-brand, #7744B6); font-size: 1.3rem; opacity: .8; }
.ks-th img, .ks-th video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ks-play { position: absolute; inset-inline-start: 6px; bottom: 6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .5); color: #fff; font-size: .55rem; font-style: normal; z-index: 1; }
.ks-work b { font-size: .82rem; font-weight: 700; color: var(--k-ink, #1E1A3C); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ks-work small { font-size: .72rem; color: var(--k-ink-3, #827C9C); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: -3px; }
.ks-work:focus-visible .ks-th { box-shadow: 0 0 0 3px rgba(var(--k-brand-rgb, 119,68,182), .5); }
.ks-work:active .ks-th { transform: scale(.97); }

.ks mark { background: rgba(var(--k-brand-rgb, 119,68,182), .16); color: inherit; border-radius: 4px; padding: 0 1px; }

.ks-all {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 20px 0 4px; padding: 14px; border-radius: 16px;
  background: var(--k-grad, linear-gradient(90deg, #9048B7, #7744B6, #2E5EC3)); color: #fff !important; font-weight: 800; font-size: .95rem; text-decoration: none; outline: none;
  box-shadow: 0 10px 24px rgba(var(--k-brand-rgb, 119,68,182), .25);
}
.ks-all:focus-visible { box-shadow: 0 0 0 3px rgba(var(--k-brand-rgb, 119,68,182), .45); }

.ks-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 38px 12px 10px; color: var(--k-ink-3, #827C9C); font-size: .9rem; line-height: 1.7; }
.ks-empty i { font-size: 1.6rem; color: var(--k-brand, #7744B6); opacity: .55; margin-bottom: 4px; }
.ks-empty b { color: var(--k-ink, #1E1A3C); font-size: 1.02rem; }
.ks-empty-sm { padding: 18px 12px 0; }

/* تحميل */
.ks-sk { display: flex; align-items: center; gap: 12px; padding: 10px; }
.ks-sk i, .ks-sk b, .ks-sk s { display: block; background: linear-gradient(90deg, var(--k-surface-2, #F1EFF8) 25%, var(--k-line, #E5E1F0) 50%, var(--k-surface-2, #F1EFF8) 75%); background-size: 200% 100%; animation: ksSh 1.1s linear infinite; }
.ks-sk i { width: 46px; height: 46px; border-radius: 50%; flex: none; }
.ks-sk div { flex: 1; }
.ks-sk b { height: 11px; width: 55%; border-radius: 6px; }
.ks-sk s { height: 9px; width: 34%; border-radius: 6px; margin-top: 9px; }
@keyframes ksSh { to { background-position: -200% 0; } }
@keyframes ksIn { from { opacity: 0; transform: translateY(6px); } }

/* الموبايل: شاشة كاملة */
@media (max-width: 640px) {
  .ks-backdrop { display: none; }
  .ks-panel {
    top: 0; left: 0; width: 100%; height: 100%; max-height: none; border-radius: 0;
    padding-top: env(safe-area-inset-top, 0px);
    transform: translateY(14px); transform-origin: 50% 0;
    box-shadow: none;
  }
  .ks.open .ks-panel { transform: none; }
  .ks-bar { padding: 10px 12px 10px; }
  .ks-cats { gap: 8px; }
}
@media (max-width: 360px) { .ks-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } .ks-cat { font-size: .72rem; } .ks-cat span { width: 36px; height: 36px; } }

@media (prefers-reduced-motion: reduce) {
  .ks-panel, .ks-backdrop { transition: opacity .15s !important; transform: translate(-50%, 0) !important; }
  .ks-cat, .ks-work { animation: none !important; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 640px) { .ks-panel { transform: none !important; } }
@media (prefers-contrast: more), (prefers-reduced-transparency: reduce) {
  .ks-panel { background: var(--k-surface, #fff); -webkit-backdrop-filter: none; backdrop-filter: none; }
}


/* ══ kdr-skel.css ══ */
/* ═══════════════════════════════════════════════════════════════
   كادر — هياكل التحميل (Skeleton): بدل «جاري التحميل…» والدولاب،
   يطلع شكل الشي اللي راح ينفتح (صور، أسطر، كروت) ويلمع لحد ما يوصل.
   نفس شكل البحث السريع. يشتغل بالفاتح والداكن (ألوان شفافة من --k-fg-rgb).

   الاستعمال:
     <div class="k-sk k-sk-list" aria-hidden="true"> <div><i></i><span><b></b><s></s></span></div> … </div>
     <div class="k-sk k-sk-grid" aria-hidden="true"> <div><i></i><b></b><s></s></div> … </div>
     <div class="k-sk k-sk-chat" aria-hidden="true"> <b></b><b class="me"></b> … </div>
     أو من الجافاسكربت: kdrSkel('list', 5) / kdrSkel('grid', 6) / kdrSkel('chat')
   ═══════════════════════════════════════════════════════════════ */
.k-sk { --sk-a: rgba(var(--k-fg-rgb, 30,26,60), .06); --sk-b: rgba(var(--k-fg-rgb, 30,26,60), .13); pointer-events: none; user-select: none; }
:root[data-mode="dark"] .k-sk { --sk-a: rgba(255,255,255,.05); --sk-b: rgba(255,255,255,.11); }
.k-sk :is(i, b, s, u, em) {
  display: block; font-style: normal; text-decoration: none; border-radius: 8px;
  background: linear-gradient(90deg, var(--sk-a) 25%, var(--sk-b) 50%, var(--sk-a) 75%);
  background-size: 200% 100%; animation: kSk 1.15s linear infinite;
}
@keyframes kSk { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* قائمة: صورة دائرية + سطرين (محادثات، إشعارات، متابعين) */
.k-sk-list > div { display: flex; align-items: center; gap: 12px; padding: 12px 10px; }
.k-sk-list > div + div { border-top: 1px solid rgba(var(--k-fg-rgb, 30,26,60), .05); }
.k-sk-list i { width: 46px; height: 46px; border-radius: 50%; flex: none; }
.k-sk-list span { flex: 1; min-width: 0; }
.k-sk-list b { height: 12px; width: 52%; }
.k-sk-list s { height: 10px; width: 78%; margin-top: 10px; }
.k-sk-list > div:nth-child(3n+2) b { width: 38%; }
.k-sk-list > div:nth-child(3n+2) s { width: 62%; }
.k-sk-list > div:nth-child(3n) b { width: 46%; }
.k-sk-list.k-sk-sm i { width: 36px; height: 36px; }

/* شبكة: كروت أعمال/خدمات (صورة + سطرين) */
.k-sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.k-sk-grid > div { border-radius: 22px; padding: 10px; background: var(--k-surface, #fff); border: 1px solid var(--k-line, rgba(0,0,0,.06)); }
.k-sk-grid i { aspect-ratio: 4 / 3; border-radius: 16px; }
.k-sk-grid b { height: 13px; width: 70%; margin: 14px 4px 0; }
.k-sk-grid s { height: 10px; width: 45%; margin: 10px 4px 6px; }
.k-sk-grid > div:nth-child(even) b { width: 56%; }
@media (max-width: 600px) { .k-sk-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .k-sk-grid > div { border-radius: 18px; padding: 7px; } .k-sk-grid i { border-radius: 13px; } }

/* المحادثة: فقاعات يمين ويسار */
.k-sk-chat { display: flex; flex-direction: column; gap: 12px; padding: 6px 4px; }
.k-sk-chat b { height: 40px; width: 58%; border-radius: 18px 18px 18px 6px; align-self: flex-end; }
.k-sk-chat b.me { align-self: flex-start; border-radius: 18px 18px 6px 18px; width: 46%; }
.k-sk-chat b:nth-child(3n) { width: 40%; height: 34px; }
.k-sk-chat b:nth-child(4n) { height: 64px; }

/* أسطر نص */
.k-sk-lines b { height: 12px; margin: 0 0 12px; }
.k-sk-lines b:nth-child(odd) { width: 92%; }
.k-sk-lines b:nth-child(even) { width: 74%; }
.k-sk-lines b:last-child { width: 48%; }

/* ═══ هيكل الصفحة الجاية: من تضغط رابط والصفحة تتأخر، يطلع شكلها فوراً (kdr-nav.js) ═══ */
.k-navskel {
  position: fixed; inset-inline: 0; bottom: 0; top: var(--sk-top, 0px); z-index: 890;
  overflow: hidden; pointer-events: none;
  background: var(--k-bg, #F6F5FA);
  padding: 18px 16px calc(120px + env(safe-area-inset-bottom, 0px));
  opacity: 0; transition: opacity .16s ease;
}
.k-navskel.on { opacity: 1; }
.k-navskel > .k-sk { max-width: 1100px; margin: 0 auto; }
.k-navskel .k-sk-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.k-navskel .k-sk-head b { height: 22px; width: min(46%, 260px); border-radius: 10px; }
.k-navskel .k-sk-head s { height: 12px; width: min(72%, 420px); }
.k-navskel .k-sk-chips { display: flex; gap: 8px; margin-bottom: 18px; overflow: hidden; }
.k-navskel .k-sk-chips u { height: 36px; width: 88px; border-radius: 999px; flex: none; }
.k-navskel .k-sk-chips u:nth-child(2) { width: 110px; }
.k-navskel .k-sk-hero { height: clamp(170px, 34vw, 300px); border-radius: 26px; margin-bottom: 18px; }
.k-navskel .k-sk-box { max-width: 760px; margin: 0 auto; border-radius: 26px; background: var(--k-surface, #fff); border: 1px solid var(--k-line, rgba(0,0,0,.06)); padding: 10px 14px 14px; }
.k-navskel .k-sk-list { max-width: 760px; margin: 0 auto; }

/* البروفايل: نفس شكل البطاقة الجديدة (غلاف بقوس + صورة بالنص) */
.k-sk-profile { max-width: 760px !important; border-radius: 26px; overflow: hidden; background: var(--k-surface, #fff); border: 1px solid var(--k-line, rgba(0,0,0,.06)); padding-bottom: 20px; text-align: center; }
.k-sk-profile .pc { height: 178px; border-radius: 0; position: relative; }
.k-sk-profile .pc::after { content: ""; position: absolute; inset: auto 0 -1px; height: 46px; background: var(--k-surface, #fff);
  -webkit-mask: radial-gradient(ellipse 70% 100% at 50% 100%, #000 99%, transparent 100%); mask: radial-gradient(ellipse 70% 100% at 50% 100%, #000 99%, transparent 100%); }
.k-sk-profile .pa { width: 112px; height: 112px; border-radius: 50%; margin: -96px auto 14px; position: relative; z-index: 1; box-shadow: 0 0 0 6px var(--k-surface, #fff); }
.k-sk-profile .pn { height: 20px; width: 46%; margin: 0 auto 10px; }
.k-sk-profile .pu { height: 12px; width: 22%; margin: 0 auto 18px; }
.k-sk-profile .ps { height: 64px; width: calc(100% - 32px); margin: 0 auto 14px; border-radius: 18px; }
.k-sk-profile .pb { height: 44px; width: calc(100% - 32px); margin: 0 auto; border-radius: 14px; }

@media (prefers-reduced-motion: reduce) {
  .k-sk :is(i, b, s, u, em) { animation: none; }
  .k-navskel { transition: none; }
}
@media print { .k-navskel { display: none !important; } }

