/**
 * observatorio.css
 * Estilos do Observatório Cultural - Estilo Admin/Documentação
 */

/* ===================================
   IMPORTAR ESTILOS BASE DO PAINEL
=================================== */
@import url('./panel.css');

/* ===================================
   VARIÁVEIS ESPECÍFICAS
=================================== */
:root {
    --verde-floresta: #2d5a3d;
    --verde-folha: #4a9d5f;
    --verde-claro: #66bb6a;
    --verde-suave: #d0e8da;
    --off-white: #fafaf8;
    --creme: #f5f3ed;
    --header-h: 66px;

    /* Tipografia padronizada com o resto do site (home/mapa/eventos) */
    --font-display: 'Poppins', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;
}

/* ===================================
   TIPOGRAFIA
=================================== */
body {
    font-family: var(--font-body);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
}

/* ===================================
   HEADER (sem hero escuro atrás — usa sempre o fundo opaco
   do estado "scrolled" em vez do gradiente translúcido)
=================================== */
.site-header {
    background: rgba(15, 36, 25, .92);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

/* ===================================
   LAYOUT ADMIN
=================================== */
.admin-layout {
    display: flex;
    min-height: calc(100vh - var(--header-h));
    margin-top: var(--header-h);
    background: var(--off-white);
}

.admin-sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    overflow-y: auto;
}

.admin-main {
    flex: 1;
    margin-left: 280px;
    padding: 32px;
    max-width: calc(100% - 280px);
}

/* ===================================
   SIDEBAR NAV
=================================== */
.sidebar-nav {
    flex: 1;
    padding: 16px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: #666;
    font-size: calc(14px * var(--a11y-text-scale, 1));
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
    margin-bottom: 4px;
}

.nav-item svg {
    flex-shrink: 0;
    color: #999;
}

.nav-item:hover {
    background: var(--creme);
    color: var(--verde-floresta);
}

.nav-item:hover svg {
    color: var(--verde-floresta);
}

.nav-item.active {
    background: var(--verde-suave);
    color: var(--verde-floresta);
    font-weight: 600;
}

.nav-item.active svg {
    color: var(--verde-floresta);
}

/* ===================================
   ABRIR SEÇÕES NO MOBILE
   (sidebar vira gaveta off-canvas abaixo de 1024px —
   este botão e o backdrop só aparecem nesse breakpoint)
=================================== */
.section-menu-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    color: var(--verde-floresta);
    font-size: calc(14px * var(--a11y-text-scale, 1));
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.section-menu-toggle:hover {
    background: var(--creme);
    border-color: var(--verde-floresta);
}

.admin-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: rgba(15, 36, 25, .45);
    z-index: 999;
}

.admin-sidebar-backdrop.active {
    display: block;
}

/* ===================================
   CONTENT HEADER
=================================== */
.content-header {
    margin-bottom: 32px;
}

.content-header h2 {
    font-size: calc(28px * var(--a11y-text-scale, 1));
    font-weight: 700;
    color: var(--verde-floresta);
    margin: 0 0 6px 0;
}

.content-header p {
    font-size: calc(14px * var(--a11y-text-scale, 1));
    color: #666;
    margin: 0;
}

/* ===================================
   SECTION CONTENT
=================================== */
.section-content {
    display: none;
}

.section-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   STATS OVERVIEW
=================================== */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: var(--verde-suave);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    color: var(--verde-floresta);
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.stat-label {
    font-size: calc(13px * var(--a11y-text-scale, 1));
    color: #666;
    font-weight: 500;
}

.stat-value {
    font-family: var(--font-display);
    font-size: calc(28px * var(--a11y-text-scale, 1));
    font-weight: 700;
    color: var(--verde-floresta);
}

.stat-description {
    font-size: calc(12px * var(--a11y-text-scale, 1));
    color: #999;
}

