
/* =====================================================
   RESPONSIVIDADE GLOBAL - body e container
   Garante que o layout ocupe 100% da largura em mobile.
   O Tailwind preflight foi desabilitado no header-logged.php
   para nao conflitar com Bootstrap 5.
   ===================================================== */
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}
.container-fluid {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* --- */
/* Avatar com iniciais no navbar - definicao principal */
/* Visivel em desktop (>768px). Em mobile fica no menu inferior como icone Perfil */
.navbar-avatar {
    /* Posicionamento fixo no canto superior direito - independente do container */
    position: fixed;
    top: 10px;
    right: 15px;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
}

/* --- */
/* Estrutura principal */
.navbar {
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: fixed;
  top: 0;
  z-index: 1000;
  width: 100%;
  padding: 0.5rem 1rem;
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: auto;
}

/* Ícones e links */
.navbar-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-item {
  color: #7a7a7a;
  text-decoration: none;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: color 0.2s ease;
}

.nav-item svg {
  margin-bottom: 4px;
  transition: stroke 0.2s ease;
}

/* Botão mobile */
.navbar-toggle {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  color: #005448;
  cursor: pointer;
  background-color: rgba(0,0,0,.05);
  padding: 1px 8px;
  border-radius: 5px;
}

/* Responsividade */
@media (max-width: 768px) {
  .navbar-menu {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: white;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid #eee;
    display: none;
  }

  .navbar-menu.active {
    display: flex;
  }

  .navbar-toggle {
    display: block;
  }

  /* Em mobile o avatar fica no icone Perfil do bottom nav, nao no header */
  .navbar-avatar {
    display: none !important;
  }
}

/* --- */

.bg-branco{
	background-color: #FFF !important;
	color:#7A7A7A !important;
}
.text-branco{
	color:#FFF !important;
}
.text-grey{
	color:#7A7A7A !important;
}
.text-grey:hover{
	color:#2CBAA3 !important;
	border-bottom: #2CBAA3 solid 4px !important;
}
.active{
	color:#2CBAA3 !important;
	border-bottom: #2CBAA3 solid 4px !important;
}

/* --- Avatar do usuario na navbar - visivel em desktop --- */
/* A definicao principal esta no topo do arquivo */

/* Bolinha do avatar no canto direito do navbar (desktop) */
.avatar-initials {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #2CBAA3;
    color: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    flex-shrink: 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.avatar-initials:hover {
    background-color: #005448;
}
/* Versao menor para o icone do menu Perfil na bottom nav */
.avatar-sm {
    width: 26px;
    height: 26px;
    font-size: 10px;
    margin-bottom: 2px;
}
/* Foto de perfil no avatar */
.avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid #2CBAA3;
}
/* Foto de perfil no icone do menu Perfil (bottom nav) */
.nav-avatar-img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 2px;
    border: 2px solid #2CBAA3;
}

