/* Importação da Google Font (Inter) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ==========================================================================
   APLICAÇÃO GLOBAL DA FONTE
   ========================================================================== */
:root {
  --bs-body-font-family: 'Inter', sans-serif !important;
}

body {
  font-family: 'Inter', sans-serif !important;
}

/* Garante que os títulos e inputs também herdem a fonte */
h1, h2, h3, h4, h5, h6, .form-control, .btn, .menu-link {
  font-family: 'Inter', sans-serif !important;
}
/* ==========================================================================
   1. PALETA DE CORES (IDENTIDADE VISUAL)
   ========================================================================== */
:root {
  /* Primário: Laranja Calungasoft */
  --bs-primary: #005f70;
  --bs-primary-rgb: 3, 113, 133;
  --bs-primary-hover: #037185;
  --bs-primary-active: #005f70;
  --bs-primary-bg-subtle: #fff1ea;

  /* Secundário: Azul Profissional */
  --bs-secondary: #0150d9;
  --bs-secondary-rgb: 1, 80, 217;
  --bs-secondary-hover: #0144b8;
  --bs-secondary-active: #01399a;
  --bs-secondary-bg-subtle: #e6eefb;
}

/* --- Botões Primários --- */
.btn-primary {
  color: #fff !important;
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
  box-shadow: 0 0.125rem 0.25rem 0 rgba(var(--bs-primary-rgb), 0.4) !important;
}
.btn-primary:hover {
  background-color: var(--bs-primary-hover) !important;
  border-color: var(--bs-primary-hover) !important;
}

/* --- Botões Secundários --- */
.btn-secondary {
  color: #fff !important;
  background-color: var(--bs-secondary) !important;
  border-color: var(--bs-secondary) !important;
  box-shadow: 0 0.125rem 0.25rem 0 rgba(var(--bs-secondary-rgb), 0.4) !important;
}
.btn-secondary:hover {
  background-color: var(--bs-secondary-hover) !important;
  border-color: var(--bs-secondary-hover) !important;
}

/* --- Menu Lateral (Item Ativo) --- */
.menu-vertical .menu-item.active > .menu-link:not(.menu-toggle) {
  background: linear-gradient(270deg, rgba(var(--bs-primary-rgb), 0.7) 0%, var(--bs-primary) 100%) !important;
  box-shadow: 0 2px 6px 0 rgba(var(--bs-primary-rgb), 0.48) !important;
  color: #fff !important;
}

/* --- Cores de Texto e Badges --- */
.text-primary { color: var(--bs-primary) !important; }
.text-secondary { color: var(--bs-secondary) !important; }

.bg-label-primary { background-color: var(--bs-primary-bg-subtle) !important; color: var(--bs-primary) !important; }
.bg-label-secondary { background-color: var(--bs-secondary-bg-subtle) !important; color: var(--bs-secondary) !important; }
/* ==========================================================================
   2. ESTRUTURA DO MENU (CORREÇÃO DE ALINHAMENTO DOS ÍCONES)
   ========================================================================== */

.layout-menu, .layout-page, .menu-text, .app-brand-text {
  transition: all 0.3s ease-in-out !important;
}

@media (min-width: 1200px) {
  /* Quando o menu está colapsado */
  .layout-menu-collapsed .layout-menu {
    width: 80px !important;
  }

  .layout-menu-collapsed .layout-page {
    padding-left: 80px !important;
  }

  /* Esconder Textos */
  .layout-menu-collapsed .menu-text,
  .layout-menu-collapsed .menu-header-text,
  .layout-menu-collapsed .app-brand-text,
  .layout-menu-collapsed .menu-item-animating {
    display: none !important;
  }

  /* --- CORREÇÃO DO ALINHAMENTO --- */
  .layout-menu-collapsed .menu-item .menu-link {
    padding-left: 0 !important;
    padding-right: 0 !important;
    justify-content: center !important; /* Centraliza horizontalmente */
    width: 100%;
  }

  .layout-menu-collapsed .menu-icon {
    margin-right: 0 !important; /* Remove a margem que empurrava o ícone para a esquerda */
    margin-left: 0 !important;
    display: flex;
    justify-content: center;
    width: 100%; /* Ocupa toda a largura da barra de 80px para centralizar o conteúdo */
  }
  /* ------------------------------- */

  .layout-menu-collapsed .app-brand {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Controlo dos Botões Navbar */
  .layout-navbar .layout-menu-toggle {
    display: block !important;
  }

  .app-brand .layout-menu-toggle {
    display: none !important;
  }
}

/* Rotação do ícone na Navbar para indicar que pode expandir */
.layout-menu-collapsed .layout-navbar .layout-menu-toggle i {
  transform: rotate(180deg);
}

/* ==========================================================================
   SOMBRA PERMANENTE NO MENU (FIXA)
   ========================================================================== */

/* Aplica a sombra tanto no estado normal quanto no colapsado */
.layout-menu {
  /* Sombra suave usando um tom escuro ou a cor primária translúcida */
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
  border-right: none !important; /* Remove bordas simples para destacar a sombra */
}

/* Ajuste específico para quando o menu está colapsado (80px) */
@media (min-width: 1200px) {
  .layout-menu-collapsed .layout-menu {
    /* Mantemos a sombra ativa mesmo quando o menu é apenas uma barra fina */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.08) !important;
  }
}

