/* =====================================
   CONTAINER FILTROS
=====================================*/
.filtros-ambientes{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:15px;
    align-items:end;
    margin-bottom:20px;
}

/* =====================================
   BLOCO FILTRO
=====================================*/
.filtro-floating{
    position:relative;
    width:100%;
}

/* =====================================
   FLOATING SELECT
=====================================*/
.filtro-floating select,
.filtro-floating input[type="number"],
.filtro-floating input[type="text"]{
    width:100%;
    height:44px;
    padding:14px 10px 6px;
    border:1px solid #dcdcdc;
    border-radius:6px;
    background:#fff;
    font-size:14px;
    transition:.2s;
}

.filtro-floating select:hover,
.filtro-floating input[type="number"]:hover,
.filtro-floating input[type="text"]:hover{
    border-color:#145a32;
}

.filtro-floating select:focus,
.filtro-floating input[type="number"]:focus,
.filtro-floating input[type="text"]:focus{
    outline:none;
    border-color:#145a32;
    box-shadow:0 0 0 2px rgba(20,90,50,.15);
}

/* =====================================
   LABEL FLOAT
=====================================*/
.filtro-floating > label:not(.label-comodos){
    position:absolute;
    left:10px;
    top:50%;
    transform:translateY(-50%);
    background:#fff;
    padding:4px 10px;
    color:#777;
    font-size:16px;
    font-weight:500;
    pointer-events:none;
    transition:.2s;
    border-radius:4px;
}

.filtro-floating select:focus + label,
.filtro-floating input:focus + label,
.filtro-floating select.has-value + label,
.filtro-floating input.has-value + label{
    top:-10px;
    font-size:16px;
    font-weight:500;
    background:transparent;
    padding:0 4px;
    color:#145a32;
    z-index:2;
}

/* =====================================
   BOTÃO LIMPAR
=====================================*/
#limpar_filtros{
    height:44px;
    padding:0 22px;
    border:none;
    border-radius:6px;
    background:#145a32;
    color:#fff;
    font-weight:500;
    cursor:pointer;
    transition:.25s;
}

#limpar_filtros:hover{
    background:#0f4426;
    transform:translateY(-1px);
}

#limpar_filtros:active{
    transform:scale(.98);
}

/* =====================================
   DATATABLE CONTAINER
=====================================*/
.gestamb-container{
    width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
}

/* =====================================
   TABELA
=====================================*/
table.dataTable{
    border-collapse:collapse !important;
    width:100% !important;
    font-size:14px;
    border-radius:6px;
    overflow:hidden;
}

/* =====================================
   CABEÇALHO
=====================================*/
#tabela_ambientes thead,
#tabela_ambientes thead tr,
#tabela_ambientes thead th{
    background:#145a32 !important;
    color:#fff !important;
}

#tabela_ambientes thead th{
    white-space:nowrap;
}
#tabela_ambientes thead th{
    border-right:1px solid #ffffff !important;
}

table.dataTable thead th{
    padding:12px;
    font-weight:600;
    border-right:1px solid #ffffff;
}

/* coluna BANHEIRO (agora coluna 10) */
#tabela_ambientes thead th:nth-child(10){
    white-space:normal;
    min-width:110px;
    text-align:center;
    line-height:1.2;
}

/* cabeçalho quando usa scroll */
.dataTables_scrollHead table thead th{
    background:#145a32 !important;
    color:#fff !important;
}

/* =====================================
   LINHAS
=====================================*/
table.dataTable tbody td{
    padding:10px;
    border-bottom:1px solid #eee;
    white-space:nowrap;
}

table.dataTable tbody tr{
    transition:background .15s ease;
}

table.dataTable tbody tr:hover{
    background:#f5faf6;
}

table.dataTable.stripe tbody tr.odd{
    background:#fafafa;
}

/* =====================================
   COLUNA VISTA (coluna 11)
=====================================*/
#tabela_ambientes th:nth-child(11),
#tabela_ambientes td:nth-child(11){
    width:120px;
    min-width:120px;
    max-width:120px;
    white-space:normal !important;
}

