:root {
  /* LicitaOK 2026: verde-mata + creme, limão só nas ações principais e na nota máxima */
  --bg: #f5f1e8; --card: #fffdf8; --txt: #10201c; --muted: #66706a; --borda: #e2dccd;
  --pri: #0e3b32; --pri-escuro: #082a23; --verde: #1e7a4c; --lima: #c8f169; --creme2: #ece6d8;
  --ok: #1e7a4c; --warn: #9a5a00; --danger: #b3261e; --fav: #5b3cc4;
  --raio: 16px;
  --serif: 'Instrument Serif', Georgia, serif;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--txt); }
a { color: var(--pri); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: .2rem 0 1rem; }
h2 { font-size: 1.1rem; margin: 0 0 .8rem; }
h3 { font-size: 1rem; margin: .3rem 0; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.ok { color: var(--ok); } .perigo { color: var(--danger); }

.topo { background: #0d2547; color: #fff; margin-bottom: 1.2rem; }
.topo-in { display: flex; align-items: center; gap: 1rem; min-height: 56px; flex-wrap: wrap; }
.marca { color: #fff; font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.marca span { color: #6fb1ff; }
.marca:hover { text-decoration: none; }
.menu { display: flex; gap: .2rem; flex-wrap: wrap; flex: 1; }
.menu a { color: #cfdcf0; padding: .4rem .55rem; border-radius: 6px; font-size: .92rem; white-space: nowrap; }
.menu a.on, .menu a:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.quem { display: flex; align-items: center; gap: .6rem; font-size: .85rem; }
.quem a { color: #fff; font-weight: 600; }
.quem small { color: #9fb3d1; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quem .link { color: #cfdcf0; }

.card { background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); padding: 1.2rem; margin-bottom: 1rem; }
.card.estreito { max-width: 420px; margin: 2rem auto; }
.card.medio { max-width: 680px; margin: 1rem auto; }
.card.linha, .linha { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.vazio { text-align: center; color: var(--muted); padding: 2rem; }

.form { display: grid; gap: .8rem; }
.form.inline { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .5rem; }
.form.inline input, .form.inline textarea { flex: 1; min-width: 180px; }
label { display: grid; gap: .25rem; font-size: .9rem; font-weight: 500; }
label small { font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; padding: .5rem .6rem; border: 1px solid #cdd2da; border-radius: 7px; background: #fff; width: 100%; color: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(30,122,76,.25); border-color: var(--pri); }
textarea.mono, .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
fieldset { border: 1px solid var(--borda); border-radius: var(--raio); padding: .8rem 1rem 1rem; display: grid; gap: .8rem; }
legend { font-weight: 600; padding: 0 .3rem; }
.lado { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.check { display: flex; align-items: center; gap: .4rem; font-weight: 400; }
.check input { width: auto; }

.btn { display: inline-block; background: var(--pri); color: #fff; border: 0; border-radius: 7px; padding: .55rem 1rem; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--pri-escuro); text-decoration: none; }
.btn.sec { background: #e6efe0; color: var(--pri); }
.btn.sec:hover { background: #d6e6cc; }
.btn.perigo { background: var(--danger); }
.btn[disabled] { opacity: .5; cursor: default; }
.link { background: none; border: 0; padding: 0; color: var(--pri); font: inherit; cursor: pointer; }
.link:hover { text-decoration: underline; }
.link.perigo { color: var(--danger); }

.flash { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; }
.flash.ok { background: #ecfdf3; border-color: #abefc6; color: #085d3a; }
.flash.erro { background: #fef3f2; border-color: #fecdca; color: #912018; }
.flash.aviso { background: #fffaeb; border-color: #fedf89; color: #93370d; }
code.senha { background: #fff; padding: .1rem .4rem; border-radius: 4px; font-size: 1.05rem; user-select: all; }

.abas { display: flex; gap: .3rem; margin-bottom: 1rem; border-bottom: 1px solid var(--borda); flex-wrap: wrap; }
.abas a { padding: .5rem .9rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.abas a.on { color: var(--pri); border-color: var(--pri); font-weight: 600; }
.abas a:hover { text-decoration: none; color: var(--txt); }

.filtros .busca { font-size: 1.05rem; padding: .7rem .8rem; margin-bottom: .8rem; }
.grade { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; }
.acoes { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-top: .8rem; flex-wrap: wrap; }
.card .acoes form { display: inline; }
.resultado-topo { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: .5rem 0 .8rem; }
.resultado-topo p { margin: 0; }
details.salvar summary { list-style: none; }
.acoes-busca { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
details.salvar { position: relative; }
details.salvar > form { position: absolute; right: 0; top: 100%; z-index: 20; min-width: min(340px, calc(100vw - 32px)); background: #fff; padding: .6rem; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.15); }
@media (max-width: 600px) { details.salvar > form { left: 0; right: auto; } }
details summary::-webkit-details-marker { display: none; }
details > summary { cursor: pointer; }

.item { background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); padding: 1rem 1.1rem; margin-bottom: .7rem; }
.item:hover { border-color: #c3cad5; }
.item h3 a { color: var(--txt); }
.item p { margin: .2rem 0; }
.item-topo { display: flex; gap: .35rem; flex-wrap: wrap; }
.item-rodape { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin-top: .4rem; }
.item-rodape strong { color: var(--txt); }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: .12rem .5rem; border-radius: 999px; background: #e6efe0; color: var(--pri); }
.tag.claro { background: #f0f2f5; color: #475467; }
.tag.ok { background: #ecfdf3; color: var(--ok); }
.tag.warn { background: #fffaeb; color: var(--warn); }
.tag.danger { background: #fef3f2; color: var(--danger); }
.tag.muted { background: #f0f2f5; color: var(--muted); }
.tag.fav { background: #f4f0ff; color: var(--fav); }
.match { color: var(--ok); font-weight: 600; }
.nota { background: #fffbea; padding: .4rem .6rem; border-radius: 6px; font-size: .9rem; }

.objeto { font-size: 1.2rem; line-height: 1.4; }
.dados { display: grid; grid-template-columns: 220px 1fr; gap: .4rem 1rem; margin: 1rem 0; }
.dados dt { color: var(--muted); }
.dados dd { margin: 0; }
.pre { white-space: pre-wrap; }

.tabela { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); overflow: hidden; margin-bottom: 1rem; font-size: .9rem; }
.tabela th, .tabela td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--borda); vertical-align: top; }
.tabela th { background: #f8f9fb; font-weight: 600; color: #475467; }
.tabela tr.inativo td { color: var(--muted); }
.acoes-tab { display: flex; gap: .8rem; flex-wrap: wrap; align-items: flex-start; }
.acoes-tab form { display: inline; }
.paginacao { display: flex; justify-content: center; gap: 1.5rem; padding: 1rem; }
.log { background: #0f172a; color: #d1e0ff; padding: .7rem; border-radius: 8px; font-size: .8rem; overflow-x: auto; white-space: pre-wrap; }

.cnpj { border-top: 1px solid var(--borda); padding: .7rem 0; }
.cnpj:first-of-type { border-top: 0; }
.cnaes { margin: .4rem 0; padding-left: 1.2rem; font-size: .85rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; background: #f0f2f5; padding: .25rem .6rem; border-radius: 999px; font-weight: 400; font-size: .85rem; }
.chip input { width: auto; }
.rodape { color: var(--muted); font-size: .8rem; padding: 2rem 16px; text-align: center; }

@media (max-width: 800px) {
  .grade { grid-template-columns: 1fr 1fr; }
  .lado { grid-template-columns: 1fr; }
  .dados { grid-template-columns: 1fr; }
  .dados dt { margin-top: .4rem; }
  .tabela { display: block; overflow-x: auto; }
  .quem small { display: none; }
}

/* Nota de aderência 1..5 */
.nota { display: inline-block; font-size: .75rem; font-weight: 700; padding: .12rem .55rem; border-radius: 999px; background: #f0f2f5; color: #475467; }
.nota.n5 { background: #127a3e; color: #fff; }
.nota.n4 { background: #d1fadf; color: #05603a; }
.nota.n3 { background: #fef0c7; color: #93370d; }
.nota.n2 { background: #f2f4f7; color: #475467; }
.cats { display: grid; gap: .35rem; margin: .4rem 0 .8rem; }
.cat { display: flex; gap: .5rem; align-items: center; font-weight: 400; padding: .35rem .5rem; border: 1px solid var(--borda); border-radius: 7px; }
.cat input { width: auto; }
.cat.linha { justify-content: space-between; }
.form > .btn, .form > button { justify-self: start; }

/* Fluxo da licitação */
.progresso { height: 8px; background: #eef1f5; border-radius: 99px; overflow: hidden; margin-top: .6rem; }
.progresso > div { height: 100%; background: var(--ok); }
.etapas { display: grid; grid-template-columns: repeat(6, 1fr); gap: .4rem; margin-bottom: 1rem; }
.etp { display: flex; gap: .5rem; align-items: center; background: var(--card); border: 1px solid var(--borda); border-radius: 9px; padding: .5rem .6rem; color: var(--txt); font-size: .85rem; line-height: 1.25; }
.etp:hover { text-decoration: none; border-color: #b9c3d3; }
.etp small { color: var(--muted); }
.etp .num { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #eef1f5; font-weight: 700; }
.etp.on { border-color: var(--pri); box-shadow: 0 0 0 1px var(--pri) inset; }
.etp.andamento .num { background: #fef0c7; color: var(--warn); }
.etp.concluida .num { background: var(--ok); color: #fff; }
.etp.nao_aplica { opacity: .55; }
.grade3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.chk { border: 1px solid var(--borda); border-left: 4px solid #cfd5df; border-radius: 8px; padding: .5rem .6rem; margin-bottom: .45rem; }
.chk.atendido { border-left-color: var(--ok); }
.chk.nao_atendido { border-left-color: var(--danger); }
.chk.nao_aplica { opacity: .6; }
.chk-form { display: grid; grid-template-columns: 3fr 140px 1.3fr auto; gap: .4rem; align-items: center; }
.chk-desc { border-color: transparent; font-weight: 500; }
.chk-rodape { display: flex; gap: 1rem; justify-content: space-between; align-items: center; font-size: .82rem; margin-top: .2rem; flex-wrap: wrap; }
.btn.pequeno { padding: .4rem .7rem; }
.registro { border: 1px solid var(--borda); border-radius: 8px; padding: .6rem .8rem; margin-bottom: .5rem; }
.registro summary { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.registro[open] summary { margin-bottom: .7rem; }
.tabela-rolagem { overflow-x: auto; margin-bottom: .8rem; }
.precos input, .precos textarea { padding: .3rem .4rem; font-size: .85rem; }
.precos textarea { min-width: 170px; }
.precos th, .precos td { padding: .45rem .35rem; }
.w-num { width: 92px; text-align: right; }
.w-un { width: 60px; }
.precos tfoot th { background: #f8f9fb; white-space: nowrap; }
details.incluir { margin-top: 1rem; }
details.incluir[open] summary { margin-bottom: .8rem; }
@media (max-width: 800px) {
  .etapas { grid-template-columns: repeat(2, 1fr); }
  .grade3 { grid-template-columns: 1fr; }
  .chk-form { grid-template-columns: 1fr; }
}
.qr { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; margin: 1rem 0; }
.qr img { border: 1px solid var(--borda); border-radius: 8px; background: #fff; }
.lado3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: .5rem 0; }
.chips.col { flex-direction: column; align-items: flex-start; margin-top: .4rem; }

.nota.especial { background: #0e3b32; color: #fff; }
.tag.verificar { background: #fff4e5; color: #b54708; }
.tag.especial-palavra { background: #e3f1d0; color: #0e3b32; }

.caixa-exclusao { border: 1px solid #fecdca; background: #fffbfa; border-radius: 8px; padding: .8rem 1rem; margin: .6rem 0 1rem; }
.chip.excluida { background: #fee4e2; color: #912018; }
.chip.excluida button { background: none; border: 0; color: #912018; cursor: pointer; font-weight: 700; padding: 0 0 0 .2rem; }
.autoria-marc + .autoria-marc { margin-top: .35rem; }
/* Lista suspensa com seleção múltipla */
.campo { display: flex; flex-direction: column; gap: .25rem; font-weight: 500; font-size: .9rem; min-width: 0; }
details.multi { position: relative; font-weight: 400; }
details.multi summary { list-style: none; cursor: pointer; padding: .5rem 2rem .5rem .6rem; border: 1px solid #cdd2da; border-radius: 7px; background: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
details.multi summary::-webkit-details-marker { display: none; }
details.multi summary::after { content: '⌄'; position: absolute; right: .7rem; top: .3rem; }
details.multi[open] summary { border-color: #1e7a4c; }
details.multi .opcoes { position: absolute; z-index: 20; left: 0; right: 0; min-width: 14rem; max-height: 18rem; overflow: auto; background: #fff; border: 1px solid #cdd2da; border-radius: 7px; box-shadow: 0 6px 18px rgba(0,0,0,.12); padding: .4rem .6rem; margin-top: .2rem; display: flex; flex-direction: column; gap: .3rem; }
details.multi .opcoes .check { font-weight: 400; display: flex; gap: .4rem; align-items: center; }
details.multi .opcoes input { width: auto; }
details.multi .limpar { align-self: flex-start; margin-top: .2rem; }
/* Listas longas em 2 ou 3 colunas (quando cabe na tela) */
details.multi .opcoes.col2, details.multi .opcoes.col3 { display: grid; gap: .3rem 1rem; right: auto; width: max-content; max-width: calc(100vw - 2rem); max-height: 24rem; }
details.multi .opcoes.col3 { grid-template-columns: repeat(3, minmax(4.5rem, max-content)); }
details.multi .opcoes.col2 { grid-template-columns: repeat(2, minmax(10rem, max-content)); }
details.multi .opcoes.col2 .limpar, details.multi .opcoes.col3 .limpar { grid-column: 1 / -1; justify-self: start; }
details.multi .opcoes.a-direita { left: auto; right: 0; }
@media (max-width: 600px) { details.multi .opcoes.col2 { grid-template-columns: 1fr; width: auto; left: 0; right: 0; } }
/* Equipe do bid e Análise Inicial */
.equipe-bid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 1.5rem; }
.equipe-bid h2 { margin-top: 0; }
.equipe-bid select { width: auto; max-width: 100%; }
.pareceres-mini .tag { margin: 0 .2rem .3rem 0; }
.pedir-analise { margin-top: .8rem; }
.pedir-analise summary { list-style: none; display: inline-block; cursor: pointer; }
.pedir-analise summary::-webkit-details-marker { display: none; }
.pedir-analise[open] summary.btn { display: none; }
.parecer-txt { white-space: pre-wrap; max-width: 420px; }
.equipes-check { display: inline-flex; gap: .7rem; flex-wrap: wrap; }
.equipes-form { display: flex; flex-direction: column; gap: .15rem; font-size: .85rem; }
.equipes-form .check, .equipes-check .check { display: flex; gap: .3rem; align-items: center; font-weight: 400; }
.equipes-form input, .equipes-check input { width: auto; }
@media (max-width: 760px) { .equipe-bid { grid-template-columns: 1fr; } }

[hidden] { display: none !important; }
.equipes-status { min-height: 1em; font-size: .8rem; }
.equipes-status.ok { color: #15803d; }
.equipes-status.salvando { color: #6b7280; }
.equipes-status.erro { color: #b91c1c; }

/* Perfil → "Histórico de modificação" */
.historico-rodape { display: flex; justify-content: flex-end; margin-top: 1rem; }
.btn.preto { background: #111; color: #fff; }
.btn.preto:hover { background: #333; }
.dlg-historico { width: min(900px, calc(100vw - 32px)); max-height: calc(100vh - 64px); border: 0; border-radius: 10px; padding: 1.2rem 1.4rem; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.dlg-historico::backdrop { background: rgba(0,0,0,.45); }
.dlg-historico .fechar { position: absolute; top: .6rem; right: .8rem; background: none; border: 0; font-size: 1.2rem; cursor: pointer; }
.dlg-historico h2 { margin-top: 0; padding-right: 2rem; }
.tabela-rolagem { overflow-x: auto; }
.historico .nowrap { white-space: nowrap; }
.hist-acao { display: inline-block; font-size: .8rem; font-weight: 600; padding: .1rem .45rem; border-radius: 5px; white-space: nowrap; }
.hist-acao.incluido { background: #e3f6e8; color: #146c2e; }
.hist-acao.excluido { background: #fde8e7; color: #b42318; }
.hist-acao.modificado { background: #fff4d6; color: #8a5a00; }
/* Assistente do perfil */
.ass-chamada { background: #f3f7ea; border-color: #d7e6c4; }
.ass-grade { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
.ass-chat { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.ass-topo { padding: .6rem 1rem; border-bottom: 1px solid var(--borda); }
.ass-msgs { height: min(62vh, 640px); overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; background: #fafbfc; }
.ass-msg { display: flex; }
.ass-msg.eu { justify-content: flex-end; }
.ass-msg .balao { max-width: 82%; padding: .6rem .85rem; border-radius: 12px; background: #fff; border: 1px solid var(--borda); overflow-wrap: anywhere; }
.ass-msg.eu .balao { background: var(--pri); color: #fff; border-color: var(--pri); white-space: pre-wrap; }
.ass-msg .balao p { margin: 0 0 .5rem; } .ass-msg .balao p:last-child { margin-bottom: 0; }
.ass-msg .balao ul { margin: .2rem 0 .5rem; padding-left: 1.2rem; }
.ass-cartao { display: flex; justify-content: space-between; gap: .8rem; align-items: center; flex-wrap: wrap; border: 1px solid #d7e6c4; border-left: 4px solid var(--pri); background: #fff; border-radius: 8px; padding: .6rem .8rem; margin-left: .2rem; }
.ass-cartao.st-aceita { border-left-color: var(--ok); opacity: .85; }
.ass-cartao.st-recusada { border-left-color: var(--muted); opacity: .7; }
.ass-cartao-txt { display: grid; gap: .15rem; flex: 1; min-width: 200px; }
.ass-cartao-acoes { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.ass-cartao-acoes .btn { padding: .35rem .8rem; font-size: .88rem; }
.ass-pendentes { display: grid; gap: .5rem; }
.ass-pendentes .ass-cartao { margin-left: 0; }
.ass-form { display: flex; gap: .5rem; padding: .7rem; border-top: 1px solid var(--borda); }
.ass-form textarea { flex: 1; resize: vertical; min-height: 2.6rem; font: inherit; padding: .5rem .6rem; border: 1px solid var(--borda); border-radius: 8px; }
.ass-conversas { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; font-size: .9rem; }
.ass-conversas li.on a { font-weight: 700; }
.digitando .balao span:not(.muted) { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: var(--muted); animation: ass-pulso 1s infinite ease-in-out; }
.digitando .balao span:nth-child(2) { animation-delay: .15s; } .digitando .balao span:nth-child(3) { animation-delay: .3s; }
@keyframes ass-pulso { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
@media (max-width: 900px) { .ass-grade { grid-template-columns: 1fr; } .ass-msgs { height: 60vh; } .ass-msg .balao { max-width: 92%; } }

/* ===================== Tema LicitaOK 2026 ===================== */
body { background: var(--bg); font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--verde); }
h1 { font-family: var(--serif); font-weight: 400; font-size: 2.6rem; line-height: 1.05; letter-spacing: -.01em; margin: .2rem 0 1.1rem; }
h2 { letter-spacing: -.01em; }
.serif { font-family: var(--serif); font-weight: 400; }
.destaque { color: var(--verde); }

/* Topo */
.topo { background: var(--pri); margin-bottom: 1.8rem; }
.topo-in { min-height: 68px; gap: 1.4rem; }
.marca { display: inline-flex; align-items: center; gap: .5rem; color: #fff; font-size: 1.3rem; letter-spacing: -.03em; }
.marca span { color: var(--lima); }
.marca i { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--lima); color: var(--pri); font-style: normal; font-size: .95rem; font-weight: 800; }
.menu a { color: #bfd3cb; padding: .45rem .85rem; border-radius: 999px; }
.menu a.on, .menu a:hover { background: rgba(255,255,255,.1); }
.menu .badge { background: var(--lima); color: var(--pri); }
.quem { gap: .7rem; }
.quem .nome { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.quem small { color: #9fb9ae; }
.quem .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--lima); color: var(--pri); display: grid; place-items: center; font-weight: 700; flex: none; }
.quem .avatar:hover { text-decoration: none; }
.quem .link { color: #bfd3cb; }

/* Cartões, botões, campos */
.card, .item, .tabela { border-radius: var(--raio); }
.card { padding: 1.4rem 1.5rem; }
.btn { border-radius: 999px; padding: .6rem 1.2rem; background: var(--pri); }
.btn:hover { background: var(--pri-escuro); }
.btn.sec { background: transparent; color: var(--txt); border: 1px solid var(--borda); }
.btn.sec:hover { background: var(--creme2); }
.btn.lima { background: var(--lima); color: var(--pri); }
.btn.lima:hover { background: #b6e255; }
.btn.perigo { background: transparent; color: var(--danger); border: 1px solid #efc9c4; }
.btn.perigo:hover { background: #fbe9e6; }
input, select, textarea, details.multi summary, details.multi .opcoes { border-color: var(--borda); border-radius: 12px; background: var(--card); }
input, select, textarea { padding: .6rem .8rem; }
details.multi summary { padding: .6rem 2rem .6rem .8rem; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(30,122,76,.18); border-color: var(--verde); }
details.multi[open] summary { border-color: var(--verde); }
.tabela th { background: #f6f2e8; }
.flash { border-radius: 12px; }

/* Abas como seletor segmentado */
.abas { display: inline-flex; gap: 4px; background: var(--creme2); border-radius: 999px; padding: 4px; border: 0; margin-bottom: 1.2rem; }
.abas a { border: 0; margin: 0; padding: .45rem 1rem; border-radius: 999px; font-weight: 600; font-size: .92rem; }
.abas a.on { background: var(--card); color: var(--txt); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* Etiquetas e notas */
.tag { font-weight: 500; font-size: .78rem; padding: .2rem .65rem; background: var(--creme2); color: #3c4540; }
.tag.claro, .tag.muted { background: var(--creme2); color: #4a524d; }
.tag.ok { background: #ddf3e3; color: #14613a; }
.tag.warn { background: #fbebcf; color: #8a5200; }
.tag.danger { background: #f9dedb; color: var(--danger); }
.tag.fav { background: #eee6ff; color: var(--fav); }
.nota { background: var(--creme2); color: #4a524d; }
.nota.n5, .nota.especial { background: var(--lima); color: var(--pri); }
.nota.n4 { background: #2e6b5a; color: #fff; }
.nota.n3 { background: #fbebcf; color: #8a5200; }

/* Página de licitações */
.pagina-topo { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.pagina-topo h1 { margin: .1rem 0 0; }
.pagina-topo .abas { margin: 0; }
.filtros .busca { border-radius: 999px; padding: .8rem 1.2rem; }
.resultado-topo p strong { font-size: 1.05rem; }

/* Item da lista: nota | conteúdo | valor e prazo */
.item { display: grid; grid-template-columns: 68px minmax(0, 1fr) 200px; gap: 1.2rem; align-items: center; padding: 1.2rem 1.4rem; background: var(--card); }
.item:hover { border-color: #cfc6b2; box-shadow: 0 6px 20px rgba(16,32,28,.06); }
.item-nota { text-align: center; }
.item-nota small { display: block; color: var(--muted); font-size: .7rem; margin-top: .3rem; }
.nota-circ { display: grid; place-items: center; width: 54px; height: 54px; margin: auto; border-radius: 50%; font-weight: 700; font-size: 1.2rem; background: var(--creme2); color: #4a524d; }
.nota-circ.n5, .nota-circ.especial { background: var(--lima); color: var(--pri); }
.nota-circ.n4 { background: #2e6b5a; color: #fff; }
.nota-circ.n3 { background: #fbebcf; color: #8a5200; }
.nota-circ.vazia { background: transparent; border: 1px dashed var(--borda); color: var(--muted); font-size: .8rem; }
.item-topo { margin-bottom: .45rem; }
.item h3 { font-size: 1.04rem; line-height: 1.35; letter-spacing: -.01em; margin: 0; }
.item p.muted { font-size: .88rem; margin-top: .25rem; }
.item-valor { text-align: right; border-left: 1px solid var(--borda); padding-left: 1.2rem; display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; }
.item-valor .valor { font-family: var(--serif); font-size: 1.75rem; line-height: 1; }
.item-valor small { color: var(--muted); font-size: .78rem; }

/* Detalhe da licitação */
.det-grade { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1.5rem; align-items: start; }
.det-grade > aside { display: grid; gap: 1rem; }
.objeto { font-family: var(--serif); font-size: 2.6rem; line-height: 1.05; margin: .8rem 0 .5rem; }
.numeros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.numeros small { display: block; color: var(--muted); font-size: .8rem; }
.numeros strong { font-weight: 600; }
.numeros .grande { font-family: var(--serif); font-weight: 400; font-size: 1.9rem; line-height: 1.1; }
.painel-escuro { background: var(--pri); color: #fff; border: 0; }
.painel-escuro h2 { color: #fff; }
.painel-escuro .muted, .painel-escuro small { color: #9fb9ae; }
.ader-cnpj { display: flex; gap: .9rem; align-items: center; padding: .8rem 0; border-top: 1px solid rgba(255,255,255,.12); }
.ader-cnpj:first-of-type { border-top: 0; padding-top: .2rem; }
.ader-cnpj .nota-circ { margin: 0; flex: none; }
.ader-cnpj .nota-circ.n2, .ader-cnpj .nota-circ.n1 { background: rgba(255,255,255,.12); color: #fff; }
.ader-cnpj p { margin: .25rem 0 0; font-size: .88rem; color: #d6e4dd; }
.rotulo-sec { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 .5rem; }

/* Login e cadastro em duas metades */
body.tela-dividida { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.lado-marca { background: var(--pri); color: #fff; padding: 48px 64px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.lado-marca::after { content: ""; position: absolute; left: -200px; bottom: -260px; width: 700px; height: 700px; border-radius: 50%; background: radial-gradient(circle, rgba(200,241,105,.2), transparent 65%); pointer-events: none; }
.lado-marca .frase { font-family: var(--serif); font-size: 3.2rem; line-height: 1.05; position: relative; z-index: 1; max-width: 560px; }
.lado-marca .frase em { color: var(--lima); }
.lado-marca ul { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .6rem; color: #d6e4dd; position: relative; z-index: 1; }
.lado-marca li::before { content: "✓"; color: var(--lima); font-weight: 700; margin-right: .6rem; }
.lado-form { display: grid; place-items: center; padding: 48px 32px; }
.lado-form > div { width: min(420px, 100%); }
.lado-form .form { gap: 1rem; }
.lado-form .btn { width: 100%; padding: .85rem; justify-self: stretch; }
.lado-form .rodape { padding: 1.5rem 0 0; text-align: left; }

/* Página inicial (visitante) */
.home { background: var(--bg); }
.home .w { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.home-hero { background: var(--pri); color: #fff; border-radius: 0 0 40px 40px; overflow: hidden; position: relative; padding-bottom: 72px; }
.home-hero::after { content: ""; position: absolute; right: -180px; top: -120px; width: 720px; height: 720px; border-radius: 50%; background: radial-gradient(circle, rgba(200,241,105,.2), transparent 65%); pointer-events: none; }
.home-nav { display: flex; align-items: center; gap: 1.5rem; height: 84px; position: relative; z-index: 1; }
.home-nav .esp { flex: 1; }
.home-nav a { color: #fff; }
.home-hero h1 { font-size: clamp(3rem, 7vw, 5.8rem); line-height: .98; margin: 3.5rem 0 1.4rem; max-width: 900px; position: relative; z-index: 1; }
.home-hero h1 em { color: var(--lima); }
.home-hero .lead { font-size: 1.2rem; color: #c9d9d2; max-width: 580px; position: relative; z-index: 1; }
.home-hero .ctas { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 2rem; position: relative; z-index: 1; }
.home-hero .btn.sec { color: #fff; border-color: rgba(255,255,255,.3); }
.home-hero .btn.sec:hover { background: rgba(255,255,255,.08); }
.home-sec { padding: 96px 0 40px; }
.olho { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--verde); font-weight: 600; }
.home-sec h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.3rem, 4.5vw, 3.6rem); line-height: 1.02; margin: .7rem 0 2.6rem; max-width: 760px; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.bento > div { padding: 28px; border-radius: 24px; background: var(--card); border: 1px solid var(--borda); grid-column: span 2; }
.bento > .larga { grid-column: span 3; }
.bento h3 { font-size: 1.3rem; letter-spacing: -.02em; margin: .8rem 0 .4rem; }
.bento p { color: var(--muted); margin: 0; }
.bento .escuro { background: var(--pri); color: #fff; border: 0; }
.bento .escuro p { color: #bfd3cb; }
.bento .limao { background: var(--lima); border: 0; }
.bento .limao p { color: #2c4a3f; }
.escala { display: flex; gap: 8px; margin-top: 24px; }
.escala span { flex: 1; height: 84px; border-radius: 12px; background: rgba(255,255,255,.08); display: flex; align-items: flex-end; padding: 10px; font-size: .78rem; color: #9fb9ae; }
.escala span:nth-child(4) { background: #4b8a5e; color: #fff; }
.escala span:nth-child(5) { background: var(--lima); color: var(--pri); font-weight: 700; }
.etapas-home { display: grid; grid-template-columns: repeat(6, 1fr); margin-top: 1.4rem; }
.etapas-home div { padding: 1rem 1rem 0 0; border-top: 2px solid var(--pri); font-size: .92rem; }
.etapas-home b { display: block; font-size: .8rem; color: var(--verde); }
.home-rodape { padding: 64px 0 40px; color: var(--muted); font-size: .85rem; }

@media (max-width: 900px) {
  h1, .objeto { font-size: 2rem; }
  .item { grid-template-columns: 52px minmax(0, 1fr); gap: .9rem; padding: 1rem; }
  .nota-circ { width: 46px; height: 46px; font-size: 1.05rem; }
  .item-nota small { display: none; }
  .item-valor { grid-column: 2; border: 0; padding: 0; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; width: 100%; }
  .item-valor small { order: 3; width: 100%; text-align: left; }
  .det-grade { grid-template-columns: 1fr; }
  .numeros { grid-template-columns: 1fr 1fr; }
  body.tela-dividida { grid-template-columns: 1fr; }
  .lado-marca { padding: 28px 20px 36px; }
  .lado-marca .frase { font-size: 2.2rem; margin-top: 1.5rem; }
  .lado-marca ul, .lado-marca .pe { display: none; }
  .bento > div, .bento > .larga { grid-column: span 6; }
  .etapas-home { grid-template-columns: 1fr 1fr; gap: 1rem 0; }
  .home .w { padding: 0 20px; }
  .home-nav .menu-home { display: none; }
  .quem .nome { display: none; }
}
.item.simples { display: block; }
.item-valor .valor { white-space: nowrap; }
.marca { gap: 0; }
.marca i { margin-right: .5rem; }
.item { grid-template-columns: 68px minmax(0, 1fr) 230px; }
.item-valor small { white-space: nowrap; }
@media (max-width: 900px) {
  .topo-in { padding-top: .6rem; padding-bottom: .5rem; gap: .5rem 1rem; }
  .menu { order: 3; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .menu::-webkit-scrollbar { display: none; }
  .quem { margin-left: auto; }
}
@media (max-width: 900px) { .item { grid-template-columns: 52px minmax(0, 1fr); align-items: start; } }

/* Planos */
.planos-topo { margin: 1rem 0 1.2rem; }
.planos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.plano { background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); padding: 1.2rem; display: flex; flex-direction: column; gap: .4rem; }
.plano header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.plano h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.6rem; }
.plano.destaque { border-color: var(--pri); box-shadow: 0 0 0 1px var(--pri) inset; }
.plano.atual { background: #f3f9ef; }
.plano .preco { margin: .2rem 0; }
.plano .preco strong { font-size: 1.7rem; }
.plano .preco small { color: var(--muted); margin-left: .2rem; }
.plano ul { margin: .3rem 0 .8rem; padding-left: 1.1rem; flex: 1; }
.plano li { margin-bottom: .25rem; }
.plano-acao { display: grid; gap: .3rem; justify-items: start; }
.plano.destaque { color: var(--txt); }

.horas { margin: 1rem 0 2rem; }
.horas h2 { font-family: var(--serif); font-weight: 400; font-size: 1.8rem; margin-bottom: .3rem; }
.saldo-horas { background: var(--card); border: 1px solid var(--borda); border-radius: 10px; padding: .6rem .9rem; display: inline-block; }
.pacotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin: 1rem 0 1.5rem; }
.pacote { background: var(--card); border: 1px solid var(--borda); border-radius: var(--raio); padding: 1rem; }
.pacote h3 { margin: 0 0 .2rem; }
.pacote .preco { margin: 0; } .pacote .preco strong { font-size: 1.3rem; } .pacote .preco small { color: var(--muted); }
.pacote .muted { margin: .1rem 0 .6rem; }
.rolar { overflow-x: auto; }
.linha-form { display: flex; gap: .3rem; flex-wrap: wrap; align-items: center; margin-top: .3rem; }
.linha-form input, .linha-form select { width: auto; padding: .3rem .4rem; font-size: .85rem; }
/* Acompanhar pelo CNPJ (detalhe da licitação) */
.acompanhar-cnpj { display: flex; gap: .5rem; align-items: flex-end; flex-wrap: wrap; }
.acompanhar-cnpj label { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; font-weight: 600; }
.acompanhar-cnpj select { width: auto; max-width: 22rem; }
.cnpjs-form { gap: .35rem; }
/* Lista de Acompanhamento: etiquetas no topo, sem a grade de 3 colunas da lista de licitações */
.item.acomp { display: block; }
.item.acomp .item-topo { margin-bottom: .4rem; }
