/* ===================================
   🎨 DASHBOARD THEME OVERRIDE
   =================================== 
   Force light theme for dashboard
   =================================== */

/* Override old CSS variables */
:root,
.dashboard-section,
.dashboard-content {
  --text-primary: #171717 !important;
  --text-secondary: #737373 !important;
  --text-muted: #a3a3a3 !important;
  --bg-primary: white !important;
  --bg-secondary: #fafafa !important;
  --bg-tertiary: #f5f5f5 !important;
  --border-color: #e5e5e5 !important;
  --border-color-hover: #d4d4d4 !important;
  --font-size-xs: 0.714rem !important;
  --font-size-sm: 0.857rem !important;
  --font-size-base: 0.875rem !important;
  --font-size-lg: 1rem !important;
  --font-size-xl: 1.143rem !important;
  --font-size-2xl: 1.286rem !important;
  --spacing-xs: 0.25rem !important;
  --spacing-sm: 0.5rem !important;
  --spacing-md: 0.75rem !important;
  --spacing-lg: 1rem !important;
  --spacing-xl: 1.5rem !important;
  --spacing-2xl: 2rem !important;
  --radius-sm: 4px !important;
  --radius-md: 6px !important;
  --radius-lg: 8px !important;
  --radius-xl: 12px !important;
}

/* Force light backgrounds */
body,
.dashboard-content,
.dashboard-section {
  background-color: #fafafa !important;
  color: #171717 !important;
  font-size: 14px !important;
}

/* Sidebar user name/email override */
.sidebar-user-name {
  font-weight: 500;
  color: #171717;
  font-size: 14px;
}

.sidebar-user-email {
  font-size: 12px;
  color: #737373;
}

/* Stat cards in sections */
.dashboard-section .stat-card {
  background-color: white !important;
  border: 1px solid #e5e5e5 !important;
}

/* Tables */
.dashboard-section .table-container {
  background-color: white !important;
  border: 1px solid #e5e5e5 !important;
}

.dashboard-section .table thead {
  background-color: #fafafa !important;
}

.dashboard-section .table tbody tr {
  border-bottom: 1px solid #f5f5f5 !important;
}

.dashboard-section .table tbody tr:hover {
  background-color: #fafafa !important;
}

/* Form elements */
input,
select,
textarea {
  background-color: white !important;
  border: 1px solid #e5e5e5 !important;
  color: #171717 !important;
}

input::placeholder,
select::placeholder,
textarea::placeholder {
  color: #a3a3a3 !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary-500) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Buttons */
.btn-secondary {
  background-color: white !important;
  color: #171717 !important;
  border: 1px solid #e5e5e5 !important;
}

.btn-secondary:hover {
  background-color: #f5f5f5 !important;
  border-color: #d4d4d4 !important;
}

.btn-ghost {
  color: #737373 !important;
}

.btn-ghost:hover {
  background-color: #f5f5f5 !important;
  color: #171717 !important;
}

/* Modals */
.modal {
  background-color: white !important;
  border: 1px solid #e5e5e5 !important;
}

.modal-header {
  border-bottom: 1px solid #f5f5f5 !important;
}

.modal-title {
  color: #171717 !important;
}

.modal-footer {
  border-top: 1px solid #f5f5f5 !important;
}

/* Dropdowns */
.dropdown-menu {
  background-color: white !important;
  border: 1px solid #e5e5e5 !important;
}

.dropdown-item {
  color: #737373 !important;
}

.dropdown-item:hover {
  background-color: #f5f5f5 !important;
  color: #171717 !important;
}

.dropdown-divider {
  background-color: #e5e5e5 !important;
}

/* Badges */
.badge-neutral {
  background-color: #f5f5f5 !important;
  color: #737373 !important;
  border: 1px solid #e5e5e5 !important;
}

/* Loading/Empty states */
.loading-text,
.empty-state-message {
  color: #737373 !important;
}

/* Notifications */
#notificationsDropdown {
  background-color: white !important;
  border: 1px solid #e5e5e5 !important;
}

