.lancamentos-financeiros{
    width:100%;
    margin-top: 10px;
}

/* ================= CABEÇALHO ================= */
.btn_lance, .campos-lancamentos-caixa{
    display:flex;
    gap:15px;
    justify-content: center;
    align-items:center;
    margin-bottom:10px;
}
.campo_lance{
    display:flex;
    flex-direction:column;
}

.campo_lance label{
    margin-bottom:4px;
    font-size:12px;
    font-weight:bold;
}
.campo_lance input, .campo_lance select{
    height:30px;
    border:1px solid #c7c7c7;
    padding:0 8px;
    background:white;
    border-radius: 6px;
}
.campo-busca-lance input, .campo_lance select{
    width:250px;
}
.acoes-lance{
    margin-left:auto;
}


/* ================= PAINÉIS ================= */
fieldset{
    border:1px solid #cfcfcf;
    background: #f1f5ff;
    margin-bottom:12px;
}
legend{
    padding:0 8px;
    font-weight:bold;
    color:#444;
}
.table_input_finance {
    width: 90px;
    height: 28px;
    border: 1px solid #d1d5db9c;
    border-radius: 5px;
    background: #fff;
    text-align: left;
    color: #333;
    box-sizing: border-box;
    transition: all .2s ease;
}

.table_input_finance:hover {
    border-color: #9ca3af;
}

.table_input_finance:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.table_input_finance:disabled {
    background: #f3f4f6;
    color: #888;
    cursor: not-allowed;
}
.table_input_finance::-webkit-outer-spin-button,
.table_input_finance::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.vazio{
    text-align:left;
    color:#666;
    padding:15px;
}
/* ================= TOTAL DOCUMENTOS ================= */
.totais-documentos{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:8px;
    border-top:1px solid #ddd;
    background:#f8f8f8;
}
.resumo-total{
    display:flex;
    align-items:center;
    gap:8px;
}
.resumo-total input{
    width:90px;
    height:28px;
    text-align:right;
    border:1px solid #ccc;
    background:#f4f4f4;
}

/* ================= HISTÓRICO ================= */
#historico{
    width:98%;
    height:60px;
    resize:none;
    border:none;
    background: #f2f1f1;
    border-top:1px solid #ddd;
    padding:8px;
    outline:none;
}

/* ================= FORMAS ================= */
.formas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    padding: 16px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
}
.campo-formas {
    display: flex;
    flex-direction: column;
}
.campo-formas label {
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #444;
}
.campo-formas input {
    height: 38px;
    padding: 0 10px;
    border: 1px solid #c8c8c8;
    border-radius: 5px;
    font-size: 15px;
    text-align: left;
    transition: .2s;
}
.campo-formas input:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 4px rgba(13,110,253,.3);
}
/* ================= RODAPÉ ================= */
.rodape-recebimento{
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    padding:12px;
    border-top:1px solid #ddd;
}
.botoes button:hover{
    background:#d8d8d8;
}
#confirmarRecebimento{
    background: #fff;
    color: #16a34a;
    border-radius: 1.7rem;
    font-weight: bold;
    border: 0.125rem solid #16a34a;
    padding: 0.50rem 1.3rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.5s ease;
}
#confirmarRecebimento:hover{
    background:#16a34a;
    color: #fff;
}

.modal-overlay{
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.626);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;

    z-index: 9999;
}

.modal-overlay.show{
    opacity: 1;
    visibility: visible;
}
#modalLancamento, #modalMovimentacoes{
    position: fixed;
    z-index: 10000;
}

/* estilos */
.modal_finance{
    display: none;
    position: fixed;
    z-index: 2001;
    inset: 0;
    background: var(--color-modal);
    margin-top: 60px;
}
.modal-finance-content{
    background: #fff;
    width: 98%;
    max-width: 1800px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    animation: aparecer 0.3s ease;
    max-height: 87vh;      /* limita altura */
    display: flex;
    flex-direction: column;
}

.modal-finance-header {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  background: #4390df;
  color: #fff;
  flex-shrink: 0;
}
.modal-finance-header h2{
    margin: 2px;
}
.finance-fechar {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    margin: 0 20px;
    background: #fffefe;
    font-size: 20px;
    font-weight: bold;
    color: #4390df;
    cursor: pointer;
    border-radius: 50%;
    padding: 5px;
}




.modal_finance.show{
    display:flex;
}
.tab-content{
    display:none;
}

.tab-content.active{
    display:block;
}
.tab {
    margin: 5px 10px;
    border: none;
    background: #e5e7eb;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: .2s;
    font-weight: 600;
}
.tab i{
    margin-right: 5px;
    font-size: 15px;
}
.tabs-lancamento .tab.active{
    background:#0d6efd;
    color:#fff;
}

.tab-content {
    display: none;
    background: #ffffff;
    padding: 0 20px;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(0,0,0,.08);
    margin-top: 15px;
}