/* =====================================
   COLUNA CÔMODOS (coluna 7)
=====================================*/
#tabela_ambientes th:nth-child(7),
#tabela_ambientes td:nth-child(7){
    width:200px;
    min-width:200px;
    max-width:200px;
    white-space:normal !important;
}

/* =====================================
   COLUNA STATUS (coluna 1)
=====================================*/
#tabela_ambientes td:nth-child(1){
    font-weight:600;
}

/* esconder busca datatable */
.dataTables_filter{
    display:none;
}

/* =====================================
   BLOCO CÔMODOS
=====================================*/
.filtro-floating:has(#filtro_comodos){
    grid-column:1 / -1;
}

.label-comodos{
    position:static !important;
    transform:none !important;
    display:block;
    margin-bottom:1px;
    font-weight:500;
    color:#145a32;
}

#filtro_comodos{
    grid-column:1 / -1;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:8px 20px;
    margin-top:4px;
}

.filtro-checkbox{
    display:grid;
    grid-template-columns:repeat(4, minmax(150px,1fr));
    gap:8px 20px;
}

.filtro-checkbox label{
    display:flex;
    align-items:center;
    gap:6px;
    font-size:14px;
    cursor:pointer;
}

.filtro-floating:has(#filtro_comodos) label{
    position:static !important;
    transform:none !important;
    margin-bottom:8px;
}

#filtro_comodos label{
    display:flex;
    align-items:center;
    gap:6px;
    cursor:pointer;
}

#filtro_comodos input{
    transform:scale(1.2);
}

/* =====================================
   TABELA BASE
=====================================*/
.gestamb-table{
    width:120%;
    min-width:1200px;
}

.gestamb-table th,
.gestamb-table td{
    padding:10px;
    border:1px solid #ffffff;
    text-align:left;
    word-break:break-word;
}

/* coluna ação / obs */
#tabela_ambientes td:nth-child(12){
    white-space:normal;
}

#tabela_ambientes td,
#tabela_ambientes th{
    overflow:hidden;
    text-overflow:ellipsis;
}

/* =====================================
   Botão Alterar STATUS
=====================================*/
.btn-popup-alterar-status{
    display:block;
    margin-top:6px;
}

/* =====================================
   RESPONSIVO
=====================================*/
@media(max-width:768px){

    .filtros-ambientes{
        grid-template-columns:1fr;
    }

    #limpar_filtros{
        width:100%;
    }

}

/* permitir clicar nos checkboxes */
#filtro_comodos label{
    pointer-events:auto !important;
}

/* cabeçalho fixo datatable */
table.dataTable.fixedHeader-floating{
    background:#145a32 !important;
}

table.dataTable.fixedHeader-floating th{
    background:#145a32 !important;
    color:#fff !important;
}

.dt-buttons{
display:none;
}
/* =====================================
   COLUNA VIDEO (coluna 13)
=====================================*/
#tabela_ambientes th:nth-child(13),
#tabela_ambientes td:nth-child(13){
    width:90px;
    min-width:90px;
    text-align:center;
}



/*botão do video*/

.btn-video{
    font-size:18px;
    margin-right:8px;
}

.btn-whatsapp img{
    width:30px;
    height:30px;
    margin-left:8px;
}

/*Planta*/
.btn-planta{
    background:#e53935;
    color:#fff;
    border:none;
    padding:5px 8px;
    border-radius:4px;
    text-decoration:none;
    font-size:14px;
}




/** Botão de Download e Upload */

#download_vistoria{
    display:none;
    margin-top:15px;
}

.btn-download-vistoria{
    
    color:#145a32;
    padding:5px 16px;
    border-radius:6px;
    border:1px solid #145a32;
    text-decoration:none;
    
    font-size:16px;
    font-family:Arial, Helvetica, sans-serif;
    display:inline-block;
}

.btn-download-vistoria:hover{
    background:#04942f;
}

/** Botão de Upload e Upload */

#upload_vistoria_box{
    display:none;
    margin-top:15px;
}

