/* Aparência comum. Cores vêm de palette.css; componentes conservam seu layout.
 * Os !important cobrem os fundos claros legados, inclusive estilos inline,
 * sem inverter imagens, gráficos, avatares ou cores de canais. */
html[data-theme-switching] *,
html[data-theme-switching] *::before,
html[data-theme-switching] *::after {
    transition: none !important;
}

html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] {
    color-scheme: dark;
    --admin-sidebar-bg: var(--sidebar-bg);
    --admin-surface: var(--card-bg);
    --admin-surface-raised: var(--surface-raised);
    --admin-bg: var(--bg-primary);
    --admin-border: var(--border-color);
    --admin-text: var(--text-primary);
    --admin-text-muted: var(--text-secondary);
    --admin-shadow: var(--shadow-surface);
    --admin-shadow-md: var(--shadow-surface);
}

html[data-theme="dark"],
html[data-theme="dark"] body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* Navegação e área de trabalho, compartilhadas por todas as páginas. */
html[data-theme="dark"] :is(.chat-main, .chat-main-header, .chat-back-header,
    .chat-input-container, .mobile-header, .rotina-home-section) {
    background: var(--bg-primary) !important;
    color: var(--text-primary);
    border-color: var(--border-color) !important;
}
html[data-theme="dark"] :is(.sidebar, .mobile-menu-sidebar) {
    background: var(--sidebar-bg) !important;
    border-color: var(--border-color) !important;
}
html[data-theme="dark"] :is(.menu-item, .mobile-menu-link) {
    color: var(--text-secondary);
}
html[data-theme="dark"] :is(.menu-item, .mobile-menu-link):hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}
html[data-theme="dark"] :is(.menu-item, .mobile-menu-link).active {
    background: var(--active-bg) !important;
    color: var(--accent-text) !important;
}
html[data-theme="dark"] :is(.header-user-dropdown, .sidebar-flyout, .preferences-menu,
    .notification-dropdown, .notif-dropdown, .config-modal-content, .command-palette,
    .swal2-popup, .cfg-confirm, .cfg-modal, .ha-modal, .rotina-modal, .ctm-modal,
    .modal-content, .dropdown-menu, .filter-dropdown) {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
    box-shadow: var(--shadow-surface);
}
html[data-theme="dark"] :is(.header-user-dropdown__link, .header-user-dropdown__subitem,
    .config-modal-link, .swal2-title, .swal2-html-container) {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] :is(.header-user-dropdown__theme-btn, .config-theme-btn,
    .theme-btn, .sidebar-flyout-theme-btn) {
    background: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
}
html[data-theme="dark"] :is(.header-user-dropdown__theme-btn.is-active,
    .config-theme-btn.active, .theme-btn.active, .sidebar-flyout-theme-btn.active) {
    background: var(--active-bg) !important;
    color: var(--accent-text) !important;
    border-color: var(--accent-text) !important;
}

/* Famílias de cartões e tabelas usadas nas páginas de gestão. */
html[data-theme="dark"] :is(.card, .stat-card, .summary-card, .info-card,
    .settings-card, .section-card, .table-container, .table-wrapper,
    .admin-card, .admin-stat-card, .admin-form-card, .quick-shortcut-btn,
    .jornada-config-popup__content, .jarvis-meeting-card) {
    background-color: var(--card-bg) !important;
    color: var(--text-primary);
    border-color: var(--border-color) !important;
}
html[data-theme="dark"] :is(.quick-shortcut-btn, .jornada-config-popup__content) {
    box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}
html[data-theme="dark"] .quick-shortcut-btn:hover {
    background: var(--surface-raised) !important;
    border-color: var(--border-strong) !important;
}
html[data-theme="dark"] :is(.shortcut-title, .shortcut-text, .card-title) {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] :is(.shortcut-description, .shortcut-arrow, .card-subtitle,
    .header-user-dropdown__pref-label, .header-user-dropdown__email) {
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] :is(.table-container, .table-wrapper, .admin-main) :is(th, td) {
    border-color: var(--border-color) !important;
}
html[data-theme="dark"] :is(.table-container, .table-wrapper, .admin-main) th {
    background: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
}
html[data-theme="dark"] :is(.table-container, .table-wrapper, .admin-main) td {
    color: var(--text-primary);
}

/* Utilitários de telas existentes: não converter cores de marca ou imagens. */
html[data-theme="dark"] :is(.bg-white, .bg-gray-50, .bg-slate-50) {
    background-color: var(--card-bg) !important;
}
html[data-theme="dark"] :is(.bg-gray-100, .bg-gray-200, .bg-slate-100) {
    background-color: var(--bg-tertiary) !important;
}
html[data-theme="dark"] :is(.text-black, .text-gray-900, .text-gray-800,
    .text-slate-900, .text-slate-800) { color: var(--text-primary) !important; }
