/* BRAZSAFE components - additive polish for the existing frontend. */

html {
  background: var(--bs-bg);
}

body {
  font-family: var(--bs-font-ui);
  background: var(--bs-bg);
  color: var(--bs-ink);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body .container {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0) 260px),
    var(--bs-bg);
  color: var(--bs-ink);
}

body .main-content {
  padding: 24px 32px 40px;
}

body .page {
  color: var(--bs-ink);
}

body .page.active {
  animation: bsPageIn var(--bs-speed) ease-out;
}

@keyframes bsPageIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

body .main-content h1,
body .main-content h2,
body .main-content h3,
body .main-content h4 {
  color: var(--bs-ink);
  letter-spacing: 0;
}

body .main-content p,
body .main-content .muted {
  color: var(--bs-muted);
}

/* Page surfaces */
body .main-content .panel,
body .main-content .home-card,
body .main-content .home-chart,
body .main-content .func-panel,
body .main-content .treina-kpi-card,
body .main-content .store-card,
body .main-content .ficha-card,
body .main-content .admin-card,
body .main-content .table-card {
  border: 1px solid var(--bs-line);
  border-radius: var(--bs-radius-md);
  background: rgba(255,255,255,0.96);
  box-shadow: var(--bs-shadow-sm);
}

body .main-content .panel:hover,
body .main-content .home-card:hover,
body .main-content .store-card:hover,
body .main-content .train-card:hover {
  border-color: var(--bs-line-strong);
  box-shadow: var(--bs-shadow-md);
}

/* Forms */
body .main-content input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
body .main-content select,
body .main-content textarea,
body .main-content .ctrl,
body .main-content .func-search-input,
body .main-content .train-search,
body .main-content .fisc-filter-select {
  min-height: 40px;
  border: 1px solid var(--bs-line);
  border-radius: var(--bs-radius-md);
  background: var(--bs-surface);
  color: var(--bs-ink);
  font-family: var(--bs-font-ui);
  font-size: 14px;
  line-height: 1.35;
  box-shadow: var(--bs-shadow-xs);
  transition: border-color var(--bs-speed-fast) ease, box-shadow var(--bs-speed-fast) ease, background var(--bs-speed-fast) ease;
}

body .main-content input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):hover,
body .main-content select:hover,
body .main-content textarea:hover,
body .main-content .ctrl:hover {
  border-color: var(--bs-line-strong);
}

body .main-content input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):focus,
body .main-content select:focus,
body .main-content textarea:focus,
body .main-content .ctrl:focus,
body .main-content .func-search-input:focus,
body .main-content .train-search:focus {
  outline: none;
  border-color: var(--bs-cyan-500);
  box-shadow: var(--bs-focus);
}

body .main-content input::placeholder,
body .main-content textarea::placeholder {
  color: var(--bs-muted-2);
}

/* Buttons */
body .main-content button {
  width: auto;
  font-family: var(--bs-font-ui);
}

body .main-content .btn,
body .main-content button.btn,
body .main-content .btn-primary,
body .main-content .btn-secondary,
body .main-content .btn--primary,
body .main-content .btn--secondary,
body .main-content .btn--ghost,
body .main-content .btn-entrega,
body .main-content .func-dialog__btn,
body .main-content .summary-filter,
body .main-content .chip {
  min-height: 38px;
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--bs-radius-md);
  border: 1px solid var(--bs-line);
  background: var(--bs-surface);
  color: var(--bs-ink-soft);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  box-shadow: var(--bs-shadow-xs);
  cursor: pointer;
  transition: transform var(--bs-speed-fast) ease, box-shadow var(--bs-speed-fast) ease, border-color var(--bs-speed-fast) ease, background var(--bs-speed-fast) ease, color var(--bs-speed-fast) ease;
}

body .main-content .btn:hover,
body .main-content button.btn:hover,
body .main-content .btn-secondary:hover,
body .main-content .btn--secondary:hover,
body .main-content .btn--ghost:hover,
body .main-content .chip:hover {
  transform: translateY(-1px);
  border-color: var(--bs-line-strong);
  box-shadow: var(--bs-shadow-sm);
  filter: none;
}

body .main-content .btn-primary,
body .main-content .btn--primary,
body .main-content .btn-entrega--primary,
body .main-content .func-dialog__btn--primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--bs-brand-600), var(--bs-blue-600));
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

body .main-content .btn-primary:hover,
body .main-content .btn--primary:hover,
body .main-content .btn-entrega--primary:hover,
body .main-content .func-dialog__btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

body .main-content .btn-danger,
body .main-content .btn--del,
body .main-content .func-dialog__btn--danger {
  border-color: #fecaca;
  background: #fff;
  color: #b91c1c;
}

body .main-content .btn-danger:hover,
body .main-content .btn--del:hover,
body .main-content .func-dialog__btn--danger:hover {
  background: #fef2f2;
  color: #991b1b;
}

body .main-content .btn:focus-visible,
body .main-content button:focus-visible,
body .main-content .chip:focus-visible,
body .main-content .summary-filter:focus-visible {
  outline: none;
  box-shadow: var(--bs-focus);
}

body .main-content .btn--sm,
body .main-content .icon-btn,
body .main-content .qty-btn {
  min-height: 34px;
  border-radius: var(--bs-radius-md);
}