/* ===================================
   INFO CARD
=================================== */
.info-card {
    background: white;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.info-card-header svg {
    color: var(--verde-floresta);
}

.info-card-header h3 {
    font-size: calc(20px * var(--a11y-text-scale, 1));
    font-weight: 700;
    color: var(--verde-floresta);
    margin: 0;
}

.info-card-body p {
    font-size: calc(15px * var(--a11y-text-scale, 1));
    line-height: 1.7;
    color: #666;
    margin-bottom: 16px;
}

.info-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.highlight-item {
    padding: 16px;
    border: 1px solid rgba(45, 90, 61, 0.16);
    border-radius: 6px;
}

.highlight-item strong {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: calc(14px * var(--a11y-text-scale, 1));
    color: var(--verde-floresta);
    font-weight: 600;
    margin-bottom: 4px;
}

.highlight-item strong::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--verde-folha);
    flex-shrink: 0;
}

.highlight-item span {
    font-size: calc(13px * var(--a11y-text-scale, 1));
    color: #666;
}

/* ===================================
   ANALYSIS CARD
=================================== */
.analysis-card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
}

.analysis-header {
    margin-bottom: 28px;
}

.analysis-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--verde-suave);
    border-radius: 8px;
    color: var(--verde-floresta);
    font-size: calc(13px * var(--a11y-text-scale, 1));
    font-weight: 600;
    margin-bottom: 12px;
}

.analysis-header h3 {
    font-size: calc(22px * var(--a11y-text-scale, 1));
    font-weight: 700;
    color: var(--verde-floresta);
    margin: 0 0 6px 0;
}

.analysis-header p {
    font-size: calc(14px * var(--a11y-text-scale, 1));
    color: #666;
    margin: 0;
}

.analysis-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ===================================
   DOC SECTION
   Nota de rodapé explicativa dentro do card branco — em vez de mais uma
   caixinha colorida empilhada, é uma quebra tipográfica (rótulo pequeno
   + régua fina), como uma legenda de mapa impresso.
=================================== */
.doc-section {
    padding: 18px 0 0;
    border-top: 1px dashed rgba(45, 90, 61, 0.3);
}

.doc-section h4 {
    font-family: var(--font-body);
    font-size: calc(11.5px * var(--a11y-text-scale, 1));
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--verde-floresta);
    margin: 0 0 10px 0;
}

.doc-section p {
    font-size: calc(14px * var(--a11y-text-scale, 1));
    line-height: 1.7;
    color: #666;
    margin: 0;
}

.doc-section ul {
    margin: 12px 0 0 20px;
    padding: 0;
}

.doc-section li {
    font-size: calc(14px * var(--a11y-text-scale, 1));
    line-height: 1.7;
    color: #666;
    margin-bottom: 8px;
}

/* ===================================
   MINI KPI GRID
   (indicadores rápidos por seção — Território,
   Equidade e Consumo — sempre calculados a partir
   dos mesmos dados dos gráficos da seção)
=================================== */
.mini-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.mini-kpi-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mini-kpi-label {
    font-size: calc(11px * var(--a11y-text-scale, 1));
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mini-kpi-value {
    font-family: var(--font-display);
    font-size: calc(24px * var(--a11y-text-scale, 1));
    font-weight: 700;
    color: var(--verde-floresta);
    line-height: 1.2;
    overflow-wrap: break-word;
}

.mini-kpi-sub {
    font-size: calc(12px * var(--a11y-text-scale, 1));
    color: #999;
}

/* ===================================
   INSIGHT LIST
   (Visão Geral — panorama em linguagem natural)
=================================== */
.insight-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.insight-chip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(45, 90, 61, 0.16);
    border-radius: 6px;
}

.insight-chip-icon {
    font-size: calc(18px * var(--a11y-text-scale, 1));
    line-height: 1.4;
    flex-shrink: 0;
}

.insight-chip-text {
    font-size: calc(14px * var(--a11y-text-scale, 1));
    line-height: 1.5;
    color: #555;
}

