/* ============================================
   TAILWIND CSS V2 - CSS COMPILADO
   Sistema de Agendamento - Versão V2
   
   Este arquivo foi pré-compilado para funcionar
   imediatamente. Para personalizar, execute:
   npm run build:css
   ============================================ */

/* ============================================
   VARIÁVEIS CSS PARA TEMAS
   ============================================ */
:root {
  /* Cores primárias */
  --tw-primary-500: #3498db;
  --tw-primary-600: #2980b9;
  --tw-primary-700: #1a5276;
  
  /* Verde (sucesso) */
  --tw-success-500: #2ecc71;
  --tw-success-600: #27ae60;
  --tw-success-700: #1e8449;
  
  /* Amarelo (aviso) */
  --tw-warning-500: #f39c12;
  --tw-warning-600: #e67e22;
  --tw-warning-700: #d35400;
  
  /* Vermelho (perigo) */
  --tw-danger-500: #e74c3c;
  --tw-danger-600: #c0392b;
  --tw-danger-700: #922b21;
  
  /* Info (ciano) */
  --tw-info-500: #17a2b8;
  --tw-info-600: #138496;
  --tw-info-700: #0f6674;
}

/* ============================================
   TEMA ESCURO (PADRÃO V2)
   ============================================ */
.theme-v2 {
  --bg-primary: #414951;
  --bg-secondary: #353b43;
  --bg-tertiary: #2d333b;
  --text-primary: #e8eaed;
  --text-secondary: #c2c7d0;
  --text-muted: #95a5a6;
  --border-color: #4a5260;
  --accent-primary: #3498db;
  --accent-success: #2ecc71;
  --accent-warning: #f39c12;
  --accent-danger: #e74c3c;
  --accent-info: #17a2b8;
}

/* ============================================
   TEMA CLARO (V2)
   ============================================ */
.theme-v2.light-mode {
  --bg-primary: #f5f7fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e9ecef;
  --text-primary: #2d3748;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border-color: #e2e8f0;
}

/* ============================================
   ESTILOS BASE V2
   ============================================ */

/* Content wrapper quando V2 ativo */
.theme-v2 .content-wrapper,
.theme-v2.content-wrapper {
  background-color: var(--bg-primary) !important;
}

.theme-v2 .card.card-body,
.theme-v2.card.card-body {
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
}

/* ============================================
   CONTAINER PRINCIPAL
   ============================================ */
.tw-page-container {
  padding: 24px;
  min-height: calc(100vh - 120px);
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* ============================================
   TÍTULOS
   ============================================ */
.tw-page-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 16px;
  position: relative;
  color: var(--text-primary);
}

.tw-page-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-success));
  border-radius: 2px;
}

/* ============================================
   CARDS
   ============================================ */
.tw-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tw-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.tw-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.tw-card-body {
  padding: 0;
}

/* ============================================
   FORMULÁRIOS
   ============================================ */
.tw-form-group {
  margin-bottom: 16px;
}

.tw-form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.tw-form-control {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
  background-color: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  min-height: 48px;
}

.tw-form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.25);
}

.tw-form-control::placeholder {
  color: var(--text-muted);
}

.tw-form-select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23e8eaed' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 12px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Modo claro - ajustes de formulário */
.theme-v2.light-mode .tw-form-control {
  background-color: #ffffff;
  border-color: #d1d5db;
  color: #374151;
}

.theme-v2.light-mode .tw-form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23374151' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

/* ============================================
   BOTÕES
   ============================================ */
.tw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.tw-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.tw-btn:active {
  transform: translateY(0);
}

/* Efeito de brilho */
.tw-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.tw-btn:hover::before {
  left: 100%;
}

/* Variantes */
.tw-btn-primary {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
}

.tw-btn-primary:hover {
  background: linear-gradient(135deg, #2980b9 0%, #1a5276 100%);
  color: white;
}

.tw-btn-success {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
  color: white;
}

.tw-btn-success:hover {
  background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
  color: white;
}

.tw-btn-warning {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  color: white;
}

.tw-btn-warning:hover {
  background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
  color: white;
}

.tw-btn-danger {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
}

.tw-btn-danger:hover {
  background: linear-gradient(135deg, #c0392b 0%, #922b21 100%);
  color: white;
}

.tw-btn-info {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
  color: white;
}

.tw-btn-info:hover {
  background: linear-gradient(135deg, #138496 0%, #0f6674 100%);
  color: white;
}

.tw-btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  color: white;
}

.tw-btn-secondary:hover {
  background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
  color: white;
}

.tw-btn-outline-primary {
  background: transparent;
  color: var(--accent-primary);
  border: 2px solid var(--accent-primary);
}

.tw-btn-outline-primary:hover {
  background-color: var(--accent-primary);
  color: white;
}

/* Tamanhos */
.tw-btn-sm {
  padding: 6px 12px;
  font-size: 0.75rem;
  border-radius: 8px;
}

.tw-btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
  border-radius: 14px;
}

.tw-btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
}

.tw-btn-icon.tw-btn-sm {
  width: 32px;
  height: 32px;
}

/* ============================================
   TABELAS
   ============================================ */
.tw-table-container {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tw-table {
  width: 100%;
  border-collapse: collapse;
}

.tw-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #2d333b 0%, #22272e 100%);
  color: var(--text-primary);
  border-bottom: 2px solid var(--accent-primary);
}

.tw-table td {
  padding: 14px 16px;
  font-size: 0.875rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
}

.tw-table tbody tr {
  transition: all 0.2s ease;
  background-color: var(--bg-secondary);
}

.tw-table tbody tr:hover {
  background-color: var(--border-color);
}

.tw-table tbody tr:nth-child(even) {
  background-color: var(--bg-tertiary);
}

.tw-table tbody tr:nth-child(even):hover {
  background-color: var(--border-color);
}

/* Modo claro - tabelas */
.theme-v2.light-mode .tw-table th {
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
  color: #374151;
}

.theme-v2.light-mode .tw-table td {
  color: #374151;
}

/* ============================================
   BADGES
   ============================================ */
.tw-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tw-badge-primary {
  background-color: rgba(52, 152, 219, 0.2);
  color: #3498db;
}

.tw-badge-success {
  background-color: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
}

.tw-badge-warning {
  background-color: rgba(243, 156, 18, 0.2);
  color: #f39c12;
}

.tw-badge-danger {
  background-color: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
}

.tw-badge-info {
  background-color: rgba(23, 162, 184, 0.2);
  color: #17a2b8;
}

/* ============================================
   ALERTAS
   ============================================ */
.tw-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
}

.tw-alert-success {
  background-color: rgba(46, 204, 113, 0.1);
  border-color: #2ecc71;
}

.tw-alert-danger {
  background-color: rgba(231, 76, 60, 0.1);
  border-color: #e74c3c;
}

.tw-alert-warning {
  background-color: rgba(243, 156, 18, 0.1);
  border-color: #f39c12;
}

.tw-alert-info {
  background-color: rgba(52, 152, 219, 0.1);
  border-color: #3498db;
}

/* ============================================
   FILTROS
   ============================================ */
.tw-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.tw-filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}

/* ============================================
   AÇÕES DA TABELA
   ============================================ */
.tw-action-group {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.tw-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.tw-empty-state-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
  color: var(--text-muted);
}

.tw-empty-state-text {
  font-size: 1.125rem;
  color: var(--text-muted);
}

/* ============================================
   SPINNER DE LOADING
   ============================================ */
.tw-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: tw-spin 0.8s linear infinite;
}

@keyframes tw-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   SCROLLBAR CUSTOMIZADA
   ============================================ */
.tw-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.tw-scrollbar::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

.tw-scrollbar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.tw-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (max-width: 768px) {
  .tw-page-container {
    padding: 16px;
  }

  .tw-card {
    padding: 16px;
    border-radius: 12px;
  }

  .tw-filter-bar {
    flex-direction: column;
  }

  .tw-filter-group {
    width: 100%;
    min-width: 100%;
  }

  /* Tabela responsiva - modo card */
  .tw-table-responsive thead {
    display: none;
  }

  .tw-table-responsive tbody {
    display: block;
    width: 100%;
  }

  .tw-table-responsive tr {
    display: block;
    margin-bottom: 16px;
    border-radius: 12px;
    padding: 16px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
  }

  .tw-table-responsive td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
  }

  .tw-table-responsive td:last-child {
    border-bottom: none;
  }

  .tw-table-responsive td::before {
    content: attr(data-label);
    font-weight: 600;
    margin-right: 16px;
    color: var(--accent-primary);
  }

  /* Botões em mobile */
  .tw-btn {
    width: 100%;
    justify-content: center;
  }

  .tw-btn-icon {
    width: 40px;
  }

  .tw-action-group {
    flex-direction: column;
  }

  .tw-action-group .tw-btn {
    width: 100%;
  }
}

/* ============================================
   ANIMAÇÕES
   ============================================ */
@keyframes tw-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes tw-slideIn {
  from { 
    opacity: 0;
    transform: translateY(-20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tw-slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

.tw-animate-fade-in {
  animation: tw-fadeIn 0.3s ease-out;
}

.tw-animate-slide-in {
  animation: tw-slideIn 0.3s ease-out;
}

.tw-animate-slide-up {
  animation: tw-slideUp 0.3s ease-out;
}

/* ============================================
   UTILITÁRIOS
   ============================================ */
.tw-text-center { text-align: center; }
.tw-text-left { text-align: left; }
.tw-text-right { text-align: right; }

.tw-font-bold { font-weight: 700; }
.tw-font-semibold { font-weight: 600; }
.tw-font-medium { font-weight: 500; }

.tw-mb-0 { margin-bottom: 0; }
.tw-mb-2 { margin-bottom: 8px; }
.tw-mb-4 { margin-bottom: 16px; }
.tw-mb-6 { margin-bottom: 24px; }

.tw-mt-0 { margin-top: 0; }
.tw-mt-2 { margin-top: 8px; }
.tw-mt-4 { margin-top: 16px; }
.tw-mt-6 { margin-top: 24px; }

.tw-p-0 { padding: 0; }
.tw-p-2 { padding: 8px; }
.tw-p-4 { padding: 16px; }
.tw-p-6 { padding: 24px; }

.tw-flex { display: flex; }
.tw-flex-col { flex-direction: column; }
.tw-flex-wrap { flex-wrap: wrap; }
.tw-items-center { align-items: center; }
.tw-justify-center { justify-content: center; }
.tw-justify-between { justify-content: space-between; }
.tw-gap-2 { gap: 8px; }
.tw-gap-4 { gap: 16px; }

.tw-hidden { display: none; }
.tw-block { display: block; }

.tw-w-full { width: 100%; }
.tw-h-full { height: 100%; }

.tw-rounded { border-radius: 4px; }
.tw-rounded-lg { border-radius: 8px; }
.tw-rounded-xl { border-radius: 12px; }
.tw-rounded-2xl { border-radius: 16px; }

.tw-shadow { box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.tw-shadow-lg { box-shadow: 0 10px 15px rgba(0,0,0,0.2); }
.tw-shadow-xl { box-shadow: 0 20px 25px rgba(0,0,0,0.25); }

.tw-overflow-hidden { overflow: hidden; }
.tw-overflow-auto { overflow: auto; }

.tw-cursor-pointer { cursor: pointer; }

.tw-transition { transition: all 0.3s ease; }

/* Cores de texto */
.tw-text-primary { color: var(--accent-primary); }
.tw-text-success { color: var(--accent-success); }
.tw-text-warning { color: var(--accent-warning); }
.tw-text-danger { color: var(--accent-danger); }
.tw-text-info { color: var(--accent-info); }
.tw-text-muted { color: var(--text-muted); }

/* Status implantações (viagens) - apenas cor da letra ou fundo vermelho */
.tw-status-pendente { font-weight: 600; color: var(--accent-warning); }
.tw-status-em-andamento { font-weight: 600; color: var(--accent-info); }
.tw-status-implantado { font-weight: 600; color: var(--accent-success); }
.tw-status-mudou-data,
.tw-status-cancelado {
  font-weight: 600;
  background-color: var(--accent-danger);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
}
.theme-v2.light-mode .tw-status-mudou-data,
.theme-v2.light-mode .tw-status-cancelado {
  color: #1a1a1a;
}

/* Linha inteira com fundo vermelho quando cancelado ou mudou data */
#tabelaImplantacoes tr.tw-row-status-alerta td {
  background-color: var(--accent-danger) !important;
  color: #fff !important;
}
.theme-v2.light-mode #tabelaImplantacoes tr.tw-row-status-alerta td {
  color: #1a1a1a !important;
}

.tw-periodo-alterado {
  font-size: 0.85em;
  color: var(--accent-danger);
}

/* Dropdown flutuante (acima da tabela) */
.tw-dropdown-acoes-floating {
  position: fixed;
  z-index: 1060;
  width: 180px;
  max-width: calc(100vw - 24px);
  padding: 6px 0;
  background: var(--bg-secondary, #2c2f33);
  border: 1px solid var(--border-color, #4f5459);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.tw-dropdown-acoes-floating a {
  display: block;
  padding: 8px 12px;
  color: var(--text-primary, #e8eaed);
  text-decoration: none;
  font-size: 12px;
  white-space: normal;
  line-height: 1.3;
}
.tw-dropdown-acoes-floating a:hover {
  background: var(--bg-tertiary, #4f5459);
  color: var(--text-primary, #e8eaed);
}

/* ============================================
   COMPATIBILIDADE COM ADMINLTE NO V2
   ============================================ */
.theme-v2 .card {
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 16px !important;
}

.theme-v2 .card-body {
  background-color: transparent !important;
  color: var(--text-primary) !important;
}

.theme-v2 .card-header {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

.theme-v2 .table {
  color: var(--text-primary) !important;
}

.theme-v2 .table thead th {
  background: linear-gradient(135deg, #2d333b 0%, #22272e 100%) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

.theme-v2 .table td {
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

.theme-v2 .table-striped tbody tr:nth-of-type(odd) {
  background-color: var(--bg-secondary) !important;
}

.theme-v2 .table-striped tbody tr:nth-of-type(even) {
  background-color: var(--bg-tertiary) !important;
}

.theme-v2 .table-hover tbody tr:hover {
  background-color: var(--border-color) !important;
}

.theme-v2 .form-control {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

.theme-v2 .form-control:focus {
  border-color: var(--accent-primary) !important;
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.25) !important;
}

.theme-v2 .btn {
  border-radius: 10px !important;
  font-weight: 600 !important;
}

.theme-v2 .btn-primary {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
  border: none !important;
}

.theme-v2 .btn-success {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%) !important;
  border: none !important;
}

.theme-v2 .btn-warning {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
  border: none !important;
}

.theme-v2 .btn-danger {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
  border: none !important;
}

.theme-v2 .btn-info {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
  border: none !important;
}

.theme-v2 .btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
  border: none !important;
}

/* Modal no tema V2 */
.theme-v2 .modal-content {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
  border-radius: 20px !important;
  color: var(--text-primary) !important;
}

.theme-v2 .modal-header {
  background: linear-gradient(135deg, #2d333b 0%, #22272e 100%) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
  border-radius: 20px 20px 0 0 !important;
}

.theme-v2 .modal-footer {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-color) !important;
  border-radius: 0 0 20px 20px !important;
}

.theme-v2 .modal-body {
  color: var(--text-primary) !important;
}

.theme-v2 .close {
  color: var(--text-primary) !important;
}

/* Modo claro - compatibilidade AdminLTE */
.theme-v2.light-mode .card {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

.theme-v2.light-mode .card-body {
  color: #374151 !important;
}

.theme-v2.light-mode .card-header {
  background-color: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #374151 !important;
}

.theme-v2.light-mode .table thead th {
  background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%) !important;
  color: #374151 !important;
}

.theme-v2.light-mode .table td {
  color: #374151 !important;
}

.theme-v2.light-mode .form-control {
  background-color: #ffffff !important;
  border-color: #d1d5db !important;
  color: #374151 !important;
}

.theme-v2.light-mode .modal-content {
  background-color: #ffffff !important;
  color: #374151 !important;
}

.theme-v2.light-mode .modal-header {
  background: linear-gradient(135deg, #f8fafc 0%, #e5e7eb 100%) !important;
  color: #374151 !important;
}

.theme-v2.light-mode .modal-footer {
  background-color: #f8fafc !important;
}

.theme-v2.light-mode .modal-body {
  color: #374151 !important;
}

/* ============================================
   ESTILOS GLOBAIS DO LAYOUT V2
   ============================================ */

/* === MODO ESCURO V2 === */
body.theme-v2.dark-mode {
  background-color: #1a1d21 !important;
}

body.theme-v2 .main-sidebar {
  transition: margin-left 0.3s ease-in-out,
              width 0.3s ease-in-out,
              transform 0.3s ease-in-out !important;
}

body.theme-v2.dark-mode .main-sidebar {
  background: linear-gradient(180deg, #1e2227 0%, #151719 100%) !important;
  border-right: 1px solid #2d333b !important;
}

body.theme-v2.dark-mode .main-sidebar .nav-link {
  color: #c2c7d0 !important;
  margin: 4px 12px !important;
  border-radius: 10px !important;
  transition: all 0.3s ease !important;
}

body.theme-v2.dark-mode .main-sidebar .nav-link:hover {
  background: rgba(52, 152, 219, 0.15) !important;
  color: #3498db !important;
}

body.theme-v2.dark-mode .main-sidebar .nav-link.active {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3) !important;
}

body.theme-v2.dark-mode .main-header {
  background: linear-gradient(135deg, #1e2227 0%, #151719 100%) !important;
  border-bottom: 1px solid #2d333b !important;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3) !important;
}

body.theme-v2.dark-mode .main-footer {
  background: linear-gradient(135deg, #1e2227 0%, #151719 100%) !important;
  border-top: 1px solid #2d333b !important;
  color: #95a5a6 !important;
}

body.theme-v2.dark-mode .content-wrapper {
  background: #1a1d21 !important;
}

body.theme-v2 .content-wrapper {
  transition: margin-left 0.3s ease-in-out !important;
}

body.theme-v2.dark-mode .content-wrapper > .card.card-body {
  background: #22272e !important;
  border-radius: 16px !important;
  border: 1px solid #2d333b !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
  margin: 20px !important;
}

/* === MODO CLARO V2 === */
body.theme-v2.light-mode {
  background-color: #f0f2f5 !important;
}

body.theme-v2.light-mode .main-sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%) !important;
  border-right: 1px solid #e2e8f0 !important;
  box-shadow: 2px 0 15px rgba(0, 0, 0, 0.05) !important;
}

body.theme-v2.light-mode .main-sidebar .brand-link {
  border-bottom: 1px solid #e2e8f0 !important;
}

body.theme-v2.light-mode .main-sidebar .brand-link span,
body.theme-v2.light-mode .main-sidebar .brand-text {
  color: #2d3748 !important;
}

body.theme-v2.light-mode .main-sidebar .nav-link {
  color: #4a5568 !important;
  margin: 4px 12px !important;
  border-radius: 10px !important;
  transition: all 0.3s ease !important;
}

body.theme-v2.light-mode .main-sidebar .nav-link:hover {
  background: rgba(52, 152, 219, 0.1) !important;
  color: #2980b9 !important;
}

body.theme-v2.light-mode .main-sidebar .nav-link.active {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3) !important;
}

body.theme-v2.light-mode .main-sidebar .nav-link i,
body.theme-v2.light-mode .main-sidebar .nav-link p {
  color: inherit !important;
}

body.theme-v2.light-mode .main-header {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05) !important;
}

body.theme-v2.light-mode .main-header .nav-link {
  color: #4a5568 !important;
}

body.theme-v2.light-mode .main-footer {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
  border-top: 1px solid #e2e8f0 !important;
  color: #718096 !important;
}

body.theme-v2.light-mode .content-wrapper {
  background: #f0f2f5 !important;
}

body.theme-v2.light-mode .content-wrapper > .card.card-body {
  background: #ffffff !important;
  border-radius: 16px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
  margin: 20px !important;
}

/* === TRANSIÇÕES SUAVES === */
body.theme-v2,
body.theme-v2 .main-header,
body.theme-v2 .main-footer,
body.theme-v2 .content-wrapper,
body.theme-v2 .content-wrapper > .card.card-body {
  transition: background 0.4s ease, 
              background-color 0.4s ease, 
              border-color 0.4s ease, 
              color 0.4s ease,
              box-shadow 0.4s ease !important;
}

/* === SCROLLBAR GLOBAL V2 === */
body.theme-v2::-webkit-scrollbar,
body.theme-v2 *::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body.theme-v2.dark-mode::-webkit-scrollbar-track,
body.theme-v2.dark-mode *::-webkit-scrollbar-track {
  background: #1a1d21;
}

body.theme-v2.dark-mode::-webkit-scrollbar-thumb,
body.theme-v2.dark-mode *::-webkit-scrollbar-thumb {
  background: #3d4450;
  border-radius: 4px;
}

body.theme-v2.dark-mode::-webkit-scrollbar-thumb:hover,
body.theme-v2.dark-mode *::-webkit-scrollbar-thumb:hover {
  background: #4f5866;
}

body.theme-v2.light-mode::-webkit-scrollbar-track,
body.theme-v2.light-mode *::-webkit-scrollbar-track {
  background: #f0f2f5;
}

body.theme-v2.light-mode::-webkit-scrollbar-thumb,
body.theme-v2.light-mode *::-webkit-scrollbar-thumb {
  background: #c1c7d0;
  border-radius: 4px;
}

body.theme-v2.light-mode::-webkit-scrollbar-thumb:hover,
body.theme-v2.light-mode *::-webkit-scrollbar-thumb:hover {
  background: #a0aab5;
}

/* === TEXTOS E TÍTULOS V2 LIGHT MODE === */
body.theme-v2.light-mode h1,
body.theme-v2.light-mode h2,
body.theme-v2.light-mode h3,
body.theme-v2.light-mode h4,
body.theme-v2.light-mode h5,
body.theme-v2.light-mode h6 {
  color: #2d3748 !important;
}

body.theme-v2.light-mode p,
body.theme-v2.light-mode span:not(.badge):not([class*="btn"]),
body.theme-v2.light-mode label {
  color: #4a5568 !important;
}

/* === FORMULÁRIOS V2 DARK === */
body.theme-v2.dark-mode .form-control {
  background-color: #2d333b !important;
  border: 2px solid #3d4450 !important;
  color: #e8eaed !important;
  border-radius: 10px !important;
  transition: all 0.3s ease !important;
}

body.theme-v2.dark-mode .form-control:focus {
  border-color: #3498db !important;
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.2) !important;
  background-color: #353b43 !important;
}

/* === FORMULÁRIOS V2 LIGHT === */
body.theme-v2.light-mode .form-control {
  background-color: #ffffff !important;
  border: 2px solid #e2e8f0 !important;
  color: #2d3748 !important;
  border-radius: 10px !important;
  transition: all 0.3s ease !important;
}

body.theme-v2.light-mode .form-control:focus {
  border-color: #3498db !important;
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15) !important;
  background-color: #fff !important;
}

/* === BOTÕES V2 === */
body.theme-v2 .btn {
  border-radius: 10px !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
  border: none !important;
  position: relative;
  overflow: hidden;
}

body.theme-v2 .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
}

body.theme-v2 .btn:active {
  transform: translateY(0);
}

body.theme-v2 .btn-primary {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
}

body.theme-v2 .btn-primary:hover {
  background: linear-gradient(135deg, #2980b9 0%, #1a5276 100%) !important;
}

body.theme-v2 .btn-success {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%) !important;
}

body.theme-v2 .btn-success:hover {
  background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%) !important;
}

body.theme-v2 .btn-danger {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
}

body.theme-v2 .btn-danger:hover {
  background: linear-gradient(135deg, #c0392b 0%, #922b21 100%) !important;
}

body.theme-v2 .btn-warning {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
  color: #fff !important;
}

body.theme-v2 .btn-warning:hover {
  background: linear-gradient(135deg, #e67e22 0%, #d35400 100%) !important;
}

body.theme-v2 .btn-info {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
}

body.theme-v2 .btn-info:hover {
  background: linear-gradient(135deg, #138496 0%, #0f6674 100%) !important;
}

body.theme-v2 .btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
}

body.theme-v2 .btn-secondary:hover {
  background: linear-gradient(135deg, #5a6268 0%, #495057 100%) !important;
}

/* === TABELAS V2 DARK === */
body.theme-v2.dark-mode table {
  background-color: #22272e !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}

body.theme-v2.dark-mode table th {
  background: linear-gradient(135deg, #2d333b 0%, #22272e 100%) !important;
  color: #e8eaed !important;
  border-bottom: 2px solid #3498db !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  font-size: 11px !important;
  letter-spacing: 0.5px !important;
}

/* TDs sem cor inline de background - modo escuro */
body.theme-v2.dark-mode table tr:not([style*="background-color"]) td:not([style*="background-color"]):not([data-usunome]) {
  background-color: transparent !important;
  color: #c2c7d0 !important;
  border-bottom: 1px solid #2d333b !important;
}

/* TDs em linhas COM cor de status - não aplicar background no TD */
body.theme-v2.dark-mode table tr[style*="background-color"] td:not([data-usunome]) {
  background-color: transparent !important;
  color: #c2c7d0 !important;
}

body.theme-v2.dark-mode table tbody tr:hover {
  background-color: rgba(52, 152, 219, 0.1) !important;
}

/* Zebra em tabelas genéricas - EXCETO tabelas com cores de status */
body.theme-v2.dark-mode table:not(#tabelaVisitas):not(#tabelaAndamentos) tbody tr:nth-child(even) {
  background-color: rgba(45, 51, 59, 0.5) !important;
}

/* === TABELAS V2 LIGHT === */
body.theme-v2.light-mode table {
  background-color: #ffffff !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
}

body.theme-v2.light-mode table th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  color: #2d3748 !important;
  border-bottom: 2px solid #3498db !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  font-size: 11px !important;
  letter-spacing: 0.5px !important;
}

/* TDs sem cor inline de background - modo claro */
body.theme-v2.light-mode table tr:not([style*="background-color"]) td:not([style*="background-color"]):not([data-usunome]) {
  background-color: transparent !important;
  color: #4a5568 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

/* TDs em linhas COM cor de status no modo claro - não aplicar background */
body.theme-v2.light-mode table tr[style*="background-color"] td:not([data-usunome]) {
  background-color: transparent !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode table tbody tr:hover {
  background-color: rgba(52, 152, 219, 0.08) !important;
}

/* Zebra em tabelas genéricas - EXCETO tabelas com cores de status */
body.theme-v2.light-mode table:not(#tabelaVisitas):not(#tabelaAndamentos) tbody tr:nth-child(even) {
  background-color: #f8fafc !important;
}

/* === MODAIS V2 DARK === */
body.theme-v2.dark-mode .modal {
  background-color: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(5px) !important;
}

body.theme-v2.dark-mode .modal > .modal-content,
body.theme-v2.dark-mode .modal > div[class*="modal-content"] {
  background: linear-gradient(135deg, #22272e 0%, #1a1d21 100%) !important;
  border: 1px solid #2d333b !important;
  border-radius: 16px !important;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5) !important;
}

/* === MODAIS V2 LIGHT === */
body.theme-v2.light-mode .modal {
  background-color: rgba(0, 0, 0, 0.4) !important;
  backdrop-filter: blur(5px) !important;
}

body.theme-v2.light-mode .modal > .modal-content,
body.theme-v2.light-mode .modal > div[class*="modal-content"] {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15) !important;
}

body.theme-v2.light-mode .modal h3,
body.theme-v2.light-mode .modal h4,
body.theme-v2.light-mode .modal h5 {
  color: #2d3748 !important;
}

/* === CARDS V2 === */
body.theme-v2.dark-mode .card:not(.card-body) {
  background: linear-gradient(135deg, #22272e 0%, #1a1d21 100%) !important;
  border: 1px solid #2d333b !important;
  border-radius: 16px !important;
}

body.theme-v2.light-mode .card:not(.card-body) {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
}

/* === ANIMAÇÕES === */
@keyframes v2-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes v2-slideIn {
  from { 
    opacity: 0;
    transform: translateY(-20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes v2-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

body.theme-v2 .modal {
  animation: v2-fadeIn 0.2s ease-out;
}

body.theme-v2 .modal > .modal-content,
body.theme-v2 .modal > div[class*="modal-content"] {
  animation: v2-slideIn 0.3s ease-out;
}

/* ============================================
   VIAGENS.EJS - ESTILOS V2
   ============================================ */

/* === CONTAINER PRINCIPAL VIAGENS === */
body.theme-v2.dark-mode #tabelaImplantacoes,
body.theme-v2.dark-mode #tabelaContratos {
  background-color: #22272e !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  border: 1px solid #2d333b !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

body.theme-v2.light-mode #tabelaImplantacoes,
body.theme-v2.light-mode #tabelaContratos {
  background-color: #ffffff !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

/* === CABEÇALHOS DAS TABELAS === */
body.theme-v2.dark-mode #tabelaImplantacoes th,
body.theme-v2.dark-mode #tabelaContratos th {
  background: linear-gradient(135deg, #1e2227 0%, #151719 100%) !important;
  color: #e8eaed !important;
  padding: 16px 12px !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
  border-bottom: 3px solid #3498db !important;
  position: relative;
}

body.theme-v2.dark-mode #tabelaImplantacoes th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  opacity: 0;
  transition: opacity 0.3s;
}

body.theme-v2.dark-mode #tabelaImplantacoes th:hover::after {
  opacity: 1;
}

body.theme-v2.light-mode #tabelaImplantacoes th,
body.theme-v2.light-mode #tabelaContratos th {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
  color: #2d3748 !important;
  padding: 16px 12px !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
  border-bottom: 3px solid #3498db !important;
}

/* === CÉLULAS DAS TABELAS === */
body.theme-v2.dark-mode #tabelaImplantacoes td,
body.theme-v2.dark-mode #tabelaContratos td {
  padding: 14px 12px !important;
  color: #c2c7d0 !important;
  border-bottom: 1px solid #2d333b !important;
  transition: all 0.2s ease !important;
}

body.theme-v2.light-mode #tabelaImplantacoes td:not([data-usunome]),
body.theme-v2.light-mode #tabelaContratos td {
  padding: 14px 12px !important;
  color: #4a5568 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  transition: all 0.2s ease !important;
}

/* TD do técnico - não aplicar estilos de fundo */
body.theme-v2.light-mode #tabelaImplantacoes td[data-usunome] {
  padding: 14px 12px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  transition: all 0.2s ease !important;
  /* NÃO definir background aqui - deixar o inline style funcionar */
}

/* === LINHAS HOVER === */
body.theme-v2.dark-mode #tabelaImplantacoes tbody tr:hover,
body.theme-v2.dark-mode #tabelaContratos tbody tr:hover {
  background-color: rgba(52, 152, 219, 0.12) !important;
  transform: scale(1.002);
}

body.theme-v2.light-mode #tabelaImplantacoes tbody tr:hover,
body.theme-v2.light-mode #tabelaContratos tbody tr:hover {
  background-color: rgba(52, 152, 219, 0.08) !important;
  transform: scale(1.002);
}

/* === LINHAS ALTERNADAS === */
body.theme-v2.dark-mode #tabelaImplantacoes tbody tr:nth-child(even),
body.theme-v2.dark-mode #tabelaContratos tbody tr:nth-child(even) {
  background-color: rgba(45, 51, 59, 0.4) !important;
}

body.theme-v2.light-mode #tabelaImplantacoes tbody tr:nth-child(even),
body.theme-v2.light-mode #tabelaContratos tbody tr:nth-child(even) {
  background-color: #f8fafc !important;
}

/* === MODAIS DE VIAGENS V2 DARK === */
body.theme-v2.dark-mode #modalGerenciarImplantacoes,
body.theme-v2.dark-mode #modalGerenciarContratos,
body.theme-v2.dark-mode #modalUploadContrato,
body.theme-v2.dark-mode #modalNavegadorFTP {
  background-color: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(8px) !important;
}

body.theme-v2.dark-mode #modalGerenciarImplantacoes > .modal-content,
body.theme-v2.dark-mode #modalGerenciarContratos > .modal-content,
body.theme-v2.dark-mode #modalUploadContrato > .modal-content,
body.theme-v2.dark-mode #modalNavegadorFTP > .modal-content {
  background: linear-gradient(145deg, #22272e 0%, #1a1d21 100%) !important;
  border: 1px solid #3d4450 !important;
  border-radius: 20px !important;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6) !important;
}

body.theme-v2.dark-mode #modalGerenciarImplantacoes h3,
body.theme-v2.dark-mode #modalGerenciarContratos h3,
body.theme-v2.dark-mode #modalUploadContrato h3,
body.theme-v2.dark-mode #modalNavegadorFTP h3 {
  color: #e8eaed !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
}