/* Badges and status chips */
body .main-content .badge,
body .main-content .ca-badge,
body .main-content .status-badge,
body .main-content .status-pill,
body .main-content .gg-badge,
body .main-content .hist-func-badge,
body .main-content .store-badge,
body .main-content .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: var(--bs-radius-pill);
  border: 1px solid var(--bs-line);
  background: var(--bs-surface-soft);
  color: var(--bs-ink-soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

body .main-content .b-ok,
body .main-content .status--ok,
body .main-content .status--good,
body .main-content .status-badge.valid,
body .main-content .status-pill.status--ok,
body .main-content .gg-badge--ok {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

body .main-content .b-warn,
body .main-content .badge-warn,
body .main-content .status--warn,
body .main-content .status-badge.near {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

body .main-content .b-bad,
body .main-content .status--bad,
body .main-content .status-badge.expired {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

/* Tables */
body .main-content .table-wrap,
body .main-content .func-table-wrap,
body .main-content .hist-func-table-wrap,
body .main-content .fisc-table-wrap,
body #estoqueConteudo .table-wrap,
body #treinamentosConcluidosWrap .table-wrap,
body #vencimentos .table-wrap,
body #gestaoGerentes .table-wrap {
  border: 1px solid var(--bs-line);
  border-radius: var(--bs-radius-md);
  background: var(--bs-surface);
  box-shadow: var(--bs-shadow-sm);
  padding: 8px;
  overflow: auto;
  mask-image: none;
}

body .main-content .table-epi,
body .main-content .venc-table,
body .main-content .func-table,
body .main-content .hist-func-table,
body .main-content .table-empresas {
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bs-surface);
  color: var(--bs-ink);
}

body .main-content .table-epi thead th,
body .main-content .venc-table thead th,
body .main-content .func-table thead th,
body .main-content .hist-func-table thead th,
body .main-content .table-empresas thead th {
  background: #f6f9fd;
  color: var(--bs-ink-soft);
  border-bottom: 1px solid var(--bs-line);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

body .main-content .table-epi tbody td,
body .main-content .venc-table tbody td,
body .main-content .func-table tbody td,
body .main-content .hist-func-table tbody td,
body .main-content .table-empresas tbody td {
  color: var(--bs-ink-soft);
  border-bottom: 1px solid #edf2f7;
  line-height: 1.45;
}

body .main-content .table-epi tbody tr:hover td,
body .main-content .venc-table tbody tr:hover td,
body .main-content .func-table tbody tr:hover td,
body .main-content .hist-func-table tbody tr:hover td,
body .main-content .table-empresas tbody tr:hover td {
  background: #f8fbff;
}

/* Novo EPI dense table polish */
body #novoEPI #listaEPIs .panel,
body #novoEPI #listaEPIs .table-wrap {
  border-radius: var(--bs-radius-md);
  border-color: var(--bs-line);
  box-shadow: var(--bs-shadow-sm);
}

body #novoEPI #listaEPIs .table-epi tbody td:nth-child(6),
body #novoEPI #listaEPIs .cell-desc {
  white-space: normal;
  color: var(--bs-muted);
  line-height: 1.45;
}

body #novoEPI #listaEPIs .cell-desc > span {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body #novoEPI #listaEPIs .actions {
  gap: 8px;
  align-items: center;
}

body #novoEPI #listaEPIs .actions .btn,
body #novoEPI #listaEPIs td.col-actions button {
  min-width: 38px;
  min-height: 38px;
  border-radius: var(--bs-radius-md);
}

/* Estoque and operational menus */
body #estoque .estoque-actions-menu,
body #estoque .menu,
body #vencimentos .filters-menu,
body #listaEPIs .filters-menu,
body #funcionarios .func-company-menu {
  border: 1px solid var(--bs-line);
  border-radius: var(--bs-radius-md);
  background: rgba(255,255,255,0.98);
  box-shadow: var(--bs-shadow-lg);
}

body #estoqueGrafico,
body #estoque .panel {
  border-radius: var(--bs-radius-md);
}

/* Generic and legacy modals. Do not force display values. */
body .modal-overlay,
body #histEstOverlay,
body #ctrlOverlay,
body #autEstOverlay,
body #cadGerenteOverlay,
body #preOverlay,
body #lojaFreteOverlay,
body #lojaProdOverlay,
body #lojaEditOverlay,
body #lojaCropOverlay,
body #lojaPedOverlay,
body #lojaConfOverlay {
  background: rgba(2, 6, 23, 0.58) !important;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

body .modal,
body #histEstModal,
body #ctrlModal,
body #autEstModal,
body #cadGerenteModal,
body #preModal,
body #lojaFreteModal,
body #lojaProdModal,
body #lojaEditModal,
body #lojaCropModal,
body #lojaPedModal,
body #lojaConfModal,
body .sala-treina-modal {
  border: 1px solid rgba(255,255,255,0.72) !important;
  border-radius: var(--bs-radius-md) !important;
  background: rgba(255,255,255,0.98) !important;
  color: var(--bs-ink) !important;
  box-shadow: var(--bs-shadow-lg) !important;
}

body #histEstModal,
body #ctrlModal,
body #preModal {
  padding: 20px !important;
}

body #histEstModal h3,
body #ctrlModal h3,
body #preModal h3,
body .modal h3,
body .modal h4 {
  color: var(--bs-ink) !important;
  font-weight: 850;
  letter-spacing: 0;
}

body #histEstModal #histEstFechar,
body #ctrlModal #ctrlFechar {
  min-width: 92px;
}

/* Treinamentos visual alignment */
body #treinamentos .train-card {
  border-radius: var(--bs-radius-md);
  border: 1px solid var(--bs-line);
  box-shadow: var(--bs-shadow-sm);
}