/* Opcional: Se quiser que a sombra tenha um leve tom da sua cor primária (#005f70) */
.layout-menu {
  box-shadow: 5px 0 15px rgba(255, 116, 47, 0.08) !important;
}
.layout-menu-theme {
  border-right: 0px solid transparent !important;
}

/* ==========================================================================
   GESTÃO DE SOMBRAS (APENAS NO MODO COLAPSADO)
   ========================================================================== */

@media (min-width: 1200px) {
  /* 1. Quando o menu está COLAPSADO (80px) -> Ativa a sombra */
  .layout-menu-collapsed .layout-menu {
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.1) !important;
    border-right: none !important;
  }

  /* 2. Quando o menu está EXPANDIDO (260px) -> Remove a sombra */
  /* Nota: O Materio expandido não tem a classe .layout-menu-collapsed */
  .layout-wrapper:not(.layout-menu-collapsed) .layout-menu {
    box-shadow: none !important;
    border-right: 1px solid rgba(0, 0, 0, 0.05); /* Opcional: uma linha fina apenas para separar */
  }
}

/* Garante que a transição da sombra seja suave como a do menu */
.layout-menu {
  transition: width 0.3s ease-in-out, box-shadow 0.3s ease-in-out !important;
}

/* ==========================================================================
   CORREÇÃO FINAL DE ALINHAMENTO DOS ÍCONES (ICONIFY)
   ========================================================================== */
@media (min-width: 1200px) {
  .layout-menu-collapsed .menu-item .menu-link {
    padding-left: 0 !important;
    padding-right: 0 !important;
    justify-content: center !important;
  }

  .layout-menu-collapsed .menu-icon {
    margin-right: 0 !important;
    margin-left: 0 !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
  }

  /* Garante que o ícone do Iconify (ri-) herde o tamanho correto */
  .layout-menu-collapsed .icon-base {
    font-size: 1.45rem !important;
  }
}


/* ==========================================================================
   TROCA DINÂMICA DE LOGO (EXPANDIDO VS COLAPSADO)
   ========================================================================== */

/* 1. Estado Padrão (Menu Expandido) */
.logo-expanded {
  display: block !important;
  width: 12rem !important; /* Tamanho que definiste antes */
  height: auto;
}

.logo-collapsed {
  display: none !important; /* Escondido por padrão */
}

/* 2. Estado Colapsado (Menu de 80px) */
@media (min-width: 1200px) {
  .layout-menu-collapsed .logo-expanded {
    display: none !important; /* Esconde a logo grande */
  }

  .layout-menu-collapsed .logo-collapsed {
    display: block !important; /* Mostra o favicon */
    width: 2.2rem !important;
    margin-right:1.8rem;/* Centraliza no menu mini */
  }

  .layout-menu-collapsed .app-brand-link {
    width: 100%;
    display: flex;
    justify-content: center;
  }
}

/* Suavizar a troca (opcional) */
.logo-expanded, .logo-collapsed {
  transition: opacity 0.3s ease-in-out;
}

/* ==========================================================================
   VARIAÇÃO DE CARD: SEM FUNDO E SEM SOMBRA (.card.card-flush)
   ========================================================================== */

/* Quando as duas classes estão no mesmo elemento */
.card.card-flush {
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important; /* Opcional: remove bordas se houver */
}

