/* ═══════════════════════════════════════════════════════════════
   TOKENY BOPPE CRM — jediný zdroj barev, písma a mezer
   Načítá je aplikace (index.html) i kalendář v iframe (public/kalapp.html),
   ať se světlý a tmavý režim nemůžou rozejít. Hodnoty měň jen tady.
   Světlý režim: paleta „B · Grafit“ (svetla-varianty.html, 5. 11. 2026), sytější barvy od 2.5.30
   (mockup/menu-varianty/sytejsi.html, Pavel 19. 11. 2026).
   ═══════════════════════════════════════════════════════════════ */
:root {
  /* Neutrální — světlý režim „B · Grafit“: ostrá bílá práce v tmavém rámu (svetla-varianty.html) */
  --bg:          #f4f5f7;
  --surface:     #ffffff;
  --surface-2:   #f7f8fa;
  --surface-3:   #e9ebef;
  --border:      #dcdfe5;
  --border-2:    #bcc2cc;

  --text:        #14171c;
  --text-2:      #3f4650;
  --text-3:      #59616d;

  /* Značka — zelená, bílý text na tlačítku */
  --accent:        #00875a;
  --accent-hover:  #006e49;
  --accent-soft:   rgb(0 166 106 / .20);
  --accent-text:   #00603d;
  --accent-on-soft: #00603d;  /* zelený text na --accent-soft: --accent tam má jen 4,3 : 1 */
  --on-accent:     #ffffff;
  --focus:         #2563eb;

  /* Význam */
  --ok:       #037a3b;  --ok-soft:     rgb(18 190 95 / .22);
  --warn:     #a35600;  --warn-soft:   rgb(255 161 20 / .32);
  --danger:   #c8170f;  --danger-soft: rgb(235 30 30 / .17);
  --info:     #0f52e0;  --info-soft:   rgb(47 116 255 / .20);

  /* Stavy zakázky = 7 fází (mapa stav → fáze je v src/stavy.jsx) */
  --st-poptavka-fg:  #7a4100; --st-poptavka-bg:  rgb(255 161 20 / .30); --st-poptavka-dot:  #f08c00;
  --st-zamereni-fg:  #5a1fc2; --st-zamereni-bg:  rgb(140 82 255 / .22); --st-zamereni-dot:  #8340ff;
  --st-domluveno-fg: #005e3e; --st-domluveno-bg: rgb(18 196 131 / .26);  --st-domluveno-dot: #00b377;
  --st-realizace-fg: #0f45b8; --st-realizace-bg: rgb(66 133 255 / .22);  --st-realizace-dot: #2f74ff;
  --st-hotovo-fg:    #2d333c; --st-hotovo-bg:    rgb(60 70 85 / .16);   --st-hotovo-dot:    #4c5563;
  --st-faktura-fg:   #ffffff; --st-faktura-bg:   #2d333c;               --st-faktura-dot:   #c4cad3;
  --st-zruseno-fg:   #9e130e; --st-zruseno-bg:   rgb(230 30 30 / .14);  --st-zruseno-dot:   #e5241d;

  /* Písmo */
  --font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', ui-monospace, 'Cascadia Code', Menlo, monospace;
  --fs-xs: 12px; --fs-sm: 13px; --fs-md: 14px; --fs-lg: 16px; --fs-xl: 20px; --fs-2xl: 24px; --fs-3xl: 32px;
  --fw-normal: 450; --fw-medium: 550; --fw-bold: 700; --fw-black: 800;
  --lh-tight: 1.2; --lh: 1.5;

  /* Mezery */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;

  /* Rádiusy */
  --r-sm: 6px; --r-md: 8px; --r-lg: 10px; --r-full: 999px;

  /* Stíny */
  --sh-1: 0 0 0 0 transparent;   /* karty drží tenký okraj, ne stín */
  --sh-2: 0 4px 16px rgb(20 24 32 / .10), 0 1px 3px rgb(20 24 32 / .08);
  --sh-3: 0 16px 48px rgb(20 24 32 / .22), 0 4px 12px rgb(20 24 32 / .10);

  /* Rozměry */
  --control-h: 40px; --control-h-sm: 32px; --control-h-touch: 48px;
  --sidebar-w: 240px; --sidebar-w-mini: 72px;
  --topbar-h: 56px; --bottomnav-h: 64px;
  --content-max: none;
  --ease: cubic-bezier(.2,.7,.2,1); --dur: 140ms;

  /* Menu je i ve světlém režimu grafitové a chová se jako v tmavém */
  --sidebar-bg:   #1c2026;
  --sidebar-text: #dfe2e7;
  --sidebar-dim:  #a0a7b2;
  --sidebar-act:  rgb(34 232 159 / .26);
  --sidebar-hov:  rgb(255 255 255 / .07);
  --sidebar-hi:       #ffffff;   /* text při najetí */
  --sidebar-act-text: #ffffff;   /* aktivní položka */
  --sidebar-bar:      #22e89f;   /* proužek a ikona aktivní položky */
  --sidebar-line:     rgb(255 255 255 / .10);   /* dělicí čáry */
  --sidebar-n-bg:     rgb(255 255 255 / .11);   /* počty u položek, hledání */
  --sidebar-av-bg:    var(--sidebar-act);       /* avatar v menu: --accent-soft by na grafitu nebyl čitelný */
  --sidebar-av-fg:    var(--sidebar-act-text);

  /* ── Aliasy starých názvů (postupně mizí ze stránek) ── */
  --text-muted:  var(--text-3);
  --accent-dim:  var(--accent-soft);
  --red:         var(--danger);
  --red-dim:     var(--danger-soft);
  --yellow-dim:  var(--warn-soft);
  --yellow-text: var(--warn);
  --r:           var(--r-lg);
  --r-xs:        var(--r-sm);
  --sh:          var(--sh-1);
  --sh-md:       var(--sh-2);
  --sh-lg:       var(--sh-3);

  color-scheme: light;
}