body #treinamentos .train-title {
  color: var(--bs-ink);
  letter-spacing: 0;
}

body #treinamentosConcluidosWrap .treina-summary {
  gap: 8px;
}

/* Vencimentos refinement */
body #vencimentos .filters-menu {
  padding: 12px;
}

body #vencimentos .chip.is-active,
body #treinamentosConcluidosWrap .summary-filter.active,
body #listaEPIs .chip.is-active {
  background: var(--bs-brand-800);
  color: #fff;
  border-color: var(--bs-brand-800);
}

/* Login keeps its strong brand identity, with lighter focus polish. */
body #loginSection input:focus {
  outline: none;
  border-color: rgba(14,165,233,.8);
  box-shadow: 0 0 0 3px rgba(14,165,233,.22);
}

body #loginSection button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(14,165,233,.25);
}

/* ===== BRAZSAFE Visual Phase 2 - shared premium polish ===== */
body #novoEPI,
body #estoque,
body #treinamentos,
body #vencimentos,
body #cadastrarEmpresa,
body #empresasAdmin {
  --v2-ink: #111827;
  --v2-muted: #64748b;
  --v2-line: #dbe7f3;
  --v2-soft-line: #edf3f8;
  --v2-surface: #ffffff;
  --v2-surface-soft: #f7fafc;
  --v2-primary: #0f4c81;
  --v2-primary-strong: #0b3b66;
  --v2-accent: #0f766e;
  --v2-danger: #b91c1c;
  --v2-radius: 8px;
  --v2-shadow: 0 18px 42px rgba(15, 23, 42, .08);
  --v2-shadow-soft: 0 10px 26px rgba(15, 23, 42, .06);
}

body #novoEPI input,
body #novoEPI select,
body #novoEPI textarea,
body #estoque input,
body #estoque select,
body #estoque textarea,
body #treinamentos input,
body #treinamentos select,
body #treinamentos textarea,
body #vencimentos input,
body #vencimentos select,
body #vencimentos textarea,
body #cadastrarEmpresa input,
body #cadastrarEmpresa select,
body #cadastrarEmpresa textarea,
body #empresasAdmin input,
body #empresasAdmin select,
body #empresasAdmin textarea {
  border: 1px solid var(--v2-line) !important;
  border-radius: var(--v2-radius) !important;
  background: #fff !important;
  color: var(--v2-ink) !important;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, .03);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

body #novoEPI input:focus,
body #novoEPI select:focus,
body #novoEPI textarea:focus,
body #estoque input:focus,
body #estoque select:focus,
body #estoque textarea:focus,
body #treinamentos input:focus,
body #treinamentos select:focus,
body #treinamentos textarea:focus,
body #vencimentos input:focus,
body #vencimentos select:focus,
body #vencimentos textarea:focus,
body #cadastrarEmpresa input:focus,
body #cadastrarEmpresa select:focus,
body #cadastrarEmpresa textarea:focus,
body #empresasAdmin input:focus,
body #empresasAdmin select:focus,
body #empresasAdmin textarea:focus {
  outline: none !important;
  border-color: rgba(15, 76, 129, .55) !important;
  box-shadow: 0 0 0 3px rgba(15, 76, 129, .12), inset 0 1px 0 rgba(15, 23, 42, .03) !important;
}

body #novoEPI .btn,
body #novoEPI button,
body #estoque .btn,
body #estoque button,
body #treinamentos .btn,
body #treinamentos button,
body #vencimentos .btn,
body #vencimentos button,
body #cadastrarEmpresa .btn,
body #cadastrarEmpresa button,
body #empresasAdmin .btn,
body #empresasAdmin button {
  border-radius: var(--v2-radius) !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
  transition: transform .12s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}

body #novoEPI .btn:hover,
body #novoEPI button:hover,
body #estoque .btn:hover,
body #estoque button:hover,
body #treinamentos .btn:hover,
body #treinamentos button:hover,
body #vencimentos .btn:hover,
body #vencimentos button:hover,
body #cadastrarEmpresa .btn:hover,
body #cadastrarEmpresa button:hover,
body #empresasAdmin .btn:hover,
body #empresasAdmin button:hover {
  transform: translateY(-1px);
}

body #novoEPI table,
body #estoqueConteudo table,
body #treinamentosConcluidosWrap table,
body #vencimentos table,
body #empresasAdmin table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  color: var(--v2-ink);
}

body #novoEPI table thead th,
body #estoqueConteudo table thead th,
body #treinamentosConcluidosWrap table thead th,
body #vencimentos table thead th,
body #empresasAdmin table thead th {
  background: linear-gradient(180deg, #f8fbfd 0%, #eef5fa 100%) !important;
  color: #334155 !important;
  border-bottom: 1px solid var(--v2-line) !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  white-space: nowrap;
}

body #novoEPI table tbody td,
body #estoqueConteudo table tbody td,
body #treinamentosConcluidosWrap table tbody td,
body #vencimentos table tbody td,
body #empresasAdmin table tbody td {
  border-bottom: 1px solid var(--v2-soft-line) !important;
  color: #1f2937;
  vertical-align: middle;
}

body #novoEPI table tbody tr:hover,
body #estoqueConteudo table tbody tr:hover,
body #treinamentosConcluidosWrap table tbody tr:hover,
body #vencimentos table tbody tr:hover,
body #empresasAdmin table tbody tr:hover {
  background: #f8fbfd !important;
}