/* Ajuste opcional para remover paddings extras dos headers/body se necessário */
.card.card-flush .card-header,
.card.card-flush .card-body {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Garante que itens dentro deste card (como listas) também fiquem transparentes */
.card.card-flush .list-group-item {
  background-color: transparent !important;
}

/* Customização para a classe .frase */
.btn.frase {
  text-transform: none !important; /* Remove qualquer uppercase do template */
}

.btn.frase::first-letter {
  text-transform: uppercase;
}

/* Garante que o restante do texto fique em minúsculas, se desejar rigor */
.btn.frase {
  text-transform: lowercase;
  display: inline-block; /* Necessário para o ::first-letter funcionar corretamente em alguns contextos */
}

/* Ajuste específico para o d-grid do Materio */
.btn.frase.d-grid {
  text-transform: none !important;
}

/*sublinhado no link para tela de cadastro*/
.auth-register
{
  text-decoration: underline!important;
}


/* Efeito de Vidro Fosco (Glassmorphism) para o Modal */
.bg-modal-transparent {
  background-color: rgba(255, 255, 255, 0.8) !important; /* Branco com 60% opacidade */
  backdrop-filter: blur(10px); /* O "segredo" para a sensação de profundidade */
  -webkit-backdrop-filter: blur(10px);
}

/* Ajuste para o fundo escuro padrão do Bootstrap não tapar tudo */
.modal-backdrop.show {
  opacity: 0.2 !important; /* Deixa o fundo preto bem clarinho */
}

/* Se quiser que o modal tenha um toque da sua cor secundária no fundo */
.modal-content.bg-modal-transparent {
    border: none !important;
}


/* Barra de progresso integrada e fina */
.miro-progress-inline {
  width: 100%;
  height: 2px; /* Super fina estilo Miro */
  background: rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.miro-progress-bar {
  height: 100%;
  width: 10%; /* Início discreto */
  background-color: var(--bs-primary);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scroll interno apenas nos campos para não mover o título e a barra */
.step-container {
  max-height: 350px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
}

/* Personalização do scroll para não ficar feio */
.step-container::-webkit-scrollbar {
  width: 4px;
}
.step-container::-webkit-scrollbar-thumb {
  background: #eee;
  border-radius: 10px;
}
/* Estado Base: Escondido e encolhido */
.step-field {
  opacity: 0;
  visibility: hidden;
  height: 0;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  transition: opacity 0.4s ease, transform 0.4s ease, height 0.3s ease;
  transform: translateY(10px);
}

/* Estado Ativo: Visível e com altura automática */
.step-field.active {
  opacity: 1;
  visibility: visible;
  height: auto; /* Permite que o input apareça totalmente */
  margin-bottom: 1.25rem !important; /* mb-5 do bootstrap */
  transform: translateY(0);
  overflow: visible; /* Garante que a label flutuante não seja cortada */
}

/* Garantir que o Step 1 esteja sempre ativo no carregamento */
#step1 {
  opacity: 1;
  visibility: visible;
  height: auto;
  margin-bottom: 1.25rem !important;
  transform: translateY(0);
}



#theme-toggle {
  border: none;
  background: transparent;
  font-size:2rem!important;;
}

#theme-toggle i {
  font-size: 1.4rem; /* Tamanho equilibrado para a navbar */
  color: #697a8d; /* Cor neutra do Materio */
}

[data-bs-theme="dark"] #theme-toggle i {
  color: #cbcbe2; /* Cor mais clara para o modo dark */
}

#theme-toggle {
  border: none;
  background: transparent;
}

#theme-toggle i {
  font-size: 1.4rem; /* Tamanho equilibrado para a navbar */
  color: #697a8d; /* Cor neutra do Materio */
}

[data-bs-theme="dark"] #theme-toggle i {
  color: #cbcbe2; /* Cor mais clara para o modo dark */
}

/* ==========================================================================
   MODO DARK PERSONALIZADO (AMOLED BLACK #000)
   ========================================================================== */

[data-bs-theme="dark"] {
  /* Fundo principal e containers */
  --bs-body-bg: #000000 !important;
  --bs-body-bg-rgb: 0, 0, 0;
  --bs-paper-bg: #0b0b0b !important; /* Fundo dos cards ligeiramente acima do preto */
  
  /* Cores de superfície */
  --bs-card-bg: #0b0b0b !important;
  --bs-footer-bg: #000000 !important;
  --bs-navigation-bg: #000000 !important;

  /* Bordas e Divisores (Subtis para não poluir o preto) */
  --bs-border-color: #1a1a1a !important;
  --bs-border-color-translucent: rgba(255, 255, 255, 0.05) !important;

  /* Textos */
  --bs-body-color: #e1e1e1 !important;
  --bs-heading-color: #ffffff !important;
}

/* Ajuste específico para o Menu Lateral no Modo Dark */
[data-bs-theme="dark"] .layout-menu {
  background-color: #000000 !important;
  border-right: 1px solid #1a1a1a !important;
}

/* Ajuste dos Inputs no Modo Dark */
[data-bs-theme="dark"] .form-control, 
[data-bs-theme="dark"] .form-select {
  background-color: #050505 !important;
  border-color: #222 !important;
  color: #fff !important;
}

/* Foco nos inputs com a tua cor secundária (Azul) */
[data-bs-theme="dark"] .form-control:focus {
  border-color: var(--bs-secondary) !important;
  box-shadow: 0 0 0 0.25rem rgba(1, 80, 217, 0.15) !important;
}

