/* Lactasoft — dark theme (all screen sizes; toggled via html.ls-theme-dark) */

html.ls-theme-dark {
  color-scheme: dark;
  --ls-bg: #0b0f14;
  --ls-surface: #151b24;
  --ls-text: #e8edf4;
  --ls-text-muted: #94a3b8;
  --ls-border: rgba(255, 255, 255, 0.1);
  --ls-border-strong: rgba(255, 255, 255, 0.16);
  --ls-accent-soft: rgba(0, 167, 156, 0.28);
  --ls-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --ls-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --ls-shadow-hover: 0 8px 28px rgba(0, 0, 0, 0.45);
}

html.ls-theme-dark,
html.ls-theme-dark .ls-body,
html.ls-theme-dark .ls-main {
  background-color: var(--ls-bg) !important;
  color: var(--ls-text);
}

/* Kaarten & containers */
html.ls-theme-dark .ls-card,
html.ls-theme-dark .ls-kpi-card,
html.ls-theme-dark .ls-auth-card,
html.ls-theme-dark .ls-table-card,
html.ls-theme-dark .ls-modal-panel,
html.ls-theme-dark .ls-trend-chart-card,
html.ls-theme-dark .ls-chart-grid .ls-card--chart {
  background: var(--ls-surface) !important;
  border-color: var(--ls-border) !important;
  color: var(--ls-text);
}

html.ls-theme-dark .ls-table-toolbar,
html.ls-theme-dark .ls-section-card-head,
html.ls-theme-dark .ls-auth-head,
html.ls-theme-dark .ls-form-head,
html.ls-theme-dark .ls-table tfoot td,
html.ls-theme-dark .ls-dt-footer {
  background: #121820 !important;
  border-color: var(--ls-border) !important;
  color: var(--ls-text);
}

html.ls-theme-dark .ls-footer {
  background: var(--ls-surface);
  border-color: var(--ls-border);
}

/* Typografie */
html.ls-theme-dark .ls-page-title,
html.ls-theme-dark .ls-page-sub,
html.ls-theme-dark .ls-card-title,
html.ls-theme-dark .ls-section-title,
html.ls-theme-dark .ls-section-card-title,
html.ls-theme-dark .ls-athlete-name,
html.ls-theme-dark .ls-list-name,
html.ls-theme-dark .ls-modal-title,
html.ls-theme-dark h1,
html.ls-theme-dark h2,
html.ls-theme-dark h3 {
  color: var(--ls-text);
}

html.ls-theme-dark .ls-text-muted,
html.ls-theme-dark .ls-search-label,
html.ls-theme-dark .ls-section-card-sub,
html.ls-theme-dark .ls-empty-state,
html.ls-theme-dark .ls-trend-loading,
html.ls-theme-dark .ls-run-help,
html.ls-theme-dark .ls-list-date,
html.ls-theme-dark .ls-dataTables_info,
html.ls-theme-dark .dataTables_info,
html.ls-theme-dark .dataTables_length {
  color: var(--ls-text-muted) !important;
}

html.ls-theme-dark .ls-back-link {
  color: var(--ls-text-muted);
}

html.ls-theme-dark .ls-back-link:hover {
  color: var(--ls-text);
}

/* Knoppen */
html.ls-theme-dark .ls-btn-secondary {
  background: #1e2633 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #e8edf4 !important;
}

