/**
 * ================================================
 * ARCA ACADEMY - CORREÇÃO FORÇADA DE CORES
 * Sobrescreve inline styles com cores não oficiais
 * ================================================
 * 
 * Este arquivo é a última linha de defesa contra
 * cores não oficiais no branding. Deve ser carregado
 * por ÚLTIMO para garantir máxima especificidade.
 */

/* ============================================
   REMOVER GRADIENTES ROXOS/AZUIS
   ============================================ */

/* Qualquer gradiente roxo/azul vira dourado */
*[style*="linear-gradient(135deg, #667eea"],
*[style*="linear-gradient(135deg, #764ba2"],
*[style*="background: linear-gradient(135deg, #667eea"],
*[style*="background: linear-gradient(135deg, #764ba2"],
div[style*="#667eea"],
div[style*="#764ba2"],
span[style*="#667eea"],
span[style*="#764ba2"] {
  background: linear-gradient(135deg, var(--antique-gold, #C59D5F) 0%, var(--terracotta, #A05C45) 100%) !important;
}

/* ============================================
   REMOVER GRADIENTES VERDES
   ============================================ */

*[style*="linear-gradient(135deg, #28a745"],
*[style*="linear-gradient(90deg, #28a745"],
*[style*="linear-gradient(135deg, #20c997"],
*[style*="linear-gradient(90deg, #20c997"],
*[style*="linear-gradient(135deg, #10b981"],
*[style*="linear-gradient(90deg, #10b981"],
*[style*="background: #28a745"],
*[style*="background:#28a745"],
*[style*="background: #20c997"],
*[style*="background:#20c997"],
*[style*="background: #10b981"],
*[style*="background:#10b981"],
div[style*="#28a745"],
div[style*="#20c997"],
div[style*="#10b981"],
span[style*="#28a745"],
span[style*="#20c997"],
span[style*="#10b981"] {
  background: linear-gradient(90deg, var(--antique-gold, #C59D5F) 0%, #b08c52 100%) !important;
}

/* ============================================
   REMOVER GRADIENTES AZUIS
   ============================================ */

*[style*="linear-gradient(135deg, #0d6efd"],
*[style*="linear-gradient(90deg, #0d6efd"],
*[style*="linear-gradient(135deg, #0a58ca"],
*[style*="linear-gradient(90deg, #0a58ca"],
*[style*="background: #0d6efd"],
*[style*="background:#0d6efd"],
*[style*="background: #0a58ca"],
*[style*="background:#0a58ca"],
div[style*="#0d6efd"],
div[style*="#0a58ca"],
span[style*="#0d6efd"],
span[style*="#0a58ca"] {
  background: linear-gradient(90deg, var(--antique-gold, #C59D5F) 0%, #b08c52 100%) !important;
}

/* ============================================
   REMOVER GRADIENTES AMARELOS/LARANJAS
   ============================================ */

*[style*="linear-gradient(135deg, #ffc107"],
*[style*="linear-gradient(90deg, #ffc107"],
*[style*="linear-gradient(135deg, #ffb300"],
*[style*="linear-gradient(90deg, #ffb300"],
div[style*="#ffc107"],
div[style*="#ffb300"],
span[style*="#ffc107"],
span[style*="#ffb300"] {
  background: linear-gradient(90deg, var(--antique-gold, #C59D5F) 0%, #b08c52 100%) !important;
}

/* ============================================
   REMOVER GRADIENTES VERMELHOS
   (Exceto para status de erro)
   ============================================ */

*[style*="linear-gradient(135deg, #dc3545"]:not(.alert):not(.error),
*[style*="linear-gradient(90deg, #dc3545"]:not(.alert):not(.error),
*[style*="linear-gradient(135deg, #c82333"]:not(.alert):not(.error),
*[style*="linear-gradient(90deg, #c82333"]:not(.alert):not(.error),
div[style*="#dc3545"]:not(.alert):not(.error),
div[style*="#c82333"]:not(.alert):not(.error),
span[style*="#dc3545"]:not(.alert):not(.error),
span[style*="#c82333"]:not(.alert):not(.error) {
  background: linear-gradient(90deg, var(--antique-gold, #C59D5F) 0%, #b08c52 100%) !important;
}

/* ============================================
   BADGES COLORIDOS
   Todos devem ser Antique Gold ou Deep Navy
   ============================================ */

.badge[style*="#667eea"],
.badge[style*="#764ba2"],
.badge[style*="#28a745"],
.badge[style*="#0d6efd"],
.badge[style*="#ffc107"],
span.badge[style*="linear-gradient"],
.badge:not(.badge-arca-gold):not(.badge-arca-navy) {
  background: linear-gradient(135deg, var(--antique-gold) 0%, #b08c52 100%) !important;
  color: white !important;
}

/* ============================================
   BUTTONS COLORIDOS
   Apenas dourado ou navy
   ============================================ */

button[style*="#667eea"],
button[style*="#764ba2"],
button[style*="#28a745"],
button[style*="#0d6efd"],
.btn[style*="#667eea"],
.btn[style*="#764ba2"],
.btn[style*="#28a745"],
.btn[style*="#0d6efd"] {
  background: linear-gradient(135deg, var(--antique-gold) 0%, var(--terracotta) 100%) !important;
  color: white !important;
  border: none !important;
}

/* ============================================
   MODAL HEADERS
   ============================================ */

.modal-header[style*="#667eea"],
.modal-header[style*="#764ba2"],
.modal-header[style*="linear-gradient"] {
  background: linear-gradient(135deg, var(--deep-navy) 0%, #15202f 100%) !important;
  color: white !important;
}

/* ============================================
   CARDS HEADERS
   ============================================ */

.card-header[style*="#667eea"],
.card-header[style*="#764ba2"],
.card-header[style*="#28a745"],
.card-header[style*="linear-gradient"] {
  background: linear-gradient(135deg, var(--antique-gold) 0%, var(--terracotta) 100%) !important;
  color: white !important;
}

/* ============================================
   ÍCONES CIRCULARES COLORIDOS
   ============================================ */

div[style*="width: 80px"][style*="height: 80px"][style*="linear-gradient"],
span[style*="width: 80px"][style*="height: 80px"][style*="linear-gradient"] {
  background: linear-gradient(135deg, var(--antique-gold) 0%, var(--terracotta) 100%) !important;
}

/* ============================================
   BACKGROUND COLORS SÓLIDOS NÃO OFICIAIS
   ============================================ */

/* Verde */
.bg-success:not(.alert):not(.toast),
*[style*="background-color: #28a745"],
*[style*="background-color:#28a745"],
*[style*="background-color: #20c997"],
*[style*="background-color:#20c997"] {
  background-color: var(--antique-gold) !important;
}

/* Azul */
.bg-info:not(.alert):not(.toast),
.bg-primary:not(.navbar):not(.alert),
*[style*="background-color: #0d6efd"],
*[style*="background-color:#0d6efd"],
*[style*="background-color: #0a58ca"],
*[style*="background-color:#0a58ca"] {
  background-color: var(--antique-gold) !important;
}

/* Roxo */
*[style*="background-color: #667eea"],
*[style*="background-color:#667eea"],
*[style*="background-color: #764ba2"],
*[style*="background-color:#764ba2"] {
  background-color: var(--antique-gold) !important;
}

/* ============================================
   TEXT COLORS NÃO OFICIAIS
   ============================================ */

/* Texto roxo vira Deep Navy */
.text-purple,
*[style*="color: #667eea"],
*[style*="color:#667eea"],
*[style*="color: #764ba2"],
*[style*="color:#764ba2"] {
  color: var(--deep-navy) !important;
}

/* ============================================
   BORDER COLORS NÃO OFICIAIS
   ============================================ */

*[style*="border-color: #667eea"],
*[style*="border-color:#667eea"],
*[style*="border-color: #764ba2"],
*[style*="border-color:#764ba2"],
*[style*="border-color: #28a745"],
*[style*="border-color:#28a745"] {
  border-color: var(--antique-gold) !important;
}

/* ============================================
   BOX SHADOWS COLORIDOS
   ============================================ */

*[style*="box-shadow"][style*="#667eea"],
*[style*="box-shadow"][style*="#764ba2"],
*[style*="box-shadow"][style*="#28a745"] {
  box-shadow: 0 4px 12px rgba(197, 157, 95, 0.3) !important;
}

/* ============================================
   CLASSES BOOTSTRAP COLORIDAS
   ============================================ */

/* Progress bars Bootstrap */
.progress .bg-success,
.progress .bg-info,
.progress .bg-warning:not(.alert),
.progress .bg-primary {
  background: linear-gradient(90deg, var(--antique-gold) 0%, #b08c52 100%) !important;
}

/* Buttons Bootstrap */
.btn-success:not(:hover),
.btn-info:not(:hover),
.btn-warning:not(:hover) {
  background: linear-gradient(135deg, var(--antique-gold) 0%, var(--terracotta) 100%) !important;
  border-color: var(--antique-gold) !important;
  color: white !important;
}

.btn-success:hover,
.btn-info:hover,
.btn-warning:hover {
  background: linear-gradient(135deg, #b08c52 0%, var(--antique-gold) 100%) !important;
  border-color: #b08c52 !important;
  color: white !important;
}

/* ============================================
   TABELAS E LISTAS
   ============================================ */

.table-success,
.table-info,
.table-warning {
  background-color: rgba(197, 157, 95, 0.1) !important;
}

.list-group-item-success,
.list-group-item-info,
.list-group-item-warning {
  background-color: rgba(197, 157, 95, 0.1) !important;
  border-color: rgba(197, 157, 95, 0.3) !important;
}

/* ============================================
   LINKS COLORIDOS
   ============================================ */

a[style*="color: #667eea"],
a[style*="color:#667eea"],
a[style*="color: #764ba2"],
a[style*="color:#764ba2"],
a[style*="color: #28a745"],
a[style*="color:#28a745"] {
  color: var(--antique-gold) !important;
}

a[style*="color: #667eea"]:hover,
a[style*="color:#667eea"]:hover,
a[style*="color: #764ba2"]:hover,
a[style*="color:#764ba2"]:hover {
  color: #b08c52 !important;
}

/* ============================================
   EXCEÇÕES (Mantém cores originais)
   ============================================ */

/* Alertas mantém cores semânticas */
.alert.alert-success,
.alert.alert-danger,
.alert.alert-warning,
.alert.alert-info,
.toast-success,
.toast-danger,
.toast-warning,
.toast-info {
  background: initial !important;
  color: initial !important;
}

/* Status indicators mantém verde/vermelho */
.status-success,
.status-error,
.status-active,
.status-inactive {
  background: initial !important;
}

/* Charts e gráficos (se houver) */
.chart,
.graph,
[class*="chart-"],
[class*="graph-"] {
  background: initial !important;
}

/* ============================================
   IMPORTANTE: RESPONSIVIDADE
   ============================================ */

@media (max-width: 768px) {
  /* Mesmo comportamento em mobile */
  *[style*="linear-gradient"][style*="#667eea"],
  *[style*="linear-gradient"][style*="#764ba2"],
  *[style*="linear-gradient"][style*="#28a745"] {
    background: linear-gradient(90deg, var(--antique-gold) 0%, #b08c52 100%) !important;
  }
}

/* ============================================
   DEBUG MODE (Comentado em produção)
   ============================================ */

/* Descomente para identificar elementos com cores erradas */
/*
*[style*="#667eea"],
*[style*="#764ba2"],
*[style*="#28a745"],
*[style*="#0d6efd"] {
  outline: 3px solid red !important;
}
*/
