/*
Theme Name: Portal Municipal Premium
Theme URI: https://github.com/portalcf
Author: Hugo Nascimento Vieira
Description: Tema premium genérico para portais municipais. Transparência, acessibilidade e modernidade sem plugins.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: portal-municipal
Tags: government, municipal, transparency, accessibility, custom-logo, custom-menu
Requires at least: 6.0
Requires PHP: 7.4
*/

:root {
    --pm-primary: #00449a;
    --pm-secondary: #02b0ee;
    --pm-accent: #f59e0b;
    --pm-bg: #FDFDFF;
    --pm-text: #334155;
    --pm-border: #e2e8f0;
    --pm-radius: 16px;
    --pm-shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --pm-shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --pm-shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
    --pm-transition: 0.3s cubic-bezier(0.4,0,0.2,1);
    --pm-font: 'Inter', system-ui, sans-serif;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-3xl: 40px;
    --transition-smooth: cubic-bezier(0.4,0,0.2,1);
    --transition-bounce: cubic-bezier(0.68,-0.55,0.265,1.55);
}

*,*::before,*::after { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--pm-font)!important; font-weight:400; color:var(--pm-text); line-height:1.6; background:var(--pm-bg); }
h1,h2,h3,h4,h5,h6 { font-family:var(--pm-font)!important; font-weight:700; line-height:1.2; }
img { max-width:100%; height:auto; }


.font-black { font-weight:900!important; }
.font-bold { font-weight:700!important; }
.font-medium { font-weight:500!important; }
.no-scrollbar::-webkit-scrollbar { display:none; }
.no-scrollbar { -ms-overflow-style:none; scrollbar-width:none; }

