* {
    box-sizing: border-box;
   
    padding: 0;     
}


html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
}

body.painel{
    font:12px Arial,Georgia, "Times New Roman", Times, serif;
    color:#333;/*cor marrom escuoro */
    /*background: #b5dfcf; cor verde claro de fundo do painel    STYLE DO SEMENTE*/
      background:#7c97e326;
          overflow: hidden; /* 👈 evita esse bug visual */
}


a:link, a:active, a:visited{
    text-decoration: none;
    /*color:#fbfeff;cor cinza da letra do menu */
}
a:hover{
    text-decoration: underline;
}

#wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#wrap-content {
    flex: 1;
    /*display: flex;*/
    overflow: hidden;
}

#content {
    flex: 1;
    flex-direction: column;
        /* 👇 Centraliza horizontalmente (eixo secundário) */
    align-items: center; 
    justify-content: center; 

    margin: 10px 25px 0 25px;
}

#header{
    height: 70px;
    border-bottom: 2px solid #363636;/* cor preta*/
    padding: 10px;
}
#header h1{
    font-size: 25px;
    margin-top: 5px;
}


#content h2{
    font-size: 20px;
    border-bottom: 1px solid #fbfbfb;/*branco*/
    margin-bottom: 10px;
}


footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30px; /* altura fixa */
  background: #f1df01;
  color: #333;
  display: flex;
  align-items: center; /* centraliza verticalmente */
  justify-content: center; /* centraliza horizontalmente */
  font-size: 12px;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.2);
  white-space: nowrap; /* impede quebra de linha */
  overflow: hidden; /* evita que ultrapasse a altura */
}

.footer-container {
  display: flex;
  justify-content: space-around;
  width: 100%;
  font-size: 12px;
}

.footer-col a {
  color: #333;
  text-decoration: none;
  font-weight: bold;
}

.footer-col a:hover {
  text-decoration: underline;
}


#loginform{
    width: 600px;
    margin:100px auto;
	/*background: #dbdcdd;   */
	background: #cbeced;/*verde claro */

}

#loginform1{
    width: 800px;
    margin:100px auto;
	background: #dbdcdd; /*cinza bem claro */ 

}




#corteIframe {
	position:  absolute;
	clip: rect(40px,424px,750px,55px); 
	width: 424px; /* pode colocar o mesmo valor do segundo parâmetro */
} 


.fullscreen {
 
}
fieldset {
    border: 2px solid #80c07a;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    width: 100%;
  
    display: flex;
    flex-direction: column;
        /* 👈 ESSENCIAL */
    min-height: 0;     /* 👈 evita bug de overflow */
}
fieldset.pai {
    flex: 1;         /* 👈 só ele cresce */
    min-height: 0;
}
fieldset.filho {
    flex: 0 0 auto;  /* 👈 cresce só pelo conteúdo */
}


.radius5 {
    
    min-height: 0;  /* 👈 evita bug */
    /*display: flex;*/
    flex-direction: column;
    overflow: auto; /* 👈 SCROLL AQUI */
    
}

.erro, .sucesso, .alerta,  .alertaVermelho, .pergunta{
    width:96%;
    padding:2%;
    margin:10px 0;
    border-radius: 5px;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    -o-border-radius: 5px;
    -ms-border-radius: 5px;
}
.sucesso{
    background: #eff4d4;/*amarelo bem claro*/
    border: 1px solid #8fad3d;/*verde claro*/
    color: #596c26;/*verde medio*/
}
.alertaVermelho{
    background: #ffea97;/*amarelo claro*/
    border: 1px solid #e2b500;/*amarelo medio*/
    color: #995f5b;/*masrrom medio*/
}

.alerta{
    background: #ea0421;/*amarelo claro*/
    border: 1px solid #040300;/*amarelo medio*/
    color: #f1e603;/*masrrom medio*/
}


.erro{
    background: #efcec9;/*salmao*/
    border: 1px solid #ad3f30;/*vermelho*/
    color: #943728;/*vermelho escuro*/
}
.pergunta{
    background: #c6d8f0;/*azul claro*/
    border: 1px solid #4381cc;/*azul medio*/
    color: #5c58b9;/*azul escuro*/
}






#box1 {
		position:absolute;
		top: 50px;
		left: 50px;
	}

	#box2 {
		position:absolute;
		top: 50px;
		right: 50px;
	}

	#box3 {

		position:absolute;
		top: 300px;
		left: 725px;
	}

	#box4 {
		position:absolute;
		bottom: 350px;
		left: 150px;
	}


/*inicio do processo de modernização visual*/

.container-dados {
    display: grid; /* 👈 ou flex */
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;

}

