/* Theme Switcher - Additive CSS
 * Created: 2025-12-01
 * Purpose: Optional light/dark theme toggle
 */

/* ============================================
   Theme Toggle Button Styles
   ============================================ */

.theme-toggle-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
}

.theme-toggle-btn:hover {
    background: rgba(0, 120, 212, 0.1);
    transform: scale(1.1);
}

.theme-toggle-btn:active {
    transform: scale(0.95);
}

/* Icon states - controlled by JS */
.theme-toggle-btn .icon-sun,
.theme-toggle-btn .icon-moon {
    transition: opacity 0.3s ease;
}

/* ============================================
   DARK THEME STYLES
   Applied when body has .theme-enabled and html has data-theme="dark"
   ============================================ */

html[data-theme="dark"] body.theme-enabled {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
    color: #ffffff !important;
}

html[data-theme="dark"] body.theme-enabled .mtb-navigation {
    background: rgba(26, 26, 46, 0.95) !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] body.theme-enabled .mtb-navigation .mtb-nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

html[data-theme="dark"] body.theme-enabled .mtb-navigation .mtb-nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] body.theme-enabled .mtb-navigation .mtb-brand {
    color: #0078d4 !important;
}

html[data-theme="dark"] body.theme-enabled .mtb-navigation .mtb-lang-button {
    color: rgba(255, 255, 255, 0.9) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

html[data-theme="dark"] body.theme-enabled .theme-toggle-btn {
    color: rgba(255, 255, 255, 0.9) !important;
}

html[data-theme="dark"] body.theme-enabled .mtb-auth-links .mtb-nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

html[data-theme="dark"] body.theme-enabled footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
}

/* ============================================
   LIGHT THEME STYLES
   Applied when body has .theme-enabled and html has data-theme="light"
   ============================================ */

html[data-theme="light"] body.theme-enabled {
    background: #f8f9fa !important;
    color: #1a1a1a !important;
}

html[data-theme="light"] body.theme-enabled .mtb-navigation {
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] body.theme-enabled .mtb-navigation .mtb-nav-link {
    color: #333333 !important;
}

html[data-theme="light"] body.theme-enabled .mtb-navigation .mtb-nav-link:hover {
    color: #0078d4 !important;
    background: rgba(0, 120, 212, 0.1) !important;
}

html[data-theme="light"] body.theme-enabled .mtb-navigation .mtb-brand {
    color: #0078d4 !important;
}

html[data-theme="light"] body.theme-enabled .mtb-navigation .mtb-lang-button {
    color: #333333 !important;
    background: rgba(0, 120, 212, 0.1) !important;
    border-color: rgba(0, 120, 212, 0.2) !important;
}

html[data-theme="light"] body.theme-enabled .theme-toggle-btn {
    color: #333333 !important;
}

html[data-theme="light"] body.theme-enabled .mtb-auth-links .mtb-nav-link {
    color: #333333 !important;
}

/* Footer zachowuje swoje oryginalne style inline (ciemne tło) */
/* USUNIĘTO: reguły zmieniające footer na jasne tło */

/* ============================================
   LIGHT THEME - Dashboard Content
   ============================================ */

/* Main content area */
html[data-theme="light"] body.theme-enabled main {
    background: #f8f9fa !important;
}

/* Dashboard hero/header section */
html[data-theme="light"] body.theme-enabled .dashboard-hero,
html[data-theme="light"] body.theme-enabled .hero-section,
html[data-theme="light"] body.theme-enabled .welcome-section {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
    color: #1a1a1a !important;
}

/* Stats cards */
html[data-theme="light"] body.theme-enabled .stat-card,
html[data-theme="light"] body.theme-enabled .stats-card,
html[data-theme="light"] body.theme-enabled .metric-card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

html[data-theme="light"] body.theme-enabled .stat-card h3,
html[data-theme="light"] body.theme-enabled .stat-card .stat-value,
html[data-theme="light"] body.theme-enabled .stats-card h3,
html[data-theme="light"] body.theme-enabled .metric-value {
    color: #0078d4 !important;
}

html[data-theme="light"] body.theme-enabled .stat-card p,
html[data-theme="light"] body.theme-enabled .stat-card .stat-label,
html[data-theme="light"] body.theme-enabled .stats-card p,
html[data-theme="light"] body.theme-enabled .metric-label {
    color: #555555 !important;
}

/* Section headers */
html[data-theme="light"] body.theme-enabled h1,
html[data-theme="light"] body.theme-enabled h2,
html[data-theme="light"] body.theme-enabled h3,
html[data-theme="light"] body.theme-enabled h4,
html[data-theme="light"] body.theme-enabled h5 {
    color: #1a1a1a !important;
}

/* Cards and panels */
html[data-theme="light"] body.theme-enabled .card,
html[data-theme="light"] body.theme-enabled .panel,
html[data-theme="light"] body.theme-enabled .admin-card,
html[data-theme="light"] body.theme-enabled .feature-card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #333333 !important;
}

html[data-theme="light"] body.theme-enabled .card-title,
html[data-theme="light"] body.theme-enabled .card-header {
    color: #1a1a1a !important;
}

html[data-theme="light"] body.theme-enabled .card-text,
html[data-theme="light"] body.theme-enabled .card-body {
    color: #555555 !important;
}

/* Dashboard specific elements */
html[data-theme="light"] body.theme-enabled .dashboard-container {
    background: #f8f9fa !important;
}

html[data-theme="light"] body.theme-enabled .section-title,
html[data-theme="light"] body.theme-enabled .section-header {
    color: #1a1a1a !important;
}

/* Admin function cards */
html[data-theme="light"] body.theme-enabled .admin-functions .card,
html[data-theme="light"] body.theme-enabled .function-card {
    background: #ffffff !important;
    border: 1px solid #dee2e6 !important;
}

html[data-theme="light"] body.theme-enabled .admin-functions .card h5,
html[data-theme="light"] body.theme-enabled .function-card h5 {
    color: #1a1a1a !important;
}

html[data-theme="light"] body.theme-enabled .admin-functions .card p,
html[data-theme="light"] body.theme-enabled .function-card p {
    color: #666666 !important;
}

/* Tables */
html[data-theme="light"] body.theme-enabled table {
    background: #ffffff !important;
}

html[data-theme="light"] body.theme-enabled table th {
    background: #f8f9fa !important;
    color: #333333 !important;
    border-color: #dee2e6 !important;
}

html[data-theme="light"] body.theme-enabled table td {
    color: #333333 !important;
    border-color: #dee2e6 !important;
}

html[data-theme="light"] body.theme-enabled table tr:hover {
    background: #f1f3f4 !important;
}

/* Forms */
html[data-theme="light"] body.theme-enabled input,
html[data-theme="light"] body.theme-enabled select,
html[data-theme="light"] body.theme-enabled textarea {
    background: #ffffff !important;
    color: #333333 !important;
    border-color: #ced4da !important;
}

html[data-theme="light"] body.theme-enabled input::placeholder {
    color: #6c757d !important;
}

/* Badges and labels */
html[data-theme="light"] body.theme-enabled .badge {
    color: #ffffff !important;
}

/* Links */
html[data-theme="light"] body.theme-enabled a:not(.btn):not(.mtb-nav-link):not(.mtb-brand) {
    color: #0078d4 !important;
}

