/* ==========================================================================
   المستشار عبدالله — هوية الثقة الهادئة — Design Tokens v4.0
   Single source for every product UI (Blazor / MVC + Bootstrap 5).
   Load order: fonts → rasanah-tokens.css → bootstrap(.rtl).min.css → rasanah-bootstrap.css
   ========================================================================== */

/* ---- Fonts: self-hosted (on-prem servers have no internet) -------------
   Put the IBM Plex Sans Arabic files (OFL licence, free) in wwwroot/fonts/  */
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: swap; src: url("../fonts/IBMPlexSansArabic-Regular.woff2") format("woff2"), url("../fonts/IBMPlexSansArabic-Regular.ttf") format("truetype"); }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 500; font-display: swap; src: url("../fonts/IBMPlexSansArabic-Medium.woff2") format("woff2"), url("../fonts/IBMPlexSansArabic-Medium.ttf") format("truetype"); }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 600; font-display: swap; src: url("../fonts/IBMPlexSansArabic-SemiBold.woff2") format("woff2"), url("../fonts/IBMPlexSansArabic-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 700; font-display: swap; src: url("../fonts/IBMPlexSansArabic-Bold.woff2") format("woff2"), url("../fonts/IBMPlexSansArabic-Bold.ttf") format("truetype"); }

:root {
  /* ---- Brand core (كحلي + ذهبي — طابع استشاري) ---- */
  --rb-ink:        #5A1E2B;   /* عنابي — primary */
  --rb-ink-900:    #3E121C;
  --rb-ink-700:    #3E121C;
  --rb-ink-500:    #7A5C63;
  --rb-ink-200:    #E6DCCB;
  --rb-ink-100:    #F1E3E3;
  --rb-ink-50:     #FAF6EE;

  --rb-brass:      #C9A227;   /* ذهبي — accent, graphics only */
  --rb-brass-700:  #7A610F;   /* ذهبي غامق للنص / عناصر صغيرة */
  --rb-brass-100:  #F6ECC9;

  /* ---- Green (لون جانبي مساند — الشرائط العريضة الداكنة: الشريط العلوي، التذييل، شريط الخبرة، أيقونات الخدمات، الشارات الثانوية) ---- */
  --rb-green:      #2B4636;
  --rb-green-soft: #E4ECE6;
  --rb-on-green:   #FAF6EE;

  /* ---- Neutrals (warm stone) ---- */
  --rb-paper:      #F7F5F0;   /* page background */
  --rb-surface:    #FFFFFF;   /* cards, tables, inputs */
  --rb-stone-100:  #EFECE5;
  --rb-stone-200:  #E4DFD4;   /* borders */
  --rb-stone-300:  #CFC8BA;
  --rb-stone-500:  #8B918F;
  --rb-text-muted: #5B6668;   /* 5.4:1 on paper */
  --rb-text:       #172326;   /* body text */

  /* ---- Semantic ---- */
  --rb-success:    #2F7D57;  --rb-success-bg: #E5F2EA;
  --rb-warning:    #A86A12;  --rb-warning-bg: #FBF0DC;
  --rb-danger:     #B4412E;  --rb-danger-bg:  #F8E6E2;
  --rb-info:       #2E6DA4;  --rb-info-bg:    #E3EEF7;

  /* ---- Module families (one colour per family, used for module tiles & accents only) ---- */
  --rb-fam-entity:     #1D6A72;  /* المنشأة والكيانات */
  --rb-fam-people:     #3A5998;  /* الموظفون */
  --rb-fam-governance: #7A610F;  /* الامتثال والرقابة */
  --rb-fam-operations: #A34E36;  /* التشغيل والمالية */
  --rb-fam-platform:   #5A1E2B;  /* المنصّة */
  --rb-module: var(--rb-fam-platform);  /* set per product on <body> (see bottom) */

  /* ---- Typography ---- */
  --rb-font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --rb-font-mono: "IBM Plex Mono", Consolas, "Courier New", monospace;
  --rb-fs-xs: 0.75rem;   /* 12 */
  --rb-fs-sm: 0.875rem;  /* 14 — tables, forms */
  --rb-fs-md: 1rem;      /* 16 — body */
  --rb-fs-lg: 1.25rem;   /* 20 — section title */
  --rb-fs-xl: 1.5rem;    /* 24 — page title */
  --rb-fs-2xl: 2rem;     /* 32 — dashboard figures */
  --rb-lh-tight: 1.3;
  --rb-lh: 1.7;          /* Arabic needs generous line-height */

  /* ---- Space (4px base) ---- */
  --rb-sp-1: 4px;  --rb-sp-2: 8px;  --rb-sp-3: 12px; --rb-sp-4: 16px;
  --rb-sp-5: 24px; --rb-sp-6: 32px; --rb-sp-7: 48px; --rb-sp-8: 64px;

  /* ---- Shape & depth ---- */
  --rb-radius-sm: 4px;
  --rb-radius:    8px;    /* inputs, buttons */
  --rb-radius-lg: 12px;   /* cards, dialogs */
  --rb-shadow-1: 0 1px 2px rgba(90,30,43,.06), 0 1px 3px rgba(90,30,43,.08);
  --rb-shadow-2: 0 4px 12px rgba(90,30,43,.10);
  --rb-focus: 0 0 0 3px rgba(184,137,59,.45);  /* brass focus ring */
}

/* Product accent: add the class on <body> of each product */
.rb-module-entities, .rb-module-bank, .rb-module-facilities                     { --rb-module: var(--rb-fam-entity); }
.rb-module-hr, .rb-module-contracts, .rb-module-attendance, .rb-module-payroll,
.rb-module-residents, .rb-module-insurance                                      { --rb-module: var(--rb-fam-people); }
.rb-module-compliance, .rb-module-labor, .rb-module-alerts, .rb-module-documents { --rb-module: var(--rb-fam-governance); }
.rb-module-fleet, .rb-module-accounting                                         { --rb-module: var(--rb-fam-operations); }
.rb-module-platform, .rb-module-hub                                             { --rb-module: var(--rb-fam-platform); }