body #novoEPI .badge,
body #estoque .badge,
body #treinamentos .badge,
body #vencimentos .badge,
body #empresasAdmin .badge,
body #vencimentos .status-pill {
  border-radius: 999px !important;
  border: 1px solid rgba(15, 76, 129, .14);
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

/* ===== BRAZSAFE Visual Phase 2.1 - softer action weight ===== */
body #novoEPI #btnAbrirCadastroEPI,
body #novoEPI .btn-primary,
body #estoque .btn-primary,
body #estoque .btn--primary,
body #treinamentos .train-actions .btnAbrirSala,
body #treinamentos .btnCertTreina,
body #treinamentos #btnNovoTreina,
body #vencimentos .chip.is-active,
body #empresasAdmin .btn-primary,
body #cadastrarEmpresa .btn-primary,
body #cadastrarEmpresa button[type="submit"],
body #lojaConfModal .btn-primary,
body #lojaPedModal .btn-primary {
  background: linear-gradient(180deg, #11527f 0%, #0d416c 100%) !important;
  box-shadow: 0 8px 18px rgba(15, 76, 129, .16) !important;
}

body #novoEPI #btnAbrirCadastroEPI:hover,
body #novoEPI .btn-primary:hover,
body #estoque .btn-primary:hover,
body #estoque .btn--primary:hover,
body #treinamentos .train-actions .btnAbrirSala:hover,
body #treinamentos .btnCertTreina:hover,
body #treinamentos #btnNovoTreina:hover,
body #empresasAdmin .btn-primary:hover,
body #cadastrarEmpresa .btn-primary:hover,
body #cadastrarEmpresa button[type="submit"]:hover,
body #lojaConfModal .btn-primary:hover,
body #lojaPedModal .btn-primary:hover {
  box-shadow: 0 10px 22px rgba(15, 76, 129, .20) !important;
}

body #novoEPI .btn,
body #estoque .btn,
body #treinamentos .btn,
body #vencimentos .btn,
body #empresasAdmin .btn,
body #cadastrarEmpresa .btn {
  box-shadow: 0 4px 10px rgba(15, 23, 42, .04) !important;
}

body #lojaPedModal .store-order-summary--finance {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(142px, 1fr)) !important;
  gap: 10px !important;
  align-items: stretch !important;
  overflow: visible !important;
}

body #lojaPedModal .store-order-summary-card {
  min-width: 0 !important;
  min-height: 74px !important;
  padding: 12px 14px !important;
  border-radius: 8px !important;
  overflow: visible !important;
}

body #lojaPedModal .store-order-summary-label {
  display: block !important;
  margin-bottom: 6px !important;
  white-space: nowrap !important;
}

body #lojaPedModal .store-order-summary-card strong {
  display: block !important;
  max-width: 100% !important;
  color: #0f172a !important;
  font-size: 16px !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

body #lojaPedModal .store-order-summary-card--total strong {
  font-size: 17px !important;
}

@media (max-width: 900px) {
  body #lojaPedModal .store-order-summary--finance {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 520px) {
  body #lojaPedModal .store-order-summary--finance {
    grid-template-columns: 1fr !important;
  }
}

/* ===== BRAZSAFE Visual Final Normalize - official Home alignment ===== */
body #novoEPI,
body #estoque,
body #treinamentos,
body #vencimentos,
body #cadastrarEmpresa,
body #empresasAdmin,
body #loja {
  --vfinal-ink: #111827;
  --vfinal-title: #1f2937;
  --vfinal-muted: #536579;
  --vfinal-line: #d6e2f0;
  --vfinal-soft-line: #ebf1f7;
  --vfinal-panel: #ffffff;
  --vfinal-panel-soft: #f8fbff;
  --vfinal-blue: #2368bd;
  --vfinal-blue-dark: #195aa8;
  --vfinal-blue-soft: #eef6ff;
  --vfinal-shadow: 0 8px 20px rgba(15, 23, 42, .055);
  --vfinal-shadow-hover: 0 10px 24px rgba(15, 23, 42, .075);
  --vfinal-radius: 12px;
}

body #novoEPI h1,
body #novoEPI h2,
body #novoEPI h3,
body #estoque h1,
body #estoque h2,
body #estoque h3,
body #treinamentos h1,
body #treinamentos h2,
body #treinamentos h3,
body #treinamentos h4,
body #vencimentos h1,
body #vencimentos h2,
body #vencimentos h3,
body #cadastrarEmpresa h1,
body #cadastrarEmpresa h2,
body #cadastrarEmpresa h3,
body #empresasAdmin h1,
body #empresasAdmin h2,
body #empresasAdmin h3,
body #empresasAdmin h4 {
  color: var(--vfinal-title, #1f2937) !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
}