/* === MODAIS DE VIAGENS V2 LIGHT === */
body.theme-v2.light-mode #modalGerenciarImplantacoes,
body.theme-v2.light-mode #modalGerenciarContratos,
body.theme-v2.light-mode #modalUploadContrato,
body.theme-v2.light-mode #modalNavegadorFTP {
  background-color: rgba(0, 0, 0, 0.4) !important;
  backdrop-filter: blur(8px) !important;
}

body.theme-v2.light-mode #modalGerenciarImplantacoes > .modal-content,
body.theme-v2.light-mode #modalGerenciarContratos > .modal-content,
body.theme-v2.light-mode #modalUploadContrato > .modal-content,
body.theme-v2.light-mode #modalNavegadorFTP > .modal-content {
  background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%) !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px !important;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.2) !important;
}

body.theme-v2.light-mode #modalGerenciarImplantacoes h3,
body.theme-v2.light-mode #modalGerenciarContratos h3,
body.theme-v2.light-mode #modalUploadContrato h3,
body.theme-v2.light-mode #modalNavegadorFTP h3 {
  color: #2d3748 !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
}

/* === CARDS DE IMPLANTAÇÃO V2 === */
body.theme-v2.dark-mode .implantacao-card {
  background: linear-gradient(145deg, #2d333b 0%, #22272e 100%) !important;
  border: 1px solid #3d4450 !important;
  border-radius: 16px !important;
  padding: 20px !important;
  transition: all 0.3s ease !important;
  cursor: pointer;
}

body.theme-v2.dark-mode .implantacao-card:hover {
  border-color: #3498db !important;
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(52, 152, 219, 0.2) !important;
}

body.theme-v2.dark-mode .implantacao-card .card-title {
  color: #3498db !important;
  font-weight: 700 !important;
}

body.theme-v2.light-mode .implantacao-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%) !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 20px !important;
  transition: all 0.3s ease !important;
  cursor: pointer;
}

body.theme-v2.light-mode .implantacao-card:hover {
  border-color: #3498db !important;
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(52, 152, 219, 0.15) !important;
}

body.theme-v2.light-mode .implantacao-card .card-title {
  color: #2980b9 !important;
  font-weight: 700 !important;
}

body.theme-v2.light-mode .implantacao-card p {
  color: #4a5568 !important;
}

/* === FILTROS V2 === */
body.theme-v2.dark-mode #filtroStatusContainer {
  background: #1e2227 !important;
  border: 1px solid #3d4450 !important;
  border-radius: 12px !important;
}

body.theme-v2.dark-mode .status-checkbox-label {
  background: #2d333b !important;
  border: 1px solid #3d4450 !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
}

body.theme-v2.dark-mode .status-checkbox-label:hover {
  background: #353b43 !important;
  border-color: #4f5866 !important;
}

body.theme-v2.dark-mode .status-checkbox-label.checked {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
  border-color: #3498db !important;
  color: #fff !important;
}

body.theme-v2.light-mode #filtroStatusContainer {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
}

body.theme-v2.light-mode .status-checkbox-label {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  color: #4a5568 !important;
  transition: all 0.2s ease !important;
}

body.theme-v2.light-mode .status-checkbox-label:hover {
  background: #f8f9fa !important;
  border-color: #d1d5db !important;
}

body.theme-v2.light-mode .status-checkbox-label.checked {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
  border-color: #3498db !important;
  color: #fff !important;
}

/* === NAVEGADOR FTP V2 === */
body.theme-v2.dark-mode #listaPastasFTP .pasta-item {
  background: #2d333b !important;
  border: 1px solid #3d4450 !important;
  border-radius: 10px !important;
  transition: all 0.2s ease !important;
}

body.theme-v2.dark-mode #listaPastasFTP .pasta-item:hover {
  background: #353b43 !important;
  border-color: #ffd700 !important;
  transform: translateX(4px);
}

body.theme-v2.dark-mode #listaArquivosFTP .arquivo-item {
  background: #2d333b !important;
  border: 2px solid #3d4450 !important;
  border-radius: 12px !important;
  transition: all 0.2s ease !important;
}

body.theme-v2.dark-mode #listaArquivosFTP .arquivo-item:hover {
  background: #353b43 !important;
  border-color: #2ecc71 !important;
}

body.theme-v2.dark-mode #listaArquivosFTP .arquivo-item.selecionado {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%) !important;
  border-color: #2ecc71 !important;
}

body.theme-v2.light-mode #listaPastasFTP .pasta-item {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  transition: all 0.2s ease !important;
}

body.theme-v2.light-mode #listaPastasFTP .pasta-item:hover {
  background: #f8f9fa !important;
  border-color: #f59e0b !important;
  transform: translateX(4px);
}

body.theme-v2.light-mode #listaArquivosFTP .arquivo-item {
  background: #ffffff !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 12px !important;
  transition: all 0.2s ease !important;
}

body.theme-v2.light-mode #listaArquivosFTP .arquivo-item:hover {
  background: #f8f9fa !important;
  border-color: #2ecc71 !important;
}

body.theme-v2.light-mode #listaArquivosFTP .arquivo-item.selecionado {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%) !important;
  border-color: #2ecc71 !important;
}

/* === BADGES DE STATUS V2 === */
body.theme-v2 .badge {
  border-radius: 20px !important;
  padding: 6px 12px !important;
  font-weight: 600 !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

body.theme-v2 .badge-success,
body.theme-v2 .badge-green {
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.2) 0%, rgba(39, 174, 96, 0.2) 100%) !important;
  color: #2ecc71 !important;
  border: 1px solid rgba(46, 204, 113, 0.3) !important;
}

body.theme-v2 .badge-warning,
body.theme-v2 .badge-yellow {
  background: linear-gradient(135deg, rgba(243, 156, 18, 0.2) 0%, rgba(230, 126, 34, 0.2) 100%) !important;
  color: #f39c12 !important;
  border: 1px solid rgba(243, 156, 18, 0.3) !important;
}

body.theme-v2 .badge-danger,
body.theme-v2 .badge-red {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.2) 0%, rgba(192, 57, 43, 0.2) 100%) !important;
  color: #e74c3c !important;
  border: 1px solid rgba(231, 76, 60, 0.3) !important;
}

body.theme-v2 .badge-info,
body.theme-v2 .badge-blue {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.2) 0%, rgba(41, 128, 185, 0.2) 100%) !important;
  color: #3498db !important;
  border: 1px solid rgba(52, 152, 219, 0.3) !important;
}

body.theme-v2 .badge-secondary {
  background: linear-gradient(135deg, rgba(108, 117, 125, 0.2) 0%, rgba(90, 98, 104, 0.2) 100%) !important;
  color: #95a5a6 !important;
  border: 1px solid rgba(108, 117, 125, 0.3) !important;
}

/* === BOTÕES DE AÇÃO PEQUENOS V2 === */
body.theme-v2 .btn-sm {
  border-radius: 8px !important;
  padding: 8px 14px !important;
  font-size: 12px !important;
  min-width: 36px !important;
  min-height: 36px !important;
}

body.theme-v2 .btn-sm i {
  font-size: 13px !important;
}

/* === BOTÃO FECHAR MODAL V2 === */
body.theme-v2.dark-mode .modal-content span[id*="fechar"] {
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(231, 76, 60, 0.15) !important;
  border-radius: 10px !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}

body.theme-v2.dark-mode .modal-content span[id*="fechar"]:hover {
  background: #e74c3c !important;
  color: #fff !important;
  transform: rotate(90deg);
}

body.theme-v2.light-mode .modal-content span[id*="fechar"] {
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(231, 76, 60, 0.1) !important;
  border-radius: 10px !important;
  color: #e74c3c !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}

body.theme-v2.light-mode .modal-content span[id*="fechar"]:hover {
  background: #e74c3c !important;
  color: #fff !important;
  transform: rotate(90deg);
}

/* === EXTRA COLUMN (VERDE) V2 === */
body.theme-v2 .extra-column {
  color: #2ecc71 !important;
  font-weight: 700 !important;
}

/* === FILTROS DE CONTRATOS - MODO CLARO (sobrescrever inline styles) === */
body.theme-v2.light-mode #modalGerenciarContratos > .modal-content > div:nth-child(2),
body.theme-v2.light-mode #modalGerenciarContratos div[style*="linear-gradient(135deg, #2c2f33"] {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

body.theme-v2.light-mode #modalGerenciarContratos label[style*="color: white"] {
  color: #2d3748 !important;
}

body.theme-v2.light-mode #modalGerenciarContratos #filtroStatusContainer,
body.theme-v2.light-mode #modalGerenciarContratos div[style*="background: #36393f"] {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}

body.theme-v2.light-mode #modalGerenciarContratos .status-checkbox-label,
body.theme-v2.light-mode #modalGerenciarContratos label[style*="background: #4f5459"] {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #4a5568 !important;
}

body.theme-v2.light-mode #modalGerenciarContratos .status-checkbox-label:hover {
  background: #e2e8f0 !important;
  border-color: #d1d5db !important;
}

body.theme-v2.light-mode #modalGerenciarContratos .status-checkbox-label.checked {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
  border-color: #3498db !important;
  color: #fff !important;
}

body.theme-v2.light-mode #modalGerenciarContratos input[style*="background-color: #4f5459"],
body.theme-v2.light-mode #modalGerenciarContratos input[style*="background-color: rgb(79, 84, 89)"] {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode #modalGerenciarContratos button[style*="background: #4f545c"],
body.theme-v2.light-mode #modalGerenciarContratos button[style*="background: rgb(79, 84, 92)"] {
  background: linear-gradient(135deg, #e2e8f0 0%, #d1d5db 100%) !important;
  color: #4a5568 !important;
}

body.theme-v2.light-mode #modalGerenciarContratos small[style*="color: #aaa"] {
  color: #718096 !important;
}

/* === MODAL UPLOAD CONTRATO V2 - CORREÇÕES === */
body.theme-v2 #modalUploadContrato {
  padding: 0 !important;
  align-items: center !important;
  justify-content: center !important;
}

body.theme-v2 #modalUploadContrato > .modal-content {
  margin: 20px auto !important;
  max-height: calc(100vh - 40px) !important;
}

/* Mobile - Modal Upload ocupa tela toda */
@media (max-width: 767.98px) {
  body.theme-v2 #modalUploadContrato {
    padding: 0 !important;
    align-items: stretch !important;
  }
  
  body.theme-v2 #modalUploadContrato > .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }
  
  body.theme-v2 #modalGerenciarContratos {
    padding: 0 !important;
  }
  
  body.theme-v2 #modalGerenciarContratos > .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }
}

/* === STATUS DE CONTRATOS - CORES MODO CLARO === */
body.theme-v2.light-mode #tabelaContratos .text-warning,
body.theme-v2.light-mode #modalGerenciarContratos .text-warning {
  color: #d97706 !important;
  font-weight: 600 !important;
}

body.theme-v2.light-mode #tabelaContratos .text-success,
body.theme-v2.light-mode #modalGerenciarContratos .text-success {
  color: #059669 !important;
  font-weight: 600 !important;
}

body.theme-v2.light-mode #tabelaContratos .text-danger,
body.theme-v2.light-mode #modalGerenciarContratos .text-danger {
  color: #dc2626 !important;
  font-weight: 600 !important;
}

body.theme-v2.light-mode #tabelaContratos .text-info,
body.theme-v2.light-mode #modalGerenciarContratos .text-info {
  color: #0284c7 !important;
  font-weight: 600 !important;
}

body.theme-v2.light-mode #tabelaContratos .text-secondary,
body.theme-v2.light-mode #modalGerenciarContratos .text-secondary {
  color: #6b7280 !important;
  font-weight: 600 !important;
}

/* Tabela de contratos - modo claro */
body.theme-v2.light-mode #tabelaContratos {
  color: #2d3748 !important;
}

body.theme-v2.light-mode #tabelaContratos thead {
  background: #f1f5f9 !important;
}

body.theme-v2.light-mode #tabelaContratos thead th {
  color: #4a5568 !important;
  border-bottom: 2px solid #e2e8f0 !important;
}

body.theme-v2.light-mode #tabelaContratos tbody td {
  color: #4a5568 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

body.theme-v2.light-mode #tabelaContratos tbody tr:hover {
  background-color: #f1f5f9 !important;
}

/* === MODAL UPLOAD CONTRATO - UNIFORMIZAR CORES === */
/* Modo Escuro - título e rodapé com mesma cor do fundo do modal */
body.theme-v2.dark-mode #modalUploadContrato .modal-content > div:first-child {
  background: linear-gradient(145deg, #22272e 0%, #1a1d21 100%) !important;
  padding-bottom: 15px !important;
  margin: -20px -20px 20px -20px !important;
  padding: 20px 20px 15px 20px !important;
  border-radius: 20px 20px 0 0 !important;
}

body.theme-v2.dark-mode #modalUploadContrato .modal-content form > div:last-of-type {
  background: linear-gradient(145deg, #22272e 0%, #1a1d21 100%) !important;
  border-top: 1px solid #3d4450 !important;
  margin: 10px -20px -20px -20px !important;
  padding: 15px 20px 20px 20px !important;
  border-radius: 0 0 20px 20px !important;
}

/* Modo Claro - título e rodapé com fundo claro do modal */
body.theme-v2.light-mode #modalUploadContrato .modal-content > div:first-child {
  background: linear-gradient(145deg, #f8f9fa 0%, #edf2f7 100%) !important;
  padding-bottom: 15px !important;
  margin: -20px -20px 20px -20px !important;
  padding: 20px 20px 15px 20px !important;
  border-radius: 20px 20px 0 0 !important;
}

body.theme-v2.light-mode #modalUploadContrato .modal-content form > div:last-of-type {
  background: linear-gradient(145deg, #f8f9fa 0%, #edf2f7 100%) !important;
  border-top: 1px solid #e2e8f0 !important;
  margin: 10px -20px -20px -20px !important;
  padding: 15px 20px 20px 20px !important;
  border-radius: 0 0 20px 20px !important;
}

body.theme-v2.light-mode #modalUploadContrato .modal-content {
  background: #ffffff !important;
}

