/* =========================================================
   Radar PNCP — folha de estilos
   ========================================================= */

:root {
    --ink: #1c2530;
    --ink-2: #3a4552;
    --muted: #7b766c;
    --paper: #f4f1ea;
    --card: #fffefb;
    --line: #e3ded2;
    --line-2: #eeeadf;

    --brand: #23564a;
    --brand-d: #183d34;
    --brand-soft: #e3eee9;
    --amber: #b9791c;
    --amber-soft: #f8ecd6;
    --danger: #a3392c;
    --danger-soft: #f6e1dd;
    --info: #2f5d8a;
    --info-soft: #e0eaf3;

    --side-w: 252px;
    --radius: 8px;
    --font-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;

    --bs-body-font-family: var(--font-sans);
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--paper);
    --bs-border-color: var(--line);
    --bs-link-color: var(--brand);
    --bs-link-hover-color: var(--brand-d);
    --bs-primary: var(--brand);
    --bs-primary-rgb: 35, 86, 74;
}

html { -webkit-text-size-adjust: 100%; }
body { font-size: .94rem; line-height: 1.5; background: var(--paper); color: var(--ink); }
h1, h2, h3, h4 { color: var(--ink); }
a { text-decoration-thickness: 1px; text-underline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.strong { font-weight: 600; }
.text-muted { color: var(--muted) !important; }
code { color: var(--brand-d); background: var(--brand-soft); padding: .08rem .35rem; border-radius: 4px; font-size: .85em; }

/* ---------- Botões ---------- */
.btn { --bs-btn-border-radius: 6px; --bs-btn-font-weight: 500; --bs-btn-padding-y: .5rem; --bs-btn-padding-x: .95rem; --bs-btn-font-size: .9rem; }
.btn-sm { --bs-btn-padding-y: .32rem; --bs-btn-padding-x: .65rem; --bs-btn-font-size: .82rem; }
.btn-primary {
    --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--brand-d); --bs-btn-hover-border-color: var(--brand-d); --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--brand-d); --bs-btn-active-border-color: var(--brand-d);
    --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand);
    --bs-btn-focus-shadow-rgb: 35, 86, 74;
}
.btn-light {
    --bs-btn-bg: #fff; --bs-btn-border-color: var(--line); --bs-btn-color: var(--ink-2);
    --bs-btn-hover-bg: var(--brand-soft); --bs-btn-hover-border-color: #c9d9d2; --bs-btn-hover-color: var(--brand-d);
    --bs-btn-active-bg: var(--brand-soft); --bs-btn-active-border-color: #c9d9d2; --bs-btn-active-color: var(--brand-d);
}
.btn-danger { --bs-btn-bg: var(--danger); --bs-btn-border-color: var(--danger); --bs-btn-hover-bg: #862d22; --bs-btn-hover-border-color: #862d22; }
.btn-outline-field { border: 1px solid var(--line); background: #fff; color: var(--muted); }
.btn-outline-field:hover { background: var(--brand-soft); color: var(--brand-d); border-color: var(--line); }
.btn-link-sm { border: 0; background: none; padding: 0; color: var(--brand); font-size: .8rem; text-decoration: underline; text-underline-offset: 2px; }
.btn-link-sm:hover { color: var(--brand-d); }
.link-quiet { color: var(--muted); text-decoration: none; font-size: .85rem; }
.link-quiet:hover { color: var(--brand-d); text-decoration: underline; }

/* ---------- Formulários ---------- */
.form-control, .form-select {
    border-color: #d8d2c4; border-radius: 6px; background-color: #fff; color: var(--ink); font-size: .92rem;
}
.form-control::placeholder { color: #a8a295; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(35, 86, 74, .14); }
.form-control-lg { font-size: 1.05rem; padding: .65rem .9rem; }
.input-group-text { background: #f6f3ec; border-color: #d8d2c4; color: var(--muted); font-size: .88rem; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(35, 86, 74, .14); }
.form-text { color: var(--muted); font-size: .8rem; }
.field { margin-bottom: 1.25rem; }
.field > label, .label-row > label { display: block; font-weight: 500; font-size: .86rem; color: var(--ink-2); margin-bottom: .35rem; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .1rem; }
.label-tools { display: flex; gap: .75rem; flex-wrap: wrap; }
.opt { color: var(--muted); font-weight: 400; font-size: .78rem; margin-left: .35rem; }

.pills { display: flex; flex-wrap: wrap; gap: .35rem; margin: .35rem 0; }
.pill-check { margin: 0; cursor: pointer; }
.pill-check input { position: absolute; opacity: 0; pointer-events: none; }
.pill-check span {
    display: inline-block; padding: .28rem .6rem; border: 1px solid #d8d2c4; border-radius: 6px;
    background: #fff; color: var(--ink-2); font-size: .82rem; line-height: 1.3; user-select: none;
    transition: background-color .12s, border-color .12s, color .12s;
}
.pill-check:hover span { border-color: var(--brand); }
.pill-check input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.pill-check input:focus-visible + span { box-shadow: 0 0 0 .2rem rgba(35, 86, 74, .25); }
#ufPills .pill-check span { min-width: 2.6rem; text-align: center; font-weight: 500; }

.help { margin-top: .6rem; font-size: .84rem; color: var(--ink-2); }
.help summary { cursor: pointer; color: var(--brand); font-weight: 500; }
.help[open] { background: var(--brand-soft); border-radius: 6px; padding: .7rem .9rem; }
.help-table { margin: .6rem 0; width: 100%; }
.help-table td { padding: .2rem .75rem .2rem 0; vertical-align: top; }
.help-table td:first-child { white-space: nowrap; }

/* ---------- Estrutura: barra lateral ---------- */
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 1040;
    background: #16202a; color: #c9d1d6; display: flex; flex-direction: column;
    transition: transform .22s ease;
}
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(15, 22, 28, .55); z-index: 1035; }
.brand { display: flex; align-items: center; gap: .7rem; padding: 1.35rem 1.25rem 1.15rem; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.brand-mark { color: #9fc4b7; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-serif); font-weight: 600; font-size: 1.12rem; letter-spacing: .01em; }
.brand-sub { font-size: .7rem; color: #8fa0a8; margin-top: .2rem; letter-spacing: .03em; }
.side-nav { flex: 1; overflow-y: auto; padding: .6rem .75rem 1rem; }
.side-label { font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; color: #6f8089; padding: 1.1rem .6rem .4rem; }
.side-link {
    position: relative; display: flex; align-items: center; gap: .7rem; padding: .55rem .6rem; margin: 1px 0;
    color: #c2cbd0; text-decoration: none; border-radius: 6px; font-size: .9rem;
}
.side-link i { font-size: 1.05rem; color: #86a299; width: 1.2rem; text-align: center; }
.side-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-link.active { background: rgba(255, 255, 255, .09); color: #fff; }
.side-link.active::before { content: ''; position: absolute; left: -.75rem; top: .45rem; bottom: .45rem; width: 3px; background: #dba84a; border-radius: 0 3px 3px 0; }
.side-link.active i { color: #dba84a; }
.side-badge { margin-left: auto; background: #dba84a; color: #2a2008; font-size: .7rem; font-weight: 600; padding: .05rem .45rem; border-radius: 10px; font-variant-numeric: tabular-nums; }
.side-foot { display: flex; align-items: center; gap: .5rem; padding: .85rem .9rem; border-top: 1px solid rgba(255, 255, 255, .07); }
.who { display: flex; align-items: center; gap: .65rem; flex: 1; min-width: 0; color: #fff; text-decoration: none; }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #2c4a44; color: #cfe5dc; display: grid; place-items: center; font-size: .78rem; font-weight: 600; letter-spacing: .03em; }
.who-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.who-text b { font-size: .85rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-text small { color: #8fa0a8; font-size: .72rem; }
.btn-logout { border: 0; background: transparent; color: #98a8af; width: 34px; height: 34px; border-radius: 6px; font-size: 1.1rem; }
.btn-logout:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.mobile-bar { display: none; }
.main { margin-left: var(--side-w); min-height: 100vh; }
.content { max-width: 1240px; padding: 2rem 2.25rem 3rem; }

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); box-shadow: none; }
    .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
    .sidebar-backdrop.show { display: block; }
    .mobile-bar { display: flex; align-items: center; gap: .75rem; position: sticky; top: 0; z-index: 1030; height: 52px; padding: 0 .75rem; background: #16202a; color: #fff; }
    .mobile-title { font-family: var(--font-serif); font-weight: 600; }
    .btn-burger { border: 0; background: transparent; color: #fff; font-size: 1.6rem; width: 40px; height: 40px; line-height: 1; border-radius: 6px; }
    .btn-burger:active { background: rgba(255, 255, 255, .1); }
    .main { margin-left: 0; }
    .content { padding: 1.25rem 1rem 2.5rem; }
}

/* ---------- Cabeçalho de página, painéis, avisos ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head h1 { font-family: var(--font-serif); font-weight: 600; font-size: 1.85rem; margin: 0; letter-spacing: -.005em; line-height: 1.15; }
.page-head .h-detail { font-size: 1.5rem; }
.muted-num { font-family: var(--font-sans); font-size: .95rem; font-weight: 400; color: var(--muted); margin-left: .5rem; }
.eyebrow { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .3rem; }
.eyebrow a { text-transform: none; letter-spacing: 0; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem 1.4rem; }
.panel.p-0 { padding: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.panel-head h2, .panel-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; margin: 0 0 1rem; }
.panel-head h2 { margin: 0; }
.panel-empty { color: var(--muted); margin: 0; padding: .5rem 0; }
.empty-panel { text-align: center; padding: 3rem 1.5rem; }
.empty-panel h2 { font-family: var(--font-serif); font-size: 1.3rem; margin-bottom: .5rem; }
.empty-panel p { max-width: 520px; margin: 0 auto 1.25rem; color: var(--ink-2); }
.empty-radar { color: var(--brand); margin-bottom: 1rem; }
.empty { text-align: center; padding: 4rem 1rem; }
.empty-code { font-family: var(--font-serif); font-size: 3.5rem; color: var(--line); line-height: 1; margin-bottom: .75rem; }

.note { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; margin-bottom: 1.25rem; border: 1px solid var(--line); border-left-width: 4px; border-radius: 6px; background: #fff; font-size: .9rem; }
.note .btn-close { position: static; padding: .35rem; font-size: .7rem; flex: none; }
.note-success { border-left-color: var(--brand); background: #f1f7f4; }
.note-danger { border-left-color: var(--danger); background: #fbf0ee; }
.note-info { border-left-color: var(--info); background: #f0f5fa; }
.note-warning { border-left-color: var(--amber); background: #fcf5e7; }

/* ---------- Indicadores ---------- */
.stat { display: block; height: 100%; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--ink); border-radius: var(--radius); padding: 1rem 1.15rem 1.05rem; color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.stat:hover { color: var(--ink); transform: translateY(-1px); border-color: #cfc8b8; }
.stat-info { border-top-color: var(--info); }
.stat-brand { border-top-color: var(--brand); }
.stat-amber { border-top-color: var(--amber); }
.stat-ink { border-top-color: var(--ink-2); }
.stat-label { display: block; font-size: .78rem; color: var(--muted); font-weight: 500; }
.stat-num { display: block; font-family: var(--font-serif); font-size: 2.4rem; font-weight: 600; line-height: 1.1; margin: .25rem 0 .15rem; font-variant-numeric: tabular-nums; }
.stat-note { display: block; font-size: .78rem; color: var(--muted); }

/* ---------- Tabelas, etiquetas ---------- */
.table-lite { --bs-table-bg: transparent; font-size: .88rem; }
.table-lite thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); padding: .7rem .9rem; background: transparent; white-space: nowrap; }
.table-lite tbody td { padding: .75rem .9rem; border-color: var(--line-2); }
.panel.p-0 .table-lite thead th:first-child, .panel.p-0 .table-lite tbody td:first-child { padding-left: 1.25rem; }
.panel.p-0 .table-lite thead th:last-child, .panel.p-0 .table-lite tbody td:last-child { padding-right: 1.25rem; }
.row-off td { color: var(--muted); }

.tag { display: inline-block; padding: .12rem .55rem; border-radius: 4px; font-size: .74rem; font-weight: 500; background: #eee9dd; color: var(--ink-2); white-space: nowrap; }
.tag-ok { background: var(--brand-soft); color: var(--brand-d); }
.tag-parcial, .tag-executando { background: var(--amber-soft); color: #7d500e; }
.tag-erro { background: var(--danger-soft); color: var(--danger); }

.chip { display: inline-block; padding: .1rem .5rem; border: 1px solid var(--line); border-radius: 4px; font-size: .74rem; color: var(--ink-2); background: #faf8f2; }
.kw-tag { display: inline-block; padding: .08rem .5rem; border-radius: 4px; font-size: .74rem; background: var(--brand-soft); color: var(--brand-d); font-weight: 500; }

.prazo { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 500; }
.prazo i { font-size: .85rem; }
.prazo-ok { color: var(--brand); }
.prazo-warn { color: var(--amber); }
.prazo-urgent { color: var(--danger); }
.prazo-late, .prazo-none { color: var(--muted); font-weight: 400; }

/* ---------- Lista de licitações ---------- */
.filters { margin-bottom: 1rem; padding: 1rem 1.15rem; }
.result-bar { display: flex; justify-content: space-between; align-items: center; margin: 1.1rem 0 .6rem; font-size: .88rem; color: var(--ink-2); }

.lic-list { display: flex; flex-direction: column; gap: .6rem; }
.lic { position: relative; display: flex; gap: 1.5rem; justify-content: space-between; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem 1rem 1.35rem; overflow: hidden; transition: border-color .15s; }
.lic:hover { border-color: #cdc6b5; }
.lic::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--info); }
.lic.st-em_analise::before { background: var(--amber); }
.lic.st-participando::before { background: var(--brand); }
.lic.st-descartada::before { background: #c9c3b4; }
.lic.st-descartada .lic-title, .lic.st-descartada .lic-org { color: var(--muted); }
.lic-body { min-width: 0; flex: 1; }
.lic-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .9rem; margin-bottom: .4rem; }
.lic-loc { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--muted); }
.lic-title { display: block; color: var(--ink); font-weight: 500; font-size: 1rem; line-height: 1.4; text-decoration: none; margin-bottom: .25rem; }
.lic-title:hover { color: var(--brand); text-decoration: underline; }
.lic-org { font-size: .84rem; color: var(--ink-2); }
.lic-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .55rem; }
.lic-side { flex: none; width: 220px; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: .6rem; }
.lic-valor { font-family: var(--font-serif); font-weight: 600; font-size: 1.1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lic-actions { display: flex; align-items: center; gap: .4rem; width: 100%; }
.lic-actions .form-select { flex: 1; }
.btn-star { flex: none; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); display: grid; place-items: center; font-size: .95rem; }
.btn-star:hover { color: var(--amber); border-color: #ddc79a; }
.btn-star.on { color: var(--amber); border-color: #ddc79a; background: var(--amber-soft); }
.js-fav-detail.on { color: var(--amber); border-color: #ddc79a; background: var(--amber-soft); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.25rem; }
.pagination { --bs-pagination-color: var(--ink-2); --bs-pagination-hover-color: var(--brand-d); --bs-pagination-hover-bg: var(--brand-soft); --bs-pagination-active-bg: var(--brand); --bs-pagination-active-border-color: var(--brand); --bs-pagination-focus-box-shadow: none; --bs-pagination-border-color: var(--line); --bs-pagination-bg: #fff; }

@media (max-width: 767.98px) {
    .lic { flex-direction: column; gap: .85rem; }
    .lic-side { width: 100%; flex-direction: row; align-items: center; }
    .lic-actions { width: auto; flex: 1; justify-content: flex-end; }
    .lic-actions .form-select { max-width: 150px; }
}

/* ---------- Detalhe ---------- */
.detail-object { font-size: 1.08rem; line-height: 1.6; margin-bottom: 1rem; }
.detail-sub { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 1.25rem 0 .4rem; font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1.5rem; margin: 0; }
.facts dt { font-size: .74rem; color: var(--muted); font-weight: 500; margin-bottom: .1rem; }
.facts dd { margin: 0; color: var(--ink); word-break: break-word; }
.facts-wide { grid-column: 1 / -1; }
@media (max-width: 575.98px) { .facts { grid-template-columns: 1fr; } }

.nav-tabs-lite { display: flex; gap: 1.25rem; padding: 0; margin: -.25rem 0 0; list-style: none; border-bottom: 1px solid var(--line); }
.nav-tabs-lite .nav-link { border: 0; background: none; padding: .5rem 0 .7rem; color: var(--muted); font-weight: 500; font-size: .9rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.nav-tabs-lite .nav-link:hover { color: var(--ink); }
.nav-tabs-lite .nav-link.active { color: var(--brand-d); border-bottom-color: var(--brand); }
.count { color: var(--muted); font-weight: 400; margin-left: .15rem; }
.loading { color: var(--muted); padding: .5rem 0; }
.itens-table { font-size: .86rem; }
.itens-table td, .itens-table th { padding: .55rem .6rem; vertical-align: top; }
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid var(--line-2); }
.doc-list li:last-child { border-bottom: 0; }
.doc-list small { color: var(--muted); display: block; }

/* ---------- Palavras-chave ---------- */
.kw-list { list-style: none; margin: 0; padding: 0; }
.kw { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 1.5rem; padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--line-2); }
.kw:last-child { border-bottom: 0; }
.kw-off .kw-term { color: var(--muted); }
.kw-new { background: #f5faf7; box-shadow: inset 3px 0 0 var(--brand); }
.kw-term { font-weight: 600; font-size: 1.02rem; margin-bottom: .3rem; word-break: break-word; }
.kw-filters { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; font-size: .8rem; color: var(--muted); }
.kw-filters i { margin-right: .25rem; color: #a39d8e; }
.kw-stats { display: flex; align-items: center; gap: 1.25rem; }
.kw-count { display: flex; flex-direction: column; align-items: flex-end; color: var(--ink); text-decoration: none; line-height: 1.15; }
.kw-count b { font-family: var(--font-serif); font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.kw-count small { font-size: .7rem; color: var(--muted); }
.kw-count-new b { color: var(--info); }
.kw-count:hover b { text-decoration: underline; }
.kw-last { display: flex; flex-direction: column; font-size: .8rem; min-width: 118px; line-height: 1.3; }
.kw-last small { font-size: .7rem; color: var(--muted); }
.kw-actions { display: flex; align-items: center; gap: .45rem; }
.kw-actions .form-switch { margin-right: .35rem; }

@media (max-width: 1199.98px) {
    .kw { grid-template-columns: 1fr; gap: .85rem; }
    .kw-stats { justify-content: flex-start; }
    .kw-count { align-items: flex-start; }
}

/* ---------- Buscas ---------- */
.run { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line-2); }
.run-head { display: flex; justify-content: space-between; font-size: .9rem; font-weight: 500; margin-bottom: .5rem; }
.run-pct { font-variant-numeric: tabular-nums; color: var(--muted); }
.run-progress { height: 8px; background: #ebe6d9; border-radius: 4px; }
.run-progress .progress-bar { background: var(--brand); transition: width .3s ease; }
.run-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.run-list li { display: flex; align-items: flex-start; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--line-2); font-size: .88rem; }
.run-list li:last-child { border-bottom: 0; }
.run-ico { flex: none; width: 1.2rem; text-align: center; margin-top: .1rem; }
.run-ico .spinner-border { width: .95rem; height: .95rem; border-width: .15em; color: var(--brand); }
.run-ico .bi-check-circle-fill { color: var(--brand); }
.run-ico .bi-exclamation-triangle-fill { color: var(--amber); }
.run-ico .bi-x-circle-fill { color: var(--danger); }
.run-ico .bi-circle { color: #c4bead; }
.run-body { flex: 1; min-width: 0; }
.run-body small { display: block; color: var(--muted); }
.run-body .run-err { color: var(--danger); }
.run-body .run-warn { color: #7d500e; }
.run-nums { flex: none; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.run-summary { margin-top: 1rem; padding: .85rem 1rem; border-radius: 6px; background: var(--brand-soft); color: var(--brand-d); font-weight: 500; }
.run-summary a { color: inherit; }

/* ---------- Painel ---------- */
.list-compact { list-style: none; margin: 0 -1.4rem; padding: 0; }
.list-compact li { border-top: 1px solid var(--line-2); }
.list-compact li:first-child { border-top: 0; }
.list-compact a { display: flex; justify-content: space-between; gap: 1.25rem; padding: .8rem 1.4rem; color: var(--ink); text-decoration: none; }
.list-compact a:hover { background: #faf8f2; }
.lc-main { min-width: 0; display: flex; flex-direction: column; }
.lc-title { font-weight: 500; line-height: 1.35; }
.lc-sub { font-size: .8rem; color: var(--muted); margin-top: .15rem; }
.lc-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.lc-valor { font-size: .82rem; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-top: .15rem; }
@media (max-width: 575.98px) { .list-compact a { flex-direction: column; gap: .35rem; } .lc-side { align-items: flex-start; text-align: left; } }

.chart-box { position: relative; height: 170px; }
.bars { list-style: none; margin: 0; padding: 0; }
.bars a { display: grid; grid-template-columns: minmax(70px, 38%) 1fr 2.2rem; align-items: center; gap: .75rem; padding: .35rem 0; color: var(--ink); text-decoration: none; font-size: .86rem; }
.bars a:hover .bar-label { color: var(--brand); }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 8px; background: #eee9dd; border-radius: 4px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--brand); border-radius: 4px; min-width: 2px; }
.bar-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.uf-strip { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line-2); }
.uf-chip { display: inline-flex; gap: .45rem; align-items: baseline; padding: .2rem .55rem; border: 1px solid var(--line); border-radius: 4px; background: #fff; text-decoration: none; color: var(--ink-2); font-size: .8rem; font-variant-numeric: tabular-nums; }
.uf-chip b { color: var(--ink); }
.uf-chip:hover { border-color: var(--brand); color: var(--brand-d); }

/* ---------- Toasts e modal ---------- */
.toast { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 6px; background: #fff; color: var(--ink); box-shadow: 0 6px 24px rgba(28, 37, 48, .12); }
.toast.toast-erro { border-left-color: var(--danger); }
.modal-content { border: 1px solid var(--line); border-radius: 10px; background: var(--card); }

/* ---------- Tela de login ---------- */
body.auth { background: var(--card); }
.auth-wrap { display: grid; grid-template-columns: minmax(380px, 46%) 1fr; min-height: 100vh; }
.auth-side { position: relative; overflow: hidden; color: #e7efec; padding: 3rem 3.5rem; display: flex; flex-direction: column; justify-content: space-between; background-color: var(--brand-d); background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .028) 0 1px, transparent 1px 16px); }
.auth-radar { position: absolute; right: -180px; bottom: -190px; width: 620px; height: 620px; color: rgba(255, 255, 255, .13); pointer-events: none; }
.auth-brand { position: relative; display: flex; align-items: center; gap: .7rem; font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; color: #fff; }
.auth-brand .brand-mark { color: #b6d6c9; }
.auth-copy { position: relative; max-width: 460px; }
.auth-copy h1 { font-family: var(--font-serif); font-weight: 500; font-size: 2.2rem; line-height: 1.2; color: #fff; margin-bottom: 1rem; }
.auth-copy p { color: #b9ccc5; font-size: 1rem; }
.auth-copy ul { list-style: none; padding: 0; margin: 1.75rem 0 0; }
.auth-copy li { position: relative; padding: .4rem 0 .4rem 1.5rem; color: #d4e2dd; font-size: .92rem; border-top: 1px solid rgba(255, 255, 255, .09); }
.auth-copy li::before { content: ''; position: absolute; left: 0; top: 1rem; width: 8px; height: 8px; background: #dba84a; border-radius: 50%; }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem 1.5rem; background: var(--paper); }
.auth-card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 2.25rem 2rem; }
.auth-title { font-family: var(--font-serif); font-weight: 600; font-size: 1.6rem; margin-bottom: .25rem; }
.auth-sub { color: var(--muted); margin-bottom: 1.5rem; font-size: .9rem; }
.auth-foot { margin: 1.5rem 0 0; font-size: .78rem; color: var(--muted); }
.auth-mobile-brand { display: none; }
@media (max-width: 899.98px) {
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-side { display: none; }
    .auth-main { justify-content: flex-start; padding-top: 12vh; }
    .auth-mobile-brand { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.5rem; font-family: var(--font-serif); font-weight: 600; font-size: 1.15rem; color: var(--brand-d); }
    .auth-mobile-brand .brand-mark { color: var(--brand); }
    .auth-card { padding: 1.75rem 1.4rem; }
}

/* ---------- Páginas simples (erros, instalador) ---------- */
body.plain { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: var(--paper); }
.plain-card { width: 100%; max-width: 520px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 2.25rem 2rem; text-align: center; }
.plain-card.text-start { text-align: left; }
.plain-code { font-family: var(--font-serif); font-size: 3.2rem; color: #d9d3c4; line-height: 1; margin-bottom: .5rem; }
.plain-card h1 { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; margin-bottom: .6rem; }
.plain-card p { color: var(--ink-2); }
.plain-detail { text-align: left; background: #f6f3ec; border: 1px solid var(--line); border-radius: 6px; padding: .75rem; font-size: .75rem; white-space: pre-wrap; max-height: 220px; overflow: auto; }
.check-list { list-style: none; padding: 0; margin: 0 0 1.25rem; font-size: .9rem; }
.check-list li { display: flex; gap: .6rem; padding: .35rem 0; border-bottom: 1px solid var(--line-2); }
.check-list .ok { color: var(--brand); }
.check-list .bad { color: var(--danger); }

@media print {
    .sidebar, .mobile-bar, .page-actions, .filters, .btn-star, .js-status { display: none !important; }
    .main { margin: 0; }
}

/* ---------- Mudanças no edital ---------- */
.chip-change { color: var(--amber); border-color: #e6cf9f; background: #fcf5e7; text-decoration: none; font-weight: 500; }
.chip-change.grave { color: var(--danger); border-color: #e8bcb6; background: #fbf0ee; }
.chip-change:hover { filter: brightness(.96); }
.change-list { list-style: none; margin: 0; padding: 0; }
.change-list li { display: flex; align-items: flex-start; gap: .7rem; padding: .6rem 0; border-top: 1px solid var(--line-2); font-size: .9rem; }
.change-list li:first-child { border-top: 0; padding-top: 0; }
.change-list li > i { color: var(--amber); margin-top: .15rem; flex: none; }
.change-list li.grave > i, .change-list li.grave .ch-text { color: var(--danger); }
.change-list li.grave .ch-text { font-weight: 600; }
.change-list .ch-text { flex: 1; min-width: 0; }
.change-list .ch-text a { color: var(--ink); font-weight: 500; text-decoration: none; }
.change-list .ch-text a:hover { text-decoration: underline; }
.change-list .ch-when { flex: none; color: var(--muted); font-size: .78rem; white-space: nowrap; }
@media (max-width: 575.98px) { .change-list li { flex-wrap: wrap; } .change-list .ch-when { width: 100%; padding-left: 1.6rem; } }

/* ---------- Notificações ---------- */
.side-badge-alert { background: var(--danger); color: #fff; }
.mobile-bell { margin-left: auto; position: relative; color: #fff; font-size: 1.25rem; padding: .3rem .5rem; text-decoration: none; }
.mobile-bell .dot { position: absolute; top: 0; right: 0; min-width: 1.05rem; height: 1.05rem; padding: 0 .25rem; border-radius: 1rem; background: var(--danger); color: #fff; font-size: .65rem; font-weight: 600; line-height: 1.05rem; text-align: center; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li { border-top: 1px solid var(--line-2); }
.notif-list li:first-child { border-top: 0; }
.notif-list a { display: flex; align-items: flex-start; gap: .85rem; padding: .9rem 1.4rem; color: var(--ink); text-decoration: none; }
.notif-list a:hover { background: #faf8f2; }
.notif-list li > a > i { margin-top: .15rem; color: var(--muted); font-size: 1.05rem; }
.notif-list li.nova { background: #fbf8ef; }
.notif-list li.nova .nt-title { font-weight: 600; }
.notif-list li.nova > a > i { color: var(--amber); }
.notif-list li.grave > a > i { color: var(--danger); }
.nt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.nt-text { font-size: .85rem; color: var(--ink-2); }
.nt-when { flex: none; font-size: .78rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 575.98px) { .notif-list a { flex-wrap: wrap; } .nt-when { width: 100%; padding-left: 1.9rem; } }

/* ---------- Checklist ---------- */
.chip-check { text-decoration: none; color: var(--ink-2); }
.chip-check.completo { color: var(--brand-d); background: var(--brand-soft); border-color: #bcd6cc; }
.check-progress { display: flex; align-items: center; gap: .8rem; }
.check-progress .bar { flex: 1; height: 6px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.check-progress .bar span { display: block; height: 100%; background: var(--brand); transition: width .25s; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; align-items: center; gap: .75rem; padding: .5rem 0; border-top: 1px solid var(--line-2); }
.check-list li:first-child { border-top: 0; }
.check-item { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: .6rem; margin: 0; cursor: pointer; font-size: .92rem; }
.check-item input { margin-top: .2rem; flex: none; }
.check-list li.feito .check-item span { color: var(--muted); text-decoration: line-through; }
.check-val { flex: none; display: flex; flex-direction: column; align-items: flex-end; width: 9.5rem; }
.check-val .form-control { width: 100%; font-size: .8rem; }
.check-val .val-vencida { border-color: var(--danger); color: var(--danger); }
.check-val .val-antes { border-color: var(--amber); color: var(--amber); }
.val-msg { font-size: .7rem; color: var(--muted); min-height: 1em; }
.btn-x { flex: none; border: 0; background: none; color: var(--muted); padding: .25rem .4rem; font-size: .8rem; }
.btn-x:hover { color: var(--danger); }
@media (max-width: 575.98px) { .check-list li { flex-wrap: wrap; } .check-item { flex-basis: 100%; } .check-val { width: auto; flex: 1; align-items: flex-start; } }

/* ---------- Calendário ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; padding: 1rem 1.4rem; border-bottom: 1px solid var(--line-2); }
.cal-title { font-size: 1.15rem; margin: 0 .4rem; min-width: 9.5rem; text-align: center; }
.cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: .45rem .6rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--line-2); }
.cal-day { min-height: 6.6rem; padding: .35rem .4rem; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.vazio { background: #faf8f2; }
.cal-day.passado .cal-num { color: var(--muted); }
.cal-day.hoje { background: #fbf8ef; }
.cal-day.hoje .cal-num { background: var(--brand); color: #fff; }
.cal-num { align-self: flex-start; font-size: .78rem; font-weight: 600; min-width: 1.5rem; text-align: center; border-radius: 1rem; padding: .05rem .3rem; }
.cal-ev { display: block; font-size: .72rem; line-height: 1.25; padding: .12rem .35rem; border-radius: 3px; text-decoration: none; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 3px solid var(--line); background: #f3f0e8; }
.cal-ev:hover { filter: brightness(.96); }
.ev-part { border-left-color: var(--brand); background: var(--brand-soft); }
.ev-fav { border-left-color: var(--amber); background: #fcf5e7; }
.ev-outra { border-left-color: #9aa3ad; }
.ev-val { border-left-color: var(--info); background: #f0f5fa; }
.cal-mais { font-size: .7rem; color: var(--muted); padding-left: .35rem; }
.legend { display: inline-block; width: .75rem; height: .75rem; border-radius: 2px; vertical-align: -1px; border-left: 3px solid; }
.ca-dia { padding: .5rem 1.1rem; background: #faf8f2; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); border-top: 1px solid var(--line-2); }
.ca-dia.hoje { color: var(--brand-d); }
.cal-agenda .list-compact { margin: 0; }
.cal-agenda .list-compact a { padding: .7rem 1.1rem; }

/* ---------- Documentos locais ---------- */
.doc-local { list-style: none; margin: 0 0 .75rem; padding: 0; font-size: .9rem; }
.doc-local li { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; padding: .3rem 0; }
.doc-local li > i { color: var(--brand); }
.doc-local a { color: var(--ink); font-weight: 500; }

/* ---------- Filtros salvos ---------- */
.saved-filters { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; }
.sf { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fffefb; padding: 0 .2rem 0 .75rem; font-size: .82rem; }
.sf a { color: var(--ink); text-decoration: none; padding: .2rem 0; }
.sf.ativo { border-color: var(--brand); background: var(--brand-soft); }
.sf.ativo a { color: var(--brand-d); font-weight: 600; }
.save-filter { display: flex; gap: .4rem; align-items: center; }
.save-filter .form-control { width: 11rem; }
.result-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }

/* ---------- Resultados ---------- */
.num-sm { font-size: 1.45rem !important; }
.forn-list { list-style: none; margin: 0; padding: 0; counter-reset: f; }
.forn-list li { counter-increment: f; padding: .55rem 0 .55rem 1.6rem; border-top: 1px solid var(--line-2); position: relative; }
.forn-list li:first-child { border-top: 0; }
.forn-list li::before { content: counter(f); position: absolute; left: 0; top: .6rem; font-size: .75rem; font-weight: 600; color: var(--muted); }
.fo-nome { display: block; font-size: .88rem; font-weight: 500; }
.fo-num { display: block; font-size: .75rem; color: var(--muted); }

/* Aviso que aparece sozinho (sem JavaScript) se o carregamento passar de 25 segundos */
.loading-slow { opacity: 0; max-height: 0; overflow: hidden; margin-top: .35rem; color: var(--muted, #7b766c);
  animation: loading-slow-show 0s linear 25s forwards; }
@keyframes loading-slow-show { to { opacity: 1; max-height: 6rem; } }
