@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

/* 2. Aplicação global no projeto para substituir a Inter/Public Sans do Materio */
body, 
html, 
#layout-menu, 
.menu-inner, 
.menu-link, 
.menu-header,
.form-control,
.btn {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, 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;
 --slim-width-collapsed: 70px;
        --slim-width-expanded: 240px;
        --flyout-width: 230px;
        --transition-speed: 0.25s;
        --transition-curve: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-speed: 0.25s;
  --transition-curve: cubic-bezier(0.4, 0, 0.2, 1);
}
/* este estio foi a pedido do dr.David*/
/* ===================================================
 * VARIÁVEIS E REGRAS BASE (DESKTOP)
 * =================================================== */

body {
  overflow-x: hidden;
}

/* ===================================================
 * 1. BARRA PRINCIPAL (SLIM)
 * =================================================== */
.sidebar-slim {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--slim-width-collapsed);
  background-color: #0b111e;
  z-index: 1045;
  
  display: flex !important;
  flex-direction: column !important;
  height: 100vh !important;
  padding: 0 !important;
  overflow: hidden !important;
  
  white-space: nowrap;
  border-right: 0.1rem solid #ebedf7 !important;
  transition: width var(--transition-speed) var(--transition-curve), left var(--transition-speed) var(--transition-curve);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.05);
}

@media (min-width: 992px) {
  .sidebar-slim:hover,
  body.sidebar-expanded .sidebar-slim {
    width: var(--slim-width-expanded);
  }
}

/* BRAND CONTAINER (FIXO NO TOPO) */
.sidebar-slim .brand-container {
  height: 64px;
  padding: 0 0.75rem;
  display: flex;
  align-items: center;
  flex-shrink: 0 !important;
  background-color: inherit;
  z-index: 10;
}

.sidebar-slim .brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.sidebar-slim .brand-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background-color: #04889f;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-slim .brand-title {
  color: var(--bs-primary);
  font-weight: 700;
  font-size: 1.05rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

@media (min-width: 992px) {
  .sidebar-slim:hover .brand-title,
  body.sidebar-expanded .brand-title {
    opacity: 1;
  }
}

/* NAVEGAÇÃO SLIM (FLUIDA COM SCROLL À ESQUERDA) */
.slim-menu-nav {
  list-style: none;
  padding: 0.5rem 0.5rem 0.5rem 0.5rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;

  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;

  /* Scrollbar na esquerda */
  direction: rtl;

  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* Reseta direção dos itens filhos */
.slim-menu-nav > * {
  direction: ltr;
}

.slim-menu-nav::-webkit-scrollbar {
  width: 5px !important;
  display: block !important;
}

.slim-menu-nav::-webkit-scrollbar-track {
  background: transparent !important;
}

.slim-menu-nav::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2) !important;
  border-radius: 10px;
}

.slim-menu-nav::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.4) !important;
}

.slim-item {
  height: 44px;
  min-height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  color: #8c9cb3;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-decoration: none;
  flex-shrink: 0;
}

.slim-item i {
  font-size: 1.3rem;
  min-width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slim-label {
  font-size: 0.875rem;
  font-weight: 500;
  margin-left: 0.85rem;
  text-align: left;
  flex: 1;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.slim-arrow {
  font-size: 1rem;
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.2s ease;
}

@media (min-width: 992px) {
  .sidebar-slim:hover .slim-label,
  .sidebar-slim:hover .slim-arrow,
  body.sidebar-expanded .slim-label,
  body.sidebar-expanded .slim-arrow {
    opacity: 1;
  }
}

.slim-item:hover {
  color: #94a3b8;
  background-color: rgba(219, 217, 217, 0.05)!important;
}

.slim-item.active {
  background-color: rgba(255, 255, 255, 0.08);
  color: #04889f;
}

.slim-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 4px;
  background-color: #04889f;
  border-radius: 0 4px 4px 0;
}

/* ===================================================
 * SEÇÃO FIXA INFERIOR (SLIM FOOTER)
 * =================================================== */
.slim-footer {
  flex-shrink: 0 !important;
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background-color: inherit;
}

.slim-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #2563eb;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===================================================
 * 2. BARRA SECUNDÁRIA (FLYOUT)
 * =================================================== */
.sidebar-flyout {
  position: fixed;
  top: 0;
  left: var(--slim-width-collapsed);
  bottom: 0;
  width: var(--flyout-width);
  background-color: #ffffff;
  border-right: 1px solid #e2e8f0;
  z-index: 1040;
  
  display: flex;
  flex-direction: column;
  overflow: hidden; 
  transition: left var(--transition-speed) var(--transition-curve);
}

@media (min-width: 992px) {
  .sidebar-slim:hover + .sidebar-flyout,
  body.sidebar-expanded .sidebar-flyout {
    left: var(--slim-width-expanded);
  }
}

.flyout-panel {
  display: none; 
  height: 100%;
  flex-direction: column;
}

.flyout-panel.active {
  display: flex;
}

.flyout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0.1rem solid #f4f5fa;
  box-sizing: border-box;
  height: 64px;
  padding: 0 1rem;
  flex-shrink: 0;
  background-color: #ffffff;
}

