/*!
 * Inohub Custom Theme - Purple Brand Colors
 * Based on Inohub brand identity with purple color scheme
 */

:root,
[data-bs-theme=light] {
  /* Inohub Primary Purple Colors */
  --bs-primary: #6A3E8D;
  --bs-primary-rgb: 106, 62, 141;
  --bs-primary-text-emphasis: #2D1A3B;
  --bs-primary-bg-subtle: #E8E0F0;
  --bs-primary-border-subtle: #D1C0DD;

  /* Inohub Secondary Purple Variations */
  --bs-purple: #6A3E8D;
  --bs-info: #6A3E8D;
  --bs-info-rgb: 106, 62, 141;

  /* Button and Interactive Elements */
  --bs-btn-color: #ffffff;
  --bs-btn-bg: #6A3E8D;
  --bs-btn-border-color: #6A3E8D;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: #5A3474;
  --bs-btn-hover-border-color: #5A3474;
  --bs-btn-focus-shadow-rgb: 106, 62, 141;
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: #4A2A5B;
  --bs-btn-active-border-color: #4A2A5B;

  /* Links */
  --bs-link-color: #6A3E8D;
  --bs-link-hover-color: #5A3474;

  /* Form Controls */
  --bs-form-valid-color: #17C653;
  --bs-form-valid-border-color: #17C653;
  --bs-form-invalid-color: #F8285A;
  --bs-form-invalid-border-color: #F8285A;
}

/* Dark Theme Overrides */
[data-bs-theme=dark] {
  --bs-primary: #8B5FB8;
  --bs-primary-rgb: 139, 95, 184;
  --bs-primary-text-emphasis: #C4B5D6;
  --bs-primary-bg-subtle: #2D1A3B;
  --bs-primary-border-subtle: #4A2A5B;

  --bs-purple: #8B5FB8;
  --bs-info: #8B5FB8;
  --bs-info-rgb: 139, 95, 184;

  --bs-link-color: #8B5FB8;
  --bs-link-hover-color: #A17BC9;
}

/* Sidebar - Purple background to match logo */
.app-sidebar {
  background: #6A3E8D !important;
  border-right: none !important;
}

.app-sidebar-logo {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
  background: rgba(255, 255, 255, 0.1) !important;
  padding: 1.5rem 1rem !important;
}

/* Menu Items - WHITE text on purple background for readability */
.app-sidebar .menu-item>.menu-link,
.app-sidebar .menu-item .menu-link,
.menu-item>.menu-link,
.menu-item .menu-link {
  color: #ffffff !important;
  background: transparent !important;
  font-weight: 500 !important;
  padding: 12px 16px !important;
  margin: 4px 8px !important;
  border-radius: 8px !important;
  transition: all 0.3s ease !important;
}

.app-sidebar .menu-item>.menu-link .menu-title,
.app-sidebar .menu-item .menu-link .menu-title,
.menu-item>.menu-link .menu-title,
.menu-item .menu-link .menu-title {
  color: #ffffff !important;
  font-weight: 500 !important;
}

.app-sidebar .menu-item>.menu-link .menu-icon i,
.app-sidebar .menu-item .menu-link .menu-icon i,
.menu-item>.menu-link .menu-icon i,
.menu-item .menu-link .menu-icon i {
  color: #ffffff !important;
  font-size: 1.2rem !important;
}

/* Active and hover states - darker purple background */
.app-sidebar .menu-item.here>.menu-link,
.app-sidebar .menu-item:hover>.menu-link,
.menu-item.here>.menu-link,
.menu-item:hover>.menu-link {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  transform: translateX(4px) !important;
}

.app-sidebar .menu-item.here>.menu-link .menu-title,
.app-sidebar .menu-item:hover>.menu-link .menu-title,
.menu-item.here>.menu-link .menu-title,
.menu-item:hover>.menu-link .menu-title {
  color: #ffffff !important;
  font-weight: 600 !important;
}

.app-sidebar .menu-item.here>.menu-link .menu-icon i,
.app-sidebar .menu-item:hover>.menu-link .menu-icon i,
.menu-item.here>.menu-link .menu-icon i,
.menu-item:hover>.menu-link .menu-icon i {
  color: #ffffff !important;
}

/* Sub-menu styles */
.menu-sub .menu-item>.menu-link {
  margin-left: 2rem !important;
  font-size: 0.9rem !important;
  color: #4A5568 !important;
}

