/*
  Alto Contraste — ativado via body.high-contrast
  Carregado pelo index.html; ativado/desativado pelo botão de acessibilidade.
  Usa !important para sobrepor o tema claro, que tem maior especificidade
  por usar seletores compostos como .candidate-page.theme-light .X.
*/

body.high-contrast {
  --bg:         #000000;
  --surface:    #0a0a0a;
  --surface2:   #111111;
  --border:     #ffffff;
  --accent:     #ffff00;
  --accent2:    #ffff00;
  --accent3:    #ffff00;
  --text:       #ffffff;
  --muted:      #dddddd;
  --card:       #0a0a0a;
  --focus-ring: rgba(255, 255, 0, 0.5);
  --hover-bg:   rgba(255, 255, 0, 0.15);
  background: #000000 !important;
  color: #ffffff !important;
}

/* Remove image overlay */
body.high-contrast::after { display: none !important; }

/* Remove orbs */
body.high-contrast .orb { display: none !important; }

/* Strong borders on all inputs */
body.high-contrast input,
body.high-contrast select,
body.high-contrast textarea {
  border: 2px solid #ffffff !important;
  background: #000000 !important;
  color: #ffffff !important;
}

body.high-contrast input::placeholder,
body.high-contrast textarea::placeholder {
  color: #dddddd !important;
}

body.high-contrast input:focus,
body.high-contrast select:focus,
body.high-contrast textarea:focus {
  border-color: #ffff00 !important;
  box-shadow: 0 0 0 3px rgba(255,255,0,0.4) !important;
}

/* Hero & form cards */
body.high-contrast .hero,
body.high-contrast .form-container,
body.high-contrast .lock-card {
  background: #0a0a0a !important;
  border: 2px solid #ffffff !important;
  color: #ffffff !important;
}

body.high-contrast .hero h1,
body.high-contrast .hero p,
body.high-contrast .hero h1 em,
body.high-contrast .admin-lock h2,
body.high-contrast .admin-lock p {
  color: #ffffff !important;
}

body.high-contrast .hero::before,
body.high-contrast .form-container::before {
  background: #ffff00 !important;
}

/* Buttons */
body.high-contrast .btn-primary {
  background: #ffff00 !important;
  color: #000000 !important;
  border: 2px solid #ffff00 !important;
}

body.high-contrast .btn-primary:hover {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #ffffff !important;
}

/* Badge */
body.high-contrast .hero-badge {
  background: #ffff00 !important;
  color: #000000 !important;
}

/* Nav */
body.high-contrast nav {
  background: #000000 !important;
  border-bottom: 2px solid #ffffff !important;
}

body.high-contrast .nav-logo {
  color: #ffffff !important;
}

body.high-contrast .nav-tab {
  color: #ffffff !important;
}

body.high-contrast .nav-tab.active {
  background: #ffff00 !important;
  color: #000000 !important;
}

body.high-contrast .nav-tab:hover:not(.active) {
  background: rgba(255,255,0,0.15) !important;
  color: #ffff00 !important;
}

body.high-contrast .nav-tabs {
  border: 2px solid #ffffff !important;
  background: #000000 !important;
}

/* File upload zone */
body.high-contrast .file-upload {
  border: 2px dashed #ffffff !important;
  background: #0a0a0a !important;
}

body.high-contrast .file-upload:hover,
body.high-contrast .file-upload.drag-over {
  border-color: #ffff00 !important;
  background: rgba(255,255,0,0.08) !important;
}

body.high-contrast .file-upload h3,
body.high-contrast .file-upload p {
  color: #ffffff !important;
}

body.high-contrast .file-preview {
  background: #0a0a0a !important;
  border: 2px solid #ffffff !important;
  color: #ffffff !important;
}

/* File format badges */
body.high-contrast .file-format-badge {
  border: 1px solid #ffffff !important;
  color: #ffffff !important;
  background: transparent !important;
}

/* Labels */
body.high-contrast label {
  color: #dddddd !important;
}

/* Select options */
body.high-contrast select option {
  background: #000000 !important;
  color: #ffffff !important;
}

/* Footer */
body.high-contrast .stealth-footer {
  border-top: 1px solid #333333 !important;
  color: #dddddd !important;
}

/* Success modal */
body.high-contrast .success-modal-card {
  background: #0a0a0a !important;
  border: 2px solid #ffffff !important;
  color: #ffffff !important;
}

/* Toast */
body.high-contrast .toast {
  background: #ffff00 !important;
  color: #000000 !important;
}

/* Theme toggle and lock card support */
body.high-contrast .btn-theme-toggle {
  background: #000000 !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
}

body.high-contrast .btn-theme-toggle:hover {
  background: #ffff00 !important;
  color: #000000 !important;
  border-color: #ffff00 !important;
}

