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

@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../lib/inter/InterVariable-Italic.woff2") format("woff2");
}

/* Tokens — tema claro */
:root,
[data-bs-theme=light] {
  --bs-font-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);
  --bs-body-font-size: 0.9375rem;
  --bs-body-line-height: 1.55;

  --bs-primary: #4f46e5;
  --bs-primary-rgb: 79, 70, 229;
  --bs-primary-text-emphasis: #3730a3;
  --bs-primary-bg-subtle: #eef2ff;
  --bs-primary-border-subtle: #c7d2fe;

  --bs-secondary: #64748b;
  --bs-secondary-rgb: 100, 116, 139;
  --bs-secondary-text-emphasis: #334155;
  --bs-secondary-bg-subtle: #f1f5f9;
  --bs-secondary-border-subtle: #cbd5e1;

  --bs-success: #16a34a;
  --bs-success-rgb: 22, 163, 74;
  --bs-success-text-emphasis: #166534;
  --bs-success-bg-subtle: #f0fdf4;
  --bs-success-border-subtle: #bbf7d0;

  --bs-danger: #dc2626;
  --bs-danger-rgb: 220, 38, 38;
  --bs-danger-text-emphasis: #991b1b;
  --bs-danger-bg-subtle: #fef2f2;
  --bs-danger-border-subtle: #fecaca;

  --bs-warning: #d97706;
  --bs-warning-rgb: 217, 119, 6;
  --bs-warning-text-emphasis: #92400e;
  --bs-warning-bg-subtle: #fffbeb;
  --bs-warning-border-subtle: #fde68a;

  --bs-info: #0284c7;
  --bs-info-rgb: 2, 132, 199;
  --bs-info-text-emphasis: #075985;
  --bs-info-bg-subtle: #f0f9ff;
  --bs-info-border-subtle: #bae6fd;

  --bs-body-color: #0f172a;
  --bs-body-color-rgb: 15, 23, 42;
  --bs-body-bg: #ffffff;
  --bs-body-bg-rgb: 255, 255, 255;
  --bs-secondary-color: rgba(71, 85, 105, 0.9);
  --bs-secondary-bg: #f1f5f9;
  --bs-tertiary-bg: #f8fafc;
  --bs-tertiary-bg-rgb: 248, 250, 252;
  --bs-emphasis-color: #020617;
  --bs-border-color: #e2e8f0;
  --bs-border-color-translucent: rgba(15, 23, 42, 0.08);

  --bs-link-color: #4f46e5;
  --bs-link-color-rgb: 79, 70, 229;
  --bs-link-hover-color: #4338ca;
  --bs-link-hover-color-rgb: 67, 56, 202;

  --bs-border-radius: 0.5rem;
  --bs-border-radius-sm: 0.375rem;
  --bs-border-radius-lg: 0.75rem;
  --bs-border-radius-xl: 1rem;

  --bs-box-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --bs-box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  --bs-box-shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

  --bs-focus-ring-color: rgba(79, 70, 229, 0.25);
  --bs-form-valid-color: var(--bs-success);
  --bs-form-valid-border-color: var(--bs-success);
  --bs-form-invalid-color: var(--bs-danger);
  --bs-form-invalid-border-color: var(--bs-danger);

  --erp-primaria-hover: #4338ca;
  --erp-primaria-active: #3730a3;
  --erp-primaria-contraste: #ffffff;

  --erp-sidebar-largura: 248px;
  --erp-sidebar-largura-recolhida: 72px;
  --erp-sidebar-bg: #ffffff;
  --erp-sidebar-cor: #475569;
  --erp-sidebar-titulo: #94a3b8;
  --erp-sidebar-hover-bg: #f1f5f9;
  --erp-sidebar-ativo-bg: #eef2ff;
  --erp-sidebar-ativo-cor: #4338ca;
  --erp-marca-inicio: #6366f1;
  --erp-marca-fim: #4338ca;
  --erp-topbar-altura: 60px;
}

