:root { --sidebar-w: 240px; --brand: #14365d; }
body { background: #f4f6f9; font-size: .95rem; }
.layout { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--brand); color: #fff; padding: 1rem .75rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; flex-shrink: 0; display: flex; flex-direction: column; }
.sidebar .brand-logo { background: #fff; border-radius: .6rem; padding: .7rem .8rem .5rem; margin: 0 .25rem 1rem; text-align: center; }
.sidebar .brand-logo img { width: 100%; height: auto; display: block; }
.sidebar .brand-logo .brand-nome { display: block; color: var(--brand); font-size: 1.15rem; text-align: center; line-height: 1.2; }
.sidebar .brand-logo span { display: block; color: var(--brand); font-size: .72rem; letter-spacing: .45em; text-transform: uppercase; margin-top: .15rem; padding-left: .45em; }
.login-logo { display: block; width: 78%; max-width: 260px; margin: .5rem auto 1rem; }
.sidebar .brand { color: #fff; font-weight: 700; font-size: 1.15rem; text-decoration: none; padding: .25rem .5rem 1rem; display: block; }
.sidebar .nav-link { color: rgba(255,255,255,.82); padding: .35rem .5rem; border-radius: .35rem; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.12); color: #fff; }
.sidebar .nav-link.disabled { color: rgba(255,255,255,.35); }
.sidebar .nav-section { text-transform: uppercase; font-size: .95rem; font-weight: 700; letter-spacing: .08em; color: #fff; padding: 1.1rem .5rem .35rem; margin-top: .6rem; border-top: 1px solid rgba(255,255,255,.18); border-left: 3px solid #ffc107; padding-left: .6rem; list-style: none; }
.tabela-itens { font-size: .85rem; }
.table.tabela-itens thead th { white-space: normal; font-size: .72rem; line-height: 1.15; }
.tabela-itens .badge { white-space: normal; text-align: left; }
.tabela-itens td, .tabela-itens th { padding-left: .4rem; padding-right: .4rem; }
.tabela-itens td:nth-child(2) { min-width: 170px; max-width: 280px; }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar-user { margin-top: auto; padding: 1rem .5rem 0; border-top: 1px solid rgba(255,255,255,.15); }
.sidebar-user a { color: rgba(255,255,255,.7); }
.content { flex: 1; min-width: 0; padding: 1.5rem 2rem 3rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { font-size: 1.4rem; margin: 0; }
.card { border-color: #e3e7ee; }
.table > :not(caption) > * > * { padding: .45rem .6rem; }
.table thead th { white-space: nowrap; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: #5b6573; background: #f8f9fb; }
.table thead th a { color: inherit; text-decoration: none; }
.table .num { text-align: right; white-space: nowrap; }
.inativo td { opacity: .55; }
.filtros label { font-size: .75rem; color: #5b6573; margin-bottom: .1rem; }
.filtros input:not([type=checkbox]), .filtros select { display: block; width: 100%; padding: .25rem .5rem; font-size: .875rem; border: 1px solid var(--bs-border-color); border-radius: .25rem; background: #fff; }
.form-label { font-weight: 500; margin-bottom: .2rem; }
.form-text { font-size: .8rem; }
.fs-table td { vertical-align: top; min-width: 90px; }
.fs-table td:first-child { min-width: 210px; }
.fs-table input[type=url] { min-width: 220px; }
.fs-table input[type=date] { min-width: 140px; }
.fs-table th { white-space: nowrap; }
.fs-table .form-check { padding-top: .5rem; }
.resumo-valor { font-size: 1.25rem; font-weight: 600; }
.login-box { max-width: 380px; margin: 12vh auto 0; }
.ts-wrapper.form-select, .ts-wrapper.form-control { padding: 0; }
.preview-calc { background: #eef3fa; border: 1px solid #d5e0f0; border-radius: .4rem; padding: .6rem .9rem; }
.preview-calc strong { font-variant-numeric: tabular-nums; }

/* gráfico de colunas do painel */
.grafico-colunas { display: flex; align-items: flex-end; gap: .4rem; height: 150px; padding-top: .5rem; }
.grafico-colunas .col-barra { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.grafico-colunas .barra { width: 100%; background: #1f3a5f; border-radius: 3px 3px 0 0; min-height: 2px; }
.grafico-colunas .rotulo { font-size: .65rem; color: #6c757d; margin-top: .25rem; white-space: nowrap; }
.tabela-relatorio td:not(.text-end) { min-width: 7rem; max-width: 22rem; }
.tabela-relatorio th { white-space: nowrap; }

/* quadro de licitações (kanban) */
.quadro { display: flex; gap: .75rem; align-items: flex-start; overflow-x: auto; padding-bottom: 1rem; }
.quadro-col { flex: 0 0 290px; background: #eceff4; border-radius: 8px; border-top: 4px solid var(--cor-status, #6c757d); }
.quadro-col.sobre { outline: 2px dashed #1f3a5f; background: #e3e9f2; }
.quadro-col-topo { display: flex; justify-content: space-between; align-items: center; padding: .55rem .7rem .3rem; font-size: .9rem; }
.quadro-corpo { padding: .4rem .5rem .6rem; min-height: 60px; display: flex; flex-direction: column; gap: .5rem; max-height: 70vh; overflow-y: auto; }
.quadro-cartao { background: #fff; border-radius: 6px; padding: .55rem .65rem; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); cursor: grab; }
.quadro-cartao.arrastando { opacity: .45; }
.quadro-cartao.quadro-ok { box-shadow: 0 0 0 2px #198754; }
.quadro-titulo { font-weight: 600; font-size: .9rem; text-decoration: none; display: block; }
.quadro-mover { font-size: .75rem; }

/* agenda */
.agenda-dia { margin-bottom: .6rem; }
.agenda-data { font-size: .78rem; text-transform: capitalize; color: #6c757d; border-bottom: 1px solid #e3e6ea; margin-bottom: .2rem; }
.agenda-atrasada .agenda-data { color: #b02a37; }
.agenda-evento { display: flex; gap: .5rem; align-items: baseline; padding: .15rem .1rem; text-decoration: none; color: inherit; font-size: .88rem; border-radius: 4px; }
.agenda-evento:hover { background: #f1f4f8; }
.agenda-evento .badge { flex: 0 0 .7rem; height: .7rem; padding: 0; border-radius: 50%; position: relative; top: .1rem; }
.agenda-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.agenda-titulo { overflow-wrap: anywhere; }
.agenda-sub { font-size: .75rem; color: #6c757d; }
.agenda-dias { font-size: .75rem; white-space: nowrap; }
.agenda-mes td { height: 108px; width: 14.28%; vertical-align: top; padding: .25rem; font-size: .75rem; }
.agenda-mes td.fora { background: #f6f7f9; color: #adb5bd; }
.agenda-mes td.hoje { background: #fff8e1; }
.agenda-mes .num-dia { font-weight: 600; font-size: .8rem; }
.agenda-mes .evento-mes { display: block; border-left: 3px solid; border-radius: 3px; padding: 0 .25rem; margin-top: 2px; text-decoration: none; color: #212529; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* painel: oportunidades para você */
.reco-item { display: block; text-decoration: none; color: inherit; padding: .35rem 0; border-bottom: 1px solid #eef0f3; font-size: .87rem; }
.reco-item:last-child { border-bottom: 0; }
.agenda-mes { table-layout: fixed; width: 100%; }
.agenda-mes td { overflow: hidden; }
.quadro-col { flex-basis: 255px; }

/* seta de ordenação no cabeçalho das tabelas (static/js/ordenar.js) */
.ordenar-seta { border: 0; background: none; padding: 0 0 0 .3rem; font-size: .75rem; line-height: 1; color: #adb5bd; cursor: pointer; vertical-align: middle; }
.ordenar-seta:hover, .ordenar-seta.ativa { color: #0d6efd; }


/* tema escuro (botão da barra lateral; o Bootstrap 5.3 cuida do básico, aqui ficam as cores próprias do sistema) */
[data-bs-theme=dark] body { background: #11151b; }
[data-bs-theme=dark] .sidebar { background: #0d2038; }
[data-bs-theme=dark] .card { border-color: #2b323c; }
[data-bs-theme=dark] .table thead th { background: #1a2029; color: #9ba5b3; }
[data-bs-theme=dark] .filtros label { color: #9ba5b3; }
[data-bs-theme=dark] .filtros input:not([type=checkbox]), [data-bs-theme=dark] .filtros select { background: var(--bs-body-bg); color: var(--bs-body-color); }
[data-bs-theme=dark] .preview-calc { background: #1a2738; border-color: #2a3d57; }
[data-bs-theme=dark] .grafico-colunas .barra { background: #5b8def; }
[data-bs-theme=dark] .grafico-colunas .rotulo, [data-bs-theme=dark] .agenda-data, [data-bs-theme=dark] .agenda-sub { color: #9ba5b3; }
[data-bs-theme=dark] .agenda-data { border-bottom-color: #2b323c; }
[data-bs-theme=dark] .agenda-atrasada .agenda-data { color: #ea868f; }
[data-bs-theme=dark] .agenda-evento:hover { background: #222a35; }
[data-bs-theme=dark] .agenda-mes td.fora { background: #161b22; color: #6c757d; }
[data-bs-theme=dark] .agenda-mes td.hoje { background: #3a3320; }
[data-bs-theme=dark] .agenda-mes .evento-mes { color: var(--bs-body-color); }
[data-bs-theme=dark] .reco-item { border-bottom-color: #2b323c; }
[data-bs-theme=dark] .quadro-col { background: #1a2029; }
[data-bs-theme=dark] .quadro-col.sobre { background: #222b37; outline-color: #5b8def; }
[data-bs-theme=dark] .quadro-cartao { background: #262e39; box-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
[data-bs-theme=dark] .ordenar-seta { color: #6c757d; }
[data-bs-theme=dark] .ordenar-seta:hover, [data-bs-theme=dark] .ordenar-seta.ativa { color: #6ea8fe; }
[data-bs-theme=dark] .text-bg-light { background-color: var(--bs-tertiary-bg) !important; color: var(--bs-body-color) !important; }
[data-bs-theme=dark] .table-light, [data-bs-theme=dark] tfoot.table-light > tr > * { --bs-table-bg: #1a2029; --bs-table-color: var(--bs-body-color); }
/* selects com busca (Tom Select) */
[data-bs-theme=dark] .ts-control, [data-bs-theme=dark] .ts-wrapper.single.input-active .ts-control, [data-bs-theme=dark] .ts-dropdown { background: var(--bs-body-bg); color: var(--bs-body-color); border-color: var(--bs-border-color); }
[data-bs-theme=dark] .ts-control input, [data-bs-theme=dark] .ts-control > .item { color: var(--bs-body-color); }
[data-bs-theme=dark] .ts-dropdown .option { color: var(--bs-body-color); }
[data-bs-theme=dark] .ts-dropdown .active { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
[data-bs-theme=dark] .ts-dropdown .optgroup-header { background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); }
[data-bs-theme=dark] .table-success { --bs-table-bg: #12301f; --bs-table-color: var(--bs-body-color); --bs-table-border-color: #1f4a32; --bs-table-striped-bg: #12301f; --bs-table-hover-bg: #17402a; }
[data-bs-theme=dark] .table-danger { --bs-table-bg: #3a1a1e; --bs-table-color: var(--bs-body-color); --bs-table-border-color: #55272d; }
[data-bs-theme=dark] .table-warning { --bs-table-bg: #3a3014; --bs-table-color: var(--bs-body-color); --bs-table-border-color: #54461d; }
[data-bs-theme=dark] .table-info { --bs-table-bg: #12303a; --bs-table-color: var(--bs-body-color); --bs-table-border-color: #1d4856; }


/* ---- Acessibilidade (WCAG 2.2 AA) ---- */
/* contraste: cinza secundário e textos claros sobre a barra azul chegam a pelo menos 4,5:1 */
:root { --bs-secondary-color: #565e66; }
[data-bs-theme=dark] { --bs-secondary-color: #a9b1bb; }
.sidebar .text-white-50 { color: rgba(255,255,255,.78) !important; }
.sidebar-user a { color: rgba(255,255,255,.85); }
.ordenar-seta { color: #5b6573; }
[data-bs-theme=dark] .ordenar-seta { color: #9ba5b3; }
.agenda-mes td.fora { color: #5b6573; }
[data-bs-theme=dark] .agenda-mes td.fora { color: #9aa4b0; }
.agenda-data, .agenda-sub, .grafico-colunas .rotulo { color: #565e66; }
[data-bs-theme=dark] .agenda-data, [data-bs-theme=dark] .agenda-sub, [data-bs-theme=dark] .grafico-colunas .rotulo { color: #a9b1bb; }

/* foco sempre visível, inclusive nos elementos desenhados à mão */
:focus-visible { outline: 3px solid #0d6efd; outline-offset: 2px; }
.sidebar :focus-visible { outline-color: #ffc107; }
[data-bs-theme=dark] :focus-visible { outline-color: #6ea8fe; }
.quadro-cartao:focus-within { outline: 2px solid #0d6efd; }

/* atalho para pular o menu */
.pular-conteudo { position: absolute; left: .5rem; top: -4rem; z-index: 2000; background: #fff; color: #14365d; padding: .5rem .9rem; border-radius: .35rem; font-weight: 600; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.pular-conteudo:focus { top: .5rem; }
main:focus { outline: none; }

/* áreas de toque dos botões pequenos (mínimo de 24 px) */
.btn-sm, .ordenar-seta, .btn-close { min-width: 24px; min-height: 24px; }
.ordenar-seta { padding: .15rem .3rem; }
.btn-link.btn-sm.p-0 { min-width: 24px; }

/* rodapé com os dados legais */
.rodape-legal { margin-top: 2.5rem; padding: 1rem 0 .5rem; border-top: 1px solid var(--bs-border-color); font-size: .85rem; color: var(--bs-secondary-color); }
.rodape-legal a { color: inherit; text-decoration: underline; }
.rodape-links { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin-bottom: .35rem; }
.legal { max-width: 52rem; }
.legal h1 { font-size: 1.6rem; } .legal h2 { font-size: 1.15rem; margin-top: 1.5rem; } .legal mark { background: #fff3a8; color: #3d3200; padding: 0 .2rem; border-radius: .2rem; }
[data-bs-theme=dark] .legal mark { background: #5a4b00; color: #fff3a8; }
.legal-anonimo { max-width: 52rem; margin: 1.5rem auto; padding: 0 1rem; }

/* botões e textos coloridos com contraste mínimo de 4,5:1 nos dois temas */
.btn-outline-secondary { --bs-btn-color: #565e66; --bs-btn-border-color: #565e66; --bs-btn-hover-bg: #565e66; --bs-btn-hover-border-color: #565e66; --bs-btn-active-bg: #565e66; --bs-btn-active-border-color: #565e66; }
.btn-outline-primary { --bs-btn-color: #0a58ca; --bs-btn-border-color: #0a58ca; --bs-btn-hover-bg: #0a58ca; --bs-btn-hover-border-color: #0a58ca; --bs-btn-active-bg: #0a58ca; --bs-btn-active-border-color: #0a58ca; }
.btn-outline-danger { --bs-btn-color: #a52834; --bs-btn-border-color: #a52834; --bs-btn-hover-bg: #a52834; --bs-btn-hover-border-color: #a52834; --bs-btn-active-bg: #a52834; --bs-btn-active-border-color: #a52834; }
.btn-outline-success { --bs-btn-color: #146c43; --bs-btn-border-color: #146c43; --bs-btn-hover-bg: #146c43; --bs-btn-hover-border-color: #146c43; --bs-btn-active-bg: #146c43; --bs-btn-active-border-color: #146c43; }
.text-danger { color: #a52834 !important; } .text-success { color: #146c43 !important; } .text-warning-emphasis { color: #664d03 !important; }
a { --bs-link-color-rgb: 10, 88, 202; }
[data-bs-theme=dark] .btn-outline-secondary { --bs-btn-color: #a9b1bb; --bs-btn-border-color: #a9b1bb; --bs-btn-hover-color: #11151b; --bs-btn-hover-bg: #a9b1bb; --bs-btn-hover-border-color: #a9b1bb; --bs-btn-active-color: #11151b; --bs-btn-active-bg: #a9b1bb; --bs-btn-active-border-color: #a9b1bb; }
[data-bs-theme=dark] .btn-outline-primary { --bs-btn-color: #6ea8fe; --bs-btn-border-color: #6ea8fe; --bs-btn-hover-color: #11151b; --bs-btn-hover-bg: #6ea8fe; --bs-btn-hover-border-color: #6ea8fe; --bs-btn-active-color: #11151b; --bs-btn-active-bg: #6ea8fe; --bs-btn-active-border-color: #6ea8fe; }
[data-bs-theme=dark] .btn-outline-danger { --bs-btn-color: #ea868f; --bs-btn-border-color: #ea868f; --bs-btn-hover-color: #11151b; --bs-btn-hover-bg: #ea868f; --bs-btn-hover-border-color: #ea868f; --bs-btn-active-color: #11151b; --bs-btn-active-bg: #ea868f; --bs-btn-active-border-color: #ea868f; }
[data-bs-theme=dark] .btn-outline-success { --bs-btn-color: #75b798; --bs-btn-border-color: #75b798; --bs-btn-hover-color: #11151b; --bs-btn-hover-bg: #75b798; --bs-btn-hover-border-color: #75b798; --bs-btn-active-color: #11151b; --bs-btn-active-bg: #75b798; --bs-btn-active-border-color: #75b798; }
[data-bs-theme=dark] .text-danger { color: #ea868f !important; } [data-bs-theme=dark] .text-success { color: #75b798 !important; } [data-bs-theme=dark] .text-warning-emphasis { color: #ffda6a !important; }
[data-bs-theme=dark] a { --bs-link-color-rgb: 110, 168, 254; }

/* contraste do botao Trocar produto sobre a linha verde do painel do pregao (WCAG AA) */
.trocar-produto { color: #0a58ca; }
[data-bs-theme="dark"] .trocar-produto { color: #6ea8fe; }

/* site comercial (/site/): vitrine pública */
.site-topo { border-bottom: 1px solid var(--bs-border-color); }
.site-hero { padding: 3rem 0 2.5rem; }
.site-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
.site-container { max-width: 1080px; margin: 0 auto; padding: 0 1rem; }
.site-card { height: 100%; }
.site-preco { font-size: 2rem; font-weight: 700; }
.site-destaque { border: 2px solid var(--bs-primary); }
.campo-isca { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

/* site comercial: layout de página de vendas (barra de aviso, hero, faixas, passos, perguntas, chamada final) */
.site-barra { background: #0b2a5b; color: #fff; text-align: center; padding: .45rem 1rem; font-size: .9rem; }
.site-barra a { color: #fff; font-weight: 600; }
.site-topo { position: sticky; top: 0; z-index: 20; background: var(--bs-body-bg); }
.site-hero-bg { background: linear-gradient(135deg, #0b2a5b 0%, #0d5bd7 100%); color: #fff; }
.site-hero-bg .text-body-secondary, .site-hero-bg .lead { color: rgba(255, 255, 255, .85) !important; }
.site-eyebrow { display: inline-block; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; background: rgba(255, 255, 255, .15); border-radius: 999px; padding: .2rem .8rem; margin-bottom: .8rem; }
.site-faixa { padding: 3rem 0; }
.site-faixa-alt { background: var(--bs-tertiary-bg); }
.site-secao-titulo { text-align: center; max-width: 720px; margin: 0 auto 2rem; }
.site-pilar { text-align: center; padding: 1rem; }
.site-pilar .num { font-size: 2.2rem; font-weight: 700; color: var(--bs-primary); line-height: 1; }
.site-passo { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; }
.site-passo .bola { flex: 0 0 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--bs-primary); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.site-comparar th, .site-comparar td { padding: .75rem 1rem; vertical-align: top; }
.site-comparar .sem { color: var(--bs-secondary-color); }
.site-comparar .com { font-weight: 600; }
.site-faq details { border: 1px solid var(--bs-border-color); border-radius: .5rem; padding: .8rem 1rem; margin-bottom: .6rem; background: var(--bs-body-bg); }
.site-faq summary { cursor: pointer; font-weight: 600; }
.site-faq details[open] summary { margin-bottom: .5rem; }
.site-chamada { background: linear-gradient(135deg, #0b2a5b 0%, #0d5bd7 100%); color: #fff; text-align: center; padding: 3rem 1rem; }
.site-chamada h2 { color: #fff; }
.site-mock { background: var(--bs-body-bg); color: var(--bs-body-color); border-radius: .75rem; padding: 1rem; box-shadow: 0 .75rem 2rem rgba(0, 0, 0, .3); }
.site-mock .kpi { background: var(--bs-tertiary-bg); border-radius: .5rem; padding: .6rem .8rem; }
.site-mock .kpi b { display: block; font-size: 1.1rem; }
.site-mock .barra { height: .55rem; border-radius: 999px; background: var(--bs-primary); }
.site-mock .barra.b1 { width: 85%; } .site-mock .barra.b2 { width: 60%; } .site-mock .barra.b3 { width: 40%; }
.site-rodape { background: var(--bs-tertiary-bg); padding: 2rem 0 .5rem; margin-top: 0; }
.site-rodape h2 { font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; }
.site-rodape ul { list-style: none; padding: 0; margin: 0; }
.site-rodape li { margin-bottom: .3rem; }
.site-passos-form { display: flex; gap: .5rem; flex-wrap: wrap; font-size: .85rem; margin-bottom: 1rem; }
.site-passos-form span { padding: .2rem .7rem; border-radius: 999px; background: rgba(255, 255, 255, .15); }
.site-passos-form .atual { background: #fff; color: #0b2a5b; font-weight: 600; }
.site-sticky { position: sticky; top: 5rem; }
.site-faq-largura { max-width: 760px; }
.site-hero-bg .site-mock .text-body-secondary { color: var(--bs-secondary-color) !important; }