body.theme-v2.light-mode #modalUploadContrato h3 {
  color: #2d3748 !important;
}

body.theme-v2.light-mode #modalUploadContrato span[style*="color: white"] {
  color: #4a5568 !important;
}

body.theme-v2.light-mode #modalUploadContrato label[style*="color: white"] {
  color: #4a5568 !important;
}

body.theme-v2.light-mode #modalUploadContrato small[style*="color: #aaa"] {
  color: #718096 !important;
}

body.theme-v2.light-mode #modalUploadContrato input[style*="background-color: #4f5459"],
body.theme-v2.light-mode #modalUploadContrato textarea[style*="background-color: #4f5459"],
body.theme-v2.light-mode #modalUploadContrato select[style*="background-color: #4f5459"] {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode #modalUploadContrato .btn-secondary {
  background: #e2e8f0 !important;
  color: #4a5568 !important;
  border-color: #d1d5db !important;
}

/* === TELA DE IMPORTAR - MODO CLARO === */
body.theme-v2.light-mode input[type="file"] {
  background-color: #ffffff !important;
  color: #2d3748 !important;
  border: 1px solid #e2e8f0 !important;
}

body.theme-v2.light-mode input[type="file"]::file-selector-button {
  background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%) !important;
  color: white !important;
  border: none !important;
  padding: 8px 16px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  margin-right: 10px !important;
}

body.theme-v2.light-mode #btnLimpar {
  background-color: #e2e8f0 !important;
  color: #4a5568 !important;
  border: 1px solid #d1d5db !important;
}

body.theme-v2.light-mode #btnLimpar:hover {
  background-color: #d1d5db !important;
}

/* Também para modo escuro - melhorar visual */
body.theme-v2.dark-mode input[type="file"] {
  background-color: #2d333b !important;
  color: #e8eaed !important;
  border: 1px solid #444c56 !important;
  border-radius: 8px !important;
  padding: 10px !important;
}

body.theme-v2.dark-mode input[type="file"]::file-selector-button {
  background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%) !important;
  color: white !important;
  border: none !important;
  padding: 8px 16px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  margin-right: 10px !important;
}

body.theme-v2.dark-mode #btnLimpar {
  background: linear-gradient(135deg, #4a5568 0%, #3d4450 100%) !important;
  border: 1px solid #5a6270 !important;
}

/* === CORES DE VALIDAÇÃO MAIS FORTES === */
/* Modo Escuro */
body.theme-v2.dark-mode .campo-invalido {
  border: 3px solid #ef4444 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.4), 0 0 15px rgba(239, 68, 68, 0.5) !important;
  background-color: rgba(239, 68, 68, 0.15) !important;
}

body.theme-v2.dark-mode .campo-valido {
  border: 3px solid #22c55e !important;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.4), 0 0 15px rgba(34, 197, 94, 0.5) !important;
  background-color: rgba(34, 197, 94, 0.15) !important;
}

/* Modo Claro - cores ainda mais intensas */
body.theme-v2.light-mode .campo-invalido {
  border: 3px solid #dc2626 !important;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.35), 0 0 20px rgba(220, 38, 38, 0.4), inset 0 0 10px rgba(220, 38, 38, 0.1) !important;
  background-color: #fef2f2 !important;
  outline: none !important;
}

body.theme-v2.light-mode .campo-valido {
  border: 3px solid #16a34a !important;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.35), 0 0 20px rgba(22, 163, 74, 0.4), inset 0 0 10px rgba(22, 163, 74, 0.1) !important;
  background-color: #f0fdf4 !important;
  outline: none !important;
}

/* Fallback para seletores sem tema específico */
body.theme-v2 .campo-invalido {
  border: 3px solid #ef4444 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.4), 0 0 15px rgba(239, 68, 68, 0.5) !important;
}

body.theme-v2 .campo-valido {
  border: 3px solid #22c55e !important;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.4), 0 0 15px rgba(34, 197, 94, 0.5) !important;
}

/* Placeholder mais visível para campos inválidos */
body.theme-v2 .campo-invalido::placeholder {
  color: #f87171 !important;
}

body.theme-v2.light-mode .campo-invalido::placeholder {
  color: #dc2626 !important;
}

/* Tabela de importar - modo claro */
body.theme-v2.light-mode #tabela {
  background-color: #ffffff !important;
}

body.theme-v2.light-mode #tabela th {
  background-color: #f1f5f9 !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode #tabela td {
  background-color: #ffffff !important;
  color: #2d3748 !important;
  border-color: #e2e8f0 !important;
}

body.theme-v2.light-mode #tabela input[type="text"],
body.theme-v2.light-mode #tabela select {
  background-color: #ffffff !important;
  color: #2d3748 !important;
  border: 1px solid #e2e8f0 !important;
}

body.theme-v2.light-mode #tabela input[type="text"]:focus,
body.theme-v2.light-mode #tabela select:focus {
  border-color: #5865f2 !important;
  background-color: #f8fafc !important;
}

/* Aplicar também no html para garantir o tema antes do body */
html.theme-v2.light-mode {
  background-color: #f0f2f5;
}

html.theme-v2.dark-mode {
  background-color: #1a1d21;
}

/* === ESTILOS INLINE OVERRIDE GERAL (para elementos com style inline) === */
body.theme-v2.light-mode [style*="background-color: #36393f"],
body.theme-v2.light-mode [style*="background-color:#36393f"],
body.theme-v2.light-mode [style*="background: #36393f"],
body.theme-v2.light-mode [style*="background:#36393f"] {
  background: #ffffff !important;
  background-color: #ffffff !important;
}

body.theme-v2.light-mode [style*="background-color: #2c2f33"],
body.theme-v2.light-mode [style*="background-color:#2c2f33"],
body.theme-v2.light-mode [style*="background: #2c2f33"],
body.theme-v2.light-mode [style*="background:#2c2f33"],
body.theme-v2.light-mode [style*="background: linear-gradient(135deg, #2c2f33"] {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

body.theme-v2.light-mode [style*="background-color: #4f5459"],
body.theme-v2.light-mode [style*="background-color:#4f5459"],
body.theme-v2.light-mode [style*="background: #4f5459"],
body.theme-v2.light-mode [style*="background:#4f5459"],
body.theme-v2.light-mode [style*="background-color: rgb(79, 84, 89)"] {
  background: #f1f5f9 !important;
  background-color: #f1f5f9 !important;
}

body.theme-v2.light-mode [style*="color: white"],
body.theme-v2.light-mode [style*="color:white"],
body.theme-v2.light-mode [style*="color: #fff"],
body.theme-v2.light-mode [style*="color:#fff"] {
  color: #2d3748 !important;
}

body.theme-v2.light-mode [style*="border: 1px solid #4f545c"],
body.theme-v2.light-mode [style*="border: 1px solid #5d6269"],
body.theme-v2.light-mode [style*="border: 1px solid #202225"] {
  border-color: #e2e8f0 !important;
}

body.theme-v2.light-mode [style*="color: #c2c7d0"] {
  color: #4a5568 !important;
}

body.theme-v2.light-mode [style*="color: #aaa"] {
  color: #718096 !important;
}

/* === PREVENÇÃO DE FLASH NO CARREGAMENTO === */
html.theme-v2 body {
  opacity: 1;
  transition: opacity 0.1s ease;
}

/* Quando V2, esconde rapidamente o estilo AdminLTE padrão */
html.theme-v2 .sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active,
html.theme-v2 .sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active:hover {
  background-color: transparent !important;
}

/* ============================================
   ANIMAÇÕES E EFEITOS VISUAIS V2
   ============================================ */

/* === RIPPLE EFFECT PARA BOTÕES === */
body.theme-v2 .btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

body.theme-v2 .btn:active::after {
  width: 200px;
  height: 200px;
  opacity: 0;
}

/* === SHIMMER LOADING EFFECT === */
@keyframes v2-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

body.theme-v2 .loading-shimmer {
  background: linear-gradient(90deg, 
    rgba(255,255,255,0) 0%, 
    rgba(255,255,255,0.1) 50%, 
    rgba(255,255,255,0) 100%
  );
  background-size: 200% 100%;
  animation: v2-shimmer 1.5s infinite;
}

/* === HOVER GLOW EFFECT === */
body.theme-v2 .btn-primary:hover {
  box-shadow: 0 0 25px rgba(52, 152, 219, 0.4) !important;
}

body.theme-v2 .btn-success:hover {
  box-shadow: 0 0 25px rgba(46, 204, 113, 0.4) !important;
}

body.theme-v2 .btn-danger:hover {
  box-shadow: 0 0 25px rgba(231, 76, 60, 0.4) !important;
}

body.theme-v2 .btn-warning:hover {
  box-shadow: 0 0 25px rgba(243, 156, 18, 0.4) !important;
}

body.theme-v2 .btn-info:hover {
  box-shadow: 0 0 25px rgba(23, 162, 184, 0.4) !important;
}

/* === FOCUS RING ANIMADO === */
body.theme-v2 .form-control:focus {
  animation: v2-focusRing 0.3s ease-out;
}

@keyframes v2-focusRing {
  0% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.5); }
  100% { box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.2); }
}

/* === CARD HOVER TILT EFFECT === */
body.theme-v2 .implantacao-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

body.theme-v2 .implantacao-card:hover {
  transform: translateY(-4px) rotateX(2deg);
}

/* === FADE IN UP ANIMATION === */
@keyframes v2-fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.theme-v2 .modal {
  animation: v2-fadeIn 0.25s ease-out;
}

body.theme-v2 .modal > .modal-content,
body.theme-v2 .modal > div[style*="modal-content"] {
  animation: v2-fadeInUp 0.35s ease-out;
}

/* === BOUNCE IN ANIMATION === */
@keyframes v2-bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

body.theme-v2 .toast,
body.theme-v2 .alert {
  animation: v2-bounceIn 0.4s ease-out;
}

/* === TABLE ROW SLIDE IN === */
body.theme-v2 table tbody tr {
  animation: v2-slideInRow 0.3s ease-out;
  animation-fill-mode: both;
}

@keyframes v2-slideInRow {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Delay progressivo para cada linha */
body.theme-v2 table tbody tr:nth-child(1) { animation-delay: 0.02s; }
body.theme-v2 table tbody tr:nth-child(2) { animation-delay: 0.04s; }
body.theme-v2 table tbody tr:nth-child(3) { animation-delay: 0.06s; }
body.theme-v2 table tbody tr:nth-child(4) { animation-delay: 0.08s; }
body.theme-v2 table tbody tr:nth-child(5) { animation-delay: 0.10s; }
body.theme-v2 table tbody tr:nth-child(6) { animation-delay: 0.12s; }
body.theme-v2 table tbody tr:nth-child(7) { animation-delay: 0.14s; }
body.theme-v2 table tbody tr:nth-child(8) { animation-delay: 0.16s; }
body.theme-v2 table tbody tr:nth-child(9) { animation-delay: 0.18s; }
body.theme-v2 table tbody tr:nth-child(10) { animation-delay: 0.20s; }

/* === SPINNER ANIMATION === */
@keyframes v2-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

body.theme-v2 .fa-spinner,
body.theme-v2 .spinner {
  animation: v2-spin 1s linear infinite;
}

/* === PULSE ANIMATION PARA BADGES === */
@keyframes v2-badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

body.theme-v2 .badge-danger.pulse,
body.theme-v2 .navbar-badge {
  animation: v2-badgePulse 2s ease-in-out infinite;
}

/* === SMOOTH TRANSITIONS GLOBAIS === */
body.theme-v2 * {
  transition-property: color, background-color, border-color, box-shadow, transform, opacity;
  transition-duration: 0.2s;
  transition-timing-function: ease-out;
}

/* Elementos que não devem ter transição de tudo */
body.theme-v2 .modal,
body.theme-v2 .modal-content,
body.theme-v2 input,
body.theme-v2 textarea,
body.theme-v2 select {
  transition-property: border-color, box-shadow, background-color;
}

/* === RESPONSIVIDADE MOBILE V2 === */
@media (max-width: 768px) {
  body.theme-v2 #tabelaImplantacoes tbody tr,
  body.theme-v2 #tabelaContratos tbody tr {
    border-radius: 12px !important;
    margin-bottom: 12px !important;
    padding: 16px !important;
  }
  
  body.theme-v2.dark-mode #tabelaImplantacoes tbody tr,
  body.theme-v2.dark-mode #tabelaContratos tbody tr {
    background: linear-gradient(145deg, #22272e 0%, #1e2227 100%) !important;
    border: 1px solid #3d4450 !important;
  }
  
  body.theme-v2.light-mode #tabelaImplantacoes tbody tr,
  body.theme-v2.light-mode #tabelaContratos tbody tr {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%) !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  }
  
  body.theme-v2 .modal > .modal-content,
  body.theme-v2 .modal > div[style*="modal-content"] {
    border-radius: 16px 16px 0 0 !important;
    margin: 0 !important;
    max-height: 95vh !important;
  }
  
  body.theme-v2 .btn {
    padding: 12px 20px !important;
    font-size: 14px !important;
  }
  
  body.theme-v2 .btn-sm {
    padding: 10px 16px !important;
  }
}

/* ============================================
   USUARIOCADASTRO.EJS - ESTILOS V2
   ============================================ */

/* === TABELA DE USUÁRIOS === */
body.theme-v2.dark-mode #tabelaUsuarios {
  background-color: #22272e !important;
  border-radius: 16px !important;
}

body.theme-v2.light-mode #tabelaUsuarios {
  background-color: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

/* === LOADING OVERLAY V2 === */
body.theme-v2.dark-mode #loadingOverlay {
  background-color: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(5px) !important;
}

body.theme-v2.dark-mode #loadingOverlay .loadingContent {
  background: linear-gradient(145deg, #22272e 0%, #1a1d21 100%) !important;
  color: #e8eaed !important;
  border: 1px solid #3d4450 !important;
  border-radius: 16px !important;
}

body.theme-v2.dark-mode #loadingOverlay .spinner {
  border-color: #3d4450 !important;
  border-top-color: #3498db !important;
}

body.theme-v2.light-mode #loadingOverlay {
  background-color: rgba(0, 0, 0, 0.4) !important;
  backdrop-filter: blur(5px) !important;
}

body.theme-v2.light-mode #loadingOverlay .loadingContent {
  background: #ffffff !important;
  color: #2d3748 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

body.theme-v2.light-mode #loadingOverlay .spinner {
  border-color: #e2e8f0 !important;
  border-top-color: #3498db !important;
}

/* === MODAIS DE USUARIO V2 DARK === */
body.theme-v2.dark-mode #modalCadastro,
body.theme-v2.dark-mode #modalEditar,
body.theme-v2.dark-mode #modalFoto,
body.theme-v2.dark-mode #modalPermissoes,
body.theme-v2.dark-mode #modalMensagemAniversario {
  background-color: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(8px) !important;
}

body.theme-v2.dark-mode #modalCadastro .modal-content,
body.theme-v2.dark-mode #modalEditar .modal-content,
body.theme-v2.dark-mode #modalFoto .modal-content {
  background: linear-gradient(145deg, #22272e 0%, #1a1d21 100%) !important;
  border: 1px solid #3d4450 !important;
  border-radius: 20px !important;
  color: #e8eaed !important;
}

body.theme-v2.dark-mode #modalCadastro .modal-title,
body.theme-v2.dark-mode #modalEditar .modal-title,
body.theme-v2.dark-mode #modalFoto h2 {
  color: #3498db !important;
}

body.theme-v2.dark-mode #modalCadastro .close,
body.theme-v2.dark-mode #modalEditar .close,
body.theme-v2.dark-mode #modalFoto .close {
  color: #e8eaed !important;
  opacity: 0.8 !important;
}

body.theme-v2.dark-mode #modalCadastro .close:hover,
body.theme-v2.dark-mode #modalEditar .close:hover,
body.theme-v2.dark-mode #modalFoto .close:hover {
  color: #e74c3c !important;
  opacity: 1 !important;
}

body.theme-v2.dark-mode #modalCadastro label,
body.theme-v2.dark-mode #modalEditar label {
  color: #c2c7d0 !important;
}

body.theme-v2.dark-mode #modalCadastro .form-text,
body.theme-v2.dark-mode #modalEditar .form-text {
  color: #95a5a6 !important;
}

/* === MODAIS DE USUARIO V2 LIGHT === */
body.theme-v2.light-mode #modalCadastro,
body.theme-v2.light-mode #modalEditar,
body.theme-v2.light-mode #modalFoto,
body.theme-v2.light-mode #modalPermissoes,
body.theme-v2.light-mode #modalMensagemAniversario {
  background-color: rgba(0, 0, 0, 0.4) !important;
  backdrop-filter: blur(8px) !important;
}

body.theme-v2.light-mode #modalCadastro .modal-content,
body.theme-v2.light-mode #modalEditar .modal-content,
body.theme-v2.light-mode #modalFoto .modal-content {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px !important;
  color: #2d3748 !important;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15) !important;
}

body.theme-v2.light-mode #modalCadastro .modal-title,
body.theme-v2.light-mode #modalEditar .modal-title,
body.theme-v2.light-mode #modalFoto h2 {
  color: #2980b9 !important;
}

body.theme-v2.light-mode #modalCadastro .close,
body.theme-v2.light-mode #modalEditar .close,
body.theme-v2.light-mode #modalFoto .close {
  color: #4a5568 !important;
}

body.theme-v2.light-mode #modalCadastro .close:hover,
body.theme-v2.light-mode #modalEditar .close:hover,
body.theme-v2.light-mode #modalFoto .close:hover {
  color: #e74c3c !important;
}

body.theme-v2.light-mode #modalCadastro label,
body.theme-v2.light-mode #modalEditar label {
  color: #4a5568 !important;
}

body.theme-v2.light-mode #modalCadastro .form-text,
body.theme-v2.light-mode #modalEditar .form-text {
  color: #718096 !important;
}

/* Modal de Permissões e Aniversário (já tem estilos inline escuros) */
body.theme-v2.light-mode #modalPermissoes > .modal-content,
body.theme-v2.light-mode #modalMensagemAniversario > .modal-content {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode #modalPermissoes h3,
body.theme-v2.light-mode #modalMensagemAniversario h3 {
  color: #2980b9 !important;
}

body.theme-v2.light-mode #modalPermissoes label,
body.theme-v2.light-mode #modalMensagemAniversario label {
  color: #4a5568 !important;
}

body.theme-v2.light-mode #modalPermissoes #permStatus,
body.theme-v2.light-mode #modalMensagemAniversario small {
  color: #718096 !important;
}

body.theme-v2.light-mode #modalPermissoes div[style*="border: 1px solid #4f5459"],
body.theme-v2.light-mode #modalMensagemAniversario div[style*="border: 1px solid #4f5459"] {
  border-color: #e2e8f0 !important;
  background: #f8f9fa !important;
}

body.theme-v2.light-mode #modalMensagemAniversario textarea {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #2d3748 !important;
}

/* === BOTÃO GRAVAR ESTILIZADO V2 === */
body.theme-v2 .botao-gravar {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
  border-radius: 12px !important;
  transition: all 0.3s ease !important;
}

body.theme-v2 .botao-gravar:hover {
  background: linear-gradient(135deg, #2980b9 0%, #1a5276 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4) !important;
}

/* === FOTO THUMBNAIL V2 === */
body.theme-v2 .foto-thumbnail {
  border-radius: 10px !important;
  border: 3px solid transparent !important;
  transition: all 0.3s ease !important;
}

body.theme-v2 .foto-thumbnail:hover {
  border-color: #3498db !important;
  box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3) !important;
}

/* ============================================
   DASHBOARD.EJS - ESTILOS V2
   ============================================ */

/* === CONTAINER DASHBOARD V2 DARK === */
body.theme-v2.dark-mode .dashboard-container {
  background-color: transparent !important;
}

body.theme-v2.dark-mode .dashboard-header h1 {
  color: #e8eaed !important;
}

