/* =====================================================================================================
   Portal da Transparência - tema moderno
   Carregado DEPOIS de assets/css/style.css e my_css.css. Esses arquivos usam !important em th/td/campos
   (fonte 11px, Arial, preto, padding 3px); por isso as regras abaixo usam seletores mais específicos e
   !important onde é preciso vencer o tema antigo. Acessibilidade: classes ptm-pb / ptm-contraste no <html>
   e zoom de texto (portal-moderno.js).
   ===================================================================================================== */
:root {
    --ptm-marinho: #0b2545;
    --ptm-marinho-2: #13315c;
    --ptm-marinho-3: #1d4373;
    --ptm-azul: #1757ac;
    --ptm-azul-2: #2370cd;
    --ptm-azul-claro: #e8f1fc;
    --ptm-tinta: #1b2430;
    --ptm-tinta-2: #556070;
    --ptm-linha: #dfe5ee;
    --ptm-linha-campo: #c7d1de;
    --ptm-fundo: #f3f5f9;
    --ptm-card: #ffffff;
    --ptm-raio: 12px;
    --ptm-raio-sm: 8px;
    --ptm-sombra: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 14px rgba(16, 24, 40, .06);
    --ptm-sombra-alta: 0 12px 40px rgba(16, 24, 40, .18);
    --ptm-fonte: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --ptm-topo-alt: 64px;
    --ptm-menu-larg: 256px;
    --ptm-menu-larg-rec: 68px;
}

/* ---------------------------------------------------------------------------------------------- base */
html body {
    font-family: var(--ptm-fonte);
    font-size: 15px;
    background: var(--ptm-fundo);
    color: var(--ptm-tinta);
    -webkit-font-smoothing: antialiased;
}
html body a { color: var(--ptm-azul-2); }
html body h1, html body h2, html body h3, html body h4, html body h5 { color: var(--ptm-tinta); letter-spacing: -.01em; }
html body h2 { font-size: 1.45rem; font-weight: 700; }
html body hr { border: 0; border-top: 1px solid var(--ptm-linha); opacity: 1; color: var(--ptm-linha); }
:focus-visible { outline: 3px solid rgba(35, 112, 205, .45) !important; outline-offset: 2px; }

