/* SGCE · modais_pagamento.css — extraído de index.html (divisão por seção; cascata preservada) */
.btn-public-link:hover { color: var(--sky); }

/* Cartões de estatística da Política de Uso */
.termo-stat {
  flex: 1 1 90px; min-width: 90px; text-align: center;
  background: var(--g700); border: 1px solid var(--g500); border-radius: 10px; padding: 10px 8px;
  font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: .4px; font-weight: 700;
}
.termo-stat span { display: block; font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -.5px; margin-bottom: 2px; }
.termo-stat.ok   span { color: var(--accent); }
.termo-stat.pend span { color: var(--gold); }
.termo-stat.rec  span { color: var(--red); }
#termo-preview h2 { font-size: 16px; margin: 8px 0 6px; color: var(--text); }
#termo-preview h3 { font-size: 14px; margin: 8px 0 5px; color: var(--text); }
#termo-preview h4 { font-size: 12.5px; margin: 6px 0 4px; color: var(--text); }
#termo-preview ul, #termo-gate-body ul { padding-left: 20px; margin: 6px 0; }
#termo-preview p, #termo-gate-body p { margin: 6px 0; }
#termo-gate-body h2 { font-size: 17px; margin: 10px 0 6px; color: var(--text); }
#termo-gate-body h3 { font-size: 15px; margin: 8px 0 5px; color: var(--text); }
#termo-gate-body h4 { font-size: 13px; margin: 6px 0 4px; color: var(--text); }

/* TOPBAR DO PAINEL PÚBLICO */
.pub-topbar {
  height: 54px; background: var(--g800); border-bottom: 1px solid var(--g600);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; position: sticky; top: 0; z-index: 200;
}
.pub-topbar .tb-name { font-size: 14px; font-weight: 700; color: var(--sky); letter-spacing: 0.5px; }

/* FILTROS AUDITORIA */
.audit-filter-card {
  background: var(--g800); border: 1px solid var(--g600); border-radius: var(--r);
  padding: 18px 20px; margin-bottom: 6px;
}