/* Cards V2 Dark */
body.theme-v2.dark-mode .dashboard-container .card,
body.theme-v2.dark-mode .dashboard-container .grafico-card,
body.theme-v2.dark-mode .dashboard-container .mapa-container,
body.theme-v2.dark-mode .dashboard-container .rodape-totais {
  background: linear-gradient(145deg, #22272e 0%, #1a1d21 100%) !important;
  border: 1px solid #3d4450 !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

body.theme-v2.dark-mode .dashboard-container .card h3,
body.theme-v2.dark-mode .dashboard-container .grafico-card h3,
body.theme-v2.dark-mode .dashboard-container .mapa-container h3 {
  color: #c2c7d0 !important;
}

body.theme-v2.dark-mode .dashboard-container .card .valor {
  color: #3498db !important;
}

body.theme-v2.dark-mode .dashboard-container .rodape-totais .item .valor {
  color: #2ecc71 !important;
}

body.theme-v2.dark-mode .dashboard-container .rodape-totais .item {
  border-color: #3d4450 !important;
}

body.theme-v2.dark-mode .dashboard-container .filtro-periodo select {
  background: linear-gradient(145deg, #2d333b 0%, #22272e 100%) !important;
  border: 1px solid #3d4450 !important;
  color: #e8eaed !important;
}

/* Legenda do Mapa V2 Dark */
body.theme-v2.dark-mode .mapa-legenda {
  background: linear-gradient(145deg, #22272e 0%, #1a1d21 100%) !important;
  border: 1px solid #3d4450 !important;
}

/* === CONTAINER DASHBOARD V2 LIGHT === */
body.theme-v2.light-mode .dashboard-container {
  background-color: transparent !important;
}

body.theme-v2.light-mode .dashboard-header h1 {
  color: #2d3748 !important;
}

/* Cards V2 Light */
body.theme-v2.light-mode .dashboard-container .card,
body.theme-v2.light-mode .dashboard-container .grafico-card,
body.theme-v2.light-mode .dashboard-container .mapa-container,
body.theme-v2.light-mode .dashboard-container .rodape-totais {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

body.theme-v2.light-mode .dashboard-container .card h3,
body.theme-v2.light-mode .dashboard-container .grafico-card h3,
body.theme-v2.light-mode .dashboard-container .mapa-container h3 {
  color: #718096 !important;
}

body.theme-v2.light-mode .dashboard-container .card .valor {
  color: #2980b9 !important;
}

body.theme-v2.light-mode .dashboard-container .rodape-totais .item h4 {
  color: #718096 !important;
}

body.theme-v2.light-mode .dashboard-container .rodape-totais .item .valor {
  color: #27ae60 !important;
}

body.theme-v2.light-mode .dashboard-container .rodape-totais .item {
  border-color: #e2e8f0 !important;
}

body.theme-v2.light-mode .dashboard-container .filtro-periodo select {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode .dashboard-container .filtro-periodo select:hover {
  background: #f8f9fa !important;
}

/* Legenda do Mapa V2 Light */
body.theme-v2.light-mode .mapa-legenda {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

body.theme-v2.light-mode .mapa-legenda h4,
body.theme-v2.light-mode .mapa-legenda-item {
  color: #2d3748 !important;
}

/* Loading V2 */
body.theme-v2.dark-mode .dashboard-container .loading {
  color: #e8eaed !important;
}

body.theme-v2.light-mode .dashboard-container .loading {
  color: #4a5568 !important;
}

/* ============================================
   LOGIN PAGE - ESTILOS V2
   ============================================ */

/* Variáveis para a página de login */
.login-page-v2 {
  --login-bg-dark: linear-gradient(135deg, #1a1d21 0%, #22272e 50%, #1a1d21 100%);
  --login-bg-light: linear-gradient(135deg, #f0f2f5 0%, #e9ecef 50%, #f0f2f5 100%);
}

/* Login V2 Dark */
body.login-page.theme-v2.dark-mode {
  background: var(--login-bg-dark) !important;
  min-height: 100vh;
}

body.login-page.theme-v2.dark-mode .login-box .card {
  background: linear-gradient(145deg, #22272e 0%, #1a1d21 100%) !important;
  border: 1px solid #3d4450 !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}

body.login-page.theme-v2.dark-mode .login-box .card-header {
  background: transparent !important;
  border-bottom: 1px solid #3d4450 !important;
}

body.login-page.theme-v2.dark-mode .login-box .card-body {
  background: transparent !important;
}

body.login-page.theme-v2.dark-mode .login-box .form-control {
  background: #2d333b !important;
  border: 2px solid #3d4450 !important;
  color: #e8eaed !important;
  border-radius: 10px !important;
}

body.login-page.theme-v2.dark-mode .login-box .form-control:focus {
  border-color: #3498db !important;
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.2) !important;
}

body.login-page.theme-v2.dark-mode .login-box .input-group-text {
  background: #2d333b !important;
  border: 2px solid #3d4450 !important;
  border-left: none !important;
  color: #95a5a6 !important;
}

body.login-page.theme-v2.dark-mode .login-box .btn-primary {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 10px 24px !important;
  font-weight: 600 !important;
}

body.login-page.theme-v2.dark-mode .login-box .btn-primary:hover {
  background: linear-gradient(135deg, #2980b9 0%, #1a5276 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4) !important;
}

/* Login V2 Light */
body.login-page.theme-v2.light-mode {
  background: var(--login-bg-light) !important;
  min-height: 100vh;
}

body.login-page.theme-v2.light-mode .login-box .card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1) !important;
}

body.login-page.theme-v2.light-mode .login-box .card-header {
  background: transparent !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

body.login-page.theme-v2.light-mode .login-box .card-body {
  background: transparent !important;
}

body.login-page.theme-v2.light-mode .login-box .form-control {
  background: #ffffff !important;
  border: 2px solid #e2e8f0 !important;
  color: #2d3748 !important;
  border-radius: 10px !important;
}

body.login-page.theme-v2.light-mode .login-box .form-control:focus {
  border-color: #3498db !important;
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15) !important;
}

body.login-page.theme-v2.light-mode .login-box .input-group-text {
  background: #f8f9fa !important;
  border: 2px solid #e2e8f0 !important;
  border-left: none !important;
  color: #718096 !important;
}

body.login-page.theme-v2.light-mode .login-box .btn-primary {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 10px 24px !important;
  font-weight: 600 !important;
}

body.login-page.theme-v2.light-mode .login-box .btn-primary:hover {
  background: linear-gradient(135deg, #2980b9 0%, #1a5276 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4) !important;
}

/* ============================================
   CORREÇÃO DE AUTOFILL - MODO ESCURO
   O navegador aplica fundo branco no autocomplete
   ============================================ */

/* Autofill V2 Dark - Remove o fundo branco do Chrome/Safari */
body.theme-v2.dark-mode input:-webkit-autofill,
body.theme-v2.dark-mode input:-webkit-autofill:hover,
body.theme-v2.dark-mode input:-webkit-autofill:focus,
body.theme-v2.dark-mode input:-webkit-autofill:active,
body.theme-v2.dark-mode select:-webkit-autofill,
body.theme-v2.dark-mode select:-webkit-autofill:hover,
body.theme-v2.dark-mode select:-webkit-autofill:focus,
body.theme-v2.dark-mode textarea:-webkit-autofill,
body.theme-v2.dark-mode textarea:-webkit-autofill:hover,
body.theme-v2.dark-mode textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: #e8eaed !important;
  -webkit-box-shadow: 0 0 0 1000px #2d333b inset !important;
  box-shadow: 0 0 0 1000px #2d333b inset !important;
  background-color: #2d333b !important;
  border-color: #3d4450 !important;
  transition: background-color 5000s ease-in-out 0s !important;
  caret-color: #e8eaed !important;
}

/* Autofill para login page */
body.login-page.theme-v2.dark-mode input:-webkit-autofill,
body.login-page.theme-v2.dark-mode input:-webkit-autofill:hover,
body.login-page.theme-v2.dark-mode input:-webkit-autofill:focus,
body.login-page.theme-v2.dark-mode input:-webkit-autofill:active {
  -webkit-text-fill-color: #e8eaed !important;
  -webkit-box-shadow: 0 0 0 1000px #2d333b inset !important;
  box-shadow: 0 0 0 1000px #2d333b inset !important;
  background-color: #2d333b !important;
  caret-color: #e8eaed !important;
}

/* Autofill V2 Light */
body.theme-v2.light-mode input:-webkit-autofill,
body.theme-v2.light-mode input:-webkit-autofill:hover,
body.theme-v2.light-mode input:-webkit-autofill:focus,
body.theme-v2.light-mode input:-webkit-autofill:active,
body.theme-v2.light-mode select:-webkit-autofill,
body.theme-v2.light-mode select:-webkit-autofill:hover,
body.theme-v2.light-mode select:-webkit-autofill:focus,
body.theme-v2.light-mode textarea:-webkit-autofill,
body.theme-v2.light-mode textarea:-webkit-autofill:hover,
body.theme-v2.light-mode textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: #2d3748 !important;
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  caret-color: #2d3748 !important;
}

/* Autofill para modais no modo escuro */
body.theme-v2.dark-mode .modal input:-webkit-autofill,
body.theme-v2.dark-mode .modal input:-webkit-autofill:hover,
body.theme-v2.dark-mode .modal input:-webkit-autofill:focus,
body.theme-v2.dark-mode .modal input:-webkit-autofill:active {
  -webkit-text-fill-color: #e8eaed !important;
  -webkit-box-shadow: 0 0 0 1000px #22272e inset !important;
  box-shadow: 0 0 0 1000px #22272e inset !important;
  background-color: #22272e !important;
}

/* Firefox autofill */
body.theme-v2.dark-mode input:autofill,
body.theme-v2.dark-mode select:autofill,
body.theme-v2.dark-mode textarea:autofill {
  background-color: #2d333b !important;
  color: #e8eaed !important;
}

body.theme-v2.light-mode input:autofill,
body.theme-v2.light-mode select:autofill,
body.theme-v2.light-mode textarea:autofill {
  background-color: #ffffff !important;
  color: #2d3748 !important;
}

/* ============================================
   CADASTRAR.EJS - ESTILOS V2
   ============================================ */

/* Container principal */
body.theme-v2.dark-mode h1 {
  color: #e8eaed !important;
}

body.theme-v2.light-mode h1 {
  color: #2d3748 !important;
}

/* Labels */
body.theme-v2.dark-mode .form-group label {
  color: #c2c7d0 !important;
}

body.theme-v2.light-mode .form-group label {
  color: #4a5568 !important;
}

/* Loading Overlay V2 para cadastrar */
body.theme-v2.dark-mode #loadingOverlay .loadingContent {
  background: linear-gradient(145deg, #22272e 0%, #1a1d21 100%) !important;
  color: #e8eaed !important;
  border: 1px solid #3d4450 !important;
}

body.theme-v2.light-mode #loadingOverlay .loadingContent {
  background: #ffffff !important;
  color: #2d3748 !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

/* ============================================
   LISTAR.EJS - ESTILOS V2
   A view tem estilos inline, precisamos sobrescrever
   ============================================ */

/* Sobrescrever o fundo escuro fixo da view */
body.theme-v2.light-mode .page-container {
  background: transparent !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode .page-container h1 {
  color: #2d3748 !important;
}

body.theme-v2.light-mode .page-container h1::after {
  background: linear-gradient(90deg, #2980b9, #27ae60) !important;
}

/* Form controls no listar */
body.theme-v2.light-mode .page-container .form-control {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode .page-container .form-control:focus {
  border-color: #3498db !important;
  background-color: #ffffff !important;
}

body.theme-v2.light-mode .page-container .form-group label {
  color: #4a5568 !important;
}

/* Tabelas no listar - Light Mode */
body.theme-v2.light-mode .page-container table,
body.theme-v2.light-mode .page-container .table-responsive table {
  background-color: #ffffff !important;
}

body.theme-v2.light-mode .page-container table th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  color: #2d3748 !important;
  border-color: #e2e8f0 !important;
}

body.theme-v2.light-mode .page-container table td:not([data-usunome]):not([style*="background-color"]) {
  background-color: transparent !important;
  color: #4a5568 !important;
  border-color: #e2e8f0 !important;
}

body.theme-v2.light-mode .page-container table tbody tr:hover {
  background-color: rgba(52, 152, 219, 0.08) !important;
}

body.theme-v2.light-mode .page-container table:not(#tabelaVisitas):not(#tabelaAndamentos) tbody tr:nth-child(even) {
  background-color: #f8fafc !important;
}

/* Cards no listar - Light Mode */
body.theme-v2.light-mode .page-container .card,
body.theme-v2.light-mode .page-container .card-body {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
}

/* Seção de totais/resumo */
body.theme-v2.light-mode .page-container .totais-section,
body.theme-v2.light-mode .page-container .resumo-section,
body.theme-v2.light-mode .page-container [class*="total"],
body.theme-v2.light-mode .page-container [class*="resumo"] {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #2d3748 !important;
}

/* Status badges */
body.theme-v2.light-mode .page-container .badge {
  font-weight: 600 !important;
}

/* Modais do listar - Light Mode */
body.theme-v2.light-mode .page-container .modal-content,
body.theme-v2.light-mode .page-container .modal > div {
  background: #ffffff !important;
  color: #2d3748 !important;
  border: 1px solid #e2e8f0 !important;
}

body.theme-v2.light-mode .page-container .modal h2,
body.theme-v2.light-mode .page-container .modal h3,
body.theme-v2.light-mode .page-container .modal h4 {
  color: #2980b9 !important;
}

body.theme-v2.light-mode .page-container .modal label {
  color: #4a5568 !important;
}

/* Abas/Tabs - Light Mode */
body.theme-v2.light-mode .page-container .nav-tabs .nav-link {
  color: #4a5568 !important;
  background: transparent !important;
  border-color: #e2e8f0 !important;
}

body.theme-v2.light-mode .page-container .nav-tabs .nav-link.active {
  color: #2980b9 !important;
  background: #ffffff !important;
  border-bottom-color: transparent !important;
}

body.theme-v2.light-mode .page-container .tab-content {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-top: none !important;
}

/* Ícones de ação */
body.theme-v2.light-mode .page-container .action-icon,
body.theme-v2.light-mode .page-container [class*="btn-icon"] {
  color: #4a5568 !important;
}

body.theme-v2.light-mode .page-container .action-icon:hover,
body.theme-v2.light-mode .page-container [class*="btn-icon"]:hover {
  color: #2980b9 !important;
}

/* Dropdown menus */
body.theme-v2.light-mode .page-container .dropdown-menu {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
}

body.theme-v2.light-mode .page-container .dropdown-item {
  color: #4a5568 !important;
}

body.theme-v2.light-mode .page-container .dropdown-item:hover {
  background: #f8f9fa !important;
  color: #2980b9 !important;
}

/* ============================================
   RESPONSIVIDADE V2 - MOBILE & TABLET
   ============================================ */

/* === MOBILE (até 767px) === */
@media (max-width: 767.98px) {
  
  /* Prevenir overflow horizontal */
  body.theme-v2 {
    overflow-x: hidden !important;
  }
  
  body.theme-v2 .content-wrapper {
    padding: 10px !important;
    margin-left: 0 !important;
  }
  
  body.theme-v2 .card.card-body,
  body.theme-v2 .card {
    padding: 12px !important;
    margin: 0 0 15px 0 !important;
    border-radius: 12px !important;
  }
  
  /* === TABELAS RESPONSIVAS - Viram cards (EXCETO tabelaVisitas e tabelaAndamentos) === */
  body.theme-v2 table:not(#tabelaVisitas):not(#tabelaAndamentos) {
    display: block !important;
    width: 100% !important;
  }
  
  body.theme-v2 table:not(#tabelaVisitas):not(#tabelaAndamentos) thead {
    display: none !important;
  }
  
  body.theme-v2 table:not(#tabelaVisitas):not(#tabelaAndamentos) tbody {
    display: block !important;
    width: 100% !important;
  }
  
  body.theme-v2 table:not(#tabelaVisitas):not(#tabelaAndamentos) tbody tr {
    display: block !important;
    margin-bottom: 15px !important;
    border-radius: 12px !important;
    padding: 15px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  }
  
  body.theme-v2.dark-mode table:not(#tabelaVisitas):not(#tabelaAndamentos) tbody tr {
    background: #22272e !important;
    border: 1px solid #3d4450 !important;
  }
  
  body.theme-v2.light-mode table:not(#tabelaVisitas):not(#tabelaAndamentos) tbody tr {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
  }
  
  body.theme-v2 table:not(#tabelaVisitas):not(#tabelaAndamentos) tbody td {
    display: block !important;
    width: 100% !important;
    padding: 8px 0 !important;
    border: none !important;
    border-bottom: 1px solid rgba(128, 128, 128, 0.2) !important;
    text-align: left !important;
  }
  
  body.theme-v2 table:not(#tabelaVisitas):not(#tabelaAndamentos) tbody td:last-child {
    border-bottom: none !important;
    padding-top: 12px !important;
  }
  
  body.theme-v2 table:not(#tabelaVisitas):not(#tabelaAndamentos) tbody td::before {
    content: attr(data-label);
    display: block !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 4px !important;
  }
  
  body.theme-v2.dark-mode table:not(#tabelaVisitas):not(#tabelaAndamentos) tbody td::before {
    color: #95a5a6 !important;
  }
  
  body.theme-v2.light-mode table:not(#tabelaVisitas):not(#tabelaAndamentos) tbody td::before {
    color: #718096 !important;
  }
  
  /* Botões de ação na tabela */
  body.theme-v2 table:not(#tabelaVisitas):not(#tabelaAndamentos) tbody td:last-child {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  
  body.theme-v2 table:not(#tabelaVisitas):not(#tabelaAndamentos) tbody td .btn,
  body.theme-v2 table:not(#tabelaVisitas):not(#tabelaAndamentos) tbody td button {
    flex: 1 1 45% !important;
    min-width: 100px !important;
    justify-content: center !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
  }
  
  /* ============================================
     TABELA DE VISITAS V2 - MOBILE (Manter estilo V1)
     ============================================ */
  
  /* Tabela de Visitas - Manter como tabela normal no mobile */
  body.theme-v2 #tabelaVisitas {
    display: table !important;
    width: 100% !important;
    table-layout: fixed !important;
  }
  
  body.theme-v2 #tabelaVisitas thead {
    display: table-header-group !important;
  }
  
  body.theme-v2 #tabelaVisitas tbody {
    display: table-row-group !important;
  }
  
  body.theme-v2 #tabelaVisitas tr {
    display: table-row !important;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
  
  body.theme-v2 #tabelaVisitas td,
  body.theme-v2 #tabelaVisitas th {
    display: table-cell !important;
    padding: 8px 4px !important;
    border: 1px solid !important;
  }
  
  body.theme-v2.dark-mode #tabelaVisitas td,
  body.theme-v2.dark-mode #tabelaVisitas th {
    border-color: #3d4450 !important;
  }
  
  body.theme-v2.light-mode #tabelaVisitas td,
  body.theme-v2.light-mode #tabelaVisitas th {
    border-color: #e2e8f0 !important;
  }
  
  body.theme-v2 #tabelaVisitas td::before {
    display: none !important;
  }
  
  /* NO MOBILE - Esconder colunas não essenciais (igual V1) */
  body.theme-v2 #tabelaVisitas th.col-endereco,
  body.theme-v2 #tabelaVisitas th.col-vendedor,
  body.theme-v2 #tabelaVisitas th.col-telefone,
  body.theme-v2 #tabelaVisitas th.col-obs,
  body.theme-v2 #tabelaVisitas th.col-status,
  body.theme-v2 #tabelaVisitas th.col-acoes,
  body.theme-v2 #tabelaVisitas th.col-sistema-atual,
  body.theme-v2 #tabelaVisitas th.col-data,
  body.theme-v2 #tabelaVisitas th.col-data-retorno,
  body.theme-v2 #tabelaVisitas td.col-endereco,
  body.theme-v2 #tabelaVisitas td.col-vendedor,
  body.theme-v2 #tabelaVisitas td.col-telefone,
  body.theme-v2 #tabelaVisitas td.col-obs,
  body.theme-v2 #tabelaVisitas td.col-status,
  body.theme-v2 #tabelaVisitas td.col-acoes,
  body.theme-v2 #tabelaVisitas td.col-sistema-atual,
  body.theme-v2 #tabelaVisitas td.col-data,
  body.theme-v2 #tabelaVisitas td.col-data-retorno {
    display: none !important;
  }
  
  /* NO MOBILE - Mostrar apenas Andamentos e Cliente */
  body.theme-v2 #tabelaVisitas th.col-andamentos,
  body.theme-v2 #tabelaVisitas th.col-cliente,
  body.theme-v2 #tabelaVisitas td.col-andamentos,
  body.theme-v2 #tabelaVisitas td.col-cliente {
    display: table-cell !important;
  }
  
  /* Ajustar largura das colunas no mobile */
  body.theme-v2 #tabelaVisitas th.col-andamentos,
  body.theme-v2 #tabelaVisitas td.col-andamentos {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    padding: 8px 4px !important;
    text-align: center !important;
  }
  
  /* Botões na coluna de andamentos no mobile */
  body.theme-v2 #tabelaVisitas td.col-andamentos {
    display: flex !important;
    flex-direction: row !important;
    gap: 4px !important;
    justify-content: center !important;
    align-items: center !important;
  }
  
  body.theme-v2 #tabelaVisitas th.col-cliente,
  body.theme-v2 #tabelaVisitas td.col-cliente {
    width: auto !important;
    min-width: 200px !important;
    max-width: none !important;
    padding: 10px !important;
    text-align: left !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    font-size: 13px !important;
    vertical-align: top !important;
  }
  
  /* Cabeçalho menor no mobile */
  body.theme-v2 #tabelaVisitas th {
    font-size: 11px !important;
  }
  
  /* Linhas clicáveis no mobile */
  body.theme-v2 #tabelaVisitas tbody tr {
    cursor: pointer !important;
  }
  
  body.theme-v2.dark-mode #tabelaVisitas tbody tr:active {
    background-color: rgba(52, 152, 219, 0.2) !important;
  }
  
  body.theme-v2.light-mode #tabelaVisitas tbody tr:active {
    background-color: rgba(52, 152, 219, 0.15) !important;
  }
  
  /* ============================================
     MODAL DE EDIÇÃO MOBILE V2
     ============================================ */
  body.theme-v2 #modalEdicaoMobile {
    z-index: 10000 !important;
  }
  
  body.theme-v2.dark-mode #modalEdicaoMobile .modal-content {
    background: linear-gradient(145deg, #1e2227 0%, #22272e 100%) !important;
    border: 1px solid #3d4450 !important;
    color: #e8eaed !important;
  }
  
  body.theme-v2.light-mode #modalEdicaoMobile .modal-content {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%) !important;
    border: 1px solid #e2e8f0 !important;
    color: #2d3748 !important;
  }
  
  body.theme-v2 #modalEdicaoMobile h2 {
    color: #3498db !important;
    font-size: 18px !important;
  }
  
  body.theme-v2 #modalEdicaoMobile .form-group label {
    font-weight: 600 !important;
    font-size: 13px !important;
    margin-bottom: 6px !important;
  }
  
  body.theme-v2.dark-mode #modalEdicaoMobile .form-group label {
    color: #95a5a6 !important;
  }
  
  body.theme-v2.light-mode #modalEdicaoMobile .form-group label {
    color: #4a5568 !important;
  }
  
  body.theme-v2 #modalEdicaoMobile input,
  body.theme-v2 #modalEdicaoMobile select,
  body.theme-v2 #modalEdicaoMobile textarea {
    width: 100% !important;
    padding: 12px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
  }
  
  body.theme-v2.dark-mode #modalEdicaoMobile input,
  body.theme-v2.dark-mode #modalEdicaoMobile select,
  body.theme-v2.dark-mode #modalEdicaoMobile textarea {
    background: #1a1d21 !important;
    border: 1px solid #3d4450 !important;
    color: #e8eaed !important;
  }
  
  body.theme-v2.dark-mode #modalEdicaoMobile input:focus,
  body.theme-v2.dark-mode #modalEdicaoMobile select:focus,
  body.theme-v2.dark-mode #modalEdicaoMobile textarea:focus {
    border-color: #3498db !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2) !important;
  }
  
  body.theme-v2.light-mode #modalEdicaoMobile input,
  body.theme-v2.light-mode #modalEdicaoMobile select,
  body.theme-v2.light-mode #modalEdicaoMobile textarea {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #2d3748 !important;
  }
  
  body.theme-v2.light-mode #modalEdicaoMobile input:focus,
  body.theme-v2.light-mode #modalEdicaoMobile select:focus,
  body.theme-v2.light-mode #modalEdicaoMobile textarea:focus {
    border-color: #3498db !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15) !important;
  }
  
  body.theme-v2 #modalEdicaoMobile .btn {
    padding: 14px 20px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    width: 100% !important;
    margin-top: 8px !important;
  }
  
  body.theme-v2 #modalEdicaoMobile .close {
    font-size: 32px !important;
    line-height: 1 !important;
    opacity: 0.7 !important;
    transition: all 0.2s ease !important;
  }
  
  body.theme-v2.dark-mode #modalEdicaoMobile .close {
    color: #95a5a6 !important;
  }
  
  body.theme-v2.light-mode #modalEdicaoMobile .close {
    color: #718096 !important;
  }
  
  body.theme-v2 #modalEdicaoMobile .close:hover {
    opacity: 1 !important;
    color: #e74c3c !important;
  }
  
  /* === FORMULÁRIOS RESPONSIVOS === */
  body.theme-v2 .form-row,
  body.theme-v2 .row {
    flex-direction: column !important;
  }
  
  body.theme-v2 .form-group,
  body.theme-v2 .col-md-1, body.theme-v2 .col-md-2, body.theme-v2 .col-md-3,
  body.theme-v2 .col-md-4, body.theme-v2 .col-md-5, body.theme-v2 .col-md-6,
  body.theme-v2 .col-md-7, body.theme-v2 .col-md-8, body.theme-v2 .col-md-9,
  body.theme-v2 .col-md-10, body.theme-v2 .col-md-11, body.theme-v2 .col-md-12,
  body.theme-v2 .col-lg-1, body.theme-v2 .col-lg-2, body.theme-v2 .col-lg-3,
  body.theme-v2 .col-lg-4, body.theme-v2 .col-lg-5, body.theme-v2 .col-lg-6,
  body.theme-v2 .col-lg-7, body.theme-v2 .col-lg-8, body.theme-v2 .col-lg-9,
  body.theme-v2 .col-lg-10, body.theme-v2 .col-lg-11, body.theme-v2 .col-lg-12 {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 12px !important;
  }
  
  body.theme-v2 .form-control {
    width: 100% !important;
    min-height: 48px !important;
    font-size: 16px !important; /* Previne zoom no iOS */
  }
  
  body.theme-v2 select.form-control {
    padding-right: 35px !important;
  }
  
  /* === BOTÕES RESPONSIVOS === */
  body.theme-v2 .btn {
    padding: 12px 16px !important;
    font-size: 14px !important;
    min-height: 44px !important; /* Mínimo para touch */
  }
  
  body.theme-v2 .btn-sm {
    padding: 10px 14px !important;
    font-size: 13px !important;
  }
  
  body.theme-v2 .btn-group {
    flex-direction: column !important;
    width: 100% !important;
  }
  
  body.theme-v2 .btn-group .btn {
    width: 100% !important;
    border-radius: 8px !important;
    margin-bottom: 8px !important;
  }
  
  /* === MODAIS RESPONSIVOS === */
  body.theme-v2 .modal {
    padding: 10px !important;
  }
  
  body.theme-v2 .modal-content,
  body.theme-v2 .modal > div[class*="modal-content"],
  body.theme-v2 .modal > div[style*="modal"] {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 16px 16px 0 0 !important;
    max-height: 95vh !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
  }
  
  body.theme-v2 .modal-content .close,
  body.theme-v2 .modal span[onclick*="fechar"] {
    font-size: 32px !important;
    padding: 10px !important;
  }
  
  /* === TÍTULOS RESPONSIVOS === */
  body.theme-v2 h1 {
    font-size: 1.5rem !important;
  }
  
  body.theme-v2 h2 {
    font-size: 1.3rem !important;
  }
  
  body.theme-v2 h3 {
    font-size: 1.1rem !important;
  }
  
  /* === DASHBOARD RESPONSIVO === */
  body.theme-v2 .dashboard-container {
    padding: 10px !important;
  }
  
  body.theme-v2 .dashboard-container .cards-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  
  body.theme-v2 .dashboard-container .graficos-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
  
  body.theme-v2 .dashboard-container .grafico-container {
    height: 220px !important;
  }
  
  body.theme-v2 .dashboard-container .card .valor {
    font-size: 24px !important;
  }
  
  body.theme-v2 .dashboard-container .rodape-totais {
    grid-template-columns: 1fr !important;
  }
  
  body.theme-v2 .dashboard-container .rodape-totais .item {
    border-bottom: 1px solid rgba(128, 128, 128, 0.3) !important;
    border-right: none !important;
    padding: 12px !important;
  }
  
  body.theme-v2 .dashboard-container #mapa {
    height: 300px !important;
  }
  
  body.theme-v2 .dashboard-container .mapa-legenda {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    margin-bottom: 10px !important;
    display: flex !important;
    justify-content: center !important;
    gap: 20px !important;
  }
  
  body.theme-v2 .dashboard-container .filtro-periodo {
    flex-direction: column !important;
  }
  
  body.theme-v2 .dashboard-container .filtro-periodo select {
    width: 100% !important;
  }
  
  /* === LOGIN RESPONSIVO === */
  body.login-page.theme-v2 .login-box {
    width: 100% !important;
    max-width: 100% !important;
    padding: 15px !important;
  }
  
  body.login-page.theme-v2 .login-box .card {
    border-radius: 16px !important;
  }
  
  body.login-page.theme-v2 .login-box .card-header img {
    width: 120px !important;
  }
  
  body.login-page.theme-v2 .login-box .btn-primary {
    width: 100% !important;
  }
  
  /* === VIAGENS RESPONSIVO === */
  body.theme-v2 #tabelaViagens tbody tr {
    display: block !important;
    margin-bottom: 15px !important;
  }
  
  body.theme-v2 #tabelaViagens tbody td {
    display: block !important;
    width: 100% !important;
  }
  
  /* Cards de viagem */
  body.theme-v2 .viagem-card,
  body.theme-v2 [class*="viagem-card"] {
    padding: 15px !important;
  }
  
  /* === USUARIO CADASTRO RESPONSIVO === */
  body.theme-v2 #tabelaUsuarios tbody tr {
    display: block !important;
    margin-bottom: 15px !important;
  }
  
  body.theme-v2 #tabelaUsuarios tbody td {
    display: block !important;
    width: 100% !important;
  }
  
  /* Labels para tabela de usuários */
  body.theme-v2 #tabelaUsuarios td:nth-child(1)::before { content: 'ID'; }
  body.theme-v2 #tabelaUsuarios td:nth-child(2)::before { content: 'Foto'; }
  body.theme-v2 #tabelaUsuarios td:nth-child(3)::before { content: 'Nome'; }
  body.theme-v2 #tabelaUsuarios td:nth-child(4)::before { content: 'Telefone'; }
  body.theme-v2 #tabelaUsuarios td:nth-child(5)::before { content: 'Setor'; }
  body.theme-v2 #tabelaUsuarios td:nth-child(6)::before { content: 'Nascimento'; }
  body.theme-v2 #tabelaUsuarios td:nth-child(7)::before { content: 'Ações'; }
  
  /* Foto thumbnail no mobile */
  body.theme-v2 .foto-thumbnail {
    width: 60px !important;
    height: 60px !important;
  }
  
  /* === SIDEBAR MOBILE COM SCROLL === */
  body.theme-v2 .main-sidebar {
    width: 260px !important;
    height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  body.theme-v2 .main-sidebar .sidebar {
    height: auto !important;
    min-height: 100% !important;
    overflow-y: visible !important;
  }
  
  body.theme-v2 .main-sidebar .nav-sidebar {
    overflow-y: visible !important;
  }
  
  /* Scrollbar customizada na sidebar mobile */
  body.theme-v2.dark-mode .main-sidebar::-webkit-scrollbar {
    width: 6px !important;
  }
  
  body.theme-v2.dark-mode .main-sidebar::-webkit-scrollbar-track {
    background: #1a1d21 !important;
  }
  
  body.theme-v2.dark-mode .main-sidebar::-webkit-scrollbar-thumb {
    background: #3d4450 !important;
    border-radius: 3px !important;
  }
  
  body.theme-v2.light-mode .main-sidebar::-webkit-scrollbar {
    width: 6px !important;
  }
  
  body.theme-v2.light-mode .main-sidebar::-webkit-scrollbar-track {
    background: #e2e8f0 !important;
  }
  
  body.theme-v2.light-mode .main-sidebar::-webkit-scrollbar-thumb {
    background: #a0aec0 !important;
    border-radius: 3px !important;
  }
  
  body.theme-v2.sidebar-collapse .main-sidebar {
    margin-left: -260px !important;
  }
  
  body.theme-v2 .nav-sidebar .nav-link {
    padding: 12px 15px !important;
  }
  
  /* Toggle de tema no mobile */
  body.theme-v2 #themeFloatingBtn {
    bottom: 20px !important;
    right: 15px !important;
    width: 50px !important;
    height: 50px !important;
  }
  
  /* === FLOATING ACTION BUTTONS === */
  body.theme-v2 .fab,
  body.theme-v2 [class*="floating-btn"],
  body.theme-v2 [class*="float-btn"] {
    bottom: 80px !important;
    right: 15px !important;
  }
  
  /* === FILTROS RESPONSIVOS === */
  body.theme-v2 .filtros-container,
  body.theme-v2 [class*="filtro"] {
    flex-direction: column !important;
  }
  
  body.theme-v2 .filtros-container > *,
  body.theme-v2 [class*="filtro"] > input,
  body.theme-v2 [class*="filtro"] > select {
    width: 100% !important;
    margin-bottom: 10px !important;
  }
  
  /* === PAGINAÇÃO RESPONSIVA === */
  body.theme-v2 .pagination {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 5px !important;
  }
  
  body.theme-v2 .pagination .page-link {
    padding: 10px 14px !important;
    font-size: 14px !important;
  }
  
  /* === HEADER MOBILE === */
  body.theme-v2 .main-header .navbar-nav {
    flex-direction: row !important;
  }
  
  body.theme-v2 .main-header .nav-link {
    padding: 8px 12px !important;
  }
  
  /* === FOOTER MOBILE === */
  body.theme-v2 .main-footer {
    padding: 10px 15px !important;
    flex-direction: column !important;
    text-align: center !important;
    gap: 10px !important;
  }
  
  body.theme-v2 .main-footer .float-right {
    float: none !important;
  }
}