/* Profile dropdown colors */
.user-name {
  color: #171717 !important;
  font-weight: 500 !important;
}

.user-email {
  color: #737373 !important;
}

/* Ensure main content has proper margin */
.main-content {
  margin-left: 240px;
  padding: var(--space-2xl);
}

@media (max-width: 1024px) {
  .main-content {
    margin-left: 0;
  }
}

/* Progress bars */
.progress-bar {
  background-color: #e5e5e5 !important;
}

/* Specific dashboard cards/containers */
.license-card,
.subscription-card,
.farm-stats-card {
  background-color: white !important;
  border: 1px solid #e5e5e5 !important;
  color: #171717 !important;
}

/* Text colors for all headings in dashboard */
.dashboard-section h1,
.dashboard-section h2,
.dashboard-section h3,
.dashboard-section h4,
.dashboard-section h5,
.dashboard-section h6 {
  color: #171717 !important;
}

/* Paragraph and general text */
.dashboard-section p {
  color: #737373 !important;
}

/* Toast notifications */
.toast {
  background-color: white !important;
  border: 1px solid #e5e5e5 !important;
  color: #171717 !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

/* ===================================
   FORCE OVERRIDE ALL INLINE STYLES
   =================================== */

/* Force all divs with inline background colors to be white */
.dashboard-section > div[style*="background"],
.dashboard-content > div[style*="background"],
.stats-grid > div[style*="background"],
div[class*="card"][style*="background"],
div[class*="container"][style*="background"] {
  background-color: white !important;
}

/* Force all sections to have light background */
.dashboard-section,
section[id*="Section"],
#overviewSection,
#subscriptionsSection,
#farming-statsSection,
#dropsSection,
#inventoriesSection,
#settingsSection,
#marketSection,
#adminSection {
  background-color: #fafafa !important;
}

/* Force all cards to be white */
div[style*="padding"][style*="border"],
div[style*="padding"][style*="background"],
.stat-card,
.license-card,
.info-card,
.data-card {
  background-color: white !important;
  border-color: #e5e5e5 !important;
}

/* Force stat card styling */
.stats-grid > div {
  background-color: white !important;
  border: 1px solid #e5e5e5 !important;
  border-radius: 12px !important;
}

