/* Light Theme */
[data-theme="light"] {
  /* Colors */
  --theme-primary: #2F7164;
  --theme-primary-rgb: 47, 113, 100;
  --theme-menu-active-border: #b5b5b5; /* Darker grey for menu border */
  --theme-accent: #059669;
  --theme-accent-rgb: 5, 150, 105;
  --theme-accent-gradient: linear-gradient(135deg, #34d399 0%, #059669 100%);
  --theme-text-primary: #0f172a;  /* Dark slate */
  --theme-text-secondary: #475569;  /* Medium slate */
  --theme-bg-surface: #ffffff;
  --theme-bg-elevated: #f1f5f9;  /* Slightly darker background for elevated elements */
  --theme-border: rgba(0, 0, 0, 0.1);

  /* Sidebar Header Specific */
  --theme-sidebar-header-bg: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);  /* Distinct gradient for header */

  /* Banner Specific */
  --theme-banner-bg: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  --theme-banner-accent: linear-gradient(135deg, #34d399 0%, #059669 100%);
  --theme-banner-decoration-1: linear-gradient(135deg, rgba(47, 113, 100, 0.15) 0%, rgba(5, 150, 105, 0.18) 100%);
  --theme-banner-decoration-2: linear-gradient(135deg, rgba(20, 83, 45, 0.08) 0%, rgba(5, 150, 105, 0.12) 100%);
  --theme-banner-border: linear-gradient(to right, #34d399, #059669);

  /* Gradients */
  --theme-bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  --theme-card-bg: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  --theme-hover-bg: rgba(47, 113, 100, 0.08);
  --theme-border-color: rgba(0, 0, 0, 0.1);

  /* Background Pattern */
  --theme-pattern-primary: #f5f7fa;
  --theme-pattern-secondary: #e9ecef;
  --theme-bg-pattern: 
    linear-gradient(135deg, var(--theme-pattern-primary) 21px, var(--theme-pattern-secondary) 22px, var(--theme-pattern-secondary) 24px, transparent 24px, transparent 67px, var(--theme-pattern-secondary) 67px, var(--theme-pattern-secondary) 69px, transparent 69px),
    linear-gradient(225deg, var(--theme-pattern-primary) 21px, var(--theme-pattern-secondary) 22px, var(--theme-pattern-secondary) 24px, transparent 24px, transparent 67px, var(--theme-pattern-secondary) 67px, var(--theme-pattern-secondary) 69px, transparent 69px)0 64px;
  --theme-bg-pattern-size: 64px 128px;

  /* Shadows */
  --theme-shadow-sm: 0 2px 8px rgba(5, 150, 105, 0.3);
  --theme-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);

  /* Table Overrides */
  --theme-table-header-bg: #f1f5f9;
  --theme-table-row-alt: #f8fafc;
  --theme-table-row-hover: rgba(47, 113, 100, 0.04);
  --theme-table-row-failed-bg: rgba(244, 67, 54, 0.02);
  --theme-table-row-failed-hover: rgba(244, 67, 54, 0.05);
  --theme-table-row-failed-alt: rgba(244, 67, 54, 0.03);

  /* Dashboard Overrides */
  --theme-dashboard-card-bg: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  --theme-dashboard-icon-bg: rgba(47, 113, 100, 0.08);
  --theme-dashboard-table-header-bg: #f1f5f9;
  --theme-dashboard-table-row-hover: rgba(47, 113, 100, 0.04);

  /* Sidebar Overrides */
  --theme-sidebar-bg: var(--theme-bg-surface);
  --theme-sidebar-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);

  /* Content Panel Overrides */
  --theme-content-panel-bg: rgba(249, 250, 251, 0.9);
  --theme-content-panel-border: 1px solid rgba(0, 0, 0, 0.1);
  --theme-content-panel-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  --theme-content-panel-bg-hover: rgba(248, 250, 252, 0.95);

  /* Version Indicator */
  --theme-bg-muted: #f3f4f6;
  --theme-bg-tooltip: #333;
  --theme-text-on-tooltip: #ffffff;

  /* Shadows */
  --theme-shadow-sm: 0 2px 8px rgba(5, 150, 105, 0.3);
  --theme-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);

  /* Graph Theme Overrides */
  --theme-graph-bg: #ffffff;
  --theme-graph-grid-color: rgba(0, 0, 0, 0.15);
  --theme-graph-text-color: #2d3748;
  --theme-graph-border: rgba(0, 0, 0, 0.1);
  --theme-graph-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  --theme-graph-container-bg: #ffffff;
  --theme-graph-container-border: rgba(0, 0, 0, 0.1);
  --theme-graph-container-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  --theme-graph-tooltip-bg: rgba(255, 255, 255, 0.95);
  --theme-graph-tooltip-color: #2d3748;
  --theme-graph-tooltip-border: rgba(0, 0, 0, 0.1);
  --theme-graph-tooltip-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

  /* Support Theme Overrides - Light */
  --theme-support-panel-bg: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
  --theme-support-search-bg: linear-gradient(135deg, #ffffff 0%, #f1f5f9 50%, #e2e8f0 100%);
  --theme-support-ticket-bg: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
  --theme-support-ticket-hover: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
  --theme-support-ticket-selected: linear-gradient(135deg, rgba(5, 150, 105, 0.08) 0%, rgba(5, 150, 105, 0.12) 50%, rgba(5, 150, 105, 0.15) 100%);
  --theme-support-ticket-selected-border: #059669;
  --theme-support-id-bg: linear-gradient(135deg, rgba(5, 150, 105, 0.1) 0%, rgba(5, 150, 105, 0.15) 100%);

  /* Support Button Colors - Light */
  --theme-support-button-bg: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
  --theme-support-button-hover: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #cbd5e1 100%);
  --theme-support-button-active: linear-gradient(135deg, #059669 0%, #047857 50%, #065f46 100%);

  /* Support Details Panel - Light */
  --theme-support-details-bg: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
  --theme-support-header-bg: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
  --theme-support-header-accent: linear-gradient(90deg, #059669 0%, #047857 50%, #065f46 100%);
  --theme-support-content-bg: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
  --theme-support-description-bg: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);

  /* Support Message Colors - Light */
  --theme-support-message-bg: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
  --theme-support-message-border: #e5e7eb;
  --theme-support-message-hover: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #cbd5e1 100%);
  --theme-support-message-support-bg: linear-gradient(135deg, rgba(5, 150, 105, 0.08) 0%, rgba(5, 150, 105, 0.12) 50%, rgba(5, 150, 105, 0.15) 100%);
  --theme-support-message-support-border: rgba(5, 150, 105, 0.2);
  --theme-support-conversation-bg: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #cbd5e1 100%);

  /* Support Input Colors - Light */
  --theme-support-input-container-bg: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
  --theme-support-input-bg: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
  --theme-support-input-border: #e5e7eb;
  --theme-support-input-focus-border: #059669;
  --theme-support-input-focus-shadow: rgba(5, 150, 105, 0.2);

  /* Support Empty State - Light */
  --theme-support-empty-bg: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
  --theme-support-empty-icon-color: #059669;
  --theme-support-empty-text-color: #6B7280;

  /* Support Status Colors - Light */
  --theme-support-status-open-bg: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
  --theme-support-status-open-color: #047857;
  --theme-support-status-voting-bg: linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fde68a 100%);
  --theme-support-status-voting-color: #b45309;
  --theme-support-status-closed-bg: linear-gradient(135deg, #fef2f2 0%, #fee2e2 50%, #fca5a5 100%);
  --theme-support-status-closed-color: #b91c1c;

  /* Support Category Colors - Light */
  --theme-support-category-feature-bg: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);
  --theme-support-category-feature-color: #1d4ed8;
  --theme-support-category-bug-bg: linear-gradient(135deg, #fef2f2 0%, #fee2e2 50%, #fca5a5 100%);
  --theme-support-category-bug-color: #b91c1c;
  --theme-support-category-improvement-bg: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
  --theme-support-category-improvement-color: #047857;

  /* Support Priority Colors - Light */
  --theme-support-priority-low-bg: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
  --theme-support-priority-low-color: #047857;
  --theme-support-priority-medium-bg: linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fde68a 100%);
  --theme-support-priority-medium-color: #b45309;
  --theme-support-priority-high-bg: linear-gradient(135deg, #fef2f2 0%, #fee2e2 50%, #fca5a5 100%);
  --theme-support-priority-high-color: #b91c1c;

  /* Support Icons - Light */
  --theme-support-icon-color: #059669;
  --theme-support-icon-secondary: #6B7280;

  /* Support Attachments - Light */
  --theme-support-attachment-bg: linear-gradient(135deg, rgba(5, 150, 105, 0.08) 0%, rgba(5, 150, 105, 0.12) 50%, rgba(5, 150, 105, 0.15) 100%);
  --theme-support-attachment-color: #059669;
  --theme-support-attachment-hover-bg: linear-gradient(135deg, rgba(5, 150, 105, 0.12) 0%, rgba(5, 150, 105, 0.15) 50%, rgba(5, 150, 105, 0.2) 100%);

  /* Refill Card Overrides - Light */
  --theme-refill-card-border: 1px solid #e2e8f0;
  --theme-refill-card-disabled-bg: rgba(203, 213, 225, 0.4);
  --theme-refill-card-disabled-text: #94a3b8;
  --theme-refill-preview-bg: #f8fafc;
  --theme-refill-preview-border: 1px solid #e2e8f0;
  --theme-refill-slider-track-bg: #e2e8f0;
  --theme-refill-slider-thumb-bg: var(--theme-primary);
  --theme-refill-slider-thumb-border: 2px solid #ffffff;

  /* Refill Card Button - Light */
  --theme-refill-card-button-bg: linear-gradient(135deg, #2F7164 0%, #065f46 100%);
  --theme-refill-card-button-text: #ffffff;
  --theme-refill-card-button-border: 1px solid #065f46;
  --theme-refill-card-button-hover-bg: linear-gradient(135deg, #34d399 0%, #059669 100%);
  --theme-refill-card-button-hover-text: #ffffff;
  --theme-refill-card-button-hover-border: 1px solid #059669;
  --theme-refill-card-button-active-bg: linear-gradient(135deg, #059669 0%, #047857 100%);
  --theme-refill-card-button-active-text: #ffffff;
  --theme-refill-card-button-active-border: 1px solid #047857;

  /* Category Card Light Theme */
  --theme-category-card-bg: rgba(255, 255, 255, 1);
  --theme-category-card-border: 1px solid rgba(0, 0, 0, 0.1);
  --theme-category-card-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);

  /* Category Card Text */
  --theme-category-title-color: #0f172a;  /* Dark slate */
  --theme-category-desc-color: #475569;  /* Medium slate */
  --theme-category-icon-color: #4ade80;  /* Bright green */

  /* Coming Soon Tag */
  --theme-coming-soon-bg: rgba(239, 68, 68, 0.1);
  --theme-coming-soon-text: #dc2626;  /* Red */

  /* Tier Card Light Theme */
  --theme-tier-title-color: #0f172a;  /* Dark slate */
  --theme-tier-desc-color: #475569;  /* Medium slate */

  /* Price Colors */
  --theme-price-color: #0f172a;  /* Dark slate */
  --theme-price-currency-color: #334155;  /* Slate */
  --theme-price-amount-color: #0f172a;  /* Dark slate */
  --theme-price-period-color: #475569;  /* Medium slate */

  /* Vision Vote Light Theme Overrides */
  --theme-vv-stat-card-bg: var(--theme-bg-surface);
  --theme-vv-stat-card-shadow: var(--theme-shadow-sm);
  --theme-vv-stat-value-color: var(--theme-text-primary);
  --theme-vv-stat-label-color: var(--theme-text-secondary);
  --theme-vv-stat-icon-color: var(--theme-accent);

  /* Vision Vote Leaderboard Light Theme */
  --theme-vv-leader-card-bg: var(--theme-bg-surface);
  --theme-vv-leader-card-border: var(--theme-border);
  --theme-vv-leader-card-shadow: var(--theme-shadow-sm);
  --theme-vv-leader-title-color: var(--theme-text-primary);
  --theme-vv-leader-desc-color: var(--theme-text-secondary);

  /* Medal Colors - Light theme gradients */
  --theme-vv-medal-gold-gradient: linear-gradient(135deg, #FFD700 0%, #FDB931 100%);
  --theme-vv-medal-silver-gradient: linear-gradient(135deg, #C0C0C0 0%, #A0A0A0 100%);
  --theme-vv-medal-bronze-gradient: linear-gradient(135deg, #CD7F32 0%, #A0522D 100%);

  /* Vision Vote Info Box Light Theme */
  --theme-vv-info-bg: rgba(var(--theme-info-color-rgb), 0.1);
  --theme-vv-info-border: rgba(var(--theme-info-color-rgb), 0.2);
  --theme-vv-info-color: var(--theme-text-primary);
}

/* Light Theme Specific Overrides */
[data-theme="light"] .theme-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

[data-theme="light"] .theme-btn-secondary:hover {
  background: var(--theme-hover-bg);
  color: var(--theme-text-primary);
  border-color: var(--theme-accent);
}

/* Light Theme Scrollbar */
[data-theme="light"] .theme-scrollbar::-webkit-scrollbar {
  width: 6px;
}

[data-theme="light"] .theme-scrollbar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .theme-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

[data-theme="light"] .theme-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* Light Theme Status Badges */
[data-theme="light"] .theme-badge-success {
  background: rgba(5, 150, 105, 0.1);
  color: var(--theme-success-color);
}

[data-theme="light"] .theme-badge-warning {
  background: rgba(217, 119, 6, 0.1);
  color: var(--theme-warning-color);
}

[data-theme="light"] .theme-badge-error {
  background: rgba(220, 38, 38, 0.1);
  color: var(--theme-error-color);
}

[data-theme="light"] .theme-badge-info {
  background: rgba(37, 99, 235, 0.1);
  color: var(--theme-info-color);
}

/* Light Theme Submenu */
[data-theme="light"] .has-submenu {
  position: relative;
  flex-direction: column;
  height: auto;
  min-height: 48px;
  padding: 0;
}

[data-theme="light"] .has-submenu > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  height: 48px;
}

[data-theme="light"] .submenu {
  display: none;
  width: calc(100% - 8px); /* reduced indent matching smaller margin */
  margin-left: 4px;
  background: var(--theme-bg-elevated);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease-out;
  border-radius: 6px;
  box-shadow: var(--theme-shadow-sm);
  border: 1px solid var(--theme-border-color);
}

[data-theme="light"] .has-submenu.open .submenu {
  display: block;
  max-height: 500px;
  margin-bottom: 8px;
}

[data-theme="light"] .submenu-item {
  padding: 8px 16px 8px 16px;
  font-size: 0.9em;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--theme-text-primary);
}

[data-theme="light"] .submenu-item:hover {
  background: var(--theme-hover-bg);
}

[data-theme="light"] .submenu-item i {
  font-size: 14px;
  color: var(--theme-text-secondary);
}

[data-theme="light"] .submenu-item:hover i {
  color: var(--theme-text-primary);
}

[data-theme="light"] .submenu-arrow {
  color: var(--theme-text-secondary);
  transition: transform 0.3s ease;
}

[data-theme="light"] .has-submenu.open .submenu-arrow {
  transform: rotate(180deg);
  color: var(--theme-text-primary);
}

/* Subscription Theme Overrides */
:root[data-theme="light"] {
  /* Individual Plan Gradients */
  --individual-gradient-start: rgba(243, 244, 246, 0.8);
  --individual-gradient-end: rgba(249, 250, 251, 0.9);
  --individual-popular-gradient-start: rgba(6, 95, 70, 0.05);
  --individual-popular-gradient-end: rgba(4, 120, 87, 0.1);

  /* Button Gradients */
  --theme-subscription-btn-bg-start: #34d399;
  --theme-subscription-btn-bg-end: #059669;
  --theme-subscription-btn-active-bg: #2563eb;
  --theme-subscription-btn-active-hover-bg: #1d4ed8;
  --theme-subscription-btn-hover-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
}