/* === TABLET (768px - 1024px) === */
@media (min-width: 768px) and (max-width: 1024px) {
  
  body.theme-v2 .content-wrapper {
    padding: 15px !important;
  }
  
  /* Tabelas em tablet - 2 colunas de cards ou tabela normal */
  body.theme-v2 .dashboard-container .cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  body.theme-v2 .dashboard-container .graficos-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  body.theme-v2 .dashboard-container .rodape-totais {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  
  /* Formulários em tablet */
  body.theme-v2 .col-md-4 {
    width: 50% !important;
    max-width: 50% !important;
  }
  
  body.theme-v2 .col-md-6 {
    width: 50% !important;
    max-width: 50% !important;
  }
  
  /* Modais em tablet */
  body.theme-v2 .modal-content {
    width: 90% !important;
    max-width: 600px !important;
    margin: 5% auto !important;
    border-radius: 16px !important;
  }
}

/* === TELAS MUITO PEQUENAS (até 360px) === */
@media (max-width: 360px) {
  
  body.theme-v2 .content-wrapper {
    padding: 8px !important;
  }
  
  body.theme-v2 .card.card-body {
    padding: 10px !important;
  }
  
  body.theme-v2 h1 {
    font-size: 1.25rem !important;
  }
  
  body.theme-v2 .btn {
    padding: 10px 12px !important;
    font-size: 13px !important;
  }
  
  body.theme-v2 .dashboard-container .card .valor {
    font-size: 20px !important;
  }
  
  body.theme-v2 .dashboard-container .grafico-container {
    height: 180px !important;
  }
  
  body.theme-v2 .dashboard-container #mapa {
    height: 250px !important;
  }
  
  /* Tabela de usuários em telas pequenas */
  body.theme-v2 table tbody td .btn {
    flex: 1 1 100% !important;
  }
}

/* === ORIENTAÇÃO LANDSCAPE MOBILE === */
@media (max-width: 896px) and (orientation: landscape) {
  
  body.theme-v2 .modal-content {
    max-height: 85vh !important;
  }
  
  body.theme-v2 .dashboard-container .cards-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  
  body.theme-v2 .dashboard-container #mapa {
    height: 250px !important;
  }
}

/* === PRINT STYLES === */
@media print {
  body.theme-v2 {
    background: white !important;
    color: black !important;
  }
  
  body.theme-v2 .main-sidebar,
  body.theme-v2 .main-header,
  body.theme-v2 .main-footer,
  body.theme-v2 #themeFloatingBtn,
  body.theme-v2 .btn {
    display: none !important;
  }
  
  body.theme-v2 .content-wrapper {
    margin: 0 !important;
    padding: 0 !important;
  }
  
  body.theme-v2 table {
    display: table !important;
  }
  
  body.theme-v2 table thead {
    display: table-header-group !important;
  }
  
  body.theme-v2 table tbody tr {
    display: table-row !important;
  }
  
  body.theme-v2 table tbody td {
    display: table-cell !important;
  }
}

/* ============================================
   DASHBOARD IMPLANTADOR - ESTILOS V2
   ============================================ */

/* Dark Mode */
body.theme-v2.dark-mode .dashboard-implantador-container {
  background-color: transparent !important;
}

body.theme-v2.dark-mode .dashboard-implantador-container .card,
body.theme-v2.dark-mode .dashboard-implantador-container .cidades-container,
body.theme-v2.dark-mode .dashboard-implantador-container .grafico-container {
  background: linear-gradient(145deg, #22272e 0%, #1a1d21 100%) !important;
  border: 1px solid #3d4450 !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

body.theme-v2.dark-mode .dashboard-implantador-container h1,
body.theme-v2.dark-mode .dashboard-implantador-container h2,
body.theme-v2.dark-mode .dashboard-implantador-container h3 {
  color: #e8eaed !important;
}

body.theme-v2.dark-mode .dashboard-implantador-container .card .valor {
  color: #3498db !important;
}

body.theme-v2.dark-mode .dashboard-implantador-container .variacao {
  background-color: rgba(0, 0, 0, 0.3) !important;
  border-radius: 8px !important;
}

body.theme-v2.dark-mode .dashboard-implantador-container .cidade-item {
  background: #2d333b !important;
  border: 1px solid #3d4450 !important;
  border-radius: 10px !important;
}

body.theme-v2.dark-mode .dashboard-implantador-container .filtro-periodo select {
  background: linear-gradient(145deg, #2d333b 0%, #22272e 100%) !important;
  border: 1px solid #3d4450 !important;
  color: #e8eaed !important;
}

/* Light Mode */
body.theme-v2.light-mode .dashboard-implantador-container {
  background-color: transparent !important;
}

body.theme-v2.light-mode .dashboard-implantador-container .card,
body.theme-v2.light-mode .dashboard-implantador-container .cidades-container,
body.theme-v2.light-mode .dashboard-implantador-container .grafico-container {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

body.theme-v2.light-mode .dashboard-implantador-container h1,
body.theme-v2.light-mode .dashboard-implantador-container h2,
body.theme-v2.light-mode .dashboard-implantador-container h3 {
  color: #2d3748 !important;
}

body.theme-v2.light-mode .dashboard-implantador-container .card h3 {
  color: #718096 !important;
}

body.theme-v2.light-mode .dashboard-implantador-container .card .valor {
  color: #2980b9 !important;
}

body.theme-v2.light-mode .dashboard-implantador-container .variacao {
  background-color: rgba(0, 0, 0, 0.05) !important;
  border-radius: 8px !important;
}

body.theme-v2.light-mode .dashboard-implantador-container .variacao-info {
  color: #718096 !important;
}

body.theme-v2.light-mode .dashboard-implantador-container .cidade-item {
  background: #f8f9fa !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode .dashboard-implantador-container .cidade-item strong {
  color: #2980b9 !important;
}

body.theme-v2.light-mode .dashboard-implantador-container .filtro-periodo select {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #2d3748 !important;
}

/* ============================================
   VIEWS DE EDITAR - ESTILOS V2
   ============================================ */

/* === ESTILOS GLOBAIS PARA EDITAR === */

/* Dark Mode */
body.theme-v2.dark-mode .botao-gravar {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
  border-radius: 12px !important;
}

body.theme-v2.dark-mode .botao-gravar:hover {
  background: linear-gradient(135deg, #2980b9 0%, #1a5276 100%) !important;
}

body.theme-v2.dark-mode .botao-cancelar {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
  border-radius: 12px !important;
}

body.theme-v2.dark-mode .botao-cancelar:hover {
  background: linear-gradient(135deg, #4b5563 0%, #374151 100%) !important;
}

body.theme-v2.dark-mode .foto-atual {
  background: #2d333b !important;
  border: 1px solid #3d4450 !important;
  border-radius: 12px !important;
}

body.theme-v2.dark-mode .preview-foto {
  border: 2px solid #3d4450 !important;
}

/* Light Mode */
body.theme-v2.light-mode .botao-gravar {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
  border-radius: 12px !important;
}

body.theme-v2.light-mode .botao-cancelar {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
  border-radius: 12px !important;
}

body.theme-v2.light-mode .foto-atual {
  background: #f8f9fa !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
}

body.theme-v2.light-mode .preview-foto {
  border: 2px solid #e2e8f0 !important;
}

/* === EDITAR VISITA === */
body.theme-v2.dark-mode #listaCidades {
  background: #22272e !important;
  border-color: #3d4450 !important;
}

body.theme-v2.dark-mode #listaCidades div {
  color: #e8eaed !important;
}

body.theme-v2.dark-mode #listaCidades div:hover {
  background: #2d333b !important;
}

body.theme-v2.light-mode #listaCidades {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}

body.theme-v2.light-mode #listaCidades div {
  color: #2d3748 !important;
}

body.theme-v2.light-mode #listaCidades div:hover {
  background: #f8f9fa !important;
}

body.theme-v2.light-mode #buscaCidade {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode #statusLocalizacao {
  color: #718096 !important;
}

/* === EDITAR FÉRIAS === */
body.theme-v2.light-mode .card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}

body.theme-v2.light-mode .card-header {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
  border-color: transparent !important;
}

body.theme-v2.light-mode .card-body {
  background: #ffffff !important;
}

body.theme-v2.light-mode #calendarioVisual {
  background: #f8f9fa !important;
  border-color: #e2e8f0 !important;
}

body.theme-v2.light-mode .alert-info {
  background: #e3f2fd !important;
  border-color: #90caf9 !important;
  color: #1565c0 !important;
}

body.theme-v2.light-mode .alert-info strong,
body.theme-v2.light-mode .alert-info span {
  color: #1565c0 !important;
}

body.theme-v2.light-mode .modal-content {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode .modal-header {
  background: #f8f9fa !important;
  border-color: #e2e8f0 !important;
}

body.theme-v2.light-mode .modal-footer {
  background: #f8f9fa !important;
  border-color: #e2e8f0 !important;
}

body.theme-v2.light-mode .close {
  color: #4a5568 !important;
}

/* Toast no light mode */
body.theme-v2.light-mode .toast {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
  color: #2d3748 !important;
  border: 2px solid #f59e0b !important;
}

body.theme-v2.light-mode .toast.toast-success {
  border-color: #10b981 !important;
}

body.theme-v2.light-mode .toast-message {
  color: #4a5568 !important;
}

/* === EDITAR AVISO === */
body.theme-v2.light-mode div[style*="background-color: #2c3b41"],
body.theme-v2.light-mode div[style*="background-color: #343a40"] {
  background: #ffffff !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode div[style*="background-color: #495057"] {
  background: #ffffff !important;
}

body.theme-v2.light-mode input[style*="background-color: #495057"],
body.theme-v2.light-mode select[style*="background-color: #495057"],
body.theme-v2.light-mode textarea[style*="background-color: #495057"] {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode label[style*="color: white"] {
  color: #4a5568 !important;
}

body.theme-v2.light-mode h2[style*="color: white"] {
  color: #2d3748 !important;
}

body.theme-v2.light-mode small[style*="color: #95a5a6"] {
  color: #718096 !important;
}

body.theme-v2.light-mode .border[style*="border-color: #6c757d"] {
  border-color: #e2e8f0 !important;
}

/* === EDITAR IMPLANTAÇÕES === */
body.theme-v2.light-mode #loadingOverlay .loadingContent {
  background: #ffffff !important;
  color: #2d3748 !important;
  border: 1px solid #e2e8f0 !important;
}

body.theme-v2.light-mode #loadingOverlay .spinner {
  border-color: #e2e8f0 !important;
  border-top-color: #3498db !important;
}

/* ============================================
   AVISOS - ESTILOS V2
   ============================================ */

/* === AVISOS - DARK MODE === */
body.theme-v2.dark-mode div[style*="background-color: #2c3b41"] {
  background: linear-gradient(145deg, #22272e 0%, #1a1d21 100%) !important;
  border: 1px solid #3d4450 !important;
  border-radius: 16px !important;
}

body.theme-v2.dark-mode div[style*="background-color: #343a40"] {
  background: #2d333b !important;
  border: 1px solid #3d4450 !important;
  border-radius: 12px !important;
}

body.theme-v2.dark-mode div[style*="background-color: #202225"] {
  background: linear-gradient(135deg, #1a1d21 0%, #22272e 100%) !important;
}

/* === AVISOS - LIGHT MODE === */
body.theme-v2.light-mode div[style*="background-color: #2c3b41"] {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  color: #2d3748 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

body.theme-v2.light-mode div[style*="background-color: #343a40"] {
  background: #f8f9fa !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
}

body.theme-v2.light-mode div[style*="background-color: #202225"] {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

/* Inputs e selects dos avisos light mode */
body.theme-v2.light-mode input[style*="background-color: #495057"],
body.theme-v2.light-mode select[style*="background-color: #495057"],
body.theme-v2.light-mode textarea[style*="background-color: #495057"] {
  background: #ffffff !important;
  border: 2px solid #e2e8f0 !important;
  color: #2d3748 !important;
  border-radius: 10px !important;
}

body.theme-v2.light-mode input[style*="background-color: #495057"]:focus,
body.theme-v2.light-mode select[style*="background-color: #495057"]:focus,
body.theme-v2.light-mode textarea[style*="background-color: #495057"]:focus {
  border-color: #3498db !important;
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15) !important;
}

/* Labels e textos nos avisos light mode */
body.theme-v2.light-mode label[style*="color: white"],
body.theme-v2.light-mode h2[style*="color: white"],
body.theme-v2.light-mode h6[style*="color: white"],
body.theme-v2.light-mode span[style*="color: white"] {
  color: #2d3748 !important;
}

body.theme-v2.light-mode small[style*="color: #95a5a6"],
body.theme-v2.light-mode .form-text[style*="color: #95a5a6"] {
  color: #718096 !important;
}

/* Tabela de avisos light mode */
body.theme-v2.light-mode tr[style*="background-color: #2c2f33"] {
  background: #ffffff !important;
}

body.theme-v2.light-mode td[style*="color: white"],
body.theme-v2.light-mode th[style*="color: white"] {
  color: #2d3748 !important;
}

body.theme-v2.light-mode td[style*="border-color: #4f5459"],
body.theme-v2.light-mode th[style*="border-color: #4f5459"] {
  border-color: #e2e8f0 !important;
}

body.theme-v2.light-mode thead[style*="background-color: #202225"] {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

/* Bordas dos containers light mode */
body.theme-v2.light-mode .border[style*="border-color: #6c757d"] {
  border-color: #e2e8f0 !important;
  background: #f8f9fa !important;
}

/* Relatório de avisos */
body.theme-v2.light-mode .container-fluid h2 {
  color: #2d3748 !important;
}

/* ============================================
   IMPORTAR.EJS - ESTILOS V2
   ============================================ */

/* A view de importar tem seu próprio HTML/body, então os estilos são mais específicos */

/* Dark Mode - Melhora o visual existente */
body.theme-v2.dark-mode #tabela {
  background: #22272e !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}

body.theme-v2.dark-mode #tabela th {
  background: linear-gradient(135deg, #2d333b 0%, #22272e 100%) !important;
  color: #e8eaed !important;
  border-color: #3d4450 !important;
}

body.theme-v2.dark-mode #tabela td {
  border-color: #3d4450 !important;
  background: #22272e !important;
}

body.theme-v2.dark-mode #tabela input,
body.theme-v2.dark-mode #tabela select {
  background: #2d333b !important;
  border: 1px solid #3d4450 !important;
  color: #e8eaed !important;
  border-radius: 8px !important;
}

body.theme-v2.dark-mode #tabela input:focus,
body.theme-v2.dark-mode #tabela select:focus {
  border-color: #3498db !important;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2) !important;
}

body.theme-v2.dark-mode #btnEnviar {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%) !important;
  border-radius: 12px !important;
  border: none !important;
}

body.theme-v2.dark-mode #btnEnviar:hover {
  background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%) !important;
}

body.theme-v2.dark-mode #btnLimpar {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
  border-radius: 8px !important;
}

body.theme-v2.dark-mode .excluir-btn {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
  border-radius: 8px !important;
}

/* Light Mode - Override completo */
body.theme-v2.light-mode #tabela {
  background: #ffffff !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

body.theme-v2.light-mode #tabela th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  color: #2d3748 !important;
  border-color: #e2e8f0 !important;
}

body.theme-v2.light-mode #tabela td {
  border-color: #e2e8f0 !important;
  background: #ffffff !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode #tabela input,