html.ls-theme-dark .ls-btn-secondary:hover {
  background: #252f3f !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

html.ls-theme-dark .ls-run-preset-btn {
  background: #1e2633 !important;
  border-color: var(--ls-border) !important;
  color: var(--ls-text) !important;
}

html.ls-theme-dark .ls-run-preset-btn.is-active {
  background: rgba(82, 208, 48, 0.18) !important;
  border-color: rgba(82, 208, 48, 0.35) !important;
  color: #b5eb9a !important;
}

html.ls-theme-dark .ls-looptest-grid > div:first-child .ls-run-preset-btn.is-active,
html.ls-theme-dark .ls-bike-grid > div:first-child .ls-run-preset-btn.is-active {
  background: rgba(0, 167, 156, 0.18) !important;
  border-color: rgba(0, 167, 156, 0.35) !important;
  color: #6ed9d2 !important;
}

html.ls-theme-dark .ls-action-btn,
html.ls-theme-dark .ls-icon-btn {
  background: #1e2633 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
}

html.ls-theme-dark .ls-action-btn:hover,
html.ls-theme-dark .ls-icon-btn:hover {
  background: #252f3f !important;
  color: #f1f5f9 !important;
}

html.ls-theme-dark .ls-action-btn.is-primary {
  background: rgba(0, 167, 156, 0.25) !important;
  border-color: rgba(110, 231, 183, 0.35) !important;
  color: #6ee7b7 !important;
}

html.ls-theme-dark .ls-action-btn.is-edit {
  background: rgba(37, 99, 235, 0.18) !important;
  border-color: rgba(147, 197, 253, 0.35) !important;
  color: #93c5fd !important;
}

html.ls-theme-dark .ls-action-btn.is-danger,
html.ls-theme-dark .ls-icon-btn.is-danger {
  background: rgba(185, 28, 28, 0.2) !important;
  border-color: rgba(252, 165, 165, 0.35) !important;
  color: #fca5a5 !important;
}

html.ls-theme-dark .ls-action-btn.is-move {
  background: rgba(194, 65, 12, 0.2) !important;
  border-color: rgba(251, 146, 60, 0.35) !important;
  color: #fdba74 !important;
}

html.ls-theme-dark .ls-modal-close {
  background: #1e2633 !important;
  color: #94a3b8 !important;
}

html.ls-theme-dark .ls-modal-close:hover {
  background: #252f3f !important;
  color: #e8edf4 !important;
}

html.ls-theme-dark .ls-modal-backdrop {
  background: rgba(0, 0, 0, 0.65) !important;
}

/* Formulieren */
html.ls-theme-dark .ls-form-input,
html.ls-theme-dark .ls-form-select,
html.ls-theme-dark .ls-form-textarea,
html.ls-theme-dark .ls-search-input,
html.ls-theme-dark .ls-trend-select,
html.ls-theme-dark input[type="text"],
html.ls-theme-dark input[type="search"],
html.ls-theme-dark input[type="email"],
html.ls-theme-dark input[type="password"],
html.ls-theme-dark input[type="number"],
html.ls-theme-dark input[type="date"],
html.ls-theme-dark input[type="time"],
html.ls-theme-dark select,
html.ls-theme-dark textarea {
  background-color: #1a2230 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #e8edf4 !important;
  box-shadow: none;
}

html.ls-theme-dark .ls-form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.65rem center !important;
  background-size: 0.8rem !important;
}

html.ls-theme-dark .ls-search-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3 3'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: 12px center !important;
}

html.ls-theme-dark .ls-form-input:focus,
html.ls-theme-dark .ls-form-select:focus,
html.ls-theme-dark .ls-form-textarea:focus,
html.ls-theme-dark .ls-search-input:focus,
html.ls-theme-dark .ls-trend-select:focus {
  border-color: #00a79c !important;
  box-shadow: 0 0 0 3px rgba(0, 167, 156, 0.35) !important;
}

html.ls-theme-dark .ls-form-actions {
  border-color: var(--ls-border);
}

/* Looptest / testblokken */
html.ls-theme-dark .ls-run-block {
  background: #121820 !important;
  border-color: var(--ls-border) !important;
}

html.ls-theme-dark .ls-bike-step,
html.ls-theme-dark .ls-bike-step-card {
  background: var(--ls-surface) !important;
  border-color: var(--ls-border) !important;
}

/* Tabellen (ls-table + DataTables) */
html.ls-theme-dark table.ls-table {
  border-color: var(--ls-border) !important;
  color: var(--ls-text);
}

html.ls-theme-dark table.ls-table th {
  background: #121820 !important;
  color: #94a3b8 !important;
  border-color: var(--ls-border) !important;
}

html.ls-theme-dark table.ls-table td {
  border-color: rgba(255, 255, 255, 0.06) !important;
  background: var(--ls-surface) !important;
  color: var(--ls-text) !important;
}

html.ls-theme-dark table.ls-table tbody tr:hover td {
  background: #1a2230 !important;
}

html.ls-theme-dark table.ls-table tbody tr.ls-row-selected td {
  background: rgba(0, 167, 156, 0.18) !important;
  color: #d1fae5 !important;
}

html.ls-theme-dark table.dataTable thead th {
  background: #121820 !important;
  color: #94a3b8 !important;
  border-bottom-color: var(--ls-border) !important;
}

