/* =============================================================================
   REUSABLE THEME SYSTEM - DARK THEME AS DEFAULT
   This file contains all the visual styling that can be used across Flask apps
   ============================================================================= */

/* CSS Custom Properties - DARK THEME AS DEFAULT */
:root {
  /* Primary Colors */
  --color-primary-blue: #0ea5e9;
  --color-primary-purple: #a855f7;
  --color-primary-teal: #14b8a6;
  
  /* Semantic Colors */
  --color-success: #10b981;
  --color-success-dark: #059669;
  --color-warning: #f59e0b;
  --color-warning-dark: #d97706;
  --color-danger: #ef4444;
  --color-danger-dark: #dc2626;
  --color-info: #3b82f6;
  
  /* Neutral Colors - DARK THEME DEFAULT */
  --color-neutral-white: #0f172a;
  --color-neutral-gray-50: #1e293b;
  --color-neutral-gray-100: #334155;
  --color-neutral-gray-200: #475569;
  --color-neutral-gray-300: #64748b;
  --color-neutral-gray-400: #94a3b8;
  --color-neutral-gray-500: #cbd5e1;
  --color-neutral-gray-600: #e2e8f0;
  --color-neutral-gray-700: #f1f5f9;
  --color-neutral-gray-800: #f8fafc;
  --color-neutral-gray-900: #ffffff;
  --color-neutral-black: #ffffff;
  
  /* Text Colors - DARK THEME DEFAULT */
  --color-text-primary: #f8fafc;
  --color-text-secondary: #cbd5e1;
  --color-text-muted: #94a3b8;
  --color-text-inverse: #0f172a;
  
  /* Background Colors - DARK THEME DEFAULT */
  --color-bg-primary: #0f172a;
  --color-bg-secondary: #1e293b;
  --color-bg-tertiary: #334155;
  --color-bg-elevated: #1e293b;
  --color-bg-overlay: rgba(15, 23, 42, 0.8);
  
  /* Border Colors - DARK THEME DEFAULT */
  --color-border-primary: #334155;
  --color-border-secondary: #475569;
  --color-border-accent: #0ea5e9;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Typography */
  --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
  --shadow-sidebar: 4px 0 12px -2px rgba(0,0,0,0.5);
  
  /* Transitions */
  --transition-fast: 150ms;
  --transition-normal: 300ms;
  --transition-slow: 500ms;
  --transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode Variables */
.light {
  --color-neutral-white: #ffffff;
  --color-neutral-gray-50: #f9fafb;
  --color-neutral-gray-100: #f3f4f6;
  --color-neutral-gray-200: #e5e7eb;
  --color-neutral-gray-300: #d1d5db;
  --color-neutral-gray-400: #9ca3af;
  --color-neutral-gray-500: #6b7280;
  --color-neutral-gray-600: #4b5563;
  --color-neutral-gray-700: #374151;
  --color-neutral-gray-800: #1f2937;
  --color-neutral-gray-900: #111827;
  --color-neutral-black: #000000;
  
  /* Text Colors - LIGHT THEME */
  --color-text-primary: #111827;
  --color-text-secondary: #4b5563;
  --color-text-muted: #6b7280;
  --color-text-inverse: #ffffff;
  
  /* Background Colors - LIGHT THEME */
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f9fafb;
  --color-bg-tertiary: #f3f4f6;
  --color-bg-elevated: #ffffff;
  --color-bg-overlay: rgba(255, 255, 255, 0.8);
  
  /* Border Colors - LIGHT THEME */
  --color-border-primary: #e5e7eb;
  --color-border-secondary: #d1d5db;
  --color-border-accent: #0ea5e9;
  
  /* Shadows - LIGHT THEME */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-sidebar: 4px 0 12px -2px rgba(0,0,0,0.15);
}

/* =============================================================================
   BASE STYLES
   ============================================================================= */

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  line-height: 1.5;
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  margin: 0;
  padding: 0;
}

.theme-body {
  font-family: var(--font-sans);
  line-height: 1.5;
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  transition: all var(--transition-normal) var(--transition-timing);
}

/* =============================================================================
   LAYOUT COMPONENTS
   ============================================================================= */

.theme-layout {
  display: flex;
  min-height: 100vh;
  background-color: var(--color-bg-primary);
}

.theme-sidebar {
  width: 280px;
  background: linear-gradient(180deg, var(--color-bg-secondary) 0%, var(--color-bg-tertiary) 100%);
  border-right: 1px solid var(--color-border-primary);
  box-shadow: var(--shadow-sidebar);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  transition: all var(--transition-normal) var(--transition-timing);
}

.theme-main {
  flex: 1;
  margin-left: 280px;
  background-color: var(--color-bg-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.theme-topbar {
  background: var(--color-bg-elevated);
  border-bottom: 1px solid var(--color-border-primary);
  padding: 1rem 2rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.theme-content {
  flex: 1;
  padding: 2rem;
  background-color: var(--color-bg-primary);
}

/* =============================================================================
   SIDEBAR COMPONENTS
   ============================================================================= */

.theme-sidebar-brand {
  padding: 2rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--color-border-primary);
  background: rgba(255, 255, 255, 0.02);
}

.theme-brand-logo {
  margin-bottom: 1rem;
}

.theme-logo-img {
  width: 4rem;
  height: 4rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-md);
}

.theme-brand-title {
  color: var(--color-text-primary);
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.theme-brand-subtitle {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin: 0;
  font-weight: 400;
}

.theme-sidebar-nav {
  padding: 1.5rem 1rem;
}

.theme-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  border-radius: 0.75rem;
  transition: all var(--transition-fast) var(--transition-timing);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.theme-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-primary);
  transform: translateX(4px);
}

