/* ================================
   IDENTIDADE VISUAL TRIGENT
   Sistema de Design Corporativo
   ================================ */

/* ================================
   VARIÁVEIS DE MARCA TRIGENT
   ================================ */
:root {
  /* Cores principais da marca */
  --rp-primary: #0446F1;
  --rp-primary-dark: #032db8;
  --rp-primary-light: #3d6ef3;
  --rp-primary-lighter: #7d9ef7;
  --rp-secondary: #1e3a8a;
  --rp-accent: #3b82f6;
  
  /* Tons de cinza da paleta */
  --rp-gray-dark: #374151;
  --rp-gray: #6b7280;
  --rp-gray-light: #d1d5db;
  --rp-gray-lighter: #f3f4f6;
  --rp-white: #ffffff;
  
  /* Cores de estado */
  --rp-success: #10b981;
  --rp-warning: #f59e0b;
  --rp-error: #ef4444;
  
  /* Gradientes da marca */
  --rp-gradient-primary: linear-gradient(135deg, #0446F1 0%, #032db8 100%);
  --rp-gradient-secondary: linear-gradient(135deg, #3d6ef3 0%, #0446F1 100%);
  --rp-gradient-background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  
  /* Tipografia */
  --rp-font-primary: 'Codec Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --rp-font-secondary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ================================
   SOBRESCRITA DAS CORES BOOTSTRAP
   ================================ */

/* Cores primárias do sistema */
.bg-gradient-primary {
  background: var(--rp-gradient-primary) !important;
}

.bg-primary {
  background-color: var(--rp-primary) !important;
}

.text-primary {
  color: var(--rp-primary) !important;
}

.btn-primary {
  background-color: var(--rp-primary) !important;
  border-color: var(--rp-primary) !important;
}

.btn-primary:hover {
  background-color: var(--rp-primary-dark) !important;
  border-color: var(--rp-primary-dark) !important;
}

.btn-primary:focus,
.btn-primary:active {
  background-color: var(--rp-primary-dark) !important;
  border-color: var(--rp-primary-dark) !important;
  box-shadow: 0 0 0 0.2rem rgba(4, 70, 241, 0.25) !important;
}

/* Sidebar */
.sidebar {
  background: var(--rp-gradient-primary) !important;
}

.sidebar .nav-item .nav-link {
  color: rgba(255, 255, 255, 0.8) !important;
  background-color: transparent !important;
}

.sidebar .nav-item .nav-link:hover {
  color: var(--rp-white) !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.sidebar .nav-item.active .nav-link {
  color: var(--rp-white) !important;
  background-color: rgba(255, 255, 255, 0.15) !important;
}

.sidebar-dark .sidebar-brand {
  background-color: transparent !important;
  color: var(--rp-white) !important;
}

.sidebar .sidebar-brand {
  background-color: transparent !important;
}

.sidebar-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* Remove qualquer background diferente dos itens */
.sidebar .nav-item {
  background-color: transparent !important;
}

/* Mantém o gradiente contínuo em toda altura */
.sidebar.navbar-nav {
  background: var(--rp-gradient-primary) !important;
}

/* Remove backgrounds dos collapsed items */
.sidebar .collapse,
.sidebar .collapsing {
  background-color: transparent !important;
}

.sidebar .collapse .collapse-inner {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Classe bg-blue para submenus */
.bg-blue {
  background-color: rgba(3, 45, 184, 0.3) !important;
}

/* Texto branco nos submenus */
.sidebar .collapse-inner .collapse-header {
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: 0.65rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
}

.sidebar .collapse-inner .collapse-item {
  color: rgba(255, 255, 255, 0.9) !important;
  text-decoration: none !important;
  padding: 0.5rem 1rem !important;
  margin: 0 0.5rem !important;
  display: block !important;
  border-radius: 0.25rem !important;
}

.sidebar .collapse-inner .collapse-item:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: var(--rp-white) !important;
  text-decoration: none !important;
}

.sidebar .collapse-inner .collapse-item.active {
  background-color: rgba(255, 255, 255, 0.15) !important;
  color: var(--rp-white) !important;
  font-weight: 700 !important;
}

/* Garante que os links não mudem de cor */
.sidebar .collapse-inner a.collapse-item {
  color: rgba(255, 255, 255, 0.9) !important;
}

.sidebar .collapse-inner a.collapse-item:hover {
  color: var(--rp-white) !important;
  text-decoration: none !important;
}

/* Modifica os popups existentes quando sidebar está colapsada */
.sidebar.toggled .collapse .collapse-inner,
.navbar-nav.sidebar.toggled .nav-item .collapse .collapse-inner {
  background: var(--rp-gradient-primary) !important;
  box-shadow: 0 0.15rem 1.75rem 0 rgba(4, 70, 241, 0.15) !important;
}

.sidebar.toggled .collapse .collapse-inner .collapse-header,
.navbar-nav.sidebar.toggled .nav-item .collapse .collapse-inner .collapse-header {
  color: rgba(255, 255, 255, 0.7) !important;
}

.sidebar.toggled .collapse .collapse-inner .collapse-item,
.navbar-nav.sidebar.toggled .nav-item .collapse .collapse-inner .collapse-item {
  color: rgba(255, 255, 255, 0.9) !important;
}

.sidebar.toggled .collapse .collapse-inner .collapse-item:hover,
.navbar-nav.sidebar.toggled .nav-item .collapse .collapse-inner .collapse-item:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: var(--rp-white) !important;
}

/* Cards com bordas coloridas */
.border-left-primary {
  border-left: .25rem solid var(--rp-primary) !important;
}

.border-left-success {
  border-left: .25rem solid var(--rp-success) !important;
}

.border-left-info {
  border-left: .25rem solid var(--rp-accent) !important;
}

.border-left-warning {
  border-left: .25rem solid var(--rp-warning) !important;
}

.border-left-danger {
  border-left: .25rem solid var(--rp-error) !important;
}

/* Progress bars */
.progress-bar {
  background-color: var(--rp-primary) !important;
}

.bg-info {
  background-color: var(--rp-accent) !important;
}

.bg-success {
  background-color: var(--rp-success) !important;
}

.bg-warning {
  background-color: var(--rp-warning) !important;
}

.bg-danger {
  background-color: var(--rp-error) !important;
}

/* Badges */
.badge-primary {
  background-color: var(--rp-primary) !important;
}

.badge-success {
  background-color: var(--rp-success) !important;
}

.badge-warning {
  background-color: var(--rp-warning) !important;
  color: var(--rp-white) !important;
}

.badge-danger {
  background-color: var(--rp-error) !important;
}

.badge-info {
  background-color: var(--rp-accent) !important;
}

/* Links e textos */
a {
  color: var(--rp-primary) !important;
}

a:hover {
  color: var(--rp-primary-dark) !important;
}

.text-info {
  color: var(--rp-accent) !important;
}

.text-success {
  color: var(--rp-success) !important;
}

.text-warning {
  color: var(--rp-warning) !important;
}

.text-danger {
  color: var(--rp-error) !important;
}

/* Topbar */
.topbar {
  background-color: var(--rp-white) !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
}

.topbar .nav-link {
  color: var(--rp-gray) !important;
}

.topbar .nav-link:hover {
  color: var(--rp-primary) !important;
}

/* Dropdown menus */
.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--rp-gray-lighter) !important;
  color: var(--rp-primary) !important;
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--rp-primary) !important;
  color: var(--rp-white) !important;
}

