/* ==========================================================================
   Design tokens: every colour, space, size, radius and shadow the app uses.
   Components (styles.css) use only these; dark mode redefines the colours.
   Theme: follows the device unless the person picks one (data-theme on <html>).
   ========================================================================== */

/* IBM Plex Sans Arabic (SIL Open Font License, fonts/OFL-IBM-Plex-Sans-Arabic.txt):
   Arabic and Latin, served from our own server. */
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-arabic-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-arabic-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-arabic-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-arabic-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  color-scheme: light;

  /* Surfaces and text */
  --color-bg: #f6f7f9;
  --color-surface: #ffffff;
  --color-surface-2: #f1f3f5;
  --color-surface-sunken: #e9ecef;
  --color-border: #dde1e6;
  --color-border-strong: #c3c9d0;
  --color-text: #1d2329;
  --color-text-muted: #5c6670;
  --color-overlay: rgba(15, 23, 42, 0.5);

  /* Brand and actions */
  --color-primary: #1f7a60;
  --color-primary-hover: #18634e;
  --color-on-primary: #ffffff;
  --color-brand: #2f9e7f;
  --color-brand-2: #20c997;
  --color-link: #1f7a60;
  --color-nav-active: #1f7a60;
  --color-danger: #c92a2a;
  --color-danger-hover: #a51f1f;
  --color-on-danger: #ffffff;
  --color-danger-text: #b42323;
  --color-warning: #e08600;
  --color-live: #22c55e;
  --color-star: #f5b301;
  --color-video-bg: #000000;
  --color-folder: #e9a812;
  --color-focus: #1a5fd0;
  --logo-filter: none; /* the logo is black line art */
  /* The sign-in page's brand panel: navy and teal in both themes */
  --brand-navy: #111a2e;
  --brand-navy-2: #172340;
  --brand-teal: #3dd6c6;
  --on-brand: #f3f6fb;
  --on-brand-muted: #c3ccdb;

  /* Tones: soft background + readable text (badges, chips, banners) */
  --tone-success-bg: #e3f3ec;
  --tone-success-fg: #17604b;
  --tone-warning-bg: #fdf0d8;
  --tone-warning-fg: #7a4300;
  --stamp-green: #1f8f45;
  --stamp-orange: #e06a00;
  --stamp-red: #c92a2a;
  --tone-danger-bg: #fde8e8;
  --tone-danger-fg: #a61b1b;
  --tone-neutral-bg: #eceff2;
  --tone-neutral-fg: #46505a;
  --tone-info-bg: #e6efff;
  --tone-info-fg: #1a4fb0;
  --tone-violet-bg: #eee9ff;
  --tone-violet-fg: #5534c4;

  /* Type */
  --font-sans: "IBM Plex Sans Arabic", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 34px;
  --text-display: 40px;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --leading-tight: 1.25;
  --leading-normal: 1.6;

  /* Space (4px steps) */
  --space-0-5: 2px;
  --space-1: 4px;
  --space-1-5: 6px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-15: 60px;

  /* Corners */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 999px;

  /* Depth */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.25);

  /* Sizes */
  --control-sm: 32px;
  --control-md: 40px;
  --control-lg: 48px;
  --topbar-height: 60px;
  --sidebar-width: 260px;
  --sidebar-width-compact: 60px;
  --content-width: 1080px;
}

/* Dark theme. The same values appear twice, keep both blocks in step:
   once for "the device prefers dark" (unless someone picked light) and once
   for "someone picked dark". */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --color-bg: #0e1318;
    --color-surface: #161c23;
    --color-surface-2: #1c232b;
    --color-surface-sunken: #222a33;
    --color-border: #2c3540;
    --color-border-strong: #3b4652;
    --color-text: #e7eaee;
    --color-text-muted: #9ba6b2;
    --color-overlay: rgba(0, 0, 0, 0.6);
    --color-primary: #1f7a60;
    --color-primary-hover: #18634e;
    --color-link: #5cc9a5;
    --color-nav-active: #1f7a60;
    --color-danger: #c92a2a;
    --color-danger-hover: #b32424;
    --color-danger-text: #ff8a8a;
    --color-focus: #7aa7ff;
  --logo-filter: invert(1);
    --tone-success-bg: #12352b;
    --tone-success-fg: #7ad9b5;
    --tone-warning-bg: #3a2a0c;
    --tone-warning-fg: #f3c26b;
  --stamp-green: #4cc97a;
  --stamp-orange: #ff9a3d;
  --stamp-red: #ff6b6b;
    --stamp-green: #4cc97a;
    --stamp-orange: #ff9a3d;
    --stamp-red: #ff6b6b;
    --tone-danger-bg: #3d1618;
    --tone-danger-fg: #ffa3a3;
    --tone-neutral-bg: #262e37;
    --tone-neutral-fg: #bcc5cf;
    --tone-info-bg: #14284a;
    --tone-info-fg: #9dc0ff;
    --tone-violet-bg: #2a2150;
    --tone-violet-fg: #c9bbff;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #0e1318;
  --color-surface: #161c23;
  --color-surface-2: #1c232b;
  --color-surface-sunken: #222a33;
  --color-border: #2c3540;
  --color-border-strong: #3b4652;
  --color-text: #e7eaee;
  --color-text-muted: #9ba6b2;
  --color-overlay: rgba(0, 0, 0, 0.6);
  --color-primary: #1f7a60;
  --color-primary-hover: #18634e;
  --color-link: #5cc9a5;
  --color-nav-active: #1f7a60;
  --color-danger: #c92a2a;
  --color-danger-hover: #b32424;
  --color-danger-text: #ff8a8a;
  --color-focus: #7aa7ff;
  --logo-filter: invert(1);
  --tone-success-bg: #12352b;
  --tone-success-fg: #7ad9b5;
  --tone-warning-bg: #3a2a0c;
  --tone-warning-fg: #f3c26b;
  --tone-danger-bg: #3d1618;
  --tone-danger-fg: #ffa3a3;
  --tone-neutral-bg: #262e37;
  --tone-neutral-fg: #bcc5cf;
  --tone-info-bg: #14284a;
  --tone-info-fg: #9dc0ff;
  --tone-violet-bg: #2a2150;
  --tone-violet-fg: #c9bbff;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
}