body.theme-v2.light-mode #tabela select {
  background: #ffffff !important;
  border: 2px solid #e2e8f0 !important;
  color: #2d3748 !important;
  border-radius: 8px !important;
}

body.theme-v2.light-mode #tabela input:focus,
body.theme-v2.light-mode #tabela select:focus {
  border-color: #3498db !important;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15) !important;
  background: #ffffff !important;
}

body.theme-v2.light-mode #btnEnviar {
  background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%) !important;
  border-radius: 12px !important;
}

body.theme-v2.light-mode #btnLimpar {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
  border-radius: 8px !important;
}

body.theme-v2.light-mode .campo-valido {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

body.theme-v2.light-mode .campo-invalido {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* ============================================
   SIDEBAR THEME TOGGLES - ESTILOS
   ============================================ */

/* Container dos toggles */
body.theme-v2.light-mode #sidebarThemeToggles {
  border-top-color: rgba(0, 0, 0, 0.1) !important;
}

body.theme-v2.light-mode #sidebarThemeToggles > div {
  background: rgba(0, 0, 0, 0.05) !important;
}

body.theme-v2.light-mode #sidebarThemeToggles span {
  color: #4a5568 !important;
}

body.theme-v2.light-mode #sidebarSeletorEstilo {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #2d3748 !important;
}

/* ============================================
   CONSULTA CPF - ESTILOS V2
   ============================================ */

/* Dark Mode */
body.theme-v2.dark-mode .consulta-cpf-container {
  background: transparent !important;
}

body.theme-v2.dark-mode .consulta-cpf-container .card {
  background: linear-gradient(145deg, #22272e 0%, #2d333b 100%) !important;
  border: 1px solid #3d4450 !important;
  border-radius: 16px !important;
}

body.theme-v2.dark-mode .consulta-cpf-container .card-header {
  background: linear-gradient(135deg, #1a1d21 0%, #22272e 100%) !important;
  border-radius: 16px 16px 0 0 !important;
}

body.theme-v2.dark-mode .consulta-cpf-container .api-card {
  background: linear-gradient(145deg, #22272e 0%, #2d333b 100%) !important;
  border: 1px solid #3d4450 !important;
  border-radius: 12px !important;
  transition: all 0.3s ease !important;
}

body.theme-v2.dark-mode .consulta-cpf-container .api-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4) !important;
  border-color: #3498db !important;
}

body.theme-v2.dark-mode .consulta-cpf-container .form-control {
  background: #2d333b !important;
  border: 2px solid #3d4450 !important;
  color: #e8eaed !important;
  border-radius: 10px !important;
}

body.theme-v2.dark-mode .consulta-cpf-container .form-control:focus {
  border-color: #3498db !important;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2) !important;
}

body.theme-v2.dark-mode .consulta-cpf-container .table {
  border-radius: 12px !important;
  overflow: hidden !important;
}

body.theme-v2.dark-mode .consulta-cpf-container .table thead th {
  background: linear-gradient(135deg, #1a1d21 0%, #22272e 100%) !important;
  border-color: #3d4450 !important;
}

body.theme-v2.dark-mode .consulta-cpf-container .table tbody td {
  background: #22272e !important;
  border-color: #3d4450 !important;
}

/* Light Mode */
body.theme-v2.light-mode .consulta-cpf-container {
  background: transparent !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode .consulta-cpf-container .card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode .consulta-cpf-container .card-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  border-radius: 16px 16px 0 0 !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode .consulta-cpf-container .card-body {
  background: #ffffff !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode .consulta-cpf-container .api-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  color: #2d3748 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

body.theme-v2.light-mode .consulta-cpf-container .api-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
  border-color: #3498db !important;
}

body.theme-v2.light-mode .consulta-cpf-container h3,
body.theme-v2.light-mode .consulta-cpf-container h4,
body.theme-v2.light-mode .consulta-cpf-container h5,
body.theme-v2.light-mode .consulta-cpf-container label {
  color: #2d3748 !important;
}

body.theme-v2.light-mode .consulta-cpf-container p[style*="color: #b9bbbe"] {
  color: #718096 !important;
}

body.theme-v2.light-mode .consulta-cpf-container .form-control {
  background: #ffffff !important;
  border: 2px solid #e2e8f0 !important;
  color: #2d3748 !important;
  border-radius: 10px !important;
}

body.theme-v2.light-mode .consulta-cpf-container .form-control:focus {
  border-color: #3498db !important;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15) !important;
}

body.theme-v2.light-mode .consulta-cpf-container .table {
  color: #2d3748 !important;
}

body.theme-v2.light-mode .consulta-cpf-container .table thead th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  border-color: #e2e8f0 !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode .consulta-cpf-container .table tbody td {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode .consulta-cpf-container .table tbody tr:nth-child(even) {
  background: #f8f9fa !important;
}

body.theme-v2.light-mode .consulta-cpf-container .alert {
  border-radius: 10px !important;
}

body.theme-v2.light-mode .consulta-cpf-container div[style*="background-color: #2c2f33"],
body.theme-v2.light-mode .consulta-cpf-container div[style*="background: #2c2f33"] {
  background: #ffffff !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode .consulta-cpf-container div[style*="background-color: #202225"],
body.theme-v2.light-mode .consulta-cpf-container div[style*="background: #202225"] {
  background: #f8f9fa !important;
  color: #2d3748 !important;
}

/* ============================================
   ORDEM DE SERVIÇO - ESTILOS V2
   ============================================ */

/* Dark Mode */
body.theme-v2.dark-mode #modalOrdemServico .modal-content {
  background: linear-gradient(145deg, #22272e 0%, #2d333b 100%) !important;
  border: 1px solid #3d4450 !important;
  border-radius: 16px !important;
}

body.theme-v2.dark-mode #modalOrdemServico .card {
  background: #22272e !important;
  border: 1px solid #3d4450 !important;
  border-radius: 12px !important;
}

body.theme-v2.dark-mode #modalOrdemServico .card-header {
  background: linear-gradient(135deg, #1a1d21 0%, #22272e 100%) !important;
  border-radius: 12px 12px 0 0 !important;
}

/* Light Mode */
body.theme-v2.light-mode #modalOrdemServico .modal-content {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode #modalOrdemServico .card {
  background: #f8f9fa !important;
  border: 1px solid #e2e8f0 !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode #modalOrdemServico .card-header {
  background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%) !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode #modalOrdemServico h3,
body.theme-v2.light-mode #modalOrdemServico h5,
body.theme-v2.light-mode #modalOrdemServico label {
  color: #2d3748 !important;
}

/* ============================================
   FÉRIAS - CADASTRAR E LISTAR - ESTILOS V2
   ============================================ */

/* Light Mode para views que usam estilos inline dark */
body.theme-v2.light-mode .card[style*="background-color: #2c2f33"] {
  background: #ffffff !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode .card-header[style*="background-color: #202225"] {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode .list-group-item[style*="background-color: #36393f"],
body.theme-v2.light-mode .list-group-item[style*="background-color: #3a3f44"] {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode .modal-content[style*="background-color: #2c2f33"] {
  background: #ffffff !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode .modal-header[style*="background-color: #202225"] {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  color: #2d3748 !important;
}

/* ============================================
   VISITA - LISTAR, CADASTRAR, RELATÓRIO - V2
   ============================================ */

/* Light Mode */
body.theme-v2.light-mode .dashboard-container {
  background: transparent !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode .dashboard-header h1 {
  color: #3498db !important;
}

body.theme-v2.light-mode .filtro-periodo select,
body.theme-v2.light-mode .filtro-periodo input {
  background: #ffffff !important;
  border: 2px solid #e2e8f0 !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode table[style*="background-color: #2c2f33"],
body.theme-v2.light-mode table {
  background: #ffffff !important;
}

body.theme-v2.light-mode th[style*="background-color: #202225"] {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode td[style*="background-color"],
body.theme-v2.light-mode tr[style*="background-color: #36393f"] td {
  background: #ffffff !important;
  color: #2d3748 !important;
}

/* Zebra genérica - EXCETO tabelas com cores de status */
body.theme-v2.light-mode table:not(#tabelaVisitas):not(#tabelaAndamentos) tr:nth-child(even) td {
  background: #f8f9fa !important;
}

/* Stats cards light mode */
body.theme-v2.light-mode .stat-card,
body.theme-v2.light-mode div[style*="background: linear-gradient"][style*="#2c2f33"] {
  background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%) !important;
  border: 1px solid #e2e8f0 !important;
  color: #2d3748 !important;
}

/* ============================================
   USUARIO - CONVERSÃO E IMPLANTAÇÕES - V2
   ============================================ */

/* Light Mode */
body.theme-v2.light-mode .loadingContent {
  background: #ffffff !important;
  color: #2d3748 !important;
  border: 1px solid #e2e8f0 !important;
}

body.theme-v2.light-mode .spinner {
  border-color: #e2e8f0 !important;
  border-top-color: #3498db !important;
}

/* Formulários genéricos light mode */
body.theme-v2.light-mode .form-group label {
  color: #2d3748 !important;
}

body.theme-v2.light-mode select.form-control,
body.theme-v2.light-mode input.form-control,
body.theme-v2.light-mode textarea.form-control {
  background: #ffffff !important;
  border: 2px solid #e2e8f0 !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode select.form-control:focus,
body.theme-v2.light-mode input.form-control:focus,
body.theme-v2.light-mode textarea.form-control:focus {
  border-color: #3498db !important;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15) !important;
}

/* ============================================
   ESTILOS GLOBAIS PARA INLINE STYLES - V2
   ============================================ */

/* Override para backgrounds escuros inline */
body.theme-v2.light-mode [style*="background-color: #36393f"],
body.theme-v2.light-mode [style*="background-color:#36393f"],
body.theme-v2.light-mode [style*="background: #36393f"] {
  background: #f8f9fa !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode [style*="background-color: #2c2f33"],
body.theme-v2.light-mode [style*="background-color:#2c2f33"],
body.theme-v2.light-mode [style*="background: #2c2f33"] {
  background: #ffffff !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode [style*="background-color: #202225"],
body.theme-v2.light-mode [style*="background-color:#202225"],
body.theme-v2.light-mode [style*="background: #202225"] {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode [style*="background-color: #40444b"],
body.theme-v2.light-mode [style*="background-color:#40444b"],
body.theme-v2.light-mode [style*="background: #40444b"] {
  background: #e9ecef !important;
  color: #2d3748 !important;
}

/* Override para cores de texto inline */
body.theme-v2.light-mode [style*="color: white"],
body.theme-v2.light-mode [style*="color:white"],
body.theme-v2.light-mode [style*="color: #fff"],
body.theme-v2.light-mode [style*="color:#fff"],
body.theme-v2.light-mode [style*="color: #ecf0f1"],
body.theme-v2.light-mode [style*="color:#ecf0f1"],
body.theme-v2.light-mode [style*="color: #f0f0f0"],
body.theme-v2.light-mode [style*="color:#f0f0f0"] {
  color: #2d3748 !important;
}

body.theme-v2.light-mode [style*="color: #b9bbbe"],
body.theme-v2.light-mode [style*="color:#b9bbbe"],
body.theme-v2.light-mode [style*="color: #99aab5"],
body.theme-v2.light-mode [style*="color:#99aab5"],
body.theme-v2.light-mode [style*="color: #ccc"],
body.theme-v2.light-mode [style*="color:#ccc"] {
  color: #718096 !important;
}

/* Override para bordas inline */
body.theme-v2.light-mode [style*="border-color: #40444b"],
body.theme-v2.light-mode [style*="border-color:#40444b"],
body.theme-v2.light-mode [style*="border: 1px solid #40444b"],
body.theme-v2.light-mode [style*="border: 1px solid #202225"],
body.theme-v2.light-mode [style*="border: 1px solid #2c2f33"] {
  border-color: #e2e8f0 !important;
}

/* Inputs com estilos inline */
body.theme-v2.light-mode input[style*="background-color: #40444b"],
body.theme-v2.light-mode input[style*="background-color:#40444b"],
body.theme-v2.light-mode input[style*="background-color: #36393f"],
body.theme-v2.light-mode input[style*="background-color:#36393f"],
body.theme-v2.light-mode select[style*="background-color: #40444b"],
body.theme-v2.light-mode select[style*="background-color:#40444b"],
body.theme-v2.light-mode textarea[style*="background-color: #40444b"],
body.theme-v2.light-mode textarea[style*="background-color:#40444b"] {
  background: #ffffff !important;
  border: 2px solid #e2e8f0 !important;
  color: #2d3748 !important;
}

/* ============================================
   FÉRIAS LISTAR - CARDS V2 LIGHT MODE
   ============================================ */

/* Override específico para Férias/listar que tem !important inline */
body.theme-v2.light-mode .card[style*="background-color: #2c2f33 !important"],
body.theme-v2.light-mode .card-body[style*="background-color: #2c2f33 !important"],
body.theme-v2.light-mode .card-header[style*="background-color: #202225 !important"] {
  background: #ffffff !important;
  color: #2d3748 !important;
  border-color: #e2e8f0 !important;
}

body.theme-v2.light-mode .card-header[style*="background-color: #202225 !important"] {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
  color: white !important;
}

/* Forçar light mode nos cards com !important */
html.theme-v2.light-mode .card,
html.theme-v2.light-mode .card-body {
  background: #ffffff !important;
  color: #2d3748 !important;
  border-color: #e2e8f0 !important;
}

html.theme-v2.light-mode .card-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  color: #2d3748 !important;
  border-color: #e2e8f0 !important;
}

html.theme-v2.light-mode .modal-content {
  background: #ffffff !important;
  color: #2d3748 !important;
  border-color: #e2e8f0 !important;
}

html.theme-v2.light-mode .modal-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  color: #2d3748 !important;
}

html.theme-v2.light-mode .modal-body {
  background: #ffffff !important;
  color: #2d3748 !important;
}

html.theme-v2.light-mode .modal-footer {
  background: #f8f9fa !important;
  border-color: #e2e8f0 !important;
}

html.theme-v2.light-mode .table {
  color: #2d3748 !important;
}

html.theme-v2.light-mode .table thead th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  color: #2d3748 !important;
  border-color: #e2e8f0 !important;
}

html.theme-v2.light-mode .table tbody tr {
  background: #ffffff !important;
}

html.theme-v2.light-mode .table td,
html.theme-v2.light-mode .table th {
  border-color: #e2e8f0 !important;
}

/* ============================================
   VISITA LISTAR - PAGINAÇÃO V2 LIGHT MODE
   ============================================ */

/* Paginação - Forçar light mode */
body.theme-v2.light-mode #paginacaoVisitas,
body.theme-v2.light-mode div[id="paginacaoVisitas"],
body.theme-v2.light-mode [style*="background-color: #2c2f33"][style*="margin-top: 20px"] {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

body.theme-v2.light-mode #paginacaoAndamentos,
body.theme-v2.light-mode div[id="paginacaoAndamentos"],
body.theme-v2.light-mode [style*="background-color: #36393f"][style*="border-radius: 6px"] {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
}

/* IMPORTANTE: Preservar cores de status nas linhas da tabela de visitas */
/* NÃO aplicar zebra - manter cores originais baseadas em status */
body.theme-v2.light-mode tr[style*="background-color: rgba(255, 235, 59"],
body.theme-v2.dark-mode tr[style*="background-color: rgba(255, 235, 59"] {
  background-color: rgba(255, 235, 59, 0.15) !important; /* Prospecção - Amarelo */
}

body.theme-v2.light-mode tr[style*="background-color: rgba(244, 67, 54"],
body.theme-v2.dark-mode tr[style*="background-color: rgba(244, 67, 54"] {
  background-color: rgba(244, 67, 54, 0.15) !important; /* Negociação - Vermelho */
}

body.theme-v2.light-mode tr[style*="background-color: rgba(76, 175, 80"],
body.theme-v2.dark-mode tr[style*="background-color: rgba(76, 175, 80"] {
  background-color: rgba(76, 175, 80, 0.15) !important; /* Implantação - Verde */
}

/* Ajustar cores no modo claro para melhor legibilidade mantendo a cor de status */
body.theme-v2.light-mode tr[style*="background-color: rgba(255, 235, 59"] {
  background-color: rgba(255, 235, 59, 0.25) !important; /* Mais visível no claro */
}

body.theme-v2.light-mode tr[style*="background-color: rgba(244, 67, 54"] {
  background-color: rgba(244, 67, 54, 0.18) !important;
}

body.theme-v2.light-mode tr[style*="background-color: rgba(76, 175, 80"] {
  background-color: rgba(76, 175, 80, 0.2) !important;
}

/* ============================================
   VISITA/LISTAR - TABELA COM CORES DE STATUS
   NÃO usar zebra - apenas cores de status
   Regras consolidadas - ver seção TABELAS COM CORES DE STATUS
   ============================================ */

/* ============================================
   USUARIO LISTAR - V2 COMPLETO
   ============================================ */

/* Container principal e fundo */
body.theme-v2.light-mode .page-container {
  background: transparent !important;
  color: #2d3748 !important;
}

/* Título */
body.theme-v2.light-mode h1 {
  color: #2d3748 !important;
}

body.theme-v2.light-mode h1::after {
  background: linear-gradient(90deg, #3498db, #2ecc71) !important;
}

/* Formulário de filtros - pesquisa */
body.theme-v2.light-mode .form-row {
  background: transparent !important;
}

body.theme-v2.light-mode .form-group label {
  color: #4a5568 !important;
}

body.theme-v2.light-mode .form-control {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border: 2px solid #e2e8f0 !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode .form-control:focus {
  border-color: #3498db !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15) !important;
}

/* Selects no modo claro - RESET COMPLETO para evitar conflitos de background-image */
body.theme-v2.light-mode select,
body.theme-v2.light-mode select.form-control,
html.theme-v2.light-mode select,
html.theme-v2.light-mode select.form-control,
.theme-v2.light-mode select,
.theme-v2.light-mode select.form-control {
  /* Reset completo do background */
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%232d3748' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 16px 12px !important;
  border: 2px solid #e2e8f0 !important;
  color: #2d3748 !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  padding-right: 40px !important;
}

body.theme-v2.light-mode select:focus,
body.theme-v2.light-mode select.form-control:focus,
html.theme-v2.light-mode select:focus,
.theme-v2.light-mode select:focus {
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%232d3748' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 16px 12px !important;
  border-color: #3498db !important;
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15) !important;
}

body.theme-v2.light-mode .form-control option,
body.theme-v2.light-mode select option,
html.theme-v2.light-mode select option,
.theme-v2.light-mode select option {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  color: #2d3748 !important;
}

/* Filter card no modo claro - alta especificidade */
body.theme-v2.light-mode .filter-card,
html.theme-v2.light-mode .filter-card,
.theme-v2.light-mode .filter-card,
body.theme-v2.light-mode div.filter-card,
html.theme-v2.light-mode div.filter-card,
.theme-v2.light-mode div.filter-card {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
  color: #2d3748 !important;
}

/* Cabeçalho das horas - seções */
body.theme-v2.light-mode .section-header,
body.theme-v2.light-mode div[style*="background"][style*="#353b43"],
body.theme-v2.light-mode div[style*="background-color: #353b43"] {
  background: #f8f9fa !important;
  border-color: #e2e8f0 !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode .section-header h2,
body.theme-v2.light-mode .section-header span {
  color: #2d3748 !important;
}

/* Cards de resumo */
body.theme-v2.light-mode .resumo-card,
body.theme-v2.light-mode div[style*="background: linear-gradient"][style*="rgba"] {
  border: 1px solid #e2e8f0 !important;
}

/* Tabelas em Usuario/listar */
body.theme-v2.light-mode .tabela-usuarios th,
body.theme-v2.light-mode table th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  color: #2d3748 !important;
  border-color: #e2e8f0 !important;
}

body.theme-v2.light-mode .tabela-usuarios td {
  background: #ffffff !important;
  color: #2d3748 !important;
  border-color: #e2e8f0 !important;
}

/* Não aplicar em tabelas com cores de status e excluir TDs de técnicos */
body.theme-v2.light-mode table:not(#tabelaVisitas):not(#tabelaAndamentos):not(#tabelaImplantacoes) tr:not([style*="background-color"]) td:not([data-usunome]):not([style*="background-color"]) {
  background: #ffffff !important;
  color: #2d3748 !important;
  border-color: #e2e8f0 !important;
}

body.theme-v2.light-mode .tabela-usuarios tr:hover td,
body.theme-v2.light-mode table tr:hover td:not([data-usunome]):not([style*="background-color"]) {
  background: #f8f9fa !important;
}

/* Override para backgrounds #414951 (Usuario/listar específico) */
body.theme-v2.light-mode [style*="background: #414951"],
body.theme-v2.light-mode [style*="background-color: #414951"],
body.theme-v2.light-mode [style*="background:#414951"],
body.theme-v2.light-mode [style*="background-color:#414951"] {
  background: #f0f2f5 !important;
}

body.theme-v2.light-mode [style*="background: #353b43"],
body.theme-v2.light-mode [style*="background-color: #353b43"],
body.theme-v2.light-mode [style*="background:#353b43"],
body.theme-v2.light-mode [style*="background-color:#353b43"] {
  background: #ffffff !important;
}

body.theme-v2.light-mode [style*="background: #3d444d"],
body.theme-v2.light-mode [style*="background-color: #3d444d"] {
  background: #f8f9fa !important;
}

/* Textos em Usuario/listar */
body.theme-v2.light-mode [style*="color: #e8eaed"],
body.theme-v2.light-mode [style*="color:#e8eaed"] {
  color: #2d3748 !important;
}

/* Modais em Usuario/listar */
body.theme-v2.light-mode .modal-content[style*="background"],
body.theme-v2.light-mode div.modal-content {
  background: #ffffff !important;
  color: #2d3748 !important;
  border: 1px solid #e2e8f0 !important;
}

body.theme-v2.light-mode .modal-header[style*="background"],
body.theme-v2.light-mode div.modal-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  color: #2d3748 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

body.theme-v2.light-mode .modal-body[style*="background"],
body.theme-v2.light-mode div.modal-body {
  background: #ffffff !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode .modal-footer[style*="background"],
body.theme-v2.light-mode div.modal-footer {
  background: #f8f9fa !important;
  border-top: 1px solid #e2e8f0 !important;
}

/* Close button em modais */
body.theme-v2.light-mode .close,
body.theme-v2.light-mode button.close {
  color: #4a5568 !important;
}

/* Bordas nas seções */
body.theme-v2.light-mode [style*="border: 1px solid #5a6270"],
body.theme-v2.light-mode [style*="border-color: #5a6270"] {
  border-color: #e2e8f0 !important;
}

/* Info boxes e alertas */
body.theme-v2.light-mode .alert,
body.theme-v2.light-mode div.alert {
  background: #f8f9fa !important;
  color: #2d3748 !important;
  border-color: #e2e8f0 !important;
}

body.theme-v2.light-mode .alert-danger {
  background: #fef2f2 !important;
  border-color: #f87171 !important;
  color: #dc2626 !important;
}

body.theme-v2.light-mode .alert-success {
  background: #f0fdf4 !important;
  border-color: #4ade80 !important;
  color: #16a34a !important;
}

body.theme-v2.light-mode .alert-warning {
  background: #fffbeb !important;
  border-color: #fbbf24 !important;
  color: #d97706 !important;
}

body.theme-v2.light-mode .alert-info {
  background: #eff6ff !important;
  border-color: #60a5fa !important;
  color: #2563eb !important;
}

/* ============================================
   USUARIO/LISTAR - MODO ESCURO V2 CONSISTENTE
   ============================================ */

/* Fundo da página no modo escuro V2 - sobrescrever #414951 para padrão V2 */
body.theme-v2.dark-mode .page-container,
html.theme-v2.dark-mode .page-container {
  background: transparent !important;
  background-color: transparent !important;
}

/* Sobrescrever backgrounds específicos da view Usuario/listar */
body.theme-v2.dark-mode [style*="background: #414951"],
body.theme-v2.dark-mode [style*="background-color: #414951"],
body.theme-v2.dark-mode [style*="background:#414951"],
html.theme-v2.dark-mode [style*="background: #414951"],
html.theme-v2.dark-mode [style*="background-color: #414951"] {
  background: transparent !important;
  background-color: transparent !important;
}

/* Sobrescrever backgrounds #353b43 no modo escuro V2 */
body.theme-v2.dark-mode [style*="background: #353b43"],
body.theme-v2.dark-mode [style*="background-color: #353b43"],
html.theme-v2.dark-mode [style*="background: #353b43"],
html.theme-v2.dark-mode [style*="background-color: #353b43"] {
  background: linear-gradient(145deg, #22272e 0%, #2d333b 100%) !important;
}

/* Sobrescrever #353b43 no modo CLARO V2 */
body.theme-v2.light-mode [style*="background: #353b43"],
body.theme-v2.light-mode [style*="background-color: #353b43"],
html.theme-v2.light-mode [style*="background: #353b43"],
html.theme-v2.light-mode [style*="background-color: #353b43"] {
  background: #ffffff !important;
  background-color: #ffffff !important;
}

/* Sobrescrever #3d444d no modo claro */
body.theme-v2.light-mode [style*="background: #3d444d"],
body.theme-v2.light-mode [style*="background-color: #3d444d"],
html.theme-v2.light-mode [style*="background: #3d444d"],
html.theme-v2.light-mode [style*="background-color: #3d444d"] {
  background: #f8f9fa !important;
  background-color: #f8f9fa !important;
}

/* Filter card no modo escuro V2 */
body.theme-v2.dark-mode .filter-card,
html.theme-v2.dark-mode .filter-card {
  background: linear-gradient(145deg, #22272e 0%, #2d333b 100%) !important;
  border: 1px solid #3d4450 !important;
  border-radius: 16px !important;
}

/* Selects no modo escuro V2 - RESET COMPLETO */
body.theme-v2.dark-mode select,
body.theme-v2.dark-mode select.form-control,
html.theme-v2.dark-mode select,
html.theme-v2.dark-mode select.form-control,
.theme-v2.dark-mode select,
.theme-v2.dark-mode select.form-control {
  background-color: #2d333b !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23e8eaed' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 16px 12px !important;
  border: 2px solid #3d4450 !important;
  color: #e8eaed !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  padding-right: 40px !important;
}

body.theme-v2.dark-mode select:focus,
body.theme-v2.dark-mode select.form-control:focus,
html.theme-v2.dark-mode select:focus,
.theme-v2.dark-mode select:focus {
  background-color: #2d333b !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23e8eaed' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 16px 12px !important;
  border-color: #3498db !important;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2) !important;
}

body.theme-v2.dark-mode select option,
body.theme-v2.dark-mode .form-control option,
html.theme-v2.dark-mode select option,
.theme-v2.dark-mode select option {
  background: #2d333b !important;
  background-color: #2d333b !important;
  background-image: none !important;
  color: #e8eaed !important;
}

/* Inputs no modo escuro V2 */
body.theme-v2.dark-mode .form-control,
body.theme-v2.dark-mode input.form-control,
body.theme-v2.dark-mode textarea.form-control {
  background: #2d333b !important;
  background-color: #2d333b !important;
  border: 2px solid #3d4450 !important;
  color: #e8eaed !important;
}

body.theme-v2.dark-mode .form-control:focus {
  border-color: #3498db !important;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2) !important;
}

/* Labels no modo escuro V2 */
body.theme-v2.dark-mode .form-group label,
body.theme-v2.dark-mode label {
  color: #c2c7d0 !important;
}

/* Título h1 no modo escuro V2 */
body.theme-v2.dark-mode h1,
body.theme-v2.dark-mode .page-container h1 {
  color: #ffffff !important;
}

/* Tabelas no modo escuro V2 */
body.theme-v2.dark-mode table th {
  background: linear-gradient(135deg, #1a1d21 0%, #22272e 100%) !important;
  color: #e8eaed !important;
  border-color: #3d4450 !important;
}

/* Tabelas genéricas no modo escuro - exceto tabelas com cores de status e TDs de técnicos */
body.theme-v2.dark-mode table:not(#tabelaVisitas):not(#tabelaAndamentos):not(#tabelaImplantacoes) tr:not([style*="background-color"]) td:not([data-usunome]):not([style*="background-color"]) {
  background: #22272e !important;
  color: #c2c7d0 !important;
  border-color: #3d4450 !important;
}

body.theme-v2.dark-mode table:not(#tabelaVisitas):not(#tabelaAndamentos):not(#tabelaImplantacoes) tr:not([style*="background-color"]):hover td:not([data-usunome]):not([style*="background-color"]) {
  background: #2d333b !important;
}

/* ============================================
   PRESERVAR CORES INLINE DE STATUS E TÉCNICOS
   ============================================ */

/* ============================================
   TABELAS COM CORES DE STATUS - VISITAS/ANDAMENTOS
   IMPORTANTE: NÃO aplicar zebra nestas tabelas!
   ============================================ */

/* Tabela de Visitas - Modo escuro */
body.theme-v2.dark-mode #tabelaVisitas {
  background: #22272e !important;
}

body.theme-v2.dark-mode #tabelaVisitas th,
html.theme-v2.dark-mode #tabelaVisitas th {
  background: linear-gradient(135deg, #1a1d21 0%, #22272e 100%) !important;
  color: #e8eaed !important;
  border-color: #3d4450 !important;
}

/* TDs transparentes para mostrar cor do TR */
body.theme-v2.dark-mode #tabelaVisitas td,
html.theme-v2.dark-mode #tabelaVisitas td {
  background: transparent !important;
  background-color: transparent !important;
  color: #c2c7d0 !important;
  border-color: #3d4450 !important;
}

/* TRs - NÃO aplicar zebra, deixar cor de status */
body.theme-v2.dark-mode #tabelaVisitas tbody tr {
  /* Não definir background aqui - deixar inline funcionar */
}

/* Tabela de Visitas - Modo claro */
body.theme-v2.light-mode #tabelaVisitas {
  background: #ffffff !important;
}

body.theme-v2.light-mode #tabelaVisitas th,
html.theme-v2.light-mode #tabelaVisitas th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  color: #2d3748 !important;
  border-color: #e2e8f0 !important;
}

/* TDs transparentes para mostrar cor do TR */
body.theme-v2.light-mode #tabelaVisitas td,
html.theme-v2.light-mode #tabelaVisitas td {
  background: transparent !important;
  background-color: transparent !important;
  color: #2d3748 !important;
  border-color: #e2e8f0 !important;
}

/* TRs - NÃO aplicar zebra, deixar cor de status */
body.theme-v2.light-mode #tabelaVisitas tbody tr {
  /* Não definir background aqui - deixar inline funcionar */
}

/* Tabela de Andamentos - Modo escuro */
body.theme-v2.dark-mode #tabelaAndamentos th {
  background: linear-gradient(135deg, #1a1d21 0%, #22272e 100%) !important;
  color: #e8eaed !important;
  border-color: #3d4450 !important;
}

body.theme-v2.dark-mode #tabelaAndamentos td {
  background: transparent !important;
  color: #c2c7d0 !important;
  border-color: #3d4450 !important;
}

/* Tabela de Andamentos - Modo claro */
body.theme-v2.light-mode #tabelaAndamentos th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  color: #2d3748 !important;
  border-color: #e2e8f0 !important;
}

body.theme-v2.light-mode #tabelaAndamentos td {
  background: transparent !important;
  color: #2d3748 !important;
  border-color: #e2e8f0 !important;
}

