/* ============================================================
   PROCON-DF - padrao visual.

   Mesma estrutura da plataforma SESP/Camacari: sidebar fixa, topbar,
   cards e tabelas, com os mesmos nomes de classe (.dashboard,
   .main-content, .card, .badge) para que quem conhece um sistema
   reconheca o outro.

   Paleta: azul institucional do GDF, com verde para o que esta em
   conformidade e vermelho para o que esta vencido ou irregular. Os
   estados do rito tem cor propria, definidas em .badge--*, porque a tela
   de um processo mostra oito situacoes diferentes lado a lado e a cor e
   o que permite ler a lista sem parar em cada linha.
   ============================================================ */

:root {
    --primary-color:  #0d3b66;
    --primary-dark:   #092a49;
    --primary-light:  #1c5a96;
    --accent:         #1c7c54;
    --secondary-color:#5c6166;

    --success-color:  #1c7c54;
    --danger-color:   #b3261e;
    --warning-color:  #8a6d0b;
    --info-color:     #0b5d8a;

    --bg-color:       #f4f6f8;
    --card-bg:        #ffffff;
    --text-color:     #1a1c1e;
    --text-muted:     #5c6166;
    --text-secondary: #5c6166;
    --border-color:   #d6dade;
    --azul-claro:     #e8f1f8;
    --verde-claro:    #e7f4ee;
    --vermelho-claro: #fdecea;
    --amarelo-claro:  #fdf6e3;

    --shadow:    0 1px 3px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.14);
    --raio: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 14px;
}

a { color: var(--primary-light); }

/* ---------- Marcacao de ambiente ----------
   Faixa fixa no topo fora de producao. Existe para que ninguem confunda
   a base de demonstracao com a do orgao numa apresentacao. */
body.env-demo { padding-top: 26px; }
body.env-demo::before {
    content: attr(data-ambiente);
    position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
    height: 26px; line-height: 26px; text-align: center;
    font-size: 12px; font-weight: 700; letter-spacing: .5px; color: #1a1c1e;
    background: repeating-linear-gradient(45deg, #f2c744, #f2c744 12px, #e0b73c 12px, #e0b73c 24px);
}
body.env-demo .sidebar { top: 26px; }

/* ---------- Layout ---------- */
.dashboard { display: flex; min-height: 100vh; }

.sidebar {
    width: 250px;
    background: var(--primary-color);
    color: #fff;
    position: fixed; top: 0; height: 100vh;
    overflow-y: auto;
    padding-bottom: 20px;
    z-index: 100;
}

.sidebar-header {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,.15);
}
.sidebar-header strong { display: block; font-size: 15px; letter-spacing: .3px; }
.sidebar-header span { font-size: 11.5px; opacity: .8; }

.sidebar-menu { list-style: none; padding: 14px 0; }
.sidebar-menu li { margin-bottom: 2px; }

.sidebar-menu a,
.sidebar-menu .grupo {
    display: flex; align-items: center; gap: 11px;
    margin: 0 9px; padding: 9px 12px;
    border-radius: var(--raio);
    color: #fff; opacity: .86; text-decoration: none;
    font-size: 13.5px; cursor: pointer;
    transition: background .15s, opacity .15s;
}
.sidebar-menu a:hover,
.sidebar-menu .grupo:hover { background: rgba(255,255,255,.12); opacity: 1; }
.sidebar-menu a.active { background: rgba(255,255,255,.2); opacity: 1; font-weight: 600; }

.sidebar-menu .ico { width: 18px; text-align: center; flex: 0 0 auto; }
.sidebar-menu .seta { margin-left: auto; font-size: 10px; opacity: .6; transition: transform .15s; }
.sidebar-menu .grupo.aberto .seta { transform: rotate(90deg); }

.submenu { list-style: none; max-height: 0; overflow: hidden; transition: max-height .2s ease; }
.grupo.aberto + .submenu { max-height: 500px; }
.submenu a { font-size: 13px; padding-left: 41px; opacity: .78; }