/* Tokens — tema escuro */
[data-bs-theme=dark] {
  color-scheme: dark;

  --bs-primary: #818cf8;
  --bs-primary-rgb: 129, 140, 248;
  --bs-primary-text-emphasis: #c7d2fe;
  --bs-primary-bg-subtle: rgba(99, 102, 241, 0.16);
  --bs-primary-border-subtle: rgba(129, 140, 248, 0.4);

  --bs-secondary: #94a3b8;
  --bs-secondary-rgb: 148, 163, 184;
  --bs-secondary-text-emphasis: #cbd5e1;
  --bs-secondary-bg-subtle: rgba(148, 163, 184, 0.14);
  --bs-secondary-border-subtle: rgba(148, 163, 184, 0.35);

  --bs-success: #4ade80;
  --bs-success-rgb: 74, 222, 128;
  --bs-success-text-emphasis: #86efac;
  --bs-success-bg-subtle: rgba(34, 197, 94, 0.14);
  --bs-success-border-subtle: rgba(74, 222, 128, 0.35);

  --bs-danger: #f87171;
  --bs-danger-rgb: 248, 113, 113;
  --bs-danger-text-emphasis: #fca5a5;
  --bs-danger-bg-subtle: rgba(239, 68, 68, 0.14);
  --bs-danger-border-subtle: rgba(248, 113, 113, 0.35);

  --bs-warning: #fbbf24;
  --bs-warning-rgb: 251, 191, 36;
  --bs-warning-text-emphasis: #fcd34d;
  --bs-warning-bg-subtle: rgba(245, 158, 11, 0.14);
  --bs-warning-border-subtle: rgba(251, 191, 36, 0.35);

  --bs-info: #38bdf8;
  --bs-info-rgb: 56, 189, 248;
  --bs-info-text-emphasis: #7dd3fc;
  --bs-info-bg-subtle: rgba(14, 165, 233, 0.14);
  --bs-info-border-subtle: rgba(56, 189, 248, 0.35);

  --bs-body-color: #e2e8f0;
  --bs-body-color-rgb: 226, 232, 240;
  --bs-body-bg: #1e293b;
  --bs-body-bg-rgb: 30, 41, 59;
  --bs-secondary-color: rgba(148, 163, 184, 0.95);
  --bs-secondary-bg: #273449;
  --bs-tertiary-bg: #0f172a;
  --bs-tertiary-bg-rgb: 15, 23, 42;
  --bs-emphasis-color: #f8fafc;
  --bs-border-color: #334155;
  --bs-border-color-translucent: rgba(226, 232, 240, 0.1);

  --bs-link-color: #a5b4fc;
  --bs-link-color-rgb: 165, 180, 252;
  --bs-link-hover-color: #c7d2fe;
  --bs-link-hover-color-rgb: 199, 210, 254;

  --bs-box-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --bs-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  --bs-box-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);

  --bs-focus-ring-color: rgba(129, 140, 248, 0.35);

  --erp-primaria-hover: #6366f1;
  --erp-primaria-active: #4f46e5;
  --erp-primaria-contraste: #0f172a;

  --erp-sidebar-bg: #111827;
  --erp-sidebar-cor: #94a3b8;
  --erp-sidebar-titulo: #64748b;
  --erp-sidebar-hover-bg: #1e293b;
  --erp-sidebar-ativo-bg: rgba(99, 102, 241, 0.18);
  --erp-sidebar-ativo-cor: #c7d2fe;
  --erp-marca-inicio: #6366f1;
  --erp-marca-fim: #4338ca;
}

/* Base */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--bs-emphasis-color);
}

.table, .text-end, input[inputmode=decimal] {
  font-variant-numeric: tabular-nums;
}

::selection {
  background-color: rgba(var(--bs-primary-rgb), 0.2);
}

