body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    height: 100vh;
    justify-content: center;
    align-items: stretch;
}



/*************************************/
/* Cabeçalho */
/*************************************/

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #333;
    color: white;
    padding: 10px 20px;
}
header .buttons a {
    margin-left: 10px;
    padding: 5px 10px;
    color: white;
    background-color: #555;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
}
header .buttons a:hover {
    background-color: #777;
}
#tabs-container {
    display: flex;
    flex-wrap: wrap;
    background-color: #f1f1f1;
    padding: 5px;
    border-bottom: 1px solid #ddd;
}
#tabs {
    display: flex;
    flex-wrap: wrap;
    flex-grow: 1;
}
#tabs .tab {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    margin: 5px;
    background-color: #ddd;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
}
#tabs .tab.active {
    background-color: #bbb;
    font-weight: bold;
}
#tabs .tab span {
    flex-grow: 1;
}
#tabs .tab button {
    background: none;
    border: none;
    font-size: 16px;
    color: #555;
    cursor: pointer;
    display: none;
}
#tabs .tab:hover button {
    display: inline;
}
#tabs .tab button:hover {
    color: red;
}
#add-tab {
    margin-left: 5px;
    padding: 5px 10px;
    cursor: pointer;
    color: white;
    background-color: #007BFF;
    border: none;
    border-radius: 5px;
    align-self: flex-start;
}
#add-tab:hover {
    background-color: #0056b3;
}


/*************************************/
/* Tabela
/*************************************/

#contents {
    padding: 20px;
}
.conteudo{
    padding: 20px;

}


.tabledata{
    font-size: 13px;
    border-collapse: collapse;
}
.tabledata .num, .tabledata .float{
    text-align: right;
}
.tabledata tr.filho td:first-child{
    padding-left: 15px;
}
.tabledata tr.filho td{
    background-color: #e7e3e3;
}
/* Define um contêiner para limitar o scroll */
.table-container {
    overflow-y: auto; /* Permite o scroll na tabela */
    max-height: 70vh; /* Altura máxima da área de scroll */
    border: 1px solid #000;
}
.tabledata td, .tabledata th {
    white-space: nowrap; /* Impede a quebra automática de texto */
    padding: 2px;
}
/* Define o cabeçalho fixo */
.tabledata thead tr {
    position: sticky; /* Torna o cabeçalho fixo */
    top: 0; 
    z-index: 2; 
    background-color: #fff;
}
/* Define o rodape fixo */
.tabledata tfoot  {
    position: sticky; /* Torna o cabeçalho fixo */
    bottom: 0; 
    z-index: 2; 
    background-color: #f4f5eb;
    border: 1px solid #000;
}
.tabledata tr:hover, .tabledata tr.filho:hover{
    background-color: #ecece7;
}
.tabledata tfoot tr td {
    position: relative; /* Necessário para posicionar a tooltip */
}
 /* Estilo para a tooltip */
.tabledata tfoot tr td[alt]::after {
    content: attr(alt); /* Pega o conteúdo do atributo "alt" */
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    top: -30px; /* Acima da linha */
    left: 10px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
    pointer-events: none; /* Evita interferência do mouse */
}

/* Exibe a tooltip ao passar o mouse */
.tabledata tfoot tr td[alt]:hover::after {
    opacity: 1;
    visibility: visible;
}

.form-container  input,
.form-container  select {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s ease;
}

.tabledata .moreInvoice{
    float: right;
    text-decoration: none;
    border: 1px solid #000;
    border-radius: 20%;
    padding: 2px;
    font-size: 10px;
}


/*************************************/
/* Outros */
/*************************************/


/* Estilo do botão de alternância */
.switch {
	position: relative;
	display: inline-block;
	width: 60px;
	height: 24px;
  }
  
  .switch input {
	opacity: 0;
	width: 0;
	height: 0;
  }
  
  .slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ccc;
	transition: .4s;
	border-radius: 24px;
  }
  
  .slider:before {
	position: absolute;
	content: "";
	height: 16px;
	width: 16px;
	left: 0;
	bottom: 4px;
	background-color: white;
	transition: .4s;
	border-radius: 50%;
  }
  
  input:checked + .slider {
	background-color: #2196F3;
  }
  
  input:checked + .slider:before {
	transform: translateX(40px);
  }
  


/* Estilo da camada de carregamento */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Cor preta com 50% de transparência */
    color: white;
    font-size: 24px;
    text-align: center;
    line-height: 100vh; /* Centraliza verticalmente o texto */
    z-index: 9999; /* Certifica-se que a camada fica acima de todos os outros elementos */
}