.stats-grid > div:hover {
  border-color: #d4d4d4 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

/* Force all headings in dashboard to be dark */
.dashboard-section h1,
.dashboard-section h2,
.dashboard-section h3,
.dashboard-section h4,
.dashboard-content h1,
.dashboard-content h2,
.dashboard-content h3,
.dashboard-content h4,
h1[style*="color"],
h2[style*="color"],
h3[style*="color"],
h4[style*="color"] {
  color: #171717 !important;
  font-weight: 600 !important;
}

/* Force all paragraphs to be gray */
.dashboard-section p,
.dashboard-content p,
p[style*="color"] {
  color: #737373 !important;
}

/* Force all labels to be dark */
label,
label[style*="color"],
.input-label {
  color: #171717 !important;
  font-weight: 500 !important;
}

/* Force select/input styling */
select[style*="background"],
input[style*="background"],
textarea[style*="background"] {
  background-color: white !important;
  border: 1px solid #e5e5e5 !important;
  color: #171717 !important;
}

/* Dashboard specific overrides */
.dashboard-sidebar {
  background-color: white !important;
  border-right: 1px solid #e5e5e5 !important;
}

.dashboard-sidebar .sidebar-item {
  color: #737373 !important;
}

.dashboard-sidebar .sidebar-item:hover {
  background-color: #f5f5f5 !important;
  color: #171717 !important;
}

.dashboard-sidebar .sidebar-item.active {
  background-color: #f5f5f5 !important;
  color: var(--color-primary-500) !important;
}

/* Main content area */
.main-content {
  background-color: #fafafa !important;
}

/* Stats grid items */
.stat-card-title {
  color: #737373 !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
}

.stat-card-value {
  color: #171717 !important;
  font-size: 2rem !important;
  font-weight: 600 !important;
}

/* Tables in dashboard */
.dashboard-section table,
.dashboard-content table,
table[class*="table"] {
  background-color: white !important;
}

.dashboard-section thead,
.dashboard-content thead {
  background-color: #fafafa !important;
}

.dashboard-section th,
.dashboard-content th {
  color: #737373 !important;
  border-color: #e5e5e5 !important;
}

.dashboard-section td,
.dashboard-content td {
  color: #171717 !important;
  border-color: #f5f5f5 !important;
}

.dashboard-section tr:hover,
.dashboard-content tr:hover {
  background-color: #fafafa !important;
}

/* Specific dashboard elements */
#toastContainer .toast {
  background-color: white !important;
  border: 1px solid #e5e5e5 !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

/* Warning/Alert boxes */
div[style*="rgba(255, 152, 0"],
div[style*="rgba(33, 150, 243"] {
  background-color: rgba(16, 185, 129, 0.1) !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  color: #171717 !important;
}

/* Force all divs with dark backgrounds to be white */
div[style*="background:"],
div[style*="background-color:"] {
  background: white !important;
  background-color: white !important;
}

/* Specific overrides for activity cards and loading states */
.dashboard-content div[style*="padding"],
.dashboard-section div[style*="padding"] {
  background-color: white !important;
}

/* Override all inline background styles */
* [style*="background: #"],
* [style*="background-color: #"],
* [style*="background:#"],
* [style*="background-color:#"] {
  background-color: white !important;
}

/* Force loading containers */
.loading-container,
div:has(> .spinner),
div:has(> p:contains("Carregando")) {
  background-color: white !important;
}

/* ===================================
   🌙 DARK THEME OVERRIDES
   =================================== 
   Override all light theme when dark theme is active
   =================================== */

body.dark-theme {
  --text-primary: #e2e8f0 !important;
  --text-secondary: #94a3b8 !important;
  --text-muted: #64748b !important;
  --bg-primary: #1a1f2e !important;
  --bg-secondary: #0f1419 !important;
  --bg-tertiary: #1a1f2e !important;
  --border-color: rgba(51, 65, 85, 0.15) !important;
  --border-color-hover: rgba(71, 85, 105, 0.3) !important;
  background-color: #0f1419 !important;
  color: #e2e8f0 !important;
}

/* Light theme variables - AGGRESSIVE */
body:not(.dark-theme),
body.light-theme {
  --text-primary: #171717 !important;
  --text-secondary: #737373 !important;
  --text-muted: #a3a3a3 !important;
  --bg-primary: #ffffff !important;
  --bg-secondary: #fafafa !important;
  --bg-tertiary: #f5f5f5 !important;
  --border-color: #e5e5e5 !important;
  --border-color-hover: #d4d4d4 !important;
  background-color: #fafafa !important;
  color: #171717 !important;
}

/* Remove global border forcing - let components control their own borders */

/* Force dark backgrounds */
body.dark-theme,
body.dark-theme .dashboard-content,
body.dark-theme .dashboard-section,
body.dark-theme .main-content {
  background-color: #0f1419 !important;
  color: #e2e8f0 !important;
}

/* Light theme backgrounds */
body:not(.dark-theme),
body.light-theme,
body:not(.dark-theme) .main-content,
body.light-theme .main-content,
body:not(.dark-theme) .dashboard-content,
body.light-theme .dashboard-content,
body:not(.dark-theme) .dashboard-section,
body.light-theme .dashboard-section {
  background-color: #fafafa !important;
  color: #171717 !important;
}

/* Dark theme - General cards (stats cards in stats-cards.css) */
body.dark-theme .license-card,
body.dark-theme .subscription-card,
body.dark-theme .farm-stats-card,
body.dark-theme .info-card,
body.dark-theme .data-card,
body.dark-theme .card,
body.dark-theme div[class*="-card"]:not(.stats-card-enhanced):not(.stat-card) {
  background-color: #1a1f2e !important;
  border: 1px solid rgba(51, 65, 85, 0.15) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08) !important;
}

