html {
      --background: #0b131e;
      --foreground: #f1f5f9;
      --card: #131f2e;
      --content: #1a293c;
      --border: #263850;
      --muted-foreground: #94a3b8;
      font-family: "Cairo", "IBM Plex Sans Arabic", "Tajawal", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      line-height: 1.65;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      text-rendering: optimizeLegibility;
    }
    h1, h2, h3, h4 {
      font-family: "Cairo", "IBM Plex Sans Arabic", system-ui, sans-serif;
      line-height: 1.35;
      letter-spacing: normal;
    }
    dialog::backdrop {
      background: rgba(0, 0, 0, 0.55);
      backdrop-filter: blur(3px);
    }
    input:user-invalid, select:user-invalid, textarea:user-invalid {
      border-color: #ef4444;
    }

/* Responsive RTL Tab Strip & Sidebar Sync */
    .wen-tab-strip {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      overflow-x: auto;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
      padding: 0.65rem 1rem;
      margin-bottom: 1rem;
      background: var(--card, #131f2e);
      border: 1px solid var(--border, #263850);
      border-radius: 0.75rem;
      position: sticky;
      top: 0.5rem;
      z-index: 30;
      box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
    }
    .wen-tab-strip::-webkit-scrollbar {
      display: none;
    }
    .wen-tab-btn {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      white-space: nowrap;
      padding: 0.55rem 1rem;
      border-radius: 0.5rem;
      border: 1px solid transparent;
      background: transparent;
      color: var(--muted-foreground, #94a3b8);
      font-size: 0.92rem;
      font-weight: 600;
      line-height: 1.5;
      cursor: pointer;
      transition: all 0.15s ease;
    }
    .wen-tab-btn:hover {
      background: var(--content, #1a293c);
      color: var(--foreground, #f1f5f9);
    }
    .wen-tab-btn[aria-selected="true"] {
      background: rgba(14, 165, 233, 0.15);
      color: #38bdf8;
      border-color: rgba(56, 189, 248, 0.4);
    }
    .wen-tab-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 1.45rem;
      height: 1.3rem;
      padding: 0 0.4rem;
      border-radius: 999px;
      font-size: 0.75rem;
      font-weight: 700;
      background: var(--content, #1a293c);
      color: var(--muted-foreground, #94a3b8);
      direction: ltr;
    }
    .wen-tab-btn[aria-selected="true"] .wen-tab-badge {
      background: #0284c7;
      color: #ffffff;
    }
    .wen-tab-hidden {
      display: none !important;
    }
    /* Make top KPI cards clickable shortcuts */
    main > section:first-of-type > div {
      cursor: pointer;
      transition: transform 0.15s ease, box-shadow 0.15s ease;
    }
    main > section:first-of-type > div:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(15, 23, 42, 0.35);
    }
    /* Ensure tables scroll cleanly inside mobile cards */
    table {
      min-width: 660px;
    }
