/**
 * Modo oscuro — app embebida Shopify (alineado con Woo #tuko-admin-root[data-tuko-theme="dark"])
 * Activo con: html[data-tuko-theme="dark"]
 */

html[data-tuko-theme="dark"] body {
  background: #070f1a;
  color: #f1f5f9;
}

/* Scrollbars — mismo tono que Woo (admin.css tema oscuro) */
html[data-tuko-theme="dark"] {
  scrollbar-width: thin;
  scrollbar-color: #3d6a94 #070f1a;
}

html[data-tuko-theme="dark"] * {
  scrollbar-width: thin;
  scrollbar-color: #3d6a94 #0a1526;
}

html[data-tuko-theme="dark"] ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html[data-tuko-theme="dark"] ::-webkit-scrollbar-track {
  background: #070f1a;
  border-radius: 6px;
}

html[data-tuko-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #3d6a94;
  border-radius: 6px;
  border: 2px solid #070f1a;
}

html[data-tuko-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #4a8ab8;
}

/* Logo SVG negro → blanco en modo oscuro */
html[data-tuko-theme="dark"] .tuko-sidebar-logo-img {
  filter: brightness(0) invert(1);
}

html[data-tuko-theme="dark"] .tuko-sidebar {
  background-color: #0e1f33;
  border-right-color: #2a4a6e;
}

html[data-tuko-theme="dark"] .tuko-sidebar-logo h2,
html[data-tuko-theme="dark"] #tuko-logo-fallback {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] .tuko-sidebar-logo p {
  color: #cbd5e1 !important;
}

html[data-tuko-theme="dark"] .tuko-sidebar-group-header p {
  color: #cbd5e1 !important;
  border-bottom-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] .tuko-sidebar-button {
  color: #f1f5f9;
}

html[data-tuko-theme="dark"] .tuko-sidebar-button:hover {
  background-color: #142a45;
}

/* Alineado con Woo: #tuko-admin-root[data-tuko-theme="dark"] (--tuko-nav-active-bg / --tuko-nav-active-color) */
html[data-tuko-theme="dark"] .tuko-sidebar-button.active {
  background-color: rgba(46, 91, 140, 0.42);
  color: #38bdf8;
  border-left-color: #3d50f2;
  font-weight: 600;
  text-shadow: none;
  -webkit-text-fill-color: #38bdf8;
}

html[data-tuko-theme="dark"] .tuko-sidebar-footer {
  border-top-color: #2a4a6e;
}

html[data-tuko-theme="dark"] .tuko-sidebar-footer p {
  color: #64748b !important;
}

html[data-tuko-theme="dark"] .tuko-content {
  background: #070f1a;
}

html[data-tuko-theme="dark"] .tuko-dashboard-header h1 {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] .tuko-dashboard-header p {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] .tuko-period-selector-label {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] .tuko-period-button {
  color: #cbd5e1;
  background-color: #142a45;
  border-color: #2a4a6e;
}

html[data-tuko-theme="dark"] .tuko-period-button:hover {
  background-color: #183351;
}

html[data-tuko-theme="dark"] .tuko-period-button.active {
  color: #ffffff;
  background-color: #3d50f2;
  border-color: #3d50f2;
}

html[data-tuko-theme="dark"] .tuko-time-remaining {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] .tuko-kpi-card {
  background: #0e1f33;
  border-color: #2a4a6e;
  box-shadow: none;
}

html[data-tuko-theme="dark"] .tuko-kpi-label {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] .tuko-kpi-value {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] .tuko-card {
  background: #0e1f33;
  border-color: #2a4a6e;
  box-shadow: none;
}

html[data-tuko-theme="dark"] .tuko-card-title h2 {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] .tuko-card-subtitle {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] .tuko-dashboard-section-title {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] .tuko-input {
  color: #e2e8f0;
  background-color: #142a45;
  border-color: #2a4a6e;
}

html[data-tuko-theme="dark"] .tuko-input:focus {
  border-color: #3d50f2;
  box-shadow: 0 0 0 3px rgba(61, 80, 242, 0.25);
}

html[data-tuko-theme="dark"] .tuko-input:disabled,
html[data-tuko-theme="dark"] .tuko-input[readonly] {
  background-color: #0a1526;
  color: #64748b;
}

/* Sin fondo global en range: rompe el track bicolor de .tuko-appearance-range (curvatura / sombra / tamaño fuente) */
html[data-tuko-theme="dark"] input[type="range"] {
  background: transparent;
}

html[data-tuko-theme="dark"] .tuko-table thead tr {
  border-bottom-color: #2a4a6e;
}

html[data-tuko-theme="dark"] .tuko-table th {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] .tuko-table td {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] .tuko-table tbody tr {
  border-bottom-color: #1e3a5f;
}

html[data-tuko-theme="dark"] .tuko-table tbody tr:hover {
  background-color: #142a45;
}

/* Top 5: filas 1–3 sin fondos claros (contraste con texto claro del tema oscuro) */
html[data-tuko-theme="dark"] .tuko-table tbody tr.highlight-first {
  background-color: rgba(245, 158, 11, 0.12) !important;
  border-left: 3px solid #f59e0b;
}

html[data-tuko-theme="dark"] .tuko-table tbody tr.highlight-second {
  background-color: rgba(148, 163, 184, 0.14) !important;
  border-left: 3px solid #94a3b8;
}

html[data-tuko-theme="dark"] .tuko-table tbody tr.highlight-third {
  background-color: rgba(234, 88, 12, 0.14) !important;
  border-left: 3px solid #ea580c;
}

html[data-tuko-theme="dark"] .tuko-table tbody tr.highlight-first:hover {
  background-color: rgba(245, 158, 11, 0.2) !important;
}

html[data-tuko-theme="dark"] .tuko-table tbody tr.highlight-second:hover {
  background-color: rgba(148, 163, 184, 0.22) !important;
}

html[data-tuko-theme="dark"] .tuko-table tbody tr.highlight-third:hover {
  background-color: rgba(234, 88, 12, 0.2) !important;
}

html[data-tuko-theme="dark"] .tuko-position-badge.other {
  background-color: #142a45;
  color: #94a3b8;
}

html[data-tuko-theme="dark"] .tuko-groups-limit {
  background-color: #142a45;
  border-color: #2a4a6e;
}

html[data-tuko-theme="dark"] .tuko-groups-limit-label {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] .tuko-limit-button {
  background-color: #142a45;
  color: #f1f5f9;
  border: 1px solid #2a4a6e;
}

html[data-tuko-theme="dark"] .tuko-limit-button:hover {
  background-color: #183351;
  color: #ffffff;
}

/* Mismo azul activo que período Diario/Semanal… (paridad Woo) */
html[data-tuko-theme="dark"] .tuko-limit-button.active {
  background-color: #3d50f2 !important;
  color: #ffffff !important;
  border-color: #3d50f2 !important;
  box-shadow: 0 2px 6px rgba(61, 80, 242, 0.4);
}

html[data-tuko-theme="dark"] .tuko-sort-selector label {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] .tuko-sort-selector select {
  color: #e2e8f0;
  background-color: #142a45;
  border-color: #2a4a6e;
}

html[data-tuko-theme="dark"] .tuko-loading,
html[data-tuko-theme="dark"] .tuko-empty {
  color: #e2e8f0 !important;
}