/* Botões */
.btn {
  --bs-btn-font-weight: 500;
  --bs-btn-padding-x: 0.9rem;
  --bs-btn-padding-y: 0.45rem;
  --bs-btn-font-size: 0.9rem;
  --bs-btn-focus-box-shadow: 0 0 0 0.2rem var(--bs-focus-ring-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: color .15s, background-color .15s, border-color .15s, box-shadow .15s;
}

.btn-sm {
  --bs-btn-padding-x: 0.6rem;
  --bs-btn-padding-y: 0.25rem;
  --bs-btn-font-size: 0.8125rem;
}

.btn-primary {
  --bs-btn-color: var(--erp-primaria-contraste);
  --bs-btn-bg: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-hover-color: var(--erp-primaria-contraste);
  --bs-btn-hover-bg: var(--erp-primaria-hover);
  --bs-btn-hover-border-color: var(--erp-primaria-hover);
  --bs-btn-active-color: var(--erp-primaria-contraste);
  --bs-btn-active-bg: var(--erp-primaria-active);
  --bs-btn-active-border-color: var(--erp-primaria-active);
  --bs-btn-disabled-color: var(--erp-primaria-contraste);
  --bs-btn-disabled-bg: var(--bs-primary);
  --bs-btn-disabled-border-color: var(--bs-primary);
  box-shadow: var(--bs-box-shadow-sm);
}

.btn-outline-primary {
  --bs-btn-color: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary-border-subtle);
  --bs-btn-hover-color: var(--bs-primary-text-emphasis);
  --bs-btn-hover-bg: var(--bs-primary-bg-subtle);
  --bs-btn-hover-border-color: var(--bs-primary-border-subtle);
  --bs-btn-active-color: var(--bs-primary-text-emphasis);
  --bs-btn-active-bg: var(--bs-primary-bg-subtle);
  --bs-btn-active-border-color: var(--bs-primary);
}

.btn-outline-secondary {
  --bs-btn-color: var(--bs-body-color);
  --bs-btn-bg: var(--bs-body-bg);
  --bs-btn-border-color: var(--bs-border-color);
  --bs-btn-hover-color: var(--bs-emphasis-color);
  --bs-btn-hover-bg: var(--bs-secondary-bg);
  --bs-btn-hover-border-color: var(--bs-border-color);
  --bs-btn-active-color: var(--bs-emphasis-color);
  --bs-btn-active-bg: var(--bs-secondary-bg);
  --bs-btn-active-border-color: var(--bs-secondary-border-subtle);
}

.btn-outline-danger {
  --bs-btn-color: var(--bs-danger);
  --bs-btn-border-color: var(--bs-danger-border-subtle);
  --bs-btn-hover-color: var(--bs-danger-text-emphasis);
  --bs-btn-hover-bg: var(--bs-danger-bg-subtle);
  --bs-btn-hover-border-color: var(--bs-danger-border-subtle);
  --bs-btn-active-color: var(--bs-danger-text-emphasis);
  --bs-btn-active-bg: var(--bs-danger-bg-subtle);
  --bs-btn-active-border-color: var(--bs-danger);
}

.btn-icone {
  --bs-btn-padding-x: 0.5rem;
  --bs-btn-padding-y: 0.4rem;
  --bs-btn-color: var(--bs-secondary-color);
  --bs-btn-hover-color: var(--bs-emphasis-color);
  --bs-btn-hover-bg: var(--bs-secondary-bg);
  --bs-btn-active-bg: var(--bs-secondary-bg);
  --bs-btn-active-color: var(--bs-emphasis-color);
  --bs-btn-border-color: transparent;
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-border-color: transparent;
  font-size: 1.1rem;
  line-height: 1;
}

/* Formulários */
.form-label {
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
  color: var(--bs-emphasis-color);
}