/* Garante que os rótulos dos gráficos fiquem brancos no modo dark */
[data-bs-theme="dark"] .apexcharts-canvas text {
  fill: #ffffff !important;
}

[data-bs-theme="dark"] .apexcharts-gridline {
  stroke: #1a1a1a !important;
}

[data-bs-theme="dark"] .apexcharts-tooltip {
  background: #0b0b0b !important;
  border-color: #222 !important;
  color: #fff !important;
}

[data-bs-theme="dark"] .bg-modal-transparent {
  background: linear-gradient(
    to right, 
    rgba(0, 0, 0, 0.5) 0%, 
    rgba(0, 0, 0, 0.9) 100%
  ) !important;
  backdrop-filter: blur(15px) !important;
  border: 1px solid #1a1a1a !important;
}

/* Botão Menu Circular Laranja */
.btn-menu-circular {
  background-color: #005f70 !important; /* Cor primária */
  color: #ffffff !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  display: flex !important;
  margin:4px;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(255, 116, 47, 0.3);
  transition: all 0.3s ease;
}

.btn-menu-circular:hover {
  transform: scale(1.08);
}

.btn-menu-circular i {
  font-size: 1.3rem;
  line-height: 0;
}

/* Espaçamento do Toggle de Tema */
#theme-toggle {
  margin-right: 8px;
}


/* Botão: Remove arredondamento inferior esquerdo */
.custom-btn-billing {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  margin-bottom: 0 !important; /* Garante que encoste no card */
  padding-left: 25px;
  padding-right: 25px;
  /* Opcional: se quiser que o botão use sua cor azul secundária */

}

/* Card: Remove arredondamento superior esquerdo */
.custom-card-billing {
  border-top-left-radius: 0 !important;
  border-top: none !important; /* Opcional: remove a borda do topo para fusão total */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* No Modo Dark (Preto Puro), ajustamos a borda para ficar visível mas sutil */
[data-bs-theme="dark"] .custom-card-billing {
  border: 1px solid #1a1a1a !important;
  background-color: #0b0b0b !important;
}





.form-control-modern {
    height: 40px !important;
    border: 1px solid #d9dee3 !important;
    border-radius: 0.375rem !important;
    font-size: 0.85rem !important;
  }
  .form-control-modern:focus {
    border-color: #2c7be5 !important;
    box-shadow: none !important;
  }
  textarea.form-control-modern { height: auto !important; }
  
  /* Círculos do Step */
  .step-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 600;
  }
  .active-step {
    background-color: #2c7be5 !important;
    color: #ffffff !important;
  }
  .completed-step {
    background-color: #e2e8f0 !important;
    color: #1e293b !important;
  }
  .step-line {
    width: 50px;
    height: 2px;
    background-color: #e2e8f0;
  }




  /* ==========================================================================
   TOPO FIXO E CONTEÚDO PRINCIPAL (MAIN) COM SCROLL INDEPENDENTE
   ========================================================================== */

/* 1. Estrutura de contenção global (caso o template use uma classe de layout wrapper) */
.layout-wrapper {
  display: flex;
  height: 100vh; /* Força o layout a ocupar exatamente a altura da tela */
  overflow: hidden; /* Impede que a página inteira role */
}

/* 2. Container da direita (que junta o Topo + Main) */
.layout-page {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100vh;
  overflow: hidden; /* Mantém o travamento vertical */
}

/* 3. Ajuste do Topo (Navbar) para ficar estático/fixo no topo deste container */
.layout-page > .navbar {
  flex: 0 0 auto; /* Não encolhe nem cresce, fixa sua altura natural */
  position: sticky;
  top: 0;
  z-index: 1075;
}

/* No modo Dark, ajustamos a borda do topo fixo */
[data-bs-theme="dark"] .layout-page > .navbar {
  background-color: #0b0b0b !important;
  border-bottom: 1px solid #1a1a1a;
}

/* 4. O segredo do Main Fluido: apenas este bloco terá scroll */
.content-wrapper {
  flex: 1 1 auto; /* Ocupa todo o espaço vertical restante */
  overflow-y: auto; /* Ativa a barra de rolagem apenas aqui dentro */
  height: 100%;
  padding-bottom: 2rem; /* Espaçamento de respiro no fim da página */
  
  /* Deixa o scroll nativo mais suave em dispositivos móveis */
  -webkit-overflow-scrolling: touch; 
}

/* 5. Customização opcional da barra de rolagem do Main (estilo Falcon/Sneat mais fina e discreta) */
.content-wrapper::-webkit-scrollbar {
  width: 6px;
}