.flyout-header h5 {
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  font-size: 1.1rem;
}

.btn-close-flyout-mobile {
  display: none;
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
}

.flyout-panel .flyout-body {
  padding: 1.5rem 1rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  /* Oculta scrollbar no Firefox */
  scrollbar-width: none;
  /* Oculta scrollbar no IE / Edge antigo */
  -ms-overflow-style: none;
}
.flyout-panel .flyout-body::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.flyout-section-title {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.flyout-links {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.flyout-links li a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.5rem;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.flyout-links li a:hover {
  color: #04889f;
  background-color: #f8fafc;
}

.flyout-links li.active a {
  color: #04889f;
  background-color: #f1f5f9;
  font-weight: 600;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.dot.orange { background-color: #04889f; }
.dot.blue { background-color: #3b82f6; }
.dot.green { background-color: #10b981; }

/* ===================================================
 * 3. NAVBAR E CONTEÚDO PRINCIPAL
 * =================================================== */
.layout-navbar {
  border-bottom: 0.1rem solid #ebedf7;
  height: 64px;
}

.layout-page {
  margin-left: calc(var(--slim-width-collapsed) + var(--flyout-width)) !important;
  transition: margin-left var(--transition-speed) var(--transition-curve);
  min-height: 100vh;
}

@media (min-width: 992px) {
  .sidebar-slim:hover ~ .layout-page,
  body.sidebar-expanded .layout-page {
    margin-left: calc(var(--slim-width-expanded) + var(--flyout-width)) !important;
  }
}

#toggle-sidebar-btn .toggle-icon {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: rotate(180deg);
}

body.flyout-closed #toggle-sidebar-btn .toggle-icon {
  transform: rotate(0deg);
}

body.flyout-closed .sidebar-flyout {
  left: -300px !important;
}

body.flyout-closed .layout-page {
  margin-left: var(--slim-width-collapsed) !important;
}

@media (min-width: 992px) {
  body.flyout-closed.sidebar-expanded .layout-page,
  body.flyout-closed .sidebar-slim:hover ~ .layout-page {
    margin-left: var(--slim-width-expanded) !important;
  }
}

.layout-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  z-index: 1035;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

@media (max-width: 991.98px) {
  .layout-page {
    margin-left: 0 !important;
  }

  .sidebar-slim {
    left: -300px;
    width: 70px !important;
  }

  .sidebar-flyout {
    left: -300px;
    width: 220px !important;
  }

  .btn-close-flyout-mobile {
    display: block;
  }

  body.mobile-menu-open .sidebar-slim {
    left: 0;
  }

  body.mobile-menu-open .sidebar-flyout {
    left: 70px;
    box-shadow: 10px 0 25px rgba(0, 0, 0, 0.15);
  }

  body.mobile-menu-open .layout-overlay {
    display: block;
    opacity: 1;
  }
}
/* --- 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;
}

/* 1. Reset de Background, Sombras, Margens e Cores do Materio */
.layout-menu .menu-inner .menu-item.active > .menu-link,
.layout-menu .menu-inner .menu-item.active > .menu-link:hover,
.layout-menu .menu-inner .menu-item.active > .menu-link:focus {
    background: #f4f0ff !important;        /* Força o fundo claro da Hostinger */
    background-image: none !important;     /* Remove gradientes de fundo do Materio */
    box-shadow: none !important;            /* Remove sombras (shadow-purple, etc.) */
    font-weight: 600 !important;
    border-radius: 8px !important;         /* Cantos ligeiramente arredondados */
    margin: 4px 12px !important;        /* Alinhamento do conteúdo interno */
    position: relative !important;
    transition: all 0.2s ease;
    color: #212529 !important;

}

/* 2. Reset e Força do Ícone Ativo */
.layout-menu .menu-inner .menu-item.active > .menu-link .menu-icon,
.layout-menu .menu-inner .menu-item.active > .menu-link:hover .menu-icon {
    background: none !important;           /* Remove fundos secundários que o Materio possa ter */
        color: #212529 !important;
}

/* 3. Indicador Lateral (Barra Vertical da Hostinger) */

/* 4. Padronização dos itens Inativos (Hover) para conversar com o novo estilo */
.layout-menu .menu-inner .menu-item:not(.active) > .menu-link:hover {
    background-color: #f8f9fa !important;  /* Cinza muito claro */
    color: #212529 !important;
    border-radius: 8px !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;
}


/* 1. Remove os círculos/bolinhas originais do Materio */
#layout-menu .menu-sub .menu-item::before {
  display: none !important;
}

/* 2. Cria a linha vertical sutil à esquerda no submenu (Padrão Hostinger) */
#layout-menu .menu-sub {
  padding-left: 1.2rem !important;
  margin-left: 1.8rem !important; /* Alinha horizontalmente com o ícone pai */
  border-left: 1px solid #e4e4e7 !important; /* Linha cinza clara sutil */
  background: transparent !important;
}

/* 3. Ajuste opcional para o item interno ter um respiro sutil */
#layout-menu .menu-sub .menu-link {
  padding-left: 0.5rem !important;
}

/* 1. Remove os círculos nativos do Materio forçando o desaparecimento do elemento pseudo e do ícone */
#layout-menu .menu-sub .menu-item::before,
#layout-menu .menu-sub .menu-item i,
#layout-menu .menu-sub .menu-link::before {
  display: none !important;
  content: none !important;
  opacity: 0 !important;
}

