/* === Jasny motyw (domyślny na czytnikach Boox / e-ink) ===
   Włączany przez <html data-theme="light">. Wysoki kontrast, bez animacji i cieni. */
html[data-theme="light"] { color-scheme: light; }
html[data-theme="light"] *, html[data-theme="light"] *::before, html[data-theme="light"] *::after {
  transition: none !important; animation: none !important; box-shadow: none !important; text-shadow: none !important;
}
html[data-theme="light"] body { background: #fff; color: #000; }

/* Nagłówek / pasek narzędzi */
html[data-theme="light"] header { background: #f2f2f2; border-bottom: 2px solid #000; }
html[data-theme="light"] header h1, html[data-theme="light"] .btn-close { color: #000; }
html[data-theme="light"] .btn-close:hover { color: #555; }
html[data-theme="light"] #app-version { color: #555 !important; }
html[data-theme="light"] #page-info { color: #222; }
html[data-theme="light"] .toolbar-group { background: #fff; border: 1px solid #888; }

/* Przyciski */
html[data-theme="light"] .btn, html[data-theme="light"] .btn-sm {
  background: #fff; color: #000; border: 1px solid #000;
}
html[data-theme="light"] .btn:hover, html[data-theme="light"] .btn-sm:hover { background: #ddd; }
html[data-theme="light"] .btn:disabled { opacity: 1; color: #999; border-color: #aaa; }
html[data-theme="light"] .btn-secondary { background: #eee; border-color: #000; }
html[data-theme="light"] .btn-secondary:hover { background: #ddd; }
html[data-theme="light"] .btn-danger { background: #fff; border: 2px solid #000; }
html[data-theme="light"] .btn-danger:hover { background: #ddd; }
html[data-theme="light"] .btn-record { background: #000; color: #fff; }
html[data-theme="light"] .btn-record.recording { background: #fff; color: #000; border: 2px solid #000; }
/* Stan "włączony" ustawiany z JS przez style.background -> odwrócone kolory */
html[data-theme="light"] .btn[style*="background"], html[data-theme="light"] .btn-sm[style*="background"] {
  background: #000 !important; color: #fff !important;
}

/* Obszar PDF */
html[data-theme="light"] #pdf-container { background: #e6e6e6; }
html[data-theme="light"] #pdf-placeholder { color: #333; border-color: #555; }
html[data-theme="light"] #pdf-wrapper.dragover #pdf-placeholder { border-color: #000; background: #eee; }

/* Panel boczny i zakładki */
html[data-theme="light"] #sidebar { background: #fff; border-left: 2px solid #000; }
html[data-theme="light"] .tabs { background: #f2f2f2; border-bottom: 1px solid #000; }
html[data-theme="light"] .tab { color: #333; }
html[data-theme="light"] .tab:hover { color: #000; }
html[data-theme="light"] .tab.active { color: #000; border-bottom-color: #000; font-weight: bold; }

/* Wiersze, listy */
html[data-theme="light"] .voice-row, html[data-theme="light"] .staff-row,
html[data-theme="light"] .note-item, html[data-theme="light"] .volume-row {
  background: #f2f2f2; border: 1px solid #ccc; color: #000;
}
html[data-theme="light"] .staff-row:hover { background: #ddd; }
html[data-theme="light"] .staff-row.selected { background: #ddd; outline: 2px solid #000; }
html[data-theme="light"] .voice-row select { background: #fff; color: #000; border: 1px solid #000; }
html[data-theme="light"] .volume-row .vol-value { color: #222; }
html[data-theme="light"] .volume-row .vol-mute { border-color: #000; color: #000; }
html[data-theme="light"] .volume-row .vol-mute:hover { background: #ddd; }
html[data-theme="light"] .volume-row .vol-mute.muted { background: #000; color: #fff; }

/* Nagrywanie */
html[data-theme="light"] #recording-status { color: #222; }
html[data-theme="light"] .current-note { color: #000; }
html[data-theme="light"] .volume-bar { background: #ccc; border: 1px solid #000; }
html[data-theme="light"] #volume-fill, html[data-theme="light"] #progress-fill { background: #000; }
html[data-theme="light"] #progress-bar { background: #f2f2f2; border-top: 1px solid #000; }
html[data-theme="light"] #progress-text { color: #000; }

/* Pola formularzy */
html[data-theme="light"] input[type="text"], html[data-theme="light"] input[type="number"],
html[data-theme="light"] input[type="email"], html[data-theme="light"] input[type="password"],
html[data-theme="light"] select, html[data-theme="light"] #auth-modal input {
  background: #fff; color: #000; border: 1px solid #000;
}
html[data-theme="light"] input[type="range"],
html[data-theme="light"] input[type="checkbox"],
html[data-theme="light"] input[type="radio"],
html[data-theme="light"] .voice-row input[type="checkbox"],
html[data-theme="light"] .volume-row input[type="range"] { accent-color: #000; }

/* Edytor głosu (popup) */
html[data-theme="light"] .voice-editor { background: #fff; border: 2px solid #000; }
html[data-theme="light"] .voice-editor-item:hover { background: #ddd; }
html[data-theme="light"] .voice-editor-item.selected { background: #ddd; outline: 2px solid #000; }
html[data-theme="light"] .voice-editor-new { color: #333; }
html[data-theme="light"] .voice-editor-new:hover { color: #000; }

/* Style wpisane inline w index.html (modale, podpisy, ramki) */
html[data-theme="light"] [style*="background:#1a1a2e"],
html[data-theme="light"] [style*="background:#16213e"] { background: #fff !important; border-color: #000 !important; }
html[data-theme="light"] [style*="color:#e94560"] { color: #000 !important; }
html[data-theme="light"] [style*="color:#888"], html[data-theme="light"] [style*="color:#999"],
html[data-theme="light"] [style*="color:#aaa"], html[data-theme="light"] [style*="color:#666"] { color: #222 !important; }
html[data-theme="light"] [style*="color:#adf"] { color: #000 !important; }
html[data-theme="light"] [style*="border-top:1px solid #2a3a5a"] { border-top-color: #888 !important; }
html[data-theme="light"] [style*="background:#44cc44"] { background: #000 !important; }

/* Rozpoznawanie MusicXML: pasek, podokno, panel wyniku */
html[data-theme="light"] .btn-primary { background: #000 !important; border-color: #000 !important; color: #fff !important; }
html[data-theme="light"] .toolbar-tools { border-top-color: #888; }
html[data-theme="light"] .omr-pop { background: #fff; border: 2px solid #000; box-shadow: none; }
html[data-theme="light"] .omr-pop h3 { color: #000; }
html[data-theme="light"] .omr-panel { background: #fff; }
html[data-theme="light"] .omr-warn { background: #fff; border: 2px solid #000; color: #000; }
html[data-theme="light"] .omr-error { background: #fff; border: 2px dashed #000; color: #000; }
html[data-theme="light"] .omr-hint { color: #333; }
html[data-theme="light"] .omr-warnings { color: #000; }
html[data-theme="light"] .omr-actions a.btn { color: #000; }
html[data-theme="light"] .omr-tab { background: #fff; color: #000; border: 1px solid #000; }
html[data-theme="light"] .omr-tab.active { background: #000; color: #fff; }
html[data-theme="light"] .omr-scan-wrap, html[data-theme="light"] .omr-pdf-pages { background: #eee; border-color: #000; }
html[data-theme="light"] .omr-sel { background: #fff; border: 1px solid #000; }

/* Przełącznik motywu */
#btn-theme { margin-left: 8px; vertical-align: middle; }

@media (max-width: 820px) {
  html[data-theme="light"] .toolbar-tools { background: #fff; border: 2px solid #000; }
}

html[data-theme="light"] .omr-track { background: #ddd; border: 1px solid #000; }
html[data-theme="light"] .omr-fill { background: #000; }
html[data-theme="light"] #omr-stage-note { color: #000 !important; }