.label-vistoria{
    font-family:Arial, Helvetica, sans-serif;
    font-size:16px;
    font-weight:bold;
    color:#000000;
    display:block;
    margin-bottom:4px;
  
}

.input-upload-vistoria{
    margin-top:4px;
    font-family:Arial, Helvetica, sans-serif;
    font-size:13px;
    

}
/* =====================================
   Metos dos comodos
=====================================*/

#lista_comodos_metro{
    margin-bottom:20px;
}

.linha-comodo{
    display:grid;
    grid-template-columns: 180px 120px 120px 80px;
    gap:10px;
    margin-bottom:10px;
    align-items:end;
}

.linha-comodo label{
    font-size:12px;
    color:#555;
    display:block;
    margin-bottom:3px;
}

.linha-comodo input{
    width:100%;
    padding:6px 8px;
    border:1px solid #ddd;
    border-radius:4px;
}

.col-m2 span{
    display:block;
    padding:6px;
    background:#f3f3f3;
    border-radius:4px;
    text-align:center;
    font-weight:600;
}

#salvar_metros{
    background:#2e7d32;
    color:#fff;
    border:none;
    padding:10px 18px;
    border-radius:5px;
    cursor:pointer;
    font-weight:600;
}

#salvar_metros:hover{
    background:#1b5e20;
}
/* =====================================
POPUP DOCUMENTO
=====================================*/

#popupDocumento{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.65);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:999999;
}

#popupDocumento.ativo{
    display:flex;
}


.popup-video-box{
    background:#fff;
    width:80%;
    max-width:900px;
    height:80%;
    border-radius:8px;
    overflow:hidden;
    position:relative;
}

#documentoContainer{
    width:100%;
    height:100%;
}

#documentoContainer iframe{
    width:100%;
    height:100%;
    border:none;
}

.fechar-documento{
    position:absolute;
    top:10px;
    left:15px;   /* em vez de right */
    width:34px;
    height:34px;
    background:#e53935;
    color:#fff;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:18px;
    cursor:pointer;
    z-index:9999;
}
/* =====================================
Tabela de Preço
=====================================*/
.titulo-unidade{
font-size:22px;
font-weight:600;
margin-top:35px;
margin-bottom:10px;
text-align:center;
letter-spacing:1px;
color:#444;
}



.tabela-precos{
width:100%;
border-collapse:collapse;
font-family:Arial;
background:white;
box-shadow:0 4px 12px rgba(0,0,0,0.1);
}

.tabela-precos th{
background:#1f6b3a;
color:white;
padding:10px;
text-align:left;
font-size:14px;
}

.tabela-precos td{
padding:8px;
border-bottom:1px solid #e5e5e5;
font-size:13px;
}

.tabela-precos tr:hover{
background:#f7f7f7;
}

/* borda lateral */

.disponivel{
border-left:6px solid #28a745;
}

.ocupado{
border-left:6px solid #dc3545;
}

/* inputs */

.tabela-precos input{
width:90%;
padding:5px;
border:1px solid #ddd;
border-radius:4px;
background:#fafafa;
}

.tabela-precos input:focus{
border-color:#1f6b3a;
outline:none;
background:white;
}
.tabela-precos th{
white-space:nowrap;
}

.tabela-precos td{
white-space:nowrap;
}

/* CABEÇALHO TABELA PREÇOS */

.tabela-precos thead th,
.cabecalho-precos th{
background:#145a32 !important;
color:#fff !important;
font-weight:500!important;
padding:12px !important;
font-size:14px;
border-right:1px solid #ffffff;
white-space:nowrap;
font-family:inherit;
}

/* botão */
.btn-salvar-linha{
background:#302681 !important;;
color:#fff !important;;
border:none !important;;
padding:6px 12px;
border-radius:4px;
cursor:pointer;
font-size:13px;
font-weight:500;
}

.btn-salvar-linha:hover{
background:#13094d;
}
/* POPUP DETALHES AMBIENTE */

#popupAmbiente{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,0.6);
display:none;
align-items:center;
justify-content:center;
z-index:999999;
}

#popupAmbiente.ativo{
display:flex;
}