/* 2. Configura a linha lateral sutil à esquerda (Estilo Hostinger) */
#layout-menu .menu-sub {
  margin-left: 2.2rem !important; /* Alinha o início da linha horizontalmente com o ícone pai */
  padding-left: 0.8rem !important; /* Espaço entre a linha vertical e o início do texto do submenu */
  border-left: 1px solid #dbdade !important; /* Linha cinza clara limpa */
  background: transparent !important;
}

/* 3. Garante que o link interno não herde paddings absolutos do template que possam deslocar o texto */
#layout-menu .menu-sub .menu-link {
  padding-left: 0.5rem !important;
}

/* ==========================================================================
   PADRÃO HOSTINGER: ESTILIZAÇÃO DO MENU LATERAL (HOVER / ACTIVE)
   ========================================================================== */

/* 1. Reset de Border-Radius nos links de nível superior e submenus */
#layout-menu .menu-item .menu-link,
#layout-menu .menu-sub .menu-link {
  border-radius: 6px !important; /* Arredondamento suave e idêntico em todos os cantos */
  transition: background-color 0.2s ease, color 0.2s ease;
  margin-left: 0.5rem !important;
  margin-right: 0.5rem !important;
  width: calc(100% - 1rem) !important; /* Mantém o item centralizado e com margens nas laterais */
}

/* 2. Efeito Hover (Passar o rato) - Submenu e Menu Pai */
#layout-menu .menu-item .menu-link:hover,
#layout-menu .menu-sub .menu-item .menu-link:hover {
  background-color: #f1f1f2 !important; /* Cinza claro suave idêntico ao da Hostinger */
  color: #1e293b !important; /* Texto escuro e legível */
}

/* 3. Efeito Ativo (Item selecionado no Submenu) */
#layout-menu .menu-sub .menu-item.active > .menu-link {
  background-color: #e4e6e9 !important; /* Um cinza ligeiramente mais focado para o estado ativo */
  color: #000000 !important;
  font-weight: 500 !important;
}

/* 4. Garantir que as linhas divisórias e cabeçalhos de submenu não ganhem fundo */
#layout-menu .menu-sub .menu-header {
  background: transparent !important;
  padding-left: 1rem !important;
}

/* 5. Ajuste fino da linha vertical do submenu para casar com o hover */
#layout-menu .menu-sub {
  margin-left: 1.8rem !important;
  padding-left: 0.5rem !important;
  border-left: 1px solid #e4e6e9 !important;
}

