/* CoNNecta Cloud — extensões visuais v1.11.1
   Esta folha complementa o style.css principal. Ela não redefine globalmente
   botões, tabelas, cards, títulos ou modais legados. */

:root {
  --cc-bg: var(--bg, #f3f4f6);
  --cc-surface: var(--panel, #ffffff);
  --cc-surface-2: var(--panel-2, #f9fafb);
  --cc-text: var(--text-color, #212529);
  --cc-muted: var(--muted, #64748b);
  --cc-line: var(--line, #e5e7eb);
  --cc-accent: var(--brand-2, #00a3a3);
  --cc-danger: var(--danger, #ef4444);
  --cc-warning: var(--warn, #f59e0b);
  --cc-success: var(--ok, #16a34a);
  --cc-radius: var(--card-radius, 12px);
  --cc-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.text-muted {
  color: var(--muted) !important;
}

/* Garante que apenas a marca correspondente ao tema fique visível. */
.logo-light,
.logo-dark {
  display: none !important;
}

body.light-mode .logo-light,
.light-mode .logo-light {
  display: block !important;
}

body.light-mode .logo-dark,
.light-mode .logo-dark {
  display: none !important;
}

body.dark-mode .logo-dark,
.dark-mode .logo-dark {
  display: block !important;
}

body.dark-mode .logo-light,
.dark-mode .logo-light {
  display: none !important;
}

.login-form-content .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-inline: auto !important;
}

.login-form-content .logo img {
  margin-inline: auto !important;
  max-width: min(100%, 270px);
  object-fit: contain;
}

.login-body-new footer,
.login-fixed-footer {
  position: fixed;
  right: 0;
  bottom: 8px;
  left: 450px;
  z-index: 3;
  pointer-events: none;
  color: white !important;
}

.login-form-content .btn-primary {
  color: var(--text-color) !important;
  background: transparent !important;
  border: 2px solid;
  box-shadow: 0 2px 4px #084d6ce3;
}

body.light-mode .login-form-content .btn-primary {
  border-color: #39b6f0;
}
body.dark-mode .login-form-content .btn-primary {
  border-color: var(--brand-2) !important;
  box-shadow: 0 2px 4px #0eacac;
}

.login-form-content .btn-primary:hover,
.login-form-content .btn-primary:focus {
  background: linear-gradient(
    135deg,
    rgba(32, 39, 46, 0.44),
    rgba(1, 7, 12, 0.56)
  ) !important;
}

.login-body-new .forgot {
  display: none !important;
}

.password-toggle {
  min-width: 44px;
  background: transparent !important;
  border-left: 0 !important;
  box-shadow: none !important;
}

.password-toggle:hover,
.password-toggle:focus {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.05) !important;
  transform: none !important;
}

/* Tela intermediária após o login. */
html:has(body.connecta-loading-page),
body.connecta-loading-page {
  min-height: 100%;
}

body.connecta-loading-page {
  margin: 0;
  overflow: hidden;
  background: #1a2a47 !important;
  color: #fff;
}

.connecta-loading-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.connecta-loading-message {
  margin: 0;
  color: #fff !important;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: center;
}

/* Loader do carregamento inicial do painel. */
#connectaInitLoader {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  color: var(--text-color);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(4px);
}

#connectaInitLoader.is-visible {
  display: flex;
}

.cc-loader-ring {
  width: 54px;
  height: 54px;
  border: 4px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-top-color: var(--brand-2);
  border-radius: 50%;
  animation: cc-spin 0.8s linear infinite;
}

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

/* Diálogo próprio do sistema. Não compartilha a classe .modal do Bootstrap. */
.cc-system-dialog {
  position: fixed;
  inset: 0;
  z-index: 21000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 8, 18, 0.72);
  backdrop-filter: blur(5px);
}

.cc-system-dialog.is-open {
  display: flex;
}

.cc-system-dialog[aria-hidden="true"] {
  display: none !important;
}

.cc-system-dialog__panel {
  width: min(94vw, 620px);
  max-height: 90vh;
  overflow: auto;
  color: var(--text-color);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  box-shadow: var(--cc-shadow);
}

.cc-system-dialog__header,
.cc-system-dialog__footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.cc-system-dialog__header {
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.cc-system-dialog__footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.cc-system-dialog__title {
  margin: 0;
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
}

.cc-system-dialog__body {
  padding: 18px 16px;
}

.cc-system-dialog__message {
  color: var(--text-color);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cc-system-dialog__input-wrap {
  margin-top: 14px;
}

.cc-system-dialog [hidden] {
  display: none !important;
}

.cc-system-dialog__close {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--text-color);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: none;
}

.cc-system-dialog__close:hover {
  transform: none;
  border-color: var(--brand-2);
}

/* O menu preserva a tipografia original, sem negrito excessivo. */
.painel-body .menu a {
  font-weight: 400;
}

.painel-body .menu a.active {
  font-weight: 500;
}

/* Tabelas de dados do painel sem herdar o visual padrão do Bootstrap. */
.connecta-data-table {
  width: 100%;
  margin: 0;
  color: var(--text-color);
  background: transparent;
  border-collapse: collapse;
  border-spacing: 0;
}

.connecta-data-table thead {
  background: var(--panel-2);
}

.connecta-data-table th,
.connecta-data-table td {
  padding: 9px 8px;
  color: var(--text-color) !important;
  background: transparent !important;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.connecta-data-table th {
  color: var(--muted) !important;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.connecta-data-table tbody tr {
  transition: background-color 0.16s ease;
}

.connecta-data-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--panel-2) 48%, transparent);
}

.connecta-data-table tbody tr:hover {
  background: var(--panel-2);
}

.connecta-data-table--compact th,
.connecta-data-table--compact td {
  padding: 7px 6px;
}

/* Componentes exclusivos das novas funções de usuários e acesso. */
.cc-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.cc-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 9px;
}

.cc-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  color: var(--text-color);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.cc-checkbox-item input {
  width: auto !important;
  margin: 0;
}

/* Tabela própria, independente das cores padrão do Bootstrap. */
.connecta-table-wrap {
  overflow: auto;
  max-height: min(62vh, 680px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.connecta-theme-table {
  width: 100%;
  min-width: 980px;
  margin: 0;
  color: var(--text-color);
  background: transparent;
  border-collapse: collapse;
  table-layout: auto;
}

.connecta-theme-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel-2);
}

.connecta-theme-table th,
.connecta-theme-table td {
  padding: 10px 12px;
  color: var(--text-color) !important;
  background: transparent !important;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.connecta-theme-table th {
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.connecta-theme-table td {
  font-size: 0.75rem;
}

.connecta-theme-table tbody tr:hover td {
  background: color-mix(in srgb, var(--panel-2) 74%, transparent) !important;
}

.connecta-theme-table code,
.connecta-theme-table .text-muted,
.connecta-theme-table small {
  color: var(--muted) !important;
}

.connecta-access-history-modal .modal-content-user {
  width: min(94vw, 1180px) !important;
  max-width: 1180px !important;
  max-height: 90vh;
  margin: 4vh auto !important;
  overflow: auto;
}

/* Downloads em grade legível, sem cartões espremidos. */
.download-app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 16px;
}

.download-app-card {
  display: flex;
  min-width: 0;
  min-height: 270px;
  flex-direction: column;
}

.download-app-card .download-app-icon {
  margin-bottom: 14px;
  color: var(--brand-2);
  font-size: 2rem;
}

.download-app-card .form-select {
  width: 100% !important;
}

.download-app-card .btn {
  width: 100%;
  margin-top: auto;
}

/* Ações compactas da tabela ODIN. */
.odin-actions-compact {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.odin-more-actions {
  position: relative;
}

.odin-more-actions > summary {
  display: inline-flex;
  min-width: 36px;
  align-items: center;
  justify-content: center;
  list-style: none;
}

.odin-more-actions > summary::-webkit-details-marker {
  display: none;
}

.odin-more-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 100;
  display: grid;
  width: 200px;
  gap: 6px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--cc-shadow);
}

.odin-more-menu .btn {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

/* Transição suave apenas em valores explicitamente marcados. */
[data-radar-value],
.radar-value,
.update-radar-value {
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.cc-value-updating {
  opacity: 0.42;
  transform: translateY(2px);
}

/* Aviso de falha do Tactical/ODIN sem destruir o conteúdo da seção. */
.connecta-data-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 10px 12px;
  color: var(--text-color);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  border-radius: 9px;
}

.connecta-data-status.is-error {
  border-left-color: var(--danger);
}

.connecta-data-status.is-success {
  border-left-color: var(--ok);
}

.connecta-data-status__text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.connecta-report-table {
  width: 100%;
  margin: 0;
  color: var(--text-color);
  background: transparent;
  border-collapse: collapse;
}

.connecta-report-table th,
.connecta-report-table td {
  padding: 7px 8px;
  color: var(--text-color) !important;
  background: transparent !important;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.connecta-report-table th {
  color: var(--muted) !important;
  background: var(--panel-2) !important;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.connecta-report-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--panel-2) 48%, transparent);
}

/* Ajustes dos relatórios sem redefinir o tema da aplicação inteira. */
.dashboard-body #loading-message,
.hse-body .connecta-inline-message {
  color: var(--text-color) !important;
  background: transparent !important;
  border-color: var(--line) !important;
}

.hse-body .report-area-hse {
  display: grid;
  gap: 24px;
}

.hse-body .report-instance {
  max-height: none !important;
  overflow: visible !important;
}

.hse-body .charts-hse {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 900px) {
  .hse-body .charts-hse {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .login-body-new footer,
  .login-fixed-footer {
    left: 0;
  }

  .cc-dialog-actions,
  .cc-system-dialog__footer,
  .connecta-data-status {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .cc-dialog-actions .btn,
  .cc-system-dialog__footer .btn,
  .connecta-data-status .btn {
    width: 100%;
  }
}

/* Impressão: força visual claro somente durante a impressão. */
@media print {
  @page {
    margin: 10mm;
  }

  html,
  body,
  body.light-mode,
  body.dark-mode {
    background: #fff !important;
    color: #111827 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    overflow: visible !important;
  }

  body * {
    text-shadow: none !important;
    box-shadow: none !important;
  }

  body h1,
  body h2,
  body h3,
  body h4,
  body h5,
  body h6,
  body p,
  body span,
  body label,
  body td,
  body th,
  body li,
  body small,
  body strong {
    color: #111827 !important;
  }

  .sidebar,
  .no-print,
  .theme-toggle,
  .toggle-theme,
  #connectaInitLoader,
  .cc-system-dialog,
  button,
  .btn {
    display: none !important;
  }

  .layout,
  main,
  .content,
  .panel,
  .card,
  .section,
  .report-card,
  .report-instance,
  .card-hse,
  .table-responsive,
  .table-scroll,
  [style*="overflow"] {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    color: #111827 !important;
    background: #fff !important;
    background-image: none !important;
    border-color: #cfd4dc !important;
  }

  table,
  .connecta-theme-table {
    width: 100% !important;
    min-width: 0 !important;
    color: #111827 !important;
    background: #fff !important;
    border-collapse: collapse !important;
  }

  thead {
    display: table-header-group !important;
    background: #f3f4f6 !important;
  }

  tr,
  .panel,
  .card,
  .card-hse {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  td,
  th {
    color: #111827 !important;
    background: #fff !important;
    border-color: #cfd4dc !important;
  }

  canvas,
  svg,
  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  ::-webkit-scrollbar {
    display: none !important;
  }
}

/* ========================================================================== 
   CoNNecta Cloud v1.11.2 — Ajustes Parte 2
   Regras complementares, escopadas e baseadas no style.css original.
   ========================================================================== */

/* Botão padrão: mesma linguagem visual do menu e do botão de login. */
.btn-connecta-ghost,
.content .btn:not(.btn-close),
.dashboard-body .btn:not(.btn-close),
.hse-body .btn-hse,
.hse-body .btn:not(.btn-close),
#view-snc .snc-btn,
#view-snc-report .snc-btn,
#view-tools-report .snc-btn {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  color: var(--text-color) !important;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--panel-2) 58%, transparent),
    color-mix(in srgb, var(--bg) 36%, transparent)
  ) !important;
  border: 1px solid color-mix(in srgb, var(--brand-2) 72%, var(--line)) !important;
  border-radius: 9px !important;
  box-shadow: 0 3px 10px -7px
    color-mix(in srgb, var(--brand-2) 70%, transparent) !important;
  font-family: "Segoe UI", sans-serif !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  line-height: 1.2;
  text-decoration: none !important;
  transform: none;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease !important;
}

.btn-connecta-ghost:hover,
.btn-connecta-ghost:focus-visible,
.content .btn:not(.btn-close):hover,
.content .btn:not(.btn-close):focus-visible,
.dashboard-body .btn:not(.btn-close):hover,
.dashboard-body .btn:not(.btn-close):focus-visible,
.hse-body .btn-hse:hover,
.hse-body .btn-hse:focus-visible,
.hse-body .btn:not(.btn-close):hover,
.hse-body .btn:not(.btn-close):focus-visible,
#view-snc .snc-btn:hover,
#view-snc-report .snc-btn:hover,
#view-tools-report .snc-btn:hover {
  color: var(--text-color) !important;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--brand) 24%, var(--panel-2)),
    color-mix(in srgb, var(--brand-2) 18%, var(--bg))
  ) !important;
  border-color: var(--brand-2) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-2) 16%, transparent) !important;
  transform: none !important;
}