.theme-nav-item.active {
  background: var(--color-primary-blue);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-md);
}

.theme-nav-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.theme-sidebar-footer {
  margin-top: auto;
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--color-border-primary);
  text-align: center;
}

.theme-version-text {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

/* =============================================================================
   TOPBAR COMPONENTS
   ============================================================================= */

.theme-topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.theme-title {
  color: var(--color-text-primary);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.theme-topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle-btn {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border-primary);
  color: var(--color-text-primary);
  padding: 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast) var(--transition-timing);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-btn:hover {
  background: var(--color-bg-tertiary);
  border-color: var(--color-border-accent);
}

.theme-toggle-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.theme-user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-user-name {
  color: var(--color-text-primary);
  font-weight: 500;
}

.theme-logout-btn {
  background: var(--color-danger);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-fast) var(--transition-timing);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-logout-btn:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

/* =============================================================================
   BUTTON COMPONENTS
   ============================================================================= */

.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast) var(--transition-timing);
  font-family: inherit;
}

.theme-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.theme-btn:active {
  transform: translateY(0);
}

.theme-btn-primary {
  background: var(--color-primary-blue);
  color: white;
}

.theme-btn-primary:hover {
  background: #0284c7;
}

.theme-btn-secondary {
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-primary);
}

.theme-btn-secondary:hover {
  background: var(--color-bg-tertiary);
  border-color: var(--color-border-accent);
}

.theme-btn-success {
  background: var(--color-success);
  color: white;
}

.theme-btn-success:hover {
  background: #16a34a;
}

.theme-btn-warning {
  background: var(--color-warning);
  color: white;
}

.theme-btn-warning:hover {
  background: #d97706;
}

.theme-btn-danger {
  background: var(--color-danger);
  color: white;
}

.theme-btn-danger:hover {
  background: #dc2626;
}

.theme-btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.theme-btn-icon {
  width: 1rem;
  height: 1rem;
}

/* =============================================================================
   FORM COMPONENTS
   ============================================================================= */

.theme-form-container {
  max-width: 1200px;
  margin: 0 auto;
}

.theme-form-card {
  background: var(--color-bg-elevated);
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--color-border-primary);
}

.theme-form-header {
  background: linear-gradient(135deg, var(--color-primary-blue), var(--color-primary-purple));
  color: white;
  padding: 2rem;
  text-align: center;
}

.theme-form-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.75rem;
  font-weight: 700;
}

.theme-form-subtitle {
  margin: 0;
  opacity: 0.9;
  font-size: 1rem;
}

.theme-form {
  padding: 2rem;
}

.theme-form-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border-primary);
}

.theme-form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.theme-section-title {
  margin: 0 0 1.5rem 0;
  color: var(--color-primary-blue);
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-section-title::before {
  content: '';
  width: 4px;
  height: 1.5rem;
  background: var(--color-primary-blue);
  border-radius: 2px;
}

.theme-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.theme-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.theme-form-label {
  color: var(--color-text-primary);
  font-weight: 500;
  font-size: 0.875rem;
}

.theme-form-input {
  padding: 0.75rem;
  border: 2px solid var(--color-border-primary);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all var(--transition-fast) var(--transition-timing);
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
}

.theme-form-input:focus {
  outline: none;
  border-color: var(--color-primary-blue);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.theme-form-help {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.theme-form-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border-primary);
}

/* =============================================================================
   TABLE COMPONENTS
   ============================================================================= */

.theme-table-container {
  background: var(--color-bg-elevated);
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--color-border-primary);
}

.theme-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border-primary);
}

.theme-table-title {
  margin: 0;
  color: var(--color-text-primary);
  font-size: 1.25rem;
  font-weight: 600;
}

.theme-table-count {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.theme-table-wrapper {
  overflow-x: auto;
}

.theme-table {
  width: 100%;
  border-collapse: collapse;
}

.theme-table-header-cell {
    padding: 1rem;
  text-align: left;
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
  font-weight: 600;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--color-border-primary);
  white-space: nowrap;
}

.theme-table-icon {
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.theme-table-row {
  transition: background-color var(--transition-fast) var(--transition-timing);
}

.theme-table-row:hover {
  background: var(--color-bg-secondary);
}

.theme-table-cell {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border-primary);
  vertical-align: middle;
}

.theme-license-key {
  background: var(--color-bg-secondary);
  color: var(--color-primary-blue);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.theme-customer-name {
  font-weight: 500;
  color: var(--color-text-primary);
}

/* =============================================================================
   STATUS AND BADGE COMPONENTS
   ============================================================================= */

.theme-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.theme-status-active {
  background: rgba(34, 197, 94, 0.1);
  color: var(--color-success);
}

.theme-status-inactive {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
}

/* =============================================================================
   SECTION COMPONENTS
   ============================================================================= */

.theme-section {
  background: var(--color-bg-elevated);
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2rem;
  border: 1px solid var(--color-border-primary);
}

.theme-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--color-border-primary);
  background: var(--color-bg-secondary);
}

