/*
 * theme.css — design tokens (Layer 2). Re-skin a client by editing this file only.
 * Brand colours (--brand-*) are overwritten from admin settings by partials/theme-vars.
 */

@font-face {
  font-family: "Inter";
  src: url("../../vendor/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("../../vendor/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../../vendor/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root,
[data-bs-theme="light"] {
  /* Brand (defaults; replaced from DB) */
  --brand-primary: #0e7c66;
  --brand-primary-rgb: 14, 124, 102;
  --brand-primary-strong: #0a5c4c;
  --brand-primary-text: #0b6b58;
  --brand-primary-contrast: #ffffff;
  --brand-secondary: #b8892e;
  --brand-secondary-rgb: 184, 137, 46;
  --brand-secondary-text: #8a6620;
  --brand-secondary-contrast: #ffffff;

  /* Neutrals */
  --surface-0: #f3f5f7;
  --surface-1: #ffffff;
  --surface-2: #eef1f4;
  --surface-3: #e4e9ee;
  --surface-inverse: #0c1417;
  --text-strong: #0f1a1e;
  --text-body: #2b3a40;
  --text-muted: #5f6e75;
  --text-faint: #8a979d;
  --border: #e1e6ea;
  --border-strong: #cfd7dc;

  /* Status */
  --success: #15803d;
  --success-rgb: 21, 128, 61;
  --danger: #c2261d;
  --danger-rgb: 194, 38, 29;
  --warning: #b45309;
  --warning-rgb: 180, 83, 9;
  --info: #0369a1;
  --info-rgb: 3, 105, 161;

  /* Shape */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15, 26, 30, .05);
  --shadow-card: 0 1px 2px rgba(15, 26, 30, .04), 0 6px 20px rgba(15, 26, 30, .04);
  --shadow-pop: 0 12px 40px rgba(15, 26, 30, .14);
  --ring: 0 0 0 .25rem rgba(var(--brand-primary-rgb), .22);

  /* Type */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Manrope", var(--font-body);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Layout */
  --hero-from: #0f1c20;
  --hero-to: #0a1215;

  --sidebar-width: 264px;
  --sidebar-collapsed: 76px;
  --topbar-height: 64px;
  --bottomnav-height: 64px;

  /* Sidebar (dark style by default) */
  --sidebar-bg: #0c1417;
  --sidebar-text: #aab7bc;
  --sidebar-text-strong: #f2f6f7;
  --sidebar-muted: #66767c;
  --sidebar-hover: rgba(255, 255, 255, .06);
  --sidebar-active-bg: rgba(var(--brand-primary-rgb), .18);
  --sidebar-active-text: #ffffff;
  --sidebar-border: rgba(255, 255, 255, .06);
}

[data-bs-theme="dark"] {
  --surface-0: #0a1013;
  --surface-1: #11191d;
  --surface-2: #172227;
  --surface-3: #1f2c32;
  --surface-inverse: #f3f5f7;
  --text-strong: #eef3f4;
  --text-body: #c9d3d6;
  --text-muted: #8d9ca2;
  --text-faint: #66767c;
  --border: #203036;
  --border-strong: #2c3e45;

  --success: #34c26f;
  --success-rgb: 52, 194, 111;
  --danger: #f06a5f;
  --danger-rgb: 240, 106, 95;
  --warning: #f0a53a;
  --warning-rgb: 240, 165, 58;
  --info: #45a8e0;
  --info-rgb: 69, 168, 224;

  --shadow-sm: none;
  --shadow-card: none;
  --shadow-pop: 0 16px 48px rgba(0, 0, 0, .5);

  --sidebar-bg: #0d1518;
}

/* Sidebar styles from the theme_sidebar_style setting */
[data-sidebar="light"] {
  --sidebar-bg: var(--surface-1);
  --sidebar-text: var(--text-muted);
  --sidebar-text-strong: var(--text-strong);
  --sidebar-muted: var(--text-faint);
  --sidebar-hover: var(--surface-2);
  --sidebar-active-bg: rgba(var(--brand-primary-rgb), .1);
  --sidebar-active-text: var(--brand-primary-text);
  --sidebar-border: var(--border);
}

[data-sidebar="brand"] {
  --sidebar-bg: var(--brand-primary-strong);
  --sidebar-text: rgba(255, 255, 255, .72);
  --sidebar-text-strong: #ffffff;
  --sidebar-muted: rgba(255, 255, 255, .5);
  --sidebar-hover: rgba(255, 255, 255, .08);
  --sidebar-active-bg: rgba(255, 255, 255, .16);
  --sidebar-active-text: #ffffff;
  --sidebar-border: rgba(255, 255, 255, .1);
}
