/* NetSystem — design: superfícies calmas, tipografia legível, contraste confortável */
:root {
  --marca: #2563eb;
  --raio: 12px;
  --raio-p: 8px;
  --sombra: 0 1px 2px rgb(15 23 42 / .06), 0 4px 12px rgb(15 23 42 / .05);
  --sombra-forte: 0 10px 30px rgb(15 23 42 / .16);
  --fonte: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --lateral: 232px;
  --lateral-mini: 68px;
}
html[data-ativo="claro"], html:not([data-ativo]) {
  --fundo: #f5f6f8; --sup: #ffffff; --sup-2: #f0f2f5; --borda: #e3e6eb; --borda-forte: #cfd4dc;
  --texto: #1c2430; --texto-2: #5b6575; --texto-3: #8a93a1;
  --lado: #121a2b; --lado-texto: #c6ccd8; --lado-ativo: #ffffff; --lado-hover: rgb(255 255 255 / .07);
  --verde: #15803d; --verde-f: #e7f6ec; --vermelho: #b42318; --vermelho-f: #fdecea; --laranja: #b54708; --laranja-f: #fef3e2;
  --azul: #1d4ed8; --azul-f: #e8efff; --roxo: #6d28d9; --roxo-f: #f1ebff; --cinza-f: #eef0f3;
  color-scheme: light;
}
html[data-ativo="escuro"] {
  --fundo: #0f141c; --sup: #161d28; --sup-2: #1c2532; --borda: #263142; --borda-forte: #344257;
  --texto: #e6e9ee; --texto-2: #a7b0bf; --texto-3: #7b8696;
  --lado: #0b1018; --lado-texto: #a7b0bf; --lado-ativo: #ffffff; --lado-hover: rgb(255 255 255 / .06);
  --verde: #4ade80; --verde-f: #12301f; --vermelho: #f87171; --vermelho-f: #3a1717; --laranja: #fbbf24; --laranja-f: #3a2a0c;
  --azul: #93b4ff; --azul-f: #182746; --roxo: #c4b5fd; --roxo-f: #2a1f47; --cinza-f: #222b38;
  --sombra: 0 1px 2px rgb(0 0 0 / .3); --sombra-forte: 0 10px 30px rgb(0 0 0 / .5);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--fonte); font-size: 15px; line-height: 1.5; color: var(--texto); background: var(--fundo); -webkit-font-smoothing: antialiased; }
a { color: var(--marca); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; } h3 { font-size: 1rem; color: var(--texto-2); }
hr { border: 0; border-top: 1px solid var(--borda); margin: 6px 0; }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.ic-grande { width: 48px; height: 48px; color: var(--texto-3); }
.muted { color: var(--texto-2); } .pequeno { font-size: .85rem; }
.num { font-variant-numeric: tabular-nums; color: var(--texto-2); font-weight: 600; }
:focus-visible { outline: 2px solid var(--marca); outline-offset: 2px; border-radius: 4px; }