body #novoEPI p,
body #novoEPI small,
body #novoEPI .muted,
body #estoque p,
body #estoque small,
body #estoque .muted,
body #treinamentos p,
body #treinamentos small,
body #treinamentos .muted,
body #treinamentos .train-subtitle,
body #treinamentos .train-meta,
body #vencimentos p,
body #vencimentos small,
body #vencimentos .muted,
body #cadastrarEmpresa p,
body #cadastrarEmpresa small,
body #cadastrarEmpresa .muted,
body #empresasAdmin p,
body #empresasAdmin small,
body #empresasAdmin .muted {
  color: var(--vfinal-muted, #536579) !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}

body #novoEPI input,
body #novoEPI select,
body #novoEPI textarea,
body #estoque input,
body #estoque select,
body #estoque textarea,
body #treinamentos input,
body #treinamentos select,
body #treinamentos textarea,
body #vencimentos input,
body #vencimentos select,
body #vencimentos textarea,
body #cadastrarEmpresa input,
body #cadastrarEmpresa select,
body #cadastrarEmpresa textarea,
body #empresasAdmin input,
body #empresasAdmin select,
body #empresasAdmin textarea {
  border-color: var(--vfinal-line, #d6e2f0) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, .025) !important;
}

body #novoEPI input:focus,
body #novoEPI select:focus,
body #novoEPI textarea:focus,
body #estoque input:focus,
body #estoque select:focus,
body #estoque textarea:focus,
body #treinamentos input:focus,
body #treinamentos select:focus,
body #treinamentos textarea:focus,
body #vencimentos input:focus,
body #vencimentos select:focus,
body #vencimentos textarea:focus,
body #cadastrarEmpresa input:focus,
body #cadastrarEmpresa select:focus,
body #cadastrarEmpresa textarea:focus,
body #empresasAdmin input:focus,
body #empresasAdmin select:focus,
body #empresasAdmin textarea:focus {
  border-color: rgba(35, 104, 189, .46) !important;
  box-shadow: 0 0 0 3px rgba(35, 104, 189, .105), inset 0 1px 0 rgba(15, 23, 42, .025) !important;
}

body #novoEPI .btn,
body #novoEPI button,
body #estoque .btn,
body #estoque button,
body #treinamentos .btn,
body #treinamentos button,
body #vencimentos .btn,
body #vencimentos button,
body #cadastrarEmpresa .btn,
body #cadastrarEmpresa button,
body #empresasAdmin .btn,
body #empresasAdmin button {
  min-height: 36px !important;
  border-radius: 10px !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
  box-shadow: 0 3px 8px rgba(15, 23, 42, .035) !important;
}

body #novoEPI #btnAbrirCadastroEPI,
body #novoEPI .btn-primary,
body #estoque .btn-primary,
body #estoque .btn--primary,
body #treinamentos .train-actions .btnAbrirSala,
body #treinamentos .btnCertTreina,
body #treinamentos #btnNovoTreina,
body #empresasAdmin .btn-primary,
body #cadastrarEmpresa .btn-primary,
body #cadastrarEmpresa button[type="submit"],
body #lojaConfModal .btn-primary,
body #lojaPedModal .btn-primary {
  background: linear-gradient(180deg, #2f74c9 0%, var(--vfinal-blue-dark, #195aa8) 100%) !important;
  border-color: rgba(25, 90, 168, .18) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 14px rgba(35, 104, 189, .145) !important;
}

body #novoEPI #btnAbrirCadastroEPI:hover,
body #novoEPI .btn-primary:hover,
body #estoque .btn-primary:hover,
body #estoque .btn--primary:hover,
body #treinamentos .train-actions .btnAbrirSala:hover,
body #treinamentos .btnCertTreina:hover,
body #treinamentos #btnNovoTreina:hover,
body #empresasAdmin .btn-primary:hover,
body #cadastrarEmpresa .btn-primary:hover,
body #cadastrarEmpresa button[type="submit"]:hover,
body #lojaConfModal .btn-primary:hover,
body #lojaPedModal .btn-primary:hover {
  box-shadow: 0 8px 18px rgba(35, 104, 189, .17) !important;
}

body #novoEPI table thead th,
body #estoqueConteudo table thead th,
body #treinamentosConcluidosWrap table thead th,
body #vencimentos table thead th,
body #empresasAdmin table thead th,
body #lojaConfBody table thead th {
  background: #f8fbff !important;
  border-bottom-color: var(--vfinal-line, #d6e2f0) !important;
  color: #43546a !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

body #novoEPI table tbody td,
body #estoqueConteudo table tbody td,
body #treinamentosConcluidosWrap table tbody td,
body #vencimentos table tbody td,
body #empresasAdmin table tbody td,
body #lojaConfBody table tbody td {
  border-bottom-color: var(--vfinal-soft-line, #ebf1f7) !important;
  color: #1f2937 !important;
  font-weight: 400 !important;
}

body #novoEPI .badge,
body #estoque .badge,
body #estoque .status,
body #estoque .pill,
body #treinamentos .badge,
body #treinamentos .chip,
body #vencimentos .badge,
body #vencimentos .chip,
body #vencimentos .status-pill,
body #empresasAdmin .badge,
body #empresasAdmin .empresa-doc {
  border-radius: 999px !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
}

body #loja .loja-topnav,
body #loja .store-topnav,
body #loja .loja-categorias,
body #loja .store-categories {
  border: 1px solid var(--vfinal-line, #d6e2f0) !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  box-shadow: var(--vfinal-shadow, 0 8px 20px rgba(15, 23, 42, .055)) !important;
}

body #loja .loja-topnav button,
body #loja .store-topnav button,
body #loja .loja-categorias button,
body #loja .store-categories button {
  min-height: 34px !important;
  border-radius: 999px !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
}

body #loja .loja-topnav .store-topnav-btn,
body #loja .store-topnav .store-topnav-btn,
body #loja .loja-topnav > a.loja-topitem,
body #loja .loja-topnav .loja-toplink {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 34px !important;
  padding: 7px 12px !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #24354d !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

body #loja .loja-topnav .store-topnav-btn:hover,
body #loja .store-topnav .store-topnav-btn:hover,
body #loja .loja-topnav > a.loja-topitem:hover,
body #loja .loja-topnav .loja-toplink:hover {
  background: #eef6ff !important;
  border-color: rgba(35, 104, 189, .18) !important;
  color: #195aa8 !important;
}

