/* admin-new — стиль 1:1 с маркетом prediction.casa.
   Секции хэдера, search-box, user-menu, ud-panel, hn-* копируются
   ДОСЛОВНО из public/css/styles.css (только убраны индентации).
   Меняем только background главного контента — без картинок,
   нативный --bg темы. */

/* === Fonts === */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/fonts/Inter-Variable.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-style: italic; font-weight: 100 900; font-display: swap; src: url('/fonts/Inter-Variable-Italic.ttf') format('truetype'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 100; font-display: swap; src: url('/fonts/Manrope-Light.ttf') format('truetype'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/Manrope-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/Manrope-Medium.ttf') format('truetype'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/Manrope-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/Manrope-Bold.ttf') format('truetype'); }

/* === Tokens (1:1 from public/css/styles.css :root + [data-theme="dark"]) === */
:root, [data-theme="light"] {
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  /* Единый шрифт — Inter везде, включая адреса/хеши/коды/числа (mono отключён по требованию) */
  --mono: var(--font-ui);
  --font-mono: var(--font-ui);
  --fw-adjust: -100;
  --bg: #ffffff;
  --bg-surface: #f8f8f8;
  --border: #efefef;
  --border-hover: #e0e0e0;
  --text: #6e6b6e;
  --text-strong: #101319;
  --text-muted: #8c8a8e;
  /* market muted, stored separately so the macOS token-bridge can reference it
     without a self-reference cycle (inside .admin-main we shadow --text). */
  --mkt-muted: #6e6b6e;
  --card-bg: var(--bg);
  --accent: #ed6432;
  --accent-hover: #d4552a;
  --accent-contrast: #ffffff;
  --accent-subtle: color-mix(in srgb, var(--accent) 3%, var(--bg));
  --bg-header: var(--bg);
  --accent-bg: color-mix(in srgb, var(--accent) 8%, transparent);
  --accent-bg-soft: color-mix(in srgb, var(--accent) 6%, transparent);
  --accent-shadow: color-mix(in srgb, var(--accent) 24%, transparent);
  --accent-border-soft: color-mix(in srgb, var(--accent) 22%, transparent);
  --accent-strong: var(--accent-hover);
  --green: #22c55e;
  --green-bg: color-mix(in srgb, var(--green) 12%, transparent);
  --green-hover: #16a34a;
  --red: #ef4444;
  --red-bg: color-mix(in srgb, var(--red) 12%, transparent);
  --red-hover: #dc2626;
  --blue: #3b82f6;
  --blue-bg: color-mix(in srgb, var(--blue) 12%, transparent);
  --purple: #8b5cf6;
  --yellow: #f59e0b;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  /* Chart.js palette (read by /macos/js/modules/charts.js via getComputedStyle).
     Light: visible dark hairline grid + dark tooltip (premium fintech look). */
  --chart-grid: rgba(16,19,25,0.08);
  --chart-tick: #8c8a8e;
  --chart-tip-bg: #101319;
  --chart-tip-title: #ffffff;
  --chart-tip-body: #c8ccd2;
  --chart-tip-border: transparent;
  /* Legacy macOS-admin surface/border/muted tokens — previously ALWAYS the dark
     values (legacy :root), which made unpatched .panel/.card blocks render dark
     on the light theme (the reviewer's "dark blocks on white" bug). Theming them
     here fixes those elements to light; elements already forced by theme/light.css
     !important patches are unchanged. Dark theme keeps the legacy values below. */
  --panel: #ffffff;
  --panel-2: #f8f8f8;
  --panel-3: #f1f2f4;
  --line: #efefef;
  --line-2: #e4e4e6;
  --muted: #8c8a8e;
  --muted-2: #a8a6aa;
  --bg-secondary: #f8f8f8;
}

[data-theme="dark"] {
  --bg: #15191d;
  --bg-surface: #1e2428;
  --border: #242b32;
  --border-hover: #057cd1;
  --text: #586879;
  --text-strong: #dee3e7;
  --text-muted: #6c7a89;
  --mkt-muted: #586879;
  --card-bg: #1e2428;
  --accent: #ed6432;
  --accent-hover: #f37b50;
  --accent-contrast: #ffffff;
  --bg-header: var(--bg);
  --accent-bg: color-mix(in srgb, var(--accent) 10%, transparent);
  --accent-bg-soft: color-mix(in srgb, var(--accent) 8%, transparent);
  --accent-shadow: color-mix(in srgb, var(--accent) 24%, transparent);
  --accent-border-soft: color-mix(in srgb, var(--accent) 22%, transparent);
  --accent-strong: var(--accent-hover);
  --green: #3fb950;
  --green-bg: color-mix(in srgb, var(--green) 15%, transparent);
  --green-hover: #2ea043;
  --red: #f85149;
  --red-bg: color-mix(in srgb, var(--red) 15%, transparent);
  --red-hover: #da3633;
  --blue: #58a6ff;
  --blue-bg: color-mix(in srgb, var(--blue) 10%, transparent);
  --purple: #bc8cff;
  --yellow: #d29922;
  --shadow: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.5);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.6);
  --chart-grid: rgba(255,255,255,0.07);
  --chart-tick: #6c7a89;
  --chart-tip-bg: #0c0f12;
  --chart-tip-title: #dee3e7;
  --chart-tip-body: #9aa6b2;
  --chart-tip-border: #242b32;
  /* Legacy surface/border/muted tokens — dark values identical to legacy :root,
     so the dark theme stays pixel-identical. */
  --panel: #141414;
  --panel-2: #1f1f1f;
  --panel-3: #242424;
  --line: #222;
  --line-2: #303030;
  --muted: #7a7a7a;
  --muted-2: #515151;
  --bg-secondary: #1f1f1f;
}