.btn-connecta-ghost:disabled,
.content .btn:disabled,
.dashboard-body .btn:disabled,
.hse-body .btn-hse:disabled {
  opacity: 0.48 !important;
  cursor: not-allowed !important;
}

.connecta-danger-action,
.content .connecta-danger-action {
  color: var(--danger) !important;
  border-color: color-mix(in srgb, var(--danger) 68%, var(--line)) !important;
  background: color-mix(in srgb, var(--danger) 8%, transparent) !important;
}

/* Cabeçalho padrão dos relatórios e módulos. */
.connecta-report-header,
.connecta-module-header {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0 14px;
  background: transparent !important;
  border: 0 !important;
}

.connecta-report-header > .col-12,
.connecta-report-header .justify-content-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.connecta-report-header .logo,
.connecta-module-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
}

.connecta-report-header .logo img,
.connecta-module-brand img {
  width: auto;
  height: 42px;
  max-width: 150px;
  object-fit: contain;
}

.connecta-report-header .title,
.connecta-module-brand h2 {
  margin: 0;
  color: var(--text-color);
  font-size: 1.03rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.connecta-report-header .small,
.connecta-module-brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.connecta-module-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.connecta-inline-message,
.dashboard-body #loading-message,
.hse-body #loading-message {
  padding: 12px 14px !important;
  color: var(--text-color) !important;
  background: transparent !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
}

.connecta-inline-message h4,
.dashboard-body #loading-message h4,
.hse-body #loading-message h4 {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 600;
}

.connecta-inline-message p,
.dashboard-body #loading-message p,
.hse-body #loading-message p {
  margin: 4px 0 0;
  color: var(--muted) !important;
  font-size: 0.72rem;
}

/* RDD: resumo, cartões, gráficos e tabelas sem visual Bootstrap. */
.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.report-summary-grid-secondary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 10px;
}

.report-summary-item {
  min-width: 0;
  padding: 12px 10px;
  text-align: center;
  background: transparent;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.report-summary-item span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.68rem;
}

.report-summary-item strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text-color);
  font-size: 0.76rem;
  font-weight: 650;
}

.connecta-report-card,
.dashboard-body .connecta-report-card,
.hse-body .connecta-report-card {
  color: var(--text-color);
  background: transparent !important;
  background-image: none !important;
  border: 1px solid var(--line) !important;
  border-radius: 11px !important;
  box-shadow: none !important;
}

.connecta-report-card-title,
.hse-body .connecta-report-card-title,
.hse-chart-title {
  margin: 0 0 12px !important;
  padding: 0 0 9px !important;
  color: var(--text-color) !important;
  border-bottom: 1px solid var(--line) !important;
  font-size: 0.9rem !important;
  font-weight: 650 !important;
  text-align: center;
}

