/* Global CSS para formulários Aqualar */

/* ===========================
   Espaçamento lateral no conteúdo principal do Neve
   Full width com respiro proporcional
   =========================== */
.nv-content-wrap.entry-content {
    padding-left: 1vw; /* margem interna proporcional à largura da viewport */
    padding-right: 1vw;
    padding-bottom: 1rem; /* margem inferior para separar do rodapé/ações */
    box-sizing: border-box;
}

/* menu do cabeçalho */
.nav-menu-secondary a[href*='/referencias/'],
.nav-menu-secondary a[href*='/listagem-de-referencias/'] {
    color: #0077b6 !important;
    font-weight: 900 !important;
}

.nav-menu-secondary a[href*='/marcacoes/'],
.nav-menu-secondary a[href*='/listagem-de-marcacoes/'] {
    color: #f37262 !important; /* #f37262 */
    font-weight: 900 !important;
}
.nav-menu-secondary a[href*='/marcacoes/'] {
    margin-left: 20px !important;
}

.nav-menu-secondary a[href*='/campanhas/'],
.nav-menu-secondary a[href*='/listagem-de-campanhas/'] {
    color: #9b1aa0 !important; /* #9b1aa0 */
    font-weight: 900 !important;
}
.nav-menu-secondary a[href*='/campanhas/'] {
    margin-left: 20px !important;
}

.nav-menu-secondary a[href*='/vendas/'],
.nav-menu-secondary a[href*='/listagem-de-vendas/'] {
    color: #257525 !important; /* #257525 */
    font-weight: 900 !important;
}
.nav-menu-secondary a[href*='/vendas/'] {
    margin-left: 15px !important;
}

/* destacar o item ativo do menu */
.nav-ul li.nv-active > .wrap > a {
    padding: 0 10px !important;
    background: #0077b6 !important;
    color: #bbeaf6 !important;
    border-radius: 5px !important;
}

/* forçar tipo de letra em campos desabilitados ou readonly */
.meusfrm input[disabled],
.meusfrm input[readonly] {
    font-family: inherit;
    color: inherit;
}

/* Container principal */
.meusfrm .frm-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Grid principal */
.meusfrm .frm-grid {
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    gap: 0.75rem;
}

/* Colunas utilitárias */
.meusfrm .frm-col-1 {
    grid-column: span 1;
}
.meusfrm .frm-col-2 {
    grid-column: span 2;
}
.meusfrm .frm-col-3 {
    grid-column: span 3;
}
.meusfrm .frm-col-4 {
    grid-column: span 4;
}
.meusfrm .frm-col-5 {
    grid-column: span 5;
}
.meusfrm .frm-col-6 {
    grid-column: span 6;
}
.meusfrm .frm-col-7 {
    grid-column: span 7;
}
.meusfrm .frm-col-8 {
    grid-column: span 8;
}
.meusfrm .frm-col-9 {
    grid-column: span 9;
}
.meusfrm .frm-col-10 {
    grid-column: span 10;
}
.meusfrm .frm-col-11 {
    grid-column: span 11;
}
.meusfrm .frm-col-12 {
    grid-column: span 12;
}
.meusfrm .frm-col-13 {
    grid-column: span 13;
}
.meusfrm .frm-col-14 {
    grid-column: span 14;
}
.meusfrm .frm-col-15 {
    grid-column: span 15;
}
.meusfrm .frm-col-16 {
    grid-column: span 16;
}

/* Cabeçalho do formulário */
.meusfrm .frm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
}

/* Cabeçalho das tabelas em baixo */
.meusfrm .frm-header-tabelas {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    border: 1px solid #0077b6;
    border-radius: 0.5rem;
}

.meusfrm .frm-header-left {
    flex: 1;
    text-align: left;
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
}
.meusfrm .frm-header-center {
    flex: 1;
    text-align: center;
}
.meusfrm .frm-header-right {
    flex: 1;
    text-align: right;
    display: inline;
    align-items: center;
    margin-right: 0.5rem;
}

.meusfrm .frm-header-center h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
    color: #0077b6;
    background: transparent;
    padding: 0.25rem 0.5rem;
    width: auto;
    box-sizing: border-box;
}
.meusfrm .frm-header-left input {
    height: 2.1rem;
    resize: vertical;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #66c;
    background: #e9ecef;
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    width: 100px;
    box-sizing: border-box;
}

