/* ===== THEME SYSTEM - Light & Dark Theme Support ===== */

/* Default Dark Theme (existing) */
:root[data-theme="dark"] {
    --bg-primary: #0d0f1a;
    --bg-secondary: #1a1d29;
    --bg-tertiary: #242938;
    --accent-cyan: #00f5ff;
    --accent-magenta: #ff0080;
    --accent-green: #00ff88;
    --accent-red: #ff4757;
    --text-primary: #ffffff;
    --text-secondary: #b8bcc8;
    --text-muted: #6c7293;
    --border: #2d3142;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 245, 255, 0.1);
    --shadow-hover: rgba(0, 245, 255, 0.2);
    --card-bg: rgba(15, 15, 30, 0.9);
    --navbar-bg: rgba(20, 20, 40, 0.9);
    --sidebar-bg: rgba(20, 20, 40, 0.9);
}

/* Light Theme - Purple/Lavender Gradient Scheme */
:root[data-theme="light"] {
    --bg-primary: linear-gradient(135deg, #f5f3ff, #ede9fe);
    --bg-secondary: linear-gradient(135deg, #f0edff, #e5e1ff);
    --bg-tertiary: linear-gradient(135deg, #ede9fe, #ddd6fe);
    --accent-cyan: #8b5cf6;
    --accent-magenta: #a855f7;
    --accent-green: #8b5cf6;
    --accent-red: #dc2626;
    --text-primary: #374151 !important;
    --text-secondary: #6b7280 !important;
    --text-muted: #9ca3af !important;
    --border: #d1d5db;
    --glass-bg: rgba(245, 243, 255, 0.95);
    --glass-border: rgba(139, 92, 246, 0.2);
    --shadow-color: rgba(107, 114, 128, 0.2);
    --shadow-hover: rgba(107, 114, 128, 0.3);
    --card-bg: linear-gradient(135deg, #f8f6ff, #f0edff);
    --navbar-bg: linear-gradient(135deg, #f1f0ff, #e5e3ff);
    --sidebar-bg: linear-gradient(135deg, #f5f3ff, #ede9fe);
}

/* Default to dark theme if no data-theme attribute */
:root {
    --bg-primary: #0d0f1a;
    --bg-secondary: #1a1d29;
    --bg-tertiary: #242938;
    --accent-cyan: #00f5ff;
    --accent-magenta: #ff0080;
    --accent-green: #00ff88;
    --accent-red: #ff4757;
    --text-primary: #ffffff;
    --text-secondary: #b8bcc8;
    --text-muted: #6c7293;
    --border: #2d3142;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 245, 255, 0.1);
    --shadow-hover: rgba(0, 245, 255, 0.2);
    --card-bg: rgba(15, 15, 30, 0.9);
    --navbar-bg: rgba(20, 20, 40, 0.9);
    --sidebar-bg: rgba(20, 20, 40, 0.9);
}

/* Light Theme Specific Overrides */
[data-theme="light"] p,
[data-theme="light"] span,
[data-theme="light"] div,
[data-theme="light"] strong,
[data-theme="light"] label,
[data-theme="light"] td,
[data-theme="light"] th {
    color: #212529 !important;
}

[data-theme="light"] .text-muted,
[data-theme="light"] .text-secondary {
    color: var(--text-secondary) !important;
}

[data-theme="light"] .dashboard-card {
    background: linear-gradient(135deg, #f8f6ff, #f0edff) !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.2) !important;
}

[data-theme="light"] .dashboard-card h4,
[data-theme="light"] .dashboard-card p,
[data-theme="light"] .dashboard-card span {
    color: var(--text-primary) !important;
}

[data-theme="light"] .subscription-active {
    color: var(--text-primary) !important;
}

[data-theme="light"] .btn-outline-primary {
    background: linear-gradient(135deg, #c4b5fd, #8b5cf6) !important;
    color: white !important;
    border-color: #8b5cf6 !important;
}

[data-theme="light"] .top-action-bar {
    background: linear-gradient(135deg, #f8f6ff, #f0edff) !important;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2) !important;
    box-shadow: 0 2px 10px rgba(107, 114, 128, 0.2) !important;
}

[data-theme="light"] .top-action-bar span {
    color: var(--text-primary) !important;
}

/* Navbar and Sidebar text fixes for light theme */
[data-theme="light"] .navbar span,
[data-theme="light"] .mobile-nav-header div,
[data-theme="light"] .unified-nav-item {
    color: var(--text-primary) !important;
}

[data-theme="light"] .mobile-nav {
    background: linear-gradient(135deg, #f8f6ff, #f0edff) !important;
}

[data-theme="light"] .navbar {
    background: linear-gradient(135deg, #f1f0ff, #e5e3ff) !important;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.1) !important;
}

/* Light mode gradient backgrounds for major elements */
[data-theme="light"] body {
    background: linear-gradient(135deg, #faf9ff, #f5f3ff) !important;
}

[data-theme="light"] .container,
[data-theme="light"] .container-fluid {
    background: transparent !important;
}

[data-theme="light"] .card {
    background: linear-gradient(135deg, #f8f6ff, #f0edff) !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.2) !important;
}

[data-theme="light"] .modal-content {
    background: linear-gradient(135deg, #f8f6ff, #f0edff) !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.2) !important;
}

/* Credit display in navbar */
[data-theme="light"] .navbar .fas.fa-coins + span {
    color: var(--text-primary) !important;
}

/* Comprehensive light theme text overrides */
[data-theme="light"] .dashboard-card,
[data-theme="light"] .dashboard-card *,
[data-theme="light"] .subscription-active,
[data-theme="light"] .subscription-active *,
[data-theme="light"] .credit-display,
[data-theme="light"] .credit-display * {
    color: var(--text-primary) !important;
}

[data-theme="light"] .text-muted,
[data-theme="light"] .text-secondary,
[data-theme="light"] small {
    color: var(--text-secondary) !important;
}

/* Button fixes for light theme */
[data-theme="light"] .btn-outline-primary {
    background: #0369a1 !important;
    color: white !important;
    border-color: #0369a1 !important;
    opacity: 1 !important;
}

[data-theme="light"] .btn-outline-primary:hover {
    background: #0284c7 !important;
    color: white !important;
    border-color: #0284c7 !important;
    opacity: 1 !important;
}

[data-theme="light"] .btn-primary {
    background: linear-gradient(135deg, #0369a1, #0284c7) !important;
    border: 1px solid #0369a1 !important;
    color: white !important;
}

[data-theme="light"] .btn-success {
    background: linear-gradient(135deg, #047857, #059669) !important;
    border: 1px solid #047857 !important;
    color: white !important;
}

[data-theme="light"] .btn-outline-danger {
    background: #dc2626 !important;
    color: white !important;
    border-color: #dc2626 !important;
}

[data-theme="light"] .btn-outline-danger:hover {
    background: #b91c1c !important;
    color: white !important;
    border-color: #b91c1c !important;
}

/* Ensure all text elements are visible in light theme */
[data-theme="light"] .text-muted,
[data-theme="light"] .text-secondary,
[data-theme="light"] small,
[data-theme="light"] .small {
    color: #6c757d !important;
}

/* Light theme cards and containers */
[data-theme="light"] .dashboard-card {
    background: #ffffff !important;
    border: 1px solid #e9ecef !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .dashboard-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
}

[data-theme="light"] .glass-card {
    background: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* Light theme content and gallery background */
[data-theme="light"] .content {
    background: transparent !important;
}

[data-theme="light"] .content-section {
    background: transparent !important;
}

[data-theme="light"] #gallery {
    background: transparent !important;
}

[data-theme="light"] body {
    background: #ffffff !important;
}

/* Light theme eBay OAuth button styling */
[data-theme="light"] .glass-card .btn {
    color: #495057 !important;
    border-color: #ced4da !important;
    background: #f8f9fa !important;
    font-weight: 600 !important;
}

[data-theme="light"] .glass-card .btn:hover {
    background: #e9ecef !important;
    border-color: #adb5bd !important;
    color: #212529 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Specific styling for eBay refresh button in light theme - highest specificity */
[data-theme="light"] .glass-card button[onclick*="refreshEbayToken"],
[data-theme="light"] .glass-card .btn[onclick*="refreshEbayToken"],
[data-theme="light"] button[onclick*="refreshEbayToken"] {
    background: #ffc107 !important;
    border: 1px solid #ffc107 !important;
    color: #212529 !important;
    font-weight: 600 !important;
    opacity: 1 !important;
}

[data-theme="light"] .glass-card button[onclick*="refreshEbayToken"]:hover,
[data-theme="light"] .glass-card .btn[onclick*="refreshEbayToken"]:hover,
[data-theme="light"] button[onclick*="refreshEbayToken"]:hover {
    background: #ffca2c !important;
    border-color: #ffc720 !important;
    color: #000 !important;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4) !important;
    opacity: 1 !important;
}

/* Specific styling for eBay disconnect button in light theme - highest specificity */
[data-theme="light"] .glass-card button[onclick*="disconnectEbay"],
[data-theme="light"] .glass-card .btn[onclick*="disconnectEbay"],
[data-theme="light"] button[onclick*="disconnectEbay"] {
    background: #dc3545 !important;
    border: 1px solid #dc3545 !important;
    color: white !important;
    font-weight: 600 !important;
    opacity: 1 !important;
}

[data-theme="light"] .glass-card button[onclick*="disconnectEbay"]:hover,
[data-theme="light"] .glass-card .btn[onclick*="disconnectEbay"]:hover,
[data-theme="light"] button[onclick*="disconnectEbay"]:hover {
    background: #c82333 !important;
    border-color: #bd2130 !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4) !important;
    opacity: 1 !important;
}

/* Light theme eBay cards styling */
[data-theme="light"] .glass-card {
    background: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .glass-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
}

/* Apply beautiful gradient styling to all dashboard cards in light theme */
[data-theme="light"] .dashboard-card {
    background: linear-gradient(135deg, #e0e7ff, #f3e8ff, #f9fafb) !important;
    border: 1px solid rgba(147, 51, 234, 0.2) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 16px rgba(147, 51, 234, 0.1) !important;
}

[data-theme="light"] .dashboard-card:hover {
    box-shadow: 0 8px 24px rgba(147, 51, 234, 0.15) !important;
    transform: translateY(-2px) !important;
}

/* Light theme eBay connected state styling */
[data-theme="light"] .glass-card .badge {
    color: white !important;
    text-shadow: none !important;
}

/* Light theme alert boxes */
[data-theme="light"] .alert-info {
    background: rgba(13, 202, 240, 0.1) !important;
    border: 1px solid rgba(13, 202, 240, 0.3) !important;
    color: #055160 !important;
}

/* Modern eBay OAuth card styling for light theme only */
[data-theme="light"] .ebay-oauth-card {
    background: linear-gradient(135deg, #e0e7ff, #f3e8ff, #f9fafb) !important;
    border: 1px solid rgba(147, 51, 234, 0.2) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 16px rgba(147, 51, 234, 0.1) !important;
    padding: 0 !important;
    overflow: hidden !important;
}

[data-theme="light"] .ebay-oauth-card .check-circle-icon {
    width: 45px;
    height: 45px;
    background: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

[data-theme="light"] .ebay-oauth-card .ebay-title {
    color: #1f2937 !important;
    font-weight: 600;
    font-size: 1.25rem;
}

[data-theme="light"] .ebay-oauth-card .ebay-subtitle {
    color: #4b5563 !important;
    font-size: 0.875rem;
    margin-bottom: 0.25rem !important;
}

[data-theme="light"] .ebay-oauth-card .environment-badge {
    background: #3b82f6 !important;
    color: white !important;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

[data-theme="light"] .modern-btn-refresh {
    background: linear-gradient(135deg, #06b6d4, #0891b2) !important;
    border: 1px solid #06b6d4 !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    transition: all 0.2s ease !important;
}

[data-theme="light"] .modern-btn-refresh:hover {
    background: linear-gradient(135deg, #7c3aed, #9333ea) !important;
    border-color: #7c3aed !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
}

[data-theme="light"] .modern-btn-disconnect {
    background: linear-gradient(135deg, #ec4899, #f472b6) !important;
    border: 1px solid #ec4899 !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    transition: all 0.2s ease !important;
}

[data-theme="light"] .modern-btn-disconnect:hover {
    background: linear-gradient(135deg, #db2777, #ec4899) !important;
    border-color: #db2777 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3) !important;
}

/* Modern action card styling for light theme */
[data-theme="light"] .modern-action-card {
    background: linear-gradient(135deg, #e0e7ff, #f3e8ff, #f9fafb) !important;
    border: 1px solid rgba(147, 51, 234, 0.2) !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 16px rgba(147, 51, 234, 0.1) !important;
    transition: all 0.3s ease !important;
    padding: 2rem !important;
}

[data-theme="light"] .modern-action-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(147, 51, 234, 0.15) !important;
    border-color: rgba(147, 51, 234, 0.3) !important;
}

[data-theme="light"] .modern-action-btn {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    color: white !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

[data-theme="light"] .modern-action-btn:hover {
    background: linear-gradient(135deg, #7c3aed, #9333ea) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4) !important;
}

[data-theme="light"] .modern-action-card .icon-large {
    font-size: 3rem !important;
    margin-bottom: 1.5rem !important;
}

[data-theme="light"] .modern-action-card h4 {
    color: #1f2937 !important;
    font-weight: 600 !important;
    margin-bottom: 0.75rem !important;
}

[data-theme="light"] .modern-action-card p {
    color: #6b7280 !important;
    margin-bottom: 1.5rem !important;
}

/* FORCE diversified color palette - Override ALL purple buttons everywhere! */

/* Target ALL purple buttons with any inline styles */
[data-theme="light"] .btn[style*="purple"],
[data-theme="light"] .btn[style*="#a855f7"],
[data-theme="light"] .btn[style*="#8b5cf6"],
[data-theme="light"] .btn[style*="#9333ea"],
[data-theme="light"] .btn[style*="violet"],
[data-theme="light"] button[style*="purple"],
[data-theme="light"] button[style*="#a855f7"],
[data-theme="light"] button[style*="#8b5cf6"],
[data-theme="light"] button[style*="#9333ea"] {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    border: 1px solid #3b82f6 !important;
    color: white !important;
}

/* Diversify specific button types */
[data-theme="light"] .btn-primary[style*="background"],
[data-theme="light"] .btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    border: 1px solid #3b82f6 !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

[data-theme="light"] .btn-primary:hover,
[data-theme="light"] .btn-primary:focus {
    background: linear-gradient(135deg, #7c3aed, #9333ea) !important;
    border-color: #7c3aed !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
    color: white !important;
}

[data-theme="light"] .btn-secondary {
    background: linear-gradient(135deg, #6b7280, #9ca3af) !important;
    border: 1px solid #6b7280 !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

[data-theme="light"] .btn-secondary:hover,
[data-theme="light"] .btn-secondary:focus {
    background: linear-gradient(135deg, #4b5563, #6b7280) !important;
    border-color: #4b5563 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3) !important;
    color: white !important;
}

[data-theme="light"] .btn-success[style*="background"],
[data-theme="light"] .btn-success {
    background: linear-gradient(135deg, #10b981, #047857) !important;
    border: 1px solid #10b981 !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

[data-theme="light"] .btn-success:hover,
[data-theme="light"] .btn-success:focus {
    background: linear-gradient(135deg, #7c3aed, #9333ea) !important;
    border-color: #7c3aed !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
    color: white !important;
}

[data-theme="light"] .btn-danger {
    background: linear-gradient(135deg, #ec4899, #f472b6) !important;
    border: 1px solid #ec4899 !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

[data-theme="light"] .btn-danger:hover,
[data-theme="light"] .btn-danger:focus {
    background: linear-gradient(135deg, #db2777, #ec4899) !important;
    border-color: #db2777 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3) !important;
    color: white !important;
}

[data-theme="light"] .btn-warning[style*="background"],
[data-theme="light"] .btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border: 1px solid #f59e0b !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
}

/* Additional diversified button colors */
[data-theme="light"] .btn-info {
    background: linear-gradient(135deg, #06b6d4, #0891b2) !important;
    border: 1px solid #06b6d4 !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
}

[data-theme="light"] .btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563) !important;
    border: 1px solid #6b7280 !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
}

/* LIGHT MODE BUTTON COLORS - ALL PURPLE/LAVENDER */
[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-secondary,
[data-theme="light"] .btn-info,
[data-theme="light"] .btn-warning,
[data-theme="light"] .btn-success,
[data-theme="light"] button:not(.btn-danger),
[data-theme="light"] .btn:not(.btn-danger) {
    background: linear-gradient(135deg, #c4b5fd, #8b5cf6) !important;
    border: 1px solid #8b5cf6 !important;
    color: white !important;
    font-weight: 600 !important;
}

/* DARK THEME BUTTON COLORS - ORIGINAL DIVERSE COLORS */
[data-theme="dark"] .btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    border: 1px solid #1d4ed8 !important;
    color: white !important;
}

[data-theme="dark"] .btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563) !important;
    border: 1px solid #4b5563 !important;
    color: white !important;
}

[data-theme="dark"] .btn-info {
    background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
    border: 1px solid #0284c7 !important;
    color: white !important;
}

[data-theme="dark"] .btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border: 1px solid #d97706 !important;
    color: white !important;
}

[data-theme="dark"] .btn-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: 1px solid #059669 !important;
    color: white !important;
}


/* Keep Delete Selected button RED */
#deleteSelectedImages,
button#deleteSelectedImages,
.btn-danger,
button.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border: 1px solid #dc2626 !important;
    color: white !important;
}

/* Remove number input spinners for price fields */
input[type="number"].price-input,
.price-input[type="number"],
input[type="number"][id*="price"],
input[type="number"][name*="price"] {
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
}

input[type="number"].price-input::-webkit-outer-spin-button,
input[type="number"].price-input::-webkit-inner-spin-button,
.price-input[type="number"]::-webkit-outer-spin-button,
.price-input[type="number"]::-webkit-inner-spin-button,
input[type="number"][id*="price"]::-webkit-outer-spin-button,
input[type="number"][id*="price"]::-webkit-inner-spin-button,
input[type="number"][name*="price"]::-webkit-outer-spin-button,
input[type="number"][name*="price"]::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Add script to apply colors on page load */

[data-theme="light"] .btn-warning:hover,
[data-theme="light"] .btn-warning:focus {
    background: linear-gradient(135deg, #7c3aed, #9333ea) !important;
    border-color: #7c3aed !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
    color: white !important;
}

[data-theme="light"] .btn-info {
    background: linear-gradient(135deg, #6b7280, #9ca3af) !important;
    border: 1px solid #6b7280 !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

[data-theme="light"] .btn-info:hover,
[data-theme="light"] .btn-info:focus {
    background: linear-gradient(135deg, #4b5563, #6b7280) !important;
    border-color: #4b5563 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3) !important;
    color: white !important;
}

/* Outline button variants for light theme */
[data-theme="light"] .btn-outline-primary {
    background: transparent !important;
    border: 2px solid #6366f1 !important;
    color: #6366f1 !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

[data-theme="light"] .btn-outline-primary:hover,
[data-theme="light"] .btn-outline-primary:focus {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    border-color: #6366f1 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
    color: white !important;
}

[data-theme="light"] .btn-outline-secondary {
    background: transparent !important;
    border: 2px solid #6b7280 !important;
    color: #6b7280 !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

[data-theme="light"] .btn-outline-secondary:hover,
[data-theme="light"] .btn-outline-secondary:focus {
    background: linear-gradient(135deg, #6b7280, #9ca3af) !important;
    border-color: #6b7280 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3) !important;
    color: white !important;
}

[data-theme="light"] .btn-outline-danger {
    background: transparent !important;
    border: 2px solid #ec4899 !important;
    color: #ec4899 !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

[data-theme="light"] .btn-outline-danger:hover,
[data-theme="light"] .btn-outline-danger:focus {
    background: linear-gradient(135deg, #ec4899, #f472b6) !important;
    border-color: #ec4899 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3) !important;
    color: white !important;
}

[data-theme="light"] .btn-outline-warning {
    background: transparent !important;
    border: 2px solid #f59e0b !important;
    color: #f59e0b !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

[data-theme="light"] .btn-outline-warning:hover,
[data-theme="light"] .btn-outline-warning:focus {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border-color: #f59e0b !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
    color: white !important;
}

/* Custom button styling for non-Bootstrap classes */
[data-theme="light"] button:not(.btn):not([class*="navbar"]):not([class*="dropdown"]):not([class*="modal"]),
[data-theme="light"] input[type="submit"]:not(.btn),
[data-theme="light"] input[type="button"]:not(.btn),
[data-theme="light"] .button,
[data-theme="light"] .custom-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    border: 1px solid #3b82f6 !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

[data-theme="light"] button:not(.btn):not([class*="navbar"]):not([class*="dropdown"]):not([class*="modal"]):hover,
[data-theme="light"] input[type="submit"]:not(.btn):hover,
[data-theme="light"] input[type="button"]:not(.btn):hover,
[data-theme="light"] .button:hover,
[data-theme="light"] .custom-btn:hover {
    background: linear-gradient(135deg, #7c3aed, #9333ea) !important;
    border-color: #7c3aed !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
    color: white !important;
}

/* Action buttons and link buttons */
[data-theme="light"] .btn-action,
[data-theme="light"] .action-btn,
[data-theme="light"] .btn-link:not(.text-muted) {
    background: linear-gradient(135deg, #ec4899, #db2777) !important;
    border: 1px solid #ec4899 !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

[data-theme="light"] .btn-action:hover,
[data-theme="light"] .action-btn:hover,
[data-theme="light"] .btn-link:not(.text-muted):hover {
    background: linear-gradient(135deg, #7c3aed, #9333ea) !important;
    border-color: #7c3aed !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
    color: white !important;
    text-decoration: none !important;
}

/* Form buttons and submit buttons */
[data-theme="light"] .form-submit,
[data-theme="light"] .submit-btn,
[data-theme="light"] .form-button {
    background: linear-gradient(135deg, #10b981, #047857) !important;
    border: 1px solid #10b981 !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    transition: all 0.2s ease !important;
}

[data-theme="light"] .form-submit:hover,
[data-theme="light"] .submit-btn:hover,
[data-theme="light"] .form-button:hover {
    background: linear-gradient(135deg, #7c3aed, #9333ea) !important;
    border-color: #7c3aed !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
    color: white !important;
}

/* Small buttons and minimal buttons */
[data-theme="light"] .btn-sm,
[data-theme="light"] .small-btn {
    padding: 6px 12px !important;
    font-size: 0.875rem !important;
}

[data-theme="light"] .btn-lg,
[data-theme="light"] .large-btn {
    padding: 12px 24px !important;
    font-size: 1.125rem !important;
}

/* Custom button classes found in templates */
[data-theme="light"] .btn-minimal-primary {
    background: linear-gradient(135deg, #06b6d4, #0891b2) !important;
    border: 1px solid #06b6d4 !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

[data-theme="light"] .btn-minimal-primary:hover {
    background: linear-gradient(135deg, #7c3aed, #9333ea) !important;
    border-color: #7c3aed !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
    color: white !important;
    text-decoration: none !important;
}

[data-theme="light"] .btn-minimal-secondary {
    background: linear-gradient(135deg, #6b7280, #9ca3af) !important;
    border: 1px solid #6b7280 !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

[data-theme="light"] .btn-minimal-secondary:hover {
    background: linear-gradient(135deg, #4b5563, #6b7280) !important;
    border-color: #4b5563 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3) !important;
    color: white !important;
    text-decoration: none !important;
}

[data-theme="light"] .btn-purchase {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border: 1px solid #f59e0b !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    transition: all 0.2s ease !important;
}

[data-theme="light"] .btn-purchase:hover {
    background: linear-gradient(135deg, #7c3aed, #9333ea) !important;
    border-color: #7c3aed !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
    color: white !important;
}

[data-theme="light"] .btn-back {
    background: linear-gradient(135deg, #6b7280, #9ca3af) !important;
    border: 1px solid #6b7280 !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

[data-theme="light"] .btn-back:hover {
    background: linear-gradient(135deg, #4b5563, #6b7280) !important;
    border-color: #4b5563 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3) !important;
    color: white !important;
    text-decoration: none !important;
}

/* Floating mode buttons - Different colors for each */
[data-theme="light"] .floating-fast-mode {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: 1px solid #10b981 !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    padding: 12px 20px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

[data-theme="light"] .floating-fast-mode:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
    border-color: #059669 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4) !important;
    color: white !important;
}

[data-theme="light"] .floating-premium-mode {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border: 1px solid #f59e0b !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    padding: 12px 20px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
}

[data-theme="light"] .floating-premium-mode:hover {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
    border-color: #d97706 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4) !important;
    color: white !important;
}

[data-theme="light"] .floating-assign-mode {
    background: linear-gradient(135deg, #10b981, #047857) !important;
    border: 1px solid #10b981 !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    padding: 12px 20px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
}

[data-theme="light"] .floating-assign-mode:hover {
    background: linear-gradient(135deg, #7c3aed, #9333ea) !important;
    border-color: #7c3aed !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4) !important;
    color: white !important;
}

[data-theme="light"] .floating-mode-btn:disabled {
    background: linear-gradient(135deg, #6b7280, #9ca3af) !important;
    border-color: #6b7280 !important;
    color: white !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* eBay specific buttons */
[data-theme="light"] .ebay-refresh-btn {
    background: linear-gradient(135deg, #06b6d4, #0891b2) !important;
    border: 1px solid #06b6d4 !important;
    color: white !important;
}

/* RED DELETE SELECTED BUTTON - High priority styling */
[data-theme="light"] #deleteSelectedImages,
[data-theme="light"] #deleteSelected,
[data-theme="light"] #deleteSelectedBulk,
[data-theme="light"] .btn-delete,
[data-theme="light"] .btn-delete-selected,
[data-theme="light"] .btn-danger,
[data-theme="light"] .floating-delete-btn,
[data-theme="light"] button[onclick*="deleteSelected"] {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border: 1px solid #ef4444 !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
}

[data-theme="light"] #deleteSelectedImages:hover,
[data-theme="light"] #deleteSelected:hover,
[data-theme="light"] #deleteSelectedBulk:hover,
[data-theme="light"] .btn-delete:hover,
[data-theme="light"] .btn-delete-selected:hover,
[data-theme="light"] .btn-danger:hover,
[data-theme="light"] .floating-delete-btn:hover,
[data-theme="light"] button[onclick*="deleteSelected"]:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    border-color: #dc2626 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

[data-theme="light"] .ebay-refresh-btn:hover {
    background: linear-gradient(135deg, #7c3aed, #9333ea) !important;
    border-color: #7c3aed !important;
    color: white !important;
}

/* SKU input field styling for better visibility */
[data-theme="light"] .current-sku input,
[data-theme="light"] input[type="text"].sku-field,
[data-theme="light"] .sku-input,
[data-theme="light"] #skuPrefix,
[data-theme="light"] #currentSkuInput {
    background: #ffffff !important;
    border: 2px solid #d1d5db !important;
    color: #111827 !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 1rem !important;
}

[data-theme="light"] .current-sku input:focus,
[data-theme="light"] input[type="text"].sku-field:focus,
[data-theme="light"] .sku-input:focus,
[data-theme="light"] #skuPrefix:focus,
[data-theme="light"] #currentSkuInput:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    outline: none !important;
}

/* eBay Connection Status Styling - Light Theme */
[data-theme="light"] .ebay-connection-status {
    background: linear-gradient(135deg, rgba(196, 181, 253, 0.8), rgba(221, 214, 254, 0.9));
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.2);
    backdrop-filter: blur(5px);
}

[data-theme="light"] .connection-check-icon {
    width: 40px;
    height: 40px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #059669;
}

[data-theme="light"] .connection-check-icon i {
    color: white;
    font-size: 18px;
}

[data-theme="light"] .ebay-connection-status h6 {
    color: #7c3aed;
    font-weight: 700;
    margin: 0;
    font-size: 1.1rem;
}

[data-theme="light"] .connection-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

[data-theme="light"] .connection-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
}

[data-theme="light"] .connection-label {
    color: #374151;
    font-weight: 500;
}

[data-theme="light"] .connection-badge {
    background: #3b82f6;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="light"] .refresh-btn {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-right: 8px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

[data-theme="light"] .refresh-btn:hover {
    background: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

[data-theme="light"] .disconnect-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

[data-theme="light"] .disconnect-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

/* Dark theme eBay connection styling */
[data-theme="dark"] .ebay-connection-status {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(139, 92, 246, 0.15));
    border: 2px solid rgba(6, 182, 212, 0.5);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .ebay-connection-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 12px;
    z-index: -1;
}

[data-theme="dark"] .connection-check-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
    border: 2px solid rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .connection-check-icon i {
    color: white;
    font-size: 18px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .ebay-connection-status h6 {
    color: #06b6d4;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
    font-size: 1.1rem;
}

[data-theme="dark"] .connection-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

[data-theme="dark"] .connection-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
}

[data-theme="dark"] .connection-label {
    color: #cbd5e1;
    font-weight: 500;
}

[data-theme="dark"] .connection-badge {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

[data-theme="dark"] .refresh-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-right: 8px;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .refresh-btn:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
}

[data-theme="dark"] .disconnect-btn {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
    border: 1px solid rgba(220, 38, 38, 0.3);
}

[data-theme="dark"] .disconnect-btn:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.6);
}

/* Saved Drafts page padding */
[data-theme="light"] .drafts-container,
[data-theme="dark"] .drafts-container {
    padding-top: 2rem !important;
}

/* Header spacing removed - using original Bootstrap spacing */

[data-theme="light"] .container-fluid {
    background: #ffffff !important;
}

/* Light theme header navigation buttons */
[data-theme="light"] .btn-outline-primary {
    background: linear-gradient(135deg, rgba(219, 207, 244, 0.95), rgba(232, 218, 249, 0.95)) !important;
    border: 2px solid rgba(147, 51, 234, 0.6) !important;
    color: #6d28d9 !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.15) !important;
}

[data-theme="light"] .btn-outline-primary:hover {
    background: linear-gradient(135deg, rgba(196, 181, 253, 0.95), rgba(221, 214, 254, 0.95)) !important;
    border-color: rgba(147, 51, 234, 0.8) !important;
    color: #5b21b6 !important;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.25) !important;
}

[data-theme="light"] .btn-outline-secondary {
    background: linear-gradient(135deg, rgba(219, 207, 244, 0.95), rgba(232, 218, 249, 0.95)) !important;
    border: 2px solid rgba(147, 51, 234, 0.6) !important;
    color: #6d28d9 !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.15) !important;
}

[data-theme="light"] .btn-outline-secondary:hover {
    background: linear-gradient(135deg, rgba(196, 181, 253, 0.95), rgba(221, 214, 254, 0.95)) !important;
    border-color: rgba(147, 51, 234, 0.8) !important;
    color: #5b21b6 !important;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.25) !important;
}

/* Light theme business policy cards */
[data-theme="light"] .cyber-policy-card {
    background: linear-gradient(135deg, #f8f6ff, #f0edff) !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.2) !important;
}

[data-theme="light"] .cyber-policy-card label,
[data-theme="light"] .cyber-policy-card .form-label,
[data-theme="light"] .cyber-policy-card h6 {
    color: #000000 !important;
    font-weight: 600 !important;
}

/* Override the inline white text styling for light theme */
[data-theme="light"] .cyber-policy-card * {
    color: #000000 !important;
}

[data-theme="light"] .cyber-policy-card .form-select,
[data-theme="light"] .cyber-policy-card select {
    color: #6d28d9 !important;
    background: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="light"] .cyber-policy-card i {
    color: #6366f1 !important;
}

[data-theme="light"] .cyber-policy-card .form-select {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(147, 51, 234, 0.3) !important;
    color: #6d28d9 !important;
}

[data-theme="light"] .policy-status {
    color: #7c3aed !important;
}

/* Fix Business Policies Matrix header for light mode */
[data-theme="light"] .cyber-policies-header {
    background: linear-gradient(135deg, #f8f6ff, #f0edff) !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.2) !important;
}

[data-theme="light"] .cyber-policies-header h5,
[data-theme="light"] .cyber-policies-header small {
    color: var(--text-primary) !important;
    text-shadow: none !important;
}

[data-theme="light"] .cyber-policies-header i {
    color: #8b5cf6 !important;
    text-shadow: none !important;
}

/* Light theme sidebar and navigation */
[data-theme="light"] .sidebar {
    background: #f8f9fa !important;
    border-right: 1px solid #dee2e6 !important;
}

[data-theme="light"] .unified-nav-item:hover {
    background: rgba(3, 105, 161, 0.1) !important;
    color: #0369a1 !important;
    border-color: #0369a1 !important;
}

/* Override specific dashboard text elements */
[data-theme="light"] .dashboard-card p,
[data-theme="light"] .dashboard-card span,
[data-theme="light"] .dashboard-card div {
    color: #212529 !important;
}

[data-theme="light"] .dashboard-card .text-muted {
    color: #6c757d !important;
}



/* Force all text elements in light theme to be visible */
[data-theme="light"] .file-upload-area {
    background: #f8f9fa !important;
    border: 2px dashed #dee2e6 !important;
    color: #212529 !important;
}

[data-theme="light"] .file-upload-area h3,
[data-theme="light"] .file-upload-area p {
    color: #212529 !important;
}

[data-theme="light"] .subscription-active {
    background: rgba(4, 120, 87, 0.1) !important;
    border: 1px solid #047857 !important;
    color: #047857 !important;
}

[data-theme="light"] .alert {
    color: #212529 !important;
}

[data-theme="light"] .badge {
    color: white !important;
}

/* Enhanced light theme styling for complete visibility */
[data-theme="light"] .stat-value {
    background: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    color: #212529 !important;
    font-weight: bold;
}

/* Light theme icons */
[data-theme="light"] .fas,
[data-theme="light"] .fab,
[data-theme="light"] .far {
    opacity: 0.8;
}

[data-theme="light"] .icon-large {
    opacity: 1;
}

/* Credit value visibility in light theme */
[data-theme="light"] .credit-value {
    color: #ffffff !important;
}

/* Fixed dark backgrounds in light theme */
[data-theme="light"] .draft-card {
    background: #ffffff !important;
    border: 1px solid #6c757d !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .draft-meta {
    background: #f8f9fa !important;
    border: 1px solid #6c757d !important;
    color: #212529 !important;
}

/* Light theme floating borders - opaque gray */
[data-theme="light"] .floating-card {
    border: 1px solid #6c757d !important;
}

[data-theme="light"] .glass-card {
    border: 1px solid #6c757d !important;
}

[data-theme="light"] .dashboard-card {
    border: 1px solid #6c757d !important;
}

/* Light theme logo and icon colors */
[data-theme="light"] .navbar-brand {
    color: #212529 !important;
}

[data-theme="light"] .navbar-brand .fas {
    color: #0369a1 !important; /* Light blue for tags icon */
}

[data-theme="light"] .mobile-nav-header .fas {
    color: #be185d !important; /* Light magenta for robot icon */
}

/* Light theme dashboard action icons - neon colors like dark theme */
[data-theme="light"] .dashboard-card .fas {
    color: var(--accent-cyan) !important;
}

[data-theme="light"] .fa-wallet {
    color: #00e5ff !important; /* Bright cyan */
}

[data-theme="light"] .fa-file-alt {
    color: #ff1493 !important; /* Bright magenta */
}

[data-theme="light"] .fa-tags {
    color: #00e5ff !important; /* Bright cyan */
}

[data-theme="light"] .fa-crown {
    color: #ff1493 !important; /* Bright magenta */
}

[data-theme="light"] .fa-shield-alt {
    color: #ff4757 !important; /* Bright red */
}

[data-theme="light"] .fa-folder-open {
    color: #ff1493 !important; /* Bright magenta */
}

[data-theme="light"] .fa-database,
[data-theme="light"] .fa-coins {
    color: #00e5ff !important; /* Bright cyan */
}

[data-theme="light"] .fa-history {
    color: #ff1493 !important; /* Bright magenta */
}

/* Light theme headings with better colors */
[data-theme="light"] h1 {
    color: #0369a1 !important;
    font-weight: 600;
}

[data-theme="light"] h2 {
    color: #047857 !important;
    font-weight: 600;
}

[data-theme="light"] h3 {
    color: #be185d !important;
    font-weight: 600;
}

[data-theme="light"] h4 {
    color: #0369a1 !important;
    font-weight: 500;
}

[data-theme="light"] h5,
[data-theme="light"] h6 {
    color: #212529 !important;
    font-weight: 500;
}

/* Smooth transitions for theme switching */
* {
    transition: background-color 0.3s ease, 
                color 0.3s ease, 
                border-color 0.3s ease, 
                box-shadow 0.3s ease;
}

/* Remove transitions from specific elements that shouldn't animate */
.thumbnail img,
.draft-image,
input[type="file"],
.floating-buttons,
.progress-bar,
.upload-progress-fill {
    transition: none !important;
}

/* Body background with smooth gradient transitions */
body {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    transition: background 0.4s ease, color 0.3s ease;
}

/* Enhanced glass effects for both themes */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px var(--shadow-color);
}

.glass-card:hover {
    box-shadow: 0 12px 48px var(--shadow-hover);
}

/* Theme Toggle Button Styles */
.theme-toggle {
    position: relative !important;
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-primary) !important;
    padding: 0.5rem !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 12px var(--shadow-color) !important;
    z-index: 1000 !important;
    pointer-events: auto !important;
}

.theme-toggle:hover {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    transform: scale(1.1);
    box-shadow: 0 6px 20px var(--shadow-hover);
}

.theme-toggle i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.theme-toggle:hover i {
    transform: rotate(180deg);
}

/* Light theme specific overrides */
[data-theme="light"] .navbar-dark {
    background: var(--navbar-bg) !important;
    border-bottom: 1px solid var(--border) !important;
}

[data-theme="light"] .navbar-dark .navbar-brand {
    color: var(--accent-cyan) !important;
    font-weight: 700 !important;
}

[data-theme="light"] .navbar-dark .navbar-nav .nav-link {
    color: var(--text-primary) !important;
}

[data-theme="light"] .mobile-nav {
    background: var(--sidebar-bg) !important;
    border-right: 1px solid var(--border) !important;
}

[data-theme="light"] .mobile-nav-header {
    border-bottom: 1px solid var(--border) !important;
}

[data-theme="light"] .unified-nav-item {
    color: var(--text-primary) !important;
    font-weight: 500 !important;
    background: transparent !important;
}

[data-theme="light"] .unified-nav-item:hover {
    background: rgba(3, 105, 161, 0.1) !important;
    color: var(--accent-cyan) !important;
    border-color: var(--accent-cyan) !important;
}

[data-theme="light"] .unified-nav-item.active {
    background: rgba(3, 105, 161, 0.15) !important;
    color: var(--accent-cyan) !important;
    border-color: var(--accent-cyan) !important;
}

/* Ensure buttons work in both themes */
[data-theme="light"] .btn-primary {
    background: linear-gradient(45deg, var(--accent-cyan), var(--accent-magenta)) !important;
    border-color: var(--accent-cyan) !important;
    color: white !important;
}

[data-theme="light"] .btn-success {
    background: linear-gradient(135deg, var(--accent-green), #10b981) !important;
    border-color: var(--accent-green) !important;
    color: white !important;
}

[data-theme="light"] .btn-outline-danger {
    border-color: var(--accent-red) !important;
    color: var(--accent-red) !important;
}

[data-theme="light"] .btn-outline-danger:hover {
    background-color: var(--accent-red) !important;
    color: white !important;
}

[data-theme="light"] .btn-outline-primary {
    border-color: var(--accent-cyan) !important;
    color: var(--accent-cyan) !important;
}

[data-theme="light"] .btn-outline-primary:hover {
    background-color: var(--accent-cyan) !important;
    color: white !important;
}

/* Draft cards in light theme */
[data-theme="light"] .draft-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95)) !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 4px 16px rgba(8, 145, 178, 0.1) !important;
}

[data-theme="light"] .draft-card:hover {
    box-shadow: 0 8px 32px rgba(8, 145, 178, 0.2) !important;
    border-color: var(--accent-cyan) !important;
}

/* Form inputs in light theme */
[data-theme="light"] .form-control {
    background: var(--glass-bg) !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
}

[data-theme="light"] .form-control:focus {
    background: var(--bg-secondary) !important;
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 10px var(--shadow-color) !important;
    color: var(--text-primary) !important;
}

/* Ensure text readability in both themes */
[data-theme="light"] .text-light {
    color: var(--text-primary) !important;
}

[data-theme="light"] .text-muted {
    color: var(--text-muted) !important;
}

[data-theme="light"] .badge {
    color: white !important;
}

/* Fix specific text elements in light theme */
[data-theme="light"] .me-3,
[data-theme="light"] .navbar-text,
[data-theme="light"] .d-flex span {
    color: var(--text-primary) !important;
}

[data-theme="light"] h1, 
[data-theme="light"] h2, 
[data-theme="light"] h3, 
[data-theme="light"] h4, 
[data-theme="light"] h5, 
[data-theme="light"] h6 {
    color: var(--text-primary) !important;
}

[data-theme="light"] p, 
[data-theme="light"] span, 
[data-theme="light"] div {
    color: var(--text-primary) !important;
}

[data-theme="light"] .card-title,
[data-theme="light"] .card-text {
    color: var(--text-primary) !important;
}

/* FORCE title card fonts to be BLACK and backgrounds DARKER in light theme */
[data-theme="light"] .form-label[style*="color"],
[data-theme="light"] label.form-label[style*="color"],
[data-theme="light"] .form-label,
[data-theme="light"] label.form-label {
    color: #000000 !important;
    background: rgba(0, 0, 0, 0.15) !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
}

[data-theme="light"] .form-label i[style*="color"],
[data-theme="light"] label.form-label i[style*="color"],
[data-theme="light"] .form-label i,
[data-theme="light"] label.form-label i {
    color: #000000 !important;
}

/* Target specific protocol labels by text content */
[data-theme="light"] label:contains("Payment Protocol"),
[data-theme="light"] label:contains("Shipping Protocol"), 
[data-theme="light"] label:contains("Return Protocol"),
[data-theme="light"] label:contains("Location Matrix") {
    color: #000000 !important;
}

[data-theme="light"] label:contains("Payment Protocol") i,
[data-theme="light"] label:contains("Shipping Protocol") i,
[data-theme="light"] label:contains("Return Protocol") i,
[data-theme="light"] label:contains("Location Matrix") i {
    color: #000000 !important;
}

[data-theme="light"] .list-group-item {
    background: var(--glass-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}

/* Force light theme text visibility on all backgrounds */
[data-theme="light"] * {
    color: var(--text-primary) !important;
}

/* Override for specific elements that should have different colors */
[data-theme="light"] .badge,
[data-theme="light"] .btn {
    color: white !important;
}

[data-theme="light"] .btn-primary {
    background: var(--accent-cyan) !important;
    border-color: var(--accent-cyan) !important;
    color: white !important;
}

[data-theme="light"] .btn-success {
    background: var(--accent-green) !important;
    border-color: var(--accent-green) !important;
    color: white !important;
}

[data-theme="light"] .btn-danger {
    background: var(--accent-red) !important;
    border-color: var(--accent-red) !important;
    color: white !important;
}

[data-theme="light"] .text-white {
    color: white !important;
}

[data-theme="light"] .bg-dark {
    background: var(--text-primary) !important;
    color: white !important;
}

[data-theme="light"] .bg-primary {
    background: var(--accent-cyan) !important;
    color: white !important;
}

[data-theme="light"] .bg-success {
    background: var(--accent-green) !important;
    color: white !important;
}

[data-theme="light"] .bg-danger {
    background: var(--accent-red) !important;
    color: white !important;
}

/* Responsive theme toggle */
@media (max-width: 768px) {
    .theme-toggle {
        width: 36px;
        height: 36px;
        padding: 0.4rem;
    }
    
    .theme-toggle i {
        font-size: 1rem;
    }
}

/* Loading animations work in both themes */
[data-theme="light"] .loading-skeleton {
    background: linear-gradient(90deg, 
        rgba(0, 0, 0, 0.05) 25%, 
        rgba(0, 0, 0, 0.1) 50%, 
        rgba(0, 0, 0, 0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Help section in light theme */
[data-theme="light"] .help-title {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta)) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

[data-theme="light"] .help-nav-btn {
    background: var(--glass-bg) !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
}

[data-theme="light"] .help-nav-btn:hover {
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 20px var(--shadow-color) !important;
}

/* Alert styling for light theme */
[data-theme="light"] .alert-warning {
    background: rgba(251, 191, 36, 0.1) !important;
    border-color: rgba(251, 191, 36, 0.3) !important;
    color: #92400e !important;
}

[data-theme="light"] .alert-info {
    background: rgba(8, 145, 178, 0.1) !important;
    border-color: rgba(8, 145, 178, 0.3) !important;
    color: #0c4a6e !important;
}

[data-theme="light"] .alert-danger {
    background: rgba(220, 38, 38, 0.1) !important;
    border-color: rgba(220, 38, 38, 0.3) !important;
    color: #991b1b !important;
}

/* Thumbnails and images */
[data-theme="light"] .thumbnail {
    border-color: var(--border) !important;
}

[data-theme="light"] .thumbnail:hover {
    border-color: var(--accent-cyan) !important;
}

[data-theme="light"] .thumbnail.selected {
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 20px var(--shadow-color) !important;
}

/* Top action bar light theme */
[data-theme="light"] .top-action-bar {
    background: var(--navbar-bg) !important;
    border-bottom: 1px solid var(--border) !important;
}

/* Draft processing buttons light theme */
[data-theme="light"] .processing-status {
    color: var(--text-primary) !important;
}

[data-theme="light"] .draft-status {
    color: var(--text-secondary) !important;
}

/* Enhanced visibility for draft cards */
[data-theme="light"] .draft-title {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
}

[data-theme="light"] .draft-sku {
    color: var(--text-secondary) !important;
    font-weight: 500 !important;
}

/* Footer and misc elements */
[data-theme="light"] .app-footer {
    color: var(--text-primary) !important;
}

[data-theme="light"] .footer-links a {
    color: var(--accent-cyan) !important;
}

/* Ensure sidebar close button is visible */
[data-theme="light"] #mobileNavClose {
    color: var(--text-primary) !important;
}

/* Mobile nav toggle button */
[data-theme="light"] #mobileNavToggle {
    color: var(--text-primary) !important;
}

/* ===== DRAFTS PAGE LIGHT THEME OVERRIDES ===== */
[data-theme="light"] .animated-bg {
    background: 
        radial-gradient(circle at 20% 50%, rgba(3, 105, 161, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(190, 24, 93, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(4, 120, 87, 0.03) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%) !important;
}

[data-theme="light"] .header {
    background: var(--glass-bg) !important;
    border-bottom: 1px solid var(--border) !important;
}

[data-theme="light"] .stat-card {
    background: var(--glass-bg) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
}

[data-theme="light"] .stat-card:hover {
    box-shadow: 0 10px 30px var(--shadow-hover) !important;
}

[data-theme="light"] .stat-number {
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-magenta)) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

[data-theme="light"] .stat-label {
    color: var(--text-secondary) !important;
}

[data-theme="light"] .control-panel {
    background: var(--glass-bg) !important;
    border: 1px solid var(--border) !important;
}

[data-theme="light"] .filter-btn {
    background: var(--glass-bg) !important;
    border: 1px solid var(--accent-cyan) !important;
    color: var(--text-primary) !important;
}

[data-theme="light"] .filter-btn:hover {
    background: rgba(3, 105, 161, 0.1) !important;
    box-shadow: 0 0 20px var(--shadow-color) !important;
}

[data-theme="light"] .filter-btn.active {
    background: var(--accent-cyan) !important;
    color: white !important;
}

[data-theme="light"] .draft-card {
    background: var(--glass-bg) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
}

[data-theme="light"] .draft-card:hover {
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 8px 32px var(--shadow-hover) !important;
}

[data-theme="light"] .draft-card::before {
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-magenta)) !important;
}

[data-theme="light"] .draft-image {
    border: 1px solid var(--border) !important;
}

[data-theme="light"] .draft-content {
    color: var(--text-primary) !important;
}

[data-theme="light"] .draft-title {
    color: var(--text-primary) !important;
}

[data-theme="light"] .draft-sku,
[data-theme="light"] .draft-date,
[data-theme="light"] .draft-status {
    color: var(--text-secondary) !important;
}

[data-theme="light"] .status-badge {
    color: white !important;
}

[data-theme="light"] .btn-export {
    background: var(--accent-green) !important;
    color: white !important;
}

[data-theme="light"] .btn-delete {
    background: var(--accent-red) !important;
    color: white !important;
}

[data-theme="light"] .btn-action:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 20px var(--shadow-color) !important;
}

[data-theme="light"] .checkbox-draft {
    border: 2px solid var(--accent-cyan) !important;
}

[data-theme="light"] .no-drafts {
    color: var(--text-secondary) !important;
}

[data-theme="light"] .loading-skeleton {
    background: linear-gradient(90deg, 
        rgba(0, 0, 0, 0.05) 25%, 
        rgba(0, 0, 0, 0.1) 50%, 
        rgba(0, 0, 0, 0.05) 75%) !important;
}

/* Processing status colors in light theme */
[data-theme="light"] .status-processing {
    background: rgba(251, 191, 36, 0.2) !important;
    color: #92400e !important;
}

[data-theme="light"] .status-completed {
    background: rgba(4, 120, 87, 0.2) !important;
    color: #065f46 !important;
}

[data-theme="light"] .status-failed {
    background: rgba(220, 38, 38, 0.2) !important;
    color: #991b1b !important;
}
/* 📱 iOS-style Selection Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.selection-highlight {
    background: rgba(0, 122, 255, 0.1) !important;
    border: 2px solid rgba(0, 122, 255, 0.8) !important;
    border-radius: 12px !important;
}

.thumbnail {
    transition: all 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.thumbnail:active {
    transform: scale(0.98);
}

/* Enhanced touch feedback for mobile */
@media (max-width: 768px) {
    .thumbnail {
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    .thumbnail:hover {
        transform: none; /* Disable hover on mobile */
    }
}

/* iPad specific optimizations */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .selection-mode-indicator {
        top: 40px !important;
        font-size: 16px !important;
        padding: 10px 20px !important;
    }
}