/* ==========================================================================
   PADRÃO HOSTINGER: SEPARADORES DE SECÇÃO (MENU HEADERS)
   ========================================================================== */

/* 1. Reset completo do estilo nativo do Materio (remove linhas residuais) */
#layout-menu .menu-header::before,
#layout-menu .menu-header::after {
  display: none !important;
  content: none !important;
}

/* 2. Estilização do bloco do cabeçalho */
#layout-menu .menu-header {
  margin-top: 1.5rem !important;    /* Espaço equilibrado antes da nova secção */
  margin-bottom: 0.5rem !important; /* Proximidade elegante com os itens abaixo */
  padding: 0 1.2rem !important;     /* Alinhamento horizontal com os ícones */
  background: transparent !important;
}

/* 3. Ajuste do texto interno conforme o padrão Hostinger */
#layout-menu .menu-header .menu-header-text {
  font-size: 0.60rem !important;    /* Texto pequeno e refinado */
  font-weight: 600 !important;      /* Seminegrito para dar legibilidade */
  color: #64748b !important;        /* Tom cinza ardósia discreto e moderno */
  text-transform: uppercase !important; /* Garante que fica sempre em maiúsculas */
  letter-spacing: 0.05em !important;   /* Ligeiro espaçamento entre letras profissional */
}

@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: #037185 !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;
}


.wizard-parametros-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.wizard-parametro-card {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  background-color: #fbfcfd;
}

.wizard-parametro-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.wizard-parametro-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--bs-primary);
  background-color: #eef2ff;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.btn-icon-remove {
  border: none;
  background: transparent;
  color: #928e9a;
  padding: 0.25rem 0.4rem;
  border-radius: 0.35rem;
  transition: background-color 0.15s ease;
}

.btn-icon-remove:hover {
  background-color: #fee2e2;
}

.wizard-exam-table-wrapper {
  max-height: 260px;
  overflow-y: auto;
}

#tableSelecaoExameWizard tbody tr {
  cursor: pointer;
}

#tableSelecaoExameWizard tbody tr.linha-selecionada {
  background-color: #eef2ff !important;
}

.wizard-radio-visual {
  width: 16px;
  height: 16px;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.linha-selecionada .wizard-radio-visual {
  border-color: var(--bs-primary);
}

.linha-selecionada .wizard-radio-visual::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background-color: var(--bs-primary);
}

.wizard-exame-banner {
  font-size: 0.82rem;
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 0.5rem 0.75rem;
  border-radius: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}





  .nav-tabs-custom-container {
    border-bottom: 1px solid #e2e8f0;
  }

  .nav-tabs-minimal {
    border-bottom: none !important;
    gap: 1.5rem;
  }

  .nav-tabs-minimal .nav-link {
    border: none !important;
    background: transparent !important;
    color: #64748b;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.6rem 0.25rem 0.8rem 0.25rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s ease-in-out;
  }

  .nav-tabs-minimal .nav-link:hover {
    color: #0f766e;
  }

  .nav-tabs-minimal .nav-link.active {
    color: #0f766e !important;
  }

  /* Linha Verde Ativa Embaixo */
  .nav-tabs-minimal .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #0f766e;
    border-radius: 2px 2px 0 0;
  }

  /* Badge Oval com Número */
  .nav-tabs-minimal .badge-count {
    background-color: #e6f4f1;
    color: #0f766e;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 50rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
  }

  .nav-tabs-minimal .nav-link:not(.active) .badge-count {
    background-color: #f1f5f9;
    color: #64748b;
  }