html[data-theme="dark"] :is(.text-gray-700, .text-gray-600, .text-gray-500,
    .text-slate-600, .text-slate-500, .text-muted) { color: var(--text-secondary) !important; }
html[data-theme="dark"] :is(.border-gray-100, .border-gray-200, .border-gray-300,
    .border-slate-200) { border-color: var(--border-color) !important; }

/* Controles nativos precisam acompanhar a superfície, inclusive calendários. */
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="submit"]):not([type="button"]),
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
    background-color: var(--theme-field-background, var(--input-bg)) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-strong) !important;
    color-scheme: dark;
}
html[data-theme="dark"] :is(select option, select optgroup) {
    background-color: var(--input-bg);
    color: var(--text-primary);
}
html[data-theme="dark"] :is(input, textarea, select):focus {
    border-color: var(--focus-ring) !important;
}
html[data-theme="dark"] input::file-selector-button {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-strong);
}
html[data-theme="dark"] input:autofill {
    box-shadow: 0 0 0 1000px var(--input-bg) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    caret-color: var(--text-primary);
}
html[data-theme="dark"] input:-webkit-autofill {
    box-shadow: 0 0 0 1000px var(--input-bg) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    caret-color: var(--text-primary);
}
/* Em controles compostos, a superfície e o foco pertencem ao contêiner
 * arredondado. Pintar o campo interno cria um segundo retângulo na pílula. */
html[data-theme="dark"] :is(.jv-global-input, .jc-input, .message-input,
    .rotina-search-input, .tut-composer__input, .cc-premio-input,
    .mh-add-news-inline__input),
html[data-theme="dark"] :is(.aswz-chats-search, .clo-search, .srds-search,
    .eqp-search, .funil-value-range__field) > input {
    --theme-field-background: transparent;
}
html[data-theme="dark"] :is(input, textarea)::placeholder {
    color: var(--ui-muted, var(--text-tertiary)) !important;
    opacity: 1;
}
html[data-theme="dark"] :is(input[type="checkbox"], input[type="radio"]) {
    accent-color: var(--accent-color);
    color-scheme: dark;
}
html[data-theme="dark"] .ctm-day-btn:disabled {
    background: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
}
html[data-theme="dark"] :is(input, textarea, select, button, a, [tabindex]:not([tabindex="-1"])):focus-visible {
    outline: var(--theme-field-outline, 2px solid var(--focus-ring)) !important;
    outline-offset: 3px;
}
html[data-theme="dark"] :is(.jv-global-row, .jc-input-row, .input-wrapper,
    .rotina-search-box, .tut-composer-row, .cc-premio-item, .mh-add-news-inline,
    .aswz-chats-search, .clo-search, .srds-search, .eqp-search,
    .funil-value-range__field):has(> :is(input, textarea):focus-visible) {
    /* Só remove o contorno interno quando o navegador consegue destacar o pai. */
    --theme-field-outline: none;
    outline: 2px solid var(--focus-ring) !important;
    outline-offset: 3px;
}
html[data-theme="dark"] :is(.jc-input-row, .input-wrapper, .ctm-combo-dropdown,
    .cfg-cal-dd, .cfg-cal-dd-panel, .cfg-cal-dd-menu) {
    background: var(--input-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-strong) !important;
}

/* Rotina: separação das superfícies e uma só ênfase por grupo de ações. */
html[data-theme="dark"] :is(.rotina-header-card, .rotina-task-item,
    .rotina-seller-selector, .rotina-seller-dropdown-menu, .rotina-task-actions-menu,
    .rotina-progress-label, .rotina-toast, .rotina-calendar, .rotina-modal-content) {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}
html[data-theme="dark"] :is(.rotina-header-card, .rotina-task-item) {
    box-shadow: inset 0 0 0 1px var(--border-color);
}
html[data-theme="dark"] .rotina-task-item:hover {
    background: var(--surface-raised) !important;
    box-shadow: inset 0 0 0 1px var(--border-strong);
}
html[data-theme="dark"] .rotina-task-item.rotina-task-item--selected {
    background: var(--active-bg) !important;
    box-shadow: inset 0 0 0 1px var(--accent-text);
}
html[data-theme="dark"] :is(.rotina-task-title, .rotina-seller-label,
    .rotina-progress-label__text, .rotina-seller-dropdown-item, .rotina-task-actions-menu-item) {
    color: var(--text-primary) !important;
}
html[data-theme="dark"] :is(.rotina-task-description, .rotina-task-action,
    .rotina-task-action span, .rotina-icon-btn, .rotina-feedback-btn,
    .rotina-toggle-completed a) { color: var(--text-secondary) !important; }
