/* ==========================================================================
   Wolves ERP — Base: design tokens (Wolves International brand), reset, typography
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
  /* Brand — Wolves International (wolvesint.ae + logo). Overridable at runtime from Settings → Branding */
  --brand-900: #000219;   /* ink (site --ink) */
  --brand-800: #000857;   /* ink soft */
  --brand-700: #001296;   /* logo royal blue — primary actions */
  --brand-600: #1a2bb0;
  --brand-500: #3448d1;
  --brand-100: #e6e7f5;   /* site --cream */
  --brand-50:  #f3f4fb;
  --gold-600: #a8834d;    /* gold text on white (AA for large text) */
  --gold-500: #cda773;    /* site --gold-deep */
  --gold-300: #e1b77e;    /* site --gold */
  --gold-100: #f8efe3;    /* site --gold-pale */

  /* Surfaces (white UI) */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --hover: #f5f6fc;
  --border: #e5e9f0;
  --border-strong: #cfd6e1;

  /* Ink */
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #64748b;
  --muted: #94a3b8;

  /* Status (reserved) */
  --good: #0ca30c;    --good-ink: #067306;   --good-bg: #e9f8e9;
  --warn: #fab219;    --warn-ink: #8a5a00;   --warn-bg: #fff6e0;
  --serious: #ec835a; --serious-ink: #a4411a; --serious-bg: #fdeee7;
  --bad: #d03b3b;     --bad-ink: #a82626;    --bad-bg: #fcebeb;
  --info-ink: #1a2bb0; --info-bg: #eceefa;
  --neutral-bg: #f1f5f9; --neutral-ink: #475569;
  --violet-ink: #4a3aa7; --violet-bg: #efedfb;

  /* Chart categorical (validated order) */
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7; --s8: #e34948;
  --grid: #e8ebf0;
  --axis: #c3c2b7;

  /* Shape */
  --r-sm: 4px;
  --r: 6px;
  --r-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .14), 0 2px 6px rgba(15, 23, 42, .06);
  --ring: 0 0 0 3px rgba(0, 18, 150, .18);

  /* Layout */
  --sidebar-w: 248px;
  --topbar-h: 60px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; color: var(--text); }
h1 { font-size: 26px; letter-spacing: -.005em; font-family: var(--font-head); font-weight: 600; }
h2 { font-family: var(--font-head); font-weight: 600; }
.font-head { font-family: var(--font-head); }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
h4 { font-size: 13px; }
p { margin: 0 0 8px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
::selection { background: var(--brand-100); }

.num, .tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.xsmall { font-size: 11px; }
.bold { font-weight: 600; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.text-good { color: var(--good-ink); }
.text-bad { color: var(--bad-ink); }
.text-warn { color: var(--warn-ink); }

/* Flex / grid helpers */
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1 1 auto; min-width: 0; }
.gap-4 { gap: 4px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-all { grid-column: 1 / -1; }
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-3 { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .span-2, .span-3 { grid-column: auto; }
}

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print {
  .sidebar, .topbar, .page-actions, .no-print { display: none !important; }
  .main { margin: 0 !important; }
}
