body,
button,
input,
select,
textarea,
.form-control,
.select2-container,
.select2-results__option {
  font-family: sans-serif !important;
}

.body {
	min-height:  100vh ;
	width: 100%;
}

.VERM {
  background-color: #fc4c4c !important; 
  color: #000;
}

.VERD {
  background-color: #32CD32 !important; 
}
.AMARELO {
  background-color: #FFD700 !important; 
}
tr{  color: #000 !important;
text-align:center;
height: 10px !important;
}

table td {
 padding: 2px !important;
  text-align:center;
  z-index: 2 !important;
  
}
.selected_table {
  background-color: #08c !important; 
}

.table-responsive {
  min-height: 350px !important;
  height: calc(100vh - 150px) !important; /* Ajuste o valor 100px conforme necessário */
  
}

::placeholder {
  color: #6c757d !important;
  font-style: italic;
}
.text-input{
position: absolute;
top: 0;
left: 0;
height: 100%;
width:100%;
padding: 0 0px;
background-color: transparent;
}
.text-input2{
width:100px !important;
}
.text-input4{
width:150px !important;
}
.text-input5{
width:250px !important;
}
.text-input3{
width:80px !important;
}
.verm {
background: #8B0000;
color: #fff;
}
.red{
color: #FF0000 !important;
font-weight: bold;
}
#card_section {
overflow: scroll !important;
height: 550px !important;
width: 100%;
background: #FFF;
}
.card-body-nopadding{
background: #FFF !important;
}

.coluna-fixa {
  /* Ajuste a largura conforme necessário */
  width: 60px;
  position: sticky;
  left: 0;
  z-index: 1002  !important;
  background-color: white;}
.coluna-fixa-th {
  /* Ajuste a largura conforme necessário */
  width: 60px;
  position: sticky;
  left: 0;
  z-index: 1003  !important;
  background-color: white;}
th span {
/*color: transparent;*/
user-select: none; /* Evita que o texto seja selecionado */
}

.tab-content {
  height: 97%; /* Defina a altura total do conteúdo da aba */
}

.tab-pane {
  height: calc(100vh - 170px); /* Defina a altura das abas, ajustando conforme necessário */
  overflow-y: auto; /* Adicione overflow para permitir o scroll vertical */
  padding: 3px; /* Adicione algum padding se necessário */
}

.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12, .col, .col-auto, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm, .col-sm-auto, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12, .col-md, .col-md-auto, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg, .col-lg-auto, .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl, .col-xl-auto {
  position: relative;
  width: 100% ;
  min-height: 1px ;
  padding-right: 3px !important;
  padding-left: 3px !important;
}
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: 3px !important;
  margin-left: 3px !important;
}
.form-control{
 /*  padding: 0.00rem !important;*/
  border: 1.6px solid #9aa4ad !important;
  box-shadow: none;
  font-size: 0.86rem !important;
  line-height: 1.25 !important;
  padding: 4px 10px !important;
  box-sizing: border-box;
}

input.form-control,
select.form-control,
.bootstrap-tagsinput {
  height: 32px !important;
  min-height: 32px !important;
}

.form-control:focus {
  border-color: #2b5d85 !important;
  box-shadow: 0 0 0 2px rgba(43, 93, 133, 0.18);
}

.select2-container .select2-selection,
.select2-container--bootstrap .select2-selection,
.bootstrap-tagsinput {
  border: 1.6px solid #9aa4ad !important;
  box-sizing: border-box;
}

.select2-container .select2-selection--single,
.select2-container--bootstrap .select2-selection--single {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 24px 0 10px !important;
}

.select2-container .select2-selection__rendered,
.select2-container .select2-search__field,
.bootstrap-tagsinput input {
  font-size: 0.86rem !important;
}

.select2-container .select2-selection--single .select2-selection__rendered,
.select2-container--bootstrap .select2-selection--single .select2-selection__rendered {
  line-height: 28px !important;
  padding: 0 !important;
}

.select2-container .select2-search__field,
.bootstrap-tagsinput input {
  line-height: 28px !important;
}

.select2-container .select2-selection--single .select2-selection__arrow,
.select2-container--bootstrap .select2-selection--single .select2-selection__arrow {
  height: 28px !important;
}

.select2-container--focus .select2-selection,
.select2-container--bootstrap.select2-container--focus .select2-selection,
.select2-container--open .select2-selection {
  border-color: #2b5d85 !important;
  box-shadow: 0 0 0 2px rgba(43, 93, 133, 0.18);
}

input[type="number"].form-control,
input[type="number"] {
  text-align: right;
}

form label,
.col-form-label,
.form-label,
.control-label {
  font-size: 0.84rem !important;
  font-weight: 600;
}

.col-form-label{
  padding-top: calc(0.1rem + 1px) !important;
  padding-bottom: calc(0.1rem + 1px) !important;
}

.sag-cad-tabs {
  background-color: #fafafa;
  border-bottom: 2px solid #e0e0e0 !important;
  margin: 0 !important;
  padding: 0 15px !important;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 2;
}