body #loja .loja-topnav button.active,
body #loja .store-topnav button.active,
body #loja .loja-categorias button.active,
body #loja .store-categories button.active {
  background: var(--vfinal-blue-soft, #eef6ff) !important;
  color: var(--vfinal-blue-dark, #195aa8) !important;
  border-color: rgba(35, 104, 189, .22) !important;
}

body #loja .loja-topnav .store-topnav-btn.active,
body #loja .store-topnav .store-topnav-btn.active,
body #loja .loja-topnav > a.loja-topitem.active,
body #loja .loja-topnav .loja-toplink.active,
body #loja .loja-topnav .loja-topitem.active > .store-topnav-btn,
body #loja .loja-topnav .loja-topitem.active > .loja-toplink {
  background: var(--vfinal-blue-soft, #eef6ff) !important;
  border-color: rgba(35, 104, 189, .22) !important;
  color: var(--vfinal-blue-dark, #195aa8) !important;
}

body #loja .loja-mega,
body #loja .store-mega {
  border-color: var(--vfinal-line, #d6e2f0) !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .13) !important;
}

/* ===== BRAZSAFE Identity Final Tune - official Home reference ===== */
body .container {
  background:
    linear-gradient(180deg, rgba(247, 250, 255, .96) 0%, rgba(238, 245, 253, .98) 100%),
    #f1f6fc !important;
  color: #1f2937 !important;
}

body .main-content {
  background: transparent !important;
  color: #1f2937 !important;
}

body .main-header-card {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body .main-header-home-title {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif !important;
  font-size: 29px !important;
  line-height: 1.08 !important;
  font-weight: 300 !important;
  letter-spacing: 0 !important;
  color: #5a6677 !important;
  text-shadow: none !important;
}

body #btnLogout.btn-logout {
  min-height: 38px !important;
  padding: 0 18px !important;
  border: 1px solid rgba(35, 104, 189, .18) !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #2f73c9 0%, #2366b9 100%) !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  box-shadow: 0 8px 18px rgba(35, 104, 189, .18) !important;
}

body #btnLogout.btn-logout:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 10px 22px rgba(35, 104, 189, .20) !important;
  filter: none !important;
}

body #home .home-kpi-row {
  gap: 18px !important;
  margin-bottom: 24px !important;
}

body #home .home-card,
body #home .home-chart {
  border: 1px solid #cbd9ea !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, .86) 0%, rgba(246, 250, 255, .94) 100%) !important;
  box-shadow: 0 8px 22px rgba(25, 43, 75, .055) !important;
  filter: none !important;
}

body #home .home-card:hover,
body #home .home-chart:hover {
  transform: translateY(-1px) !important;
  border-color: #c4d5e8 !important;
  box-shadow: 0 10px 24px rgba(25, 43, 75, .07) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, .90) 0%, rgba(247, 251, 255, .96) 100%) !important;
  filter: none !important;
}

body #home .home-card {
  padding: 16px !important;
}

body #home .card-title,
body #home .home-chart-title {
  color: #111827 !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

body #home .card-value {
  color: #111827 !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

body #home .card-sub,
body #home .home-chart-subtitle,
body #home .home-list-empty {
  color: #536579 !important;
  font-weight: 400 !important;
}

body #home .card-link {
  color: #0b4fae !important;
  font-weight: 500 !important;
}

body #home .card-badge {
  min-height: 24px !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

body #home .card-ico {
  width: 32px !important;
  height: 32px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .86) !important;
  box-shadow: none !important;
}

body #home .card-red {
  border-left-color: rgba(239, 68, 68, .58) !important;
}

body #home .card-orange {
  border-left-color: rgba(249, 115, 22, .58) !important;
}

body #home .card-blue {
  border-left-color: rgba(37, 99, 235, .58) !important;
}

body #home .home-list-item {
  border-bottom-color: #ccd8e6 !important;
  color: #1f2937 !important;
  font-weight: 400 !important;
}

body #home .list-item-qtd {
  color: #0b4fae !important;
  font-weight: 600 !important;
}

body #novoEPI,
body #estoque,
body #treinamentos,
body #vencimentos,
body #cadastrarEmpresa,
body #empresasAdmin,
body #loja {
  --vfinal-ink: #1f2937;
  --vfinal-title: #334155;
  --vfinal-muted: #5f6f84;
  --vfinal-line: #cfdeee;
  --vfinal-soft-line: #e8eff7;
  --vfinal-panel: #fbfdff;
  --vfinal-panel-soft: #f6faff;
  --vfinal-blue: #2368bd;
  --vfinal-blue-dark: #1f5fae;
  --vfinal-blue-soft: #edf6ff;
  --vfinal-shadow: 0 7px 18px rgba(25, 43, 75, .045);
  --vfinal-shadow-hover: 0 9px 22px rgba(25, 43, 75, .065);
}

body #novoEPI h1,
body #novoEPI h2,
body #novoEPI h3,
body #estoque h1,
body #estoque h2,
body #estoque h3,
body #treinamentos h1,
body #treinamentos h2,
body #treinamentos h3,
body #treinamentos h4,
body #vencimentos h1,
body #vencimentos h2,
body #vencimentos h3,
body #cadastrarEmpresa h1,
body #cadastrarEmpresa h2,
body #cadastrarEmpresa h3,
body #empresasAdmin h1,
body #empresasAdmin h2,
body #empresasAdmin h3,
body #empresasAdmin h4 {
  color: #334155 !important;
  font-weight: 600 !important;
}