.form-control, .form-select {
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  border-color: var(--bs-border-color);
  box-shadow: var(--bs-box-shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}

.form-select {
  padding-right: 2.25rem;
}

.form-control:focus, .form-select:focus {
  border-color: rgba(var(--bs-primary-rgb), 0.6);
  box-shadow: 0 0 0 0.2rem var(--bs-focus-ring-color);
}

.form-control::placeholder {
  color: var(--bs-secondary-color);
  opacity: 0.7;
}

.form-check-input:checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.form-check-input:indeterminate {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.form-check-input:focus {
  border-color: rgba(var(--bs-primary-rgb), 0.6);
  box-shadow: 0 0 0 0.2rem var(--bs-focus-ring-color);
}

.form-text {
  font-size: 0.8125rem;
}

.field-validation-error {
  display: block;
  margin-top: 0.25rem;
}

.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Cards */
.card {
  --bs-card-border-color: var(--bs-border-color);
  --bs-card-border-radius: var(--bs-border-radius-lg);
  --bs-card-inner-border-radius: calc(var(--bs-border-radius-lg) - 1px);
  --bs-card-cap-bg: var(--bs-tertiary-bg);
  --bs-card-bg: var(--bs-body-bg);
  box-shadow: var(--bs-box-shadow-sm);
}

.card.shadow-sm {
  box-shadow: var(--bs-box-shadow-sm) !important;
}

.card > .table-responsive {
  border-radius: var(--bs-card-inner-border-radius);
}

.card-header {
  font-weight: 500;
}

/* Tabelas */
.table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: rgba(var(--bs-primary-rgb), 0.04);
  --bs-table-border-color: var(--bs-border-color);
  margin-bottom: 0;
}

.table > :not(caption) > * > * {
  padding: 0.8rem 1rem;
}

.table > thead > tr > th {
  background-color: var(--bs-tertiary-bg);
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.table > tbody > tr:last-child > * {
  border-bottom: 0;
}

/* Badges suaves */
.badge {
  font-weight: 500;
  font-size: 0.75rem;
  padding: 0.3em 0.65em;
  border-radius: 999px;
  border: 1px solid transparent;
}

.badge.text-bg-success { color: var(--bs-success-text-emphasis) !important; background-color: var(--bs-success-bg-subtle) !important; border-color: var(--bs-success-border-subtle); }
.badge.text-bg-secondary { color: var(--bs-secondary-text-emphasis) !important; background-color: var(--bs-secondary-bg-subtle) !important; border-color: var(--bs-secondary-border-subtle); }
.badge.text-bg-info { color: var(--bs-info-text-emphasis) !important; background-color: var(--bs-info-bg-subtle) !important; border-color: var(--bs-info-border-subtle); }
.badge.text-bg-danger { color: var(--bs-danger-text-emphasis) !important; background-color: var(--bs-danger-bg-subtle) !important; border-color: var(--bs-danger-border-subtle); }
.badge.text-bg-warning { color: var(--bs-warning-text-emphasis) !important; background-color: var(--bs-warning-bg-subtle) !important; border-color: var(--bs-warning-border-subtle); }
.badge.text-bg-primary { color: var(--bs-primary-text-emphasis) !important; background-color: var(--bs-primary-bg-subtle) !important; border-color: var(--bs-primary-border-subtle); }

/* Alerts */
.alert {
  --bs-alert-border-radius: var(--bs-border-radius);
  border-left-width: 4px;
  font-size: 0.9rem;
}

.alert-success { border-left-color: var(--bs-success); }
.alert-danger { border-left-color: var(--bs-danger); }
.alert-warning { border-left-color: var(--bs-warning); }
.alert-info { border-left-color: var(--bs-info); }

.alert ul {
  margin-bottom: 0;
  padding-left: 1rem;
}

/* Dropdown */
.dropdown-menu {
  --bs-dropdown-border-color: var(--bs-border-color);
  --bs-dropdown-border-radius: var(--bs-border-radius);
  --bs-dropdown-box-shadow: var(--bs-box-shadow-lg);
  --bs-dropdown-link-active-bg: var(--bs-primary-bg-subtle);
  --bs-dropdown-link-active-color: var(--bs-primary-text-emphasis);
  --bs-dropdown-item-padding-y: 0.45rem;
  --bs-dropdown-font-size: 0.9rem;
  padding: 0.35rem;
  box-shadow: var(--bs-dropdown-box-shadow);
}

.dropdown-item {
  border-radius: var(--bs-border-radius-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Cabeçalho de página */
.cabecalho-pagina {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.cabecalho-pagina h1 {
  font-size: 1.375rem;
  margin-bottom: 0;
}

.cabecalho-pagina p {
  margin: 0.15rem 0 0;
  color: var(--bs-secondary-color);
  font-size: 0.9rem;
}

/* Estrutura com sidebar */
.app {
  display: flex;
  min-height: 100vh;
  background-color: var(--bs-tertiary-bg);
}

.sidebar {
  --bs-offcanvas-width: var(--erp-sidebar-largura);
  --bs-offcanvas-bg: var(--erp-sidebar-bg);
  background-color: var(--erp-sidebar-bg);
  border-right: 1px solid var(--bs-border-color);
}

.sidebar-marca {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  height: var(--erp-topbar-altura);
  padding: 0 1.25rem;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--bs-emphasis-color);
  text-decoration: none;
  white-space: nowrap;
  min-width: 0;
  border-bottom: 1px solid var(--bs-border-color);
}

.sidebar-marca .sidebar-texto {
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-marca:hover {
  color: var(--bs-emphasis-color);
}

.marca-icone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--bs-border-radius);
  background: linear-gradient(135deg, var(--erp-marca-inicio), var(--erp-marca-fim));
  color: #ffffff;
  font-size: 1rem;
}

.sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 0.75rem;
  overflow-y: auto;
}

.sidebar-titulo {
  padding: 1rem 0.75rem 0.4rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--erp-sidebar-titulo);
  white-space: nowrap;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  margin-bottom: 2px;
  border-radius: var(--bs-border-radius);
  color: var(--erp-sidebar-cor);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s, color .15s;
}

.sidebar-link > .bi {
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 1.25rem;
  text-align: center;
}

.sidebar-link:hover {
  background-color: var(--erp-sidebar-hover-bg);
  color: var(--bs-emphasis-color);
}

.sidebar-link.active {
  background-color: var(--erp-sidebar-ativo-bg);
  color: var(--erp-sidebar-ativo-cor);
}

.app-principal {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: var(--erp-topbar-altura);
  padding: 0 1.25rem;
  background-color: rgba(var(--bs-body-bg-rgb), 0.85);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--bs-border-color);
}

