/* ==========================================================================
   Base / reset
   Uses logical properties (inline-start/end) so Arabic RTL works without
   a separate stylesheet.
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

[dir="rtl"] body { font-family: var(--font-arabic), var(--font-sans); }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--weight-semibold);
  line-height: 1.25;
  color: var(--color-text);
}

p { margin: 0; }
a { color: var(--color-primary-700); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--color-primary-100); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: var(--space-4);
  top: -48px;
  z-index: 1000;
  padding: var(--space-2) var(--space-4);
  background: var(--color-navy);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: top var(--duration) var(--ease);
}
.skip-link:focus { top: var(--space-3); text-decoration: none; }

/* Numbers line up in tables and stat cards */
.tabular { font-variant-numeric: tabular-nums; }

/* Lucide renders <svg class="lucide"> — keep a consistent stroke */
.lucide { width: 1.25em; height: 1.25em; stroke-width: 1.9; flex-shrink: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
