/* داري — متغيرات الهوية. مولَّد من tokens.json */
@import url("https://fonts.googleapis.com/css2?family=Readex+Pro:wght@400;600;700&family=IBM+Plex+Sans+Arabic:wght@400;500;600&display=swap");

:root {
  --font-display: "Readex Pro", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-sans: "IBM Plex Sans Arabic", "Readex Pro", system-ui, sans-serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(20,30,26,0.06), 0 8px 24px rgba(20,30,26,0.06);
  --shadow-sheet: 0 -8px 32px rgba(20,30,26,0.14);
  --text-display: 700 40px/52px var(--font-display);
  --text-title-lg: 700 28px/38px var(--font-display);
  --text-title: 600 22px/32px var(--font-display);
  --text-metric: 600 32px/40px var(--font-display);
  --text-body-lg: 400 17px/28px var(--font-sans);
  --text-body: 400 15px/26px var(--font-sans);
  --text-label: 500 13px/20px var(--font-sans);
  --text-caption: 400 12px/18px var(--font-sans);
}

/* رملي — الافتراضي */
:root, [data-theme="sand"] {
  --surface: #F7F3EC;
  --surface-raised: #FFFFFF;
  --surface-sunken: #EDE6DA;
  --ink: #1E2A26;
  --ink-muted: #56605B;
  --line: #DDD4C5;
  --brand: #1F5C4A;
  --brand-soft: #DCEBE4;
  --on-brand: #FFFFFF;
  --accent: #E0A23A;
  --accent-soft: #F8E9CC;
  --on-accent: #2A1C05;
  --focus-ring: var(--brand);
  --status-build: #8A5700;
  --status-build-soft: #FBEBC8;
  --status-live: #1C6A44;
  --status-live-soft: #D8EFE2;
  --danger: #B3261E;
  --danger-soft: #F9DEDC;
}

/* ليلي — داكن */
[data-theme="night"] {
  color-scheme: dark;
  --surface: #121715;
  --surface-raised: #1B221F;
  --surface-sunken: #0C100E;
  --ink: #EDF1EE;
  --ink-muted: #A3ADA8;
  --line: #2C3632;
  --brand: #6FCBA5;
  --brand-soft: #1D3A30;
  --on-brand: #0B1F17;
  --accent: #F2B456;
  --accent-soft: #3A2C14;
  --on-accent: #241703;
  --focus-ring: var(--brand);
  --status-build: #F2B456;
  --status-build-soft: #3A2C14;
  --status-live: #6FCF9B;
  --status-live-soft: #173426;
  --danger: #F2948C;
  --danger-soft: #3D1A18;
}

/* موقع الإنشاء */
[data-theme="site"] {
  --surface: #F1F1EE;
  --surface-raised: #FFFFFF;
  --surface-sunken: #E3E3DE;
  --ink: #1C1C1A;
  --ink-muted: #55554F;
  --line: #D3D3CC;
  --brand: #262624;
  --brand-soft: #E6E6E1;
  --on-brand: #FFFFFF;
  --accent: #FFC21A;
  --accent-soft: #FFF1C2;
  --on-accent: #1C1C1A;
  --focus-ring: var(--brand);
  --status-build: #8A5700;
  --status-build-soft: #FBEBC8;
  --status-live: #1C6A44;
  --status-live-soft: #D8EFE2;
  --danger: #B3261E;
  --danger-soft: #F9DEDC;
}

/* زيتوني */
[data-theme="olive"] {
  --surface: #F5F4EC;
  --surface-raised: #FFFFFF;
  --surface-sunken: #E9E7DA;
  --ink: #22261A;
  --ink-muted: #575C4B;
  --line: #D9D6C4;
  --brand: #56632B;
  --brand-soft: #E5E9D3;
  --on-brand: #FFFFFF;
  --accent: #C7883C;
  --accent-soft: #F4E4CC;
  --on-accent: #26180A;
  --focus-ring: var(--brand);
  --status-build: #8A5700;
  --status-build-soft: #FBEBC8;
  --status-live: #1C6A44;
  --status-live-soft: #D8EFE2;
  --danger: #B3261E;
  --danger-soft: #F9DEDC;
}

/* بحري */
[data-theme="sea"] {
  --surface: #F2F5F6;
  --surface-raised: #FFFFFF;
  --surface-sunken: #E2E9EC;
  --ink: #14262E;
  --ink-muted: #4A606A;
  --line: #D0DCE1;
  --brand: #175873;
  --brand-soft: #D8E8EF;
  --on-brand: #FFFFFF;
  --accent: #D9B36A;
  --accent-soft: #F6EBD3;
  --on-accent: #2A1F08;
  --focus-ring: var(--brand);
  --status-build: #8A5700;
  --status-build-soft: #FBEBC8;
  --status-live: #1C6A44;
  --status-live-soft: #D8EFE2;
  --danger: #B3261E;
  --danger-soft: #F9DEDC;
}

/* طيني */
[data-theme="clay"] {
  --surface: #F8F1EB;
  --surface-raised: #FFFFFF;
  --surface-sunken: #EFE2D7;
  --ink: #2B1D17;
  --ink-muted: #65544C;
  --line: #E3D2C4;
  --brand: #9C4A2B;
  --brand-soft: #F3DED3;
  --on-brand: #FFFFFF;
  --accent: #2F6B5A;
  --accent-soft: #D9EAE3;
  --on-accent: #FFFFFF;
  --focus-ring: var(--brand);
  --status-build: #8A5700;
  --status-build-soft: #FBEBC8;
  --status-live: #1C6A44;
  --status-live-soft: #D8EFE2;
  --danger: #B3261E;
  --danger-soft: #F9DEDC;
}

/* عناصر أساسية */
body { font-family: var(--font-sans); background: var(--surface); color: var(--ink); }
[data-theme] { background: var(--surface); color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.badge-build { background: var(--status-build-soft); color: var(--status-build); border-radius: var(--radius-pill); }
.badge-live  { background: var(--status-live-soft);  color: var(--status-live);  border-radius: var(--radius-pill); }
.badge-danger{ background: var(--danger-soft);       color: var(--danger);       border-radius: var(--radius-pill); }