.theme-section-title {
  margin: 0;
  color: var(--color-text-primary);
  font-size: 1.25rem;
  font-weight: 600;
}

/* =============================================================================
   SEARCH COMPONENTS
   ============================================================================= */

.theme-search-section {
  margin-bottom: 2rem;
}

.theme-search-form {
  max-width: 600px;
}

.theme-search-input-group {
  display: flex;
  gap: 0.5rem;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-primary);
  border-radius: 0.75rem;
  padding: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.theme-search-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-text-muted);
  margin-left: 0.75rem;
}

.theme-search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--color-text-primary);
  font-size: 1rem;
  padding: 0.75rem;
  outline: none;
}

.theme-search-input::placeholder {
  color: var(--color-text-muted);
}

.theme-search-btn {
  background: var(--color-primary-blue);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast) var(--transition-timing);
}

.theme-search-btn:hover {
  background: #0284c7;
  transform: translateY(-1px);
}

/* =============================================================================
   STATISTICS COMPONENTS
   ============================================================================= */

.theme-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.theme-stat-card {
  background: var(--color-bg-elevated);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border-primary);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-stat-icon {
  width: 3rem;
  height: 3rem;
  color: var(--color-primary-blue);
  background: rgba(14, 165, 233, 0.1);
  padding: 0.75rem;
  border-radius: 0.75rem;
}

.theme-stat-content {
  flex: 1;
}

.theme-stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 0.25rem 0;
}

.theme-stat-label {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin: 0;
}

/* =============================================================================
   WELCOME BANNER
   ============================================================================= */

.theme-welcome-banner {
  background: linear-gradient(135deg, var(--color-primary-blue), var(--color-primary-purple));
  color: white;
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
}

.theme-welcome-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-welcome-icon {
  width: 3rem;
  height: 3rem;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.75rem;
  border-radius: 0.75rem;
}

.theme-welcome-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.theme-welcome-text {
  margin: 0;
  opacity: 0.9;
}

/* =============================================================================
   FLASH MESSAGES
   ============================================================================= */

.theme-flash-messages {
  margin-top: 1.5rem;
  padding: 0 2rem 2rem;
}

.theme-flash {
  padding: 0.75rem;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.theme-flash-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.theme-flash-success {
  background: rgba(34, 197, 94, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

/* =============================================================================
   MOBILE NAVIGATION
   ============================================================================= */

.theme-mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border-primary);
  z-index: 1000;
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
}

.theme-mobile-nav-content {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.75rem 0;
}

.theme-mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem;
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all var(--transition-fast) var(--transition-timing);
  min-width: 4rem;
}

.theme-mobile-nav-item:hover,
.theme-mobile-nav-item.active {
  color: var(--color-primary-blue);
  background: rgba(14, 165, 233, 0.1);
}

.theme-mobile-nav-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.theme-mobile-nav-text {
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 1024px) {
  .theme-sidebar {
    transform: translateX(-100%);
  }
  
  .theme-main {
    margin-left: 0;
  }
  
  .theme-mobile-nav {
    display: block;
  }
}

@media (max-width: 768px) {
  .theme-content {
    padding: 1rem;
  }
  
  .theme-topbar {
    padding: 1rem;
  }
  
  .theme-form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .theme-form-actions {
  flex-direction: column;
  }
  
  .theme-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .theme-welcome-content {
    flex-direction: column;
    text-align: center;
  }
  
  .theme-section-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}

/* =============================================================================
   ANIMATIONS
   ============================================================================= */

@keyframes theme-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.theme-fade-in {
  animation: theme-fade-in var(--transition-normal) var(--transition-timing);
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

.theme-text-center { text-align: center !important; }
.theme-text-left { text-align: left !important; }
.theme-text-right { text-align: right !important; }

.theme-p-0 { padding: 0 !important; }
.theme-p-1 { padding: 0.25rem !important; }
.theme-p-2 { padding: 0.5rem !important; }
.theme-p-3 { padding: 0.75rem !important; }
.theme-p-4 { padding: 1rem !important; }
.theme-p-5 { padding: 1.25rem !important; }
.theme-p-6 { padding: 1.5rem !important; }

.theme-m-0 { margin: 0 !important; }
.theme-m-1 { margin: 0.25rem !important; }
.theme-m-2 { margin: 0.5rem !important; }
.theme-m-3 { margin: 0.75rem !important; }
.theme-m-4 { margin: 1rem !important; }
.theme-m-5 { margin: 1.25rem !important; }
.theme-m-6 { margin: 1.5rem !important; }

/* Additional dark mode fixes for any remaining white elements */
.dark input[type="text"],
.dark input[type="email"],
.dark input[type="password"],
.dark input[type="number"],
.dark input[type="date"],
.dark input[type="time"],
.dark input[type="url"],
.dark input[type="tel"],
.dark input[type="search"] {
  background: var(--color-bg-secondary) !important;
  border-color: var(--color-border-primary) !important;
  color: var(--color-text-primary) !important;
}

.dark input[type="text"]::placeholder,
.dark input[type="email"]::placeholder,
.dark input[type="password"]::placeholder,
.dark input[type="number"]::placeholder,
.dark input[type="date"]::placeholder,
.dark input[type="time"]::placeholder,
.dark input[type="url"]::placeholder,
.dark input[type="tel"]::placeholder,
.dark input[type="search"]::placeholder {
  color: var(--color-text-muted) !important;
}

.dark input[type="text"]:focus,
.dark input[type="email"]:focus,
.dark input[type="password"]:focus,
.dark input[type="number"]:focus,
.dark input[type="date"]:focus,
.dark input[type="time"]:focus,
.dark input[type="url"]:focus,
.dark input[type="tel"]:focus,
.dark input[type="search"]:focus {
  border-color: var(--color-primary-blue) !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2) !important;
}