/* --- Barra de titulo da pagina (abaixo do navbar, fixa junto ao header) --- */
/* Logo: 63.85px + padding: 2 * 8px (0.5rem) = ~80px de altura do navbar */
.page-title-bar {
    width: 100%;
    background-image: linear-gradient(180deg, #011F20 0%, #005F51 100%);
    padding: 7px 16px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 80px;
    left: 0;
    z-index: 998;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.page-title-bar h1 {
    font-size: 1rem;
    margin: 0;
    color: #FFF;
    text-align: center;
    line-height: 1;
}
.btn-success, .a-btn-success{
	background: #2CBAA3 !important;
	border-color: #2CBAA3 !important;
}
.btn-outline-success, .a-btn-outline-success{
	color: #2CBAA3 !important;
	border-color: #2CBAA3 !important;
}
.btn-outline-success:hover, .a-btn-outline-success:hover{
	color: #FFF !important;
	background: #2CBAA3 !important;
}
.btn, .a-btn{
	font-family: "Roboto", Sans-serif !important;
	font-size: 20px !important;
	font-weight: 700 !important;	
}
.montserrat{
	font-family: "Montserrat", Sans-serif  !important;
}
.roboto{
	font-family: "Roboto", Sans-serif !important;
}
.bg-success{
	background-color: #005448 !important;
}
.text-dark-green{
	color:#005448 !important;
}
.text-light-green{
	color:#2CBAA3 !important;
}
.bg-light-green, .active > .page-link, .page-link.active{
	background:#2CBAA3 !important;
}
.bg-light-green, .active > .page-link, .page-link.active{
	border-color:#2CBAA3 !important;
}
.logo-top{
	width: 110px !important;
	height: 63.85px !important;
	margin: auto 55px auto auto !important;
}
.header{
	margin-left: 0 !important;
	height: 84px !important;
}
.fw-600{
	font-weight: 600;
	font-size: 100%;
}
.fw-800{
	font-weight: 800;
	font-size: 1.5rem;
	text-align: left;
}
.fw-500{
	font-size: 18px;
	font-weight: 500;
}
.bg-img-green{
	background-color: transparent;
	background-image: linear-gradient(180deg, #011F20 0%, #005F51 100%);
}
.p-50-10{
	padding: 18px 10% 1% 10%;
}
.p-25-10{
	padding: 25px 10%;
}
.mw-r-60{
	max-width: 60%;
	margin: auto 0 auto auto;
}
.mw-r-95{
	max-width: 95%;
	margin: auto 0 auto auto;
}
.mw-l-60{
	max-width: 60%;
	margin: auto auto auto 0;
}
.mw-l-95{
	max-width: 95%;
	margin: auto auto auto 0;
}
.img-btn{
	width: 30px;
}
.m-auto{
	margin: auto;
}
@media (max-width: 768px) {
	.mw-r-60, .mw-l-60 {
		max-width: 80%;
		margin: auto;
	}
	
	.ultima-row{
		margin-bottom: 50px;
	}
}

.footer-logo-left {
    width: 42px;
	margin: auto 0 auto auto;
}

.footer-logo-right {
    width: 42px;
	margin: auto auto auto 0;
}
.valid{
	border: 2px solid green;
}
.invalid {
	border: 2px solid red;
}
.message {
	color: red; display: none;
}
.linha_dependentes {
	display: none;
	background: #e8f5e9 !important;
	border-radius: 0 0 8px 8px;
	padding: 4px 0;
}

/* Item de dependente - layout responsivo */
/* Badge DEPENDENTE fica no canto esquerdo superior, antes do nome */
/* Acoes ficam alinhadas a esquerda, logo apos o nome */
.dep-item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	padding: 5px 8px;
	border-bottom: 1px solid rgba(0,84,72,0.15);
	background: #e8f5e9;
}
.dep-item:last-child {
	border-bottom: none;
}
.dep-tipo {
	flex: 0 0 auto;
	font-size: 0.72rem;
	color: #2CBAA3;
	font-weight: 600;
	text-transform: uppercase;
	background: #fff;
	border: 1px solid #2CBAA3;
	border-radius: 20px;
	padding: 1px 8px;
}
.dep-nome {
	flex: 1 1 120px;
	min-width: 80px;
	font-size: 0.82rem;
	color: #005448;
	font-weight: 600;
}
/* Acoes do dependente: alinhadas a esquerda (sem margin-left: auto) */
.dep-acoes {
	flex: 0 0 auto;
	display: flex;
	gap: 4px;
	align-items: center;
}
/* Botoes de acao do titular (mobile): flex-wrap para nao quebrar layout */
.btn-acoes-titular {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 8px;
	align-items: center;
}
.dep-btn-edit {
	background: none;
	border: none;
	cursor: pointer;
	padding: 2px;
	color: #005448;
	display: flex;
	align-items: center;
}
.dep-btn-edit:hover {
	color: #2CBAA3;
}
.open-register-dialog svg{
	float: right;
	margin-top: 3px;
	margin-left: 5px;
}
.mb-65{
 margin-bottom:65px;	
}

* {
  scrollbar-width: thin;
  scrollbar-color: #2CBAA3  #005448;
}
*::-webkit-scrollbar {
  width: 12px;
}

*::-webkit-scrollbar-track {
  background: #005448;
}

*::-webkit-scrollbar-thumb {
  background-color: #2CBAA3 ;
  border-radius: 20px;
  border: 3px solid #005448;
}
/* Margem top padrao: altura do navbar (logo 63.85px + padding 16px = ~80px) + folga */
.mt-75{
	margin-top: 85px;
}
/* Margem top quando ha barra de titulo: navbar (~80px) + barra titulo (40px) + folga */
.mt-75-bar{
	margin-top: 125px;
}
.pb-3{
	padding-bottom:3px;
}

.cartaoexame_carteirinha{
	background-color:#005448 !important;
	border-radius: 15px;
	color: #FFF;
	font-weight: bold;
	padding: 0;
	height: 255px
}
.cartaoexame_carteirinha_verso{
	background-color:#005448 !important;
	border-radius: 15px;
	height: 255px;
	color: #FFF;
}
.cartaoexame_carteirinha,
.cartaoexame_carteirinha_verso {
	width: 100%;
	max-width: 450px;
}
.cartaoexame_carteirinha hr{
	border: solid 3px #FFF;
	opacity: 1;
}
.cartaoexame_carteirinha .logo_carteirinha{
	width: 100px !important;
	position: absolute;
	margin-top: -35px;
	margin-left: 320px;
}
.cartaoexame_carteirinha .icon-plus{
	position: absolute;
	width: 80px;
	margin-top: -43px;
}
.cartaoexame_carteirinha h1{
	font-size: revert !important;
}
.cartaoexame_carteirinha .wpp-branco{
	position: absolute;
	width: 40px;
	margin-top: -43px;
	margin-left: 175px;
}
.icones-cv {
	padding: 4px !important;
	margin: 0 3px 5px 0 !important;
	background-color:#005448 !important;
	border: solid 1px #FFF;
}
@media (max-width: 767px) {
	.cartaoexame_carteirinha,
	.cartaoexame_carteirinha_verso {
		width: 100% !important;
		max-width: 350px;
	}

	.cartaoexame_carteirinha .logo_carteirinha{
		position: absolute !important;
		margin: 5px 10px 10px 220px !important;
	}

	.cartaoexame_carteirinha h1 {
		text-align: center;
	}
	
}
#toastStack{
	margin-bottom: 60px;
}
.mostra-mobile{
	display:none;
}
.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* espaçamento entre ícone e texto */
}