/* Badges de estado tabla grupos — contraste tipo Woo admin oscuro */
html[data-tuko-theme="dark"] .tuko-status-badge {
  border: 1px solid transparent;
  font-weight: 600;
}

html[data-tuko-theme="dark"] .tuko-status-badge.active {
  background: rgba(59, 130, 246, 0.22);
  color: #bfdbfe;
  border-color: rgba(147, 197, 253, 0.45);
}

html[data-tuko-theme="dark"] .tuko-status-badge.completed {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.45);
}

html[data-tuko-theme="dark"] .tuko-status-badge.closed {
  background: rgba(245, 158, 11, 0.18);
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.45);
}

html[data-tuko-theme="dark"] .tuko-status-badge.failed {
  background: rgba(248, 113, 113, 0.18);
  color: #fecaca;
  border-color: rgba(252, 165, 165, 0.45);
}

html[data-tuko-theme="dark"] .tuko-status-badge.cancelled {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.5);
}

/* Modal aceptación legal (Términos + DPA + AUP) */
html[data-tuko-theme="dark"] .tuko-legal-acceptance-overlay {
  background-color: rgba(0, 0, 0, 0.72);
}

html[data-tuko-theme="dark"] .tuko-legal-acceptance-panel {
  background: #0e1f33;
  border: 1px solid #2a4a6e;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

html[data-tuko-theme="dark"] .tuko-legal-acceptance-title {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] .tuko-legal-acceptance-intro {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] .tuko-legal-acceptance-row {
  color: #e2e8f0;
}

html[data-tuko-theme="dark"] .tuko-legal-acceptance-doclink {
  color: #93c5fd;
}

html[data-tuko-theme="dark"] .tuko-legal-acceptance-doclink:hover {
  color: #bfdbfe;
}

html[data-tuko-theme="dark"] .tuko-legal-acceptance-error {
  color: #fca5a5 !important;
}

html[data-tuko-theme="dark"] .tuko-legal-acceptance-footnote {
  color: #64748b !important;
}

/* Modal — productos con grupos activos (KPI) */
html[data-tuko-theme="dark"] .tuko-modal-overlay {
  background-color: rgba(0, 0, 0, 0.65);
}

html[data-tuko-theme="dark"] .tuko-modal-panel {
  background: #0e1f33;
  border-color: #2a4a6e;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

html[data-tuko-theme="dark"] .tuko-modal-header {
  border-bottom-color: #2a4a6e;
}

html[data-tuko-theme="dark"] .tuko-modal-title {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] .tuko-modal-close {
  color: #cbd5e1;
}

html[data-tuko-theme="dark"] .tuko-modal-close:hover {
  background-color: #142a45;
  color: #ffffff;
}

html[data-tuko-theme="dark"] .tuko-modal-empty {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] .tuko-active-group-row {
  border-color: #2a4a6e;
  background: #0a1526;
}

html[data-tuko-theme="dark"] .tuko-active-group-row:hover {
  border-color: #3d50f2;
  box-shadow: 0 2px 12px rgba(61, 80, 242, 0.25);
}

html[data-tuko-theme="dark"] .tuko-active-group-thumb {
  border-color: #2a4a6e;
}

html[data-tuko-theme="dark"] .tuko-active-group-placeholder {
  background: #142a45;
  color: #64748b;
}

html[data-tuko-theme="dark"] .tuko-active-group-name {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] .tuko-active-group-meta {
  color: #cbd5e1 !important;
}

html[data-tuko-theme="dark"] .tuko-active-group-ratio {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] .tuko-active-group-progress-track {
  background: #1e3a5f !important;
}

html[data-tuko-theme="dark"] .tuko-active-group-progress-fill {
  background: #38bdf8 !important;
}

html[data-tuko-theme="dark"] .tuko-active-group-badge {
  background: rgba(59, 130, 246, 0.22);
  color: #bfdbfe;
  border: 1px solid rgba(147, 197, 253, 0.4);
}

/* Selector tema en Ajustes */
html[data-tuko-theme="dark"] .tuko-theme-seg {
  border-color: #2a4a6e;
  background: #0a1526;
}

html[data-tuko-theme="dark"] .tuko-theme-seg-btn {
  color: #94a3b8;
}

html[data-tuko-theme="dark"] .tuko-theme-seg-btn:hover {
  background: #142a45;
  color: #e2e8f0;
}

html[data-tuko-theme="dark"] .tuko-theme-seg-btn.tuko-theme-seg-active {
  background: #183351;
  color: #93c5fd;
  box-shadow: none;
}

/* Filtros estadísticas (sidebar) */
html[data-tuko-theme="dark"] #statistics-filters-sidebar {
  background-color: #0e1f33 !important;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.45) !important;
}

html[data-tuko-theme="dark"] #statistics-filters-sidebar > div:first-child {
  background-color: #0e1f33 !important;
  border-bottom-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #statistics-filters-sidebar h2 {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #statistics-filters-close {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #statistics-filters-content {
  color: #e2e8f0;
}

html[data-tuko-theme="dark"] #statistics-filters-content p {
  color: #94a3b8 !important;
}

/* Títulos / textos con estilos inline típicos en shopify-app.html */
html[data-tuko-theme="dark"] .tuko-tab-content h1[style*="color: #111827"] {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] .tuko-tab-content p[style*="color: #4b5563"] {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] .tuko-settings-theme-row label {
  color: #cbd5e1 !important;
}

html[data-tuko-theme="dark"] .tuko-card[style*="background-color: #ffffff"] {
  background-color: #0e1f33 !important;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] label[for="settings-language"],
html[data-tuko-theme="dark"] label[for="settings-currency"] {
  color: #cbd5e1 !important;
}

/* Ajustes generales: selects con estilos inline claros en shopify-app.html */
html[data-tuko-theme="dark"] #settings-language,
html[data-tuko-theme="dark"] #settings-currency {
  background-color: #0a1526 !important;
  color: #e2e8f0 !important;
  border-color: #3d6a94 !important;
  color-scheme: dark;
}

html[data-tuko-theme="dark"] #settings-currency:disabled {
  background-color: #0e1f33 !important;
  color: #94a3b8 !important;
  opacity: 1 !important;
}

html[data-tuko-theme="dark"] #settings-language:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22) !important;
}

html[data-tuko-theme="dark"] #settings-language option,
html[data-tuko-theme="dark"] #settings-currency option {
  background-color: #0a1526;
  color: #e2e8f0;
}

/* Ajustes: comisión pactada (misma legibilidad que idioma/moneda) */
html[data-tuko-theme="dark"] #settings-tab .tuko-settings-commission-label {
  color: #cbd5e1 !important;
}

html[data-tuko-theme="dark"] #settings-tab .tuko-settings-commission-value,
html[data-tuko-theme="dark"] #settings-tab #settings-agreed-commission-value {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #settings-tab .tuko-settings-commission-help {
  color: #94a3b8 !important;
}

/* ——— Configuración de grupo (#config-tab) ——— */
html[data-tuko-theme="dark"] #config-tab h1,
html[data-tuko-theme="dark"] #config-tab h1 span[style*="font-weight: 700"] {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #config-tab #config-product-name {
  color: #cbd5e1 !important;
}

html[data-tuko-theme="dark"] #config-tab h2 {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #config-tab h3 {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #config-tab label {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] #config-tab p {
  color: #cbd5e1 !important;
}

