/*
 * ERP design tokens — single source of truth for color, spacing, shadow.
 * Spec: Docs/Study/design/erp_design.md §3 (Visual language).
 * Scope: Phase 0a baseline (light theme). Dark theme tokens land in Phase 1.5.
 *
 * Naming:
 *   --itqanat-*  brand tokens, semantic, stable
 *   --bs-*   Bootstrap 5.3 variable overrides (mapped from --itqanat-*)
 */

:root {
  /* Surfaces ---------------------------------------------------------- */
  --itqanat-paper: #f8fafc; /* page background — Slate 50 */
  --itqanat-surface: #ffffff; /* cards, modals, inputs */
  --itqanat-surface-muted: #f1f5f9; /* Slate 100 */

  /* Ink (text) -------------------------------------------------------- */
  --itqanat-ink-900: #0f172a; /* Slate 900 */
  --itqanat-ink-700: #334155; /* Slate 700 */
  --itqanat-ink-500: #64748b; /* Slate 500 */
  --itqanat-ink-400: #94a3b8; /* Slate 400 */
  --itqanat-ink-300: #cbd5e1; /* Slate 300 */
  --itqanat-ink-200: #e2e8f0; /* Slate 200 */

  /* Navigation chrome ------------------------------------------------- */
  --itqanat-nav: #0f172a; /* Slate 900 */
  --itqanat-nav-active: #1e293b; /* Slate 800 */

  /* Brand primary ----------------------------------------------------- */
  --itqanat-primary: #0f172a;
  --itqanat-primary-soft: #f1f5f9;

  /* Public brand palette ----------------------------------------------
     Teal + gold are taken from the approved Itqanat mark. They are kept
     separate from --itqanat-primary so the authenticated product shell is
     not re-themed by the public-site refresh. */
  --itqanat-brand-teal: #00565a;
  --itqanat-brand-teal-deep: #003b3f;
  --itqanat-brand-teal-soft: #e8f4f2;
  --itqanat-brand-gold: #c99a2e;
  --itqanat-brand-gold-deep: #8a6413;
  --itqanat-brand-gold-soft: #fbf4df;

  /* AI accent --------------------------------------------------------- */
  --itqanat-ai: #6366f1; /* Indigo 500 */
  --itqanat-ai-soft: #eef2ff; /* Indigo 50 */

  /* Accent — alias for structural-title accent bars (see TEMPLATE_DESIGN_STANDARDS.md).
     Defaults to AI purple; CLD-001 may re-alias. */
  --itqanat-accent: var(--itqanat-ai);

  /* Status ------------------------------------------------------------ */
  --itqanat-success: #10b981; /* Emerald 500 */
  --itqanat-success-soft: #ecfdf5;
  --itqanat-warning: #f59e0b; /* Amber 500 */
  --itqanat-warning-soft: #fffbeb;
  --itqanat-danger: #f43f5e; /* Rose 500 */
  --itqanat-danger-soft: #fff1f2;
  --itqanat-info: #06b6d4; /* Cyan 500 */
  --itqanat-info-soft: #ecfeff;

  /* Money ------------------------------------------------------------- */
  --itqanat-money-pos: #14804a;
  --itqanat-money-neg: #c2413b;

  /* Elevation --------------------------------------------------------- */
  --itqanat-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --itqanat-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --itqanat-shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);

  /* Bootstrap 5.3 overrides ------------------------------------------ */
  --bs-primary: var(--itqanat-primary);
  /* Must match --itqanat-primary RGB. Currently #0f172a = 15, 23, 42 (Slate 900).
     If CLD-001 restores brand blue (#2563eb), update both lines together. */
  --bs-primary-rgb: 15, 23, 42;
  --bs-success: var(--itqanat-success);
  --bs-warning: var(--itqanat-warning);
  --bs-danger: var(--itqanat-danger);
  --bs-info: var(--itqanat-info);
  --bs-body-bg: var(--itqanat-paper);
  --bs-body-color: var(--itqanat-ink-700);
  --bs-border-color: var(--itqanat-ink-300);
  --bs-link-color: var(--itqanat-primary);
  --bs-link-hover-color: #1e40af;
  --bs-border-radius: 0.375rem;
  --bs-border-radius-sm: 0.25rem;
  --bs-border-radius-lg: 0.5rem;
}

/* Tenant identity stripe — see §3.5.
   Color is set inline by the tenant_stripe_color template tag.
   Falls back to primary when no tenant is bound (login, public). */
.itqanat-stripe {
  height: 4px;
  background: var(--itqanat-tenant-stripe, var(--itqanat-primary));
}