.topbar-titulo {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--bs-emphasis-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--bs-primary-bg-subtle);
  color: var(--bs-primary-text-emphasis);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.app-conteudo {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 2rem;
}

.app-rodape {
  padding: 1rem 1.5rem;
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
  text-align: center;
}

@media (min-width: 992px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    width: var(--erp-sidebar-largura);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: width .2s ease;
  }

  .sidebar .offcanvas-body {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
  }

  .sidebar-recolhida .sidebar {
    width: var(--erp-sidebar-largura-recolhida);
  }

  .sidebar-recolhida .sidebar-marca {
    justify-content: center;
    padding: 0;
  }

  .sidebar-recolhida .sidebar-texto {
    display: none;
  }

  .sidebar-recolhida .sidebar-titulo {
    height: 1px;
    padding: 0;
    margin: 0.75rem 0.5rem;
    background-color: var(--bs-border-color);
    font-size: 0;
  }

  .sidebar-recolhida .sidebar-link {
    justify-content: center;
    padding: 0.6rem 0;
  }

  .app-conteudo {
    padding: 2rem 2rem 2.5rem;
  }
}

[data-bs-theme=dark] .tema-icone-claro,
[data-bs-theme=light] .tema-icone-escuro {
  display: none;
}

/* Telas públicas (login) */
.publico {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bs-tertiary-bg);
  background-image: radial-gradient(circle at 15% 0%, rgba(var(--bs-primary-rgb), 0.12), transparent 45%),
                    radial-gradient(circle at 85% 100%, rgba(var(--bs-primary-rgb), 0.08), transparent 40%);
}

