/* ========================== CONFIGURAÇÕES GERAIS ========================== */
@font-face {
    font-family: 'Open Sans';
    src: url('/static/font/OpenSans-Light.woff2') format('woff2');
    font-weight: 300;
}
@font-face {
    font-family: 'Open Sans';
    src: url('/static/font/OpenSans-Regular.woff2') format('woff2');
    font-weight: 400;
}
@font-face {
    font-family: 'Open Sans';
    src: url('/static/font/OpenSans-Medium.woff2') format('woff2');
    font-weight: 500;
}
@font-face {
    font-family: 'Open Sans';
    src: url('/static/font/OpenSans-Bold.woff2') format('woff2');
    font-weight: 700;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
    padding: 0;
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    background-color: #E5E7EB;
    color: #333333;
}


/* ========================================================================= */
/* ========================== CONFIGURAÇÕES GERAIS ========================= */
/* ========================================================================= */
body {
    margin: 0; 
    padding: 0;
    font-family: 'gotham', 'Segoe UI', sans-serif;
    background-color: #F5F6F6;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ========================== CONTAINERES ========================== */
.Cl_ConfigContainer {
    margin: 10px auto;
    padding: 20px;
    max-width: 1200px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.38);
}


.Cl_ContainerApoio {
    margin: 10px 20px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.38);
}


/* ========================================================================= */
/* 1) FILTROS (acima da tabela) - BARACAT (harmonizado p/ tela clara)        */
/* ========================================================================= */
.filter-panel{
  background:#ffffff;
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:14px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin: 14px 0 12px 0;
}

.filter-panel-fields{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:flex-end;
  flex: 1 1 auto;
}

.filter-group{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width: 220px;
}

.filter-group label{
  font-size:13px;
  font-weight:700;
  color:#1c2e3c; /* Azure escuro */
}

.filter-group input,
.filter-group select{
  height:36px;
  border-radius:10px;
  border:1px solid #d6dee6;     /* leve puxado pro azure */
  padding: 0 10px;
  font-size:14px;
  outline:none;
  background:#ffffff;
  color:#1c2e3c;
}

.filter-group input:focus,
.filter-group select:focus{
  border-color:#c8a25e; /* dourado como assinatura */
  box-shadow: 0 0 0 3px rgba(200,162,94,.22);
}

.filter-panel-actions{
  display:flex;
  gap:10px;
  flex: 0 0 auto;
}

.filter-panel-actions .btn,
.filter-panel-actions button{
  height:36px;
  border-radius:10px;
  padding:0 14px;
  font-weight:700;
  cursor:pointer;
}


/* ========================================================================= */
/* =========================== CABEÇALHO DO APOIO ========================== */
/* ========================================================================= */
.Cl_Header {
  height: 50px;
  display: flex;
  align-items: center;
  background-color: #1c2e3c;
  color: #eef3f6;
  padding: 0 40px;
  justify-content: space-between;
  border-bottom: 1px solid #c8a25e;
}

.Cl_Logo img {
  height: 46px;
}

.Cl_Titulo {
  text-align: center;
  flex-grow: 1;
  font-weight: 700;
}

.Cl_MenuID input {
  background-color: #ffffff;
  color: #2f7f9a;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  min-width: 80px;
  text-align: center;
  font-weight: 700;
}



/* ========================== campos input e select ========================== */