/* Dark theme - text elements */
body.dark-theme .card-description {
  color: #94a3b8 !important;
}

body.dark-theme .page-title,
body.dark-theme .section-title,
body.dark-theme .card-title {
  color: #e2e8f0 !important;
}

body.dark-theme .page-subtitle {
  color: #94a3b8 !important;
}

/* Stats grid background */
body.dark-theme .stats-grid,
body:not(.dark-theme) .stats-grid {
  background-color: transparent !important;
}

/* Light theme - General cards (stats cards in stats-cards.css) */
body:not(.dark-theme) .license-card,
body:not(.dark-theme) .card,
body:not(.dark-theme) div[class*="-card"]:not(.stats-card-enhanced):not(.stat-card) {
  background-color: #ffffff !important;
  border: 1px solid #e5e5e5 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08) !important;
}

body:not(.dark-theme) .card:hover,
body:not(.dark-theme) div[class*="-card"]:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.06) !important;
  border-color: #10b981 !important;
  transform: translateY(-2px) !important;
}

/* Light theme - text elements */
body:not(.dark-theme) .card-description,
body:not(.dark-theme) .page-subtitle {
  color: #737373 !important;
}

body:not(.dark-theme) .page-title,
body:not(.dark-theme) .section-title,
body:not(.dark-theme) .card-title {
  color: #171717 !important;
}

/* Dark theme tables */
body.dark-theme .table-container,
body.dark-theme table {
  background-color: #1a1f2e !important;
  border: 1px solid rgba(51, 65, 85, 0.15) !important;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important;
}

body.dark-theme .table thead {
  background-color: rgba(51, 65, 85, 0.1) !important;
  border-bottom: 1px solid rgba(51, 65, 85, 0.2) !important;
}

body.dark-theme .table th {
  color: #94a3b8 !important;
  border-color: rgba(51, 65, 85, 0.2) !important;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 14px 16px !important;
}

body.dark-theme .table td {
  color: #e2e8f0 !important;
  border-color: rgba(51, 65, 85, 0.15) !important;
  padding: 14px 16px !important;
}

body.dark-theme .table tbody tr {
  border-bottom: 1px solid rgba(51, 65, 85, 0.15) !important;
  transition: all 0.2s ease;
}

body.dark-theme .table tbody tr:hover {
  background-color: rgba(51, 65, 85, 0.1) !important;
}

/* Dark theme text colors */
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6 {
  color: #e2e8f0 !important;
  font-weight: 700;
}

body.dark-theme .stat-card-value,
body.dark-theme .license-card-title,
body.dark-theme .user-name {
  color: #f1f5f9 !important;
  font-weight: 700;
  font-size: 2rem;
}

body.dark-theme p,
body.dark-theme .user-email {
  color: #94a3b8 !important;
}

body.dark-theme .dropdown-item {
  color: #cbd5e1 !important;
}

body.dark-theme .stat-card-title {
  color: #94a3b8 !important;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 8px;
}

/* Stats cards internal elements - handled in stats-cards.css */

/* Smooth transitions for all interactive elements */
body.dark-theme .stat-card,
body.dark-theme .sidebar-item,
body.dark-theme .dropdown-item,
body.dark-theme .table tbody tr,
body.dark-theme .btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

body.dark-theme .stat-card-icon {
  background: rgba(16, 185, 129, 0.1) !important;
  color: #10b981 !important;
  border: none !important;
  padding: 12px !important;
  border-radius: 10px !important;
}

/* Dark theme form elements */
body.dark-theme input,
body.dark-theme select,
body.dark-theme textarea {
  background-color: rgba(51, 65, 85, 0.1) !important;
  border: 1px solid rgba(51, 65, 85, 0.2) !important;
  color: #e2e8f0 !important;
  transition: all 0.2s ease;
}

body.dark-theme input::placeholder,
body.dark-theme select::placeholder,
body.dark-theme textarea::placeholder {
  color: #64748b !important;
}