/* ---------- Estrutura ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--lateral); background: var(--lado); color: var(--lado-texto); display: flex; flex-direction: column; padding: 14px 10px; z-index: 30; transition: width .2s; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 18px; color: #fff; font-weight: 700; font-size: 1.1rem; text-decoration: none !important; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--marca), #06b6d4); color: #fff; font-weight: 800; flex: none; }
.brand.grande { justify-content: center; color: var(--texto); font-size: 1.5rem; padding: 0 0 4px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--raio-p); color: var(--lado-texto); text-decoration: none !important; font-size: .95rem; white-space: nowrap; overflow: hidden; background: none; border: 0; cursor: pointer; font-family: inherit; width: 100%; text-align: left; }
.nav-item:hover { background: var(--lado-hover); color: #fff; }
.nav-item.ativo { background: rgb(255 255 255 / .1); color: var(--lado-ativo); box-shadow: inset 3px 0 0 var(--marca); }
.recolher { opacity: .7; }
.main { margin-left: var(--lateral); min-height: 100vh; display: flex; flex-direction: column; transition: margin .2s; }
.menu-mini .sidebar { width: var(--lateral-mini); }
.menu-mini .sidebar span:not(.brand-mark) { display: none; }
.menu-mini .main { margin-left: var(--lateral-mini); }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 10px 24px; background: color-mix(in srgb, var(--fundo) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--borda); }
.page-title { font-size: 1.15rem; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.busca-global { display: flex; align-items: center; background: var(--sup); border: 1px solid var(--borda); border-radius: 999px; overflow: hidden; width: min(440px, 40vw); }
.busca-global select { border: 0; background: var(--sup-2); padding: 8px 10px; color: var(--texto-2); font: inherit; font-size: .85rem; }
.busca-global input { border: 0; flex: 1; padding: 8px 12px; background: transparent; color: var(--texto); font: inherit; min-width: 0; }
.busca-global input:focus { outline: none; }
.busca-global button { border: 0; background: none; padding: 8px 12px; color: var(--texto-2); cursor: pointer; }
.btn-icone { border: 1px solid var(--borda); background: var(--sup); color: var(--texto-2); width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; }
.btn-icone:hover { color: var(--texto); border-color: var(--borda-forte); }
html[data-ativo="escuro"] .so-claro, html[data-ativo="claro"] .so-escuro, html:not([data-ativo]) .so-escuro { display: none; }
.so-mobile { display: none; }
.conta { position: relative; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 4px 4px 10px; border-radius: 12px; }
.conta:hover, .conta:focus-within { background: var(--sup); }
.conta-emp { display: flex; flex-direction: column; text-align: right; line-height: 1.2; }
.conta-emp strong { font-size: .9rem; } .conta-emp small { color: var(--texto-2); font-size: .8rem; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--marca); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.avatar.empresa { border-radius: 10px; background: var(--sup-2); color: var(--texto-2); }
.avatar.pessoa { background: color-mix(in srgb, var(--marca) 16%, var(--sup)); color: var(--marca); }
.conta-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); background: var(--sup); border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra-forte); min-width: 240px; padding: 8px; }
.conta:focus-within .conta-menu, .conta:hover .conta-menu { display: block; }
.conta-menu-tit { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--texto-3); padding: 4px 8px; }
.conta-menu button, .conta-menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; background: none; border-radius: 8px; color: var(--texto); font: inherit; cursor: pointer; text-align: left; text-decoration: none !important; }
.conta-menu button:hover, .conta-menu a:hover { background: var(--sup-2); }
.conta-menu button.atual { font-weight: 650; }
.ponto { width: 10px; height: 10px; border-radius: 50%; }

.conteudo { padding: 20px 24px 120px; flex: 1; }

/* ---------- Componentes ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--borda-forte); background: var(--sup); color: var(--texto); font: inherit; font-weight: 550; font-size: .92rem; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--sup-2); }
.btn:active { transform: translateY(1px); }
.btn.primario { background: var(--marca); border-color: var(--marca); color: #fff; }
.btn.primario:hover { filter: brightness(1.08); }
.btn.fantasma { background: transparent; border-color: transparent; color: var(--texto-2); }
.btn.fantasma:hover { background: var(--sup-2); color: var(--texto); }
.btn.perigo, .perigo { color: var(--vermelho) !important; }
.btn.largo { width: 100%; justify-content: center; padding: 11px; }

input, select, textarea { font: inherit; color: var(--texto); background: var(--sup); border: 1px solid var(--borda-forte); border-radius: var(--raio-p); padding: 8px 10px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--marca); box-shadow: 0 0 0 3px color-mix(in srgb, var(--marca) 20%, transparent); }
textarea { resize: vertical; }

.barra { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; order: 3; flex-basis: 100%; padding: 10px 12px; background: var(--sup); border: 1px solid var(--borda); border-radius: var(--raio); }
.barra > .btn.fantasma:last-child { margin-left: auto; }
.filtros input[type=search] { width: 210px; }
.filtros .btn { padding: 8px 12px; }
.filtros .inline { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--texto-2); }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--texto-2); cursor: pointer; }
.segmentado { display: inline-flex; background: var(--sup-2); border-radius: 10px; padding: 3px; gap: 2px; }
.segmentado a, .segmentado label { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; color: var(--texto-2); font-size: .9rem; font-weight: 550; cursor: pointer; text-decoration: none !important; }
.segmentado a.ativo, .segmentado label:has(input:checked) { background: var(--sup); color: var(--texto); box-shadow: var(--sombra); }
.segmentado input { display: none; }

.selo { display: inline-block; white-space: nowrap; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--cinza-f); color: var(--texto-2); }
.selo.grande { font-size: .95rem; padding: 5px 14px; }
.selo.verde { background: var(--verde-f); color: var(--verde); } .selo.vermelho { background: var(--vermelho-f); color: var(--vermelho); }
.selo.laranja { background: var(--laranja-f); color: var(--laranja); } .selo.azul { background: var(--azul-f); color: var(--azul); }
.selo.roxo { background: var(--roxo-f); color: var(--roxo); }

.painel { background: var(--sup); border: 1px solid var(--borda); border-radius: var(--raio); padding: 18px 20px; box-shadow: var(--sombra); margin-bottom: 16px; }
.painel.estreito { max-width: 760px; }
.painel.em-breve { border-style: dashed; box-shadow: none; background: transparent; }
.grade-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.grade-cards .painel { margin: 0; }
.grade-cards .largo { grid-column: 1 / -1; }
.grade-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form .campo, .campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-weight: 550; font-size: .9rem; }
.form .campo input, .form .campo select, .form .campo textarea { font-weight: 400; }
.rotulo { font-weight: 550; font-size: .9rem; }
.radios { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 400; }
.acoes { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--borda); }
.escolha-tipo { margin-bottom: 16px; }
.form:has(input[name=tipo][value=empresa]:checked) .so-pessoa { display: none; }
.form:has(input[name=tipo][value=pessoa]:checked) .so-empresa { display: none; }

.dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.dl dt { color: var(--texto-2); font-size: .9rem; } .dl dd { margin: 0; }
.numeros { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.numeros div { display: flex; flex-direction: column; }
.numeros small { color: var(--texto-2); } .numeros strong { font-size: 1.12rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos { color: var(--verde); } .neg { color: var(--vermelho); }
.notas { white-space: normal; background: var(--sup-2); padding: 10px 12px; border-radius: 8px; }
.vazio { padding: 40px; text-align: center; color: var(--texto-2); background: var(--sup); border: 1px dashed var(--borda-forte); border-radius: var(--raio); }
.vazio.grande { padding: 70px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.alerta { padding: 10px 12px; border-radius: 8px; font-size: .9rem; }
.alerta.erro { background: var(--vermelho-f); color: var(--vermelho); }

/* Tabelas */
.tabela-wrap { background: var(--sup); border: 1px solid var(--borda); border-radius: var(--raio); overflow: auto; box-shadow: var(--sombra); }
.tabela { width: 100%; border-collapse: collapse; }
.tabela th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-3); font-weight: 650; padding: 12px 14px; border-bottom: 1px solid var(--borda); background: var(--sup-2); white-space: nowrap; }
.tabela td { padding: 12px 14px; border-bottom: 1px solid var(--borda); vertical-align: top; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela tbody tr:hover { background: color-mix(in srgb, var(--marca) 4%, var(--sup)); }
.tabela .dir { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabela .estreita { width: 36px; }
.sub { font-size: .83rem; color: var(--texto-2); margin-top: 2px; }
.link-forte { color: var(--texto); font-weight: 600; }
.tabela td:last-child { white-space: nowrap; }
.resumo-lista { font-size: .9rem; color: var(--texto-2); margin-bottom: 10px; }
.contato-linha { display: flex; align-items: center; gap: 12px; color: var(--texto); text-decoration: none !important; }
.contato-linha .sub { display: block; }
.contato-linha.grande .avatar { width: 52px; height: 52px; font-size: 1.05rem; }
.contador { display: inline-block; background: var(--sup-2); color: var(--texto-2); font-size: .75rem; padding: 0 7px; border-radius: 999px; }
.verificado::after { content: "✓"; color: var(--verde); margin-left: 4px; font-weight: 700; }
.estrela { border: 0; background: none; color: var(--texto-3); cursor: pointer; padding: 2px; }
.estrela.on { color: #f59e0b; } .estrela.on .ic { fill: currentColor; }
.lista-simples { list-style: none; margin: 0; padding: 0; }
.lista-simples li { padding: 8px 0; border-bottom: 1px solid var(--borda); }
.lista-simples li:last-child { border: 0; }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.coluna { background: var(--sup-2); border-radius: var(--raio); display: flex; flex-direction: column; min-height: 300px; max-height: calc(100vh - 250px); }
.coluna-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--borda); font-weight: 650; font-size: .92rem; }
.etapa-num { display: inline-grid; place-items: center; min-width: 28px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--marca); color: #fff; font-size: .75rem; margin-right: 4px; }
.coluna-tot { font-size: .85rem; color: var(--texto-2); font-weight: 500; white-space: nowrap; }
.coluna-tot strong { color: var(--texto); }
.coluna-corpo { padding: 10px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; flex: 1; transition: background .15s; border-radius: 0 0 var(--raio) var(--raio); }
.coluna-corpo.sobre { background: color-mix(in srgb, var(--marca) 10%, transparent); outline: 2px dashed var(--marca); outline-offset: -6px; }
.lista-vazia { text-align: center; color: var(--texto-3); font-size: .85rem; padding: 30px 10px; }
.card-opp { background: var(--sup); border: 1px solid var(--borda); border-radius: 10px; padding: 12px; box-shadow: var(--sombra); cursor: grab; transition: box-shadow .15s, transform .15s; }
.card-opp:hover { box-shadow: var(--sombra-forte); }
.card-opp.arrastando { opacity: .45; transform: rotate(1deg); }
.card-opp.expirada { border-left: 4px solid var(--laranja); }
.card-topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.valor { font-variant-numeric: tabular-nums; font-size: 1rem; }
.dias { font-size: .78rem; color: var(--texto-2); display: inline-flex; gap: 4px; align-items: center; }
.dias .ic { width: 14px; height: 14px; }
.card-tit { display: block; color: var(--texto); font-weight: 550; font-size: .92rem; line-height: 1.35; margin-bottom: 8px; }
.card-tit .num { font-size: .82rem; }
.card-rodape { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .82rem; color: var(--texto-2); }
.card-rodape .contato { display: inline-flex; gap: 5px; align-items: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-rodape .contato .ic { width: 14px; height: 14px; }
.card-rodape em { font-style: normal; color: var(--texto-3); }
.fav { color: #f59e0b; } .fav .ic { fill: currentColor; width: 14px; height: 14px; }
.selo-linha { margin-top: 8px; }
.zonas-decisao { position: fixed; left: var(--lateral); right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 12px 24px 16px; background: color-mix(in srgb, var(--fundo) 92%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--borda); z-index: 15; }
.menu-mini .zonas-decisao { left: var(--lateral-mini); }
.zona { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 10px; border: 2px dashed; font-weight: 650; font-size: .9rem; transition: transform .15s, background .15s; }
.zona.lixeira { color: var(--texto-2); border-color: var(--borda-forte); }
.zona.desistir { color: var(--roxo); border-color: color-mix(in srgb, var(--roxo) 50%, transparent); }
.zona.negar { color: var(--vermelho); border-color: color-mix(in srgb, var(--vermelho) 50%, transparent); }
.zona.aprovar { color: var(--verde); border-color: color-mix(in srgb, var(--verde) 50%, transparent); }
.zona.sobre { transform: scale(1.03); background: var(--sup); border-style: solid; }

/* ---------- Oportunidade ---------- */
.opp-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.opp-num { display: flex; align-items: center; gap: 6px; color: var(--texto-2); font-weight: 650; font-variant-numeric: tabular-nums; }
.opp-tit { font-size: 1.45rem; margin: 2px 0 6px; }
.opp-cli { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.opp-cli a { display: inline-flex; gap: 6px; align-items: center; }
.opp-acoes { display: flex; gap: 8px; align-items: center; }
.faixa-status { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 16px; background: var(--sup); border: 1px solid var(--borda); border-radius: var(--raio); margin-bottom: 16px; }
.etapas { display: flex; gap: 6px; }
.etapa { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--sup-2); color: var(--texto-2); font-size: .88rem; font-weight: 550; }
.etapa span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--borda); font-size: .75rem; }
.etapa.feita span { background: var(--verde); color: #fff; }
.etapa.atual { background: color-mix(in srgb, var(--marca) 14%, var(--sup)); color: var(--marca); }
.etapa.atual span { background: var(--marca); color: #fff; }
.abas { display: flex; gap: 4px; border-bottom: 1px solid var(--borda); margin-bottom: 16px; }
.abas a { padding: 10px 14px; color: var(--texto-2); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none !important; }
.abas a.ativo { color: var(--texto); border-color: var(--marca); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--borda); }
.timeline li { position: relative; padding: 0 0 18px 14px; display: flex; flex-direction: column; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--sup); border: 2px solid var(--marca); }
.timeline time { font-size: .8rem; color: var(--texto-3); }
.menu-drop { position: relative; }
.menu-drop-lista { display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; background: var(--sup); border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra-forte); padding: 6px; min-width: 260px; }
.barra .menu-drop-lista { left: 0; right: auto; }
.menu-drop.aberto .menu-drop-lista { display: block; }
.menu-drop-lista button, .menu-drop-lista a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 8px; color: var(--texto); font: inherit; font-size: .92rem; cursor: pointer; text-align: left; text-decoration: none !important; }
.menu-drop-lista button:hover, .menu-drop-lista a:hover { background: var(--sup-2); }

