.theme-toggle {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 12px 28px -16px rgba(15, 23, 42, 0.45);
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.1s ease;
}

.theme-toggle:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.theme-toggle:active {
  transform: translateY(1px);
}

.theme-toggle i {
  font-size: 13px;
}

.theme-toggle.is-embedded {
  position: static;
  right: auto;
  bottom: auto;
  width: 100%;
  justify-content: center;
  margin-top: 8px;
  border-radius: 9px;
  padding: 8px 10px;
  box-shadow: none;
}

html[data-theme='dark'] {
  color-scheme: dark;
}

html[data-theme='dark'] body,
html[data-theme='dark'] .app-body {
  background: #0b1220 !important;
  color: #e2e8f0;
}

html[data-theme='dark'] .theme-toggle {
  border-color: #334155;
  background: #111827;
  color: #e2e8f0;
  box-shadow: 0 14px 32px -18px rgba(2, 6, 23, 0.95);
}

html[data-theme='dark'] .theme-toggle:hover {
  border-color: #475569;
  background: #1f2937;
}

html[data-theme='dark'] .app-header,
html[data-theme='dark'] .app-footer,
html[data-theme='dark'] .app-logo-link {
  background: #111827 !important;
  border-color: #1f2937 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .app-header {
  box-shadow: 0 2px 12px rgba(2, 6, 23, 0.7);
}

html[data-theme='dark'] .app-header-system,
html[data-theme='dark'] .app-user-name {
  color: #f8fafc !important;
}

html[data-theme='dark'] .app-header-subtitle,
html[data-theme='dark'] .app-user-email,
html[data-theme='dark'] .app-footer {
  color: #94a3b8 !important;
}

html[data-theme='dark'] .app-nav-link {
  background: #1f2937 !important;
  color: #cbd5e1 !important;
}

html[data-theme='dark'] .app-nav-link:hover {
  background: #334155 !important;
}

html[data-theme='dark'] .app-logout-btn {
  background: #dc2626 !important;
  color: #fff !important;
}

html[data-theme='dark'] .app-logout-btn:hover {
  background: #b91c1c !important;
}

html[data-theme='dark'] .auth-layout {
  background: radial-gradient(circle at top left, #0f172a 0, #111827 45%, #0b1220 100%) !important;
}

html[data-theme='dark'] .login-card {
  background: #111827 !important;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.6) !important;
}

html[data-theme='dark'] .login-header-modern h2,
html[data-theme='dark'] .login-header-modern p,
html[data-theme='dark'] .login-form-modern label,
html[data-theme='dark'] .login-footer-text {
  color: #cbd5e1 !important;
}

html[data-theme='dark'] .login-header-modern h3 {
  color: #4ade80 !important;
}

html[data-theme='dark'] .login-input-group {
  background: #0f172a !important;
  border-color: #334155 !important;
}

html[data-theme='dark'] .login-input {
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .login-input::placeholder {
  color: #64748b !important;
}

html[data-theme='dark'] .crm-main-shell,
html[data-theme='dark'] .crm-content,
html[data-theme='dark'] .crm-main-shell-main,
html[data-theme='dark'] .home-main-root,
html[data-theme='dark'] .home-dashboard {
  background: #0b1220 !important;
}

html[data-theme='dark'] .crm-sidebar {
  background: #0f172a !important;
  border-right-color: #1f2937 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .crm-sidebar-header,
html[data-theme='dark'] .crm-sidebar-user {
  border-color: #1f2937 !important;
}

html[data-theme='dark'] .crm-sidebar-user {
  background: #111827 !important;
}

html[data-theme='dark'] .crm-sidebar-avatar {
  background: #14532d !important;
}

html[data-theme='dark'] .crm-brand-title,
html[data-theme='dark'] .crm-sidebar-name,
html[data-theme='dark'] .crm-nav-link:hover,
html[data-theme='dark'] .crm-nav-link.is-active {
  color: #f8fafc !important;
}

html[data-theme='dark'] .crm-brand-subtitle,
html[data-theme='dark'] .crm-sidebar-role,
html[data-theme='dark'] .crm-sidebar-username {
  color: #94a3b8 !important;
}

html[data-theme='dark'] .crm-nav-link,
html[data-theme='dark'] .crm-nav-parent,
html[data-theme='dark'] .crm-sidebar-logout {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

html[data-theme='dark'] .crm-submenu {
  border-left-color: #334155 !important;
}

html[data-theme='dark'] .crm-submenu-link {
  color: #94a3b8 !important;
}

html[data-theme='dark'] .crm-submenu-link:hover {
  background: #1f2937 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .crm-submenu-link.is-active {
  background: #14532d !important;
  color: #dcfce7 !important;
}

html[data-theme='dark'] .home-hero,
html[data-theme='dark'] .home-surface {
  background: #111827 !important;
  border-color: #1f2937 !important;
}

html[data-theme='dark'] .home-main-table thead th,
html[data-theme='dark'] .home-main-table tbody td {
  border-color: #1f2937 !important;
}

html[data-theme='dark'] .home-main-table thead th {
  background: #0f172a !important;
  color: #cbd5e1 !important;
}

html[data-theme='dark'] .home-main-table tbody td {
  color: #dbeafe !important;
}

html[data-theme='dark'] .home-main-table .codigo-proposta,
html[data-theme='dark'] .home-main-table .cliente-main,
html[data-theme='dark'] .home-main-table .month-group-title {
  color: #f8fafc !important;
}

html[data-theme='dark'] .home-main-table .cliente-sub {
  color: #93a3b8 !important;
}

html[data-theme='dark'] .home-main-table tbody tr.month-row:hover td,
html[data-theme='dark'] .month-group-header {
  background: #0f172a !important;
}

html[data-theme='dark'] .month-group-header td {
  border-top-color: #1f2937 !important;
  border-bottom-color: #1f2937 !important;
}

html[data-theme='dark'] .separador-proposta td,
html[data-theme='dark'] .separador-proposta-cell {
  background: #1f2937 !important;
}

html[data-theme='dark'] .home-logs-toggle {
  color: #94a3b8 !important;
}

html[data-theme='dark'] .home-logs-toggle:hover {
  color: #4ade80 !important;
}

html[data-theme='dark'] .home-logs-card {
  background: #111827 !important;
  border-color: #334155 !important;
}

html[data-theme='dark'] .home-logs-card h4 {
  color: #e2e8f0 !important;
}

html[data-theme='dark'] #logSearch {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] #logSearch::placeholder {
  color: #64748b !important;
}

html[data-theme='dark'] .home-log-search i {
  color: #94a3b8 !important;
}

html[data-theme='dark'] #logs {
  background: #0f172a !important;
  border-color: #334155 !important;
}

html[data-theme='dark'] #logs table {
  background: #0f172a !important;
}

html[data-theme='dark'] #logs thead th {
  background: #111827 !important;
  color: #cbd5e1 !important;
  border-bottom-color: #334155 !important;
}