/* ── GRU BUTTON ── */
.btn-gru {
  background: #1a3a6e; border: 1px solid #2e5aac; border-radius: 6px;
  padding: 8px 18px; color: #a8c4f0; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all .15s; letter-spacing: 0.3px;
}
.btn-gru:hover { background: #2e5aac; color: #fff; }

/* ── MODAL GRU ── */
.gru-box {
  background: #fff; color: #1a1a1a; border-radius: 10px;
  width: 780px; max-width: 95vw; max-height: 92vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6); font-family: 'Segoe UI', system-ui, sans-serif;
}
.gru-header {
  background: linear-gradient(135deg, #1a3a6e, #2e5aac);
  padding: 18px 22px; display: flex; align-items: center;
  justify-content: space-between; border-radius: 10px 10px 0 0;
}
.gru-header-left { display: flex; align-items: center; gap: 14px; }
.gru-brasao { font-size: 28px; }
.gru-header-title { font-size: 11px; color: #a8c4f0; letter-spacing: 1.5px; text-transform: uppercase; }
.gru-header-sub { font-size: 12px; color: #d4e4f8; margin-top: 1px; }
.gru-header-doc { font-size: 15px; font-weight: 800; color: #fff; margin-top: 3px; letter-spacing: 0.5px; }
.gru-close {
  background: rgba(255,255,255,0.15); border: none; color: #fff;
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.gru-close:hover { background: rgba(255,255,255,0.3); }

.gru-body { padding: 22px 24px; }

/* Campos fixos UG */
.gru-fixos { background: #f0f4fa; border: 1px solid #c8d8f0; border-radius: 7px; padding: 14px 18px; margin-bottom: 20px; }
.gru-fixo-row { margin-bottom: 8px; }
.gru-fixo-row:last-child { margin-bottom: 0; }
.gru-fixo-item { display: flex; gap: 10px; align-items: baseline; }
.gru-fixo-label { font-size: 11px; font-weight: 700; color: #2e5aac; min-width: 220px; flex-shrink: 0; }
.gru-fixo-val { font-size: 13px; color: #1a1a1a; font-weight: 500; }

/* Grid de campos */
.gru-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.gru-field { display: flex; flex-direction: column; gap: 5px; }
.gru-field label { font-size: 11px; font-weight: 600; color: #333; }
.gru-req { color: #c0392b; font-weight: 700; font-size: 10px; margin-left: 4px; }
.gru-field input {
  border: 1px solid #c8c8c8; border-radius: 5px; padding: 9px 11px;
  font-size: 13px; color: #1a1a1a; outline: none; transition: border-color .15s;
  background: #fff;
}
.gru-field input:focus { border-color: #2e5aac; }
.gru-field input[readonly] { background: #f5f7fa; color: #2e5aac; }
.gru-total-block { display: flex; flex-direction: column; justify-content: flex-end; }
.gru-total {
  font-size: 22px; font-weight: 800; color: #1a3a6e;
  padding: 9px 11px; background: #eaf0fb; border: 1px solid #c8d8f0;
  border-radius: 5px; letter-spacing: 0.5px;
}

/* Memória de cálculo */
.gru-memoria {
  background: #fffbe6; border: 1px solid #f0d060; border-radius: 7px;
  padding: 14px 16px; margin-bottom: 4px;
}
.gru-memoria-title { font-size: 11px; font-weight: 700; color: #7a5a00; margin-bottom: 8px; letter-spacing: 0.5px; text-transform: uppercase; }
.gru-memoria-body { font-size: 12px; color: #4a3a00; line-height: 1.8; }
.gru-memoria-body table { width: 100%; border-collapse: collapse; }
.gru-memoria-body td { padding: 2px 8px 2px 0; }
.gru-memoria-body td:last-child { text-align: right; font-weight: 600; }
.gru-memoria-body tr.total-row td { border-top: 1px solid #c8a020; padding-top: 6px; font-weight: 700; font-size: 13px; color: #1a3a6e; }

/* Footer */
.gru-footer { padding: 14px 24px 20px; border-top: 1px solid #e8e8e8; }
.gru-footer-note { font-size: 11px; color: #666; margin-bottom: 12px; line-height: 1.5; }
.gru-footer-btns { display: flex; gap: 10px; justify-content: flex-end; }
.gru-footer-btns .btn-cancel { background: none; border: 1px solid #ccc; border-radius: 6px; padding: 9px 16px; color: #666; font-size: 12px; cursor: pointer; }
.gru-footer-btns .btn-exp { background: #f5f7fa; border: 1px solid #c8c8c8; border-radius: 6px; padding: 9px 16px; color: #333; font-size: 12px; cursor: pointer; transition: all .15s; }
.gru-footer-btns .btn-exp:hover { border-color: #2e5aac; color: #2e5aac; }
.gru-footer-btns .btn-save { background: #1a3a6e; border: none; border-radius: 6px; padding: 9px 20px; color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; transition: background .15s; }
.gru-footer-btns .btn-save:hover { background: #2e5aac; }

@media print {
  body > *:not(#gruModal) { display: none !important; }
  #gruModal {
    display: flex !important;        /* anula o display:none inline */
    position: static !important;
    background: none !important;
    inset: auto !important;
    z-index: auto !important;
    align-items: flex-start !important;
    padding: 0 !important;
  }
  .gru-close, .gru-footer-btns, .gru-btn-pagtesouro { display: none !important; }
  .gru-box {
    box-shadow: none !important;
    max-height: none !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
  }
  .gru-body { overflow: visible !important; max-height: none !important; }
}

/* CRÉDITO DESENVOLVEDOR */
.lbox-dev-credit {
  margin-top: 8px; font-size: 10px; color: var(--g400);
  letter-spacing: 0.2px;
}
.lbox-dev-credit span { color: var(--g400); }

/* TOGGLE MODO REEMBOLSO */
.cfg-pay-toggle {
  display: flex; gap: 0; margin-bottom: 4px;
  border: 1px solid var(--g500); border-radius: 7px; overflow: hidden; width: fit-content;
}
.cfg-pay-btn {
  background: var(--g700); border: none; padding: 9px 20px;
  color: var(--text3); font-size: 12px; cursor: pointer; transition: all .15s;
  border-right: 1px solid var(--g500);
}
.cfg-pay-btn:last-child { border-right: none; }
.cfg-pay-btn.active { background: var(--accent); color: #fff; font-weight: 600; }
.cfg-pay-btn:hover:not(.active) { background: var(--g600); color: var(--text2); }

/* PAINEL DE CONFIGURAÇÃO */
.cfg-pay-painel { margin-top: 18px; }
.cfg-pay-info {
  font-size: 12px; color: var(--text3); background: var(--g700);
  border: 1px solid var(--g500); border-radius: 6px; padding: 10px 14px;
  line-height: 1.6;
}

/* ── SIAFI HELP ── */
.siafi-help-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--g500); border: 1px solid var(--g400);
  color: var(--text3); font-size: 10px; font-weight: 700;
  cursor: pointer; flex-shrink: 0; line-height: 1;
  transition: background .15s, color .15s;
}
.siafi-help-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

#siafiHelpPopover {
  position: fixed; z-index: 1100;
  background: var(--g800); border: 1px solid var(--g500);
  border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,.55);
  width: 320px; max-width: calc(100vw - 32px);
  padding: 0; overflow: hidden;
  animation: fadeInPop .15s ease;
}
@keyframes fadeInPop { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
#siafiHelpPopover .shp-header {
  background: var(--g700); border-bottom: 1px solid var(--g600);
  padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
#siafiHelpPopover .shp-title { font-size: 12px; font-weight: 700; color: var(--text); }
#siafiHelpPopover .shp-close {
  background: none; border: none; color: var(--text3); font-size: 14px; cursor: pointer; line-height:1; padding:2px 4px;
}
#siafiHelpPopover .shp-body { padding: 14px 16px; font-size: 12px; color: var(--text2); line-height: 1.75; }
#siafiHelpPopover .shp-tag {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; padding: 1px 7px; border-radius: 4px; margin-bottom: 8px;
}
#siafiHelpPopover .shp-tag.obrigatorio { background: rgba(231,76,60,.18); color: #e74c3c; }
#siafiHelpPopover .shp-tag.opcional    { background: rgba(52,152,219,.18); color: var(--sky); }
#siafiHelpPopover .shp-section { margin-top: 10px; }
#siafiHelpPopover .shp-section-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text3); margin-bottom: 4px; }
#siafiHelpPopover code { font-family: monospace; font-size: 11px; background: var(--g600); padding: 1px 5px; border-radius: 3px; color: var(--accent); word-break: break-all; }
#siafiHelpPopover a { color: var(--sky); text-decoration: none; }
#siafiHelpPopover a:hover { text-decoration: underline; }

/* PIX MODAL (no painel do usuário) */
.pix-modal-box {
  background: #fff; color: #1a1a1a; border-radius: 10px;
  width: 480px; max-width: 95vw;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  font-family: 'Segoe UI', system-ui, sans-serif; overflow: hidden;
}
.pix-header {
  background: linear-gradient(135deg, #00897b, #00bfa5);
  padding: 18px 22px; display: flex; align-items: center; justify-content: space-between;
}
.pix-header-title { font-size: 16px; font-weight: 800; color: #fff; letter-spacing: 0.5px; }
.pix-header-sub { font-size: 11px; color: rgba(255,255,255,0.8); margin-top: 2px; }
.pix-body { padding: 22px 24px; }
.pix-chave-box {
  background: #f0faf8; border: 2px solid #00bfa5; border-radius: 8px;
  padding: 16px 18px; margin-bottom: 16px; text-align: center;
}
.pix-chave-label { font-size: 10px; color: #00897b; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 6px; }
.pix-chave-val { font-size: 18px; font-weight: 800; color: #004d40; letter-spacing: 1px; }
.pix-chave-tipo { font-size: 11px; color: #00897b; margin-top: 4px; }
.pix-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.pix-info-item { background: #f5f5f5; border-radius: 6px; padding: 10px 12px; }
.pix-info-lbl { font-size: 10px; color: #666; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.pix-info-val { font-size: 13px; font-weight: 600; color: #1a1a1a; }
.pix-valor-box {
  background: #fff8e1; border: 1px solid #ffd54f; border-radius: 8px;
  padding: 14px 18px; text-align: center; margin-bottom: 16px;
}
.pix-valor-lbl { font-size: 10px; color: #f57f17; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.pix-valor-num { font-size: 28px; font-weight: 800; color: #e65100; }
.pix-desc { font-size: 11px; color: #555; background: #f9f9f9; border-radius: 6px; padding: 10px 12px; line-height: 1.6; margin-bottom: 4px; }
.pix-footer { padding: 12px 24px 18px; border-top: 1px solid #eee; display: flex; gap: 10px; justify-content: flex-end; }
.pix-btn-fechar { background: none; border: 1px solid #ccc; border-radius: 6px; padding: 9px 16px; color: #666; font-size: 12px; cursor: pointer; }
.pix-btn-copiar { background: #00897b; border: none; border-radius: 6px; padding: 9px 18px; color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; transition: background .15s; }
.pix-btn-copiar:hover { background: #00bfa5; }

/* ── BOTÃO PAGTESOURO ── */
.gru-btn-pagtesouro {
  background: linear-gradient(135deg, #1a3a6e, #2e5aac);
  border: none; border-radius: 6px; padding: 10px 22px;
  color: #fff; font-size: 12px; font-weight: 700; cursor: pointer;
  transition: all .2s; letter-spacing: 0.3px;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 2px 8px rgba(46,90,172,0.3);
}
.gru-btn-pagtesouro:hover { background: linear-gradient(135deg, #2e5aac, #4a7fd4); box-shadow: 0 4px 16px rgba(46,90,172,0.4); }
.gru-btn-pagtesouro:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── MODAL PAGTESOURO (simulação de integração) ── */
.pt-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.82); z-index: 600;
  align-items: center; justify-content: center;
}
.pt-box {
  background: #fff; border-radius: 12px; width: 520px; max-width: 95vw;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5); overflow: hidden;
  font-family: 'Segoe UI', system-ui, sans-serif;
}
.pt-header {
  background: linear-gradient(135deg, #1a3a6e 0%, #2e5aac 100%);
  padding: 18px 22px; display: flex; align-items: center; gap: 14px;
}
.pt-header-emblem {
  width: 44px; height: 44px; background: rgba(255,255,255,0.15);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.pt-header-gov { font-size: 9px; color: rgba(255,255,255,0.7); letter-spacing: 1.5px; text-transform: uppercase; }
.pt-header-title { font-size: 15px; font-weight: 800; color: #fff; margin-top: 2px; }
.pt-header-sub { font-size: 11px; color: rgba(255,255,255,0.75); margin-top: 2px; }
.pt-close { margin-left: auto; background: rgba(255,255,255,0.15); border: none; color: #fff; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 13px; }
.pt-body { padding: 22px 24px; }
.pt-resumo {
  background: #f0f4fa; border: 1px solid #c8d8f0; border-radius: 8px;
  padding: 14px 16px; margin-bottom: 18px;
}
.pt-resumo-title { font-size: 10px; font-weight: 700; color: #2e5aac; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 10px; }
.pt-resumo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pt-resumo-item { }
.pt-resumo-lbl { font-size: 10px; color: #666; text-transform: uppercase; letter-spacing: 0.8px; }
.pt-resumo-val { font-size: 13px; font-weight: 600; color: #1a1a1a; margin-top: 2px; }
.pt-valor-destaque {
  background: #fff8e1; border: 1px solid #f0c040; border-radius: 8px;
  padding: 14px; text-align: center; margin-bottom: 18px;
}
.pt-valor-lbl { font-size: 10px; color: #b07800; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.pt-valor-num { font-size: 30px; font-weight: 800; color: #7a4800; }
.pt-formas { margin-bottom: 18px; }
.pt-formas-title { font-size: 11px; font-weight: 700; color: #333; margin-bottom: 10px; }
.pt-formas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pt-forma {
  border: 2px solid #e0e0e0; border-radius: 8px; padding: 10px 8px;
  text-align: center; cursor: pointer; transition: all .15s; background: #fff;
}
.pt-forma:hover { border-color: #2e5aac; }
.pt-forma.selected { border-color: #2e5aac; background: #eef4ff; }
.pt-forma-icon { font-size: 20px; margin-bottom: 4px; }
.pt-forma-label { font-size: 11px; font-weight: 600; color: #333; }
.pt-api-note {
  background: #f5f5f5; border-radius: 6px; padding: 10px 12px;
  font-size: 10px; color: #666; line-height: 1.6; margin-bottom: 4px;
}
.pt-api-note code { background: #e0e0e0; padding: 1px 5px; border-radius: 3px; font-size: 10px; }
.pt-footer { padding: 12px 24px 18px; border-top: 1px solid #eee; display: flex; gap: 10px; justify-content: flex-end; }
.pt-btn-cancel { background: none; border: 1px solid #ccc; border-radius: 6px; padding: 9px 16px; color: #666; font-size: 12px; cursor: pointer; }
.pt-btn-pagar {
  background: linear-gradient(135deg, #1a3a6e, #2e5aac);
  border: none; border-radius: 6px; padding: 9px 20px;
  color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; transition: all .15s;
}
.pt-btn-pagar:hover { background: linear-gradient(135deg, #2e5aac, #4a7fd4); }