/* Criação */
.opcoes-criacao { display: grid; gap: 10px; }
.opcao { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--borda); border-radius: var(--raio); color: var(--texto); text-decoration: none !important; background: var(--sup); }
a.opcao:hover, details.opcao:hover { border-color: var(--marca); }
details.opcao { display: block; }
details.opcao summary { display: flex; gap: 14px; cursor: pointer; list-style: none; }
.opcao .ic { width: 26px; height: 26px; color: var(--marca); }
.opcao div { display: flex; flex-direction: column; }
.opcao span { color: var(--texto-2); font-size: .9rem; }
.opcao.desativada { opacity: .5; }
.lista-escolha { display: flex; flex-direction: column; margin: 12px 0 0 40px; max-height: 260px; overflow: auto; }
.lista-escolha a { padding: 8px; border-radius: 8px; color: var(--texto); }
.lista-escolha a:hover { background: var(--sup-2); text-decoration: none; }

/* Autocomplete */
.autocomplete { position: relative; }
.autocomplete input.ac-texto { width: 100%; }
.ac-lista { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--sup); border: 1px solid var(--borda); border-radius: var(--raio-p); box-shadow: var(--sombra-forte); z-index: 30; max-height: 280px; overflow: auto; }
.ac-lista button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; font: inherit; color: var(--texto); cursor: pointer; }
.ac-lista button:hover, .ac-lista button.foco { background: var(--sup-2); }
.ac-lista small { color: var(--texto-2); }