.skip-to-content { position:absolute; top:-100%; left:50%; transform:translateX(-50%); background:var(--pm-primary); color:#fff; padding:12px 24px; border-radius:0 0 var(--pm-radius) var(--pm-radius); font-weight:700; z-index:100000; transition:top .3s; text-decoration:none; }
.skip-to-content:focus { top:0; outline:3px solid var(--pm-accent); }

.pm-header { background:rgba(255,255,255,.7); backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px); border-bottom:1px solid rgba(0,0,0,.04); box-shadow:0 2px 15px -3px rgba(0,0,0,.07); }
.custom-logo-link img { max-height:60px; width:auto; object-fit:contain; }
.logo-title-prefeitura { font-weight:700!important; letter-spacing:.1em!important; color:#64748b!important; text-transform:uppercase!important; }
.logo-title-municipio { font-weight:900!important; letter-spacing:-.05em!important; color:var(--pm-primary)!important; text-transform:uppercase!important; }

.pm-search-overlay { position:fixed; inset:0; background:rgba(15,23,42,.8); backdrop-filter:blur(8px); z-index:99999; display:flex; align-items:flex-start; justify-content:center; padding-top:15vh; opacity:0; visibility:hidden; transition:all .3s; }
.pm-search-overlay.active { opacity:1; visibility:visible; }
.pm-search-overlay .search-inner { width:100%; max-width:640px; padding:0 20px; transform:translateY(-20px); transition:transform .3s; }
.pm-search-overlay.active .search-inner { transform:translateY(0); }

.mobile-nav-list li a { display:flex; padding:1rem 1.5rem; font-weight:700; color:#334155; border-bottom:1px solid #f8fafc; text-decoration:none; transition:all .2s; }
.mobile-nav-list li a:hover { background:#f8fafc; color:var(--pm-primary); padding-left:2rem; }
.mobile-nav-list .sub-menu { list-style:none; padding:0; margin:0; }
.mobile-nav-list .sub-menu li a { padding-left:2.5rem; font-size:.9em; color:#64748b; }

.pm-header nav>ul { display:flex; list-style:none; margin:0; padding:0; }
.pm-header nav>ul>li { position:relative; }
.pm-header nav>ul>li>a { font-weight:700; font-size:16px; color:#475569; text-decoration:none !important; display:block; transition:color .25s ease; border-bottom: none !important; box-shadow: none !important; position:relative; }
.pm-header nav>ul>li>a::after { content:''; position:absolute; bottom:0; left:0; width:0; height:2px; background:linear-gradient(90deg,#00449a,#02b0ee); border-radius:2px; transition:width .3s ease; }
.pm-header nav>ul>li>a:hover { color:var(--pm-primary) !important; }
.pm-header nav>ul>li>a:hover::after { width:100%; }

/* Barra de acessibilidade compacta */
.pm-header nav>ul>li>.sub-menu { position:absolute; top:100%; left:50%; transform:translateX(-50%) translateY(16px); background:linear-gradient(145deg,rgba(255,255,255,0.98),rgba(255,255,255,0.92)); border-radius:var(--radius-2xl,32px); box-shadow:0 20px 60px rgba(0,68,154,0.25),0 8px 24px rgba(0,0,0,0.12); border:1px solid rgba(226,232,240,0.6); min-width:240px; padding:12px; opacity:0; visibility:hidden; transition:all .3s cubic-bezier(0.4,0,0.2,1); list-style:none; z-index:1000; }
.pm-header nav>ul>li:hover>.sub-menu { opacity:1; visibility:visible; transform:translateX(-50%) translateY(0); }

/* Submenu Hover e Correções */
.pm-header nav .sub-menu li a { display:flex; align-items:center; gap:12px; padding:12px 18px; border-radius:var(--radius-xl,24px); font-weight:600; font-size:13px; color:#475569; text-decoration:none !important; border-bottom:none !important; box-shadow:none !important; transition:all .25s ease; border-left: 3px solid transparent; }
.pm-header nav .sub-menu li a::after { display: none !important; }
.pm-header nav .sub-menu li a:hover { background:linear-gradient(135deg,rgba(2,176,238,0.1),rgba(0,68,154,0.08)) !important; color:var(--pm-primary) !important; border-left-color: #02b0ee !important; transform:translateX(4px); text-decoration:none !important; border-bottom:none !important; box-shadow:none !important; }
.pm-header nav .sub-menu li a i { width: 16px; text-align: center; color: #94a3b8; transition: color .2s ease; }
.pm-header nav .sub-menu li a:hover i { color: var(--pm-primary); }

.pm-top-bar { background-color:#06b6d4!important; }
.pm-top-bar [data-lucide] { color:#fff!important; }
.pm-top-bar a { position:relative; text-decoration:none; }
.pm-top-bar a::after { content:''; position:absolute; bottom:-2px; left:0; width:0; height:2px; background:var(--pm-secondary); transition:width .3s; }
.pm-top-bar a:hover::after { width:100%; }

.quick-link-card { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:20px; border-radius:24px; background:#fff; border:1px solid var(--pm-border); transition:all var(--pm-transition); cursor:pointer; position:relative; overflow:hidden; }
.quick-link-card:hover { border-color:var(--pm-primary); box-shadow:0 10px 30px -10px rgba(0,68,154,.2); transform:translateY(-2px); }

.widget ul { list-style:none; padding:0; }
.widget li { padding:8px 0; border-bottom:1px solid #f1f5f9; }
.widget li:last-child { border-bottom:none; }
.widget a { color:#475569; font-weight:600; transition:all .2s; display:flex; align-items:center; gap:8px; text-decoration:none; }
.widget a:hover { color:var(--pm-primary); transform:translateX(4px); }

.pm-breadcrumbs { padding:16px 0; font-size:12px; font-weight:600; color:#94a3b8; text-transform:uppercase; letter-spacing:.05em; }
.pm-breadcrumbs a { color:#64748b; text-decoration:none; }
.pm-breadcrumbs a:hover { color:var(--pm-primary); }
.pm-breadcrumbs .separator { margin:0 8px; color:#cbd5e1; }

footer#pm-main-footer { font-family:var(--pm-font)!important; }
footer#pm-main-footer .footer-nav-links { list-style:none!important; padding:0!important; margin:0!important; }
footer#pm-main-footer .footer-nav-links li a, footer#pm-main-footer .footer-nav-links a { display:flex!important; align-items:center!important; gap:10px!important; margin-bottom:12px!important; color:#cbd5e1!important; text-decoration:none!important; transition:color .2s,transform .2s; font-size:14px; }
footer#pm-main-footer .footer-nav-links li a:hover, footer#pm-main-footer .footer-nav-links a:hover { color:#fff!important; transform:translateX(4px); }

#pm-chatbot { display:block!important; visibility:visible!important; }
#chatbot-toggle { box-shadow:0 10px 30px rgba(0,68,154,.4); }

@keyframes fadeInUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.animate-fade-in { animation:fadeIn .4s ease-out forwards; }

.hero-fade-in-up-1 { animation: fadeInUp 0.6s ease-out 0.1s both; }
.hero-fade-in-up-2 { animation: fadeInUp 0.6s ease-out 0.2s both; }
.hero-fade-in-up-3 { animation: fadeInUp 0.6s ease-out 0.3s both; }
.hero-fade-in-up-4 { animation: fadeInUp 0.6s ease-out 0.4s both; }

@media (prefers-reduced-motion: reduce) {
  .hero-fade-in-up-1,
  .hero-fade-in-up-2,
  .hero-fade-in-up-3,
  .hero-fade-in-up-4 {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.prose h1,.prose h2,.prose h3 { letter-spacing:-.025em; font-weight:800; }
.prose img { border-radius:var(--pm-radius); }
.prose a { color:var(--pm-primary); }

.nav-links { display:flex; gap:8px; align-items:center; justify-content:center; }
.nav-links a,.nav-links span { display:flex; align-items:center; justify-content:center; min-width:44px; height:44px; padding:0 12px; border-radius:12px; font-weight:700; font-size:14px; transition:all .2s; }
.nav-links a { background:#fff; border:1px solid var(--pm-border); color:#475569; text-decoration:none; }
.nav-links a:hover { border-color:var(--pm-primary); color:var(--pm-primary); }
.nav-links .current { background:var(--pm-primary); color:#fff; border:1px solid var(--pm-primary); }

.pm-cookie-banner { position:fixed; bottom:0; left:0; right:0; background:#1e293b; color:#e2e8f0; padding:20px; z-index:99998; transform:translateY(100%); transition:transform .4s; border-top:3px solid var(--pm-primary); }
.pm-cookie-banner.visible { transform:translateY(0); }
.pm-cookie-banner a { color:var(--pm-secondary); }

.pm-urgent-banner { background:linear-gradient(135deg,#dc2626,#ef4444); color:#fff; padding:12px 20px; text-align:center; font-weight:700; font-size:14px; position:relative; z-index:1000; }
.pm-urgent-banner.info { background:linear-gradient(135deg,var(--pm-primary),var(--pm-secondary)); }

.pm-404-code { font-size:clamp(120px,20vw,240px); font-weight:900; line-height:1; background:linear-gradient(135deg,var(--pm-primary),var(--pm-secondary)); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }

body.high-contrast { background:#0a0a0a!important; color:#fff!important; }
body.high-contrast a { color:#60a5fa!important; }
body.high-contrast .pm-header,body.high-contrast header { background:#000!important; }
body.high-contrast .glass, body.high-contrast .glass-card, body.high-contrast .bg-white, body.high-contrast .bg-slate-50, body.high-contrast .bg-slate-100 { background:rgba(30,41,59,0.9)!important; border-color:rgba(255,255,255,0.2)!important; color:#fff!important; }
body.high-contrast .text-slate-900, body.high-contrast .text-slate-800, body.high-contrast .text-slate-700, body.high-contrast .text-slate-600 { color:#f1f5f9!important; }
body.high-contrast .text-slate-500, body.high-contrast .text-slate-400 { color:#cbd5e1!important; }
body.high-contrast .bg-primary, body.high-contrast .bg-cyan-500, body.high-contrast .bg-gradient-to-r { background:linear-gradient(135deg,#3b82f6,#22d3ee)!important; color:#0a0a0a!important; }
body.high-contrast footer#pm-main-footer { background:#000!important; }

@media (max-width:768px) { .pm-breadcrumbs { font-size:11px; } }

@media print {
    .pm-header,#pm-accessibility-bar,.pm-top-bar,#pm-chatbot,#back-to-top,.pm-cookie-banner,.pm-urgent-banner,footer#pm-main-footer,.pm-search-overlay,#mobile-menu,nav,.no-print { display:none!important; }
    body { background:#fff!important; color:#000!important; }
    a { color:#000!important; }
}

.quick-links-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-top:20px; }
.quick-link-item { background:#fff; border:1px solid #e2e8f0; padding:15px; border-radius:10px; text-align:center; cursor:move; transition:all .2s; }
.quick-link-item:hover { border-color:#00449a; box-shadow:0 4px 12px rgba(0,68,154,.1); }
.sortable-placeholder { background:#e2e8f0!important; border:2px dashed #94a3b8!important; }

/* ===== PREMIUM UPGRADES ===== */

html { scroll-behavior: smooth; }

.text-gradient {
  background: linear-gradient(135deg,#00449a 0%,#02b0ee 50%,#06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradient-shift 8s ease infinite alternate;
}
.text-gradient-solid {
  background: linear-gradient(135deg,#00449a,#02b0ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}
.glass-dark {
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
}
.glass-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.4s var(--transition-smooth);
  border-radius: 16px;
}
.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border-color: #cbd5e1;
}

.shadow-premium { box-shadow: 0 4px 20px rgba(0,0,0,0.05),0 1px 4px rgba(0,0,0,0.04); }
.shadow-premium-hover { box-shadow: 0 8px 30px rgba(0,0,0,0.1),0 2px 8px rgba(0,0,0,0.06); }
.shadow-glow { box-shadow: 0 0 40px rgba(2,176,238,0.3); }
.shadow-inner-glow { box-shadow: inset 0 0 20px rgba(255,255,255,0.1); }

.btn-premium {
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--transition-smooth);
}
.btn-premium::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,rgba(255,255,255,0.2),transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn-premium:hover::before { opacity: 1; }
.btn-premium:active { transform: scale(0.98); }

.hover-card {
  transition: all 0.4s var(--transition-smooth);
  will-change: transform, box-shadow;
}
.hover-card:hover {
  box-shadow: 0 20px 60px rgba(0,68,154,0.25);
  transform: translateY(-6px);
}

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid #02b0ee;
  outline-offset: 2px;
  border-radius: 8px;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg,#00449a,#02b0ee); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg,#002a62,#0186b5); }

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
@keyframes wa-pulse-premium {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5),0 8px 32px rgba(34,197,94,0.3); }
  50% { box-shadow: 0 0 0 20px rgba(34,197,94,0),0 12px 48px rgba(34,197,94,0.4); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0),0 8px 32px rgba(34,197,94,0.3); }
}


@media print {
  #pm-whatsapp, #back-to-top, .pm-search-overlay, #mobile-menu { display: none !important; }
  body { background: #fff !important; }
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: all 0.8s cubic-bezier(0.4,0,0.2,1);
  will-change: opacity, transform;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none !important; }
  [class*="animate-"], .transition { transition: none !important; animation: none !important; }
}

/* ===== TRANSPARÊNCIA PREMIUM ===== */
.transparency-section { width: 100%; max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-badge { display: inline-block; background: rgba(6,182,212,0.1); color: #00449a; font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.15em; padding: 0.5rem 1.25rem; border-radius: 100px; margin-bottom: 1rem; backdrop-filter: blur(10px); border: 1px solid rgba(6,182,212,0.2); }
.section-title { font-size: clamp(1.75rem,4vw,2.5rem); font-weight: 800; color: #0f172a; margin-bottom: 0.5rem; letter-spacing: -0.02em; }
.section-subtitle { font-size: 0.95rem; color: #64748b; font-weight: 400; max-width: 500px; margin: 0 auto; line-height: 1.6; }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card { background: #ffffff; border-radius: 20px; padding: 2rem 1.5rem; text-align: center; position: relative; transition: all 0.4s cubic-bezier(0.4,0,0.2,1); cursor: default; border: 1px solid rgba(226,232,240,0.8); box-shadow: 0 1px 3px rgba(0,0,0,0.02),0 4px 6px rgba(0,0,0,0.02); overflow: hidden; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg,#00449a,#06b6d4); opacity: 0; transition: opacity 0.3s ease; }
.stat-card::after { content: ''; position: absolute; bottom: -20px; right: -20px; width: 80px; height: 80px; background: radial-gradient(circle,rgba(6,182,212,0.05) 0%,transparent 70%); border-radius: 50%; transition: all 0.4s ease; }
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 20px -5px rgba(0,68,154,0.08),0 6px 8px -5px rgba(0,68,154,0.03); border-color: rgba(6,182,212,0.3); }
.stat-card:hover::before { opacity: 1; }
.stat-card:hover::after { transform: scale(1.5); opacity: 0.8; }
.card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(0,68,154,0.1), rgba(6,182,212,0.1));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  transition: all 0.3s ease;
}
.card-icon svg {
  width: 24px;
  height: 24px;
  stroke: #00449a;
  transition: stroke 0.3s ease;
}
.stat-card:hover .card-icon {
  background: linear-gradient(135deg, #00449a, #06b6d4);
  transform: scale(1.05);
}
.stat-card:hover .card-icon svg { stroke: #ffffff; }
.stat-value {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, #00449a 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  display: block;
}
.divider-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem auto;
  max-width: 300px;
}
.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,68,154,0.2));
}
.divider-dot {
  width: 8px;
  height: 8px;
  background: #06b6d4;
  border-radius: 50%;
  margin: 0 1rem;
  position: relative;
}
.divider-dot::before,
.divider-dot::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: #00449a;
  border-radius: 50%;
  top: 2px;
}
.divider-dot::before { left: -16px; }
.divider-dot::after { right: -16px; }
.btn-wrapper { text-align: center; }
.btn-transparency {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, #00449a 0%, #00316e 100%);
  border: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.875rem;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0,68,154,0.2), 0 2px 4px -1px rgba(0,68,154,0.1);
}
.btn-transparency::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}
.btn-transparency:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 25px -5px rgba(0,68,154,0.3), 0 10px 10px -5px rgba(0,68,154,0.2);
  background: linear-gradient(135deg, #06b6d4 0%, #00449a 100%);
}
.btn-transparency:hover::before { left: 100%; }
.btn-text { position: relative; z-index: 1; }
.btn-transparency svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}
.btn-transparency:hover svg { transform: translateX(4px); }
@media (max-width: 850px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .stat-card { padding: 1.5rem 1rem; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; gap: 0.875rem; }
  .stat-card { padding: 1.5rem 1rem; border-radius: 16px; }
  .section-title { font-size: 1.5rem; }
}

/* ===== DIÁRIO OFICIAL (DOEM) ===== */
.diario-iframe-wrapper {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border: 1px solid rgba(226,232,240,0.8);
  position: relative;
}
.diario-iframe {
  width: 100%;
  height: 85vh;
  min-height: 500px;
  border: none;
  display: block;
}
.diario-fallback {
  padding: 3rem 1rem;
}
@media (max-width: 768px) {
  .diario-iframe { height: 70vh; min-height: 400px; }
}

/* Native Dark Mode */
@media (prefers-color-scheme: dark) {
  html:not(.pm-dark-mode) {
    --pm-bg: #0f172a;
    --pm-text: #f8fafc;
    --pm-border: #334155;
  }
  html:not(.pm-dark-mode) body {
    background: var(--pm-bg);
    color: var(--pm-text);
  }
}

/* =========================================
   DESIGN TOKENS (Variáveis Gov Card)
========================================= */
.gov-card {
  --gov-color-primary: #1351b4;
  --gov-color-primary-hover: #0c3882;
  --gov-color-surface: #ffffff;
  --gov-color-background-alt: #f8fafc;
  --gov-color-text-main: #1e293b;
  --gov-color-text-muted: #64748b;
  --gov-color-border: #e2e8f0;
  --gov-radius-lg: 16px;
  --gov-radius-md: 8px;
  --gov-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --gov-shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
  --gov-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --gov-font-family: var(--pm-font);

  font-family: var(--gov-font-family);
  background-color: var(--gov-color-surface);
  border: 1px solid var(--gov-color-border);
  border-radius: var(--gov-radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 100%;
  box-shadow: var(--gov-shadow-sm);
  transition: var(--gov-transition);
  position: relative;
  overflow: hidden;
}
.gov-card:hover {
  box-shadow: var(--gov-shadow-md);
  border-color: #cbd5e1;
  transform: translateY(-2px);
}
.gov-card__header { display: flex; align-items: flex-start; gap: 16px; }
.gov-card__icon-wrapper { background-color: var(--gov-color-background-alt); width: 48px; height: 48px; border-radius: var(--gov-radius-md); display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; border: 1px solid var(--gov-color-border); }
.gov-card__title-group { display: flex; flex-direction: column; gap: 4px; }
.gov-card__subtitle { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; color: var(--gov-color-primary); }
.gov-card__title { font-size: 1.25rem; font-weight: 700; color: var(--gov-color-text-main); margin: 0; line-height: 1.3; }
.gov-card__body { display: flex; flex-direction: column; gap: 16px; flex-grow: 1; }
.gov-card__description { font-size: 0.9375rem; color: var(--gov-color-text-muted); line-height: 1.6; margin: 0; }
.gov-card__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gov-card__chip { font-size: 0.8125rem; color: var(--gov-color-text-main); background-color: var(--gov-color-background-alt); padding: 6px 12px; border-radius: 20px; text-decoration: none; font-weight: 500; border: 1px solid var(--gov-color-border); transition: var(--gov-transition); }
.gov-card__chip:hover { background-color: #f1f5f9; border-color: #cbd5e1; color: var(--gov-color-primary); }
.gov-card__footer { margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--gov-color-background-alt); }
.gov-card__btn-primary { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background-color: var(--gov-color-primary); color: white; text-decoration: none; font-weight: 600; padding: 12px 20px; border-radius: var(--gov-radius-md); transition: var(--gov-transition); }
.gov-card__btn-icon { transition: transform 0.3s ease; }
.gov-card__btn-primary:hover { background-color: var(--gov-color-primary-hover); color: white; }
.gov-card__btn-primary:hover .gov-card__btn-icon { transform: translateX(4px); }
@media (min-width: 640px) {
  .gov-card__footer { display: flex; justify-content: flex-end; }
  .gov-card__btn-primary { width: auto; }
}

/* =========================================
   DESIGN TOKENS (Painel Financeiro)
========================================= */
.gov-financial-dashboard {
  --fin-bg-surface: #ffffff;
  --fin-bg-main: #f8fafc;
  --fin-border: #e2e8f0;
  --fin-text-dark: #0f172a;
  --fin-text-muted: #64748b;
  --fin-color-primary: #00449a;
  --fin-color-primary-hover: #0c3882;
  --fin-emerald: #10b981;
  --fin-emerald-light: #d1fae5;
  --fin-amber: #f59e0b;
  --fin-amber-light: #fef3c7;
  --fin-radius-lg: 16px;
  --fin-radius-md: 12px;
  --fin-radius-sm: 6px;
  --fin-shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --fin-shadow-hover: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
  --fin-shadow-highlight: 0 10px 30px -10px rgba(16, 185, 129, 0.2);
  
  font-family: var(--pm-font);
  background-color: var(--fin-bg-main);
  padding: 32px;
  border-radius: var(--fin-radius-lg);
  border: 1px solid var(--fin-border);
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.text-emerald { color: var(--fin-emerald) !important; }
.bg-emerald { background-color: var(--fin-emerald) !important; }
.bg-emerald-light { background-color: var(--fin-emerald-light) !important; }
.text-amber { color: var(--fin-amber) !important; }
.bg-amber { background-color: var(--fin-amber) !important; }
.bg-amber-light { background-color: var(--fin-amber-light) !important; }

.gov-financial-dashboard__header { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 768px) { .gov-financial-dashboard__header { flex-direction: row; justify-content: space-between; align-items: flex-end; } }
.gov-financial-dashboard__subtitle { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fin-text-muted); }
.gov-financial-dashboard__title { font-size: 1.5rem; font-weight: 800; color: var(--fin-text-dark); margin: 4px 0 0 0; letter-spacing: -0.02em; }
.gov-financial-dashboard__btn-portal { font-size: 0.875rem; font-weight: 600; color: var(--fin-color-primary); text-decoration: none; background-color: #eff6ff; padding: 10px 16px; border-radius: var(--fin-radius-md); display: inline-flex; align-items: center; gap: 8px; transition: all 0.3s ease; border: 1px solid transparent; }
.gov-financial-dashboard__btn-portal:hover { background-color: #dbeafe; border-color: #bfdbfe; }
.gov-financial-dashboard__btn-portal:hover .arrow { transform: translateX(4px); }
.gov-financial-dashboard__btn-portal .arrow { transition: transform 0.3s ease; }

.gov-financial-dashboard__grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 1024px) { .gov-financial-dashboard__grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
.gov-financial-dashboard__column { display: flex; flex-direction: column; gap: 16px; }
.gov-financial-dashboard__column-title { font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin: 0; padding-bottom: 8px; border-bottom: 1px solid var(--fin-border); }
.gov-financial-dashboard__subgrid { display: grid; grid-template-columns: 1fr; gap: 16px; height: 100%; }
@media (min-width: 640px) { .gov-financial-dashboard__subgrid { grid-template-columns: 1fr 1fr; gap: 16px; } }

.gov-financial-card { background-color: var(--fin-bg-surface); border: 1px solid var(--fin-border); border-radius: var(--fin-radius-md); padding: 16px; box-shadow: var(--fin-shadow-card); transition: all 0.3s ease; display: flex; flex-direction: column; justify-content: space-between; }
.gov-financial-card:hover { transform: translateY(-2px); box-shadow: var(--fin-shadow-hover); border-color: #cbd5e1; }
.gov-financial-card__header { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
@media (min-width: 1280px) { .gov-financial-card__header { flex-direction: row; justify-content: space-between; align-items: flex-start; gap: 0; } }
.gov-financial-card__label { font-size: 0.75rem; font-weight: 500; color: var(--fin-text-muted); line-height: 1.2; }
.gov-financial-card__percent { font-size: 0.75rem; font-weight: 700; padding: 4px 8px; border-radius: 20px; align-self: flex-start; }
.gov-financial-card__value { font-size: 1.5rem; font-weight: 800; color: var(--fin-text-dark); letter-spacing: -0.02em; margin-bottom: 12px; }

.gov-financial-progress { height: 4px; width: 100%; background-color: #f1f5f9; border-radius: 4px; overflow: hidden; }
.gov-financial-progress__bar { height: 100%; border-radius: 4px; transition: width 1s cubic-bezier(0.4, 0, 0.2, 1); }

.gov-financial-highlight { background: linear-gradient(135deg, #10b981 0%, #059669 100%); border-radius: var(--fin-radius-md); padding: 12px 24px; display: flex; align-items: center; gap: 16px; color: white; box-shadow: var(--fin-shadow-highlight); position: relative; overflow: hidden; }
.gov-financial-highlight::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background-image: radial-gradient(circle at top right, rgba(255,255,255,0.2) 0%, transparent 60%); pointer-events: none; }
.gov-financial-highlight__icon { font-size: 1.5rem; background: rgba(255, 255, 255, 0.2); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--fin-radius-sm); backdrop-filter: blur(4px); flex-shrink: 0; }
.gov-financial-highlight__content { display: flex; flex-direction: row; align-items: center; justify-content: space-between; width: 100%; gap: 12px; z-index: 10; position: relative; flex-wrap: wrap; }
.gov-financial-highlight__label { font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255, 255, 255, 0.9); }
.gov-financial-highlight__numbers { display: flex; align-items: center; gap: 16px; margin-left: auto; }
@media (max-width: 640px) { .gov-financial-highlight__numbers { margin-left: 0; width: 100%; justify-content: space-between; } }
.gov-financial-highlight__value { font-size: 1.25rem; font-weight: 800; line-height: 1; }
.gov-financial-highlight__execution { font-size: 0.75rem; background: rgba(0, 0, 0, 0.15); padding: 4px 10px; border-radius: 20px; font-weight: 500; }

/* =========================================
   PM PROSE (Premium Editorial Typography)
========================================= */
.pm-prose {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #334155;
}
.pm-prose p {
    margin-top: 1.5em;
    margin-bottom: 1.5em;
}
.pm-prose h2, .pm-prose h3, .pm-prose h4 {
    color: #0f172a;
    font-weight: 800;
    margin-top: 2.5em;
    margin-bottom: 1em;
    line-height: 1.3;
    letter-spacing: -0.02em;
    text-wrap: balance;
}
.pm-prose h2 { font-size: 1.875rem; }
.pm-prose h3 { font-size: 1.5rem; }
.pm-prose h4 { font-size: 1.25rem; }
.pm-prose a {
    color: var(--pm-primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    text-decoration-color: rgba(0, 68, 154, 0.3);
    transition: all 0.2s ease;
    font-weight: 500;
}
.pm-prose a:hover {
    color: var(--pm-secondary);
    text-decoration-color: var(--pm-secondary);
}
.pm-prose strong { font-weight: 700; color: #1e293b; }
.pm-prose ul, .pm-prose ol {
    margin-top: 1.5em;
    margin-bottom: 1.5em;
    padding-left: 1.625em;
}
.pm-prose li { margin-top: 0.5em; margin-bottom: 0.5em; }
.pm-prose ul { list-style-type: none; }
.pm-prose ul > li { position: relative; }
.pm-prose ul > li::before {
    content: "";
    position: absolute;
    background-color: var(--pm-secondary);
    border-radius: 50%;
    width: 6px;
    height: 6px;
    top: 0.6em;
    left: -1.25em;
}
.pm-prose ol { list-style-type: decimal; }
.pm-prose blockquote {
    font-weight: 400;
    font-style: italic;
    color: #475569;
    border-left: 4px solid var(--pm-primary);
    padding-left: 1.5em;
    margin-top: 2em;
    margin-bottom: 2em;
    background: #f8fafc;
    padding: 1.5em;
    border-radius: 0 16px 16px 0;
    position: relative;
}
.pm-prose blockquote p:first-of-type::before {
    content: "\201C";
    font-size: 4em;
    color: rgba(0, 68, 154, 0.1);
    position: absolute;
    top: -10px;
    left: 10px;
    font-family: Georgia, serif;
    line-height: 1;
}
.pm-prose blockquote p:first-of-type { margin-top: 0; position: relative; z-index: 1; }
.pm-prose blockquote p:last-of-type { margin-bottom: 0; }
.pm-prose img {
    margin-top: 2.5em;
    margin-bottom: 2.5em;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.pm-prose figure { margin-top: 2.5em; margin-bottom: 2.5em; }
.pm-prose figure img { margin-top: 0; margin-bottom: 1em; }
.pm-prose figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
    font-style: italic;
}
@media (max-width: 768px) {
    .pm-prose { font-size: 1.0625rem; line-height: 1.7; }
    .pm-prose h2 { font-size: 1.5rem; }
    .pm-prose h3 { font-size: 1.25rem; }
}

/* =========================================
   GUTENBERG ALIGNMENT SUPPORT
========================================= */
.has-text-align-left { text-align: left !important; }
.has-text-align-center { text-align: center !important; }
.has-text-align-right { text-align: right !important; }
.has-text-align-justify,
.is-style-justify,
ul.is-style-justify li,
ol.is-style-justify li { 
    text-align: justify !important; 
}

/* =========================================
   GUTENBERG DROP CAP (Letra Capitular)
========================================= */
.pm-prose p.has-drop-cap:not(:focus):first-letter {
    float: left;
    font-size: 5.5em;
    line-height: 0.68;
    font-weight: 900;
    margin: 0.05em 0.1em 0 0;
    color: var(--pm-primary);
    font-family: Georgia, serif;
    text-shadow: 2px 2px 0px rgba(0, 68, 154, 0.1);
}