/* Preservar background em TDs com cores específicas de técnico */
body.theme-v2 table td[style*="background-color"],
html.theme-v2 table td[style*="background-color"],
.theme-v2 table td[style*="background-color"] {
  /* Não sobrescrever - deixar inherit funcionar */
}

/* Viagens - Preservar cores de técnicos (TDs com data-usunome) */
/* A cor é definida via style inline no JS - regras mais específicas estão no final do arquivo */

/* Modo claro - Ajustar opacidade das cores de status para melhor visibilidade */
body.theme-v2.light-mode table tr[style*="rgba(255, 235, 59"],
body.theme-v2.light-mode table tr[style*="rgba(244, 67, 54"],
body.theme-v2.light-mode table tr[style*="rgba(76, 175, 80"] {
  /* Manter a cor original */
}

body.theme-v2.light-mode table tr[style*="rgba(255, 235, 59"] td,
body.theme-v2.light-mode table tr[style*="rgba(244, 67, 54"] td,
body.theme-v2.light-mode table tr[style*="rgba(76, 175, 80"] td {
  background: transparent !important;
  color: #2d3748 !important;
}

/* ============================================
   FÉRIAS/LISTAR - CARDS NO MODO CLARO
   ============================================ */

body.theme-v2.light-mode .card-ferias,
html.theme-v2.light-mode .card-ferias,
.theme-v2.light-mode .card-ferias {
  background-color: #ffffff !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #2d3748 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

body.theme-v2.light-mode .card-ferias:hover,
html.theme-v2.light-mode .card-ferias:hover,
.theme-v2.light-mode .card-ferias:hover {
  background-color: #f8f9fa !important;
  background: #f8f9fa !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
}

body.theme-v2.light-mode .card-ferias *,
html.theme-v2.light-mode .card-ferias * {
  color: #2d3748 !important;
}

body.theme-v2.light-mode .card-ferias .badge,
html.theme-v2.light-mode .card-ferias .badge {
  color: #ffffff !important;
}

/* Modo escuro - cards férias */
body.theme-v2.dark-mode .card-ferias,
html.theme-v2.dark-mode .card-ferias {
  background: linear-gradient(145deg, #22272e 0%, #2d333b 100%) !important;
  border: 1px solid #3d4450 !important;
  color: #e8eaed !important;
}

body.theme-v2.dark-mode .card-ferias:hover {
  background: linear-gradient(145deg, #2d333b 0%, #363d47 100%) !important;
}

/* ============================================
   TABELA DE IMPLANTAÇÕES - MODO CLARO
   ============================================ */

body.theme-v2.light-mode #tabelaImplantacoes,
html.theme-v2.light-mode #tabelaImplantacoes {
  background: #ffffff !important;
}

body.theme-v2.light-mode #tabelaImplantacoes th,
html.theme-v2.light-mode #tabelaImplantacoes th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  color: #2d3748 !important;
  border-color: #e2e8f0 !important;
}

/* TDs normais (exceto coluna do técnico) */
body.theme-v2.light-mode #tabelaImplantacoes td:not([data-usunome]),
html.theme-v2.light-mode #tabelaImplantacoes td:not([data-usunome]) {
  background: #ffffff !important;
  color: #4a5568 !important;
  border-color: #e2e8f0 !important;
}

body.theme-v2.light-mode #tabelaImplantacoes tr:nth-child(even) td:not([data-usunome]),
html.theme-v2.light-mode #tabelaImplantacoes tr:nth-child(even) td:not([data-usunome]) {
  background: #f8fafc !important;
}

body.theme-v2.light-mode #tabelaImplantacoes tr:hover td:not([data-usunome]),
html.theme-v2.light-mode #tabelaImplantacoes tr:hover td:not([data-usunome]) {
  background: #e8f4fd !important;
}

/* TD do técnico NO MODO CLARO - forçar cor inline via attribute selector */
body.theme-v2.light-mode #tabelaImplantacoes td[data-usunome][style],
html.theme-v2.light-mode #tabelaImplantacoes td[data-usunome][style],
body.theme-v2.light-mode table td[data-usunome][style] {
  /* Forçar o estilo inline a ser aplicado */
  background-color: var(--tecnico-bg-color) !important;
}

/* Aplicar cores dos técnicos por nome - MODO CLARO */
body.theme-v2.light-mode #tabelaImplantacoes td[data-usunome="Vinicius"],
body.theme-v2.light-mode table td[data-usunome="Vinicius"] { background-color: #F2F2F2 !important; }

body.theme-v2.light-mode #tabelaImplantacoes td[data-usunome="Carlos"],
body.theme-v2.light-mode table td[data-usunome="Carlos"] { background-color: #C0E6F5 !important; }

body.theme-v2.light-mode #tabelaImplantacoes td[data-usunome="Renan"],
body.theme-v2.light-mode table td[data-usunome="Renan"] { background-color: #FBE2D5 !important; }

body.theme-v2.light-mode #tabelaImplantacoes td[data-usunome="ADM"],
body.theme-v2.light-mode table td[data-usunome="ADM"] { background-color: #F1A983 !important; }

body.theme-v2.light-mode #tabelaImplantacoes td[data-usunome="Guilherme Sousa"],
body.theme-v2.light-mode table td[data-usunome="Guilherme Sousa"] { background-color: #DAF2D0 !important; }

/* Cor padrão para técnicos não mapeados */
body.theme-v2.light-mode #tabelaImplantacoes td[data-usunome="N/A"],
body.theme-v2.light-mode table td[data-usunome="N/A"] { background-color: #4f5459 !important; color: #fff !important; }

/* Técnicos adicionais que possam existir - usar cor do style inline */
body.theme-v2.light-mode #tabelaImplantacoes td[data-usunome]:not([data-usunome="Vinicius"]):not([data-usunome="Carlos"]):not([data-usunome="Renan"]):not([data-usunome="ADM"]):not([data-usunome="Guilherme Sousa"]):not([data-usunome="N/A"]) {
  /* Para técnicos não listados, tentar preservar a cor inline */
  background-color: inherit;
}

/* ============================================
   COLUNA DO TÉCNICO - PRESERVAR COR DE FUNDO INLINE
   SOLUÇÃO: Usar !important para FORÇAR que o style inline seja respeitado
   ============================================ */

/* Estilos comuns para TD de técnico - sem definir background */
body.theme-v2 #tabelaImplantacoes td[data-usunome],
body.theme-v2 table td[data-usunome] {
  color: #000000 !important;
  font-weight: 700 !important;
  border-radius: 4px !important;
  text-align: center !important;
  /* CRÍTICO: Não definir background aqui */
}

/* Borda específica por modo */
body.theme-v2.light-mode #tabelaImplantacoes td[data-usunome],
body.theme-v2.light-mode table td[data-usunome] {
  border-color: #e2e8f0 !important;
}

body.theme-v2.dark-mode #tabelaImplantacoes td[data-usunome],
body.theme-v2.dark-mode table td[data-usunome] {
  border-color: #3d4450 !important;
}

/* TDs sem data-usunome na tabela de implantações - modo escuro */
body.theme-v2.dark-mode #tabelaImplantacoes td:not([data-usunome]),
html.theme-v2.dark-mode #tabelaImplantacoes td:not([data-usunome]) {
  background: #22272e !important;
  color: #c2c7d0 !important;
}

body.theme-v2.dark-mode #tabelaImplantacoes tr:nth-child(even) td:not([data-usunome]) {
  background: rgba(45, 51, 59, 0.4) !important;
}

body.theme-v2.dark-mode #tabelaImplantacoes tr:hover td:not([data-usunome]) {
  background: rgba(52, 152, 219, 0.12) !important;
}

/* ============================================
   TABELA DE CONTRATOS - MODO CLARO
   ============================================ */

body.theme-v2.light-mode #tabelaContratos,
html.theme-v2.light-mode #tabelaContratos {
  background: #ffffff !important;
}

body.theme-v2.light-mode #tabelaContratos th,
html.theme-v2.light-mode #tabelaContratos th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  color: #2d3748 !important;
  border-color: #e2e8f0 !important;
}

body.theme-v2.light-mode #tabelaContratos td,
html.theme-v2.light-mode #tabelaContratos td {
  background: #ffffff !important;
  color: #4a5568 !important;
  border-color: #e2e8f0 !important;
}

/* ============================================
   TOAST E ANIMAÇÕES V2 - VISITA/LISTAR
   MELHORADO COM VISUAL MODERNO
   ============================================ */

/* Toast Overlay - V2 */
body.theme-v2 .toast-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 10000 !important;
  pointer-events: auto !important;
}

/* Toast Container Base - V2 */
body.theme-v2 .toast {
  position: relative !important;
  min-width: 350px !important;
  max-width: 500px !important;
  padding: 32px 40px !important;
  border-radius: 20px !important;
  text-align: center !important;
  pointer-events: auto !important;
  overflow: visible !important;
}

/* Toast Container - V2 Dark Mode */
body.theme-v2.dark-mode .toast {
  background: linear-gradient(145deg, #1a1d21 0%, #22272e 50%, #1e2227 100%) !important;
  border: 2px solid transparent !important;
  border-image: linear-gradient(135deg, #3498db, #2ecc71, #3498db) 1 !important;
  box-shadow: 
    0 25px 80px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(52, 152, 219, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
}

body.theme-v2.dark-mode .toast.toast-success {
  border-image: linear-gradient(135deg, #27ae60, #2ecc71, #27ae60) 1 !important;
  box-shadow: 
    0 25px 80px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(39, 174, 96, 0.3),
    0 0 100px rgba(46, 204, 113, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

body.theme-v2.dark-mode .toast.toast-warning {
  border-image: linear-gradient(135deg, #f39c12, #e67e22, #f39c12) 1 !important;
  box-shadow: 
    0 25px 80px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(243, 156, 18, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* Toast Container - V2 Light Mode */
body.theme-v2.light-mode .toast {
  background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 50%, #ffffff 100%) !important;
  border: 2px solid #e2e8f0 !important;
  box-shadow: 
    0 25px 80px rgba(0, 0, 0, 0.15),
    0 0 40px rgba(52, 152, 219, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 1) !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode .toast.toast-success {
  border-color: #27ae60 !important;
  box-shadow: 
    0 25px 80px rgba(0, 0, 0, 0.15),
    0 0 60px rgba(39, 174, 96, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 1) !important;
}

body.theme-v2.light-mode .toast.toast-warning {
  border-color: #f39c12 !important;
  box-shadow: 
    0 25px 80px rgba(0, 0, 0, 0.15),
    0 0 60px rgba(243, 156, 18, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 1) !important;
}

/* Toast Header */
body.theme-v2 .toast-header {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 16px !important;
}

/* Toast Icon */
body.theme-v2 .toast-icon {
  font-size: 48px !important;
  line-height: 1 !important;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)) !important;
  animation: iconBounce 0.6s ease-out !important;
}

@keyframes iconBounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* Toast Message */
body.theme-v2 .toast-message,
body.theme-v2 .toast-content {
  font-size: 18px !important;
  font-weight: 500 !important;
  line-height: 1.6 !important;
  margin-bottom: 24px !important;
}

body.theme-v2.dark-mode .toast-message,
body.theme-v2.dark-mode .toast-content {
  color: #e8eaed !important;
}

body.theme-v2.light-mode .toast-message,
body.theme-v2.light-mode .toast-content {
  color: #4a5568 !important;
}

/* Toast Close Button - IMPORTANTE: pointer-events auto e z-index alto */
body.theme-v2 .toast-close,
body.theme-v2 .toast .toast-close,
body.theme-v2.dark-mode .toast .toast-close,
body.theme-v2.light-mode .toast .toast-close {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 140px !important;
  padding: 14px 32px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  border: none !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  position: relative !important;
  overflow: hidden !important;
  z-index: 9999 !important;
  -webkit-tap-highlight-color: transparent !important;
  touch-action: manipulation !important;
  user-select: none !important;
}

body.theme-v2.dark-mode .toast-close {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4) !important;
}

body.theme-v2.light-mode .toast-close {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3) !important;
}

body.theme-v2 .toast-close:hover {
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow: 0 8px 25px rgba(52, 152, 219, 0.5) !important;
}

body.theme-v2 .toast-close:active {
  transform: translateY(-1px) scale(0.98) !important;
}

/* Success Toast Close Button */
body.theme-v2 .toast.toast-success .toast-close {
  background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%) !important;
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4) !important;
}

body.theme-v2 .toast.toast-success .toast-close:hover {
  box-shadow: 0 8px 25px rgba(39, 174, 96, 0.5) !important;
}

/* Warning Toast Close Button */
body.theme-v2 .toast.toast-warning .toast-close {
  background: linear-gradient(135deg, #f39c12 0%, #d68910 100%) !important;
}

/* === TOAST PROGRESS BAR - Auto Close === */
body.theme-v2 .toast-progress-bar {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 5px !important;
  background: rgba(255, 255, 255, 0.1) !important;
  overflow: hidden !important;
  border-radius: 0 0 18px 18px !important;
}

body.theme-v2 .toast-progress-fill {
  height: 100% !important;
  background: linear-gradient(90deg, #3498db, #2ecc71) !important;
  width: 100% !important;
  animation: toastProgressShrink 5s linear forwards !important;
}

body.theme-v2 .toast.toast-success .toast-progress-fill {
  background: linear-gradient(90deg, #27ae60, #2ecc71) !important;
}

body.theme-v2 .toast.toast-warning .toast-progress-fill {
  background: linear-gradient(90deg, #f39c12, #e67e22) !important;
}

body.theme-v2.light-mode .toast-progress-bar {
  background: rgba(0, 0, 0, 0.05) !important;
}

@keyframes toastProgressShrink {
  from { width: 100%; }
  to { width: 0%; }
}

body.theme-v2 .toast.toast-warning .toast-close:hover {
  box-shadow: 0 8px 25px rgba(243, 156, 18, 0.5) !important;
}

/* ============================================
   MODAL DE NOTIFICAÇÕES DE RETORNO - V2
   ============================================ */

/* Modal container - Modo Claro */
body.theme-v2.light-mode #modalNotificacoesRetorno > .modal-content {
  background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%) !important;
  border: 1px solid #e2e8f0 !important;
  color: #2d3748 !important;
}

body.theme-v2.light-mode #modalNotificacoesRetorno h2 {
  color: #0284c7 !important;
}

body.theme-v2.light-mode #modalNotificacoesRetorno .close {
  color: #64748b !important;
}

body.theme-v2.light-mode #modalNotificacoesRetorno .close:hover {
  color: #dc2626 !important;
}

/* Cards de notificação - Modo Claro */
body.theme-v2.light-mode #modalNotificacoesRetorno .notificacao-item,
body.theme-v2.light-mode #listaNotificacoesRetorno > div {
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-left: 4px solid #0284c7 !important;
}

body.theme-v2.light-mode #modalNotificacoesRetorno .notificacao-item:hover,
body.theme-v2.light-mode #listaNotificacoesRetorno > div:hover {
  background-color: #f1f5f9 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* Textos nos cards - Modo Claro */
body.theme-v2.light-mode #modalNotificacoesRetorno .notificacao-item div[style*="color: #ecf0f1"],
body.theme-v2.light-mode #listaNotificacoesRetorno > div div[style*="color: #ecf0f1"] {
  color: #4a5568 !important;
}

body.theme-v2.light-mode #modalNotificacoesRetorno .notificacao-item strong,
body.theme-v2.light-mode #listaNotificacoesRetorno > div strong {
  color: #2d3748 !important;
}

