﻿/* =========================================================================
   RCMS — نظام التصميم
   الهوية المشتركة مع الأنظمة الشقيقة (Workflow · HR · PMO · UnifiedDesk):
   قائمة جانبية بيضاء، شريط علوي أبيض، أسطح رمادية محايدة، وأخضر المؤشرات الوطنية.

   الترتيب: الخط · المتغيّرات · الأساس · الهيكل (الشريط والقائمة) · رأس الصفحة ·
   البطاقات · الجداول · النماذج والأزرار · الشارات · الحوارات والقوائم · التبويبات ·
   الحالات الفارغة والتنبيهات · مكوّنات النظام (الرفع، الفحص، النتيجة…) · الأدوات ·
   الشاشات الصغيرة · الطباعة.
   ========================================================================= */

/* ---------- 1. الخط: يُخدَم من النظام نفسه (لا اتصال خارجي) ---------- */
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 400; font-display: swap;
    src: url('fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 500; font-display: swap;
    src: url('fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 600; font-display: swap;
    src: url('fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 700; font-display: swap;
    src: url('fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 400; font-display: swap;
    src: url('fonts/ibm-plex-sans-arabic-latin-400-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 500; font-display: swap;
    src: url('fonts/ibm-plex-sans-arabic-latin-500-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 600; font-display: swap;
    src: url('fonts/ibm-plex-sans-arabic-latin-600-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans Arabic'; font-style: normal; font-weight: 700; font-display: swap;
    src: url('fonts/ibm-plex-sans-arabic-latin-700-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- 2. المتغيّرات ---------- */
:root {
    /* العلامة */
    --brand: #0b7a56;
    --brand-strong: #04543b;
    --brand-bright: #00a46a;      /* للزخرفة فقط (نقاط، خطوط)، لا للنص */
    --brand-soft: #e7f6ef;
    --brand-tint: #f3faf7;
    --brand-line: #bfe3d3;
    --brand-ink: #063b2a;

    /* الأسطح والحدود */
    --surface: #ffffff;
    --surface-2: #f9fafb;
    --surface-3: #f3f4f6;
    --border-soft: #e5e7eb;
    --border-strong: #d1d5db;
    --boundary: #e2e8ee;

    /* النص: كلها تحقق تبايناً ≥ 4.5 على الأبيض وعلى خلفية الصفحة */
    --text: #1f2937;
    --text-strong: #111827;
    --muted: #5b6675;
    --dim: #5f6b7a;

    /* ألوان الحالة: نص داكن على خلفية فاتحة من اللون نفسه */
    --ok: #047857;       --ok-soft: #ecfdf3;       --ok-line: #a7f3d0;
    --warn: #b45309;     --warn-soft: #fff8ec;     --warn-line: #fde68a;
    --bad: #b91c1c;      --bad-soft: #fef2f2;      --bad-line: #fecaca;
    --info: #0369a1;     --info-soft: #eff8ff;     --info-line: #bae6fd;
    --neutral: #475569;  --neutral-soft: #f1f5f9;  --neutral-line: #e2e8f0;
    --ok-ink: #065f46;   --warn-ink: #92400e;      --bad-ink: #991b1b;      --info-ink: #075985;
    --teal: #0f6157;     --teal-soft: #effcf9;     --teal-line: #b5e8df;
    --violet: #6d28d9;   --violet-soft: #f3efff;

    /* ألوان الرسوم: لوحة فئات مُتحقَّق منها لعمى الألوان (التباين المنخفض لبعضها يعوّضه المفتاح والقيم المكتوبة) */
    --viz-1: #2a78d6; --viz-2: #eb6834; --viz-3: #1baf7a; --viz-4: #eda100; --viz-5: #e87ba4; --viz-6: #008300;
    --viz-neutral: #94a3b8;
    --viz-grid: #eef0f3;

    /* أجزاء الهيكل (تُعاد تعريفها في الوضع الداكن) */
    --on-brand: #ffffff;
    --nav-text: #374453;
    --nav-hover: #eef2f6;
    --row-line: #eef0f3;
    --border-hover: #9ca3af;
    --placeholder: #8a94a3;
    --scroll-thumb: #cbd5d1;
    --scroll-thumb-hover: #a9b8b2;
    --search-bg: rgba(243, 244, 246, .6);
    --empty-icon: #94a3b8;

    /* الشكل */
    --radius-sm: 0.6rem;
    --radius: 0.9rem;
    --radius-md: var(--radius);
    --radius-lg: 1.1rem;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow-md: 0 8px 24px -8px rgba(16, 24, 40, .14);
    --shadow-lg: 0 24px 60px -20px rgba(16, 24, 40, .32);
    --focus-ring: 0 0 0 3px rgba(11, 122, 86, .24);
    --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- 2ب. الوضع الداكن (يُفعَّل من زر الشريط العلوي، ويُحفظ في المتصفح) ---------- */
html[data-theme="dark"] {
    color-scheme: dark;
    --brand: #34c38f; --brand-strong: #6ee0b4; --brand-bright: #34c38f; --brand-soft: #143a2f;
    --brand-tint: #12241f; --brand-line: #1f5a47; --brand-ink: #b7f0da;
    --surface: #151d29; --surface-2: #1a2433; --surface-3: #202b3b;
    --border-soft: #263243; --border-strong: #354357; --boundary: #263243;
    --text: #e3e8ef; --text-strong: #f3f6fa; --muted: #a2adbb; --dim: #a2adbb;
    --ok: #4ad3a0;      --ok-soft: #10302a;      --ok-line: #1d5446;      --ok-ink: #9ff0cf;
    --warn: #f3b562;    --warn-soft: #36280f;    --warn-line: #5e4618;    --warn-ink: #fcd9a4;
    --bad: #f68b8b;     --bad-soft: #3a1b1f;     --bad-line: #66303a;     --bad-ink: #fec4c4;
    --info: #6cb6f5;    --info-soft: #142a42;    --info-line: #24476c;    --info-ink: #b9dcfb;
    --neutral: #c3ccd8; --neutral-soft: #1f2937; --neutral-line: #334155;
    --teal: #6ad9c9;    --teal-soft: #0f2f2c;    --teal-line: #1d5550;
    --violet: #b9a8ff;  --violet-soft: #2b2547;
    --viz-1: #3987e5; --viz-2: #d95926; --viz-3: #199e70; --viz-4: #c98500; --viz-5: #d55181; --viz-6: #008300;
    --viz-neutral: #64748b;
    --viz-grid: #263243;
    --on-brand: #04241a;
    --nav-text: #c9d2de; --nav-hover: #1f2a3a; --row-line: #222d3d; --border-hover: #4b5a70; --placeholder: #7f8b9b;
    --scroll-thumb: #334155; --scroll-thumb-hover: #475569; --search-bg: rgba(32, 43, 59, .7); --empty-icon: #64748b;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, .6);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .75);
    --focus-ring: 0 0 0 3px rgba(52, 195, 143, .35);

    /* ألوان مكتبة الواجهة */
    --mud-palette-primary: #34c38f; --mud-palette-primary-rgb: 52, 195, 143; --mud-palette-primary-text: #04241a;
    --mud-palette-primary-darken: #2aa87a; --mud-palette-primary-lighten: #6ee0b4; --mud-palette-primary-hover: rgba(52, 195, 143, .1);
    --mud-palette-secondary: #4fb895; --mud-palette-secondary-rgb: 79, 184, 149; --mud-palette-secondary-text: #04241a;
    --mud-palette-secondary-darken: #3c9c7c; --mud-palette-secondary-lighten: #7fd0b3; --mud-palette-secondary-hover: rgba(79, 184, 149, .1);
    --mud-palette-tertiary: #4fd1c5; --mud-palette-tertiary-rgb: 79, 209, 197; --mud-palette-tertiary-text: #042824;
    --mud-palette-tertiary-darken: #38b3a8; --mud-palette-tertiary-lighten: #86e2d9; --mud-palette-tertiary-hover: rgba(79, 209, 197, .1);
    --mud-palette-info: #6cb6f5; --mud-palette-info-rgb: 108, 182, 245; --mud-palette-info-text: #06213a;
    --mud-palette-info-darken: #4a9be0; --mud-palette-info-lighten: #9ccdf8; --mud-palette-info-hover: rgba(108, 182, 245, .1);
    --mud-palette-success: #4ad3a0; --mud-palette-success-rgb: 74, 211, 160; --mud-palette-success-text: #04241a;
    --mud-palette-success-darken: #33b886; --mud-palette-success-lighten: #86e5c2; --mud-palette-success-hover: rgba(74, 211, 160, .1);
    --mud-palette-warning: #f3b562; --mud-palette-warning-rgb: 243, 181, 98; --mud-palette-warning-text: #2b1a02;
    --mud-palette-warning-darken: #e09a3d; --mud-palette-warning-lighten: #f8cf96; --mud-palette-warning-hover: rgba(243, 181, 98, .1);
    --mud-palette-error: #f68b8b; --mud-palette-error-rgb: 246, 139, 139; --mud-palette-error-text: #2f0a0a;
    --mud-palette-error-darken: #ee6a6a; --mud-palette-error-lighten: #fab5b5; --mud-palette-error-hover: rgba(246, 139, 139, .1);
    --mud-palette-dark: #e5e7eb; --mud-palette-dark-rgb: 229, 231, 235; --mud-palette-dark-text: #111827;
    --mud-palette-dark-darken: #cbd5e1; --mud-palette-dark-lighten: #f3f4f6; --mud-palette-dark-hover: rgba(229, 231, 235, .1);
    --mud-palette-text-primary: #e3e8ef; --mud-palette-text-secondary: #a2adbb; --mud-palette-text-disabled: #6b7686;
    --mud-palette-action-default: #a2adbb; --mud-palette-action-default-hover: rgba(162, 173, 187, .08);
    --mud-palette-action-disabled: #5b6675; --mud-palette-action-disabled-background: rgba(255, 255, 255, .08);
    --mud-palette-surface: #151d29; --mud-palette-background: #0e141d; --mud-palette-background-gray: #0e141d;
    --mud-palette-drawer-background: #151d29; --mud-palette-drawer-text: #e3e8ef; --mud-palette-drawer-icon: #a2adbb;
    --mud-palette-appbar-background: #151d29; --mud-palette-appbar-text: #e3e8ef;
    --mud-palette-lines-default: #263243; --mud-palette-lines-inputs: #354357; --mud-palette-table-lines: #263243;
    --mud-palette-table-striped: #18212e; --mud-palette-table-hover: #12241f;
    --mud-palette-divider: #263243; --mud-palette-divider-light: #1f2937; --mud-palette-skeleton: rgba(255, 255, 255, .08);
    --mud-palette-gray-default: #64748b; --mud-palette-gray-light: #475569; --mud-palette-gray-lighter: #334155;
    --mud-palette-gray-dark: #94a3b8; --mud-palette-gray-darker: #cbd5e1;
    --mud-palette-overlay-dark: rgba(0, 0, 0, .6); --mud-palette-overlay-light: rgba(14, 20, 29, .6);
}
html[data-theme="dark"] .rcms-brand-mark { filter: none; }
html[data-theme="dark"] .mud-tooltip { background: #e3e8ef; color: #111827; }
html[data-theme="dark"] .doc-viewer__image img, html[data-theme="dark"] .doc-viewer__frame { background: #ffffff; }

/* زر التبديل: تظهر أيقونة الوضع الذي سينتقل إليه */
.appbar-theme { border: 0; background: transparent; cursor: pointer; width: 40px; min-width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--radius-sm);
    display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.appbar-theme:hover { background: var(--surface-3); color: var(--text); }
.appbar-theme .is-light { display: none; }
html[data-theme="dark"] .appbar-theme .is-light { display: inline-flex; }
html[data-theme="dark"] .appbar-theme .is-dark { display: none; }

/* ---------- 3. الأساس ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 76px; }

html, body {
    font-family: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
}

body {
    background: var(--mud-palette-background);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* الحروف العربية متصلة: لا تباعد بين الحروف ولا تحويل إلى أحرف كبيرة في أي مكوّن */
.mud-typography, .mud-button-root, .mud-tab, .mud-chip, .mud-input, .mud-input-label, .mud-table-cell,
.mud-nav-link, .mud-list-item, .mud-tooltip, .mud-alert, .mud-breadcrumbs, .mud-badge {
    letter-spacing: 0 !important;
}

::selection { background: rgba(11, 122, 86, .18); }

/* Blazor ينقل التركيز إلى عنوان الصفحة بعد كل تنقّل (لقارئات الشاشة)؛ لا داعي لإطار حوله */
h1:focus:not(:focus-visible), h1[tabindex="-1"]:focus { outline: none; }

/* حلقة التركيز عند التنقل بلوحة المفاتيح */
a:focus-visible, button:focus-visible, [role="button"]:focus-visible, [tabindex]:focus-visible,
.mud-button-root:focus-visible, .mud-nav-link:focus-visible, .mud-tab:focus-visible, .mud-chip.mud-clickable:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}
.mud-input-slot:focus-visible, .mud-dialog:focus-visible, .mud-popover:focus-visible, .mud-list:focus-visible,
.mud-main-content:focus-visible, .mud-table-container:focus-visible { outline: none; }

/* رابط «تخطَّ إلى المحتوى» لمستخدمي لوحة المفاتيح وقارئات الشاشة */
.skip-link {
    position: fixed; top: 8px; inset-inline-start: 8px; z-index: 3000;
    background: var(--brand-strong); color: var(--surface); padding: .55rem .9rem; border-radius: var(--radius-sm);
    font-weight: 600; font-size: .85rem; text-decoration: none;
    transform: translateY(-200%); transition: transform .15s var(--ease);
}
.skip-link:focus { transform: none; outline: 2px solid #fff; outline-offset: -4px; }

/* الأرقام في الجداول والمؤشرات بعرض ثابت حتى تصطف الأعمدة */
.mud-table-cell, .mud-mono, .rcms-score__figure, .rcms-score__domain-value { font-variant-numeric: tabular-nums; }
.mud-mono { font-family: inherit; font-weight: 700; }

/* أشرطة التمرير */
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); background-clip: content-box; }

/* ---------- 4. الشعار (Logo.razor) ---------- */
.rcms-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rcms-brand--icon-only { gap: 0; }
.rcms-brand-mark {
    width: var(--mark-size, 40px); height: var(--mark-size, 40px);
    display: inline-flex; flex-shrink: 0;
    filter: drop-shadow(0 4px 10px rgba(6, 59, 42, .22));
}
.rcms-brand-mark svg { width: 100%; height: 100%; display: block; }
.rcms-brand-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.rcms-brand-title { font-weight: 700; font-size: 1rem; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcms-brand-subtitle { font-size: .74rem; color: var(--brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 5. الشريط العلوي ---------- */
.mud-appbar.app-bar {
    /* لون مصمت عن قصد: تأثير الزجاج (backdrop-filter) يحبس طبقة إغلاق القوائم داخل الشريط فلا تُغلق بالنقر خارجها */
    background: var(--surface) !important;
    border-bottom: 1px solid var(--border-soft);
    box-shadow: none;
    color: var(--text);
}
.app-bar .mud-toolbar { gap: 4px; padding-inline: 14px; }

.appbar-icon-btn { color: var(--muted) !important; border-radius: var(--radius-sm) !important; flex-shrink: 0; min-width: 40px; }
.appbar-icon-btn:hover { background: var(--surface-3) !important; color: var(--text) !important; }

.appbar-brand { min-width: 0; }
.appbar-brand .rcms-brand-title { color: var(--text); }

/* مسار التنقل داخل الشريط */
.appbar-crumbs { min-width: 0; flex: 0 1 auto; overflow: hidden; }
.appbar-crumbs .mud-breadcrumbs { padding: 0 6px; flex-wrap: nowrap; font-size: .84rem; }
.appbar-crumbs .mud-breadcrumb-item { white-space: nowrap; }
.appbar-crumbs .mud-breadcrumb-item > a { color: var(--muted); font-weight: 500; text-decoration: none; }
.appbar-crumbs .mud-breadcrumb-item > a:hover { color: var(--brand-strong); }
.appbar-crumbs .mud-breadcrumb-item.mud-disabled > a,
.appbar-crumbs .mud-breadcrumb-item:last-child > a { color: var(--text); font-weight: 700; }
.appbar-crumbs .mud-breadcrumb-separator { color: var(--border-strong); padding: 0 6px; }

.appbar-search { flex: 0 1 320px; min-width: 120px; margin-inline: 8px; }
.appbar-search .mud-input-outlined .mud-input-outlined-border { border-color: var(--border-soft); border-radius: 999px; background: var(--search-bg); }
.appbar-search .mud-input-outlined:hover .mud-input-outlined-border { border-color: var(--border-strong); }
.appbar-search .mud-input-slot, .appbar-search input { color: var(--text); position: relative; z-index: 1; }
.appbar-search .mud-input-adornment { color: var(--muted); position: relative; z-index: 1; }

/* زر الإشعارات وقائمة المستخدم */
.appbar-bell .mud-badge.mud-badge-overlap { inset-inline-end: 4px; top: 6px; }
.appbar-user {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-family: inherit;
    padding: 4px 6px; padding-inline-end: 10px; margin-inline-start: 4px;
    border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--text);
    transition: background-color .15s var(--ease), border-color .15s var(--ease);
}
.appbar-user:hover { background: var(--surface-3); border-color: var(--border-soft); }
.appbar-user__avatar {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
    background: linear-gradient(135deg, #115b41, #1d7f67); color: #fff; font-weight: 700; font-size: .85rem;
}
.appbar-user__text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; min-width: 0; }
.appbar-user__name { font-size: .8rem; font-weight: 600; color: var(--text); max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbar-user__role { font-size: .7rem; color: var(--muted); }
.appbar-user__caret { color: var(--muted); font-size: 1.1rem !important; }

.notif-item { max-width: 320px; white-space: normal; }
.notif-item__title { font-weight: 600; font-size: .85rem; color: var(--text); }
.notif-item.is-read .notif-item__title { font-weight: 500; }
.notif-item__body { font-size: .78rem; color: var(--muted); line-height: 1.6; }
.notif-item__time { font-size: .72rem; color: var(--muted); }

/* ---------- 6. القائمة الجانبية ---------- */
.app-drawer {
    border: 0 !important;
    border-inline-end: 1px solid var(--boundary) !important;
    background: var(--surface) !important;
    box-shadow: none !important;
}

.w-sidebar-inner { display: flex; flex-direction: column; height: 100%; min-height: 100%; }

.w-sidebar-brand {
    display: flex; align-items: center; gap: .7rem;
    height: var(--mud-appbar-height, 60px); padding: 0 1.1rem;
    border-bottom: 1px solid var(--boundary); flex-shrink: 0;
}
.w-brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.w-brand-text > span { font-weight: 700; color: var(--text); white-space: nowrap; font-size: .98rem; }
.w-brand-text small { color: var(--brand); font-size: .7rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rcms-nav { flex: 1; overflow-y: auto; padding: .35rem .7rem 1rem; scrollbar-width: none; }
.rcms-nav::-webkit-scrollbar { display: none; }

.w-sidebar-section {
    display: flex; align-items: center; gap: .45rem;
    color: var(--muted); font-size: .74rem; font-weight: 700;
    padding: 1.05rem .8rem .4rem; margin: 0; white-space: nowrap;
}
.w-ss-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--brand-bright); flex-shrink: 0; }

.rcms-nav .mud-nav-link {
    display: flex; align-items: center;
    padding: .58rem .8rem; margin: 2px 0;
    border-radius: var(--radius-sm);
    color: var(--nav-text); font-size: .9rem; font-weight: 500;
    white-space: nowrap; position: relative;
    transition: background-color .15s var(--ease), color .15s var(--ease);
}
.rcms-nav .mud-nav-link .mud-nav-link-text { overflow: hidden; text-overflow: ellipsis; font-weight: inherit; }
.rcms-nav .mud-nav-link .mud-nav-link-icon { color: var(--muted); opacity: 1; }
.rcms-nav .mud-nav-link:hover:not(.mud-nav-link-disabled) { background: var(--nav-hover); color: var(--text); }
.rcms-nav .mud-nav-link:hover .mud-nav-link-icon { color: var(--brand-strong); }

.rcms-nav .mud-nav-link.active { background: var(--brand-soft); color: var(--brand-strong); font-weight: 600; }
.rcms-nav .mud-nav-link.active .mud-nav-link-icon,
.rcms-nav .mud-nav-link.active .mud-nav-link-expand-icon { color: var(--brand-strong); }
.rcms-nav .mud-nav-link.active::before {
    content: ""; position: absolute; inset-inline-start: 0; top: 22%; bottom: 22%;
    width: 3.5px; border-radius: 4px; background: var(--brand-bright);
}
.rcms-nav .mud-nav-group > .mud-nav-link { font-weight: 600; }
.rcms-nav .mud-nav-group .mud-collapse-container .mud-nav-link { font-size: .86rem; padding-inline-start: 1.5rem; }

/* وحدات القائمة: مجموعة صفحات مترابطة تُطوى وتُفتح */
.rc-navgroup { margin: 2px 0; border-radius: var(--radius-sm); }
.rc-navgroup + .rc-navgroup { margin-top: 2px; }
.rc-navgroup__head {
    width: 100%; display: flex; align-items: center; gap: .6rem; padding: .5rem .55rem; margin: 0;
    border: 0; background: transparent; border-radius: var(--radius-sm); cursor: pointer;
    font-family: inherit; font-size: .86rem; font-weight: 700; color: var(--text); text-align: start;
    transition: background-color .15s var(--ease), color .15s var(--ease);
}
.rc-navgroup__head:hover { background: var(--nav-hover); }
.rc-navgroup__head:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.rc-navgroup__icon {
    width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0;
    background: var(--surface-2); color: var(--muted); border: 1px solid var(--boundary);
    transition: background-color .15s var(--ease), color .15s var(--ease);
}
.rc-navgroup__icon .mud-icon-root { font-size: 1.1rem; }
.rc-navgroup__title { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-navgroup__chevron { color: var(--muted); transition: transform .2s var(--ease); }
.rc-navgroup.is-open .rc-navgroup__chevron { transform: rotate(180deg); }
.rc-navgroup.has-active .rc-navgroup__icon, .rc-navgroup.is-open .rc-navgroup__icon { background: var(--brand-soft); color: var(--brand-strong); border-color: var(--brand-line); }
.rc-navgroup.has-active .rc-navgroup__head { color: var(--brand-strong); }
.rc-navgroup__body { display: none; padding: 2px 0 6px; margin-inline-start: 1.05rem; padding-inline-start: .5rem; border-inline-start: 1px dashed var(--boundary); }
.rc-navgroup.is-open .rc-navgroup__body { display: block; }
.rc-navgroup__body .mud-nav-link { font-size: .86rem !important; padding: .48rem .7rem !important; }

.w-sidebar-foot { border-top: 1px solid var(--boundary); padding: .8rem .9rem; flex-shrink: 0; }
.w-sidebar-user {
    display: flex; align-items: center; gap: .6rem;
    background: var(--surface-2); border: 1px solid var(--boundary); border-radius: var(--radius-sm); padding: .5rem .65rem;
}
.w-avatar {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, #115b41, #1d7f67); color: #fff;
    display: grid; place-items: center; font-weight: 700; font-size: .9rem;
}
.w-su-name { color: var(--text); font-weight: 600; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-su-role { color: var(--muted); font-size: .72rem; }
.w-sidebar-logout-form { display: inline-flex; margin: 0; }
.w-sidebar-logout-btn {
    border: none; background: transparent; color: var(--muted); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: var(--radius-sm);
    transition: background-color .15s var(--ease), color .15s var(--ease);
}
.w-sidebar-logout-btn:hover { background: var(--bad-soft); color: var(--bad); }

/* ---------- 7. منطقة المحتوى ---------- */
.mud-main-content.app-main {
    background: var(--mud-palette-background);
    min-height: 100vh;
    display: flex; flex-direction: column;
    padding: calc(var(--mud-appbar-height, 60px) + 20px) 12px 0;
}
.app-main > .mud-container { flex: 1 0 auto; padding-bottom: 28px; }

.app-footer {
    border-top: 1px solid var(--border-soft);
    margin: 0 -12px; padding: 12px 16px;
    color: var(--muted); font-size: .78rem; text-align: center;
    display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
}

.app-footer > span { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }

/* ---------- 8. رأس الصفحة (PageHeader.razor) ---------- */
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px 18px; flex-wrap: wrap; margin-bottom: 22px;
}
.page-header__main { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 320px; }
.page-header__icon {
    width: 46px; height: 46px; border-radius: 13px;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    color: var(--brand-strong); background: var(--brand-soft); border: 1px solid var(--brand-line);
}
.page-header__icon .mud-icon-root { font-size: 1.5rem; }
.page-header__copy { min-width: 0; }
.page-header__eyebrow { display: block; font-size: .76rem; font-weight: 700; color: var(--brand); margin-bottom: 2px; }
.page-header__title { font-weight: 700 !important; color: var(--text-strong); line-height: 1.5 !important; overflow-wrap: anywhere; }
.page-header__subtitle { color: var(--muted); margin-top: 1px; }
.page-header__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-header__back { color: var(--muted) !important; margin-inline-start: -6px; }

/* ---------- 9. البطاقات والأسطح ---------- */
.mud-card {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
/* رأس البطاقة مثل رأس لوحة المعلومات: عنوان عريض وخط فاصل (على نمط Workflow) */
.mud-card-header { padding: 14px 18px; align-items: center; border-bottom: 1px solid var(--border-soft); }
.mud-card-header .mud-card-header-content .mud-typography-h6 { font-size: 1rem; font-weight: 700; line-height: 1.5; color: var(--text-strong); }
.mud-card-header .mud-card-header-content .mud-typography-body2 { font-size: .8rem; color: var(--muted); }
.mud-card-header .mud-card-header-actions { margin: 0; align-self: center; }
.mud-card-content { padding: 16px 18px 18px; }
.mud-card-actions { padding: 10px 16px 14px; gap: 6px; }

/* اللوح الأبيض بلا ظل يحتاج حدّاً خفيفاً حتى ينفصل عن خلفية الصفحة */
.app-main .mud-paper.mud-elevation-0:not(.mud-paper-outlined):not(.u-flat) { border: 1px solid var(--border-soft); }
.mud-paper-outlined { border-color: var(--border-soft); }

/* ---------- 10. الجداول ---------- */
.mud-table {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    box-shadow: none !important;
    overflow: hidden;
    background: var(--mud-palette-surface);
}
.mud-table-container { overflow-x: auto; }
.mud-table-toolbar { padding-inline: 16px; }

.mud-table .mud-table-head .mud-table-cell {
    font-weight: 600;
    font-size: .8rem;
    color: var(--neutral);
    background: var(--surface-2);
    white-space: nowrap;
    border-bottom: 1px solid var(--border-soft);
    padding-top: 10px; padding-bottom: 10px;
}
.mud-table-cell { border-bottom: 1px solid var(--row-line); font-size: .875rem; font-weight: 400; }
.mud-table .mud-table-body .mud-table-row:last-child > .mud-table-cell { border-bottom: 0; }
.mud-table-hover .mud-table-container .mud-table-root .mud-table-body .mud-table-row:hover { background: var(--brand-tint); }
.mud-table-sort-label { font-weight: 600; }
.mud-table-pagination { border-top: 1px solid var(--border-soft); background: var(--surface-2); }
.mud-table-pagination .mud-table-pagination-toolbar { min-height: 46px; height: auto; flex-wrap: wrap; padding-inline: 12px; }
.mud-table-pagination-caption { color: var(--muted); font-size: .8rem; }
.mud-table-empty-row .mud-table-cell, .mud-table-loading { color: var(--muted); }

/* الجدول حين يتحوّل إلى بطاقات على الشاشات الصغيرة */
/* تطبَّق فقط تحت نقطة التحوّل الخاصة بكل جدول (MudBlazor يضع الصنف دائماً، والتحويل يحدث بالعرض) */
@media (max-width: 599.98px) {
    .mud-xs-table .mud-table-body .mud-table-row { display: block; padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
    .mud-xs-table .mud-table-body .mud-table-row:last-child { border-bottom: 0; }
    .mud-xs-table .mud-table-body .mud-table-cell { padding: 7px 14px; gap: 12px; border: 0 !important; overflow-wrap: break-word; flex-wrap: wrap; }
    .mud-xs-table .mud-table-body .mud-table-cell::before { color: var(--muted); font-weight: 600; font-size: .78rem; white-space: nowrap; }
    .mud-xs-table .mud-table-body .mud-table-cell:empty { display: none; }
}
@media (max-width: 959.98px) {
    .mud-sm-table .mud-table-body .mud-table-row { display: block; padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
    .mud-sm-table .mud-table-body .mud-table-row:last-child { border-bottom: 0; }
    .mud-sm-table .mud-table-body .mud-table-cell { padding: 7px 14px; gap: 12px; border: 0 !important; overflow-wrap: break-word; flex-wrap: wrap; }
    .mud-sm-table .mud-table-body .mud-table-cell::before { color: var(--muted); font-weight: 600; font-size: .78rem; white-space: nowrap; }
    .mud-sm-table .mud-table-body .mud-table-cell:empty { display: none; }
}
@media (max-width: 1279.98px) {
    .mud-md-table .mud-table-body .mud-table-row { display: block; padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
    .mud-md-table .mud-table-body .mud-table-row:last-child { border-bottom: 0; }
    .mud-md-table .mud-table-body .mud-table-cell { padding: 7px 14px; gap: 12px; border: 0 !important; overflow-wrap: break-word; flex-wrap: wrap; }
    .mud-md-table .mud-table-body .mud-table-cell::before { color: var(--muted); font-weight: 600; font-size: .78rem; white-space: nowrap; }
    .mud-md-table .mud-table-body .mud-table-cell:empty { display: none; }
}

.mud-simple-table { border: 1px solid var(--border-soft); border-radius: var(--radius-md); overflow: hidden; }
.mud-simple-table table thead th { font-weight: 600; font-size: .8rem; color: var(--neutral); background: var(--surface-2); white-space: nowrap; }

/* نص الزر لا ينكسر حرفاً حرفاً حين يضيق المكان (بطاقات الجداول على الهاتف) */
.mud-button-root.mud-button { white-space: nowrap; flex-shrink: 0; }

/* ---------- 11. الأزرار (على نمط Workflow: تدرّج أخضر وظل ناعم ورفعة خفيفة عند المرور) ---------- */
.mud-button-root { border-radius: 10px; font-weight: 600; text-transform: none; }
.mud-button { min-height: 38px; padding: 7px 18px; gap: 2px; transition: background-color .15s var(--ease), border-color .15s var(--ease), box-shadow .18s var(--ease), transform .12s var(--ease), color .15s var(--ease); }
.mud-button.mud-button-size-small { min-height: 32px; padding: 4px 12px; font-size: .8rem; }
.mud-button.mud-button-size-large { min-height: 46px; padding: 10px 24px; font-size: .95rem; }
.mud-button.mud-button-text { padding-inline: 12px; }
.mud-button .mud-button-icon-start { margin-inline-end: 6px; margin-inline-start: -2px; }
.mud-button:active:not(.mud-disabled) { transform: translateY(1px); }

.mud-button-filled { box-shadow: none !important; }
.mud-button-filled:hover:not(.mud-disabled) { transform: translateY(-1px); box-shadow: 0 10px 20px -12px rgba(16, 24, 40, .55) !important; }
.mud-button-filled.mud-button-filled-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: var(--on-brand);
    box-shadow: 0 8px 18px -12px rgba(11, 122, 86, .85) !important;
}
.mud-button-filled.mud-button-filled-primary:hover:not(.mud-disabled) {
    background: linear-gradient(135deg, var(--brand-strong), var(--brand-strong));
    box-shadow: 0 12px 22px -12px rgba(11, 122, 86, .9) !important;
}
html[data-theme="dark"] .mud-button-filled.mud-button-filled-primary { background: linear-gradient(135deg, var(--brand-strong), var(--brand)); }

.mud-button-outlined { border-color: var(--border-strong); background: var(--mud-palette-surface); }
.mud-button-outlined.mud-button-outlined-default { color: var(--text); }
.mud-button-outlined:hover:not(.mud-disabled) { background: var(--brand-tint); }
.mud-button-outlined.mud-button-outlined-default:hover:not(.mud-disabled) { border-color: var(--brand-line); color: var(--brand-strong); }
.mud-button-outlined.mud-button-outlined-primary { border-color: var(--brand-line); color: var(--brand-strong); }
.mud-button-outlined.mud-button-outlined-primary:hover:not(.mud-disabled) { border-color: var(--brand); background: var(--brand-soft); }

.mud-button-text.mud-button-text-primary { color: var(--brand-strong); }
.mud-button-text:hover:not(.mud-disabled) { background: var(--brand-tint); }

.mud-icon-button { border-radius: 10px; transition: background-color .15s var(--ease), color .15s var(--ease); }
.mud-icon-button:hover:not(.mud-disabled) { background: var(--surface-3); }
.mud-button-root.mud-disabled, .mud-button-root:disabled { opacity: .55; box-shadow: none !important; transform: none !important; }

/* رابط «عرض الكل» في رؤوس البطاقات */
.rc-link-more {
    display: inline-flex; align-items: center; gap: 2px; min-height: 34px; padding: 4px 10px; border-radius: 999px;
    font-size: .8rem; font-weight: 600; color: var(--brand-strong); text-decoration: none; white-space: nowrap;
    transition: background-color .15s var(--ease);
}
.rc-link-more:hover { background: var(--brand-soft); }

/* ---------- 12. الحقول ---------- */
.mud-input-outlined .mud-input-outlined-border { border-radius: var(--radius-sm); border-color: var(--border-strong); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.mud-input-outlined:hover:not(.mud-disabled) .mud-input-outlined-border { border-color: var(--border-hover); }
.mud-input-outlined.mud-input-focused .mud-input-outlined-border { border-color: var(--brand); border-width: 1px; box-shadow: var(--focus-ring); }
.mud-input.mud-input-focused .mud-input-label, .mud-input-label.mud-input-label-inputcontrol.mud-focused { color: var(--brand); }
.mud-input-control > .mud-input-control-input-container > .mud-input-label { color: var(--muted); }
.mud-input-helper-text { color: var(--muted); font-size: .76rem; line-height: 1.6; }
.mud-input-helper-text.mud-input-error { color: var(--bad) !important; }
.mud-input > input.mud-input-root::placeholder, .mud-input > textarea.mud-input-root::placeholder { color: var(--placeholder); opacity: 1; }
.mud-select .mud-select-input { cursor: pointer; }
.mud-switch-label-medium, .mud-checkbox .mud-typography, .mud-radio .mud-typography { font-size: .88rem; }

/* ---------- 13. الشارات ---------- */
.mud-chip { font-weight: 600; margin: 2px 3px; }
.mud-chip.mud-chip-size-small { border-radius: 999px; font-size: .76rem; height: 24px; padding: 0 10px; }
.mud-chip.mud-chip-size-medium { border-radius: 999px; font-size: .82rem; }

/* الشارة الممتلئة: نص داكن على لون فاتح (أوضح من الأبيض على الأخضر أو البرتقالي) */
.mud-chip-filled { background: var(--neutral-soft); color: var(--neutral); box-shadow: inset 0 0 0 1px var(--neutral-line); }
.mud-chip-filled.mud-chip-color-primary { background: var(--brand-soft); color: var(--brand-strong); box-shadow: inset 0 0 0 1px var(--brand-line); }
.mud-chip-filled.mud-chip-color-secondary { background: var(--brand-soft); color: var(--brand-strong); box-shadow: inset 0 0 0 1px var(--brand-line); }
.mud-chip-filled.mud-chip-color-tertiary { background: var(--teal-soft); color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal-line); }
.mud-chip-filled.mud-chip-color-success { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok-line); }
.mud-chip-filled.mud-chip-color-warning { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }
.mud-chip-filled.mud-chip-color-error { background: var(--bad-soft); color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad-line); }
.mud-chip-filled.mud-chip-color-info { background: var(--info-soft); color: var(--info); box-shadow: inset 0 0 0 1px var(--info-line); }
.mud-chip-filled.mud-chip-color-dark { background: #1f2937; color: #fff; box-shadow: none; }
.mud-chip-filled.mud-clickable:hover:not(.mud-disabled) { filter: brightness(.97); }
.mud-chip-filled .mud-chip-icon, .mud-chip-filled .mud-chip-close-button { color: inherit !important; opacity: .85; }
.mud-chip-outlined { border-color: var(--border-strong); color: var(--neutral); background: var(--mud-palette-surface); }
.mud-chip-text.mud-chip-color-primary, .mud-chip-text.mud-chip-color-secondary { background: var(--brand-soft); }
.mud-chip-text.mud-chip-color-success { background: var(--ok-soft); }
.mud-chip-text.mud-chip-color-warning { background: var(--warn-soft); }
.mud-chip-text.mud-chip-color-error { background: var(--bad-soft); }
.mud-chip-text.mud-chip-color-info { background: var(--info-soft); }

.w-badge {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .2rem .65rem; border-radius: 999px;
    font-size: .76rem; font-weight: 600; white-space: nowrap; line-height: 1.6;
}
.w-badge.bg-steel   { background: var(--neutral-soft); color: var(--neutral); }
.w-badge.bg-amber   { background: var(--warn-soft); color: var(--warn); }
.w-badge.bg-emerald { background: var(--ok-soft); color: var(--ok); }
.w-badge.bg-red     { background: var(--bad-soft); color: var(--bad); }
.w-badge.bg-blue    { background: var(--info-soft); color: var(--info); }
.w-badge.bg-brand   { background: var(--brand-soft); color: var(--brand-strong); }

/* شارة حالة تفتح شيئاً عند الضغط */
.rcms-badge-button { border: 0; cursor: pointer; font-family: inherit; margin-inline-start: .35rem; }
.rcms-badge-button:hover { filter: brightness(.95); }

/* أزرار الترشيح */
.w-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.w-chip {
    border: 1px solid var(--border-soft); background: var(--mud-palette-surface);
    border-radius: 999px; padding: .38rem .85rem;
    font-family: inherit; font-size: .8rem; font-weight: 600; color: var(--muted); cursor: pointer;
    transition: border-color .14s var(--ease), color .14s var(--ease), background-color .14s var(--ease);
}
.w-chip:hover { border-color: var(--brand); color: var(--brand-strong); }
.w-chip.active { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.w-chip-count { margin-inline-start: .35rem; font-weight: 700; color: inherit; }

/* شريط البحث والترشيح أعلى القوائم (على نمط بطاقة الترشيح في إنجاز) */
.rc-filterbar {
    padding: 10px 14px 12px; margin-bottom: 16px;
    background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: var(--radius-md);
}
.rc-filterbar .mud-input-control { margin-top: 0; }
.rc-filterbar .mud-input.mud-input-underline:before { border-bottom-color: var(--border-strong); }

/* ---------- 14. الحوارات والقوائم المنسدلة ---------- */
.mud-dialog { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.mud-dialog .mud-dialog-title { padding: 18px 22px 8px; font-weight: 700; }
.mud-dialog .mud-dialog-title .mud-typography-h6 { font-size: 1.06rem; font-weight: 700; }
.mud-dialog .mud-dialog-content { padding: 8px 22px 14px; }
.mud-dialog .mud-dialog-actions {
    padding: 12px 22px; gap: 8px;
    border-top: 1px solid var(--border-soft); background: var(--surface-2);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.mud-dialog .mud-dialog-actions > :not(:first-child) { margin-inline-start: 0; margin-left: 0; }
.mud-overlay.mud-overlay-dialog .mud-overlay-scrim, .mud-overlay-dialog .mud-overlay-scrim { background: rgba(15, 23, 42, .5); }

.mud-popover.mud-popover-open { border-radius: var(--radius-sm); border: 1px solid var(--border-soft); box-shadow: var(--shadow-md); }
.mud-popover .mud-list { padding: 6px; }
.mud-popover .mud-list-item { border-radius: 8px; }
.mud-list-item { border-radius: var(--radius-sm); }
.mud-menu-item { font-size: .88rem; }
.mud-tooltip { font-size: .76rem; font-weight: 500; border-radius: 8px; padding: 5px 9px; line-height: 1.6; }
.mud-drawer.mud-drawer-temporary { box-shadow: var(--shadow-lg); }
.mud-snackbar { border-radius: var(--radius-sm); font-weight: 500; }

/* ---------- 15. التبويبات والألواح القابلة للطي ---------- */
.mud-tabs .mud-tabs-tabbar { background: transparent; border-radius: 0; border-bottom: 1px solid var(--border-soft); }
.mud-tab { text-transform: none; font-weight: 600; font-size: .88rem; min-width: 0; min-height: 44px; padding: 8px 16px; color: var(--muted); white-space: nowrap; }
.mud-tab:hover { color: var(--text); }
.mud-tab.mud-tab-active { color: var(--brand-strong); }
.mud-tab .mud-icon-root { font-size: 1.15rem; }
.mud-tab-slider.mud-tab-slider-horizontal { height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); }

/* تبويبات على هيئة أزرار داخل شريط أبيض (صفحة الإطار) */
.surface-tabs > .mud-tabs-tabbar {
    background: var(--mud-palette-surface); border: 1px solid var(--border-soft);
    border-radius: var(--radius-md); padding: 5px; box-shadow: var(--shadow-sm);
}
.surface-tabs .mud-tab { border-radius: var(--radius-sm); min-height: 38px; }
.surface-tabs .mud-tab.mud-tab-active { background: var(--brand-soft); color: var(--brand-strong); }

.mud-expansion-panels { border-radius: var(--radius-md); }
.mud-expand-panel { border-color: var(--border-soft); }
.mud-expand-panel .mud-expand-panel-header { font-weight: 600; font-size: .92rem; }
.app-main .mud-expansion-panels.mud-elevation-0 > .mud-expand-panel,
.app-main .mud-expand-panel.mud-elevation-0 { border: 1px solid var(--border-soft); }

.mud-progress-linear { border-radius: 999px; overflow: hidden; }
.mud-progress-linear.mud-progress-linear-medium { height: 6px; }
.mud-divider { border-color: var(--border-soft); }

/* ---------- 16. التنبيهات والحالات الفارغة ---------- */
.mud-alert { border-radius: var(--radius-sm); border: 1px solid transparent; line-height: 1.7; }
.mud-alert-message { font-size: .88rem; }
.mud-alert-text-success { background: var(--ok-soft); color: var(--ok-ink); border-color: var(--ok-line); }
.mud-alert-text-warning { background: var(--warn-soft); color: var(--warn-ink); border-color: var(--warn-line); }
.mud-alert-text-error   { background: var(--bad-soft); color: var(--bad-ink); border-color: var(--bad-line); }
.mud-alert-text-info    { background: var(--info-soft); color: var(--info-ink); border-color: var(--info-line); }
.mud-alert-text-normal  { background: var(--neutral-soft); color: var(--neutral); border-color: var(--neutral-line); }

.w-alert {
    border-radius: var(--radius-sm); padding: .8rem 1rem; font-size: .88rem; line-height: 1.7;
    margin-bottom: 1.1rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    border: 1px solid transparent;
}
.w-alert.success { background: var(--ok-soft); color: var(--ok-ink); border-color: var(--ok-line); }
.w-alert.danger  { background: var(--bad-soft); color: var(--bad-ink); border-color: var(--bad-line); }
.w-alert.info    { background: var(--info-soft); color: var(--info-ink); border-color: var(--info-line); }
.w-alert.warning { background: var(--warn-soft); color: var(--warn-ink); border-color: var(--warn-line); }
.w-alert .mud-button-root { color: inherit; }

.w-empty { text-align: center; padding: 2.6rem 1rem; color: var(--muted); }
.w-empty .w-empty-icon {
    width: 64px; height: 64px; margin: 0 auto .8rem; padding: 16px; border-radius: 50%;
    background: var(--surface-3); color: var(--empty-icon); font-size: 2rem; display: block; box-sizing: border-box;
}
.w-empty h3 { font-size: 1.02rem; font-weight: 700; margin: 0 0 .3rem; color: var(--text); }
.w-empty p { margin: 0 auto; font-size: .88rem; max-width: 46ch; line-height: 1.8; }

/* عنوان قسم صغير داخل بطاقة أو درج */
.w-section-title {
    display: flex; align-items: center; gap: .45rem;
    font-size: .8rem; font-weight: 700; color: var(--neutral);
    margin: 1.1rem 0 .5rem; padding-bottom: .35rem; border-bottom: 1px solid var(--border-soft);
}
.w-section-title .mud-icon-root { color: var(--brand); }
.eyebrow { display: inline-block; font-size: .76rem; font-weight: 700; color: var(--brand); }

/* ---------- 17. صفحة الدخول ---------- */
.login-layout {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
    background:
        radial-gradient(circle at 82% 8%, rgba(11, 122, 86, .42), transparent 46%),
        radial-gradient(circle at 8% 92%, rgba(0, 164, 106, .26), transparent 44%),
        #06231a;
}
.login-shell {
    width: 100%; max-width: 980px; display: grid; grid-template-columns: 1.05fr .95fr;
    background: var(--mud-palette-surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
}
.login-aside {
    background: linear-gradient(150deg, #063b2a 0%, #0a5f43 60%, #0e9f6e 150%);
    color: #f2fbf7; padding: 44px 38px;
    display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.login-aside::after {
    content: ""; position: absolute; inset-inline-start: -60px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%;
    background: radial-gradient(circle, rgba(120, 240, 190, .25), transparent 65%);
}
.login-aside h2 { font-weight: 700; font-size: 1.45rem; margin: 18px 0 8px; line-height: 1.6; }
.login-aside p { color: #d3efe3; margin: 0; line-height: 1.95; font-size: .92rem; }
.login-points { margin-top: 26px; display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 1; }
.login-point { display: flex; align-items: center; gap: 10px; color: #e9f8f1; font-size: .9rem; }
.login-point .mud-icon-root { color: #8ff0c6; }
.login-form { padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.login-form__head { text-align: center; margin-bottom: 26px; }
.login-form__head .rcms-brand { justify-content: center; }
.login-form__note { margin-top: 18px; text-align: center; font-size: .78rem; color: var(--muted); line-height: 1.8; }
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.login-input {
    width: 100%; padding: 11px 14px; font-size: 1rem; font-family: inherit;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--mud-palette-surface); color: var(--text); outline: none;
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.login-input:hover { border-color: #9ca3af; }
.login-input:focus { border-color: var(--brand); box-shadow: var(--focus-ring); }

/* ---------- 18. شريط الخطأ العام ---------- */
#blazor-error-ui {
    background: var(--warn-soft); color: var(--warn-ink); border-top: 1px solid var(--warn-line);
    bottom: 0; inset-inline: 0; display: none; position: fixed; z-index: 4000;
    padding: .7rem 1.25rem; font-size: .88rem; box-shadow: 0 -4px 14px rgba(0, 0, 0, .08);
}
#blazor-error-ui .reload { color: var(--brand-strong); font-weight: 700; margin-inline-start: .5rem; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; inset-inline-end: .9rem; top: .55rem; font-size: 1.1rem; }

/* ---------- 19. رفع الملفات (Shared/DocumentUploader.razor) ---------- */
.rcms-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 150px;
    padding: 1.25rem;
    border: 2px dashed var(--mud-palette-lines-default);
    border-radius: 12px;
    background: var(--mud-palette-background-gray);
    color: var(--mud-palette-text-secondary);
    text-align: center;
    transition: border-color .15s ease, background-color .15s ease;
}
.rcms-dropzone:hover,
.rcms-dropzone:focus-within,
.rcms-dropzone.is-dragging {
    border-color: var(--mud-palette-primary);
    background: var(--brand-soft, rgba(16, 185, 129, .08));
}
.rcms-dropzone.is-disabled { opacity: .55; pointer-events: none; }
/* The real file input covers the whole zone, so both click and drop land on it natively. */
.rcms-dropzone__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.rcms-dropzone__title { font-weight: 600; color: var(--mud-palette-text-primary); }
.rcms-dropzone__hint { font-size: .78rem; }

.rcms-upload-list {
    margin-top: .75rem;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
}
.rcms-upload-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .45rem .7rem;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}
.rcms-upload-row:last-child { border-bottom: 0; }
.rcms-upload-row__main { flex: 1; min-width: 0; }
.rcms-upload-row__name { font-size: .88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rcms-upload-row__meta { font-size: .76rem; color: var(--mud-palette-text-secondary); }
.rcms-upload-row__icon.is-ok { color: var(--ok); }
.rcms-upload-row__icon.is-warn { color: var(--warn); }
.rcms-upload-row__icon.is-bad { color: var(--bad); }
.rcms-upload-row__icon.is-idle { color: var(--mud-palette-text-secondary); }

/* ---------- 20. لوحة فحص المستندات ---------- */
.rcms-verify__head { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-start; justify-content: space-between; margin-bottom: .75rem; }
.rcms-verify__title { font-weight: 600; color: var(--mud-palette-text-primary); line-height: 1.6; }
.rcms-verify__chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.rcms-verify__gaps { margin: 0; padding-inline-start: 1.1rem; }
.rcms-verify__gaps li { margin: .15rem 0; }
.rcms-verify__level { margin-top: 1rem; }
.rcms-verify__level.is-future { opacity: .72; }
.rcms-verify__level-title {
    font-size: .82rem; font-weight: 700; color: var(--mud-palette-text-secondary);
    border-bottom: 1px solid var(--mud-palette-lines-default); padding-bottom: .3rem; margin-bottom: .6rem;
}
.rcms-verify__doc {
    border: 1px solid var(--mud-palette-lines-default); border-radius: var(--radius-sm);
    background: var(--mud-palette-surface); padding: .7rem .85rem; margin-bottom: .6rem;
}
.rcms-verify__doc-head { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.rcms-verify__doc-name { font-weight: 600; color: var(--mud-palette-text-primary); }
.rcms-verify__spacer { flex: 1 1 auto; }
.rcms-verify__conditions { font-size: .8rem; color: var(--mud-palette-text-secondary); margin-top: .35rem; }
.rcms-verify__empty { font-size: .82rem; color: var(--mud-palette-text-secondary); margin-top: .5rem; }

.rcms-vfile {
    border: 1px solid var(--mud-palette-lines-default); border-inline-start: 4px solid var(--empty-icon);
    border-radius: var(--radius-sm); background: var(--surface-2); padding: .55rem .7rem; margin-top: .55rem;
}
.rcms-vfile--passed { border-inline-start-color: var(--ok); }
.rcms-vfile--review { border-inline-start-color: var(--warn); }
.rcms-vfile--failed { border-inline-start-color: var(--bad); }
.rcms-vfile__head { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.rcms-vfile__name { font-weight: 600; color: var(--mud-palette-primary); text-decoration: none; word-break: break-word; }
.rcms-vfile__name:hover { text-decoration: underline; }
.rcms-vfile__meta { font-size: .76rem; color: var(--mud-palette-text-secondary); }
.rcms-vfile__note { font-size: .8rem; color: var(--warn); margin-top: .35rem; }
.rcms-vfile__problems { margin: .4rem 0 0; padding-inline-start: 1.1rem; font-size: .82rem; color: var(--bad); }

.rcms-vitem { display: flex; gap: .5rem; align-items: flex-start; padding: .4rem 0; border-top: 1px dashed var(--mud-palette-lines-default); }
.rcms-vitem:first-child { border-top: 0; }
.rcms-vfile__items { margin-top: .45rem; }
.rcms-vitem__body { flex: 1 1 auto; min-width: 0; }
.rcms-vitem__text { font-size: .88rem; color: var(--mud-palette-text-primary); }
.rcms-vitem__optional { font-size: .72rem; color: var(--mud-palette-text-secondary); margin-inline-start: .35rem; }
.rcms-vitem__snippet {
    font-size: .8rem; color: var(--mud-palette-text-secondary); background: var(--mud-palette-surface);
    border-inline-start: 3px solid var(--brand-soft); padding: .2rem .5rem; margin-top: .25rem; border-radius: 4px;
}
.rcms-vitem__note { font-size: .78rem; color: var(--mud-palette-text-secondary); margin-top: .2rem; }
.rcms-vitem__actions { display: flex; flex-shrink: 0; }
.rcms-vitem__advice {
    display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; margin-top: .35rem; padding: .35rem .55rem;
    border-radius: var(--radius-sm); background: var(--info-soft); border: 1px dashed var(--info-line); font-size: .8rem;
}
.rcms-vitem__advice-label { display: inline-flex; align-items: center; gap: .3rem; color: var(--info-ink); }
.rcms-vitem__advice-quote { color: var(--text); font-style: normal; }

.rcms-vapproval {
    display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-start; margin-top: .55rem; padding: .5rem .6rem;
    border-radius: var(--radius-sm); background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-lines-default);
}
.rcms-vapproval__body { flex: 1 1 16rem; min-width: 0; font-size: .86rem; }
.rcms-vapproval__actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.rcms-vapproval__code input { font-family: Consolas, 'Courier New', monospace; font-weight: 700; letter-spacing: .04em; direction: ltr; unicode-bidi: isolate; }

/* ---------- 21. شهادة الاعتماد ---------- */
.rcms-certificate {
    max-width: 760px; margin: 0 auto; background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--radius); padding: 2rem 2.2rem; box-shadow: var(--shadow-sm);
}
.rcms-certificate__title { font-size: 1.35rem; font-weight: 700; text-align: center; color: var(--brand-strong); margin: .4rem 0 1.2rem; }
.rcms-certificate__state { text-align: center; margin-bottom: 1.2rem; }
.rcms-certificate__statement {
    border-inline-start: 4px solid var(--brand); background: var(--brand-soft); padding: .8rem 1rem; border-radius: var(--radius-sm);
    margin: 1rem 0; line-height: 1.9; white-space: pre-wrap;
}
.rcms-certificate dl { display: grid; grid-template-columns: 11rem 1fr; gap: .45rem .8rem; margin: 0; }
.rcms-certificate dt { color: var(--mud-palette-text-secondary); font-size: .86rem; }
.rcms-certificate dd { margin: 0; font-weight: 600; word-break: break-word; }
.rcms-certificate__hash { font-family: Consolas, 'Courier New', monospace; font-size: .78rem; font-weight: 400; direction: ltr; unicode-bidi: isolate; }
.rcms-certificate__actions { display: flex; justify-content: center; gap: .5rem; margin-top: 1.2rem; }
.rcms-certificate__foot { margin-top: 1.4rem; font-size: .78rem; color: var(--mud-palette-text-secondary); text-align: center; }
@media (max-width: 600px) { .rcms-certificate dl { grid-template-columns: 1fr; } .rcms-certificate { padding: 1.2rem; } }

/* ---------- 22. محرّر بنود الفحص ---------- */
.rcms-check-row { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: .5rem; align-items: center; margin-bottom: .5rem; }
@media (max-width: 760px) { .rcms-check-row { grid-template-columns: 1fr; } }


/* ---------- 23. نتيجة دورة القياس ---------- */
.rcms-score__head { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; }
.rcms-score__figure { font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--brand-strong); }
.rcms-score__figure span { font-size: 1.2rem; font-weight: 600; margin-inline-start: .15rem; }
.rcms-score__label { font-size: .8rem; color: var(--mud-palette-text-secondary); margin-top: .3rem; }
.rcms-score__facts { display: flex; flex-wrap: wrap; gap: .4rem; flex: 1 1 18rem; }
.rcms-score__band {
    display: inline-flex; align-items: center; padding: .2rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 700;
    background: var(--brand); color: var(--on-brand);
}
.rcms-score__domains { margin-top: 1.1rem; display: grid; gap: .45rem; }
.rcms-score__domain { display: grid; grid-template-columns: minmax(8rem, 16rem) 1fr 3.4rem 3rem; gap: .6rem; align-items: center; font-size: .84rem; }
.rcms-score__domain-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcms-score__bar { height: .55rem; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.rcms-score__bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-bright), var(--brand)); }
.rcms-score__domain-value { font-weight: 700; text-align: end; }
.rcms-score__domain-meta { color: var(--mud-palette-text-secondary); font-size: .76rem; text-align: end; }
.rcms-score__how { margin-top: 1rem; font-size: .8rem; color: var(--mud-palette-text-secondary); line-height: 1.7; }
.rcms-score__how a { color: var(--mud-palette-primary); margin-inline-start: .4rem; }
@media (max-width: 600px) { .rcms-score__domain { grid-template-columns: 1fr 3.4rem; } .rcms-score__bar { grid-column: 1 / -1; order: 3; } .rcms-score__domain-meta { display: none; } }

/* ---------- 24. محرّر الأوزان ---------- */
.rcms-weight-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; }
.rcms-weight-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-top: 1px dashed var(--mud-palette-lines-default); font-size: .86rem; }
.rcms-weight-input { max-width: 8rem; flex: 0 0 8rem; }
.rcms-header-select { max-width: 300px; min-width: 220px; }

/* ---------- 25. مكتبة الوثائق ---------- */
.doc-card {
    border-radius: var(--radius-md); border-color: var(--border-soft);
    transition: box-shadow .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
    height: 100%;
}
.doc-card:hover { box-shadow: var(--shadow-md); border-color: var(--brand-line); transform: translateY(-1px); }
.doc-card__icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); flex-shrink: 0; }
.doc-card__icon .mud-icon-root { font-size: 1.25rem; }
.doc-viewer__image { text-align: center; background: var(--surface-3); border-radius: 12px; padding: 12px; max-height: 70vh; overflow: auto; }
.doc-viewer__image img { max-width: 100%; height: auto; border-radius: 8px; }
.doc-viewer__frame { width: 100%; height: 70vh; border: 1px solid var(--border-soft); border-radius: 12px; }
.doc-drawer__eyebrow { color: var(--brand); font-size: .76rem; font-weight: 700; }
.doc-upload-target { border-style: dashed !important; border-width: 2px !important; border-color: var(--mud-palette-lines-default) !important; }
.doc-upload-target.has-file { border-color: var(--mud-palette-primary) !important; }

/* ---------- 25ب. لوحات المعلومات (بطاقات، مؤشرات، ترحيب، إجراءات سريعة، رسوم) ---------- */

/* شبكة اللوحة: أعمدة تتكيّف مع العرض */
.rc-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.rc-grid--kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rc-grid--auto { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.rc-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rc-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rc-grid--wide-left { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.rc-grid--wide-right { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.rc-grid > * { min-width: 0; }

/* بطاقة اللوحة */
.rc-panel {
    background: var(--mud-palette-surface); border: 1px solid var(--border-soft); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); display: flex; flex-direction: column; min-width: 0;
}
.rc-panel__head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border-soft); }
.rc-panel__icon {
    width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
    background: var(--brand-soft); color: var(--brand-strong);
}
.rc-panel__titles { min-width: 0; flex: 1 1 auto; }
.rc-panel__title { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.5; color: var(--text-strong); }
.rc-panel__sub { margin: 0; font-size: .78rem; color: var(--muted); line-height: 1.6; }
.rc-panel__actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
.rc-panel__body { padding: 16px 18px 18px; flex: 1 1 auto; min-width: 0; }
.rc-panel__body.is-flush { padding: 0; }
.rc-panel__body.is-flush > .mud-table { border: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* بطاقة المؤشر (StatCard) */
.rc-kpi {
    --tone: var(--brand-strong); --tone-soft: var(--brand-soft);
    position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
    height: 100%; padding: 16px 18px; overflow: hidden; text-decoration: none; color: inherit;
    background: var(--mud-palette-surface); border: 1px solid var(--border-soft); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.rc-kpi::before { content: ""; position: absolute; inset-block: 14px; inset-inline-start: 0; width: 4px; border-radius: 0 4px 4px 0; background: var(--tone); opacity: .85; }
.rc-kpi--link:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--brand-line); }
.rc-kpi__text { display: flex; flex-direction: column; min-width: 0; }
.rc-kpi__label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.rc-kpi__value { font-size: 1.7rem; font-weight: 800; line-height: 1.25; color: var(--text-strong); margin-top: 2px; overflow-wrap: anywhere; }
.rc-kpi__caption { font-size: .74rem; color: var(--muted); margin-top: 2px; }
.rc-kpi__icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; background: var(--tone-soft); color: var(--tone); }
.rc-kpi__icon .mud-icon-root { font-size: 1.45rem; }
.rc-kpi--primary { --tone: var(--brand-strong); --tone-soft: var(--brand-soft); }
.rc-kpi--success { --tone: var(--ok); --tone-soft: var(--ok-soft); }
.rc-kpi--info    { --tone: var(--info); --tone-soft: var(--info-soft); }
.rc-kpi--warning { --tone: var(--warn); --tone-soft: var(--warn-soft); }
.rc-kpi--danger  { --tone: var(--bad); --tone-soft: var(--bad-soft); }
.rc-kpi--violet  { --tone: var(--violet); --tone-soft: var(--violet-soft); }
.rc-kpi--neutral { --tone: var(--neutral); --tone-soft: var(--neutral-soft); }

/* الترحيب (مستوحى من Workflow وإنجاز): يبقى أخضر داكناً في الوضعين */
.rc-hero {
    position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 26px 30px; margin-bottom: 18px; border-radius: var(--radius-lg); color: #ffffff;
    background: linear-gradient(120deg, #06281c 0%, #0b3d2b 45%, #11704f 100%);
    box-shadow: var(--shadow-md);
}
.rc-hero::after {
    content: ""; position: absolute; inset-inline-end: -70px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
    background: radial-gradient(circle, rgba(52, 211, 153, .28), transparent 62%); pointer-events: none;
}
.rc-hero__pattern { position: absolute; inset: 0; opacity: .12; pointer-events: none;
    background-image: radial-gradient(circle at 20% 20%, #ffffff 0 1px, transparent 1.6px); background-size: 22px 22px; }
.rc-hero__copy { position: relative; z-index: 1; min-width: 0; }
.rc-hero__eyebrow { display: inline-block; font-size: .78rem; font-weight: 600; color: #a7f3d0; margin-bottom: 4px; }
.rc-hero__title { margin: 0 0 6px; font-size: 1.55rem; font-weight: 800; line-height: 1.45; color: #ffffff; }
.rc-hero__badge { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; margin-inline-start: 8px; padding: 2px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; color: #04543b; background: #ffffff; }
.rc-hero__badge::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--badge, #0e9f6e); box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.rc-hero__sub { margin: 0; max-width: 62ch; color: #d1fae5; font-size: .9rem; line-height: 1.8; }
.rc-hero__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.rc-hero__aside { position: relative; z-index: 1; flex-shrink: 0; }
.rc-hero .mud-button-filled.mud-button-filled-primary { background: #ffffff; color: #04543b; box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .6) !important; }
.rc-hero .mud-button-filled.mud-button-filled-primary:hover { background: #ecfdf5; }
.rc-hero .mud-button-outlined { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .45); color: #ffffff; }
.rc-hero .mud-button-outlined:hover { background: rgba(255, 255, 255, .16); color: #ffffff; }

/* الإجراءات السريعة (مستوحاة من إنجاز) */
.rc-quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.rc-quick {
    display: flex; align-items: center; gap: 12px; padding: 13px 14px; min-width: 0;
    background: var(--mud-palette-surface); border: 1px solid var(--border-soft); border-radius: 14px;
    color: var(--text); text-decoration: none; transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.rc-quick:hover { transform: translateY(-2px); border-color: var(--brand-line); box-shadow: var(--shadow-md); }
.rc-quick__icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; background: var(--brand-soft); color: var(--brand-strong); }
.rc-quick__text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.rc-quick__title { font-weight: 700; font-size: .88rem; }
.rc-quick__hint { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-quick__count { min-width: 26px; height: 22px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center;
    background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn-line); font-size: .74rem; font-weight: 700; }
.rc-quick__chevron { color: var(--muted); flex-shrink: 0; }

/* قائمة الترتيب */
.rc-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rc-rank__row { display: grid; grid-template-columns: 24px minmax(90px, 38%) minmax(60px, 1fr) auto; align-items: center; gap: 4px 12px; padding: 6px 6px; border-radius: 8px; }
.rc-rank--plain .rc-rank__row { grid-template-columns: minmax(90px, 38%) minmax(60px, 1fr) auto; }
.rc-rank__row:hover { background: var(--brand-tint); }
.rc-rank__n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .72rem; font-weight: 700; background: var(--brand-soft); color: var(--brand-strong); }
.rc-rank__label { font-size: .85rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
a.rc-rank__label:hover { color: var(--brand-strong); text-decoration: underline; }
.rc-rank__track { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.rc-rank__bar { display: block; height: 100%; border-radius: 999px; transition: width .4s var(--ease); }
.rc-rank__value { font-size: .85rem; font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; text-align: end; min-width: 3.5em; }
.rc-rank__hint { grid-column: 2 / -1; font-size: .72rem; color: var(--muted); margin-top: -4px; }
.rc-rank--plain .rc-rank__hint { grid-column: 1 / -1; }

/* الدائرة والمفتاح */
.rc-donut { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; }
.rc-donut__figure { position: relative; width: var(--donut-size); height: var(--donut-size); margin: 0; flex-shrink: 0; }
.rc-donut__figure svg { width: 100%; height: 100%; display: block; }
.rc-donut__track { fill: none; stroke: var(--surface-3); stroke-width: 12; }
.rc-donut__slice { fill: none; stroke-width: 12; transition: stroke-width .15s var(--ease); }
.rc-donut__slice:hover { stroke-width: 14; }
.rc-donut__center, .rc-ring__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.rc-donut__center strong { font-size: 1.6rem; font-weight: 800; line-height: 1.1; color: var(--text-strong); }
.rc-donut__center span { font-size: .72rem; color: var(--muted); max-width: 70%; line-height: 1.4; }
.rc-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; min-width: 180px; flex: 1 1 200px; }
.rc-legend li { display: grid; grid-template-columns: 12px 1fr auto 3.2em; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--row-line); font-size: .84rem; }
.rc-legend li:last-child { border-bottom: 0; }
.rc-legend i { width: 10px; height: 10px; border-radius: 3px; }
.rc-legend a { color: var(--text); text-decoration: none; }
.rc-legend a:hover { color: var(--brand-strong); text-decoration: underline; }
.rc-legend b { font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.rc-legend small { color: var(--muted); text-align: end; font-variant-numeric: tabular-nums; }
.rc-legend--row { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; min-width: 0; }
.rc-legend--row li { display: inline-flex; border: 0; padding: 0; gap: 6px; }
.rc-legend__line { width: 16px !important; height: 3px !important; border-radius: 2px !important; }

/* المقياس الدائري */
.rc-ring { position: relative; width: var(--ring-size); height: var(--ring-size); margin: 0; }
.rc-ring svg { width: 100%; height: 100%; display: block; }
.rc-ring__track { fill: none; stroke: var(--surface-3); stroke-width: 9; }
.rc-ring__value { fill: none; stroke-width: 9; stroke-linecap: round; }
.rc-ring__center strong { font-size: 1.45rem; font-weight: 800; color: var(--text-strong); line-height: 1.1; }
.rc-ring__center span { font-size: .7rem; color: var(--muted); max-width: 72%; line-height: 1.35; margin-top: 2px; }
.rc-ring--on-dark .rc-ring__track { stroke: rgba(255, 255, 255, .16); }
.rc-ring--on-dark .rc-ring__center strong { color: #ffffff; }
.rc-ring--on-dark .rc-ring__center span { color: #c9f2e0; }

/* الأعمدة والخط الزمني */
.rc-bars, .rc-line__frame { position: relative; padding-inline-start: 40px; }
.rc-bars { height: calc(var(--bars-height) + 34px); }
.rc-bars__grid { position: absolute; inset: 0 0 34px 40px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.rc-bars__grid span { position: relative; border-top: 1px dashed var(--viz-grid); height: 0; }
.rc-bars__grid span:last-child { border-top: 1px solid var(--border-strong); }
.rc-bars__grid em { position: absolute; left: -40px; top: -9px; width: 34px; text-align: right; font-style: normal; font-size: .68rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.rc-bars__plot { position: absolute; inset: 0 0 34px 40px; display: flex; align-items: flex-end; justify-content: space-around; gap: 6px; padding: 0 6px; }
.rc-bars__col { position: relative; flex: 1 1 0; max-width: 56px; height: 100%; display: flex; align-items: flex-end; justify-content: center; outline: none; }
.rc-bars__bar { width: 70%; min-width: 10px; border-radius: 4px 4px 0 0; transition: filter .15s var(--ease); }
.rc-bars__col:hover .rc-bars__bar, .rc-bars__col:focus-visible .rc-bars__bar { filter: brightness(1.12); }
.rc-bars__col:focus-visible { box-shadow: inset 0 0 0 2px var(--brand); border-radius: 6px; }
.rc-bars__labels { position: absolute; left: 40px; right: 0; bottom: 0; height: 30px; display: flex; justify-content: space-around; gap: 6px; padding: 0 6px; }
.rc-bars__labels span { flex: 1 1 0; max-width: 90px; font-size: .7rem; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-top: 6px; }

/* أعمدة كثيرة على شاشة ضيقة: التسميات عمودية حتى لا تُقصّ */
@media (max-width: 700px) {
    .rc-bars--dense { height: calc(var(--bars-height) + 60px); }
    .rc-bars--dense .rc-bars__grid, .rc-bars--dense .rc-bars__plot { bottom: 60px; }
    .rc-bars--dense .rc-bars__labels { height: 56px; gap: 2px; }
    .rc-bars--dense .rc-bars__labels span { writing-mode: vertical-rl; max-width: none; height: 52px; padding-top: 4px; text-align: end; }
}

.rc-line__frame { height: calc(var(--line-height) + 30px); }
.rc-line__frame .rc-bars__grid { bottom: 30px; }
.rc-line__plot { position: absolute; inset: 0 0 30px 40px; }
.rc-line__plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rc-line__path { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.rc-line__point { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; outline: none; cursor: default; }
.rc-line__point::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--pt); box-shadow: 0 0 0 2px var(--mud-palette-surface); transition: transform .12s var(--ease); }
.rc-line__point:hover::before, .rc-line__point:focus-visible::before { transform: scale(1.35); }
.rc-line__labels { position: absolute; left: 40px; right: 0; bottom: 0; height: 26px; }
.rc-line__labels span { position: absolute; transform: translateX(-50%); font-size: .7rem; color: var(--muted); white-space: nowrap; padding-top: 6px; }

/* تلميح القيمة عند المرور أو التركيز */
.rc-tip {
    position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 5;
    padding: 5px 9px; border-radius: 8px; background: #1f2937; color: #ffffff; font-size: .74rem; white-space: nowrap;
    box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transition: opacity .12s var(--ease); pointer-events: none;
}
.rc-tip b { font-weight: 700; margin-inline-end: 4px; }
.rc-tip--left { left: auto; right: 50%; transform: none; }
.rc-bars__col .rc-tip { bottom: auto; top: -34px; }
.rc-bars__col:hover .rc-tip, .rc-bars__col:focus-visible .rc-tip, .rc-line__point:hover .rc-tip, .rc-line__point:focus-visible .rc-tip { opacity: 1; visibility: visible; }
html[data-theme="dark"] .rc-tip { background: #e3e8ef; color: #111827; }

/* شريط أرقام عامة تحت بطاقات المؤشرات */
.rc-facts { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rc-facts li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
    background: var(--mud-palette-surface); border: 1px solid var(--border-soft); font-size: .8rem; color: var(--muted); }
.rc-facts li .mud-icon-root { color: var(--brand); font-size: 1rem; }
.rc-facts b { color: var(--text-strong); font-weight: 700; font-variant-numeric: tabular-nums; }
.rc-facts small { color: var(--muted); }
.rc-facts__progress { gap: 10px; }

.rc-viz-empty { margin: 0; padding: 28px 8px; text-align: center; color: var(--muted); font-size: .86rem; }

/* قائمة عناصر مختصرة داخل بطاقة (طلبات، دورات) */
.rc-list { list-style: none; margin: 0; padding: 0; }
.rc-list__item { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--row-line); text-decoration: none; color: inherit; }
.rc-list__item:last-child { border-bottom: 0; }
a.rc-list__item:hover { background: var(--brand-tint); }
.rc-list__icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-3); color: var(--muted); }
.rc-list__main { flex: 1 1 auto; min-width: 0; }
.rc-list__title { font-weight: 600; font-size: .88rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-list__meta { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-list__side { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: .74rem; color: var(--muted); }
.rc-progress { width: 110px; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.rc-progress > span { display: block; height: 100%; border-radius: 999px; background: var(--brand); }

@media (max-width: 1200px) {
    .rc-grid--kpi, .rc-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rc-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
    .rc-grid--2, .rc-grid--3, .rc-grid--wide-left, .rc-grid--wide-right { grid-template-columns: minmax(0, 1fr); }
    .rc-hero { padding: 22px 20px; }
    .rc-hero__aside { display: none; }
}
@media (max-width: 600px) {
    .rc-grid--kpi, .rc-grid--auto { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .rc-quick-grid { grid-template-columns: minmax(0, 1fr); }
    .rc-kpi { padding: 12px 12px; }
    .rc-kpi__value { font-size: 1.3rem; }
    .rc-kpi__icon { width: 36px; height: 36px; border-radius: 10px; }
    .rc-kpi__icon .mud-icon-root { font-size: 1.15rem; }
    .rc-hero__title { font-size: 1.25rem; }
    .rc-hero__actions .mud-button-root { flex: 1 1 auto; }
    .rc-panel__head { padding: 12px 14px; flex-wrap: wrap; }
    .rc-panel__body { padding: 12px 14px 14px; }
    .rc-rank__row { grid-template-columns: 22px minmax(70px, 1fr) auto; }
    .rc-rank--plain .rc-rank__row { grid-template-columns: minmax(70px, 1fr) auto; }
    .rc-rank__track { grid-column: 2 / -1; grid-row: 2; }
    .rc-rank--plain .rc-rank__track { grid-column: 1 / -1; }
    .rc-list__item { padding: 10px 14px; }
    .rc-progress { width: 70px; }
}
@media print {
    .rc-hero { background: none !important; color: #000 !important; box-shadow: none; padding: 0; }
    .rc-hero__title, .rc-hero__sub { color: #000 !important; }
    .rc-hero__actions, .rc-quick-grid { display: none !important; }
    .rc-panel, .rc-kpi { box-shadow: none !important; break-inside: avoid; }
}

/* قيم سجل التدقيق: «الحقل القيمة» بدل نص JSON */
.rc-kv-list { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; max-width: 640px; }
.rc-kv { display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border-soft); font-size: .76rem; line-height: 1.6; }
.rc-kv b { font-weight: 600; color: var(--muted); direction: ltr; unicode-bidi: isolate; }
.rc-kv span { color: var(--text); overflow-wrap: anywhere; unicode-bidi: isolate; }

/* إدارة القوائم والصفحات */
.rc-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 16px; padding: 10px 14px; border-radius: var(--radius-md);
    background: var(--info-soft); border: 1px solid var(--info-line); color: var(--info-ink); font-size: .84rem; line-height: 1.8; }
.rc-note .mud-icon-root { margin-top: 4px; flex-shrink: 0; }
.rc-chip { display: inline-flex; align-items: center; padding: 0 8px; height: 20px; border-radius: 999px; font-size: .7rem; font-weight: 600;
    background: var(--neutral-soft); color: var(--neutral); box-shadow: inset 0 0 0 1px var(--neutral-line); white-space: nowrap; }
.rc-chip--bad { background: var(--bad-soft); color: var(--bad-ink); box-shadow: inset 0 0 0 1px var(--bad-line); }
.rc-chip--warn { background: var(--warn-soft); color: var(--warn-ink); box-shadow: inset 0 0 0 1px var(--warn-line); }
.rc-chip--info { background: var(--info-soft); color: var(--info-ink); box-shadow: inset 0 0 0 1px var(--info-line); }
.rc-chip--violet { background: var(--violet-soft); color: var(--violet); box-shadow: inset 0 0 0 1px var(--violet-soft); }
.rc-field-label { margin: 4px 0 6px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.rc-ltr-input input { direction: ltr; text-align: left; }

.rc-mm { align-items: start; }
.rc-mm__modules { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rc-mm__module.is-off .rc-panel__head { opacity: .6; }
.rc-mm__items { list-style: none; margin: 0; padding: 0; }
.rc-mm__item { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--row-line); flex-wrap: wrap; }
.rc-mm__item:hover { background: var(--brand-tint); }
.rc-mm__item.is-dim .rc-mm__icon, .rc-mm__item.is-dim .rc-mm__text { opacity: .55; }
.rc-mm__icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
    background: var(--surface-2); color: var(--brand-strong); border: 1px solid var(--border-soft); }
.rc-mm__text { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rc-mm__name { font-weight: 600; color: var(--text-strong); font-size: .9rem; }
.rc-mm__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rc-mm__meta code { font-size: .74rem; color: var(--muted); background: var(--surface-2); padding: 0 6px; border-radius: 5px; }
.rc-mm__actions { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.rc-mm__move { width: 170px; flex: 0 0 auto; margin-inline-end: 6px; }
.rc-mm__move .mud-input-control { margin: 0; }
.rc-mm__add { padding: 6px 12px 8px; background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

.rc-mm__preview { position: sticky; top: 84px; min-width: 0; }
.rc-mm__sidebar { display: flex; flex-direction: column; gap: 10px; max-height: 70vh; overflow: auto; padding: 4px; border-radius: var(--radius-md);
    background: var(--surface-2); border: 1px solid var(--border-soft); }
.rc-mm__pgroup { display: flex; flex-direction: column; gap: 2px; padding: 6px; }
.rc-mm__phead { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .84rem; color: var(--text-strong); padding: 4px 6px; }
.rc-mm__phead .mud-icon-root { color: var(--brand-strong); }
.rc-mm__plink { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--nav-text); padding: 5px 6px 5px 6px; margin-inline-start: 14px;
    border-inline-start: 1px dashed var(--boundary); padding-inline-start: 10px; }
.rc-mm__plink .mud-icon-root { color: var(--muted); font-size: 1rem; }

.rc-iconpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; max-height: 210px; overflow: auto; padding: 8px;
    border: 1px solid var(--border-soft); border-radius: var(--radius-md); background: var(--surface-2); }
.rc-iconpick__btn { height: 38px; border: 1px solid transparent; border-radius: 10px; background: var(--mud-palette-surface); color: var(--muted);
    display: grid; place-items: center; cursor: pointer; transition: background-color .12s var(--ease), color .12s var(--ease), border-color .12s var(--ease); }
.rc-iconpick__btn:hover { color: var(--brand-strong); border-color: var(--brand-line); }
.rc-iconpick__btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.rc-iconpick__btn.is-selected { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

@media (max-width: 960px) {
    .rc-mm__preview { position: static; }
}
@media (max-width: 600px) {
    .rc-mm__item { padding: 10px 12px; }
    .rc-mm__actions { width: 100%; justify-content: flex-start; }
    .rc-mm__move { width: 100%; margin: 0 0 4px; }
}

/* ---------- 26. أدوات صغيرة ---------- */
.text-muted { color: var(--muted) !important; }
.text-center { text-align: center !important; }
.text-success { color: var(--ok) !important; }
.text-warning { color: var(--warn) !important; }
.text-danger, .text-error { color: var(--bad) !important; }
.font-weight-medium { font-weight: 500 !important; }
.w-100 { width: 100% !important; }

.u-brand { color: var(--brand-strong) !important; }
.u-break { word-break: break-all; }
.u-center { text-align: center !important; }
.u-flex-1 { flex: 1; }
.u-fs-90 { font-size: .9rem; }
.u-fw-600 { font-weight: 600 !important; }
.u-fw-700 { font-weight: 700 !important; }
.u-fw-800 { font-weight: 800 !important; }
.u-h-100 { height: 100%; }
.u-maxw-260 { max-width: 260px; }
.u-maxw-300 { max-width: 300px; }
.u-minw-0 { min-width: 0px; }
.u-minw-160 { min-width: 160px; }
.u-nowrap { white-space: nowrap; }
.u-prewrap { white-space: pre-line; }
.u-plain { text-decoration: none; }
.u-w-50 { width: 50px; }
.u-w-60 { width: 60px; }
.u-w-80 { width: 80px; }
.u-w-90 { width: 90px; }
.u-w-100 { width: 100px; }
.u-w-110 { width: 110px; }
.u-w-120 { width: 120px; }
.u-w-150 { width: 150px; }
.u-w-160 { width: 160px; }
.u-w-170 { width: 170px; }
.u-wrap { white-space: normal; }
.u-ltr { direction: ltr; unicode-bidi: isolate; }
.u-flat { border: 0 !important; box-shadow: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- 27. الشاشات المتوسطة والصغيرة ---------- */
@media (max-width: 1100px) {
    .appbar-user__text { display: none; }
    .appbar-user { padding-inline-end: 6px; }
}

@media (max-width: 960px) {
    .appbar-crumbs .mud-breadcrumb-item:not(:last-child), .appbar-crumbs .mud-breadcrumb-separator { display: none; }
    .login-shell { grid-template-columns: 1fr; max-width: 460px; }
    .login-aside { display: none; }
    .rcms-header-select { max-width: none; min-width: 0; width: 100%; }
}

@media (max-width: 600px) {
    /* الشبكة (MudGrid) تمتدّ 24 بكسل خارج حاويتها، فلا يقلّ الهامش الجانبي الكلّي عن ذلك وإلا ظهر تمرير أفقي */
    .mud-main-content.app-main { padding-inline: 8px; padding-top: calc(var(--mud-appbar-height, 56px) + 14px); }
    .app-footer { margin-inline: -8px; }
    .app-bar .mud-toolbar { padding-inline: 8px; gap: 2px; }
    .appbar-crumbs { display: none; }
    .appbar-search { flex: 1 1 auto; min-width: 0; margin-inline: 4px; }
    .appbar-user__caret { display: none; }

    .page-header { margin-bottom: 16px; }
    .page-header__main { flex-basis: 100%; align-items: flex-start; }
    .page-header__icon { width: 40px; height: 40px; border-radius: 11px; }
    .page-header__icon .mud-icon-root { font-size: 1.3rem; }
    .page-header__title.mud-typography-h4 { font-size: 1.2rem; }
    .page-header__actions { width: 100%; }
    .page-header__actions > .mud-button-root { flex: 1 1 auto; }

    .mud-card-header { padding: 14px 14px 4px; flex-wrap: wrap; gap: 6px; }
    .mud-card-content { padding: 10px 14px 14px; }

    .mud-dialog { margin: 10px !important; max-height: calc(100% - 20px) !important; width: calc(100% - 20px); }
    .mud-dialog .mud-dialog-title { padding: 14px 16px 6px; }
    .mud-dialog .mud-dialog-content { padding: 6px 16px 12px; }
    .mud-dialog .mud-dialog-actions { padding: 10px 16px; flex-wrap: wrap; }
    .mud-dialog .mud-dialog-actions > .mud-button-root { flex: 1 1 auto; }

    .mud-tabs .mud-tab { padding: 8px 12px; font-size: .84rem; }
    .login-form { padding: 30px 22px; }
    .w-empty { padding: 2rem .75rem; }

    /* أهداف اللمس: لا يقلّ الزر الأيقوني عن 36 بكسل */
    .mud-icon-button.mud-icon-button-size-small { min-width: 36px; min-height: 36px; }
}

/* ---------- 28. تقليل الحركة لمن يطلبه من إعدادات جهازه ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .doc-card:hover, .rc-kpi--link:hover, .rc-quick:hover, .mud-button-root:hover { transform: none; }
}

/* ---------- 29. الطباعة ---------- */
@media print {
    @page { margin: 14mm 12mm; }
    html, body { background: #fff !important; }
    .no-print, .mud-appbar, .mud-drawer, .mud-drawer-overlay, .app-footer, .skip-link, .mud-snackbar-location,
    .page-header__actions, .mud-table-pagination, .mud-tabs-tabbar, #blazor-error-ui { display: none !important; }
    .mud-main-content, .mud-main-content.app-main { padding: 0 !important; margin: 0 !important; background: #fff !important; min-height: 0; }
    .mud-container { max-width: none !important; padding: 0 !important; }
    .mud-card, .mud-paper, .mud-table, .rc-kpi, .rc-panel { box-shadow: none !important; break-inside: avoid; }
    .mud-table-container { overflow: visible !important; }
    .mud-table-row:hover { background: transparent !important; }
    .rcms-certificate { border: 0; box-shadow: none; max-width: none; }
    a[href] { text-decoration: none; color: inherit; }
}

/* ── Framework editor («إدارة الإطار») ── */
.rc-fwedit__bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--surface); margin-bottom: 14px; }
.rc-fwedit__summary { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: .875rem; }
.rc-fwedit__summary b { color: var(--text-strong, var(--text)); }
.rc-fwedit__warn, .rc-fwedit__warn b { color: #b45309 !important; }
.rc-fwedit__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-fwedit__grid { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 14px; align-items: start; }
.rc-fwedit__domains { border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--surface); padding: 6px; position: sticky; top: 76px; max-height: calc(100vh - 100px); overflow: auto; }
.rc-fwedit__domain { display: flex; align-items: center; border-radius: var(--radius-sm); }
.rc-fwedit__domain:hover { background: var(--surface-2); }
.rc-fwedit__domain.is-active { background: var(--surface-3); box-shadow: inset -3px 0 0 var(--brand, #1f4e79); }
.rc-fwedit__domain-main { flex: 1; min-width: 0; text-align: start; background: none; border: 0; padding: 8px; cursor: pointer; color: inherit; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; font: inherit; }
.rc-fwedit__domain-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-fwedit__domain-main .rc-fwedit__meta { grid-column: 2; }
.rc-fwedit__tools { display: flex; align-items: center; gap: 2px; flex-shrink: 0; flex-wrap: wrap; }
.rc-fwedit__code { font-family: ui-monospace, Consolas, monospace; font-size: .78rem; direction: ltr; unicode-bidi: isolate; background: var(--surface-3); border: 1px solid var(--border-soft); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.rc-fwedit__spec { font-family: ui-monospace, Consolas, monospace; font-size: .74rem; direction: ltr; unicode-bidi: isolate; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: 6px; padding: 0 5px; }
.rc-fwedit__meta { color: var(--muted); font-size: .78rem; }
.rc-fwedit__main { min-width: 0; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--surface); padding: 14px; }
.rc-fwedit__head { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 8px; border-bottom: 1px solid var(--border-soft); }
.rc-fwedit__req { border: 1px solid var(--border-soft); border-radius: var(--radius-sm); margin-bottom: 8px; background: var(--surface); }
.rc-fwedit__req.is-open { border-color: var(--border-strong); }
.rc-fwedit__req.is-off { opacity: .7; }
.rc-fwedit__req-row { display: flex; align-items: flex-start; gap: 8px; padding: 6px 8px; flex-wrap: wrap; }
.rc-fwedit__req-main { flex: 1 1 320px; min-width: 0; display: flex; gap: 8px; align-items: flex-start; background: none; border: 0; padding: 4px 0; cursor: pointer; text-align: start; color: inherit; font: inherit; }
.rc-fwedit__req-text { line-height: 1.6; }
.rc-fwedit__levels { padding: 4px 12px 12px; border-top: 1px solid var(--border-soft); background: var(--surface-2); border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.rc-fwedit__level { padding: 8px 0; border-bottom: 1px dashed var(--border-soft); }
.rc-fwedit__level:last-child { border-bottom: 0; }
.rc-fwedit__level-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rc-fwedit__level-no { font-size: .78rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.rc-fwedit__doc { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; padding: 6px 8px; margin: 4px 0; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border-soft); }
.rc-fwedit__doc-text { min-width: 0; flex: 1; }
.rc-fwedit__doc-text a { color: inherit; }
.rc-extra { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0; font-size: .8rem; }
.rc-extra div { display: flex; gap: 4px; }
.rc-extra dt { color: var(--muted); }
.rc-extra dt::after { content: ":"; }
.rc-extra dd { margin: 0; font-weight: 600; }
@media (max-width: 900px) {
    .rc-fwedit__grid { grid-template-columns: minmax(0, 1fr); }
    .rc-fwedit__domains { position: static; max-height: 260px; }
}

/* ── Official cycle result («النتيجة الرسمية») ── */
.rc-official__num { max-width: 110px; }
.rc-official__diff { color: #b45309; font-size: .8rem; margin-inline-start: 4px; }
.rc-official__doc { font-size: .85rem; line-height: 1.5; margin-top: 2px; }
.rc-official__file { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.rc-official__save { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; position: sticky; bottom: 0; z-index: 2; margin-top: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); }
.rc-official__status--complete .mud-input { color: #047857; font-weight: 600; }
.rc-official__status--incomplete .mud-input { color: #b45309; font-weight: 600; }
.rc-official__status--notsubmitted .mud-input { color: #b91c1c; font-weight: 600; }

/* ── No access to a page ── */
.rc-noaccess { max-width: 620px; margin: 64px auto; text-align: center; padding: 32px 24px; border: 1px solid var(--border-soft); border-radius: var(--radius-lg); background: var(--surface); }
.rc-noaccess__icon { font-size: 48px !important; width: 48px; height: 48px; color: var(--muted); margin-bottom: 12px; }

/* ── Governance («الحوكمة والصلاحيات») ── */
.rc-grants__bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.rc-grole { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600; border: 1px solid var(--border-strong); white-space: nowrap; }
.rc-grole--entitymanager { background: #e0f2fe; color: #075985; border-color: #7dd3fc; }
.rc-grole--liaison { background: #ede9fe; color: #5b21b6; border-color: #c4b5fd; }
.rc-grole--approver { background: #dcfce7; color: #166534; border-color: #86efac; }
.rc-grole--preparer { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.rc-grole--viewer { background: var(--surface-3); color: var(--muted); }
.rc-roleline { border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 8px 10px; min-width: 220px; flex: 1 1 260px; background: var(--surface-2); }
.rc-matrix-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: var(--radius); background: var(--surface); }
.rc-matrix { border-collapse: collapse; width: 100%; font-size: .85rem; }
.rc-matrix th, .rc-matrix td { border-bottom: 1px solid var(--border-soft); padding: 6px 8px; text-align: center; vertical-align: middle; }
.rc-matrix thead th { position: sticky; top: 0; background: var(--surface-2); font-weight: 700; font-size: .78rem; min-width: 74px; }
.rc-matrix .rc-matrix__page { text-align: start; min-width: 220px; }
.rc-matrix__module td { background: var(--surface-3); font-weight: 700; text-align: start; }
.rc-matrix .is-mine { background: color-mix(in srgb, var(--brand, #0b7a56) 9%, transparent); }
.rc-matrix tr.is-off { opacity: .55; }
.rc-matrix__cell { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--muted); font-weight: 700; cursor: default; }
button.rc-matrix__cell { cursor: pointer; border-color: var(--border-soft); }
button.rc-matrix__cell:hover { border-color: var(--border-strong); }
.rc-matrix__cell.is-on { background: color-mix(in srgb, var(--brand, #0b7a56) 18%, transparent); color: var(--brand, #0b7a56); }
.rc-matrix__cell.is-inherited { color: var(--brand, #0b7a56); }
.rc-matrix--actions td { font-size: .8rem; }
.rc-matrix__yes { color: var(--text); font-weight: 600; }
.rc-matrix__none { color: var(--muted); }

/* «مِرآة» wordmark beside the mark (the fonts and colours stay the system's own) */
.w-brand-en { letter-spacing: .32em; font-weight: 600; }
.login-lockup { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.login-lockup__text { display: flex; flex-direction: column; line-height: 1.15; }
.login-lockup__text b { font-size: 2rem; font-weight: 800; }
.login-lockup__text span { font-size: .8rem; font-weight: 600; letter-spacing: .38em; opacity: .85; }

.w-brand-text .w-brand-tag { color: var(--muted); font-weight: 500; font-size: .66rem; }
.login-lockup__text small { font-size: .78rem; font-weight: 500; opacity: .85; margin-top: 2px; }
.login-point__l { display: inline-grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px;
    background: rgba(255, 255, 255, .12); font-weight: 800; }
/* Lockup: the three lines (name, MIRA, tagline) start at the same edge as the name and sit centred on the mark */
.w-sidebar-brand .w-brand-text { justify-content: center; align-items: flex-start; line-height: 1.15; gap: 2px; }
.w-sidebar-brand .w-brand-ar { font-size: 1.05rem; font-weight: 800; line-height: 1.1; }
.w-sidebar-brand .w-brand-en { font-size: .6rem; line-height: 1; letter-spacing: .32em; }
.w-sidebar-brand .w-brand-tag { line-height: 1.2; }
.login-lockup__text { align-items: flex-start; }
/* MIRA letters with their English words, as in the identity guide */
.login-point__en { font-weight: 600; letter-spacing: .02em; opacity: .9; }
.login-acro { margin-top: 6px; font-size: .78rem; letter-spacing: .06em; opacity: .75; text-align: center; }
.login-acro b { color: #8ff0c6; }
/* Sign-in panel: room for each MIRA line on one line; the paragraph justified; the lockup lines on one edge */
@media (min-width: 1000px) {
    .login-shell { max-width: 1100px; grid-template-columns: 1.25fr .85fr; }
    .login-point > span:last-child { white-space: nowrap; }
}
.login-point { font-size: .86rem; }
.login-aside p { text-align: justify; text-justify: inter-word; }
.login-lockup__text span[dir="ltr"] { margin-inline-end: -.38em; }
.w-sidebar-brand .w-brand-en { margin-inline-end: -.32em; }

/* ── Framework structure named by its profile (منظور ← محور ← معيار ← متطلبات التطبيق ← مستندات الإثبات) ── */
.rc-group-head { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; padding: 10px 14px; border-radius: .9rem;
  background: var(--rc-brand-soft, #e7f6ef); color: var(--rc-brand-strong, #04543b); border: 1px solid #bfe3d3; }
.rc-group-head--child { margin-inline-start: 18px; background: transparent; border: 1px dashed var(--mud-palette-lines-default, #bfe3d3); }
.rc-group-head__code { font-weight: 700; font-size: .78rem; padding: 2px 8px; border-radius: 999px; background: var(--mud-palette-primary, #0b7a56); color: #fff; }
.rc-group-head__kind { font-size: .76rem; opacity: .8; }
.rc-group-head__name { font-weight: 700; font-size: 1.02rem; }
.rc-group-head__count { margin-inline-start: auto; font-size: .78rem; opacity: .85; }
.rc-req { display: flex; flex-direction: column; gap: 6px; }
.rc-req__text { font-size: .9rem; line-height: 1.7; }
.rc-req__label { font-weight: 700; color: var(--mud-palette-primary, #0b7a56); margin-inline-end: 4px; }
.rc-req__label::after { content: ":"; }
.rc-req__section { margin-top: 8px; font-weight: 700; font-size: .84rem; color: var(--mud-palette-text-secondary, #5b6675); }
.rc-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .88rem; line-height: 1.7; }
.rc-items > li { display: block; }
.rc-items--sub { margin: 4px 0 0; padding-inline-start: 22px; gap: 2px; font-size: .84rem; }
.rc-items__no { display: inline-block; min-width: 22px; font-weight: 700; color: var(--mud-palette-primary, #0b7a56); margin-inline-end: 4px; }
.rc-applies { display: inline-block; margin-inline-start: 6px; font-size: .72rem; padding: 1px 8px; border-radius: 999px;
  background: var(--mud-palette-info-lighten, #eff8ff); color: var(--mud-palette-info-darken, #0369a1); vertical-align: middle; }
.rc-doc-facts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.rc-fact { font-size: .72rem; padding: 1px 8px; border-radius: 999px; background: var(--mud-palette-background-gray, #f1f5f9); color: var(--mud-palette-text-secondary, #475569); }
.rc-fact--info { background: #eff8ff; color: #0369a1; }
.rc-designer__levels { display: flex; flex-direction: column; gap: 6px; overflow-x: auto; }
.rc-designer__row { display: grid; grid-template-columns: minmax(170px, 1.3fr) repeat(4, minmax(110px, 1fr)) 56px; gap: 8px; align-items: center; min-width: 760px; }
.rc-designer__row--head { font-size: .76rem; color: var(--muted, #5b6675); font-weight: 600; }
.rc-designer__row.is-off { opacity: .6; }
.rc-designer__title { font-size: .86rem; font-weight: 600; }
.rc-designer__group { border: 1px solid var(--brand-line, #bfe3d3); border-radius: .9rem; padding: 10px 12px; margin-bottom: 10px; }
.rc-designer__domain { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: .86rem; }
.rc-fwedit__facts { display: flex; flex-wrap: wrap; gap: 4px; }
.rc-itemedit { border: 1px solid var(--line, #e5e7eb); border-radius: .6rem; padding: 6px 10px; margin-bottom: 8px; }
.rc-itemedit__row { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.rc-itemedit__row--sub { padding-inline-start: 40px; }
.rcms-score__section { margin: 14px 0 4px; font-weight: 700; font-size: .84rem; color: var(--muted, #5b6675); }
.rc-suggest { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line, #e5e7eb); }
.rc-suggest__text { flex: 1; min-width: 0; }
.rc-class { display: inline-block; font-size: .72rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; }
.rc-class--0 { background: #f1f5f9; color: #475569; }
.rc-class--1 { background: #eff8ff; color: #0369a1; }
.rc-class--2 { background: #fff8ec; color: #b45309; }
.rc-class--3 { background: #fef2f2; color: #b91c1c; }
.rc-linkpick { display: grid; grid-template-columns: 1fr 2fr 2fr auto; gap: 8px; align-items: center; margin: 6px 0; } @media (max-width: 700px) { .rc-linkpick { grid-template-columns: 1fr; } }
.rc-grant-state { font-size: .76rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: #ecfdf3; color: #047857; }
.rc-grant-state--1 { background: #fff8ec; color: #b45309; }
.rc-grant-state--2 { background: #fef2f2; color: #b91c1c; }
.rc-grant__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.rc-grant__facts > div { display: flex; flex-direction: column; gap: 2px; }
.rc-grant__facts span { font-size: .76rem; color: var(--muted, #5b6675); }
.rc-grant__facts small { font-size: .76rem; color: var(--muted, #5b6675); }
.rc-grant__answer { border: 1px solid var(--brand-line, #bfe3d3); }
.rc-grant__lines { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; line-height: 1.7; }
.rc-grant__line { display: flex; gap: 6px; align-items: baseline; }
.rc-grant__line--0 { font-weight: 700; margin-top: 8px; }
.rc-grant__line--1 { padding-inline-start: 16px; font-weight: 600; }
.rc-grant__line--2 { padding-inline-start: 36px; }
.rc-grant__line--3 { padding-inline-start: 56px; font-size: .84rem; }
.rc-grant__kind { font-size: .7rem; color: var(--muted, #5b6675); min-width: 74px; }

/* ── «رفع وثيقة» wizard */
.rc-wizard__steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border-soft); }
.rc-wizard__step { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 14px; border-radius: 999px; border: 1px solid var(--border-soft);
  background: var(--surface); color: var(--muted); font: inherit; font-size: .85rem; cursor: pointer; transition: all .15s var(--ease); }
.rc-wizard__step:disabled { cursor: default; opacity: .55; }
.rc-wizard__step.is-current { border-color: var(--brand); color: var(--brand-strong); background: var(--brand-soft); font-weight: 600; }
.rc-wizard__step.is-done { color: var(--text); }
.rc-wizard__num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); font-size: .75rem; font-weight: 700; }
.rc-wizard__step.is-current .rc-wizard__num { background: var(--brand); color: #fff; }
.rc-wizard__step.is-done .rc-wizard__num { background: var(--brand-soft); color: var(--brand-strong); }
.rc-wizard__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rc-wizard__classes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 760px) { .rc-wizard__pair, .rc-wizard__classes { grid-template-columns: 1fr; } }
.rc-wizard__class { text-align: start; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: var(--radius-md);
  border: 1.5px solid var(--border-soft); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: all .15s var(--ease); }
.rc-wizard__class span { font-size: .78rem; color: var(--muted); line-height: 1.5; }
.rc-wizard__class:hover { border-color: var(--border-strong); }
.rc-wizard__class.is-on { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.rc-wizard__class--restricted.is-on { border-color: var(--info, #1f6feb); background: var(--info-soft); box-shadow: inset 0 0 0 1px var(--info, #1f6feb); }
.rc-wizard__class--secret.is-on { border-color: var(--warn); background: var(--warn-soft); box-shadow: inset 0 0 0 1px var(--warn); }
.rc-wizard__class--topsecret.is-on { border-color: var(--bad); background: var(--bad-soft); box-shadow: inset 0 0 0 1px var(--bad); }

.rc-pairbox { border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); }