.meusfrm .frm-header-right input {
    height: 2.1rem;
    resize: vertical;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #66c;
    background: #e9ecef;
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    width: 100px;
    box-sizing: border-box;
}
.meusfrm .frm-header-right label {
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 0.9rem;
    vertical-align: middle;
    margin-left: 0.5rem;
}
/* Tabela dentro do formulário */
#aqualar-referencias-tabela_wrapper,
#aqualar-marcacoes-tabela_wrapper,
#aqualar-campanhas-tabela_wrapper,
#aqualar-vendas-tabela_wrapper {
    margin-top: 15px;
    padding: 5px 5px;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
}

/* Estrutura do formulário */
.meusfrm .frm-wrap {
    display: grid;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
    margin: 0;
}
.meusfrm .frm-wrap fieldset {
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    padding: 0.15rem 1rem 1rem 1rem;
    background: #f2f2f2;
    margin: 0;
}

/* Fieldsets */
.meusfrm .frm-section {
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem 1rem 1rem;
    background: #f9f9f9;
    margin: 0;
}
.meusfrm .frm-section legend {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    padding: 0 0 0 0.2rem;
}

/* Campos */
.meusfrm .frm-field {
    display: flex;
    flex-direction: column;
}
.meusfrm .frm-field label {
    margin-bottom: 0;
    margin-left: 0.3rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
}

.meusfrm .frm-section input,
.meusfrm .frm-section select,
.meusfrm .frm-section textarea {
    resize: vertical;
    font-size: 0.85rem;
    font-weight: 500;
    color: #0066ff;
    background-color: #fff;
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    width: 100%;
    box-sizing: border-box;
}
.meusfrm .frm-section input,
.meusfrm .frm-section select {
    height: 2.1rem;
    min-height: 2.1rem;
}
.meusfrm .frm-section textarea.auto-resize {
    height: auto;
    min-height: 2.1rem; /* se quiseres 1 linha mais baixa, baixa este valor */
    overflow-y: hidden;
    resize: none !important; /* para vencer o resize: vertical global */
}

/* Campos readonly */
.meusfrm .frm-section input[readonly],
.meusfrm .frm-section textarea[readonly],
.meusfrm .frm-section select[readonly] {
    border-color: #cbd3da;
    color: #66c;
    font-weight: 600;
    background: #e9ecef;
    opacity: 1;
}

/* Campos de data inválidos */
.meusfrm .frm-section input.aql-date-invalid {
    color: #86cbdd !important;
}

.meusfrm .input-error {
    border-color: #e63946 !important;
    color: #e63946 !important;
}

/* SELECT2 */
/* 1. Ajuste da caixa principal (Container) */
.meusfrm .select2-container--default .select2-selection--single {
    height: 2.1rem !important; /* Mesma altura que definiu */
    background-color: #fff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.5rem !important;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}
/* 2. Ajuste do texto dentro do select */
.meusfrm .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #0066ff !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    line-height: 2.1rem !important; /* Centraliza verticalmente */
}
/* 3. Ajuste da seta (Remover estilo antigo e centralizar) */
.meusfrm .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 2.1rem !important;
    top: 0 !important;
    right: 5px !important;
}
/* 4. Estilo do campo de busca que aparece quando abre o select */
.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #d1d5db !important;
    border-radius: 0.3rem !important;
    color: #0066ff !important;
    font-size: 0.85rem !important;
    line-height: 1.2rem !important;
}
/* 5. Ajuste das opções no menu suspenso */
.select2-container--default .select2-results__option {
    color: #0066ff !important;
    font-size: 0.75rem !important;
    line-height: 1rem !important;
    color: #333;
}
/* Cor de destaque quando passa o mouse nas opções */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #0066ff !important;
    color: white !important;
}

/* Wrapper para inputs com símbolo € */
.meusfrm .euro-wrapper {
    position: relative;
}
.meusfrm .euro-wrapper::before {
    content: '€';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #44f;
    font-size: 0.9rem;
    pointer-events: none;
}
.meusfrm .euro-wrapper input {
    padding-left: 22px !important;
}

/* Placeholder em cinza claro */
.meusfrm ::placeholder {
    color: #bfbfbf;
    opacity: 1;
}
.meusfrm ::-webkit-input-placeholder {
    color: #bfbfbf;
}
.meusfrm ::-moz-placeholder {
    color: #bfbfbf;
}
.meusfrm :-ms-input-placeholder {
    color: #bfbfbf;
}
.meusfrm :-moz-placeholder {
    color: #bfbfbf;
}