.connecta-report-table-wrap,
.dashboard-body .table-responsive,
.hse-body .connecta-report-table-wrap {
  width: 100%;
  max-height: none;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.connecta-report-table {
  width: 100%;
  min-width: 0;
  margin: 0;
  table-layout: auto;
  color: var(--text-color);
  background: transparent !important;
  border-collapse: collapse;
}

.connecta-report-table th,
.connecta-report-table td {
  padding: 8px 9px;
  color: var(--text-color) !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  font-size: 0.72rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.connecta-report-table th {
  color: var(--text-color) !important;
  background: color-mix(in srgb, var(--panel-2) 68%, transparent) !important;
  font-weight: 650;
  white-space: nowrap;
}

.connecta-report-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

.connecta-health-status {
  color: var(--text-color);
  font-weight: 650;
}

.dashboard-body .disk-chart-caption {
  margin-top: -4px;
  color: var(--text-color);
  font-size: 0.72rem;
  text-align: center;
}

.dashboard-body .gauge-container-3d,
.hse-body .gauge-container-3d {
  min-height: 150px;
}

/* HSE: uma página visual por coleta, sem blocos cortados. */
.hse-body .container-hse {
  max-width: 1360px;
}

.hse-body .panel-hse {
  padding: 12px 0;
}

.hse-body .controls-hse {
  display: grid;
  grid-template-columns: repeat(6, minmax(145px, 1fr));
  gap: 10px;
  align-items: end;
}

.hse-body .controls-hse .col,
.hse-body .generate-hse {
  min-width: 0;
  margin: 0;
}

.hse-body .generate-hse .btn-hse {
  width: 100%;
}

.hse-body .blocks-hse {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hse-body .blk {
  min-height: 43px;
  color: var(--text-color);
  background: transparent;
}

.hse-body .report-area-hse {
  display: grid;
  gap: 22px;
}

.hse-body .report-instance {
  width: 100%;
  max-height: none !important;
  padding: 18px;
  overflow: visible !important;
  color: var(--text-color);
  background: var(--panel) !important;
  background-image: none !important;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
}

.hse-report-title {
  display: grid !important;
  grid-template-columns: 1fr auto;
  gap: 3px 20px;
  align-items: start !important;
  padding-bottom: 12px !important;
  text-align: left;
}

.hse-report-brand,
.hse-report-description {
  grid-column: 1 / -1;
  text-align: center;
}

.hse-report-brand {
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 650;
}

.hse-report-description {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.72rem;
}

.hse-report-title h2 {
  margin: 0 !important;
  color: var(--text-color) !important;
  font-size: 0.95rem !important;
}

.hse-body .grid-4 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  gap: 0;
}

.hse-body .metric {
  min-width: 0;
  padding: 10px;
  background: transparent;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.hse-body .metric .value {
  overflow-wrap: anywhere;
  color: var(--text-color);
  font-size: 0.73rem;
}

.hse-body .charts-hse {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hse-body .chart-wrap {
  min-width: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hse-body .connecta-report-table-wrap {
  max-height: none !important;
  overflow: visible !important;
}

/* VeloXX: cabeçalho e grade seguem o RDD. */
.velox-page .connecta-report-card,
.velox-page .card {
  background-image: none !important;
}

.velox-page .cards-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.velox-page .cards-grid > * {
  min-width: 0;
  width: auto !important;
  max-width: none !important;
}

.velox-page .velox-status,
.velox-page .chart-wrap,
.velox-page .card {
  border-color: var(--line) !important;
  box-shadow: none !important;
}

.velox-page .velox-gauge-value,
.velox-page .gauge-value,
.velox-page [data-gauge-value] {
  color: var(--text-color) !important;
}

/* ODIN novo: mantém filtros/ações existentes, com cabeçalho e tabela compactos. */
.connecta-odin-page {
  max-width: 1500px;
  margin-inline: auto;
}

.connecta-odin-header {
  max-width: 1120px;
  margin-inline: auto;
}

.connecta-odin-page .connecta-module-brand img {
  height: 38px;
}

.connecta-table-shell {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.connecta-data-table,
.connecta-odin-table {
  width: 100%;
  min-width: 1000px;
  color: var(--text-color);
  background: transparent;
  border-collapse: collapse;
  table-layout: fixed;
}

.connecta-data-table th,
.connecta-data-table td {
  padding: 9px 10px;
  color: var(--text-color) !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  font-size: 0.7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.connecta-data-table th {
  color: var(--muted) !important;
  background: color-mix(in srgb, var(--panel-2) 72%, transparent) !important;
  font-weight: 650;
}

.connecta-data-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

.connecta-cell-strong {
  font-weight: 650;
}

.connecta-cell-date {
  font-variant-numeric: tabular-nums;
}

.connecta-actions-cell {
  overflow: visible !important;
  text-align: right;
}

.connecta-table-empty {
  padding: 24px !important;
  color: var(--muted) !important;
  text-align: center;
}

.connecta-table-error {
  color: var(--danger) !important;
}

.connecta-status-stack {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 2px;
  margin-left: -3px;
}

.connecta-status-pill {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 3px 7px;
  color: var(--text-color);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 600;
  white-space: nowrap;
}

.connecta-status-pill.is-online,
.connecta-status-pill.is-linked,
.connecta-status-pill.is-enabled {
  border-color: color-mix(in srgb, var(--ok) 60%, var(--line));
}

.connecta-status-pill.is-offline,
.connecta-status-pill.is-unlinked,
.connecta-status-pill.is-disabled {
  color: var(--muted);
}

.odin-actions-compact {
  justify-content: flex-end;
  white-space: nowrap;
}

.odin-access-button {
  min-width: 82px;
}

.odin-more-actions[open] {
  z-index: 150;
}

.odin-more-menu {
  max-height: min(420px, 65vh);
  overflow-y: auto;
}

/* SNC: paginação sempre visível após selecionar a quantidade. */
.snc-pagination-controls-v067,
.snc-pagination-controls-v076 {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.snc-overview-per-page-label-v076 {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.68rem;
}

#snc-overview-per-page {
  min-width: 68px;
  color: var(--text-color);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
}

/* Responsividade dos novos blocos. */
@media (max-width: 1180px) {
  .report-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .report-summary-grid-secondary,
  .hse-body .blocks-hse {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hse-body .controls-hse {
    grid-template-columns: repeat(3, minmax(145px, 1fr));
  }

  .hse-body .grid-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .connecta-report-header,
  .connecta-module-header,
  .connecta-report-header > .col-12,
  .connecta-report-header .justify-content-between {
    align-items: stretch;
    flex-direction: column;
  }

  .connecta-module-header-actions,
  .connecta-module-header-actions .btn {
    width: 100%;
  }

  .report-summary-grid,
  .report-summary-grid-secondary,
  .hse-body .blocks-hse,
  .hse-body .controls-hse,
  .hse-body .grid-4,
  .hse-body .charts-hse,
  .velox-page .cards-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Impressão profissional: sempre tema claro, sem gradientes ou rolagens. */
@media print {
  @page {
    size: A4 portrait;
    margin: 9mm;
  }

  html,
  body,
  body.light-mode,
  body.dark-mode,
  .dashboard-body,
  .hse-body,
  .velox-page {
    width: 100% !important;
    margin: 0 !important;
    zoom: 1 !important;
    color: #111827 !important;
    background: #fff !important;
    background-image: none !important;
    overflow: visible !important;
  }

  .connecta-report-header {
    display: flex !important;
    padding: 0 0 7mm !important;
  }

  .connecta-report-header .logo-dark,
  .connecta-module-header .logo-dark {
    display: none !important;
  }

  .connecta-report-header .logo-light,
  .connecta-module-header .logo-light {
    display: block !important;
  }

  .connecta-report-card,
  .report-instance,
  .card-hse,
  .metric,
  .chart-wrap,
  .report-summary-item,
  .connecta-report-table-wrap,
  .table-responsive,
  .table-scroll {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    color: #111827 !important;
    background: #fff !important;
    background-image: none !important;
    border-color: #cbd5e1 !important;
    box-shadow: none !important;
  }

  .connecta-report-card,
  .report-instance,
  .card-hse,
  .chart-wrap {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .hse-report-page {
    break-before: page;
    page-break-before: always;
  }

  .hse-report-page:first-child {
    break-before: auto;
    page-break-before: auto;
  }

  .connecta-report-table,
  .connecta-report-table thead,
  .connecta-report-table tbody,
  .connecta-report-table tr,
  .connecta-report-table th,
  .connecta-report-table td {
    color: #111827 !important;
    background: #fff !important;
    background-image: none !important;
  }

  .connecta-report-table thead {
    display: table-header-group !important;
  }

  .connecta-report-table th {
    background: #f3f4f6 !important;
  }

  .connecta-report-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report-summary-grid,
  .report-summary-grid-secondary,
  .hse-body .grid-4 {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  .report-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .dashboard-body .chart-container,
  .dashboard-body .gauge-container-3d,
  .hse-body .line-chart-container,
  .hse-body .gauge-container-3d {
    height: 155px !important;
    min-height: 155px !important;
  }

  .no-print,
  .actions,
  #filtros-container,
  .panel-hse,
  #loading-message,
  .connecta-module-header-actions,
  .odin-more-menu {
    display: none !important;
  }
}

.connecta-empty-message,
.connecta-error-message,
.connecta-inline-message-danger {
  padding: 10px 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.72rem;
}

.connecta-error-message,
.connecta-inline-message-danger {
  color: var(--danger) !important;
  border-color: color-mix(in srgb, var(--danger) 52%, var(--line)) !important;
}

.connecta-subsection-title {
  color: var(--text-color);
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 650;
  text-align: center;
}

@media (min-width: 1181px) {
  .hse-body .controls-hse {
    grid-template-columns: repeat(6, minmax(130px, 1fr)) minmax(125px, 0.8fr);
  }
}

.velox-page .cards-grid {
  margin: 0 !important;
}

/* Relatórios incorporados no painel usam o fundo e o tema da janela pai. */
html.connecta-report-document,
html.connecta-report-document body.connecta-report-frame {
  background: transparent !important;
  background-color: transparent !important;
}

/* ======================================================
   CoNNecta Cloud v1.11.4 - relatórios e tabela ODIN
   ====================================================== */

/* O iframe standalone recebe fundo próprio. No painel, continua incorporado
   na seção de conteúdo e acompanha o tema enviado pela janela principal. */
html.connecta-report-standalone-document,
html.connecta-report-standalone-document body.connecta-report-standalone-frame {
  min-height: 100%;
}

html.connecta-report-standalone-document:has(body.light-mode),
body.connecta-report-standalone-frame.light-mode {
  color-scheme: light;
  background: #f8fafc !important;
  background-color: #f8fafc !important;
  color: #111827 !important;
}

html.connecta-report-standalone-document:has(body.dark-mode),
body.connecta-report-standalone-frame.dark-mode {
  color-scheme: dark;
  background: linear-gradient(180deg, var(--panel-2), var(--bg) 70%) !important;
  background-color: var(--bg) !important;
  color: var(--text-color) !important;
}

body.connecta-report-standalone-window.light-mode,
body.connecta-report-standalone-window.light-mode #connecta-content-wrapper,
body.connecta-report-standalone-window.light-mode #connecta-content {
  background: #f8fafc !important;
  background-color: #f8fafc !important;
}

body.connecta-report-standalone-window.dark-mode,
body.connecta-report-standalone-window.dark-mode #connecta-content-wrapper,
body.connecta-report-standalone-window.dark-mode #connecta-content {
  background: linear-gradient(180deg, var(--panel-2), var(--bg) 70%) !important;
  background-color: var(--bg) !important;
}

/* Tabela do acesso remoto ODIN: cabe na largura da seção, sem barra horizontal. */
.connecta-odin-page {
  width: 100% !important;
  max-width: none !important;
}

.connecta-odin-table-panel,
.connecta-odin-table-shell {
  position: relative;
  overflow: visible !important;
}

.connecta-odin-table-shell {
  width: 100%;
  max-width: 100%;
}

.connecta-odin-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

.connecta-odin-table th,
.connecta-odin-table td {
  padding-right: 7px !important;
  padding-left: 7px !important;
}

.connecta-odin-table th:nth-child(1),
.connecta-odin-table td:nth-child(1) {
  width: 13%;
}
.connecta-odin-table th:nth-child(2),
.connecta-odin-table td:nth-child(2) {
  width: 12%;
}
.connecta-odin-table th:nth-child(3),
.connecta-odin-table td:nth-child(3) {
  width: 10%;
}
.connecta-odin-table th:nth-child(4),
.connecta-odin-table td:nth-child(4) {
  width: 14%;
}
.connecta-odin-table th:nth-child(5),
.connecta-odin-table td:nth-child(5) {
  width: 8%;
  padding-right: 5px !important;
}
.connecta-odin-table th:nth-child(6),
.connecta-odin-table td:nth-child(6) {
  width: 14%;
  padding-left: 5px !important;
}
.connecta-odin-table th:nth-child(7),
.connecta-odin-table td:nth-child(7) {
  width: 15%;
}
.connecta-odin-table th:nth-child(8),
.connecta-odin-table td:nth-child(8) {
  width: 14%;
}

.connecta-odin-table .connecta-actions-cell,
.connecta-odin-table .odin-actions-compact,
.connecta-odin-table .odin-more-actions {
  overflow: visible !important;
}

.connecta-odin-table .connecta-actions-cell {
  position: relative;
  z-index: 5;
}

.connecta-odin-table .odin-more-actions[open] {
  z-index: 1000;
}

.connecta-odin-table .odin-more-menu {
  z-index: 5000 !important;
  max-height: min(420px, 65vh);
  overflow-y: auto;
}

/* Nas últimas linhas, o menu abre para cima e não aumenta a altura da tabela. */
.connecta-odin-table tbody tr:nth-last-child(-n + 2) .odin-more-menu {
  top: auto;
  bottom: calc(100% + 6px);
}

@media (max-width: 1100px) {
  .connecta-odin-table th,
  .connecta-odin-table td {
    padding-right: 4px !important;
    padding-left: 4px !important;
    font-size: 0.64rem !important;
  }

  .connecta-odin-table .connecta-status-pill {
    padding: 2px 5px;
    font-size: 0.56rem;
  }

  .connecta-odin-table .odin-access-button {
    min-width: 70px;
    padding-right: 6px !important;
    padding-left: 6px !important;
  }
}

/* ======================================================
   CoNNecta Cloud v1.11.5 - largura ODIN, camadas e temas
   ====================================================== */

/* Todos os cabeçalhos de módulos e relatórios usam a mesma estrutura visual,
   sem faixa, degradê, blur ou fundo próprio. */
.painel-body header.connecta-module-header,
.painel-body .connecta-module-header,
.painel-body .connecta-odin-header,
body.dashboard-body .connecta-report-header,
body.hse-body .connecta-report-header,
body.velox-page .connecta-report-header {
  position: relative !important;
  top: auto !important;
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
  padding: 12px 0 14px !important;
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

/* Incorporado no painel: o documento e somente os contêineres externos são
   transparentes. Os cartões e blocos continuam usando o tema do relatório. */
html.connecta-report-document:not(.connecta-report-standalone-document),
html.connecta-report-document:not(.connecta-report-standalone-document)
  body.connecta-report-frame,
html.connecta-report-document:not(.connecta-report-standalone-document)
  body.connecta-report-frame
  > .container-fluid,
html.connecta-report-document:not(.connecta-report-standalone-document)
  body.connecta-report-frame
  > .container-hse,
html.connecta-report-document:not(.connecta-report-standalone-document)
  body.connecta-report-frame
  > .velox-page {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

/* Janela standalone: o fundo pertence ao documento do relatório e replica o
   fundo do painel para o tema selecionado. */
html.connecta-report-standalone-document,
html.connecta-report-standalone-document body.connecta-report-standalone-frame {
  min-width: 100%;
  min-height: 100%;
}

html.connecta-report-standalone-document:has(
    body.connecta-report-standalone-frame.light-mode
  ),
body.connecta-report-standalone-frame.light-mode {
  color-scheme: light;
  background: #f3f4f6 !important;
  background-color: #f3f4f6 !important;
  background-image: none !important;
  color: #212529 !important;
}

html.connecta-report-standalone-document:has(
    body.connecta-report-standalone-frame.dark-mode
  ),
body.connecta-report-standalone-frame.dark-mode {
  color-scheme: dark;
  background: linear-gradient(180deg, #1e293b, #0f172a 70%) !important;
  background-color: #0f172a !important;
  color: #ffffff !important;
}

body.connecta-report-standalone-frame > .container-fluid,
body.connecta-report-standalone-frame > .container-hse,
body.connecta-report-standalone-frame > .velox-page {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

/* O invólucro do painel não pinta o relatório incorporado. Na janela
   standalone ele recebe exatamente o mesmo fundo do painel. */
body:not(.connecta-report-standalone-window) #connecta-content-wrapper,
body:not(.connecta-report-standalone-window) #connecta-content,
body:not(.connecta-report-standalone-window) .connecta-report-iframe {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

body.connecta-report-standalone-window.light-mode,
body.connecta-report-standalone-window.light-mode #connecta-content-wrapper,
body.connecta-report-standalone-window.light-mode #connecta-content,
body.connecta-report-standalone-window.light-mode .connecta-report-iframe {
  background: #f3f4f6 !important;
  background-color: #f3f4f6 !important;
  background-image: none !important;
}

body.connecta-report-standalone-window.dark-mode,
body.connecta-report-standalone-window.dark-mode #connecta-content-wrapper,
body.connecta-report-standalone-window.dark-mode #connecta-content,
body.connecta-report-standalone-window.dark-mode .connecta-report-iframe {
  background: linear-gradient(180deg, #1e293b, #0f172a 70%) !important;
  background-color: #0f172a !important;
}

/* A área do ODIN volta a ter largura mínima real de 1150 px. A tabela e a
   div crescem juntas; não existe barra horizontal dentro do quadro. */
#view-connecta-odin,
.connecta-odin-table-panel {
  min-width: 1150px !important;
}
/* #view-connecta-odin,
.connecta-odin-page,
.connecta-odin-table-panel,
.connecta-odin-table-shell,
.connecta-odin-table {
  min-width: 1150px !important;
} */

.connecta-odin-page {
  width: 100% !important;
  max-width: 1500px !important;
  margin-inline: auto !important;
}

.connecta-odin-table-panel,
.connecta-odin-table-shell {
  width: 100% !important;
  overflow: visible !important;
}

.connecta-odin-table {
  width: 100% !important;
  table-layout: fixed !important;
}

/* O menu + fica acima das linhas e dos botões seguintes. O z-index deixa de
   ser aplicado a todas as células de ação e passa somente para a linha aberta. */
.connecta-odin-table tbody tr {
  position: relative;
  z-index: 1;
}

.connecta-odin-table .connecta-actions-cell {
  position: relative;
  z-index: auto !important;
  overflow: visible !important;
}

.connecta-odin-table tbody tr:has(.odin-more-actions[open]) {
  z-index: 10000 !important;
}

.connecta-odin-table
  tbody
  tr:has(.odin-more-actions[open])
  .connecta-actions-cell,
.connecta-odin-table .odin-more-actions[open] {
  z-index: 10001 !important;
}

.connecta-odin-table .odin-more-menu {
  z-index: 10002 !important;
  isolation: isolate;
  background: var(--panel) !important;
  opacity: 1 !important;
}

/* Mantém a aproximação pedida entre Status e Vinculado sem reduzir a tabela. */
.connecta-odin-table th:nth-child(5),
.connecta-odin-table td:nth-child(5) {
  padding-right: 3px !important;
}

.connecta-odin-table th:nth-child(6),
.connecta-odin-table td:nth-child(6) {
  padding-left: 3px !important;
}

/* ==============================================================
   CoNNecta Cloud v1.11.6
   Relatórios incorporados transparentes, impressão fiel e
   cabeçalhos padronizados em todas as seções do painel.
   ============================================================== */

/* O relatório incorporado não possui superfície própria. O tema e o fundo
   visíveis pertencem exclusivamente à seção do painel que contém o iframe. */
html.connecta-report-embedded-document,
html.connecta-report-embedded-document body.connecta-report-embedded-frame,
body.connecta-report-embedded-frame,
body.connecta-report-embedded-frame > .container-fluid,
body.connecta-report-embedded-frame > .container-hse,
body.connecta-report-embedded-frame > .velox-page,
body.connecta-report-embedded-frame .container-fluid,
body.connecta-report-embedded-frame .container-hse {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

html.connecta-report-embedded-document,
body.connecta-report-embedded-frame {
  min-height: 100%;
  color-scheme: light dark;
}

/* O iframe em uma seção normal nunca pinta um retângulo branco. */
body:not(.connecta-report-standalone-window) .connecta-report-iframe,
body:not(.connecta-report-standalone-window) #connecta-content,
body:not(.connecta-report-standalone-window) #connecta-content-wrapper {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

/* Cabeçalhos de todas as seções: mesma escala e alinhamento dos relatórios e
   do cabeçalho novo do ODIN. */
.painel-body .content > .logo-tools,
.painel-body .content > .panel > .logo-tools,
.painel-body .snc-header .logo-tools,
.painel-body .connecta-section-header,
.painel-body .pulse-header,
.painel-body .snc-header {
  position: relative !important;
  display: flex !important;
  width: 100% !important;
  min-height: 68px;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  margin: 0 0 18px !important;
  padding: 12px 0 14px !important;
  color: var(--text-color) !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.painel-body .content > .logo-tools > div:first-child,
.painel-body .content > .panel > .logo-tools > div:first-child,
.painel-body .snc-header .logo-tools > div:first-child {
  flex: 0 0 auto;
}

.painel-body .logo-tools img,
.painel-body .connecta-section-header img,
.painel-body .snc-header .logo-tools img {
  width: auto !important;
  height: 42px !important;
  max-width: 150px !important;
  object-fit: contain !important;
}

.painel-body .logo-tools .title,
.painel-body .logo-tools h1,
.painel-body .logo-tools h2,
.painel-body .pulse-page-title,
.painel-body .snc-header h1,
.painel-body .connecta-section-header h1,
.painel-body .connecta-section-header h2 {
  margin: 0 !important;
  color: var(--text-color) !important;
  font-size: 1.03rem !important;
  font-weight: 650 !important;
  line-height: 1.25 !important;
  letter-spacing: 0.01em !important;
  text-align: left !important;
}

.painel-body .logo-tools p,
.painel-body .logo-tools .small,
.painel-body .pulse-header p,
.painel-body .snc-header p,
.painel-body .connecta-section-header p {
  margin: 3px 0 0 !important;
  color: var(--muted) !important;
  font-size: 0.72rem !important;
  line-height: 1.4 !important;
  text-align: left !important;
}

.painel-body .snc-kicker {
  margin-bottom: 3px !important;
  color: var(--muted) !important;
  font-size: 0.62rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase;
}

.painel-body .snc-header-actions,
.painel-body .pulse-toolbar,
.painel-body .connecta-section-header-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
}

@media (max-width: 760px) {
  .painel-body .content > .logo-tools,
  .painel-body .content > .panel > .logo-tools,
  .painel-body .pulse-header,
  .painel-body .snc-header,
  .painel-body .connecta-section-header {
    align-items: stretch !important;
    flex-direction: column !important;
  }
}

/* Impressão: replica o layout visual do template, mas sempre em tema claro. */
@media print {
  @page {
    size: A4 portrait;
    margin: 9mm;
  }

  html.connecta-report-document,
  html.connecta-report-document.connecta-report-embedded-document,
  html.connecta-report-document.connecta-report-standalone-document,
  html.connecta-report-document body.connecta-report-frame,
  html.connecta-report-document.connecta-report-embedded-document
    body.connecta-report-frame.connecta-report-embedded-frame,
  html.connecta-report-document.connecta-report-standalone-document
    body.connecta-report-frame.connecta-report-standalone-frame,
  body.connecta-report-frame.light-mode,
  body.connecta-report-frame.dark-mode,
  body.connecta-report-frame.connecta-print-mode {
    --bg: #ffffff !important;
    --panel: #ffffff !important;
    --panel-2: #f8fafc !important;
    --card-bg: #ffffff !important;
    --chip: #f8fafc !important;
    --text-color: #111827 !important;
    --text-dark: #111827 !important;
    --muted: #475569 !important;
    --line: #94a3b8 !important;
    --white: #111827 !important;
    --gauge-value: #111827 !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    zoom: 1 !important;
    color: #111827 !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    overflow: visible !important;
    color-scheme: light !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.connecta-report-frame *,
  body.connecta-report-frame *::before,
  body.connecta-report-frame *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.connecta-report-frame > .container-fluid,
  body.connecta-report-frame > .container-hse,
  body.connecta-report-frame > .velox-page,
  body.connecta-report-frame .container-fluid,
  body.connecta-report-frame .container-hse,
  html.connecta-report-document.connecta-report-embedded-document
    body.connecta-report-embedded-frame
    > .container-fluid,
  html.connecta-report-document.connecta-report-embedded-document
    body.connecta-report-embedded-frame
    > .container-hse,
  html.connecta-report-document.connecta-report-standalone-document
    body.connecta-report-standalone-frame
    > .container-fluid,
  html.connecta-report-document.connecta-report-standalone-document
    body.connecta-report-standalone-frame
    > .container-hse {
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #111827 !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    overflow: visible !important;
  }

  body.connecta-report-frame .connecta-report-header {
    display: flex !important;
    margin: 0 0 6mm !important;
    padding: 0 0 4mm !important;
    color: #111827 !important;
    background: #ffffff !important;
    border: 0 !important;
    border-bottom: 1px solid #94a3b8 !important;
    break-after: avoid !important;
    page-break-after: avoid !important;
  }

  body.connecta-report-frame .connecta-report-header .title,
  body.connecta-report-frame .connecta-report-header h1,
  body.connecta-report-frame .connecta-report-header h2,
  body.connecta-report-frame .connecta-report-card-title,
  body.connecta-report-frame .hse-report-title,
  body.connecta-report-frame .hse-chart-title,
  body.connecta-report-frame h1,
  body.connecta-report-frame h2,
  body.connecta-report-frame h3,
  body.connecta-report-frame h4,
  body.connecta-report-frame h5,
  body.connecta-report-frame h6 {
    color: #111827 !important;
  }

  body.connecta-report-frame .connecta-report-header .small,
  body.connecta-report-frame .small,
  body.connecta-report-frame .text-muted,
  body.connecta-report-frame .report-summary-item span,
  body.connecta-report-frame .metric .label,
  body.connecta-report-frame .velox-gauge-subtitle {
    color: #475569 !important;
  }

  body.connecta-report-frame .connecta-report-card,
  body.connecta-report-frame .report-instance,
  body.connecta-report-frame .card-hse,
  body.connecta-report-frame .metric,
  body.connecta-report-frame .chart-wrap,
  body.connecta-report-frame .velox-status,
  body.connecta-report-frame .velox-kpi,
  body.connecta-report-frame .report-summary-item,
  body.connecta-report-frame .connecta-report-table-wrap,
  body.connecta-report-frame .table-responsive,
  body.connecta-report-frame .table-scroll {
    color: #111827 !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    border-color: #94a3b8 !important;
    box-shadow: none !important;
  }

  body.connecta-report-frame .connecta-report-card,
  body.connecta-report-frame .report-instance,
  body.connecta-report-frame .card-hse,
  body.connecta-report-frame .velox-status,
  body.connecta-report-frame .velox-kpi {
    border: 1px solid #94a3b8 !important;
    border-radius: 8px !important;
  }

  body.connecta-report-frame .report-summary-grid,
  body.connecta-report-frame .report-summary-grid-secondary {
    border-color: #94a3b8 !important;
  }

  body.connecta-report-frame .report-summary-item {
    border-color: #94a3b8 !important;
  }

  body.connecta-report-frame .report-summary-item strong,
  body.connecta-report-frame .metric .value,
  body.connecta-report-frame td,
  body.connecta-report-frame th,
  body.connecta-report-frame label,
  body.connecta-report-frame p,
  body.connecta-report-frame span:not(.badge):not(.status-pill) {
    color: #111827 !important;
  }

  body.connecta-report-frame .connecta-report-table-wrap,
  body.connecta-report-frame .table-responsive,
  body.connecta-report-frame .table-scroll {
    max-height: none !important;
    overflow: visible !important;
    border: 1px solid #94a3b8 !important;
  }

  body.connecta-report-frame .connecta-report-table,
  body.connecta-report-frame .connecta-report-table thead,
  body.connecta-report-frame .connecta-report-table tbody,
  body.connecta-report-frame .connecta-report-table tr,
  body.connecta-report-frame .connecta-report-table th,
  body.connecta-report-frame .connecta-report-table td {
    color: #111827 !important;
    background: #ffffff !important;
    background-image: none !important;
    border-color: #94a3b8 !important;
  }

  body.connecta-report-frame .connecta-report-table thead {
    display: table-header-group !important;
  }

  body.connecta-report-frame .connecta-report-table th {
    color: #0f172a !important;
    background: #e2e8f0 !important;
    font-weight: 700 !important;
  }

  body.connecta-report-frame
    .connecta-report-table
    tbody
    tr:nth-child(even)
    td {
    background: #f8fafc !important;
  }

  body.connecta-report-frame .connecta-report-table tr {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  /* Cards pequenos permanecem inteiros; cards com tabelas longas podem
     continuar na página seguinte sem cortar dados. */
  body.connecta-report-frame
    .connecta-report-card:not(:has(.connecta-report-table)),
  body.connecta-report-frame .card-hse:not(:has(.connecta-report-table)),
  body.connecta-report-frame .chart-wrap,
  body.connecta-report-frame .velox-status,
  body.connecta-report-frame .velox-kpi {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.connecta-report-frame .connecta-report-card:has(.connecta-report-table),
  body.connecta-report-frame .card-hse:has(.connecta-report-table),
  body.connecta-report-frame .report-instance {
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  /* Primeiro relatório HSE não cria uma página vazia. Relatórios seguintes
     começam em página nova. */
  body.hse-body .hse-report-page {
    break-before: auto !important;
    page-break-before: auto !important;
  }

  body.hse-body .hse-report-page + .hse-report-page {
    break-before: page !important;
    page-break-before: always !important;
  }

  /* Mantém a grade mostrada na tela, independentemente da largura lógica do
     mecanismo de impressão do navegador. */
  body.velox-page .cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4mm !important;
  }

  body.velox-page .velox-row-800 {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 5mm !important;
  }

  body.velox-page .velox-col-left-800 {
    width: 70% !important;
  }
  body.velox-page .velox-col-right-800 {
    width: 30% !important;
  }

  body.velox-page .velox-gauges {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4mm !important;
    height: auto !important;
  }

  body.connecta-report-frame canvas,
  body.connecta-report-frame svg {
    max-width: 100% !important;
    print-color-adjust: exact !important;
  }

  body.dashboard-body.connecta-report-frame .chart-container,
  body.connecta-report-frame .gauge-container-3d,
  body.connecta-report-frame .line-chart-container,
  body.connecta-report-frame .velox-chart-box {
    overflow: visible !important;
  }

  body.connecta-report-frame .no-print,
  body.connecta-report-frame .actions,
  body.connecta-report-frame #filtros-container,
  body.connecta-report-frame .panel-hse,
  body.connecta-report-frame #loading-message,
  body.connecta-report-frame .connecta-module-header-actions,
  body.connecta-report-frame .odin-more-menu {
    display: none !important;
  }
}

/* Correção final de especificidade: o tema da tela nunca vaza para o papel. */
@media print {
  html.connecta-report-document.connecta-report-standalone-document:has(
      body.connecta-report-standalone-frame
    ),
  html.connecta-report-document.connecta-report-embedded-document:has(
      body.connecta-report-embedded-frame
    ),
  html.connecta-report-document.connecta-report-standalone-document:has(
      body.connecta-report-standalone-frame.dark-mode
    ),
  html.connecta-report-document.connecta-report-embedded-document:has(
      body.connecta-report-embedded-frame.dark-mode
    ),
  html.connecta-report-document.connecta-report-standalone-document:has(
      body.connecta-report-standalone-frame
    )
    body.connecta-report-frame.connecta-report-standalone-frame,
  html.connecta-report-document.connecta-report-embedded-document:has(
      body.connecta-report-embedded-frame
    )
    body.connecta-report-frame.connecta-report-embedded-frame,
  html.connecta-report-document.connecta-report-standalone-document:has(
      body.connecta-report-standalone-frame.dark-mode
    )
    body.connecta-report-frame.connecta-report-standalone-frame.dark-mode,
  html.connecta-report-document.connecta-report-embedded-document:has(
      body.connecta-report-embedded-frame.dark-mode
    )
    body.connecta-report-frame.connecta-report-embedded-frame.dark-mode {
    color: #111827 !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    color-scheme: light !important;
  }
}

/* Cobertura de cabeçalhos que ficam dentro de invólucros intermediários. */
.painel-body section.content .logo-tools {
  display: flex !important;
  width: 100% !important;
  min-height: 68px;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 16px !important;
  margin: 0 0 18px !important;
  padding: 12px 0 14px !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.painel-body section.content .logo-tools > div:last-child {
  min-width: 0;
  text-align: left !important;
}

@media print {
  body.connecta-report-frame .text-primary,
  body.connecta-report-frame a:not(.btn) {
    color: #0284c7 !important;
  }

  body.connecta-report-frame .badge.bg-success,
  body.connecta-report-frame .status-pill.online,
  body.connecta-report-frame .connecta-status-pill.online {
    color: #065f46 !important;
    background: #d1fae5 !important;
    border-color: #10b981 !important;
  }

  body.connecta-report-frame .badge.bg-info,
  body.connecta-report-frame .status-pill.info {
    color: #075985 !important;
    background: #e0f2fe !important;
    border-color: #38bdf8 !important;
  }

  body.connecta-report-frame .badge.bg-warning,
  body.connecta-report-frame .status-pill.warn {
    color: #92400e !important;
    background: #fef3c7 !important;
    border-color: #f59e0b !important;
  }

  body.connecta-report-frame .badge.bg-danger,
  body.connecta-report-frame .status-pill.critical {
    color: #991b1b !important;
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
  }
}

/* ==============================================================
   CoNNecta Cloud v1.11.7 - legibilidade, gráficos, downloads e headers
   ============================================================== */

/* Tema dos relatórios: nenhuma variável clara/escura pode deixar texto sem
   contraste na tela. O modo incorporado continua transparente. */
body.connecta-report-frame.light-mode {
  --text-color: #111827 !important;
  --text-dark: #111827 !important;
  --muted: #475569 !important;
  --white: #111827 !important;
  --gauge-value: #111827 !important;
}

body.connecta-report-frame.dark-mode {
  --text-color: #f8fafc !important;
  --text-dark: #f8fafc !important;
  --muted: #cbd5e1 !important;
  --white: #f8fafc !important;
  --gauge-value: #f8fafc !important;
}

body.connecta-report-frame .connecta-report-header .title,
body.connecta-report-frame .connecta-report-header h1,
body.connecta-report-frame .connecta-report-header h2,
body.connecta-report-frame .connecta-report-card-title,
body.connecta-report-frame .card-title,
body.connecta-report-frame .hse-report-title,
body.connecta-report-frame .hse-report-brand,
body.connecta-report-frame .hse-chart-title,
body.connecta-report-frame .metric .value,
body.connecta-report-frame .report-summary-item strong,
body.connecta-report-frame .disk-chart-caption,
body.connecta-report-frame .velox-gauge-title,
body.connecta-report-frame .velox-custom-legend-title,
body.connecta-report-frame .velox-point-hint,
body.connecta-report-frame .connecta-report-table td,
body.connecta-report-frame .connecta-report-table th {
  color: var(--text-color) !important;
}

body.connecta-report-frame .connecta-report-header .small,
body.connecta-report-frame .hse-report-description,
body.connecta-report-frame .metric .label,
body.connecta-report-frame .report-summary-item span,
body.connecta-report-frame .velox-gauge-subtitle,
body.connecta-report-frame .velox-custom-legend-sub,
body.connecta-report-frame .text-muted,
body.connecta-report-frame label,
body.connecta-report-frame small {
  color: var(--muted) !important;
}

/* Proporções consistentes para gráficos RDD/HSE. */
.connecta-chart-pair,
.hse-body .charts-hse {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 18px !important;
  align-items: stretch !important;
}

.connecta-chart-panel,
.hse-body .chart-wrap {
  min-width: 0 !important;
  padding: 12px !important;
  border: 1px solid var(--line) !important;
  border-radius: 9px !important;
  background: transparent !important;
}

.dashboard-body .connecta-chart-panel .chart-container,
.hse-body .line-chart-container {
  width: 100% !important;
  height: 230px !important;
  min-height: 230px !important;
}

.connecta-gauge-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;
  align-items: start !important;
}

.connecta-gauge-panel {
  min-width: 0 !important;
  text-align: center !important;
}

.connecta-gauge-grid .gauge-container-3d {
  width: 100% !important;
  max-width: 320px !important;
  height: 190px !important;
  min-height: 190px !important;
  margin: 0 auto !important;
}

.connecta-gauge-server {
  grid-column: 1 / -1;
  margin-top: 4px;
  text-align: center;
}

.velox-page .velox-row-800 {
  align-items: stretch !important;
  gap: 18px !important;
}

.velox-page .velox-col-left-800 {
  width: 72% !important;
}
.velox-page .velox-col-right-800 {
  width: 28% !important;
}
.velox-page .velox-gauges {
  min-height: 190px !important;
  gap: 18px !important;
}
.velox-page .gauge-container-3d {
  height: 180px !important;
  min-height: 180px !important;
  max-width: 310px !important;
}
.velox-page .velox-chart-box {
  height: 240px !important;
  min-height: 240px !important;
}

@media (max-width: 900px) {
  .connecta-chart-pair,
  .hse-body .charts-hse {
    grid-template-columns: 1fr !important;
  }
  .connecta-gauge-grid {
    grid-template-columns: 1fr !important;
  }
  .velox-page .velox-col-left-800,
  .velox-page .velox-col-right-800 {
    width: 100% !important;
  }
}

/* Downloads: exatamente três cartões por linha no desktop. */
.download-app-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
}
.download-app-card {
  min-height: 285px !important;
}
.download-app-card-package {
  border-color: color-mix(in srgb, var(--brand-2) 70%, var(--line)) !important;
}
@media (max-width: 1120px) {
  .download-app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 720px) {
  .download-app-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Cabeçalho padrão: logo, espaço curto, título/descrição e ações na direita. */
.painel-body section.content .logo-tools,
.painel-body .content > .logo-tools,
.painel-body .content > .panel > .logo-tools {
  justify-content: flex-start !important;
  gap: 16px !important;
}
.painel-body section.content .logo-tools > div:first-child,
.painel-body .content > .logo-tools > div:first-child,
.painel-body .content > .panel > .logo-tools > div:first-child {
  margin-right: 0 !important;
  flex: 0 0 auto !important;
}
.painel-body section.content .logo-tools > div:nth-child(2),
.painel-body .content > .logo-tools > div:nth-child(2),
.painel-body .content > .panel > .logo-tools > div:nth-child(2) {
  flex: 0 1 auto !important;
  margin: 0 !important;
  text-align: left !important;
}
.painel-body section.content .logo-tools .text-center,
.painel-body section.content .logo-tools .title,
.painel-body section.content .logo-tools p {
  text-align: left !important;
}
.painel-body .connecta-module-header {
  justify-content: space-between !important;
}
.painel-body .connecta-module-brand {
  justify-content: flex-start !important;
}
.painel-body .connecta-module-brand > div {
  min-width: 0;
  text-align: left !important;
}
.painel-body .connecta-module-header-actions {
  margin-left: auto !important;
}

/* Regras finais de impressão: o papel sempre é claro e todos os textos do
   relatório têm contraste, inclusive elementos com estilos inline. */
@media print {
  body.connecta-report-frame,
  body.connecta-report-frame.light-mode,
  body.connecta-report-frame.dark-mode,
  body.connecta-report-frame.connecta-print-mode {
    --text-color: #111827 !important;
    --text-dark: #111827 !important;
    --muted: #334155 !important;
    --white: #111827 !important;
    --gauge-value: #111827 !important;
  }

  body.connecta-report-frame .connecta-report-header,
  body.connecta-report-frame .connecta-report-card,
  body.connecta-report-frame .card-hse,
  body.connecta-report-frame .report-instance,
  body.connecta-report-frame .chart-wrap,
  body.connecta-report-frame .connecta-chart-panel,
  body.connecta-report-frame .metric,
  body.connecta-report-frame .report-summary-item,
  body.connecta-report-frame .velox-status,
  body.connecta-report-frame .velox-kpi {
    color: #111827 !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
  }

  body.connecta-report-frame .connecta-report-header *,
  body.connecta-report-frame .connecta-report-card-title,
  body.connecta-report-frame .card-title,
  body.connecta-report-frame .hse-report-title,
  body.connecta-report-frame .hse-report-brand,
  body.connecta-report-frame .hse-report-description,
  body.connecta-report-frame .hse-chart-title,
  body.connecta-report-frame .metric .label,
  body.connecta-report-frame .metric .value,
  body.connecta-report-frame .report-summary-item span,
  body.connecta-report-frame .report-summary-item strong,
  body.connecta-report-frame .disk-chart-caption,
  body.connecta-report-frame .velox-gauge-title,
  body.connecta-report-frame .velox-gauge-subtitle,
  body.connecta-report-frame .velox-custom-legend-title,
  body.connecta-report-frame .velox-custom-legend-sub,
  body.connecta-report-frame .velox-point-hint,
  body.connecta-report-frame label,
  body.connecta-report-frame p,
  body.connecta-report-frame small,
  body.connecta-report-frame .small,
  body.connecta-report-frame .text-muted,
  body.connecta-report-frame td,
  body.connecta-report-frame th {
    color: #111827 !important;
    opacity: 1 !important;
    text-shadow: none !important;
  }

  body.connecta-report-frame .connecta-chart-pair,
  body.hse-body.connecta-report-frame .charts-hse {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5mm !important;
  }

  body.connecta-report-frame .connecta-chart-panel .chart-container,
  body.hse-body.connecta-report-frame .line-chart-container {
    height: 58mm !important;
    min-height: 58mm !important;
  }

  body.connecta-report-frame .connecta-gauge-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4mm !important;
  }

  body.connecta-report-frame .connecta-gauge-grid .gauge-container-3d,
  body.velox-page.connecta-report-frame .gauge-container-3d {
    height: 46mm !important;
    min-height: 46mm !important;
    max-width: none !important;
  }

  body.velox-page.connecta-report-frame .velox-row-800 {
    gap: 5mm !important;
  }
  body.velox-page.connecta-report-frame .velox-col-left-800 {
    width: 72% !important;
  }
  body.velox-page.connecta-report-frame .velox-col-right-800 {
    width: 28% !important;
  }
  body.velox-page.connecta-report-frame .velox-chart-box {
    height: 62mm !important;
    min-height: 62mm !important;
  }

  body.connecta-report-frame canvas,
  body.connecta-report-frame svg {
    opacity: 1 !important;
    filter: none !important;
  }
}

/* ======================================================
   CoNNecta Cloud v1.11.8 - grupos hierárquicos
   ====================================================== */
.connecta-group-create-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(240px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin: 16px 0 10px;
}

.connecta-group-create-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted, #94a3b8);
}

.connecta-group-create-field .input,
.connecta-group-create-field .select {
  width: 100%;
  min-height: 40px;
}

.connecta-group-create-button {
  min-height: 40px;
  white-space: nowrap;
}

.connecta-group-hint,
.connecta-group-move-warning {
  border: 1px solid color-mix(in srgb, var(--brand-2, #00b8c8) 38%, transparent);
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 14px;
  color: var(--muted, #94a3b8);
  font-size: 0.78rem;
  background: color-mix(in srgb, var(--panel-2, #111c31) 84%, transparent);
}

.connecta-table-shell {
  width: 100%;
  overflow-x: auto;
}

.connecta-group-table {
  min-width: 860px;
}

.connecta-group-name-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 250px;
  padding-left: calc(var(--group-level, 0) * 24px);
  position: relative;
}

.connecta-group-name-cell > i {
  width: 20px;
  text-align: center;
  color: var(--brand-2, #00b8c8);
}

.connecta-group-name-cell strong,
.connecta-group-name-cell small {
  display: block;
}

.connecta-group-name-cell small {
  margin-top: 2px;
  color: var(--muted, #94a3b8);
  font-size: 0.7rem;
  max-width: 440px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.connecta-group-branch {
  position: absolute;
  left: calc(var(--group-level, 0) * 24px - 14px);
  width: 14px;
  height: 18px;
  border-left: 1px solid
    color-mix(in srgb, var(--line, #3d526d) 80%, transparent);
  border-bottom: 1px solid
    color-mix(in srgb, var(--line, #3d526d) 80%, transparent);
  border-radius: 0 0 0 5px;
}

.connecta-group-level-0 .connecta-group-branch {
  display: none;
}

.connecta-group-parent-label,
.connecta-group-count,
.connecta-group-path-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 1px solid var(--line, #38506b);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.72rem;
  color: var(--text-color, #e7eef8);
  background: color-mix(in srgb, var(--panel-2, #13213a) 88%, transparent);
}

.connecta-group-path-badge {
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.connecta-group-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: nowrap;
}

.connecta-group-modal .modal-body {
  padding: 18px;
}

.connecta-user-group-option {
  padding-left: calc(10px + var(--group-level, 0) * 17px) !important;
}

body.light-mode .connecta-group-hint,
body.light-mode .connecta-group-move-warning,
body.light-mode .connecta-group-parent-label,
body.light-mode .connecta-group-count,
body.light-mode .connecta-group-path-badge {
  background: #f8fafc;
  color: #334155;
  border-color: #cbd5e1;
}

@media (max-width: 900px) {
  .connecta-group-create-bar {
    grid-template-columns: 1fr;
  }
  .connecta-group-create-button {
    width: 100%;
  }
}

/* ======================================================
   CoNNecta Cloud v1.11.8 - auditoria ODIN organizada
   ====================================================== */
.odin-audit-page {
  --audit-surface: color-mix(in srgb, var(--panel, #17243a) 94%, transparent);
  --audit-surface-2: color-mix(
    in srgb,
    var(--panel-2, #111d31) 90%,
    transparent
  );
  --audit-text: var(--text-color, #edf4ff);
  --audit-muted: var(--muted, #a7b7ca);
  --audit-line: var(--line, #3b526d);
  --audit-accent: var(--brand-2, #00b8c8);
  color: var(--audit-text) !important;
}

.painel-body.light-mode .odin-audit-page {
  --audit-surface: #ffffff;
  --audit-surface-2: #f7f9fc;
  --audit-text: #1f2937;
  --audit-muted: #64748b;
  --audit-line: #cbd5e1;
  --audit-accent: #007f91;
}

.odin-audit-page .odin-audit-toolbar,
.odin-audit-page .odin-audit-report-card,
.odin-audit-page .odin-audit-sessions-card,
.odin-audit-page .odin-audit-detail-card,
.odin-audit-page .odin-audit-kpi {
  background: var(--audit-surface) !important;
  border: 1px solid var(--audit-line) !important;
  box-shadow: none !important;
  color: var(--audit-text) !important;
}

.odin-audit-page .odin-audit-toolbar {
  grid-template-columns:
    minmax(190px, 1.35fr) minmax(120px, 0.7fr) minmax(150px, 0.85fr)
    minmax(150px, 0.85fr) minmax(230px, 1.4fr) auto;
}

.odin-audit-page .odin-audit-field label,
.odin-audit-page .odin-audit-kpi span,
.odin-audit-page .odin-report-summary-grid span,
.odin-audit-page .odin-summary-grid span,
.odin-audit-page .odin-event-readable-meta span {
  color: var(--audit-muted) !important;
}

.odin-audit-page .odin-audit-kpi strong,
.odin-audit-page .odin-audit-card-title,
.odin-audit-page .odin-audit-session-head strong,
.odin-audit-page .odin-report-summary-grid strong,
.odin-audit-page .odin-summary-grid strong,
.odin-audit-page .odin-event-readable-meta strong {
  color: var(--audit-text) !important;
}

.odin-audit-page .odin-audit-kpi {
  border-radius: 13px;
  padding: 13px 15px;
}

.odin-audit-page .odin-audit-kpi strong {
  font-size: 1.65rem;
}

.odin-audit-page .odin-audit-layout {
  grid-template-columns: minmax(340px, 36%) minmax(0, 1fr);
  min-height: 670px;
}

.odin-audit-page .odin-audit-sessions-list,
.odin-audit-page .odin-audit-events-list {
  scrollbar-color: var(--audit-accent) transparent;
}

.odin-audit-page .odin-audit-session-item {
  background: var(--audit-surface-2) !important;
  color: var(--audit-text) !important;
  border-color: var(--audit-line) !important;
  padding: 13px;
}

.odin-audit-page .odin-audit-session-item:hover,
.odin-audit-page .odin-audit-session-item.active {
  border-color: var(--audit-accent) !important;
  background: color-mix(
    in srgb,
    var(--audit-accent) 10%,
    var(--audit-surface-2)
  ) !important;
}

.odin-audit-session-head > span,
.odin-audit-status-pill {
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
  background: transparent !important;
}

.odin-audit-session-head > span.ended,
.odin-audit-status-pill.ended {
  color: #16a34a !important;
}
.odin-audit-session-head > span.active,
.odin-audit-status-pill.active {
  color: #0284c7 !important;
}
.odin-audit-session-head > span.failed,
.odin-audit-status-pill.failed {
  color: #dc2626 !important;
}
.odin-audit-session-head > span.interrupted,
.odin-audit-status-pill.interrupted {
  color: #d97706 !important;
}
.odin-audit-session-head > span.unknown,
.odin-audit-status-pill.unknown {
  color: var(--audit-muted) !important;
}

.odin-audit-session-client {
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--audit-accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.odin-audit-session-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 10px;
  margin-top: 8px;
}

.odin-audit-session-facts span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--audit-muted);
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.odin-audit-session-facts i {
  width: 13px;
  color: var(--audit-accent);
  text-align: center;
}

.odin-audit-session-last {
  border-top: 1px dashed var(--audit-line);
  padding-top: 8px;
  color: var(--audit-muted) !important;
}

.odin-audit-empty,
.odin-audit-error {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed var(--audit-line);
  border-radius: 10px;
  color: var(--audit-muted);
  text-align: center;
  padding: 14px;
}

.odin-audit-error {
  color: #dc2626;
  border-color: color-mix(in srgb, #dc2626 55%, transparent);
}

.odin-audit-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.odin-audit-status-strip > span {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--audit-line);
  border-radius: 9px;
  padding: 7px 9px;
  font-size: 0.72rem;
  color: var(--audit-muted);
  background: var(--audit-surface-2);
}

.odin-audit-status-strip .ended strong {
  color: #16a34a;
}
.odin-audit-status-strip .active strong {
  color: #0284c7;
}
.odin-audit-status-strip .failed strong {
  color: #dc2626;
}
.odin-audit-status-strip .interrupted strong {
  color: #d97706;
}

.odin-audit-rankings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.odin-audit-rankings section {
  border: 1px solid var(--audit-line);
  border-radius: 11px;
  background: var(--audit-surface-2);
  padding: 10px 12px;
}

.odin-audit-rankings h4 {
  margin: 0 0 7px;
  color: var(--audit-text);
  font-size: 0.78rem;
}

.odin-audit-rankings ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.odin-audit-rankings li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  color: var(--audit-muted);
  font-size: 0.72rem;
}

.odin-audit-rankings li > span:nth-child(2) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.odin-audit-rank {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--audit-accent);
  border: 1px solid var(--audit-accent);
  font-size: 0.62rem;
}

.odin-audit-summary-head {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.odin-audit-summary-head > div {
  border: 1px solid var(--audit-line);
  border-radius: 10px;
  padding: 9px;
  background: var(--audit-surface-2);
}

.odin-audit-summary-head span,
.odin-audit-summary-head strong {
  display: block;
}

.odin-audit-summary-head span {
  color: var(--audit-muted);
  font-size: 0.67rem;
  margin-bottom: 4px;
}

.odin-audit-summary-head strong {
  color: var(--audit-text);
  font-size: 0.8rem;
}

.odin-audit-session-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}

.odin-audit-timeline {
  position: relative;
  padding-left: 28px;
}

.odin-audit-timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--audit-line);
}

.odin-audit-page .odin-event-item.audit {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--audit-line) !important;
  border-radius: 12px;
  background: var(--audit-surface-2) !important;
  color: var(--audit-text) !important;
  padding: 12px 13px;
  overflow: visible;
}

.odin-audit-timeline-marker {
  position: absolute;
  left: -28px;
  top: 11px;
  z-index: 2;
}

.odin-audit-timeline-marker span {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--audit-surface);
  border: 1px solid var(--audit-accent);
  color: var(--audit-accent);
  font-size: 0.62rem;
  font-weight: 800;
}

.odin-audit-event-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.odin-audit-event-header time {
  color: var(--audit-muted);
  font-size: 0.68rem;
  white-space: nowrap;
}

.odin-audit-page .friendly-message {
  color: var(--audit-text) !important;
}

.odin-audit-page .odin-event-readable-meta {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.odin-audit-page .odin-event-readable-meta .wide {
  grid-column: span 2;
}

.odin-audit-pagination {
  flex-wrap: wrap;
  color: var(--audit-muted) !important;
}

.odin-audit-page-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--audit-muted);
  font-size: 0.68rem;
}

.odin-audit-page-size select {
  width: 74px;
}

@media (max-width: 1200px) {
  .odin-audit-page .odin-audit-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .odin-audit-page .odin-audit-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .odin-audit-status-strip,
  .odin-audit-rankings,
  .odin-audit-summary-head,
  .odin-audit-page .odin-event-readable-meta,
  .odin-audit-session-facts {
    grid-template-columns: 1fr;
  }
  .odin-audit-page .odin-event-readable-meta .wide {
    grid-column: auto;
  }
}
