/* =============================================================
   EIXO4 Theme · perfex-overrides
   Override CONTEXTUAL — afeta APENAS quando body.eixo4-theme-enabled
   ou paginas /clients (que tem nosso theme-client.css carregado).
   Tem cuidado especial com bibliotecas terceiras: DataTables, Select2,
   modais e jstree. Nao mexer em IDs, classes JS-criticas ou layout.
============================================================= */

/* =====================================================
   DATATABLES — ajustar tipografia e cor sem quebrar JS
===================================================== */
body.eixo4-theme-enabled .dataTables_wrapper {
  font-family: var(--eixo4-font-sans);
}
body.eixo4-theme-enabled .dataTables_filter input.form-control,
body.eixo4-theme-enabled .dataTables_filter input {
  border-radius: var(--r-sm);
  border-color: var(--border-strong);
}
body.eixo4-theme-enabled .dataTables_length select.form-control,
body.eixo4-theme-enabled .dataTables_length select {
  border-radius: var(--r-sm);
  border-color: var(--border-strong);
}
body.eixo4-theme-enabled .dataTables_info {
  font-size: var(--fs-sm);
  color: var(--ink-500);
}
body.eixo4-theme-enabled .pagination > li > a,
body.eixo4-theme-enabled .pagination > li > span {
  color: var(--ink-700);
  border-color: var(--border);
}
body.eixo4-theme-enabled .pagination > .active > a,
body.eixo4-theme-enabled .pagination > .active > span,
body.eixo4-theme-enabled .pagination > .active > a:hover {
  background: var(--brand-gradient);
  color: #fff;
  border-color: transparent;
  font-weight: 700;
}
body.eixo4-theme-enabled .pagination > li > a:hover {
  background: var(--bg-2);
}

/* =====================================================
   SELECT2 — manter comportamento, retocar visual
===================================================== */
body.eixo4-theme-enabled .select2-container--default .select2-selection--single,
body.eixo4-theme-enabled .select2-container--default .select2-selection--multiple {
  border-radius: var(--r-sm) !important;
  border-color: var(--border-strong) !important;
  min-height: 34px;
  font-family: var(--eixo4-font-sans);
}
body.eixo4-theme-enabled .select2-container--focus .select2-selection {
  border-color: var(--brand-orange) !important;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px rgba(245,158,11,0.25) !important;
}
body.eixo4-theme-enabled .select2-dropdown {
  border-radius: var(--r-sm);
  border-color: var(--border-strong);
  box-shadow: var(--sh-pop);
  font-family: var(--eixo4-font-sans);
}
body.eixo4-theme-enabled .select2-results__option--highlighted[aria-selected],
body.eixo4-theme-enabled .select2-results__option--highlighted {
  background: rgba(245,158,11,0.12) !important;
  color: var(--brand-orange-deep) !important;
}
body.eixo4-theme-enabled .select2-results__option[aria-selected=true] {
  background: rgba(11,27,61,0.08) !important;
  color: var(--brand-navy) !important;
  font-weight: 600;
}
body.eixo4-theme-enabled .select2-selection__choice {
  background: var(--surface-2) !important;
  border-color: var(--border) !important;
  border-radius: var(--r-xs) !important;
  color: var(--ink-700);
}

/* =====================================================
   MODAIS
===================================================== */
body.eixo4-theme-enabled .modal-content {
  border-radius: var(--r) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--sh-pop) !important;
}
body.eixo4-theme-enabled .modal-header {
  border-bottom: 1px solid var(--hairline) !important;
  padding: 14px 18px !important;
}
body.eixo4-theme-enabled .modal-header .modal-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.005em;
}
body.eixo4-theme-enabled .modal-footer {
  border-top: 1px solid var(--hairline) !important;
  padding: 12px 18px !important;
}
body.eixo4-theme-enabled .modal-backdrop.in { opacity: .55; }

/* =====================================================
   ALERTS (bootstrap)
===================================================== */
body.eixo4-theme-enabled .alert-success { background: var(--success-bg); color: var(--success); border-color: var(--success-bg); }
body.eixo4-theme-enabled .alert-danger,
body.eixo4-theme-enabled .alert-error   { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger-bg); }
body.eixo4-theme-enabled .alert-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-bg); }
body.eixo4-theme-enabled .alert-info    { background: var(--info-bg);    color: var(--info);    border-color: var(--info-bg); }