/* Tmavý režim: stejné názvy, jiné hodnoty. body.dark = kalendář v iframe (kalapp.html) */
[data-theme="dark"], body.dark {
  --bg:        #0f0f0e;
  --surface:   #1a1a18;
  --surface-2: #21211f;
  --surface-3: #2a2a27;
  --border:    #2e2e2b;
  --border-2:  #42423e;

  --text:   #f0f0ec;
  --text-2: #b4b4ad;   /* 8.9:1 */
  --text-3: #8f8f88;   /* 5.4:1 (dřív 2.2:1) */

  --accent:       #34c48f;
  --accent-hover: #4fd6a3;
  --accent-soft:  rgb(52 196 143 / .14);
  --accent-text:  #5ee0ad;
  --accent-on-soft: #34c48f;
  --on-accent:    #06130d;
  --focus:        #60a5fa;

  --ok: #4ade80;     --ok-soft: rgb(74 222 128 / .12);
  --warn: #fbbf24;   --warn-soft: rgb(251 191 36 / .12);
  --danger: #f87171; --danger-soft: rgb(248 113 113 / .12);
  --info: #60a5fa;   --info-soft: rgb(96 165 250 / .12);

  --st-poptavka-fg:  #fcd34d; --st-poptavka-bg:  rgb(251 191 36 / .14); --st-poptavka-dot:  #fbbf24;
  --st-zamereni-fg:  #c4b5fd; --st-zamereni-bg:  rgb(167 139 250 / .16); --st-zamereni-dot:  #a78bfa;
  --st-domluveno-fg: #6ee7b7; --st-domluveno-bg: rgb(52 211 153 / .14); --st-domluveno-dot: #34d399;
  --st-realizace-fg: #93c5fd; --st-realizace-bg: rgb(96 165 250 / .16); --st-realizace-dot: #60a5fa;
  --st-hotovo-fg:    #e5e7eb; --st-hotovo-bg:    rgb(229 231 235 / .10); --st-hotovo-dot:    #d1d5db;
  --st-faktura-fg:   #111827; --st-faktura-bg:   #d1d5db;               --st-faktura-dot:   #f3f4f6;
  --st-zruseno-fg:   #fca5a5; --st-zruseno-bg:   rgb(248 113 113 / .14); --st-zruseno-dot:  #f87171;

  --sh-1: 0 0 0 1px rgb(0 0 0 / .4);
  --sh-2: 0 4px 16px rgb(0 0 0 / .5);
  --sh-3: 0 16px 48px rgb(0 0 0 / .7);

  --sidebar-bg:   #0b0b0a;
  --sidebar-text: #d8d8d0;
  --sidebar-dim:  #9a9a92;
  --sidebar-act:  rgb(52 196 143 / .18);
  --sidebar-hov:  rgb(255 255 255 / .06);
  --sidebar-hi:       #ffffff;
  --sidebar-act-text: #ffffff;
  --sidebar-bar:      #34c48f;
  --sidebar-line:     rgb(255 255 255 / .08);
  --sidebar-n-bg:     rgb(255 255 255 / .1);
  --sidebar-av-bg:    rgb(52 196 143 / .14);
  --sidebar-av-fg:    #5ee0ad;

  color-scheme: dark;
}