.item {
    display: flex;
    gap: 8px;
    font-size: 14px;
}

.label {
    font-weight: bold;
    color: #333;
    min-width: 10px;
}

.valor {
       font-size: 14px;
    margin-bottom: 10px;
    color: #555;
   
}

/* destaque opcional */
.destaque {
    font-size: 18px;
    font-weight: bold;
    color: #000;
}


/* =========================
   HEADER MODERNO
========================= */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #1f2937, #374151);
    padding: 10px 20px;
    /*border-radius: 8px;*/
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    margin-bottom:20px;
}

/* lado esquerdo */
.topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    height: 40px;
    border-radius: 4px;
}

/* nome sistema */
.sistema-nome {
    font-size: 18px;
    font-weight: bold;
    margin-left: 10px;
    color: #e5e7eb;
}

/* lado direito */
.topbar-right {
    font-size: 13px;
}

.info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sep {
    opacity: 0.4;
}

/* destaque */
.cliente {
    font-weight: bold;
    color: #60a5fa;
}

/* RESPONSIVO */
@media (max-width: 768px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .info {
        flex-wrap: wrap;
    }
}

.avatar {
    width: 32px;
    height: 32px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nivel {
    background: #10b981;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

   
	    
	    .legend-sem-fundo {
    background: none !important;
    background-color: transparent !important;
        padding: 0 0px !important; 
}



.btn-elegante-badge-teste {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00c853, #009624);
    color: #fff;
    flex-direction: column; /* 👈 um abaixo do outro */
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.25s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    gap:8px;
}

.btn-elegante-badge-teste:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.2);
}
/* título principal */
.btn-elegante .titulo {
    font-size: 14px;
    font-weight: 600;
}

/* descrição */
.btn-elegante .descricao {
    font-size: 25px;
    color:#B31717;
 
    
}


/* barra horizontal */
/* barra */
.barra-acoes {
    margin-top: auto; /* 👈 empurra pra baixo */
    display: flex;
    justify-content: center;
    gap: 10px;
    padding-top: 200px;
    flex-wrap: wrap;

}

/* grupos (se estiver usando) */
.grupo {
    display: flex;
    align-items: center;
    gap: 20px; /* 👈 espaço interno também */
}
/* grupos 
.grupo {
    display: flex;
    align-items: center;
    gap: 8px;
}*/

/* centraliza grupo do meio */
.centro {
    justify-content: center;
}

/* label */
.barra-acoes label {
    font-size: 13px;
    font-weight: 500;
    
}