/* Forms */
.form-control:focus {
  border-color: var(--rp-primary-light) !important;
  box-shadow: 0 0 0 0.2rem rgba(4, 70, 241, 0.25) !important;
}

.custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--rp-primary) !important;
  border-color: var(--rp-primary) !important;
}

/* Tabelas */
.table thead th {
  background-color: var(--rp-gray-lighter) !important;
  color: var(--rp-gray-dark) !important;
  border-color: var(--rp-gray-light) !important;
}

.table-primary {
  background-color: rgba(4, 70, 241, 0.1) !important;
}

/* Spinners e loaders */
.spinner-border-primary {
  border-color: var(--rp-primary) !important;
}

.spinner-border {
  border-color: var(--rp-gray-light) !important;
  border-right-color: var(--rp-primary) !important;
}

/* Página de login */
.bg-login-image {
  background: var(--rp-gradient-secondary) !important;
}

.bg-register-image {
  background: var(--rp-gradient-primary) !important;
}

.bg-password-image {
  background: var(--rp-gradient-background) !important;
}

/* Botões especiais */
.btn-user {
  font-size: 0.8rem !important;
  border-radius: 10rem !important;
  padding: 0.75rem 1rem !important;
}

.btn-google {
  background-color: var(--rp-gray-lighter) !important;
  color: var(--rp-gray-dark) !important;
  border: 1px solid var(--rp-gray-light) !important;
}

.btn-google:hover {
  background-color: var(--rp-gray-light) !important;
}

.btn-facebook {
  background-color: var(--rp-secondary) !important;
  color: var(--rp-white) !important;
  border-color: var(--rp-secondary) !important;
}

.btn-facebook:hover {
  background-color: var(--rp-primary-dark) !important;
}

/* Cards e componentes */
.card {
  border: 1px solid var(--rp-gray-light) !important;
  border-radius: 0.5rem !important;
}

.card-header {
  background-color: var(--rp-gray-lighter) !important;
  border-bottom: 1px solid var(--rp-gray-light) !important;
}

/* Animações e transições */
* {
  transition: all 0.2s ease-in-out;
}

.sidebar .nav-link,
.btn,
.dropdown-item {
  transition: all 0.15s ease-in-out;
}

/* Scrollbar customizada */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--rp-gray-lighter);
}

::-webkit-scrollbar-thumb {
  background: var(--rp-gray-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--rp-gray);
}

/* Tipografia global */
body {
  font-family: var(--rp-font-secondary) !important;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--rp-font-primary) !important;
  color: var(--rp-gray-dark) !important;
}

/* Ajustes para o tema escuro */
.text-gray-100 { color: var(--rp-gray-lighter) !important; }
.text-gray-200 { color: var(--rp-gray-light) !important; }
.text-gray-300 { color: var(--rp-gray-light) !important; }
.text-gray-400 { color: var(--rp-gray) !important; }
.text-gray-500 { color: var(--rp-gray) !important; }
.text-gray-600 { color: var(--rp-gray) !important; }
.text-gray-700 { color: var(--rp-gray-dark) !important; }
.text-gray-800 { color: var(--rp-gray-dark) !important; }
.text-gray-900 { color: var(--rp-gray-dark) !important; }

/* Badge de desenvolvimento */
.badge-desenvolvimento {
  background: var(--rp-gradient-secondary) !important;
  color: var(--rp-white) !important;
  padding: 0.5rem 1rem !important;
  border-radius: 0.25rem !important;
}

/* Card Em Breve - ajuste de cores */
.card-em-breve {
  background: linear-gradient(135deg, var(--rp-gray-lighter) 0%, var(--rp-white) 100%) !important;
}

.card-em-breve .fa-cog {
  color: var(--rp-primary) !important;
}

.progress-bar-animated {
  background: var(--rp-gradient-primary) !important;
}