/* vermelho em campos obrigatórios não preenchidos */
.frm-error-field {
    border: 2px solid #e63946 !important;
    background: #ffe5e5 !important;
    animation: frmShake 0.2s ease-in-out;
}
@keyframes frmShake {
    0% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-3px);
    }
    50% {
        transform: translateX(3px);
    }
    75% {
        transform: translateX(-2px);
    }
    100% {
        transform: translateX(0);
    }
}
/* Barra de ações (botões)*/
.meusfrm .frm-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #ddd;
}
.meusfrm .frm-actions-left button {
    line-height: 1rem;
}

.meusfrm .frm-actions-right button {
    line-height: 1.5rem;
}

/* Botões */
.meusfrm .botao-janela-modal,
.meusfrm button {
    background: #2563eb;
    color: #fff;
    border: 1px solid #2563eb;
    padding: 0.6rem 0.8rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition:
        background 0.2s,
        color 0.2s;
}
.meusfrm .botao-janela-modal:hover,
.meusfrm button:hover {
    background: #1e40af;
}
.meusfrm .botao2-janela-modal {
    background: #fff;
    color: #2563eb;
    border: 1px solid #2563eb;
    padding: 0.6rem 0.8rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition:
        background 0.2s,
        color 0.2s;
}
.meusfrm .botao2-janela-modal:hover {
    background: #2563eb;
    color: #fff;
}

/* ícones dos botões */
.meusfrm .botao-janela-modal i,
.meusfrm .botao2-janela-modal i,
.meusfrm .frm-actions button i {
    margin-right: 0.35rem;
}

.btn-adicionar-outra {
    height: 2.1rem;
    font-size: 0.85rem;
    text-align: center;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    justify-content: center;
}

/* class aql-disabled */
.aql-disabled {
    opacity: 0.85 !important;
    cursor: not-allowed !important;
    filter: grayscale(40%);
    transition:
        opacity 0.2s ease,
        filter 0.2s ease;
}
/* Quando o Select2 está disabled, forçar o estilo personalizado */
.select2-container--disabled .select2-selection--single,
.select2-container--disabled .select2-selection--multiple {
    opacity: 0.85 !important;
    filter: grayscale(40%) !important;
    cursor: not-allowed !important;
}

/* Tooltips */
.meusfrm-tooltip {
    position: relative;
    display: inline-block;
    margin-right: 6px;
}
.meusfrm-tooltip .tooltip-text {
    position: absolute;
    z-index: 999;
    background: #222;
    color: #fff;
    font-size: 11px;
    padding: 6px 8px;
    border-radius: 4px;
    white-space: normal;
    max-width: 220px;
    line-height: 1.3;
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    transition:
        opacity 0.15s ease,
        transform 0.15s ease;
}
.meusfrm-tooltip:hover .tooltip-text {
    opacity: 1;
    transform: translateY(0);
}
.meusfrm-tooltip .tooltip-text.pos-bottom {
    top: 100%;
    left: 0;
    margin-top: 6px;
}

.meusfrm .notificar-estado-1 {
    color: #22c55e !important;
}
.meusfrm .notificar-estado-2 {
    color: #e63946 !important;
}

/* Checkboxes */
.meusfrm .frm-check {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    height: 2.3rem;
    background: #fff;
    align-items: center;
    height: 2.1rem;
}
/* quadradinho do "check" */
.meusfrm .frm-check input[type='checkbox'] {
    accent-color: #22c55e;
    width: 1.3rem;
    height: 1.3rem;
    margin: 0rem 0rem 0rem 0.5rem;
}
.meusfrm .frm-check.check-vm input[type='checkbox'] {
    accent-color: #f00;
    width: 1.3rem;
    height: 1.3rem;
    margin: 0rem 0rem 0rem 0.5rem;
}

/* Cor de fundo quando a checkbox dentro de .frm-check estiver marcada */
.meusfrm .frm-check:has(input[type='checkbox']:checked) {
    background-color: #dcfce7 !important;
    border-color: #22c55e !important;
}
/* Cor de fundo quando a checkbox dentro de .frm-check estiver marcada */
.meusfrm .frm-check.check-vm:has(input[type='checkbox']:checked) {
    background-color: #fcdce7 !important;
    border-color: #c5225e !important;
}
/* Checkboxes com Cor vermelha quando a checkbox dentro de .frm-check estiver desmarcada */
.meusfrm .check-off-vermelho:has(input[type='checkbox']) {
    background-color: #fcdce7;
    border-color: #c5225e;
}

