/* ============================================================
   Relatórios do PAP Online — camada de modernização visual
   Usa os mesmos tokens (cores, tipografia, cantos, sombras)
   introduzidos no redesign de relatorioPAP.html (2026).
   Este arquivo é carregado DEPOIS de css/index.css e sobrescreve
   apenas o necessário — nada aqui altera index.css, que continua
   sendo usado por outras páginas do sistema.
   ============================================================ */

:root {
    --rpo-azul-escuro: #0d2d4e;
    --rpo-azul-medio: #1a5487;
    --rpo-azul-claro: #2271ad;
    --rpo-azul-texto: #2d5f8a;
    --rpo-borda: #b8cfe0;
    --rpo-fundo: #eef2f7;
    --rpo-texto: #1e2a38;
    --rpo-texto-suave: #5b6b7c;
    --rpo-branco: #ffffff;
    --rpo-radius-lg: 14px;
    --rpo-radius-md: 8px;
    --rpo-radius-sm: 6px;
    --rpo-sombra-card: 0 2px 12px rgba(0, 0, 0, 0.07);
    --rpo-sombra-header: 0 6px 24px rgba(13, 45, 78, 0.22);
}

body {
    background: var(--rpo-fundo);
    font-family: 'Inter', Arial, sans-serif;
}

#conteudoPagina {
    max-width: 1060px;
    margin: 0 auto;
    padding: 28px 24px 60px 24px;
    background: transparent;
}

/* ---------- Cabeçalho ---------- */
#tituloPagina.pageHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(130deg, var(--rpo-azul-escuro) 0%, var(--rpo-azul-medio) 55%, var(--rpo-azul-claro) 100%);
    border-radius: var(--rpo-radius-lg);
    box-shadow: var(--rpo-sombra-header);
    padding: 18px 32px;
    border-bottom: none;
    text-align: left;
    color: #ffffff;
}

.pageHeaderBrand,
.pageHeaderAgency {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.pageHeader .logo {
    height: 52px;
    margin: 0;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.pageHeaderAgency .logo {
    filter: none;
    opacity: 1;
    background: #ffffff;
    border-radius: var(--rpo-radius-sm);
    padding: 6px 10px;
    height: 44px;
}

.pageHeaderTitle {
    flex: 1 1 auto;
    margin: 0;
    text-align: center;
    font-family: 'Sora', 'Inter', Arial, sans-serif;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffffff;
}

/* ---------- Descrição ---------- */
#descricao.pageDescricao {
    max-width: 720px;
    margin: 28px auto 0 auto;
    text-align: center;
    color: var(--rpo-texto-suave);
    font-size: 14.5px;
    line-height: 1.6;
}

/* ---------- Cards de relatório ---------- */
.botoesRelatorios {
    width: auto;
    margin-top: 30px;
}

.botoesGrid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.botaoRelatorio {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    width: auto;
    margin: 0;
    background: var(--rpo-branco);
    border-radius: var(--rpo-radius-lg);
    box-shadow: var(--rpo-sombra-card);
    padding: 28px 18px 24px 18px;
    text-align: center;
    cursor: pointer;
    color: var(--rpo-texto);
    font-family: 'Inter', Arial, sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    -webkit-filter: none;
    filter: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.botaoRelatorio:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(13, 45, 78, 0.16);
    -webkit-filter: none;
    filter: none;
}

.botaoRelatorioIcone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eef4fa 0%, #dfeaf5 100%);
}

.botaoRelatorioIcone img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    background: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
}

.botaoRelatorioLabel {
    color: var(--rpo-azul-texto);
    line-height: 1.35;
}

.relatorioInativo {
    opacity: 0.45 !important;
    cursor: default !important;
}
.relatorioInativo:hover {
    transform: none;
    box-shadow: var(--rpo-sombra-card);
}

/* ---------- Modal (Ficha Detalhada) ---------- */
#modalOverlay {
    background: rgba(13, 26, 43, 0.55) !important;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

#modalFrame {
    background: var(--rpo-branco) !important;
    border: none !important;
    border-radius: var(--rpo-radius-lg) !important;
    box-shadow: 0 20px 60px rgba(13, 45, 78, 0.25);
    width: 92%;
    max-width: 560px;
    padding: 32px 36px !important;
    left: 0 !important;
    right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-height: 85vh;
    overflow-y: auto;
}

.closeModalRelatorio {
    background: var(--rpo-azul-escuro) !important;
    border: 3px solid #ffffff !important;
    right: -14px !important;
    top: -14px !important;
}

#txtFichaDetalhada .modalIntro {
    text-align: left !important;
    color: var(--rpo-texto-suave) !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin-bottom: 20px !important;
}

.modalCampo {
    text-align: left !important;
    margin-bottom: 16px;
}

.modalCampo label {
    display: block;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--rpo-texto);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.modalCampo .custom-combobox-input {
    width: 100% !important;
    box-sizing: border-box;
    border: 1.5px solid var(--rpo-borda) !important;
    border-radius: var(--rpo-radius-sm) !important;
    padding: 8px 10px !important;
    font-family: 'Inter', Arial, sans-serif !important;
}

.modalAcoes {
    text-align: center !important;
    margin-top: 24px;
}

.btnBuscar {
    background: linear-gradient(135deg, var(--rpo-azul-escuro) 0%, var(--rpo-azul-medio) 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: var(--rpo-radius-md) !important;
    padding: 10px 28px !important;
    font-family: 'Inter', Arial, sans-serif;
    font-weight: 600;
    font-size: 13.5px;
    letter-spacing: 0.02em;
    box-shadow: 0 3px 12px rgba(13, 45, 78, 0.28);
    transition: box-shadow 0.18s, transform 0.15s;
}

.btnBuscar:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(13, 45, 78, 0.32);
}

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
    .botoesGrid {
        grid-template-columns: repeat(2, 1fr);
    }
    #tituloPagina.pageHeader {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
    .pageHeaderTitle {
        order: 3;
        width: 100%;
        font-size: 16px;
    }
}

@media (max-width: 560px) {
    .botoesGrid {
        grid-template-columns: 1fr;
    }
    #conteudoPagina {
        padding: 20px 14px 40px 14px;
    }
}