:root {
    --bg: #081122;
    --surface: #ffffff;
    --text: #122033;
    --muted: #6f7c91;
    --primary: #2a6cf6;
    --primary-2: #153b8b;
    --accent: #21c7a8;
    --border: rgba(15, 23, 42, 0.08);
    --shadow: 0 18px 45px rgba(10, 16, 30, 0.12);
    --radius: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: linear-gradient(180deg, #f5f8fd 0%, #eef3fb 100%); color: var(--text); }
a { color: inherit; text-decoration: none; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.narrow-container { width: min(840px, calc(100% - 32px)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); background: rgba(248, 251, 255, 0.82); border-bottom: 1px solid rgba(15, 23, 42, 0.06); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand strong { display: block; font-size: 18px; }
.brand small { display: block; color: var(--muted); }
.brand-mark { width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(135deg, var(--primary), #65a7ff); color: #fff; display: grid; place-items: center; font-weight: 800; box-shadow: 0 16px 30px rgba(42, 108, 246, 0.25); }
.nav-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nav-actions a { color: #263447; font-weight: 600; }
.user-chip { background: #eaf1ff; color: var(--primary-2); padding: 10px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; }
.hero-section { padding: 72px 0 40px; background: radial-gradient(circle at top right, rgba(33,199,168,0.18), transparent 28%), radial-gradient(circle at top left, rgba(42,108,246,0.16), transparent 30%); }
.hero-grid, .two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; }
.eyebrow { display: inline-flex; padding: 8px 12px; border-radius: 999px; background: rgba(42,108,246,0.1); color: var(--primary); font-weight: 700; font-size: 13px; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.08; }
h1 { font-size: clamp(36px, 4vw, 62px); letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.02em; }
h3 { font-size: 22px; }
.lead { font-size: 18px; color: #405068; max-width: 700px; }
.hero-actions, .cta-actions, .form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 14px 18px; font-weight: 700; cursor: pointer; transition: .22s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 10px 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--primary), #5f94ff); color: #fff; box-shadow: 0 18px 30px rgba(42,108,246,.22); }
.btn-secondary { background: #eaf1ff; color: var(--primary-2); }
.btn-outline { background: transparent; border: 1px solid rgba(42,108,246,.24); color: var(--primary-2); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.glass-card { background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.68)); backdrop-filter: blur(14px); }
.hero-visual, .auth-card, .form-card, .stat-card, .side-card, .info-card, .profile-hero, .quick-card, .feature-card, .stack-item, .cta-box { padding: 24px; }
.visual-top { display: flex; align-items: center; gap: 10px; color: var(--muted); margin-bottom: 20px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 7px rgba(33,199,168,.12); }
.dashboard-preview { display: grid; gap: 14px; }
.preview-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.preview-box { background: linear-gradient(180deg, var(--surface), var(--surface-soft)); border: 1px solid var(--border); border-radius: 20px; padding: 18px; }
.preview-box small, .stat-card small, .mini-card span, .muted, .info-list span, .data-table th { color: var(--muted); }
.preview-box strong, .stat-card strong, .mini-card strong { display: block; font-size: 30px; margin-top: 4px; }
.preview-box.lg strong { font-size: 42px; }
.bar, .state-bar { width: 100%; height: 10px; background: #edf2fb; border-radius: 999px; overflow: hidden; margin-top: 12px; }
.bar span, .state-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.mini-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.mini-card { background: rgba(255,255,255,.75); border: 1px solid var(--border); border-radius: 20px; padding: 16px 18px; min-width: 170px; }
.section { padding: 42px 0; }
.section-soft { background: linear-gradient(180deg, rgba(255,255,255,.8), rgba(237,243,252,.9)); }
.section-head { max-width: 900px; margin: 0 auto 26px; text-align: center; }
.section-head.align-left { margin-inline: 0 auto; text-align: left; }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.stack-cards { display: grid; gap: 14px; }
.cta-section { padding-bottom: 70px; }
.cta-box { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.auth-shell, .page-section { padding: 56px 0 72px; }
.auth-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 28px; align-items: center; }
.form-grid { display: grid; gap: 16px; }
.two-cols { grid-template-columns: repeat(2, 1fr); }
.col-span-2 { grid-column: span 2; }
label { display: block; font-weight: 700; margin-bottom: 8px; }
input, select, textarea { width: 100%; border: 1px solid rgba(15,23,42,.12); border-radius: 14px; min-height: 50px; padding: 12px 14px; background: #fbfdff; outline: none; font: inherit; color: var(--text); }
input:focus, select:focus, textarea:focus { border-color: rgba(42,108,246,.45); box-shadow: 0 0 0 4px rgba(42,108,246,.08); }
.checkbox-row { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.checkbox-row input { width: 18px; min-height: 18px; margin-top: 4px; }
.alert { margin-top: 16px; border-radius: 18px; padding: 14px 18px; font-weight: 600; }
.alert-success { background: #eafbf5; color: #0f7a5e; border: 1px solid rgba(15,122,94,.12); }
.alert-error { background: #fff1f0; color: #b02b2b; border: 1px solid rgba(176,43,43,.12); }
.site-footer { padding: 28px 0 40px; background: #081122; color: rgba(255,255,255,.78); }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.footer-grid strong { color: #fff; }
.bullet-list { padding-left: 18px; color: #3e4f68; line-height: 1.8; }
.separator { border-top: 1px solid rgba(15,23,42,.08); margin: 6px 0; }
.small { font-size: 13px; }
.dashboard-shell .stats-grid { margin-bottom: 22px; }
.dashboard-grid { display: grid; grid-template-columns: 1.5fr .9fr; gap: 18px; }
.card-head, .page-header-inline { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 16px; }
.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 14px 12px; border-bottom: 1px solid rgba(15,23,42,.06); text-align: left; }
.data-table th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.badge { display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; border-radius: 999px; font-weight: 700; font-size: 12px; }
.badge-success { background: #eafbf5; color: #0f7a5e; }
.badge-info { background: #ecf5ff; color: #1862c6; }
.badge-warning { background: #fff7e8; color: #9e6a07; }
.badge-primary { background: #eaf1ff; color: #274f9b; }
.badge-danger { background: #fff1f0; color: #bf3232; }
.badge-muted { background: #eff3f8; color: #607086; }
.state-list { display: grid; gap: 14px; }
.state-row { display: grid; grid-template-columns: 34px 1fr 28px; align-items: center; gap: 10px; }
.search-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-form input { min-width: 280px; }
.egresso-grid { grid-template-columns: 1.2fr .9fr; }
.hero-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.info-list { display: grid; gap: 16px; }
.info-list div { background: var(--surface-soft); border: 1px solid var(--border); border-radius: 18px; padding: 16px; }
.info-list strong { display: block; margin-top: 6px; }
.flash-holder { margin-top: 10px; }
@media (max-width: 1024px) { .hero-grid, .two-col, .auth-grid, .dashboard-grid, .egresso-grid, .footer-grid, .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
    .nav-wrap, .cta-box, .page-header-inline { flex-direction: column; align-items: stretch; }
    .hero-grid, .two-col, .auth-grid, .dashboard-grid, .egresso-grid, .footer-grid, .grid-4, .grid-3, .two-cols { grid-template-columns: 1fr; }
    .col-span-2 { grid-column: span 1; }
    .mini-stats { flex-direction: column; }
    .preview-grid { grid-template-columns: 1fr; }
    h1 { font-size: 38px; }
    .site-header { position: static; }
}


/* ===== Portal do egresso — nova home ===== */
.portal-body {
    background: linear-gradient(135deg, #eef4fb 0%, #f8fbff 44%, #edf3fb 100%);
    color: #102139;
}
.portal-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 300px 1fr;
}
.portal-sidebar {
    background:
        radial-gradient(circle at top left, rgba(55, 121, 255, .16), transparent 28%),
        linear-gradient(180deg, #07142b 0%, #09162f 100%);
    color: rgba(255,255,255,.92);
    padding: 26px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 26px;
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid rgba(255,255,255,.06);
}
.portal-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}
.portal-brand strong { display: block; font-size: 22px; color: #fff; }
.portal-brand small { color: rgba(255,255,255,.65); }
.portal-brand-mark,
.portal-avatar {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #2a6cf6, #78a8ff);
    box-shadow: 0 16px 30px rgba(42, 108, 246, .28);
}
.portal-nav {
    display: grid;
    gap: 8px;
}
.portal-nav a {
    padding: 14px 16px;
    border-radius: 16px;
    color: rgba(255,255,255,.74);
    font-weight: 600;
    transition: .22s ease;
}
.portal-nav a:hover,
.portal-nav a.active {
    background: linear-gradient(90deg, rgba(42,108,246,.18), rgba(255,255,255,.08));
    color: #fff;
}
.portal-user-card {
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 24px;
    padding: 18px;
    display: grid;
    gap: 12px;
}
.portal-user-card small,
.portal-progress-mini span { color: rgba(255,255,255,.68); }
.portal-progress-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.portal-progress-mini strong { color: #fff; }
.portal-progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255,255,255,.12);
    border-radius: 999px;
    overflow: hidden;
}
.portal-progress-bar.lg { height: 12px; margin: 12px 0 14px; }
.portal-progress-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #2a6cf6, #21c7a8);
    border-radius: inherit;
}
.portal-main {
    padding: 28px;
    display: grid;
    gap: 22px;
}
.portal-alert { margin: 0; }
.portal-hero {
    display: grid;
    grid-template-columns: 1.35fr .9fr;
    gap: 20px;
    align-items: stretch;
}
.hero-meta-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.chip-soft {
    display: inline-flex;
    padding: 10px 13px;
    border-radius: 999px;
    background: rgba(42,108,246,.08);
    color: #1f4ea6;
    font-weight: 700;
    font-size: 14px;
}
.portal-highlight-card {
    padding: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(244,249,255,.96));
}
.highlight-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--muted);
}
.portal-stat-inline {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 20px;
}
.portal-stat-inline div {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
}
.portal-stat-inline strong {
    display: block;
    font-size: 24px;
    margin-top: 6px;
}
.portal-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.portal-metric-card {
    padding: 20px 22px;
}
.portal-metric-card strong {
    display: block;
    font-size: 25px;
    margin: 8px 0 6px;
}
.portal-content-grid {
    display: grid;
    grid-template-columns: 1.22fr .78fr;
    gap: 18px;
    align-items: start;
}
.portal-column-main,
.portal-column-side {
    display: grid;
    gap: 18px;
}
.portal-section-card,
.portal-side-card {
    padding: 22px;
}
.portal-section-head,
.portal-side-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.trajectory-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.trajectory-grid > div {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
}
.trajectory-grid span { color: var(--muted); }
.trajectory-grid strong {
    display: block;
    margin-top: 6px;
    font-size: 18px;
}
.editorial-list,
.community-list {
    display: grid;
    gap: 14px;
}
.editorial-item,
.community-item,
.opportunity-card,
.side-event-item {
    border: 1px solid var(--border);
    background: var(--surface-soft);
    border-radius: 18px;
    padding: 16px;
}
.editorial-item h3,
.opportunity-card h3,
.community-item strong {
    margin-top: 10px;
}
.text-link {
    display: inline-flex;
    margin-top: 12px;
    color: #1d56b9;
    font-weight: 700;
}
.opportunities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.portal-checklist {
    padding-left: 20px;
    margin: 0;
    color: #2b3d54;
    line-height: 1.8;
}
.side-event-item + .side-event-item,
.community-item + .community-item {
    margin-top: 12px;
}
.side-event-item strong,
.community-item strong { display: block; margin-bottom: 6px; }
.side-event-item span { color: var(--muted); }
@media (max-width: 1180px) {
    .portal-shell { grid-template-columns: 250px 1fr; }
    .portal-hero,
    .portal-content-grid,
    .portal-overview-grid,
    .opportunities-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .portal-shell { grid-template-columns: 1fr; }
    .portal-sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,.06);
    }
    .trajectory-grid,
    .portal-stat-inline { grid-template-columns: 1fr; }
}

.portal-page-head {
    margin-bottom: 22px;
}
.portal-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
.list-card {
    padding: 22px;
}
.list-card-head,
.list-actions,
.list-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.list-card h3 {
    margin: 14px 0 10px;
    font-size: 24px;
}
.list-card p {
    margin: 0 0 10px;
}
.list-meta {
    color: var(--muted);
    font-size: 14px;
}
.single-main {
    grid-template-columns: 1.1fr .9fr;
}
.editorial-list.compact .editorial-item h3 { margin-top: 0; }
@media (max-width: 1180px) {
    .portal-list-grid,
    .single-main { grid-template-columns: 1fr; }
}


.admin-crud-grid { display:grid; grid-template-columns: 1.15fr .95fr; gap: 18px; }
.admin-list { display:grid; gap: 14px; }
.admin-item { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; padding: 16px 0; border-bottom:1px solid rgba(15,23,42,.06); }
.admin-item:last-child { border-bottom:0; }
.quick-link-card { padding: 20px; display:grid; gap: 8px; }
.quick-link-card strong { font-size: 20px; }
.quick-link-card span { color: var(--muted); }
.profile-layout-grid { align-items:start; }
@media (max-width: 1024px) { .admin-crud-grid { grid-template-columns:1fr; } }

/* ===== V4 — Home tipo portal / website interno ===== */
.portal-home-shell { display: grid; gap: 22px; }
.portal-home-hero {
    display: grid;
    grid-template-columns: 1.25fr .92fr;
    gap: 22px;
    padding: 28px;
    align-items: stretch;
}
.portal-home-copy h1 { max-width: 760px; margin-bottom: 14px; }
.portal-home-panel {
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, transparent), color-mix(in srgb, var(--surface-soft) 96%, transparent));
    border: 1px solid var(--border);
    border-radius: 26px;
    padding: 22px;
}
.home-panel-top { display:flex; align-items:center; gap:10px; color: var(--muted); margin-bottom: 16px; }
.home-panel-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.home-panel-grid article {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
}
.home-panel-grid small, .radar-card small, .mixed-board-card small, .magazine-link-card p, .news-compact-item p { color: var(--muted); }
.home-panel-grid strong, .radar-card strong { display:block; font-size: 32px; margin-top: 6px; }
.portal-radar-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.radar-card { padding: 20px; }
.radar-card p { margin-top: 8px; }
.portal-home-grid {
    display:grid;
    grid-template-columns: minmax(0, 1.35fr) 400px;
    gap: 22px;
    align-items: start;
}
.portal-home-main, .portal-home-side { display:grid; gap: 22px; }
.editorial-featured, .mixed-content-board, .portal-magazine-grid { padding: 24px; }
.featured-story {
    margin-top: 16px;
    display:grid;
    grid-template-columns: minmax(0, 1.2fr) 320px;
    gap: 18px;
}
.featured-story-copy {
    padding: 24px;
    border-radius: 24px;
    min-height: 280px;
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--primary) 14%, transparent), transparent 30%),
        linear-gradient(180deg, var(--surface), var(--surface-soft));
    border: 1px solid var(--border);
}
.featured-story-copy h3 { font-size: 34px; line-height: 1.08; margin: 12px 0 10px; }
.featured-meta { display:flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; color: var(--muted); font-size: 14px; }
.featured-story-side { display:grid; }
.mini-callout {
    height: 100%;
    border-radius: 24px;
    padding: 22px;
    background: linear-gradient(180deg, #09162f, #0f2243);
    color: rgba(255,255,255,.92);
    display:grid;
    align-content:start;
    gap: 10px;
    box-shadow: 0 20px 34px rgba(8,17,34,.24);
}
.mini-callout small { color: rgba(255,255,255,.62); }
.mini-callout p { color: rgba(255,255,255,.78); }
.mini-callout .btn-outline { color:#fff; border-color: rgba(255,255,255,.22); }
.portal-news-list.compact { display:grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.news-compact-item {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 18px;
}
.news-compact-item h4 { margin: 10px 0 8px; font-size: 20px; line-height: 1.2; }
.mixed-board-grid { display:grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 14px; }
.mixed-board-card {
    border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--surface), var(--surface-soft));
    border-radius: 22px;
    padding: 20px;
}
.mixed-board-card.emphasis {
    background: linear-gradient(135deg, rgba(42,108,246,.95), rgba(79,138,255,.92));
    color: #fff;
    box-shadow: 0 22px 34px rgba(42,108,246,.22);
}
.mixed-board-card.emphasis small,
.mixed-board-card.emphasis .muted { color: rgba(255,255,255,.78); }
.magazine-links-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.magazine-link-card {
    display:block;
    padding: 22px;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #fff, #f8fbff);
    transition: .22s ease;
}
.magazine-link-card:hover {
    transform: translateY(-2px);
    border-color: rgba(42,108,246,.18);
    box-shadow: 0 16px 30px rgba(15,23,42,.08);
}
.magazine-link-card strong { display:block; font-size: 20px; margin-bottom: 8px; color: var(--text); }
.portal-profile-box { position: sticky; top: 28px; }
.portal-status-list { list-style:none; margin:0; padding:0; display:grid; gap: 14px; }
.portal-status-list li {
    display:grid;
    gap: 4px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(15,23,42,.08);
}
.portal-status-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.portal-status-list span { color: var(--muted); font-size: 14px; }
.community-list.compact { gap: 14px; }

@media (max-width: 1280px) {
    .portal-home-grid { grid-template-columns: 1fr; }
    .portal-profile-box { position: static; }
}
@media (max-width: 1120px) {
    .portal-home-hero,
    .featured-story,
    .portal-radar-grid,
    .mixed-board-grid,
    .portal-news-list.compact,
    .magazine-links-grid,
    .home-panel-grid { grid-template-columns: 1fr 1fr; }
    .featured-story-copy { min-height: auto; }
}
@media (max-width: 860px) {
    .portal-shell { grid-template-columns: 1fr; }
    .portal-sidebar { position: static; height: auto; }
    .portal-home-hero,
    .featured-story,
    .portal-radar-grid,
    .mixed-board-grid,
    .portal-news-list.compact,
    .magazine-links-grid,
    .home-panel-grid { grid-template-columns: 1fr; }
    .portal-main { padding: 18px; }
}

/* ===== V5 — Home editorial com cara de portal ===== */
.portal-v5-shell { display:grid; gap:22px; }
.portal-v5-hero {
    display:grid;
    grid-template-columns: minmax(0,1.4fr) 360px;
    gap:22px;
    padding:30px;
    align-items:start;
}
.portal-v5-hero-main h1 { font-size: clamp(30px, 4vw, 48px); line-height:1.04; margin: 8px 0 14px; max-width: 840px; }
.portal-v5-status {
    border:1px solid var(--border);
    border-radius:26px;
    background: linear-gradient(180deg, var(--surface), var(--surface-soft));
    padding:22px;
    display:grid;
    gap:16px;
}
.status-kpi small, .radar-kpi span { color:var(--muted); }
.status-kpi strong { display:block; font-size:38px; margin-top:6px; }
.status-grid-mini { display:grid; grid-template-columns: repeat(2,1fr); gap:12px; }
.status-grid-mini article { background: var(--surface); border:1px solid var(--border); border-radius:18px; padding:14px; }
.status-grid-mini strong { display:block; font-size:24px; margin-top:4px; }
.status-pendencias { list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.status-pendencias li { padding:12px 14px; border-radius:16px; background: var(--surface-soft); border:1px solid var(--border); color:var(--text); }
.portal-v5-radar { display:grid; grid-template-columns: repeat(4,1fr); gap:16px; }
.radar-kpi { padding:20px; }
.radar-kpi strong { display:block; font-size:34px; margin:8px 0; }
.portal-v5-featured {
    display:grid;
    grid-template-columns: 420px minmax(0,1fr);
    gap:0;
    padding:0;
    overflow:hidden;
}
.feature-cover { min-height:320px; background-size:cover; background-position:center; }
.feature-copy { padding:34px; background:linear-gradient(180deg,#0f172a,#14213d); color:#fff; display:grid; align-content:center; gap:12px; }
.feature-copy h2 { font-size: clamp(28px, 3vw, 42px); line-height:1.06; margin:0; }
.feature-copy p, .feature-meta { color: rgba(255,255,255,.78); }
.feature-meta { display:flex; gap:14px; flex-wrap:wrap; font-size:14px; }
.portal-filter-bar { display:flex; gap:10px; flex-wrap:wrap; }
.filter-pill {
    padding:10px 16px;
    border-radius:999px;
    border:1px solid var(--border);
    background:#fff;
    color:var(--text);
    font-weight:600;
}
.filter-pill.active { background:#0f172a; color:#fff; border-color:#0f172a; }
.portal-v5-layout { display:grid; grid-template-columns: minmax(0,1.35fr) 360px; gap:22px; align-items:start; }
.portal-v5-main, .portal-v5-side { display:grid; gap:22px; }
.portal-feed-section { display:grid; gap:14px; }
.portal-card-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:16px; }
.portal-card-grid-news { grid-template-columns: repeat(2, minmax(0,1fr)); }
.content-card {
    background:#fff;
    border:1px solid var(--border);
    border-radius:24px;
    overflow:hidden;
    box-shadow:0 18px 32px rgba(15,23,42,.05);
}
.content-cover { height:188px; background-size:cover; background-position:center; }
.content-cover.slim { height:136px; }
.content-body { padding:18px; }
.content-body h3 { font-size:22px; line-height:1.16; margin:10px 0 10px; }
.content-body p { color:var(--muted); margin:0 0 12px; }
.content-meta { display:flex; gap:12px; flex-wrap:wrap; color:var(--muted); font-size:14px; }
.community-tape { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:16px; }
.community-highlight {
    border:1px solid var(--border);
    border-radius:22px;
    padding:20px;
    background:linear-gradient(180deg,#fff,#f8fbff);
}
.community-highlight h3 { margin:10px 0 8px; font-size:22px; }
.community-highlight p, .community-highlight small { color:var(--muted); }
.side-module { padding:22px; }
.quick-actions-portal { display:grid; gap:10px; }
.quick-actions-portal a {
    display:block;
    padding:12px 14px;
    border-radius:16px;
    background:#f8fbff;
    border:1px solid var(--border);
    color:var(--text);
    font-weight:600;
}
.mini-agenda { display:grid; gap:12px; }
.mini-agenda article { padding:14px 0; border-bottom:1px solid rgba(15,23,42,.08); }
.mini-agenda article:last-child { border-bottom:0; padding-bottom:0; }
.mini-agenda strong { display:block; margin-bottom:4px; }
.mini-agenda span { color:var(--muted); font-size:14px; }
.admin-item-rich { align-items:center; grid-template-columns: 92px minmax(0,1fr) auto; gap:14px; }
.admin-thumb { width:92px; height:78px; border-radius:16px; background-size:cover; background-position:center; }
.admin-actions-inline { display:grid; gap:8px; }

@media (max-width: 1280px) {
    .portal-v5-layout, .portal-v5-hero, .portal-v5-featured { grid-template-columns:1fr; }
    .portal-v5-radar { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 920px) {
    .portal-card-grid, .portal-card-grid-news, .community-tape, .portal-v5-radar, .status-grid-mini { grid-template-columns:1fr; }
    .admin-item-rich { grid-template-columns:1fr; }
    .admin-thumb { width:100%; height:160px; }
}


/* ===== V6 clean + temas ===== */
:root {
    --page-bg: #f5f7fb;
    --page-bg-2: #eef3f8;
    --surface: #ffffff;
    --surface-2: #fbfcfe;
    --surface-soft: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --muted-2: #94a3b8;
    --primary: #2563eb;
    --primary-2: #1d4ed8;
    --accent: #14b8a6;
    --border: rgba(15, 23, 42, 0.07);
    --border-strong: rgba(15, 23, 42, 0.12);
    --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.08);
    --sidebar-bg: linear-gradient(180deg, #081226 0%, #0b1730 100%);
    --sidebar-border: rgba(255,255,255,.06);
    --sidebar-text: rgba(255,255,255,.90);
    --sidebar-muted: rgba(255,255,255,.64);
    --hero-bg: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    --hero-feature: linear-gradient(135deg, #183a8f 0%, #0b1730 100%);
    --input-bg: #ffffff;
}

html[data-theme="dark"] {
    --page-bg: #07111f;
    --page-bg-2: #0b1324;
    --surface: #0f172a;
    --surface-2: #111c31;
    --surface-soft: #0b1324;
    --text: #e5eefc;
    --muted: #9bb0d1;
    --muted-2: #7f93b1;
    --primary: #5a8cff;
    --primary-2: #7fb0ff;
    --accent: #2dd4bf;
    --border: rgba(148, 163, 184, 0.12);
    --border-strong: rgba(148, 163, 184, 0.22);
    --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 24px 46px rgba(0, 0, 0, 0.28);
    --sidebar-bg: linear-gradient(180deg, #030712 0%, #081120 100%);
    --sidebar-border: rgba(148, 163, 184, .08);
    --sidebar-text: rgba(255,255,255,.94);
    --sidebar-muted: rgba(226,232,240,.60);
    --hero-bg: linear-gradient(135deg, #111c31 0%, #0f172a 100%);
    --hero-feature: linear-gradient(135deg, #111c31 0%, #050b16 100%);
    --input-bg: #0b1324;
}

html[data-theme="contrast"] {
    --page-bg: #000000;
    --page-bg-2: #050505;
    --surface: #000000;
    --surface-2: #000000;
    --surface-soft: #000000;
    --text: #ffffff;
    --muted: #ffffff;
    --muted-2: #ffffff;
    --primary: #00e5ff;
    --primary-2: #00e5ff;
    --accent: #ffe600;
    --border: rgba(255,255,255,0.34);
    --border-strong: rgba(255,255,255,0.7);
    --shadow-sm: none;
    --shadow-md: none;
    --sidebar-bg: #000000;
    --sidebar-border: rgba(255,255,255,.24);
    --sidebar-text: #ffffff;
    --sidebar-muted: #ffffff;
    --hero-bg: #000000;
    --hero-feature: #000000;
    --input-bg: #000000;
}

body {
    background: linear-gradient(180deg, var(--page-bg) 0%, var(--page-bg-2) 100%);
    color: var(--text);
}
.portal-body {
    background: linear-gradient(180deg, var(--page-bg) 0%, var(--page-bg-2) 100%);
    color: var(--text);
}
.site-header { background: color-mix(in srgb, var(--surface) 86%, transparent); border-bottom: 1px solid var(--border); }
.card, .mini-card, .preview-box, .info-list div, .portal-user-card, .portal-content-card, .portal-stat-card, .portal-hero, .radar-kpi, .content-card, .community-highlight, .side-module {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.portal-shell { grid-template-columns: 284px 1fr; }
.portal-sidebar {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    padding: 22px 18px;
}
.portal-brand { margin-bottom: 18px; }
.portal-brand strong { color: var(--sidebar-text); }
.portal-brand small { color: var(--sidebar-muted); }
.portal-brand-mark {
    width: 40px; height: 40px; border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #7fb0ff);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22);
}
.portal-nav { display: grid; gap: 8px; }
.portal-nav a {
    color: var(--sidebar-text); opacity: .88; font-weight: 600; padding: 14px 14px; border-radius: 16px;
    transition: .18s ease; border: 1px solid transparent;
}
.portal-nav a:hover { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.06); }
.portal-nav a.active { background: rgba(74, 126, 255, .14); border-color: rgba(127,176,255,.16); }
.portal-main { padding: 22px; }
.portal-user-card {
    background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: none;
}
.portal-avatar { background: linear-gradient(135deg, var(--primary), #7fb0ff); }
.portal-progress-mini span, .portal-user-card small { color: var(--sidebar-muted); }
.portal-progress-mini strong, .portal-user-card strong { color: var(--sidebar-text); }
.portal-progress-bar { background: rgba(255,255,255,.08); }
.theme-switcher {
    display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 16px 0 18px;
}
.theme-btn {
    appearance: none; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.03); color: var(--sidebar-text);
    padding: 10px 10px; border-radius: 12px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.theme-btn.active { background: rgba(90, 140, 255, .2); border-color: rgba(127,176,255,.26); }
.portal-alert { margin-bottom: 16px; }
.portal-hero, .portal-v5-featured {
    background: var(--hero-bg);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: var(--shadow-sm);
}
.portal-hero {
    display: grid; grid-template-columns: minmax(0,1.5fr) 320px; gap: 24px; padding: 28px;
}
.portal-hero-copy h1, .portal-hero-copy p { max-width: 840px; }
.portal-hero-copy p, .radar-kpi p, .content-body p, .feature-copy p, .portal-status-list li span, .quick-actions-portal a, .mini-agenda article span, .lead, .preview-box small, .muted {
    color: var(--muted);
}
.portal-hero h1, .portal-v5-featured h2, .portal-feed-section h2, .side-module h2 { letter-spacing: -0.03em; }
.hero-tags .badge, .eyebrow {
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    color: var(--primary-2);
    border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
}
.radar-grid, .portal-card-grid { gap: 16px; }
.radar-kpi, .side-module, .content-card, .community-highlight {
    border-radius: 24px;
    padding: 22px;
}
.radar-kpi span { color: var(--muted); display:block; margin-bottom:8px; }
.radar-kpi strong { font-size: 42px; line-height: 1; display:block; margin-bottom:10px; }
.portal-v5-featured {
    overflow: hidden; display:grid; grid-template-columns: 360px 1fr; margin: 18px 0 20px;
}
.feature-cover { min-height: 248px; background-size: cover; background-position: center; background-color: #dbeafe; }
.feature-copy { padding: 30px 32px; background: var(--hero-feature); color: #fff; }
.feature-copy p, .feature-meta { color: rgba(255,255,255,.82); }
.feature-copy .badge { background: rgba(255,255,255,.14); color:#fff; border:1px solid rgba(255,255,255,.22); }
html[data-theme="dark"] .feature-copy { color: var(--text); background: linear-gradient(135deg, #111c31 0%, #0b1324 100%); }
html[data-theme="dark"] .feature-copy p, html[data-theme="dark"] .feature-meta { color: var(--muted); }
html[data-theme="dark"] .feature-copy .badge { background: rgba(90,140,255,.12); color: var(--primary-2); border-color: rgba(127,176,255,.18); }
html[data-theme="contrast"] .feature-copy { color: var(--text); background: #000; border-left:1px solid var(--border-strong); }
.portal-filter-bar { display:flex; gap:10px; flex-wrap:wrap; margin: 10px 0 18px; }
.filter-pill {
    padding: 10px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 700;
    box-shadow: var(--shadow-sm);
}
.filter-pill.active { background: var(--text); color: var(--surface); border-color: transparent; }
html[data-theme="contrast"] .filter-pill.active { background: var(--primary); color: #000; }
.portal-v5-layout { display:grid; grid-template-columns: minmax(0,1fr) 320px; gap: 18px; }
.portal-feed-section { margin-bottom: 18px; }
.portal-section-head { display:flex; justify-content:space-between; align-items:flex-end; gap:12px; margin-bottom: 14px; }
.text-link { color: var(--primary-2); font-weight:700; }
.portal-card-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.content-card {
    overflow:hidden; padding:0; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.content-cover { height: 168px; background-size:cover; background-position:center; }
.content-cover.slim { height: 124px; }
.content-body { padding: 18px 18px 20px; }
.content-body h3 { font-size: 19px; margin-bottom: 10px; }
.content-meta { display:flex; gap: 12px; flex-wrap:wrap; margin-top: 12px; color: var(--muted); font-size: 14px; }
.community-tape { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.community-highlight small { color: var(--muted); }
.side-module { padding: 22px; }
.portal-status-list { list-style:none; padding:0; margin:0; display:grid; gap: 14px; }
.portal-status-list li { border-bottom:1px solid var(--border); padding-bottom: 14px; }
.portal-status-list li:last-child { border-bottom:0; padding-bottom:0; }
.portal-status-list li strong { display:block; margin-top:6px; }
.quick-actions-portal { display:grid; gap:10px; }
.quick-actions-portal a {
    display:block; padding: 12px 14px; border-radius: 14px; background: var(--surface-soft); border:1px solid var(--border);
}
.mini-agenda { display:grid; gap:12px; }
.mini-agenda article { padding: 12px 14px; border-radius: 14px; background: var(--surface-soft); border:1px solid var(--border); }
.mini-agenda strong, .quick-actions-portal a { color: var(--text); }
.badge-success, .badge-info, .badge-warning, .badge-primary, .badge-muted, .badge-danger {
    border: 1px solid transparent;
}
.badge-success { background: color-mix(in srgb, #22c55e 14%, transparent); color: #15803d; border-color: color-mix(in srgb, #22c55e 20%, transparent); }
.badge-info { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary-2); border-color: color-mix(in srgb, var(--primary) 18%, transparent); }
.badge-warning { background: color-mix(in srgb, #f59e0b 14%, transparent); color: #b45309; border-color: color-mix(in srgb, #f59e0b 18%, transparent); }
.badge-primary { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary-2); border-color: color-mix(in srgb, var(--primary) 18%, transparent); }
.badge-muted { background: color-mix(in srgb, #94a3b8 12%, transparent); color: var(--muted); border-color: var(--border); }
html[data-theme="dark"] .badge-success { color: #4ade80; }
html[data-theme="dark"] .badge-warning { color: #fbbf24; }
html[data-theme="contrast"] .badge-success, html[data-theme="contrast"] .badge-info, html[data-theme="contrast"] .badge-warning, html[data-theme="contrast"] .badge-primary, html[data-theme="contrast"] .badge-muted, html[data-theme="contrast"] .eyebrow {
    background: #000; color: var(--text); border-color: var(--border-strong);
}
input, select, textarea { background: var(--input-bg); color: var(--text); border-color: var(--border); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 12%, transparent); }
.btn-secondary { background: color-mix(in srgb, var(--primary) 8%, white); color: var(--primary-2); }
.btn-outline { border-color: var(--border-strong); color: var(--text); }
html[data-theme="dark"] .btn-secondary { background: rgba(90,140,255,.12); }
html[data-theme="dark"] .btn-outline { color: var(--text); }
html[data-theme="contrast"] .btn-primary, html[data-theme="contrast"] .btn-secondary, html[data-theme="contrast"] .btn-outline {
    background: #000; color: var(--text); border: 1px solid var(--border-strong); box-shadow: none;
}
@media (max-width: 1200px) {
    .portal-hero, .portal-v5-layout, .portal-v5-featured { grid-template-columns: 1fr; }
    .portal-shell { grid-template-columns: 260px 1fr; }
}
@media (max-width: 860px) {
    .portal-shell { grid-template-columns: 1fr; }
    .portal-sidebar { position: static; height: auto; }
    .portal-card-grid, .community-tape, .radar-grid { grid-template-columns: 1fr; }
    .portal-main { padding: 16px; }
    .portal-hero { padding: 20px; }
}


/* ===== V6.1 — correções de consistência nos temas ===== */
html[data-theme="dark"] .portal-v5-status,
html[data-theme="dark"] .status-grid-mini article,
html[data-theme="dark"] .status-pendencias li,
html[data-theme="dark"] .portal-home-panel,
html[data-theme="dark"] .home-panel-grid article {
    color: var(--text);
}
html[data-theme="contrast"] .portal-v5-status,
html[data-theme="contrast"] .status-grid-mini article,
html[data-theme="contrast"] .status-pendencias li,
html[data-theme="contrast"] .portal-home-panel,
html[data-theme="contrast"] .home-panel-grid article,
html[data-theme="contrast"] .side-module,
html[data-theme="contrast"] .content-card,
html[data-theme="contrast"] .community-highlight,
html[data-theme="contrast"] .radar-kpi {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border-strong);
}
html[data-theme="contrast"] .status-grid-mini article strong,
html[data-theme="contrast"] .status-kpi strong,
html[data-theme="contrast"] .portal-status-list li strong,
html[data-theme="contrast"] .quick-actions-portal a,
html[data-theme="contrast"] .mini-agenda strong {
    color: var(--text);
}


/* ===== V6.2 — refinamento premium ===== */
:root {
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.09);
}
.portal-main {
    padding: 20px 22px 24px;
    gap: 18px;
}
.portal-hero,
.portal-v5-featured {
    border-radius: 26px;
}
.portal-hero {
    padding: 26px 28px;
    gap: 22px;
}
.portal-hero-copy h1 {
    font-size: clamp(30px, 3.4vw, 42px);
    line-height: 1.08;
    max-width: 760px;
}
.portal-hero-copy p {
    max-width: 720px;
    line-height: 1.55;
}
.hero-meta-row { margin-top: 14px; }
.chip-soft,
.hero-tags .badge,
.eyebrow {
    font-size: 13px;
    padding: 9px 12px;
}
.btn {
    border-radius: 15px;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.btn:hover {
    transform: translateY(-2px);
}
.btn-primary:hover {
    box-shadow: 0 16px 32px rgba(42,108,246,.18);
}
.card, .mini-card, .preview-box, .info-list div, .portal-user-card, .portal-content-card, .portal-stat-card, .portal-hero, .radar-kpi, .content-card, .community-highlight, .side-module {
    box-shadow: var(--shadow-sm);
}
.radar-kpi, .side-module, .content-card, .community-highlight {
    border-radius: 22px;
}
.portal-radar-grid,
.portal-v5-radar {
    gap: 16px;
}
.radar-kpi {
    padding: 20px 22px;
}
.radar-kpi strong {
    font-size: 38px;
    margin-bottom: 8px;
}
.portal-v5-featured {
    margin: 14px 0 18px;
    grid-template-columns: 310px 1fr;
    min-height: 220px;
}
.feature-cover {
    min-height: 220px;
    background: linear-gradient(135deg, rgba(37,99,235,.92), rgba(59,130,246,.76));
}
.feature-copy {
    padding: 26px 28px;
}
.feature-copy h2 {
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.12;
    margin-bottom: 12px;
}
.feature-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 16px;
    font-size: 14px;
}
.portal-filter-bar {
    gap: 8px;
    margin: 8px 0 16px;
}
.filter-pill {
    padding: 10px 15px;
    border-color: color-mix(in srgb, var(--border) 92%, white);
    background: color-mix(in srgb, var(--surface) 86%, transparent);
}
.filter-pill:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.portal-feed-section { margin-bottom: 22px; }
.portal-section-head {
    margin-bottom: 12px;
}
.portal-card-grid,
.community-tape {
    gap: 14px;
}
.content-card {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.content-card:hover,
.community-highlight:hover,
.side-module:hover,
.radar-kpi:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.content-cover {
    height: 154px;
}
.content-cover.slim {
    height: 112px;
}
.content-body {
    padding: 16px 18px 18px;
}
.content-body h3 {
    font-size: 18px;
    line-height: 1.28;
    margin-bottom: 8px;
}
.content-body p,
.community-highlight p {
    line-height: 1.58;
}
.content-meta {
    margin-top: 10px;
    font-size: 13px;
}
.portal-status-list {
    gap: 12px;
}
.portal-status-list li {
    padding-bottom: 12px;
}
.quick-actions-portal a,
.mini-agenda article {
    border-radius: 16px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.quick-actions-portal a:hover,
.mini-agenda article:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
}
.portal-nav a {
    border-radius: 14px;
    padding: 13px 14px;
}
.portal-nav a.active {
    background: rgba(74, 126, 255, .12);
    border-color: rgba(127,176,255,.12);
    box-shadow: inset 3px 0 0 0 var(--primary);
}
.portal-user-card {
    gap: 10px;
}
.theme-switcher {
    gap: 6px;
}
.theme-btn {
    border-radius: 11px;
}
.text-link {
    font-size: 14px;
}
html[data-theme="dark"] .portal-nav a.active {
    background: rgba(74, 126, 255, .18);
    border-color: rgba(127,176,255,.16);
}
html[data-theme="dark"] .feature-cover {
    background: linear-gradient(135deg, rgba(30,58,138,.72), rgba(59,130,246,.36));
}
html[data-theme="dark"] .filter-pill {
    background: color-mix(in srgb, var(--surface) 94%, transparent);
}
html[data-theme="contrast"] .content-card:hover,
html[data-theme="contrast"] .community-highlight:hover,
html[data-theme="contrast"] .side-module:hover,
html[data-theme="contrast"] .radar-kpi:hover,
html[data-theme="contrast"] .quick-actions-portal a:hover,
html[data-theme="contrast"] .mini-agenda article:hover {
    transform: none;
    box-shadow: none;
}
@media (max-width: 1200px) {
    .portal-v5-featured { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .portal-main { padding: 16px; }
    .portal-hero { padding: 20px; }
    .portal-hero-copy h1 { font-size: 34px; }
}

/* ===== HERO SAAS MED EGRESSOS ===== */
.hero-saas{
  position:relative;
  overflow:hidden;
  border-radius:24px;
  padding:40px;
  margin-bottom:28px;
  background:linear-gradient(135deg,#081226 0%,#0f1f45 45%,#1d4ed8 100%);
  color:#fff;
  box-shadow:0 24px 60px rgba(15,23,42,.18);
}
.hero-saas__bg{
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.08), transparent 24%),
    radial-gradient(circle at 80% 30%, rgba(255,255,255,.09), transparent 20%),
    radial-gradient(circle at 60% 80%, rgba(255,255,255,.06), transparent 18%);
  pointer-events:none;
}
.hero-saas__content{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:1.15fr .85fr;
  gap:28px;
  align-items:center;
}
.hero-saas__eyebrow{
  display:inline-block;
  padding:8px 14px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.16);
  font-size:13px;
  font-weight:700;
  margin-bottom:18px;
}
.hero-saas h1{
  margin:0 0 14px;
  font-size:52px;
  line-height:1.03;
  letter-spacing:-1.6px;
  max-width:780px;
}
.hero-saas p{
  margin:0;
  max-width:720px;
  font-size:18px;
  line-height:1.65;
  color:rgba(255,255,255,.82);
}
.hero-saas__chips{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:22px 0 20px;
}
.hero-saas__chips span{
  padding:10px 14px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
  font-size:13px;
  font-weight:600;
}
.hero-saas__actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-bottom:22px;
}
.hero-saas__btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:14px 18px;
  border-radius:14px;
  text-decoration:none;
  font-weight:700;
  transition:.2s ease;
}
.hero-saas__btn--primary{
  background:#fff;
  color:#0f172a;
}
.hero-saas__btn--primary:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 30px rgba(255,255,255,.18);
}
.hero-saas__btn--ghost{
  background:rgba(255,255,255,.08);
  color:#fff;
  border:1px solid rgba(255,255,255,.14);
}
.hero-saas__btn--ghost:hover{
  background:rgba(255,255,255,.14);
}
.hero-saas__metrics{
  display:grid;
  grid-template-columns:repeat(3,minmax(120px,1fr));
  gap:14px;
  max-width:720px;
}
.hero-saas__metrics article{
  padding:16px 18px;
  border-radius:18px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  backdrop-filter:blur(10px);
}
.hero-saas__metrics strong{
  display:block;
  font-size:30px;
  line-height:1;
  margin-bottom:8px;
}
.hero-saas__metrics span{
  font-size:13px;
  color:rgba(255,255,255,.74);
}
.hero-saas__mockup{
  position:relative;
  border-radius:24px;
  padding:18px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.12);
  backdrop-filter:blur(10px);
  transform:perspective(1400px) rotateY(-8deg) rotateX(2deg);
  box-shadow:0 30px 60px rgba(2,6,23,.22);
}
.hero-saas__mockup-top{
  display:flex;
  gap:8px;
  margin-bottom:16px;
}
.hero-saas__mockup-top span{
  width:10px;
  height:10px;
  border-radius:50%;
  background:rgba(255,255,255,.55);
}
.hero-saas__mockup-body{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
}
.hero-saas__mini-card{
  padding:16px;
  border-radius:18px;
  background:#fff;
  color:#0f172a;
  box-shadow:0 12px 28px rgba(15,23,42,.12);
}
.hero-saas__mini-card small{
  display:block;
  font-size:12px;
  color:#64748b;
  margin-bottom:8px;
}
.hero-saas__mini-card strong{
  font-size:22px;
}
.hero-saas__progress{
  height:10px;
  margin-top:12px;
  border-radius:999px;
  background:#e2e8f0;
  overflow:hidden;
}
.hero-saas__progress i{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#2563eb,#22c55e);
}
.hero-saas__mini-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
}
.hero-saas__floating{
  position:absolute;
  right:-18px;
  bottom:-18px;
  width:220px;
  padding:16px;
  border-radius:20px;
  background:#fff;
  color:#0f172a;
  box-shadow:0 24px 50px rgba(2,6,23,.18);
}
.hero-saas__floating-label{
  display:inline-block;
  margin-bottom:8px;
  padding:6px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  background:#dbeafe;
  color:#1d4ed8;
}
.hero-saas__floating strong{
  display:block;
  margin-bottom:8px;
  font-size:18px;
  line-height:1.2;
}
.hero-saas__floating p{
  font-size:13px;
  line-height:1.5;
  color:#475569;
}

/* Temas */
[data-theme="dark"] .hero-saas{
  background:linear-gradient(135deg,#020617 0%,#0f172a 50%,#1d4ed8 100%);
}
[data-theme="contrast"] .hero-saas{
  background:#000;
  border:2px solid #00ffff;
}
[data-theme="contrast"] .hero-saas__btn--primary{
  background:#00ffff;
  color:#000;
}
[data-theme="contrast"] .hero-saas__btn--ghost,
[data-theme="contrast"] .hero-saas__chips span,
[data-theme="contrast"] .hero-saas__metrics article,
[data-theme="contrast"] .hero-saas__eyebrow{
  border-color:#fff;
  color:#fff;
  background:#000;
}
[data-theme="contrast"] .hero-saas__mini-card,
[data-theme="contrast"] .hero-saas__floating{
  background:#fff;
  color:#000;
}

@media (max-width: 1180px){
  .hero-saas__content{
    grid-template-columns:1fr;
  }
  .hero-saas__mockup{
    transform:none;
  }
  .hero-saas__floating{
    position:static;
    width:auto;
    margin-top:12px;
  }
}
@media (max-width: 768px){
  .hero-saas{
    padding:24px;
    border-radius:18px;
  }
  .hero-saas h1{
    font-size:34px;
    letter-spacing:-1px;
  }
  .hero-saas p{
    font-size:15px;
  }
  .hero-saas__metrics{
    grid-template-columns:1fr;
  }
  .hero-saas__mini-grid{
    grid-template-columns:1fr;
  }
}


/* =========================================
   HEADER DAS PÁGINAS INTERNAS (GLOBAL)
========================================= */

.portal-page-header,
.module-page-header,
.page-header,
.internal-header,
.section-header {
    margin-bottom: 18px !important;
    padding-bottom: 0 !important;
}

/* TÍTULO */
.portal-page-header h1,
.module-page-header h1,
.page-header h1,
.internal-header h1,
.section-header h1 {
    margin: 0 0 6px 0 !important;
    line-height: 1.05;
    letter-spacing: -0.5px;
}

/* SUBTÍTULO */
.portal-page-header p,
.module-page-header p,
.page-header p,
.internal-header p,
.section-header p {
    margin: 0 !important;
    font-size: 15px !important;
    line-height: 1.45 !important;
    color: var(--subtext);
    max-width: 720px;
}

/* REMOVE ESPAÇO EXTRA ABAIXO DO HEADER */
.portal-page-header + *,
.module-page-header + *,
.page-header + *,
.internal-header + *,
.section-header + * {
    margin-top: 0 !important;
}

/* =========================================
   CONTEÚDO PRINCIPAL (PADRÃO)
========================================= */

.portal-content,
.page-content,
.module-content,
.internal-content {
    padding-top: 18px !important;
}

/* =========================================
   GRIDS (CARDS)
========================================= */

.cards-grid,
.events-grid,
.news-grid,
.portal-grid,
.module-grid,
.list-grid {
    margin-top: 12px !important;
    gap: 18px;
}

/* =========================================
   CARDS (REFINO VISUAL)
========================================= */

.card {
    border-radius: 14px;
    padding: 20px;
    background: var(--card);
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

/* =========================================
   ESPAÇAMENTO ENTRE SEÇÕES
========================================= */

.section,
.module-section,
.portal-section {
    margin-bottom: 28px;
}

/* =========================================
   CHIP / LABEL (topo tipo "Notícias e chamadas")
========================================= */

.eyebrow,
.header-tag {
    margin-bottom: 10px;
    display: inline-block;
}

/* =========================================
   DARK MODE AJUSTE FINO
========================================= */

[data-theme="dark"] .card {
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

/* =========================================
   CONTRASTE (ACESSIBILIDADE)
========================================= */

[data-theme="contrast"] .card {
    border: 1px solid #fff;
    box-shadow: none;
}

.portal-main {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding-top: 16px;
}