body.dark-theme input:focus,
body.dark-theme select:focus,
body.dark-theme textarea:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
  outline: none;
  background-color: rgba(51, 65, 85, 0.05) !important;
}

/* Dark theme buttons */
body.dark-theme .btn-secondary {
  background-color: rgba(51, 65, 85, 0.1) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(51, 65, 85, 0.2) !important;
}

body.dark-theme .btn-secondary:hover {
  background-color: rgba(51, 65, 85, 0.2) !important;
  border-color: rgba(51, 65, 85, 0.3) !important;
}

body.dark-theme .btn-ghost {
  color: #94a3b8 !important;
}

body.dark-theme .btn-ghost:hover {
  background-color: rgba(51, 65, 85, 0.1) !important;
  color: #e2e8f0 !important;
}

body.dark-theme .btn-primary {
  background-color: #10b981 !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.3) !important;
}

body.dark-theme .btn-primary:hover {
  background-color: #059669 !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4) !important;
  transform: translateY(-1px);
}

/* Dark theme dropdowns */
body.dark-theme .dropdown-menu {
  background-color: #1a1f2e !important;
  border: 1px solid rgba(51, 65, 85, 0.15) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 4px 10px rgba(0, 0, 0, 0.15) !important;
  border-radius: 12px !important;
  padding: 8px !important;
}

body.dark-theme .dropdown-item {
  color: #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 10px 12px !important;
  margin-bottom: 4px;
  transition: all 0.2s ease;
}

body.dark-theme .dropdown-item:hover {
  background-color: rgba(51, 65, 85, 0.2) !important;
  color: #e2e8f0 !important;
  transform: translateX(4px);
}

body.dark-theme .dropdown-divider {
  background-color: rgba(51, 65, 85, 0.2) !important;
  height: 1px;
  margin: 8px 0;
}

body.dark-theme .user-info {
  border-bottom: 1px solid rgba(51, 65, 85, 0.2) !important;
  padding-bottom: 12px !important;
  margin-bottom: 8px !important;
}

/* Dark theme sidebar */
body.dark-theme .dashboard-sidebar,
body.dark-theme .sidebar {
  background-color: #1a1f2e !important;
  border-right: 1px solid rgba(51, 65, 85, 0.15) !important;
}

body.dark-theme .sidebar-item {
  color: #94a3b8 !important;
  transition: all 0.2s ease;
  border-radius: 8px;
  margin: 2px 8px;
}

body.dark-theme .sidebar-item:hover {
  background-color: rgba(51, 65, 85, 0.2) !important;
  color: #e2e8f0 !important;
}

body.dark-theme .sidebar-item.active {
  background-color: rgba(16, 185, 129, 0.08) !important;
  color: #10b981 !important;
  border-left: 3px solid #10b981;
}

body.dark-theme .sidebar-title {
  color: #64748b !important;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 8px 16px;
}

body.dark-theme .sidebar-item-icon {
  color: inherit !important;
}

body.dark-theme .sidebar-user-info {
  background-color: #1a1f2e !important;
  border-top: 1px solid rgba(51, 65, 85, 0.15) !important;
  padding: 16px !important;
}

/* Dark theme modals */
body.dark-theme .modal {
  background-color: #1a1f2e !important;
  border: 1px solid rgba(51, 65, 85, 0.15) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
}

body.dark-theme .modal-header {
  border-bottom: 1px solid rgba(51, 65, 85, 0.2) !important;
  background-color: rgba(51, 65, 85, 0.05) !important;
}

body.dark-theme .modal-title {
  color: #e2e8f0 !important;
  font-weight: 600;
}

body.dark-theme .modal-footer {
  border-top: 1px solid rgba(51, 65, 85, 0.2) !important;
  background-color: rgba(51, 65, 85, 0.05) !important;
}

body.dark-theme .modal-body {
  color: #cbd5e1 !important;
}

/* Dark theme badges */
body.dark-theme .badge-neutral {
  background-color: rgba(51, 65, 85, 0.3) !important;
  color: #94a3b8 !important;
  border: none !important;
}