/* ---------------------------------------------------------------------------------------------- barra superior */
html body .navbar.ptm-topo {
    height: var(--ptm-topo-alt);
    padding: 0;
    background: #fff;
    border-bottom: 1px solid var(--ptm-linha);
    box-shadow: 0 1px 10px rgba(16, 24, 40, .06);
    z-index: 1030;
}
html body .navbar.ptm-topo .ptm-topo-linha {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.1rem 0 .6rem;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
}
html body .ptm-topo-menu { order: 1; } html body .ptm-marca { order: 2; } html body .ptm-busca { order: 3; } html body .ptm-acess { order: 4; }
@media (max-width: 640px) { html body .navbar.ptm-topo .ptm-topo-linha { gap: .5rem; padding: 0 .5rem; } html body .ptm-busca button { padding: 0 .7rem; } }
html body .ptm-topo-menu {
    flex: none;
    width: 42px; height: 42px;
    border: 0; border-radius: 10px;
    background: transparent;
    color: var(--ptm-marinho);
    font-size: 1.55rem;
    display: grid; place-items: center;
    line-height: 1;
}
html body .ptm-topo-menu:hover { background: var(--ptm-azul-claro); color: var(--ptm-azul); }
html body .ptm-marca { display: flex; align-items: center; gap: .65rem; text-decoration: none; flex: none; color: var(--ptm-marinho); }
html body .ptm-marca:hover { color: var(--ptm-marinho); }
.ptm-marca-icone {
    width: 40px; height: 40px; border-radius: 11px;
    background: linear-gradient(135deg, var(--ptm-azul-2), var(--ptm-marinho));
    color: #fff; display: grid; place-items: center; font-size: 1.25rem;
}
.ptm-marca-texto { display: flex; flex-direction: column; line-height: 1.15; }
.ptm-marca-texto strong { font-size: 1.05rem; font-weight: 750; color: var(--ptm-marinho); }
.ptm-marca-texto small { font-size: .74rem; color: var(--ptm-tinta-2); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

html body .ptm-busca {
    flex: 1 1 auto; max-width: 560px; min-width: 180px;
    display: flex; align-items: center;
    background: #f1f4f8; border: 1px solid var(--ptm-linha-campo); border-radius: 999px;
    padding: 0 .3rem 0 .9rem; height: 42px; margin: 0 auto;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
html body .ptm-busca:focus-within { background: #fff; border-color: var(--ptm-azul-2); box-shadow: 0 0 0 3px rgba(35, 112, 205, .15); }
html body .ptm-busca > i { color: var(--ptm-tinta-2); font-size: 1rem; }
html body .ptm-busca input[type=search] {
    flex: 1; min-width: 0; height: 100%;
    border: 0 !important; background: transparent !important; box-shadow: none !important; outline: none !important;
    color: var(--ptm-tinta) !important; font-weight: 500 !important; font-size: .92rem !important;
    padding: 0 .6rem !important;
}
html body .ptm-busca input[type=search]::placeholder { color: #7b8594; opacity: 1; font-weight: 400; }
html body .ptm-busca button {
    border: 0; border-radius: 999px; height: 34px; padding: 0 1.05rem;
    background: var(--ptm-azul-2); color: #fff; font-weight: 650; font-size: .85rem;
}
html body .ptm-busca button:hover { background: var(--ptm-azul); }

html body .ptm-acess { display: flex; align-items: center; gap: .25rem; flex: none; }
.ptm-acess-rotulo { font-size: .78rem; font-weight: 700; color: var(--ptm-tinta-2); margin-right: .25rem; white-space: nowrap; }
.ptm-acess-rotulo i { color: var(--ptm-azul-2); font-size: 1rem; vertical-align: -2px; }
html body .ptm-acess button {
    height: 34px; min-width: 34px; padding: 0 .55rem;
    border: 1px solid var(--ptm-linha-campo); background: #fff; color: var(--ptm-marinho);
    border-radius: 8px; font-weight: 700; font-size: .82rem; white-space: nowrap;
    display: inline-flex; align-items: center; gap: .25rem;
}
html body .ptm-acess button sup { top: -.35em; font-size: .7em; }
html body .ptm-acess button:hover { border-color: var(--ptm-azul-2); color: var(--ptm-azul); }
html body .ptm-acess button[aria-pressed="true"] { background: var(--ptm-marinho); border-color: var(--ptm-marinho); color: #fff; }
[data-ptm-fonte-nivel] { font-size: .75rem; min-width: 2.4em; text-align: center; }
@media (max-width: 1280px) { .ptm-acess button span:not([data-ptm-fonte-nivel]) { display: none; } }
@media (max-width: 991.98px) { .ptm-acess-rotulo, .ptm-marca-texto small { display: none; } .ptm-busca { max-width: none; } }
@media (max-width: 640px) { .ptm-marca-texto { display: none; } html body .ptm-acess button[data-ptm-acao^="fonte"] { display: none; } }

/* ---------------------------------------------------------------------------------------------- menu lateral */
html body .main-container { padding-top: 0; }
html body .fixed-sidebar {
    top: var(--ptm-topo-alt);
    width: var(--ptm-menu-larg);
    padding: .75rem 0 1rem;
    background: linear-gradient(180deg, var(--ptm-marinho) 0%, var(--ptm-marinho-2) 100%);
    border-right: 0;
    box-shadow: 2px 0 18px rgba(11, 37, 69, .18);
    transition: width .18s ease, transform .2s ease;
    z-index: 1020;
}
html body .fixed-sidebar .custom-scroll { padding-bottom: 1rem; }
html body .fixed-sidebar .custom-scroll::-webkit-scrollbar { width: 6px; }
html body .fixed-sidebar .custom-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .2); border-radius: 6px; }
html body .fixed-sidebar .nav-sidebar { list-style: none; margin: 0; padding: 0 .65rem; }
html body .fixed-sidebar .custom-scroll .nav-sidebar .nav-item { margin: 2px 0; padding: 0 !important; }
html body .fixed-sidebar .custom-scroll .nav-sidebar .nav-item a,
html body .fixed-sidebar .custom-scroll .nav-sidebar .nav-item a.aMenuTop {
    height: auto !important;
    min-height: 42px;
    line-height: 1.25 !important;
    padding: .55rem .75rem !important;
    border: 0 !important;
    border-radius: 9px;
    color: #dbe6f5 !important;
    font-size: .89rem !important;
    font-weight: 500;
    display: flex; align-items: center; gap: .75rem;
    white-space: normal;
    transition: background .15s, color .15s;
}
html body .fixed-sidebar .custom-scroll .nav-sidebar .nav-item a i {
    width: 22px; flex: none; text-align: center; font-size: 1.08rem; color: #8fb6ec !important;
}
html body .fixed-sidebar .custom-scroll .nav-sidebar .nav-item a .title { color: inherit !important; font-size: inherit !important; }
html body .fixed-sidebar .custom-scroll .nav-sidebar .nav-item a:hover,
html body .fixed-sidebar .custom-scroll .nav-sidebar .nav-item a:focus-visible {
    background: rgba(255, 255, 255, .1) !important;
    color: #fff !important;
}
html body .fixed-sidebar .custom-scroll .nav-sidebar .nav-item a:hover i { color: #fff !important; }
html body .fixed-sidebar .custom-scroll .nav-sidebar .nav-item a.ptm-ativo { background: rgba(255, 255, 255, .16) !important; color: #fff !important; box-shadow: inset 3px 0 0 #6aabf1; }

html body .main-content,
html body .main-container .main-content {
    padding: calc(var(--ptm-topo-alt) + 1.5rem) 1.75rem 2.5rem calc(var(--ptm-menu-larg) + 1.75rem) !important;
    transition: padding .18s ease;
    max-width: none;
}

/* menu recolhido (só ícones) */
html.ptm-menu-recolhido body .fixed-sidebar { width: var(--ptm-menu-larg-rec); }
html.ptm-menu-recolhido body .fixed-sidebar .nav-sidebar { padding: 0 .55rem; }
html.ptm-menu-recolhido body .fixed-sidebar .custom-scroll .nav-sidebar .nav-item a { justify-content: center; padding: .6rem 0 !important; }
html.ptm-menu-recolhido body .fixed-sidebar .custom-scroll .nav-sidebar .nav-item a .title { display: none; }
html.ptm-menu-recolhido body .main-content,
html.ptm-menu-recolhido body .main-container .main-content { padding-left: calc(var(--ptm-menu-larg-rec) + 1.75rem) !important; }

/* celular / tablet: menu por cima do conteúdo */
@media (max-width: 991.98px) {
    html body .fixed-sidebar { transform: translateX(-105%); width: min(86vw, 300px); }
    html.ptm-menu-aberto body .fixed-sidebar { transform: none; }
    html.ptm-menu-aberto body::after { content: ""; position: fixed; inset: var(--ptm-topo-alt) 0 0 0; background: rgba(11, 37, 69, .45); z-index: 1019; }
    html body .main-content, html body .main-container .main-content,
    html.ptm-menu-recolhido body .main-content { padding: calc(var(--ptm-topo-alt) + 1rem) .9rem 2rem .9rem !important; }
    html.ptm-menu-recolhido body .fixed-sidebar .custom-scroll .nav-sidebar .nav-item a .title { display: inline; }
}

/* ---------------------------------------------------------------------------------------------- cartões */
html body .card {
    border: 1px solid var(--ptm-linha);
    border-radius: var(--ptm-raio);
    box-shadow: var(--ptm-sombra);
    background: #fff;
}
html body .card.shadow { box-shadow: var(--ptm-sombra) !important; }
html body .card > .card-header {
    background: #fff;
    border-bottom: 1px solid var(--ptm-linha);
    padding: .85rem 1.15rem;
    border-radius: var(--ptm-raio) var(--ptm-raio) 0 0;
}
html body .card-header h5, html body .card-header h4, html body .card-header label {
    font-size: 1rem !important; font-weight: 700; color: var(--ptm-tinta); margin: 0;
}
html body .card-header .icon, html body .card-header i.fa-info-circle { color: var(--ptm-azul-2); }
html body .card-body { padding: 1.15rem 1.2rem; }
html body .card .card { box-shadow: none; }

/* ---------------------------------------------------------------------------------------------- formulários */
html body label, html body .form-label, html body .col-form-label {
    color: #344154; font-weight: 600; font-size: .82rem !important; font-family: var(--ptm-fonte) !important; margin-bottom: .3rem;
}
html body input, html body select, html body textarea { font-family: var(--ptm-fonte) !important; }
html body .form-control,
html body .form-select,
html body select.form-control,
html body input.form-control,
html body textarea.form-control {
    min-height: 40px;
    padding: .45rem .8rem;
    font-size: .92rem !important;
    color: var(--ptm-tinta) !important;
    background-color: #fff;
    border: 1px solid var(--ptm-linha-campo) !important;
    border-radius: var(--ptm-raio-sm) !important;
    box-shadow: 0 1px 1px rgba(16, 24, 40, .03);
    transition: border-color .15s, box-shadow .15s;
}
html body .form-control.rounded { border-radius: var(--ptm-raio-sm) !important; }
html body .form-control::placeholder { color: #8b95a3; }
html body .form-control:hover, html body .form-select:hover { border-color: #a9b6c7 !important; }
html body .form-control:focus, html body .form-select:focus {
    border-color: var(--ptm-azul-2) !important;
    box-shadow: 0 0 0 3px rgba(35, 112, 205, .16) !important;
    outline: none;
}
html body .form-control:disabled, html body .form-control[readonly], html body .form-select:disabled {
    background-color: #f3f5f8 !important; color: #5b6470 !important;
}
html body .form-control-sm { min-height: 34px; font-size: .85rem !important; }
html body input[type="checkbox"], html body input[type="radio"] {
    accent-color: var(--ptm-azul-2);
    width: 17px; height: 17px; margin-top: 0; vertical-align: -3px; cursor: pointer;
}
html body input[type="checkbox"]:not(.form-check-input), html body input[type="radio"]:not(.form-check-input) { border: 0; }
html body .form-check-input { border: 1.5px solid #8a97a8 !important; background-color: #fff; margin-right: .3rem; }
html body .form-check-input:checked { background-color: var(--ptm-azul-2); border-color: var(--ptm-azul-2); }
html body .form-check-label, html body .form-check-label-black { color: var(--ptm-tinta) !important; font-weight: 500; font-size: .9rem; cursor: pointer; }
html body .form-group { margin-bottom: .9rem !important; }
html body .input-group-text { border-color: var(--ptm-linha-campo); background: #f3f5f8; border-radius: var(--ptm-raio-sm); }

/* ---------------------------------------------------------------------------------------------- botões */
html body .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    min-height: 38px;
    padding: .45rem 1rem;
    font-size: .88rem; font-weight: 650; letter-spacing: .005em;
    border-radius: var(--ptm-raio-sm) !important;
    border-width: 1px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
    transition: background .15s, border-color .15s, box-shadow .15s, transform .08s;
}
html body .btn:active { transform: translateY(1px); }
html body .btn:focus-visible { box-shadow: 0 0 0 3px rgba(35, 112, 205, .3); }
html body .btn-sm { min-height: 32px; padding: .3rem .75rem; font-size: .8rem; }
html body .btn-primary { background: var(--ptm-azul-2) !important; border-color: var(--ptm-azul-2) !important; color: #fff !important; }
html body .btn-primary:hover { background: var(--ptm-azul) !important; border-color: var(--ptm-azul) !important; }
html body .btn-success { background: #13804a !important; border-color: #13804a !important; color: #fff !important; }
html body .btn-success:hover { background: #0e6a3c !important; }
html body .btn-danger { background: #c4302b !important; border-color: #c4302b !important; color: #fff !important; }
html body .btn-danger:hover { background: #a52622 !important; }
html body .btn-warning { background: #f2a600 !important; border-color: #f2a600 !important; color: #3d2a00 !important; }
html body .btn-info { background: #0f7c8c !important; border-color: #0f7c8c !important; color: #fff !important; }
html body .btn-secondary, html body .btn-light, html body .btn:not([class*="btn-"]) {
    background: #fff !important; border: 1px solid var(--ptm-linha-campo) !important; color: var(--ptm-tinta) !important;
}
html body .btn-secondary:hover, html body .btn-light:hover, html body .btn:not([class*="btn-"]):hover { border-color: var(--ptm-azul-2) !important; color: var(--ptm-azul) !important; }
html body [class*="btn-outline-"] { background: #fff !important; }
html body .btn-outline-primary { color: var(--ptm-azul-2) !important; border-color: var(--ptm-azul-2) !important; }
html body .btn-outline-primary:hover { background: var(--ptm-azul-claro) !important; }
/* botões redondos de ação nas tabelas (expandir, detalhes...) */
html body .btn.btn-circle {
    width: 34px; height: 34px; min-height: 34px; padding: 0; border-radius: 9px !important;
    font-size: .9rem; box-shadow: none;
}
html body .btn.btn-circle.btn-sm { width: 30px; height: 30px; min-height: 30px; font-size: .82rem; }
html body .btn-rounded { border-radius: var(--ptm-raio-sm) !important; }
html body .btn-close { border-radius: 8px; opacity: .6; }
html body .btn-close:hover { opacity: 1; }

/* abas */
html body .nav-tabs { border-bottom: 1px solid var(--ptm-linha); gap: .2rem; flex-wrap: wrap; margin-bottom: 1rem; }
html body .nav-tabs .nav-item { font-size: .9rem !important; }
html body .nav-tabs .nav-link {
    border: 0 !important; border-bottom: 3px solid transparent !important; border-radius: 8px 8px 0 0;
    color: var(--ptm-tinta-2) !important; font-weight: 600; padding: .6rem .95rem;
}
html body .nav-tabs .nav-link:hover { color: var(--ptm-azul) !important; background: var(--ptm-azul-claro); }
html body .nav-tabs .nav-link.active { color: var(--ptm-azul) !important; border-bottom-color: var(--ptm-azul-2) !important; background: transparent; }

/* menus suspensos */
html body .dropdown-menu { border: 1px solid var(--ptm-linha); border-radius: 10px; box-shadow: var(--ptm-sombra-alta); padding: .35rem; }
html body .dropdown-item { border-radius: 7px; padding: .45rem .7rem; font-size: .9rem; }
html body .dropdown-item.active, html body .dropdown-item:active { background: var(--ptm-azul-2); color: #fff; }

/* ---------------------------------------------------------------------------------------------- tabelas */
html body .table-responsive { border-radius: 10px; border: 1px solid var(--ptm-linha); background: #fff; }
html body .table {
    color: var(--ptm-tinta); margin-bottom: 0; border-color: var(--ptm-linha);
    border-collapse: separate; border-spacing: 0; width: 100%;
}
html body .table.table-bordered, html body .table.table-bordered > :not(caption) > * > * { border-width: 0 !important; }
html body .table > :not(caption) > * > *,
html body table.table td,
html body table.table th {
    padding: .65rem .75rem !important;
    font-size: .875rem !important;
    font-family: var(--ptm-fonte) !important;
    color: var(--ptm-tinta) !important;
    max-width: 420px !important;
    line-height: 1.4 !important;
    vertical-align: middle;
    border-bottom: 1px solid #edf0f5 !important;
    background-color: transparent;
}
html body table.table td label { font-size: inherit !important; color: inherit !important; font-weight: 400; margin: 0; }
html body table.table thead th, html body table.table thead td,
html body table.table thead > th,
html body table.table > tr.bg-light > *, html body table.table > tbody > tr.bg-light:first-child > *,
html body table.table tr.bg-light > th {
    background: #f4f6fa !important;
    color: #3a4757 !important;
    font-size: .74rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--ptm-linha) !important;
    white-space: nowrap !important;
    text-align: left !important;
}
html body table.table tbody tr:hover > td { background: #f6f9fe; }
html body table.table tbody tr:last-child > td { border-bottom: 0 !important; }
html body .table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: #fafbfd; }

/* paginação */
html body .pagination { gap: .3rem; flex-wrap: wrap; margin: 1rem 0 .25rem; justify-content: center; }
html body .page-item .page-link {
    min-width: 36px; height: 36px; padding: 0 .6rem; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px !important; border: 1px solid var(--ptm-linha-campo); color: var(--ptm-azul); background: #fff; font-weight: 600; font-size: .85rem;
}
html body .page-item .page-link:hover { background: var(--ptm-azul-claro); border-color: var(--ptm-azul-2); }
html body .page-item.active .page-link { background: var(--ptm-azul-2); border-color: var(--ptm-azul-2); color: #fff; }

/* modais */
html body .modal-content { border: 0; border-radius: 14px; box-shadow: var(--ptm-sombra-alta); }
html body .modal-header { border-bottom: 1px solid var(--ptm-linha); padding: 1rem 1.25rem; }
html body .modal-title { font-weight: 700; font-size: 1.1rem; }
html body .modal-footer { border-top: 1px solid var(--ptm-linha); }

/* ===================================================================================================== */
/* barra de ordenação / exportação das tabelas (portal-moderno.js)                                        */
/* ===================================================================================================== */
[data-pt-oculta] { display: none !important; }
html body table > caption.pt-ferramentas {
    caption-side: top; padding: 0 0 .6rem !important; color: inherit; text-align: left;
}
.pt-barra {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
    padding: .55rem .7rem; background: #f8fafc; border: 1px solid var(--ptm-linha); border-radius: 10px;
}
.pt-dica { margin-right: auto; font-size: .8rem; color: var(--ptm-tinta-2); display: inline-flex; gap: .35rem; align-items: center; }
.pt-exportar { display: inline-flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.pt-exp-rotulo { font-size: .78rem; font-weight: 700; color: var(--ptm-tinta-2); margin-right: .15rem; }
.pt-btn, .pt-fmt {
    display: inline-flex; align-items: center; gap: .3rem;
    height: 30px; padding: 0 .6rem;
    border: 1px solid var(--ptm-linha-campo); background: #fff; color: var(--ptm-tinta);
    font-size: .76rem; font-weight: 700; border-radius: 7px; cursor: pointer; line-height: 1;
}
.pt-btn:hover, .pt-fmt:hover { border-color: var(--ptm-azul-2); color: var(--ptm-azul); background: var(--ptm-azul-claro); }
.pt-fmt i { font-size: .95rem; }
.pt-fmt-pdf i { color: #c4302b; }
.pt-fmt-xls i { color: #13804a; }
.pt-limpar { color: #8a2c0d; border-color: #f1c7b5; background: #fff6f2; }

html body table.table [data-pt-col] { cursor: pointer; user-select: none; position: relative; padding-right: 1.6rem !important; }
html body table.table [data-pt-col]::after {
    content: "\2195"; position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
    opacity: .35; font-size: .85em; font-weight: 400;
}
html body table.table [data-pt-col]:hover { color: var(--ptm-azul) !important; background: #eaf1fb !important; }
html body table.table [data-pt-col]:hover::after { opacity: .8; }
html body .pt-clone [data-pt-ord="asc"]::after { content: "\25B2"; opacity: 1; color: var(--ptm-azul-2); }
html body .pt-clone [data-pt-ord="desc"]::after { content: "\25BC"; opacity: 1; color: var(--ptm-azul-2); }
html body .pt-clone th[data-pt-ord], html body .pt-clone td[data-pt-ord] { color: var(--ptm-azul) !important; background: #eaf1fb !important; }
.pt-ordenada { overflow-x: auto; border: 1px solid var(--ptm-linha); border-radius: 10px; background: #fff; }
.pt-paginas { display: flex; align-items: center; justify-content: center; gap: .3rem; flex-wrap: wrap; margin: .75rem 0; }
.pt-pg { min-width: 36px; height: 36px; border: 1px solid var(--ptm-linha-campo); background: #fff; color: var(--ptm-azul); border-radius: 8px; font-weight: 600; }
.pt-pg.ativo { background: var(--ptm-azul-2); border-color: var(--ptm-azul-2); color: #fff; }
.pt-pg:disabled { opacity: .45; }
.pt-pg-info { margin-left: .6rem; font-size: .8rem; color: var(--ptm-tinta-2); }

.pt-aviso {
    position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 100001;
    background: #1b2430; color: #fff; padding: .6rem 1rem; border-radius: 10px; font-size: .88rem;
    box-shadow: var(--ptm-sombra-alta); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.pt-aviso.visivel { opacity: 1; transform: translate(-50%, 0); }
.pt-aviso.erro { background: #b42318; }

/* ===================================================================================================== */
/* acessibilidade                                                                                         */
/* ===================================================================================================== */
html.ptm-pb { filter: grayscale(100%); }
/* Alto contraste: fundo preto só nas superfícies; o resto fica transparente (camadas fixas que cobrem a tela,
   como o spinner .sgs-root, o fundo de modais e o VLibras, continuam transparentes e não escurecem nada). */
html.ptm-contraste, html.ptm-contraste body { background: #000 !important; }
html.ptm-contraste body *:not(svg):not(path):not(canvas):not(img):not(video):not(iframe) {
    background-color: transparent !important;
    background-image: none !important;
    color: #fff !important;
    border-color: #fff !important;
    box-shadow: none !important;
    text-shadow: none !important;
}
html.ptm-contraste body :is(.navbar, .fixed-sidebar, .card, .modal-content, .dropdown-menu, .table-responsive, table, thead, tbody, tr, th, td,
    .ptm-card, .ptm-hero, .ptm-atalho, .ptm-total, .ptm-feed-item, .ptm-doc, .ptm-modal, .pt-doc-janela, .pt-doc-cab, .pt-doc-corpo,
    .pt-barra, .pt-ordenada, .pt-aviso, .sgs-card, input, select, textarea, button, .btn, .page-link, .ptm-busca, .ptm-dirigentes) {
    background-color: #000 !important;
}
html.ptm-contraste body .sgs-root, html.ptm-contraste body .sgs-veil, html.ptm-contraste body .modal-backdrop,
html.ptm-contraste body .ptm-modal-fundo, html.ptm-contraste body .pt-doc-fundo, html.ptm-contraste body [vw] { background-color: transparent !important; }
html.ptm-contraste body .sgs-card, html.ptm-contraste body .ptm-modal, html.ptm-contraste body .pt-doc-janela, html.ptm-contraste body .modal-content { border: 2px solid #fff !important; }
html.ptm-contraste body a, html.ptm-contraste body a *, html.ptm-contraste body .ptm-link,
html.ptm-contraste body [data-pt-col], html.ptm-contraste body .page-link { color: #ffeb3b !important; text-decoration: underline; }
html.ptm-contraste body button, html.ptm-contraste body .btn, html.ptm-contraste body input, html.ptm-contraste body select, html.ptm-contraste body textarea {
    border: 2px solid #fff !important;
}
html.ptm-contraste body input::placeholder { color: #ccc !important; }
html.ptm-contraste body button:hover, html.ptm-contraste body .btn:hover, html.ptm-contraste body button[aria-pressed="true"] { background-color: #ffeb3b !important; color: #000 !important; }
html.ptm-contraste body button:hover *, html.ptm-contraste body button[aria-pressed="true"] * { color: #000 !important; }
html.ptm-contraste canvas { background: #fff !important; }

/* ===================================================================================================== */
/* visualizador de documentos                                                                             */
/* ===================================================================================================== */
html.pt-doc-sem-rolagem, html.pt-doc-sem-rolagem body { overflow: hidden !important; }
#pt-doc { position: fixed; inset: 0; z-index: 100000; display: none; }
#pt-doc.aberto { display: block; }
.pt-doc-fundo { position: absolute; inset: 0; background: rgba(15, 23, 42, .62); animation: ptFade .15s ease-out; }
.pt-doc-janela {
    position: absolute; inset: 3vh 3vw; display: flex; flex-direction: column;
    background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--ptm-sombra-alta);
    animation: ptSobe .18s ease-out;
}
.pt-doc-cab { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem .7rem 1.1rem; border-bottom: 1px solid var(--ptm-linha); }
.pt-doc-icone { width: 40px; height: 40px; border-radius: 10px; background: var(--ptm-azul-claro); color: var(--ptm-azul); display: grid; place-items: center; font-size: 1.25rem; flex: none; }
.pt-doc-titulos { min-width: 0; flex: 1; }
.pt-doc-titulos h3 { margin: 0; font-size: 1rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-doc-titulos small { color: var(--ptm-tinta-2); font-size: .78rem; }
.pt-doc-acoes { display: flex; gap: .3rem; align-items: center; }
.pt-doc-btn {
    height: 38px; min-width: 38px; padding: 0 .6rem; display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
    border: 1px solid var(--ptm-linha); background: #fff; color: var(--ptm-tinta); border-radius: 9px; text-decoration: none; font-weight: 600; font-size: .85rem; cursor: pointer;
}
.pt-doc-btn[hidden] { display: none; }
.pt-doc-btn:hover { border-color: var(--ptm-azul-2); color: var(--ptm-azul); }
.pt-doc-baixar { background: var(--ptm-azul-2); border-color: var(--ptm-azul-2); color: #fff; }
.pt-doc-baixar:hover { background: var(--ptm-azul); color: #fff; }
.pt-doc-corpo { position: relative; flex: 1; background: #eef1f5; overflow: auto; }
.pt-doc-corpo iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.pt-doc-imagem { min-height: 100%; display: grid; place-items: center; padding: 1.5rem; }
.pt-doc-imagem img { max-width: 100%; transform-origin: center top; transition: transform .15s; box-shadow: var(--ptm-sombra); border-radius: 6px; background: #fff; }
.pt-doc-carregando { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .7rem; color: var(--ptm-tinta-2); z-index: 1; background: #eef1f5; }
.pt-doc-giro { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #c9d6ea; border-top-color: var(--ptm-azul-2); animation: ptGira .8s linear infinite; }
.pt-doc-download { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem; text-align: center; padding: 2rem; color: var(--ptm-tinta-2); }
.pt-doc-download > i { font-size: 3.5rem; color: var(--ptm-azul-2); }
@media (max-width: 640px) {
    .pt-doc-janela { inset: 0; border-radius: 0; }
    .pt-doc-baixar span, [data-pt-doc=imprimir] { display: none; }
}
@keyframes ptFade { from { opacity: 0; } }
@keyframes ptSobe { from { opacity: 0; transform: translateY(12px) scale(.99); } }
@keyframes ptGira { to { transform: rotate(360deg); } }

/* ===================================================================================================== */
/* página inicial                                                                                         */
/* ===================================================================================================== */
.ptm-home { display: flex; flex-direction: column; gap: 1.5rem; }
.ptm-card { background: var(--ptm-card); border: 1px solid var(--ptm-linha); border-radius: var(--ptm-raio); box-shadow: var(--ptm-sombra); }

/* hero */
.ptm-hero {
    display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 1.25rem;
    background: radial-gradient(1200px 300px at 0% 0%, rgba(255, 255, 255, .14), transparent 60%), linear-gradient(120deg, #0f4a96 0%, #1757ac 50%, #2370cd 100%);
    color: #fff; border-radius: 20px; padding: 1.75rem; box-shadow: 0 10px 30px rgba(15, 74, 150, .25);
}
.ptm-sobretitulo { display: inline-flex; gap: .4rem; align-items: center; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; opacity: .85; }
.ptm-razao { font-size: clamp(1.35rem, 2.4vw, 2rem); font-weight: 750; margin: .45rem 0 .75rem; line-height: 1.2; color: #fff; }
.ptm-hero-meta { display: flex; flex-wrap: wrap; gap: .5rem; }
.ptm-chip {
    display: inline-flex; align-items: center; gap: .4rem; padding: .38rem .8rem; border-radius: 999px;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); color: #fff; font-size: .85rem; font-weight: 600;
}
.ptm-chip-link { cursor: pointer; transition: background .15s; }
.ptm-chip-link:hover { background: rgba(255, 255, 255, .26); }
.ptm-hero-desc { margin: 1rem 0 0; opacity: .85; font-size: .9rem; max-width: 60ch; }
.ptm-dirigentes { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); border-radius: 16px; padding: 1rem 1.1rem; max-height: 330px; overflow: auto; }
.ptm-bloco-titulo { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; margin: 0 0 .7rem; color: #fff; display: flex; gap: .45rem; align-items: center; }
.ptm-lista-dirigentes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.ptm-dirigentes, .ptm-lista-dirigentes li, .ptm-lista-dirigentes strong, .ptm-lista-dirigentes span, .ptm-lista-dirigentes small { color: #fff; opacity: 1; }
.ptm-lista-dirigentes li { display: flex; gap: .7rem; align-items: flex-start; }
.ptm-lista-dirigentes div { display: flex; flex-direction: column; min-width: 0; }
.ptm-lista-dirigentes strong { font-size: .92rem; }
.ptm-lista-dirigentes span { font-size: .82rem; color: rgba(255,255,255,.88); }
.ptm-lista-dirigentes small { font-size: .76rem; color: rgba(255,255,255,.75); }
.ptm-avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .2); display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.ptm-hero .ptm-vazio { color: rgba(255, 255, 255, .8); }

/* seções */
.ptm-secao-cab { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .85rem; }
.ptm-secao-cab h2, .ptm-hero h1, .ptm-hero h2 { line-height: 1.2; }
.ptm-secao-cab h2 { font-size: 1.15rem; font-weight: 700; margin: 0; display: flex; gap: .5rem; align-items: center; color: var(--ptm-tinta); }
.ptm-secao-cab h2 i { color: var(--ptm-azul-2); }

/* atalhos (telas do dashboard) */
.ptm-atalhos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .9rem; }
.ptm-atalho {
    position: relative; display: flex; flex-direction: column; gap: .7rem; height: 100%; min-height: 128px;
    padding: 1.05rem 1.1rem; border-radius: var(--ptm-raio); background: #fff; border: 1px solid var(--ptm-linha);
    box-shadow: var(--ptm-sombra); text-decoration: none; color: var(--ptm-tinta); overflow: hidden;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.ptm-atalho::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--ptm-azul-2); }
.ptm-atalho:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(16, 24, 40, .12); border-color: #c9d8ef; color: var(--ptm-tinta); }
.ptm-atalho-icone { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; background: var(--ptm-azul-claro); color: var(--ptm-azul); }
.ptm-atalho-nome { font-weight: 650; font-size: .98rem; line-height: 1.25; }
.ptm-atalho-ir { margin-top: auto; font-size: .8rem; font-weight: 650; color: var(--ptm-azul-2); display: inline-flex; gap: .3rem; align-items: center; }
.ptm-atalho:hover .ptm-atalho-ir i { transform: translateX(3px); }
.ptm-atalho-ir i { transition: transform .15s; }
/* a cor de cada atalho continua vindo do cadastro (Bootcolor: bg-primary, bg-success...) como acento */
.ptm-atalho.bg-primary, .ptm-atalho.bg-success, .ptm-atalho.bg-danger, .ptm-atalho.bg-warning, .ptm-atalho.bg-info,
.ptm-atalho.bg-secondary, .ptm-atalho.bg-dark, .ptm-atalho[class*="bg-"] { background: #fff !important; }
.ptm-atalho.bg-success::before { background: #008a17; } .ptm-atalho.bg-success .ptm-atalho-icone { background: #e6f4e8; color: #006c10; }
.ptm-atalho.bg-danger::before { background: #dc3c3d; } .ptm-atalho.bg-danger .ptm-atalho-icone { background: #fdecec; color: #b42318; }
.ptm-atalho.bg-warning::before { background: #f2a600; } .ptm-atalho.bg-warning .ptm-atalho-icone { background: #fff5dc; color: #8a5a00; }
.ptm-atalho.bg-info::before { background: #00b894; } .ptm-atalho.bg-info .ptm-atalho-icone { background: #e1f7f2; color: #00735c; }
.ptm-atalho.bg-secondary::before, .ptm-atalho.bg-dark::before { background: #5b6470; } .ptm-atalho.bg-secondary .ptm-atalho-icone, .ptm-atalho.bg-dark .ptm-atalho-icone { background: #eef0f3; color: #344154; }

/* período */
.ptm-periodo { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ptm-periodo label { display: flex; align-items: center; gap: .35rem; margin: 0; font-size: .85rem; }
.ptm-periodo input[type=date] { width: auto; min-height: 34px; }
.ptm-periodo-rapido { display: flex; gap: .25rem; flex-wrap: wrap; background: #e9eef5; padding: .2rem; border-radius: 10px; }
.ptm-btn-sm { border: 0; background: transparent; color: var(--ptm-tinta-2); font-size: .8rem; font-weight: 600; padding: .3rem .6rem; border-radius: 8px; }
.ptm-btn-sm:hover { background: #fff; color: var(--ptm-azul); }

/* indicadores */
.ptm-indicadores { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 992px) { .ptm-indicadores { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ptm-ind { padding: 1.05rem 1.1rem; display: flex; flex-direction: column; gap: .85rem; min-width: 0; }
.ptm-ind-largo { grid-column: 1 / -1; }
.ptm-ind-cab { display: flex; gap: .75rem; align-items: center; }
.ptm-ind-icone { flex: none; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--ptm-azul-claro); color: var(--ptm-azul); font-size: 1.15rem; }
.ptm-ind-titulos { flex: 1; min-width: 0; }
.ptm-ind-titulos h3 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--ptm-tinta); }
.ptm-ind-titulos small { color: var(--ptm-tinta-2); font-size: .78rem; }
.ptm-btn-icone { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--ptm-linha); background: #fff; color: var(--ptm-tinta-2); display: inline-grid; place-items: center; }
.ptm-btn-icone:hover { color: var(--ptm-azul); border-color: var(--ptm-azul-2); }
.ptm-ind-tipo .dropdown-item i { margin-right: .4rem; }
.ptm-ind-filtros { display: flex; flex-wrap: wrap; gap: .4rem; }
.ptm-check { display: inline-flex; align-items: center; gap: .35rem; margin: 0; padding: .28rem .65rem; border: 1px solid var(--ptm-linha); border-radius: 999px; font-size: .8rem; cursor: pointer; background: #fff; }
.ptm-check:has(input:checked) { background: var(--ptm-azul-claro); border-color: #b6d5f8; color: var(--ptm-azul); }
.ptm-ind-totais { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr) minmax(0, 1fr); gap: .6rem; }
.ptm-total { text-align: left; border: 1px solid var(--ptm-linha); background: #f8fafc; border-radius: 11px; padding: .6rem .75rem; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
button.ptm-total { cursor: pointer; transition: border-color .15s, background .15s; }
button.ptm-total:hover { border-color: var(--ptm-azul-2); background: var(--ptm-azul-claro); }
.ptm-total span { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--ptm-tinta-2); }
.ptm-total strong { font-size: clamp(.95rem, 1.4vw, 1.15rem); font-weight: 750; color: var(--ptm-tinta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.ptm-ind-corpo { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 760px) { .ptm-ind-corpo { grid-template-columns: 1fr; } .ptm-ind-totais { grid-template-columns: 1fr 1fr; } }
.ptm-grafico { position: relative; height: 260px; }
.ptm-resumo { width: 100%; border-collapse: collapse; font-size: .84rem; }
.ptm-resumo tr { cursor: pointer; }
html body .ptm-resumo td { padding: .45rem .3rem !important; border-bottom: 1px solid #eef1f5; vertical-align: top; font-size: .84rem !important; max-width: none !important; color: var(--ptm-tinta) !important; font-family: inherit !important; line-height: 1.3 !important; }
.ptm-resumo tr:hover td { background: #f6f9fe; }
.ptm-resumo-nome { display: block; font-weight: 600; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ptm-resumo-nome2 { display: block; font-size: .76rem; color: var(--ptm-tinta-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 32ch; }
.ptm-resumo td.text-end strong { display: block; font-variant-numeric: tabular-nums; }
.ptm-resumo td.text-end small, html body .ptm-resumo td small { color: var(--ptm-tinta-2); font-size: .72rem; }
.ptm-barra { display: block; height: 4px; border-radius: 4px; background: #eef1f5; margin-top: .35rem; overflow: hidden; }
.ptm-barra > span { display: block; height: 100%; border-radius: 4px; background: var(--ptm-azul-2); }
.ptm-ind-rodape { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .78rem; color: var(--ptm-tinta-2); border-top: 1px solid #eef1f5; padding-top: .6rem; margin-top: auto; }
.ptm-link { border: 0; background: none; color: var(--ptm-azul-2); font-weight: 650; font-size: .82rem; padding: 0; display: inline-flex; gap: .3rem; align-items: center; }
.ptm-link:hover { color: var(--ptm-azul); text-decoration: underline; }
.ptm-vazio { color: var(--ptm-tinta-2); font-size: .88rem; margin: .4rem 0; display: flex; gap: .4rem; align-items: center; }

/* feed */
.ptm-feed { padding: 1.05rem 1.1rem; }
.ptm-feed-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: .8rem; }
.ptm-feed-item { display: flex; flex-direction: column; gap: .4rem; padding: .85rem .9rem; border: 1px solid var(--ptm-linha); border-radius: 12px; background: #fbfcfe; min-height: 110px; }
.ptm-feed-item a, .ptm-feed-item > span:not(.sgs-tag) { color: var(--ptm-tinta); font-weight: 600; font-size: .88rem; line-height: 1.35; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ptm-feed-item a:hover { color: var(--ptm-azul); text-decoration: underline; }
.ptm-feed-item small { margin-top: auto; color: var(--ptm-tinta-2); font-size: .74rem; }
.ptm-feed .sgs-tag { align-self: flex-start; font-size: .66rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; padding: .16rem .5rem; border-radius: 999px; background: #e8f1fc; color: #1757ac; }
.ptm-feed .sgs-tag.brasil { background: #e6f4e8; color: #006c10; }
.ptm-feed .sgs-tag.info { background: #fff2e8; color: #9a3d0a; }

/* esqueletos de carregamento */
.ptm-skel { position: relative; overflow: hidden; background: #e8edf3; border-radius: 10px; }
.ptm-hero .ptm-skel { background: rgba(255, 255, 255, .16); }
.ptm-skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent); animation: ptBrilho 1.3s infinite; }
@keyframes ptBrilho { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .ptm-skel::after, .pt-doc-giro { animation: none; } }
.ptm-skel-titulo { height: 34px; width: 70%; margin: .6rem 0; }
.ptm-skel-linha { height: 16px; margin: .4rem 0; }
.ptm-skel-dirigente { height: 44px; margin-bottom: .6rem; }
.ptm-skel-atalho { height: 128px; border-radius: var(--ptm-raio); }
.ptm-skel-total { height: 58px; }
.ptm-skel-grafico { height: 240px; }
.ptm-skel-feed { height: 110px; border-radius: 12px; }

/* detalhe (drill-down) */
.ptm-modal-fundo { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); z-index: 1990; animation: ptFade .15s; }
.ptm-modal {
    position: fixed; inset: 4vh 4vw; z-index: 1991; background: #fff; border-radius: 16px; box-shadow: var(--ptm-sombra-alta);
    display: flex; flex-direction: column; overflow: hidden; animation: ptSobe .18s ease-out;
}
.ptm-modal > header { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; padding: 1rem 1.2rem; border-bottom: 1px solid var(--ptm-linha); }
.ptm-modal > header h3 { margin: 0; font-size: 1.1rem; font-weight: 700; }
.ptm-modal > header small { color: var(--ptm-tinta-2); }
.ptm-modal-resumo { display: flex; gap: 1.5rem; padding: .6rem 1.2rem; background: #f8fafc; border-bottom: 1px solid var(--ptm-linha); font-size: .9rem; color: var(--ptm-tinta-2); }
.ptm-modal-resumo strong { color: var(--ptm-tinta); font-variant-numeric: tabular-nums; }
.ptm-modal-corpo { flex: 1; overflow: auto; padding: 1rem 1.2rem; }
@media (max-width: 640px) { .ptm-modal { inset: 0; border-radius: 0; } .ptm-hero { grid-template-columns: 1fr; padding: 1.2rem; } }

/* ---------------------------------------------------------------------------------------------- documentos (PortalTransp_DocumentosDet) */
.ptm-categorias { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; }
.ptm-categoria {
    border: 1px solid var(--ptm-linha); background: #fff; color: var(--ptm-tinta); border-radius: 999px; padding: .42rem .9rem;
    font-size: .86rem; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.ptm-categoria:hover { border-color: var(--ptm-azul-2); color: var(--ptm-azul); }
.ptm-categoria.ativa { background: var(--ptm-azul-2); border-color: var(--ptm-azul-2); color: #fff; }
.ptm-docs-busca { display: flex; gap: .5rem; align-items: center; margin-bottom: .9rem; flex-wrap: wrap; }
.ptm-docs-busca .form-control { max-width: 360px; }
.ptm-docs-busca small { color: var(--ptm-tinta-2); }
.ptm-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: .8rem; }
.ptm-doc {
    display: flex; gap: .8rem; align-items: center; padding: .85rem .9rem; border: 1px solid var(--ptm-linha); border-radius: 12px;
    background: #fff; box-shadow: var(--ptm-sombra); cursor: pointer; text-align: left; width: 100%; transition: transform .12s, border-color .15s, box-shadow .15s;
}
.ptm-doc:hover { transform: translateY(-1px); border-color: #c9d8ef; box-shadow: 0 8px 22px rgba(16, 24, 40, .1); }
.ptm-doc-icone { flex: none; width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-size: 1.35rem; background: var(--ptm-azul-claro); color: var(--ptm-azul); }
.ptm-doc-icone.pdf { background: #fdecec; color: #b42318; }
.ptm-doc-icone.xls { background: #e6f4e8; color: #006c10; }
.ptm-doc-icone.doc { background: #e8f1fc; color: #1757ac; }
.ptm-doc-icone.img { background: #f3effd; color: #5b3fd0; }
.ptm-doc-icone.zip { background: #fff5dc; color: #8a5a00; }
.ptm-doc-texto { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.ptm-doc-texto strong { font-size: .9rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ptm-tinta); }
.ptm-doc-texto small { color: var(--ptm-tinta-2); font-size: .76rem; }
.ptm-doc-acao { color: var(--ptm-azul-2); font-size: 1.1rem; }
.ptm-btn-sm.ativo { background: #fff; color: var(--ptm-azul); box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }
html.ptm-contraste body .pt-clone [data-pt-ord], html.ptm-contraste body table.table [data-pt-col]:hover { background: #000 !important; color: #ffeb3b !important; }
html.ptm-contraste body .fixed-sidebar .nav-sidebar .nav-item a i { color: #ffeb3b !important; }
/* listagem geral de projetos (tela inicial) */
.ptm-projetos { padding: 1.05rem 1.1rem; }
.ptm-projetos .ptm-docs-busca .form-control { min-width: min(100%, 360px); }
.ptm-projetos .ptm-skel-linha { margin: .45rem 0; }


/* =====================================================================================================
   Temas (Aparência) — ponte entre o painel de temas do SAGI (RazorLibrary/sagi-temas.*) e as cores do portal.
   Sem escolha do visitante, o padrão é a própria cor do portal (window.sagiTemaPadrao no App.razor), então
   nada muda para quem não usar o painel. Alto contraste e preto e branco continuam valendo por cima.
   ===================================================================================================== */
html[data-sagi-tema]:not(.ptm-contraste) {
    --ptm-azul: var(--sagi-pri);
    --ptm-azul-2: color-mix(in srgb, var(--sagi-pri) 82%, #ffffff);
    --ptm-azul-claro: var(--sagi-pri-clara);
    --ptm-marinho: color-mix(in srgb, var(--sagi-pri) 45%, #050b16);
    --ptm-marinho-2: color-mix(in srgb, var(--sagi-pri) 60%, #050b16);
    --ptm-marinho-3: color-mix(in srgb, var(--sagi-pri) 78%, #050b16);
    --ptm-fundo: var(--sagi-fundo, #f3f5f9);
}
html[data-sagi-tema]:not(.ptm-contraste) :focus-visible { outline-color: rgba(var(--sagi-pri-rgb), .45) !important; }
html[data-sagi-cantos="retos"] { --ptm-raio: 0px; --ptm-raio-sm: 0px; }
html[data-sagi-cantos="suaves"] { --ptm-raio: 16px; --ptm-raio-sm: 10px; }
/* no portal o botão fica na barra de acessibilidade; o botão flutuante do SAGI não é necessário */
.sagi-tema-botao { display: none !important; }

/* modo escuro (beta) */
html[data-sagi-modo="escuro"]:not(.ptm-contraste) {
    --ptm-tinta: #e5e7eb;
    --ptm-tinta-2: #a7b0bd;
    --ptm-linha: #2b3647;
    --ptm-linha-campo: #3a475b;
    --ptm-fundo: #0f1621;
    --ptm-card: #17202d;
    --ptm-azul-claro: color-mix(in srgb, var(--sagi-pri) 25%, #17202d);
}
html[data-sagi-modo="escuro"]:not(.ptm-contraste) body :is(.navbar.ptm-topo, .card, .table-responsive, .pt-ordenada, .ptm-atalho, .ptm-atalho[class*="bg-"],
    .ptm-check, .ptm-btn-icone, .pt-pg, .ptm-acess button, .ptm-busca:focus-within, .modal-content, .ptm-modal, .pt-doc-janela, .dropdown-menu,
    .fixed-sidebar, [class*="btn-outline-"], .form-control, .form-select, .form-check-input, .page-link) {
    background-color: var(--ptm-card) !important;
    color: var(--ptm-tinta) !important;
    border-color: var(--ptm-linha) !important;
}
html[data-sagi-modo="escuro"]:not(.ptm-contraste) body :is(table th, table td) { background-color: var(--ptm-card) !important; color: var(--ptm-tinta) !important; border-color: var(--ptm-linha) !important; }
html[data-sagi-modo="escuro"]:not(.ptm-contraste) body :is(h1, h2, h3, h4, h5, h6, label, p, span, small, li) { color: inherit; }
html[data-sagi-modo="escuro"]:not(.ptm-contraste) body a { color: color-mix(in srgb, var(--sagi-pri) 55%, #ffffff); }
