/* theme.css — shared by the landing page and the dataview app.
   Light theme by default; dark theme follows Catppuccin Mocha. */

:root {
  --font-ui: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --brand: var(--accent);
  --brand-ink: #06281f;
  --muted: var(--text-muted);
  --page-bg: #f3f6f4;
  --card-bg: #ffffff;
  --surface-2: #f6f8f7;
  --chart-bg: #f8faf9;
  --border: #dde3df;
  --text-main: #14201b;
  --text-muted: #5c6b64;

  --accent: #10b981;
  --accent-dark: #047857;
  --accent-soft: #d7f5e8;
  --btn-bg: #047857;
  --btn-bg-hover: #065f46;
  --on-accent: #ffffff;
  --danger: #dc2626;

  --sidebar-bg: #0f3d30;
  --sidebar-head: #0a2e24;
  --sidebar-text: #e3f2ec;
  --hero-bg: #0f3d30;
  --hero-text: #f1faf5;

  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 1px 2px rgba(15, 61, 48, 0.06);
}

html[data-bs-theme="dark"] {
  --page-bg: #1e1e2e;
  --card-bg: #181825;
  --surface-2: #313244;
  --chart-bg: #1e1e2e;
  --border: #45475a;
  --text-main: #cdd6f4;
  --text-muted: #a6adc8;

  --accent: #a6e3a1;
  --accent-dark: #a6e3a1;
  --accent-soft: rgba(166, 227, 161, 0.16);
  --btn-bg: #a6e3a1;
  --btn-bg-hover: #94e2d5;
  --on-accent: #11111b;
  --danger: #f38ba8;

  --sidebar-bg: #181825;
  --sidebar-head: #11111b;
  --sidebar-text: #cdd6f4;
  --hero-bg: #11111b;
  --hero-text: #cdd6f4;
  --shadow-card: none;
}

/* Point Bootstrap 5.3 at the same tokens */
html[data-bs-theme] {
  --bs-body-font-family: var(--font-ui);
  --bs-body-bg: var(--page-bg);
  --bs-body-color: var(--text-main);
  --bs-emphasis-color: var(--text-main);
  --bs-secondary-color: var(--text-muted);
  --bs-tertiary-bg: var(--surface-2);
  --bs-border-color: var(--border);
}

body {
  font-family: var(--font-ui);
  background: var(--page-bg);
  color: var(--text-main);
}

:focus-visible {
  outline: 2px solid var(--accent-dark);
  outline-offset: 2px;
}

/* Theme toggle button */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--accent-soft);
}

html[data-bs-theme="dark"] .theme-moon,
html[data-bs-theme="light"] .theme-sun {
  display: none;
}