.insight-chip-text strong {
    color: var(--verde-floresta);
}

/* ===================================
   CHARTS
=================================== */
.chart-container {
    background: white;
    border-radius: 10px;
    padding: 24px;
    border: 1px solid #e0e0e0;
}

.chart-container-small {
    background: white;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e0e0e0;
}

.chart-title {
    font-size: calc(15px * var(--a11y-text-scale, 1));
    font-weight: 600;
    color: var(--verde-floresta);
    margin: 0 0 16px 0;
    text-align: center;
}

.chart-wrapper {
    position: relative;
    width: 100%;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    gap: 12px;
}

.empty-state svg {
    color: #ccc;
}

.empty-state p {
    font-size: calc(15px * var(--a11y-text-scale, 1));
    font-weight: 600;
    color: #666;
    margin: 0;
}

.empty-state span {
    font-size: calc(13px * var(--a11y-text-scale, 1));
    color: #999;
}

/* ===================================
   METHODOLOGY
=================================== */
.methodology-card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.methodology-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--verde-suave);
}

.methodology-header svg {
    color: var(--verde-floresta);
}

.methodology-header h3 {
    font-size: calc(24px * var(--a11y-text-scale, 1));
    font-weight: 700;
    color: var(--verde-floresta);
    margin: 0;
}

.methodology-header p {
    font-size: calc(14px * var(--a11y-text-scale, 1));
    color: #666;
    margin: 4px 0 0 0;
}

.methodology-body {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.sources-grid {
    display: grid;
    gap: 20px;
}

.source-card {
    background: var(--off-white);
    border: 1px solid rgba(45, 90, 61, 0.16);
    border-radius: 8px;
    padding: 22px 24px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 16px;
    grid-template-areas:
        "icon content"
        "desc desc";
}

.source-card:hover {
    border-color: var(--verde-folha);
    box-shadow: 0 6px 16px rgba(45, 90, 61, 0.1);
    transform: translateY(-2px);
}

.source-icon {
    grid-area: icon;
    font-size: calc(32px * var(--a11y-text-scale, 1));
    display: flex;
    align-items: center;
    justify-content: center;
}

.source-content {
    grid-area: content;
}

.source-content strong {
    display: block;
    font-size: calc(16px * var(--a11y-text-scale, 1));
    color: var(--verde-floresta);
    font-weight: 700;
    margin-bottom: 4px;
}

.source-content p {
    font-size: calc(13px * var(--a11y-text-scale, 1));
    color: #666;
    margin: 0 0 8px 0;
}

.source-tag {
    display: inline-block;
    padding: 4px 10px;
    background: white;
    border-radius: 6px;
    font-size: calc(11px * var(--a11y-text-scale, 1));
    font-weight: 600;
    color: var(--verde-floresta);
}

.source-description {
    grid-area: desc;
    font-size: calc(14px * var(--a11y-text-scale, 1));
    line-height: 1.6;
    color: #666;
}

.source-description .source-stat {
    display: block;
    margin-top: 10px;
    color: var(--verde-floresta);
    font-weight: 600;
}

.source-link {
    display: block;
    margin-top: 10px;
    font-size: calc(13px * var(--a11y-text-scale, 1));
    font-weight: 600;
    color: var(--verde-folha);
    text-decoration: none;
}

.source-link:hover {
    color: var(--verde-floresta);
    text-decoration: underline;
}

.source-link:focus-visible {
    outline: 2px solid var(--verde-floresta);
    outline-offset: 2px;
    border-radius: 2px;
}

.alert-box {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 22px;
    background: var(--off-white);
    border: 1px solid rgba(45, 90, 61, 0.16);
    border-radius: 8px;
}

.alert-box svg {
    color: var(--verde-folha);
    flex-shrink: 0;
}

.alert-box strong {
    display: block;
    font-size: calc(14px * var(--a11y-text-scale, 1));
    color: var(--verde-floresta);
    font-weight: 700;
    margin-bottom: 6px;
}

.alert-box p {
    font-size: calc(13px * var(--a11y-text-scale, 1));
    line-height: 1.6;
    color: #666;
    margin: 0;
}

/* ===================================
   ODS
=================================== */
.ods-intro-card {
    background: linear-gradient(135deg, var(--verde-floresta), var(--verde-folha));
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    color: white;
}

.ods-intro-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ods-intro-header svg {
    flex-shrink: 0;
}

.ods-intro-header h3 {
    font-size: calc(24px * var(--a11y-text-scale, 1));
    font-weight: 700;
    margin: 0 0 6px 0;
}

.ods-intro-header p {
    font-size: calc(14px * var(--a11y-text-scale, 1));
    opacity: 0.95;
    margin: 0;
}

.ods-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.ods-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 8px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 100px;
    font-size: calc(12px * var(--a11y-text-scale, 1));
    font-weight: 600;
    color: white;
}