/* Fix any remaining white backgrounds in tables */
.dark .theme-table-row-inactive {
  opacity: 0.7;
  background: var(--color-bg-tertiary) !important;
}

.dark .theme-table-row-inactive:hover {
  background: var(--color-bg-secondary) !important;
  opacity: 0.9;
}

/* Ensure all form elements are properly styled */
.dark .theme-form-group {
  background: transparent !important;
}

.dark .theme-form-row {
  background: transparent !important;
}

/* Fix any remaining light backgrounds in cards */
.dark .theme-card,
.dark .theme-panel,
.dark .theme-box,
.dark .theme-container {
  background: var(--color-bg-elevated) !important;
  border-color: var(--color-border-primary) !important;
}

/* Ensure proper contrast for all interactive elements */
.dark .theme-btn:not(.theme-btn-primary):not(.theme-btn-success):not(.theme-btn-warning):not(.theme-btn-danger) {
  background: var(--color-bg-secondary) !important;
  border-color: var(--color-border-primary) !important;
  color: var(--color-text-primary) !important;
}

.dark .theme-btn:not(.theme-btn-primary):not(.theme-btn-success):not(.theme-btn-warning):not(.theme-btn-danger):hover {
  background: var(--color-bg-tertiary) !important;
  border-color: var(--color-border-accent) !important;
}

/* Fix any remaining white text */
.dark .theme-text-white,
.dark .theme-text-light {
  color: var(--color-text-primary) !important;
}

/* Ensure proper styling for any remaining elements */
.dark .theme-element,
.dark .theme-component,
.dark .theme-widget {
  background: var(--color-bg-elevated) !important;
  border-color: var(--color-border-primary) !important;
  color: var(--color-text-primary) !important;
}

/* Force dark mode on any remaining light elements */
.dark [class*="light"],
.dark [class*="white"] {
  background: var(--color-bg-secondary) !important;
  color: var(--color-text-primary) !important;
}

/* Ensure proper styling for any HTML elements that might be white */
.dark div,
.dark section,
.dark article,
.dark aside,
.dark header,
.dark footer,
.dark nav,
.dark main {
  background-color: inherit !important;
}

/* Fix any remaining form validation messages */
.dark .theme-error,
.dark .theme-success,
.dark .theme-warning,
.dark .theme-info {
  background: var(--color-bg-secondary) !important;
  border-color: var(--color-border-primary) !important;
}

.dark .theme-error {
  color: var(--color-danger) !important;
}

.dark .theme-success {
  color: var(--color-success) !important;
}

.dark .theme-warning {
  color: var(--color-warning) !important;
}

.dark .theme-info {
  color: var(--color-info) !important;
}

/* =============================================================================
   DARK MODE OVERRIDES - ENSURE COMPLETE DARK THEME
   ============================================================================= */

/* Force dark mode on all elements when dark class is present */
.dark {
  /* Additional dark mode overrides */
  --color-bg-primary: #0f172a !important;
  --color-bg-secondary: #1e293b !important;
  --color-bg-tertiary: #334155 !important;
  --color-bg-elevated: #1e293b !important;
  
  /* Ensure all backgrounds are dark */
  background-color: var(--color-bg-primary) !important;
}

.dark * {
  /* Override any remaining light backgrounds */
  background-color: inherit;
}

.dark body,
.dark .theme-body {
  background-color: var(--color-bg-primary) !important;
  color: var(--color-text-primary) !important;
}

.dark .theme-layout {
  background-color: var(--color-bg-primary) !important;
}

.dark .theme-main {
  background-color: var(--color-bg-primary) !important;
}

.dark .theme-content {
  background-color: var(--color-bg-primary) !important;
}

.dark .theme-sidebar {
  background: linear-gradient(180deg, var(--color-bg-secondary) 0%, var(--color-bg-tertiary) 100%) !important;
  border-right-color: var(--color-border-primary) !important;
}

.dark .theme-topbar {
  background: var(--color-bg-elevated) !important;
  border-bottom-color: var(--color-border-primary) !important;
}

.dark .theme-section {
  background: var(--color-bg-elevated) !important;
  border-color: var(--color-border-primary) !important;
}

.dark .theme-section-header {
  background: var(--color-bg-secondary) !important;
  border-bottom-color: var(--color-border-primary) !important;
}

.dark .theme-table-container {
  background: var(--color-bg-elevated) !important;
  border-color: var(--color-border-primary) !important;
}

.dark .theme-table-header {
  background: var(--color-bg-secondary) !important;
  border-bottom-color: var(--color-border-primary) !important;
}

.dark .theme-table-header-cell {
  background: var(--color-bg-secondary) !important;
  border-bottom-color: var(--color-border-primary) !important;
  color: var(--color-text-primary) !important;
}

.dark .theme-table-row:hover {
  background: var(--color-bg-secondary) !important;
}