body #novoEPI .panel,
body #novoEPI #listaEPIs,
body #estoque .estoque-toolbar,
body #estoque .estoque-topbar,
body #estoque .estoque-actions,
body #estoque #estoqueFiltros,
body #estoque #estoqueGrafico,
body #estoqueConteudo,
body #estoque .estoque-table-wrap,
body #estoque .table-wrap,
body #treinamentos .train-header,
body #treinamentos .train-card,
body #treinamentos .treina-panel,
body #treinamentosConcluidosWrap,
body #treinamentosConcluidosWrap .treina-kpi,
body #treinamentosConcluidosWrap .kpi,
body #vencimentos .kpi,
body #vencimentos .venc-toolbar,
body #vencimentos .filters-menu,
body #vencimentos .venc-table,
body #vencimentos .table-wrap,
body #vencimentos .venc-table-wrap,
body #cadastrarEmpresa form,
body #cadastrarEmpresa .admin-form,
body #empresasAdminToolbar,
body #empresasAdmin .admin-toolbar,
body #empresasAdminList {
  border-color: var(--vfinal-line, #cfdeee) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, .88) 0%, rgba(248, 251, 255, .96) 100%) !important;
  box-shadow: var(--vfinal-shadow, 0 7px 18px rgba(25, 43, 75, .045)) !important;
}

body #novoEPI input,
body #novoEPI select,
body #novoEPI textarea,
body #estoque input,
body #estoque select,
body #estoque textarea,
body #treinamentos input,
body #treinamentos select,
body #treinamentos textarea,
body #vencimentos input,
body #vencimentos select,
body #vencimentos textarea,
body #cadastrarEmpresa input,
body #cadastrarEmpresa select,
body #cadastrarEmpresa textarea,
body #empresasAdmin input,
body #empresasAdmin select,
body #empresasAdmin textarea {
  border-color: var(--vfinal-line, #cfdeee) !important;
  color: #1f2937 !important;
  background: rgba(255, 255, 255, .94) !important;
  box-shadow: inset 0 1px 0 rgba(25, 43, 75, .018) !important;
}

body #novoEPI .btn,
body #novoEPI button,
body #estoque .btn,
body #estoque button,
body #treinamentos .btn,
body #treinamentos button,
body #vencimentos .btn,
body #vencimentos button,
body #cadastrarEmpresa .btn,
body #cadastrarEmpresa button,
body #empresasAdmin .btn,
body #empresasAdmin button {
  min-height: 35px !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 7px rgba(25, 43, 75, .030) !important;
}

body #novoEPI #btnAbrirCadastroEPI,
body #novoEPI .btn-primary,
body #estoque .btn-primary,
body #estoque .btn--primary,
body #treinamentos .train-actions .btnAbrirSala,
body #treinamentos .btnCertTreina,
body #treinamentos #btnNovoTreina,
body #empresasAdmin .btn-primary,
body #cadastrarEmpresa .btn-primary,
body #cadastrarEmpresa button[type="submit"],
body #lojaConfModal .btn-primary,
body #lojaPedModal .btn-primary {
  background: linear-gradient(180deg, #2c70c5 0%, #205fae 100%) !important;
  box-shadow: 0 5px 13px rgba(35, 104, 189, .12) !important;
}

body #novoEPI #btnAbrirCadastroEPI:hover,
body #novoEPI .btn-primary:hover,
body #estoque .btn-primary:hover,
body #estoque .btn--primary:hover,
body #treinamentos .train-actions .btnAbrirSala:hover,
body #treinamentos .btnCertTreina:hover,
body #treinamentos #btnNovoTreina:hover,
body #empresasAdmin .btn-primary:hover,
body #cadastrarEmpresa .btn-primary:hover,
body #cadastrarEmpresa button[type="submit"]:hover,
body #lojaConfModal .btn-primary:hover,
body #lojaPedModal .btn-primary:hover {
  box-shadow: 0 7px 16px rgba(35, 104, 189, .15) !important;
}

body #novoEPI table thead th,
body #estoqueConteudo table thead th,
body #treinamentosConcluidosWrap table thead th,
body #vencimentos table thead th,
body #empresasAdmin table thead th,
body #lojaConfBody table thead th {
  background: #f8fbff !important;
  color: #506176 !important;
  border-bottom-color: var(--vfinal-line, #cfdeee) !important;
  font-weight: 600 !important;
}

body #novoEPI table tbody td,
body #estoqueConteudo table tbody td,
body #treinamentosConcluidosWrap table tbody td,
body #vencimentos table tbody td,
body #empresasAdmin table tbody td,
body #lojaConfBody table tbody td {
  color: #2f3b4c !important;
  border-bottom-color: var(--vfinal-soft-line, #e8eff7) !important;
}

body #novoEPI table tbody tr:hover,
body #estoqueConteudo table tbody tr:hover,
body #treinamentosConcluidosWrap table tbody tr:hover,
body #vencimentos table tbody tr:hover,
body #empresasAdmin table tbody tr:hover {
  background: #f8fbff !important;
}

body #novoEPI #listaEPIs table#tableEpis td.col-actions .btn--edit {
  border-color: #d7e4f3 !important;
  background: #ffffff !important;
  color: #1f5fae !important;
}

body #novoEPI #listaEPIs table#tableEpis td.col-actions .btn--del {
  border-color: #efcaca !important;
  background: #ffffff !important;
  color: #9f2d2d !important;
}