body.high-contrast .a11y-panel,
body.high-contrast .a11y-toggle-btn {
  background: #0a0a0a !important;
  border: 2px solid #ffffff !important;
  color: #ffffff !important;
}

body.high-contrast .a11y-panel h4,
body.high-contrast .a11y-panel p,
body.high-contrast .a11y-panel .a11y-option-label,
body.high-contrast .a11y-btn-label {
  color: #ffffff !important;
}

body.high-contrast .nav-tab svg,
body.high-contrast .btn-theme-toggle svg,
body.high-contrast .file-icon svg,
body.high-contrast .file-preview svg,
body.high-contrast .success-modal-icon svg,
body.high-contrast .a11y-toggle-btn svg {
  color: currentColor !important;
  stroke: currentColor !important;
}

/* ══════════════════════════════════════════
   Opções extras de acessibilidade
══════════════════════════════════════════ */

/* Texto maior (~117%) */
body.a11y-large-text {
  font-size: 1.1rem !important;
}
body.a11y-large-text input,
body.a11y-large-text select,
body.a11y-large-text textarea,
body.a11y-large-text button,
body.a11y-large-text .nav-tab,
body.a11y-large-text .btn,
body.a11y-large-text label {
  font-size: 1.02em !important;
}

/* Reduzir animações */
body.a11y-reduce-motion,
body.a11y-reduce-motion *,
body.a11y-reduce-motion *::before,
body.a11y-reduce-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

/* Sublinhar links */
body.a11y-underline-links a {
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
}

/* ══════════════════════════════════════════
   Alto contraste — cobertura do painel admin
   (sobrepõe tema claro e escuro dos módulos
   dashboard, candidatos, tabelas, modais etc.)
══════════════════════════════════════════ */