body.dark-theme .badge-success {
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: #10b981 !important;
  border: none !important;
}

body.dark-theme .badge-warning {
  background-color: rgba(245, 158, 11, 0.15) !important;
  color: #f59e0b !important;
  border: none !important;
}

body.dark-theme .badge-error {
  background-color: rgba(239, 68, 68, 0.15) !important;
  color: #ef4444 !important;
  border: none !important;
}

body.dark-theme .badge-info {
  background-color: rgba(59, 130, 246, 0.15) !important;
  color: #3b82f6 !important;
  border: none !important;
}

/* Dark theme toast */
body.dark-theme .toast,
body.dark-theme #toastContainer .toast {
  background-color: #1a1f2e !important;
  border: 1px solid rgba(51, 65, 85, 0.15) !important;
  color: #e2e8f0 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 4px 10px rgba(0, 0, 0, 0.15) !important;
}

/* Dark theme notifications */
body.dark-theme #notificationsDropdown,
body.dark-theme .notifications-panel {
  background-color: #1a1f2e !important;
  border: 1px solid rgba(51, 65, 85, 0.15) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 4px 10px rgba(0, 0, 0, 0.15) !important;
}

body.dark-theme .notification-item {
  border: 1px solid rgba(51, 65, 85, 0.15) !important;
  background-color: rgba(51, 65, 85, 0.05) !important;
  margin-bottom: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

body.dark-theme .notification-item:hover {
  background-color: rgba(51, 65, 85, 0.1) !important;
  border-color: rgba(51, 65, 85, 0.3) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

body.dark-theme .notification-header,
body.dark-theme .notification-title {
  color: #e2e8f0 !important;
  font-weight: 600;
}

body.dark-theme .notification-body,
body.dark-theme .notification-message {
  color: #94a3b8 !important;
}

body.dark-theme .notification-footer,
body.dark-theme .notification-time {
  color: #64748b !important;
  font-size: 0.75rem;
}

/* Dark theme progress bars */
body.dark-theme .progress-bar {
  background-color: rgba(51, 65, 85, 0.3) !important;
  border-radius: 8px;
  overflow: hidden;
}

body.dark-theme .progress-bar-fill {
  background: #10b981 !important;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.3) !important;
}

/* Dark theme navbar */
body.dark-theme .navbar {
  background: rgba(26, 31, 46, 0.95) !important;
  border-bottom: 1px solid rgba(51, 65, 85, 0.15) !important;
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08) !important;
}

body.dark-theme .navbar-brand {
  color: #e2e8f0 !important;
  font-weight: 700;
  font-size: 1.25rem;
}

/* Override ALL inline styles for dark theme */
body.dark-theme div[style*="background"],
body.dark-theme div[style*="background-color"],
body.dark-theme div[style*="padding"],
body.dark-theme div[style*="border"],
body.dark-theme section[style*="background"],
body.dark-theme main[style*="background"] {
  /* Force check - if it's a card-like element */
}

/* Grid children backgrounds handled by card styles */

body.dark-theme .dashboard-section,
body.dark-theme section[id*="Section"],
body.dark-theme #overviewSection,
body.dark-theme #subscriptionsSection,
body.dark-theme #farming-statsSection,
body.dark-theme #dropsSection,
body.dark-theme #inventoriesSection,
body.dark-theme #settingsSection,
body.dark-theme #marketSection,
body.dark-theme #adminSection {
  background-color: #0f1419 !important;
}

/* Let inline styles with CSS variables work naturally in dark theme */
body.dark-theme [style*="background: var(--bg-primary)"],
body.dark-theme [style*="background-color: var(--bg-primary)"] {
  /* Variables will use dark theme colors automatically */
}

body.dark-theme [style*="background: var(--bg-secondary)"],
body.dark-theme [style*="background-color: var(--bg-secondary)"] {
  /* Variables will use dark theme colors automatically */
}

body.dark-theme [style*="background: var(--bg-tertiary)"],
body.dark-theme [style*="background-color: var(--bg-tertiary)"] {
  /* Variables will use dark theme colors automatically */
}