.dark .theme-table-cell {
  border-bottom-color: var(--color-border-primary) !important;
  color: var(--color-text-primary) !important;
}

.dark .theme-form-card {
  background: var(--color-bg-elevated) !important;
  border-color: var(--color-border-primary) !important;
}

.dark .theme-form {
  background: var(--color-bg-elevated) !important;
}

.dark .theme-form-input {
  background: var(--color-bg-secondary) !important;
  border-color: var(--color-border-primary) !important;
  color: var(--color-text-primary) !important;
}

.dark .theme-form-input::placeholder {
  color: var(--color-text-muted) !important;
}

.dark .theme-search-input-group {
  background: var(--color-bg-elevated) !important;
  border-color: var(--color-border-primary) !important;
}

.dark .theme-search-input {
  background: transparent !important;
  color: var(--color-text-primary) !important;
}

.dark .theme-search-input::placeholder {
  color: var(--color-text-muted) !important;
}

.dark .theme-stat-card {
  background: var(--color-bg-elevated) !important;
  border-color: var(--color-border-primary) !important;
}

.dark .theme-btn-secondary {
  background: var(--color-bg-secondary) !important;
  border-color: var(--color-border-primary) !important;
  color: var(--color-text-primary) !important;
}

.dark .theme-btn-secondary:hover {
  background: var(--color-bg-tertiary) !important;
  border-color: var(--color-border-accent) !important;
}

.dark .theme-toggle-btn {
  background: var(--color-bg-secondary) !important;
  border-color: var(--color-border-primary) !important;
  color: var(--color-text-primary) !important;
}

.dark .theme-toggle-btn:hover {
  background: var(--color-bg-tertiary) !important;
  border-color: var(--color-border-accent) !important;
}

.dark .theme-mobile-nav {
  background: var(--color-bg-elevated) !important;
  border-top-color: var(--color-border-primary) !important;
}

.dark .theme-sidebar-brand {
  background: rgba(255, 255, 255, 0.02) !important;
  border-bottom-color: var(--color-border-primary) !important;
}

.dark .theme-sidebar-footer {
  border-top-color: var(--color-border-primary) !important;
}

.dark .theme-form-section {
  border-bottom-color: var(--color-border-primary) !important;
}

.dark .theme-form-actions {
  border-top-color: var(--color-border-primary) !important;
}

/* Ensure all text is properly colored in dark mode */
.dark .theme-title,
.dark .theme-section-title,
.dark .theme-table-title,
.dark .theme-form-title,
.dark .theme-form-subtitle,
.dark .theme-welcome-title,
.dark .theme-welcome-text,
.dark .theme-stat-number,
.dark .theme-stat-label,
.dark .theme-customer-name,
.dark .theme-version-text {
  color: var(--color-text-primary) !important;
}

.dark .theme-section-title {
  color: var(--color-primary-blue) !important;
}

.dark .theme-form-label {
  color: var(--color-text-primary) !important;
}

.dark .theme-form-help {
  color: var(--color-text-muted) !important;
}

.dark .theme-table-count {
  color: var(--color-text-muted) !important;
}

.dark .theme-brand-title {
  color: var(--color-text-primary) !important;
}

.dark .theme-brand-subtitle {
  color: var(--color-text-muted) !important;
}

.dark .theme-user-name {
  color: var(--color-text-primary) !important;
}

/* Ensure all borders are properly colored */
.dark .theme-border-primary,
.dark .theme-border-secondary {
  border-color: var(--color-border-primary) !important;
}

/* Fix any remaining white backgrounds */
.dark .theme-card,
.dark .theme-panel,
.dark .theme-container {
  background: var(--color-bg-elevated) !important;
  border-color: var(--color-border-primary) !important;
}

/* Ensure proper contrast for status indicators */
.dark .theme-status-active {
  background: rgba(34, 197, 94, 0.15) !important;
  color: var(--color-success) !important;
}

.dark .theme-status-inactive {
  background: rgba(239, 68, 68, 0.15) !important;
  color: var(--color-danger) !important;
}

/* Fix license key styling */
.dark .theme-license-key {
  background: var(--color-bg-secondary) !important;
  color: var(--color-primary-blue) !important;
}

/* Ensure proper hover states */
.dark .theme-nav-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

.dark .theme-mobile-nav-item:hover,
.dark .theme-mobile-nav-item.active {
  background: rgba(14, 165, 233, 0.15) !important;
}

/* Fix any remaining form elements */
.dark select,
.dark textarea {
  background: var(--color-bg-secondary) !important;
  border-color: var(--color-border-primary) !important;
  color: var(--color-text-primary) !important;
}

.dark select option {
  background: var(--color-bg-secondary) !important;
  color: var(--color-text-primary) !important;
}

/* Ensure proper focus states */
.dark .theme-form-input:focus {
  border-color: var(--color-primary-blue) !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2) !important;
}

/* Fix any remaining light elements */
.dark .theme-light-bg,
.dark .theme-white-bg {
  background: var(--color-bg-secondary) !important;
}

.dark .theme-light-text {
  color: var(--color-text-secondary) !important;
}

/* Ensure proper shadow contrast in dark mode */
.dark .theme-section,
.dark .theme-form-card,
.dark .theme-table-container,
.dark .theme-stat-card {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.6), 0 2px 4px -1px rgba(0, 0, 0, 0.5) !important;
}