html[data-theme='dark'] #logs tbody tr {
  background: #0f172a !important;
}

html[data-theme='dark'] #logs tbody tr:nth-child(even) {
  background: #0d1a2d !important;
}

html[data-theme='dark'] #logs tbody td {
  color: #dbeafe !important;
  border-bottom-color: #1f2937 !important;
}

html[data-theme='dark'] #logs tbody tr:hover td {
  background: #132036 !important;
}

html[data-theme='dark'] .historico-row,
html[data-theme='dark'] .historico-row td,
html[data-theme='dark'] .historico-cell {
  background: #0f172a !important;
  border-color: #1f2937 !important;
}

html[data-theme='dark'] .historico-title {
  color: #f8fafc !important;
}

html[data-theme='dark'] .historico-item {
  color: #cbd5e1 !important;
}

html[data-theme='dark'] .historico-item strong {
  color: #f8fafc !important;
}

html[data-theme='dark'] .historico-error {
  color: #fda4af !important;
}

html[data-theme='dark'] .home-main-table .versao-anterior,
html[data-theme='dark'] .home-main-table tr.versao-anterior {
  background: #0f172a !important;
  border-left-color: #22c55e !important;
}

html[data-theme='dark'] .home-main-table .versao-anterior td,
html[data-theme='dark'] .home-main-table tr.versao-anterior td {
  background: #0f172a !important;
  color: #cfe3ff !important;
  border-bottom-color: #1f2937 !important;
}

html[data-theme='dark'] th.th-filterable .sort-toggle,
html[data-theme='dark'] th.th-filterable .filter-toggle {
  color: #94a3b8 !important;
}

html[data-theme='dark'] th.th-filterable .filter-toggle.active {
  color: #22c55e !important;
}

html[data-theme='dark'] th.th-filterable .filter-popover {
  background: #111827 !important;
  border-color: #334155 !important;
  box-shadow: 0 18px 26px -22px rgba(2, 6, 23, 0.95) !important;
}

html[data-theme='dark'] th.th-filterable .filter-popover input {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] th.th-filterable .filter-popover input::placeholder {
  color: #64748b !important;
}

html[data-theme='dark'] th.th-filterable .filter-popover input:focus {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2) !important;
}