html[data-theme="dark"] :is(.rotina-seller-dropdown-toggle, .rotina-today-btn,
    .rotina-date-pill-btn, .rd-tab, .rd-ptab, .rotina-info-btn) {
    background: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-strong) !important;
}
html[data-theme="dark"] :is(.rd-tab.active, .rd-tab.is-active, .rd-ptab.active,
    .rotina-today-btn.is-active, .rotina-date-pill-btn.is-active) {
    background: var(--active-bg) !important;
    color: var(--accent-text) !important;
    border-color: var(--accent-text) !important;
}
html[data-theme="dark"] .rotina-task-item :is(.rotina-feedback-btn, .rotina-icon-btn):hover {
    background: var(--hover-bg) !important;
}
html[data-theme="dark"] .rotina-task-item :is(.rotina-feedback-btn.positive, .rotina-icon-btn.whatsapp) {
    color: var(--ui-green-text, var(--success-text)) !important;
}
html[data-theme="dark"] .rotina-task-item .rotina-feedback-btn.negative,
html[data-theme="dark"] .rotina-task-item .rotina-task-delete-btn {
    color: var(--ui-red-text, var(--danger-text)) !important;
}
html[data-theme="dark"] .rotina-task-item .rotina-feedback-btn.neutral {
    color: var(--ui-amber-text, var(--warning-text)) !important;
}
html[data-theme="dark"] :is(.rotina-seller-dropdown-item, .rotina-task-actions-menu-item):hover {
    background: var(--hover-bg) !important;
}

/* Atendimentos pendentes: fundo, cartões e área expandida têm níveis distintos. */
html[data-theme="dark"] .rd-pending-overlay {
    --rd-scrim: rgba(0, 0, 0, .6);
    --rd-surface: var(--card-bg);
    --rd-canvas: var(--bg-primary);
    --rd-inset: var(--bg-tertiary);
    --rd-line: var(--border-color);
    --rd-line-soft: var(--border-color);
    --rd-positive: #a3dfbe;
    --rd-positive-strong: var(--success-text);
    --rd-positive-soft: var(--success-bg);
    --rd-positive-line: #496b58;
}
html[data-theme="dark"] .rd-pending-dialog { box-shadow: 0 24px 80px rgba(0, 0, 0, .4); }
html[data-theme="dark"] .rd-pending-dialog__body { background: var(--rd-canvas); }
html[data-theme="dark"] .rd-attendance__avatar {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-strong);
}
html[data-theme="dark"] .rd-attendance__initials { color: var(--text-primary); }
html[data-theme="dark"] .rd-channel[data-channel] { background: var(--bg-tertiary) !important; }
html[data-theme="dark"] .rd-attendance.is-expanded {
    background: var(--card-bg);
    border-color: var(--border-strong);
    box-shadow: none;
}
html[data-theme="dark"] .rd-pending-overlay .rd-btn--accent {
    color: var(--text-secondary);
    border-color: var(--border-color);
}
html[data-theme="dark"] .rd-pending-overlay .rd-btn--accent:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
    border-color: var(--border-strong);
}
html[data-theme="dark"] .rd-pending-overlay .rd-btn--go {
    background: var(--ui-green-fill, var(--success-bg));
    color: var(--ui-green-text, var(--success-text));
}
html[data-theme="dark"] .rd-pending-overlay .rd-btn--approve {
    background: var(--ui-green-fill, var(--success-bg));
    color: var(--text-primary);
    border-color: var(--ui-green-text, var(--rd-positive-line));
}
html[data-theme="dark"] .rd-pending-overlay .rd-btn--approve:hover:not(:disabled) {
    background: var(--hover-bg);
    border-color: var(--ui-green-text, var(--success-text));
}
html[data-theme="dark"] .rd-pending-overlay .rd-task__actions [data-action="discard-task"] {
    background: var(--ui-red-fill, var(--danger-bg));
    border-color: #77505a;
    color: var(--ui-red-text, var(--danger-text));
}
html[data-theme="dark"] .rd-pending-overlay .rd-btn--danger {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-secondary);
}
html[data-theme="dark"] .rd-task__schedule-field { background: var(--input-bg); }
html[data-theme="dark"] .rd-task__schedule-field input { background: transparent !important; }