.popup-ambiente-box{
background:#fff;
width:420px;
padding:25px;
border-radius:8px;
box-shadow:0 10px 25px rgba(0,0,0,0.3);
position:relative;
}

.fechar-popup-ambiente{
position:absolute;
top:10px;
right:12px;
cursor:pointer;
font-size:18px;
color:#e53935;
}

.popup-tabela{
width:100%;
border-collapse:collapse;
margin-top:10px;
}

.popup-tabela td{
padding:8px;
border-bottom:1px solid #eee;
font-size:14px;
}



/*botão lupa*/
.btn-detalhes-ambiente{
background:none;
border:none !important;
outline:none;
box-shadow:none;
padding:0;
cursor:pointer;
font-size:16px;
margin-left:6px;
}

.btn-detalhes-ambiente:hover{
transform:scale(1.15);
}




.popup-comodos{
width:100%;
border-collapse:collapse;
margin-top:10px;
}

.popup-comodos th{
background:#145a32;
color:#fff;
padding:6px;
}

.popup-comodos td{
padding:6px;
border-bottom:1px solid #eee;
}


.popup-links{
display:flex;
gap:20px;
margin-top:10px;
}

.popup-links a{
text-decoration:none;
color:#145a32;
font-weight:600;
}

/* POPUP EDITAR VALORES */

#popupEditarValores{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,0.6);
display:none;
align-items:center;
justify-content:center;
z-index:999999;
}

#popupEditarValores.ativo{
display:flex;
}

.valor-tabela{
text-align:right;
font-weight:500;
padding:8px;
white-space:nowrap;
}
.popup-editar-box{
background:#fff;
width:900px;
max-width:95vw;
padding:25px;
border-radius:8px;
box-shadow:0 10px 25px rgba(0, 0, 0, 0.575);
position:relative;
}

.popup-editar-box table{
width:100%;
border-collapse:collapse;
margin-top:10px;
table-layout:fixed;
}

.popup-editar-box th,
.popup-editar-box td{
padding:10px;
font-size:14px;
}

.btn-salvar-edicao{
margin-top:15px;
background:#145a32;
color:#fff;
border:none;
padding:10px 18px;
border-radius:6px;
cursor:pointer;
}

.campo-ajuste{
display:flex;
align-items:center;
gap:10px;
}

.campo-ajuste input{
width:90px;
}

.resultado-inline{
color:#777;
font-weight:600;
font-size:13px;
white-space:nowrap;
}

.fechar-popup-editar{
position:absolute;
top:10px;
right:12px;
cursor:pointer;
font-size:18px;
color:#e53935;
font-weight:bold;
}

#conteudoAmbiente h3{
font-size:20px;
font-weight:600;
color:#145a32;
text-align:left;
margin-bottom:10px;
border:none;
box-shadow:none;
}

.popup-ambiente-box h3{
font-size:26px;
text-align:center;
font-weight:700;
color:#1f6b3a;
border-bottom:1px solid #e5e5e5;
padding-bottom:10px;
margin-bottom:20px;
}

.filtros-tabela_preco{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
gap:15px;
align-items:end;
margin-bottom:20px;
}

/* COLUNA VISTA TABELA PREÇOS  */

.tabela-precos th:nth-child(5),
.tabela-precos td:nth-child(5){
    width:150px;
    min-width:150px;
    max-width:150px;
    white-space:normal !important;
    line-height:1.2;
}


/* COLUNA obs TABELA PREÇOS  */

.tabela-precos th:nth-child(4),
.tabela-precos td:nth-child(4){
    width:130px;
    min-width:130px;
    max-width:140px;
    white-space:normal !important;
    line-height:1.2;
}

.titulo-complexo{
font-size:20px;
font-weight:500;
margin-top:10px;
margin-bottom:10px;
color:#1d3e37;
border-left:5px solid #1f6b3a;
padding-left:10px;
letter-spacing:0.5px;

}

.titulo-unidade{
font-size:25px;
font-weight:700;
margin-top:35px;
margin-bottom:10px;
text-align:center;
letter-spacing:1px;
color:#1f6b3a;
text-decoration:underline;
}