/* inputs */
.barra-acoes input {
    height: 32px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* campo amostra menor */
.amostra {
    width: 60px;
    text-align: center;
}

/* ano */
.ano {
    font-weight: bold;
}

/* botões */
.btn-primary {
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-success {
    background: #10b981;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-sec {
    background: #e5e7eb;
    border: none;
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
}

/* hover */
button:hover {
    opacity: 0.9;
}

.grupo-botoes {
    display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px; /* 👈 espaçamento entre botões */

}


.badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    padding: 4px 7px;
    border-radius: 50%;
       box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* BOTÃO PRINCIPAL */

/* TEXTO INTERNO */
.btn-elegante span {
    opacity: 0.9;
}

/* HOVER */
.btn-elegante:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.35);
    background: linear-gradient(135deg, #4338ca, #4f46e5);
}

/* CLICK */
.btn-elegante:active {
    transform: scale(0.98);
}

/* BADGE DA AMOSTRA */
.btn-elegante::after {
    content: attr(data-amostra);
    margin-left: 10px;
    padding: 3px 8px;
    border-radius: 6px;

    font-size: 12px;
}

/* LEGEND AJUSTE */
legend {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    display: flex;
    justify-content: center;
    margin-top: 50px;
    background: green;
    color: white;
    font-size: 20px;
    
} 



		.modal-overlay {
		/*display: none;*/
		position: fixed;
		top: 0; left: 0; right: 0; bottom: 0;
		background-color: rgba(0, 0, 0, 0.5);
		justify-content: center;
		align-items: center;
		z-index: 1000;
            opacity: 1;
    transition: opacity 0.5s ease;
		}

.modal-overlay.hide {
    opacity: 0;
}

		.modal {
		background: white;
		padding: 2rem;
		border-radius: 12px;
		width: 100%;
		max-width: 400px;
		box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
		animation: fadeIn 0.3s ease;
		position: relative;
		}

		@keyframes fadeIn {
		from { opacity: 0; transform: translateY(-20px); }
		to { opacity: 1; transform: translateY(0); }
		}

		.close-button {
		position: absolute;
		top: 10px;
		right: 15px;
		background: none;
		border: none;
		font-size: 1.25rem;
		cursor: pointer;
		}

		.form-group {
		margin-bottom: 1rem;
		}

		.form-group label {
	
		margin-bottom: 0.3rem;
		font-weight: bold;
		}

		.form-group input {
		width: 100%;
		padding: 0.5rem;
		font-size: 1rem;
		border: 1px solid #ccc;
		border-radius: 6px;
		}


				.box:hover {
				transform: scale(1.05);
				box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
			}

			/* Estilização do campo de pesquisa */
			#search-container {
				display: none;
				position: absolute;
				top: 50%;
				left: 50%;
				transform: translate(-50%, -50%);
				width: 100%;
				max-width: 20%;
				background: white;
				padding: 45px;
				border-radius: 12px;
				box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
				text-align: center;
			}

			#sample-input {
				width: 100%;
				padding: 12px;
				font-size: 18px;
				border: 2px solid #ccc;
				border-radius: 8px;
				outline: none;
				text-align: center;
			}

			#search-message {
				margin-top: 10px;
				color: #666;
				font-size: 16px;
			}

			/* Estilo do Modal */
			.modal {
				display: none;
				position: fixed;
				top: 0;
				left: 0;
				right: 0;
				bottom: 0;
				background: rgba(0, 0, 0, 0.7);
				justify-content: center;
				align-items: center;
				width: 100%;
				height: 100%;
				z-index: 1000;
			}

			.modal-content {
				width: 80%;
				height: 90%;
				background: #fff;
				padding: 30px;
				border-radius: 12px;
				box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
				display: flex;
				flex-direction: column;
				gap: 20px;
			}

			.modal-header {
		display: flex;
		justify-content: center; /* Centraliza o título */
		align-items: center; /* Centraliza verticalmente */
		height: 80px;
		padding: 20px;
		background:rgb(173, 206, 239);
		border-bottom: 2px solid #ccc;
		font-size: 22px;
		font-weight: bold;
		text-align: center;
		width: 97%;
		position: relative; /* Mantém o botão de fechar posicionado corretamente */
	}

	.close {
		background: #ff6b6b;
		color: white;
		border: none;
		padding: 10px 15px;
		cursor: pointer;
	
		font-size: 18px;
		transition: background 0.3s;
		
		position: absolute; /* Para posicionamento dentro do modal-header */
		right: 0; /* Coloca o botão totalmente no canto direito */
		top: 0; /* Coloca o botão totalmente no topo */
		width: 50px; /* Define um tamanho fixo para manter alinhado */
		height: 50px;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.close:hover {
		background: #ff4757;
	}

			iframe {
				width: 100%;
				height: 80%;
				border: none;
			
			}

			.modal.show {
				display: flex;
				opacity: 1;
			}
			.content {
		flex: 1; /* Faz o conteúdo ocupar o espaço restante */
		padding: 20px;
		overflow-y: auto; /* Ativa rolagem se o conteúdo for maior que a tela */
	}
.espaco{
    background:white;
    color:black;
}
.btn-elegante-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;

    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;

    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    gap: 8px; /* 👈 ESPAÇO AUTOMÁTICO */
}

/* HOVER */
.btn-elegante-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #60a5fa, #2563eb);
}

/* CLICK */
.btn-elegante-badge:active {
    transform: scale(0.96);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

/* FOCUS (acessibilidade) */
.btn-elegante-badge:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.4);
} 

.badge {
    position: absolute;
    top: -6px;
    right: -6px;

    background: #ef4444;
    color: #fff;

    font-size: 11px;
    font-weight: 600;

    padding: 4px 7px;
    border-radius: 999px;

    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.btn-fechar {
    display: inline-block;
    padding: 8px 14px;
    background: #1e293b;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    transition: 0.3s;
}

.btn-fechar:hover {
    background: #334155;
    transform: translateY(-1px);
}
/* FUNDO */

#toastContainer {
    position: fixed;
    top: 20px;
    right: 20px;

    display: flex;
    flex-direction: column;
    gap: 10px;

    z-index: 9999;
}