/* ============================
   CABEÇALHO LISTA
============================ */

.cabecalho-lista {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.cabecalho-lista input {
    width: 30%;
    margin: 10px;
    padding: 8px;
}


/* ============================
   CAMPOS
============================ */

.campo {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.campo label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}


.campo input,
.campo select,
.campo textarea {
    width: 40%;
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #f9fafb;
    font-size: 14px;
    outline: none;
    transition: .2s;
}
.campo input:focus,
.campo select:focus,
.campo textarea:focus {
    border-color: #2563eb;
    background: white;
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);

}


.campo textarea {
    min-height: 100px;
    resize: vertical;
}



/* ============================
   GRID
============================ */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 20px;
}



/* ============================
   CAMPO COM BUSCA
============================ */
.campo-busca {
    display:flex;
    gap:8px;
}


.campo-busca input {
    flex:1;
}



.campo button, .cabecalho-lista button {
    border:none;
    background:#2563eb;
    color:white;
    width:40px;
    height:40px;
    border-radius:10px;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:.2s;
}


.campo button:hover {
    background:#1d4ed8;
    transform:translateY(-1px);

}



/* ============================
   TABELAS
============================ */

.tabela {
    width:100%;
    border-collapse:collapse;
    margin-top:20px;
    overflow:hidden;
    border-radius:12px;
}

.tabela thead {
    background:#1f2937;
    color:white;
}

.tabela th {
    padding:14px;
    text-align:left;
    font-size:13px;
    font-weight:600;
}
.tabela td {
    padding:13px;
    border-bottom:1px solid #e5e7eb;
    color:#374151;
    font-size:14px;
}



.tabela tbody tr:hover {
    background:#f8fafc;

}

/* ============================
   STATUS
============================ */
.status-pago {
    color:#16a34a;
    font-weight:bold;
}

.status-pendente {
    color:#dc2626;
    font-weight:bold;

}


/* Aba Produtos - Layout Compacto */
#tabProdutos .grid-2{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
    gap: 8px;
    margin-bottom: 10px;
}

#tabProdutos .campo{
    display: flex;
    flex-direction: column;
}

#tabProdutos label{
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 3px;
    color: #555;
}

#tabProdutos input,
#tabProdutos select{
    height: 34px;
    width: 220px;
    padding: 4px 8px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}

#btnAdicionarProduto{
    margin: 8px 0 12px;
    padding: 8px 16px;
    font-size: 13px;
}



/* Responsivo */
@media (max-width:768px){
    #tabProdutos .grid-2{
        grid-template-columns: 1fr;
    }
}
/*=========================
    RODAPÉ DO LANÇAMENTO
=========================*/
.rodape-lancamento{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    margin-top:30px;
    padding:10px 25px;
    border-top:1px solid #e5e7eb;
    background:#b5cfea;
    border-radius:8px;
    width: 80%;
    margin: 10px auto;

}
.acoes{
    display:flex;
    gap:12px;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}


.cabecalho-caixa{
    display:flex;
    justify-content:space-around;
    align-items:center;
    margin:15px;
    flex-wrap:wrap;
    gap:20px;

}
.resumo-caixa{
    display:flex;
    justify-content: space-around;
}
.card-resumo{
    background:#f8f9fa;
    border-radius:8px;
    padding:8px 15px;
    display:flex;
    width: 25%;
    text-align:center;
    border:1px solid #ddd;
    flex-direction:column;

}
.card-resumo label{
    color:#666;
    font-size:13px;

}
.resumo-formas{
    display:flex;
    flex-wrap:wrap;
    justify-content: space-between;
    gap:12px;
    margin:5px 0;
    padding:8px 12px;
    background:#f8fafc;
    border:1px solid #e5e7eb;
    border-radius:8px;
    width: 93%;
    margin:5px auto;
}
.resumo-formas span{
    display:flex;
    flex-direction:column;
    min-width:100px;
    font-size:13px;
    color:#555;
}
.resumo-formas b{
    margin-top:4px;
    font-size:17px;
    color:#0f172a;
}
#tblMovimentacoesCaixa {
    width: 100%;
    border-collapse: collapse;
}
.modal_finance .table-container {
    max-height: 200px; /* ajuste conforme desejar */
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
}
.swal2-container {
    z-index: 99999 !important;
}
#tblMovimentacoesCaixa thead th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
    box-shadow: 0 2px 2px rgba(0,0,0,.08);
}

#tblMovimentacoesCaixa th,
#tblMovimentacoesCaixa td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.card-resumo span{
    margin-top:8px;
    display:block;
    font-size:24px;
    font-weight:bold;
    color:#0d6efd;

}

.modal-footer{

    display:flex;
    justify-content:flex-end;
    gap:10px;
    padding:15px;
    border-top:1px solid #ddd;

}