html.ls-theme-dark table.dataTable tbody td {
  background: var(--ls-surface) !important;
  color: var(--ls-text) !important;
  border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

html.ls-theme-dark table.dataTable tbody tr:hover td {
  background: #1a2230 !important;
}

html.ls-theme-dark table.dataTable.stripe tbody tr.odd td {
  background: #121820 !important;
}

html.ls-theme-dark table.dataTable.stripe tbody tr.even td {
  background: var(--ls-surface) !important;
}

html.ls-theme-dark .dataTables_length select {
  background: #1a2230 !important;
  color: #e8edf4 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

html.ls-theme-dark .dataTables_paginate .paginate_button {
  background: #1e2633 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
}

html.ls-theme-dark .dataTables_paginate .paginate_button.current {
  background: #00a79c !important;
  border-color: #00a79c !important;
  color: #fff !important;
}

html.ls-theme-dark .dataTables_paginate .paginate_button.disabled {
  opacity: 0.4;
}

/* Mobiele kaarttabellen */
html.ls-theme-dark .ls-mob-responsive-table tbody tr.ls-mob-table-card {
  background: #151b24 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html.ls-theme-dark .ls-mob-responsive-table.ls-mob-table-striping tbody tr.ls-mob-table-card.odd {
  background: #121820 !important;
}

html.ls-theme-dark .ls-mob-responsive-table.ls-mob-table-striping tbody tr.ls-mob-table-card.even {
  background: #151b24 !important;
}

html.ls-theme-dark .ls-mob-responsive-table.ls-mob-table-striping tbody tr.ls-mob-table-card:hover,
html.ls-theme-dark .ls-mob-responsive-table tbody tr.ls-mob-table-card:hover {
  background: #1a2230 !important;
}

html.ls-theme-dark .ls-mob-responsive-table.ls-mob-table-striping tbody tr.ls-mob-table-card td,
html.ls-theme-dark .ls-mob-responsive-table tbody tr.ls-mob-table-card td.ls-mob-detail-cell {
  border-color: rgba(255, 255, 255, 0.06) !important;
}

html.ls-theme-dark .ls-mob-responsive-table tbody tr.ls-mob-table-card td.ls-mob-detail-cell::before {
  color: #94a3b8;
}

html.ls-theme-dark .ls-mob-expand-btn {
  color: #6ee7b7;
  background: rgba(0, 167, 156, 0.2);
  border-color: rgba(110, 231, 183, 0.35);
}

html.ls-theme-dark .ls-mob-responsive-table .ls-evolutie-row.is-focus {
  border-color: rgba(110, 231, 183, 0.45) !important;
  background: rgba(0, 167, 156, 0.15) !important;
}

/* Navigatie */
html.ls-theme-dark .ls-mobile-panel {
  background: #151b24 !important;
}

html.ls-theme-dark .ls-mobile-backdrop {
  background: rgba(0, 0, 0, 0.55) !important;
}

html.ls-theme-dark .ls-mobile-nav-link {
  color: #cbd5e1;
}

html.ls-theme-dark .ls-mobile-nav-link.is-active {
  background: rgba(0, 167, 156, 0.25);
  color: #6ee7b7;
}

/* Sport-tabs & filters */
html.ls-theme-dark .ls-sport-tabs,
html.ls-theme-dark .ls-evolutie-discipline-nav,
html.ls-theme-dark .ls-tests-filters .ls-trend-filter-group:first-child .ls-trend-segment,
html.ls-theme-dark .ls-testen-sport-tabs,
html.ls-theme-dark .ls-mob-theme-segment,
html.ls-theme-dark .ls-trend-segment {
  background: #1a2230 !important;
  border-color: var(--ls-border) !important;
}

html.ls-theme-dark .ls-sport-tab,
html.ls-theme-dark .ls-evolutie-discipline-nav .ls-evolutie-disc-btn,
html.ls-theme-dark .ls-evolutie-disc-btn:not(.is-active),
html.ls-theme-dark .ls-tests-filters .ls-trend-segment-btn,
html.ls-theme-dark .ls-testen-sport-tab,
html.ls-theme-dark .ls-mob-theme-option,
html.ls-theme-dark .ls-trend-segment-btn:not(.is-active) {
  color: #94a3b8;
  background: transparent;
}

html.ls-theme-dark .ls-sport-tab.is-active,
html.ls-theme-dark .ls-evolutie-discipline-nav .ls-evolutie-disc-btn.is-active,
html.ls-theme-dark .ls-tests-filters .ls-trend-segment-btn.is-active,
html.ls-theme-dark .ls-testen-sport-tab.is-active,
html.ls-theme-dark .ls-mob-theme-option.is-active {
  background: #252f3f !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  color: #e8edf4;
}

html.ls-theme-dark .ls-trend-filters {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: var(--ls-border) !important;
}

html.ls-theme-dark .ls-trend-chip {
  background: #1a2230 !important;
  border-color: var(--ls-border) !important;
  color: var(--ls-text);
}

html.ls-theme-dark .ls-trend-chip:has(input:checked) {
  background: var(--ls-accent-soft) !important;
  border-color: rgba(110, 231, 183, 0.35) !important;
  color: #6ee7b7 !important;
}

html.ls-theme-dark .ls-trend-summary {
  background: var(--ls-accent-soft) !important;
  border-color: rgba(110, 231, 183, 0.2) !important;
}

html.ls-theme-dark .ls-trend-summary-label {
  color: #6ee7b7 !important;
}

html.ls-theme-dark .ls-trend-summary-value {
  color: #e0f7f6 !important;
}

/* Links, pills, badges */
html.ls-theme-dark .ls-test-link--run {
  background: rgba(82, 208, 48, 0.22) !important;
  color: #b5eb9a !important;
}

html.ls-theme-dark .ls-test-link--bike {
  background: rgba(194, 65, 12, 0.2) !important;
  color: #fdba74 !important;
}

html.ls-theme-dark .ls-test-link--swim {
  background: rgba(3, 105, 161, 0.22) !important;
  color: #7dd3fc !important;
}

html.ls-theme-dark .ls-btn-open--run {
  background: rgba(82, 208, 48, 0.22) !important;
  color: #b5eb9a !important;
}

html.ls-theme-dark .ls-btn-open--bike {
  background: rgba(194, 65, 12, 0.2) !important;
  color: #fdba74 !important;
}

html.ls-theme-dark .ls-btn-open--swim {
  background: rgba(3, 105, 161, 0.22) !important;
  color: #7dd3fc !important;
}

html.ls-theme-dark .ls-pill--male {
  background: #1e2633 !important;
  color: #cbd5e1 !important;
  border-color: var(--ls-border) !important;
}

html.ls-theme-dark .ls-pill--female {
  background: rgba(159, 18, 57, 0.2) !important;
  color: #fda4af !important;
  border-color: rgba(253, 164, 175, 0.3) !important;
}

html.ls-theme-dark .ls-pill--goal {
  background: rgba(0, 167, 156, 0.22) !important;
  color: #6ee7b7 !important;
  border-color: rgba(110, 231, 183, 0.3) !important;
}

html.ls-theme-dark .ls-pill-link {
  background: rgba(0, 167, 156, 0.22) !important;
  color: #6ee7b7 !important;
  border-color: rgba(110, 231, 183, 0.3) !important;
}

html.ls-theme-dark .ls-pill-link:hover,
html.ls-theme-dark .ls-pill-link:focus-visible {
  background: rgba(0, 167, 156, 0.35) !important;
  color: #a7f3d0 !important;
}

html.ls-theme-dark .ls-pill--bike {
  background: rgba(194, 65, 12, 0.2) !important;
  color: #fdba74 !important;
  border-color: rgba(251, 146, 60, 0.3) !important;
}

html.ls-theme-dark .ls-pill--swim {
  background: rgba(3, 105, 161, 0.22) !important;
  color: #7dd3fc !important;
  border-color: rgba(125, 211, 252, 0.3) !important;
}

html.ls-theme-dark .ls-list-row:hover {
  background: rgba(255, 255, 255, 0.03) !important;
}

html.ls-theme-dark .ls-list-divider > * + * {
  border-color: var(--ls-border) !important;
}

/* Evolutie / VLamax pagina's */
html.ls-theme-dark .ls-vla-row--linked {
  background: #1a2230 !important;
}

html.ls-theme-dark .ls-vla-protocol-panel,
html.ls-theme-dark .ls-evolutie-protocol-body {
  background: var(--ls-surface) !important;
  border-color: var(--ls-border) !important;
  color: var(--ls-text);
}

html.ls-theme-dark .ls-vla-protocol-toggle:hover {
  color: var(--ls-text);
  border-color: rgba(255, 255, 255, 0.2);
}

/* «Meer»-menu & PWA */
html.ls-theme-dark .ls-mob-actions-panel {
  background: #151b24 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

html.ls-theme-dark .ls-mob-actions-panel-item {
  color: #e8edf4;
}

html.ls-theme-dark .ls-mob-actions-panel-item:active {
  background: #1e2633;
}

html.ls-theme-dark .ls-mob-charts-toggle,
html.ls-theme-dark .ls-mob-trend-table-toggle {
  color: #6ee7b7;
  background: rgba(0, 167, 156, 0.18);
  border-color: rgba(110, 231, 183, 0.3);
}

html.ls-theme-dark .ls-pwa-install-inner {
  background: #151b24 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

html.ls-theme-dark .ls-pwa-install-text {
  color: #cbd5e1;
}

html.ls-theme-dark .ls-pwa-install-text strong {
  color: #f1f5f9;
}

html.ls-theme-dark .ls-pwa-ios-share {
  background: #1e2633;
}

html.ls-theme-dark .ls-mob-theme-option.is-active {
  color: #e8edf4 !important;
}

/* Login */
html.ls-theme-dark .ls-auth-error {
  background: rgba(159, 18, 57, 0.2) !important;
  border-color: rgba(252, 165, 165, 0.35) !important;
  color: #fda4af !important;
}

/* Grafieken */
html.ls-theme-dark .ls-chart-box,
html.ls-theme-dark .ls-chart-box--trend,
html.ls-theme-dark .ls-chart-box--trend-sm {
  background: var(--ls-surface);
  border-radius: 8px;
}

html.ls-theme-dark .ls-dt-length-slot .dataTables_length select {
  background-color: #1a2230 !important;
  color: #e8edf4 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

/* DataTables "Bezig…" tijdens zoeken — geen wit vlak / blauwe CDN-spinner */
html.ls-theme-dark .dataTables_wrapper .dataTables_processing {
  background: rgba(11, 15, 20, 0.78) !important;
  background-image: none !important;
  color: #94a3b8 !important;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

html.ls-theme-dark .dataTables_wrapper .dataTables_processing::before {
  content: "";
  display: inline-block;
  width: 1.125rem;
  height: 1.125rem;
  margin-right: 0.5rem;
  border: 2px solid rgba(148, 163, 184, 0.3);
  border-top-color: #64d935;
  border-radius: 50%;
  vertical-align: middle;
  animation: ls-dt-processing-spin 0.7s linear infinite;
}

@keyframes ls-dt-processing-spin {
  to { transform: rotate(360deg); }
}

html.ls-theme-dark .ls-metric-card,
html.ls-theme-dark .ls-metric-grid .ls-card {
  background: var(--ls-surface) !important;
  border-color: var(--ls-border) !important;
}

html.ls-theme-dark .ls-athlete-avatar-lg {
  background: #252f3f !important;
  color: #e8edf4 !important;
}

/* Chart.js — donkere assen na themawissel */
html.ls-theme-dark canvas {
  filter: none;
}

/* Desktop / algemene onderdelen */
html.ls-theme-dark .ls-kpi-label,
html.ls-theme-dark .ls-kpi-value,
html.ls-theme-dark .ls-result-heading,
html.ls-theme-dark .ls-metric-label,
html.ls-theme-dark .ls-metric-unit,
html.ls-theme-dark .ls-caption,
html.ls-theme-dark .ls-form-label,
html.ls-theme-dark .ls-page-eyebrow {
  color: inherit;
}

html.ls-theme-dark .ls-kpi-value,
html.ls-theme-dark .ls-metric-value {
  color: var(--ls-text);
}

html.ls-theme-dark .ls-badge-phase {
  background: var(--ls-accent-soft) !important;
  color: #6ee7b7 !important;
}

html.ls-theme-dark table.ls-table tbody tr.ls-table-row--active td {
  background: rgba(0, 167, 156, 0.18) !important;
  color: #d1fae5 !important;
}

html.ls-theme-dark .ls-evolutie-disc-btn {
  background: #1a2230 !important;
  border-color: var(--ls-border) !important;
  color: #94a3b8 !important;
}

html.ls-theme-dark .ls-vla-protocol-toggle:hover {
  color: var(--ls-text) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

html.ls-theme-dark .ls-link {
  color: #6ee7b7;
}

html.ls-theme-dark .ls-link:hover {
  color: #9dd9d4;
}

html.ls-theme-dark .ls-mader-cap {
  color: #94a3b8;
}

html.ls-theme-dark .ls-mader-cap strong {
  color: #e8edf4;
}

html.ls-theme-dark .ls-mader-bar-labels {
  color: #64748b;
}

html.ls-theme-dark .ls-mader-qnote--ok {
  color: #3ecf8e;
}

html.ls-theme-dark .ls-mader-qnote--warn {
  color: #e0b341;
}

/* Atleet-dashboard — week-KPI's */
html.ls-theme-dark .ls-dash-kpi {
  background: #1e293b;
  border-color: #334155;
  color: var(--ls-text);
}

html.ls-theme-dark .ls-dash-kpi-value {
  color: #f1f5f9;
}

html.ls-theme-dark .ls-dash-kpi-label {
  color: var(--ls-text-muted);
}