.toast {
    min-width: 250px;
    padding: 15px 20px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;

    box-shadow: 0 5px 15px rgba(0,0,0,0.2);

    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.erro { background: #e74c3c; }
.toast.sucesso { background: #2ecc71; }
.toast.alerta { background: #ffb743; }
.toast.pergunta { background: #3498db; }
.toast.aviso { background: #f7fa54; 
color:#000}

/* ANIMAÇÃO */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}


.centromodal{
        height: 830px;

}


#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    background: rgba(0,0,0,0.5);

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 99999;
}

.loading-box {
    background: #fff;
    padding: 20px 30px;
    border-radius: 10px;
    text-align: center;
    font-size: 18px;
}

.spinner {
    border: 4px solid #ccc;
    border-top: 4px solid #333;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    margin: 0 auto 10px;

    animation: spin 1s linear infinite;
}

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


.menu {
    background: #1f2937;
    width: 100%;
}

.menu-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu-list {
    display: flex;
    gap: 15px;
    list-style: none;
    padding: 0 20px;
}

.menu-item {
    position: relative;
}

.menu-item > a {
    color: #fff;
    padding: 12px;
    display: block;
}

/* submenu */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #374151;
    min-width: 220px;
    flex-direction: column;
    z-index: 999;
}

.submenu li a {
    padding: 10px;
    display: block;
    color: #fff;
}

.menu-item:hover .submenu {
    display: flex;
}


.menu-toggle {
    display: none;
}

@media (max-width: 768px) {

    .menu-toggle {
        display: block;
        color: #fff;
        font-size: 22px;
        padding: 10px;
        cursor: pointer;
    }

    .menu-list {
        display: none;
        flex-direction: column;
        width: 100%;
    }

    .menu-list.active {
        display: flex;
    }

    .submenu {
        position: static;
        width: 100%;
    }

    .menu-item.active .submenu {
        display: flex;
    }
}



/* BASE BOTÕES */
input[name^="bt_"],
button[name^="bt_"]{
    border:none;
    border-radius:8px;
    padding:8px 14px;
    font-size:13px;
    cursor:pointer;
    transition:all 0.2s ease;
    color:#fff;
    font-weight:500;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
}

/* HOVER */
input[name^="bt_"]:hover,
button[name^="bt_"]:hover{
    transform:translateY(-1px);
    box-shadow:0 4px 12px rgba(0,0,0,0.2);
}

/* CLICK */
input[name^="bt_"]:active{
    transform:scale(0.97);
}

/* DESABILITADO */
input[name^="bt_"]:disabled{
    background:#ccc !important;
    cursor:not-allowed;
}

/* ========================= */
/* 🎨 CORES INTELIGENTES */
/* ========================= */

/* SALVAR / GRAVAR */
input[name*="gravar"],
button[name*="gravar"]{
    background:linear-gradient(135deg,#4CAF50,#2e7d32);
}

/* CALCULAR */
input[name*="calcular"],
button[name*="calcular"]{
    background:linear-gradient(135deg,#2196F3,#1565C0);
}

/* EXCLUIR / DELETE */
input[name*="excluir"],
button[name*="excluir"]{
    background:linear-gradient(135deg,#f44336,#b71c1c);
}

/* ATUALIZAR */
input[name*="atualiza"],
button[name*="atualiza"]{
    background:linear-gradient(135deg,#ff9800,#ef6c00);
}

/* ABRIR / BUSCAR */
input[name*="abrir"],
button[name*="abrir"],
input[name*="achar"],
button[name*="achar"]{
    background:linear-gradient(135deg,#9c27b0,#6a1b9a);
}

/* DEFAULT (caso não encaixe em nenhum) */
input[name^="bt_"]:not([name*="gravar"]):not([name*="calcular"]):not([name*="excluir"]){
    background:linear-gradient(135deg,#607d8b,#37474f);
}

/* ========================= */
/* ✨ TAMANHO E LAYOUT */
/* ========================= */

.actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:10px;
}




/* CARDS */
.card{
    background:#fff;
    padding:15px;
    border-radius:10px;
    margin-bottom:10px;
    box-shadow:0 4px 10px rgba(0,0,0,0.08);
        display:flex;
    flex-direction:column;
  
    overflow:hidden;

}
.card-title{
    font-weight:bold;
    margin-bottom:1px;
    font-size:14px;
}

/* TABELAS */
.table-container{
    overflow:auto;
}

table{
    width:100%;
    border-collapse:collapse;
    font-size:13px;
}

table th{
    background:#4CAF50;
    color:#fff;
    padding:6px;
}

table td{
    padding:3px;
    border-bottom:1px solid #ddd;
}

/* INPUTS */
input,select{
    padding:5px;
    border-radius:6px;
    border:1px solid #ccc;
    font-size:13px;
}

/* GRID DAS LEITURAS */
.container{
    display:grid !important;
    grid-template-columns:repeat(7,1fr);
    gap:5px;
}

.items{
    border:1px solid #ccc;
    border-radius:6px;
    text-align:center;
    padding:5px;
}

/* SELEÇÃO */
.selected{
    background:#4CAF50 !important;
    color:#fff;
}