html[data-theme='dark'] th.th-filterable .filter-popover .input-clear {
  background: #1f2937 !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

html[data-theme='dark'] th.th-filterable .filter-popover .input-clear:hover {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #fff !important;
}

html[data-theme='dark'] th.th-filterable .filter-popover .filter-ok {
  border-color: #16a34a !important;
  background: #16a34a !important;
  color: #f8fafc !important;
}

html[data-theme='dark'] .filter-label {
  color: #94a3b8 !important;
}

html[data-theme='dark'] .month-group-count,
html[data-theme='dark'] .text-slate-500,
html[data-theme='dark'] .text-slate-400 {
  color: #94a3b8 !important;
}

html[data-theme='dark'] .text-slate-900,
html[data-theme='dark'] .text-slate-800,
html[data-theme='dark'] .text-slate-700,
html[data-theme='dark'] .text-slate-600,
html[data-theme='dark'] .text-slate-300,
html[data-theme='dark'] .text-slate-200 {
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .border-slate-200 {
  border-color: #1f2937 !important;
}

html[data-theme='dark'] .stats-container .stat-card,
html[data-theme='dark'] .table-container,
html[data-theme='dark'] .table-header,
html[data-theme='dark'] .table-export-wrap,
html[data-theme='dark'] .summary-card,
html[data-theme='dark'] .chart-card,
html[data-theme='dark'] .filters-wrapper,
html[data-theme='dark'] .vendas-table-wrapper,
html[data-theme='dark'] .chart-wrapper {
  background: #111827 !important;
  border-color: #1f2937 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .propostas-table th,
html[data-theme='dark'] .propostas-table td,
html[data-theme='dark'] .vendas-table th,
html[data-theme='dark'] .vendas-table .label-cell,
html[data-theme='dark'] .vendas-table .value-cell {
  border-color: #334155 !important;
  color: #cbd5e1 !important;
  background-color: transparent !important;
}

html[data-theme='dark'] .propostas-table tr:hover {
  background: #0f172a !important;
}

html[data-theme='dark'] .empty-state,
html[data-theme='dark'] .summary-detail,
html[data-theme='dark'] .stat-label {
  color: #94a3b8 !important;
}

html[data-theme='dark'] .row-meta {
  background-color: rgba(22, 163, 74, 0.2) !important;
}

html[data-theme='dark'] .row-meta-editavel {
  background-color: rgba(202, 138, 4, 0.18) !important;
}

html[data-theme='dark'] .row-realizado {
  background-color: rgba(3, 105, 161, 0.2) !important;
}

html[data-theme='dark'] .row-percentual,
html[data-theme='dark'] .row-diferenca {
  background-color: rgba(51, 65, 85, 0.38) !important;
}

html[data-theme='dark'] .kanban-column,
html[data-theme='dark'] .kanban-column-header,
html[data-theme='dark'] .kanban-card,
html[data-theme='dark'] .kanban-add,
html[data-theme='dark'] .actions-dropdown,
html[data-theme='dark'] .kanban-modal-content,
html[data-theme='dark'] .kanban-filtro-modal-content {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .card-sub,
html[data-theme='dark'] .card-meta,
html[data-theme='dark'] .card-receita,
html[data-theme='dark'] .total-receita {
  color: #94a3b8 !important;
}

html[data-theme='dark'] .actions-dropdown .dropdown-item {
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .actions-dropdown .dropdown-item:hover {
  background: #1f2937 !important;
}

html[data-theme='dark'] .deal-header,
html[data-theme='dark'] .main-panel,
html[data-theme='dark'] .left-sidebar,
html[data-theme='dark'] .content-area,
html[data-theme='dark'] .right-sidebar,
html[data-theme='dark'] .module-content,
html[data-theme='dark'] .submodule-content,
html[data-theme='dark'] .annotation-card,
html[data-theme='dark'] .history-item,
html[data-theme='dark'] .focus-item,
html[data-theme='dark'] .summary-content,
html[data-theme='dark'] .section-card,
html[data-theme='dark'] .editor-content,
html[data-theme='dark'] .modal-content,
html[data-theme='dark'] .info-box {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .deal-title,
html[data-theme='dark'] .section-title,
html[data-theme='dark'] .submodule-title,
html[data-theme='dark'] .module-header,
html[data-theme='dark'] .panel-header,
html[data-theme='dark'] .timeline-title,
html[data-theme='dark'] .detail-label {
  color: #f8fafc !important;
}

html[data-theme='dark'] .segment-bar {
  background: #334155 !important;
}

html[data-theme='dark'] input,
html[data-theme='dark'] select,
html[data-theme='dark'] textarea,
html[data-theme='dark'] .meta-input,
html[data-theme='dark'] .activity-input,
html[data-theme='dark'] .form-input,
html[data-theme='dark'] .form-select,
html[data-theme='dark'] .form-textarea,
html[data-theme='dark'] .field-input,
html[data-theme='dark'] .field-select,
html[data-theme='dark'] .field-group input,
html[data-theme='dark'] .field-group select {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] input::placeholder,
html[data-theme='dark'] textarea::placeholder {
  color: #64748b !important;
}

html[data-theme='dark'] .item-list,
html[data-theme='dark'] #lista_veiculos,
html[data-theme='dark'] #lista_ssma,
html[data-theme='dark'] #lista_art,
html[data-theme='dark'] #lista_equipamentos,
html[data-theme='dark'] .item-card {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .item-card.tipo-escritorio,
html[data-theme='dark'] .item-card.tipo-campo {
  background: #1e293b !important;
  border-color: #334155 !important;
}

html[data-theme='dark'] table thead,
html[data-theme='dark'] table tbody tr,
html[data-theme='dark'] table td,
html[data-theme='dark'] table th {
  border-color: #334155 !important;
}

html[data-theme='dark'] a {
  color: #e2e8f0;
}

html[data-theme='dark'] .vendas-table thead {
  background: #111827 !important;
}

html[data-theme='dark'] .vendas-table th {
  background: #111827 !important;
  color: #cbd5e1 !important;
}

html[data-theme='dark'] .vendas-table .label-cell {
  background: #111827 !important;
  color: #e2e8f0 !important;
  border-right-color: #334155 !important;
}

html[data-theme='dark'] .vendas-table .value-cell {
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .proposta-servicos-table,
html[data-theme='dark'] .proposta-servicos-table thead,
html[data-theme='dark'] .proposta-servicos-table tbody {
  background: #111827 !important;
  border-color: #334155 !important;
}

html[data-theme='dark'] .proposta-servicos-table thead th {
  background: #111827 !important;
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}

html[data-theme='dark'] .proposta-servicos-table tbody tr {
  background: #0f172a !important;
  border-color: #334155 !important;
}

html[data-theme='dark'] .proposta-servicos-table tbody td {
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

html[data-theme='dark'] .proposta-servicos-table tbody tr:hover td {
  background: #132036 !important;
}

html[data-theme='dark'] .compartilhamento-container,
html[data-theme='dark'] .dre-calculo-container {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .compartilhamento-header label,
html[data-theme='dark'] .checkbox-pode-editar,
html[data-theme='dark'] .checkbox-pode-editar span,
html[data-theme='dark'] .dre-item label,
html[data-theme='dark'] .dre-item div {
  color: #cbd5e1 !important;
}

html[data-theme='dark'] .compartilhamento-input-group input[type='text'] {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .compartilhamento-input-group button {
  background-color: #16a34a !important;
  color: #f8fafc !important;
}

html[data-theme='dark'] .compartilhamento-desabilitado {
  opacity: 0.7;
}

html[data-theme='dark'] .compartilhamento-container.compartilhamento-desabilitado {
  background-color: #0f172a !important;
  border-color: #334155 !important;
}

html[data-theme='dark'] #compartilhamento_content:not(.compartilhamento-desabilitado) input[type='text']:not(:disabled),
html[data-theme='dark'] #compartilhamento_content:not(.compartilhamento-desabilitado) input[type='checkbox']:not(:disabled),
html[data-theme='dark'] #compartilhamento_content:not(.compartilhamento-desabilitado) button:not(:disabled) {
  color: #e2e8f0 !important;
  background-color: #0f172a !important;
  border-color: #334155 !important;
}

html[data-theme='dark'] #compartilhamento_content:not(.compartilhamento-desabilitado) label {
  color: #cbd5e1 !important;
  background-color: transparent !important;
}

html[data-theme='dark'] #compartilhamento_content:not(.compartilhamento-desabilitado) button:not(:disabled) {
  background-color: #16a34a !important;
  border-color: #16a34a !important;
  color: #f8fafc !important;
}

html[data-theme='dark'] .lista_profissinais,
html[data-theme='dark'] .lista_consultoria,
html[data-theme='dark'] .lista_veiculos,
html[data-theme='dark'] .lista_equipamentos,
html[data-theme='dark'] .lista_art,
html[data-theme='dark'] #lista-profissionais,
html[data-theme='dark'] #lista_consultoria,
html[data-theme='dark'] #lista_veiculos,
html[data-theme='dark'] #lista_ssma,
html[data-theme='dark'] #lista_art,
html[data-theme='dark'] #lista_equipamentos {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

html[data-theme='dark'] .item-details div {
  color: #cbd5e1 !important;
}

html[data-theme='dark'] .item-details strong {
  color: #f8fafc !important;
}

html[data-theme='dark'] .item-actions {
  border-top-color: #334155 !important;
}

html[data-theme='dark'] .servico-detalhes-page .field-group label,
html[data-theme='dark'] .servico-detalhes-page .profissionais .field-group label,
html[data-theme='dark'] .servico-detalhes-page .subsection-title {
  color: #cbd5e1 !important;
}

html[data-theme='dark'] .servico-detalhes-page .subsection-title {
  border-bottom-color: #334155 !important;
}

html[data-theme='dark'] .servico-detalhes-page .subtotal-highlight {
  border-top-color: #334155 !important;
}

html[data-theme='dark'] .servico-detalhes-page .subtotal-highlight label,
html[data-theme='dark'] .servico-detalhes-page .subtotal-highlight input {
  color: #86efac !important;
}

html[data-theme='dark'] .servico-detalhes-page .radio-item {
  background: #0f172a !important;
  border-color: #334155 !important;
}

html[data-theme='dark'] .servico-detalhes-page .radio-item:hover {
  background: #1e293b !important;
  border-color: #475569 !important;
}

html[data-theme='dark'] .servico-detalhes-page .radio-item label {
  color: #cbd5e1 !important;
}

html[data-theme='dark'] .servico-detalhes-page .radio-item input[type='radio']:checked + label {
  color: #86efac !important;
}

html[data-theme='dark'] .servico-detalhes-page .radio-item:has(input[type='radio']:checked) {
  border-color: #16a34a !important;
  background: #11241a !important;
}

html[data-theme='dark'] .servico-detalhes-page .fas.fa-info-circle {
  color: #94a3b8 !important;
}

html[data-theme='dark'] .servico-detalhes-page .dre-resumo-card {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .servico-detalhes-page .dre-resumo-card label,
html[data-theme='dark'] .servico-detalhes-page .dre-resumo-card div {
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .servico-detalhes-page #dre-margem-servico-wrap small {
  color: #94a3b8 !important;
}

html[data-theme='dark'] .crm-kanban-page .btn-acoes,
html[data-theme='dark'] .crm-kanban-page .kanban-actions-btn,
html[data-theme='dark'] .crm-kanban-page .kanban-add-btn {
  background: #1f2937 !important;
  border: 1px solid #334155 !important;
  color: #f8fafc !important;
}

html[data-theme='dark'] .crm-kanban-page .btn-acoes:hover,
html[data-theme='dark'] .crm-kanban-page .kanban-actions-btn:hover,
html[data-theme='dark'] .crm-kanban-page .kanban-add-btn:hover {
  background: #334155 !important;
  border-color: #475569 !important;
}

html[data-theme='dark'] .proposta-servicos-table .servicos-acao-btn-editar {
  background-color: #334155;
  border-color: #475569;
  color: #f8fafc;
}

html[data-theme='dark'] .proposta-servicos-table .servicos-acao-btn-editar:hover {
  background-color: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

html[data-theme='dark'] .proposta-servicos-table .servicos-acao-btn-excluir {
  background-color: #3f1d1d;
  border-color: #7f1d1d;
  color: #fecaca;
}

html[data-theme='dark'] .proposta-servicos-table .servicos-acao-btn-excluir:hover {
  background-color: #4c1d1d;
  border-color: #991b1b;
  color: #fee2e2;
}

/* Negócio */
html[data-theme='dark'] .negocio-page .deal-header {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .negocio-page .left-sidebar,
html[data-theme='dark'] .negocio-page .main-panel,
html[data-theme='dark'] .negocio-page .sidebar-section,
html[data-theme='dark'] .negocio-page .module-content,
html[data-theme='dark'] .negocio-page .submodule-content,
html[data-theme='dark'] .negocio-page .section-content,
html[data-theme='dark'] .negocio-page .history-item,
html[data-theme='dark'] .negocio-page .activity-card,
html[data-theme='dark'] .negocio-page .activity-menu,
html[data-theme='dark'] .negocio-page .history-log {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .negocio-page .section-title {
  background: #0f172a !important;
  border-bottom-color: #334155 !important;
  color: #f8fafc !important;
}

html[data-theme='dark'] .negocio-page .module-header:hover,
html[data-theme='dark'] .negocio-page .submodule-header:hover {
  background: #1e293b !important;
}

html[data-theme='dark'] .negocio-page .section-header {
  background: #1e293b !important;
  border-color: #334155 !important;
}

html[data-theme='dark'] .negocio-page .section-header:hover {
  background: #243146 !important;
}

html[data-theme='dark'] .negocio-page .section-header h3,
html[data-theme='dark'] .negocio-page .toggle-icon {
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .negocio-page .segment-bar {
  background: #334155 !important;
}

html[data-theme='dark'] .negocio-page .timeline-segment:hover:not(.active):not(.completed) .segment-bar {
  background: #475569 !important;
}

html[data-theme='dark'] .negocio-page .timeline-segment.active .segment-bar,
html[data-theme='dark'] .negocio-page .timeline-segment.completed .segment-bar {
  background: #22c55e !important;
}

html[data-theme='dark'] .negocio-page .segment-label {
  color: #94a3b8 !important;
}

html[data-theme='dark'] .negocio-page .timeline-segment.active .segment-label,
html[data-theme='dark'] .negocio-page .timeline-segment.completed .segment-label {
  color: #4ade80 !important;
}

html[data-theme='dark'] .negocio-page .deal-title,
html[data-theme='dark'] .negocio-page .owner-name,
html[data-theme='dark'] .negocio-page .summary-value,
html[data-theme='dark'] .negocio-page .detail-value,
html[data-theme='dark'] .negocio-page .field-value,
html[data-theme='dark'] .negocio-page .cost-amount,
html[data-theme='dark'] .negocio-page .cost-percentage,
html[data-theme='dark'] .negocio-page .history-title,
html[data-theme='dark'] .negocio-page .timeline-title,
html[data-theme='dark'] .negocio-page .change-detail {
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .negocio-page .summary-label,
html[data-theme='dark'] .negocio-page .detail-label,
html[data-theme='dark'] .negocio-page .field-label,
html[data-theme='dark'] .negocio-page .owner-role,
html[data-theme='dark'] .negocio-page .current-stage,
html[data-theme='dark'] .negocio-page .history-meta,
html[data-theme='dark'] .negocio-page .activity-meta,
html[data-theme='dark'] .negocio-page .activity-user,
html[data-theme='dark'] .negocio-page .activity-description,
html[data-theme='dark'] .negocio-page .empty-state,
html[data-theme='dark'] .negocio-page .empty-state p {
  color: #94a3b8 !important;
}

html[data-theme='dark'] .negocio-page .summary-link,
html[data-theme='dark'] .negocio-page .show-all-link {
  color: #93c5fd !important;
}

html[data-theme='dark'] .negocio-page .summary-link:hover,
html[data-theme='dark'] .negocio-page .show-all-link:hover {
  color: #bfdbfe !important;
}

html[data-theme='dark'] .negocio-page .btn-edit-field {
  background: #1f2937 !important;
  border-color: #475569 !important;
  color: #cbd5e1 !important;
}

html[data-theme='dark'] .negocio-page .btn-edit-field:hover {
  background: #334155 !important;
  color: #f8fafc !important;
}

html[data-theme='dark'] .negocio-page .history-tab {
  border-color: #334155 !important;
  color: #94a3b8 !important;
}

html[data-theme='dark'] .negocio-page .history-tab:hover {
  background: #1f2937 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .negocio-page .timeline-item:not(:last-child)::after,
html[data-theme='dark'] .negocio-page .timeline-line {
  background: #334155 !important;
  border-color: #334155 !important;
}

html[data-theme='dark'] .negocio-page .activity-card.completed {
  background: #10261b !important;
  border-color: #166534 !important;
}

html[data-theme='dark'] .negocio-page .activity-title {
  color: #f8fafc !important;
}

html[data-theme='dark'] .negocio-page .activity-menu-btn:hover {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .negocio-page .activity-menu-item {
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .negocio-page .activity-menu-item:hover {
  background: #1e293b !important;
}

html[data-theme='dark'] .negocio-page .activity-menu-item.delete {
  color: #fca5a5 !important;
}

html[data-theme='dark'] .negocio-page .activity-menu-item.delete:hover {
  background: #3f1d1d !important;
  color: #fecaca !important;
}

html[data-theme='dark'] .negocio-page .checkmark {
  background: #0f172a !important;
  border-color: #475569 !important;
}

html[data-theme='dark'] .negocio-page .timeline-icon.activity-icon,
html[data-theme='dark'] .negocio-page .timeline-icon.focus-icon {
  border-color: #111827 !important;
}

html[data-theme='dark'] .negocio-page .left-sidebar::-webkit-scrollbar-track,
html[data-theme='dark'] .negocio-page .main-panel::-webkit-scrollbar-track {
  background: #0f172a;
}

html[data-theme='dark'] .negocio-page .left-sidebar::-webkit-scrollbar-thumb,
html[data-theme='dark'] .negocio-page .main-panel::-webkit-scrollbar-thumb {
  background: #334155;
}

html[data-theme='dark'] .negocio-page .left-sidebar::-webkit-scrollbar-thumb:hover,
html[data-theme='dark'] .negocio-page .main-panel::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Negocio - Modais */
html[data-theme='dark'] #annotationModal.modal,
html[data-theme='dark'] #activityModal.modal,
html[data-theme='dark'] #ganhaModal.modal-overlay,
html[data-theme='dark'] #perdidoModal.modal-overlay,
html[data-theme='dark'] #outrasModal.modal-overlay {
  background: rgba(2, 6, 23, 0.78) !important;
}

html[data-theme='dark'] #annotationModal .annotation-editor,
html[data-theme='dark'] #activityModal .activity-editor,
html[data-theme='dark'] #ganhaModal .modal-content,
html[data-theme='dark'] #perdidoModal .modal-content,
html[data-theme='dark'] #outrasModal .modal-content {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] #annotationModal .editor-header,
html[data-theme='dark'] #activityModal .editor-header,
html[data-theme='dark'] #ganhaModal .modal-header,
html[data-theme='dark'] #perdidoModal .modal-header,
html[data-theme='dark'] #outrasModal .modal-header {
  background: #111827 !important;
  border-bottom-color: #334155 !important;
}

html[data-theme='dark'] #annotationModal .editor-header h3,
html[data-theme='dark'] #activityModal .editor-header h3,
html[data-theme='dark'] #ganhaModal .modal-header h3,
html[data-theme='dark'] #perdidoModal .modal-header h3,
html[data-theme='dark'] #outrasModal .modal-header h3 {
  color: #f8fafc !important;
}

html[data-theme='dark'] #annotationModal .close-modal,
html[data-theme='dark'] #activityModal .close-modal,
html[data-theme='dark'] #ganhaModal .modal-close,
html[data-theme='dark'] #perdidoModal .modal-close,
html[data-theme='dark'] #outrasModal .modal-close {
  color: #94a3b8 !important;
}

html[data-theme='dark'] #annotationModal .close-modal:hover,
html[data-theme='dark'] #activityModal .close-modal:hover,
html[data-theme='dark'] #ganhaModal .modal-close:hover,
html[data-theme='dark'] #perdidoModal .modal-close:hover,
html[data-theme='dark'] #outrasModal .modal-close:hover {
  background: #1e293b !important;
  color: #f8fafc !important;
}

html[data-theme='dark'] #annotationModal .editor-toolbar {
  background: #111827 !important;
  border-bottom-color: #334155 !important;
}

html[data-theme='dark'] #annotationModal .toolbar-btn {
  background: #1f2937 !important;
  border-color: #475569 !important;
  color: #cbd5e1 !important;
}

html[data-theme='dark'] #annotationModal .toolbar-btn:hover {
  background: #334155 !important;
  border-color: #64748b !important;
  color: #f8fafc !important;
}

html[data-theme='dark'] #annotationModal .toolbar-btn.active {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #eff6ff !important;
}

html[data-theme='dark'] #annotationModal .toolbar-separator {
  background: #334155 !important;
}

html[data-theme='dark'] #annotationModal .editor-content,
html[data-theme='dark'] #activityModal .editor-body,
html[data-theme='dark'] #ganhaModal .modal-body,
html[data-theme='dark'] #perdidoModal .modal-body,
html[data-theme='dark'] #outrasModal .modal-body {
  background: #0f172a !important;
}

html[data-theme='dark'] #annotationModal .annotation-textarea {
  background: #0b1220 !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] #annotationModal .annotation-textarea.empty::before {
  color: #64748b !important;
}

html[data-theme='dark'] #annotationModal .editor-footer,
html[data-theme='dark'] #activityModal .editor-footer,
html[data-theme='dark'] #ganhaModal .modal-footer,
html[data-theme='dark'] #perdidoModal .modal-footer,
html[data-theme='dark'] #outrasModal .modal-footer {
  background: #111827 !important;
  border-top-color: #334155 !important;
}

html[data-theme='dark'] #annotationModal .editor-info {
  color: #94a3b8 !important;
}

html[data-theme='dark'] #annotationModal .editor-info i {
  color: #94a3b8 !important;
}

html[data-theme='dark'] #activityModal .activity-field label,
html[data-theme='dark'] #activityModal .date-input-group label,
html[data-theme='dark'] #ganhaModal .form-group label,
html[data-theme='dark'] #perdidoModal .form-group label,
html[data-theme='dark'] #outrasModal .form-group label {
  color: #cbd5e1 !important;
}

html[data-theme='dark'] #activityModal .activity-input,
html[data-theme='dark'] #activityModal .activity-textarea,
html[data-theme='dark'] #activityModal .date-input,
html[data-theme='dark'] #ganhaModal .form-input,
html[data-theme='dark'] #perdidoModal .form-input,
html[data-theme='dark'] #outrasModal .form-input,
html[data-theme='dark'] #perdidoModal .form-select,
html[data-theme='dark'] #outrasModal .form-select,
html[data-theme='dark'] #perdidoModal .form-textarea,
html[data-theme='dark'] #outrasModal .form-textarea {
  background: #0b1220 !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] #activityModal .activity-input::placeholder,
html[data-theme='dark'] #activityModal .activity-textarea::placeholder,
html[data-theme='dark'] #perdidoModal .form-textarea::placeholder,
html[data-theme='dark'] #outrasModal .form-textarea::placeholder {
  color: #64748b !important;
}