.sag-cad-tabs .nav-item {
  margin-bottom: 0 !important;
}

.sag-cad-tabs .nav-link {
  background-color: transparent !important;
  border: none !important;
  border-bottom: 3px solid transparent !important;
  border-radius: 0 !important;
  color: #666 !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px !important;
  font-weight: 500;
  margin-bottom: -2px;
  padding: 12px 16px !important;
  transition: all 0.3s ease;
  min-height: 44px;
}

.sag-cad-tabs .nav-link:hover {
  background-color: rgba(0, 0, 0, 0.02) !important;
  border-bottom-color: #ccc !important;
  color: #333 !important;
}

.sag-cad-tabs .nav-link.active {
  background-color: #fff !important;
  border-bottom-color: #007bff !important;
  color: #007bff !important;
  box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.08);
}

.sag-cad-tabs .material-icons,
.sag-cad-tabs .material-symbols-outlined {
  font-size: 16px;
  line-height: 1;
}

.material-icons, .material-symbols-outlined{
  font-weight: 100;
  font-size: 16px;
}

.status-sidebar {
  width: 100%;
  background: white;
  padding: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  z-index: 1000;
  max-height: 85vh; 
  overflow-y: auto;
}
.status-card {
  background: #f5f5f5;
  padding: 10px;
  margin: 5px 0;
  border-radius: 3px;
  z-index: 1000;
}
#mapa {
position: relative; /* ou static */
z-index: 1;

}
.status-card.selecionado {
  background-color: #2b5d85;
  color: white;
  border: 1px #2b5d85;
}

.info-window button {
  width: 20px;
  height: 20px;
  font-size: 10px;
  padding: 2px;
}

.info-window button i {
  font-size: 14px;
}

input.form-control:required,
select.form-control:required,
textarea.form-control:required {
  border-left: 3px solid #dc3545 !important;
}

input.form-control:required:focus,
select.form-control:required:focus,
textarea.form-control:required:focus {
  box-shadow: inset 3px 0 0 #dc3545;
}

select.form-control:required + .select2-container .select2-selection,
select.populate:required + .select2-container .select2-selection {
  border-left: 3px solid #dc3545 !important;
}

select.form-control:required + .select2-container--bootstrap .select2-selection,
select.populate:required + .select2-container--bootstrap .select2-selection {
  border-left: 3px solid #dc3545 !important;
}

select.form-control:required + .select2-container.select2-container--focus .select2-selection,
select.populate:required + .select2-container.select2-container--focus .select2-selection {
  box-shadow: inset 3px 0 0 #dc3545 !important;
}

td, th {
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  min-width: auto !important;          /* Célula cresce conforme conteúdo */
  width: auto !important;               /* Largura automática */
}

.table {
  table-layout: auto !important;        /* Permite que colunas cresçam */
  width: 100% !important;
}

th {
  position: relative;
  z-index: 100;
}

/* Adicione estas classes no seu CSS */
.PENDENTE {
  background-color: #EEE8AA !important;  /* Laranja para Pendente */
  color: #000;
}

.EXECUCAO {
  background-color: #00BFFF !important;  /* Amarelo para Em Execução */
  color: #000;
}

.AGUARDANDO {
  background-color: #3CB371 !important;  /* Verde claro para Liberado */
  color: #000;
}

.FINALIZADO {
  background-color: #A9A9A9 !important;  /* Verde para Finalizado */
  color: #000;
}

.FINALIZADO_PROTHEUS {
  background-color: #006400 !important;  /* Verde escuro para Finalizado Protheus */
  color: #FFF;
}

/* Mantenha as classes existentes que você já tem */
.VERM {
  background-color: #fc4c4c !important; 
  color: #000;
}

.VERD {
  background-color: #32CD32 !important; 
}

.AMARELO {
  background-color: #FFD700 !important; 
}

/* Garantir que a tabela ocupe toda a largura */
.table {
    width: 100% !important;
    table-layout: auto;
}

/* CORREÇÃO PARA O SCROLL FUNCIONAR */
#torre_grid {
    height: calc(100vh - 200px) !important;
    overflow-y: auto !important;
    display: block !important;
}

#grid {
    height: calc(100vh  ) !important;
    overflow-y: auto !important;
    display: block !important;
}

#grid .table {
    width: 100%;
    margin-bottom: 0;
}

/* Garantir que a tabela ocupe todo o espaço */
#torre_grid .table {
    width: 100%;
    margin-bottom: 0;
}

/* Estilo para a mensagem de carregamento */
#carregando {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    position: sticky;
    bottom: 0;
    z-index: 1000;
}

/* Melhorar a visualização da tabela */
#dados-tbody tr {
    height: 20px;
}

#dados-tbody td {
    vertical-align: middle;
    padding: 0px 0px !important;
}

/* Estilo para o botão de exportar */
#btnExportarExcel {
    background-color: #17a2b8 !important;
    border-color: #17a2b8 !important;
    color: white !important;
}

#btnExportarExcel:hover {
    background-color: #138496 !important;
    border-color: #117a8b !important;
}