/* conjunto label + checkbox (quadradinho)*/
.meusfrm .frm-row label {
    display: flex;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
    padding-right: 10px;
    gap: 0.5rem;
    color: #333;
    align-items: center;
    height: 2rem;
}

.meusfrm .frm-check.ignorar-duplicados {
    height: 2.2rem;
}
.meusfrm .ignorar-duplicados label {
    display: flex;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
    padding-right: 10px;
    gap: 0.5rem;
    color: #333;
    align-items: center;
    height: 2.2rem;
}

/* conjunto checkbox + campo */
.meusfrm .frm-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.meusfrm .frm-row textarea {
    flex: 1;
    min-width: 200px;
}

/* Botões de remover prémios escolhidos e entregues nas campanhas*/
.meusfrm .btn-remove-premios_escolhidos,
.meusfrm .btn-remove-premios_entregues {
    width: 2.4rem;
    height: 2.1rem;
    color: white;
    padding: 0;
    font-size: 1.3rem;
    border-radius: 5px;
}

/* Botão de remover produtos das vendas */
.meusfrm .btn-remove-produto {
    width: 2.4rem;
    height: 2.1rem;
    color: white;
    padding: 0;
    font-size: 1.3rem;
    border-radius: 5px;
}

/* Mensagens erro no formulário */
.meusfrm .frm-error-msg {
    color: #e63946;
    font-size: 12px;
    margin-top: 3px;
    display: block;
}

/* Mensagens TOAST */
#frm-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.4s,
        transform 0.4s;
    z-index: 99999;
    font-size: 14px;
}
#frm-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(10px);
}
#frm-toast.success {
    background: #2a9d8f;
}
#frm-toast.error {
    background: #e63946;
}

/* Cores para select do resultado da marcação */
#aqualar-marcacoes-form-container {
    #resultado_id option[value='1'] {
        color: #28a745;
    }
    #resultado_id option[value='2'] {
        color: #28a745;
    }
    #resultado_id option[value='3'] {
        color: #007bff;
    }
    #resultado_id option[value='4'] {
        color: #007bff;
    }
    #resultado_id option[value='5'] {
        color: #9c27b0;
    }
    #resultado_id option[value='6'] {
        color: #ff9800;
    }
    #resultado_id option[value='7'] {
        color: #795548;
    }
    #resultado_id option[value='8'] {
        color: #dc3545;
    }
    #resultado_id option[value='9'] {
        color: #9c27b0;
    }

    #resultado_id[value='1'] {
        color: #28a745;
    }
    #resultado_id[value='2'] {
        color: #28a745;
    }
    #resultado_id[value='3'] {
        color: #007bff;
    }
    #resultado_id[value='4'] {
        color: #007bff;
    }
    #resultado_id[value='5'] {
        color: #9c27b0;
    }
    #resultado_id[value='6'] {
        color: #ff9800;
    }
    #resultado_id[value='7'] {
        color: #795548;
    }
    #resultado_id[value='8'] {
        color: #dc3545;
    }
    #resultado_id[value='9'] {
        color: #9c27b0;
    }
}

/* Cores para select do estado da campanhas */
#aqualar-campanhas-form-container {
    #estado_id option[value='1'] {
        color: #ff9800;
        background: #fff;
    }
    #estado_id option[value='2'] {
        color: #795548;
        background: #fff;
    }
    #estado_id option[value='3'] {
        color: #dc3545;
        background: #fff;
    }
    #estado_id option[value='4'] {
        color: #28a745;
        background: #fff;
    }
    #estado_id option[value='5'] {
        color: #fff;
        background: #dc3545;
    }
    #estado_id option[value='6'] {
        color: #fff;
        background: #28a745;
    }

    #estado_id[value='1'] {
        color: #ff9800;
        background: #fff;
    }
    #estado_id[value='2'] {
        color: #795548;
        background: #fff;
    }
    #estado_id[value='3'] {
        color: #dc3545;
        background: #fff;
    }
    #estado_id[value='4'] {
        color: #28a745;
        background: #fff;
    }
    #estado_id[value='5'] {
        color: #fff;
        background: #dc3545;
    }
    #estado_id[value='6'] {
        color: #fff;
        background: #28a745;
    }
}