html[data-theme='dark'] #activityModal .date-separator {
  color: #94a3b8 !important;
}

html[data-theme='dark'] #activityModal .type-option {
  background: #1f2937 !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

html[data-theme='dark'] #activityModal .type-option i {
  color: #94a3b8 !important;
}

html[data-theme='dark'] #activityModal .type-option:hover {
  background: #27364a !important;
  border-color: #3b82f6 !important;
}

html[data-theme='dark'] #activityModal .type-option:hover i {
  color: #bfdbfe !important;
}

html[data-theme='dark'] #activityModal .type-option.selected {
  background: #0f2740 !important;
  border-color: #3b82f6 !important;
  color: #bfdbfe !important;
}

html[data-theme='dark'] #activityModal .type-option.selected i {
  color: #60a5fa !important;
}

html[data-theme='dark'] #perdidoModal .form-select option,
html[data-theme='dark'] #outrasModal .form-select option {
  background: #0f172a;
  color: #e2e8f0;
}

html[data-theme='dark'] #perdidoModal .info-box,
html[data-theme='dark'] #outrasModal .info-box {
  background: #132135 !important;
  border-color: #334155 !important;
}

html[data-theme='dark'] #perdidoModal .info-box i,
html[data-theme='dark'] #outrasModal .info-box i {
  color: #22c55e !important;
}