/* Painéis standalone que usam os tokens anteriores à paleta central. */
html[data-theme="dark"] {
    --bg: var(--bg-primary);
    --sidebar: var(--sidebar-bg);
    --surface: var(--card-bg);
    --surface-2: var(--bg-tertiary);
    --surface-3: var(--surface-raised);
    --panel: var(--card-bg);
    --panel-2: var(--surface-raised);
    --panel-strong: var(--surface-raised);
    --border: var(--border-color);
    --line: var(--border-color);
    --text: var(--text-primary);
    --ink: var(--text-primary);
    --muted: var(--text-secondary);
    --dim: var(--text-tertiary);
    --canvas: var(--bg-primary);
    --paper: var(--card-bg);
    --accent-soft: var(--active-bg);
    --accent-s: var(--active-bg);
    --option-bg: var(--card-bg);
    --scroll-thumb: var(--border-strong);
    --shadow: var(--shadow-surface);
}

/* Cores utilitárias mantêm a família sem superfícies claras no tema escuro. */
/* Seletores diretos evitam testar toda a lista de utilitários em cada nó.
   A classe base repetida conserva a especificidade máxima do antigo :is(),
   que também continha alternativas :hover. Não remover essa repetição. */
html[data-theme="dark"] .bg-green-50.bg-green-50,
html[data-theme="dark"] .hover\:bg-green-50:hover,
html[data-theme="dark"] .bg-green-100.bg-green-100,
html[data-theme="dark"] .hover\:bg-green-100:hover,
html[data-theme="dark"] .bg-green-200.bg-green-200,
html[data-theme="dark"] .hover\:bg-green-200:hover,
html[data-theme="dark"] .bg-green-300.bg-green-300,
html[data-theme="dark"] .hover\:bg-green-300:hover,
html[data-theme="dark"] .bg-green-400.bg-green-400,
html[data-theme="dark"] .hover\:bg-green-400:hover,
html[data-theme="dark"] .bg-green-500.bg-green-500,
html[data-theme="dark"] .hover\:bg-green-500:hover,
html[data-theme="dark"] .bg-green-600.bg-green-600,
html[data-theme="dark"] .hover\:bg-green-600:hover,
html[data-theme="dark"] .bg-green-700.bg-green-700,
html[data-theme="dark"] .hover\:bg-green-700:hover,
html[data-theme="dark"] .bg-green-800.bg-green-800,
html[data-theme="dark"] .hover\:bg-green-800:hover,
html[data-theme="dark"] .bg-green-900.bg-green-900,
html[data-theme="dark"] .hover\:bg-green-900:hover { background-color: var(--ui-green-fill) !important; }
html[data-theme="dark"] .bg-emerald-50.bg-emerald-50,
html[data-theme="dark"] .hover\:bg-emerald-50:hover,
html[data-theme="dark"] .bg-emerald-100.bg-emerald-100,
html[data-theme="dark"] .hover\:bg-emerald-100:hover,
html[data-theme="dark"] .bg-emerald-200.bg-emerald-200,
html[data-theme="dark"] .hover\:bg-emerald-200:hover,
html[data-theme="dark"] .bg-emerald-300.bg-emerald-300,
html[data-theme="dark"] .hover\:bg-emerald-300:hover,
html[data-theme="dark"] .bg-emerald-400.bg-emerald-400,
html[data-theme="dark"] .hover\:bg-emerald-400:hover,
html[data-theme="dark"] .bg-emerald-500.bg-emerald-500,
html[data-theme="dark"] .hover\:bg-emerald-500:hover,
html[data-theme="dark"] .bg-emerald-600.bg-emerald-600,
html[data-theme="dark"] .hover\:bg-emerald-600:hover,
html[data-theme="dark"] .bg-emerald-700.bg-emerald-700,
html[data-theme="dark"] .hover\:bg-emerald-700:hover,
html[data-theme="dark"] .bg-emerald-800.bg-emerald-800,
html[data-theme="dark"] .hover\:bg-emerald-800:hover,
html[data-theme="dark"] .bg-emerald-900.bg-emerald-900,
html[data-theme="dark"] .hover\:bg-emerald-900:hover { background-color: var(--ui-green-fill) !important; }
html[data-theme="dark"] .bg-red-50.bg-red-50,
html[data-theme="dark"] .hover\:bg-red-50:hover,
html[data-theme="dark"] .bg-red-100.bg-red-100,
html[data-theme="dark"] .hover\:bg-red-100:hover,
html[data-theme="dark"] .bg-red-200.bg-red-200,
html[data-theme="dark"] .hover\:bg-red-200:hover,
html[data-theme="dark"] .bg-red-300.bg-red-300,
html[data-theme="dark"] .hover\:bg-red-300:hover,
html[data-theme="dark"] .bg-red-400.bg-red-400,
html[data-theme="dark"] .hover\:bg-red-400:hover,
html[data-theme="dark"] .bg-red-500.bg-red-500,
html[data-theme="dark"] .hover\:bg-red-500:hover,
html[data-theme="dark"] .bg-red-600.bg-red-600,
html[data-theme="dark"] .hover\:bg-red-600:hover,
html[data-theme="dark"] .bg-red-700.bg-red-700,
html[data-theme="dark"] .hover\:bg-red-700:hover,
html[data-theme="dark"] .bg-red-800.bg-red-800,
html[data-theme="dark"] .hover\:bg-red-800:hover,
html[data-theme="dark"] .bg-red-900.bg-red-900,
html[data-theme="dark"] .hover\:bg-red-900:hover { background-color: var(--ui-red-fill) !important; }
html[data-theme="dark"] .bg-blue-50.bg-blue-50,
html[data-theme="dark"] .hover\:bg-blue-50:hover,
html[data-theme="dark"] .bg-blue-100.bg-blue-100,
html[data-theme="dark"] .hover\:bg-blue-100:hover,
html[data-theme="dark"] .bg-blue-200.bg-blue-200,
html[data-theme="dark"] .hover\:bg-blue-200:hover,
html[data-theme="dark"] .bg-blue-300.bg-blue-300,
html[data-theme="dark"] .hover\:bg-blue-300:hover,
html[data-theme="dark"] .bg-blue-400.bg-blue-400,
html[data-theme="dark"] .hover\:bg-blue-400:hover,
html[data-theme="dark"] .bg-blue-500.bg-blue-500,
html[data-theme="dark"] .hover\:bg-blue-500:hover,
html[data-theme="dark"] .bg-blue-600.bg-blue-600,
html[data-theme="dark"] .hover\:bg-blue-600:hover,
html[data-theme="dark"] .bg-blue-700.bg-blue-700,
html[data-theme="dark"] .hover\:bg-blue-700:hover,
html[data-theme="dark"] .bg-blue-800.bg-blue-800,
html[data-theme="dark"] .hover\:bg-blue-800:hover,
html[data-theme="dark"] .bg-blue-900.bg-blue-900,
html[data-theme="dark"] .hover\:bg-blue-900:hover { background-color: var(--ui-blue-fill) !important; }
html[data-theme="dark"] .bg-amber-50.bg-amber-50,
html[data-theme="dark"] .hover\:bg-amber-50:hover,
html[data-theme="dark"] .bg-amber-100.bg-amber-100,
html[data-theme="dark"] .hover\:bg-amber-100:hover,
html[data-theme="dark"] .bg-amber-200.bg-amber-200,
html[data-theme="dark"] .hover\:bg-amber-200:hover,
html[data-theme="dark"] .bg-amber-300.bg-amber-300,
html[data-theme="dark"] .hover\:bg-amber-300:hover,
html[data-theme="dark"] .bg-amber-400.bg-amber-400,
html[data-theme="dark"] .hover\:bg-amber-400:hover,
html[data-theme="dark"] .bg-amber-500.bg-amber-500,
html[data-theme="dark"] .hover\:bg-amber-500:hover,
html[data-theme="dark"] .bg-amber-600.bg-amber-600,
html[data-theme="dark"] .hover\:bg-amber-600:hover,
html[data-theme="dark"] .bg-amber-700.bg-amber-700,
html[data-theme="dark"] .hover\:bg-amber-700:hover,
html[data-theme="dark"] .bg-amber-800.bg-amber-800,
html[data-theme="dark"] .hover\:bg-amber-800:hover,
html[data-theme="dark"] .bg-amber-900.bg-amber-900,
html[data-theme="dark"] .hover\:bg-amber-900:hover { background-color: var(--ui-amber-fill) !important; }
html[data-theme="dark"] .bg-yellow-50.bg-yellow-50,
html[data-theme="dark"] .hover\:bg-yellow-50:hover,
html[data-theme="dark"] .bg-yellow-100.bg-yellow-100,
html[data-theme="dark"] .hover\:bg-yellow-100:hover,
html[data-theme="dark"] .bg-yellow-200.bg-yellow-200,
html[data-theme="dark"] .hover\:bg-yellow-200:hover,
html[data-theme="dark"] .bg-yellow-300.bg-yellow-300,
html[data-theme="dark"] .hover\:bg-yellow-300:hover,
html[data-theme="dark"] .bg-yellow-400.bg-yellow-400,
html[data-theme="dark"] .hover\:bg-yellow-400:hover,
html[data-theme="dark"] .bg-yellow-500.bg-yellow-500,
html[data-theme="dark"] .hover\:bg-yellow-500:hover,
html[data-theme="dark"] .bg-yellow-600.bg-yellow-600,
html[data-theme="dark"] .hover\:bg-yellow-600:hover,
html[data-theme="dark"] .bg-yellow-700.bg-yellow-700,
html[data-theme="dark"] .hover\:bg-yellow-700:hover,
html[data-theme="dark"] .bg-yellow-800.bg-yellow-800,
html[data-theme="dark"] .hover\:bg-yellow-800:hover,
html[data-theme="dark"] .bg-yellow-900.bg-yellow-900,
html[data-theme="dark"] .hover\:bg-yellow-900:hover { background-color: var(--ui-amber-fill) !important; }
html[data-theme="dark"] .bg-orange-50.bg-orange-50,
html[data-theme="dark"] .hover\:bg-orange-50:hover,
html[data-theme="dark"] .bg-orange-100.bg-orange-100,
html[data-theme="dark"] .hover\:bg-orange-100:hover,
html[data-theme="dark"] .bg-orange-200.bg-orange-200,
html[data-theme="dark"] .hover\:bg-orange-200:hover,
html[data-theme="dark"] .bg-orange-300.bg-orange-300,
html[data-theme="dark"] .hover\:bg-orange-300:hover,
html[data-theme="dark"] .bg-orange-400.bg-orange-400,
html[data-theme="dark"] .hover\:bg-orange-400:hover,
html[data-theme="dark"] .bg-orange-500.bg-orange-500,
html[data-theme="dark"] .hover\:bg-orange-500:hover,
html[data-theme="dark"] .bg-orange-600.bg-orange-600,
html[data-theme="dark"] .hover\:bg-orange-600:hover,
html[data-theme="dark"] .bg-orange-700.bg-orange-700,
html[data-theme="dark"] .hover\:bg-orange-700:hover,
html[data-theme="dark"] .bg-orange-800.bg-orange-800,
html[data-theme="dark"] .hover\:bg-orange-800:hover,
html[data-theme="dark"] .bg-orange-900.bg-orange-900,
html[data-theme="dark"] .hover\:bg-orange-900:hover { background-color: var(--ui-amber-fill) !important; }
html[data-theme="dark"] .bg-purple-50.bg-purple-50,
html[data-theme="dark"] .hover\:bg-purple-50:hover,
html[data-theme="dark"] .bg-purple-100.bg-purple-100,
html[data-theme="dark"] .hover\:bg-purple-100:hover,
html[data-theme="dark"] .bg-purple-200.bg-purple-200,
html[data-theme="dark"] .hover\:bg-purple-200:hover,
html[data-theme="dark"] .bg-purple-300.bg-purple-300,
html[data-theme="dark"] .hover\:bg-purple-300:hover,
html[data-theme="dark"] .bg-purple-400.bg-purple-400,
html[data-theme="dark"] .hover\:bg-purple-400:hover,
html[data-theme="dark"] .bg-purple-500.bg-purple-500,
html[data-theme="dark"] .hover\:bg-purple-500:hover,
html[data-theme="dark"] .bg-purple-600.bg-purple-600,
html[data-theme="dark"] .hover\:bg-purple-600:hover,
html[data-theme="dark"] .bg-purple-700.bg-purple-700,
html[data-theme="dark"] .hover\:bg-purple-700:hover,
html[data-theme="dark"] .bg-purple-800.bg-purple-800,
html[data-theme="dark"] .hover\:bg-purple-800:hover,
html[data-theme="dark"] .bg-purple-900.bg-purple-900,
html[data-theme="dark"] .hover\:bg-purple-900:hover { background-color: var(--ui-purple-fill) !important; }
html[data-theme="dark"] .bg-violet-50.bg-violet-50,
html[data-theme="dark"] .hover\:bg-violet-50:hover,
html[data-theme="dark"] .bg-violet-100.bg-violet-100,
html[data-theme="dark"] .hover\:bg-violet-100:hover,
html[data-theme="dark"] .bg-violet-200.bg-violet-200,
html[data-theme="dark"] .hover\:bg-violet-200:hover,
html[data-theme="dark"] .bg-violet-300.bg-violet-300,
html[data-theme="dark"] .hover\:bg-violet-300:hover,
html[data-theme="dark"] .bg-violet-400.bg-violet-400,
html[data-theme="dark"] .hover\:bg-violet-400:hover,
html[data-theme="dark"] .bg-violet-500.bg-violet-500,
html[data-theme="dark"] .hover\:bg-violet-500:hover,
html[data-theme="dark"] .bg-violet-600.bg-violet-600,
html[data-theme="dark"] .hover\:bg-violet-600:hover,
html[data-theme="dark"] .bg-violet-700.bg-violet-700,
html[data-theme="dark"] .hover\:bg-violet-700:hover,
html[data-theme="dark"] .bg-violet-800.bg-violet-800,
html[data-theme="dark"] .hover\:bg-violet-800:hover,
html[data-theme="dark"] .bg-violet-900.bg-violet-900,
html[data-theme="dark"] .hover\:bg-violet-900:hover { background-color: var(--ui-purple-fill) !important; }
html[data-theme="dark"] .bg-pink-50.bg-pink-50,
html[data-theme="dark"] .hover\:bg-pink-50:hover,
html[data-theme="dark"] .bg-pink-100.bg-pink-100,
html[data-theme="dark"] .hover\:bg-pink-100:hover,
html[data-theme="dark"] .bg-pink-200.bg-pink-200,
html[data-theme="dark"] .hover\:bg-pink-200:hover,
html[data-theme="dark"] .bg-pink-300.bg-pink-300,
html[data-theme="dark"] .hover\:bg-pink-300:hover,
html[data-theme="dark"] .bg-pink-400.bg-pink-400,
html[data-theme="dark"] .hover\:bg-pink-400:hover,
html[data-theme="dark"] .bg-pink-500.bg-pink-500,
html[data-theme="dark"] .hover\:bg-pink-500:hover,
html[data-theme="dark"] .bg-pink-600.bg-pink-600,
html[data-theme="dark"] .hover\:bg-pink-600:hover,
html[data-theme="dark"] .bg-pink-700.bg-pink-700,
html[data-theme="dark"] .hover\:bg-pink-700:hover,
html[data-theme="dark"] .bg-pink-800.bg-pink-800,
html[data-theme="dark"] .hover\:bg-pink-800:hover,
html[data-theme="dark"] .bg-pink-900.bg-pink-900,
html[data-theme="dark"] .hover\:bg-pink-900:hover { background-color: var(--ui-pink-fill) !important; }