/*************************************/
/* caixa dos filtros  */
/*************************************/

.caixa{
    padding: 10px;
    margin: 10px;
    width: calc(100% - 25px);
    position: relative;
}
.caixasub{
    padding: 10px;
    margin: 5px 10px;
    width: calc(100% - 25px);
    position: relative;
}
.caixainterna{
    border: 1px solid #9b7d7d;
    border-radius: 15px;
    background:rgba(224, 220, 220);
}





.caixasub .remove,
.caixa .removeaberta{
    position: absolute;
    display: block;
    top: 10px;
    right: 10px;
    z-index: 11;
    background-color: red;
    display: block;
    font-size: 10px;
    padding: 5px 10px;
    cursor: pointer;
    color: white;
    border: none;
    text-decoration: none;
    border-radius: 5px;
    align-self: flex-start;
}
.caixa .removeaberta{
    background-color: red;
}

.caixa .condicao, .caixa .condicaoaberta{
    text-align: center;
}
.caixa .condicao select,
.caixa .condicaoaberta select{
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-top: 10px;
}
/* Estilo da seta */
.seta {
    content: '';
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #007bff;
    margin: 10px auto;
    display: block;
}
/* Estilo do botão adicionar (+) */
.adicionar {
    font-size: 24px;
    text-decoration: none;
    color: #fff;
    background: #007bff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 8px auto 0 auto;
}
.adicionar:hover {
    background: #0056b3;
}
.adicionaraberta{
    width: 80px;
    background-color: rgb(78, 141, 18);
    margin: 8px;
}

.infos{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.infos .cx {
    background-color: #fff;
    border: 2px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    flex: 1;
    position: relative;
    margin: 0 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.infos .primeira{
    max-width: 30%;
}
.infos .arrow::after {
    content: '\2192'; /* Unicode for right arrow */
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #007bff;
}
.infos .cx:first-child {
    margin-left: 0;
}
.infos .cx:last-child {
    margin-right: 0;
}
.infos .cx.arrow:last-child::after {
    content: none;
}
.infos input,
.infos select{
    width: calc(100% - 22px);
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-top: 10px;
}
.infos h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}



.container {
    position: relative;
    border: 2px solid #007bff;
    resize: both; /* Permite redimensionamento do container */
    overflow: hidden;
    min-width: 300px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 300px;
    max-height: 1200px;
    height: 500px;
}
.container .canvas {
    text-align: center;
    display: block;
    width: 100%;
    height: 100%; 
}




/*************************************/
/* caixa dos filtros  */
/*************************************/
.button{
    font-size: 24px;
    text-decoration: none;
    color: #fff;
    background: #5a6d82;
    border: 1px solid rgb(41, 41, 116);
    border: none;
    border-radius: 50%;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 8px auto 0 auto;
}
.button:hover{
    background-color: #2196F3;
}




/*************************************/
/* select estilizado */
/*************************************/

/* Container principal */
.containerb {
    width: auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

/* Rótulo */
.labelb {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* Botão do dropdown */
.select-wrapper {
    position: relative;
    margin-top: 10px;
}

.select-button {
    width: 100%;
    background: #e0e0e0;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
}

.select-button:hover {
    background: #d6d6d6;
}

/* Dropdown */
.dropdown {
    position: absolute;
    top: 40px;
    width: 100%;
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 10;
    max-height: 300px; /* Define a altura máxima */
    overflow-y: auto;   /* Ativa a rolagem se necessário */
}

.hidden {
    display: none;
}

/* Lista de opções */
.optionsList {
    list-style: none;
    padding: 0;
    margin: 0;
}

.optionsList li {
    padding: 10px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.optionsList li input {
    margin-right: 10px;
}

.optionsList li:hover {
    background: #f0f0f0;
}
.optionsList, .optionsList li {
    user-select: none;
}

/* Opção marcada */
.selected-option {
    background-color: #cce5ff !important;
}

/* Botões selecionados */
.selected-container {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.selected-item {
    background: #007bff;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.remove-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.remove-btn:hover {
    color: #d0d0d0;
}

/* Botão de envio */
.submit-button {
    margin: 15px auto;
    background: #28a745;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

.submit-button:hover {
    background: #218838;
}



.caixafuncoes .caixasub{
    border: 1px solid #9b7d7d;
    border-radius: 15px;
    background:rgb(253, 253, 253);
    margin-bottom: 10px;
}