html[data-tuko-theme="dark"] #config-tab #config-no-product-warning {
  color: #f87171 !important;
}

html[data-tuko-theme="dark"] #config-product-selector-container {
  background-color: #0a1526 !important;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #config-product-selector-container:hover {
  border-color: #3d50f2 !important;
  background-color: #122438 !important;
}

html[data-tuko-theme="dark"] #config-product-selector-container p {
  color: #f1f5f9 !important;
}

html[data-tuko-theme="dark"] #config-product-info {
  background: #0a1526 !important;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #config-product-info h3,
html[data-tuko-theme="dark"] #config-product-info #config-product-id,
html[data-tuko-theme="dark"] #config-product-info #config-product-price-display {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #config-product-info span[style*="color: #6b7280"] {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #config-product-image-container,
html[data-tuko-theme="dark"] #config-tab .config-product-thumb {
  background: #142a45 !important;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #config-tab #config-product-image-placeholder {
  stroke: #64748b;
}

html[data-tuko-theme="dark"] #config-tab .config-product-status--active {
  background: rgba(6, 78, 59, 0.45) !important;
  color: #86efac !important;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

html[data-tuko-theme="dark"] #config-tab .config-product-status--inactive {
  background: rgba(127, 29, 29, 0.35) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(248, 113, 113, 0.35);
}

html[data-tuko-theme="dark"] #config-tab input[type="text"],
html[data-tuko-theme="dark"] #config-tab input[type="number"] {
  background-color: #0a1526 !important;
  border-color: #2a4a6e !important;
  color: #f1f5f9 !important;
}

html[data-tuko-theme="dark"] #config-tab input[type="text"][readonly],
html[data-tuko-theme="dark"] #config-tab input[disabled] {
  background-color: #0a1526 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
}

html[data-tuko-theme="dark"] #config-tab input::placeholder {
  color: #64748b;
}

html[data-tuko-theme="dark"] #config-tab div[style*="border-bottom: 1px solid #f3f4f6"] {
  border-bottom-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #config-tab div[style*="border-top: 1px solid #f3f4f6"] {
  border-top-color: #2a4a6e !important;
}

/* Modal — Seleccionar producto */
html[data-tuko-theme="dark"] #product-selector-modal {
  background-color: rgba(0, 0, 0, 0.65) !important;
}

html[data-tuko-theme="dark"] .tuko-product-selector-panel {
  background: #0e1f33 !important;
  border: 1px solid #2a4a6e;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45) !important;
}

html[data-tuko-theme="dark"] .tuko-product-selector-modal-header {
  background-color: #0a1526 !important;
  border-bottom-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] .tuko-product-selector-modal-title {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] .tuko-product-selector-sync-btn {
  background-color: #142a45 !important;
  color: #f1f5f9 !important;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] .tuko-product-selector-sync-btn:hover {
  background-color: #183351 !important;
  border-color: #3d50f2 !important;
}

html[data-tuko-theme="dark"] .tuko-product-selector-close {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] .tuko-product-selector-close:hover {
  background-color: #142a45 !important;
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] .tuko-product-selector-modal-search {
  background-color: #0e1f33 !important;
  border-bottom-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] .tuko-product-selector-search-icon {
  color: #64748b !important;
}

html[data-tuko-theme="dark"] .tuko-product-selector-search-input {
  background-color: #0a1526 !important;
  border-color: #2a4a6e !important;
  color: #f1f5f9 !important;
}

html[data-tuko-theme="dark"] .tuko-product-selector-search-input:focus {
  border-color: #3d50f2 !important;
  box-shadow: 0 0 0 3px rgba(61, 80, 242, 0.2);
}

html[data-tuko-theme="dark"] .tuko-product-selector-search-clear {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] .tuko-product-selector-search-clear:hover {
  background-color: #142a45 !important;
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] .tuko-product-selector-modal-body {
  background-color: #0e1f33 !important;
}

html[data-tuko-theme="dark"] .tuko-product-selector-card {
  background-color: #0a1526 !important;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] .tuko-product-selector-card:hover {
  border-color: #3d50f2;
  box-shadow: 0 2px 12px rgba(61, 80, 242, 0.25);
}

html[data-tuko-theme="dark"] .tuko-product-selector-card-thumb {
  background-color: #142a45 !important;
}

html[data-tuko-theme="dark"] .tuko-product-selector-card-title {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] .tuko-product-selector-card-badge--ok {
  background-color: rgba(6, 78, 59, 0.45) !important;
  color: #86efac !important;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

html[data-tuko-theme="dark"] .tuko-product-selector-card-badge--muted {
  background-color: rgba(148, 163, 184, 0.15) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

html[data-tuko-theme="dark"] #product-selector-loading,
html[data-tuko-theme="dark"] #product-selector-empty {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #product-selector-empty p[style*="color: #374151"] {
  color: #e2e8f0 !important;
}

/* ——— Modales activar / desactivar grupo ——— */
html[data-tuko-theme="dark"] .tuko-modal-overlay {
  background-color: rgba(0, 0, 0, 0.72) !important;
}

html[data-tuko-theme="dark"] .tuko-modal-surface {
  background: #0e1f33 !important;
  border: 1px solid #2a4a6e;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5) !important;
}

html[data-tuko-theme="dark"] .tuko-modal-surface--deactivation {
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55) !important;
}

html[data-tuko-theme="dark"] #confirm-activation-modal .tuko-modal-heading,
html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-modal-heading,
html[data-tuko-theme="dark"] #confirm-deactivation-title {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #confirm-activation-modal .tuko-modal-subheading {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #confirm-activation-close,
html[data-tuko-theme="dark"] #confirm-deactivation-close {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #confirm-activation-modal .tuko-modal-footer,
html[data-tuko-theme="dark"] .tuko-modal-footer--deactivation {
  border-top-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] .tuko-modal-btn-cancel {
  background-color: #0a1526 !important;
  color: #e2e8f0 !important;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] .tuko-modal-btn-cancel:hover {
  background-color: #142a45 !important;
  border-color: #3d6a94 !important;
}

html[data-tuko-theme="dark"] .tuko-modal-btn-primary {
  box-shadow: 0 4px 14px rgba(61, 80, 242, 0.35) !important;
}

html[data-tuko-theme="dark"] .tuko-modal-btn-danger {
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.35) !important;
}

html[data-tuko-theme="dark"] #confirm-activation-content .tuko-modal-section-label {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #confirm-activation-content > p[style*="color: #6b7280"] {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #confirm-activation-content .tuko-modal-highlight--indigo {
  background: linear-gradient(135deg, rgba(61, 80, 242, 0.18) 0%, rgba(99, 102, 241, 0.12) 100%) !important;
  border-color: #3d4f8f !important;
}

html[data-tuko-theme="dark"] #confirm-activation-content .tuko-modal-icon-wrap {
  background: rgba(15, 23, 42, 0.55) !important;
}

html[data-tuko-theme="dark"] #confirm-activation-content .tuko-modal-icon-wrap svg {
  stroke: #93c5fd;
}

html[data-tuko-theme="dark"] #confirm-activation-content .tuko-modal-text-title {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #confirm-activation-content .tuko-modal-text-muted {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #confirm-activation-content .tuko-modal-text-accent {
  color: #93c5fd !important;
}

html[data-tuko-theme="dark"] #confirm-activation-content .tuko-modal-text-strike {
  color: #64748b !important;
}