/* Texto semântico dos utilitários acompanha os fundos de sua família. */
html[data-theme="dark"] .text-green-50,
html[data-theme="dark"] .text-green-100,
html[data-theme="dark"] .text-green-200,
html[data-theme="dark"] .text-green-300,
html[data-theme="dark"] .text-green-400,
html[data-theme="dark"] .text-green-500,
html[data-theme="dark"] .text-green-600,
html[data-theme="dark"] .text-green-700,
html[data-theme="dark"] .text-green-800,
html[data-theme="dark"] .text-green-900 { color: var(--ui-green-text) !important; }
html[data-theme="dark"] .text-emerald-50,
html[data-theme="dark"] .text-emerald-100,
html[data-theme="dark"] .text-emerald-200,
html[data-theme="dark"] .text-emerald-300,
html[data-theme="dark"] .text-emerald-400,
html[data-theme="dark"] .text-emerald-500,
html[data-theme="dark"] .text-emerald-600,
html[data-theme="dark"] .text-emerald-700,
html[data-theme="dark"] .text-emerald-800,
html[data-theme="dark"] .text-emerald-900 { color: var(--ui-green-text) !important; }
html[data-theme="dark"] .text-red-50,
html[data-theme="dark"] .text-red-100,
html[data-theme="dark"] .text-red-200,
html[data-theme="dark"] .text-red-300,
html[data-theme="dark"] .text-red-400,
html[data-theme="dark"] .text-red-500,
html[data-theme="dark"] .text-red-600,
html[data-theme="dark"] .text-red-700,
html[data-theme="dark"] .text-red-800,
html[data-theme="dark"] .text-red-900 { color: var(--ui-red-text) !important; }
html[data-theme="dark"] .text-blue-50,
html[data-theme="dark"] .text-blue-100,
html[data-theme="dark"] .text-blue-200,
html[data-theme="dark"] .text-blue-300,
html[data-theme="dark"] .text-blue-400,
html[data-theme="dark"] .text-blue-500,
html[data-theme="dark"] .text-blue-600,
html[data-theme="dark"] .text-blue-700,
html[data-theme="dark"] .text-blue-800,
html[data-theme="dark"] .text-blue-900 { color: var(--ui-blue-text) !important; }
html[data-theme="dark"] .text-amber-50,
html[data-theme="dark"] .text-amber-100,
html[data-theme="dark"] .text-amber-200,
html[data-theme="dark"] .text-amber-300,
html[data-theme="dark"] .text-amber-400,
html[data-theme="dark"] .text-amber-500,
html[data-theme="dark"] .text-amber-600,
html[data-theme="dark"] .text-amber-700,
html[data-theme="dark"] .text-amber-800,
html[data-theme="dark"] .text-amber-900 { color: var(--ui-amber-text) !important; }
html[data-theme="dark"] .text-yellow-50,
html[data-theme="dark"] .text-yellow-100,
html[data-theme="dark"] .text-yellow-200,
html[data-theme="dark"] .text-yellow-300,
html[data-theme="dark"] .text-yellow-400,
html[data-theme="dark"] .text-yellow-500,
html[data-theme="dark"] .text-yellow-600,
html[data-theme="dark"] .text-yellow-700,
html[data-theme="dark"] .text-yellow-800,
html[data-theme="dark"] .text-yellow-900 { color: var(--ui-amber-text) !important; }
html[data-theme="dark"] .text-orange-50,
html[data-theme="dark"] .text-orange-100,
html[data-theme="dark"] .text-orange-200,
html[data-theme="dark"] .text-orange-300,
html[data-theme="dark"] .text-orange-400,
html[data-theme="dark"] .text-orange-500,
html[data-theme="dark"] .text-orange-600,
html[data-theme="dark"] .text-orange-700,
html[data-theme="dark"] .text-orange-800,
html[data-theme="dark"] .text-orange-900 { color: var(--ui-amber-text) !important; }
html[data-theme="dark"] .text-purple-50,
html[data-theme="dark"] .text-purple-100,
html[data-theme="dark"] .text-purple-200,
html[data-theme="dark"] .text-purple-300,
html[data-theme="dark"] .text-purple-400,
html[data-theme="dark"] .text-purple-500,
html[data-theme="dark"] .text-purple-600,
html[data-theme="dark"] .text-purple-700,
html[data-theme="dark"] .text-purple-800,
html[data-theme="dark"] .text-purple-900 { color: var(--ui-purple-text) !important; }
html[data-theme="dark"] .text-violet-50,
html[data-theme="dark"] .text-violet-100,
html[data-theme="dark"] .text-violet-200,
html[data-theme="dark"] .text-violet-300,
html[data-theme="dark"] .text-violet-400,
html[data-theme="dark"] .text-violet-500,
html[data-theme="dark"] .text-violet-600,
html[data-theme="dark"] .text-violet-700,
html[data-theme="dark"] .text-violet-800,
html[data-theme="dark"] .text-violet-900 { color: var(--ui-purple-text) !important; }
html[data-theme="dark"] .text-pink-50,
html[data-theme="dark"] .text-pink-100,
html[data-theme="dark"] .text-pink-200,
html[data-theme="dark"] .text-pink-300,
html[data-theme="dark"] .text-pink-400,
html[data-theme="dark"] .text-pink-500,
html[data-theme="dark"] .text-pink-600,
html[data-theme="dark"] .text-pink-700,
html[data-theme="dark"] .text-pink-800,
html[data-theme="dark"] .text-pink-900 { color: var(--ui-pink-text) !important; }