/* Cores para select do estado da venda */
#aqualar-vendas-form-container {
    #estado_id option[value='1'] {
        color: #ff9800;
    }
    #estado_id option[value='2'] {
        color: #28a745;
    }
    #estado_id option[value='3'] {
        color: #dc3545;
    }
    #estado_id option[value='4'] {
        color: #795548;
    }

    #estado_id[value='1'] {
        color: #ff9800;
    }
    #estado_id[value='2'] {
        color: #28a745;
    }
    #estado_id[value='3'] {
        color: #dc3545;
    }
    #estado_id[value='4'] {
        color: #795548;
    }
}

/* CORES PARA SELECT DO ESTADO DA REFERENCIA */
#aqualar-referencias-form-container {
    #estado_id option[value='1'] {
        color: #ff9800;
    }
    #estado_id option[value='2'] {
        color: #28a745;
    }
    #estado_id option[value='3'] {
        color: #795548;
    }
    #estado_id option[value='4'] {
        color: #9c27b0;
    }
    #estado_id option[value='5'] {
        color: #007bff;
    }

    #estado_id[value='1'] {
        color: #ff9800;
    }
    #estado_id[value='2'] {
        color: #28a745;
    }
    #estado_id[value='3'] {
        color: #795548;
    }
    #estado_id[value='4'] {
        color: #9c27b0;
    }
    #estado_id[value='5'] {
        color: #007bff;
    }
}

/* vermelho em campos obrigatórios não preenchidos */
.aql-error-field {
    border: 2px solid #e63946 !important;
    background: #ffe5e5 !important;
    animation: aqlShake 0.2s ease-in-out;
}
/* forçar a NÃO usar animação aqui */
.select2-container.aql-error-field {
    border: none !important; /* opcional */
}
/* Aplicar highlight ao interior do Select2 */
.select2-container.aql-error-field .select2-selection {
    border: 2px solid #e63946 !important;
    background: #ffe5e5 !important;
    border-radius: 0.5rem !important;
    animation: aqlShake 0.2s ease-in-out;
}
@keyframes aqlShake {
    0% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-3px);
    }
    50% {
        transform: translateX(3px);
    }
    75% {
        transform: translateX(-2px);
    }
    100% {
        transform: translateX(0);
    }
}

/* MENSAGENS NOS FORM */
#aql-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.4s,
        transform 0.4s;
    z-index: 99999;
}
#aql-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(10px);
}
#aql-toast.success {
    background: #2a9d8f;
}
#aql-toast.error {
    background: #e63946;
}
#aql-toast.warning {
    background: #f8e806;
    color: #333;
}

/* Janela Modal de alerta */
.aql-modal {
    position: fixed;
    min-width: 300px;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}
.aql-modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 380px;
    text-align: center;
}

.aql-modal-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: space-around;
}

.aql-btn-ok {
    margin-top: 15px;
    padding: 8px 20px;
    background: #2a9d8f;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}
.aql-btn-yesNo {
    padding: 8px 18px;
    border-radius: 4px;
    cursor: pointer;
}
.aql-btn-yes {
    background: #2ecc71;
    color: white;
}
.aql-btn-no {
    background: #e74c3c;
    color: white;
}

/* Modal SIM/NÃO ao centro para confirmações ao guardar */
.ui-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}
.ui-modal {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 380px;
    text-align: center;
}
.ui-modal-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: space-around;
}
.ui-btn {
    padding: 8px 18px;
    border-radius: 4px;
    cursor: pointer;
}
.ui-btn-yes {
    background: #2ecc71;
    color: white;
}
.ui-btn-no {
    background: #e74c3c;
    color: white;
}

