/* CSS dedicado a Tabelas nos forms*/

table.meusfrm-tabela {
    width: 100%;
    font-size: 0.85rem;
    --nv-text-color: none; /* anula riscos grossos na separação das linhas da tabela */
}

/* bordas da tabela */
table.meusfrm-tabela tbody td {
    border: 1px solid #eee;
    border-radius: 0.5rem;
}

/* Texto das linhas da tabela */
.meusfrm tbody td {
    line-height: 1rem;
    font-size: 0.7rem;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    max-width: 650px;
}
/* Cores de fundo das linhas da tabela */
.meusfrm tbody tr:nth-child(even) {
    background-color: #fdfdfd;
}
.meusfrm tbody tr:nth-child(odd) {
    background-color: #e6f2ff;
}

/* Linha selecionada */
.meusfrm tr.row-selected {
    background-color: #ffe9b3 !important;
    transition: background-color 0.2s ease;
}

/* Ajustes específicos para a tabela de referências em campanhas */
.tabela-form th,
.tabela-form td {
    padding: 3px 6px !important;
    line-height: 1.8rem !important;
    height: auto !important;
}
.tabela-form thead th {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    padding: 4px 8px !important;
    text-align: center !important;
}

/* celula e borda vermelha */
td.celula-txt_borda_vm {
    color: #dc3545 !important;
    border: 1px solid #dc3545 !important;
}

/* MODAL LOCALIZAR REGISTO */
.aql-localizar-modal {
    position: fixed;
    margin-top: 0px;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.aql-localizar-modal-content {
    background: #fff;
    width: 900px;
    max-width: 95%;
    border-radius: 6px;
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.aql-localizar-modal-header {
    height: 50px;
    align-items: baseline;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}
.aql-localizar-close-modal {
    height: 35px;
    width: 35px;
    background: #f00;
    color: #fff;
    padding: 0;
    cursor: pointer;
    font-size: 2.5rem;
    font-weight: 600;
    transition:
        background 0.2s,
        color 0.2s;
}
.aql-localizar-close-modal:hover {
    background: #ac271e;
}
.aql-localizar-modal-body .aql-localizar-row {
    margin: 0;
}
.aql-localizar-modal .frmPesquisaRegistos {
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    padding: 0;
    margin: 0;
}
.aql-localizar-loc1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    margin: 6px 4px 12px 4px;
}
.aql-localizar-loc2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    margin: 0 4px 12px 4px;
}

.aql-localizar-row label {
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 10px;
}
.aql-localizar-modal .aql-localizar-input {
    height: 2.1rem;
    resize: vertical;
    font-size: 0.85rem;
    font-weight: 500;
    color: #0066ff;
    background-color: #fff;
    padding: 4px 4px;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    width: 100%;
    box-sizing: border-box;
    margin: 0 4px;
}
.aql-localizar-btn {
    display: flex;
    align-items: center;
    height: 36px;
    background: #2563eb;
    color: #fff;
    border: 1px solid #2563eb;
    padding: 10px 6px;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 4px;
    transition:
        background 0.2s,
        color 0.2s;
}
.aql-localizar-btn:hover {
    background: #1e40af;
}
.aql-localizar-modal .aql-localizar-tabela {
    width: 100%;
    margin: 10px 0 0 0;
    border-collapse: collapse;
    display: block;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    padding: 4px;
}
.aql-localizar-tabela th,
.aql-localizar-tabela td {
    text-align: center;
    border: 1px solid #ddd;
    padding: 6px 8px;
    font-size: 0.75rem;
}
.aql-localizar-tabela thead,
.aql-localizar-tabela tbody tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}