/* Paragraphs and text */
html[data-theme="light"] body.theme-enabled p,
html[data-theme="light"] body.theme-enabled span:not(.icon-sun):not(.icon-moon),
html[data-theme="light"] body.theme-enabled li {
    color: #333333 !important;
}

/* Muted text */
html[data-theme="light"] body.theme-enabled .text-muted,
html[data-theme="light"] body.theme-enabled small {
    color: #6c757d !important;
}

/* Icons in cards */
html[data-theme="light"] body.theme-enabled .stat-icon,
html[data-theme="light"] body.theme-enabled .card-icon {
    color: #0078d4 !important;
}

/* Glassmorphism panels - convert to solid for light theme */
html[data-theme="light"] body.theme-enabled [style*="backdrop-filter"],
html[data-theme="light"] body.theme-enabled [style*="rgba(255,255,255,0.05)"],
html[data-theme="light"] body.theme-enabled [style*="rgba(255,255,255,0.1)"] {
    background: #ffffff !important;
    backdrop-filter: none !important;
}

/* Alerts and notifications */
html[data-theme="light"] body.theme-enabled .alert {
    color: #333333 !important;
}

/* ============================================
   LIGHT THEME - Dashboard Specific Elements
   ============================================ */

/* Dashboard background */
html[data-theme="light"] body.theme-enabled {
    background: #f0f2f5 !important;
}

/* Stat cards - titles and labels */
html[data-theme="light"] body.theme-enabled .stat-title {
    color: #333333 !important;
}

html[data-theme="light"] body.theme-enabled .stat-label {
    color: #666666 !important;
}

/* Admin card titles and descriptions */
html[data-theme="light"] body.theme-enabled .admin-card-title {
    color: #1a1a1a !important;
}

html[data-theme="light"] body.theme-enabled .admin-card-desc {
    color: #555555 !important;
}

/* Section headers and titles */
html[data-theme="light"] body.theme-enabled .section-title {
    color: #1a1a1a !important;
}

html[data-theme="light"] body.theme-enabled .section-header {
    border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] body.theme-enabled .section-header i {
    color: #333333 !important;
}

/* Section badge (Admin, etc.) */
html[data-theme="light"] body.theme-enabled .section-badge {
    background: #d97706 !important;
    color: #ffffff !important;
}

/* User badge */
html[data-theme="light"] body.theme-enabled .user-badge {
    background: #d97706 !important;
    color: #ffffff !important;
}