.dark .theme-sidebar {
  box-shadow: 4px 0 12px -2px rgba(0, 0, 0, 0.8) !important;
}

.dark .theme-topbar {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4) !important;
}

/* Fix remaining white backgrounds in tables and ensure proper styling */
.dark .theme-table tbody tr {
  background: var(--color-bg-elevated) !important;
}

.dark .theme-table tbody tr:nth-child(even) {
  background: var(--color-bg-tertiary) !important;
}

.dark .theme-table tbody tr:hover {
  background: var(--color-bg-secondary) !important;
}

.dark .theme-table tbody tr.theme-table-row-inactive {
  background: var(--color-bg-tertiary) !important;
  opacity: 0.7;
}

.dark .theme-table tbody tr.theme-table-row-inactive:hover {
  background: var(--color-bg-secondary) !important;
  opacity: 0.9;
}

/* Fix page headers - ensure proper gradient without dark blocks */
.dark .theme-form-header {
  background: linear-gradient(135deg, var(--color-primary-blue), var(--color-primary-purple)) !important;
  color: white !important;
}

.dark .theme-welcome-banner {
  background: linear-gradient(135deg, var(--color-primary-blue), var(--color-primary-purple)) !important;
  color: white !important;
}

/* Ensure all table cells have proper dark backgrounds */
.dark .theme-table td {
  background: inherit !important;
  color: var(--color-text-primary) !important;
}

.dark .theme-table th {
  background: var(--color-bg-secondary) !important;
  color: var(--color-text-primary) !important;
}

/* Fix any remaining white backgrounds in sections */
.dark .theme-section > * {
  background: inherit !important;
}

.dark .theme-section-content {
  background: var(--color-bg-elevated) !important;
}

/* Ensure proper text visibility in light theme */
.light .theme-text-primary,
.light .theme-title,
.light .theme-section-title,
.light .theme-table-title,
.light .theme-form-title,
.light .theme-form-subtitle,
.light .theme-welcome-title,
.light .theme-welcome-text,
.light .theme-stat-number,
.light .theme-stat-label,
.light .theme-customer-name,
.light .theme-version-text,
.light .theme-brand-title,
.light .theme-brand-subtitle,
.light .theme-user-name,
.light .theme-form-label,
.light .theme-table-count {
  color: var(--color-text-primary) !important;
}

.light .theme-text-secondary,
.light .theme-text-muted,
.light .theme-form-help,
.light .theme-brand-subtitle {
  color: var(--color-text-secondary) !important;
}

/* Ensure proper contrast for all elements in both themes */
.dark .theme-text-primary,
.dark .theme-title,
.dark .theme-section-title,
.dark .theme-table-title,
.dark .theme-form-title,
.dark .theme-form-subtitle,
.dark .theme-welcome-title,
.dark .theme-welcome-text,
.dark .theme-stat-number,
.dark .theme-stat-label,
.dark .theme-customer-name,
.dark .theme-version-text,
.dark .theme-brand-title,
.dark .theme-brand-subtitle,
.dark .theme-user-name,
.dark .theme-form-label,
.dark .theme-table-count {
  color: var(--color-text-primary) !important;
}

.dark .theme-text-secondary,
.dark .theme-text-muted,
.dark .theme-form-help,
.dark .theme-brand-subtitle {
  color: var(--color-text-muted) !important;
}

/* Fix table row backgrounds specifically */
.dark .theme-table tbody tr {
  background: var(--color-bg-elevated) !important;
}

.dark .theme-table tbody tr:nth-child(even) {
  background: var(--color-bg-tertiary) !important;
}

.dark .theme-table tbody tr:hover {
  background: var(--color-bg-secondary) !important;
}

/* Ensure proper styling for all table elements */
.dark .theme-table {
  background: var(--color-bg-elevated) !important;
}

.dark .theme-table thead {
  background: var(--color-bg-secondary) !important;
}

.dark .theme-table tbody {
  background: var(--color-bg-elevated) !important;
}

/* Fix any remaining white backgrounds in form sections */
.dark .theme-form-section {
  background: transparent !important;
}

.dark .theme-form-group {
  background: transparent !important;
}

.dark .theme-form-row {
  background: transparent !important;
}

/* Ensure proper styling for all remaining elements */
.dark .theme-card,
.dark .theme-panel,
.dark .theme-box,
.dark .theme-container,
.dark .theme-element,
.dark .theme-component,
.dark .theme-widget {
  background: var(--color-bg-elevated) !important;
  border-color: var(--color-border-primary) !important;
}

/* Fix any remaining white text issues */
.dark .theme-text-white,
.dark .theme-text-light {
  color: var(--color-text-primary) !important;
}

.light .theme-text-white,
.light .theme-text-light {
  color: var(--color-text-primary) !important;
}

/* Ensure proper contrast for status indicators in both themes */
.dark .theme-status-active {
  background: rgba(34, 197, 94, 0.15) !important;
  color: var(--color-success) !important;
}

.dark .theme-status-inactive {
  background: rgba(239, 68, 68, 0.15) !important;
  color: var(--color-danger) !important;
}

.light .theme-status-active {
  background: rgba(34, 197, 94, 0.1) !important;
  color: var(--color-success) !important;
}

.light .theme-status-inactive {
  background: rgba(239, 68, 68, 0.1) !important;
  color: var(--color-danger) !important;
}

