/* App Design Tokens - Clean & Minimal App UI */
:root {
  color-scheme: light;
  --color-page: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-soft: #eff6ff;
  --color-surface-muted: #f1f5f9;
  --color-text: #0f172a;
  --color-text-soft: #334155;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-border-strong: #cbd5e1;
  --color-accent: #2563eb;
  --color-accent-strong: #1d4ed8;
  --color-accent-soft: #eff6ff;
  --color-accent-border: #bfdbfe;
  --color-success: #16a34a;
  --color-success-soft: #ecfdf5;
  --color-warning: #d97706;
  --color-warning-soft: #fffbeb;
  --color-danger: #dc2626;
  --color-danger-soft: #fef2f2;
  --color-info: #0284c7;
  --color-info-soft: #f0f9ff;

  --font-family-ar: "Tajawal", "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-md: 0.9375rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.375rem;
  --font-size-2xl: 1.75rem;
  --font-size-3xl: clamp(1.4rem, 2vw, 1.85rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;

  --radius-sm: 0.5rem;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;
  --sidebar-width: 17.25rem;
  --topbar-height: 4.25rem;
  --control-height: 2.65rem;
  --focus-ring: 0 0 0 3px rgb(37 99 235 / 22%);

  --shadow-soft: 0 2px 10px rgb(15 23 42 / 5%);
  --shadow-card: 0 2px 8px rgb(15 23 42 / 4%), 0 1px 3px rgb(15 23 42 / 2%);
  --shadow-card-hover: 0 8px 24px rgb(37 99 235 / 8%), 0 2px 6px rgb(15 23 42 / 4%);
  --shadow-modal: 0 24px 72px rgb(15 23 42 / 16%);
}

* { box-sizing: border-box; }
html { background: var(--color-page); scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-page);
  color: var(--color-text);
  font-family: var(--font-family-ar);
  font-size: var(--font-size-md);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: #dbeafe; color: #1e40af; }

:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

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