.content-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.content-wrapper::-webkit-scrollbar-thumb {
  
  border-radius: 10px;
}

.content-wrapper::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

[data-bs-theme="dark"] .content-wrapper::-webkit-scrollbar-thumb {
  background: #334155;
}




/* ==========================================================================
   COMPONENTES DO CATÁLOGO DE EXAMES (PADRÃO REFINADO)
   ========================================================================== */

/* --- Cabeçalhos de Página --- */
.page-title {
  font-size: 1.15rem !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  margin-bottom: 0.25rem;
}

.page-subtitle {
  font-size: 0.78rem !important;
  color: #64748b !important;
}

.btn-header {
  font-size: 0.82rem !important;
  padding: 0.45rem 1rem !important;
}

.btn-header i {
  font-size: 1rem !important;
}

/* --- Tabelas Customizadas --- */
.table-custom {
  font-size: 0.82rem !important;
}

/* Larguras fixas das tabelas para consistência visual */
.table-custom th.col-code { width: 110px; }
.table-custom th.col-counter { width: 110px; }
.table-custom th.col-parameters { width: 130px; }
.table-custom th.col-action { width: 60px; }

.table-custom .exam-code {
  font-family: monospace !important;
  color: #64748b !important;
  font-weight: 600 !important;
}

.table-custom .badge-category {
  font-size: 0.7rem !important;
}

.table-custom .badge-pill-custom {
  font-size: 0.75rem !important;
  font-weight: 600 !important;
}

.table-custom .btn-action-edit {
  padding: 0.25rem !important;
  border-radius: 0.375rem !important;
}

.table-custom .btn-action-edit i {
  font-size: 1rem !important;
  display: block;
}

