/*
 * Design tokens of the admin panel: font, colours of both themes, Bootstrap variables.
 * Bootstrap is customised only through its CSS variables (no Sass, no !important).
 * Dark theme = the navy palette of the old panel; light theme = slate on white.
 */
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/fonts/roboto/roboto-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/fonts/roboto/roboto-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root,
[data-bs-theme="light"] {
  --bs-font-sans-serif: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-body-font-size: 0.875rem;
  --bs-primary: #1d4ed8;
  --bs-primary-rgb: 29, 78, 216;
  --bs-link-color: #1d4ed8;
  --bs-link-color-rgb: 29, 78, 216;
  --bs-link-hover-color: #1e40af;
  --bs-link-hover-color-rgb: 30, 64, 175;
  --bs-body-bg: #f1f5f9;
  --bs-body-bg-rgb: 241, 245, 249;
  --bs-body-color: #1e293b;
  --bs-secondary-color: rgba(30, 41, 59, 0.68);
  --bs-border-color: #e2e8f0;
  --bs-border-radius: 0.5rem;
  --bs-focus-ring-color: rgba(29, 78, 216, 0.25);

  --adm-surface: #ffffff;
  --adm-surface-2: #f8fafc;
  --adm-hover: rgba(15, 23, 42, 0.05);
  --adm-sidebar-bg: #1e3a8a;
  --adm-sidebar-color: rgba(255, 255, 255, 0.72);
  --adm-sidebar-active-bg: #f1f5f9;
  --adm-sidebar-active-color: #1e293b;
  --adm-sidebar-muted: rgba(255, 255, 255, 0.45);
  --adm-topbar-bg: rgba(241, 245, 249, 0.86);
  --adm-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.05);
  --adm-chart-grid: rgba(15, 23, 42, 0.08);
  --adm-chart-text: #64748b;
  --adm-accent: #1d4ed8;
  --adm-accent-soft: rgba(29, 78, 216, 0.12);
}

[data-bs-theme="dark"] {
  --bs-primary: #3b82f6;
  --bs-primary-rgb: 59, 130, 246;
  --bs-link-color: #7aa7fa;
  --bs-link-color-rgb: 122, 167, 250;
  --bs-link-hover-color: #a5c3fb;
  --bs-link-hover-color-rgb: 165, 195, 251;
  --bs-body-bg: #1b253b;
  --bs-body-bg-rgb: 27, 37, 59;
  --bs-body-color: #cbd5e1;
  --bs-body-color-rgb: 203, 213, 225;
  --bs-emphasis-color: #f1f5f9;
  --bs-secondary-color: rgba(203, 213, 225, 0.65);
  --bs-secondary-bg: #232d45;
  --bs-tertiary-bg: #28334e;
  --bs-border-color: #33415f;
  --bs-heading-color: #e2e8f0;

  --adm-surface: #28334e;
  --adm-surface-2: #232d45;
  --adm-hover: rgba(255, 255, 255, 0.05);
  --adm-sidebar-bg: #1b253b;
  --adm-sidebar-color: rgba(203, 213, 225, 0.72);
  --adm-sidebar-active-bg: #28334e;
  --adm-sidebar-active-color: #f1f5f9;
  --adm-sidebar-muted: rgba(203, 213, 225, 0.4);
  --adm-topbar-bg: rgba(27, 37, 59, 0.86);
  --adm-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 6px 20px rgba(0, 0, 0, 0.18);
  --adm-chart-grid: rgba(203, 213, 225, 0.1);
  --adm-chart-text: #94a3b8;
  --adm-accent: #3b82f6;
  --adm-accent-soft: rgba(59, 130, 246, 0.16);
}

/* Bootstrap components through their own variables */
.btn-primary {
  --bs-btn-bg: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-hover-bg: #1e40af;
  --bs-btn-hover-border-color: #1e40af;
  --bs-btn-active-bg: #1e3a8a;
  --bs-btn-active-border-color: #1e3a8a;
  --bs-btn-disabled-bg: var(--bs-primary);
  --bs-btn-disabled-border-color: var(--bs-primary);
}
[data-bs-theme="dark"] .btn-primary {
  --bs-btn-bg: #1d4ed8;
  --bs-btn-border-color: #1d4ed8;
  --bs-btn-hover-bg: #2563eb;
  --bs-btn-hover-border-color: #2563eb;
}
.form-check-input:checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}
.nav-pills {
  --bs-nav-pills-link-active-bg: var(--bs-primary);
}
.list-group {
  --bs-list-group-active-bg: var(--bs-primary);
  --bs-list-group-active-border-color: var(--bs-primary);
}
.pagination {
  --bs-pagination-active-bg: var(--bs-primary);
  --bs-pagination-active-border-color: var(--bs-primary);
}