html[data-tuko-theme="dark"] #confirm-activation-content .tuko-modal-text-success {
  color: #6ee7b7 !important;
}

html[data-tuko-theme="dark"] #confirm-activation-content .tuko-modal-tile {
  background: #0a1526 !important;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #confirm-activation-content .tuko-modal-alert--danger {
  background: rgba(127, 29, 29, 0.25) !important;
  border-color: rgba(248, 113, 113, 0.4) !important;
}

html[data-tuko-theme="dark"] #confirm-activation-content .tuko-modal-alert-title {
  color: #fca5a5 !important;
}

html[data-tuko-theme="dark"] #confirm-activation-content .tuko-modal-alert-desc {
  color: #fecaca !important;
}

html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-deact-icon--failed {
  background: linear-gradient(to bottom right, rgba(127, 29, 29, 0.45), rgba(153, 27, 27, 0.35)) !important;
}

html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-deact-icon--failed svg {
  stroke: #fca5a5;
}

html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-deact-icon--success {
  background: linear-gradient(to bottom right, rgba(6, 78, 59, 0.5), rgba(20, 83, 45, 0.4)) !important;
}

html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-deact-icon--success svg {
  stroke: #86efac;
}

html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-deact-icon--warning {
  background: linear-gradient(to bottom right, rgba(154, 52, 18, 0.4), rgba(180, 83, 9, 0.35)) !important;
}

html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-deact-icon--warning svg {
  stroke: #fdba74;
}

html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-deact-msg-root {
  color: #cbd5e1 !important;
}

html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-deact-msg-root p,
html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-deact-msg-root li,
html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-deact-msg-root span {
  color: #cbd5e1 !important;
}

html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-deact-msg-lead {
  color: #f1f5f9 !important;
}

html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-deact-msg-root span[style*="color: #dc2626"] {
  color: #f87171 !important;
}

html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-deact-msg-root span[style*="color: #16a34a"] {
  color: #4ade80 !important;
}

html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-deact-msg-root span[style*="color: #ea580c"] {
  color: #fb923c !important;
}

html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-deact-warn-banner {
  background: rgba(180, 83, 9, 0.22) !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
  color: #fcd34d !important;
}

html[data-tuko-theme="dark"] #confirm-deactivation-card.tuko-deact-group-card {
  background: linear-gradient(to bottom right, rgba(154, 52, 18, 0.25), rgba(30, 41, 59, 0.9)) !important;
  border-color: rgba(251, 146, 60, 0.45) !important;
}

html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-deactivation-stat-cell {
  background-color: #0a1526 !important;
  border: 1px solid #2a4a6e;
}

html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-deact-card-muted {
  color: #f1f5f9 !important;
}

html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-deact-card-title {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #confirm-deactivation-modal p[style*="color: #b45309"] {
  color: #fcd34d !important;
}

html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-deact-progress-track {
  background-color: #1e3a5f !important;
}

html[data-tuko-theme="dark"] #confirm-deactivation-modal span[style*="color: #ea580c"] {
  color: #fdba74 !important;
}

html[data-tuko-theme="dark"] #confirm-deactivation-card svg[stroke="#4b5563"] {
  stroke: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-deact-empty-icon {
  background-color: rgba(180, 83, 9, 0.28) !important;
}

html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-deact-empty-icon svg {
  stroke: #fcd34d;
}

html[data-tuko-theme="dark"] #confirm-deactivation-modal .tuko-deact-empty-wrap p[style*="color: #6b7280"] {
  color: #94a3b8 !important;
}

/* ——— Hitos de descuento (#milestones-tab), paridad Woo oscuro ——— */
html[data-tuko-theme="dark"] #milestones-tab h1,
html[data-tuko-theme="dark"] #milestones-tab h1 span[style*="font-weight: 700"] {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #milestones-tab #milestones-product-name {
  color: #cbd5e1 !important;
}

html[data-tuko-theme="dark"] #milestones-tab .tuko-milestones-panel {
  background: #0e1f33 !important;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #milestones-tab label[style*="color: #374151"],
html[data-tuko-theme="dark"] #milestones-tab .tuko-milestone-label {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] #milestones-tab p[style*="color: #6b7280"],
html[data-tuko-theme="dark"] #milestones-tab .tuko-milestone-hint {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #milestones-tab #milestones-no-product-warning {
  color: #f87171 !important;
}

html[data-tuko-theme="dark"] #milestones-tab #milestones-count-display {
  color: #f1f5f9 !important;
}

html[data-tuko-theme="dark"] #milestones-tab div[style*="border-bottom: 1px solid #f3f4f6"],
html[data-tuko-theme="dark"] #milestones-tab div[style*="border-top: 1px solid #f3f4f6"] {
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #milestones-tab #milestones-count-slider {
  background: #142a45 !important;
}

html[data-tuko-theme="dark"] #milestones-tab #milestones-count-slider::-webkit-slider-thumb {
  border-color: #0e1f33 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

html[data-tuko-theme="dark"] #milestones-tab #milestones-count-slider::-moz-range-track {
  background: #142a45;
}

html[data-tuko-theme="dark"] #milestones-tab #milestones-count-slider::-moz-range-thumb {
  border-color: #0e1f33 !important;
}

html[data-tuko-theme="dark"] #milestones-tab .tuko-input {
  background-color: #0a1526 !important;
  border-color: #2a4a6e !important;
  color: #f1f5f9 !important;
}

html[data-tuko-theme="dark"] #milestones-tab .tuko-input:focus {
  border-color: #3d50f2 !important;
  box-shadow: 0 0 0 3px rgba(61, 80, 242, 0.2);
}

html[data-tuko-theme="dark"] #milestones-tab .tuko-input:disabled {
  opacity: 0.65 !important;
  background-color: #081018 !important;
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #milestones-tab .tuko-milestone-percent-suffix {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #milestones-tab .tuko-milestone-card {
  background: #0a1526 !important;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #milestones-tab .tuko-milestone-card:hover {
  border-color: #3d50f2;
  box-shadow: 0 4px 14px rgba(61, 80, 242, 0.2);
}

html[data-tuko-theme="dark"] #milestones-tab .tuko-milestone-drag-icon {
  color: #64748b !important;
}

html[data-tuko-theme="dark"] #milestones-tab .tuko-milestone-badge {
  background-color: rgba(61, 80, 242, 0.25) !important;
  color: #93c5fd !important;
  border: 1px solid rgba(129, 140, 248, 0.45);
}

html[data-tuko-theme="dark"] #milestones-tab .tuko-milestone-preview {
  background: linear-gradient(to right, rgba(6, 78, 59, 0.45), rgba(4, 120, 87, 0.35)) !important;
  border-color: rgba(52, 211, 153, 0.35) !important;
}

html[data-tuko-theme="dark"] #milestones-tab .tuko-milestone-preview-text {
  color: #d1fae5 !important;
}

html[data-tuko-theme="dark"] #milestones-tab .tuko-milestone-preview-strong {
  color: #6ee7b7 !important;
}

html[data-tuko-theme="dark"] #milestones-tab .tuko-milestone-delete:hover:not(:disabled) {
  background-color: rgba(248, 113, 113, 0.12) !important;
}

html[data-tuko-theme="dark"] #milestones-tab .tuko-milestone-delete {
  color: #f87171 !important;
}