.ods-badge b {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    font-size: calc(11px * var(--a11y-text-scale, 1));
    font-weight: 800;
}

.ods-badge--4 b  { color: #C5192D; }
.ods-badge--10 b { color: #DD1367; }
.ods-badge--11 b { color: #FD9D24; }

.ods-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 32px;
}

.ods-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-top: 4px solid var(--ods-accent, var(--verde-folha));
}

/* Cores oficiais da ONU para cada ODS — usadas como destaque pontual,
   sem abrir mão da identidade verde do restante do site */
.ods-card--4  { --ods-accent: #C5192D; }
.ods-card--10 { --ods-accent: #DD1367; }
.ods-card--11 { --ods-accent: #FD9D24; }

.ods-card--4  .ods-number-large,
.ods-card--10 .ods-number-large,
.ods-card--11 .ods-number-large {
    background: var(--ods-accent);
}

.ods-card-header {
    background: var(--verde-suave);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.ods-number-large {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--verde-floresta), var(--verde-folha));
    border-radius: 12px;
    font-family: var(--font-display);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: calc(28px * var(--a11y-text-scale, 1));
    font-weight: 700;
    flex-shrink: 0;
}

.ods-info h4 {
    font-size: calc(20px * var(--a11y-text-scale, 1));
    font-weight: 700;
    color: var(--verde-floresta);
    margin: 0 0 4px 0;
}

.ods-subtitle {
    font-size: calc(13px * var(--a11y-text-scale, 1));
    color: #666;
    font-style: italic;
    margin: 0;
}

.ods-card-body {
    padding: 28px;
}

.ods-card-body h5 {
    font-size: calc(15px * var(--a11y-text-scale, 1));
    font-weight: 600;
    color: var(--verde-floresta);
    margin: 0 0 12px 0;
}

.ods-card-body ul {
    margin: 0 0 20px 20px;
    padding: 0;
}

.ods-card-body li {
    font-size: calc(14px * var(--a11y-text-scale, 1));
    line-height: 1.7;
    color: #666;
    margin-bottom: 8px;
}

.ods-meta {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed rgba(45, 90, 61, 0.3);
    font-size: calc(13px * var(--a11y-text-scale, 1));
    line-height: 1.6;
    color: #666;
}

.ods-meta strong {
    font-size: calc(13px * var(--a11y-text-scale, 1));
    color: var(--verde-floresta);
    font-weight: 600;
}

/* ===================================
   ODS — DADOS DE REFERÊNCIA EXTERNOS
   (IBGE, DataViva etc. — contexto nacional,
   não dados de Bueno Brandão)
=================================== */
.ods-databox {
    margin-top: 16px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: 2px solid var(--ods-accent, var(--verde-folha));
    border-radius: 6px;
}

.ods-databox-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ods-accent, var(--verde-folha));
    margin-bottom: 8px;
}

.ods-databox-header svg {
    flex-shrink: 0;
}

.ods-databox-header span {
    font-size: calc(11px * var(--a11y-text-scale, 1));
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ods-databox-stat {
    font-size: calc(16px * var(--a11y-text-scale, 1));
    font-weight: 700;
    color: var(--verde-floresta);
    line-height: 1.4;
    margin: 0 0 6px 0;
}

.ods-databox-text {
    font-size: calc(13px * var(--a11y-text-scale, 1));
    line-height: 1.6;
    color: #666;
    margin: 0 0 10px 0;
}

.ods-databox-source {
    display: inline-block;
    font-size: calc(12px * var(--a11y-text-scale, 1));
    font-weight: 600;
    color: var(--ods-accent, var(--verde-folha));
    text-decoration: none;
}

.ods-databox-source:hover {
    text-decoration: underline;
}

.ods-databox-source:focus-visible {
    outline: 2px solid var(--verde-floresta);
    outline-offset: 2px;
    border-radius: 2px;
}

.impact-summary {
    background: white;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.impact-summary h4 {
    font-size: calc(18px * var(--a11y-text-scale, 1));
    font-weight: 700;
    color: var(--verde-floresta);
    margin: 0 0 12px 0;
}

.impact-summary > p {
    font-size: calc(14px * var(--a11y-text-scale, 1));
    line-height: 1.7;
    color: #666;
    margin-bottom: 20px;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.impact-item {
    padding: 18px;
    border: 1px solid rgba(45, 90, 61, 0.16);
    border-radius: 6px;
}

.impact-item strong {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: calc(14px * var(--a11y-text-scale, 1));
    color: var(--verde-floresta);
    font-weight: 600;
    margin-bottom: 6px;
}

.impact-item strong::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--verde-folha);
    flex-shrink: 0;
}

.impact-item span {
    font-size: calc(13px * var(--a11y-text-scale, 1));
    color: #666;
}

/* ===================================
   TOAST
=================================== */
/* .loading-overlay / .loading-spinner / @keyframes spin vêm do panel.css
   importado no topo deste arquivo — mesmo visual (fundo verde-escuro,
   spinner branco) usado no resto do site. Não redeclarar aqui. */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid var(--verde-folha);
}

.toast.error {
    border-left: 4px solid #f44336;
}

.toast.info {
    border-left: 4px solid #2196f3;
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.toast.success .toast-icon {
    background: var(--verde-suave);
    color: var(--verde-floresta);
}

.toast-message {
    font-size: calc(14px * var(--a11y-text-scale, 1));
    font-weight: 500;
    color: #333;
}

/* ===================================
   RESPONSIVE
=================================== */
@media (max-height: 800px) {
    .admin-main {
        padding: 24px;
    }
    
    .content-header {
        margin-bottom: 24px;
    }
    
    .stats-overview {
        margin-bottom: 24px;
    }
}

@media (max-width: 1024px) {
    .admin-sidebar {
        position: fixed;
        left: -280px;
        transition: left 0.3s ease;
        z-index: 1000;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .admin-sidebar.active {
        left: 0;
    }

    .admin-main {
        margin-left: 0;
        padding: 24px;
        max-width: 100%;
    }

    .section-menu-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .admin-main {
        padding: 20px;
    }
    
    .content-header h2 {
        font-size: calc(24px * var(--a11y-text-scale, 1));
    }
    
    .stats-overview {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: calc(24px * var(--a11y-text-scale, 1));
    }
    
    .info-card,
    .analysis-card,
    .methodology-card {
        padding: 24px;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-wrapper {
        min-height: 300px;
    }
    
    .info-highlights {
        grid-template-columns: 1fr;
    }
    
    .mini-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .insight-list {
        grid-template-columns: 1fr;
    }

    .impact-grid {
        grid-template-columns: 1fr;
    }
    
    .ods-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .ods-number-large {
        width: 56px;
        height: 56px;
        font-size: calc(24px * var(--a11y-text-scale, 1));
    }
}

@media (max-width: 480px) {
    .nav-item {
        padding: 10px 14px;
        font-size: calc(13px * var(--a11y-text-scale, 1));
    }
    
    .admin-main {
        padding: 16px;
    }
    
    .content-header h2 {
        font-size: calc(20px * var(--a11y-text-scale, 1));
    }
    
    .content-header p {
        font-size: calc(13px * var(--a11y-text-scale, 1));
    }
    
    .stat-card {
        padding: 16px;
        gap: 12px;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
    }
    
    .stat-label {
        font-size: calc(12px * var(--a11y-text-scale, 1));
    }
    
    .stat-value {
        font-size: calc(20px * var(--a11y-text-scale, 1));
    }
    
    .stat-description {
        font-size: calc(11px * var(--a11y-text-scale, 1));
    }
    
    .info-card,
    .analysis-card,
    .methodology-card {
        padding: 20px;
    }
    
    .info-card-header h3,
    .analysis-header h3 {
        font-size: calc(18px * var(--a11y-text-scale, 1));
    }
    
    .doc-section {
        padding: 16px;
    }
    
    .doc-section h4 {
        font-size: calc(15px * var(--a11y-text-scale, 1));
    }
    
    .doc-section p,
    .doc-section li {
        font-size: calc(13px * var(--a11y-text-scale, 1));
    }

    .mini-kpi-grid {
        grid-template-columns: 1fr;
    }

    .mini-kpi-value {
        font-size: calc(20px * var(--a11y-text-scale, 1));
    }

    .chart-wrapper {
        min-height: 250px;
    }
    
    .source-card {
        padding: 16px;
        grid-template-columns: 40px 1fr;
        gap: 12px;
    }
    
    .source-icon {
        font-size: calc(24px * var(--a11y-text-scale, 1));
    }
    
    .ods-intro-card {
        padding: 24px;
    }
    
    .ods-intro-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .ods-intro-header h3 {
        font-size: calc(20px * var(--a11y-text-scale, 1));
    }
    
    .ods-card-header {
        padding: 20px;
    }
    
    .ods-card-body {
        padding: 20px;
    }
    
    .ods-number-large {
        width: 48px;
        height: 48px;
        font-size: calc(20px * var(--a11y-text-scale, 1));
    }
    
    .ods-info h4 {
        font-size: calc(18px * var(--a11y-text-scale, 1));
    }
}


/* ================================================================
   ACESSIBILIDADE — ajustes específicos do observatório
   ================================================================ */
.a11y-focus .stat-card,
.a11y-focus .info-card { box-shadow: none; }

.a11y-high-contrast { background: #fff; }
/* Cartões escuros/coloridos com texto claro viram invisíveis se só o
   fundo ou só o texto for forçado. Zera os dois em cascata para todo
   mundo dentro dos contêineres principais — não uma lista fixa de
   seletores, que sempre fica incompleta. */
.a11y-high-contrast .stat-card,
.a11y-high-contrast .info-card,
.a11y-high-contrast .analysis-card,
.a11y-high-contrast .methodology-card,
.a11y-high-contrast .source-card,
.a11y-high-contrast .ods-card,
.a11y-high-contrast .ods-intro-card {
    background: #fff !important;
    background-image: none !important;
    color: #111827 !important;
    border-color: #000 !important;
}
.a11y-high-contrast .stat-card *,
.a11y-high-contrast .info-card *,
.a11y-high-contrast .analysis-card *,
.a11y-high-contrast .methodology-card *,
.a11y-high-contrast .source-card *,
.a11y-high-contrast .ods-card *,
.a11y-high-contrast .ods-intro-card * {
    color: inherit !important;
    background: transparent !important;
    background-image: none !important;
    text-shadow: none !important;
}