@media (max-width: 768px) {
	#rodape-person{
		font-size: 10px !important;
	}
	.mostra-mobile{
		display:block;
	}
	.oculta-mobile{
		display:none;
	}
	.p-25-10 {
		padding: 25px 1%;
	}
	.cartaoexame_carteirinha .icon-plus {
		position: absolute;
		width: 50px;
		margin-top: -28px;
	}
	.cartaoexame_carteirinha .wpp-branco {
		margin-left: 70px !important;
	}
}
.tabela-scroll {
    overflow-x: auto;
    width: 100%;
}

.tabela-scroll > div {
    min-width: 600px; /* largura mínima para evitar quebra */
}
.c-pointer{
	cursor: pointer !important;
}
/* =====================================================
   AJUSTES APP - Tela Interna (adicionado pelo app-bridge)
   ===================================================== */

/* --- Menu estilo APP moderno (Bottom Navigation Bar) ---
   No mobile (web e app), o hamburguer e substituido por uma
   barra de navegacao inferior, padrao de apps modernos como Gmail, Instagram, etc.
   Melhora tanto a versao web mobile quanto o app. */

@media (max-width: 768px) {

    /* Oculta o botao hamburguer - nao e mais necessario */
    .navbar-toggle {
        display: none !important;
    }

    /* O menu deixa de ser um dropdown e vira uma bottom nav bar */
    /* Fica ACIMA do rodape (rodape tem ~40px, menu fica em bottom: 40px) */
    .navbar-menu {
        position: fixed !important;
        bottom: 40px !important;
        top: auto !important;
        left: 0 !important;
        width: 100% !important;
        background-color: #FFF !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-around !important;
        gap: 0 !important;
        padding: 8px 0 !important;
        border-top: 1px solid #eee !important;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.08) !important;
        display: flex !important;
        z-index: 1001 !important;
    }

    /* Cada item do menu na bottom nav */
    .navbar-menu .nav-item {
        flex: 1;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 11px !important;
        padding: 4px 2px !important;
        gap: 2px;
        border-bottom: none !important;
        min-width: 0;
    }

    /* Item ativo na bottom nav */
    .navbar-menu .nav-item.active {
        color: #2CBAA3 !important;
        border-bottom: none !important;
    }

    .navbar-menu .nav-item.active svg {
        stroke: #2CBAA3 !important;
    }

    /* Hover na bottom nav */
    .navbar-menu .nav-item:hover {
        color: #2CBAA3 !important;
        border-bottom: none !important;
    }

    .navbar-menu .nav-item:hover svg {
        stroke: #2CBAA3 !important;
    }

    /* Ajusta o conteudo para nao ficar atras da bottom nav + rodape fixo */
    /* O padding-bottom garante que o ultimo elemento nao fique atras do rodape+menu */
    .mt-75 {
        padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)) !important;
    }
    /* Quando ha barra de titulo fixa, o padding-bottom tambem se aplica */
    .mt-75-bar {
        padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* Cabecalho "Seja bem-vindo" - reduzir fonte e padding no mobile */
    .row.bg-img-green.p-50-10 h1 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }
    .row.bg-img-green.p-50-10 {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }

    /* Rodape fixo logo acima da bottom nav bar */
    /* Rodape fixo na base da tela (abaixo do menu) */
    #rodape-person {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
        margin-bottom: 0 !important;
    }
}

