/* Daoob AI — Vision 2030 institutional palette */
:root {
  /* Greens */
  --green-900: #03261A;
  --green-800: #063522;
  --green-700: #0B5D3B;
  --green-600: #11774C;
  --green-500: #2B8F65;
  --green-100: #DCE9DF;
  --green-50:  #EEF4EE;

  /* Report / brand identity exact tokens (from logo identity sheet) */
  --report-green:  #0F3D2E;
  --report-gold:   #C9A266;
  --report-sand:   #E8DFC9;
  --report-paper:  #F7F6F2;

  /* Gold */
  --gold-700: #9C7A2E;
  --gold-600: #B89043;
  --gold-500: #C8A35A;
  --gold-400: #D9BA7C;
  --gold-200: #E8D6A8;
  --gold-100: #F2E6C8;

  /* Neutrals */
  --ink-900: #0E1612;
  --ink-700: #2A332D;
  --ink-500: #5A6258;
  --ink-400: #6B7368;
  --ink-300: #8B9389;
  --ink-200: #BFC4BB;
  --hairline: #D9D3C2;
  --paper:   #F6F2E8;
  --paper-2: #EEEADD;
  --card:    #FFFFFF;

  /* States */
  --danger: #B43F2E;
  --warning: #C58A1A;
  --info: #3A6FB0;

  /* Radius — institutional, restrained */
  --r-1: 3px;
  --r-2: 6px;
  --r-3: 10px;

  /* Shadows — soft, paper-like */
  --shadow-1: 0 1px 0 var(--hairline);
  --shadow-2: 0 1px 2px rgba(14,22,18,0.06), 0 4px 12px rgba(14,22,18,0.04);
  --shadow-3: 0 8px 28px rgba(14,22,18,0.10), 0 2px 6px rgba(14,22,18,0.06);

  /* Type */
  --font-sans: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-serif: "IBM Plex Serif", "Noto Serif", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

html[dir="rtl"] {
  --font-sans: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink-900);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv01";
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Typographic scale */
.t-display { font-family: var(--font-serif); font-weight: 400; font-size: 64px; line-height: 1.05; letter-spacing: -0.02em; }
.t-h1 { font-family: var(--font-serif); font-weight: 400; font-size: 44px; line-height: 1.1; letter-spacing: -0.015em; }
.t-h2 { font-family: var(--font-serif); font-weight: 400; font-size: 32px; line-height: 1.15; letter-spacing: -0.01em; }
.t-h3 { font-weight: 500; font-size: 20px; line-height: 1.3; }
.t-h4 { font-weight: 500; font-size: 16px; line-height: 1.35; }
.t-body { font-size: 15px; line-height: 1.55; }
.t-small { font-size: 13px; line-height: 1.45; }
.t-tiny { font-size: 11px; line-height: 1.4; letter-spacing: 0.04em; text-transform: uppercase; }
.t-num { font-family: var(--font-serif); font-feature-settings: "tnum"; }
.t-mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; }

html[dir="rtl"] .t-display,
html[dir="rtl"] .t-h1,
html[dir="rtl"] .t-h2 {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0;
}
html[dir="rtl"] .t-tiny { letter-spacing: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--r-2);
  font-size: 14px; font-weight: 500;
  background: transparent; color: var(--ink-900);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-800); }
.btn-gold { background: var(--gold-500); color: var(--green-900); }
.btn-gold:hover { background: var(--gold-600); }
.btn-outline { border-color: var(--ink-900); }
.btn-outline:hover { background: var(--ink-900); color: var(--paper); }
.btn-ghost { color: var(--ink-700); }
.btn-ghost:hover { background: rgba(14,22,18,0.05); }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-lg { padding: 14px 22px; font-size: 15px; }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-2);
}

/* Hairlines */
.hr { height: 1px; background: var(--hairline); border: 0; margin: 0; }
.hr-gold { height: 2px; background: var(--gold-500); border: 0; width: 36px; margin: 0; }

/* Layout */
.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 920px; margin: 0 auto; padding: 0 32px; }

/* Pills / chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--green-50); color: var(--green-700);
  font-size: 12px; font-weight: 500;
  border: 1px solid var(--green-100);
}
.chip-gold { background: var(--gold-100); color: var(--gold-700); border-color: var(--gold-200); }
.chip-ink  { background: var(--paper-2); color: var(--ink-700); border-color: var(--hairline); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 500; color: var(--ink-500); letter-spacing: 0.02em; text-transform: uppercase; }
.field input, .field select, .field textarea {
  font-family: inherit; font-size: 15px;
  padding: 10px 12px; background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-2);
  color: var(--ink-900);
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(11,93,59,0.10);
}

/* Utility */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1; }
.center { display: flex; align-items: center; justify-content: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

/* RTL helpers */
html[dir="rtl"] .flip { transform: scaleX(-1); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--ink-200); border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

/* Selection */
::selection { background: var(--gold-200); color: var(--green-900); }