html[data-tuko-theme="dark"] #milestones-tab .tuko-milestone-delete:disabled {
  color: #475569 !important;
}

html[data-tuko-theme="dark"] #milestones-tab .tuko-milestones-add-btn {
  border-color: #2a4a6e !important;
  color: #cbd5e1 !important;
  background-color: transparent !important;
}

html[data-tuko-theme="dark"] #milestones-tab .tuko-milestones-add-btn:hover {
  border-color: #3d50f2 !important;
  color: #93c5fd !important;
}

html[data-tuko-theme="dark"] #milestones-tab .tuko-milestones-add-btn svg {
  stroke: currentColor !important;
}

html[data-tuko-theme="dark"] #milestones-tab .tuko-milestones-save-btn:not(:disabled) {
  background: #3d50f2 !important;
  color: #ffffff !important;
  opacity: 1 !important;
  cursor: pointer !important;
}

html[data-tuko-theme="dark"] #milestones-tab .tuko-milestones-save-btn:disabled {
  background: #475569 !important;
  color: #e2e8f0 !important;
  opacity: 0.75 !important;
}

html[data-tuko-theme="dark"] .tuko-active-group-warning {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: #d97706 !important;
  color: #fde68a !important;
}

html[data-tuko-theme="dark"] .tuko-active-group-warning-icon {
  color: #fbbf24 !important;
}

html[data-tuko-theme="dark"] .tuko-milestones-validation-alert {
  background-color: rgba(127, 29, 29, 0.35) !important;
  border-color: #f87171 !important;
  color: #fecaca !important;
}

html[data-tuko-theme="dark"] .tuko-milestone-inline-error {
  background-color: rgba(127, 29, 29, 0.35) !important;
  border-color: #f87171 !important;
  color: #fecaca !important;
  box-shadow: none !important;
}

html[data-tuko-theme="dark"] .tuko-milestone-inline-error-icon {
  color: #f87171 !important;
}

/* --------------------------------------------------------------------------
   Apariencia del botón (Shopify) — mismo criterio que Woo / admin.css oscuro
   -------------------------------------------------------------------------- */
html[data-tuko-theme="dark"] #appearance-tab h1 {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #appearance-tab p[style*="color: #4b5563"] {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #appearance-product-name {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #appearance-product-name span {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #appearance-editor-container {
  background: #0e1f33 !important;
  border-color: #2a4a6e !important;
  box-shadow: none !important;
}

html[data-tuko-theme="dark"] #appearance-editor-container > div:first-child {
  border-bottom-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #appearance-editor-container > div:first-child > div[style*="border-left"] {
  border-left-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #appearance-editor-container h2 {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] #appearance-fields-wrap {
  border-right-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #appearance-fields-wrap > div:first-child > label {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] #appearance-preview-column {
  background: #0a1526 !important;
}

html[data-tuko-theme="dark"] #appearance-preview-column > div:first-child span {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #appearance-preview-refresh-btn {
  color: #38bdf8 !important;
  background: rgba(56, 189, 248, 0.12) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
}

html[data-tuko-theme="dark"] #appearance-widget-preview {
  background: #070f1a !important;
  border-radius: 12px;
  border: 1px solid #2a4a6e;
}

html[data-tuko-theme="dark"] #appearance-editor-footer {
  background: #0e1f33 !important;
  border-top-color: #2a4a6e !important;
}

/* Tarjetas de tema — clase estable (Chrome puede normalizar #eff6ff → rgb() y romper selectores [style*=]) */
html[data-tuko-theme="dark"] #widget-theme-selector > button.tuko-appearance-theme-btn {
  box-shadow: none !important;
  background-color: transparent !important;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #widget-theme-selector > button.tuko-appearance-theme-btn--selected {
  background-color: rgba(61, 80, 242, 0.28) !important;
  border-color: #3d50f2 !important;
}

html[data-tuko-theme="dark"] #widget-theme-selector > button.tuko-appearance-theme-btn:not(.tuko-appearance-theme-btn--selected):hover {
  border-color: #3d6a94 !important;
}

html[data-tuko-theme="dark"] #widget-theme-selector .tuko-appearance-theme-btn p {
  color: #f1f5f9 !important;
}

/* Acordeones y etiquetas (inline en widget-customize.js) */
html[data-tuko-theme="dark"] #widget-customize-sections > div {
  border-color: #2a4a6e !important;
  background-color: #0a1526 !important;
}

html[data-tuko-theme="dark"] #widget-customize-sections > div > button {
  background-color: #0e1f33 !important;
  color: #e2e8f0 !important;
  border-bottom-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #widget-customize-sections > div > div:last-child {
  background-color: #0a1526 !important;
}

html[data-tuko-theme="dark"] #appearance-fields-wrap label,
html[data-tuko-theme="dark"] #widget-customize-sections label {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] #widget-customize-sections label[style*="cursor: pointer"] {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] #appearance-fields-wrap .tuko-appearance-value-chip,
html[data-tuko-theme="dark"] #widget-customize-sections .tuko-appearance-value-chip {
  background-color: #142a45 !important;
  color: #f8fafc !important;
  border: 1px solid #2a4a6e !important;
}

/* Sliders curvatura / sombra / tamaño fuente (Woo: tramo azul + tramo blanco + thumb azul) */
html[data-tuko-theme="dark"] .tuko-appearance-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-height: 20px;
  background: transparent;
  accent-color: #3d50f2;
}

html[data-tuko-theme="dark"] .tuko-appearance-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    #3d50f2 0%,
    #3d50f2 var(--tuko-range-fill, 0%),
    #ffffff var(--tuko-range-fill, 0%),
    #ffffff 100%
  );
}

html[data-tuko-theme="dark"] .tuko-appearance-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3d50f2;
  border: 2px solid #ffffff;
  margin-top: -7px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

html[data-tuko-theme="dark"] .tuko-appearance-range::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: #ffffff;
}

html[data-tuko-theme="dark"] .tuko-appearance-range::-moz-range-progress {
  height: 4px;
  border-radius: 2px;
  background: #3d50f2;
}

html[data-tuko-theme="dark"] .tuko-appearance-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3d50f2;
  border: 2px solid #ffffff;
  cursor: pointer;
}

html[data-tuko-theme="dark"] #appearance-fields-wrap .tuko-appearance-text-input,
html[data-tuko-theme="dark"] #widget-customize-sections .tuko-appearance-text-input {
  background-color: #0a1526 !important;
  color: #f8fafc !important;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #appearance-fields-wrap .tuko-appearance-text-input::placeholder,
html[data-tuko-theme="dark"] #widget-customize-sections .tuko-appearance-text-input::placeholder {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #appearance-fields-wrap .tuko-appearance-select,
html[data-tuko-theme="dark"] #widget-customize-sections .tuko-appearance-select {
  background-color: #0a1526 !important;
  color: #f8fafc !important;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #widget-customize-sections input[type="radio"] {
  accent-color: #3d50f2;
}

html[data-tuko-theme="dark"] #widget-customize-sections .tuko-field-hint {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #custom-theme-colors label {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] #appearance-editor-footer button:disabled {
  background-color: #475569 !important;
  color: #e2e8f0 !important;
  opacity: 0.75 !important;
}

/* --------------------------------------------------------------------------
   Estadísticas (Shopify) — alineado con Woo / panel de control
   -------------------------------------------------------------------------- */