.publico-conteudo {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.publico-cartao {
  width: 100%;
  max-width: 400px;
}

.marca-icone-lg {
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
}

/* Paletas de cores da organização (data-erp-paleta no <html>). Índigo é o padrão, definido nos tokens acima. */

[data-erp-paleta=azul] {
  --bs-primary: #2563eb;
  --bs-primary-rgb: 37, 99, 235;
  --bs-primary-text-emphasis: #1e40af;
  --bs-primary-bg-subtle: #eff6ff;
  --bs-primary-border-subtle: #bfdbfe;
  --bs-link-color: #2563eb;
  --bs-link-color-rgb: 37, 99, 235;
  --bs-link-hover-color: #1d4ed8;
  --bs-link-hover-color-rgb: 29, 78, 216;
  --bs-focus-ring-color: rgba(37, 99, 235, 0.25);
  --erp-primaria-hover: #1d4ed8;
  --erp-primaria-active: #1e40af;
  --erp-sidebar-ativo-bg: #eff6ff;
  --erp-sidebar-ativo-cor: #1d4ed8;
  --erp-marca-inicio: #3b82f6;
  --erp-marca-fim: #1d4ed8;
}

[data-bs-theme=dark][data-erp-paleta=azul] {
  --bs-primary: #60a5fa;
  --bs-primary-rgb: 96, 165, 250;
  --bs-primary-text-emphasis: #bfdbfe;
  --bs-primary-bg-subtle: rgba(59, 130, 246, 0.16);
  --bs-primary-border-subtle: rgba(96, 165, 250, 0.4);
  --bs-link-color: #93c5fd;
  --bs-link-color-rgb: 147, 197, 253;
  --bs-link-hover-color: #bfdbfe;
  --bs-link-hover-color-rgb: 191, 219, 254;
  --bs-focus-ring-color: rgba(96, 165, 250, 0.35);
  --erp-primaria-hover: #3b82f6;
  --erp-primaria-active: #2563eb;
  --erp-sidebar-ativo-bg: rgba(59, 130, 246, 0.18);
  --erp-sidebar-ativo-cor: #bfdbfe;
  --erp-marca-inicio: #3b82f6;
  --erp-marca-fim: #2563eb;
}

[data-erp-paleta=verde] {
  --bs-primary: #15803d;
  --bs-primary-rgb: 21, 128, 61;
  --bs-primary-text-emphasis: #14532d;
  --bs-primary-bg-subtle: #f0fdf4;
  --bs-primary-border-subtle: #bbf7d0;
  --bs-link-color: #15803d;
  --bs-link-color-rgb: 21, 128, 61;
  --bs-link-hover-color: #166534;
  --bs-link-hover-color-rgb: 22, 101, 52;
  --bs-focus-ring-color: rgba(21, 128, 61, 0.25);
  --erp-primaria-hover: #166534;
  --erp-primaria-active: #14532d;
  --erp-sidebar-ativo-bg: #f0fdf4;
  --erp-sidebar-ativo-cor: #166534;
  --erp-marca-inicio: #22c55e;
  --erp-marca-fim: #166534;
}

[data-bs-theme=dark][data-erp-paleta=verde] {
  --bs-primary: #4ade80;
  --bs-primary-rgb: 74, 222, 128;
  --bs-primary-text-emphasis: #bbf7d0;
  --bs-primary-bg-subtle: rgba(34, 197, 94, 0.16);
  --bs-primary-border-subtle: rgba(74, 222, 128, 0.4);
  --bs-link-color: #86efac;
  --bs-link-color-rgb: 134, 239, 172;
  --bs-link-hover-color: #bbf7d0;
  --bs-link-hover-color-rgb: 187, 247, 208;
  --bs-focus-ring-color: rgba(74, 222, 128, 0.35);
  --erp-primaria-hover: #22c55e;
  --erp-primaria-active: #16a34a;
  --erp-sidebar-ativo-bg: rgba(34, 197, 94, 0.18);
  --erp-sidebar-ativo-cor: #bbf7d0;
  --erp-marca-inicio: #22c55e;
  --erp-marca-fim: #16a34a;
}

[data-erp-paleta=laranja] {
  --bs-primary: #c2410c;
  --bs-primary-rgb: 194, 65, 12;
  --bs-primary-text-emphasis: #7c2d12;
  --bs-primary-bg-subtle: #fff7ed;
  --bs-primary-border-subtle: #fed7aa;
  --bs-link-color: #c2410c;
  --bs-link-color-rgb: 194, 65, 12;
  --bs-link-hover-color: #9a3412;
  --bs-link-hover-color-rgb: 154, 52, 18;
  --bs-focus-ring-color: rgba(194, 65, 12, 0.25);
  --erp-primaria-hover: #9a3412;
  --erp-primaria-active: #7c2d12;
  --erp-sidebar-ativo-bg: #fff7ed;
  --erp-sidebar-ativo-cor: #9a3412;
  --erp-marca-inicio: #f97316;
  --erp-marca-fim: #9a3412;
}

[data-bs-theme=dark][data-erp-paleta=laranja] {
  --bs-primary: #fb923c;
  --bs-primary-rgb: 251, 146, 60;
  --bs-primary-text-emphasis: #fed7aa;
  --bs-primary-bg-subtle: rgba(249, 115, 22, 0.16);
  --bs-primary-border-subtle: rgba(251, 146, 60, 0.4);
  --bs-link-color: #fdba74;
  --bs-link-color-rgb: 253, 186, 116;
  --bs-link-hover-color: #fed7aa;
  --bs-link-hover-color-rgb: 254, 215, 170;
  --bs-focus-ring-color: rgba(251, 146, 60, 0.35);
  --erp-primaria-hover: #f97316;
  --erp-primaria-active: #ea580c;
  --erp-sidebar-ativo-bg: rgba(249, 115, 22, 0.18);
  --erp-sidebar-ativo-cor: #fed7aa;
  --erp-marca-inicio: #f97316;
  --erp-marca-fim: #ea580c;
}

[data-erp-paleta=vermelho] {
  --bs-primary: #dc2626;
  --bs-primary-rgb: 220, 38, 38;
  --bs-primary-text-emphasis: #991b1b;
  --bs-primary-bg-subtle: #fef2f2;
  --bs-primary-border-subtle: #fecaca;
  --bs-link-color: #dc2626;
  --bs-link-color-rgb: 220, 38, 38;
  --bs-link-hover-color: #b91c1c;
  --bs-link-hover-color-rgb: 185, 28, 28;
  --bs-focus-ring-color: rgba(220, 38, 38, 0.25);
  --erp-primaria-hover: #b91c1c;
  --erp-primaria-active: #991b1b;
  --erp-sidebar-ativo-bg: #fef2f2;
  --erp-sidebar-ativo-cor: #b91c1c;
  --erp-marca-inicio: #ef4444;
  --erp-marca-fim: #b91c1c;
}

[data-bs-theme=dark][data-erp-paleta=vermelho] {
  --bs-primary: #f87171;
  --bs-primary-rgb: 248, 113, 113;
  --bs-primary-text-emphasis: #fecaca;
  --bs-primary-bg-subtle: rgba(239, 68, 68, 0.16);
  --bs-primary-border-subtle: rgba(248, 113, 113, 0.4);
  --bs-link-color: #fca5a5;
  --bs-link-color-rgb: 252, 165, 165;
  --bs-link-hover-color: #fecaca;
  --bs-link-hover-color-rgb: 254, 202, 202;
  --bs-focus-ring-color: rgba(248, 113, 113, 0.35);
  --erp-primaria-hover: #ef4444;
  --erp-primaria-active: #dc2626;
  --erp-sidebar-ativo-bg: rgba(239, 68, 68, 0.18);
  --erp-sidebar-ativo-cor: #fecaca;
  --erp-marca-inicio: #ef4444;
  --erp-marca-fim: #dc2626;
}

[data-erp-paleta=roxo] {
  --bs-primary: #9333ea;
  --bs-primary-rgb: 147, 51, 234;
  --bs-primary-text-emphasis: #6b21a8;
  --bs-primary-bg-subtle: #faf5ff;
  --bs-primary-border-subtle: #e9d5ff;
  --bs-link-color: #9333ea;
  --bs-link-color-rgb: 147, 51, 234;
  --bs-link-hover-color: #7e22ce;
  --bs-link-hover-color-rgb: 126, 34, 206;
  --bs-focus-ring-color: rgba(147, 51, 234, 0.25);
  --erp-primaria-hover: #7e22ce;
  --erp-primaria-active: #6b21a8;
  --erp-sidebar-ativo-bg: #faf5ff;
  --erp-sidebar-ativo-cor: #7e22ce;
  --erp-marca-inicio: #a855f7;
  --erp-marca-fim: #7e22ce;
}

[data-bs-theme=dark][data-erp-paleta=roxo] {
  --bs-primary: #c084fc;
  --bs-primary-rgb: 192, 132, 252;
  --bs-primary-text-emphasis: #e9d5ff;
  --bs-primary-bg-subtle: rgba(168, 85, 247, 0.16);
  --bs-primary-border-subtle: rgba(192, 132, 252, 0.4);
  --bs-link-color: #d8b4fe;
  --bs-link-color-rgb: 216, 180, 254;
  --bs-link-hover-color: #e9d5ff;
  --bs-link-hover-color-rgb: 233, 213, 255;
  --bs-focus-ring-color: rgba(192, 132, 252, 0.35);
  --erp-primaria-hover: #a855f7;
  --erp-primaria-active: #9333ea;
  --erp-sidebar-ativo-bg: rgba(168, 85, 247, 0.18);
  --erp-sidebar-ativo-cor: #e9d5ff;
  --erp-marca-inicio: #a855f7;
  --erp-marca-fim: #9333ea;
}

[data-erp-paleta=grafite] {
  --bs-primary: #475569;
  --bs-primary-rgb: 71, 85, 105;
  --bs-primary-text-emphasis: #1e293b;
  --bs-primary-bg-subtle: #f8fafc;
  --bs-primary-border-subtle: #e2e8f0;
  --bs-link-color: #475569;
  --bs-link-color-rgb: 71, 85, 105;
  --bs-link-hover-color: #334155;
  --bs-link-hover-color-rgb: 51, 65, 85;
  --bs-focus-ring-color: rgba(71, 85, 105, 0.25);
  --erp-primaria-hover: #334155;
  --erp-primaria-active: #1e293b;
  --erp-sidebar-ativo-bg: #f8fafc;
  --erp-sidebar-ativo-cor: #334155;
  --erp-marca-inicio: #64748b;
  --erp-marca-fim: #334155;
}

[data-bs-theme=dark][data-erp-paleta=grafite] {
  --bs-primary: #94a3b8;
  --bs-primary-rgb: 148, 163, 184;
  --bs-primary-text-emphasis: #e2e8f0;
  --bs-primary-bg-subtle: rgba(100, 116, 139, 0.16);
  --bs-primary-border-subtle: rgba(148, 163, 184, 0.4);
  --bs-link-color: #cbd5e1;
  --bs-link-color-rgb: 203, 213, 225;
  --bs-link-hover-color: #e2e8f0;
  --bs-link-hover-color-rgb: 226, 232, 240;
  --bs-focus-ring-color: rgba(148, 163, 184, 0.35);
  --erp-primaria-hover: #64748b;
  --erp-primaria-active: #475569;
  --erp-sidebar-ativo-bg: rgba(100, 116, 139, 0.18);
  --erp-sidebar-ativo-cor: #e2e8f0;
  --erp-marca-inicio: #64748b;
  --erp-marca-fim: #475569;
}

.paleta-amostra-azul { background-color: #2563eb; }
.paleta-amostra-verde { background-color: #15803d; }
.paleta-amostra-laranja { background-color: #c2410c; }
.paleta-amostra-vermelho { background-color: #dc2626; }
.paleta-amostra-roxo { background-color: #9333ea; }
.paleta-amostra-grafite { background-color: #475569; }
.paleta-amostra-indigo { background-color: #4f46e5; }

.paleta-amostra {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 1px solid var(--bs-border-color);
}

.popover-largo {
    --bs-popover-max-width: 22rem;
    font-size: 0.8125rem;
}