.form-campo {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.campo-form label {
  font-weight: 600;
  margin-bottom: 4px; /* espaço entre label e input */
}



label {
    font-weight: bold;
}

input,
select,
textarea {
    border: 1px solid #ccc;
    border-radius: 8px;

    padding: 10px;
    font-size: 14px;
    box-sizing: border-box;
}


textarea {
  resize: vertical;
}

/* ========================================================================= */
/* 2) CONTAINER DA TABELA - BARACAT (harmonizado p/ tela clara)              */
/* ========================================================================= */
.Cl_TabelaPrincipal{
    background-color:#ffffff;
    border:1px solid #e5e7eb;
    border-radius:12px;
    overflow-x:auto;
}

.Cl_TabelaPrincipal table{
    width:100%;
    border-collapse:collapse;
    table-layout:fixed;
    font-size:14px;
}

/* Células base */
.Cl_TabelaPrincipal th,
.Cl_TabelaPrincipal td{
    padding:6px;
    border:1px solid #e5e7eb; /* borda mais leve */
    text-align:left;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Cabeçalho: AZURE CLARO + TEXTO AZURE ESCURO (não usar dourado como fundo) */
.Cl_TabelaPrincipal th{
    background-color:#eef3f6; /* Azure claro */
    color:#1c2e3c;            /* Azure escuro */
    font-weight:700;
}

/* detalhe institucional (linha inferior dourada suave) */
.Cl_TabelaPrincipal thead th{
    box-shadow: inset 0 -2px 0 rgba(200,162,94,.55);
}

.Cl_TabelaPrincipal td{
    font-size:12px;
    color:#1c2e3c;
}

/* Zebra + hover discretos e coerentes */
.Cl_TabelaPrincipal tbody tr:nth-child(even){
    background-color:#f6f9fb;
}

.Cl_TabelaPrincipal tbody tr:hover{
    background-color:#eef3f6;
}

/* Opcional: célula sem ellipsis */
.Cl_TabelaPrincipal td.no-ellipsis{
    white-space: normal;
    text-overflow: clip;
}

.Cl_TabelaPrincipal .Cl_Cell{
    display:block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tooltip */
.Cl_TabelaPrincipal td[title]{ position: relative; }

.Cl_TabelaPrincipal td[title]:hover::after{
    content: attr(title);
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    background: #1c2e3c;
    color: #ffffff;
    padding: 6px 8px;
    border-radius: 6px;
    box-shadow: 0 4px 18px rgba(0,0,0,.2);
    white-space: normal;
    max-width: 480px;
    z-index: 1000;
    pointer-events: none;
    font-size: 12px;
    border: 1px solid rgba(200,162,94,.45);
}

.Cl_TabelaPrincipal td[title]:hover::before{
    content: "";
    position: absolute;
    left: 10px;
    top: 100%;
    border: 6px solid transparent;
    border-top-color: #1c2e3c;
    z-index: 1001;
}


/* ========================================================================= */
/* ========================== ICONES (Lucide / SVG) ======================== */
/* ========================================================================= */
.icon-tech{
    background-color:transparent !important;
    color:#c8a25e; /* dourado (acento) */
    width:20px;
    height:20px;
    cursor:pointer;
    transition:color .2s ease, transform .15s ease;
    vertical-align:middle;
    gap:10px;
}
.icon-tech:hover{
    color:#1c2e3c; /* hover “volta” pro azure */
    transform: translateY(-1px);
}

.btn-icon {
    background: none !important;
    border: none !important;
    padding: 3px;
    margin: 0 2px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.btn-icon:hover {
    background: rgba(200,162,94,.16); /* dourado suave */
}

.btn-icon .icon-tech {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.Cl_BtnAcao {
    background-color: transparent !important;
    border: none !important;
    background: none !important;
}


/* ========================================================================= */
/* 5) PAGINAÇÃO (padrão)                                                     */
/* ========================================================================= */
.Cl_Paginacao{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  margin-top:12px;
  margin-right:4px;
}

.Cl_direcao{
  background-color:#ffffff;
  color:#1c2e3c;
  border:1px solid #d6dee6;
  padding:6px 14px;
  font-size:14px;
  border-radius:10px;
  cursor:pointer;
  transition: background-color .2s, color .2s, transform .15s, border-color .2s, box-shadow .2s;
}

.Cl_direcao:hover:not(:disabled){
  background-color:#eef3f6;
  border-color:#c8a25e;
  color:#1c2e3c;
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(28,46,60,.08);
}

.Cl_direcao:disabled{
  color: rgba(28,46,60,.35);
  border-color: rgba(214,222,230,.9);
  cursor:not-allowed;
  opacity:.75;
  background:#ffffff;
}

.Cl_Paginacao span{
  font-weight:800;
  color:#1c2e3c;
  font-size:14px;
}


/* ========================================================================= */
/* BOTÕES (padrão global)                                                    */
/* ========================================================================= */
.Cl_BotoesApoio{ 
    display:flex;
    gap:10px;
    text-align: right;
    margin:10px 40px 10px auto;
    justify-content:flex-end;
}

/* Primário: Azure escuro (corporativo) */
.Cl_botaoprimario, .Cl_botaoFiltro, .Cl_BtnIncluir, .Cl_BtnSalvar{
        min-width: 120px;
        font-weight: 900;
    background-color: #F97316;
    color: #ffffff;
    border: 1px solid #F97316;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s, border-color 0.2s;
}

.Cl_botaoprimario:hover, .Cl_botaoFiltro:hover, .Cl_BtnIncluir:hover, .Cl_BtnSalvar:hover {
    background-color: #1c2e3c;
    border-color: rgba(200,162,94,.55);
    box-shadow: 0 10px 22px rgba(28,46,60,.14);
    transform: translateY(-1px);
}

.Cl_botaoIncluir {
    margin-bottom: 10px;
}

/* Excluir (vermelho) - mantém */
.Cl_BtnExcluir {
        min-width: 120px;
        font-weight: 900;
    background-color: #E53935;
    color: #FFFFFF;
    border: none;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.Cl_BtnExcluir:hover {
    background-color: #C62828;
    transform: scale(1.02);
}

/* Cancelar (neutro claro coerente) */
.Cl_BtnCancelar {
    min-width: 120px;
    font-weight: 900;
    background-color: #ffffff;
    color: #1c2e3c;
    border: 1px solid #d6dee6;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s, border-color 0.2s, box-shadow 0.2s;
}

.Cl_BtnCancelar:hover {
    background-color: #eef3f6;
    border-color: #c8a25e;
    box-shadow: 0 10px 22px rgba(28,46,60,.10);
    transform: translateY(-1px);
}

/* Botão secundário genérico */
.btn-secundario {
    min-width: 120px;
    font-weight: 900;
  background: #ffffff;
  border: 1px solid #d6dee6;
  color: #1c2e3c;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, transform .15s, box-shadow .2s;
}

.btn-secundario:hover {
  background: #eef3f6;
  border-color: #c8a25e;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(28,46,60,.10);
}


/* ========================================================================= */
/* =============================== SWITCH ================================== */
/* ========================================================================= */
.Cl_Switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.Cl_Switch input {
    display: none;
}

.Cl_SwitchSlider {
    position: relative;
    width: 46px;
    height: 24px;
    border-radius: 999px;
    background: #CCCCCC;
    transition: .2s;
    box-shadow: inset 0 0 0 1px #BBBBBB;
}

.Cl_SwitchSlider::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #FFFFFF;
    transition: .2s;
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
}

.Cl_Switch input:checked + .Cl_SwitchSlider {
    background: #358fad;
    box-shadow: inset 0 0 0 1px #055f74;
}

.Cl_Switch input:checked + .Cl_SwitchSlider::after {
    transform: translateX(22px);
}

.Cl_SwitchGroup {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.Cl_SwitchLabel {
    order: -1;
    font-size: 13px;
    color: #333333;
    line-height: 1;
    white-space: nowrap;
    margin: 0;
}



/* ========================================================= */
/* MODAL DE APOIO – NOVO PADRÃO INSTITUCIONAL                 */
/* ========================================================= */

.apoio-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* níveis (empilhamento) */
.apoio-overlay.nivel-1 { z-index: 10000; }
.apoio-overlay.nivel-2 { z-index: 10002; }
.apoio-overlay.nivel-3 { z-index: 10004; }

/* janela */
.apoio-janela {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 96vw;
  max-height: 92vh;
}

/* largura controlada pelo JS */
.apoio-janela {
  width: var(--apoio-largura, 1000px);
}

/* altura fixa */
.apoio-janela.altura-fixa {
  height: var(--apoio-altura, 600px);
}

/* altura automática (viewport) */
.apoio-janela.altura-auto {
  height: 92vh;
}

/* iframe neutro */
.apoio-iframe {
  border: none;
  width: 100%;
  height: 100%;
  flex: 1;
  background: transparent;
}



/* ========================================================================= */
/* ============================== SCROLLBARS =============================== */
/* ========================================================================= */
*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: #F0F0F0;
}

*::-webkit-scrollbar-thumb {
    background: #CFD8DC;
    border-radius: 6px;
}

*::-webkit-scrollbar-thumb:hover {
    background: #B0BEC5;
}



/* ========================================================================= */
/* ===================== COMBOBOX (Cl_SelectLike) ========================== */
/* ========================================================================= */
.Cl_SelectLike {
    position: relative;
    display: inline-block;
    width: 100%;
}

.Cl_SelectDisplay {
    width: 100%;
    padding: 8px 32px 8px 12px;
    border: 1px solid #CCCCCC;
    border-radius: 6px;
    font-size: 14px;
    background-color: #FFFFFF;
    color: #333333;
    cursor: pointer;
    box-sizing: border-box;
}

.Cl_Caret {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #333333;
}

.Cl_ComboPanel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 100%;
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #FFFFFF;
    border: 1px solid #DDDDDD;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.08);
    z-index: 2000;
    box-sizing: border-box;
}

.Cl_ComboPanel.is-floating {
    position: fixed;
    inset: auto;
    min-width: auto !important;
    width: auto;
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 2147483000;
    box-sizing: border-box;
}

.Cl_ComboPanel[aria-hidden="true"]  { display: none; }
.Cl_ComboPanel[aria-hidden="false"] { display: block; }

.Cl_ComboSearch {
    padding: 8px;
    border-bottom: 1px solid #EEEEEE;
    position: sticky;
    top: 0;
    background: #FFFFFF;
    z-index: 1;
}

.Cl_ComboSearchInput {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #DDDDDD;
    border-radius: 8px;
}

.Cl_ComboStatus {
    padding: 6px 10px;
    font-size: 12px;
    color: #666666;
}

.Cl_ComboLista {
    display: grid;
    gap: 4px;
    padding: 8px;
}

.Cl_Item,
.Cl_ComboItem {
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    display: grid;
    grid-auto-rows: min-content;
    gap: 2px;
    transition: background-color 0.15s, box-shadow 0.15s;
    line-height: 1.25;
    color: #333333;
}

.Cl_Item:hover,
.Cl_ComboItem:hover,
.Cl_Item.Cl_sel,
.Cl_ComboItem[aria-selected="true"] {
    background: #F4FBEA;
    box-shadow: inset 0 0 0 1px #358fad;
}

.Cl_Item__linha,
.Cl_ComboItem__linha {
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.Cl_Item__linha--1,
.Cl_ComboItem__linha--1 {
    font-weight: 700;
}

.Cl_Item__rotulo,
.Cl_ComboItem__rotulo {
    font-weight: 700;
    margin-right: 4px;
}

.Cl_Item mark,
.Cl_ComboItem mark,
.Cl_Match mark {
    background: #FFF3BF;
    padding: 0 2px;
    border-radius: 3px;
}

.Cl_SelectDisplay:focus,
.Cl_Caret:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(133,195,0,.35);
    border-color: #358fad;
}

#combo_conta {
    width: 420px;
}



/* ========================================================================= */
/* Garante: Confirmar à ESQUERDA, Cancelar à DIREITA, em todos os SweetAlerts */
/* ========================================================================= */
.swal2-actions {
  display: flex;
  justify-content: center;
}
.swal2-actions .swal2-confirm { order: 1 !important; }
.swal2-actions .swal2-cancel  { order: 2 !important; }
.swal2-actions .swal2-styled  { margin: 0 .25rem; }

/* SweetAlert sempre acima de qualquer modal do sistema  */
.swal2-container {
  z-index: 20000 !important;
}




/* ========================================================================= */
/* ===================== NOVO FILTRO - PADRÃO CHECKLIST ==================== */
/* ========================================================================= */
.filter-panel {
    display: flex;
    flex-wrap: wrap;          /* permite quebrar para baixo quando faltar espaço */
    gap: 12px 16px;
    align-items: flex-end;
    padding: 12px 16px;
    background: #f3f3f3;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    border: 1px solid #e0e0e0;
}

/* Bloco de campos (lado esquerdo) */
.filter-panel-fields {
    display: flex;
    flex-wrap: wrap;          /* campos lado a lado, quebrando para a próxima linha quando necessário */
    gap: 12px;
    flex: 1 1 auto;           /* ocupa o espaço disponível à esquerda */
}

/* Cada campo (label em cima, input/seleção embaixo) */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 200px;          /* largura "ideal" de ~200px, mas pode encolher/expandir */
    max-width: 100%;
    min-width: 0;   
}

.filter-group label {
    font-size: 9px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    color: #9a908e !important;
}



/* Input, combobox (quando for <input>) e <select> com o MESMO visual */
.filter-group input,
.filter-group select {
    width: 100%;
    min-width: 0; 
    height: 34px;
    border-radius: 6px;
    border: 1px solid rgba(75, 85, 99, 0.9);
    background: #ffffff;
    color: #6f6361;
    padding: 0 10px;
    font-size: 11px;
    outline: none;
    box-sizing: border-box;
}

/* Bloco de botões (lado direito) */
.filter-panel-actions {
    display: flex;
    flex-wrap: nowrap;        /* botões sempre lado a lado, não um abaixo do outro */
    gap: 8px;
    align-items: flex-end;
    margin-left: auto;        /* empurra o bloco de botões para a direita */
    white-space: nowrap;
}

/* Botões padrão do filtro (podem ser reaproveitados em outras ações) */
.btn {
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background: #055f74;
    color: #ffffff;
}

.btn-primary:hover {
    background: #358fad;
}

.btn-secondary {
    background: #358fad;
    color: #e5e7eb;
}

.btn-secondary:hover {
    background: #2b7087;
}



/* ========================================================================= */
/* ======================== MOVIMENTO REDUZIDO ============================= */
/* ========================================================================= */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}


/* ========================================================================= */
/* ================================ PRINT ================================== */
/* ========================================================================= */
@media print {
    .Cl_BotoesApoio,
    .btn-icon,
    .Cl_Paginacao {
        display: none !important;
    }
    a::after {
        content: " (" attr(href) ")";
        font-size: 10px;
    }
    body {
        background: #FFFFFF !important;
    }
}