html[data-tuko-theme="dark"] #statistics-tab span[style*="color: #6b7280"][data-i18n="period"],
html[data-tuko-theme="dark"] #statistics-tab .statistics-period-row-label {
  color: #cbd5e1 !important;
}

html[data-tuko-theme="dark"] #statistics-tab .statistics-period-btn:not(.active) {
  color: #f1f5f9 !important;
  background-color: #142a45 !important;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #statistics-tab .statistics-period-btn.active {
  color: #ffffff !important;
  background-color: #3d50f2 !important;
  border-color: #3d50f2 !important;
}

html[data-tuko-theme="dark"] #statistics-time-remaining {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #statistics-kpi-cards .statistics-kpi-label {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #statistics-kpi-cards .statistics-kpi-value {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #statistics-kpi-cards .statistics-kpi-subline {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #statistics-kpi-cards .statistics-kpi-card,
html[data-tuko-theme="dark"] #statistics-kpi-cards .tuko-card.statistics-kpi-card {
  border-color: #2a4a6e !important;
  background-color: #0e1f33 !important;
}

html[data-tuko-theme="dark"] #statistics-kpi-cards #statistics-active-groups-card:hover {
  border-color: #3d50f2 !important;
}

html[data-tuko-theme="dark"] #statistics-chart-card {
  background-color: #0e1f33 !important;
  border-color: #2a4a6e !important;
  box-shadow: none !important;
}

html[data-tuko-theme="dark"] #statistics-chart-card #statistics-chart-title {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #statistics-chart-card > div:first-child > div[style*="background-color: #f9fafb"],
html[data-tuko-theme="dark"] #statistics-chart-card .statistics-chart-seg {
  background-color: #0a1526 !important;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #statistics-chart-container {
  background-color: #0a1526 !important;
  border-color: #2a4a6e !important;
}

/* Inactivos: fondo oscuro (el JS pone transparent/gray inline; !important gana) */
html[data-tuko-theme="dark"] #statistics-chart-card .statistics-chart-mode-btn:not(.active),
html[data-tuko-theme="dark"] #statistics-chart-card .statistics-view-mode-btn:not(.active) {
  color: #e2e8f0 !important;
  background-color: #183351 !important;
}

html[data-tuko-theme="dark"] #statistics-chart-card .statistics-chart-mode-btn.active,
html[data-tuko-theme="dark"] #statistics-chart-card .statistics-view-mode-btn.active {
  color: #ffffff !important;
  background-color: #3d50f2 !important;
}

html[data-tuko-theme="dark"] #statistics-chart-legend {
  border-top-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #statistics-chart-legend span[style*="color: #6b7280"] {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #statistics-chart-container .statistics-chart-bar-well {
  background-color: #070f1a !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35) !important;
}

html[data-tuko-theme="dark"] #statistics-chart-container .statistics-chart-bar-empty {
  background-color: #1a3154 !important;
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #statistics-chart-container .statistics-chart-x-label {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #statistics-chart-container .statistics-chart-x-value {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #statistics-chart-container .statistics-chart-max-pill {
  background-color: #0e1f33 !important;
  color: #fcd34d !important;
  border-color: #f59e0b !important;
}

html[data-tuko-theme="dark"] #statistics-tab .tuko-card[style*="margin-bottom: 24px"] {
  background-color: #0e1f33 !important;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #statistics-search-input,
html[data-tuko-theme="dark"] input#statistics-search-input.tuko-statistics-search-input {
  background-color: #0a1526 !important;
  background: #0a1526 !important;
  color: #f8fafc !important;
  border-color: #2a4a6e !important;
  -webkit-text-fill-color: #f8fafc !important;
  caret-color: #f8fafc;
  color-scheme: dark;
}

html[data-tuko-theme="dark"] #statistics-search-input:-webkit-autofill,
html[data-tuko-theme="dark"] #statistics-search-input:-webkit-autofill:hover,
html[data-tuko-theme="dark"] #statistics-search-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #0a1526 inset !important;
  box-shadow: 0 0 0 1000px #0a1526 inset !important;
  -webkit-text-fill-color: #f8fafc !important;
  caret-color: #f8fafc;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #statistics-search-input:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22) !important;
  background-color: #0a1526 !important;
  background: #0a1526 !important;
}

html[data-tuko-theme="dark"] #statistics-search-clear {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #statistics-tab .tuko-card[style*="margin-bottom: 24px"] > div:first-child svg[style*="color: #9ca3af"] {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #statistics-filter-chips .tuko-stat-filters-applied-label {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] #statistics-filter-chips .tuko-stat-filter-chip {
  background-color: rgba(15, 40, 71, 0.92) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  box-shadow: none !important;
}

html[data-tuko-theme="dark"] #statistics-filter-chips .tuko-stat-filter-chip-key {
  color: #7dd3fc !important;
}

html[data-tuko-theme="dark"] #statistics-filter-chips .tuko-stat-filter-chip-val {
  color: #f1f5f9 !important;
}

html[data-tuko-theme="dark"] #statistics-filter-chips .tuko-stat-filter-chip-remove {
  color: #7dd3fc !important;
}

html[data-tuko-theme="dark"] #statistics-filter-chips .tuko-stat-filter-chip-remove:hover {
  background-color: rgba(56, 189, 248, 0.22) !important;
  color: #f0f9ff !important;
}

html[data-tuko-theme="dark"] #statistics-filters-button {
  background-color: #0a1526 !important;
  color: #f8fafc !important;
  border-color: #2a4a6e !important;
  box-shadow: none !important;
}

html[data-tuko-theme="dark"] #statistics-filters-indicator {
  border-color: #0e1f33 !important;
}

html[data-tuko-theme="dark"] #statistics-search-message {
  background-color: rgba(56, 189, 248, 0.12) !important;
  color: #7dd3fc !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
}

html[data-tuko-theme="dark"] #statistics-groups-card {
  border-color: #2a4a6e !important;
  background-color: #0e1f33 !important;
}

html[data-tuko-theme="dark"] #statistics-groups-card > div:first-child {
  background-color: #0a1526 !important;
  border-bottom-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #statistics-groups-card h2 {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #statistics-groups-card .tuko-groups-limit-label {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] #statistics-groups-card .statistics-groups-controls {
  margin-bottom: 0 !important;
}

html[data-tuko-theme="dark"] #statistics-no-results {
  background-color: #0e1f33 !important;
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #statistics-no-results-text {
  color: #cbd5e1 !important;
}

html[data-tuko-theme="dark"] #statistics-download-section {
  background-color: #0a1526 !important;
  border-top-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #statistics-filters-overlay {
  background-color: rgba(0, 0, 0, 0.55) !important;
}

html[data-tuko-theme="dark"] #statistics-filters-content label {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] #statistics-filters-content h3 {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #statistics-filters-content input,
html[data-tuko-theme="dark"] #statistics-filters-content select {
  background-color: #0a1526 !important;
  color: #f8fafc !important;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #statistics-filters-content div[style*="border-top: 1px solid #e5e7eb"] {
  border-top-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #statistics-filters-content > div:last-child {
  border-top-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #statistics-filters-content > div:last-child button[style*="background-color: #ffffff"] {
  background-color: transparent !important;
  color: #f8fafc !important;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #statistics-filters-content > div:last-child button[style*="background-color: #3D50F2"] {
  background-color: #3d50f2 !important;
  color: #ffffff !important;
}