/* ============================================================
   FOTO DE PERFIL - wrapper clicavel com overlay de upload
   ============================================================ */
.foto-perfil-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid #005448;
    background: #e8f5e9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.foto-perfil-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.foto-perfil-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 35%;
    background: rgba(0, 84, 72, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.foto-perfil-wrapper:hover .foto-perfil-overlay {
    opacity: 1;
}

/* No mobile/app sempre mostra o overlay (sem hover) */
@media (max-width: 768px) {
    .foto-perfil-overlay {
        opacity: 1;
    }
}

/* ============================================================
   AVATAR NO NAVBAR (desktop) - foto ou iniciais
   ============================================================ */
/* Exibe o avatar APENAS em desktop (>768px) */
/* Em mobile, o avatar esta dentro do bottom nav como item Perfil */
@media (min-width: 769px) {
    /* Avatar fixo no canto superior direito - visivel em desktop */
    .navbar-avatar {
        display: flex !important;
        position: fixed !important;
        top: 10px !important;
        right: 15px !important;
        z-index: 1100 !important;
    }
}
/* Avatar fixo no canto superior direito - visivel em TODAS as resolucoes */
/* Em mobile, aparece no canto superior direito da navbar (que e position:fixed) */
@media (max-width: 768px) {
    /* Mostra a bolinha no canto superior direito mesmo no mobile */
    .navbar-avatar {
        display: flex !important;
        position: fixed !important;
        top: 10px !important;
        right: 10px !important;
        z-index: 1100 !important;
    }
}

.avatar-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.7);
}

.avatar-initials {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #2CBAA3;
    color: #fff;
    font-weight: 700;
    font-size: 1.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3.5px solid rgba(255,255,255,0.7);
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.5px;
}

/* Avatar menor para o icone do menu Perfil na bottom nav */
.avatar-sm {
    width: 26px !important;
    height: 26px !important;
    font-size: 0.65rem !important;
    border-width: 1.5px !important;
}

.nav-avatar-img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #7A7A7A;
}

/* =====================================================
   RODAPE FIXO NA BASE DA TELA EM DESKTOP
   ===================================================== */

/* Em desktop (acima de 768px), o rodape fica fixo na base */
@media (min-width: 769px) {
    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    /* O container principal ocupa todo o espaco disponivel */
    .container-fluid {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    /* O rodape fica fixo na base */
    #rodape-person {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 999;
    }

    /* Adiciona margem inferior ao conteudo para nao ficar atras do rodape */
    .container-fluid .ultima-row,
    .container-fluid > .row:last-of-type {
        margin-bottom: 80px;
    }
}

/* ============================================================
   CLASSES RESPONSIVAS PARA LAYOUT DESKTOP/MOBILE
   Substituem as classes Tailwind md:hidden e hidden md:block
   para garantir funcionamento independente do CDN
   ============================================================ */
/* Visivel apenas em desktop (>= 768px) */
.desktop-only {
    display: block;
}
/* Visivel apenas em mobile (< 768px) */
.mobile-only {
    display: none;
}
@media (max-width: 767px) {
    .desktop-only {
        display: none !important;
    }
    .mobile-only {
        display: block !important;
    }
}

/* =====================================================
   DEP-VISIBLE - Classe para forcar exibicao dos dependentes
   Sobrescreve o display:none do .linha_dependentes
   Usada pelo JS ao carregar dependentes via AJAX
   ===================================================== */
.linha_dependentes.dep-visible {
    display: block !important;
}
