/* Layout: portal de propostas — barra superior em azul-marinho Neuron; o documento é uma "folha" A4
   centralizada (o que vai para o PDF) com um painel lateral de negociação (observações, versões, assinatura).
   Dourado = marca e ações de assinatura. Serifada só nos títulos do documento. */
:root {
  --navy: #13233f;
  --navy-2: #1d3157;
  --gold: #b8892f;
  --gold-soft: #f6eedc;
  --paper: #f3f4f7;
  --sheet: #ffffff;
  --ink: #17202f;
  --ink-soft: #5d6677;
  --line: #dde1e8;
  --ok: #1f7a4d;
  --ok-soft: #e4f3ea;
  --warn: #9a5b00;
  --warn-soft: #fbf0d9;
  --bad: #b3261e;
  --bad-soft: #fbe8e6;
  --info: #24589b;
  --info-soft: #e5eefa;
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.55; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--info); }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 14px; font-weight: 500; cursor: pointer; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn:hover { border-color: #b9c0cc; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-soft); padding: 6px 8px; }
.btn.ghost:hover { color: var(--ink); background: #eef0f4; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.block { width: 100%; }
label.f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; color: var(--ink-soft); }
input.i, textarea.i, select.i { border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: #fff; width: 100%; }
textarea.i { resize: vertical; min-height: 90px; line-height: 1.45; }
.muted { color: var(--ink-soft); }
.mono { font-family: var(--font-mono); font-size: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-rascunho { background: #eceef2; color: #4b5363; }
.st-enviada { background: var(--info-soft); color: var(--info); }
.st-em_revisao { background: var(--warn-soft); color: var(--warn); }
.st-aguardando_assinatura { background: var(--gold-soft); color: #8a6420; }
.st-assinada { background: var(--ok-soft); color: var(--ok); }
.st-cancelada { background: var(--bad-soft); color: var(--bad); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 1fr) minmax(320px, 520px); }
.login .lado { background: var(--navy); color: #eef1f7; padding: clamp(32px, 6vw, 72px); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; position: relative; overflow: hidden; }
.login .lado::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 1px solid rgba(212, 166, 74, .25); box-shadow: 0 0 0 60px rgba(212, 166, 74, .05), 0 0 0 130px rgba(212, 166, 74, .03); }
.marca { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 600; font-size: 26px; letter-spacing: .01em; }
.marca img { width: 40px; height: 40px; }
.login h1 { font-family: var(--font-display); font-weight: 500; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.12; max-width: 18ch; }
.login .passos { display: grid; gap: 14px; max-width: 46ch; color: #c7cfdd; }
.login .passos div { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: start; }
.login .passos b { font-family: var(--font-mono); color: #d4a64a; font-weight: 500; }
.login .form { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 5vw, 64px); gap: 16px; background: #fff; }
.login .form h2 { font-family: var(--font-display); font-weight: 600; font-size: 28px; }
.erro { background: var(--bad-soft); color: var(--bad); border-radius: 8px; padding: 9px 12px; font-size: 14px; }
@media (max-width: 820px) { .login { grid-template-columns: 1fr; } .login .lado { min-height: auto; } }

/* ---------- moldura ---------- */
.topo { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--navy); color: #fff; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px clamp(16px, 3vw, 28px); }
.topo .marca { font-size: 20px; color: #fff; text-decoration: none; }
.topo .marca img { width: 30px; height: 30px; }
.topo nav { display: flex; gap: 4px; flex-wrap: wrap; min-width: 0; }
.topo nav a { color: #c9d1df; text-decoration: none; padding: 6px 10px; border-radius: 6px; font-size: 14px; }
.topo nav a.ativo, .topo nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.topo .quem { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: #c9d1df; }
.topo .quem button { background: transparent; border: 1px solid rgba(255, 255, 255, .25); color: #fff; border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.pagina { max-width: 1240px; margin: 0 auto; padding: 28px clamp(16px, 3vw, 28px) 64px; display: flex; flex-direction: column; gap: 20px; }
.cab h1 { font-family: var(--font-display); font-weight: 600; font-size: 30px; }

/* lista */
.lista { display: grid; gap: 12px; }
.prop { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; text-decoration: none; color: inherit; }
.prop:hover { border-color: #aab3c2; }
.prop h3 { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.prop .meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-soft); }
.vazio { background: #fff; border: 1px dashed var(--line); border-radius: 12px; padding: 32px; text-align: center; color: var(--ink-soft); }

/* ---------- documento ---------- */
.doc-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 1100px) { .doc-wrap { grid-template-columns: minmax(0, 1fr); } }
.faixa-rascunho { background: var(--warn-soft); color: var(--warn); border: 1px solid #f0d9a8; border-radius: 10px; padding: 10px 14px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.folha { min-width: 0; background: var(--sheet); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06); padding: clamp(28px, 5vw, 64px) clamp(22px, 5vw, 72px); max-width: 880px; width: 100%; margin: 0 auto; }
.timbre { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 18px; border-bottom: 2px solid var(--navy); }
.timbre .marca { color: var(--navy); font-size: 22px; }
.timbre .marca img { width: 34px; height: 34px; }
.timbre .ref { text-align: right; font-size: 12px; color: var(--ink-soft); font-family: var(--font-mono); }
.capa { padding: 48px 0 36px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.capa .eye { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.capa h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 4.2vw, 44px); line-height: 1.1; color: var(--navy); overflow-wrap: anywhere; }
.capa .sub { font-size: 17px; color: var(--ink-soft); max-width: 60ch; }
.capa .partes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 12px; }
.capa .parte { border-left: 3px solid var(--gold); padding: 4px 0 4px 12px; font-size: 14px; }
.capa .parte span { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); font-family: var(--font-mono); }
.secao { padding-top: 34px; }
.secao > h2 { font-family: var(--font-display); font-weight: 600; font-size: 25px; color: var(--navy); display: flex; gap: 12px; align-items: baseline; margin-bottom: 14px; }
.secao > h2 .n { font-family: var(--font-mono); font-size: 14px; color: var(--gold); font-weight: 500; }
.bloco { position: relative; padding: 10px 10px 8px 52px; margin: 0 -10px 10px; border-radius: 8px; transition: background .15s; }
.bloco:hover { background: #fafbfc; }
.bloco .num { position: absolute; left: 10px; top: 11px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); }
.bloco.alterado { background: var(--gold-soft); box-shadow: inset 3px 0 0 var(--gold); }
.bloco.alterado .tag-alt { display: inline-block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: #8a6420; margin-bottom: 4px; }
.bloco .acoes { position: absolute; top: -13px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px; box-shadow: 0 2px 8px rgba(16,24,40,.08); z-index: 2; }
.bloco:hover .acoes, .bloco:focus-within .acoes, .bloco.com-obs .acoes { opacity: 1; }
.badge-obs { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 600; background: var(--warn-soft); color: var(--warn); border: 0; cursor: pointer; }
.badge-obs.ok { background: var(--ok-soft); color: var(--ok); }
.bloco p + p { margin-top: 10px; }
.bloco h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: var(--navy); }
.bloco ul { margin: 0; padding-left: 1.15em; display: grid; gap: 5px; }
.destaque { border: 1px solid #e8d6ae; background: var(--gold-soft); border-radius: 10px; padding: 16px 18px; }
.destaque h4 { font-family: var(--font-display); font-size: 18px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpis div { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.kpis b { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--navy); line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpis span { font-size: 13px; color: var(--ink-soft); }
.tab-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.tab-wrap table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.tab-wrap th { text-align: left; background: #f6f7f9; font-weight: 600; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); padding: 9px 12px; border-bottom: 1px solid var(--line); }
.tab-wrap td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tab-wrap tr:last-child td { border-bottom: 0; }
.tab-wrap td:last-child { font-variant-numeric: tabular-nums; }
.rodape-tab { font-size: 13px; color: var(--ink-soft); margin-top: 8px; }
.crono { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.fase { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; border-top: 3px solid var(--navy); }
.fase h4 { margin: 0; }
.fase .h { font-family: var(--font-mono); font-size: 12px; color: var(--gold); }
.fase ul { font-size: 14px; }
.fase .ent { margin-top: auto; font-size: 13px; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--ink-soft); }
.clausula h4 { display: inline; }
.clausula p { display: inline; }

/* observações inline */
.thread { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 12px; display: grid; gap: 10px; }
.obs { display: grid; gap: 4px; padding: 10px 12px; border-radius: 8px; background: #f8f9fb; }
.obs.neuron { background: #eef3fb; }
.obs .quem { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: var(--ink-soft); }
.obs .quem b { color: var(--ink); font-size: 13px; }
.obs .txt { white-space: pre-wrap; font-size: 14px; }
.obs .resp { margin-left: 14px; border-left: 2px solid var(--line); padding-left: 10px; display: grid; gap: 6px; }
.obs .ctrl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.so-st { font-size: 11px; font-weight: 600; border-radius: 999px; padding: 1px 8px; }
.so-aberto { background: var(--warn-soft); color: var(--warn); }
.so-respondido { background: var(--info-soft); color: var(--info); }
.so-incorporado { background: var(--ok-soft); color: var(--ok); }
.so-recusado { background: #eceef2; color: #4b5363; }
.so-resolvido { background: var(--ok-soft); color: var(--ok); }
.editor { display: grid; gap: 10px; margin-top: 8px; border: 1px solid #e8d6ae; background: #fffcf4; border-radius: 10px; padding: 12px; }

/* assinaturas no documento */
.assin { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 18px; }
.assin .caixa { border: 1px solid var(--line); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 6px; min-height: 180px; }
.assin .caixa .papel { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.assin .caixa img { max-height: 80px; max-width: 100%; object-fit: contain; align-self: flex-start; }
.assin .linha { border-top: 1px solid var(--ink); margin-top: auto; padding-top: 6px; font-size: 14px; }
.assin .pend { margin-top: auto; color: var(--ink-soft); font-size: 13px; font-style: italic; }
.cert { margin-top: 16px; font-size: 12px; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 10px; word-break: break-all; }

/* painel lateral */
.painel { position: sticky; top: calc(70px + env(safe-area-inset-top, 0px)); display: grid; gap: 14px; max-height: calc(100vh - 90px); overflow: auto; padding-bottom: 8px; }
@media (max-width: 1100px) { .painel { position: static; max-height: none; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 10px; }
.card h3 { font-size: 14px; font-weight: 600; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.kv dt { color: var(--ink-soft); }
.kv dd { margin: 0; text-align: right; }
.passo { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 13px; align-items: start; }
.passo i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); margin-top: 1px; }
.passo.feito i { background: var(--ok); border-color: var(--ok); }
.passo.atual i { border-color: var(--gold); background: var(--gold-soft); }
.obs-mini { display: grid; gap: 2px; font-size: 13px; padding: 8px 10px; border-radius: 8px; background: #f8f9fb; cursor: pointer; border: 0; text-align: left; width: 100%; }
.obs-mini:hover { background: #eef1f5; }
.versao { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.versao:last-child { border-bottom: 0; }
.ev { font-size: 12px; color: var(--ink-soft); display: grid; gap: 2px; padding: 6px 0; border-bottom: 1px solid #eef0f3; }

/* modal */
.modal-fundo { position: fixed; inset: 0; background: rgba(13, 22, 38, .55); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 14px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 22px; display: grid; gap: 14px; }
.modal h2 { font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
canvas.assinatura { width: 100%; height: 160px; border: 1px dashed #9aa3b2; border-radius: 10px; background: #fcfcfd; touch-action: none; cursor: crosshair; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }

#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; border-radius: 10px; padding: 10px 16px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 60; }
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- impressão / PDF ---------- */
@media print {
  @page { size: A4; margin: 16mm 14mm; }
  body { background: #fff; font-size: 11.5pt; }
  .topo, .painel, .faixa-rascunho, .bloco .acoes, .thread, .editor, .cab, #toast, .so-tela { display: none !important; }
  .pagina { padding: 0; max-width: none; }
  .doc-wrap { display: block; }
  .folha { border: 0; box-shadow: none; padding: 0; max-width: none; }
  .bloco { padding-left: 40px; break-inside: avoid; }
  .bloco.alterado { background: none; box-shadow: none; }
  .bloco.alterado .tag-alt { display: none; }
  .secao { break-inside: auto; }
  .secao > h2 { break-after: avoid; }
  .fase, .kpis div, .assin .caixa, .tab-wrap { break-inside: avoid; }
  .tab-wrap { overflow: visible; }
  .tab-wrap table { min-width: 0; }
  .assinaturas-sec { break-before: page; }
}

@media (max-width: 560px) {
  .topo .quem span { display: none; }
  .bloco { padding-left: 38px; }
  .bloco .num { left: 6px; }
  .timbre .ref { font-size: 10px; }
}

/* links temporários */
.link-cod { font: 500 12px/1.4 "IBM Plex Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: #b8892f; margin: 0; }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #4a5568; line-height: 1.45; }
.chk input { margin-top: 3px; accent-color: #13233f; }
.lnk { border: 1px solid #e3e7ef; border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; font-size: 13px; }
.lnk.off { opacity: .55; }
.lnk-acoes { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }

/* ---------- administração ---------- */
.grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 640px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.pagina.larga { max-width: 1600px; }
.cab-linha { display: flex; justify-content: space-between; gap: 12px 20px; align-items: end; flex-wrap: wrap; }
.cab-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.topo .quem a.conta-link { color: #c9d1df; text-decoration: none; padding: 4px 8px; border-radius: 6px; }
.topo .quem a.conta-link:hover, .topo .quem a.conta-link.ativo { background: rgba(255, 255, 255, .1); color: #fff; }
.aviso-senha { background: var(--warn-soft); color: var(--warn); text-align: center; font-size: 14px; padding: 8px 16px; border-bottom: 1px solid #f0d9a8; }
.aviso-senha a { color: inherit; font-weight: 600; }
.btn.perigo { color: var(--bad); }
.card > h3 { font-size: 15px; }

/* resumo do pipeline */
.resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.resumo > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 2px; }
.resumo span { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); font-family: var(--font-mono); }
.resumo b { font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--navy); line-height: 1.15; font-variant-numeric: tabular-nums; }
.resumo small { color: var(--ink-soft); font-size: 13px; }
.kb-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.kb-filtros { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; flex: 1; }
.kb-filtros .i { width: auto; min-width: 0; flex: 0 1 280px; }
.kb-setas { display: flex; gap: 6px; }
.kb-setas .btn { font-size: 18px; line-height: 1; padding: 4px 12px; }

/* kanban: rola na horizontal, uma coluna por fase */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding: 14px 2px 18px; scroll-snap-type: x proximity; scroll-padding: 2px; margin-top: 4px; }
.kanban::-webkit-scrollbar { height: 10px; }
.kanban::-webkit-scrollbar-thumb { background: #c9cfda; border-radius: 99px; }
.kb-col { flex: 1 0 280px; max-width: 360px; scroll-snap-align: start; background: #e9ecf1; border-radius: 14px; display: flex; flex-direction: column; min-height: 420px; border-top: 4px solid #9aa3b2; transition: background .15s, box-shadow .15s; }
.kb-col.st-col-enviada { border-top-color: var(--info); }
.kb-col.st-col-em_revisao { border-top-color: #d08a16; }
.kb-col.st-col-aguardando_assinatura { border-top-color: var(--gold); }
.kb-col.st-col-assinada { border-top-color: var(--ok); }
.kb-col.st-col-cancelada { border-top-color: var(--bad); opacity: .85; }
.kanban.arrastando .kb-col { box-shadow: inset 0 0 0 2px #c3c9d4; }
.kb-col.alvo { background: #dfe6f2; box-shadow: inset 0 0 0 2px var(--navy) !important; }
.kb-col header { padding: 12px 14px 8px; display: grid; gap: 2px; }
.kb-tit { display: flex; align-items: center; gap: 8px; }
.kb-tit h3 { font-size: 15px; font-weight: 600; }
.kb-n { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); }
.kb-qt { margin-left: auto; background: #fff; border-radius: 99px; font-size: 12px; font-weight: 600; padding: 1px 9px; }
.kb-col header p { font-size: 12.5px; color: var(--ink-soft); }
.kb-soma { font-size: 13px; color: var(--navy); font-variant-numeric: tabular-nums; }
.kb-cards { display: grid; gap: 10px; padding: 4px 10px 12px; align-content: start; flex: 1; }
.kb-vazio { border: 1px dashed #c3c9d4; border-radius: 10px; padding: 18px; text-align: center; font-size: 13px; color: var(--ink-soft); }
.kb-card { background: #fff; border-radius: 10px; padding: 12px 13px; display: grid; gap: 6px; cursor: pointer; border: 1px solid transparent; box-shadow: 0 1px 2px rgba(16, 24, 40, .06); transition: border-color .15s, transform .15s, box-shadow .15s; }
.kb-card:hover { border-color: #b9c0cc; box-shadow: 0 4px 14px rgba(16, 24, 40, .08); }
.kb-card.arrastando { opacity: .45; transform: rotate(1.5deg); }
.kb-card.parado { box-shadow: inset 3px 0 0 #d08a16, 0 1px 2px rgba(16, 24, 40, .06); }
.kb-top { display: flex; justify-content: space-between; align-items: center; }
.kb-mover { border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; border-radius: 6px; padding: 0 6px; font-size: 15px; }
.kb-mover:hover { background: #eef0f4; color: var(--ink); }
.kb-emp { font-size: 15px; color: var(--navy); }
.kb-titulo { font-size: 13.5px; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kb-valores { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.kb-valores .muted { font-weight: 500; }
.kb-trilha { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 2px 0; }
.kb-trilha i { height: 5px; border-radius: 99px; background: #e3e7ee; }
.kb-trilha i.ok { background: #9fb3d3; }
.kb-trilha i.agora { background: var(--navy); }
.st-col-assinada .kb-trilha i.ok { background: var(--ok); }
.kb-rodape { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-soft); align-items: center; }
.kb-rodape .alerta { color: var(--warn); font-weight: 600; }
.kb-tags { display: flex; gap: 6px; }
.kb-tags em { font-style: normal; background: #f1f3f6; border-radius: 6px; padding: 0 6px; }
.kb-tags em.t-warn { background: var(--warn-soft); color: var(--warn); }
.kb-resp { font-size: 12px; }
.mover-lista { display: grid; gap: 8px; }
.mover-lista .btn { justify-content: space-between; flex-wrap: wrap; white-space: normal; text-align: left; }
.mover-lista .btn.atual { border-color: var(--navy); }
@media (max-width: 600px) { .kb-col { flex-basis: 84vw; } .kb-filtros .i { flex: 1 1 100%; } }

/* empresas */
.emp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.emp-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; text-decoration: none; color: inherit; }
.emp-card:hover { border-color: #aab3c2; }
.emp-card h3 { font-family: var(--font-display); font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.emp-card p { font-size: 13px; }
.emp-ini { width: 46px; height: 46px; border-radius: 10px; background: var(--navy); color: #e8c57a; display: grid; place-items: center; font-family: var(--font-mono); font-weight: 600; }
.emp-num { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; border-top: 1px solid var(--line); padding-top: 10px; }
.emp-num dt { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; }
.emp-num dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.emp-contato { grid-column: 1 / -1; }
.emp-det { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .emp-det { grid-template-columns: minmax(0, 1fr); } }
.obs-int { background: #f6f7f9; border-radius: 8px; padding: 10px 12px; font-size: 14px; white-space: pre-wrap; }
.prop-mini { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.card > h3 + .prop-mini { border-top: 0; }
.prop-mini:hover b { text-decoration: underline; }
.prop-mini > .muted { grid-column: 2 / -1; font-size: 13px; }
.modal.largo { width: min(760px, 100%); }

/* nova proposta */
.nova { display: grid; gap: 16px; max-width: 880px; }
.emp-escolha { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.emp-escolha label { flex: 1 1 260px; }
.modelos { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.modelo { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 4px; cursor: pointer; position: relative; }
.modelo input { position: absolute; top: 12px; right: 12px; accent-color: var(--navy); }
.modelo b { font-size: 14px; padding-right: 22px; }
.modelo span { font-size: 13px; color: var(--ink-soft); }
.modelo:has(input:checked) { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: #f7f9fc; }
.modelo:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.nova-acoes { display: flex; gap: 8px; justify-content: flex-end; }

/* editor estruturado */
.ed-barra { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 54px); z-index: 10; background: rgba(243, 244, 247, .94); backdrop-filter: blur(6px); display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ed-titulo { font-family: var(--font-display); font-size: 19px; margin-left: 6px; }
.ed-acoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ed-estado { font-size: 13px; color: var(--ink-soft); }
.ed-wrap { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.ed-indice { position: sticky; top: 130px; display: grid; gap: 2px; max-height: calc(100vh - 150px); overflow: auto; }
.ed-indice a { text-decoration: none; color: var(--ink-soft); font-size: 13.5px; padding: 6px 8px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-indice a:hover { background: #e9ecf1; color: var(--ink); }
.ed-indice .btn { margin-top: 6px; justify-self: start; }
.ed-corpo { display: grid; gap: 16px; min-width: 0; }
.ed-secao-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ed-n { font-family: var(--font-mono); color: var(--gold); }
input.i.ed-sec-tit { flex: 1 1 240px; width: auto; font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--navy); }
.ed-bloco { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 10px; background: #fcfcfd; }
.ed-bloco-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.ed-tipo { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; }
.ed-fase { border-left: 3px solid var(--gold-soft); padding-left: 12px; display: grid; gap: 8px; }
.ed-fase-cab { display: flex; justify-content: space-between; align-items: center; }
.ed-add { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; border-top: 1px dashed var(--line); padding-top: 12px; font-size: 13px; }
.ed-nova-secao { border-style: dashed; padding: 14px; }
@media (max-width: 900px) { .ed-wrap { grid-template-columns: minmax(0, 1fr); } .ed-indice { display: none; } .ed-barra { position: static; } }

/* linha do tempo da proposta */
.lt { list-style: none; margin: 0 0 0 6px; padding: 0 0 0 16px; display: grid; gap: 12px; border-left: 2px solid var(--line); }
.lt li { position: relative; display: grid; font-size: 13px; }
.lt li::before { content: ""; position: absolute; left: -24px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid #9aa3b2; }
.lt li.atual::before { background: var(--navy); border-color: var(--navy); }
.lt li.lt-assinada::before { border-color: var(--ok); }
.lt li.lt-assinada.atual::before { background: var(--ok); }
.lt li.lt-cancelada::before { border-color: var(--bad); }
.lt li span { color: var(--ink-soft); font-size: 12px; }
.conta { max-width: 760px; }

/* ---------- gestão: início, projetos, OS, pagamentos, versões ---------- */
.modal-acoes { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.card-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn.grande { padding: 14px 18px; font-size: 16px; font-weight: 600; border-radius: 12px; }
.sit { display: inline-block; border-radius: 99px; padding: 1px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.sit-ok { background: var(--ok-soft); color: var(--ok); }
.sit-aviso { background: var(--warn-soft); color: var(--warn); }
.sit-ruim { background: var(--bad-soft); color: var(--bad); }
.sit-neutro { background: #eceef2; color: #4b5363; }
.lk { border: 0; background: none; padding: 0; color: var(--info); text-decoration: underline; cursor: pointer; font-size: inherit; }
.lk.perigo { color: var(--bad); }
.sub-tit { font-size: 15px; font-weight: 600; color: var(--ink-soft); margin-top: 8px; }

/* início */
.ini { display: grid; gap: 14px; max-width: 760px; width: 100%; margin: 0 auto; }
.ini-trabalho { background: var(--navy); color: #eef1f7; border-radius: 16px; padding: 18px; display: grid; gap: 12px; }
.ini-trabalho h2 { font-family: var(--font-display); font-weight: 600; font-size: 22px; }
.ini-trabalho label.f { color: #c7cfdd; }
.ini-trabalho select.i { color: var(--ink); }
.ini-trabalho .btn:not(.primary):not(.gold) { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); color: #fff; }
.ini-trabalho .btn.primary { background: var(--gold); border-color: var(--gold); }
.ini-botoes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.ini-trabalho.rodando { background: linear-gradient(135deg, #13233f, #1f3a64); box-shadow: inset 0 0 0 2px var(--gold); }
.ini-rel { display: grid; gap: 2px; text-align: center; }
.ini-rel b#cron { font-family: var(--font-mono); font-size: clamp(40px, 12vw, 56px); font-weight: 500; color: #e8c57a; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.ini-rel small { color: #aeb8c9; }
.ini-num { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ini-num div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; }
.ini-num span { font-size: 11.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; }
.ini-num b { font-size: 18px; font-variant-numeric: tabular-nums; color: var(--navy); }
@media (max-width: 560px) { .ini-num { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.ini-linha { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; color: inherit; align-items: center; }
.card-cab + .ini-linha { border-top: 0; }
.ini-linha > span:first-child { min-width: 0; display: grid; font-size: 14px; }
.ini-linha small { color: var(--ink-soft); font-size: 12px; }
.ini-linha .dir { display: grid; justify-items: end; gap: 3px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* formulários de OS / pagamento */
.dur { display: flex; align-items: center; gap: 6px; }
.dur .i { width: 80px; }
.dur span { color: var(--ink-soft); }
.dur-linha { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dur-linha .i { width: 120px; }
.atalhos { display: flex; gap: 6px; flex-wrap: wrap; }
label.arq { border: 1.5px dashed #b9c0cc; border-radius: 10px; padding: 14px; text-align: center; cursor: pointer; color: var(--ink-soft); font-size: 14px; }
label.arq:hover { border-color: var(--navy); color: var(--ink); }
label.arq input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.arq-prev { max-height: 220px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; justify-self: center; }
.comp-img { width: 100%; max-height: 70vh; object-fit: contain; background: #f6f7f9; border-radius: 8px; }

/* projetos */
.proj-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; gap: 6px; text-decoration: none; color: inherit; }
.proj-card:hover { border-color: #aab3c2; }
.proj-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.proj-card h3 { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.proj-card > p { font-size: 13px; }
.proj-num { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 6px 0 0; border-top: 1px solid var(--line); padding-top: 10px; }
.proj-num dt { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; }
.proj-num dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; }
.proj-num small { font-weight: 400; color: var(--ink-soft); }
.proj-alerta { color: var(--bad); font-size: 13px; font-weight: 600; }
.barra { height: 6px; background: #e3e7ee; border-radius: 99px; overflow: hidden; }
.barra i { display: block; height: 100%; background: var(--navy); border-radius: 99px; }
.barra.aviso i { background: #d08a16; }
.barra.ruim i { background: var(--bad); }
.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.abas::-webkit-scrollbar { display: none; }
.abas a { padding: 9px 14px; text-decoration: none; color: var(--ink-soft); border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.abas a.ativo { color: var(--navy); border-bottom-color: var(--gold); }
.barra-acoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.barra-acoes > .muted { margin-left: auto; }
.os-linha { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.card-cab + .os-linha { border-top: 0; }
.os-linha p { margin-top: 4px; white-space: pre-wrap; font-size: 14px; }
.os-linha .muted { font-size: 12.5px; }
.os-linha.rodando { background: var(--gold-soft); margin: 0 -16px; padding: 12px 16px; }
.os-dir { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.os-dir b { font-variant-numeric: tabular-nums; }
.tipos { display: grid; gap: 8px; }
.tipos div { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.tipos i { height: 8px; background: var(--navy); border-radius: 99px; }
table.parc { width: 100%; border-collapse: collapse; font-size: 14px; }
table.parc th { text-align: left; font-size: 12px; color: var(--ink-soft); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); }
table.parc td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.parc tfoot td { font-weight: 600; border-bottom: 0; }
table.parc .num, .dossie .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pg { font-size: 12.5px; color: var(--ok); margin-top: 4px; }
.acoes-parc { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) {
  .tab-wrap table.parc { min-width: 0; }
  .tab-wrap table.parc td { padding: 2px 4px; border: 0; }
  table.parc thead { display: none; }
  table.parc, table.parc tbody, table.parc tr, table.parc td { display: block; width: 100%; }
  table.parc tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  table.parc td { border: 0; padding: 2px 0; }
  table.parc td.num { text-align: left; }
  table.parc td.num::before { content: attr(data-r); color: var(--ink-soft); }
  table.parc td.venc::before { content: "Vencimento: "; color: var(--ink-soft); }
  .acoes-parc { justify-content: flex-start; margin-top: 6px; }
  table.parc tfoot { display: none; }
}
.v-notas { white-space: pre-wrap; font-size: 13px; color: var(--ink); margin: 4px 0; }
pre.codigo { background: #0f1b31; color: #dfe6f2; border-radius: 8px; padding: 12px; font-size: 12px; overflow-x: auto; white-space: pre; }
details summary { cursor: pointer; font-size: 13px; color: var(--info); }
.chave { background: #f6f7f9; border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 17px; letter-spacing: .06em; text-align: center; word-break: break-all; }
.passos-2fa { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: 14px; }

/* dossiê */
.dossie .tab-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dossie td, .dossie th { vertical-align: top; }
.dossie .tot td { font-weight: 600; }
.dossie .dos-assin { font-size: 13px; color: var(--ink-soft); margin-top: 12px; }
.dossie.sem-fin .dos-fin, .dossie.sem-os .dos-os { display: none; }
@media print {
  .so-tela, .aviso-senha { display: none !important; }
  .dossie td, .dossie th { font-size: 9.5pt; }
  .dossie tr { break-inside: avoid; }
}
.lt .lk { justify-self: start; font-size: 12px; }
div.f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.campo-fixo { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: #f3f4f7; color: var(--ink); font-size: 15px; font-weight: 600; }
.campo-fixo span { font-size: 12px; font-weight: 400; color: var(--ink-soft); }

/* ---------- aguardando a Neuron (cliente comentou ou assinou) ---------- */
.aguardando { background: #fff8e8; border: 1.5px solid var(--gold); border-radius: 14px; padding: 14px 16px; display: grid; gap: 4px; box-shadow: 0 4px 16px rgba(184, 137, 47, .14); }
.aguardando h3 { font-size: 16px; color: #7a5410; display: flex; align-items: center; gap: 8px; }
.ag-n { background: var(--gold); color: #fff; border-radius: 99px; font-size: 12px; padding: 1px 9px; }
.ag-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid #f0dfb8; text-decoration: none; color: inherit; }
.card-cab + .ag-item { border-top: 0; }
.ag-ico { font-size: 20px; text-align: center; }
.ag-txt { display: grid; font-size: 14px; min-width: 0; }
.ag-txt .ag-det { color: var(--ink-soft); font-size: 13px; }
.aguardando.faixa { display: block; font-size: 14px; color: #7a5410; padding: 10px 14px; }
.aguardando.faixa a { color: var(--navy); font-weight: 600; }
.aguardando.faixa a span { font-weight: 400; color: var(--ink-soft); }
.painel-vez { gap: 8px; font-size: 14px; }
.painel-vez b { color: #7a5410; }
.painel-vez .btn { justify-self: start; }
.kb-card.sua-vez { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(184, 137, 47, .35), 0 6px 18px rgba(184, 137, 47, .18); }
.kb-vez { margin: -12px -13px 4px; padding: 6px 13px; background: var(--gold); color: #fff; font-size: 12.5px; font-weight: 600; border-radius: 9px 9px 0 0; }
.kb-card.sv-responder .kb-vez { background: #c77c0e; }
.kb-vez-n { background: var(--gold); color: #fff; border-radius: 99px; font-size: 11.5px; font-weight: 600; padding: 1px 8px; margin-left: auto; }
.kb-vez-n + .kb-qt { margin-left: 0; }
.nav-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 99px; background: var(--gold); color: #fff; font-size: 11px; font-weight: 700; vertical-align: 1px; }
@media (prefers-reduced-motion: no-preference) {
  .nav-badge, .ag-n { animation: pulso 2.4s ease-in-out infinite; }
  @keyframes pulso { 0%, 100% { box-shadow: 0 0 0 0 rgba(184, 137, 47, .5); } 50% { box-shadow: 0 0 0 5px rgba(184, 137, 47, 0); } }
}
.kb-vez-n, .kb-qt { white-space: nowrap; flex-shrink: 0; }
.kb-tit h3 { min-width: 0; }
.aguardando.faixa { margin-bottom: 12px; }

/* ---------- usuários e perfis ---------- */
.perfis-legenda { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.perfis-legenda div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; font-size: 13px; }
.perfis-legenda span { color: var(--ink-soft); }
.usr { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.card > h3 + .usr { border-top: 0; }
.usr.off { opacity: .55; }
.usr-ini { width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #e8c57a; display: grid; place-items: center; font-family: var(--font-mono); font-size: 13px; }
.usr-info { display: grid; gap: 4px; min-width: 0; }
.usr-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.usr-perm { font-size: 12px; background: #f1f3f6; border-radius: 6px; padding: 1px 8px; color: var(--ink-soft); }
.usr-acoes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 600px) { .usr { grid-template-columns: 40px minmax(0, 1fr); } .usr-acoes { grid-column: 2; justify-content: flex-start; } }
.perfis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
fieldset.perms { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 12px; display: grid; gap: 10px; margin: 0; }
fieldset.perms legend { font-size: 13px; font-weight: 600; color: var(--ink-soft); padding: 0 4px; }

/* ---------- configurações ---------- */
.cfg-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 980px) { .cfg-wrap { grid-template-columns: minmax(0, 1fr); } }
.cfg { display: grid; gap: 14px; }
.cfg-lado { display: grid; gap: 14px; position: sticky; top: 76px; }
@media (max-width: 980px) { .cfg-lado { position: static; } }
.cnpj-linha { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.cnpj-linha label { flex: 1 1 220px; }
.cnpj-ok { font-size: 13px; color: var(--ok); background: var(--ok-soft); border-radius: 8px; padding: 8px 10px; }
.cfg-acoes { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.capa-prev { border-left: 3px solid var(--gold); padding: 4px 0 4px 12px; font-size: 14px; display: grid; }
.capa-prev span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); font-family: var(--font-mono); }
.cfg-props { display: grid; gap: 6px; font-size: 13px; margin: 6px 0; }
.cfg-props span { display: flex; justify-content: space-between; gap: 8px; align-items: center; }

/* ---------- app Android: abas embaixo, cronômetro fixo, instalar ---------- */
.nav-ico, .nav-curto { display: none; }
.nav-badge { position: static; }

/* barra do cronômetro — fica em todas as telas enquanto a OS conta */
#barra-cron { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40; width: min(560px, calc(100% - 24px)); display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; border-radius: 14px; padding: 10px 10px 10px 16px; box-shadow: 0 10px 30px rgba(13, 22, 38, .35), inset 0 0 0 1.5px var(--gold); }
#barra-cron[hidden] { display: none; }
.bc-pulso { width: 10px; height: 10px; border-radius: 50%; background: #e8c57a; flex-shrink: 0; }
@media (prefers-reduced-motion: no-preference) { .bc-pulso { animation: pulso-cron 1.6s ease-in-out infinite; } @keyframes pulso-cron { 0%, 100% { opacity: 1; } 50% { opacity: .25; } } }
.bc-info { display: grid; min-width: 0; flex: 1; line-height: 1.2; }
.bc-info b { font-family: var(--font-mono); font-size: 20px; font-weight: 500; color: #e8c57a; font-variant-numeric: tabular-nums; }
.bc-info small { color: #b8c2d4; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-x { background: transparent; border: 0; color: #8f9bb3; font-size: 22px; line-height: 1; padding: 4px 8px; cursor: pointer; border-radius: 8px; }
.bc-x:hover { color: #fff; background: rgba(255, 255, 255, .08); }
body.com-cron .pagina { padding-bottom: 110px; }

.instalar { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 1.5px dashed var(--gold); border-radius: 14px; padding: 12px 14px; cursor: pointer; color: var(--ink); }
.instalar .nav-ico { display: inline; font-size: 26px; }
.instalar span:last-child { display: grid; }
.instalar small { color: var(--ink-soft); font-size: 13px; }
.dur-grande { text-align: center; display: grid; padding: 4px 0; }
.dur-grande b { font-family: var(--font-mono); font-size: 32px; font-weight: 500; color: var(--navy); }
.dur-grande span { color: var(--ink-soft); font-size: 13px; }

@media (max-width: 760px) {
  /* menu vira barra de abas embaixo, como app */
  .topo { padding-top: calc(8px + env(safe-area-inset-top, 0px)); }
  .topo nav:has(.nav-ico) { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--navy); border-top: 1px solid rgba(255, 255, 255, .1); display: flex; flex-wrap: nowrap; justify-content: space-around; gap: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); overflow-x: auto; scrollbar-width: none; }
  .topo nav:has(.nav-ico)::-webkit-scrollbar { display: none; }
  .topo nav:has(.nav-ico) a { flex: 1 0 64px; display: grid; justify-items: center; gap: 2px; padding: 4px 2px; font-size: 11px; border-radius: 10px; position: relative; }
  .topo nav:has(.nav-ico) .nav-ico { display: block; line-height: 0; }
  .topo nav:has(.nav-ico) .nav-rot { display: none; }
  .topo nav:has(.nav-ico) .nav-curto { display: block; }
  .topo nav:has(.nav-ico) a { flex-basis: 56px; }
  .topo nav:has(.nav-ico) a.ativo { background: rgba(255, 255, 255, .1); color: #e8c57a; }
  .topo nav:has(.nav-ico) .nav-badge { position: absolute; top: 0; right: 14%; margin: 0; }
  body:has(.topo nav .nav-ico) .pagina { padding-bottom: 96px; }
  body.com-cron:has(.topo nav .nav-ico) .pagina { padding-bottom: 170px; }
  body:has(.topo nav .nav-ico) #barra-cron { bottom: calc(74px + env(safe-area-inset-bottom, 0px)); }
  .topo .quem { margin-left: auto; }
  .topo .quem a.conta-link { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (display-mode: standalone) { .topo { padding-top: calc(10px + env(safe-area-inset-top, 0px)); } }