/* Janela Modal */
.meusfrm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.meusfrm-modal .modal-content {
    background: #fff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    width: 300px;
}
.meusfrm-modal .modal-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}
/* Modal de remarcação */
#aqualar-marcacoes-form {
    position: relative;
}
.aqualar-modal-remarcacao__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    z-index: 9998;
}
.aqualar-modal-remarcacao__content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 420px;
    max-width: 90%;
    background: #fff;
    padding: 25px 30px;
    border-radius: 10px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    animation: modalFadeIn 0.25s ease-out;
}
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}
.aqualar-modal-remarcacao__field {
    margin-bottom: 15px;
}
.aqualar-modal-remarcacao__field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}
.aqualar-modal-remarcacao__field input,
.aqualar-modal-remarcacao__field select {
    width: 100% !important;
    resize: vertical !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: #0066ff !important;
    background-color: #fff !important;
    padding: 0.25rem 0.5rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.5rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.aqualar-modal-remarcacao__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* labels mais pequenas */
.meusfrm label.label-txt-pq {
    font-size: 0.7rem;
}

/* Cores globais para botões de campanha */
.meusfrm .btn_campanha-estado-1,
.meusfrm .btn_campanha-estado-3,
.meusfrm .btn_campanha-estado-4 {
    background: #fff;
    color: #ff9800;
    border-color: #ff9800;
    border-width: 2px;
}
.meusfrm .btn_campanha-estado-2 {
    background: #fff;
    color: #795548;
    border-color: #795548;
    border-width: 2px;
}
.meusfrm .btn_campanha-estado-5 {
    background: #fff;
    color: #dc3545;
    border-color: #dc3545;
    border-width: 2px;
}
.meusfrm .btn_campanha-estado-6 {
    background: #fff;
    color: #28a745;
    border-color: #28a745;
    border-width: 2px;
}

/* Cores globais para botões de venda */
.meusfrm .btn_venda-estado-1 {
    background: #fff;
    color: #ff9800;
    border-color: #ff9800;
    border-width: 2px;
}
.meusfrm .btn_venda-estado-2 {
    background: #fff;
    color: #28a745;
    border-color: #28a745;
    border-width: 2px;
}
.meusfrm .btn_venda-estado-3 {
    background: #fff;
    color: #dc3545;
    border-color: #dc3545;
    border-width: 2px;
}
.meusfrm .btn_venda-estado-4 {
    background: #fff;
    color: #795548;
    border-color: #795548;
    border-width: 2px;
}

/* Cores globais para qualquer tabela com coluna estado_ref-col */
td.estado_ref-col.est-1 {
    color: #ff9800;
    font-weight: 600;
}
td.estado_ref-col.est-2 {
    color: #28a745;
    font-weight: 600;
}
td.estado_ref-col.est-3 {
    color: #795548;
    font-weight: 600;
}
td.estado_ref-col.est-4 {
    color: #9c27b0;
    font-weight: 600;
}
td.estado_ref-col.est-5 {
    color: #007bff;
    font-weight: 600;
}

/* Cores globais para qualquer tabela com coluna resultado_marc-col */
td.resultado_marc-col.res-1,
td.resultado_marc-col.res-2 {
    color: #28a745;
    font-weight: 600;
}
td.resultado_marc-col.res-3,
td.resultado_marc-col.res-4 {
    color: #007bff;
    font-weight: 600;
}
td.resultado_marc-col.res-5,
td.resultado_marc-col.res-9 {
    color: #9c27b0;
    font-weight: 600;
}
td.resultado_marc-col.res-6 {
    color: #ff9800;
    font-weight: 600;
}
td.resultado_marc-col.res-7 {
    color: #795548;
    font-weight: 600;
}
td.resultado_marc-col.res-8 {
    color: #dc3545;
    font-weight: 600;
}

/* Cores globais para qualquer tabela com coluna estado_camp-col */
td.estado_camp-col.est-1 {
    color: #ff9800;
    font-weight: 600;
}
td.estado_camp-col.est-2 {
    color: #795548;
    font-weight: 600;
}
td.estado_camp-col.est-3 {
    color: #dc3545;
    font-weight: 600;
}
td.estado_camp-col.est-4 {
    color: #28a745;
    font-weight: 600;
}
td.estado_camp-col.est-5 {
    color: #fff;
    background: #dc3545;
    font-weight: 600;
}
td.estado_camp-col.est-6 {
    color: #fff;
    background: #28a745;
    font-weight: 600;
}

/* Cores globais para qualquer tabela com coluna estado_vd-col */
td.estado_vd-col.est-1 {
    color: #ff9800;
    font-weight: 600;
}
td.estado_vd-col.est-2 {
    color: #28a745;
    font-weight: 600;
}
td.estado_vd-col.est-3 {
    color: #dc3545;
    font-weight: 600;
}
td.estado_vd-col.est-4 {
    color: #795548;
    font-weight: 600;
}

/* Cores globais para qualquer tabela com coluna valor_venda-col e valor minimo */
td.valor_venda-col.minOk {
    color: #28a745;
    font-weight: 600;
}
td.valor_venda-col.minNok {
    color: #dc3545;
    font-weight: 600;
}
/* ============================================================
   GLOBAL SPINNER
============================================================ */
#aql-global-spinner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

#aql-global-spinner-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.aql-global-spinner-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Spinner styles */
.aql-global-spinner {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: inline-block;
    border-top: 5px solid #90e0ef;
    border-right: 5px solid transparent;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}
.aql-global-spinner::after {
    content: '';
    box-sizing: border-box;
    position: absolute;
    left: 0;
    top: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border-left: 5px solid #0077b6;
    border-bottom: 5px solid transparent;
    animation: rotation 0.5s linear infinite reverse;
}
@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ============================================================
   ALERTA DE CHAMADAS
============================================================ */
#aql-chamadas-alert {
    position: relative;
    cursor: pointer;
    display: none;
}
#aql-chamadas-alert .count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: #fff;
    font-size: 12px;
    padding: 2px 5px;
    border-radius: 50%;
    min-height: 25px;
    min-width: 25px;
    align-items: center;
    justify-content: center;
}
#aql-chamadas-alert .icon {
    color: #257525;
    margin: 5px;
    font-size: 25px;
}