/* Force all section containers */
body.dark-theme .dashboard-section > div,
body.dark-theme .dashboard-section > div > div,
body.dark-theme section[id*="Section"] > div,
body.dark-theme section[id*="Section"] > div > div {
  background-color: transparent !important;
}

/* Force specific card types */
body.dark-theme div[class*="card"],
body.dark-theme div[id*="card"],
body.dark-theme div[id*="Card"],
body.dark-theme .card-body,
body.dark-theme .card-content {
  background-color: #171717 !important;
  border-color: #262626 !important;
  color: #f5f5f5 !important;
}

/* Force all containers with padding */
body.dark-theme div[style*="padding"][style*="border-radius"],
body.dark-theme div[style*="padding: "][style*="background"],
body.dark-theme div[style*="padding:"][style*="background"] {
  background: #171717 !important;
  background-color: #171717 !important;
}

/* Specific fixes for each section - let CSS variables work */
body.dark-theme #overviewSection,
body.dark-theme #subscriptionsSection,
body.dark-theme #farming-statsSection,
body.dark-theme #dropsSection,
body.dark-theme #inventoriesSection,
body.dark-theme #settingsSection,
body.dark-theme #marketSection,
body.dark-theme #adminSection {
  background-color: #0f1419 !important;
}

/* Light theme sections */
body:not(.dark-theme) #overviewSection,
body:not(.dark-theme) #subscriptionsSection,
body:not(.dark-theme) #farming-statsSection,
body:not(.dark-theme) #dropsSection,
body:not(.dark-theme) #inventoriesSection,
body:not(.dark-theme) #settingsSection,
body:not(.dark-theme) #marketSection,
body:not(.dark-theme) #adminSection {
  background-color: #fafafa !important;
}

/* Fix for license cards and info boxes - borders only */
body.dark-theme div[style*="border: "],
body.dark-theme div[style*="border:"] {
  border-color: rgba(51, 65, 85, 0.15) !important;
}

body:not(.dark-theme) div[style*="border: "],
body:not(.dark-theme) div[style*="border:"] {
  border-color: #e5e5e5 !important;
}

/* Specific styling for Últimos Drops and Contas Recentes */
body.dark-theme .activity-section,
body.dark-theme [class*="drops"],
body.dark-theme [class*="recentes"] {
  background-color: #1a1f2e !important;
  border: 1px solid rgba(51, 65, 85, 0.15) !important;
  border-radius: 12px !important;
  padding: 24px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important;
}

body.dark-theme .activity-section h3,
body.dark-theme .activity-section h4 {
  color: #e2e8f0 !important;
  font-weight: 700 !important;
  margin-bottom: 16px !important;
  font-size: 1.25rem !important;
}

/* NUCLEAR OPTION - Force EVERYTHING */
body.dark-theme * {
  border-color: #262626 !important;
}

body.dark-theme div {
  /* Do not set background on ALL divs as it breaks layout, only on specific ones */
}

/* Target specific white backgrounds */
body.dark-theme [style*="background-color: white"],
body.dark-theme [style*="background-color: #fff"],
body.dark-theme [style*="background-color: #ffffff"],
body.dark-theme [style*="background-color:white"],
body.dark-theme [style*="background-color:#fff"],
body.dark-theme [style*="background-color:#ffffff"],
body.dark-theme [style*="background: white"],
body.dark-theme [style*="background: #fff"],
body.dark-theme [style*="background: #ffffff"],
body.dark-theme [style*="background:white"],
body.dark-theme [style*="background:#fff"],
body.dark-theme [style*="background:#ffffff"],
body.dark-theme [style*="background-color: rgb(255, 255, 255)"],
body.dark-theme [style*="background-color:rgb(255, 255, 255)"],
body.dark-theme [style*="background-color: rgb(255,255,255)"],
body.dark-theme [style*="background-color:rgb(255,255,255)"] {
  background: #171717 !important;
  background-color: #171717 !important;
}