/* Toasts e modal */
.toasts { position: fixed; right: 20px; bottom: 90px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--texto); color: var(--fundo); padding: 11px 16px; border-radius: 10px; box-shadow: var(--sombra-forte); font-size: .92rem; max-width: 380px; animation: entra .25s ease; }
.toast.erro { background: var(--vermelho); color: #fff; }
@keyframes entra { from { transform: translateY(10px); opacity: 0; } }
.modal-fundo { position: fixed; inset: 0; background: rgb(0 0 0 / .4); z-index: 70; display: grid; place-items: center; padding: 20px; }
.modal-fundo[hidden] { display: none; }
.modal { background: var(--sup); border-radius: 16px; box-shadow: var(--sombra-forte); padding: 22px; width: min(460px, 100%); }
.modal h3 { color: var(--texto); font-size: 1.1rem; }
.modal .campo { margin-top: 12px; }
.modal .acoes { border: 0; padding-top: 6px; }

/* Login */
.tela-login { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(1200px 600px at 20% -10%, color-mix(in srgb, var(--marca) 18%, transparent), transparent), var(--fundo); padding: 20px; }
.login-card { width: min(400px, 100%); background: var(--sup); border: 1px solid var(--borda); border-radius: 18px; padding: 32px; box-shadow: var(--sombra-forte); display: flex; flex-direction: column; gap: 14px; text-align: center; }
.login-card label { display: flex; flex-direction: column; gap: 6px; text-align: left; font-weight: 550; font-size: .9rem; }
.login-card p { margin: -6px 0 6px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) { .kanban { grid-template-columns: repeat(3, 280px); overflow-x: auto; padding-bottom: 8px; } }
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; width: var(--lateral) !important; }
  .sidebar span:not(.brand-mark) { display: inline !important; }
  .menu-aberto .sidebar { transform: none; }
  .main, .menu-mini .main { margin-left: 0; }
  .so-mobile { display: grid; }
  .topbar { padding: 10px 14px; gap: 8px; }
  .busca-global { display: none; }
  .conta-emp { display: none; }
  .conteudo { padding: 14px 14px 120px; }
  .zonas-decisao, .menu-mini .zonas-decisao { left: 0; padding: 10px; gap: 6px; }
  .zona { font-size: .78rem; padding: 10px 4px; }
  .grade-2, .numeros { grid-template-columns: 1fr; }
  .tabela { min-width: 640px; }
}