/* Cabecera tabla historial (como Grupos recientes / Woo) */
html[data-tuko-theme="dark"] #statistics-groups-card .tuko-table thead {
  background-color: #0a1526 !important;
}

html[data-tuko-theme="dark"] #statistics-groups-card .tuko-table th {
  color: #f1f5f9 !important;
}

/* Filas uniformes (sin zebra), separador fino (no línea blanca del tr inline) */
html[data-tuko-theme="dark"] #statistics-groups-table-body tr.statistics-groups-row {
  background-color: #0a1526 !important;
  border-bottom: 1px solid #1e3a5f !important;
}

html[data-tuko-theme="dark"] #statistics-groups-table-body tr.statistics-groups-row:hover {
  background-color: #101f36 !important;
}

html[data-tuko-theme="dark"] #statistics-groups-table-body td.statistics-groups-td {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] #statistics-groups-table-body .statistics-groups-td--muted {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #statistics-groups-table-body .statistics-groups-td--strong {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #statistics-groups-table-body .statistics-groups-participants-label {
  color: #f1f5f9 !important;
}

html[data-tuko-theme="dark"] #statistics-groups-table-body p {
  color: inherit;
}

html[data-tuko-theme="dark"] #statistics-groups-table-body .tuko-stat-progress-track {
  background-color: #1e3a5f !important;
}

html[data-tuko-theme="dark"] #statistics-groups-table-body .tuko-stat-progress-fill {
  background-color: #3b82f6 !important;
}

/* Tipo de cierre — mismas pills semitransparentes que estado en dashboard */
html[data-tuko-theme="dark"] .tuko-closure-pill--completed {
  background: rgba(16, 185, 129, 0.2) !important;
  color: #6ee7b7 !important;
  border-color: rgba(52, 211, 153, 0.45) !important;
}

html[data-tuko-theme="dark"] .tuko-closure-pill--timeout {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #fcd34d !important;
  border-color: rgba(251, 191, 36, 0.45) !important;
}

html[data-tuko-theme="dark"] .tuko-closure-pill--cancelled {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #fecaca !important;
  border-color: rgba(248, 113, 113, 0.5) !important;
}

html[data-tuko-theme="dark"] .tuko-stat-discount-pill {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #93c5fd !important;
  border: 1px solid rgba(147, 197, 253, 0.35) !important;
}

html[data-tuko-theme="dark"] #statistics-groups-table-body span[style*="color: #9ca3af"] {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #statistics-groups-table-body div[style*="background-color: #e5e7eb"] {
  background-color: #1e3a5f !important;
}

html[data-tuko-theme="dark"] #statistics-groups-table-body .view-participants-btn {
  border-color: #5b8def !important;
  color: #93c5fd !important;
}

html[data-tuko-theme="dark"] #statistics-groups-table-body button[style*="border: 1px solid #10b981"] {
  border-color: #34d399 !important;
  color: #6ee7b7 !important;
}

/* Paginación del historial */
html[data-tuko-theme="dark"] #statistics-pagination.statistics-pagination {
  background-color: #0a1526 !important;
  border-top: 1px solid #2a4a6e !important;
}

html[data-tuko-theme="dark"] #statistics-pagination .statistics-pagination-meta {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #statistics-pagination button {
  background-color: #0e1f33 !important;
  color: #e2e8f0 !important;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #statistics-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed !important;
}

html[data-tuko-theme="dark"] #statistics-pagination button[style*="background-color: #3D50F2"] {
  background-color: #3d50f2 !important;
  color: #ffffff !important;
  border-color: #3d50f2 !important;
}

/* --- Modal resumen de grupo --- */
html[data-tuko-theme="dark"] #group-summary-modal {
  background-color: #0e1f33 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

html[data-tuko-theme="dark"] #group-summary-modal > div:first-of-type {
  border-bottom-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #group-summary-modal h2 {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #group-summary-modal #group-summary-modal-close {
  color: #cbd5e1 !important;
  border-color: #2a4a6e !important;
  background-color: transparent !important;
}

html[data-tuko-theme="dark"] #group-summary-modal-content {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] #group-summary-modal-content [style*="color: #6b7280"] {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #group-summary-modal .summary-section h3 {
  color: #f8fafc !important;
  border-bottom-color: #3d50f2 !important;
}

html[data-tuko-theme="dark"] #group-summary-modal .info-label {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #group-summary-modal .info-value {
  color: #f1f5f9 !important;
}

html[data-tuko-theme="dark"] #group-summary-modal .info-item {
  border-bottom-color: #1e3a5f !important;
}

html[data-tuko-theme="dark"] #group-summary-modal .participants-table th {
  background-color: #0a1526 !important;
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #group-summary-modal .participants-table td {
  color: #e2e8f0 !important;
  border-bottom-color: #1e3a5f !important;
}

html[data-tuko-theme="dark"] #group-summary-modal .participants-table tr:hover {
  background-color: #142a45 !important;
}

html[data-tuko-theme="dark"] #group-summary-modal .milestone-item {
  background-color: #0a1526 !important;
  border-left-color: #3d6a94 !important;
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] #group-summary-modal .milestone-item strong {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #group-summary-modal .milestone-reached {
  background-color: rgba(16, 185, 129, 0.15) !important;
  border-left-color: #34d399 !important;
}

/* --- Modal pedidos --- */
html[data-tuko-theme="dark"] #orders-modal-overlay {
  background-color: rgba(0, 0, 0, 0.65) !important;
}

html[data-tuko-theme="dark"] #orders-modal {
  background-color: #0e1f33 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

html[data-tuko-theme="dark"] #orders-modal > div:first-of-type {
  border-bottom-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #orders-modal h2 {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #orders-modal #orders-modal-close.orders-modal-icon-close {
  color: #e2e8f0 !important;
  border: none !important;
  background-color: transparent !important;
}

html[data-tuko-theme="dark"] #orders-modal #orders-modal-close.orders-modal-icon-close:hover {
  background-color: #142a45 !important;
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #orders-modal #orders-modal-export {
  color: #6ee7b7 !important;
  border-color: #34d399 !important;
  background-color: transparent !important;
}

html[data-tuko-theme="dark"] #orders-modal-content {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] #orders-modal-content [style*="color: #6b7280"] {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #orders-modal-content [style*="color: #111827"] {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] #orders-modal-content [style*="background-color: #f9fafb"],
html[data-tuko-theme="dark"] #orders-modal-content [style*="background-color: #ffffff"] {
  background-color: #0a1526 !important;
}

html[data-tuko-theme="dark"] #orders-modal-content [style*="border: 1px solid #e5e7eb"],
html[data-tuko-theme="dark"] #orders-modal-content [style*="border-top: 1px solid #e5e7eb"] {
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #orders-modal-content a[style*="color: #3D50F2"] {
  color: #93c5fd !important;
}

/* --- Modal participantes --- */
html[data-tuko-theme="dark"] #participants-modal {
  background-color: rgba(0, 0, 0, 0.65) !important;
}

html[data-tuko-theme="dark"] #participants-modal .participants-modal-panel {
  background: #0e1f33 !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