/* All text should be light unless specifically set */
body.dark-theme div:not([class*="badge"]):not([class*="btn"]) {
  color: inherit;
}

/* Fix specific problematic elements */
body.dark-theme [style*="color: #171717"],
body.dark-theme [style*="color:#171717"],
body.dark-theme [style*="color: rgb(23, 23, 23)"],
body.dark-theme [style*="color:rgb(23, 23, 23)"] {
  color: #e2e8f0 !important;
}

body.dark-theme [style*="color: #737373"],
body.dark-theme [style*="color:#737373"] {
  color: #94a3b8 !important;
}

/* Page headers and titles */
body.dark-theme .page-header {
  border-bottom: 1px solid rgba(51, 65, 85, 0.2) !important;
}

body.dark-theme .page-title,
body.dark-theme .page-title-large {
  color: #f1f5f9 !important;
  font-weight: 700;
}

body.dark-theme .page-subtitle {
  color: #94a3b8 !important;
}

/* Section headers */
body.dark-theme .section-title,
body.dark-theme .section-title-enhanced {
  color: #e2e8f0 !important;
  font-weight: 600;
}

/* Card titles and descriptions */
body.dark-theme .card-title {
  color: #e2e8f0 !important;
  font-weight: 600;
}

body.dark-theme .card-description {
  color: #94a3b8 !important;
}

body.dark-theme .card-footer {
  border-top: 1px solid rgba(51, 65, 85, 0.2) !important;
  background-color: rgba(51, 65, 85, 0.05) !important;
}

/* Dark theme breadcrumb */
body.dark-theme .breadcrumb {
  color: #6b7280 !important;
}

body.dark-theme .breadcrumb-link {
  color: #9ca3af !important;
  transition: color 0.2s ease;
}

body.dark-theme .breadcrumb-link:hover {
  color: #10b981 !important;
}

body.dark-theme .breadcrumb-current {
  color: #ffffff !important;
  font-weight: 500;
}

/* Dark theme - User avatar */
body.dark-theme .user-avatar {
  border: 2px solid rgba(16, 185, 129, 0.5) !important;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2) !important;
  background-color: #10b981 !important;
}

body.dark-theme .sidebar-user-container {
  background-color: #1a1f2e !important;
  border-top: 1px solid rgba(51, 65, 85, 0.15) !important;
  padding: 16px !important;
}

body.dark-theme .sidebar-user-name {
  color: #e2e8f0 !important;
  font-weight: 600;
}

body.dark-theme .sidebar-user-email {
  color: #94a3b8 !important;
  font-size: 0.875rem;
}

/* Dark theme - Loading and empty states */
body.dark-theme .loading-text,
body.dark-theme .empty-state-message,
body.dark-theme .notifications-empty-text {
  color: #94a3b8 !important;
  font-size: 0.95rem;
}

body.dark-theme .loading-container,
body.dark-theme .notifications-empty {
  background-color: #1a1f2e !important;
  border: 1px solid rgba(51, 65, 85, 0.15) !important;
  border-radius: 12px;
  padding: 48px 32px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important;
}

body.dark-theme .spinner {
  border-color: rgba(51, 65, 85, 0.3) !important;
  border-top-color: #10b981 !important;
  width: 40px !important;
  height: 40px !important;
  margin: 0 auto 16px !important;
}

/* Activity sections improvements */
body.dark-theme .section-title,
body.dark-theme h2,
body.dark-theme h3 {
  color: #e2e8f0 !important;
  font-weight: 700 !important;
  margin-bottom: 16px !important;
}

body.dark-theme .activity-card,
body.dark-theme .recent-activity {
  background-color: #1a1f2e !important;
  border: 1px solid rgba(51, 65, 85, 0.15) !important;
  border-radius: 12px !important;
  padding: 20px !important;
  margin-bottom: 16px !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important;
}

body.dark-theme .activity-card:hover,
body.dark-theme .recent-activity:hover {
  border-color: rgba(16, 185, 129, 0.3) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(16, 185, 129, 0.1) !important;
  transform: translateY(-2px) !important;
}