/* ---------- v0.5: orçamento, documento, administração ---------- */
.opp-cab.compacto .opp-tit { font-size: 1.2rem; }
.opp-num a { color: var(--texto-2); }
.aviso { padding: 10px 14px; border-radius: 10px; background: var(--laranja-f); color: var(--laranja); margin-bottom: 14px; font-size: .92rem; }
.aviso.suave { background: var(--azul-f); color: var(--azul); }
.botoes { display: flex; gap: 8px; flex-wrap: wrap; }
.ic-medio { width: 28px; height: 28px; color: var(--marca); }
.cartao-link { display: flex; flex-direction: column; gap: 6px; color: var(--texto); text-decoration: none !important; transition: border-color .15s, transform .15s; }
.cartao-link:hover { border-color: var(--marca); transform: translateY(-1px); }
.cartao-link h3 { color: var(--texto); margin: 4px 0 0; }
.logo-atual { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.logo-atual img { max-height: 70px; max-width: 220px; border-radius: 8px; background: #fff; padding: 6px; border: 1px solid var(--borda); }
.resultado { background: var(--sup-2); padding: 12px; border-radius: 8px; max-height: 360px; overflow: auto; font-size: .82rem; }
.btn-mini { border: 1px solid var(--borda); background: var(--sup); color: var(--texto-2); border-radius: 6px; padding: 2px 7px; font: inherit; font-size: .78rem; cursor: pointer; line-height: 1.4; }
.btn-mini:hover { color: var(--texto); border-color: var(--borda-forte); }
.btn-mini.on { background: var(--azul-f); color: var(--azul); }

/* Orçamento */
.orc-config { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 14px; font-size: .9rem; color: var(--texto-2); }
.orc-config label { display: flex; align-items: center; gap: 8px; }
.orc-tabela { background: var(--sup); border: 1px solid var(--borda); border-radius: var(--raio); padding: 12px; margin-bottom: 14px; box-shadow: var(--sombra); }
.orc-tabela.opcional { border-style: dashed; }
.orc-tab-cab { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.orc-tab-tit { font-weight: 650; font-size: 1rem; flex: 1; border-color: transparent; background: transparent; }
.orc-tab-tit:hover { border-color: var(--borda); }
.orc-tab-acoes { display: flex; gap: 6px; align-items: center; }
.orc-grade { min-width: 980px; }
.orc-grade td { padding: 4px 6px; vertical-align: top; }
.orc-grade th { padding: 8px 6px; }
.orc-grade input, .orc-grade textarea { width: 100%; padding: 6px 8px; font-size: .9rem; border-color: transparent; background: transparent; }
.orc-grade input:hover, .orc-grade textarea:hover { border-color: var(--borda); }
.orc-grade input:focus, .orc-grade textarea:focus { background: var(--sup); }
.orc-grade .calc { padding-top: 10px; font-variant-numeric: tabular-nums; }
.orc-grade .forte { font-weight: 650; }
.orc-grade tr.grupo td { background: var(--sup-2); }
.orc-grade tr.grupo input { font-weight: 650; }
.orc-grade tr.opcional { opacity: .65; }
.c-sku { width: 90px; } .c-un { width: 70px; } .c-num { width: 120px; } .c-pct { width: 80px; } .c-qtd { width: 70px; } .c-acoes { width: 150px; }
.acoes-linha { display: flex; gap: 3px; opacity: .35; padding-top: 6px; }
tr:hover .acoes-linha, .acoes-linha:focus-within { opacity: 1; }
.desc-longa summary { font-size: .78rem; color: var(--texto-3); cursor: pointer; padding: 0 8px; }
.orc-tab-rodape { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.orc-sub { color: var(--texto-2); } .orc-sub strong { color: var(--texto); margin-left: 6px; }
.orc-totais { position: sticky; bottom: 0; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-top: 16px; padding: 14px 18px; background: var(--sup); border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra-forte); }
.orc-totais div { display: flex; flex-direction: column; }
.orc-totais small { color: var(--texto-2); }
.orc-totais strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.orc-totais .destaque strong { font-size: 1.35rem; color: var(--marca); }
.orc-totais .salvo { margin-left: auto; }

/* Documento (folha A4) */
.barra-texto { position: sticky; top: 64px; z-index: 12; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; background: var(--sup); border: 1px solid var(--borda); border-radius: 12px; padding: 6px; margin: 0 auto 16px; max-width: 820px; box-shadow: var(--sombra); }
.barra-texto button { border: 0; background: none; color: var(--texto); padding: 6px 10px; border-radius: 8px; cursor: pointer; font: inherit; font-size: .9rem; }
.barra-texto button:hover { background: var(--sup-2); }
.barra-texto .destaque { margin-left: auto; color: var(--marca); font-weight: 600; }
.barra-texto .sep { width: 1px; height: 22px; background: var(--borda); margin: 0 4px; }
.folhas { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.folha { width: 100%; max-width: 820px; min-height: 1060px; background: #fff; color: #1f2937; border-radius: 6px; box-shadow: 0 4px 24px rgb(0 0 0 / .12); padding: 48px 56px 40px; display: flex; flex-direction: column; font-size: 13.5px; line-height: 1.55; }
.folha-cab { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 10px; align-items: stretch; margin-bottom: 22px; }
.folha-logo { display: flex; align-items: center; }
.folha-logo img { max-height: 70px; max-width: 100%; }
.folha-logo strong { font-size: 1.3rem; color: var(--marca); }
.folha-box { font-size: 11.5px; line-height: 1.5; }
.folha-box-tit { background: #374151; color: #fff; text-align: center; font-weight: 700; font-size: 11px; letter-spacing: .06em; padding: 3px; margin-bottom: 4px; }
.folha-sec-tit { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; border-bottom: 2px solid var(--marca); padding-bottom: 6px; }
.folha-sec-tit h2 { font-size: 1.15rem; margin: 0; color: #111827; }
.sec-titulo { flex: 1; font-size: 1.15rem; font-weight: 650; border: 1px dashed transparent; background: transparent; color: #111827; padding: 4px 6px; }
.sec-titulo:hover, .sec-titulo:focus { border-color: #cbd5e1; background: #fff; }
.sec-acoes { display: flex; gap: 4px; }
.folha-para { font-size: 12.5px; margin-bottom: 14px; }
.texto-ed { outline: none; border: 1px dashed transparent; border-radius: 6px; padding: 4px 6px; min-height: 28px; }
.texto-ed:hover { border-color: #cbd5e1; }
.texto-ed:focus { border-color: var(--marca); background: #fafcff; }
.texto-ed p, .texto p { margin: 0 0 .6em; }
.bloco { position: relative; margin-bottom: 14px; }
.bloco-acoes { display: flex; gap: 4px; align-items: center; justify-content: flex-end; opacity: 0; transition: opacity .15s; height: 0; overflow: visible; position: relative; top: -2px; z-index: 2; }
.bloco:hover .bloco-acoes, .bloco:focus-within .bloco-acoes { opacity: 1; }
.bloco-tipo { font-size: 11px; color: #94a3b8; margin-right: auto; }
.bloco-acoes .btn-mini, .sec-acoes .btn-mini { background: #fff; color: #475569; border-color: #e2e8f0; }
.folha-orc { width: 100%; border-collapse: collapse; margin-bottom: 12px; font-size: 12.5px; }
.folha-orc th { text-align: left; border-bottom: 1.5px solid #374151; padding: 6px 4px; font-size: 12px; }
.folha-orc td { padding: 6px 4px; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
.folha-orc .dir { text-align: right; white-space: nowrap; }
.folha-orc tr.grupo td { font-weight: 700; background: #f3f4f6; }
.folha-orc tr.opcional td { color: #6b7280; }
.folha-orc .desc { font-size: 11.5px; color: #4b5563; margin-top: 2px; }
.folha-orc .desc p { margin: 0; }
.folha-orc .sku { color: #6b7280; font-size: 11px; }
.folha-orc tfoot td { border: 0; font-weight: 600; }
.folha-total { text-align: right; font-size: 14px; border-top: 3px double #374151; padding-top: 6px; margin-bottom: 8px; }
.assinatura { margin-top: 10px; }
.assin-linhas { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; margin-top: 50px; text-align: center; font-size: 12px; }
.assin-linhas span { display: block; border-top: 1px solid #374151; margin-bottom: 4px; }
.quebra-pagina { border-top: 2px dashed #cbd5e1; margin: 10px 0; }
.add-bloco { display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px dashed #e2e8f0; padding-top: 10px; margin-top: auto; }
.add-bloco .btn { color: #475569; font-size: .85rem; padding: 6px 10px; }
.add-bloco .btn:hover { background: #f1f5f9; }
.folha-rod { margin-top: 24px; padding-top: 8px; border-top: 1px solid #e5e7eb; font-size: 10.5px; color: #6b7280; text-align: center; }
.add-bloco + .folha-rod { margin-top: 16px; }
.impressao { background: #e5e7eb; padding: 70px 10px 30px; }
.barra-impressao { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 10px 20px; background: #fff; border-bottom: 1px solid #e5e7eb; z-index: 5; color: #1f2937; }
@media print {
  @page { size: A4; margin: 12mm; }
  .impressao { background: #fff; padding: 0; }
  .barra-impressao { display: none; }
  .folhas { gap: 0; display: block; }
  .folha { box-shadow: none; border-radius: 0; padding: 0; max-width: none; min-height: 0; page-break-after: always; display: block; }
  .folha:last-child { page-break-after: auto; }
  .quebra-pagina { border: 0; page-break-after: always; margin: 0; }
  .folha-orc tr { page-break-inside: avoid; }
}
@media (max-width: 820px) { .folha { padding: 24px 18px; min-height: 0; } .folha-cab { grid-template-columns: 1fr; } }

/* ---- Fase 6: envio, cliente, certificado ---- */
.alerta.ok { background: var(--verde-f); color: var(--verde); }
.alerta.info { background: var(--azul-f); color: var(--azul); }
.alerta.aviso-claro { background: var(--laranja-f); color: var(--texto); }
.alerta a { color: inherit; font-weight: 650; text-decoration: underline; }
.destinatarios input, .destinatarios select { width: 100%; min-width: 120px; }
.destinatarios td { padding: 8px; }
.tabela tr.inativo td { opacity: .55; }
.acoes-link { min-width: 300px; }
.acoes-link .botoes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.acoes-link form { display: inline; }
.link-copia { width: 100%; font-size: .8rem; color: var(--texto-2); }
.btn.pequeno { padding: 5px 10px; font-size: .82rem; }
.btn.perigo { color: var(--vermelho); }
.btn.perigo-cheio { background: var(--vermelho); border-color: var(--vermelho); color: #fff; }
.linha-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.linha-form input { flex: 1 1 160px; }
code.hash { font-size: .8rem; background: var(--sup-2); padding: 1px 6px; border-radius: 6px; }
.impressao.cliente { padding: 0 0 30px; }
.barra-cliente { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding: 10px 20px; background: #fff; border-bottom: 1px solid #e5e7eb; color: #1f2937; }
.bc-id { display: flex; flex-direction: column; line-height: 1.3; }
.bc-id span { color: #6b7280; font-size: .88rem; }
.bc-acoes { display: flex; flex-wrap: wrap; gap: 8px; }
.cliente-status { max-width: 820px; margin: 16px auto; display: flex; flex-direction: column; gap: 8px; }
.cliente .folhas { margin-top: 0; }
dialog.modal { border: 0; color: var(--texto); }
dialog.modal::backdrop { background: rgb(0 0 0 / .45); }
dialog.modal .check { margin: 6px 0 10px; align-items: flex-start; color: var(--texto); }
dialog.modal .botoes { display: flex; gap: 8px; margin-top: 10px; }
.certificado { font-size: 12.5px; }
.cert-cab { display: flex; justify-content: space-between; align-items: center; border-bottom: 3px solid var(--marca); padding-bottom: 10px; margin-bottom: 14px; }
.cert-cab small { letter-spacing: .12em; color: #6b7280; font-weight: 700; }
.cert-cab h2 { margin: 2px 0 0; color: #1f2937; }
.cert-selo { padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.cert-selo.ok { background: #dcfce7; color: #166534; } .cert-selo.falha { background: #fee2e2; color: #991b1b; }
.cert-tab { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.cert-tab th { text-align: left; width: 34%; color: #6b7280; font-weight: 600; padding: 5px 8px 5px 0; vertical-align: top; }
.cert-tab td { padding: 5px 0; }
.hash-longo { font-size: 11px; word-break: break-all; }
.cert-h { color: #1f2937; margin: 14px 0 6px; font-size: 1rem; }
.cert-sign { border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; }
.cert-eventos { width: 100%; border-collapse: collapse; font-size: 11px; }
.cert-eventos th { text-align: left; background: #f3f4f6; padding: 5px 6px; }
.cert-eventos td { border-bottom: 1px solid #eef0f3; padding: 5px 6px; vertical-align: top; }
.cert-eventos tr.falha td { background: #fee2e2; }
.cert-nota { margin-top: 12px; }
@media print { .barra-cliente, .cliente-status { display: none; } }