.sidebar-rodape {
    padding: 12px 18px; font-size: 11px; opacity: .6;
    border-top: 1px solid rgba(255,255,255,.12); margin-top: 10px;
}

.main-content { flex: 1; margin-left: 250px; min-width: 0; }

.topbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0 26px; height: 56px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 50;
}
.topbar .busca-global { flex: 1; max-width: 420px; }
.topbar .busca-global input {
    width: 100%; padding: 7px 12px; font-size: 13px;
    border: 1px solid var(--border-color); border-radius: var(--raio);
}

.user-menu { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.user-menu .nome { font-size: 13px; font-weight: 600; }
.user-menu .papel { font-size: 11.5px; color: var(--text-muted); }
.user-menu .avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--primary-color); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 13px;
}

.content { padding: 22px 26px 60px; }

.pagina-titulo {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.pagina-titulo h1 { font-size: 21px; font-weight: 700; color: var(--primary-dark); }
.pagina-titulo p { font-size: 13px; color: var(--text-muted); margin-top: 2px; max-width: 760px; }
.pagina-titulo .acoes { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Cards ---------- */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--raio);
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}
.card-header {
    padding: 13px 18px; border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.card-title { font-size: 14.5px; font-weight: 700; color: var(--primary-dark); }
.card-header .sub { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.card-body { padding: 18px; }
.card-body.sem-padding { padding: 0; }

/* ---------- Indicadores ---------- */
.grid-stats {
    display: grid; gap: 14px; margin-bottom: 18px;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.stat {
    background: var(--card-bg); border: 1px solid var(--border-color);
    border-radius: var(--raio); padding: 15px 17px; box-shadow: var(--shadow);
    border-left: 3px solid var(--primary-color);
}
.stat .rotulo { font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); font-weight: 600; }
.stat .valor { font-size: 25px; font-weight: 700; color: var(--primary-dark); line-height: 1.25; }
.stat .detalhe { font-size: 11.5px; color: var(--text-muted); }
.stat--ok      { border-left-color: var(--success-color); }
.stat--ok .valor { color: var(--success-color); }
.stat--alerta  { border-left-color: var(--warning-color); }
.stat--alerta .valor { color: var(--warning-color); }
.stat--perigo  { border-left-color: var(--danger-color); }
.stat--perigo .valor { color: var(--danger-color); }

.grid-2 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid-3 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ---------- Tabelas ---------- */
.tabela-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
    background: #eef2f6; text-align: left; padding: 9px 14px;
    font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px;
    color: var(--text-muted); font-weight: 700; white-space: nowrap;
    border-bottom: 1px solid var(--border-color);
}
tbody td { padding: 9px 14px; border-bottom: 1px solid #edf0f3; vertical-align: middle; }
tbody tr:hover { background: #f8fafc; }
tbody tr.clicavel { cursor: pointer; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 12.5px; }

.vazio { padding: 34px 18px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ---------- Badges ---------- */
.badge {
    display: inline-block; padding: 2px 9px; border-radius: 11px;
    font-size: 11px; font-weight: 700; letter-spacing: .2px;
    white-space: nowrap; background: #e9edf1; color: #43484d;
}
.badge--ok       { background: var(--verde-claro);    color: var(--success-color); }
.badge--info     { background: var(--azul-claro);     color: var(--info-color); }
.badge--alerta   { background: var(--amarelo-claro);  color: var(--warning-color); }
.badge--perigo   { background: var(--vermelho-claro); color: var(--danger-color); }
.badge--neutro   { background: #e9edf1;               color: #43484d; }
.badge--destaque { background: var(--primary-color);  color: #fff; }

/* ---------- Botoes ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 15px; border: 1px solid transparent; border-radius: var(--raio);
    font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
    background: var(--primary-color); color: #fff;
    transition: background .15s, opacity .15s;
}
.btn:hover { background: var(--primary-dark); }
/* O ícone é decidido em js/icones.js a partir do texto do botão. Fica
   antes do rótulo e nunca no lugar dele, para não sumir no leitor de
   tela. `flex: none` impede que encolha quando o rótulo é longo. */
.btn .ico-svg { flex: none; margin-right: -1px; }
.ico-svg { vertical-align: -2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--secundario { background: #fff; color: var(--primary-color); border-color: var(--border-color); }
.btn--secundario:hover { background: #eef2f6; }
.btn--sucesso  { background: var(--success-color); } .btn--sucesso:hover  { background: #14603f; }
.btn--perigo   { background: var(--danger-color); }  .btn--perigo:hover   { background: #8f1e18; }
.btn--pequeno  { padding: 5px 11px; font-size: 12px; }
.btn--bloco    { width: 100%; justify-content: center; }

/* ---------- Formularios ---------- */
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.campo { display: flex; flex-direction: column; gap: 5px; }
.campo.largo { grid-column: 1 / -1; }
.campo label { font-size: 12.5px; font-weight: 600; color: var(--text-color); }
.campo .ajuda { font-size: 11.5px; color: var(--text-muted); }
.campo input, .campo select, .campo textarea {
    padding: 8px 11px; font-size: 13px; font-family: inherit;
    border: 1px solid var(--border-color); border-radius: var(--raio);
    background: #fff; color: var(--text-color);
}
.campo input:focus, .campo select:focus, .campo textarea:focus {
    outline: 2px solid var(--primary-light); outline-offset: -1px; border-color: var(--primary-light);
}
.campo textarea { min-height: 90px; resize: vertical; }
.campo--check { flex-direction: row; align-items: center; gap: 8px; }
.campo--check input { width: auto; }

.filtros {
    display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end;
    padding: 14px 18px; background: var(--card-bg);
    border: 1px solid var(--border-color); border-radius: var(--raio); margin-bottom: 16px;
}
.filtros .campo { min-width: 150px; }

/* ---------- Alertas ---------- */
.alert {
    padding: 11px 15px; border-radius: var(--raio); margin-bottom: 14px;
    font-size: 13px; border: 1px solid transparent;
}
.alert-success { background: var(--verde-claro);    color: #14603f; border-color: #bfe3d0; }
.alert-error   { background: var(--vermelho-claro); color: #8f1e18; border-color: #f2c4c0; }
.alert-info    { background: var(--azul-claro);     color: #0b4a6e; border-color: #c2dcef; }
.alert-warning { background: var(--amarelo-claro);  color: #6e5608; border-color: #eddcae; }

/* ---------- Linha do tempo ---------- */
.timeline { list-style: none; position: relative; padding-left: 22px; }
.timeline::before {
    content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px;
    width: 2px; background: var(--border-color);
}
.timeline li { position: relative; padding: 0 0 16px 4px; }
.timeline li::before {
    content: ''; position: absolute; left: -20px; top: 6px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--primary-color); border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--border-color);
}
.timeline li.automatica::before { background: var(--text-muted); }
.timeline li.decisao::before    { background: var(--accent); }
.timeline .quando { font-size: 11.5px; color: var(--text-muted); }
.timeline .titulo { font-size: 13px; font-weight: 600; }
.timeline .texto  { font-size: 13px; color: #3c4145; }

/* ---------- Etapas do rito ---------- */
.etapas { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.etapa {
    flex: 1 1 130px; min-width: 120px; padding: 9px 11px;
    background: #fff; border: 1px solid var(--border-color);
    border-radius: var(--raio); border-left: 3px solid var(--border-color);
}
.etapa .n { font-size: 10.5px; font-weight: 700; color: var(--text-muted); letter-spacing: .5px; }
.etapa .nome { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.etapa .quando { font-size: 11px; color: var(--text-muted); }
.etapa--concluida { border-left-color: var(--success-color); background: var(--verde-claro); }
.etapa--atual     { border-left-color: var(--primary-color); background: var(--azul-claro); box-shadow: var(--shadow); }
.etapa--pendente  { opacity: .62; }
.etapa--negativa  { border-left-color: var(--danger-color); background: var(--vermelho-claro); }

/* ---------- Detalhe (lista de campos) ---------- */
.campos { display: grid; gap: 11px 22px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.campos > div { min-width: 0; }
.campos dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); font-weight: 700; }
.campos dd { font-size: 13.5px; word-break: break-word; }

/* ---------- Abas ---------- */
.abas { display: flex; gap: 2px; border-bottom: 1px solid var(--border-color); margin-bottom: 16px; flex-wrap: wrap; }
.aba {
    padding: 9px 15px; font-size: 13px; font-weight: 600; cursor: pointer;
    border: 1px solid transparent; border-bottom: none; color: var(--text-muted);
    border-radius: var(--raio) var(--raio) 0 0; background: none;
}
.aba.ativa {
    background: var(--card-bg); color: var(--primary-dark);
    border-color: var(--border-color); margin-bottom: -1px;
}
.painel-aba { display: none; }
.painel-aba.ativo { display: block; }

/* ---------- Modal ---------- */
.modal-fundo {
    position: fixed; inset: 0; background: rgba(15,23,32,.55);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 46px 16px; z-index: 900; overflow-y: auto;
}
.modal {
    background: #fff; border-radius: 8px; box-shadow: var(--shadow-lg);
    width: 100%; max-width: 680px;
}
.modal--largo { max-width: 940px; }
.modal-header {
    padding: 15px 20px; border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 15.5px; color: var(--primary-dark); }
.modal-header button { background: none; border: none; font-size: 21px; cursor: pointer; color: var(--text-muted); line-height: 1; }
.modal-body { padding: 20px; }
.modal-footer {
    padding: 13px 20px; border-top: 1px solid var(--border-color);
    display: flex; justify-content: flex-end; gap: 9px;
}

/* ---------- Documento ---------- */
.documento {
    background: #fff; border: 1px solid var(--border-color); border-radius: var(--raio);
    padding: 34px 40px; font-family: Georgia, 'Times New Roman', serif;
    font-size: 14px; line-height: 1.75; max-width: 860px; margin: 0 auto;
}
.documento h2 { font-size: 16px; text-align: center; margin-bottom: 18px; text-transform: uppercase; }
.documento h3 { font-size: 14px; margin: 18px 0 7px; }
.documento p { margin-bottom: 11px; text-align: justify; }
.documento blockquote {
    margin: 11px 0 11px 24px; padding-left: 13px;
    border-left: 3px solid var(--border-color); color: #3c4145; font-style: italic;
}
.documento ul { margin: 0 0 11px 26px; }

/* ---------- Grafico simples ---------- */
.barras { display: flex; flex-direction: column; gap: 8px; }
.barra-linha { display: grid; grid-template-columns: 175px 1fr 78px; gap: 11px; align-items: center; font-size: 12.5px; }
.barra-linha .rotulo { color: var(--text-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra-trilho { display: block; background: #e9edf1; border-radius: 4px; height: 17px; overflow: hidden; }
.barra-valor { display: block; background: var(--primary-color); height: 100%; border-radius: 4px; transition: width .3s; min-width: 2px; }
.barra-linha .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

.serie { display: flex; align-items: stretch; gap: 4px; height: 150px; }
.serie .col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.serie .col .haste { display: block; width: 100%; background: var(--primary-light); border-radius: 3px 3px 0 0; min-height: 3px; }
.serie .col .rot { display: block; font-size: 9.5px; color: var(--text-muted); white-space: nowrap; transform: rotate(-45deg); transform-origin: top left; height: 26px; }

/* ---------- Paginacao ---------- */
.paginacao { display: flex; gap: 7px; align-items: center; justify-content: flex-end; padding: 12px 18px; font-size: 13px; }
.paginacao button { padding: 4px 11px; border: 1px solid var(--border-color); background: #fff; border-radius: 4px; cursor: pointer; }
.paginacao button:disabled { opacity: .45; cursor: default; }

/* ---------- Auxiliares ---------- */
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 9px } .mt-2 { margin-top: 18px }
.mb-0 { margin-bottom: 0 } .mb-1 { margin-bottom: 9px } .mb-2 { margin-bottom: 18px }
.texto-muted { color: var(--text-muted); }
.texto-pequeno { font-size: 12px; }
.texto-perigo { color: var(--danger-color); }
.texto-ok { color: var(--success-color); }
.negrito { font-weight: 700; }
.flex { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.flex-entre { display: flex; gap: 9px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.carregando { padding: 28px; text-align: center; color: var(--text-muted); font-size: 13px; }

.nota-legal {
    font-size: 11.5px; color: var(--text-muted); background: #f8fafc;
    border-left: 3px solid var(--border-color); padding: 7px 11px;
    border-radius: 0 var(--raio) var(--raio) 0; margin-top: 9px;
}

.chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: 12px; font-size: 11.5px;
    background: var(--azul-claro); color: var(--info-color); font-weight: 600;
}

/* ---------- Logotipo ----------
   Marca aprovada do PROCON-DF em vetor (frontend/img/procon-df.svg),
   extraida do arquivo oficial publicado pelo orgao. Em vetor porque a
   tela de entrada e a primeira coisa que se ve numa apresentacao, e um
   PNG redimensionado estraga justamente ali.

   A marca tem azul e laranja sobre fundo claro. Nos fundos escuros do
   sistema ela entra em caixa branca, como manda o uso corrente de
   logotipo colorido sobre cor chapada. */
.logo-procon { display: block; width: 100%; max-width: 240px; height: auto; }
.logo-procon--caixa {
    background: #fff; border-radius: 4px; padding: 6px 10px;
}

/* ---------- Login ---------- */
.login-tela {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(140deg, var(--primary-dark), var(--primary-light));
    padding: 20px;
}
.login-caixa {
    background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg);
    width: 100%; max-width: 400px; padding: 32px 30px;
}
.login-caixa .marca-topo {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding-bottom: 18px; margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}
.login-caixa .marca-topo .sistema {
    font-size: 11.5px; color: var(--text-muted); text-align: center;
    text-transform: uppercase; letter-spacing: .6px; font-weight: 600;
}
.login-caixa h1 { font-size: 19px; color: var(--primary-dark); margin-bottom: 3px; }
.login-caixa p.sub { font-size: 12.5px; color: var(--text-muted); margin-bottom: 22px; }
.login-caixa .campo { margin-bottom: 14px; }
/* ---------- Botao "Entrar com gov.br" ----------
   Segue o manual da marca gov.br e o componente br-sign-in do Padrao
   Digital de Governo: fundo azul institucional #1351B4, rotulo "Entrar
   com" em branco e a marca gov.br nas cores oficiais.

   O box branco em volta da marca nao e enfeite: o manual determina que,
   quando a cor de fundo coincide com a cor de algum elemento da marca,
   ainda que em tom mais fraco ou mais forte, a marca receba um box
   branco. O botao e azul e o "g" e o "b" da marca sao azuis, entao o box
   e obrigatorio. */
.btn--govbr {
    background: #1351b4; border-color: #1351b4;
    gap: 9px; padding: 9px 14px; font-weight: 600;
}
.btn--govbr:hover        { background: #0c418f; border-color: #0c418f; }
.btn--govbr:focus-visible { outline: 3px solid #c5d4eb; outline-offset: 2px; }
.btn--govbr .govbr-rotulo { color: #fff; font-size: 13.5px; letter-spacing: .1px; }

.govbr-marca {
    display: inline-flex; align-items: baseline;
    background: #fff; border-radius: 3px; padding: 2px 7px 3px;
    font-size: 15px; line-height: 1; letter-spacing: -.2px;
}
.govbr-marca b { font-weight: 800; font-family: inherit; }
h1 .govbr-marca { font-size: .95em; padding: 1px 6px 2px; }
.govbr-g { color: #377ec1; }
.govbr-o { color: #fbba00; }
.govbr-v { color: #52ae32; }
.govbr-p { color: #52ae32; }
.govbr-b { color: #377ec1; }
.govbr-r { color: #fbba00; }

.separador-ou {
    display: flex; align-items: center; gap: 10px;
    margin: 16px 0 4px; font-size: 12px; color: var(--text-muted);
}
.separador-ou::before, .separador-ou::after {
    content: ''; flex: 1; height: 1px; background: var(--border-color);
}

.login-demo {
    margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-color);
    font-size: 12px; color: var(--text-muted);
}
.login-demo strong { color: var(--text-color); }
.login-demo .perfis { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.login-demo .perfis button {
    font-size: 11px; padding: 3px 8px; border: 1px solid var(--border-color);
    background: #fff; border-radius: 10px; cursor: pointer;
}
.login-demo .perfis button:hover { background: var(--azul-claro); }

/* ---------- Portal publico ---------- */
body.portal { background: #f4f6f8; }
.portal-topo {
    background: var(--primary-color); color: #fff;
    padding: 0 22px; height: 58px; display: flex; align-items: center; gap: 16px;
}
.portal-topo .marca { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 12px; }
.portal-topo .marca .logo-procon { max-width: 128px; }
.portal-topo .marca span { font-weight: 400; opacity: .85; font-size: 13px; }
.portal-topo nav { margin-left: auto; display: flex; gap: 5px; align-items: center; }
.portal-topo nav a {
    color: #fff; text-decoration: none; font-size: 13px;
    padding: 6px 11px; border-radius: var(--raio); opacity: .9;
}
.portal-topo nav a:hover, .portal-topo nav a.active { background: rgba(255,255,255,.16); opacity: 1; }
.portal-conteudo { max-width: 1060px; margin: 0 auto; padding: 24px 18px 60px; }
.portal-hero {
    background: linear-gradient(140deg, var(--primary-dark), var(--primary-light));
    color: #fff; border-radius: 8px; padding: 26px 28px; margin-bottom: 20px;
}
.portal-hero h1 { font-size: 21px; margin-bottom: 6px; }
.portal-hero p { font-size: 13.5px; opacity: .92; max-width: 640px; }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
    .sidebar { width: 100%; height: auto; position: relative; }
    .main-content { margin-left: 0; }
    .dashboard { flex-direction: column; }
    .content { padding: 16px 14px 46px; }
    .topbar { padding: 0 14px; }
    .documento { padding: 22px 18px; }
    .barra-linha { grid-template-columns: 110px 1fr 60px; }
}

@media print {
    .sidebar, .topbar, .pagina-titulo .acoes, .abas, .btn, .filtros { display: none !important; }
    .main-content { margin-left: 0; }
    .card { border: none; box-shadow: none; }
    body { background: #fff; }
}

/* ---------- Mapa do DF ----------
   A altura e fixa porque o Leaflet mede o container na criacao: com
   altura automatica o mapa nasceria com zero pixel. Em tela estreita
   encolhe, mas nunca some. */
.mapa-caixa { position: relative; }
#mapa-df {
    height: 520px; width: 100%;
    border: 1px solid var(--border-color); border-radius: var(--raio);
    background: #eef3f8;
}
#mapa-df .leaflet-container { font: inherit; }

.mapa-legenda {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-top: 10px; font-size: 12px; color: var(--text-muted);
}
.mapa-legenda-rotulo { font-weight: 600; color: var(--text-color); }
.mapa-legenda-escala { display: inline-flex; align-items: center; gap: 4px; }
.mapa-legenda-escala i {
    width: 26px; height: 11px; display: inline-block;
    border: 1px solid rgba(0,0,0,.08);
}
.mapa-legenda-escala i:first-of-type { border-radius: 2px 0 0 2px; }
.mapa-legenda-escala i:last-of-type  { border-radius: 0 2px 2px 0; }

.mapa-tooltip {
    font-size: 12.5px; line-height: 1.45;
    border: 1px solid var(--border-color); box-shadow: var(--shadow);
}
.mapa-tooltip-sub { color: var(--text-muted); font-size: 11.5px; }

@media (max-width: 900px) {
    #mapa-df { height: 380px; }
}

/* ---------- Providencias do AR ---------- */
.acoes-ar {
    display: flex; gap: 8px; flex-wrap: wrap;
    padding: 12px 14px; margin-bottom: 14px;
    background: var(--azul-claro); border: 1px solid #c2dcef; border-radius: var(--raio);
}