#btnExportarExcel:disabled {
    opacity: 0.6;
    cursor: wait;
}

.dropdown-menu {
  z-index: 1050 !important;
}
.btn-filter-toggle {
    color: #fff;
    border-color: #fff;
}

/* Destaque para motoristas/funcionários inativos */
.motorista-inativo,
option.motorista-inativo,
.select2-results__option.motorista-inativo {
    background-color: #ffe6e6 !important;
    color: #999 !important;
}

.select2-results__option.motorista-inativo:hover {
    background-color: #ffd6d6 !important;
}

/* ALERTAS CUSTOMIZADOS PARA FORMULÁRIOS */
.alert-custom {
	padding: 15px;
	margin-bottom: 20px;
	border-radius: 4px;
	border-left: 5px solid;
	display: flex;
	align-items: center;
	gap: 15px;
	font-size: 14px;
}

.alert-custom-success {
	background-color: #d4edda !important;
	border-color: #28a745 !important;
	color: #155724 !important;
}

.alert-custom-error {
	background-color: #f8d7da !important;
	border-color: #dc3545 !important;
	color: #721c24 !important;
}

.alert-custom-warning {
	background-color: #fff3cd !important;
	border-color: #ffc107 !important;
	color: #856404 !important;
}

.alert-custom-info {
	background-color: #d1ecf1 !important;
	border-color: #17a2b8 !important;
	color: #0c5460 !important;
}

.alert-custom strong {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
}

.alert-custom button.close {
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	opacity: 0.5;
	padding: 0;
	margin-left: auto;
	flex-shrink: 0;
}

.alert-custom button.close:hover {
	opacity: 1;
}

.alert-messages-container {
	margin-bottom: 20px;
}

/* ESTILOS PARA FORMULÁRIOS COM ABAS (TABS) */
#cadform .tab-content {
	overflow: visible !important;
	height: auto !important;
}

#cadform .tab-pane {
	height: auto !important;
	overflow: visible !important;
	max-height: none !important;
}

#cadform .card-body {
	overflow: visible !important;
	max-height: none !important;
}

/* Histórico de movimentações: tabelas devem ter altura automática conforme dados */
#historico_movimentos .table-responsive {
	min-height: 0 !important;
	height: auto !important;
}
/* Campos readonly com fundo cinza devem ter texto visível */
input[readonly],
textarea[readonly],
select[readonly] {
    color: #495057 !important;
}

/* Placeholders dos campos readonly também devem ser visíveis */
input[readonly]::placeholder,
textarea[readonly]::placeholder {
    color: #6c757d !important;
    opacity: 1 !important;
}

input[readonly]::-webkit-input-placeholder {
    color: #6c757d !important;
    opacity: 1 !important;
}

input[readonly]:-ms-input-placeholder {
    color: #6c757d !important;
    opacity: 1 !important;
}

input[readonly]::-ms-input-placeholder {
    color: #6c757d !important;
    opacity: 1 !important;
}

.select2-results__option.motorista-inativo:hover {
    background-color: #ffd6d6 !important;
}

/* LOADER OVERLAY */
.loading-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	z-index: 9999;
}

.loading-overlay .spinner-border {
	width: 3rem;
	height: 3rem;
	border-width: 0.3em;
}

.loading-text {
	color: white;
	margin-top: 1rem;
	font-size: 1rem;
	font-weight: 500;
}

/* ALERT MESSAGES */
.alert-messages-container {
	margin: 15px 0;
	min-height: 0;
}

.alert-messages-container .alert {
	margin: 0;
	padding: 12px 16px;
	border-radius: 4px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.alert-messages-container .alert-success {
	background-color: #d4edda;
	border: 1px solid #c3e6cb;
	color: #155724;
}

.alert-messages-container .alert-danger {
	background-color: #f8d7da;
	border: 1px solid #f5c6cb;
	color: #721c24;
}

.alert-messages-container .btn-close {
	padding: 0;
	width: auto;
	height: auto;
	margin-left: 10px;
	font-size: 18px;
	line-height: 1;
	color: inherit;
	opacity: 0.7;
	border: none;
	background: transparent;
	cursor: pointer;
}

.alert-messages-container .btn-close:hover {
	opacity: 1;
}

.badge {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 100% !important;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

/* MOBILE FIRST: destrava rolagem e remove layout dividido em telas TMS */
@media (max-width: 991px) {
    html,
    body {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
        min-height: 100% !important;
    }

    .inner-wrapper,
    .content-body {
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    .content-body.card-margin .card,
    .card-body,
    .card-body-tms {
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        margin-top: 10px !important;
    }

    .tab-content,
    .tab-pane,
    #cadform .tab-content,
    #cadform .tab-pane {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .table-responsive {
        height: auto !important;
        min-height: 0 !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
    }

    .torretms_cad {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .torretms_cadform,
    .torretms_cadtab {
        width: 100% !important;
    }

    #mapa {
        height: 50vh !important;
        max-height: 60vh !important;
        min-height: 280px !important;
    }
}