.menu-sub .menu-item.here>.menu-link,
.menu-sub .menu-item:hover>.menu-link {
  background: rgba(106, 62, 141, 0.1) !important;
  color: #6A3E8D !important;
  border-left: 3px solid #6A3E8D !important;
}

/* Help box in sidebar - clean white design */
.BoxAjuda {
  background: #f8f9fa !important;
  border: 2px solid #6A3E8D !important;
  border-radius: 16px !important;
  margin: 1rem !important;
  padding: 1.5rem !important;
}

.BoxAjuda h2 {
  color: #6A3E8D !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  margin-bottom: 0.5rem !important;
}

.BoxAjuda p {
  color: #4A5568 !important;
  font-size: 0.9rem !important;
  line-height: 1.4 !important;
}

.BoxAjuda a {
  color: #6A3E8D !important;
  font-weight: 600 !important;
}

/* Cards and Content Areas */
.card {
  border: 1px solid #E8E0F0;
}

.card-header {
  background-color: #F9F7FB;
  border-bottom: 1px solid #E8E0F0;
}

/* Buttons */
.btn-primary {
  background-color: #6A3E8D;
  border-color: #6A3E8D;
  color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #5A3474;
  border-color: #5A3474;
  color: #ffffff;
}

.btn-primary:active,
.btn-primary.active {
  background-color: #4A2A5B;
  border-color: #4A2A5B;
  color: #ffffff;
}

/* Tables */
.table-hover tbody tr:hover {
  background-color: #F9F7FB;
}

/* Badges */
.badge.badge-primary {
  background-color: #6A3E8D;
  color: #ffffff;
}

/* Progress Bars */
.progress-bar {
  background-color: #6A3E8D;
}

/* Form Controls Focus */
.form-control:focus,
.form-select:focus {
  border-color: #6A3E8D;
  box-shadow: 0 0 0 0.25rem rgba(106, 62, 141, 0.25);
}

/* Custom Classes for Inohub Branding */
.text-inohub {
  color: #6A3E8D !important;
}

.bg-inohub {
  background-color: #6A3E8D !important;
  color: #ffffff !important;
}

.border-inohub {
  border-color: #6A3E8D !important;
}

.btn-inohub {
  background-color: #6A3E8D;
  border-color: #6A3E8D;
  color: #ffffff;
}

.btn-inohub:hover,
.btn-inohub:focus {
  background-color: #5A3474;
  border-color: #5A3474;
  color: #ffffff;
}

/* Header and Toolbar */
.app-header {
  background-color: #ffffff;
  border-bottom: 1px solid #E8E0F0;
}

/* Footer */
.app-footer {
  background-color: #F9F7FB;
  border-top: 1px solid #E8E0F0;
  color: #6A3E8D;
}