.tab-content
{
  padding:0!important;
  margin:0!important;
}

 /* Botões de Ação de Exportar/Importar (Estilo exato da imagem) */
  .btn-export-custom {
    background-color: transparent;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.45rem 0.9rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
  }

  .btn-export-custom:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
  }

  .btn-export-custom i {
    font-size: 0.95rem;
    color: #475569;
  }

  .steps-custom-container {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
  }

  .step-item-custom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    position: relative;
    z-index: 2;
  }

  /* Círculo base (Inativo) */
  .step-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: #64748b;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25 ease-in-out;
  }

  /* Label do Passo */
  .step-title-custom {
    font-size: 0.78rem;
    font-weight: 600;
    color: #94a3b8;
    transition: color 0.25s ease-in-out;
  }

  /* Passo Ativo (Com halo / aura ao redor) */
  .step-item-custom.active .step-circle {
    background-color: #0f766e;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.18);
  }

  .step-item-custom.active .step-title-custom {
    color: #0f766e;
    font-weight: 700;
  }

  /* Passo Concluído (Sem halo) */
  .step-item-custom.completed .step-circle {
    background-color: #0f766e;
    color: #ffffff;
    box-shadow: none;
  }

  .step-item-custom.completed .step-title-custom {
    color: #0f766e;
  }

  /* Linha Conectora entre os passos */
  .step-line {
    flex-grow: 1;
    height: 2px;
    background-color: #e2e8f0;
    margin: 0 0.75rem;
    margin-bottom: 1.25rem; /* Compensa o texto que fica abaixo do círculo */
    transition: background-color 0.25s ease-in-out;
  }

  .step-line.active {
    background-color: #0f766e;
  }
  /* Container Superior Unificado (Header + Steps) */
.modal-steps-header {
  background-color: #fcfdfe;
  border-bottom: 1px solid #f1f5f9 !important; /* Borda suave como na imagem */
  border-top-left-radius: calc(0.5rem - 1px);
  border-top-right-radius: calc(0.5rem - 1px);
}

.steps-custom-container {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
}

.step-item-custom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  z-index: 2;
}

/* Círculo base (Inativo) */
.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #e2e8f0;
  color: #64748b;
  font-weight: 700;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease-in-out;
}

/* Label do Passo */
.step-title-custom {
  font-size: 0.70rem;
  font-weight: 600;
  color: #94a3b8;
  transition: color 0.25s ease-in-out;
}

/* Passo Ativo (Com halo / aura ao redor) */
.step-item-custom.active .step-circle {
  background-color: #0f766e;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15);
}

.step-item-custom.active .step-title-custom {
  color: #0f766e;
  font-weight: 700;
}

/* Passo Concluído */
.step-item-custom.completed .step-circle {
  background-color: #0f766e;
  color: #ffffff;
  box-shadow: none;
}

.step-item-custom.completed .step-title-custom {
  color: #0f766e;
}

/* Linha Conectora */
.step-line {
  flex-grow: 1;
  height: 2px;
  background-color: #e2e8f0;
  margin: 0 0.75rem;
  margin-bottom: 1.25rem;
  transition: background-color 0.25s ease-in-out;
}

.step-line.active {
  background-color: #0f766e;
}

/* Item de menu sem permissão: visível mas com aparência de desabilitado */
.menu-item-disabled {
  opacity: 0.35;
  cursor: not-allowed !important;
  pointer-events: none; /* bloqueia clique do rato nativamente */
}

.menu-item-disabled .slim-label,
.menu-item-disabled .slim-arrow {
  color: #adb5bd !important;
}

/* Links dentro do flyout, mesma lógica */
.flyout-links li.menu-item-disabled a {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed !important;
}

/* Filtros por Data (Estilo idêntico à imagem) */
  .btn-filter-date {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
  }

  .btn-filter-date:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
  }

  .btn-filter-date.active {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #16a34a;
  }

  .input-datepicker-custom {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 0.5rem;
    padding: 0.42rem 0.75rem;
  }

  .input-datepicker-custom:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.15);
  }

  /* Rótulo dos Cards */
  .indicator-label {
    font-size: 0.75rem;
    color: #64748b;
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
  }

  .indicator-value {
    font-weight: 700;
  }

  .bg-teal {
    background-color: #0f766e !important;
  }

   /* Filtros por Data (Estilo idêntico à imagem) */
  .btn-filter-date {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.45rem 0.85rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
  }

  .btn-filter-date:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
  }

  .btn-filter-date.active {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #16a34a;
  }

  .select-filter-custom {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 0.5rem;
    padding: 0.42rem 2rem 0.42rem 0.75rem;
    cursor: pointer;
  }

  .select-filter-custom:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.15);
  }

  /* Rótulo dos Cards */
  .indicator-label {
    font-size: 0.75rem;
    color: #64748b;
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
  }

  .indicator-value {
    font-weight: 700;
  }

  .bg-teal {
    background-color: #0f766e !important;
  }

  /* Ajuste de estilo de impressão */
  @media print {
    .btn-group, .input-datepicker-custom, .btn-filter-date {
      display: none !important;
    }
  }