body #loja .loja-topnav,
body #loja .store-topnav,
body #loja .loja-categorias,
body #loja .store-categories {
  background: linear-gradient(180deg, rgba(255, 255, 255, .90) 0%, rgba(247, 251, 255, .96) 100%) !important;
  box-shadow: 0 7px 18px rgba(25, 43, 75, .045) !important;
}

body #loja .loja-topnav .store-topnav-btn,
body #loja .store-topnav .store-topnav-btn,
body #loja .loja-topnav > a.loja-topitem,
body #loja .loja-topnav .loja-toplink {
  color: #34465c !important;
  font-weight: 600 !important;
}

body #loja .loja-topnav .store-topnav-btn:hover,
body #loja .store-topnav .store-topnav-btn:hover,
body #loja .loja-topnav > a.loja-topitem:hover,
body #loja .loja-topnav .loja-toplink:hover,
body #loja .loja-topnav .store-topnav-btn.active,
body #loja .store-topnav .store-topnav-btn.active,
body #loja .loja-topnav > a.loja-topitem.active,
body #loja .loja-topnav .loja-toplink.active {
  background: #edf6ff !important;
  color: #1f5fae !important;
}

body #epiModal,
body #histEstModal,
body #ctrlModal,
body #autEstModal,
body #cadGerenteModal,
body #preModal,
body #salaTreinamentoBox,
body .sala-treina-modal,
body .modal.modal-quiz,
body #lojaConfModal,
body #lojaPedModal {
  border-color: #cfdeee !important;
  background: #ffffff !important;
  box-shadow: 0 16px 42px rgba(15, 23, 42, .17) !important;
}

@media (max-width: 900px) {
  body .main-header-home-title {
    font-size: 22px !important;
  }
}

/* ===== BRAZSAFE Mobile Phase 1 - final identity override ===== */
@media (max-width: 768px) {
  body .container {
    background:
      linear-gradient(180deg, rgba(247, 250, 255, .96) 0%, rgba(239, 246, 253, .98) 100%),
      #f1f6fc !important;
  }

  body .main-header-card {
    min-height: 60px !important;
    padding: 12px 10px 12px 56px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  body .main-header-home-title {
    max-width: 54vw !important;
    color: #5a6677 !important;
    font-size: 18px !important;
    line-height: 1.12 !important;
    font-weight: 300 !important;
    letter-spacing: 0 !important;
  }

  body #btnLogout.btn-logout {
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 15px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    box-shadow: 0 6px 14px rgba(35, 104, 189, .16) !important;
  }

  body #home .home-card,
  body #home .home-chart,
  body #novoEPI .panel,
  body #novoEPI #listaEPIs,
  body #estoque .estoque-toolbar,
  body #estoque .estoque-topbar,
  body #estoque .estoque-actions,
  body #estoque #estoqueFiltros,
  body #estoque #estoqueGrafico,
  body #estoqueConteudo,
  body #estoque .estoque-table-wrap,
  body #estoque .table-wrap,
  body #treinamentos .train-header,
  body #treinamentos .train-card,
  body #treinamentos .treina-panel,
  body #treinamentosConcluidosWrap,
  body #vencimentos .kpi,
  body #vencimentos .venc-toolbar,
  body #vencimentos .filters-menu,
  body #vencimentos .table-wrap,
  body #empresasAdminToolbar,
  body #empresasAdmin .admin-toolbar {
    border-color: #d6e2f0 !important;
    border-radius: 12px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, .90) 0%, rgba(248, 251, 255, .96) 100%) !important;
    box-shadow: 0 5px 14px rgba(25, 43, 75, .04) !important;
  }

  body #novoEPI h1,
  body #novoEPI h2,
  body #novoEPI h3,
  body #estoque h1,
  body #estoque h2,
  body #estoque h3,
  body #treinamentos h1,
  body #treinamentos h2,
  body #treinamentos h3,
  body #treinamentos h4,
  body #vencimentos h1,
  body #vencimentos h2,
  body #vencimentos h3,
  body #empresasAdmin h1,
  body #empresasAdmin h2,
  body #empresasAdmin h3,
  body #empresasAdmin h4 {
    color: #334155 !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
  }

  body #novoEPI table thead th,
  body #estoqueConteudo table thead th,
  body #treinamentosConcluidosWrap table thead th,
  body #vencimentos table thead th,
  body #empresasAdmin table thead th,
  body #lojaConfBody table thead th {
    color: #506176 !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }

  body #novoEPI table tbody td,
  body #estoqueConteudo table tbody td,
  body #treinamentosConcluidosWrap table tbody td,
  body #vencimentos table tbody td,
  body #empresasAdmin table tbody td,
  body #lojaConfBody table tbody td {
    color: #2f3b4c !important;
    font-size: 12.5px !important;
    line-height: 1.32 !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }

  body #novoEPI .btn,
  body #novoEPI button,
  body #estoque .btn,
  body #estoque button,
  body #treinamentos .btn,
  body #treinamentos button,
  body #vencimentos .btn,
  body #vencimentos button,
  body #empresasAdmin .btn,
  body #empresasAdmin button {
    min-height: 34px !important;
    font-weight: 600 !important;
    box-shadow: 0 3px 8px rgba(25, 43, 75, .035) !important;
  }

  body #epiModal,
  body #histEstModal,
  body #ctrlModal,
  body #autEstModal,
  body #cadGerenteModal,
  body #preModal,
  body #salaTreinamentoBox,
  body .sala-treina-modal,
  body .modal.modal-quiz,
  body #lojaConfModal,
  body #lojaPedModal {
    border-color: #d6e2f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .16) !important;
  }
}