/* Welcome subtitle text */
html[data-theme="light"] body.theme-enabled .welcome-subtitle {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Section cards - glassmorphism to solid */
html[data-theme="light"] body.theme-enabled .section-card {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: none !important;
}

/* Stat cards - glassmorphism to solid */
html[data-theme="light"] body.theme-enabled .stat-card {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

/* Admin cards - glassmorphism to solid */
html[data-theme="light"] body.theme-enabled .admin-card {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: none !important;
}

html[data-theme="light"] body.theme-enabled .admin-card:hover {
    background: #f8f9fa !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

/* Activity items */
html[data-theme="light"] body.theme-enabled .activity-item {
    background: rgba(0, 0, 0, 0.03) !important;
}

html[data-theme="light"] body.theme-enabled .activity-item:hover {
    background: rgba(0, 0, 0, 0.06) !important;
}

html[data-theme="light"] body.theme-enabled .activity-text {
    color: #1a1a1a !important;
}

html[data-theme="light"] body.theme-enabled .activity-time {
    color: #666666 !important;
}

/* SEO actions bar */
html[data-theme="light"] body.theme-enabled .seo-actions {
    background: rgba(0, 0, 0, 0.03) !important;
}

/* Empty state */
html[data-theme="light"] body.theme-enabled .empty-state {
    color: #666666 !important;
}

/* Dashboard container */
html[data-theme="light"] body.theme-enabled .dashboard-container {
    background: transparent !important;
}

/* Override inline body background styles */
html[data-theme="light"] body.theme-enabled[style*="background"] {
    background: #f0f2f5 !important;
}

/* ============================================
   LIGHT THEME - AI Hub & Tab Navigation
   ============================================ */

/* AI Hub tabs - inactive state */
html[data-theme="light"] body.theme-enabled .nav-tabs .nav-link,
html[data-theme="light"] body.theme-enabled [class*="nav-tab"],
html[data-theme="light"] body.theme-enabled .tab-link {
    color: #555555 !important;
}

/* AI Hub tabs - active state */
html[data-theme="light"] body.theme-enabled .nav-tabs .nav-link.active,
html[data-theme="light"] body.theme-enabled [class*="nav-tab"].active,
html[data-theme="light"] body.theme-enabled .tab-link.active {
    color: #0078d4 !important;
    border-bottom-color: #0078d4 !important;
}

/* AI Hub tabs - hover state */
html[data-theme="light"] body.theme-enabled .nav-tabs .nav-link:hover,
html[data-theme="light"] body.theme-enabled [class*="nav-tab"]:hover {
    color: #0078d4 !important;
}

/* Tab content area */
html[data-theme="light"] body.theme-enabled .tab-content,
html[data-theme="light"] body.theme-enabled .tab-pane {
    background: transparent !important;
    color: #333333 !important;
}

/* ============================================
   LIGHT THEME - My Day Dashboard Elements
   ============================================ */

/* Quick stats period labels (tydzień, miesiąc, rok) */
html[data-theme="light"] body.theme-enabled .quick-stat-label,
html[data-theme="light"] body.theme-enabled .stat-period,
html[data-theme="light"] body.theme-enabled .period-label,
html[data-theme="light"] body.theme-enabled [class*="period-label"],
html[data-theme="light"] body.theme-enabled .time-period {
    color: #666666 !important;
}

/* Quick stats values */
html[data-theme="light"] body.theme-enabled .quick-stat-value,
html[data-theme="light"] body.theme-enabled .stat-number {
    color: #1a1a1a !important;
}

/* Health stat cards */
html[data-theme="light"] body.theme-enabled .health-card,
html[data-theme="light"] body.theme-enabled .health-stat-card,
html[data-theme="light"] body.theme-enabled .perf-stat-card,
html[data-theme="light"] body.theme-enabled .activity-card,
html[data-theme="light"] body.theme-enabled .weather-card {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

/* Card titles in My Day */
html[data-theme="light"] body.theme-enabled .card-title,
html[data-theme="light"] body.theme-enabled .health-card-title,
html[data-theme="light"] body.theme-enabled .widget-title {
    color: #1a1a1a !important;
}

/* Card subtitles and descriptions */
html[data-theme="light"] body.theme-enabled .card-subtitle,
html[data-theme="light"] body.theme-enabled .card-description,
html[data-theme="light"] body.theme-enabled .widget-subtitle {
    color: #666666 !important;
}

/* Activity section headers */
html[data-theme="light"] body.theme-enabled .activity-header,
html[data-theme="light"] body.theme-enabled .section-title-sm {
    color: #333333 !important;
}

/* Activity dates and metadata */
html[data-theme="light"] body.theme-enabled .activity-date,
html[data-theme="light"] body.theme-enabled .activity-meta,
html[data-theme="light"] body.theme-enabled .activity-info {
    color: #555555 !important;
}

/* ============================================
   LIGHT THEME - Performance & Analytics Stats
   ============================================ */

/* Performance stat boxes */
html[data-theme="light"] body.theme-enabled .perf-stat,
html[data-theme="light"] body.theme-enabled .performance-stat {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Performance stat values */
html[data-theme="light"] body.theme-enabled .perf-value,
html[data-theme="light"] body.theme-enabled .performance-value {
    color: #0078d4 !important;
}

/* Performance stat labels */
html[data-theme="light"] body.theme-enabled .perf-label,
html[data-theme="light"] body.theme-enabled .performance-label {
    color: #666666 !important;
}

/* Analytics dashboard */
html[data-theme="light"] body.theme-enabled .analytics-card,
html[data-theme="light"] body.theme-enabled .chart-card {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* ============================================
   LIGHT THEME - Integration Cards
   ============================================ */

/* Integration cards */
html[data-theme="light"] body.theme-enabled .integration-card {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Integration card name */
html[data-theme="light"] body.theme-enabled .integration-name {
    color: #1a1a1a !important;
}

/* Integration card description */
html[data-theme="light"] body.theme-enabled .integration-description,
html[data-theme="light"] body.theme-enabled .section-description {
    color: #555555 !important;
}

/* Integration stat labels and values */
html[data-theme="light"] body.theme-enabled .integration-card .stat-label {
    color: #666666 !important;
}

html[data-theme="light"] body.theme-enabled .integration-card .stat-value {
    color: #1a1a1a !important;
}

/* Dev mode banner */
html[data-theme="light"] body.theme-enabled .dev-mode-banner {
    background: rgba(255, 152, 0, 0.15) !important;
    border-color: #ff9800 !important;
}

html[data-theme="light"] body.theme-enabled .dev-mode-banner span {
    color: #555555 !important;
}

/* Token warning */
html[data-theme="light"] body.theme-enabled .token-warning {
    color: #d97706 !important;
}

/* Integration messages */
html[data-theme="light"] body.theme-enabled .integration-message.success {
    color: #059669 !important;
}

html[data-theme="light"] body.theme-enabled .integration-message.error {
    color: #dc2626 !important;
}

html[data-theme="light"] body.theme-enabled .integration-message.info {
    color: #0078d4 !important;
}

/* ============================================
   LIGHT THEME - Hero Sections
   ============================================ */

/* AI Hub hero - keep gradient but ensure text visibility */
html[data-theme="light"] body.theme-enabled .ai-hero,
html[data-theme="light"] body.theme-enabled .hero-section {
    color: #ffffff !important;
}

/* Page titles on light backgrounds */
html[data-theme="light"] body.theme-enabled .page-title,
html[data-theme="light"] body.theme-enabled .main-title {
    color: #1a1a1a !important;
}

/* ============================================
   LIGHT THEME - Results Hub
   ============================================ */

/* Results table */
html[data-theme="light"] body.theme-enabled .results-table th {
    background: #f8f9fa !important;
    color: #333333 !important;
}

html[data-theme="light"] body.theme-enabled .results-table td {
    color: #333333 !important;
    border-color: #dee2e6 !important;
}

/* Event cards */
html[data-theme="light"] body.theme-enabled .event-card,
html[data-theme="light"] body.theme-enabled .result-card {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] body.theme-enabled .event-card-title,
html[data-theme="light"] body.theme-enabled .event-name {
    color: #1a1a1a !important;
}

html[data-theme="light"] body.theme-enabled .event-card-meta,
html[data-theme="light"] body.theme-enabled .event-details {
    color: #666666 !important;
}

/* ============================================
   LIGHT THEME - Bootstrap Overrides
   ============================================ */

/* Text utilities - only override when NOT on colored backgrounds */
html[data-theme="light"] body.theme-enabled .text-white:not([class*="bg-"]) {
    color: #333333 !important;
}

html[data-theme="light"] body.theme-enabled .text-light:not([class*="bg-"]) {
    color: #555555 !important;
}

/* Bootstrap card styling */
html[data-theme="light"] body.theme-enabled .card:not(.bg-primary):not(.bg-success):not(.bg-info):not(.bg-warning):not(.bg-danger) {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] body.theme-enabled .card-header:not([class*="bg-"]) {
    background: #f8f9fa !important;
    border-bottom-color: rgba(0, 0, 0, 0.1) !important;
    color: #333333 !important;
}

html[data-theme="light"] body.theme-enabled .card-body {
    color: #333333 !important;
}

html[data-theme="light"] body.theme-enabled .card-footer {
    background: #f8f9fa !important;
    border-top-color: rgba(0, 0, 0, 0.1) !important;
}

/* List groups */
html[data-theme="light"] body.theme-enabled .list-group-item {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #333333 !important;
}

html[data-theme="light"] body.theme-enabled .list-group-item:hover {
    background: #f8f9fa !important;
}

/* ============================================
   LIGHT THEME - Modals & Dialogs
   ============================================ */

/* Confirm modal */
html[data-theme="light"] body.theme-enabled .confirm-modal-content {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] body.theme-enabled .confirm-modal-header h3 {
    color: #1a1a1a !important;
}

html[data-theme="light"] body.theme-enabled .confirm-modal-body p {
    color: #333333 !important;
}

/* Standard Bootstrap modal */
html[data-theme="light"] body.theme-enabled .modal-content {
    background: #ffffff !important;
    color: #333333 !important;
}

html[data-theme="light"] body.theme-enabled .modal-header {
    border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] body.theme-enabled .modal-footer {
    border-top-color: rgba(0, 0, 0, 0.1) !important;
}

/* ============================================
   LIGHT THEME - Buttons
   ============================================ */

/* IMPORTANT: Colored buttons MUST keep white text */
html[data-theme="light"] body.theme-enabled .btn-primary,
html[data-theme="light"] body.theme-enabled .btn-success,
html[data-theme="light"] body.theme-enabled .btn-danger,
html[data-theme="light"] body.theme-enabled .btn-warning,
html[data-theme="light"] body.theme-enabled .btn-info,
html[data-theme="light"] body.theme-enabled .btn-action,
html[data-theme="light"] body.theme-enabled .btn-action.primary,
html[data-theme="light"] body.theme-enabled .btn-action.success,
html[data-theme="light"] body.theme-enabled .btn-action.warning,
html[data-theme="light"] body.theme-enabled .btn-action.danger,
html[data-theme="light"] body.theme-enabled [class*="btn-"][class*="primary"],
html[data-theme="light"] body.theme-enabled [class*="btn-"][class*="success"],
html[data-theme="light"] body.theme-enabled [class*="btn-"][class*="danger"],
html[data-theme="light"] body.theme-enabled [class*="btn-"][class*="warning"],
html[data-theme="light"] body.theme-enabled [class*="btn-"][class*="info"],
html[data-theme="light"] body.theme-enabled a.btn-action,
html[data-theme="light"] body.theme-enabled button.btn-action {
    color: #ffffff !important;
}

/* Settings/secondary buttons */
html[data-theme="light"] body.theme-enabled .btn-settings,
html[data-theme="light"] body.theme-enabled .btn-secondary-custom {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #333333 !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] body.theme-enabled .btn-settings:hover {
    background: rgba(0, 0, 0, 0.1) !important;
}

/* Outline buttons */
html[data-theme="light"] body.theme-enabled .btn-outline-light {
    color: #333333 !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
}

html[data-theme="light"] body.theme-enabled .btn-outline-light:hover {
    background: rgba(0, 0, 0, 0.05) !important;
}

/* ============================================
   LIGHT THEME - Misc Elements
   ============================================ */

/* Dropdown menus */
html[data-theme="light"] body.theme-enabled .dropdown-menu {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] body.theme-enabled .dropdown-item {
    color: #333333 !important;
}

html[data-theme="light"] body.theme-enabled .dropdown-item:hover {
    background: #f8f9fa !important;
}

/* Tooltips */
html[data-theme="light"] body.theme-enabled .tooltip-inner {
    background: #333333 !important;
    color: #ffffff !important;
}

/* Progress bars container */
html[data-theme="light"] body.theme-enabled .progress {
    background: #e9ecef !important;
}

/* Accordions */
html[data-theme="light"] body.theme-enabled .accordion-item {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] body.theme-enabled .accordion-button {
    background: #ffffff !important;
    color: #333333 !important;
}

html[data-theme="light"] body.theme-enabled .accordion-button:not(.collapsed) {
    background: #f0f2f5 !important;
    color: #0078d4 !important;
}

html[data-theme="light"] body.theme-enabled .accordion-body {
    background: #ffffff !important;
    color: #333333 !important;
}

/* Breadcrumbs */
html[data-theme="light"] body.theme-enabled .breadcrumb {
    background: transparent !important;
}

html[data-theme="light"] body.theme-enabled .breadcrumb-item,
html[data-theme="light"] body.theme-enabled .breadcrumb-item a {
    color: #666666 !important;
}

html[data-theme="light"] body.theme-enabled .breadcrumb-item.active {
    color: #333333 !important;
}

/* Code and pre blocks */
html[data-theme="light"] body.theme-enabled pre,
html[data-theme="light"] body.theme-enabled code {
    background: #f8f9fa !important;
    color: #333333 !important;
}

/* Dividers and separators */
html[data-theme="light"] body.theme-enabled hr {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Help text */
html[data-theme="light"] body.theme-enabled .help-text,
html[data-theme="light"] body.theme-enabled .form-text {
    color: #666666 !important;
}

/* Pagination */
html[data-theme="light"] body.theme-enabled .page-link {
    background: #ffffff !important;
    color: #333333 !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] body.theme-enabled .page-link:hover {
    background: #f8f9fa !important;
}

html[data-theme="light"] body.theme-enabled .page-item.active .page-link {
    background: #0078d4 !important;
    border-color: #0078d4 !important;
    color: #ffffff !important;
}

/* ============================================
   LIGHT THEME - Glassmorphism Universal Fix
   ============================================ */

/* Target all glassmorphism patterns */
html[data-theme="light"] body.theme-enabled [style*="rgba(255,255,255,0.0"],
html[data-theme="light"] body.theme-enabled [style*="rgba(255, 255, 255, 0.0"],
html[data-theme="light"] body.theme-enabled [style*="rgba(255,255,255,0.1"],
html[data-theme="light"] body.theme-enabled [style*="rgba(255, 255, 255, 0.1"] {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Target all white text on glassmorphism - EXCLUDE buttons AND dark background sections */
html[data-theme="light"] body.theme-enabled [style*="color: white"]:not(.btn-action):not([class*="btn-"]):not(button):not(a[href]):not(footer):not(footer *):not(.mtb-stats):not(.mtb-stats *):not(.mtb-cta):not(.mtb-cta *):not(#cookie-banner):not(#cookie-banner *),
html[data-theme="light"] body.theme-enabled [style*="color:white"]:not(.btn-action):not([class*="btn-"]):not(button):not(a[href]):not(footer):not(footer *):not(.mtb-stats):not(.mtb-stats *):not(.mtb-cta):not(.mtb-cta *):not(#cookie-banner):not(#cookie-banner *),
html[data-theme="light"] body.theme-enabled [style*="color: #fff"]:not(.btn-action):not([class*="btn-"]):not(button):not(a[href]):not(footer):not(footer *):not(.mtb-stats):not(.mtb-stats *):not(.mtb-cta):not(.mtb-cta *):not(#cookie-banner):not(#cookie-banner *),
html[data-theme="light"] body.theme-enabled [style*="color:#fff"]:not(.btn-action):not([class*="btn-"]):not(button):not(a[href]):not(footer):not(footer *):not(.mtb-stats):not(.mtb-stats *):not(.mtb-cta):not(.mtb-cta *):not(#cookie-banner):not(#cookie-banner *) {
    color: #333333 !important;
}

/* Target rgba white text - EXCLUDE buttons AND dark background sections */
html[data-theme="light"] body.theme-enabled [style*="color: rgba(255,255,255"]:not(.btn-action):not([class*="btn-"]):not(button):not(a[href]):not(footer):not(footer *):not(.mtb-stats):not(.mtb-stats *):not(.mtb-cta):not(.mtb-cta *):not(#cookie-banner):not(#cookie-banner *),
html[data-theme="light"] body.theme-enabled [style*="color: rgba(255, 255, 255"]:not(.btn-action):not([class*="btn-"]):not(button):not(a[href]):not(footer):not(footer *):not(.mtb-stats):not(.mtb-stats *):not(.mtb-cta):not(.mtb-cta *):not(#cookie-banner):not(#cookie-banner *),
html[data-theme="light"] body.theme-enabled [style*="color:rgba(255,255,255"]:not(.btn-action):not([class*="btn-"]):not(button):not(a[href]):not(footer):not(footer *):not(.mtb-stats):not(.mtb-stats *):not(.mtb-cta):not(.mtb-cta *):not(#cookie-banner):not(#cookie-banner *),
html[data-theme="light"] body.theme-enabled [style*="color:rgba(255, 255, 255"]:not(.btn-action):not([class*="btn-"]):not(button):not(a[href]):not(footer):not(footer *):not(.mtb-stats):not(.mtb-stats *):not(.mtb-cta):not(.mtb-cta *):not(#cookie-banner):not(#cookie-banner *) {
    color: #555555 !important;
}

/* === ZASADA 28: ZACHOWAJ biały tekst w sekcjach z ciemnym tłem === */
/* Footer - zawsze ciemne tło */
html[data-theme="light"] body.theme-enabled footer,
html[data-theme="light"] body.theme-enabled footer * {
    color: inherit;
}
html[data-theme="light"] body.theme-enabled footer[style*="color"] {
    color: #ffffff !important;
}

/* Cookie banner - zawsze ciemne tło */
html[data-theme="light"] body.theme-enabled #cookie-banner,
html[data-theme="light"] body.theme-enabled #cookie-banner * {
    color: #ffffff !important;
}
html[data-theme="light"] body.theme-enabled #cookie-banner button {
    color: #ffffff !important;
}

/* Force white text on buttons with inline white color */
html[data-theme="light"] body.theme-enabled .btn-action[style*="color: white"],
html[data-theme="light"] body.theme-enabled .btn-action[style*="color:white"],
html[data-theme="light"] body.theme-enabled a.btn-action[style*="color: white"],
html[data-theme="light"] body.theme-enabled a.btn-action[style*="color:white"] {
    color: #ffffff !important;
}

/* ============================================
   Smooth theme transition animation
   ============================================ */

html.theme-transitioning,
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
    transition: background 0.3s ease,
                background-color 0.3s ease,
                color 0.3s ease,
                border-color 0.3s ease !important;
}

/* ============================================
   CRITICAL: Force white text on colored buttons
   This MUST be at the END of file for highest priority
   ============================================ */

/* Maximum specificity rule for dashboard buttons */
html[data-theme="light"] body.theme-enabled .admin-grid .admin-card .btn-action,
html[data-theme="light"] body.theme-enabled .admin-grid .admin-card a.btn-action,
html[data-theme="light"] body.theme-enabled .section-card .admin-grid a.btn-action,
html[data-theme="light"] body.theme-enabled a.btn-action[style*="background"],
html[data-theme="light"] body.theme-enabled .btn-action[style*="background: linear-gradient"],
html[data-theme="light"] body.theme-enabled a[class="btn-action"][style],
html[data-theme="light"] body.theme-enabled .dashboard-container a.btn-action {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Even more specific - target by href patterns */
html[data-theme="light"] body.theme-enabled a[href*="admin"][class*="btn"],
html[data-theme="light"] body.theme-enabled a[href*="manage"][class*="btn"],
html[data-theme="light"] body.theme-enabled a[href*="upload"][class*="btn"],
html[data-theme="light"] body.theme-enabled a[href*="import"][class*="btn"],
html[data-theme="light"] body.theme-enabled a[href*="status"][class*="btn"],
html[data-theme="light"] body.theme-enabled a[href*="analytics"][class*="btn"],
html[data-theme="light"] body.theme-enabled a[href*="integrations"][class*="btn"],
html[data-theme="light"] body.theme-enabled a[href*="costs"][class*="btn"],
html[data-theme="light"] body.theme-enabled a[href*="coach"][class*="btn"],
html[data-theme="light"] body.theme-enabled a[href*="nutrition"][class*="btn"],
html[data-theme="light"] body.theme-enabled a[href*="profile"][class*="btn"] {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* ============================================
   ============================================
   GLOBAL UNIFIED LIGHT THEME SOLUTION
   ============================================
   ============================================

   Zasada 1: Tekst na jasnym tle → ciemny (#333333)
   Zasada 2: Tekst na kolorowych przyciskach → biały (#ffffff)
   Zasada 3: Glassmorphism → białe tło z cieniem
   Zasada 4: Opisy/etykiety → ciemny szary (#666666)

   ============================================ */

/* === ZASADA 1: Globalny reset tekstu na ciemny === */
html[data-theme="light"] body.theme-enabled {
    color: #333333 !important;
}

/* Wszystkie nagłówki */
html[data-theme="light"] body.theme-enabled h1,
html[data-theme="light"] body.theme-enabled h2,
html[data-theme="light"] body.theme-enabled h3,
html[data-theme="light"] body.theme-enabled h4,
html[data-theme="light"] body.theme-enabled h5,
html[data-theme="light"] body.theme-enabled h6 {
    color: #1a1a1a !important;
}

/* Wszystkie paragrafy i tekst */
html[data-theme="light"] body.theme-enabled p,
html[data-theme="light"] body.theme-enabled span,
html[data-theme="light"] body.theme-enabled div,
html[data-theme="light"] body.theme-enabled label,
html[data-theme="light"] body.theme-enabled li {
    color: #333333 !important;
}

/* Wyjątek: elementy wewnątrz kolorowych przycisków */
html[data-theme="light"] body.theme-enabled [class*="btn-"] span,
html[data-theme="light"] body.theme-enabled [class*="btn-"] i,
html[data-theme="light"] body.theme-enabled a[style*="background"] span,
html[data-theme="light"] body.theme-enabled a[style*="background"] i {
    color: inherit !important;
}

/* Opisy i etykiety - ciemny szary */
html[data-theme="light"] body.theme-enabled small,
html[data-theme="light"] body.theme-enabled .text-muted,
html[data-theme="light"] body.theme-enabled .description,
html[data-theme="light"] body.theme-enabled .subtitle,
html[data-theme="light"] body.theme-enabled .meta,
html[data-theme="light"] body.theme-enabled .hint,
html[data-theme="light"] body.theme-enabled .helper-text {
    color: #666666 !important;
}

/* === ZASADA 2: Kolorowe przyciski = biały tekst === */

/* Wszystkie przyciski z tłem (gradient lub kolor) */
html[data-theme="light"] body.theme-enabled [style*="background: linear-gradient"],
html[data-theme="light"] body.theme-enabled [style*="background:linear-gradient"],
html[data-theme="light"] body.theme-enabled [style*="background-color: #0"],
html[data-theme="light"] body.theme-enabled [style*="background-color:#0"],
html[data-theme="light"] body.theme-enabled [style*="background: #0"],
html[data-theme="light"] body.theme-enabled [style*="background:#0"] {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Bootstrap i Fluent przyciski */
html[data-theme="light"] body.theme-enabled .btn-primary,
html[data-theme="light"] body.theme-enabled .btn-success,
html[data-theme="light"] body.theme-enabled .btn-danger,
html[data-theme="light"] body.theme-enabled .btn-warning,
html[data-theme="light"] body.theme-enabled .btn-info,
html[data-theme="light"] body.theme-enabled .btn-dark,
html[data-theme="light"] body.theme-enabled .fluent-button-primary,
html[data-theme="light"] body.theme-enabled .fluent-button-success,
html[data-theme="light"] body.theme-enabled .fluent-button-danger {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Wszystkie linki z klasą btn-action */
html[data-theme="light"] body.theme-enabled .btn-action,
html[data-theme="light"] body.theme-enabled a.btn-action,
html[data-theme="light"] body.theme-enabled button.btn-action {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Outline przyciski - tekst kolorowy, nie biały */
html[data-theme="light"] body.theme-enabled .btn-outline-primary {
    color: #0078d4 !important;
    -webkit-text-fill-color: #0078d4 !important;
}

html[data-theme="light"] body.theme-enabled .btn-outline-success {
    color: #107c10 !important;
    -webkit-text-fill-color: #107c10 !important;
}

html[data-theme="light"] body.theme-enabled .btn-outline-danger {
    color: #d13438 !important;
    -webkit-text-fill-color: #d13438 !important;
}

html[data-theme="light"] body.theme-enabled .btn-outline-warning {
    color: #d97706 !important;
    -webkit-text-fill-color: #d97706 !important;
}

/* === ZASADA 3: Glassmorphism i karty → białe tło === */

/* Wszystkie elementy z przezroczystym białym tłem */
html[data-theme="light"] body.theme-enabled [style*="rgba(255,255,255,0.0"],
html[data-theme="light"] body.theme-enabled [style*="rgba(255, 255, 255, 0.0"],
html[data-theme="light"] body.theme-enabled [style*="rgba(255,255,255,0.1"],
html[data-theme="light"] body.theme-enabled [style*="rgba(255, 255, 255, 0.1"] {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* Karty, panele, sekcje */
html[data-theme="light"] body.theme-enabled .card,
html[data-theme="light"] body.theme-enabled .panel,
html[data-theme="light"] body.theme-enabled .box,
html[data-theme="light"] body.theme-enabled .section-card,
html[data-theme="light"] body.theme-enabled .stat-card,
html[data-theme="light"] body.theme-enabled .admin-card,
html[data-theme="light"] body.theme-enabled .integration-card,
html[data-theme="light"] body.theme-enabled .feature-card,
html[data-theme="light"] body.theme-enabled .info-card,
html[data-theme="light"] body.theme-enabled .widget,
html[data-theme="light"] body.theme-enabled .tile {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    color: #333333 !important;
}

/* Nagłówki kart - zachowaj kolorowe tło ale biały tekst */
html[data-theme="light"] body.theme-enabled .card-header[style*="background"],
html[data-theme="light"] body.theme-enabled .card-header[class*="bg-"] {
    color: #ffffff !important;
}

/* Nagłówki kart bez kolorowego tła */
html[data-theme="light"] body.theme-enabled .card-header:not([style*="background"]):not([class*="bg-"]) {
    background: #f8f9fa !important;
    color: #333333 !important;
    border-bottom-color: rgba(0, 0, 0, 0.1) !important;
}

/* === ZASADA 4: Tabele === */

html[data-theme="light"] body.theme-enabled table {
    color: #333333 !important;
}

html[data-theme="light"] body.theme-enabled th {
    background: #f8f9fa !important;
    color: #333333 !important;
    border-color: #dee2e6 !important;
}

html[data-theme="light"] body.theme-enabled td {
    color: #333333 !important;
    border-color: #dee2e6 !important;
}

html[data-theme="light"] body.theme-enabled tr:hover {
    background: rgba(0, 0, 0, 0.02) !important;
}

/* === ZASADA 5: Nawigacja zakładek === */

html[data-theme="light"] body.theme-enabled .nav-tabs .nav-link,
html[data-theme="light"] body.theme-enabled .nav-pills .nav-link,
html[data-theme="light"] body.theme-enabled [role="tab"],
html[data-theme="light"] body.theme-enabled .tab-button {
    color: #555555 !important;
}

html[data-theme="light"] body.theme-enabled .nav-tabs .nav-link.active,
html[data-theme="light"] body.theme-enabled .nav-pills .nav-link.active,
html[data-theme="light"] body.theme-enabled [role="tab"].active,
html[data-theme="light"] body.theme-enabled [role="tab"][aria-selected="true"],
html[data-theme="light"] body.theme-enabled .tab-button.active {
    color: #0078d4 !important;
    font-weight: 600 !important;
}

/* === ZASADA 6: Formularze === */

html[data-theme="light"] body.theme-enabled input,
html[data-theme="light"] body.theme-enabled select,
html[data-theme="light"] body.theme-enabled textarea {
    background: #ffffff !important;
    color: #333333 !important;
    border-color: #ced4da !important;
}

html[data-theme="light"] body.theme-enabled input::placeholder,
html[data-theme="light"] body.theme-enabled textarea::placeholder {
    color: #999999 !important;
}

html[data-theme="light"] body.theme-enabled input:focus,
html[data-theme="light"] body.theme-enabled select:focus,
html[data-theme="light"] body.theme-enabled textarea:focus {
    border-color: #0078d4 !important;
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2) !important;
}

/* === ZASADA 7: Linki === */

html[data-theme="light"] body.theme-enabled a:not([class*="btn"]):not(.nav-link):not(.dropdown-item) {
    color: #0078d4 !important;
}

html[data-theme="light"] body.theme-enabled a:not([class*="btn"]):not(.nav-link):not(.dropdown-item):hover {
    color: #005a9e !important;
}

/* === ZASADA 8: Ikony === */

html[data-theme="light"] body.theme-enabled i:not([class*="btn"] i),
html[data-theme="light"] body.theme-enabled .icon:not([class*="btn"] .icon),
html[data-theme="light"] body.theme-enabled svg:not([class*="btn"] svg) {
    color: #555555 !important;
}

/* Ikony w kolorowych przyciskach - biały */
html[data-theme="light"] body.theme-enabled [class*="btn-primary"] i,
html[data-theme="light"] body.theme-enabled [class*="btn-success"] i,
html[data-theme="light"] body.theme-enabled [class*="btn-danger"] i,
html[data-theme="light"] body.theme-enabled [class*="btn-warning"] i,
html[data-theme="light"] body.theme-enabled .btn-action i,
html[data-theme="light"] body.theme-enabled a[style*="background"] i {
    color: #ffffff !important;
}

/* === ZASADA 9: Dropdown menu === */

html[data-theme="light"] body.theme-enabled .dropdown-menu {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

html[data-theme="light"] body.theme-enabled .dropdown-item {
    color: #333333 !important;
}

html[data-theme="light"] body.theme-enabled .dropdown-item:hover {
    background: #f8f9fa !important;
    color: #0078d4 !important;
}

/* === ZASADA 10: Stopka - USUNIĘTO === */
/* Footer zachowuje swoje oryginalne inline style (ciemne tło #1a1a1a) */
/* Nie zmieniamy tła ani kolorów tekstu w footerze */

/* === ZASADA 11: Alerty i powiadomienia === */

html[data-theme="light"] body.theme-enabled .alert {
    border-width: 1px !important;
}

html[data-theme="light"] body.theme-enabled .alert-success {
    background: #d4edda !important;
    color: #155724 !important;
    border-color: #c3e6cb !important;
}

html[data-theme="light"] body.theme-enabled .alert-danger,
html[data-theme="light"] body.theme-enabled .alert-error {
    background: #f8d7da !important;
    color: #721c24 !important;
    border-color: #f5c6cb !important;
}

html[data-theme="light"] body.theme-enabled .alert-warning {
    background: #fff3cd !important;
    color: #856404 !important;
    border-color: #ffeeba !important;
}

html[data-theme="light"] body.theme-enabled .alert-info {
    background: #d1ecf1 !important;
    color: #0c5460 !important;
    border-color: #bee5eb !important;
}

/* === ZASADA 12: Odznaki (badges) === */

html[data-theme="light"] body.theme-enabled .badge {
    color: #ffffff !important;
}

html[data-theme="light"] body.theme-enabled .badge-light,
html[data-theme="light"] body.theme-enabled .badge.bg-light {
    color: #333333 !important;
    background: #f8f9fa !important;
}

/* === ZASADA 13: Tła głównej treści === */

html[data-theme="light"] body.theme-enabled main,
html[data-theme="light"] body.theme-enabled .main-content,
html[data-theme="light"] body.theme-enabled .content-wrapper,
html[data-theme="light"] body.theme-enabled .container-fluid {
    background: transparent !important;
}

/* === ZASADA 14: Profile page specifics === */

html[data-theme="light"] body.theme-enabled .profile-section,
html[data-theme="light"] body.theme-enabled .profile-card,
html[data-theme="light"] body.theme-enabled .profile-header,
html[data-theme="light"] body.theme-enabled .settings-section {
    background: #ffffff !important;
    color: #333333 !important;
}

html[data-theme="light"] body.theme-enabled .profile-name,
html[data-theme="light"] body.theme-enabled .profile-title {
    color: #1a1a1a !important;
}

html[data-theme="light"] body.theme-enabled .profile-email,
html[data-theme="light"] body.theme-enabled .profile-meta {
    color: #666666 !important;
}

/* === ZASADA 15: Integracje === */

html[data-theme="light"] body.theme-enabled .integration-card .integration-name {
    color: #1a1a1a !important;
}

html[data-theme="light"] body.theme-enabled .integration-card .integration-description,
html[data-theme="light"] body.theme-enabled .integration-card .section-description {
    color: #555555 !important;
}

html[data-theme="light"] body.theme-enabled .integration-card .stat-label {
    color: #666666 !important;
}

html[data-theme="light"] body.theme-enabled .integration-card .stat-value {
    color: #1a1a1a !important;
}

/* Status badges w integracjach */
html[data-theme="light"] body.theme-enabled .status-connected {
    color: #107c10 !important;
}

html[data-theme="light"] body.theme-enabled .status-disconnected {
    color: #d13438 !important;
}

html[data-theme="light"] body.theme-enabled .status-warning {
    color: #d97706 !important;
}

/* === ZASADA 16: Selektor języka === */

/* DARK THEME - język */
html[data-theme="dark"] body.theme-enabled .mtb-lang-name {
    color: rgba(255, 255, 255, 0.9) !important;
}

html[data-theme="dark"] body.theme-enabled .mtb-lang-dropdown {
    background: #1a1a2e !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

html[data-theme="dark"] body.theme-enabled .mtb-lang-option {
    color: rgba(255, 255, 255, 0.9) !important;
}

html[data-theme="dark"] body.theme-enabled .mtb-lang-option:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] body.theme-enabled .mtb-lang-option-name {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* LIGHT THEME - język (potwierdzenie ciemnego tekstu) */
html[data-theme="light"] body.theme-enabled .mtb-lang-name {
    color: #333333 !important;
}

html[data-theme="light"] body.theme-enabled .mtb-lang-dropdown {
    background: #ffffff !important;
    border-color: rgba(0, 120, 212, 0.2) !important;
}

html[data-theme="light"] body.theme-enabled .mtb-lang-option {
    color: #333333 !important;
}

html[data-theme="light"] body.theme-enabled .mtb-lang-option:hover {
    background: rgba(0, 120, 212, 0.1) !important;
    color: #0078d4 !important;
}

html[data-theme="light"] body.theme-enabled .mtb-lang-option-name {
    color: #333333 !important;
}

/* === ZASADA 17: Sekcje Hero - ciemne tło = biały tekst === */
/*
   Te sekcje mają ZAWSZE ciemne tło (zdjęcie + overlay lub gradient).
   Tekst MUSI pozostać biały niezależnie od wybranego motywu.
   Nadpisuje Zasadę 1 dla tych konkretnych sekcji.
*/

/* Wszystkie klasy hero - zachowaj białe tło */
html[data-theme="light"] body.theme-enabled .mtb-hero,
html[data-theme="light"] body.theme-enabled .mtb-hero *,
html[data-theme="light"] body.theme-enabled .hero-section,
html[data-theme="light"] body.theme-enabled .hero-section *,
html[data-theme="light"] body.theme-enabled .hero-container,
html[data-theme="light"] body.theme-enabled .hero-container *,
html[data-theme="light"] body.theme-enabled .dashboard-hero,
html[data-theme="light"] body.theme-enabled .dashboard-hero *,
html[data-theme="light"] body.theme-enabled .profile-hero,
html[data-theme="light"] body.theme-enabled .profile-hero *,
html[data-theme="light"] body.theme-enabled .results-hero,
html[data-theme="light"] body.theme-enabled .results-hero *,
html[data-theme="light"] body.theme-enabled .ai-hero,
html[data-theme="light"] body.theme-enabled .ai-hero *,
html[data-theme="light"] body.theme-enabled .mtb-search-hero,
html[data-theme="light"] body.theme-enabled .mtb-search-hero *,
html[data-theme="light"] body.theme-enabled [class*="hero-title"],
html[data-theme="light"] body.theme-enabled [class*="hero-subtitle"],
html[data-theme="light"] body.theme-enabled [class*="hero-description"],
html[data-theme="light"] body.theme-enabled [class*="hero-content"] {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Hero - linki pozostają jasne */
html[data-theme="light"] body.theme-enabled .mtb-hero a,
html[data-theme="light"] body.theme-enabled .hero-section a,
html[data-theme="light"] body.theme-enabled .hero-container a,
html[data-theme="light"] body.theme-enabled .dashboard-hero a,
html[data-theme="light"] body.theme-enabled .profile-hero a {
    color: rgba(255, 255, 255, 0.9) !important;
}

html[data-theme="light"] body.theme-enabled .mtb-hero a:hover,
html[data-theme="light"] body.theme-enabled .hero-section a:hover,
html[data-theme="light"] body.theme-enabled .hero-container a:hover {
    color: #ffffff !important;
}

/* Hero breadcrumb - jasny tekst */
html[data-theme="light"] body.theme-enabled .mtb-breadcrumb,
html[data-theme="light"] body.theme-enabled .mtb-breadcrumb * {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Hero badges - zachowaj oryginalne kolory */
html[data-theme="light"] body.theme-enabled .mtb-badge,
html[data-theme="light"] body.theme-enabled .mtb-badge-primary,
html[data-theme="light"] body.theme-enabled .mtb-badge-category,
html[data-theme="light"] body.theme-enabled .mtb-strava-badge {
    color: #ffffff !important;
}

/* Hero stat ikony - biały tekst na kolorowym tle */
html[data-theme="light"] body.theme-enabled .mtb-hero-stat,
html[data-theme="light"] body.theme-enabled .mtb-hero-stats * {
    color: #ffffff !important;
}

/* === ZASADA 18: Results Hub - ciemne tło głównego kontenera === */
html[data-theme="light"] body.theme-enabled .results-hub-container {
    color: #ffffff !important;
}

html[data-theme="light"] body.theme-enabled .results-hub-container .nav-tab {
    color: rgba(255, 255, 255, 0.7) !important;
}

html[data-theme="light"] body.theme-enabled .results-hub-container .nav-tab.active {
    color: #ffffff !important;
}

html[data-theme="light"] body.theme-enabled .results-hub-container .nav-tab:hover {
    color: #ffffff !important;
}

/* Results Hub - karty wydarzeń (JavaScript generated) */
html[data-theme="light"] body.theme-enabled .results-hub-container .event-card h3,
html[data-theme="light"] body.theme-enabled .results-hub-container .event-card span {
    color: #ffffff !important;
}

/* === ZASADA 19: Regional Stats - ciemne hero === */
html[data-theme="light"] body.theme-enabled .regional-stats-hero,
html[data-theme="light"] body.theme-enabled .regional-stats-hero * {
    color: #ffffff !important;
}

/* === ZASADA 20: Activity Detail - ciemne hero === */
html[data-theme="light"] body.theme-enabled .activity-hero,
html[data-theme="light"] body.theme-enabled .activity-hero *,
html[data-theme="light"] body.theme-enabled .activity-header,
html[data-theme="light"] body.theme-enabled .activity-header * {
    color: #ffffff !important;
}

/* === ZASADA 21: AI Hub - ciemne tło === */
html[data-theme="light"] body.theme-enabled .ai-hub-container {
    color: #ffffff !important;
}

html[data-theme="light"] body.theme-enabled .ai-hub-container .nav-tab {
    color: rgba(255, 255, 255, 0.7) !important;
}

html[data-theme="light"] body.theme-enabled .ai-hub-container .nav-tab.active,
html[data-theme="light"] body.theme-enabled .ai-hub-container .nav-tab:hover {
    color: #ffffff !important;
}

/* === ZASADA 22: Dashboard - ciemne hero === */
html[data-theme="light"] body.theme-enabled .dashboard-container .hero-container,
html[data-theme="light"] body.theme-enabled .dashboard-container .hero-container * {
    color: #ffffff !important;
}

/* === ZASADA 23: Ikony na kolorowych tłach === */
/* Ikony w okrągłych kolorowych kontenerach - zawsze białe */
html[data-theme="light"] body.theme-enabled .mtb-stat-icon,
html[data-theme="light"] body.theme-enabled .mtb-section-icon,
html[data-theme="light"] body.theme-enabled [class*="-icon"][style*="background"],
html[data-theme="light"] body.theme-enabled .icon-circle {
    color: #ffffff !important;
}

/* === ZASADA 24: Sekcje treści - jasne tło = ciemny tekst === */
/* Te sekcje mają jasne tła i MUSZĄ mieć ciemny tekst */
html[data-theme="light"] body.theme-enabled .mtb-section,
html[data-theme="light"] body.theme-enabled .mtb-section *:not(.mtb-stat-icon):not(.mtb-section-icon):not([class*="btn"]):not([style*="background"]),
html[data-theme="light"] body.theme-enabled .content-section,
html[data-theme="light"] body.theme-enabled .content-section * {
    color: #333333;
}

html[data-theme="light"] body.theme-enabled .mtb-section-title {
    color: #1a1a1a !important;
}

html[data-theme="light"] body.theme-enabled .mtb-stat-label {
    color: #666666 !important;
}

html[data-theme="light"] body.theme-enabled .mtb-stat-number {
    color: #0078d4 !important;
}

/* === ZASADA 25: Sekcje z ciemnym tłem na stronie głównej === */
/*
   Te sekcje mają ZAWSZE ciemne tło (gradient lub zdjęcie).
   Tekst MUSI pozostać biały niezależnie od wybranego motywu.
*/

/* .mtb-stats - sekcja statystyk (ciemne tło #1a1a1a) */
html[data-theme="light"] body.theme-enabled .mtb-stats,
html[data-theme="light"] body.theme-enabled .mtb-stats *,
html[data-theme="light"] body.theme-enabled .mtb-stats-grid,
html[data-theme="light"] body.theme-enabled .mtb-stats-grid * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

html[data-theme="light"] body.theme-enabled .mtb-stats .mtb-section-title,
html[data-theme="light"] body.theme-enabled .mtb-stats .mtb-section-subtitle {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

html[data-theme="light"] body.theme-enabled .mtb-stat-card {
    color: #ffffff !important;
}

html[data-theme="light"] body.theme-enabled .mtb-stats .mtb-stat-number {
    color: #0078d4 !important;
    -webkit-text-fill-color: #0078d4 !important;
}

html[data-theme="light"] body.theme-enabled .mtb-stats .mtb-stat-label {
    color: rgba(255, 255, 255, 0.9) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.9) !important;
}

/* === ZASADA 26: Sekcja CTA (ciemne tło z obrazem) === */
html[data-theme="light"] body.theme-enabled .mtb-cta,
html[data-theme="light"] body.theme-enabled .mtb-cta * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

html[data-theme="light"] body.theme-enabled .mtb-cta-title {
    color: #ffffff !important;
    /* Preserve gradient text effect */
    background: linear-gradient(45deg, #ffffff, #e3f2fd, #ffffff) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

html[data-theme="light"] body.theme-enabled .mtb-cta-subtitle {
    color: rgba(255, 255, 255, 0.95) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.95) !important;
}

html[data-theme="light"] body.theme-enabled .mtb-cta-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

html[data-theme="light"] body.theme-enabled .mtb-cta-link:hover {
    color: #ffffff !important;
}

/* .mtb-search-hero wewnątrz CTA - zachowaj jasne tło inputa */
html[data-theme="light"] body.theme-enabled .mtb-cta .mtb-search-hero input {
    color: #333333 !important;
    -webkit-text-fill-color: #333333 !important;
    background: rgba(255, 255, 255, 0.95) !important;
}

html[data-theme="light"] body.theme-enabled .mtb-cta .mtb-search-hero input::placeholder {
    color: #666666 !important;
}

/* === ZASADA 27: Sekcja Features (jasne tło) === */
/* Ta sekcja ma jasne tło - tekst MUSI być ciemny */
html[data-theme="light"] body.theme-enabled .mtb-features .mtb-section-title {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

html[data-theme="light"] body.theme-enabled .mtb-features .mtb-section-subtitle {
    color: #555555 !important;
    -webkit-text-fill-color: #555555 !important;
}

html[data-theme="light"] body.theme-enabled .mtb-feature-card {
    background: #ffffff !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

html[data-theme="light"] body.theme-enabled .mtb-feature-title {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

html[data-theme="light"] body.theme-enabled .mtb-feature-description {
    color: #555555 !important;
    -webkit-text-fill-color: #555555 !important;
}

html[data-theme="light"] body.theme-enabled .mtb-feature-icon {
    /* Ikony pozostają białe na kolorowym tle */
    color: #ffffff !important;
}

/* ============================================
   FINAL OVERRIDE - SEKCJE Z CIEMNYM TŁEM
   Te reguły MUSZĄ być na końcu pliku!
   Nadpisują WSZYSTKO co było wcześniej.
   ============================================ */

/* Footer - CIEMNE tło, BIAŁY tekst */
html[data-theme="light"] body.theme-enabled footer[style*="background"] {
    color: #ffffff !important;
}
html[data-theme="light"] body.theme-enabled footer[style*="background"] * {
    color: inherit !important;
}
html[data-theme="light"] body.theme-enabled footer[style*="background"] p,
html[data-theme="light"] body.theme-enabled footer[style*="background"] span,
html[data-theme="light"] body.theme-enabled footer[style*="background"] div {
    color: #b0b0b0 !important;
}
html[data-theme="light"] body.theme-enabled footer[style*="background"] h5 {
    color: var(--fluent-primary) !important;
}
html[data-theme="light"] body.theme-enabled footer[style*="background"] a {
    color: #b0b0b0 !important;
}

/* .mtb-stats - CIEMNE tło (#1a1a1a), BIAŁY tekst */
html[data-theme="light"] body.theme-enabled section.mtb-stats {
    color: #ffffff !important;
}
html[data-theme="light"] body.theme-enabled section.mtb-stats * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}
html[data-theme="light"] body.theme-enabled section.mtb-stats .mtb-stat-number {
    color: #0078d4 !important;
    -webkit-text-fill-color: #0078d4 !important;
}
html[data-theme="light"] body.theme-enabled section.mtb-stats .mtb-section-subtitle {
    color: rgba(255, 255, 255, 0.8) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.8) !important;
}

/* .mtb-cta - CIEMNE tło (gradient+obraz), BIAŁY tekst */
html[data-theme="light"] body.theme-enabled section.mtb-cta {
    color: #ffffff !important;
}
html[data-theme="light"] body.theme-enabled section.mtb-cta * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}
html[data-theme="light"] body.theme-enabled section.mtb-cta .mtb-cta-subtitle {
    color: rgba(255, 255, 255, 0.95) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.95) !important;
}
html[data-theme="light"] body.theme-enabled section.mtb-cta input {
    color: #333333 !important;
    -webkit-text-fill-color: #333333 !important;
}

/* Cookie banner - CIEMNE tło, BIAŁY tekst */
html[data-theme="light"] body.theme-enabled #cookie-banner {
    color: #ffffff !important;
}
html[data-theme="light"] body.theme-enabled #cookie-banner * {
    color: #ffffff !important;
}

/* .mtb-faq - JASNE tło, CIEMNY tekst */
html[data-theme="light"] body.theme-enabled section.mtb-faq {
    color: #333333 !important;
}
html[data-theme="light"] body.theme-enabled section.mtb-faq h2 {
    color: #0078d4 !important;
}
html[data-theme="light"] body.theme-enabled section.mtb-faq h3 {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}
html[data-theme="light"] body.theme-enabled section.mtb-faq p {
    color: #555555 !important;
    -webkit-text-fill-color: #555555 !important;
}
html[data-theme="light"] body.theme-enabled section.mtb-faq a {
    color: #0078d4 !important;
}
html[data-theme="light"] body.theme-enabled section.mtb-faq strong {
    color: #1a1a1a !important;
}
