/* Frime design tokens — v2 reskin. Soft layer поверх существующих --color-*. */

:root {
  /* canvas */
  --f-bg: #fafaf8;
  --f-surface: #ffffff;
  --f-surface-alt: #f5f4f0;
  --f-surface-sunken: #f1efe9;
  --f-border: #e7e4dd;
  --f-border-strong: #d6d2c8;
  --f-divider: #ece9e2;

  /* text */
  --f-text: #1a1815;
  --f-text-muted: #6b665c;
  --f-text-subtle: #8f8a7e;
  --f-text-placeholder: #b4afa3;

  /* brand — освежённый бордовый */
  --f-accent: #5a1a24;
  --f-accent-hover: #6b2430;
  --f-accent-soft: #f5e6e8;
  --f-accent-soft-hover: #eed7da;
  --f-accent-text: #5a1a24;
  --f-accent-on: #ffffff;

  /* semantic */
  --f-success: #1f7a3f;
  --f-success-soft: #e6f3ea;
  --f-success-text: #1b5e20;
  --f-warning: #8a5f00;
  --f-warning-soft: #f8ebc9;
  --f-warning-text: #7a4f00;
  --f-danger: #b4202c;
  --f-danger-soft: #f9e4e6;
  --f-danger-text: #8a1c22;
  --f-info: #2b5f8e;
  --f-info-soft: #e4eef6;
  --f-info-text: #1e4a6f;

  /* charts */
  --f-chart-1: #5a1a24;
  --f-chart-2: #c2705a;
  --f-chart-3: #8a8560;
  --f-chart-4: #2b5f5f;
  --f-chart-5: #6b466b;

  /* radius */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-2xl: 22px;
  --r-pill: 999px;
  --r-full: 999px;

  /* shadows (macOS-style soft layered) */
  --f-shadow-sm: 0 1px 2px rgba(26,24,21,.04), 0 1px 1px rgba(26,24,21,.03);
  --f-shadow:    0 1px 3px rgba(26,24,21,.05), 0 4px 12px rgba(26,24,21,.04);
  --f-shadow-md: 0 4px 10px rgba(26,24,21,.06), 0 2px 4px rgba(26,24,21,.04);
  --f-shadow-lg: 0 4px 8px rgba(26,24,21,.06), 0 16px 40px rgba(26,24,21,.08);
  --f-ring:      0 0 0 3px rgba(90,26,36,.12);

  /* layout widths */
  --sidebar-w: 224px;
  --sidebar-rail-w: 56px;
  --subnav-w: 252px;
}

.dark {
  --f-bg: #0f0e0c;
  --f-surface: #171614;
  --f-surface-alt: #1e1d1a;
  --f-surface-sunken: #0b0a08;
  --f-border: #292723;
  --f-border-strong: #3a3834;
  --f-divider: #211f1c;

  --f-text: #ededea;
  --f-text-muted: #9a968d;
  --f-text-subtle: #6d6a61;
  --f-text-placeholder: #4a4843;

  --f-accent: #d9a0a8;
  --f-accent-hover: #e5b4bb;
  --f-accent-soft: #2c1a1d;
  --f-accent-soft-hover: #3a2025;
  --f-accent-text: #e5b4bb;
  --f-accent-on: #1a0a0d;

  --f-success: #4ea870; --f-success-soft: #162a1c; --f-success-text: #7dd17f;
  --f-warning: #d9a84a; --f-warning-soft: #2a2113; --f-warning-text: #e6a85a;
  --f-danger:  #e47781; --f-danger-soft:  #2a1518; --f-danger-text:  #eb7d78;
  --f-info:    #7aa8d0; --f-info-soft:    #152230; --f-info-text:    #8bc0e0;

  --f-chart-1: #d9a0a8; --f-chart-2: #e0a58a; --f-chart-3: #bab289;
  --f-chart-4: #7ab8b8; --f-chart-5: #b090b0;

  --f-shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --f-shadow:    0 1px 3px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.25);
  --f-shadow-md: 0 4px 10px rgba(0,0,0,.5);
  --f-shadow-lg: 0 4px 8px rgba(0,0,0,.4), 0 16px 40px rgba(0,0,0,.5);
  --f-ring:      0 0 0 3px rgba(217,160,168,.18);
}

/* Utility helpers */
.tabular { font-variant-numeric: tabular-nums; }
.font-mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