/* --- Modais e Formulários --- */
.modal-header-custom,
.modal-footer-custom {
  background-color: #f8fafc !important;
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

[data-bs-theme="dark"] .modal-header-custom,
[data-bs-theme="dark"] .modal-footer-custom {
  background-color: #0b0b0b !important;
}

.modal-title-custom {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
}

[data-bs-theme="dark"] .modal-title-custom {
  color: #f8fafc !important;
}

.modal-subtitle-custom {
  font-size: 0.75rem !important;
  color: #64748b !important;
}

.label-custom {
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  color: #1e293b !important;
}

[data-bs-theme="dark"] .label-custom {
  color: #cbd5e1 !important;
}

.input-code {
  font-family: monospace !important;
}

.field-note {
  font-size: 0.7rem !important;
}

.btn-modal {
  font-size: 0.8rem !important;
}

/* Inputs Modernos Estilo Falcon */
.form-control-modern {
  height: 40px !important;
  border: 1px solid #d9dee3 !important;
  border-radius: 0.375rem !important;
  font-size: 0.85rem !important;
}

.form-control-modern:focus {
  border-color: var(--bs-primary) !important; /* Usa o seu Laranja Calungasoft */
  box-shadow: none !important;
}



/* ==========================================================================
   DASHBOARD / ESTILIZAÇÃO DOS CARDS DE INDICADORES (KPI)
   ========================================================================== */

.card-indicator {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 0.5rem !important;
}



/* Rótulo superior sutil */
.indicator-label {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: #64748b !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 0.25rem;
}

/* Valor numérico em destaque */
.indicator-value {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: #1e293b;
  margin-bottom: 0.15rem;
  line-height: 1.2;
}

[data-bs-theme="dark"] .indicator-value {
  color: #f8fafc;
}

/* Subtexto explicativo de baixo */
.indicator-subtext {
  font-size: 0.72rem !important;
  color: #94a3b8 !important;
  display: block;
}

/* Container circular para os ícones laterais */
.avatar-indicator {
  width: 44px;
  height: 44px;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-indicator i {
  font-size: 1.35rem !important;
}

/* Ajuste fino para os backgrounds dinâmicos dos ícones (Estilo Bootstrap Label) */
.bg-label-primary { background-color: #fff1ea !important; color: #005f70 !important; }
.bg-label-success { background-color: #e6f6ec !important; color: #28a745 !important; }
.bg-label-warning { background-color: #fff9db !important; color: #ffc107 !important; }
.bg-label-danger  { background-color: #ffebe9 !important; color: #dc3545 !important; }

/* Inversão sutil de cores adaptada para o Modo Escuro */
[data-bs-theme="dark"] .bg-label-primary { background-color: rgba(255, 116, 47, 0.15) !important; }
[data-bs-theme="dark"] .bg-label-success { background-color: rgba(40, 167, 69, 0.15) !important; }
[data-bs-theme="dark"] .bg-label-warning { background-color: rgba(255, 193, 7, 0.15) !important; }
[data-bs-theme="dark"] .bg-label-danger  { background-color: rgba(220, 53, 69, 0.15) !important; }
/* ==========================================================================
   AJUSTE DE ALINHAMENTO SIMÉTRICO DOS CARDS (GRID FIX)
   ========================================================================== */

.card-indicator {
  width: 100% !important; /* Força o card a ocupar todo o comprimento da coluna pai */
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important; /* Garante alinhamento vertical interno simétrico */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 0.5rem !important;
}

/* O card-body precisa esticar de forma homogênea */
.card-indicator .card-body {
  width: 100%;
  align-items: center;
}

/* ==========================================================================
   COMPONENTES DE CATEGORIAS DE EXAMES
   ========================================================================== */

/* Dimensionamento fixo das colunas da tabela de categorias */
.table-custom th.col-cat-id { width: 80px; }
.table-custom th.col-cat-code { width: 120px; }
.table-custom th.col-cat-linked { width: 150px; }
.table-custom th.col-cat-action { width: 60px; }

/* Código de identificação (#CAT-01) */
.table-custom .category-id {
  font-family: monospace !important;
  color: #64748b !important;
}

/* Badge do Prefixo/Código Interno (HEM, BIO) */
.table-custom .badge-code-prefix {
  font-family: monospace !important;
  font-size: 0.72rem !important;
}

/* Customização dos elementos específicos do formulário do modal */
.input-prefix-code {
  font-family: monospace !important;
  text-transform: uppercase;
}

.input-textarea-custom {
  height: auto !important;
  resize: none;
}

/* Variação de cor azul suave (Info) para o avatar estatístico do dashboard */
.bg-label-info {
  background-color: #e0f2fe !important;
  color: #0369a1 !important;
}

[data-bs-theme="dark"] .bg-label-info {
  background-color: rgba(3, 105, 161, 0.15) !important;
  color: #38bdf8 !important;
}


/* ==========================================================================
   COMPONENTES DO MÓDULO DE PARÂMETROS DE ANÁLISES (WIZARD + TABLES)
   ========================================================================== */

/* --- Configuração Estrutural da Tabela --- */
.table-parameters-layout th.col-param-exam   { width: 15%; }
.table-parameters-layout th.col-param-name   { width: 35%; }
.table-parameters-layout th.col-param-unit   { width: 15%; }
.table-parameters-layout th.col-param-ref    { width: 15%; }
.table-parameters-layout th.col-param-type   { width: 15%; }
.table-parameters-layout th.col-param-action { width: 100px; }

.table-header-row {
  background-color: #f8fafc !important;
}

[data-bs-theme="dark"] .table-header-row {
  background-color: #0b0b0b !important;
}

/* Célula agrupada lateral (HIV, URINA) */
.table-custom .exam-group-cell {
  font-size: 0.8rem !important;
  background-color: #ffffff !important;
}

[data-bs-theme="dark"] .table-custom .exam-group-cell {
  background-color: #0d0d0d !important;
}

/* Distintivos dos Tipos de Resultados (Monospace Clínico) */
.table-custom .type-result-badge {
  font-family: monospace !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
}

.text-quantitative { color: #4f46e5 !important; }
.text-qualitative  { color: #06b6d4 !important; }

[data-bs-theme="dark"] .text-quantitative { color: #818cf8 !important; }
[data-bs-theme="dark"] .text-qualitative  { color: #22d3ee !important; }

.btn-action-delete {
  padding: 0.25rem !important;
  border-radius: 0.375rem !important;
}

/* --- Componente do Wizard Formulário (Passo a Passo) --- */
.wizard-steps-container {
  background-color: #fcfdfe;
  padding: 1rem 1.5rem 0.5rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

[data-bs-theme="dark"] .wizard-steps-container {
  background-color: #0d0d0d;
  border-bottom: 1px solid #1a1a1a;
}

.wizard-steps-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin-left: auto;
  margin-right: auto;
  max-width: 85%;
}

.wizard-body-content {
  min-height: 260px;
}

.wizard-list-group {
  max-height: 200px;
  overflow-y: auto;
  border-radius: 0.375rem !important;
}

.wizard-list-group .list-item-text {
  font-size: 0.85rem !important;
}

.label-field-sub {
  font-size: 0.75rem !important;
}

.wizard-divider {
  border-color: #f1f5f9;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

[data-bs-theme="dark"] .wizard-divider {
  border-color: #1a1a1a;
}

/* Estilização dos Indicadores Numéricos do Wizard */
.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 2;
  background-color: #fcfdfe;
  padding: 0 8px;
}

[data-bs-theme="dark"] .step-indicator {
  background-color: #0d0d0d;
}

.step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #e2e8f0;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] .step-number {
  background-color: #1a1a1a;
  border-color: #0d0d0d;
  color: #94a3b8;
}

.step-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: #64748b;
}

/* Estados de Ativação do Wizard */
.step-indicator.active .step-number {
  background-color: var(--bs-primary); /* Laranja Calungasoft */
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 116, 47, 0.15);
}

.step-indicator.active .step-label {
  color: var(--bs-primary);
  font-weight: 600;
}

.step-indicator.completed .step-number {
  background-color: #10b981;
  color: #ffffff;
}

.step-indicator.completed .step-label {
  color: #10b981;
}

/* Trilha e Barra de Progresso do Layout */
.wizard-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 2px;
  z-index: 1;
  background-color: #e2e8f0;
}

[data-bs-theme="dark"] .wizard-progress-track {
  background-color: #1a1a1a;
}

.wizard-progress-bar {
  width: 0%;
  transition: width 0.3s ease;
}

/* Inputs Desabilitados Estilizados */
.wizard-input-disabled {
  background-color: #f8fafc !important;
  color: #1e293b !important;
}

[data-bs-theme="dark"] .wizard-input-disabled {
  background-color: #0b0b0b !important;
  color: #cbd5e1 !important;
}

.wizard-textarea-disabled {
  font-size: 0.8rem;
  color: #475569;
  resize: none;
  border-radius: 0.375rem;
  border: 1px solid #cbd5e1;
  background-color: #f8fafc;
}

[data-bs-theme="dark"] .wizard-textarea-disabled {
  background-color: #0b0b0b;
  border-color: #1a1a1a;
  color: #94a3b8;
}



/* ==========================================================================
   COMPONENTES DO MÓDULO DE PARÂMETROS DE ANÁLISES (WIZARD + TABLES)
   ========================================================================== */

/* --- Configuração Estrutural da Tabela --- */
.table-parameters-layout th.col-param-exam   { width: 15%; }
.table-parameters-layout th.col-param-name   { width: 35%; }
.table-parameters-layout th.col-param-unit   { width: 15%; }
.table-parameters-layout th.col-param-ref    { width: 15%; }
.table-parameters-layout th.col-param-type   { width: 15%; }
.table-parameters-layout th.col-param-action { width: 100px; }

.table-header-row {
  background-color: #f8fafc !important;
}

[data-bs-theme="dark"] .table-header-row {
  background-color: #0b0b0b !important;
}

/* Célula agrupada lateral (HIV, URINA) */
.table-custom .exam-group-cell {
  font-size: 0.8rem !important;
  background-color: #ffffff !important;
}

[data-bs-theme="dark"] .table-custom .exam-group-cell {
  background-color: #0d0d0d !important;
}

/* Distintivos dos Tipos de Resultados (Monospace Clínico) */
.table-custom .type-result-badge {
  font-family: monospace !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
}

.text-quantitative { color: #4f46e5 !important; }
.text-qualitative  { color: #06b6d4 !important; }

[data-bs-theme="dark"] .text-quantitative { color: #818cf8 !important; }
[data-bs-theme="dark"] .text-qualitative  { color: #22d3ee !important; }

.btn-action-delete {
  padding: 0.25rem !important;
  border-radius: 0.375rem !important;
}

/* --- Componente do Wizard Formulário (Passo a Passo) --- */
.wizard-steps-container {
  background-color: #fcfdfe;
  padding: 1rem 1.5rem 0.5rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

[data-bs-theme="dark"] .wizard-steps-container {
  background-color: #0d0d0d;
  border-bottom: 1px solid #1a1a1a;
}

.wizard-steps-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin-left: auto;
  margin-right: auto;
  max-width: 85%;
}

.wizard-body-content {
  min-height: 260px;
}

.wizard-list-group {
  max-height: 200px;
  overflow-y: auto;
  border-radius: 0.375rem !important;
}

.wizard-list-group .list-item-text {
  font-size: 0.85rem !important;
}

.label-field-sub {
  font-size: 0.75rem !important;
}

.wizard-divider {
  border-color: #f1f5f9;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

[data-bs-theme="dark"] .wizard-divider {
  border-color: #1a1a1a;
}

/* Estilização dos Indicadores Numéricos do Wizard */
.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 2;
  background-color: #fcfdfe;
  padding: 0 8px;
}

[data-bs-theme="dark"] .step-indicator {
  background-color: #0d0d0d;
}

.step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #e2e8f0;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  transition: all 0.3s ease;
}

[data-bs-theme="dark"] .step-number {
  background-color: #1a1a1a;
  border-color: #0d0d0d;
  color: #94a3b8;
}

.step-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: #64748b;
}

/* Estados de Ativação do Wizard */
.step-indicator.active .step-number {
  background-color: var(--bs-primary); /* Laranja Calungasoft */
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 116, 47, 0.15);
}

.step-indicator.active .step-label {
  color: var(--bs-primary);
  font-weight: 600;
}

.step-indicator.completed .step-number {
  background-color: #10b981;
  color: #ffffff;
}

.step-indicator.completed .step-label {
  color: #10b981;
}

/* Trilha e Barra de Progresso do Layout */
.wizard-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 2px;
  z-index: 1;
  background-color: #e2e8f0;
}

[data-bs-theme="dark"] .wizard-progress-track {
  background-color: #1a1a1a;
}

.wizard-progress-bar {
  width: 0%;
  transition: width 0.3s ease;
}

/* Inputs Desabilitados Estilizados */
.wizard-input-disabled {
  background-color: #f8fafc !important;
  color: #1e293b !important;
}

[data-bs-theme="dark"] .wizard-input-disabled {
  background-color: #0b0b0b !important;
  color: #cbd5e1 !important;
}

.wizard-textarea-disabled {
  font-size: 0.8rem;
  color: #475569;
  resize: none;
  border-radius: 0.375rem;
  border: 1px solid #cbd5e1;
  background-color: #f8fafc;
}

[data-bs-theme="dark"] .wizard-textarea-disabled {
  background-color: #0b0b0b;
  border-color: #1a1a1a;
  color: #94a3b8;
}


.global-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2000;
}

.global-progress .progress {
  height: 3px;
  border-radius: 0;
  background-color: transparent;
}

.global-progress .progress-bar {
  transition: width 0.25s ease;
}




/* ============================================
   DataTables - Estilo Global Customizado
   Aplica-se a TODAS as tabelas DataTables do site
   ============================================ */

/* Container geral: impede quebra de linha entre "length" e "filter" */
.dataTables_wrapper {
  padding: 1.25rem 1.5rem 0;
}

/* Linha de topo: "Mostrar X registos" + "Pesquisar" lado a lado */
.dataTables_wrapper .row:first-child {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 1rem;
}

.dataTables_wrapper .row:first-child > div {
  width: auto !important;
  flex: 0 0 auto !important;
  max-width: none !important;
}

/* "Mostrar" + select numa única linha (inline) */
.dataTables_length {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  font-size: 0.85rem;
  color: #475569;
}

.dataTables_length label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  white-space: nowrap;
}

.dataTables_length select {
  width: auto !important;
  min-width: 55px;
  padding: 0.25rem 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 0.82rem;
}

/* Input de pesquisa - tamanho reduzido */
.dataTables_filter input {
  width: 160px;
  padding: 0.3rem 0.6rem;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 0.82rem;
  height: auto;
  margin-left: 0 !important;
}
/* Cabeçalho da tabela: estilo limpo, sem bordas verticais */
table.dataTable thead th {
  border-top: none !important;
  border-bottom: 1px solid #e9ecef !important;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  font-weight: 600;
  padding: 0.9rem 0.75rem;
  white-space: nowrap;
}

/* Linhas do corpo */
table.dataTable tbody td {
  border-bottom: 1px solid #f1f5f9 !important;
  border-top: none !important;
  vertical-align: middle;
  padding: 0.9rem 0.75rem;
}

table.dataTable tbody tr:last-child td {
  border-bottom: none !important;
}

/* Remove bordas laterais (table-bordered) */
table.dataTable.table-bordered,
table.dataTable.table-bordered th,
table.dataTable.table-bordered td {
  border-left: none !important;
  border-right: none !important;
}

/* Rodapé: "Mostrando X de Y" + paginação lado a lado */
.dataTables_wrapper .row:last-child {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 1rem 0;
}

.dataTables_wrapper .row:last-child > div {
  width: auto !important;
  flex: 0 0 auto !important;
}

.dataTables_info {
  font-size: 0.82rem;
  color: #64748b;
}

/* Paginação */
.dataTables_paginate .pagination {
  margin: 0;
  gap: 0.25rem;
}

.dataTables_wrapper .pagination .page-link {
  border: none !important;
  background: transparent !important;
  color: #94a3b8 !important;
  border-radius: 4px !important;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
}

.dataTables_wrapper .pagination .page-item.active .page-link {
  background-color: #ff6a3d !important;
  color: #fff !important;
}

.dataTables_wrapper .pagination .page-item.disabled .page-link {
  color: #cbd5e1 !important;
}

/* Card sem sombra extra ao redor da tabela */
.card-datatable {
  box-shadow: none !important;
}

.dataTables_filter input {
  width: 220px!important;
  padding: 0.3rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 0.82rem;
  height: auto;
  margin-left: 0 !important;
}