/* Ênfase de marca: somente controles de ação/seleção. Badges de canal,
 * prioridade, saldo, ranking e avisos semânticos mantêm suas famílias. */
html[data-theme="dark"] .quick-shortcut-btn .shortcut-icon-wrapper {
    color: var(--accent-text) !important;
}
html[data-theme="dark"] :is(.rotina-google__refresh, .rotina-google__connect,
    .rotina-btn-primary) {
    background-color: var(--ui-red-fill) !important;
    color: var(--text-primary) !important;
    border-color: var(--accent-text) !important;
}
html[data-theme="dark"] :is(.rotina-google__refresh, .rotina-google__connect,
    .rotina-btn-primary):hover:not(:disabled) {
    background-color: var(--active-bg) !important;
    border-color: var(--accent-hover) !important;
}
html[data-theme="dark"] :is(.rotina-seller-dropdown-item.active .rotina-seller-dropdown-checkbox,
    .rotina-task-checkbox:checked) {
    background-color: var(--ui-red-fill) !important;
    border-color: var(--accent-text) !important;
}
html[data-theme="dark"] :is(.rd-day-picker, .rd-period-dialog, .rd-dropdown__menu) {
    background: var(--card-bg) !important;
    color: var(--text-primary);
    border-color: var(--border-color) !important;
}
html[data-theme="dark"] body.page-rotina-diaria :is(.rotina-date-pill-btn.is-active,
    .rd-ptab.active, .rd-tab.active) {
    background: var(--active-bg) !important;
    color: var(--accent-text) !important;
    border-color: var(--accent-text) !important;
}
html[data-theme="dark"] body.page-rotina-diaria .jc-send-btn:not(:disabled) {
    background: var(--ui-red-fill) !important;
    color: var(--text-primary) !important;
}
html[data-theme="dark"] body.page-rotina-diaria .jc-send-btn:hover:not(:disabled) {
    background: var(--active-bg) !important;
}