/* Login Page Customizations */
.LogoLogin img {
  max-height: 80px;
  width: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* Login Page Styles - New Light Theme */
body.app-blank {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

/* Login card styling */
.login-card {
  background: #f1f3f4 !important;
  border: 1px solid #dee2e6 !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08) !important;
}

/* Better form styling */
.form-control {
  border-radius: 12px !important;
  border: 2px solid #ced4da !important;
  padding: 12px 16px !important;
  background: #ffffff !important;
}

.form-control:focus {
  border-color: #6A3E8D !important;
  box-shadow: 0 0 0 0.25rem rgba(106, 62, 141, 0.25) !important;
  background: #ffffff !important;
}

/* Purple button styling */
.btn-primary {
  background: linear-gradient(135deg, #6A3E8D 0%, #8B5FB8 100%) !important;
  border: none !important;
  border-radius: 12px !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #5A3474 0%, #7A4FA5 100%) !important;
  border: none !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(106, 62, 141, 0.3) !important;
}

/* Link colors */
.link-primary {
  color: #6A3E8D !important;
}

.link-primary:hover {
  color: #5A3474 !important;
}

/* Dashboard Cards - Remove blue and add purple theme */
.bg-primary {
  background: linear-gradient(135deg, #6A3E8D 0%, #8B5FB8 100%) !important;
}

.text-primary {
  color: #6A3E8D !important;
}

.border-primary {
  border-color: #6A3E8D !important;
}

/* Cards with blue background - convert to purple */
.card-header.bg-primary {
  background: linear-gradient(135deg, #6A3E8D 0%, #8B5FB8 100%) !important;
}

/* Buttons with blue colors */
.btn-light-primary {
  background-color: rgba(106, 62, 141, 0.1) !important;
  color: #6A3E8D !important;
  border-color: rgba(106, 62, 141, 0.2) !important;
}

.btn-light-primary:hover {
  background-color: rgba(106, 62, 141, 0.2) !important;
  color: #5A3474 !important;
}

/* Statistics cards - purple variations */
.bg-light-primary {
  background-color: rgba(106, 62, 141, 0.1) !important;
}

/* Charts and data visualization */
.text-info {
  color: #6A3E8D !important;
}

.bg-info {
  background: linear-gradient(135deg, #6A3E8D 0%, #8B5FB8 100%) !important;
}

/* Sidebar active states */
.menu-item.here>.menu-link .menu-title,
.menu-item.show>.menu-link .menu-title {
  color: #6A3E8D !important;
}

.menu-item.here>.menu-link .menu-icon i,
.menu-item.show>.menu-link .menu-icon i {
  color: #6A3E8D !important;
}

/* Override any remaining blue colors */
[class*="bg-primary"] {
  background: linear-gradient(135deg, #6A3E8D 0%, #8B5FB8 100%) !important;
}

[class*="text-primary"] {
  color: #6A3E8D !important;
}

[class*="border-primary"] {
  border-color: #6A3E8D !important;
}

/* Dashboard stats cards */
.card.card-flush {
  border: 1px solid rgba(106, 62, 141, 0.1) !important;
}

.card.card-flush .card-header {
  background: rgba(106, 62, 141, 0.05) !important;
}

/* Progress bars */
.progress-bar.bg-primary {
  background: linear-gradient(135deg, #6A3E8D 0%, #8B5FB8 100%) !important;
}

/* Tables */
.table-row-bordere td {
  border-color: rgba(106, 62, 141, 0.1) !important;
}

/* Badges */
.badge.badge-light-primary {
  background-color: rgba(106, 62, 141, 0.1) !important;
  color: #6A3E8D !important;
}

/* Loading and Status Indicators */
.spinner-border.text-primary {
  color: #6A3E8D !important;
}

/* Force override all blue bootstrap colors */
:root,
[data-bs-theme=light] {
  --bs-primary: #6A3E8D !important;
  --bs-primary-rgb: 106, 62, 141 !important;
  --bs-info: #6A3E8D !important;
  --bs-info-rgb: 106, 62, 141 !important;
}

/* Charts and dashboard elements */
.bg-light-info {
  background-color: rgba(106, 62, 141, 0.1) !important;
}

.text-info {
  color: #6A3E8D !important;
}

.border-info {
  border-color: #6A3E8D !important;
}

/* Cards and containers */
.card-xl-stretch {
  border: 1px solid rgba(106, 62, 141, 0.1) !important;
}

/* Dashboard metrics */
.fs-2hx {
  color: #6A3E8D !important;
}

/* Any remaining blue elements */
.btn-primary {
  background: linear-gradient(135deg, #6A3E8D 0%, #8B5FB8 100%) !important;
  border-color: #6A3E8D !important;
}

/* Specific overrides for dashboard cards that might still show blue */
.card .bg-primary,
.bg-primary {
  background: linear-gradient(135deg, #6A3E8D 0%, #8B5FB8 100%) !important;
}

/* Override any hardcoded blue colors in templates */
[style*="background-color: #1B84FF"],
[style*="background: #1B84FF"],
[style*="color: #1B84FF"] {
  background: linear-gradient(135deg, #6A3E8D 0%, #8B5FB8 100%) !important;
  color: #6A3E8D !important;
}



/* Dashboard numbers and metrics - purple theme */
.Consulta .Nmb,
.Analise .Nmb,
.Prospect .Nmb,
.Enriquec .Nmb {
  color: #6A3E8D !important;
  font-weight: 700 !important;
}

/* Dashboard section titles - keep dark/black as requested */
.TxtDesc {
  color: #2D3748 !important;
}

/* Info links in dashboard cards - keep dark */
.Info {
  color: #4A5568 !important;
}

/* Button icons in dashboard - subtle purple */
.btn-icon i {
  color: #6A3E8D !important;
}

/* Select2 Customization */
.select2-container--default .select2-selection--single:focus {
  border-color: #6A3E8D;
  box-shadow: 0 0 0 0.25rem rgba(106, 62, 141, 0.25);
}

.select2-container--default .select2-results__option--highlighted {
  background-color: #6A3E8D;
  color: #ffffff;
}