/* ============================================================
   Disponibilidade - Consulta
   ============================================================ */

.disp-consulta .disp-title {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
}

.disp-consulta .disp-title h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
    color: #0077b6;
    background: transparent;
    padding: 0.25rem 0.5rem;
    width: auto;
    box-sizing: border-box;
}

/* Barra de navegação */
.disp-consulta .disp-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

/* Filtro de técnico  */
.disp-consulta .disp-filter-container {
    text-align: center;
    margin: 10px 0;
}
.disp-consulta .disp-filter-form {
    margin: 0;
}
.disp-consulta .disp-filter {
    resize: vertical;
    font-size: 0.85rem;
    font-weight: 500;
    color: #0066ff;
    background-color: #fff;
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    box-sizing: border-box;
}

/* centro da barra de navegação botões e input date */
.disp-consulta .disp-nav-center {
    text-align: center;
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
    gap: 0.5rem;
}
/* Botões Anterior/Seguinte */
.disp-consulta .disp-btn {
    display: inline-flex; /* flex para alinhar conteúdo */
    align-items: center; /* centra verticalmente o texto */
    justify-content: center; /* centra horizontalmente */
    min-height: 40px; /* altura igual ao input date */
    padding: 0 6px; /* só espaço lateral */
    background: #0066ff;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    box-sizing: border-box; /* altura inclui borda/padding */
    gap: 5px;
}
.disp-consulta .disp-btn:hover {
    background: #e0e0e0;
}

/* Controlo de calendário (input date) */
.disp-consulta .disp-weekbox {
    resize: vertical !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    color: #0066ff !important;
    background-color: #fff !important;
    padding: 0.25rem 0.5rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 5px !important;
    box-sizing: border-box !important;
    min-height: 40px !important; /* para igualar altura dos botões */
}

.disp-consulta .disp-nav h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #0077b6;
}

/* Wrapper da tabela para scroll horizontal em ecrãs pequenos */
.disp-consulta .dt-table-wrapper {
    width: 100%;
    overflow-x: auto; /* ativa scroll horizontal */
    -webkit-overflow-scrolling: touch; /* scroll suave em iOS */
}

/* Tabela de disponibilidades */
.disp-consulta .dt-table {
    width: 100%;
    min-width: 600px; /* garante largura mínima */
    border-collapse: collapse;
    margin-top: 10px;
    font-family: Arial, sans-serif;
}

.disp-consulta .dt-table th,
.disp-consulta .dt-table td {
    padding: 8px;
    text-align: center;
    vertical-align: top;
}
.disp-consulta .dt-table th {
    background-color: #0077b6; /* azul WordPress */
    color: #fff;
    font-weight: bold;
    border: 1px solid #d1d5db;
}
.disp-consulta .dt-table tr:nth-child(even) {
    background-color: #f9f9f9;
}
.disp-consulta .dt-table tr:hover {
    background-color: #f1f1f1;
}

/* =====================================
Modo escuro no menu
===================================== */
.nav-menu .aql-darkmode-toggle a,
.nav-menu-secondary .aql-darkmode-toggle a {
    cursor: pointer;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
}
.nav-menu .aql-darkmode-toggle a:hover {
    background: rgba(0, 0, 0, 0.08);
}
.dusky-toggle-wrap {
    display: none !important;
}
