/* LIVE COPY used by every page. Source of truth for the app: edit HERE (design/tokens.css is the design-session reference). */
/* Bots Platform design tokens · v1 · 26 Nov 2026
   Load once: <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Readex+Pro:wght@300;400;500;600;700&display=swap">
   Then <html lang="ar" dir="rtl"> and this file. Dark mode: add data-theme="dark" on <html>, or follow the OS (below). */

:root {
  /* ---- colour · light (default) ---- */
  --ink: #16161D;            /* text, icons · 18:1 on white */
  --ink-2: #464853;          /* secondary text · 9.1:1 */
  --ink-3: #63656F;          /* hints, muted · 5.8:1 white / 5.2:1 paper */
  --line-input: #8E909B;     /* input borders, switch off · 3.2:1 (UI contrast) */
  --line: #E2E2E7;           /* dividers only, never the only edge of a control */
  --paper: #F2F2F4;          /* page ground */
  --card: #FFFFFF;           /* cards, sheets */
  --card-2: #F2F2F4;         /* customer bubble ground, inputs */
  --hero: #16161D;           /* the credit card (the one dark card in light mode) */

  --saffron: #FFC530;        /* THE BOT: bot bubbles, coins, credit number, main button. Ink text on it: 11.4:1 */
  --saffron-press: #F2B200;
  --saffron-edge: #E0A400;   /* 1.5px inner ring on coins */
  --saffron-tint: #FFF3CF;   /* selected states, bot tint, nav active pill */
  --saffron-ink: #8A5B00;    /* links / saffron words on white · 5.9:1. Never use --saffron for text on white */

  --leaf: #0E7C66;  --leaf-ink: #0B5E4E;  --leaf-tint: #E2F3EE;   /* connected, done, free */
  --ember: #C2410C; --ember-ink: #9A3209; --ember-tint: #FFEDE3;  /* low credit, warnings */
  --ember-on-dark: #FF8A4C;                                       /* low-credit number on the dark credit card */
  --alarm: #B3172F; --alarm-tint: #FCE8EB;                        /* zero credit, errors, staff waiting badge */

  --focus: #16161D;          /* 3px ring, 2px offset */

  /* channel dots in the live pulse */
  --ch-wa: var(--saffron);
  --ch-ig: var(--ink);
  --ch-fb: #8E909B;

  /* ---- type · Readex Pro only ---- */
  --font: 'Readex Pro', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --t-display: 700 40px/1.3 var(--font);   /* phone hero · desktop 64px/1.3 */
  --t-h1: 700 28px/1.35 var(--font);
  --t-h2: 600 22px/1.4 var(--font);
  --t-h3: 600 18px/1.45 var(--font);
  --t-body-lg: 400 18px/1.65 var(--font);
  --t-body: 400 16px/1.65 var(--font);
  --t-small: 400 14px/1.6 var(--font);
  --t-label: 500 13px/1.5 var(--font);     /* smallest size allowed */
  --t-num-xl: 700 64px/1 var(--font);      /* digits only: add tabular-nums and -0.02em */
  --t-num-l: 700 40px/1 var(--font);
  --t-num-m: 600 22px/1 var(--font);

  /* ---- space · 4px base ---- */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px;
  --s6: 24px; --s7: 32px; --s8: 40px; --s9: 56px; --s10: 72px;
  --page-x: 20px;            /* phone side margin */

  /* ---- shape ---- */
  --r-tail: 6px;             /* bubble tail corner */
  --r-xs: 8px;               /* card tail corner */
  --r-s: 12px; --r-m: 16px; --r-l: 24px; --r-xl: 32px; --r-pill: 999px;
  /* The bubble corner: bot surfaces keep ONE small corner, bottom-left (the bot speaks from the left in RTL).
     border-radius is physical: top-left top-right bottom-right bottom-left. */
  --shape-bot-card: 24px 24px 24px 8px;
  --shape-bot-bubble: 22px 22px 22px 6px;       /* single or last-in-group bot bubble */
  --shape-bot-bubble-mid: 6px 22px 22px 6px;
  --shape-bot-bubble-end: 6px 22px 22px 22px;
  --shape-cust-bubble: 22px 6px 22px 22px;      /* customer, right side */

  /* ---- depth ---- */
  --shadow-float: 0 10px 28px -10px rgba(22, 22, 29, .28);  /* sheets, dial thumb, toast only */

  /* ---- touch ---- */
  --tap: 48px;               /* minimum target; chips 44px */

  /* ---- motion ---- */
  --t-press: 90ms;   --t-quick: 160ms;  --t-base: 240ms;
  --t-split: 420ms;  --t-roll: 900ms;   --t-rise: 1400ms;
  --roll-stagger: 40ms;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}

/* ---- dark ---- */
:root[data-theme="dark"] {
  --ink: #F4F4F6; --ink-2: #C4C5CE; --ink-3: #9B9DA8;
  --line-input: #6B6D78; --line: #2E2F39;
  --paper: #0E0E13; --card: #191920; --card-2: #22232B; --hero: #22232B;
  --saffron-tint: #3A2F12; --saffron-ink: #FFD466;
  --leaf: #4CC9A6; --leaf-ink: #4CC9A6; --leaf-tint: #10302A;
  --ember: #FF8A4C; --ember-ink: #FF8A4C; --ember-tint: #3A2116;
  --alarm: #FF6B81; --alarm-tint: #3A1820;
  --focus: #FFC530;
  --ch-ig: #F4F4F6;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #F4F4F6; --ink-2: #C4C5CE; --ink-3: #9B9DA8;
    --line-input: #6B6D78; --line: #2E2F39;
    --paper: #0E0E13; --card: #191920; --card-2: #22232B; --hero: #22232B;
    --saffron-tint: #3A2F12; --saffron-ink: #FFD466;
    --leaf: #4CC9A6; --leaf-ink: #4CC9A6; --leaf-tint: #10302A;
    --ember: #FF8A4C; --ember-ink: #FF8A4C; --ember-tint: #3A2116;
    --alarm: #FF6B81; --alarm-tint: #3A1820;
    --focus: #FFC530;
    --ch-ig: #F4F4F6;
  }
}

/* ---- base rules every page needs ---- */
html { font-family: var(--font); color: var(--ink); background: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; }
* { letter-spacing: normal; }                     /* Arabic: never track. Opt in on pure digits/Latin only. */
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.num-tight { letter-spacing: -0.02em; }           /* only on elements that hold digits and nothing else */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Reduced motion: no loops, no springs, no flood, digits swap. Meaning stays. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
