/* ============ BASE ============ */
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
:focus-visible { outline: 2px solid var(--bl); outline-offset: 2px; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  background: var(--card);
  border: 1px solid #b9c5d8;
  border-radius: 8px;
  padding: 9px 12px;
  width: 100%;
  max-width: 100%;
  min-height: 42px;
  font-size: 15px;
}
input::placeholder, textarea::placeholder { color: #6b778d; opacity: 1; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--bl); box-shadow: 0 0 0 3px rgba(11, 79, 179, .18); }
input[type=checkbox] { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--bl); }
input[type=checkbox]:focus-visible { box-shadow: 0 0 0 3px rgba(11, 79, 179, .3); }
select {
  appearance: none;
  padding-right: 34px;
  text-overflow: ellipsis;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355627a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 18px;
}
textarea { min-height: 88px; resize: vertical; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: #083e8e; }
.btn.gold { background: var(--gd); color: var(--nv); }
.btn.gold:hover { background: #ffc13d; }
.btn.sec { background: var(--card); color: var(--foreground); border-color: #b9c5d8; }
.btn.sec:hover { background: var(--accent); border-color: var(--bl); }
.btn.big { min-height: 50px; padding: 12px 24px; font-size: 16px; }
.btn svg.i { width: 18px; height: 18px; }
.lnk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--bl);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
}
.lnk:hover { text-decoration: underline; text-underline-offset: 3px; }
.lnk svg.i { width: 17px; height: 17px; }
.ico {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted-foreground);
  flex: none;
}
.ico:hover { background: var(--accent); color: var(--bl); }
.ico.fav-on { color: #c98700; }
.ico.fav-on svg { fill: var(--gd); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--muted);
  color: #3c4a63;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}
.tag.rd { background: var(--destructive); color: var(--rd); }
.tag.am { background: var(--warning); color: var(--am); }
.tag.bl { background: var(--accent); color: var(--bl); }
.tag.pu { background: #efeafb; color: var(--pu); }
.tag.gr { background: var(--success); color: var(--gr); }
.demo { font-size: 13px; font-weight: 600; color: var(--am); }
.mu { color: var(--muted-foreground); font-size: 15px; margin: 6px 0; }
.row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.row.between { justify-content: space-between; }
.row > b { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.row > input { flex: 1 1 200px; width: auto; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.meta .lnk { margin-right: 10px; }
.ttl { cursor: pointer; }
.ttl:hover { color: var(--bl); }

/* ============ ESTRUTURA DA PLATAFORMA ============ */
.app { --lado: 264px; min-height: 100vh; }
.lado {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 12;
  width: var(--lado);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-right: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0px);
}
.lado-topo { display: flex; align-items: center; justify-content: space-between; padding: 16px 12px 12px 20px; }
.marca { padding: 0; border: 0; background: none; line-height: 0; }
.marca img { width: 188px; height: auto; }
.lado-x, .abre-menu { display: none; }
.tabs { flex: 1; overflow-y: auto; padding: 4px 12px 16px; scrollbar-width: thin; scrollbar-color: #c5d0e2 transparent; }
.tabs h2 { margin: 18px 10px 6px; font-size: 13px; font-weight: 600; color: var(--muted-foreground); }
.tabs h2:first-child { margin-top: 4px; }
.tabs button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #2b3a55;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
}
.tabs button svg { color: #64748f; }
.tabs button:hover { background: var(--background); }
.tabs button.on { background: var(--accent); color: var(--bl); font-weight: 700; }
.tabs button.on svg { color: var(--bl); }
.lado-pe { padding: 12px 20px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); font-size: 14px; }
.lado-pe b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lado-pe div { display: flex; gap: 18px; }
.lado-pe .lnk { font-size: 14px; }
.veu { display: none; }

.top, .app main, .app footer { margin-left: var(--lado); }
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: calc(14px + env(safe-area-inset-top, 0px)) 32px 14px;
  display: flex;
  align-items: center;
  gap: 12px 16px;
}
.top-t { flex: 1; min-width: 0; }
.top h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.top .lead { margin: 2px 0 0; color: var(--muted-foreground); font-size: 15px; }
.top .acts { display: flex; align-items: center; gap: 10px; flex: none; }
.estado { text-align: right; font-size: 13px; line-height: 1.4; color: var(--muted-foreground); }
.estado span { display: block; }
.app main { padding: 24px 32px 40px; }
.app main > * { max-width: 1240px; }
.app main.entra { animation: entra .25s var(--ease-out); }
@keyframes entra { from { opacity: 0; transform: translateY(6px); } }
.app footer { padding: 18px 32px 28px; border-top: 1px solid var(--border); color: var(--muted-foreground); font-size: 13px; }
.app footer p { margin: 0 0 4px; }

@media (max-width: 1023px) {
  .app { --lado: 0px; }
  .lado { width: min(300px, 86vw); visibility: hidden; transform: translateX(-100%); transition: transform .22s var(--ease-out), visibility .22s; }
  .lado-x, .abre-menu { display: inline-grid; }
  .menu-aberto .lado { visibility: visible; transform: none; box-shadow: var(--shadow-md); }
  .menu-aberto .veu { display: block; position: fixed; inset: 0; z-index: 11; background: rgba(6, 24, 56, .5); }
  .top { padding-left: 20px; padding-right: 20px; }
  .app main { padding: 20px 20px 32px; }
  .app footer { padding-left: 20px; padding-right: 20px; }
  .abre-menu { margin-left: -8px; }
}
@media (max-width: 640px) {
  .top { padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 8px; gap: 8px; }
  .top h1 { font-size: 19px; }
  .top .lead, .estado, .top .btn span { display: none; }
  .top .btn { width: 42px; padding: 0; }
  .app main { padding: 16px 16px 32px; }
  .app footer { padding-left: 16px; padding-right: 16px; }
}

/* ============ BLOCOS ============ */
.app main h2, .modal h2 { font-size: 18px; font-weight: 700; margin: 32px 0 12px; }
.app main h3 { font-size: 16px; margin: 28px 0 8px; }
.box, .card, .chart-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 14px;
  box-shadow: var(--shadow-sm);
}
.card .mu, .box .mu { overflow-wrap: anywhere; }
.box > p:last-child, .card > p:last-child { margin-bottom: 0; }
.box > :first-child { margin-top: 0; }
.app main > .box[role=status] { background: var(--accent); border-color: #b5cff5; color: #083e8e; font-weight: 500; }
#app:has(> .modal) main > .box[role=status] { position: fixed; z-index: 40; left: 16px; right: 16px; bottom: 16px; max-width: 600px; margin: 0 auto; box-shadow: var(--shadow-md); }
.empty { border: 1px dashed #b9c5d8; border-radius: var(--radius); padding: 28px 20px; margin: 0 0 14px; text-align: center; color: var(--muted-foreground); background: var(--card); }
td.empty { border: 0; border-radius: 0; }
details.box { padding: 0; }
details.box > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; }
details.box > summary::-webkit-details-marker, .pn summary::-webkit-details-marker { display: none; }
details.box > summary::after, .pn summary::after {
  content: "";
  width: 9px;
  height: 9px;
  margin: 0 4px 4px 0;
  flex: none;
  border: solid #64748f;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
details.box[open] > summary::after, .pn[open] summary::after { transform: rotate(225deg); margin-bottom: -4px; }
details.box > :not(summary) { margin-left: 20px; margin-right: 20px; }
details.box > :last-child { margin-bottom: 18px; }
details.box > input:not([type=checkbox]) { width: calc(100% - 40px); }
.grid2 { display: grid; gap: 14px 16px; }
.grid2 > .box, .grid2 > .card, .grid2 > .empty { margin: 0; }
.grid2 > .empty { grid-column: 1 / -1; }
@media (min-width: 640px) { .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid2 label, .campo { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: #2b3a55; margin: 0; }
.grid2 label input, .grid2 label select, .campo textarea { font-weight: 400; color: var(--foreground); }
.campo { margin-top: 14px; }
.marca-c, .chk { display: flex; gap: 10px; align-items: center; min-height: 34px; font-size: 15px; font-weight: 400; cursor: pointer; }
.grid2 .marca-c { flex-direction: row; align-self: end; min-height: 42px; }
.chk { align-items: flex-start; padding: 6px 0; }
.chk input { margin-top: 2px; }
.marcas { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 14px 0; }
.saida { margin-top: 14px; padding: 14px; background: var(--background); border: 1px solid var(--border); border-radius: 8px; overflow-wrap: anywhere; }
.saida:empty { display: none; }
.saida.escura { background: var(--nv); color: #fff; border: 0; overflow-x: auto; }
.dados { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; margin: 12px 0 0; font-size: 15px; }
.dados dt { color: var(--muted-foreground); }
.dados dd { margin: 0; text-align: right; font-weight: 500; overflow-wrap: anywhere; }
.cmp-card details { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; font-size: 15px; }
.cmp-card summary { cursor: pointer; font-weight: 600; color: var(--bl); }
.cmp-card details p { margin: 10px 0 0; }

.table-wrapper { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
th { background: var(--background); color: #3c4a63; font-size: 14px; font-weight: 600; white-space: nowrap; }
td .btn { min-height: 36px; padding: 5px 12px; }

/* Indicadores */
.kpi-strip, .stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
@media (min-width: 860px) { .kpi-strip, .stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); } }
@media (min-width: 860px) { .kpi-strip:has(> :nth-child(6)) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1360px) { .kpi-strip:has(> :nth-child(6)) { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.kpi, .stats > * { display: block; width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); text-align: left; }
button.kpi:hover { border-color: var(--bl); }
.kpi b, .stats b { display: block; font-size: 26px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi span, .stats span { color: var(--muted-foreground); font-size: 15px; }
.saida .stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin: 0; }
.saida .stats b { font-size: 20px; }
.kpi.urg b { color: var(--rd); }
@media (max-width: 480px) { .kpi, .stats > * { padding: 14px; } .kpi b, .stats b { font-size: 22px; } }

/* ============ CARTÃO DE EDITAL ============ */
.lic { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 0 24px; padding: 0; overflow: hidden; }
.lic-c { padding: 18px 0 14px 20px; }
.lic-c .meta { margin: 0; gap: 6px; }
.app main .lic h3 { font-size: 17px; font-weight: 600; line-height: 1.4; margin: 10px 0 6px; text-wrap: pretty; }
.lic h3 button { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; width: 100%; padding: 0; border: 0; background: none; font-weight: inherit; text-align: left; }
.lic-v { padding: 18px 20px; border-left: 1px solid var(--border); margin: 16px 0; padding-block: 2px; }
.lic-v dt { color: var(--muted-foreground); font-size: 14px; }
.lic-v dd { margin: 0 0 12px; font-size: 18px; font-weight: 700; line-height: 1.3; font-variant-numeric: tabular-nums; }
.lic-v dd:last-child { margin: 0; }
.lic-v small { display: block; font-size: 14px; font-weight: 600; color: var(--muted-foreground); }
.lic-v small.rd { color: var(--rd); }
.lic-v small.am { color: var(--am); }
.lic-v small.bl { color: var(--bl); }
.lic-a { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; padding: 8px 12px 8px 20px; border-top: 1px solid var(--border); background: #fafbfe; }
.lic-a .ico { margin-left: auto; }
.lic-a .btn { min-height: 38px; }
@media (max-width: 720px) {
  .lic { grid-template-columns: minmax(0, 1fr); }
  .lic-c { padding: 16px 16px 4px; }
  .lic-v { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: column; grid-template-rows: auto auto; gap: 0 12px; border: 0; margin: 6px 0 14px; padding: 0 16px; }
  .lic-v dd { margin: 0; font-size: 16px; }
  .lic-a { padding: 8px 8px 8px 16px; gap: 4px 16px; }
}

/* ============ BUSCA ============ */
.busca { display: flex; gap: 10px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 10px; box-shadow: var(--shadow-sm); }
.busca label { position: relative; flex: 1; min-width: 0; }
.busca label svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--muted-foreground); pointer-events: none; }
.busca input:not([type=checkbox]) { min-height: 50px; padding-left: 46px; font-size: 17px; border-color: transparent; text-overflow: ellipsis; }
.busca input:not([type=checkbox]):focus { border-color: var(--bl); }
.busca-d { margin: 10px 2px 20px; }
.resultado { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 24px; align-items: start; }
.filtros { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.filtros > div { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.filtros > div:last-child { border: 0; }
.filtros .cab { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding-block: 8px; font-size: 16px; font-weight: 700; }
.filtros .campo { margin: 0 0 12px; }
.filtros .campo:last-child { margin: 0; }
.filtros .campo select, .filtros .campo input { font-weight: 400; }
.par { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pn { border-bottom: 1px solid var(--border); }
.pn summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 10px 18px; font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 18px 16px; }
.chip { min-height: 34px; padding: 4px 11px; border: 1px solid #b9c5d8; border-radius: 8px; background: var(--card); font-size: 14px; text-align: left; }
.chip:hover { border-color: var(--bl); background: var(--accent); }
.chip i { font-style: normal; color: var(--muted-foreground); margin-left: 6px; font-variant-numeric: tabular-nums; }
.chip.zero:not(.on) { border-color: var(--border); color: #6b778d; }
.chip.on { background: var(--bl); border-color: var(--bl); color: #fff; }
.chip.on i { color: #d6e4fa; }
.res-t { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; min-height: 42px; }
.res-t b { font-size: 17px; }
.res-t label { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted-foreground); }
.res-t select { width: auto; color: var(--foreground); }
.abre-f { display: none; }
.extras { margin-top: 36px; }
@media (max-width: 1180px) {
  .resultado { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .abre-f { display: inline-flex; width: 100%; }
  .filtros { display: none; }
  .filtros.aberto { display: block; }
}
@media (max-width: 640px) {
  .busca { flex-direction: column; }
  .busca input:not([type=checkbox]) { font-size: 16px; border-color: #b9c5d8; }
  .res-t label, .res-t select { flex: 1; }
}

/* ============ ACOMPANHAMENTO ============ */
.kan { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 14px; align-items: start; }
.kan section { background: var(--muted); border-radius: var(--radius); padding: 12px; }
.app main .kan h3 { display: flex; justify-content: space-between; margin: 2px 4px 12px; font-size: 15px; }
.kan h3 span { color: var(--muted-foreground); font-weight: 600; }
.kan .card { padding: 14px; margin-bottom: 10px; }
.kan .card .row { flex-wrap: nowrap; align-items: flex-start; }
.kan .card .row > b { flex: 1; font-size: 15px; font-weight: 600; line-height: 1.4; }
.kan .ico { margin: -8px -8px 0 0; }

/* ============ FICHA ============ */
.modal { position: fixed; inset: 0; background: var(--background); overflow: auto; z-index: 20; }
.modal .inner { max-width: 1000px; margin: 0 auto; padding: 0 24px calc(40px + env(safe-area-inset-bottom, 0px)); }
.sticky-bar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--background); padding: calc(14px + env(safe-area-inset-top, 0px)) 0 14px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.sticky-bar .fim { margin-left: auto; }
.modal .f-res { margin-bottom: 18px; }
.modal h1 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 8px; text-wrap: pretty; }
.ver { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; background: var(--card); margin: 0 0 14px; }
.ver > b { font-size: 18px; }
.ver.gr { background: var(--success); border-color: #b4dfc6; } .ver.gr > b { color: var(--gr); }
.ver.am { background: var(--warning); border-color: #f0d69a; } .ver.am > b { color: var(--am); }
.ver.rd { background: var(--destructive); border-color: #f3c2bf; } .ver.rd > b { color: var(--rd); }
.ver ul { margin: 8px 0; padding-left: 20px; }
@media (max-width: 640px) {
  .modal .inner { padding-left: 16px; padding-right: 16px; }
  .sticky-bar { flex-wrap: nowrap; gap: 6px; }
  .sticky-bar .so-g { display: none; }
  .sticky-bar .btn { min-width: 42px; padding: 8px 10px; }
  .modal .f-num b { font-size: 18px; }
  .modal h1 { font-size: 20px; }
}

/* ============ GRÁFICOS ============ */
.dash { display: grid; gap: 14px; margin: 14px 0; }
@media (min-width: 860px) { .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dash > * { margin: 0; min-width: 0; }
.dash > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.dash > .chart-card > svg { max-width: 640px; }
.app main .chart-card h3 { font-size: 16px; margin: 0 0 4px; }
.chart-card .sub2 { color: var(--muted-foreground); font-size: 14px; margin: 0 0 12px; }
.chart-card svg { width: 100%; height: auto; display: block; }
.donut { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.donut svg { width: 168px; flex: none; }
.donut-seg { transform: rotate(-90deg); transform-origin: center; }
.legend { flex: 1 1 170px; display: grid; gap: 8px; font-size: 15px; }
.legend span { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; }
.legend i { width: 12px; height: 12px; border-radius: 3px; }
.legend b { font-variant-numeric: tabular-nums; }
.gbar { display: grid; grid-template-columns: minmax(90px, 30%) minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; min-height: 34px; padding: 0; border: 0; background: none; font-size: 15px; text-align: left; }
.gbar i { height: 12px; border-radius: 4px; background: var(--chart-1); width: max(3px, var(--w, 0)); }
.gbar b { font-variant-numeric: tabular-nums; }
button.gbar:hover span { color: var(--bl); text-decoration: underline; }
.mapbox { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; margin: 14px 0; }
.mapbox svg { width: 100%; height: auto; display: block; border-radius: 8px; }
.route, .route-glow { fill: none; stroke: var(--bl); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: draw 1.4s var(--ease-out) forwards; }
.route-glow { stroke: rgba(11, 79, 179, .2); stroke-width: 9; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.dot { fill: var(--gd); stroke: var(--nv); stroke-width: 2; }

/* ============ FALE COMIGO ============ */
.int-list { border: 1px solid var(--border); border-radius: 8px; padding: 12px; max-height: 320px; overflow-y: auto; margin: 12px 0; background: var(--background); }
.int-msg { display: block; width: fit-content; max-width: 85%; padding: 10px 14px; border-radius: 10px; margin: 6px 0; background: var(--card); border: 1px solid var(--border); }
.int-you { background: var(--bl); border-color: var(--bl); color: #fff; margin-left: auto; }
.int-time { display: block; font-size: 13px; margin: 4px 0 0; color: inherit; opacity: .8; }

/* ============ PÁGINA INICIAL ============ */
.landing { --lp: 1200px; background: var(--card); }
.lp-top { position: sticky; top: 0; z-index: 30; background: var(--card); border-bottom: 1px solid var(--border); }
.lp-top-in, .lp-hero-in, .lp-section, .lp-foot-in { max-width: var(--lp); margin-inline: auto; padding-inline: 24px; }
.lp-top-in { display: flex; align-items: center; gap: 32px; min-height: 76px; }
.lp-logo { line-height: 0; flex: none; }
.lp-logo img { width: 172px; height: auto; }
.lp-nav { display: none; gap: 20px; white-space: nowrap; }
.lp-nav a { color: #2b3a55; font-weight: 500; text-decoration: none; }
.lp-nav a:hover { color: var(--bl); }
@media (min-width: 1200px) { .lp-nav { display: flex; } }
.lp-top .acts { margin-left: auto; display: flex; gap: 10px; }
.lp-hero { background: var(--nv); color: #fff; padding: 72px 0 80px; }
.lp-hero-in { display: grid; gap: 48px; align-items: center; }
.lp-hero-in > * { min-width: 0; }
@media (min-width: 1024px) { .lp-hero-in { grid-template-columns: 1.15fr 1fr; gap: 64px; } }
.lp-hero h1 { font-size: clamp(34px, 4.6vw, 54px); font-weight: 800; line-height: 1.08; letter-spacing: -.025em; margin: 0 0 18px; }
.lp-hero h1 em { font-style: normal; color: var(--gd); }
.lp-hero .lp-sub { font-size: 18px; line-height: 1.6; color: #cfdcf2; max-width: 56ch; margin: 0 0 28px; }
.lp-search { display: flex; gap: 8px; background: #fff; padding: 8px; border-radius: 14px; }
.lp-search input:not([type=checkbox]) { border: 0; flex: 1; min-width: 0; min-height: 50px; font-size: 17px; color: var(--foreground); text-overflow: ellipsis; }
.lp-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; font-size: 15px; color: #cfdcf2; }
.lp-quick button { min-height: 36px; padding: 4px 12px; border: 1px solid #4a6596; border-radius: 8px; background: none; color: #fff; font-size: 15px; }
.lp-quick button:hover { background: #17376f; border-color: #8aa5d6; }
.lp-prev { background: #fff; color: var(--foreground); border-radius: 16px; padding: 8px 22px 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
.lp-prev header { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; font-weight: 700; }
.lp-prev article { border-top: 1px solid var(--border); padding: 16px 0; }
.lp-prev h3 { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.lp-prev p { margin: 0; color: var(--muted-foreground); font-size: 15px; }
.lp-prev .meta { justify-content: space-between; }
.lp-section { padding-block: 80px 0; }
.lp-section h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 700; letter-spacing: -.02em; margin: 0 0 10px; }
.lp-section .lp-lead { font-size: 18px; color: var(--muted-foreground); max-width: 60ch; margin: 0 0 36px; }
.lp-steps { display: grid; gap: 32px; }
.lp-step .n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--gd); color: var(--nv); font-size: 18px; font-weight: 800; margin-bottom: 16px; }
.lp-step h3, .lp-feat h3 { margin: 0 0 8px; font-size: 18px; }
.lp-step p, .lp-feat p { margin: 0; color: var(--muted-foreground); }
@media (min-width: 760px) { .lp-steps { grid-template-columns: repeat(3, 1fr); gap: 48px; } }
.lp-feats { display: grid; gap: 36px 40px; }
@media (min-width: 640px) { .lp-feats { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .lp-feats { grid-template-columns: repeat(4, 1fr); } }
.lp-feat svg.i { width: 30px; height: 30px; color: var(--bl); margin-bottom: 14px; display: block; }
.lp-segs { display: flex; flex-wrap: wrap; gap: 10px; }
.lp-seg { min-height: 46px; padding: 8px 18px; border: 1px solid #b9c5d8; border-radius: 10px; background: var(--card); font-weight: 600; }
.lp-seg:hover { background: var(--accent); border-color: var(--bl); color: var(--bl); }
.lp-prat { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--border); display: grid; gap: 24px; }
.lp-prat h3 { margin: 0; font-size: 20px; }
.lp-prat ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 22px 48px; }
.lp-prat li { color: var(--muted-foreground); }
.lp-prat li b { display: block; color: var(--foreground); }
@media (min-width: 640px) { .lp-prat ul { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .lp-prat { grid-template-columns: 1fr 2.2fr; gap: 48px; } }
#recursos h2, #segmentos h2 { margin-bottom: 32px; max-width: 26ch; }
#segmentos h2 { max-width: none; }
/* Ciclo: no celular o texto abre embaixo da etapa; no computador, ao lado */
.lp-ciclo { border-top: 1px solid var(--border); }
.lp-et { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--border); background: none; color: inherit; font-size: 17px; font-weight: 600; text-align: left; }
.lp-et i { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--muted); font-style: normal; font-size: 15px; font-weight: 700; }
.lp-et:hover { background: var(--background); }
.lp-et[aria-expanded=true] { background: var(--accent); color: var(--bl); }
.lp-et[aria-expanded=true] i { background: var(--bl); color: #fff; }
.lp-et-t { background: var(--nv); color: #dbe6f8; padding: 24px 20px; }
.lp-et-t[hidden] { display: none; }
.lp-et-t h3 { display: none; margin: 0 0 14px; font-size: 26px; color: #fff; }
.lp-et-t p { margin: 0 0 14px; max-width: 56ch; }
.lp-et-t .d { font-size: 19px; line-height: 1.5; color: #fff; }
.lp-et-t .b { margin: 20px 0 0; font-size: 15px; color: var(--gd); }
@media (min-width: 860px) {
  .lp-ciclo { display: grid; grid-template-columns: 1fr 1.5fr; column-gap: 32px; border-top: 0; }
  .lp-et { grid-column: 1; }
  .lp-et-t { grid-column: 2; grid-row: 1 / span 7; border-radius: 16px; padding: 44px 48px; align-content: center; }
  .lp-et-t:not([hidden]) { display: grid; }
  .lp-et-t h3 { display: block; }
}
.lp-demo-t { margin: 0 0 16px; font-size: 17px; color: #3c4a63; }
.lp-demo { background: var(--background); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.lp-demo h3 { margin: 0 0 6px; font-size: 18px; }
.lp-demo .lic h3 { font-size: 17px; font-weight: 600; margin: 10px 0 6px; }
.lp-demo > :last-child { margin-bottom: 0; }
.lp-dec { display: grid; gap: 14px; margin-top: 18px; align-items: start; }
.lp-dec > * { margin: 0; }
.lp-demo .kan h3 { display: flex; justify-content: space-between; margin: 2px 4px 12px; font-size: 15px; }
.lp-demo .kan .card b { font-weight: 600; font-size: 15px; }
.lp-demo .kan .card p { margin: 6px 0 0; }
.lp-cert { margin: 0; padding: 0 20px; list-style: none; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.lp-cert li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; padding: 16px 0; }
.lp-cert li + li { border-top: 1px solid var(--border); }
.lp-cert b { flex: 1 1 220px; }
@media (min-width: 860px) { .lp-dec { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .lp-demo { padding: 14px; } }
.lp-duv .lp-det { margin: 0; border-bottom: 0; }
.lp-duv .lp-det:last-child { border-bottom: 1px solid var(--border); }
.lp-duv summary { font-size: 17px; }
@media (min-width: 900px) { .lp-duv { display: grid; grid-template-columns: 1fr 2fr; gap: 56px; } }
.lp-prisma { background: var(--nv); color: #cfdcf2; border-radius: 20px; padding: 36px 24px; display: grid; gap: 32px; }
.lp-prisma h2 { color: #fff; }
.lp-prisma p { font-size: 18px; margin: 0 0 24px; max-width: 54ch; }
.lp-prisma b { color: #fff; font-size: 18px; }
.lp-prisma ul { margin: 12px 0 0; padding: 0; list-style: none; }
.lp-prisma li { padding: 12px 0; border-top: 1px solid #2c4a80; }
@media (min-width: 860px) { .lp-prisma { grid-template-columns: 1.5fr 1fr; gap: 64px; padding: 52px 56px; align-items: center; } }
.lp-fils { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.lp-fil { min-height: 44px; padding: 6px 14px; border: 1px solid #b9c5d8; border-radius: 10px; background: var(--card); color: inherit; font-size: 15px; font-weight: 600; }
.lp-fil i { font-style: normal; font-weight: 500; color: var(--muted-foreground); }
.lp-fil:hover { border-color: var(--bl); }
.lp-fil[aria-pressed=true] { background: var(--nv); border-color: var(--nv); color: #fff; }
.lp-fil[aria-pressed=true] i { color: #cfdcf2; }
.lp-leis { margin: 0; display: grid; column-gap: 56px; }
.lp-leis > div { border-top: 1px solid var(--border); padding: 18px 0; }
.lp-leis dt { font-weight: 700; }
.lp-leis dd { margin: 4px 0 0; color: #3c4a63; }
.lp-leis small { display: block; margin-top: 6px; font-size: 14px; color: var(--muted-foreground); }
@media (min-width: 760px) { .lp-leis { grid-template-columns: 1fr 1fr; } }
.lp-acc { display: grid; gap: 36px; }
.lp-acc p { font-size: 17px; color: #3c4a63; max-width: 62ch; }
.lp-acc figure { margin: 32px 0 0; }
.lp-acc blockquote { margin: 0 0 10px; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.35; font-weight: 700; color: var(--bl); text-wrap: balance; }
.lp-acc dl { margin: 0; align-self: center; }
.lp-acc dl > div { border-top: 1px solid var(--border); padding: 18px 0; }
.lp-acc dt { font-size: 18px; font-weight: 700; }
.lp-acc dd { margin: 4px 0 0; color: var(--muted-foreground); }
@media (min-width: 900px) { .lp-acc { grid-template-columns: 1.4fr 1fr; gap: 72px; } }
.lp-det { margin-top: 28px; border-block: 1px solid var(--border); }
.lp-det summary { padding: 16px 0; font-weight: 600; cursor: pointer; }
.lp-det p { max-width: 80ch; color: #3c4a63; margin: 0 0 14px; }
.lp-cits { display: grid; column-gap: 56px; }
.lp-cits figure { margin: 0; padding: 26px 0; border-top: 1px solid var(--border); outline-offset: 6px; }
.lp-cits blockquote { margin: 0 0 16px; font-size: 18px; line-height: 1.55; }
.lp-cits figcaption > * { display: block; }
.lp-cits figcaption span { color: #3c4a63; }
.lp-cits small { margin-top: 6px; font-size: 14px; color: var(--muted-foreground); overflow-wrap: anywhere; }
.lp-cits details { margin-top: 8px; font-size: 15px; }
.lp-cits summary { padding: 8px 0; cursor: pointer; color: var(--bl); }
.lp-cits details p { margin: 4px 0 0; color: #3c4a63; }
@media (min-width: 860px) { .lp-cits { grid-template-columns: 1fr 1fr; } }
.lp-mais { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 8px 0 0; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted-foreground); }
.lp-author { background: var(--background); border-radius: 16px; padding: 26px 28px; align-self: start; }
.lp-author > b { display: block; font-size: 18px; }
.lp-author > span { color: var(--muted-foreground); }
.lp-mail { margin: 16px 0 0; font-size: 17px; overflow-wrap: anywhere; }
.lp-cta { background: var(--nv); color: #fff; border-radius: 20px; padding: 52px 24px; text-align: center; margin: 72px 0 0; }
.lp-cta p { color: #cfdcf2; font-size: 18px; margin: 0 0 24px; }
.lp-foot { border-top: 1px solid var(--border); margin-top: 72px; padding: 26px 0 36px; color: var(--muted-foreground); font-size: 14px; }
.lp-foot-in { display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; }
@media (max-width: 640px) {
  .lp-top-in, .lp-hero-in, .lp-section, .lp-foot-in { padding-inline: 16px; }
  .lp-top-in { min-height: 64px; gap: 12px; }
  .lp-logo img { width: 136px; }
  .lp-top .acts .sec { display: none; }
  .lp-hero { padding: 44px 0 52px; }
  .lp-search { flex-direction: column; }
  .lp-search input:not([type=checkbox]) { flex: none; }
  .lp-section { padding-top: 60px; }
  .lp-prev { padding-inline: 16px; }
}

/* ============ CONTA ============ */
.conta { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.conta .box { width: 100%; max-width: 440px; padding: 36px 32px; margin: 0; box-shadow: var(--shadow-md); }
.conta img { display: block; width: 210px; height: auto; margin: 0 0 28px; }
.conta h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.01em; }
.conta form { display: grid; gap: 6px; margin-top: 18px; }
.conta form label { font-weight: 600; margin-top: 8px; }
.conta form input:not([type=checkbox]) { min-height: 48px; font-size: 16px; }
.conta form .btn { margin-top: 18px; }
.conta-erro, .conta-ok { padding: 12px 14px; border-radius: 8px; margin: 14px 0 0; }
.conta-erro { background: var(--destructive); color: var(--destructive-foreground); }
.conta-ok { background: var(--success); color: var(--success-foreground); }
.conta-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 18px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .app main.entra, .route, .route-glow { animation: none; }
  .route, .route-glow { stroke-dashoffset: 0; }
  .lado { transition: none !important; }
}

/* ============ IMPRESSÃO ============ */
#relprint { display: none; }
/* Logo com o site embaixo: relatórios e mensagens */
.marca-doc { width: fit-content; text-align: center; margin: 0 0 18px; }
.marca-doc img { display: block; width: 200px; height: auto; }
.marca-doc b { display: block; margin-top: 4px; font-size: 15px; color: var(--nv); }
/* Mensagens */
.ms-t { white-space: pre-wrap; overflow-wrap: anywhere; }
#ms_fio { max-height: 52vh; }
#ms_nova .campo + .campo, #ms_resp .campo { margin-top: 12px; }
#ms_nova textarea, #ms_resp textarea { width: 100%; }
#ms_nova .marca-c, #ms_resp .marca-c { margin-top: 10px; }
.novas { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 11px; background: #b3261e; color: #fff; font-size: 13px; font-weight: 700; text-align: center; }
.abre-menu { position: relative; }
.abre-menu.tem-nova::after { content: ""; position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: #b3261e; }
.lado-pe p { margin: 0; color: var(--muted-foreground); }
#ac_form label[hidden] { display: none; }
.ac-bts { margin: 0; flex-wrap: nowrap; }
.ac-bts .btn { padding: 6px 12px; min-height: 38px; font-size: 14px; }
@media print {
  html { background: #fff; color: #000; }
  .app, .modal, .landing, .conta { display: none !important; }
  #relprint { display: block; font-size: 12px; padding: 16px; }
  #relprint .marca-doc, #relprint .marca-doc b { color: #000; }
  #relprint h1 { font-size: 18px; }
  #relprint h2 { font-size: 14px; }
  #relprint table { font-size: 11px; margin: 6px 0; }
  #relprint th, #relprint td { border: 1px solid #999; padding: 5px 7px; }
  #relprint tr { break-inside: avoid; }
}

/* Preço de mercado (aba Concorrência) */
.mp > h2 { margin-top: 0; }
.mp h3 { margin: 22px 0 10px; font-size: 17px; }
.mp-linha { display: grid; gap: 12px; align-items: end; margin: 12px 0; }
.mp-linha label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: #2b3a55; margin: 0; min-width: 0; }
.mp-linha input, .mp-linha select { width: 100%; font-weight: 400; color: var(--foreground); }
@media (min-width: 640px) { .mp-linha { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1180px) {
  form > .mp-linha { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
  #mp_filtros { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.mp-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.mp-chips .btn { padding: 6px 12px; min-height: 36px; font-size: 14px; font-weight: 500; }
.stats > .mp-media { background: var(--nv); border-color: var(--nv); }
.stats > .mp-media b, .stats > .mp-media span { color: #fff; }
.mp-item .row > b { font-size: 18px; }
.mp-item small { font-size: 14px; font-weight: 400; color: var(--muted-foreground); }
.mp-item p { margin: 8px 0 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { #mp_out .stats b { font-size: 18px; white-space: nowrap; } #mp_out .stats > * { padding: 12px; } }

/* Calculadora de tributos por item (aba Contabilidade) */
.tr label { min-width: 0; }
.tr label select, .tr label input { width: 100%; min-width: 0; text-overflow: ellipsis; }
.tr label small { font-size: 13px; font-weight: 400; color: var(--muted-foreground); }
.tr-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-top: 16px; background: var(--card); min-width: 0; }
.tr .tr-item > .row { margin-top: 0; display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.tr .tr-item > .row h3 { margin: 0; font-size: 17px; }
.tr-busca, .tr-trat { position: relative; }
.tr-busca label, .tr-trat label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: #2b3a55; margin: 0; }
.tr-busca input, .tr-trat select, .tr-trat input { font-weight: 400; color: var(--foreground); }
.tr-lista { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; max-height: 340px; overflow-y: auto; background: var(--card); border-radius: 8px; box-shadow: var(--shadow-md); }
.tr-lista:not(:empty) { border: 1px solid #b9c5d8; margin-top: 4px; }
.tr-lista > p { margin: 0; padding: 12px 14px; }
.tr-lista button { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--border); background: none; font: inherit; font-size: 15px; text-align: left; color: var(--foreground); cursor: pointer; }
.tr-lista button:hover, .tr-lista button:focus-visible { background: var(--accent); }
.tr-lista button > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.tr-lista small, .tr-cod small { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 13px; color: var(--muted-foreground); }
.tr-lista .tag { flex: none; }
.tr-cod { margin-top: 12px; padding: 12px 14px; background: var(--background); border-radius: 8px; font-size: 15px; overflow-wrap: anywhere; }
.tr-cod small { margin: 4px 0; }
.tr-trat { margin-top: 12px; }
.tr-trat > .row { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 8px 12px; margin-bottom: 10px; font-size: 14px; }
.tr-trat label + label { margin-top: 12px; }
.tr-cond { margin: 10px 0 0; padding: 10px 14px; background: var(--warning); color: #5c3700; border-radius: 8px; font-size: 14px; overflow-wrap: anywhere; }
.tr-cond p { margin: 0; }
.tr-cond p + p { margin-top: 8px; }
.tr-campos { margin-top: 14px; align-items: start; }
@media (min-width: 1100px) { .tr-campos, #tr_geral .grid2 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tr-res:not(:empty) { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.tr-res dl { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; }
.tr-res dt { font-size: 13px; color: var(--muted-foreground); }
.tr-res dd { margin: 0; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tr-res .f dd { font-weight: 700; }
.tr-res p { margin: 8px 0 0; font-size: 14px; }
.tr-notas { margin: 14px 0 0; padding-left: 20px; font-size: 14px; color: var(--muted-foreground); }
.tr-notas li + li { margin-top: 4px; }
.tr-acoes { display: flex; flex-wrap: wrap; gap: 10px; }
.tr-fontes td { white-space: normal; }
.tr-salvo { min-width: 220px; white-space: normal; }
.tr-salvo summary { cursor: pointer; color: var(--bl); font-weight: 600; }
.tr-salvo p { margin: 8px 0 0; font-size: 14px; }
@media (max-width: 480px) { .tr-item { padding: 14px 12px; } .tr-lista button { flex-direction: column; gap: 6px; } }

/* Quem vence: ficha da empresa */
.vt-cnpj { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; border-top: 1px solid var(--border); padding-top: 16px; margin-top: 4px; }
.vt-cnpj label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: #2b3a55; margin: 0; flex: 1 1 220px; max-width: 320px; }
.vt-cnpj input { width: 100%; font-weight: 400; }
.vt-cols { display: grid; gap: 14px 16px; margin: 14px 0; }
.vt-cols > .box { margin: 0; min-width: 0; }
@media (min-width: 860px) { .vt-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.app main .vt-topo h2 { margin: 0 0 4px; overflow-wrap: anywhere; min-width: 0; }
.vt-cols h3:first-child, .vt-s-box h3 { margin-top: 0; }
.vt-c { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 0; }
.vt-c + .vt-c { border-top: 1px solid var(--border); }
.vt-g { font-weight: 600; color: var(--bl); overflow-wrap: anywhere; min-width: 0; }
.vt-s { padding: 8px 0; overflow-wrap: anywhere; }
.vt-s + .vt-s { border-top: 1px solid var(--border); }
.vt-s b, .vt-s > span { display: block; }
.vt-s > span { color: var(--muted-foreground); font-size: 15px; }
.vt-proc { margin: 14px 0 4px; }
.vt-anda { border-left: 4px solid var(--bl); }
.vt-lista { padding: 4px 16px; }
.vt-lista button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 12px 0; font: inherit; color: inherit; cursor: pointer; }
.vt-lista button + button { border-top: 1px solid var(--border); }
.vt-lista b { display: block; color: var(--bl); overflow-wrap: anywhere; }
.vt-lista span { color: var(--muted-foreground); font-size: 15px; }
#vt_out > .mu { margin: 14px 0; }

/* Busca automática */
.av-op { align-items: flex-start; padding: 10px 0; }
.av-op input { margin-top: 4px; flex: none; }
#av_smtp label[hidden] { display: none; }
#av_smtp { margin-top: 12px; }

/* ============ Operação: edital, tarefas, calendário ============ */
.ed h3 { margin: 18px 0 6px; font-size: 15px; }
.ed-a { border-top: 1px solid var(--border); padding: 10px 0; }
.ed-a .row { gap: 10px; flex-wrap: wrap; }
.ed-a select { width: auto; min-width: 140px; }
.ed-a.nao b { color: var(--am); }
.ed-a.feito { opacity: .72; }
.ed-x { font-size: 13.5px; line-height: 1.5; color: var(--muted-foreground); margin: 6px 0 0; overflow-wrap: anywhere; }
.ed-arq { cursor: pointer; }
.ed-arq:focus-within { outline: 2px solid var(--bl); outline-offset: 2px; }
.tf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--border); }
.tf:first-of-type { border-top: 0; }
.tf .chk { flex: 1 1 260px; min-height: 0; padding: 0; }
.tf > span:not(.tag) { flex: 1 1 240px; }
.tf.feito .chk span { text-decoration: line-through; color: var(--muted-foreground); }
.tf-novo { gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tf-novo input:not([type=date]) { flex: 1 1 220px; }
.tf-novo input[type=date] { flex: 0 1 170px; }
.cal-top { flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.cal-mes { min-width: 150px; text-align: center; font-size: 17px; }
.cal { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); overflow: hidden; margin-bottom: 18px; }
.cal-s, .cal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-s span { padding: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted-foreground); text-align: center; border-bottom: 1px solid var(--border); }
.cal-d { min-height: 96px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-d:nth-child(7n) { border-right: 0; }
.cal-d.vazio { background: var(--background); }
.cal-d.hoje { background: var(--accent); }
.cal-n { font-size: 13px; font-weight: 700; }
.cal-e { display: block; font-size: 11.5px; line-height: 1.3; padding: 2px 5px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--muted); }
.cal-e.bl { background: var(--accent); color: var(--bl); } .cal-e.pu { background: #efeafb; color: var(--pu); } .cal-e.am { background: var(--warning); color: var(--am); } .cal-e.gr { background: var(--success); color: var(--gr); } .cal-e.rd { background: var(--destructive); color: var(--rd); }
@media (max-width: 640px) {
  .cal-d { min-height: 54px; padding: 4px; }
  .cal-e { font-size: 0; height: 6px; padding: 0; }
  .cal-s span { padding: 6px 2px; font-size: 10.5px; }
}
.ed-g { border-top: 1px solid var(--border); padding: 4px 0; }
.ed-g > summary { cursor: pointer; padding: 10px 0; list-style-position: inside; }
.ed-g[open] > summary { padding-bottom: 4px; }