/* Fix license key styling in both themes */
.dark .theme-license-key {
  background: var(--color-bg-secondary) !important;
  color: var(--color-primary-blue) !important;
}

.light .theme-license-key {
  background: var(--color-bg-secondary) !important;
  color: var(--color-primary-blue) !important;
}

/* Ensure proper button styling in both themes */
.dark .theme-btn:not(.theme-btn-primary):not(.theme-btn-success):not(.theme-btn-warning):not(.theme-btn-danger) {
  background: var(--color-bg-secondary) !important;
  border-color: var(--color-border-primary) !important;
  color: var(--color-text-primary) !important;
}

.light .theme-btn:not(.theme-btn-primary):not(.theme-btn-success):not(.theme-btn-warning):not(.theme-btn-danger) {
  background: var(--color-bg-secondary) !important;
  border-color: var(--color-border-primary) !important;
  color: var(--color-text-primary) !important;
}

/* Fix any remaining form input styling */
.dark input[type="text"],
.dark input[type="email"],
.dark input[type="password"],
.dark input[type="number"],
.dark input[type="date"],
.dark input[type="time"],
.dark input[type="url"],
.dark input[type="tel"],
.dark input[type="search"],
.dark select,
.dark textarea {
  background: var(--color-bg-secondary) !important;
  border-color: var(--color-border-primary) !important;
  color: var(--color-text-primary) !important;
}

.light input[type="text"],
.light input[type="email"],
.light input[type="password"],
.light input[type="number"],
.light input[type="date"],
.light input[type="time"],
.light input[type="url"],
.light input[type="tel"],
.light input[type="search"],
.light select,
.light textarea {
  background: var(--color-bg-secondary) !important;
  border-color: var(--color-border-primary) !important;
  color: var(--color-text-primary) !important;
}

/* Ensure proper placeholder text visibility */
.dark input::placeholder,
.dark textarea::placeholder {
  color: var(--color-text-muted) !important;
}

.light input::placeholder,
.light textarea::placeholder {
  color: var(--color-text-muted) !important;
}

/* Fix any remaining white backgrounds in specific components */
.dark .theme-search-input-group {
  background: var(--color-bg-elevated) !important;
}

.dark .theme-search-input {
  background: transparent !important;
}

.dark .theme-stat-card {
  background: var(--color-bg-elevated) !important;
}

.dark .theme-sidebar-brand {
  background: rgba(255, 255, 255, 0.02) !important;
}

/* Ensure proper styling for all navigation elements */
.dark .theme-nav-item {
  background: transparent !important;
}

.dark .theme-nav-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

.dark .theme-nav-item.active {
  background: var(--color-primary-blue) !important;
  color: var(--color-text-inverse) !important;
}

/* Fix mobile navigation styling */
.dark .theme-mobile-nav-item {
  background: transparent !important;
}

.dark .theme-mobile-nav-item:hover,
.dark .theme-mobile-nav-item.active {
  background: rgba(14, 165, 233, 0.15) !important;
}

/* Fix Reports page specific styling */
.dark .theme-reports-header,
.dark .theme-reports-title,
.dark .theme-reports-subtitle,
.dark .theme-reports-description,
.dark .theme-reports-summary,
.dark .theme-reports-footer,
.dark .theme-reports-total,
.dark .theme-reports-count,
.dark .theme-reports-stats,
.dark .theme-reports-info,
.dark .theme-reports-section,
.dark .theme-reports-content {
  background: transparent !important;
  color: var(--color-text-primary) !important;
}

.dark .theme-reports-header h1,
.dark .theme-reports-header h2,
.dark .theme-reports-header h3,
.dark .theme-reports-header p,
.dark .theme-reports-header span,
.dark .theme-reports-header div {
  background: transparent !important;
  color: var(--color-text-primary) !important;
}

.dark .theme-reports-footer h1,
.dark .theme-reports-footer h2,
.dark .theme-reports-footer h3,
.dark .theme-reports-footer p,
.dark .theme-reports-footer span,
.dark .theme-reports-footer div {
  background: transparent !important;
  color: var(--color-text-primary) !important;
}

/* Fix Reports page header - restore proper gradient background */
.dark .theme-reports-header {
  background: linear-gradient(135deg, var(--color-primary-blue), var(--color-primary-purple)) !important;
  color: white !important;
  padding: 2rem !important;
  border-radius: 0.75rem !important;
  margin-bottom: 2rem !important;
}

.dark .theme-reports-header h1,
.dark .theme-reports-header h2,
.dark .theme-reports-header h3,
.dark .theme-reports-header p,
.dark .theme-reports-header span,
.dark .theme-reports-header div {
  background: transparent !important;
  color: white !important;
}

/* Ensure Reports page header has proper styling in both themes */
.light .theme-reports-header {
  background: linear-gradient(135deg, var(--color-primary-blue), var(--color-primary-purple)) !important;
  color: white !important;
  padding: 2rem !important;
  border-radius: 0.75rem !important;
  margin-bottom: 2rem !important;
}

.light .theme-reports-header h1,
.light .theme-reports-header h2,
.light .theme-reports-header h3,
.light .theme-reports-header p,
.light .theme-reports-header span,
.light .theme-reports-header div {
  background: transparent !important;
  color: white !important;
}