html[data-tuko-theme="dark"] #participants-modal .participants-modal-panel > div:first-of-type {
  background-color: #0a1526 !important;
  border-bottom-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #participants-modal #participants-modal-title {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #participants-modal #participants-modal-subtitle {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #participants-modal #participants-modal-close.participants-modal-close-btn {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] #participants-modal #participants-modal-close.participants-modal-close-btn:hover {
  background-color: #142a45 !important;
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #participants-modal .participants-modal-panel > div:nth-of-type(2) {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] #participants-modal thead tr,
html[data-tuko-theme="dark"] #participants-modal .participants-modal-thead-row {
  background-color: #0a1526 !important;
  border-bottom: 2px solid rgba(56, 189, 248, 0.35) !important;
}

html[data-tuko-theme="dark"] #participants-modal thead th {
  color: #f1f5f9 !important;
}

html[data-tuko-theme="dark"] #participants-modal-table-body tr.participants-modal-row {
  border-bottom: 1px solid #1e3a5f !important;
}

html[data-tuko-theme="dark"] #participants-modal-table-body tr.participants-modal-row--even,
html[data-tuko-theme="dark"] #participants-modal-table-body tr.participants-modal-row--odd {
  background-color: #0a1526 !important;
}

html[data-tuko-theme="dark"] #participants-modal-table-body tr.participants-modal-row:hover {
  background-color: #101f36 !important;
}

html[data-tuko-theme="dark"] #participants-modal-table-body td.participants-modal-cell {
  color: #f1f5f9 !important;
  background-color: transparent !important;
}

html[data-tuko-theme="dark"] #participants-modal-table-body .participants-modal-cell--muted {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] .participants-status-pill--paid {
  background: rgba(6, 78, 59, 0.55) !important;
  color: #ecfdf5 !important;
  border: 1px solid rgba(52, 211, 153, 0.45);
}

html[data-tuko-theme="dark"] .participants-status-pill--cancelled {
  background: rgba(127, 29, 29, 0.45) !important;
  color: #fecaca !important;
  border: 1px solid rgba(248, 113, 113, 0.45);
}

html[data-tuko-theme="dark"] .participants-status-pill--pending {
  background: rgba(30, 58, 138, 0.45) !important;
  color: #bfdbfe !important;
  border: 1px solid rgba(147, 197, 253, 0.4);
}

html[data-tuko-theme="dark"] #participants-modal #participants-modal-loading,
html[data-tuko-theme="dark"] #participants-modal #participants-modal-empty {
  color: #94a3b8 !important;
}

/* --- Soporte (Shopify) --- */
html[data-tuko-theme="dark"] #support-tab .support-page-header h1 {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #support-tab .support-page-header p {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #support-tab .support-common-card,
html[data-tuko-theme="dark"] #support-tab .support-contact-card {
  background-color: #0e1f33 !important;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #support-tab .support-section-title {
  color: #f8fafc !important;
  border-bottom-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #support-tab .support-issue-card {
  background-color: #0a1526 !important;
}

html[data-tuko-theme="dark"] #support-tab .support-issue-title {
  color: #f1f5f9 !important;
}

html[data-tuko-theme="dark"] #support-tab .support-issue-desc {
  color: #cbd5e1 !important;
}

html[data-tuko-theme="dark"] #support-tab .support-install-link {
  color: #93c5fd !important;
}

html[data-tuko-theme="dark"] #support-tab .support-beta-text {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #support-tab .support-form-label {
  color: #e2e8f0 !important;
}

html[data-tuko-theme="dark"] #support-tab .support-form-input {
  background-color: #0a1526 !important;
  color: #f8fafc !important;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #support-tab .support-form-status {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #support-tab .support-store-banner {
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* ——— Legal (#legal-tab) — alineado con Woo en modo oscuro ——— */
html[data-tuko-theme="dark"] #legal-tab .legal-page-header h1 {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #legal-tab .legal-page-header p {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] #legal-tab .legal-section-title {
  color: #f8fafc !important;
}

html[data-tuko-theme="dark"] #legal-tab .legal-section-desc,
html[data-tuko-theme="dark"] #legal-tab .legal-accept-desc {
  color: #cbd5e1 !important;
}

html[data-tuko-theme="dark"] #legal-tab .legal-section-desc strong {
  color: #f1f5f9 !important;
}

html[data-tuko-theme="dark"] #legal-tab .legal-doc-link {
  background: #0a1526 !important;
  border: 1px solid #2a4a6e !important;
  color: #93c5fd !important;
}

html[data-tuko-theme="dark"] #legal-tab .legal-doc-link:hover {
  background: #142a45 !important;
  border-color: #3d6a94 !important;
  color: #bfdbfe !important;
}

html[data-tuko-theme="dark"] #legal-tab .legal-doc-link svg {
  color: #60a5fa;
}

html[data-tuko-theme="dark"] #legal-tab .legal-accept-section {
  border-top-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #legal-tab #legal-accepted-msg.legal-accepted-msg {
  color: #86efac !important;
  background: rgba(6, 78, 59, 0.38) !important;
  border: 1px solid rgba(34, 197, 94, 0.45) !important;
  border-radius: 8px !important;
  padding: 0.75rem 1rem !important;
  margin-top: 0.5rem;
}

html[data-tuko-theme="dark"] #legal-tab #legal-accepted-msg.legal-accepted-msg svg {
  color: #4ade80;
  flex-shrink: 0;
}

html[data-tuko-theme="dark"] #legal-tab #legal-accepted-msg .legal-accepted-recorded {
  color: #bbf7d0 !important;
}

html[data-tuko-theme="dark"] #legal-tab #legal-accepted-msg .legal-accepted-at {
  color: #4ade80 !important;
}

html[data-tuko-theme="dark"] #legal-tab .legal-privacy-box {
  background: #0a1526 !important;
  color: #e2e8f0 !important;
  border: 1px solid #2a4a6e !important;
}

html[data-tuko-theme="dark"] #legal-tab .legal-cookies-callout {
  background: rgba(6, 78, 59, 0.32) !important;
  border: 1px solid rgba(34, 197, 94, 0.42) !important;
  color: #bbf7d0 !important;
}

html[data-tuko-theme="dark"] #legal-tab .legal-subprocessors-table thead tr {
  border-bottom-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] #legal-tab .legal-subprocessors-table th {
  color: #cbd5e1 !important;
}

html[data-tuko-theme="dark"] #legal-tab .legal-subprocessors-table tbody tr {
  border-bottom-color: #1e3a5f !important;
}

html[data-tuko-theme="dark"] #legal-tab .legal-subprocessors-table td {
  color: #e2e8f0 !important;
}

/* Estadísticas: estado cargando */
html[data-tuko-theme="dark"] .statistics-loading-text,
html[data-tuko-theme="dark"] .statistics-groups-loading-cell p {
  color: #94a3b8 !important;
}

html[data-tuko-theme="dark"] .statistics-indeterminate-bar {
  background-color: #1e3a5f !important;
}

html[data-tuko-theme="dark"] .statistics-indeterminate-bar::after {
  background-color: #3d50f2 !important;
}

html[data-tuko-theme="dark"] .statistics-kpi-card--loading {
  background-color: #0e1f33 !important;
  border-color: #2a4a6e !important;
}

html[data-tuko-theme="dark"] .statistics-kpi-card--loading .statistics-kpi-label,
html[data-tuko-theme="dark"] .statistics-kpi-card--loading .statistics-kpi-loading-value {
  color: #94a3b8 !important;
}