/* =====================================================
   TOOLTIPS
===================================================== */
body.eixo4-theme-enabled .tooltip-inner {
  background: var(--ink-900);
  color: #fff;
  font-family: var(--eixo4-font-sans);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--r-xs);
}
body.eixo4-theme-enabled .tooltip.top .tooltip-arrow { border-top-color: var(--ink-900); }
body.eixo4-theme-enabled .tooltip.bottom .tooltip-arrow { border-bottom-color: var(--ink-900); }
body.eixo4-theme-enabled .tooltip.left .tooltip-arrow { border-left-color: var(--ink-900); }
body.eixo4-theme-enabled .tooltip.right .tooltip-arrow { border-right-color: var(--ink-900); }

/* =====================================================
   DROPDOWNS
===================================================== */
body.eixo4-theme-enabled .dropdown-menu {
  border-radius: var(--r-sm) !important;
  border-color: var(--border) !important;
  box-shadow: var(--sh-pop);
  padding: 6px;
}
body.eixo4-theme-enabled .dropdown-menu > li > a {
  border-radius: var(--r-xs);
  font-size: 12.5px;
  color: var(--ink-700);
  padding: 7px 12px;
}
body.eixo4-theme-enabled .dropdown-menu > li > a:hover,
body.eixo4-theme-enabled .dropdown-menu > .active > a {
  background: rgba(245,158,11,0.10) !important;
  color: var(--brand-orange-deep) !important;
}
body.eixo4-theme-enabled .dropdown-menu .divider {
  background: var(--hairline);
  margin: 4px 0;
}

/* =====================================================
   BREADCRUMBS
===================================================== */
body.eixo4-theme-enabled .breadcrumb {
  background: transparent;
  padding: 6px 0;
  font-size: 11px;
}
body.eixo4-theme-enabled .breadcrumb > li {
  color: var(--ink-400);
}
body.eixo4-theme-enabled .breadcrumb > li > a {
  color: var(--brand-orange-deep);
  font-weight: 600;
}
body.eixo4-theme-enabled .breadcrumb > .active {
  color: var(--ink-700);
  font-weight: 700;
}

/* =====================================================
   NAV TABS
===================================================== */
body.eixo4-theme-enabled .nav-tabs > li > a {
  color: var(--ink-400);
  border: none !important;
  border-bottom: 2px solid transparent !important;
  font-weight: 500;
  font-size: 12.5px;
  padding: 12px 16px;
  background: transparent !important;
  border-radius: 0 !important;
}
body.eixo4-theme-enabled .nav-tabs > li.active > a,
body.eixo4-theme-enabled .nav-tabs > li > a:hover {
  color: var(--ink-900);
  font-weight: 700;
  border-bottom-color: var(--brand-orange) !important;
  background: transparent !important;
}

/* =====================================================
   HELP-BLOCK / FORM ERRORS
===================================================== */
body.eixo4-theme-enabled .help-block { font-size: 11.5px; color: var(--ink-400); }
body.eixo4-theme-enabled .has-error .form-control {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px rgba(220,38,38,0.18) !important;
}
body.eixo4-theme-enabled .has-error .help-block,
body.eixo4-theme-enabled .has-error .control-label { color: var(--danger) !important; }

/* =====================================================
   CHECKBOXES e RADIOS PERFEX (.checkbox-primary)
===================================================== */
body.eixo4-theme-enabled .checkbox-primary input[type="checkbox"]:checked + label::before {
  background: var(--brand-orange) !important;
  border-color: var(--brand-orange) !important;
}
body.eixo4-theme-enabled .radio-primary input[type="radio"]:checked + label::before {
  border-color: var(--brand-orange) !important;
}
body.eixo4-theme-enabled .radio-primary input[type="radio"]:checked + label::after {
  background: var(--brand-orange) !important;
}

/* =====================================================
   SWAL2 / sweet alert (se Perfex usa)
===================================================== */
body.eixo4-theme-enabled .swal2-popup { border-radius: var(--r-lg); }
body.eixo4-theme-enabled .swal2-confirm.swal2-styled {
  background: var(--brand-gradient) !important;
  font-weight: 700;
}