/* Fix any remaining dark blocks in page headers and footers */
.dark .theme-page-header,
.dark .theme-page-title,
.dark .theme-page-subtitle,
.dark .theme-page-description,
.dark .theme-page-content,
.dark .theme-page-footer,
.dark .theme-page-summary {
  background: transparent !important;
}

.dark .theme-page-header *,
.dark .theme-page-title *,
.dark .theme-page-subtitle *,
.dark .theme-page-description *,
.dark .theme-page-content *,
.dark .theme-page-footer *,
.dark .theme-page-summary * {
  background: inherit !important;
}

/* Ensure all text elements have proper backgrounds */
.dark .theme-text-container,
.dark .theme-text-wrapper,
.dark .theme-text-section,
.dark .theme-text-block,
.dark .theme-text-area {
  background: transparent !important;
}

.dark .theme-text-container *,
.dark .theme-text-wrapper *,
.dark .theme-text-section *,
.dark .theme-text-block *,
.dark .theme-text-area * {
  background: transparent !important;
}

/* Fix any remaining elements with dark backgrounds */
.dark .theme-element,
.dark .theme-component,
.dark .theme-widget,
.dark .theme-module,
.dark .theme-panel,
.dark .theme-box,
.dark .theme-container {
  background: var(--color-bg-elevated) !important;
}

.dark .theme-element *,
.dark .theme-component *,
.dark .theme-widget *,
.dark .theme-module *,
.dark .theme-panel *,
.dark .theme-box *,
.dark .theme-container * {
  background: inherit !important;
}

/* Ensure proper styling for all remaining text elements */
.dark .theme-heading,
.dark .theme-paragraph,
.dark .theme-label,
.dark .theme-caption,
.dark .theme-note,
.dark .theme-hint,
.dark .theme-help {
  background: transparent !important;
  color: var(--color-text-primary) !important;
}

/* Fix any remaining white backgrounds in specific sections */
.dark .theme-section-header,
.dark .theme-section-footer,
.dark .theme-section-summary,
.dark .theme-section-content {
  background: transparent !important;
}

.dark .theme-section-header *,
.dark .theme-section-footer *,
.dark .theme-section-summary *,
.dark .theme-section-content * {
  background: inherit !important;
}

/* Fix sidebar text colors for both themes */
.dark .theme-sidebar-nav .theme-nav-item {
  color: var(--color-text-primary) !important;
}

.dark .theme-sidebar-nav .theme-nav-item:hover {
  color: var(--color-text-inverse) !important;
}

.dark .theme-sidebar-nav .theme-nav-item.active {
  color: var(--color-text-inverse) !important;
}

.light .theme-sidebar-nav .theme-nav-item {
  color: var(--color-text-primary) !important;
}

.light .theme-sidebar-nav .theme-nav-item:hover {
  color: var(--color-text-inverse) !important;
}

.light .theme-sidebar-nav .theme-nav-item.active {
  color: var(--color-text-inverse) !important;
}

/* Fix sidebar brand text colors */
.dark .theme-sidebar-brand .theme-brand-title {
  color: var(--color-text-primary) !important;
}

.dark .theme-sidebar-brand .theme-brand-subtitle {
  color: var(--color-text-muted) !important;
}

.light .theme-sidebar-brand .theme-brand-title {
  color: var(--color-text-primary) !important;
}

.light .theme-sidebar-brand .theme-brand-subtitle {
  color: var(--color-text-muted) !important;
}

/* Fix sidebar footer text colors */
.dark .theme-sidebar-footer .theme-version-text {
  color: var(--color-text-muted) !important;
}

.light .theme-sidebar-footer .theme-version-text {
  color: var(--color-text-muted) !important;
}

/* Fix mobile navigation text colors */
.dark .theme-mobile-nav .theme-mobile-nav-item {
  color: var(--color-text-primary) !important;
}

.dark .theme-mobile-nav .theme-mobile-nav-item:hover,
.dark .theme-mobile-nav .theme-mobile-nav-item.active {
  color: var(--color-text-inverse) !important;
}

.light .theme-mobile-nav .theme-mobile-nav-item {
  color: var(--color-text-primary) !important;
}

.light .theme-mobile-nav .theme-mobile-nav-item:hover,
.light .theme-mobile-nav .theme-mobile-nav-item.active {
  color: var(--color-text-inverse) !important;
}

/* Ensure proper contrast for all navigation elements */
.dark .theme-nav-item i,
.dark .theme-mobile-nav-item i {
  color: inherit !important;
}

.light .theme-nav-item i,
.light .theme-mobile-nav-item i {
  color: inherit !important;
}

/* Ensure Feather icons are properly displayed */
.theme-nav-icon,
.theme-mobile-nav-icon {
  width: 1.25rem !important;
  height: 1.25rem !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

/* Force icon visibility */
.theme-nav-icon svg,
.theme-mobile-nav-icon svg {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  fill: currentColor !important;
  stroke: currentColor !important;
}

/* Ensure icons are visible in both themes */
.dark .theme-nav-icon svg,
.dark .theme-mobile-nav-icon svg {
  color: inherit !important;
}

.light .theme-nav-icon svg,
.light .theme-mobile-nav-icon svg {
  color: inherit !important;
}

/* Hide empty icon containers */
.theme-nav-icon:empty,
.theme-mobile-nav-icon:empty {
  display: none !important;
}