/* Superfícies (cards, painéis, tabelas) */
body.high-contrast .admin-header,
body.high-contrast .db-card,
body.high-contrast .db-kpi,
body.high-contrast .db-list,
body.high-contrast .db-month-nav-btn,
body.high-contrast .candidate-card,
body.high-contrast .detail-card,
body.high-contrast .modal-card,
body.high-contrast .lock-card,
body.high-contrast .form-container,
body.high-contrast .users-table,
body.high-contrast .users-table thead tr,
body.high-contrast .users-table tbody tr,
body.high-contrast .users-table td,
body.high-contrast .users-table th,
body.high-contrast .areas-table,
body.high-contrast .areas-table thead tr,
body.high-contrast .areas-table tbody tr,
body.high-contrast .areas-table td,
body.high-contrast .areas-table th,
body.high-contrast .nav-dropdown-menu,
body.high-contrast .admin-filters,
body.high-contrast .admin-toolbar,
body.high-contrast .db-recent,
body.high-contrast .db-recent-row {
  background: #0a0a0a !important;
  border-color: #ffffff !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

/* Hovers reforçados com amarelo */
body.high-contrast .candidate-card:hover,
body.high-contrast .db-recent-row:hover,
body.high-contrast .users-table tbody tr:hover,
body.high-contrast .areas-table tbody tr:hover,
body.high-contrast .nav-dropdown-item:hover,
body.high-contrast .db-month-nav-btn:hover {
  background: rgba(255,255,0,0.12) !important;
  border-color: #ffff00 !important;
  color: #ffff00 !important;
}

/* Textos e títulos dentro dos cards */
body.high-contrast .admin-title h2,
body.high-contrast .admin-title p,
body.high-contrast .db-card h3,
body.high-contrast .db-card h4,
body.high-contrast .db-kpi-num,
body.high-contrast .db-kpi-lbl,
body.high-contrast .db-recent-name,
body.high-contrast .db-recent-sub,
body.high-contrast .db-recent-date,
body.high-contrast .candidate-card h3,
body.high-contrast .candidate-card p,
body.high-contrast .candidate-card .candidate-meta,
body.high-contrast .detail-card h3,
body.high-contrast .detail-card h4,
body.high-contrast .users-table,
body.high-contrast .areas-table,
body.high-contrast .card-date,
body.high-contrast .empty-state h3,
body.high-contrast .empty-state p {
  color: #ffffff !important;
}

/* Acentos (números, ícones de destaque) em amarelo */
body.high-contrast .db-kpi-num,
body.high-contrast .db-card h3 svg,
body.high-contrast .admin-title h2 em,
body.high-contrast strong {
  color: #ffff00 !important;
}

/* Status badges — todos no mesmo esquema contrastado */
body.high-contrast .status-badge {
  background: #000000 !important;
  color: #ffff00 !important;
  border: 1px solid #ffff00 !important;
}
body.high-contrast .status-reprovado {
  color: #ffffff !important;
  border-color: #ffffff !important;
}

/* Dropdown menu da navbar */
body.high-contrast .nav-dropdown-item {
  color: #ffffff !important;
  background: transparent !important;
}

/* Botões secundários/outline dentro do admin */
body.high-contrast .btn-outline,
body.high-contrast .btn-secondary,
body.high-contrast .btn-ghost {
  background: #000000 !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
}
body.high-contrast .btn-outline:hover,
body.high-contrast .btn-secondary:hover,
body.high-contrast .btn-ghost:hover {
  background: #ffff00 !important;
  color: #000000 !important;
  border-color: #ffff00 !important;
}

/* Botão "Sair" mantém legibilidade */
body.high-contrast .nav-tab-logout {
  color: #ffff00 !important;
}

/* Filtros/campos de busca na toolbar */
body.high-contrast .filter-input-wrap,
body.high-contrast .admin-filters input,
body.high-contrast .admin-filters select {
  background: #000000 !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
}

/* Divisores */
body.high-contrast .nav-divider,
body.high-contrast .card-footer,
body.high-contrast .db-recent-row {
  border-color: #ffffff !important;
}

/* ══════════════════════════════════════════
   Correções de especificidade:
   alto contraste + tema claro no admin
══════════════════════════════════════════ */
body.admin-page.theme-light.high-contrast {
  --bg: #000000 !important;
  --surface: #0a0a0a !important;
  --surface2: #111111 !important;
  --border: #ffffff !important;
  --accent: #ffff00 !important;
  --accent2: #ffff00 !important;
  --accent3: #ffff00 !important;
  --text: #ffffff !important;
  --muted: #dddddd !important;
  --card: #0a0a0a !important;
  background: #000000 !important;
  color: #ffffff !important;
}

body.admin-page.theme-light.high-contrast nav,
body.admin-page.theme-light.high-contrast .nav-tabs,
body.admin-page.theme-light.high-contrast .nav-dropdown-menu,
body.admin-page.theme-light.high-contrast .admin-header,
body.admin-page.theme-light.high-contrast .admin-greeting-panel,
body.admin-page.theme-light.high-contrast .page,
body.admin-page.theme-light.high-contrast .dashboard-body,
body.admin-page.theme-light.high-contrast .filters,
body.admin-page.theme-light.high-contrast .candidates-table-wrapper,
body.admin-page.theme-light.high-contrast .candidates-table,
body.admin-page.theme-light.high-contrast .candidates-table thead,
body.admin-page.theme-light.high-contrast .candidates-table th,
body.admin-page.theme-light.high-contrast .candidates-table td,
body.admin-page.theme-light.high-contrast .candidates-table-row,
body.admin-page.theme-light.high-contrast .db-card,
body.admin-page.theme-light.high-contrast .db-kpi,
body.admin-page.theme-light.high-contrast .db-pie-hole,
body.admin-page.theme-light.high-contrast .db-pie-legend-row,
body.admin-page.theme-light.high-contrast .db-bar-track,
body.admin-page.theme-light.high-contrast .db-funnel-track,
body.admin-page.theme-light.high-contrast .db-monthly-track,
body.admin-page.theme-light.high-contrast .candidate-card,
body.admin-page.theme-light.high-contrast .detail-card,
body.admin-page.theme-light.high-contrast .areas-manager,
body.admin-page.theme-light.high-contrast .db-recent-row,
body.admin-page.theme-light.high-contrast .users-table,
body.admin-page.theme-light.high-contrast .areas-table {
  background: #0a0a0a !important;
  border-color: #ffffff !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

body.admin-page.theme-light.high-contrast .admin-greeting-text,
body.admin-page.theme-light.high-contrast .admin-greeting-text strong,
body.admin-page.theme-light.high-contrast .admin-greeting-time-wrap,
body.admin-page.theme-light.high-contrast .admin-title h2,
body.admin-page.theme-light.high-contrast .admin-title p,
body.admin-page.theme-light.high-contrast .db-card-title,
body.admin-page.theme-light.high-contrast .candidates-table th,
body.admin-page.theme-light.high-contrast .candidates-table td,
body.admin-page.theme-light.high-contrast .table-status-meta,
body.admin-page.theme-light.high-contrast .db-monthly-label,
body.admin-page.theme-light.high-contrast .db-funnel-label,
body.admin-page.theme-light.high-contrast .db-bar-label,
body.admin-page.theme-light.high-contrast .db-recent-name,
body.admin-page.theme-light.high-contrast .db-recent-sub,
body.admin-page.theme-light.high-contrast .db-recent-date,
body.admin-page.theme-light.high-contrast .db-empty,
body.admin-page.theme-light.high-contrast .detail-label,
body.admin-page.theme-light.high-contrast .detail-value {
  color: #ffffff !important;
}

body.admin-page.theme-light.high-contrast .db-kpi-num,
body.admin-page.theme-light.high-contrast .db-kpi-icon,
body.admin-page.theme-light.high-contrast .db-month-year-label,
body.admin-page.theme-light.high-contrast .db-monthly-count,
body.admin-page.theme-light.high-contrast .db-bar-count,
body.admin-page.theme-light.high-contrast .status-badge,
body.admin-page.theme-light.high-contrast .status-em-analise {
  color: #ffff00 !important;
}

body.admin-page.theme-light.high-contrast .db-area-segmented,
body.admin-page.theme-light.high-contrast .db-area-segment,
body.admin-page.theme-light.high-contrast .db-month-nav-btn {
  background: #000000 !important;
  border-color: #ffffff !important;
  color: #ffffff !important;
}

body.admin-page.theme-light.high-contrast .db-funnel-fill,
body.admin-page.theme-light.high-contrast .db-monthly-fill,
body.admin-page.theme-light.high-contrast .db-bar-fill,
body.admin-page.theme-light.high-contrast .db-pie-segment {
  filter: saturate(0.95) contrast(1.2) !important;
}

body.admin-page.theme-light.high-contrast .db-area-segment:hover,
body.admin-page.theme-light.high-contrast .db-area-segment.is-active,
body.admin-page.theme-light.high-contrast .db-month-nav-btn:hover {
  background: rgba(255,255,0,0.15) !important;
  border-color: #ffff00 !important;
  color: #ffff00 !important;
  box-shadow: none !important;
}

body.admin-page.theme-light.high-contrast .candidates-table-row:hover,
body.admin-page.theme-light.high-contrast .candidates-table-row:hover td {
  background: rgba(255,255,0,0.12) !important;
  color: #ffff00 !important;
}

body.admin-page.theme-light.high-contrast .table-status-select {
  background-color: #000000 !important;
  color: #ffff00 !important;
  border: 1px solid #ffff00 !important;
}

body.admin-page.theme-light.high-contrast .table-status-select.status-nao-visualizado,
body.admin-page.theme-light.high-contrast .table-status-select.status-em-analise,
body.admin-page.theme-light.high-contrast .table-status-select.status-reprovado,
body.admin-page.theme-light.high-contrast .table-status-select.status-contratado,
body.admin-page.theme-light.high-contrast .table-status-select.status-recebido,
body.admin-page.theme-light.high-contrast .table-status-select.status-pre-selecionado,
body.admin-page.theme-light.high-contrast .table-status-select.status-entrevista-agendada,
body.admin-page.theme-light.high-contrast .table-status-select.status-entrevista-realizada,
body.admin-page.theme-light.high-contrast .table-status-select.status-aprovado,
body.admin-page.theme-light.high-contrast .table-status-select.status-banco-de-talentos {
  background-color: #000000 !important;
  color: #ffff00 !important;
}

body.admin-page.theme-light.high-contrast .nav-tab-logout,
body.admin-page.theme-light.high-contrast .nav-tab-logout:hover:not(.active) {
  color: #ffff00 !important;
  background: transparent !important;
  border-color: #ffff00 !important;
}

/* Cards de candidatos (visão em cards) */
body.admin-page.theme-light.high-contrast .card-name,
body.admin-page.theme-light.high-contrast .card-email,
body.admin-page.theme-light.high-contrast .card-phone,
body.admin-page.theme-light.high-contrast .card-date,
body.admin-page.theme-light.high-contrast .card-status-meta,
body.admin-page.theme-light.high-contrast .card-arrow,
body.admin-page.theme-light.high-contrast .card-email-link,
body.admin-page.theme-light.high-contrast .area-badge {
  color: #ffffff !important;
}

body.admin-page.theme-light.high-contrast .card-email-link:hover {
  color: #ffff00 !important;
}

body.admin-page.theme-light.high-contrast .area-badge {
  background: #000000 !important;
  border: 1px solid #ffffff !important;
}

body.admin-page.theme-light.high-contrast .btn-whatsapp {
  background: #000000 !important;
  color: #ffff00 !important;
  border: 1px solid #ffff00 !important;
}

body.admin-page.theme-light.high-contrast .btn-whatsapp:hover {
  background: rgba(255,255,0,0.15) !important;
  border-color: #ffff00 !important;
}

body.admin-page.theme-light.high-contrast .btn-whatsapp::before {
  filter: grayscale(1) brightness(2.2) !important;
}

body.admin-page.theme-light.high-contrast .btn-whatsapp.is-disabled {
  background: #111111 !important;
  border-color: #ffffff !important;
  color: #dddddd !important;
}