/* Ícone e título - Modo Claro */
body.theme-v2.light-mode #modalNotificacoesRetorno .notificacao-item i[style*="color: #0ea5e9"],
body.theme-v2.light-mode #listaNotificacoesRetorno > div i[style*="color: #0ea5e9"] {
  color: #0284c7 !important;
}

body.theme-v2.light-mode #modalNotificacoesRetorno .notificacao-item strong[style*="color: #0ea5e9"],
body.theme-v2.light-mode #listaNotificacoesRetorno > div strong[style*="color: #0ea5e9"] {
  color: #0284c7 !important;
}

/* Botão fechar do modal - Modo Claro */
body.theme-v2.light-mode #modalNotificacoesRetorno button[style*="background-color: #6b7280"] {
  background-color: #e2e8f0 !important;
  color: #4a5568 !important;
}

body.theme-v2.light-mode #modalNotificacoesRetorno button[style*="background-color: #6b7280"]:hover {
  background-color: #d1d5db !important;
}

/* Botão marcar como lida - Mantém verde */
body.theme-v2.light-mode #modalNotificacoesRetorno .btn-marcar-lida,
body.theme-v2.light-mode #modalNotificacoesRetorno button[style*="background-color: #10b981"] {
  background-color: #10b981 !important;
  color: #ffffff !important;
}

/* Modo Escuro - Garantir estilos */
body.theme-v2.dark-mode #modalNotificacoesRetorno > .modal-content {
  background: linear-gradient(145deg, #1e2227 0%, #22272e 100%) !important;
  border: 1px solid #3d4450 !important;
  color: #e8eaed !important;
}

body.theme-v2.dark-mode #modalNotificacoesRetorno .notificacao-item,
body.theme-v2.dark-mode #listaNotificacoesRetorno > div {
  background-color: #2d333b !important;
  border: 1px solid #3d4450 !important;
  border-left: 4px solid #0ea5e9 !important;
}

body.theme-v2.dark-mode #modalNotificacoesRetorno .notificacao-item:hover,
body.theme-v2.dark-mode #listaNotificacoesRetorno > div:hover {
  background-color: #36393f !important;
}

/* ============================================
   RELATÓRIO VISITA - .tabela-container
   ============================================ */

/* Modo claro */
body.theme-v2.light-mode .tabela-container {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%) !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

body.theme-v2.light-mode .tabela-container h3 {
  color: #0284c7 !important;
}

body.theme-v2.light-mode .tabela-container .table,
body.theme-v2.light-mode .tabela-container .table th,
body.theme-v2.light-mode .tabela-container .table td {
  color: #2d3748 !important;
}

body.theme-v2.light-mode .tabela-container .table thead th {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}

body.theme-v2.light-mode .tabela-container .table tbody td {
  border-color: #e2e8f0 !important;
}

body.theme-v2.light-mode .tabela-container .table tbody tr:nth-child(even) {
  background-color: #f8fafc !important;
}

body.theme-v2.light-mode .tabela-container .table tbody tr:hover {
  background-color: #f1f5f9 !important;
}

/* Modo escuro */
body.theme-v2.dark-mode .tabela-container {
  background: linear-gradient(135deg, #1e2227 0%, #22272e 100%) !important;
  border: 1px solid #3d4450 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

body.theme-v2.dark-mode .tabela-container h3 {
  color: #0ea5e9 !important;
}

body.theme-v2.dark-mode .tabela-container .table,
body.theme-v2.dark-mode .tabela-container .table th,
body.theme-v2.dark-mode .tabela-container .table td {
  color: #e8eaed !important;
}

body.theme-v2.dark-mode .tabela-container .table thead th {
  background: #2d333b !important;
  border-color: #3d4450 !important;
  color: #c2c7d0 !important;
}

body.theme-v2.dark-mode .tabela-container .table tbody td {
  border-color: #3d4450 !important;
}

body.theme-v2.dark-mode .tabela-container .table tbody tr:nth-child(even) {
  background-color: rgba(45, 51, 59, 0.4) !important;
}

body.theme-v2.dark-mode .tabela-container .table tbody tr:hover {
  background-color: rgba(52, 152, 219, 0.12) !important;
}

body.theme-v2 .toast.toast-warning .toast-close:hover {
  box-shadow: 0 8px 25px rgba(243, 156, 18, 0.5) !important;
}

/* Toast Animation V2 */
body.theme-v2 .toast {
  animation: toastSlideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

@keyframes toastSlideIn {
  0% {
    opacity: 0;
    transform: scale(0.7) translateY(50px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Success Toast Glow Effect */
body.theme-v2 .toast.toast-success::before {
  content: '' !important;
  position: absolute !important;
  top: -3px !important;
  left: -3px !important;
  right: -3px !important;
  bottom: -3px !important;
  background: linear-gradient(45deg, #27ae60, #2ecc71, #58d68d, #2ecc71, #27ae60) !important;
  background-size: 300% 300% !important;
  border-radius: 22px !important;
  z-index: -2 !important;
  animation: gradientShift 3s ease infinite !important;
  opacity: 0.7 !important;
  pointer-events: none !important;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Warning Toast Glow Effect */
body.theme-v2 .toast.toast-warning::before {
  content: '' !important;
  position: absolute !important;
  top: -3px !important;
  left: -3px !important;
  right: -3px !important;
  bottom: -3px !important;
  background: linear-gradient(45deg, #f39c12, #e67e22, #f5b041, #e67e22, #f39c12) !important;
  background-size: 300% 300% !important;
  border-radius: 22px !important;
  z-index: -2 !important;
  animation: gradientShift 3s ease infinite !important;
  opacity: 0.6 !important;
  pointer-events: none !important;
}

/* Fireworks Container - V2 */
body.theme-v2 .fireworks-container {
  z-index: 10002 !important;
  pointer-events: none !important;
}

body.theme-v2 .firework-rocket {
  background: linear-gradient(to top, #e74c3c, #f39c12, #ffffff) !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.9), 0 0 30px rgba(243, 156, 18, 0.7) !important;
}

body.theme-v2 .firework-particle {
  box-shadow: 0 0 8px currentColor, 0 0 16px currentColor !important;
}

/* Mobile Toast V2 */
@media (max-width: 768px) {
  body.theme-v2 .toast {
    min-width: auto !important;
    max-width: 90vw !important;
    width: 90vw !important;
    padding: 24px 20px !important;
    margin: 0 auto !important;
    border-radius: 16px !important;
  }
  
  body.theme-v2 .toast-icon {
    font-size: 40px !important;
  }
  
  body.theme-v2 .toast-message,
  body.theme-v2 .toast-content {
    font-size: 16px !important;
    margin-bottom: 20px !important;
  }
  
  body.theme-v2 .toast-close {
    width: 100% !important;
    padding: 16px !important;
    font-size: 14px !important;
  }
}

/* ============================================
   ONBOARDING V2 - SISTEMA DE TOUR GUIADO
   ============================================ */

/* Toast de Notificação de Atualização - SEMPRE com visual V2 moderno */
.onboarding-notification-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 400px;
  padding: 20px 24px;
  border-radius: 16px;
  z-index: 10001;
  animation: onboardingSlideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(52, 152, 219, 0.2);
  /* Visual V2 moderno - sempre aplicado */
  background: linear-gradient(145deg, #1e2227 0%, #22272e 100%) !important;
  border: 1px solid #3d4450 !important;
  color: #e8eaed !important;
}

.onboarding-notification-toast .toast-icon {
  font-size: 32px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  border-radius: 50%;
  color: #ffffff;
}

.onboarding-notification-toast .toast-icon i {
  font-size: 24px;
}

.onboarding-notification-toast .toast-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #3498db;
}

.onboarding-notification-toast .toast-message {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
  color: #95a5a6 !important; /* Visual V2 sempre */
}

.onboarding-notification-toast .toast-actions {
  display: flex;
  gap: 12px;
}

.onboarding-notification-toast .btn-iniciar {
  flex: 1;
  padding: 12px 20px;
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.onboarding-notification-toast .btn-iniciar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.onboarding-notification-toast .btn-fechar {
  padding: 12px 16px;
  background: transparent !important;
  border: 1px solid #4a5568 !important;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #95a5a6 !important;
}

.onboarding-notification-toast .btn-fechar:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

@keyframes onboardingSlideIn {
  0% {
    opacity: 0;
    transform: translateX(100px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* Overlay do Tour - Fundo base */
.onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9998;
  pointer-events: auto;
  background: transparent;
}

/* Spotlight - Cria o buraco no overlay para mostrar o elemento */
.onboarding-spotlight {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.85);
  transition: all 0.3s ease;
}

/* Borda animada ao redor do spotlight */
.onboarding-spotlight::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border: 3px solid #3498db;
  border-radius: 16px;
  animation: highlightPulse 2s ease-in-out infinite;
  box-shadow: 0 0 30px rgba(52, 152, 219, 0.6);
}

/* Elemento real sendo destacado - fica acima do overlay */
.onboarding-highlighted-element {
  position: relative !important;
  z-index: 10001 !important;
}

/* Sidebar elevada durante onboarding - fica acima do overlay */
.main-sidebar.onboarding-sidebar-elevated {
  z-index: 10000 !important;
}

/* Garantir que elementos dentro da sidebar tenham fundo visível quando destacados */
#sidebarThemeToggles.onboarding-highlighted-element,
#modoToggleContainer.onboarding-highlighted-element,
#sidebarSeletorEstilo.onboarding-highlighted-element {
  background: linear-gradient(145deg, #1e2227 0%, #22272e 100%) !important;
  padding: 10px !important;
  border-radius: 10px !important;
  border: 1px solid #3d4450 !important;
}

/* Select do tema quando destacado */
#sidebarSeletorEstilo.onboarding-highlighted-element {
  padding: 8px 12px !important;
  font-size: 14px !important;
  min-width: 120px !important;
}

/* Garantir texto visível nos elementos de tema */
#sidebarThemeToggles.onboarding-highlighted-element span,
#sidebarThemeToggles.onboarding-highlighted-element select,
#sidebarThemeToggles.onboarding-highlighted-element label,
#modoToggleContainer.onboarding-highlighted-element span,
#modoToggleContainer.onboarding-highlighted-element label {
  color: #e8eaed !important;
}

#sidebarThemeToggles.onboarding-highlighted-element select,
#sidebarSeletorEstilo.onboarding-highlighted-element {
  background: #2d333b !important;
  color: #e8eaed !important;
  border: 1px solid #3d4450 !important;
  cursor: pointer !important;
}

@keyframes highlightPulse {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.6);
    opacity: 1;
  }
  50% { 
    box-shadow: 0 0 40px rgba(52, 152, 219, 0.9);
    opacity: 0.8;
  }
}

/* Tooltip do Tour */
.onboarding-tooltip {
  position: absolute;
  max-width: 380px;
  padding: 24px;
  border-radius: 16px;
  z-index: 10001;
  pointer-events: auto;
  animation: tooltipFadeIn 0.4s ease-out forwards;
  /* Visual V2 moderno - sempre aplicado */
  background: linear-gradient(145deg, #1e2227 0%, #22272e 100%) !important;
  border: 1px solid #3d4450 !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(52, 152, 219, 0.2) !important;
  color: #e8eaed !important;
}

@keyframes tooltipFadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Seta do Tooltip */
.onboarding-tooltip-arrow {
  position: absolute;
  width: 16px;
  height: 16px;
  transform: rotate(45deg);
  /* Visual V2 sempre */
  background: #1e2227 !important;
  border: 1px solid #3d4450 !important;
}

.onboarding-tooltip-arrow.arrow-top {
  top: -9px;
  left: 50%;
  margin-left: -8px;
  border-right: none;
  border-bottom: none;
}

.onboarding-tooltip-arrow.arrow-bottom {
  bottom: -9px;
  left: 50%;
  margin-left: -8px;
  border-left: none;
  border-top: none;
}

.onboarding-tooltip-arrow.arrow-left {
  left: -9px;
  top: 50%;
  margin-top: -8px;
  border-right: none;
  border-top: none;
}

.onboarding-tooltip-arrow.arrow-right {
  right: -9px;
  top: 50%;
  margin-top: -8px;
  border-left: none;
  border-bottom: none;
}

.onboarding-tooltip-arrow.arrow-none {
  display: none;
}

/* Conteúdo do Tooltip */
.onboarding-tooltip-step {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
  font-size: 12px;
  font-weight: 700;
  border-radius: 20px;
  margin-bottom: 12px;
}

.onboarding-tooltip-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #3498db;
}

.onboarding-tooltip-content {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
  color: #c2c7d0 !important; /* Visual V2 sempre */
}

.onboarding-tooltip-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.onboarding-tooltip-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #95a5a6 !important; /* Visual V2 sempre */
}

.onboarding-tooltip-feature i {
  color: #27ae60 !important;
  font-size: 14px;
}

/* Botões do Tooltip */
.onboarding-tooltip-actions {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}

.onboarding-tooltip-progress {
  display: flex;
  gap: 6px;
}

.onboarding-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  background: #3d4450 !important; /* Visual V2 sempre */
}

.onboarding-progress-dot.active {
  background: #3498db;
  width: 24px;
  border-radius: 4px;
}

.onboarding-progress-dot.completed {
  background: #27ae60;
}

.onboarding-btn-group {
  display: flex;
  gap: 10px;
}

.onboarding-btn {
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.onboarding-btn-skip {
  background: transparent !important;
  border: 1px solid #4a5568 !important;
  color: #95a5a6 !important;
}

.onboarding-btn-skip:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

.onboarding-btn-next {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
}

.onboarding-btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.onboarding-btn-prev {
  background: transparent !important;
  border: 1px solid #4a5568 !important;
  color: #c2c7d0 !important;
}

/* Modal de Avaliação */
.onboarding-feedback-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10002;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease-out;
}

.onboarding-feedback-content {
  max-width: 450px;
  width: 90%;
  padding: 32px;
  border-radius: 20px;
  text-align: center;
  animation: scaleIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  /* Visual V2 sempre */
  background: linear-gradient(145deg, #1e2227 0%, #22272e 100%) !important;
  border: 1px solid #3d4450 !important;
  color: #e8eaed !important;
}

@keyframes scaleIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.onboarding-feedback-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.onboarding-feedback-subtitle {
  font-size: 14px;
  margin-bottom: 24px;
  color: #95a5a6 !important; /* Visual V2 sempre */
}

.onboarding-feedback-ratings {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}

.onboarding-rating-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #3d4450 !important;
  background: transparent !important;
  color: #95a5a6;
  font-size: 40px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.onboarding-rating-btn i {
  font-size: 32px;
  transition: all 0.3s ease;
}

.onboarding-rating-btn:hover {
  transform: scale(1.15);
}

.onboarding-rating-btn.like i {
  color: #95a5a6;
}

.onboarding-rating-btn.like:hover i,
.onboarding-rating-btn.like.selected i {
  color: #27ae60;
}

.onboarding-rating-btn.dislike i {
  color: #95a5a6;
}

.onboarding-rating-btn.dislike:hover i,
.onboarding-rating-btn.dislike.selected i {
  color: #e74c3c;
}

.onboarding-rating-btn.like:hover {
  border-color: #27ae60 !important;
  background: rgba(39, 174, 96, 0.2) !important;
  transform: scale(1.1);
}

.onboarding-rating-btn.like.selected {
  border-color: #27ae60 !important;
  background: rgba(39, 174, 96, 0.3) !important;
  transform: scale(1.15);
  box-shadow: 0 0 20px rgba(39, 174, 96, 0.5) !important;
}

.onboarding-rating-btn.dislike:hover {
  border-color: #e74c3c !important;
  background: rgba(231, 76, 60, 0.2) !important;
  transform: scale(1.1);
}

.onboarding-rating-btn.dislike.selected {
  border-color: #e74c3c !important;
  background: rgba(231, 76, 60, 0.3) !important;
  transform: scale(1.15);
  box-shadow: 0 0 20px rgba(231, 76, 60, 0.5) !important;
}

.onboarding-feedback-textarea {
  width: 100%;
  min-height: 100px;
  padding: 14px;
  border-radius: 12px;
  font-size: 14px;
  resize: vertical;
  margin-bottom: 20px;
  font-family: inherit;
  /* Visual V2 sempre */
  background: #1a1d21 !important;
  border: 1px solid #3d4450 !important;
  color: #e8eaed !important;
}

.onboarding-feedback-textarea:focus {
  border-color: #3498db !important;
  outline: none !important;
}

.onboarding-feedback-textarea::placeholder {
  color: #95a5a6;
}

.onboarding-feedback-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.onboarding-feedback-btn {
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.onboarding-feedback-btn.primary {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
}

.onboarding-feedback-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.onboarding-feedback-btn.secondary {
  background: transparent !important;
  border: 1px solid #4a5568 !important;
  color: #95a5a6 !important;
}

/* ============================================
   ONBOARDING - RESPONSIVIDADE MOBILE
   ============================================ */
@media (max-width: 768px) {
  
  /* Toast de Notificação - Mobile */
  .onboarding-notification-toast {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    max-width: none !important;
    width: 100% !important;
    border-radius: 16px 16px 0 0 !important;
    padding: 20px !important;
    margin: 0 !important;
    z-index: 10001 !important;
    animation: slideUpMobile 0.4s ease forwards !important;
  }
  
  .onboarding-notification-toast .toast-icon {
    width: 40px !important;
    height: 40px !important;
    margin-bottom: 10px !important;
  }
  
  .onboarding-notification-toast .toast-icon i {
    font-size: 20px !important;
  }
  
  .onboarding-notification-toast .toast-title {
    font-size: 16px !important;
    margin-bottom: 6px !important;
  }
  
  .onboarding-notification-toast .toast-message {
    font-size: 13px !important;
    line-height: 1.5 !important;
    margin-bottom: 14px !important;
  }
  
  .onboarding-notification-toast .toast-actions {
    flex-direction: column !important;
    gap: 10px !important;
  }
  
  .onboarding-notification-toast .btn-iniciar,
  .onboarding-notification-toast .btn-fechar {
    width: 100% !important;
    padding: 14px 20px !important;
    font-size: 15px !important;
  }
  
  /* Overlay - Mobile */
  .onboarding-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 9998 !important;
  }
  
  /* Spotlight - Mobile */
  .onboarding-spotlight {
    position: fixed !important;
    z-index: 10000 !important;
    border-radius: 8px !important;
  }
  
  .onboarding-spotlight::before {
    border-width: 2px !important;
    border-radius: 12px !important;
  }
  
  /* Tooltip - Mobile: Fixo na parte inferior */
  .onboarding-tooltip {
    position: fixed !important;
    bottom: 20px !important;
    left: 16px !important;
    right: 16px !important;
    top: auto !important;
    max-width: none !important;
    width: calc(100% - 32px) !important;
    max-height: 60vh !important;
    overflow-y: auto !important;
    padding: 20px !important;
    border-radius: 16px !important;
    z-index: 10001 !important;
    transform: none !important;
    margin: 0 !important;
    animation: slideUpMobile 0.3s ease forwards !important;
  }
  
  /* Esconder seta no mobile */
  .onboarding-tooltip-arrow {
    display: none !important;
  }
  
  .onboarding-tooltip-step {
    font-size: 11px !important;
    padding: 3px 10px !important;
    margin-bottom: 10px !important;
  }
  
  .onboarding-tooltip-title {
    font-size: 18px !important;
    margin-bottom: 10px !important;
  }
  
  .onboarding-tooltip-content {
    font-size: 13px !important;
    line-height: 1.5 !important;
    margin-bottom: 14px !important;
  }
  
  .onboarding-tooltip-features {
    gap: 6px !important;
    margin-bottom: 16px !important;
  }
  
  .onboarding-tooltip-feature {
    font-size: 12px !important;
    gap: 8px !important;
  }
  
  .onboarding-tooltip-feature i {
    font-size: 12px !important;
  }
  
  /* Botões do Tooltip - Mobile */
  .onboarding-tooltip-actions {
    flex-direction: column !important;
    gap: 10px !important;
  }
  
  .onboarding-tooltip-progress {
    justify-content: center !important;
    margin-bottom: 10px !important;
  }
  
  .onboarding-progress-dot {
    width: 10px !important;
    height: 10px !important;
  }
  
  .onboarding-btn-group {
    display: flex !important;
    width: 100% !important;
    gap: 10px !important;
  }
  
  .onboarding-btn {
    flex: 1 !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
    min-height: 44px !important; /* Tamanho mínimo para toque */
  }
  
  .onboarding-btn-prev {
    flex: 0 0 44px !important;
  }
  
  .onboarding-btn-skip {
    flex: 1 !important;
  }
  
  .onboarding-btn-next {
    flex: 2 !important;
  }
  
  /* Modal de Feedback - Mobile */
  .onboarding-feedback-modal {
    padding: 16px !important;
    align-items: flex-end !important;
  }
  
  .onboarding-feedback-content {
    width: 100% !important;
    max-width: none !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    padding: 24px 20px !important;
    margin: 0 !important;
    border-radius: 16px 16px 0 0 !important;
  }
  
  .onboarding-feedback-title {
    font-size: 20px !important;
    margin-bottom: 6px !important;
  }
  
  .onboarding-feedback-subtitle {
    font-size: 13px !important;
    margin-bottom: 20px !important;
  }
  
  .onboarding-feedback-ratings {
    gap: 20px !important;
    margin-bottom: 20px !important;
  }
  
  .onboarding-rating-btn {
    width: 70px !important;
    height: 70px !important;
  }
  
  .onboarding-rating-btn i {
    font-size: 28px !important;
  }
  
  .onboarding-feedback-textarea {
    font-size: 14px !important;
    padding: 14px !important;
    min-height: 100px !important;
    margin-bottom: 16px !important;
  }
  
  .onboarding-feedback-actions {
    flex-direction: column !important;
    gap: 10px !important;
  }
  
  .onboarding-feedback-btn {
    width: 100% !important;
    padding: 14px 20px !important;
    font-size: 15px !important;
    min-height: 48px !important;
  }
  
  /* Animação de entrada mobile */
  @keyframes slideUpMobile {
    from {
      opacity: 0;
      transform: translateY(100px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Elemento destacado no mobile */
  .onboarding-highlighted-element {
    position: relative !important;
    z-index: 10001 !important;
  }
  
  /* Sidebar elevada no mobile */
  .main-sidebar.onboarding-sidebar-elevated {
    z-index: 10000 !important;
    position: fixed !important;
    left: 0 !important;
    transform: none !important;
  }
  
  /* Quando sidebar está aberta no mobile durante onboarding */
  body.sidebar-open .main-sidebar.onboarding-sidebar-elevated {
    transform: translateX(0) !important;
  }
  
  /* Spotlight ajustado para mobile */
  .onboarding-spotlight {
    z-index: 10000 !important;
  }
  
  /* Garantir que elementos da sidebar fiquem visíveis no mobile */
  body.sidebar-open #sidebarThemeToggles.onboarding-highlighted-element,
  body.sidebar-open #sidebarSeletorEstilo.onboarding-highlighted-element,
  body.sidebar-open #modoToggleContainer.onboarding-highlighted-element {
    z-index: 10001 !important;
    background: linear-gradient(145deg, #1e2227 0%, #22272e 100%) !important;
    border-radius: 10px !important;
    padding: 10px !important;
  }
  
  /* Backdrop para fechar sidebar não deve interferir no onboarding */
  body.sidebar-open .onboarding-overlay {
    z-index: 9998 !important;
  }
}