html[data-theme='dark'] #perdidoModal .info-box span,
html[data-theme='dark'] #outrasModal .info-box span {
  color: #cbd5e1 !important;
}

html[data-theme='dark'] #perdidoModal .info-close,
html[data-theme='dark'] #outrasModal .info-close {
  color: #94a3b8 !important;
}

html[data-theme='dark'] #perdidoModal .info-close:hover,
html[data-theme='dark'] #outrasModal .info-close:hover {
  color: #f8fafc !important;
}

html[data-theme='dark'] #annotationModal .btn-cancel,
html[data-theme='dark'] #activityModal .btn-cancel,
html[data-theme='dark'] #ganhaModal .btn-cancel,
html[data-theme='dark'] #perdidoModal .btn-cancel,
html[data-theme='dark'] #outrasModal .btn-cancel {
  background: #475569 !important;
  border-color: #475569 !important;
  color: #f8fafc !important;
}

html[data-theme='dark'] #annotationModal .btn-cancel:hover,
html[data-theme='dark'] #activityModal .btn-cancel:hover,
html[data-theme='dark'] #ganhaModal .btn-cancel:hover,
html[data-theme='dark'] #perdidoModal .btn-cancel:hover,
html[data-theme='dark'] #outrasModal .btn-cancel:hover {
  background: #334155 !important;
  border-color: #334155 !important;
}

