/* ============================================================================
   HERMES UI · Design Tokens
   Единый источник правды для цветов, типографики, отступов и т.д.
   Все компоненты ссылаются ТОЛЬКО на эти переменные.
   ============================================================================ */

:root {
  /* --- Палитра (raw) ------------------------------------------------------ */
  --c-white:      #ffffff;
  --c-black:      #0b0f17;

  --c-slate-50:   #f7f8fa;
  --c-slate-100:  #eef1f5;
  --c-slate-200:  #e2e6ee;
  --c-slate-300:  #cbd2de;
  --c-slate-400:  #97a1b3;
  --c-slate-500:  #6b7384;
  --c-slate-600:  #4b5263;
  --c-slate-700:  #333a49;
  --c-slate-800:  #1e2430;
  --c-slate-900:  #141823;
  --c-slate-950:  #0d111a;

  --c-brand-400:  #7aa2ff;
  --c-brand-500:  #4f7cff;   /* основной бренд (Hermes) */
  --c-brand-600:  #3a63e0;

  --c-green-400:  #34d399;
  --c-green-500:  #10b981;   /* доход / положительная дельта */
  --c-red-400:    #fb7185;
  --c-red-500:    #f43f5e;   /* расход / отрицательная дельта */
  --c-amber-500:  #f59e0b;
  --c-cyan-500:   #06b6d4;
  --c-violet-500: #8b5cf6;

  /* --- Акценты команд ----------------------------------------------------- */
  --team-lions:    #f59e0b;   /* 🦁 янтарь   */
  --team-wildcats: #06b6d4;   /* 🐯 циан     */
  --team-pandas:   #10b981;   /* 🐼 зелёный  */

  /* --- Типографика -------------------------------------------------------- */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  --font-num:  "SF Mono", ui-monospace, "Roboto Mono", Menlo, monospace;

  --fs-2xs: 11px;
  --fs-xs:  12px;
  --fs-sm:  13px;
  --fs-md:  15px;
  --fs-lg:  17px;
  --fs-xl:  20px;
  --fs-2xl: 26px;
  --fs-3xl: 34px;

  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  --lh-tight: 1.15;
  --lh-base:  1.45;

  /* --- Отступы (4px scale) ------------------------------------------------ */
  --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-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   22px;
  --r-full: 999px;

  /* --- Тени --------------------------------------------------------------- */
  --shadow-sm: 0 1px 2px rgba(13, 17, 26, 0.06);
  --shadow-md: 0 4px 16px rgba(13, 17, 26, 0.08);
  --shadow-lg: 0 12px 32px rgba(13, 17, 26, 0.14);

  /* --- Прочее ------------------------------------------------------------- */
  --tap-target: 44px;          /* минимальная зона нажатия */
  --header-h:   56px;
  --nav-h:      64px;
  --maxw:       560px;         /* супер-апп всегда в одну колонку */

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast: 120ms;
  --dur-base: 220ms;
}

/* ============================================================================
   ТЕМА: LIGHT (по умолчанию)
   Семантические переменные — компоненты используют только их.
   ============================================================================ */
:root,
[data-theme="light"] {
  --bg:         var(--c-slate-50);
  --bg-elev:    var(--c-white);
  --bg-elev-2:  var(--c-slate-100);
  --bg-sunken:  var(--c-slate-100);

  --text:       var(--c-slate-900);
  --text-soft:  var(--c-slate-600);
  --text-mute:  var(--c-slate-400);
  --text-on-brand: var(--c-white);

  --border:     var(--c-slate-200);
  --border-soft: var(--c-slate-100);

  --brand:      var(--c-brand-500);
  --brand-soft: rgba(79, 124, 255, 0.12);

  --pos:        var(--c-green-500);
  --pos-soft:   rgba(16, 185, 129, 0.12);
  --neg:        var(--c-red-500);
  --neg-soft:   rgba(244, 63, 94, 0.12);

  --skeleton:   linear-gradient(90deg,
                  var(--c-slate-100) 25%,
                  var(--c-slate-200) 37%,
                  var(--c-slate-100) 63%);
  color-scheme: light;
}

/* ============================================================================
   ТЕМА: DARK
   ============================================================================ */
[data-theme="dark"] {
  --bg:         var(--c-slate-950);
  --bg-elev:    var(--c-slate-900);
  --bg-elev-2:  var(--c-slate-800);
  --bg-sunken:  var(--c-black);

  --text:       var(--c-slate-50);
  --text-soft:  var(--c-slate-300);
  --text-mute:  var(--c-slate-500);
  --text-on-brand: var(--c-white);

  --border:     rgba(255, 255, 255, 0.08);
  --border-soft: rgba(255, 255, 255, 0.05);

  --brand:      var(--c-brand-400);
  --brand-soft: rgba(122, 162, 255, 0.16);

  --pos:        var(--c-green-400);
  --pos-soft:   rgba(52, 211, 153, 0.15);
  --neg:        var(--c-red-400);
  --neg-soft:   rgba(251, 113, 133, 0.15);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);

  --skeleton:   linear-gradient(90deg,
                  var(--c-slate-800) 25%,
                  var(--c-slate-700) 37%,
                  var(--c-slate-800) 63%);
  color-scheme: dark;
}