html[data-theme='dark'] #annotationModal .btn-save,
html[data-theme='dark'] #activityModal .btn-save,
html[data-theme='dark'] #ganhaModal .btn-confirm {
  background: #16a34a !important;
  border-color: #16a34a !important;
  color: #f8fafc !important;
}

html[data-theme='dark'] #annotationModal .btn-save:hover,
html[data-theme='dark'] #activityModal .btn-save:hover,
html[data-theme='dark'] #ganhaModal .btn-confirm:hover {
  background: #15803d !important;
  border-color: #15803d !important;
}

html[data-theme='dark'] #outrasModal .btn-confirm {
  background: #d97706 !important;
  border-color: #d97706 !important;
  color: #fff7ed !important;
}

html[data-theme='dark'] #outrasModal .btn-confirm:hover {
  background: #b45309 !important;
  border-color: #b45309 !important;
}

html[data-theme='dark'] #perdidoModal .btn-confirm {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #fee2e2 !important;
}

html[data-theme='dark'] #perdidoModal .btn-confirm:hover {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
}

@media (max-width: 1200px) {
  .theme-toggle.is-embedded {
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
  }

  .theme-toggle.is-embedded span {
    display: none;
  }

  .theme-toggle.is-embedded i {
    margin: 0;
    font-size: 14px;
  }

  html[data-theme='dark'] .crm-submenu {
    background: #111827 !important;
    border-color: #334155 !important;
    box-shadow: 0 16px 24px -18px rgba(2, 6, 23, 0.9);
  }
}

@media (max-width: 768px) {
  .theme-toggle {
    right: 12px;
    bottom: 12px;
    padding: 9px 12px;
    font-size: 11px;
  }
}

@media print {
  .theme-toggle {
    display: none !important;
  }
}

html[data-theme='dark'] .premissa-toolbar {
  background: #111827;
  border-color: #334155;
}

html[data-theme='dark'] .premissa-toolbar-btn {
  background: #1f2937;
  color: #e2e8f0;
  border-color: #334155;
}

html[data-theme='dark'] .premissa-toolbar-btn:hover {
  background: #334155;
}

html[data-theme='dark'] .premissa-toolbar-separator {
  background: #334155;
}

html[data-theme='dark'] .premissa-rich-editor {
  background: #0f172a;
  color: #e2e8f0;
  border-color: #334155;
}

html[data-theme='dark'] .premissa-rich-editor.is-readonly {
  background: #111827;
}

html[data-theme='dark'] .premissa-rich-editor.is-empty:before {
  color: #64748b;
}
