/* ERP Construtech — folha de estilo única, sem dependências externas (CSP 'self').
   Padrão visual oficial: o CRM Construtech (crm.construtechrs.com). Medidas e cores tiradas do código e da tela
   do CRM: tema shadcn com primária âmbar hsl(45 93% 47%), menu azul-marinho, fonte Inter 14px, cantos de 1.1rem. */
:root {
  --fundo: #ffffff;
  --superficie: #ffffff;
  --superficie-2: #f1f5f9;      /* muted / secondary */
  --superficie-3: #f8fafc;      /* muted/50 */
  --borda: #e2e8f0;             /* border / input */
  --borda-forte: #cbd5e1;       /* slate-300 */
  --texto: #020817;             /* foreground */
  --texto-titulo: #020617;      /* slate-950 */
  --texto-2: #64748b;           /* muted-foreground */
  --texto-desc: #475569;        /* slate-600, descrição da página */
  --texto-forte: #0f172a;       /* slate-900 */
  --marca: #e7b008;             /* primary */
  --marca-hover: #e9b821;       /* primary/90 */
  --marca-texto: #0f172a;       /* primary-foreground */
  --marca-clara: #fdf7e6;       /* primary/10 */
  --marca-link: #a16207;        /* âmbar legível para links em fundo branco */
  --lateral: #0f172a;
  --lateral-realce: #1e293b;
  --lateral-borda: #253447;
  --lateral-texto: rgba(248, 250, 252, .7);
  --lateral-texto-forte: #f8fafc;
  --perigo: #ef4444;
  --perigo-hover: #f15757;
  --ok: #064e3b; --ok-fundo: #d1fae5; --ok-borda: #6ee7b7;
  --ruim: #881337; --ruim-fundo: #ffe4e6; --ruim-borda: #fda4af; --ruim-texto: #dc2626;
  --meio: #78350f; --meio-fundo: #fef3c7; --meio-borda: #fcd34d;
  --azul: #1e3a8a; --azul-fundo: #dbeafe; --azul-borda: #93c5fd;
  --raio: 12px;                 /* rounded-xl: cartões e tabela */
  --raio-lg: 17.6px;            /* rounded-lg = var(--radius) */
  --raio-p: 15.6px;             /* rounded-md: botões e campos */
  --raio-s: 13.6px;             /* rounded-sm: abas */
  --sombra: 0 1px 2px 0 rgba(0, 0, 0, .05);
  --sombra-md: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
  --sombra-lg: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1);
  --sombra-alta: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1);
  --anel: 0 0 0 2px #fff, 0 0 0 4px var(--marca);
  --fonte: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --fonte-titulo: var(--fonte);
  --mono: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  --largura-menu: 256px;
}

* { box-sizing: border-box; border-color: var(--borda); }
html, body { margin: 0; }
body { font: 14px/1.6 var(--fonte); color: var(--texto); background: var(--fundo); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: var(--marca-link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.025em; color: var(--texto); }
h1 { font-size: 30px; line-height: 1.2; font-weight: 800; margin: 0; color: var(--texto-titulo); }
h2 { font-size: 18px; line-height: 1.4; margin: 0 0 12px; }
h3 { font-size: 12px; margin: 0 0 8px; color: var(--texto-2); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.mono { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.mudo { color: var(--texto-2); }
.direita { text-align: right; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pular { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--superficie); padding: 8px 12px; border-radius: 8px; }
.pular:focus { left: 8px; }
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--anel); }
.icone { flex: 0 0 auto; }

/* ===== Estrutura: menu lateral + área (topo + conteúdo) — Layout.tsx do CRM ===== */
.app { display: grid; grid-template-columns: var(--largura-menu) minmax(0, 1fr); min-height: 100vh; }
.area { min-width: 0; display: flex; flex-direction: column; }

/* Menu lateral — AppSidebar.tsx */
.lateral { background: var(--lateral); border-right: 1px solid var(--lateral-borda); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 30; transition: width .2s; }
.lateral-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 20px 12px 20px 20px; border-bottom: 1px solid var(--lateral-borda); flex: 0 0 auto; }
.marca { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--lateral-texto-forte); }
.marca:hover { text-decoration: none; }
.marca-icone { width: 36px; height: 36px; border-radius: var(--raio-lg); background: var(--marca); color: var(--marca-texto); display: grid; place-items: center; flex: 0 0 auto; }
.marca-texto { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; white-space: nowrap; }
.marca-texto strong { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.marca-texto small { margin-top: 3px; font-size: 10.5px; font-weight: 700; letter-spacing: .32em; color: var(--marca); }
.recolher { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border: 0; border-radius: var(--raio-p); background: none;
  color: var(--lateral-texto); cursor: pointer; }
.recolher:hover { background: var(--lateral-realce); color: var(--lateral-texto-forte); }
.lateral-itens { flex: 1 1 auto; overflow-y: auto; padding: 24px 16px; display: flex; flex-direction: column; gap: 32px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.grupo-menu { display: flex; flex-direction: column; gap: 4px; }
.grupo-titulo { margin: 0 0 8px; padding: 0 8px; font-size: 12px; font-weight: 600; line-height: 16px; text-transform: uppercase; letter-spacing: .05em; color: var(--lateral-texto); }
.item-menu { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: var(--raio-lg); font-size: 14px; font-weight: 700; line-height: 20px;
  color: var(--lateral-texto); transition: background-color .15s, color .15s; }
.item-menu:hover { background: var(--lateral-realce); color: var(--lateral-texto-forte); text-decoration: none; }
.item-menu.ativo, .item-menu.ativo:hover { background: var(--marca); color: var(--marca-texto); box-shadow: var(--sombra); }
.item-menu span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-menu.fixado .icone { color: var(--marca); }
/* Menu em áreas recolhíveis com seções (estilo Bling) */
.area-menu { display: flex; flex-direction: column; }
.area-titulo { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--raio-lg); cursor: pointer; list-style: none;
  font-size: 14px; font-weight: 700; line-height: 20px; color: var(--lateral-texto); user-select: none; }
.area-titulo::-webkit-details-marker { display: none; }
.area-titulo span { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.area-titulo > .icone:last-child { transition: transform .15s; opacity: .7; }
.area-menu[open] > .area-titulo > .icone:last-child { transform: rotate(180deg); }
.area-titulo:hover { background: var(--lateral-realce); color: var(--lateral-texto-forte); }
.area-menu:has(.subitem-menu.ativo) > .area-titulo, .area-menu[open] > .area-titulo { color: var(--lateral-texto-forte); }
.area-itens { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 8px 20px; padding-left: 12px; border-left: 1px solid var(--lateral-borda); }
.secao-titulo { margin: 8px 0 2px; padding: 0 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: rgba(248, 250, 252, .45); }
.subitem-menu { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--raio-p); font-size: 13.5px; font-weight: 500; line-height: 18px;
  color: var(--lateral-texto); }
.subitem-menu span { min-width: 0; overflow-wrap: anywhere; }
a.subitem-menu:hover { background: var(--lateral-realce); color: var(--lateral-texto-forte); text-decoration: none; }
.subitem-menu.ativo, .subitem-menu.ativo:hover { background: var(--marca); color: var(--marca-texto); font-weight: 700; }
.subitem-menu.em-breve { color: rgba(248, 250, 252, .38); cursor: default; }
.lateral-itens:has(.area-menu) { gap: 4px; }
.rodape-links { display: flex; flex-direction: column; gap: 4px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--lateral-borda); }
.rodape-links .item-menu { padding: 8px 12px; font-size: 13.5px; }
.item-menu.negocio { border: 1px dashed var(--lateral-borda); }
.menu-recolhido .area-titulo { justify-content: center; padding: 10px 0; }
.menu-recolhido .area-titulo span, .menu-recolhido .area-titulo > .icone:last-child, .menu-recolhido .area-itens { display: none; }
.menu-recolhido .area-titulo > .icone:first-child { width: 20px; height: 20px; }
.menu-recolhido .rodape-links .item-menu span { display: none; }
/* Botão "+ Criar" do topo */
.botao-criar { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--raio-p, 8px); cursor: pointer; list-style: none;
  background: var(--marca); color: var(--marca-texto); font-size: 13px; font-weight: 700; white-space: nowrap; box-shadow: var(--sombra); }
.botao-criar:hover { background: var(--marca-hover); }
.menu-criar .menu-lista { min-width: 240px; }
.menu-grupo { margin: 6px 0 2px; padding: 0 8px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-2); }
.menu-grupo:first-child { margin-top: 2px; }
.lateral-rodape { flex: 0 0 auto; padding: 16px; border-top: 1px solid var(--lateral-borda); }
.usuario-cartao { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--raio); background: rgba(30, 41, 59, .5); border: 1px solid var(--lateral-borda); }
.avatar { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; background: #fff; border: 1px solid rgba(231, 176, 8, .2); color: var(--marca-link);
  display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.avatar:hover { text-decoration: none; opacity: .85; }
.usuario-nome { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; color: var(--lateral-texto-forte); }
.usuario-nome:hover { text-decoration: none; }
.usuario-nome strong { font-size: 14px; line-height: 18px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.usuario-nome small { font-size: 12px; font-weight: 600; line-height: 16px; color: var(--lateral-texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usuario-cartao form { margin: 0; }
.sair { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: var(--raio-p); background: none; color: var(--lateral-texto); cursor: pointer; }
.sair:hover { background: var(--lateral-realce); color: var(--perigo); }

/* Menu recolhido: só ícones, 64 px (preferência guardada no navegador) */
.menu-recolhido { --largura-menu: 64px; }
.menu-recolhido .lateral-topo { padding: 14px 8px 10px; flex-direction: column; justify-content: center; gap: 6px; }
.menu-recolhido .marca { gap: 0; } .menu-recolhido .marca-texto { display: none; } /* só o símbolo da Construtech */
.menu-recolhido .recolher { width: 36px; height: 28px; border-radius: var(--raio-p); background: var(--lateral-realce); color: var(--lateral-texto-forte); }
.menu-recolhido .recolher:hover { background: var(--marca); color: var(--marca-texto); }
.menu-recolhido .recolher svg { transform: rotate(180deg); }
.menu-recolhido .lateral-itens { padding: 24px 8px; gap: 16px; }
.menu-recolhido .grupo-titulo, .menu-recolhido .item-menu span, .menu-recolhido .usuario-nome, .menu-recolhido .usuario-cartao form { display: none; }
.menu-recolhido .item-menu { justify-content: center; padding: 10px 0; }
.menu-recolhido .item-menu .icone { width: 20px; height: 20px; }
.menu-recolhido .lateral-rodape { padding: 8px; }
.menu-recolhido .usuario-cartao { padding: 0; background: none; border: 0; justify-content: center; }

/* Barra do topo — TopBar.tsx */
.cabecalho { position: sticky; top: 0; z-index: 20; height: 64px; flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 0 24px;
  background: var(--superficie); border-bottom: 1px solid var(--borda); }
.cabecalho .espaco { flex: 1 1 auto; }
.busca-gatilho { width: 100%; max-width: 320px; height: 40px; margin-left: 16px; display: flex; align-items: center; gap: 8px; padding: 0 12px;
  border: 1px solid var(--borda-forte); border-radius: var(--raio-lg); background: var(--superficie-2); color: #64748b; font: 500 14px var(--fonte);
  box-shadow: var(--sombra); cursor: text; text-align: left; }
.busca-gatilho span { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.busca-gatilho:hover { background: #fff; border-color: var(--marca); }
kbd { font: 600 11px/1 var(--fonte); padding: 4px 6px; border: 1px solid var(--borda); border-radius: 6px; background: #fff; color: var(--texto-2); white-space: nowrap; }
.fixar { margin: 0; }
.botao-icone { position: relative; width: 40px; height: 40px; display: inline-grid; place-items: center; border: 0; border-radius: var(--raio-p); background: none;
  color: var(--texto); cursor: pointer; flex: 0 0 auto; }
.botao-icone:hover { background: var(--superficie-2); text-decoration: none; }
.botao-icone.fixada { color: var(--marca); }
.botao-icone.fixada svg { fill: currentColor; }
.sino .contador { position: absolute; top: 2px; right: 2px; }
.contador { display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--perigo); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 18px; text-align: center; }
.atalhos { display: flex; align-items: center; gap: 8px; }
.pilula { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--raio-p, 8px); border: 1px solid var(--borda);
  font-size: 13px; font-weight: 600; color: var(--texto); background: #fff; white-space: nowrap; flex: 0 0 auto; transition: background .15s, border-color .15s; }
.pilula:hover { text-decoration: none; background: var(--superficie-2); }
.pilula:active { transform: scale(.97); }
.pilula svg { stroke: currentColor; }
.pilula.verde svg { color: #0d9488; } .pilula.azul svg { color: #0284c7; }
.pilula.ambar { background: var(--marca); border-color: var(--marca); color: var(--marca-texto); }
.pilula.ambar:hover { background: var(--marca-hover); border-color: var(--marca-hover); }
.atalhos-compactos { display: none; }
.botao-raio { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 999px; border: 1px solid #fde68a; background: #fffbeb; color: #d97706; cursor: pointer; list-style: none; box-shadow: var(--sombra); }
.botao-raio svg { fill: #f59e0b; }
.menu-suspenso { position: relative; }
.menu-suspenso > summary { list-style: none; }
.menu-suspenso > summary::-webkit-details-marker { display: none; }
.menu-lista { position: absolute; top: calc(100% + 6px); left: 0; min-width: 224px; background: #fff; border: 1px solid var(--borda); border-radius: var(--raio-p);
  box-shadow: var(--sombra-md); padding: 4px; display: flex; flex-direction: column; z-index: 40; font-weight: 500; }
.menu-lista.direita { left: auto; right: 0; }
.menu-lista a, .menu-lista button { display: block; width: 100%; padding: 6px 8px; border-radius: var(--raio-s); color: var(--texto); background: none; border: 0;
  font: inherit; text-align: left; cursor: pointer; }
.menu-lista a:hover, .menu-lista button:hover { background: var(--superficie-2); text-decoration: none; }
.menu-titulo { display: flex; align-items: center; gap: 6px; padding: 6px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--borda);
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-2); }
.menu-titulo .icone { color: #f59e0b; fill: #f59e0b; }
.so-celular { display: none; }

/* ===== Área de conteúdo — título, abas e blocos (PageHeader.tsx) ===== */
.principal { flex: 1 1 auto; width: 100%; max-width: 1464px; margin: 0 auto; padding: 32px; display: flex; flex-direction: column; min-width: 0; }
.principal > * { order: 3; min-width: 0; }
.principal > .topo { order: 1; }
.principal > .abas { order: 2; }
.topo { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.topo > div:first-child:not(.acoes) { min-width: 0; }
.subtitulo, .topo p.descricao { margin: 6px 0 0; font-size: 16px; font-weight: 500; color: var(--texto-desc); }
.acoes { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Abas — TabsList do CRM: faixa cinza-clara, aba ativa em pílula branca */
.abas { display: inline-flex; align-self: flex-start; max-width: 100%; gap: 0; padding: 4px; margin-bottom: 24px; background: var(--superficie-3); border-radius: var(--raio-p);
  overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
.abas a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 24px; border-radius: var(--raio-s); font-size: 14px; font-weight: 500; line-height: 20px;
  color: var(--texto-2); transition: all .15s; }
.abas a:hover { color: var(--texto); text-decoration: none; }
.abas a.ativa { background: #fff; color: var(--texto); box-shadow: var(--sombra); }

/* ===== Cartões e grades ===== */
.cartao { background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra); padding: 24px; }
.cartao + .cartao { margin-top: 24px; }
.grade { display: grid; gap: 16px; align-items: start; }
.grade-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grade-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grade-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grade-auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grade > .cartao + .cartao { margin-top: 0; }
.grade + .grade, .grade + .cartao, .cartao + .grade, .alerta-faixa + .grade, .grade + .alerta-faixa, .cartao + .alerta-faixa, .alerta-faixa + .cartao { margin-top: 24px; }
.ocupa-2 { grid-column: span 2; }
/* Indicadores — KpiCard do CRM */
.indicador { display: flex; flex-direction: column; }
.indicador .rotulo { color: var(--texto-forte); font-size: 13px; font-weight: 700; }
.indicador .valor { font-size: 28px; line-height: 1.2; font-weight: 800; letter-spacing: -.025em; margin-top: 8px; font-variant-numeric: tabular-nums; color: var(--texto-titulo); }
.indicador .sub { color: var(--texto-2); font-size: 12px; font-weight: 500; margin-top: 4px; }
.indicador.alerta .valor { color: var(--ruim-texto); }
.indicador.destaque .valor { font-size: 36px; line-height: 1.15; margin-top: 8px; }
.valor.positivo { color: #047857; }
.valor.negativo { color: var(--ruim-texto); }
a.indicador { color: var(--texto); transition: box-shadow .15s; }
a.indicador:hover { text-decoration: none; box-shadow: var(--sombra-md); }
.linhas-valor { display: flex; flex-direction: column; }
.linhas-valor > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--borda); }
.linhas-valor > div:last-child { border-bottom: 0; }
.linhas-valor strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.partes { display: flex; gap: 28px; flex-wrap: wrap; color: var(--texto-2); margin-top: 10px; }
.partes strong { display: block; color: var(--texto); font-size: 16px; font-variant-numeric: tabular-nums; }
.alerta-faixa { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--raio); background: #fef2f2;
  border: 1px solid #fecaca; color: #991b1b; font-weight: 500; }
.alerta-faixa a { color: #991b1b; font-weight: 700; }
.alerta-faixa .texto { flex: 1 1 260px; }
dl.dados { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0; }
dl.dados dt { color: var(--texto-2); font-weight: 600; font-size: 13px; }
dl.dados dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {  /* celular: nada passa da largura da tela */
  dl.dados { grid-template-columns: minmax(0, 1fr); gap: 2px; } dl.dados dd { margin-bottom: 8px; }
  .cartao > table { display: block; max-width: 100%; overflow-x: auto; position: relative; }
  .cartao .botao { max-width: 100%; white-space: normal; height: auto; min-height: 32px; text-align: left; }
}

/* ===== Tabelas — Table do CRM ===== */
.tabela-wrap { overflow-x: auto; }
.tabela-wrap, .tabela-rolagem { position: relative; }
.tabela-rolagem { max-width: 100%; overflow-x: auto; scrollbar-width: thin; } /* tabela larga rola dentro do cartão em vez de ficar cortada */ /* textos ocultos (leitor de tela) ficam presos à rolagem da tabela e não alargam a página */
.cartao > .tabela-wrap:first-child, .cartao.tabela-wrap { margin: -16px; }
.cartao.tabela-wrap { margin: 0; padding: 8px; }
.cartao > .filtros + .tabela-wrap { margin: 0 -16px -16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 16px; border-bottom: 1px solid var(--borda); text-align: left; vertical-align: middle; }
th { height: 48px; padding-top: 0; padding-bottom: 0; font-weight: 600; color: var(--texto); background: var(--superficie-2); }
tbody tr { transition: background-color .15s; }
tbody tr:hover { background: rgba(241, 245, 249, .5); }
tbody tr:last-child td { border-bottom: 0; }
tr.destacada td { background: var(--marca-clara); }
tfoot td { font-weight: 700; border-top: 1px solid var(--borda); border-bottom: 0; background: rgba(241, 245, 249, .5); }
td.vazio { text-align: center; color: var(--texto-2); padding: 48px 16px; }
td.traco { color: var(--texto-2); }
td a { font-weight: 600; }

/* ===== Etiquetas — StatusChip do CRM ===== */
.etiqueta { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 16px; white-space: nowrap;
  background: #f1f5f9; color: #0f172a; border: 1px solid #cbd5e1; }
.etiqueta.ok { background: var(--ok-fundo); color: var(--ok); border-color: var(--ok-borda); }
.etiqueta.ruim { background: var(--ruim-fundo); color: var(--ruim); border-color: var(--ruim-borda); }
.etiqueta.meio { background: var(--meio-fundo); color: var(--meio); border-color: var(--meio-borda); }
.etiqueta.azul { background: var(--azul-fundo); color: var(--azul); border-color: var(--azul-borda); }
.etiqueta.nova { background: var(--marca); color: var(--marca-texto); border-color: transparent; border-radius: 6px; padding: 1px 6px; }

/* ===== Botões — Button do CRM ===== */
.botao, button.botao, input[type=submit] { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 8px 16px;
  border-radius: var(--raio-p); border: 1px solid var(--borda); background: transparent; color: var(--texto); font: 500 14px/1.2 var(--fonte); cursor: pointer;
  white-space: nowrap; transition: background-color .15s, color .15s; }
.botao:hover { text-decoration: none; background: var(--superficie-2); }
.botao.primario, input[type=submit] { background: var(--marca); border-color: var(--marca); color: var(--marca-texto); }
.botao.primario:hover, input[type=submit]:hover { background: var(--marca-hover); border-color: var(--marca-hover); }
.botao.perigo { background: var(--perigo); border-color: var(--perigo); color: #fff; }
.botao.perigo:hover { background: var(--perigo-hover); border-color: var(--perigo-hover); }
.botao.discreto { border-color: transparent; color: var(--texto-2); }
.botao.discreto:hover { color: var(--texto); }
.botao.pequeno { height: 36px; padding: 0 12px; }
.botao[disabled], .botao.desativado { opacity: .5; pointer-events: none; }
form.inline { display: inline; }
summary.botao { cursor: pointer; list-style: none; }

/* ===== Formulários — Input/Select/Label do CRM ===== */
.form-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo.largo { grid-column: 1 / -1; }
.campo label { font-weight: 600; font-size: 14px; line-height: 1.2; }
.campo .ajuda { color: var(--texto-2); font-size: 12px; }
.campo .erro, .erros { color: var(--ruim-texto); font-size: 12.5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=search], input[type=url],
input[type=tel], input[type=month], input[type=time], input:not([type]), select, textarea {
  width: 100%; height: 40px; padding: 8px 12px; border: 1px solid var(--borda); border-radius: var(--raio-p); background: #fff; color: var(--texto); font: 14px var(--fonte);
}
textarea { height: auto; min-height: 80px; }
select[multiple] { height: auto; }
select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
input::placeholder, textarea::placeholder { color: var(--texto-2); }
input:focus-visible, select:focus-visible, textarea:focus-visible, input:focus, select:focus, textarea:focus { outline: none; box-shadow: var(--anel); }
.campo.checkbox { flex-direction: row; align-items: center; gap: 8px; padding-top: 26px; }
table.formset td { padding: 6px; }
table.formset input, table.formset select { min-width: 80px; }
table.formset input[type=checkbox] { min-width: 0; }
table.itens-orcamento input[name$="-descricao"] { min-width: 260px; }
table.itens-orcamento input[name$="-codigo"], table.itens-orcamento input[name$="-unidade"] { min-width: 60px; width: 70px; }
table.itens-orcamento input[type=checkbox] { min-width: 0; }
table.itens-orcamento input[name$="-grupo"] { min-width: 140px; }
.grupo-itens td { background: var(--superficie-2); font-weight: 600; }
/* Filtros: cartão branco, rótulo pequeno em cima de cada controle, controles de 36 px */
.filtros { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filtros input, .filtros select { height: 36px; }
.filtros input[type=search] { width: 280px; }
.filtros select, .filtros input[type=date] { width: auto; }
.filtros .campo { min-width: 160px; gap: 4px; }
.filtros .campo label, .rotulo-filtro { font-size: 12px; font-weight: 600; color: var(--texto-2); }
.filtros .botao { height: 36px; }

/* ===== Mensagens — Toaster do CRM (canto inferior direito) ===== */
.mensagens { position: fixed; right: 16px; bottom: 16px; z-index: 60; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px;
  width: min(420px, calc(100vw - 32px)); order: 0 !important; }
.mensagens li { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 16px 20px; border-radius: var(--raio-p); background: #fff; border: 1px solid var(--borda);
  box-shadow: var(--sombra-lg); font-weight: 600; color: var(--texto); animation: aviso-entra .25s ease-out; }
.mensagens li span { flex: 1 1 auto; }
.mensagens .error { background: var(--perigo); border-color: var(--perigo); color: #fff; }
.mensagens .warning { border-left: 4px solid #f59e0b; }
.fechar-aviso { border: 0; background: none; color: inherit; opacity: .55; cursor: pointer; padding: 2px; border-radius: 6px; display: grid; place-items: center; }
.fechar-aviso:hover { opacity: 1; }
.mensagens li.saindo { opacity: 0; transform: translateY(8px); transition: all .3s; }
@keyframes aviso-entra { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.aviso { padding: 12px 16px; border-radius: var(--raio); background: var(--meio-fundo); border: 1px solid var(--meio-borda); color: var(--meio); margin-bottom: 16px; font-weight: 500; }

/* ===== Paginação ===== */
.paginacao { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 16px; color: var(--texto-2); font-weight: 500; }

/* ===== Gráfico de barras simples (entradas x saídas) ===== */
.fluxo { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; align-items: end; height: 210px; padding-top: 8px; border-bottom: 1px solid var(--borda); }
.fluxo .mes { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.fluxo .barras { display: flex; gap: 4px; align-items: flex-end; height: 170px; }
.fluxo .barra { width: 16px; border-radius: 4px 4px 0 0; min-height: 2px; }
.fluxo .barra.receber { background: #22c55e; }
.fluxo .barra.pagar { background: #ef4444; }
.fluxo .mes > span { color: var(--texto-2); font-size: 12px; }
.legenda { display: flex; gap: 16px; font-size: 13px; color: var(--texto-2); }
.legenda span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.legenda .l-receber::before { background: #22c55e; }
.legenda .l-pagar::before { background: #ef4444; }
.h-10 { height: 10%; } .h-20 { height: 20%; } .h-30 { height: 30%; } .h-40 { height: 40%; } .h-50 { height: 50%; }
.h-60 { height: 60%; } .h-70 { height: 70%; } .h-80 { height: 80%; } .h-90 { height: 90%; } .h-100 { height: 100%; } .h-0 { height: 2px; }
.fluxo-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
@media (max-width: 640px) { .fluxo-12 { gap: 4px; } .fluxo-12 .barras { gap: 2px; } .fluxo-12 .barra { width: 8px; } .fluxo-12 .mes > span { font-size: 10px; } }

/* ===== Listas de vencimentos ===== */
.lista-venc { display: flex; flex-direction: column; }
.lista-venc .titulo-lista { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-2); padding: 8px 0 6px; }
.lista-venc .titulo-lista.ruim { color: var(--ruim-texto); }
.lista-venc .linha { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--borda); }
.lista-venc .linha .quem { flex: 1 1 auto; min-width: 0; }
.lista-venc .linha .quanto { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }

/* ===== Configurações ===== */
.config { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.config-grupos { flex: 0 0 230px; position: sticky; top: 88px; display: flex; flex-direction: column; gap: 2px; background: #fff;
  border: 1px solid var(--borda); border-radius: var(--raio); padding: 8px; box-shadow: var(--sombra); }
.config-grupos a { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: var(--raio-s); color: var(--texto); font-weight: 500; }
.config-grupos a:hover { background: var(--superficie-2); text-decoration: none; }
.config-grupos a span { color: var(--texto-2); }
.config-conteudo { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.config-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; background: #fff;
  border: 1px solid var(--borda); border-radius: var(--raio); color: var(--texto); box-shadow: var(--sombra); }
.config-item + .config-item { margin-top: 8px; }
.config-item:hover { border-color: var(--marca); text-decoration: none; box-shadow: var(--sombra-md); }
.config-item strong { display: block; }
.config-item .icone { color: var(--texto-2); }
.campo-busca { min-width: 280px; }

/* ===== Pesquisa global (Ctrl+K) — Dialog do CRM ===== */
dialog.pesquisa { width: min(640px, calc(100vw - 32px)); margin: 10vh auto auto; padding: 0; border: 1px solid var(--borda); border-radius: var(--raio-lg); background: #fff;
  color: var(--texto); box-shadow: var(--sombra-alta); }
dialog.pesquisa::backdrop { background: rgba(0, 0, 0, .8); }
.pesquisa-campo { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 60px; border-bottom: 1px solid var(--borda); color: var(--texto-2); }
.pesquisa-campo input { flex: 1 1 auto; border: 0; outline: 0; background: none; font-size: 16px; height: auto; padding: 0; box-shadow: none !important; }
.pesquisa-campo input::-webkit-search-cancel-button { display: none; }
.pesquisa-resultados { max-height: 56vh; overflow-y: auto; padding: 8px; }
.pesquisa-resultados .grupo { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--texto-2); padding: 10px 10px 4px; }
.pesquisa-resultados a { display: block; padding: 8px 10px; border-radius: var(--raio-s); color: var(--texto); font-weight: 600; }
.pesquisa-resultados a small { display: block; color: var(--texto-2); font-weight: 500; }
.pesquisa-resultados a:hover, .pesquisa-resultados a.marcado { background: var(--superficie-2); text-decoration: none; }
.pesquisa-resultados .nada { padding: 18px 10px; color: var(--texto-2); }
.pesquisa-rodape { display: flex; gap: 18px; flex-wrap: wrap; padding: 10px 18px; border-top: 1px solid var(--borda); background: var(--superficie-3); color: var(--texto-2); font-size: 12px; border-radius: 0 0 var(--raio-lg) var(--raio-lg); }

/* ===== Janela (modal) — Dialog do CRM ===== */
dialog.janela { width: min(512px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--borda); border-radius: var(--raio-lg); background: #fff; color: var(--texto); box-shadow: var(--sombra-lg); }
dialog.janela::backdrop { background: rgba(0, 0, 0, .8); }
dialog.janela h2 { font-size: 18px; font-weight: 600; letter-spacing: -.025em; line-height: 1; margin: 0 0 8px; }
dialog.janela .descricao { color: var(--texto-2); margin: 0 0 16px; }
dialog.janela .rodape { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; flex-wrap: wrap; }

/* ===== Tela de entrada ===== */
.entrada { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--superficie-3); }
.entrada .cartao { width: 100%; max-width: 400px; padding: 32px; }
.entrada .logo { display: flex; align-items: center; gap: 12px; color: var(--texto); padding: 0 0 20px; font-weight: 800; font-size: 18px; letter-spacing: -.025em; }
.entrada .logo img { width: 36px; height: 36px; }
.entrada .logo-entrada { flex-direction: column; gap: 6px; }
.entrada .logo-entrada img { width: min(260px, 100%); height: auto; }
.entrada .logo-entrada span { font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--texto-desc); }
.entrada form { display: grid; gap: 14px; }
.logo-marca { width: 36px; height: 36px; border-radius: var(--raio-lg); background: var(--marca); display: grid; place-items: center; font-size: 13px; color: var(--marca-texto); }
.qr { text-align: center; margin: 12px 0; }
.qr svg { display: inline-block; width: 240px; max-width: 100%; height: auto; background: #fff; border-radius: 6px; }
.chave-2fa { font-size: 1.05em; letter-spacing: .05em; word-break: break-all; user-select: all; }

label.confiar { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--borda); border-radius: var(--raio); cursor: pointer; font-size: 13px; line-height: 1.4; }
label.confiar input { margin-top: 2px; }

/* ===== Calendário ===== */
.cal-grade { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--borda); border-left: 1px solid var(--borda); border-radius: var(--raio); overflow: hidden; }
.cal-cab { padding: 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--texto-2); background: var(--superficie-2); border-right: 1px solid var(--borda); border-bottom: 1px solid var(--borda); }
.cal-dia { min-height: 104px; padding: 4px 6px; border-right: 1px solid var(--borda); border-bottom: 1px solid var(--borda); display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.cal-dia.fora { background: var(--superficie-3); color: var(--texto-2); }
.cal-dia.hoje .cal-num { background: var(--marca); color: var(--marca-texto); border-radius: 999px; padding: 0 7px; }
.cal-num { font-size: 12px; font-weight: 600; align-self: flex-start; }
.cal-ev { display: block; font-size: 12px; padding: 1px 6px; border-radius: 6px; background: var(--azul-fundo); color: var(--texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid #3b82f6; font-weight: 500; }
.cal-ev:hover { text-decoration: none; filter: brightness(.97); }
.cal-ev.tipo-tarefa { border-left-color: #f59e0b; background: var(--meio-fundo); }
.cal-ev.tipo-obra { border-left-color: #10b981; background: var(--ok-fundo); }
.cal-ev.tipo-licitacao { border-left-color: #64748b; background: var(--superficie-2); }
.texto-ruim { color: var(--ruim-texto); font-weight: 600; }
.texto-ok { color: #047857; }
tr.nao-lida td { font-weight: 600; }
button.link { background: none; border: 0; padding: 0; color: var(--marca-link); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
button.link:hover { text-decoration: underline; }
.relatorio-importacao { white-space: pre-wrap; font-size: .85em; max-height: 480px; overflow: auto; }
.veu { display: none; }


/* ===== Caixa de marcar — Checkbox do CRM (redonda, âmbar quando marcada) ===== */
input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin: 0; flex: 0 0 auto; border: 1px solid var(--marca); border-radius: 50%;
  background: #fff center / 12px no-repeat; cursor: pointer; vertical-align: middle; }
input[type=checkbox]:checked { background-color: var(--marca); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
input[type=checkbox]:indeterminate { background-color: var(--marca); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E"); }

/* ===== Licitações — Licitacoes.tsx do CRM ===== */
.filtros-cartao { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; padding: 16px; margin-bottom: 24px; }
.filtros-cartao .filtro { display: flex; flex-direction: column; gap: 4px; width: 160px; }
.filtros-cartao .filtro-busca { flex: 1 1 220px; width: auto; }
.filtros-cartao .estreito { width: 144px; }
.filtros-cartao #filtro-modalidade { width: 176px; }
.filtros-cartao input, .filtros-cartao select { height: 36px; }
.filtros-cartao input[type=checkbox] { height: 16px; }
.filtros-cartao select { padding-left: 12px; white-space: nowrap; text-overflow: ellipsis; }
.filtros-cartao .botao { height: 36px; }
.com-icone { position: relative; }
.com-icone > .icone { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--texto-2); pointer-events: none; }
.com-icone input { padding-left: 36px; }
.abas-fase { margin-bottom: 24px; flex-wrap: wrap; }
.abas-fase a { padding: 6px 14px; }
[data-cor] { --c: #64748b; --c-fundo: #f1f5f9; --c-texto: #0f172a; --c-borda: #cbd5e1; }
[data-cor=ciano] { --c: #22d3ee; --c-fundo: #cffafe; --c-texto: #155e75; --c-borda: #a5f3fc; }
[data-cor=rosa] { --c: #fb7185; --c-fundo: #ffe4e6; --c-texto: #9f1239; --c-borda: #fecdd3; }
[data-cor=azul] { --c: #60a5fa; --c-fundo: #dbeafe; --c-texto: #1e40af; --c-borda: #bfdbfe; }
[data-cor=roxo] { --c: #c084fc; --c-fundo: #f3e8ff; --c-texto: #6b21a8; --c-borda: #e9d5ff; }
[data-cor=ambar] { --c: #f59e0b; --c-fundo: #fef3c7; --c-texto: #92400e; --c-borda: #fde68a; }
[data-cor=indigo] { --c: #6366f1; --c-fundo: #e0e7ff; --c-texto: #3730a3; --c-borda: #c7d2fe; }
[data-cor=pink] { --c: #ec4899; --c-fundo: #fce7f3; --c-texto: #9d174d; --c-borda: #fbcfe8; }
[data-cor=laranja] { --c: #f97316; --c-fundo: #ffedd5; --c-texto: #9a3412; --c-borda: #fed7aa; }
[data-cor=teal] { --c: #14b8a6; --c-fundo: #ccfbf1; --c-texto: #115e59; --c-borda: #99f6e4; }
[data-cor=verde] { --c: #22c55e; --c-fundo: #16a34a; --c-texto: #fff; --c-borda: #15803d; }
[data-cor=vermelho] { --c: #ef4444; --c-fundo: #dc2626; --c-texto: #fff; --c-borda: #b91c1c; }
.cards-fase { display: grid; grid-template-columns: repeat(auto-fit, minmax(172px, 1fr)); gap: 12px; margin-bottom: 24px; }
.card-fase { display: flex; flex-direction: column; justify-content: space-between; min-height: 92px; padding: 12px; background: #fff; border: 1px solid var(--borda);
  border-radius: var(--raio); box-shadow: var(--sombra); color: var(--texto); transition: box-shadow .15s, opacity .15s; min-width: 0; }
.card-fase:hover { text-decoration: none; box-shadow: var(--sombra-md); }
.card-fase.ativa { border: 2px solid var(--c); padding: 11px; }
.card-fase.apagada { opacity: .5; box-shadow: none; }
.card-fase.apagada:hover { opacity: .8; }
.cf-topo { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 4px; min-width: 0; }
.cf-nome > span { min-width: 0; overflow-wrap: break-word; }
.cf-nome { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 11.5px; font-weight: 700; line-height: 1.25; text-transform: uppercase; letter-spacing: .02em; color: var(--texto-2); }
.card-fase.ativa .cf-nome, .card-fase:hover .cf-nome { color: var(--texto); }
.ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: 0 0 auto; }
.cf-n { flex: 0 0 auto; font-size: 11px; font-weight: 600; line-height: 16px; padding: 2px 6px; border-radius: 6px; background: var(--superficie-2); color: var(--texto-2); }
.card-fase.ativa .cf-n { background: var(--marca-clara); color: var(--marca-link); font-weight: 700; }
.cf-valor { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.cf-sub { font-size: 11px; font-weight: 500; color: var(--texto-2); margin-top: 2px; }
.fase { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 16px; white-space: nowrap;
  background: var(--c-fundo); color: var(--c-texto); border: 1px solid var(--c-borda); }
.tabela-licitacoes { padding: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }  /* rola no celular */
.tabela-licitacoes table { table-layout: fixed; min-width: 980px; }
.tabela-licitacoes th:nth-child(4) { width: 11%; }
.tabela-licitacoes th:nth-child(5) { width: 10%; }
.tabela-licitacoes th:nth-child(6) { width: 12%; }
.tabela-licitacoes th:nth-child(8) { width: 16%; }
.tabela-licitacoes td.c-edital { overflow-wrap: anywhere; }
.tabela-licitacoes th { line-height: 1.25; }
.tabela-licitacoes th.c-data { white-space: normal; }
.tabela-licitacoes th { color: var(--texto); }
.tabela-licitacoes td .fase { white-space: normal; text-align: left; }
.tabela-licitacoes th.sel, .tabela-licitacoes td.sel { width: 40px; padding-right: 0; }
.tabela-licitacoes td.sel { border-left: 4px solid transparent; }
.tabela-licitacoes .c-edital { width: 21%; }
.tabela-licitacoes .c-objetivo { width: 22%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; color: var(--texto); }
.tabela-licitacoes .c-data { width: 10%; white-space: nowrap; }
.tabela-licitacoes td:last-child { overflow: hidden; padding-left: 8px; padding-right: 8px; }
.tabela-licitacoes td.mudo { font-weight: 500; }
.tabela-licitacoes .valor { white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.prio-5 td.sel { border-left-color: #ef4444; }
tr.prio-4 td.sel { border-left-color: #f97316; }
tr.prio-3 td.sel { border-left-color: #eab308; }
tr.prio-2 td.sel { border-left-color: #3b82f6; }
tr.prio-1 td.sel { border-left-color: #94a3b8; }
tr[data-href] { cursor: pointer; }
tr.selecionada td { background: var(--superficie-2); }
.edital { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--texto); }
.edital a { color: var(--texto); font-weight: 700; }
.edital a.externo { color: var(--texto-2); display: inline-grid; place-items: center; }
.edital a.externo:hover { color: var(--marca-link); }
.orgao { font-size: 12px; color: var(--texto-2); margin-top: 2px; font-weight: 400; }
.prioridade { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; color: #fff; }
.prioridade.p0 { background: #78716c; }
.prioridade.p1 { background: #475569; }
.prioridade.p2 { background: #2563eb; }
.prioridade.p3 { background: #f59e0b; color: #451a03; }
.prioridade.p4 { background: #f97316; }
.prioridade.p5 { background: #e11d48; }
.estado-vazio { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--texto-2); }
.estado-vazio .icone { color: rgba(100, 116, 139, .5); margin-bottom: 8px; }
.estado-vazio strong { color: var(--texto); font-weight: 500; }
/* Barra de ações em lote — LicitacaoBulkActionBar.tsx */
.barra-lote { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: #fff; border: 1px solid var(--borda); border-radius: 16px; box-shadow: var(--sombra-alta); max-width: 95vw; overflow-x: auto; animation: barra-entra .3s ease-out; }
.barra-lote[hidden] { display: none; }
@keyframes barra-entra { from { opacity: 0; transform: translate(-50%, 40px); } to { opacity: 1; transform: translate(-50%, 0); } }
.bl-contagem { display: flex; align-items: center; gap: 8px; padding-right: 16px; border-right: 1px solid var(--borda); flex: 0 0 auto; }
.bl-n { width: 24px; height: 24px; border-radius: 50%; background: var(--marca); color: var(--marca-texto); display: grid; place-items: center; font-size: 12px; font-weight: 500; }
.bl-rotulo { font-size: 14px; font-weight: 500; color: #334155; }
.bl-limpar { width: 28px; height: 28px; margin-left: 4px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: #64748b; cursor: pointer; }
.bl-limpar:hover { background: var(--superficie-2); color: #0f172a; }
.bl-acoes { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
@media (max-width: 767px) {
  .filtros-cartao .filtro, .filtros-cartao .estreito, .filtros-cartao #filtro-modalidade { width: 100%; }
  .abas-fase { flex-wrap: nowrap; }
}
@media (max-width: 639px) { .bl-rotulo, .bl-acoes .botao span { display: none; } }


/* ===== Financeiro — Financeiro.tsx do CRM ===== */
.principal > .fin-barra { order: 2; }
.fin-barra { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 16px; margin-bottom: 24px; border-bottom: 1px solid var(--borda); }
.fin-abas { display: flex; flex: 1 1 640px; max-width: 1100px; min-width: 0; height: 44px; padding: 4px; background: var(--superficie-2); border-radius: var(--raio-p); overflow-x: auto; }
.fin-abas a { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; min-width: 0; overflow: hidden; border-radius: var(--raio-s); font-size: 14px; font-weight: 700;
  color: var(--texto-2); white-space: nowrap; transition: all .15s; }
.fin-abas a:hover { color: var(--texto); text-decoration: none; }
.fin-abas a.ativa { background: #fff; box-shadow: var(--sombra); }
.fin-abas a[data-tom=verde] .icone { color: #059669; } .fin-abas a.ativa[data-tom=verde] { color: #047857; }
.fin-abas a.ativa[data-tom=rosa] { color: #e11d48; }
.fin-abas a[data-tom=indigo] .icone { color: #4f46e5; } .fin-abas a.ativa[data-tom=indigo] { color: #4338ca; }
.fin-abas a.ativa[data-tom=escuro] { color: #0f172a; }
.fin-abas a[data-tom=azul] .icone { color: #2563eb; } .fin-abas a.ativa[data-tom=azul] { color: #1d4ed8; }
.fin-abas a { flex: 1 0 auto; }
.fin-abas a span { overflow: visible; }
@media (max-width: 1500px) {
  .fin-abas a:not(.ativa) .icone { display: none; }
  .fin-abas a { font-size: 13px; padding: 0 6px; }
}
.fin-acoes { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.fin-acoes .botao { height: 36px; font-size: 12px; font-weight: 600; }
/* Botões de ação principal: todos no amarelo da marca (antes verde/rosa/índigo/escuro por tela) */
.botao.cor-verde, .botao.cor-rosa { background: var(--marca); border-color: var(--marca); color: var(--marca-texto); font-weight: 700; }
.botao.cor-verde:hover, .botao.cor-rosa:hover { background: var(--marca-hover); border-color: var(--marca-hover); }
[data-cor=azul] { --k-borda: #bfdbfe; --k-fundo: rgba(239, 246, 255, .4); --k-texto: #1d4ed8; --k-sub: rgba(37, 99, 235, .8); --k-icone: #2563eb; --k-caixa: rgba(59, 130, 246, .1); }
[data-cor=ambar] { --k-borda: #fde68a; --k-fundo: rgba(255, 251, 235, .4); --k-texto: #b45309; --k-sub: rgba(217, 119, 6, .8); --k-icone: #d97706; --k-caixa: rgba(245, 158, 11, .1); }
[data-cor=vermelho] { --k-borda: #fecdd3; --k-fundo: rgba(255, 241, 242, .4); --k-texto: #be123c; --k-sub: rgba(225, 29, 72, .8); --k-icone: #e11d48; --k-caixa: rgba(244, 63, 94, .1); }
[data-cor=verde] { --k-borda: #a7f3d0; --k-fundo: rgba(236, 253, 245, .4); --k-texto: #047857; --k-sub: rgba(5, 150, 105, .8); --k-icone: #059669; --k-caixa: rgba(16, 185, 129, .1); }
[data-cor=cinza] { --k-borda: #e2e8f0; --k-fundo: rgba(248, 250, 252, .6); --k-texto: #334155; --k-sub: #64748b; --k-icone: #64748b; --k-caixa: rgba(100, 116, 139, .1); }
.kpis-fin { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi-fin { display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--k-borda); background: var(--k-fundo); border-radius: var(--raio-lg); box-shadow: var(--sombra); }
.kpi-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--k-texto); margin-bottom: 8px; }
.kpi-topo i { display: grid; place-items: center; padding: 8px; border-radius: var(--raio-lg); background: var(--k-caixa); color: var(--k-icone); font-style: normal; }
.kpi-fin strong { white-space: nowrap; font-size: clamp(22px, 2.05vw, 30px); line-height: 1.2; font-weight: 900; color: var(--k-texto); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi-fin small { font-size: 11px; font-weight: 500; color: var(--k-sub); margin-top: 4px; }
.filtros-fin { padding: 16px; margin-bottom: 24px; }
.filtros-fin-linha { display: flex; gap: 12px; align-items: center; }
.filtro-busca-fin { flex: 1 1 auto; }
.filtros-fin input[type=search] { height: 40px; background: rgba(248, 250, 252, .5); border-color: var(--borda-forte); }
.filtros-fin select { width: 200px; height: 40px; border-color: var(--borda-forte); flex: 0 0 auto; }
.filtros-fin-datas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--borda); font-size: 12px; font-weight: 700; color: #475569; }
.filtros-fin-datas span { display: inline-flex; align-items: center; gap: 4px; }
.filtros-fin-datas input { width: 160px; height: 32px; font-size: 12px; border-color: var(--borda-forte); }
.tabela-fin { background: #fff; border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra); overflow-x: auto; margin-bottom: 24px; }
.tabela-fin table { font-size: 14px; }
.tabela-fin th { background: var(--superficie-2); font-weight: 700; color: #0f172a; height: auto; padding: 10px 12px; white-space: nowrap; }
.tabela-fin td { padding: 10px 12px; }
.tabela-fin tbody tr:hover { background: rgba(248, 250, 252, .8); }
.tabela-fin .w-venc { width: 130px; } .tabela-fin .w-parc { width: 145px; } .tabela-fin .w-st { width: 130px; } .tabela-fin .w-acoes { width: 110px; }
.tabela-fin .nowrap { white-space: nowrap; }
.tabela-fin .forte { display: flex; align-items: center; gap: 6px; font-weight: 700; color: #0f172a; font-size: 14px; }
.tabela-fin .forte.xs { font-size: 12px; color: #1e293b; }
.tabela-fin .forte .icone { color: #94a3b8; }
.tabela-fin .trunca { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.tabela-fin .sub { display: block; font-size: 11px; color: var(--texto-2); margin-top: 2px; }
.tabela-fin .sub .juros { color: #d97706; font-weight: 600; }
.tabela-fin .origem { font-size: 12px; font-weight: 500; color: #1e293b; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabela-fin .refs { display: flex; gap: 8px; margin-top: 2px; font-size: 11px; font-weight: 600; color: var(--texto-2); }
.tabela-fin .refs span { display: inline-flex; align-items: center; gap: 2px; }
.tabela-fin .refs .os { color: #2563eb; }
.tabela-fin .valor-fin { font-weight: 900; color: #0f172a; font-variant-numeric: tabular-nums; }
.tabela-fin .ajustes { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; font-size: 10px; font-weight: 500; margin-top: 2px; }
.tabela-fin .ajustes .mais { color: #b45309; } .tabela-fin .ajustes .menos { color: #047857; font-weight: 600; }
.pago-em { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 10px; font-weight: 500; color: #059669; }
.mini-desfazer { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; border: 0; border-radius: 8px; background: none; color: #64748b; font: 500 10px var(--fonte); cursor: pointer; }
.mini-desfazer:hover { background: #fffbeb; color: #b45309; }
.st-fin { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid; }
.st-fin[data-cor=ambar] { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.st-fin[data-cor=azul] { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.st-fin[data-cor=verde] { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.st-fin[data-cor=vermelho] { background: #ffe4e6; color: #9f1239; border-color: #fda4af; }
.st-fin[data-cor=cinza] { background: #f1f5f9; color: #334155; border-color: #cbd5e1; }
.acoes-linha { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.btn-receber, .btn-desfazer { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border-radius: var(--raio-p); border: 1px solid; font: 700 12px var(--fonte); cursor: pointer; white-space: nowrap; }
.btn-receber { background: #ecfdf5; color: #047857; border-color: #6ee7b7; }
.btn-receber:hover { background: #d1fae5; }
.btn-desfazer { background: #fffbeb; color: #b45309; border-color: #fcd34d; font-weight: 600; }
.btn-desfazer:hover { background: #fef3c7; }
.btn-recibo { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border-radius: var(--raio-p); border: 1px solid #93c5fd; background: #eff6ff; color: #1d4ed8; font: 700 12px var(--fonte); text-decoration: none; white-space: nowrap; }
.btn-recibo:hover { background: #dbeafe; }
.btn-lixo { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: var(--raio-p); background: none; color: #94a3b8; cursor: pointer; }
.btn-lixo:hover { color: var(--perigo); background: var(--superficie-2); }
dialog.janela-receber { width: min(448px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; }
dialog.janela-receber form { display: flex; flex-direction: column; gap: 16px; }
.titulo-verde { display: flex; align-items: center; gap: 8px; color: #047857 !important; }
.titulo-verde .icone { color: #059669; }
.resumo-receber { padding: 12px; background: #f8fafc; border: 1px solid var(--borda); border-radius: var(--raio-lg); font-size: 12px; display: flex; flex-direction: column; gap: 6px; color: #334155; }
.resumo-receber > div { display: flex; justify-content: space-between; gap: 8px; }
.resumo-receber > div > span:first-child { font-weight: 600; color: #64748b; }
.resumo-receber .linha-total { padding-top: 6px; border-top: 1px solid var(--borda); align-items: center; }
.resumo-receber.quebra .leve { font-size: 11px; }
.resumo-receber .mais { color: #b45309; font-size: 11px; } .resumo-receber .menos { color: #047857; font-size: 11px; }
.resumo-receber .mais span:first-child, .resumo-receber .menos span:first-child { color: inherit; font-weight: 400; }
.resumo-receber.quebra .linha-total span:first-child { color: #0f172a; font-weight: 700; }
.total-verde { font-size: 16px; font-weight: 900; color: #059669; }
.caixa-ajuste { padding: 12px; border-radius: var(--raio-lg); border: 1px solid; display: flex; flex-direction: column; gap: 8px; }
.caixa-ajuste.verde { border-color: rgba(167, 243, 208, .8); background: rgba(236, 253, 245, .4); }
.caixa-ajuste.ambar { border-color: rgba(253, 230, 138, .8); background: rgba(255, 251, 235, .4); }
.ajuste-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; }
.caixa-ajuste.verde .ajuste-topo { color: #064e3b; } .caixa-ajuste.verde .icone { color: #059669; }
.caixa-ajuste.ambar .ajuste-topo { color: #78350f; } .caixa-ajuste.ambar .icone { color: #d97706; }
.ajuste-topo span { display: inline-flex; align-items: center; gap: 6px; }
.ajuste-topo small { font-size: 10px; font-weight: 400; color: rgba(180, 83, 9, .8); }
.ajuste-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ajuste-rotulo { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 11px; font-weight: 700; color: #334155; }
.caixa-ajuste input[type=number] { height: 32px; font-size: 12px; background: #fff; }
select.tipo-ajuste { width: auto; height: 22px; padding: 0 22px 0 6px; font-size: 10px; font-weight: 700; border-radius: 6px; background-position: right 4px center; background-size: 12px; }
.grade-2-fixa { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
dialog.janela .campo label { font-size: 12px; font-weight: 700; color: #334155; }
dialog.janela input[type=date], dialog.janela input[type=time], dialog.janela select:not(.tipo-ajuste) { height: 36px; }
.kpi-neutro strong { color: #0f172a; }
.filtros-fin select.w160 { width: 160px; } .filtros-fin select.w170 { width: 170px; } .filtros-fin select.w180 { width: 180px; }
.tabela-fin .desc-custo { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 340px; }
.tabela-fin .trunca-340 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 340px; }
.tabela-fin .sub.mini { font-size: 10px; }
.tabela-fin .valor-fin.rosa { color: #e11d48; }
.selo-fin { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; border: 1px solid; }
.selo-fin[data-tom=ambar] { background: #fffbeb; color: #b45309; border-color: #fde68a; } .selo-fin[data-tom=ambar] .icone { color: #d97706; }
.selo-fin[data-tom=azul] { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; } .selo-fin[data-tom=azul] .icone { color: #2563eb; }
.selo-fin[data-tom=roxo] { background: #faf5ff; color: #7e22ce; border-color: #e9d5ff; } .selo-fin[data-tom=roxo] .icone { color: #9333ea; }
.selo-fin[data-tom=cinza] { background: #f8fafc; color: #475569; border-color: #e2e8f0; font-weight: 500; } .selo-fin[data-tom=cinza] .icone { color: #94a3b8; }
.cat-fin { --cat: #64748b; --cat-borda: #64748b80; --cat-fundo: #64748b26; display: inline-flex; align-items: center; gap: 6px; max-width: 150px; padding: 2px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--cat-borda); background: var(--cat-fundo); color: var(--cat); }
.cat-fin i { width: 6px; height: 6px; border-radius: 50%; background: var(--cat); flex: 0 0 auto; }
.cat-fin span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) { .kpis-fin { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .kpis-fin { grid-template-columns: 1fr; }
  .filtros-fin-linha { flex-direction: column; align-items: stretch; }
  .filtros-fin select { width: 100%; }
  .fin-abas { flex-basis: 100%; }
  .fin-acoes { margin-left: 0; align-self: flex-end; }
}


/* ===== Financeiro › Análise Financeira — AnaliseFinanceiraDashboard.tsx ===== */
.an-cabecalho { padding: 20px; margin-bottom: 24px; display: flex; flex-direction: column; gap: 16px; }
.an-topo { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.an-titulo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.an-titulo h2 { margin: 0; font-size: 24px; font-weight: 900; letter-spacing: -.025em; color: #0f172a; }
.an-icone { padding: 6px; border-radius: var(--raio-lg); background: #d1fae5; color: #065f46; display: grid; place-items: center; }
.selo-an { display: inline-flex; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--superficie-2); color: #475569; }
.selo-an.verde { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; font-size: 12px; font-weight: 700; }
.an-desc { margin: 4px 0 0; font-size: 14px; color: var(--texto-2); }
.seg { display: inline-flex; padding: 2px; border: 1px solid var(--borda); border-radius: var(--raio-lg); background: #f8fafc; }
.seg button { padding: 6px 12px; border: 0; border-radius: var(--raio-p); background: none; font: 600 12px var(--fonte); color: #475569; cursor: pointer; }
.seg button.ativo { background: #fff; color: #0f172a; font-weight: 700; box-shadow: var(--sombra); }
.an-filtros { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; padding-top: 12px; border-top: 1px solid var(--borda); }
.an-f label { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; font-size: 11px; font-weight: 700; color: #475569; }
.an-f.largo label { color: #334155; } .an-f.largo label .icone { color: var(--marca); }
.an-f select { height: 36px; font-size: 12px; font-weight: 600; background-color: #f8fafc; }
.an-f select.destaque { font-weight: 700; border-color: rgba(231, 176, 8, .4); }
.an-f select:disabled { opacity: .5; }
.an-grade { display: grid; gap: 12px; margin-bottom: 12px; }
.an-grade.cinco { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.an-grade.sete { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.an-card { display: flex; flex-direction: column; min-width: 0; padding: 14px; border: 1px solid var(--borda); border-radius: var(--raio-lg); background: #fff; box-shadow: var(--sombra); }
.an-card.mini { padding: 12px; }
.an-card-topo { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-bottom: 4px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.an-card-topo.cinza { color: #334155; }
.an-card-topo:has(.selo-fim) { flex-wrap: wrap; row-gap: 6px; } .an-card-topo:has(.selo-fim) > span:first-child { flex: 1 1 100%; }
.an-valor { font-size: clamp(20px, 1.9vw, 30px); line-height: 1.2; font-weight: 900; letter-spacing: -.025em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.an-valor.menor { font-size: clamp(18px, 1.6vw, 24px); }
.an-valor.mini { font-size: clamp(16px, 1.3vw, 20px); }
.an-valor.escuro { color: #0f172a; }
.an-sub { margin: 4px 0 0; font-size: 11px; font-weight: 500; color: #475569; }
.an-sub.cinza, .an-mini { color: var(--texto-2); }
.an-mini { margin: 4px 0 0; font-size: 10px; }
.an-par { display: flex; justify-content: space-between; gap: 6px; margin-top: 4px; font-size: 11px; color: #475569; flex-wrap: wrap; }
.an-rodape { display: flex; justify-content: space-between; gap: 6px; margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(226, 232, 240, .6); font-size: 10px; color: var(--texto-2); flex-wrap: wrap; }
.selo-fim { padding: 0 6px; border-radius: 999px; border: 1px solid; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: -.01em; white-space: nowrap; }
.an-card.destaque { border-width: 2px; }
.an-card.destaque.pos { border-color: #10b981; background: rgba(236, 253, 245, .5); }
.an-card.destaque.pos .an-card-topo { color: #064e3b; } .an-card.destaque.pos .an-valor { color: #047857; }
.an-card.destaque.pos .selo-fim { border-color: #34d399; background: rgba(209, 250, 229, .8); color: #065f46; }
.an-card.destaque.neg { border-color: #f43f5e; background: rgba(255, 241, 242, .5); }
.an-card.destaque.neg .an-card-topo { color: #881337; } .an-card.destaque.neg .an-valor { color: #be123c; }
.an-card.destaque.neg .selo-fim { border-color: #fb7185; background: rgba(255, 228, 230, .8); color: #9f1239; }
.an-card.realizado.pos { border-color: #6ee7b7; background: rgba(236, 253, 245, .5); } .an-card.realizado.pos .an-card-topo { color: #065f46; }
.an-card.realizado.pos .an-card-topo .icone { color: #059669; } .an-card.realizado.pos .an-valor { color: #047857; }
.an-card.realizado.neg { border-color: #fda4af; background: rgba(255, 241, 242, .5); } .an-card.realizado.neg .an-card-topo { color: #9f1239; }
.an-card.realizado.neg .an-card-topo .icone { color: #e11d48; } .an-card.realizado.neg .an-valor { color: #be123c; }
.an-card.previsto.pos { border-color: #99f6e4; background: rgba(240, 253, 250, .3); } .an-card.previsto.pos .an-valor { color: #0f766e; }
.an-card.previsto.neg { border-color: #fde68a; background: rgba(255, 251, 235, .3); } .an-card.previsto.neg .an-valor { color: #b45309; }
.an-card.previsto .an-card-topo .icone { color: #0d9488; }
.an-card[data-tom=verde] { border-color: #a7f3d0; } .an-card[data-tom=verde] .an-card-topo, .an-card[data-tom=verde] .an-valor { color: #047857; } .an-card[data-tom=verde] .icone { color: #059669; }
.an-card[data-tom=rosa] { border-color: #fecdd3; } .an-card[data-tom=rosa] .an-card-topo, .an-card[data-tom=rosa] .an-valor { color: #be123c; } .an-card[data-tom=rosa] .icone { color: #e11d48; }
.an-card[data-tom=azul] { border-color: #bfdbfe; } .an-card[data-tom=azul] .an-card-topo, .an-card[data-tom=azul] .an-valor { color: #1d4ed8; } .an-card[data-tom=azul] .icone { color: #2563eb; }
.an-card[data-tom=ambar] { border-color: #fde68a; } .an-card[data-tom=ambar] .an-card-topo, .an-card[data-tom=ambar] .an-valor { color: #b45309; } .an-card[data-tom=ambar] .icone { color: #d97706; }
.an-card[data-tom=indigo] { border-color: #c7d2fe; } .an-card[data-tom=indigo] .an-card-topo, .an-card[data-tom=indigo] .an-valor { color: #4338ca; } .an-card[data-tom=indigo] .icone { color: #4f46e5; }
.an-card.mini[data-tom=verde] { background: rgba(236, 253, 245, .4); } .an-card.mini[data-tom=rosa] { background: rgba(255, 241, 242, .4); }
.an-card.mini[data-tom=azul] { background: rgba(239, 246, 255, .4); } .an-card.mini[data-tom=ambar] { background: rgba(255, 251, 235, .4); }
.an-card.mini[data-tom=indigo] { background: rgba(238, 242, 255, .4); }
.an-card.branco-cinza .icone { color: #64748b; } .an-card .ic-ambar .icone { color: #f59e0b; } .an-card .ic-azul .icone { color: #3b82f6; }
.an-card i { font-style: normal; display: inline-grid; }
.txt-verde { color: #059669; font-weight: 600; }
.an-secao { display: flex; align-items: center; gap: 6px; padding: 4px 4px 0; margin: 12px 0 6px; font-size: 12px; font-weight: 900; text-transform: uppercase; }
.an-secao.verde { color: #047857; } .an-secao.rosa { color: #be123c; }
@media (max-width: 1279px) { .an-grade.sete { grid-template-columns: repeat(4, minmax(0, 1fr)); } .an-grade.cinco { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1023px) { .an-filtros { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .an-grade.sete, .an-grade.cinco, .an-filtros { grid-template-columns: repeat(2, minmax(0, 1fr)); } .an-f.largo { grid-column: span 2; } }

/* ===== Telas médias (mesmos pontos de quebra do CRM: 1280 / 1024 / 768) ===== */
@media (max-width: 1279px) {
  .busca-gatilho { width: 40px; max-width: 40px; margin-left: 0; padding: 0; justify-content: center; background: none; border-color: transparent; box-shadow: none; }
  .busca-gatilho span, .busca-gatilho kbd { display: none; }
}
@media (max-width: 1023px) {
  .atalhos { display: none; }
  .atalhos-compactos { display: block; }
  .grade-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principal { padding: 24px; }
}

/* Celular: menu vira gaveta pela esquerda (Sheet do CRM) */
@media (max-width: 767px) {
  .app { grid-template-columns: 1fr; }
  .lateral { position: fixed; left: 0; top: 0; bottom: 0; width: 256px; height: 100vh; transform: translateX(-100%); transition: transform .2s ease; border-right: 0; }
  .menu-aberto .lateral { transform: none; }
  .menu-aberto .veu { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .8); z-index: 25; }
  .menu-recolhido { --largura-menu: 256px; }
  .menu-recolhido .marca, .menu-recolhido .marca-texto, .menu-recolhido .usuario-nome, .menu-recolhido .usuario-cartao form { display: flex; }
  .menu-recolhido .marca { gap: 10px; }
  .menu-recolhido .grupo-titulo { display: block; }
  .menu-recolhido .item-menu span { display: inline; }
  .menu-recolhido .area-titulo { justify-content: flex-start; padding: 9px 12px; }
  .menu-recolhido .area-titulo span, .menu-recolhido .rodape-links .item-menu span { display: inline; }
  .menu-recolhido .area-titulo > .icone:last-child { display: inline-block; }
  .menu-recolhido .area-menu[open] .area-itens { display: flex; }
  .menu-recolhido .lateral-topo { padding: 20px 12px 20px 20px; flex-direction: row; justify-content: space-between; gap: 8px; }
  .menu-recolhido .lateral-itens { padding: 24px 16px; gap: 32px; }
  .menu-recolhido .item-menu { justify-content: flex-start; padding: 10px 16px; }
  .menu-recolhido .usuario-cartao { padding: 12px; background: rgba(30, 41, 59, .5); border: 1px solid var(--lateral-borda); }
  .recolher { display: none; }
  .so-celular { display: inline-grid; }
  .cabecalho { padding: 0 16px; gap: 8px; }
  .principal { padding: 16px; }
  h1 { font-size: 26px; }
  .abas { align-self: stretch; }
  .grade-2, .grade-3, .grade-4, .form-grade { grid-template-columns: 1fr; }
  .ocupa-2 { grid-column: auto; }
  .filtros > *, .filtros input[type=search], .filtros select, .filtros .campo { width: 100%; }
  .config-grupos { position: static; flex-basis: 100%; }
  .cal-dia { min-height: 64px; }
  .cal-ev { font-size: 10px; }
  .indicador.destaque .valor { font-size: 30px; }
  .mensagens { top: 16px; bottom: auto; }
}
@media (prefers-reduced-motion: reduce) { .lateral, .mensagens li { transition: none; animation: none; } }

/* Impressão */
@media print {
  .lateral, .cabecalho, .abas, .acoes, .nao-imprimir, .veu, .mensagens, .barra-lote { display: none !important; }
  .app { display: block; }
  .principal { padding: 0; max-width: none; }
  .cartao { box-shadow: none; border: 0; padding: 0; }
  body { background: #fff; color: #000; }
}

/* ===== Análise Financeira — parte 2: gráficos, tabelas gerenciais e previsão ===== */
.an-graficos { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; margin: 24px 0; }
.an-bloco { padding: 16px 20px; margin-bottom: 24px; min-width: 0; }
.an-graficos > .an-bloco { margin: 0; }
.an-bloco + .an-bloco { margin-top: 0; }
.an-bloco.sete-col { grid-column: span 7; } .an-bloco.cinco-col { grid-column: span 5; }
.an-bloco.tabela-bloco { padding: 0; overflow: hidden; }
.an-bloco-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.an-bloco-topo.pad { padding: 16px 20px 12px; }
.an-bloco-topo h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; font-weight: 700; color: #0f172a; text-transform: none; letter-spacing: -.01em; }
.an-bloco-topo h3 > .icone { color: var(--marca); }
.an-bloco-topo p { margin: 2px 0 0; font-size: 12px; color: var(--texto-2); }
.an-bloco h3 i, .an-prev-totais i { font-style: normal; display: inline-grid; }
.ic-verde .icone { color: #059669; } .ic-rosa .icone { color: #e11d48; } .ic-indigo .icone { color: #4f46e5; }
.an-legenda { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; }
.an-legenda > span { display: inline-flex; align-items: center; gap: 6px; }
.lg-linha, .lg-traco { display: inline-block; width: 12px; height: 2px; border-radius: 999px; background: currentColor; }
.lg-traco { height: 0; background: none; border-bottom: 2px dashed currentColor; }
.lg-verde { color: #059669; } .lg-rosa { color: #e11d48; } .lg-roxo { color: #9333ea; } .lg-verde-claro { color: #10b981; } .lg-azul { color: #2563eb; } .lg-ambar { color: #b45309; }
.lg-quad { display: inline-block; width: 10px; height: 10px; border-radius: 2px; } .lg-quad.verde { background: #10b981; } .lg-quad.rosa { background: #f43f5e; }
.an-grafico { padding-top: 12px; }
.grafico { display: block; width: 100%; height: auto; font-family: inherit; }
.grafico .g-eixo { font-size: 11px; fill: #64748b; }
.grafico .g-nome { font-size: 11px; font-weight: 600; fill: #334155; }
.grafico .g-alvo:hover { fill: rgba(148, 163, 184, .12); }
.an-nota { display: flex; justify-content: space-between; align-items: center; gap: 4px 12px; flex-wrap: wrap; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--borda); font-size: 11px; color: var(--texto-2); }
.an-nota strong { white-space: nowrap; font-weight: 600; }
.an-nota.borda-baixo { border-top: 0; border-bottom: 1px solid var(--borda); padding: 0 4px 8px; }
.an-nota small { font-size: 10px; color: #94a3b8; }
.txt-verde-escuro { color: #047857; font-weight: 600; } .txt-rosa-escuro { color: #be123c; font-weight: 600; }
.selo-contorno { display: inline-flex; padding: 2px 10px; border: 1px solid var(--borda); border-radius: 999px; font-size: 12px; font-weight: 600; color: #0f172a; }
.selo-cinza { display: inline-flex; padding: 6px 12px; border-radius: 6px; background: #f1f5f9; font-size: 12px; font-weight: 600; color: var(--texto-2); white-space: nowrap; }
.an-vazio { height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 12px; color: #94a3b8; }
.an-vazio .icone { opacity: .4; }
/* tabelas */
.an-tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
.an-tabela thead { background: #f1f5f9; }
.an-tabela th { padding: 10px 16px; text-align: left; font-weight: 700; color: #0f172a; height: 48px; line-height: 1.25; }
.an-tabela th button { all: unset; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.an-tabela th button .icone { color: #94a3b8; }
.an-tabela th button:focus-visible { outline: 2px solid var(--marca); outline-offset: 2px; border-radius: 4px; }
.an-tabela th.num, .an-tabela td.num { text-align: right; } .an-tabela th.num button { justify-content: flex-end; }
.an-tabela th.centro, .an-tabela td.centro { text-align: center; } .an-tabela th.largo { min-width: 200px; }
.an-tabela td { padding: 10px 16px; line-height: 1.4; border-top: 1px solid var(--borda); vertical-align: middle; font-variant-numeric: tabular-nums; }
.an-tabela tbody tr:hover { background: rgba(248, 250, 252, .8); }
.an-tabela tr.selecionado { background: rgba(239, 246, 255, .5); font-weight: 500; }
.an-tabela tfoot tr { background: rgba(241, 245, 249, .9); border-top: 2px solid #cbd5e1; }
.an-tabela tfoot td { padding: 12px 16px; font-weight: 900; }
.an-tabela .maiusc { text-transform: uppercase; color: #0f172a; font-size: 14px; }
.an-tabela .grande { font-size: 16px; }
.an-tabela .sub-total { font-size: 12px; color: var(--texto-2); font-weight: 600; }
.an-tabela .forte { font-weight: 700; } .an-tabela .medio { font-weight: 600; color: #334155; } .an-tabela .preto { font-weight: 900; } .an-tabela .extra { font-weight: 800; }
.an-tabela .escuro { color: #0f172a; } .an-tabela .cinza { color: #475569; } .an-tabela .cinza-escuro { color: #334155; }
.an-tabela .sub { font-size: 11px; color: var(--texto-2); font-weight: 400; }
.an-tabela .nowrap { white-space: nowrap; } .an-tabela .tracinho { color: #94a3b8; }
.an-tabela .duplo { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.an-tabela .duplo small { font-size: 11px; color: var(--texto-2); font-weight: 400; }
.an-tabela b { font-weight: 900; }
.an-tabela .duas-linhas { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.an-tabela-vazia { height: 128px; text-align: center; font-size: 12px; color: var(--texto-2); }
.c-verde, .an-tabela .c-verde { color: #047857; } .c-verde2, .an-tabela .c-verde2 { color: #059669; } .c-azul, .an-tabela .c-azul { color: #1d4ed8; } .c-azul2, .an-tabela .c-azul2 { color: #2563eb; }
.c-rosa, .an-tabela .c-rosa { color: #be123c; } .c-rosa2, .an-tabela .c-rosa2 { color: #e11d48; } .c-ambar, .an-tabela .c-ambar { color: #b45309; } .c-ambar2, .an-tabela .c-ambar2 { color: #d97706; } .c-indigo { color: #4f46e5; }
.an-tabela th.c-verde { color: #047857; } .an-tabela th.c-azul { color: #1d4ed8; } .an-tabela th.c-rosa { color: #be123c; } .an-tabela th.c-ambar { color: #b45309; }
.selo-mini { display: inline-flex; padding: 0 4px; border: 1px solid; border-radius: 999px; font-size: 10px; font-weight: 600; vertical-align: middle; }
.selo-mini.azul { border-color: #60a5fa; color: #1d4ed8; } .selo-mini.roxo { border-color: #d8b4fe; color: #7e22ce; }
.selo-status { display: inline-flex; padding: 2px 10px; border: 1px solid; border-radius: 999px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.selo-status.azul-ok { background: #ecfdf5; color: #047857; border-color: #a7f3d0; } .selo-status.vermelho { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.selo-parcela { display: inline-flex; padding: 2px 10px; border: 1px solid #cbd5e1; border-radius: 999px; background: #f8fafc; font-size: 12px; font-weight: 700; color: #334155; }
.selo-tipo { display: inline-flex; padding: 2px 10px; border: 1px solid; border-radius: 999px; font-size: 11px; font-weight: 700; }
.selo-tipo.fixo { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; } .selo-tipo.variavel { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.selo-tipo.misto { background: #f1f5f9; color: #334155; border-color: #cbd5e1; } .selo-tipo.recorrente { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.selo-tipo.indigo { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.an-busca-desc { display: flex; align-items: center; gap: 8px; }
.busca-mini { position: relative; display: flex; align-items: center; width: 256px; }
.busca-mini .icone { position: absolute; left: 10px; color: #94a3b8; }
.busca-mini input { height: 32px; padding-left: 32px; font-size: 12px; background: #f8fafc; border-color: #cbd5e1; }
/* previsão */
.an-prev-totais { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; }
.an-prev-totais strong { font-size: 14px; font-weight: 900; } .an-prev-totais .barra { color: #cbd5e1; }
.an-faturas { margin-top: 16px; padding: 12px; border: 1px solid #c7d2fe; border-radius: var(--raio-lg); background: rgba(238, 242, 255, .5); font-size: 12px; }
.an-faturas-topo { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; color: #312e81; }
.an-faturas-topo > span:first-child { display: inline-flex; align-items: center; gap: 6px; } .an-faturas-topo .icone { color: #4f46e5; }
.selo-indigo { padding: 1px 8px; border: 1px solid #a5b4fc; border-radius: 999px; background: #e0e7ff; color: #3730a3; font-size: 10px; }
.an-faturas-lista { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; font-size: 11px; }
.an-fatura { padding: 4px 8px; border: 1px solid var(--borda); border-radius: 4px; background: #fff; }
.an-fatura b { color: #334155; } .an-fatura strong { font-weight: 900; color: #e11d48; } .an-fatura small { font-size: 10px; color: #94a3b8; }
.an-meses { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; padding-top: 20px; }
.an-mes { padding: 10px; border: 1px solid #e2e8f0; border-radius: var(--raio-lg); background: rgba(248, 250, 252, .8); min-width: 0; transition: box-shadow .15s, border-color .15s; }
.an-mes.pos:hover { border-color: #6ee7b7; box-shadow: var(--sombra); }
.an-mes.neg { background: rgba(255, 241, 242, .4); border-color: #fecdd3; } .an-mes.neg:hover { border-color: #fda4af; box-shadow: var(--sombra); }
.an-mes-topo { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 700; color: var(--texto-2); text-transform: uppercase; letter-spacing: .05em; }
.an-mes-selo { padding: 0 4px; border-radius: 4px; font-size: 9px; font-weight: 600; }
.an-mes.pos .an-mes-selo { color: #047857; background: rgba(209, 250, 229, .6); } .an-mes.neg .an-mes-selo { color: #be123c; background: rgba(255, 228, 230, .6); }
.an-mes-rot { display: block; margin-top: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: -.01em; color: #475569; }
.an-mes-saldo { display: block; font-size: 16px; font-weight: 900; letter-spacing: -.025em; line-height: 1.25; white-space: nowrap; font-variant-numeric: tabular-nums; }
.an-mes.pos .an-mes-saldo { color: #047857; } .an-mes.neg .an-mes-saldo { color: #be123c; }
.an-mes-linha { display: flex; justify-content: space-between; margin-top: 6px; padding-top: 4px; border-top: 1px solid #e2e8f0; font-size: 10px; color: var(--texto-2); }
.an-mes-linha b { font-weight: 800; }
.an-mes-pe { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; padding-top: 4px; border-top: 1px solid rgba(226, 232, 240, .6); font-size: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-mes-pe .lado { display: flex; justify-content: space-between; font-weight: 400; color: #94a3b8; }
@media (max-width: 1279px) { .an-meses { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1023px) { .an-bloco.sete-col, .an-bloco.cinco-col { grid-column: 1 / -1; } }
@media (max-width: 639px) { .an-meses { grid-template-columns: repeat(2, minmax(0, 1fr)); } .busca-mini { width: 100%; } .an-busca-desc { width: 100%; } }
.an-tabela th.num { white-space: normal; }
.an-tabela th.num button { text-align: right; }
.an-tabela td.mes-ano { white-space: nowrap; }
.an-tabela td.mes-ano .selo-mini { margin-left: 4px; max-width: 70px; line-height: 1.2; white-space: normal; text-align: center; }

/* ===== Financeiro › Cartões de Crédito — CartoesCreditoTab.tsx ===== */
.cor-6366f1 { --cc: #6366f1; } .cor-8b5cf6 { --cc: #8b5cf6; } .cor-3b82f6 { --cc: #3b82f6; } .cor-0ea5e9 { --cc: #0ea5e9; }
.cor-10b981 { --cc: #10b981; } .cor-f59e0b { --cc: #f59e0b; } .cor-ef4444 { --cc: #ef4444; } .cor-ec4899 { --cc: #ec4899; } .cor-0f172a { --cc: #0f172a; }
.ponto { display: inline-block; width: 8px; height: 8px; border-radius: 999px; background: var(--cc, var(--c, #6366f1)); flex: 0 0 auto; }
.botao.cor-indigo { background: var(--marca); border-color: var(--marca); color: var(--marca-texto); font-weight: 700; box-shadow: var(--sombra); }
.botao.cor-indigo:hover { background: var(--marca-hover); border-color: var(--marca-hover); }
.botao.mini { height: 32px; padding: 0 10px; font-size: 12px; gap: 4px; }
.botao[disabled] { opacity: .5; pointer-events: none; }
.an-icone.indigo { background: #e0e7ff; color: #4338ca; }
.selo-an.indigo { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; font-size: 12px; font-weight: 700; }
.cc-topo { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.cc-acoes { display: flex; gap: 8px; } .cc-acoes .botao { font-size: 12px; font-weight: 600; }
.cc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.cc-kpi { padding: 20px 24px 24px; border: 1px solid; border-radius: var(--raio); box-shadow: var(--sombra); min-width: 0; }
.cc-kpi-topo { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.cc-kpi-topo i { font-style: normal; display: grid; place-items: center; padding: 8px; border-radius: var(--raio-lg); }
.cc-kpi strong { display: block; font-size: clamp(22px, 2vw, 30px); font-weight: 900; line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cc-kpi p { margin: 4px 0 0; font-size: 11px; font-weight: 500; }
.cc-kpi.indigo { border-color: #c7d2fe; background: rgba(238, 242, 255, .4); } .cc-kpi.indigo .cc-kpi-topo { color: #4338ca; } .cc-kpi.indigo i { background: rgba(99, 102, 241, .1); color: #4f46e5; } .cc-kpi.indigo strong { color: #4338ca; } .cc-kpi.indigo p { color: rgba(79, 70, 229, .8); }
.cc-kpi.rosa { border-color: #fecdd3; background: rgba(255, 241, 242, .4); } .cc-kpi.rosa .cc-kpi-topo { color: #be123c; } .cc-kpi.rosa i { background: rgba(244, 63, 94, .1); color: #e11d48; } .cc-kpi.rosa strong { color: #be123c; } .cc-kpi.rosa p { color: rgba(225, 29, 72, .8); }
.cc-kpi.cinza { border-color: #e2e8f0; background: rgba(248, 250, 252, .5); } .cc-kpi.cinza .cc-kpi-topo { color: #334155; } .cc-kpi.cinza i { background: rgba(226, 232, 240, .6); color: #334155; } .cc-kpi.cinza strong { color: #1e293b; } .cc-kpi.cinza p { color: var(--texto-2); }
.cc-kpi.verde { border-color: #a7f3d0; background: rgba(236, 253, 245, .4); } .cc-kpi.verde .cc-kpi-topo { color: #047857; } .cc-kpi.verde i { background: rgba(16, 185, 129, .1); color: #059669; } .cc-kpi.verde strong { color: #047857; } .cc-kpi.verde p { color: rgba(5, 150, 105, .8); }
.cc-kpi strong.c-verde2 { color: #059669; }
.cc-filtro-faturas { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seg a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--raio-p); font: 600 12px var(--fonte); color: #475569; text-decoration: none; }
.seg a:hover { color: #0f172a; text-decoration: none; }
.seg a.ativo { background: #fff; color: #0f172a; font-weight: 700; box-shadow: var(--sombra); }
.seg.mini a { padding: 4px 10px; font-size: 11px; }
.cc-total { padding-left: 8px; font-size: 12px; font-weight: 700; color: #475569; } .cc-total b { font-weight: 900; }
.cc-faturas { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.cc-fatura { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid #e2e8f0; border-radius: var(--raio-lg); background: rgba(248, 250, 252, .6); cursor: pointer; transition: border-color .15s, box-shadow .15s; min-width: 0; }
.cc-fatura:hover { border-color: #818cf8; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1); }
.cc-fatura:focus-visible { outline: 2px solid rgba(99, 102, 241, .5); outline-offset: 1px; }
.cc-fatura.atual { border-color: #818cf8; background: rgba(238, 242, 255, .5); box-shadow: 0 0 0 1px rgba(129, 140, 248, .4); }
.cc-fatura.passada { opacity: .9; background: rgba(248, 250, 252, .4); }
.cc-fatura-topo { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; color: #475569; }
.cc-fatura-topo small { font-size: 10px; font-weight: 400; color: #94a3b8; }
.cc-fatura em { font-style: normal; font-size: 9px; padding: 0 6px; margin-left: 4px; }
.selo-atual { border-radius: 999px; font-weight: 800; background: #e0e7ff; color: #4338ca; } .selo-passada { border-radius: 4px; font-weight: 500; background: #e2e8f0; color: #475569; }
.cc-fatura > strong { font-size: 18px; font-weight: 900; white-space: nowrap; }
.cc-fatura-cartoes { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; border-top: 1px solid rgba(226, 232, 240, .8); font-size: 11px; }
.cc-fatura-cartoes > span { display: flex; justify-content: space-between; gap: 4px; min-width: 0; }
.cc-fatura-cartoes b { font-weight: 600; color: #0f172a; white-space: nowrap; } .cc-fatura-cartoes b.c-verde2 { color: #059669; }
.cc-nome { display: inline-flex; align-items: center; gap: 4px; min-width: 0; color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 110px; }
.cc-ver { display: flex; justify-content: flex-end; align-items: center; gap: 2px; font-size: 10px; font-weight: 600; color: #4f46e5; opacity: .8; }
.cc-fatura:hover .cc-ver { opacity: 1; }
.cc-vazio { padding: 24px 0 8px; text-align: center; font-size: 12px; color: var(--texto-2); margin: 0; }
.cc-subnav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 24px; border-bottom: 1px solid var(--borda); }
.cc-filtros { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cc-filtros .busca-mini { width: 220px; } .cc-filtros select { height: 32px; width: 180px; font-size: 12px; }
.cc-cartoes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.cc-cartao { display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--borda); border-radius: var(--raio); background: #fff; box-shadow: var(--sombra); overflow: hidden; transition: box-shadow .15s; }
.cc-cartao:hover { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1); }
.cc-cartao-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px; color: #fff; background: var(--cc, #6366f1); }
.cc-cartao-topo small { display: block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; opacity: .9; }
.cc-cartao-topo strong { display: block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 900; }
.cc-cartao-topo code { display: block; font-size: 11px; opacity: .8; background: none; padding: 0; color: inherit; }
.cc-cartao-botoes { display: flex; gap: 4px; padding: 4px; border-radius: var(--raio-lg); background: rgba(0, 0, 0, .2); }
.cc-cartao-botoes button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: var(--raio-p); background: none; color: #fff; cursor: pointer; }
.cc-cartao-botoes button:hover { background: rgba(255, 255, 255, .2); } .cc-cartao-botoes button.perigo:hover { background: rgba(244, 63, 94, .8); }
.cc-ciclo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; background: #f8fafc; border-bottom: 1px solid var(--borda); font-size: 12px; }
.cc-ciclo small { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--texto-2); }
.cc-ciclo b { display: flex; align-items: center; gap: 4px; font-weight: 800; color: #0f172a; } .cc-ciclo i { font-style: normal; display: inline-grid; }
.ic-rosa2 .icone { color: #e11d48; }
.cc-valores { display: flex; flex-direction: column; gap: 12px; padding: 16px; font-size: 12px; }
.cc-valores > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .cc-valores span { color: var(--texto-2); }
.cc-valores b { font-weight: 800; } .cc-valores b.grande { font-size: 14px; font-weight: 900; color: #0f172a; } .cc-valores b.grande.c-verde2 { color: #059669; }
.cc-limite { display: flex !important; flex-direction: column; align-items: stretch !important; gap: 6px; padding-top: 8px; border-top: 1px solid var(--borda); }
.cc-limite > div { display: flex; justify-content: space-between; font-size: 11px; } .cc-limite b { font-weight: 700; color: #334155; }
progress.cc-barra { width: 100%; height: 8px; border: 0; border-radius: 999px; overflow: hidden; background: #e2e8f0; appearance: none; }
progress.cc-barra::-webkit-progress-bar { background: #e2e8f0; border-radius: 999px; }
progress.cc-barra.verde::-webkit-progress-value { background: #10b981; } progress.cc-barra.verde::-moz-progress-bar { background: #10b981; }
progress.cc-barra.ambar::-webkit-progress-value { background: #f59e0b; } progress.cc-barra.ambar::-moz-progress-bar { background: #f59e0b; }
progress.cc-barra.vermelha::-webkit-progress-value { background: #f43f5e; } progress.cc-barra.vermelha::-moz-progress-bar { background: #f43f5e; }
.cc-rodape { display: flex; align-items: center; justify-content: space-between; padding: 12px; border-top: 1px solid var(--borda); background: rgba(248, 250, 252, .5); }
.cc-vazio-grande { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 48px 24px; border-style: dashed; text-align: center; }
.cc-vazio-grande .icone { color: #6366f1; } .cc-vazio-grande h3 { margin: 0; font-size: 16px; text-transform: none; letter-spacing: 0; color: #0f172a; } .cc-vazio-grande p { margin: 0 0 8px; max-width: 420px; font-size: 13px; color: var(--texto-2); }
.cc-tabela td { font-size: 12px; padding-top: 10px; padding-bottom: 10px; } .cc-tabela thead { background: #f1f5f9; }
.cc-data { display: inline-flex; align-items: center; gap: 6px; } .cc-data .icone { color: #94a3b8; }
.cc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 4px; background: #f1f5f9; font-weight: 600; color: #1e293b; }
.cc-desc { display: flex; align-items: center; gap: 6px; } .cc-obs { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selo-estorno, .selo-gasto { display: inline-flex; padding: 0 6px; border: 1px solid; border-radius: 999px; font-size: 10px; flex: 0 0 auto; }
.selo-estorno { background: #ecfdf5; color: #047857; border-color: #6ee7b7; font-weight: 700; } .selo-gasto { background: #f1f5f9; color: #475569; border-color: #cbd5e1; font-weight: 500; padding: 0 4px; }
.selo-mono { display: inline-flex; padding: 2px 10px; border-radius: 999px; background: #f1f5f9; font: 600 11px ui-monospace, SFMono-Regular, Menlo, monospace; color: #0f172a; }
.cc-acoes-linha { display: flex; justify-content: flex-end; gap: 4px; }
.btn-icone-linha { width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: var(--raio-p); background: none; color: var(--texto-2); cursor: pointer; }
.btn-icone-linha:hover { color: var(--marca); background: var(--superficie-2); }
.cc-vazio-tabela { height: 200px; text-align: center; color: var(--texto-2); } .cc-vazio-tabela > * { display: block; margin: 0 auto 6px; } .cc-vazio-tabela .icone { color: #94a3b8; }
.cc-vazio-tabela b { color: #0f172a; font-size: 14px; } .cc-vazio-tabela span { font-size: 12px; } .cc-vazio-tabela .botao { display: inline-flex; margin-top: 8px; }
/* janela da fatura */
dialog.cc-janela-fatura { width: min(700px, calc(100vw - 32px)); max-height: 90vh; padding: 0; overflow: hidden; display: none; flex-direction: column; }
dialog.cc-janela-fatura[open] { display: flex; }
.cc-jf-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 24px 24px 16px; border-bottom: 1px solid var(--borda); background: rgba(248, 250, 252, .7); }
.cc-jf-topo h2 { margin: 0; font-size: 20px; font-weight: 900; line-height: 1.2; color: #0f172a; }
.cc-jf-venc { display: flex; align-items: center; gap: 4px; margin: 4px 0 0; font-size: 12px; color: var(--texto-2); } .cc-jf-venc i { font-style: normal; display: inline-grid; }
.cc-jf-total { text-align: right; padding-left: 16px; border-left: 1px solid #e2e8f0; }
.cc-jf-total small { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-2); }
.cc-jf-total strong { font-size: 24px; font-weight: 900; }
.cc-jf-corpo { padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.cc-jf-corpo h4 { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-2); } .cc-jf-corpo h4 i { font-style: normal; display: inline-grid; }
.cc-jf-subtotais { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cc-jf-subtotais > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; border: 1px solid #e2e8f0; border-radius: var(--raio-lg); background: #fff; }
.cc-jf-subtotais b { font-size: 12px; color: #1e293b; } .cc-jf-subtotais strong { font-size: 14px; font-weight: 900; white-space: nowrap; color: #0f172a; } .cc-jf-subtotais strong.c-verde2 { color: #059669; }
.cc-jf-tabela { border: 1px solid #e2e8f0; border-radius: var(--raio-lg); } .cc-jf-tabela td, .cc-jf-tabela th { font-size: 12px; padding: 10px 12px; } .cc-jf-tabela th { height: auto; }
.cc-jf-rodape { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px; border-top: 1px solid var(--borda); background: rgba(248, 250, 252, .7); font-size: 12px; color: var(--texto-2); font-weight: 500; }
.cc-jf-rodape strong { font-weight: 900; }
/* janelas de cartão e gasto */
dialog.cc-janela { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; }
dialog.cc-janela form { display: flex; flex-direction: column; gap: 16px; }
.cc-jtitulo { display: flex; align-items: center; gap: 8px; } .cc-jtitulo > .icone { color: var(--marca); } .cc-jtitulo i { font-style: normal; display: inline-grid; }
.grade-3-fixa { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.obrig { color: var(--perigo); }
dialog.janela fieldset { border: 0; padding: 0; margin: 0; min-width: 0; } dialog.janela legend { padding: 0; margin-bottom: 6px; font-size: 12px; font-weight: 700; color: #334155; }
.cc-cores > div { display: flex; flex-wrap: wrap; gap: 8px; }
.cc-cor { width: 28px; height: 28px; border-radius: 999px; border: 2px solid transparent; background: var(--cc); cursor: pointer; transition: transform .15s; }
.cc-cor:hover { transform: scale(1.05); } .cc-cor input { position: absolute; opacity: 0; pointer-events: none; }
.cc-cor:has(input:checked) { border-color: var(--marca); transform: scale(1.1); box-shadow: 0 0 0 2px rgba(231, 176, 8, .3), var(--sombra); }
.cc-cor:has(input:focus-visible) { outline: 2px solid var(--marca); outline-offset: 2px; }
.cc-ativo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--borda); border-radius: var(--raio-lg); cursor: pointer; }
.cc-ativo b { display: block; font-size: 14px; font-weight: 600; } .cc-ativo small { font-size: 12px; color: var(--texto-2); }
input.interruptor { appearance: none; flex: 0 0 auto; width: 44px; height: 24px; border-radius: 999px; background: #e2e8f0; position: relative; cursor: pointer; transition: background .15s; border: 0; margin: 0; }
input.interruptor::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 999px; background: #fff; box-shadow: var(--sombra); transition: transform .15s; }
input.interruptor:checked { background: var(--marca); } input.interruptor:checked::after { transform: translateX(20px); }
input.interruptor:focus-visible { outline: 2px solid var(--marca); outline-offset: 2px; }
.cc-tipo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px; border-radius: var(--raio-lg); background: #f1f5f9; }
.cc-tipo label { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px; border-radius: var(--raio-p); font-size: 12px; font-weight: 700; color: #475569; cursor: pointer; text-align: center; }
.cc-tipo label input { position: absolute; opacity: 0; pointer-events: none; }
.cc-tipo label.gasto .icone { color: #e11d48; } .cc-tipo label.estorno .icone { color: #059669; }
.cc-tipo label:has(input:checked) { background: #fff; box-shadow: var(--sombra); } .cc-tipo label.gasto:has(input:checked) { color: #e11d48; }
.cc-tipo label.estorno:has(input:checked) { color: #059669; box-shadow: 0 0 0 1px rgba(16, 185, 129, .3), var(--sombra); }
.cc-tipo label:has(input:focus-visible) { outline: 2px solid var(--marca); outline-offset: 1px; }
.cc-aviso-estorno { margin: 6px 0 0; font-size: 11px; font-weight: 500; color: #047857; }
form[data-form-gasto] .se-estorno { display: none; } form[data-form-gasto].estorno .se-estorno { display: revert; } form[data-form-gasto].estorno .se-gasto { display: none; }
.cc-valor { position: relative; } .cc-valor > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-weight: 900; color: #059669; font-size: 14px; }
.cc-valor input { font-weight: 700; color: #e11d48; } form.estorno .cc-valor input { padding-left: 28px; color: #059669; border-color: #6ee7b7; }
.cc-previsao { padding: 12px; border: 1px solid #e0e7ff; border-radius: var(--raio-lg); background: rgba(238, 242, 255, .5); font-size: 12px; color: #334155; display: flex; flex-direction: column; gap: 4px; }
.cc-previsao[hidden] { display: none; }
form.estorno .cc-previsao { border-color: #a7f3d0; background: rgba(236, 253, 245, .5); }
.cc-prev-titulo { display: flex; align-items: center; gap: 6px; font-weight: 700; color: #4338ca; } form.estorno .cc-prev-titulo { color: #047857; }
.cc-prev-linha { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px; padding-top: 4px; } .cc-prev-linha span { font-weight: 600; color: #0f172a; } form.estorno .cc-prev-linha b { color: #059669; }
.cc-previsao p { margin: 0; font-size: 11px; color: var(--texto-2); }
form.estorno [data-botao-janela-gasto] { background: #059669; border-color: #059669; }
@media (max-width: 1279px) { .cc-faturas { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1023px) { .cc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cc-cartoes { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cc-faturas { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 639px) { .cc-kpis, .cc-cartoes { grid-template-columns: 1fr; } .cc-faturas { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cc-jf-subtotais { grid-template-columns: 1fr; } .grade-3-fixa { grid-template-columns: 1fr; } .cc-filtros, .cc-filtros .busca-mini, .cc-filtros select { width: 100%; } }
@media (min-width: 640px) { .cc-topo { flex-wrap: nowrap; } .cc-acoes { flex: 0 0 auto; } }

/* ===== Financeiro › Fluxo de Caixa ===== */
.botao.escuro-solido { background: var(--marca); border-color: var(--marca); color: var(--marca-texto); font-weight: 700; box-shadow: var(--sombra); }
.botao.escuro-solido:hover { background: var(--marca-hover); border-color: var(--marca-hover); }
.cc-kpi.ouro { border-color: rgba(231, 176, 8, .3); background: rgba(231, 176, 8, .05); } .cc-kpi.ouro .cc-kpi-topo, .cc-kpi.ouro strong { color: var(--marca); }
.cc-kpi.ouro i { background: rgba(231, 176, 8, .1); color: var(--marca); } .cc-kpi p.cinza { color: var(--texto-2); }
.cc-kpi.rosa.forte { border-color: #fda4af; background: rgba(255, 241, 242, .6); } .cc-kpi.rosa.forte strong { color: #e11d48; }
.fx-kpi-pe { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding-top: 4px; } .fx-kpi-pe p { margin: 0; }
.fx-editar { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 6px; border: 0; border-radius: var(--raio-p); background: none; font: 700 11px var(--fonte); color: var(--marca); cursor: pointer; }
.fx-editar:hover { background: rgba(231, 176, 8, .1); }
.fx-filtros { padding: 16px; margin-bottom: 24px; display: flex; flex-direction: column; gap: 12px; }
.fx-filtros-linha { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fx-filtros-titulo { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: #334155; } .fx-filtros-titulo .icone { color: var(--texto-2); }
.fx-selects { display: flex; gap: 12px; flex-wrap: wrap; } .fx-selects select { height: 36px; font-size: 12px; border-color: #cbd5e1; }
.fx-selects select:first-child { width: 180px; } .fx-selects select:last-child { width: 210px; }
.fx-datas { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 8px; border-top: 1px solid var(--borda); font-size: 12px; }
.fx-datas label { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: #475569; } .fx-datas input { width: 160px; height: 32px; font-size: 12px; }
.fx-tabela td { padding-top: 14px; padding-bottom: 14px; }
.fx-tabela tr.fx-rec:hover { background: rgba(236, 253, 245, .4); } .fx-tabela tr.fx-desp:hover { background: rgba(255, 241, 242, .4); }
.fx-tipo { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border: 1px solid; border-radius: 999px; font-size: 12px; font-weight: 700; }
.fx-tipo.rec { background: #d1fae5; color: #065f46; border-color: #6ee7b7; } .fx-tipo.desp { background: #ffe4e6; color: #9f1239; border-color: #fda4af; }
.fx-det { display: block; margin-top: 2px; font-size: 12px; }
.fx-forma { padding: 2px 8px; border-radius: 4px; background: #f1f5f9; font-size: 12px; font-weight: 500; color: #475569; }
.fx-valor { font-size: 14px; font-weight: 900; white-space: nowrap; }
.fx-saldo { padding: 4px 8px; border-radius: 4px; background: #f1f5f9; font-size: 12px; font-weight: 700; color: #1e293b; white-space: nowrap; }
.fx-saldo.neg { background: #ffe4e6; color: #be123c; }
dialog.fx-janela { width: min(448px, calc(100vw - 32px)); }
.fx-explica { padding: 12px; border: 1px solid #bfdbfe; border-radius: var(--raio-lg); background: rgba(239, 246, 255, .6); font-size: 12px; color: #1e3a8a; }
.fx-explica p { margin: 0 0 4px; } .fx-explica p:last-child { margin: 0; }
.fx-valor-campo { height: 40px; font-size: 16px !important; font-weight: 900; }
@media (max-width: 639px) { .fx-selects, .fx-selects select { width: 100% !important; } }

/* ===== Financeiro › Extratos Bancários — ExtratosTab.tsx ===== */
.cor-06b6d4 { --cc: #06b6d4; } .cor-64748b { --cc: #64748b; }
.ex-titulo { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.025em; color: var(--texto); }
.ex-titulo .icone { color: var(--marca); } .ex-desc { margin: 2px 0 0; font-size: 12px; color: var(--texto-2); }
.ex-upload label, .ex-escolher { cursor: pointer; }
.ex-formatos { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px; margin-bottom: 24px; border: 1px solid var(--borda); border-radius: var(--raio-lg); background: linear-gradient(to right, rgba(239, 246, 255, .5), rgba(236, 253, 245, .4), #fff); font-size: 12px; }
.ex-formatos-topo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; } .ex-formatos-topo b { display: inline-flex; align-items: center; gap: 6px; } .ex-formatos-topo .icone { color: var(--marca); }
.ex-formatos p { margin: 0; font-size: 11px; line-height: 1.6; color: var(--texto-2); }
.ex-selo { padding: 0 6px; border-radius: 999px; font-size: 10px; font-weight: 600; border: 1px solid; }
.ex-selo.ofx { background: #059669; border-color: #059669; color: #fff; } .ex-selo.planilha { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.ex-escolher { background: #fff; } .ex-escolher .icone { color: var(--marca); }
.ex-rotulo { margin: 0 0 12px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-2); }
.ex-contas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.ex-conta { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 14px 20px; border: 1px solid var(--borda); border-radius: var(--raio-lg); background: #fff; transition: box-shadow .15s; }
.ex-conta::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--cc, #3b82f6); }
.ex-conta:hover { box-shadow: var(--sombra); }
.ex-conta-topo { display: flex; justify-content: space-between; gap: 8px; } .ex-conta-topo b { font-size: 14px; font-weight: 600; } .ex-conta-topo small { display: block; font-size: 12px; color: var(--texto-2); }
.ex-conta-botoes { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; } .ex-conta:hover .ex-conta-botoes, .ex-conta:focus-within .ex-conta-botoes { opacity: 1; }
.ex-conta-botoes .btn-icone-linha, .btn-lixo.pequeno { width: 24px; height: 24px; }
.ex-conta-saldo { display: flex; align-items: baseline; justify-content: space-between; padding-top: 4px; border-top: 1px solid var(--borda); font-size: 12px; } .ex-conta-saldo span { color: var(--texto-2); }
.ex-conta-saldo b, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; } .ex-conta-saldo b { font-weight: 700; }
.ex-vazio { margin-bottom: 24px; background: rgba(241, 245, 249, .2); } .ex-vazio .icone { color: rgba(100, 116, 139, .6); }
.ex-importados { padding: 0; margin-bottom: 24px; overflow: hidden; box-shadow: none; }
.ex-importados h3 { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--borda); background: rgba(241, 245, 249, .2); font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--texto); }
.ex-importados h3 .icone { color: var(--marca); }
.ex-imp-lista { max-height: 192px; overflow-y: auto; }
.ex-imp { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; font-size: 12px; border-top: 1px solid var(--borda); }
.ex-imp:first-child { border-top: 0; } .ex-imp:hover { background: rgba(241, 245, 249, .3); } .ex-imp b { font-weight: 500; } .ex-imp small { font-size: 11px; color: var(--texto-2); }
.ex-excluir:hover { color: var(--perigo); }
.ex-painel { padding: 0; overflow: hidden; box-shadow: none; }
.ex-painel-topo { display: flex; flex-direction: column; gap: 16px; padding: 16px; border-bottom: 1px solid var(--borda); }
.ex-resumo { display: flex; gap: 8px; flex-wrap: wrap; }
.ex-chip { padding: 2px 10px; border: 1px solid; border-radius: 999px; font-size: 12px; font-weight: 600; }
.ex-chip.verde { background: #ecfdf5; color: #047857; border-color: #a7f3d0; } .ex-chip.rosa { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.ex-chip.mono { font-weight: 500; }
.ex-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } .ex-filtros select { height: 32px; font-size: 12px; } .ex-filtros select:first-child { width: 180px; } .ex-filtros select:nth-child(2) { width: 170px; }
.busca-mini.largo { flex: 1; min-width: 200px; width: auto; }
.ex-tabela { width: 100%; font-size: 12px; } .ex-tabela thead { background: #f1f5f9; } .ex-tabela th { padding: 12px; height: auto; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-2); background: none; }
.ex-tabela td { padding: 12px; } .ex-tabela tbody tr:hover { background: rgba(241, 245, 249, .3); }
.ex-tabela td b { font-weight: 500; } .ex-tabela td.forte { font-weight: 600; } .ex-tabela td .sub { display: block; font-size: 11px; }
.ex-tabela td.cinza, .cinza { color: var(--texto-2); } .ex-tabela .cc-nome { max-width: 130px; }
.ex-tipo { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid; border-radius: 999px; font-size: 10px; font-weight: 600; }
.ex-tipo.ent { border-color: #6ee7b7; color: #047857; background: #ecfdf5; } .ex-tipo.sai { border-color: #fda4af; color: #be123c; background: #fff1f2; }
.ex-status { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid; border-radius: 999px; font-size: 10px; font-weight: 600; }
.ex-status.conciliado { background: #ecfdf5; color: #047857; border-color: #6ee7b7; } .ex-status.avulso { background: #eff6ff; color: #1d4ed8; border-color: #93c5fd; } .ex-status.pendente { background: #fffbeb; color: #b45309; border-color: #fcd34d; }
.ex-conciliar { color: var(--marca); border-color: rgba(231, 176, 8, .3); } .ex-conciliar:hover { background: rgba(231, 176, 8, .05); }
.ex-sem-movs { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px; text-align: center; color: var(--texto-2); font-size: 12px; } .ex-sem-movs .icone { color: rgba(100, 116, 139, .5); } .ex-sem-movs b { font-size: 14px; font-weight: 500; color: var(--texto); }
dialog.ex-janela-conc { width: min(576px, calc(100vw - 32px)); }
.ex-mov-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--borda); border-radius: var(--raio-lg); background: rgba(241, 245, 249, .4); }
.ex-mov-linha { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; } .ex-mov-linha span.cinza { display: inline-flex; align-items: center; gap: 4px; }
.ex-mov-linha b { font-size: 14px; font-weight: 600; } .ex-mov-linha strong { font-size: 16px; font-weight: 700; white-space: nowrap; }
.ex-sug-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-2); }
.ex-sug-topo .escuro { display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; color: var(--texto); } .ex-sug-topo .escuro .icone { color: var(--marca); }
.ex-link { border: 0; background: none; padding: 4px 8px; border-radius: var(--raio-p); font: 500 12px var(--fonte); color: var(--marca); cursor: pointer; text-transform: none; letter-spacing: 0; } .ex-link.cinza { color: var(--texto-2); } .ex-link:hover { background: var(--superficie-2); }
.ex-sugestoes { display: flex; flex-direction: column; gap: 8px; max-height: 288px; overflow-y: auto; }
.ex-sug { display: flex; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--borda); border-radius: var(--raio-lg); cursor: pointer; transition: background .15s; }
.ex-sug:hover { background: rgba(241, 245, 249, .4); } .ex-sug input { position: absolute; opacity: 0; pointer-events: none; }
.ex-sug:has(input:checked) { border-color: var(--marca); background: rgba(231, 176, 8, .05); box-shadow: 0 0 0 1px var(--marca); }
.ex-sug:has(input:focus-visible) { outline: 2px solid var(--marca); outline-offset: 2px; }
.ex-sug-corpo { display: flex; flex-direction: column; gap: 2px; font-size: 12px; } .ex-sug-corpo b { font-weight: 500; } .ex-sug-corpo small { font-size: 11px; color: var(--texto-2); }
.ex-sug-valor { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; } .ex-sug-valor b { font-weight: 600; } .ex-sug-valor small { font-size: 10px; color: var(--texto-2); }
.ex-conf { padding: 0 6px; border: 1px solid; border-radius: 999px; font-size: 10px; font-weight: 600; }
.ex-conf.alta { border-color: #6ee7b7; color: #047857; background: #ecfdf5; } .ex-conf.media { border-color: #fcd34d; color: #b45309; background: #fffbeb; } .ex-conf.baixa { border-color: #cbd5e1; color: #334155; }
.ex-sem-sug { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px; border: 1px solid var(--borda); border-radius: var(--raio-lg); background: rgba(241, 245, 249, .2); text-align: center; } .ex-sem-sug .icone { color: rgba(100, 116, 139, .6); } .ex-sem-sug p { margin: 0; font-size: 12px; color: var(--texto-2); }
.ex-modo-avulso { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid rgba(231, 176, 8, .2); border-radius: var(--raio-lg); background: rgba(231, 176, 8, .05); } .ex-modo-avulso[hidden] { display: none; } .ex-modo-avulso p { margin: 0; font-size: 12px; }
@media (max-width: 1279px) { .ex-contas { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1023px) { .ex-contas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .ex-contas { grid-template-columns: 1fr; } .ex-filtros select { width: 100% !important; } }
/* revisão de extrato */
.rv-cartao { padding: 0; overflow: hidden; }
.rv-topo { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px 24px 16px; border-bottom: 1px solid var(--borda); }
.rv-topo h2 { margin: 0; font-size: 20px; } .ic-azul .icone { color: #2563eb; } .ic-verde .icone, i.ic-verde .icone { color: #059669; }
.rv-conta { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--borda); border-radius: var(--raio-lg); background: #f8fafc; } .rv-conta .icone { color: var(--texto-2); }
.rv-conta label { display: block; font-size: 11px; font-weight: 500; color: var(--texto-2); } .rv-conta select { height: 32px; width: 230px; font-size: 12px; }
.rv-resumo { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 24px; border-bottom: 1px solid var(--borda); background: rgba(241, 245, 249, .3); font-size: 12px; color: var(--texto-2); } .rv-resumo b { font-weight: 700; }
.rv-tabela td { padding: 8px 12px; vertical-align: top; } .rv-tabela input[type=text], .rv-tabela input[type=date], .rv-tabela input[type=number], .rv-tabela select { height: 32px; font-size: 12px; }
.rv-tabela input[type=date] { width: 140px; } .rv-tabela input[type=number] { width: 130px; text-align: right; }
.rv-tabela tr.duplicada { background: rgba(255, 251, 235, .5); } .rv-tabela tr.excluida { opacity: .4; background: rgba(241, 245, 249, .1); }
.rv-avisos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; font-size: 10px; }
.rv-dup { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; border-radius: 4px; background: #fef3c7; color: #b45309; font-weight: 600; }
.rv-doc { padding: 0 4px; border-radius: 4px; background: rgba(241, 245, 249, .5); color: var(--texto-2); font-family: ui-monospace, monospace; }
.rv-tipo { width: 120px; border-radius: 999px !important; font-weight: 500; } .rv-tipo.ent { border-color: #6ee7b7; color: #047857; background-color: #ecfdf5; } .rv-tipo.sai { border-color: #fda4af; color: #be123c; background-color: #fff1f2; }
.rv-valor { font-weight: 500; } .rv-valor.ent { color: #059669; } .rv-valor.sai { color: #e11d48; }
.rv-saldo { margin: 16px 24px; } .rv-saldo-campos { display: flex; align-items: center; gap: 12px; } .rv-saldo-campos input[type=number] { width: 150px; height: 36px; }
.rv-rodape { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 24px; border-top: 1px solid var(--borda); background: rgba(241, 245, 249, .2); } .rv-rodape .rodape { margin: 0; display: flex; gap: 8px; }
.rv-tabela td input:not([type=checkbox]), .rv-tabela td select { height: 32px !important; min-height: 0; }
.ex-formatos > div:first-child { flex: 1 1 480px; }

/* ===== Clientes — pages/Clientes.tsx ===== */
.cl-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.cl-h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.025em; color: #0f172a; }
.selo-an.verde-claro { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; font-size: 12px; font-weight: 600; }
.cl-novo { height: 32px; font-weight: 600; }
.cl-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.cl-kpi { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px; border: 1px solid var(--borda); border-radius: var(--raio); background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); }
.cl-kpi span { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-2); }
.cl-kpi strong { display: block; margin-top: 2px; font-size: 24px; font-weight: 700; color: #0f172a; line-height: 1.3; } .cl-kpi small { font-size: 11px; color: var(--texto-2); }
.cl-kpi i { font-style: normal; width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 999px; border: 1px solid; }
.cl-kpi i.verde { background: #ecfdf5; border-color: #d1fae5; color: #059669; } .cl-kpi i.azul { background: #eff6ff; border-color: #dbeafe; color: #2563eb; } .cl-kpi i.ambar { background: #fffbeb; border-color: #fef3c7; color: #d97706; }
.cl-busca { padding: 12px; margin-bottom: 16px; } .cl-busca .busca-mini input { height: 36px; font-size: 12px; } .cl-busca .busca-mini { width: 100%; }
.cl-tabela-caixa { border: 1px solid var(--borda); border-radius: var(--raio-p); background: #fff; overflow: hidden; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); }
.cl-tabela { width: 100%; } .cl-tabela thead { background: #f8fafc; }
.cl-tabela th { height: 48px; padding: 0 16px; font-size: 12px; font-weight: 700; text-transform: uppercase; color: #475569; background: none; }
.cl-tabela td { padding: 12px 16px; vertical-align: middle; } .cl-tabela tbody tr:hover { background: rgba(248, 250, 252, .7); }
.cl-nome { display: block; font-size: 14px; font-weight: 700; color: var(--marca); } .cl-tabela .sub { display: block; font-size: 12px; color: var(--texto-2); }
.cl-doc { font-size: 12px; color: #1e293b; white-space: nowrap; }
.cl-contato, .cl-cidade { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: #475569; }
.cl-contato b { color: #1e293b; font-weight: 600; } .cl-contato span { display: inline-flex; align-items: center; gap: 4px; } .cl-contato .icone { color: #94a3b8; }
.cl-email { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block !important; }
.cl-contato em, .cl-cidade em { color: var(--texto-2); }
.cl-cidade { color: #334155; } .cl-cidade b { font-weight: 600; } .cl-cidade span { color: var(--texto-2); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-resp { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: #334155; }
.cl-avatar { width: 24px; height: 24px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--borda); border-radius: 999px; background: rgba(231, 176, 8, .1); color: var(--marca); font-size: 10px; font-weight: 700; }
.cl-pequeno { font-size: 12px; } .cl-vazio { height: 128px; text-align: center; color: var(--texto-2); }
dialog.cl-janela { width: min(512px, calc(100vw - 32px)); } .cl-jtitulo > .icone { color: #059669; }
@media (max-width: 639px) { .cl-kpis { grid-template-columns: 1fr; } }

/* ===== Orçamentos — pages/Orcamentos.tsx ===== */
.or-topo { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.or-topo h1 { margin: 0; } .or-topo .subtitulo { margin: 8px 0 0; }
.or-busca { padding: 16px; margin-bottom: 16px; } .or-busca input { max-width: 512px; height: 40px; font-weight: 500; box-shadow: var(--sombra); }
.or-tabela-caixa { padding: 0; overflow: hidden; }
.or-tabela { width: 100%; } .or-tabela thead { background: #f1f5f9; border-bottom: 1px solid #cbd5e1; }
.or-tabela th { padding: 16px 18px; height: auto; font-size: 14px; font-weight: 800; color: #020617; background: none; white-space: nowrap; } .or-tabela th.largo { min-width: 200px; }
.or-tabela td { padding: 16px 18px; border-color: #f1f5f9; } .or-tabela tbody tr:hover { background: #f8fafc; }
.or-data { font-size: 14px; font-weight: 500; color: #334155; }
.or-cliente { font-size: 14px; font-weight: 700; color: #0f172a; } .or-desc { margin-top: 2px; max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--texto-2); }
.or-tipo { display: inline-flex; align-items: center; padding: 4px 10px; border: 2px solid; border-radius: var(--raio-p); font-size: 12px; font-weight: 700; box-shadow: var(--sombra); color: #fff; }
.or-tipo.padrao { background: #2563eb; border-color: #1e40af; } .or-tipo.obra { background: #ea580c; border-color: #9a3412; } .or-tipo.eletrica { background: #f59e0b; border-color: #b45309; color: #000; }
.or-tipo.fotovoltaico { background: #16a34a; border-color: #166534; } .or-tipo.licitacao { background: #9333ea; border-color: #6b21a8; } .or-tipo.limpeza { background: #0891b2; border-color: #155e75; }
.or-tipo.iluminacao { background: #4f46e5; border-color: #3730a3; } .or-tipo.sinapi { background: #0066b3; border-color: #1e3a8a; } .or-tipo.outro { background: #334155; border-color: #0f172a; }
.or-valor { font-size: 14px; font-weight: 700; color: #0f172a; }
.or-valor-original { font-size: 11px; font-weight: 500; color: #64748b; margin-top: 2px; }
select.or-status, span.or-status { width: auto; height: 28px; padding: 0 28px 0 10px; border: 1px solid; border-radius: 999px; font-size: 11px; font-weight: 600; cursor: pointer; background-position: right 8px center; }
span.or-status { display: inline-flex; align-items: center; padding: 0 10px; cursor: default; }
.or-status.ambar { background-color: #fef3c7; color: #78350f; border-color: #fcd34d; } .or-status.verde { background-color: #d1fae5; color: #064e3b; border-color: #6ee7b7; }
.or-status.azul { background-color: #dbeafe; color: #1e3a8a; border-color: #93c5fd; } .or-status.vermelho { background-color: #ffe4e6; color: #881337; border-color: #fda4af; }
.or-acoes { display: flex; justify-content: flex-end; gap: 4px; } .or-acoes .btn-icone-linha, .or-acoes .btn-lixo { width: 32px; height: 32px; color: #475569; }
.or-acoes .btn-icone-linha:hover { color: var(--marca); background: rgba(231, 176, 8, .1); }
dialog.or-janela { width: min(480px, calc(100vw - 32px)); } .or-janela .cc-jtitulo > .icone { color: #059669; }
.or-opcoes { display: flex; flex-direction: column; gap: 8px; } .or-opcoes form { margin: 0; }
.or-opcao { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 12px; border: 1px solid var(--borda); border-radius: var(--raio-lg); cursor: pointer; text-decoration: none; color: var(--texto); }
.or-opcao:hover { border-color: var(--marca); background: rgba(231, 176, 8, .05); text-decoration: none; } .or-opcao:focus-visible { outline: 2px solid var(--marca); outline-offset: 2px; }
.or-opcao b { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; } .or-opcao small { font-size: 12px; color: var(--texto-2); }
.or-tabela .nowrap { white-space: nowrap; } .or-tipo { white-space: nowrap; }

/* ===== Dashboard Executivo — pages/Index.tsx ===== */
.db { width: 100%; max-width: 1280px; margin: 0 auto; }
.db-grafico .grafico { max-height: 320px; }
.db-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-bottom: 32px; }
.db-kpi { all: unset; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; padding: 24px; border: 1px solid var(--borda); border-radius: var(--raio); background: #fff; box-shadow: var(--sombra); cursor: pointer; transition: border-color .2s, box-shadow .2s, background .2s; }
.db-kpi:hover { border-color: rgba(231, 176, 8, .5); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1); background: rgba(241, 245, 249, .1); }
.db-kpi:active { transform: scale(.98); } .db-kpi:focus-visible { outline: 2px solid var(--marca); outline-offset: 2px; }
.db-kpi-topo { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; } .db-kpi-topo b { font-size: 14px; font-weight: 800; color: #475569; }
.db-kpi-topo i { font-style: normal; display: grid; place-items: center; padding: 8px; border-radius: 999px; background: rgba(231, 176, 8, .1); color: var(--marca); transition: background .2s, color .2s; }
.db-kpi:hover .db-kpi-topo b { color: var(--marca); } .db-kpi:hover .db-kpi-topo i { background: var(--marca); color: var(--marca-texto); }
.db-kpi strong { margin-top: 8px; font-size: 30px; font-weight: 900; letter-spacing: -.025em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--texto); } .db-kpi strong.ouro { color: var(--marca); }
.db-ver { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 8px; border-top: 1px solid rgba(226, 232, 240, .5); font-size: 12px; font-weight: 600; color: var(--texto-2); }
.db-kpi:hover .db-ver { color: var(--marca); } .db-kpi:hover .db-ver .icone { transform: translateX(4px); } .db-ver .icone { transition: transform .2s; }
.db-baixo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.db-baixo > .db-grafico { grid-column: 1 / -1; } /* gráfico em cima; Tarefas e Serviços lado a lado com largura para os títulos */
@media (min-width: 1800px) { .db-baixo { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); } .db-baixo > .db-grafico { grid-column: auto; } }
.db-baixo .cartao { margin: 0; } .db-baixo h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; } .db-baixo p { margin: 4px 0 0; font-size: 14px; color: var(--texto-2); }
.db-leg { margin-top: 8px; } .lg-quad.ouro { background: #e7b008; }
.db-lista { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 20px; }
.db-lista-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .db-lista-topo h2 { font-size: 16px; } .db-lista-topo p { font-size: 12px; }
.db-lista-topo a { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--marca); }
.db-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid var(--borda); border-radius: var(--raio-lg); background: rgba(241, 245, 249, .3); color: var(--texto); text-decoration: none; min-width: 0; }
a.db-item:hover { text-decoration: none; border-color: rgba(231, 176, 8, .5); } .db-item > .icone { flex: 0 0 auto; margin-top: 2px; color: var(--marca); }
.db-item > div { min-width: 0; display: flex; flex-direction: column; } .db-item b { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-item small { font-size: 12px; color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-item-pe { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; } .db-item-pe em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--marca); }
.db-vazio { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px 0; color: var(--texto-2); text-align: center; } .db-vazio .icone { opacity: .5; } .db-vazio p { margin: 0; }
/* painel lateral */
dialog.db-painel { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(512px, 100vw); max-width: 100vw; height: 100vh; max-height: 100vh; padding: 0; border: 0; border-left: 1px solid var(--borda); background: #fff; color: var(--texto); box-shadow: -8px 0 24px rgba(0, 0, 0, .15); display: none; flex-direction: column; }
dialog.db-painel[open] { display: flex; animation: db-entra .25s ease-out; } dialog.db-painel::backdrop { background: rgba(0, 0, 0, .8); }
@keyframes db-entra { from { transform: translateX(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { dialog.db-painel[open] { animation: none; } }
.db-cabeca { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 24px; border-bottom: 1px solid var(--borda); background: rgba(241, 245, 249, .2); }
.db-cab-icone { flex: 0 0 auto; display: grid; place-items: center; padding: 10px; border-radius: var(--raio); background: rgba(231, 176, 8, .1); color: var(--marca); }
.db-cab-titulo { display: flex; align-items: center; gap: 8px; } .db-cab-titulo h2 { margin: 0; font-size: 18px; font-weight: 700; }
.db-cont { padding: 0 8px; border-radius: 999px; background: #f1f5f9; font-size: 12px; font-weight: 600; } .db-cabeca p { margin: 2px 0 0; font-size: 12px; color: var(--texto-2); padding-right: 24px; }
.db-fechar { position: absolute; top: 16px; right: 16px; border: 0; background: none; color: var(--texto-2); cursor: pointer; border-radius: 4px; padding: 2px; } .db-fechar:hover { color: var(--texto); }
.db-corpo { flex: 1; overflow-y: auto; padding: 16px 24px; display: flex; flex-direction: column; gap: 12px; }
.db-corpo h5 { margin: 12px 0 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-2); } .db-corpo h5:first-child { margin-top: 0; }
.db-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--borda); border-radius: var(--raio); background: #fff; color: var(--texto); text-decoration: none; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); transition: border-color .15s, box-shadow .15s, background .15s; }
.db-card:hover { text-decoration: none; border-color: rgba(231, 176, 8, .6); background: rgba(241, 245, 249, .5); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1); }
.db-card-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; } .db-card-topo > span { min-width: 0; display: flex; flex-direction: column; }
.db-card-topo b { font-size: 14px; font-weight: 700; } .db-card:hover .db-card-topo b { color: var(--marca); } .db-card-topo small { font-size: 12px; color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-cli { display: inline-flex !important; align-items: center; gap: 4px; color: var(--texto) !important; font-weight: 500; }
.db-card-topo em { flex: 0 0 auto; font-style: normal; padding: 1px 8px; border: 1px solid; border-radius: 999px; font-size: 11px; font-weight: 600; }
.selo-v, .selo-verde { background: #ecfdf5; color: #047857; border-color: #a7f3d0; } .selo-azul { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.selo-ambar { background: #fffbeb; color: #b45309; border-color: #fde68a; } .selo-vermelho { background: #fef2f2; color: #b91c1c; border-color: #fecaca; } .selo-c { background: #f1f5f9; color: #0f172a; border-color: transparent; }
.db-card-meio { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 8px; border-top: 1px solid rgba(226, 232, 240, .5); font-size: 12px; color: var(--texto-2); }
.db-card-meio > span { display: flex; align-items: center; gap: 6px; min-width: 0; } .db-card-meio > span:last-child { justify-content: flex-end; } .db-card-meio b { font-weight: 600; color: var(--texto); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-card-meio i { font-style: normal; display: inline-grid; } i.ouro { color: var(--marca); }
.db-card-pe { display: flex; align-items: center; justify-content: space-between; } .db-card-pe.fim { justify-content: flex-end; } .db-card-pe code { font-size: 11px; color: var(--texto-2); background: none; padding: 0; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--marca); } .db-card:hover .db-link { text-decoration: underline; }
.db-pe { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-top: 1px solid var(--borda); }
@media (max-width: 1023px) { .db-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .db-baixo { grid-template-columns: 1fr; } }
@media (max-width: 639px) { .db-kpis { grid-template-columns: 1fr; } }

/* ===== CRM Comercial — pages/Crm.tsx ===== */
.selo-an.azul-claro { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; font-size: 12px; font-weight: 600; }
.crm-acoes { display: flex; align-items: center; gap: 8px; }
.crm-modo { display: flex; align-items: center; padding: 2px; border: 1px solid var(--borda); border-radius: var(--raio-lg); background: #f1f5f9; }
.crm-modo a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--raio-p); font-size: 13px; font-weight: 500; color: #0f172a; text-decoration: none; }
.crm-modo a.ativo { background: var(--marca); color: var(--marca-texto); font-weight: 600; } .crm-modo a:hover { text-decoration: none; }
.crm-nova { font-weight: 600; }
.crm-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.crm-kpi { padding: 14px; border: 1px solid var(--borda); border-radius: var(--raio); background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); min-width: 0; }
.crm-kpi-topo { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; } .crm-kpi-topo span { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-2); }
.crm-kpi i { font-style: normal; display: inline-grid; color: #94a3b8; } .ic-ambar .icone, .crm-kpi i.ic-ambar { color: #f59e0b; } .crm-kpi i.ic-azul { color: #3b82f6; } .crm-kpi i.ic-verde { color: #10b981; }
.crm-kpi strong { display: block; font-size: 24px; font-weight: 700; color: #0f172a; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .crm-kpi strong.menor { font-size: 20px; } .crm-kpi strong.c-verde { color: #047857; }
.crm-kpi small { display: block; margin-top: 2px; font-size: 11px; color: var(--texto-2); }
.crm-kpi.alerta { background: rgba(255, 241, 242, .5); border-color: #fecdd3; } .crm-kpi.alerta .crm-kpi-topo span { color: #be123c; } .crm-kpi.alerta i { color: #f43f5e; } .crm-kpi.alerta strong { color: #e11d48; }
.crm-filtros { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; margin-bottom: 16px; }
.crm-filtros .busca-mini { flex: 1; min-width: 240px; } .crm-filtros .busca-mini input { height: 36px; font-size: 12px; }
.crm-filtros-dir { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } .crm-filtros-dir select { width: 170px; height: 36px; font-size: 12px; }
.crm-arq { height: 36px; font-size: 12px; } .botao.secundario { background: #f1f5f9; }
.crm-kanban { display: flex; gap: 12px; overflow-x: auto; padding: 0 2px 16px; }
.crm-coluna { flex: 0 0 320px; display: flex; flex-direction: column; max-height: calc(100vh - 250px); border: 1px solid rgba(226, 232, 240, .8); border-radius: var(--raio); background: rgba(241, 245, 249, .7); transition: background .15s; }
.crm-coluna.sobre .crm-col-itens { background: rgba(239, 246, 255, .5); }
.crm-col-topo { position: sticky; top: 0; display: flex; flex-direction: column; gap: 4px; padding: 12px; border-bottom: 1px solid #e2e8f0; border-radius: var(--raio) var(--raio) 0 0; background: rgba(241, 245, 249, .9); }
.crm-col-topo > div:first-child { display: flex; align-items: center; gap: 8px; } .crm-col-topo b { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .025em; color: #1e293b; }
.crm-cont { padding: 0 6px; height: 20px; display: inline-grid; place-items: center; border-radius: 999px; background: #e2e8f0; font-size: 12px; font-weight: 700; }
.crm-col-total { display: flex; justify-content: space-between; padding-top: 2px; font-size: 11px; font-weight: 500; color: var(--texto-2); } .crm-col-total b { text-transform: none; color: #334155; font-size: 11px; }
.crm-col-itens { flex: 1; min-height: 150px; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.crm-cartao { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--borda); border-radius: var(--raio); background: #fff; color: var(--texto); text-decoration: none; cursor: grab; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); transition: border-color .15s; }
.crm-cartao:hover { text-decoration: none; border-color: rgba(231, 176, 8, .6); } .crm-cartao.arrastando { opacity: .6; transform: rotate(1deg); border-color: var(--marca); }
.crm-c-topo { display: flex; justify-content: space-between; gap: 8px; } .crm-c-topo > span { min-width: 0; display: flex; flex-direction: column; }
.crm-c-topo b { font-size: 14px; font-weight: 700; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .crm-c-topo small { font-size: 12px; color: var(--texto-2); }
.crm-c-topo em { font-style: normal; flex: 0 0 auto; height: fit-content; padding: 2px 6px; border: 1px solid #a7f3d0; border-radius: 4px; background: #ecfdf5; font-size: 12px; font-weight: 700; color: #047857; white-space: nowrap; }
.crm-c-contato { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; color: var(--texto-2); } .crm-c-contato span { display: inline-flex; align-items: center; gap: 4px; }
.crm-c-contato i { font-style: normal; padding: 0 6px; border-radius: 4px; background: #f1f5f9; font-size: 10px; font-weight: 500; color: #334155; }
.crm-c-acao { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px; border: 1px solid #e2e8f0; border-radius: 4px; background: #f8fafc; font-size: 11px; color: #334155; }
.crm-c-acao span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .crm-c-acao b { flex: 0 0 auto; }
.crm-c-acao.atrasado { background: #fff1f2; color: #9f1239; border-color: #fecdd3; } .crm-c-acao.atrasado .icone { color: #e11d48; } .crm-c-acao.hoje { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.crm-c-pe { display: flex; align-items: center; justify-content: space-between; padding-top: 8px; border-top: 1px solid #f1f5f9; font-size: 11px; color: var(--texto-2); }
.crm-c-pe .cl-resp { font-size: 11px; font-weight: 400; color: var(--texto-2); gap: 6px; } .cl-avatar.pequeno { width: 20px; height: 20px; font-size: 9px; }
.cl-avatar:has(svg) { background: var(--superficie-2); color: var(--texto-2); } /* sem responsável: ícone neutro */
.crm-tabela td { font-size: 12px; } .crm-empresa { font-size: 14px; font-weight: 600; color: #1e293b; }
select.crm-etapa, span.crm-etapa { width: auto; height: 26px; padding: 0 24px 0 10px; border: 1px solid; border-radius: 999px; font-size: 12px; font-weight: 600; background-position: right 6px center; cursor: pointer; }
span.crm-etapa { display: inline-flex; align-items: center; padding: 0 10px; cursor: default; }
.crm-etapa.slate { background-color: #f1f5f9; color: #0f172a; border-color: #cbd5e1; } .crm-etapa.azul { background-color: #dbeafe; color: #1e3a8a; border-color: #93c5fd; }
.crm-etapa.roxo { background-color: #f3e8ff; color: #581c87; border-color: #d8b4fe; } .crm-etapa.indigo { background-color: #e0e7ff; color: #312e81; border-color: #a5b4fc; }
.crm-etapa.ambar { background-color: #fef3c7; color: #78350f; border-color: #fcd34d; } .crm-etapa.laranja { background-color: #ffedd5; color: #7c2d12; border-color: #fdba74; }
.crm-etapa.verde { background-color: #d1fae5; color: #064e3b; border-color: #6ee7b7; } .crm-etapa.vermelho { background-color: #ffe4e6; color: #881337; border-color: #fda4af; }
.crm-data { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; background: #f1f5f9; font-size: 12px; font-weight: 500; color: #334155; }
.crm-data.atrasado { background: #ffe4e6; color: #9f1239; } .crm-data.hoje { background: #fef3c7; color: #92400e; }
.menu-lista form { margin: 0; } .menu-lista button[role=menuitem] { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; font-size: 13px; cursor: pointer; border-radius: 6px; }
.menu-lista button[role=menuitem]:hover { background: var(--superficie-2); }
@media (max-width: 1279px) { .crm-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 639px) { .crm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .crm-filtros-dir select { width: 100%; } }

/* ===== Serviços — pages/Servicos.tsx ===== */
.sv { max-width: 1400px; margin: 0 auto; }
.sv-resumo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.sv-card { display: flex; flex-direction: column; justify-content: space-between; padding: 16px; border: 1px solid var(--borda); border-radius: var(--raio); background: #fff; box-shadow: var(--sombra); min-width: 0; }
.sv-card-topo { display: flex; align-items: center; justify-content: space-between; } .sv-card-topo span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-2); }
.sv-card-topo i { font-style: normal; display: grid; place-items: center; padding: 8px; border-radius: var(--raio-lg); background: rgba(231, 176, 8, .1); color: var(--marca); } .sv-card-topo i.cinza { background: #f1f5f9; color: var(--texto-2); }
.sv-card strong { margin-top: 8px; font-size: 24px; font-weight: 900; color: var(--texto); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sv-card p { margin: 4px 0 0; font-size: 11px; font-weight: 500; color: var(--texto-2); }
@media (max-width: 640px) { .sv-card { padding: 12px; } .sv-card strong { font-size: 17px; white-space: normal; overflow-wrap: anywhere; } }
.sv-card.verde { background: rgba(16, 185, 129, .1); border-color: rgba(16, 185, 129, .3); } .sv-card.verde .sv-card-topo span { font-weight: 800; color: #047857; } .sv-card.verde i { background: rgba(16, 185, 129, .2); color: #059669; } .sv-card.verde strong { color: #059669; } .sv-card.verde p { color: rgba(4, 120, 87, .8); }
.sv-card.azul { background: rgba(59, 130, 246, .1); border-color: rgba(59, 130, 246, .3); } .sv-card.azul .sv-card-topo span { font-weight: 800; color: #1d4ed8; } .sv-card.azul i { background: rgba(59, 130, 246, .2); color: #2563eb; } .sv-card.azul strong { color: #2563eb; } .sv-card.azul p { color: rgba(29, 78, 216, .8); }
.sv-status { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.sv-st { display: flex; flex-direction: column; justify-content: space-between; min-height: 85px; padding: 12px; border: 1px solid var(--borda); border-radius: var(--raio); background: #fff; box-shadow: var(--sombra); color: var(--texto); text-decoration: none; transition: box-shadow .15s; }
.sv-st:hover { text-decoration: none; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1); } .sv-st.ativo { border-color: var(--marca); box-shadow: 0 0 0 2px rgba(231, 176, 8, .2); background: rgba(231, 176, 8, .05); }
.sv-st-topo { display: flex; align-items: center; justify-content: space-between; gap: 6px; } .sv-st-topo > span { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--texto-2); }
.sv-st-topo em { font-style: normal; padding: 2px 6px; border-radius: 4px; background: #f1f5f9; font-size: 12px; font-weight: 800; color: var(--texto-2); } .sv-st b { margin-top: 8px; font-size: 14px; font-weight: 700; }
.ponto-st { width: 8px; height: 8px; border-radius: 999px; display: inline-block; } .ponto-st.ambar { background: #f59e0b; } .ponto-st.azul { background: #3b82f6; } .ponto-st.verde { background: #10b981; } .ponto-st.vermelho { background: #ef4444; } .ponto-st.roxo { background: #a855f7; }
.or-status.roxo { background-color: #f3e8ff; color: #6b21a8; border-color: #e9d5ff; }
.sv-barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.sv-abas { display: inline-flex; height: 40px; padding: 4px; border-radius: var(--raio-p); background: #f1f5f9; overflow-x: auto; }
.sv-abas a { display: inline-flex; align-items: center; padding: 0 16px; border-radius: var(--raio-s); font-size: 14px; font-weight: 500; color: var(--texto-2); text-decoration: none; white-space: nowrap; }
.sv-abas a.ativo { background: #fff; color: var(--texto); box-shadow: var(--sombra); } .sv-abas a:hover { text-decoration: none; color: var(--texto); }
.sv-busca { width: 300px; } .sv-busca input { height: 40px; }
.sv-tabela { width: 100%; } .sv-tabela thead tr { background: #f1f5f9; } .sv-tabela th { font-weight: 600; color: var(--texto); background: none; }
.sv-tabela tbody tr { cursor: pointer; } .sv-tabela tbody tr:hover { background: rgba(241, 245, 249, .5); }
.sv-nome { display: block; font-weight: 700; color: var(--texto); line-height: 1.25; } .sv-desc { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; font-size: 12px; color: var(--texto-2); }
.sv-cli { font-weight: 500; } .sv-pag { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; } .sv-pag small { font-size: 11px; font-weight: 500; color: var(--texto-2); } .sv-pag small b { color: var(--marca); }
.sv-pag-selo { padding: 2px 8px; border: 1px solid; border-radius: 4px; font-size: 11px; font-weight: 800; }
.sv-pag-selo.slate { background: #f1f5f9; color: #334155; border-color: #cbd5e1; } .sv-pag-selo.verde { background: #d1fae5; color: #065f46; border-color: #6ee7b7; } .sv-pag-selo.ambar { background: #fef3c7; color: #92400e; border-color: #fcd34d; } .sv-pag-selo.vermelho { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.sv-valor { font-size: 14px; font-weight: 600; } .sv-pago { display: block; font-size: 11px; font-weight: 500; color: #059669; }
.sv-datas { font-size: 12px; font-weight: 500; color: var(--texto-2); } .sv-datas span { display: flex; align-items: center; gap: 4px; } .sv-resp { font-size: 14px; font-weight: 500; }
@media (max-width: 1023px) { .sv-resumo { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sv-status { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 639px) { .sv-resumo, .sv-status { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sv-busca { width: 100%; } }
.sv { width: 100%; max-width: 1400px; min-width: 0; } .sv .tabela-rolagem { max-width: 100%; overflow-x: auto; }
.sv-valor, .sv-pago, .sv-datas span { white-space: nowrap; } .sv-cli { min-width: 130px; }

/* ---- Tarefas (igual ao CRM: pages/Tarefas.tsx) ---- */
.tf { width: 100%; max-width: 1400px; min-width: 0; }
.tf-barra { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px; margin: 24px 0; flex-wrap: wrap; }
.tf-busca { width: 300px; } .tf-busca input { height: 40px; font-size: 14px; background: #fff; }
.tf-grade { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tf-card { position: relative; display: flex; flex-direction: column; padding: 16px; border: 1px solid #e2e8f0; border-radius: var(--raio); background: #f1f5f9; box-shadow: var(--sombra); transition: box-shadow .15s; }
.tf-card:hover { box-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1); }
.tf-card.laranja { background: #fff7ed; border-color: #fed7aa; } .tf-card.verde { background: #ecfdf5; border-color: #a7f3d0; } .tf-card.vermelho { background: #fef2f2; border-color: #fecaca; }
.tf-abrir { position: absolute; inset: 0; z-index: 1; width: 100%; border: 0; border-radius: inherit; background: transparent; cursor: pointer; }
.tf-abrir:focus-visible { outline: 2px solid var(--marca); outline-offset: 2px; }
.tf-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.tf-titulo { display: flex; align-items: flex-start; gap: 8px; flex: 1; min-width: 0; }
.tf-titulo h3 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.25; text-transform: none; letter-spacing: 0; color: var(--texto); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tf-card:hover .tf-titulo h3 { color: var(--marca-escura, #a16207); }
.tf-titulo h3.riscado { text-decoration: line-through; color: var(--texto-2); }
.tf-check-form { position: relative; z-index: 2; }
.tf-check { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0; margin-top: 2px; border: 0; border-radius: 999px; background: transparent; color: var(--texto-2); cursor: pointer; }
.tf-check:hover { background: #d1fae5; color: #059669; } .tf-check.feito { background: #10b981; color: #fff; } .tf-check.feito:hover { background: #059669; color: #fff; }
.tf-status { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 4px 10px; border: 1px solid #cbd5e1; border-radius: 999px; background: #e2e8f0; color: #334155; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tf-status.laranja { background: #fed7aa; color: #9a3412; border-color: #fdba74; } .tf-status.verde { background: #a7f3d0; color: #047857; border-color: #6ee7b7; } .tf-status.vermelho { background: #fecaca; color: #b91c1c; border-color: #fca5a5; }
.tf-desc { flex: 1; margin: 0 0 16px; font-size: 14px; color: var(--texto-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tf-pe { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 16px; border-top: 1px solid rgb(226 232 240 / .5); }
.tf-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 14px; font-weight: 500; color: var(--texto-2); }
.tf-info span { display: flex; align-items: center; gap: 8px; } .tf-info i { display: inline-flex; font-style: normal; }
.tf-info em { font-style: normal; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-prio { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; background: #78716c; white-space: nowrap; }
.tf-prio.n1 { background: #475569; } .tf-prio.n2 { background: #2563eb; } .tf-prio.n3 { background: #f59e0b; color: #451a03; } .tf-prio.n4 { background: #f97316; } .tf-prio.n5 { background: #e11d48; }
.tf-vazio { grid-column: 1 / -1; padding: 48px 0; text-align: center; color: var(--texto-2); background: #fff; border: 1px dashed #e2e8f0; border-radius: var(--raio); }
.tf-janela { width: min(448px, calc(100vw - 32px)); max-width: 448px; }
.tf-janela h2 { font-size: 18px; margin: 0 0 16px; }
.tf-textarea { resize: none; height: 96px; }
.grade-3-fixa { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tf-niveis { border: 0; padding: 0; margin: 0; min-width: 0; } .tf-niveis legend { padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 500; }
.tf-niveis > div { display: flex; gap: 6px; flex-wrap: wrap; }
.tf-niveis label { position: relative; cursor: pointer; margin: 0; }
.tf-niveis input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tf-niveis span { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid; border-radius: 4px; font-size: 13px; font-weight: 700; opacity: .85; }
.tf-niveis .n0 span { background: #f5f5f4; color: #44403c; border-color: #e7e5e4; } .tf-niveis .n1 span { background: #f1f5f9; color: #334155; border-color: #e2e8f0; }
.tf-niveis .n2 span { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; } .tf-niveis .n3 span { background: #fefce8; color: #a16207; border-color: #fef08a; }
.tf-niveis .n4 span { background: #fff7ed; color: #c2410c; border-color: #fed7aa; } .tf-niveis .n5 span { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.tf-niveis input:checked + span { opacity: 1; color: #fff; border-color: transparent; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--texto); transform: scale(1.08); }
.tf-niveis .n0 input:checked + span { background: #78716c; } .tf-niveis .n1 input:checked + span { background: #94a3b8; } .tf-niveis .n2 input:checked + span { background: #3b82f6; }
.tf-niveis .n3 input:checked + span { background: #eab308; } .tf-niveis .n4 input:checked + span { background: #f97316; } .tf-niveis .n5 input:checked + span { background: #ef4444; }
.tf-niveis input:focus-visible + span { outline: 2px solid var(--marca); outline-offset: 2px; }
.tf-rodape { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; border-top: 1px solid var(--borda); }
.tf-dir { display: flex; gap: 8px; margin-left: auto; }
@media (max-width: 1279px) { .tf-grade { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .tf-grade, .grade-3-fixa { grid-template-columns: 1fr; } .tf-busca { width: 100%; } }
.tf-rodape [hidden] { display: none; }
.tf-janela form { display: flex; flex-direction: column; gap: 14px; } .tf-janela .campo { margin: 0; } .tf-janela h2 { margin: 0; }
.tf-niveis span { width: 36px; height: 36px; } .tf-niveis > div { gap: 8px; }
.tf-janela .grade-2-fixa { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .tf-janela input, .tf-janela select { min-width: 0; width: 100%; } .tf-janela input[type=datetime-local] { font-size: 13px; padding-right: 6px; }

/* ---- Diário de Obra (igual ao CRM: pages/DiarioObra.tsx) ---- */
.do { width: 100%; max-width: 1280px; min-width: 0; }
.do-vazio { padding: 48px 24px; }
.do-grade { display: grid; grid-template-columns: 1fr; gap: 24px; min-height: 500px; }
@media (min-width: 768px) { .do-grade { grid-template-columns: 4fr 8fr; } }
@media (min-width: 1024px) { .do-grade { grid-template-columns: 3fr 9fr; } }
.do-lateral, .do-principal { display: flex; flex-direction: column; overflow: hidden; padding: 0; min-width: 0; }
.do-lateral { max-height: 600px; }
@media (min-width: 768px) { .do-lateral { max-height: none; } }
.do-lateral-topo { padding: 16px; border-bottom: 1px solid var(--borda); background: rgba(241, 245, 249, .2); display: grid; gap: 16px; }
.do-lateral-topo h3 { margin: 0; font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-2); }
.do-lateral-topo input { background: var(--fundo); }
.do-lista { padding: 8px; display: grid; gap: 4px; align-content: start; overflow-y: auto; flex: 1; }
.do-item { display: block; padding: 12px; border-radius: 8px; border: 1px solid transparent; font-size: 14px; color: var(--texto-2); text-decoration: none; transition: all .2s; }
.do-item:hover { background: var(--superficie-2); color: var(--texto); }
.do-item.ativo { background: rgba(231, 176, 8, .1); color: var(--marca-link); border-color: rgba(231, 176, 8, .2); box-shadow: var(--sombra); }
.do-item strong { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.do-item span { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; opacity: .8; min-width: 0; }
.do-item span .icone { flex: 0 0 auto; }
.do-item em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.do-nada { padding: 16px; text-align: center; font-size: 14px; color: var(--texto-2); margin: 0; }
.do-cab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 24px; border-bottom: 1px solid var(--borda); background: rgba(241, 245, 249, .1); }
.do-cab > div { min-width: 0; flex: 1; }
.do-cab h2 { margin: 0; font-size: 24px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.do-cab p { margin: 4px 0 0; display: flex; align-items: center; gap: 8px; color: var(--texto-2); min-width: 0; }
.do-cab p span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.do-selo { background: var(--marca); color: var(--marca-texto); border-radius: 999px; padding: 2px 10px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.do-corpo { padding: 24px; overflow-y: auto; flex: 1; }
.do-sem { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 16px; color: var(--texto-2); font-size: 14px; gap: 8px; }
.do-sem strong { font-size: 18px; color: var(--texto); }
.do-sem > span:last-child { max-width: 384px; }
.do-sem-icone { width: 64px; height: 64px; border-radius: 50%; background: var(--superficie-2); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.do-linha { list-style: none; margin: 0 0 0 16px; padding: 0 0 32px; border-left: 2px solid rgba(231, 176, 8, .2); display: grid; gap: 32px; }
.do-linha > li { position: relative; padding-left: 32px; }
.do-marca { position: absolute; left: -11px; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--marca); color: var(--marca-texto); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 4px var(--superficie); }
.do-card { border: 1px solid var(--borda); border-radius: var(--raio); overflow: hidden; box-shadow: var(--sombra); background: var(--superficie); transition: box-shadow .3s; }
.do-card:hover { box-shadow: var(--sombra-md); }
.do-card > header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 24px; background: rgba(241, 245, 249, .3); }
.do-card > header strong { font-size: 16px; color: var(--marca-link); }
.do-card > header span { font-size: 12px; font-weight: 500; color: var(--texto-2); }
.do-card > header b { color: var(--texto); }
.do-card-corpo { padding: 24px; display: grid; gap: 12px; }
.do-info { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; background: rgba(241, 245, 249, .3); padding: 12px; border-radius: 8px; border: 1px solid rgba(226, 232, 240, .5); }
.do-info span { display: flex; align-items: center; gap: 8px; }
.do-info .icone { color: var(--texto-2); }
.do-info em { font-style: normal; color: var(--texto-2); }
.do-card h4 { margin: 4px 0 0; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.do-card h4 .icone { color: var(--marca); }
.do-texto { margin: 0; font-size: 14px; color: var(--texto-2); white-space: pre-wrap; line-height: 1.6; background: rgba(241, 245, 249, .1); padding: 12px; border-radius: 6px; border: 1px solid rgba(226, 232, 240, .3); }
.do-equip { margin: 0; font-size: 14px; color: var(--texto-2); }
.do-fotos { display: flex; flex-wrap: wrap; gap: 8px; }
.do-fotos a { display: block; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; border: 1px solid var(--borda); box-shadow: var(--sombra); }
.do-fotos img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.do-fotos a:hover img { transform: scale(1.1); }
.do-janela { max-width: 672px; }
.do-janela textarea { width: 100%; }
.do-grade > .cartao { margin: 0; }

/* ---- Agenda Integrada (igual ao CRM: pages/Agenda.tsx, components/agendamentos/*) ---- */
.ag { width: 100%; max-width: 1400px; min-width: 0; display: grid; gap: 24px; }
.ag .cartao { margin: 0; }
.ag-topo { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding: 16px; }
.ag-marca { display: flex; align-items: center; gap: 12px; }
.ag-marca h1 { margin: 0; font-size: 24px; font-weight: 700; }
.ag-marca-icone { background: rgba(231, 176, 8, .1); color: var(--marca); padding: 8px; border-radius: 8px; display: flex; }
.ag-controles { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.ag-abas, .ag-visoes { display: inline-flex; align-items: center; background: var(--superficie-2); border-radius: var(--raio-p); padding: 4px; height: 40px; }
.ag-visoes { background: rgba(241, 245, 249, .5); border: 1px solid var(--borda); }
.ag-abas a, .ag-visoes a { padding: 0 16px; height: 32px; display: inline-flex; align-items: center; border-radius: var(--raio-s); font-size: 14px; font-weight: 500; color: var(--texto-2); text-decoration: none; white-space: nowrap; }
.ag-visoes a { padding: 0 12px; font-size: 12px; }
.ag-abas a.ativa, .ag-visoes a.ativa { background: var(--fundo); color: var(--texto); box-shadow: var(--sombra); }
.ag-prof select { width: 200px; height: 40px; }
.ag-novo { height: 40px; font-weight: 700; }
.ag-sinc { height: 40px; font-weight: 700; color: var(--marca-link); border-color: rgba(231, 176, 8, .2); }
.ag-sinc:hover { background: rgba(231, 176, 8, .05); }
@media (max-width: 640px) { .ag-sinc span { display: none; } }
.ag-sinc-janela { max-width: 520px; }
.ag-sinc-google { margin: 4px 0 16px; }
.ag-sinc-url { display: flex; gap: 8px; align-items: center; }
.ag-sinc-url code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 12px; padding: 8px; border: 1px solid var(--borda); border-radius: 8px; background: var(--fundo); }
.ag-cal { padding: 16px; display: grid; gap: 16px; overflow-x: auto; min-width: 0; }
.ag-cal-topo { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ag-cal-topo h2 { margin: 0; font-size: 20px; font-weight: 600; text-transform: capitalize; }
.ag-nav { display: flex; align-items: center; gap: 8px; }
.ag-nav .icone-so { width: 40px; height: 40px; padding: 0; display: inline-grid; place-items: center; }
.ag-nav .pequeno { font-weight: 700; }
.ag-mes-wrap { overflow-x: auto; padding-bottom: 16px; }
.ag-mes { min-width: 800px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--borda); border: 1px solid var(--borda); border-radius: 8px; overflow: hidden; }
.ag-mes-cab { background: #f8fafc; padding: 8px 0; text-align: center; font-size: 12px; font-weight: 600; color: var(--texto-2); text-transform: uppercase; }
.ag-dia { position: relative; min-height: 120px; background: var(--fundo); padding: 8px; transition: background .15s; min-width: 0; }
.ag-dia:hover { background: #f8fafc; }
.ag-dia.fora { background: #fcfdfe; color: var(--texto-2); }
.ag-dia-novo { position: absolute; inset: 0; border: 0; background: none; cursor: pointer; z-index: 0; }
.ag-dia-num { position: relative; z-index: 1; pointer-events: none; display: block; font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.ag-dia.hoje .ag-dia-num { color: var(--marca-link); font-weight: 700; }
.ag-dia-evs { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 4px; overflow: hidden; pointer-events: none; }
.ag-dia-evs > * { pointer-events: auto; }
.ag-mais { display: block; text-align: center; font-size: 12px; font-weight: 700; color: var(--texto-2); background: rgba(241, 245, 249, .3); border-radius: 4px; padding: 4px 0; margin-top: 4px; text-decoration: none; }
.ag-mais:hover { background: rgba(241, 245, 249, .5); color: var(--texto); }
.ag-ev { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 28px; padding: 4px 8px; border-radius: 6px; border: 1px solid; box-shadow: var(--sombra); font: inherit; font-size: 12px; text-align: left; cursor: pointer; overflow: hidden; transition: background .15s; }
.ag-ev[data-tom=cinza] { background: #f1f5f9; color: #1e293b; border-color: #e2e8f0; } .ag-ev[data-tom=cinza]:hover { background: #e2e8f0; }
.ag-ev[data-tom=vermelho] { background: #fee2e2; color: #991b1b; border-color: #fecaca; } .ag-ev[data-tom=vermelho]:hover { background: #fecaca; }
.ag-ev[data-tom=verde] { background: #d1fae5; color: #065f46; border-color: #a7f3d0; } .ag-ev[data-tom=verde]:hover { background: #a7f3d0; }
.ag-ev[data-tom=laranja] { background: #ffedd5; color: #9a3412; border-color: #fed7aa; } .ag-ev[data-tom=laranja]:hover { background: #fed7aa; }
.ag-av { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; background: #fdf7e6; color: var(--marca-link); font-size: 9px; font-weight: 700; display: inline-grid; place-items: center; box-shadow: var(--sombra); }
.ag-av.vazio { background: rgba(255, 255, 255, .5); color: inherit; opacity: .9; }
.ag-hora { flex: 0 0 auto; font-weight: 700; font-size: 10px; font-variant-numeric: tabular-nums; opacity: .9; }
.ag-tit { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.ag-ind { flex: 0 0 auto; display: inline-flex; gap: 2px; opacity: .7; }
.ag-ind:empty { display: none; }
.ag-prio { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 2px; padding: 2px 6px; border-radius: 4px; border: 2px solid #fff; box-shadow: var(--sombra); font-size: 10px; font-weight: 700; line-height: 1; }
.ag-prio[data-cor=vermelho] { background: #fef2f2; color: #dc2626; } .ag-prio[data-cor=laranja] { background: #fff7ed; color: #ea580c; } .ag-prio[data-cor=azul] { background: #f0f9ff; color: #0284c7; }
.ag-prio .icone { fill: currentColor; }
.ag-semana { display: flex; flex-direction: column; border: 1px solid var(--borda); border-radius: 8px; overflow: auto; height: 600px; background: #fff; }
.ag-sem-cab { display: flex; border-bottom: 1px solid var(--borda); position: sticky; top: 0; background: #fff; z-index: 20; box-shadow: var(--sombra); }
.ag-sem-cab > div { flex: 1; min-width: 100px; padding: 8px; text-align: center; border-right: 1px solid var(--borda); font-size: 14px; font-weight: 500; background: #f8fafc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-sem-cab > .ag-sem-canto, .ag-sem-horas { flex: 0 0 64px; min-width: 64px; background: #f8fafc; border-right: 1px solid var(--borda); }
.ag-sem-corpo { display: flex; position: relative; }
.ag-sem-horas > div { height: 80px; border-bottom: 1px solid var(--borda); font-size: 12px; color: #94a3b8; text-align: right; padding: 4px 8px 0 0; }
.ag-sem-col { flex: 1; min-width: 100px; position: relative; border-right: 1px solid var(--borda); }
.ag-sem-col:last-child, .ag-sem-cab > div:last-child { border-right: 0; }
.ag-sem-linha { height: 80px; border-bottom: 1px solid #f1f5f9; }
.ag-sem-ev { position: absolute; left: 4px; right: 4px; z-index: 10; }
.ag-diav { display: flex; flex-direction: column; border: 1px solid var(--borda); border-radius: 8px; overflow: auto; height: 600px; background: #fff; }
.ag-slot { display: flex; border-bottom: 1px solid var(--borda); min-height: 64px; transition: background .15s; }
.ag-slot:hover { background: #f8fafc; }
.ag-slot-hora { flex: 0 0 80px; background: #f8fafc; border-right: 1px solid var(--borda); font-size: 12px; color: #64748b; font-weight: 500; padding: 8px; text-align: right; }
.ag-slot-evs { flex: 1; min-width: 0; padding: 4px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.ag-det { max-width: 448px; }
.ag-det h2 { margin: 0 0 4px; font-size: 18px; }
.ag-det-corpo { display: grid; gap: 16px; padding-top: 16px; }
.ag-det h4 { margin: 0; font-size: 14px; font-weight: 600; color: var(--texto-2); display: flex; align-items: center; gap: 6px; }
.ag-det p { margin: 4px 0 0; font-size: 14px; }
.ag-det p.pre { white-space: pre-wrap; }
.ag-det-tit { font-size: 16px !important; font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ag-sino { color: #d97706; display: inline-flex; }
.ag-det-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ag-det-2 select, .ag-det-prio select { width: 100%; height: 32px; font-size: 12px; margin-top: 4px; }
.ag-rel { padding: 12px; background: rgba(241, 245, 249, .3); border-radius: 8px; border: 1px solid var(--borda); box-shadow: var(--sombra); }
.ag-rel h5 { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--texto-2); text-transform: uppercase; letter-spacing: .05em; }
.ag-rel a { font-size: 14px; font-weight: 500; color: var(--marca-link); }
.ag-det-prio { padding-top: 16px; border-top: 1px solid var(--borda); }
.ag-det .rodape { border-top: 1px solid var(--borda); padding-top: 16px; margin-top: 24px; flex-wrap: wrap; }
.ag-reag { border-color: #f59e0b; color: #b45309; }
.ag-reag:hover { background: #fffbeb; color: #92400e; }
.ag-form { max-width: 448px; }
.ag-form h2 { font-size: 20px; margin: 0 0 16px; }
.ag-form textarea { width: 100%; }
.ag-form-rodape { border-top: 1px solid var(--borda); padding-top: 16px; }
.ag-form-rodape .espaco { flex: 1; }
.ag-sem-ev.h6m0 { top: 0px; } .ag-sem-ev.h6m15 { top: 20px; } .ag-sem-ev.h6m30 { top: 40px; } .ag-sem-ev.h6m45 { top: 60px; } 
.ag-sem-ev.h7m0 { top: 80px; } .ag-sem-ev.h7m15 { top: 100px; } .ag-sem-ev.h7m30 { top: 120px; } .ag-sem-ev.h7m45 { top: 140px; } 
.ag-sem-ev.h8m0 { top: 160px; } .ag-sem-ev.h8m15 { top: 180px; } .ag-sem-ev.h8m30 { top: 200px; } .ag-sem-ev.h8m45 { top: 220px; } 
.ag-sem-ev.h9m0 { top: 240px; } .ag-sem-ev.h9m15 { top: 260px; } .ag-sem-ev.h9m30 { top: 280px; } .ag-sem-ev.h9m45 { top: 300px; } 
.ag-sem-ev.h10m0 { top: 320px; } .ag-sem-ev.h10m15 { top: 340px; } .ag-sem-ev.h10m30 { top: 360px; } .ag-sem-ev.h10m45 { top: 380px; } 
.ag-sem-ev.h11m0 { top: 400px; } .ag-sem-ev.h11m15 { top: 420px; } .ag-sem-ev.h11m30 { top: 440px; } .ag-sem-ev.h11m45 { top: 460px; } 
.ag-sem-ev.h12m0 { top: 480px; } .ag-sem-ev.h12m15 { top: 500px; } .ag-sem-ev.h12m30 { top: 520px; } .ag-sem-ev.h12m45 { top: 540px; } 
.ag-sem-ev.h13m0 { top: 560px; } .ag-sem-ev.h13m15 { top: 580px; } .ag-sem-ev.h13m30 { top: 600px; } .ag-sem-ev.h13m45 { top: 620px; } 
.ag-sem-ev.h14m0 { top: 640px; } .ag-sem-ev.h14m15 { top: 660px; } .ag-sem-ev.h14m30 { top: 680px; } .ag-sem-ev.h14m45 { top: 700px; } 
.ag-sem-ev.h15m0 { top: 720px; } .ag-sem-ev.h15m15 { top: 740px; } .ag-sem-ev.h15m30 { top: 760px; } .ag-sem-ev.h15m45 { top: 780px; } 
.ag-sem-ev.h16m0 { top: 800px; } .ag-sem-ev.h16m15 { top: 820px; } .ag-sem-ev.h16m30 { top: 840px; } .ag-sem-ev.h16m45 { top: 860px; } 
.ag-sem-ev.h17m0 { top: 880px; } .ag-sem-ev.h17m15 { top: 900px; } .ag-sem-ev.h17m30 { top: 920px; } .ag-sem-ev.h17m45 { top: 940px; } 
.ag-sem-ev.h18m0 { top: 960px; } .ag-sem-ev.h18m15 { top: 980px; } .ag-sem-ev.h18m30 { top: 1000px; } .ag-sem-ev.h18m45 { top: 1020px; } 
.ag-sem-ev.h19m0 { top: 1040px; } .ag-sem-ev.h19m15 { top: 1060px; } .ag-sem-ev.h19m30 { top: 1080px; } .ag-sem-ev.h19m45 { top: 1100px; } 
.ag-sem-ev.h20m0 { top: 1120px; } .ag-sem-ev.h20m15 { top: 1140px; } .ag-sem-ev.h20m30 { top: 1160px; } .ag-sem-ev.h20m45 { top: 1180px; } 
.ag-sem-ev.h21m0 { top: 1200px; } .ag-sem-ev.h21m15 { top: 1220px; } .ag-sem-ev.h21m30 { top: 1240px; } .ag-sem-ev.h21m45 { top: 1260px; } 
.ag-sem-ev.h22m0 { top: 1280px; } .ag-sem-ev.h22m15 { top: 1300px; } .ag-sem-ev.h22m30 { top: 1320px; } .ag-sem-ev.h22m45 { top: 1340px; } 
.ag-sem-ev.emp0 { margin-top: 0px; } .ag-sem-ev.emp1 { margin-top: 28px; } .ag-sem-ev.emp2 { margin-top: 56px; } .ag-sem-ev.emp3 { margin-top: 84px; } .ag-sem-ev.emp4 { margin-top: 112px; } .ag-sem-ev.emp5 { margin-top: 140px; }

/* ---- Catálogo e Controle de Estoque (igual ao CRM: ProdutosServicos.tsx e Estoque.tsx) ---- */
.pc { width: 100%; max-width: 1280px; min-width: 0; display: grid; gap: 24px; }
.es { max-width: 1400px; }
.pc .topo { margin: 0; }
.botao.pc-novo { background: var(--marca); border-color: var(--marca); color: var(--marca-texto); font-weight: 700; box-shadow: var(--sombra); }
.botao.pc-novo:hover { background: var(--marca-hover); border-color: var(--marca-hover); color: var(--marca-texto); }
.pc-busca { position: relative; max-width: 384px; }
.pc-busca input { width: 100%; }
.pc-tabela { padding: 0; margin: 0; overflow: hidden; }
.pc-tabela th { font-weight: 600; color: var(--texto); white-space: nowrap; }
.pc-tabela th.c-vermelho, .pc-tabela td.c-vermelho, .c-vermelho { color: #dc2626; }
.pc-tabela th.c-verde, .pc-tabela td.c-verde, .c-verde { color: #16a34a; }
.pc-tabela td { vertical-align: middle; }
.pc-tabela .centro { text-align: center; }
.pc-img { width: 64px; } .pc-acoes { width: 96px; }
.pc-foto { width: 40px; height: 40px; border-radius: 4px; background: #f1f5f9; border: 1px solid var(--borda); display: flex; align-items: center; justify-content: center; overflow: hidden; color: #94a3b8; }
.pc-foto img { width: 100%; height: 100%; object-fit: cover; }
.pc-nome { margin: 0; font-weight: 700; }
.pc-desc { margin: 2px 0 0; font-size: 14px; color: var(--texto-2); }
.pc-desc.mini { font-size: 12px; }
.pc-cod { font-size: 14px; }
.pc-tipo { display: inline-flex; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid #bbf7d0; background: #f0fdf4; color: #15803d; }
.pc-tipo.servico { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.pc-cat { font-size: 14px; font-weight: 500; }
.pc-est { font-weight: 700; color: #334155; }
.pc-compra { font-weight: 500; } .pc-venda { font-weight: 700; }
.pc-botoes { display: flex; gap: 4px; justify-content: flex-end; }
.pc-botoes form { margin: 0; }
.btn-icone-linha.perigo:hover { color: var(--perigo); background: rgba(239, 68, 68, .1); }
.pc-vazio { text-align: center; padding: 48px 16px !important; color: var(--texto-2); }
.pc-vazio .icone { display: block; margin: 0 auto 12px; color: rgba(100, 116, 139, .3); }
.pc-vazio strong { display: block; font-size: 16px; font-weight: 500; color: var(--texto); margin-bottom: 4px; }
.pc-vazio span { font-size: 14px; }
.pc-vazio.pequeno { padding: 16px !important; font-size: 14px; }
.es-baixo { background: rgba(254, 242, 242, .4); }
.es-cod { font-size: 12px; } .es-cod small { display: block; font-size: 10px; color: var(--texto-2); }
.es-local { font-size: 14px; font-weight: 500; color: #334155; }
.es-st { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid; }
.es-st.baixo { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.es-st.normal { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.es-qtd-col { width: 192px; }
.es-qtd { display: flex; align-items: center; justify-content: center; gap: 8px; }
.es-qtd form { margin: 0; }
.es-qtd .icone-so { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; }
.es-qtd input { width: 64px; height: 32px; text-align: center; font-weight: 700; padding: 0 4px; }
.es-janela { max-width: 512px; }
.es-janela h2 { font-size: 20px; font-weight: 700; margin: 0 0 16px; }
.es-prod { display: flex; align-items: center; gap: 12px; padding: 12px; background: #f8fafc; border: 1px solid var(--borda); border-radius: 8px; margin-bottom: 16px; }
.es-prod h3 { margin: 0; font-size: 15px; font-weight: 700; color: #0f172a; }
.es-prod p { margin: 0; font-size: 12px; color: #64748b; }
.es-hist { max-height: 320px; overflow-y: auto; border: 1px solid var(--borda); border-radius: 8px; }
.es-hist table { width: 100%; font-size: 13px; }
.es-tipo { display: inline-flex; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 700; background: #dbeafe; color: #1e40af; }
.es-tipo.entrada { background: #dcfce7; color: #166534; } .es-tipo.saida { background: #fee2e2; color: #991b1b; }
.pc-tabela table { min-width: 1150px; }
.pc-tabela td:nth-child(2) { min-width: 240px; }
.es .pc-tabela table { min-width: 900px; }
.pc-tabela td.num, .pc-tabela td.pc-cod, .pc-tabela td.es-cod { white-space: nowrap; }

/* ---- Gestão de Contratos (igual ao CRM: pages/Contratos.tsx) ---- */
.ct { width: 100%; max-width: 1400px; min-width: 0; display: grid; gap: 24px; }
.ct .topo, .ct .cartao { margin: 0; }
.ct-filtros { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; padding: 16px; }
.ct-busca { flex: 1; min-width: 240px; }
.ct-busca input { height: 36px; width: 100%; }
.ct-filtros .rotulo-filtro { display: block; font-size: 12px; font-weight: 600; color: var(--texto-2); margin-bottom: 4px; }
.ct-toggle { display: inline-flex; gap: 4px; }
.ct-toggle a { height: 36px; padding: 0 16px; display: inline-flex; align-items: center; font-size: 12px; border-radius: var(--raio-p); color: var(--texto); text-decoration: none; }
.ct-toggle a:hover { background: var(--superficie-2); }
.ct-toggle a.ativo { background: var(--superficie-2); font-weight: 600; }
.ct-ordem { width: 224px; } .ct-ordem select { width: 100%; height: 36px; }
.ct-tabela { padding: 0; overflow: hidden; }
.ct-tabela table { min-width: 960px; }
.ct-tabela thead tr { background: rgba(241, 245, 249, .5); }
.ct-tabela th { font-weight: 700; color: var(--texto); text-transform: uppercase; font-size: 12px; letter-spacing: .025em; padding-top: 16px; padding-bottom: 16px; }
.ct-tabela tbody tr:nth-child(even) { background: rgba(241, 245, 249, .35); }
.ct-tabela tbody tr.ct-ativo { background: rgba(16, 185, 129, .03); }
.ct-num { font-weight: 700; color: var(--texto); }
.ct-num:hover { color: var(--marca-link); }
.ct-cli { display: flex; flex-direction: column; font-weight: 500; }
.ct-cli small { font-size: 12px; color: var(--texto-2); font-weight: 400; }
.ct-prog-col { width: 224px; }
.ct-prog { display: grid; gap: 6px; }
.ct-selos { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.ct-st, .ct-fase { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; border-radius: 999px; border: 1px solid; font-weight: 600; font-size: 11px; line-height: 18px; white-space: nowrap; }
.ct-fase { font-size: 10px; }
.ct-st i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ct-st[data-cor=verde] { background: rgba(16, 185, 129, .15); color: #059669; border-color: rgba(16, 185, 129, .3); }
.ct-st[data-cor=ambar] { background: rgba(245, 158, 11, .15); color: #d97706; border-color: rgba(245, 158, 11, .3); }
.ct-st[data-cor=cinza], .ct-fase[data-cor=cinza] { background: rgba(100, 116, 139, .15); color: #64748b; border-color: rgba(100, 116, 139, .3); }
.ct-st[data-cor=vermelho] { background: rgba(239, 68, 68, .15); color: #dc2626; border-color: rgba(239, 68, 68, .3); }
.ct-fase[data-cor=azul] { background: rgba(59, 130, 246, .15); color: #3b82f6; border-color: rgba(59, 130, 246, .3); }
.ct-fase[data-cor=indigo] { background: rgba(99, 102, 241, .15); color: #6366f1; border-color: rgba(99, 102, 241, .3); }
.ct-fase[data-cor=ambar] { background: rgba(245, 158, 11, .15); color: #f59e0b; border-color: rgba(245, 158, 11, .3); }
.ct-fase[data-cor=roxo] { background: rgba(168, 85, 247, .15); color: #a855f7; border-color: rgba(168, 85, 247, .3); }
.ct-fase[data-cor=verde] { background: rgba(16, 185, 129, .15); color: #10b981; border-color: rgba(16, 185, 129, .3); }
.ct-exec { display: flex; justify-content: space-between; font-size: 11px; color: var(--texto-2); font-weight: 500; }
.ct-barra { height: 6px; width: 100%; background: var(--superficie-2); border-radius: 999px; overflow: hidden; }
.ct-barra i { display: block; height: 100%; background: #64748b; transition: width .3s; }
.ct-barra i[data-cor=azul] { background: #3b82f6; } .ct-barra i[data-cor=indigo] { background: #6366f1; } .ct-barra i[data-cor=ambar] { background: #f59e0b; }
.ct-barra i[data-cor=roxo] { background: #a855f7; } .ct-barra i[data-cor=verde] { background: #10b981; }
.ct-valor { font-weight: 600; white-space: nowrap; }
.ct-acoes { white-space: nowrap; }
.ct-acoes > *, .ct-acoes form { display: inline-flex; margin: 0 0 0 4px; vertical-align: middle; }
.btn-icone-linha.azul { color: #2563eb; } .btn-icone-linha.azul:hover { background: #eff6ff; }
.btn-icone-linha.marca { color: var(--marca); }
.btn-icone-linha.vermelho { color: #ef4444; }
.ct-vazio-icone { display: inline-flex; padding: 12px; border-radius: 50%; background: var(--superficie-2); color: var(--texto-2); margin-bottom: 8px; }
.ct-add { margin-top: 12px; }
.ct-janela { max-width: 672px; }
.ct-janela h2 { font-size: 18px; margin: 0 0 16px; }
.ct-barra i.p0 { width: 0%; } .ct-barra i.p1 { width: 1%; } .ct-barra i.p2 { width: 2%; } .ct-barra i.p3 { width: 3%; } .ct-barra i.p4 { width: 4%; } .ct-barra i.p5 { width: 5%; } .ct-barra i.p6 { width: 6%; } .ct-barra i.p7 { width: 7%; } .ct-barra i.p8 { width: 8%; } .ct-barra i.p9 { width: 9%; } .ct-barra i.p10 { width: 10%; } .ct-barra i.p11 { width: 11%; } .ct-barra i.p12 { width: 12%; } .ct-barra i.p13 { width: 13%; } .ct-barra i.p14 { width: 14%; } .ct-barra i.p15 { width: 15%; } .ct-barra i.p16 { width: 16%; } .ct-barra i.p17 { width: 17%; } .ct-barra i.p18 { width: 18%; } .ct-barra i.p19 { width: 19%; } .ct-barra i.p20 { width: 20%; } .ct-barra i.p21 { width: 21%; } .ct-barra i.p22 { width: 22%; } .ct-barra i.p23 { width: 23%; } .ct-barra i.p24 { width: 24%; } .ct-barra i.p25 { width: 25%; } .ct-barra i.p26 { width: 26%; } .ct-barra i.p27 { width: 27%; } .ct-barra i.p28 { width: 28%; } .ct-barra i.p29 { width: 29%; } .ct-barra i.p30 { width: 30%; } .ct-barra i.p31 { width: 31%; } .ct-barra i.p32 { width: 32%; } .ct-barra i.p33 { width: 33%; } .ct-barra i.p34 { width: 34%; } .ct-barra i.p35 { width: 35%; } .ct-barra i.p36 { width: 36%; } .ct-barra i.p37 { width: 37%; } .ct-barra i.p38 { width: 38%; } .ct-barra i.p39 { width: 39%; } .ct-barra i.p40 { width: 40%; } .ct-barra i.p41 { width: 41%; } .ct-barra i.p42 { width: 42%; } .ct-barra i.p43 { width: 43%; } .ct-barra i.p44 { width: 44%; } .ct-barra i.p45 { width: 45%; } .ct-barra i.p46 { width: 46%; } .ct-barra i.p47 { width: 47%; } .ct-barra i.p48 { width: 48%; } .ct-barra i.p49 { width: 49%; } .ct-barra i.p50 { width: 50%; } .ct-barra i.p51 { width: 51%; } .ct-barra i.p52 { width: 52%; } .ct-barra i.p53 { width: 53%; } .ct-barra i.p54 { width: 54%; } .ct-barra i.p55 { width: 55%; } .ct-barra i.p56 { width: 56%; } .ct-barra i.p57 { width: 57%; } .ct-barra i.p58 { width: 58%; } .ct-barra i.p59 { width: 59%; } .ct-barra i.p60 { width: 60%; } .ct-barra i.p61 { width: 61%; } .ct-barra i.p62 { width: 62%; } .ct-barra i.p63 { width: 63%; } .ct-barra i.p64 { width: 64%; } .ct-barra i.p65 { width: 65%; } .ct-barra i.p66 { width: 66%; } .ct-barra i.p67 { width: 67%; } .ct-barra i.p68 { width: 68%; } .ct-barra i.p69 { width: 69%; } .ct-barra i.p70 { width: 70%; } .ct-barra i.p71 { width: 71%; } .ct-barra i.p72 { width: 72%; } .ct-barra i.p73 { width: 73%; } .ct-barra i.p74 { width: 74%; } .ct-barra i.p75 { width: 75%; } .ct-barra i.p76 { width: 76%; } .ct-barra i.p77 { width: 77%; } .ct-barra i.p78 { width: 78%; } .ct-barra i.p79 { width: 79%; } .ct-barra i.p80 { width: 80%; } .ct-barra i.p81 { width: 81%; } .ct-barra i.p82 { width: 82%; } .ct-barra i.p83 { width: 83%; } .ct-barra i.p84 { width: 84%; } .ct-barra i.p85 { width: 85%; } .ct-barra i.p86 { width: 86%; } .ct-barra i.p87 { width: 87%; } .ct-barra i.p88 { width: 88%; } .ct-barra i.p89 { width: 89%; } .ct-barra i.p90 { width: 90%; } .ct-barra i.p91 { width: 91%; } .ct-barra i.p92 { width: 92%; } .ct-barra i.p93 { width: 93%; } .ct-barra i.p94 { width: 94%; } .ct-barra i.p95 { width: 95%; } .ct-barra i.p96 { width: 96%; } .ct-barra i.p97 { width: 97%; } .ct-barra i.p98 { width: 98%; } .ct-barra i.p99 { width: 99%; } .ct-barra i.p100 { width: 100%; }

/* ---- Ordens de Compra (ARP) — pages/Pedidos.tsx ---- */
.pd-tabela table { min-width: 800px; }
.pd-tabela th { text-transform: none; font-size: 14px; font-weight: 500; color: var(--texto-2); letter-spacing: 0; }
.pd-tabela tbody tr:nth-child(even) { background: none; } .pd-tabela tbody tr:hover { background: rgba(241, 245, 249, .3); }
.pd-origem { color: var(--marca-link); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.pd-orgao { display: block; font-size: 12px; color: var(--texto-2); margin-top: 2px; }
.pd-forte { font-weight: 500; } .pd-negrito { font-weight: 700; }
.pd-total { font-weight: 700; color: #059669; white-space: nowrap; }
.pd-st { display: inline-flex; padding: 2px 10px; border-radius: 999px; border: 1px solid; font-size: 12px; font-weight: 600; }
.pd-st[data-cor=ambar] { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.pd-st[data-cor=azul] { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.pd-st[data-cor=verde] { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.pd-st[data-cor=vermelho] { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.pd-st[data-cor=cinza] { background: #f1f5f9; color: #334155; border-color: #e2e8f0; }

/* ---- Configurações com as abas do CRM (pages/Configuracoes.tsx) ---- */
.cf { width: 100%; min-width: 0; }
.cf-abas { display: flex; gap: 24px; overflow-x: auto; background: #fff; border-bottom: 1px solid var(--borda); padding: 12px 4px 0; margin-bottom: 24px; }
.cf-abas a { flex: 0 0 auto; height: 36px; display: inline-flex; align-items: center; padding: 0 4px; border-bottom: 2px solid transparent; color: #475569; font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.cf-abas a:hover { color: #0f172a; }
.cf-abas a.ativa { border-bottom-color: var(--marca); color: #0f172a; font-weight: 600; }
.cf-corpo { max-width: 960px; }
.cf-titulo { font-size: 20px; margin: 0 0 16px; letter-spacing: -.025em; }
.cf-itens { display: grid; gap: 8px; }
.cf-vazio { max-width: 768px; margin: 40px auto 0; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 40px 24px; }
.cf-vazio strong { font-size: 18px; } .cf-vazio span { color: var(--texto-2); }

/* ---- Configurar BDI (components/orcamentos/BdiConfigModal.tsx) ---- */
.or-topo .acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.botao.or-bdi { background: #fff; border-color: #cbd5e1; color: #334155; font-weight: 600; box-shadow: var(--sombra); }
.botao.or-bdi:hover { background: #f8fafc; color: #0f172a; }
.bdi-janela { max-width: 768px; }
.bdi-janela h2 { margin: 0 0 4px; font-weight: 700; }
.bdi-abas { display: grid; grid-template-columns: 1fr 1fr; background: var(--superficie-2); border-radius: var(--raio-p); padding: 4px; margin: 16px 0; }
.bdi-aba { display: flex; } .bdi-aba input { position: absolute; opacity: 0; pointer-events: none; }
.bdi-aba span { flex: 1; text-align: center; padding: 6px; border-radius: var(--raio-s); font-size: 14px; font-weight: 500; color: var(--texto-2); cursor: pointer; }
.bdi-aba input:checked + span { background: #fff; color: var(--texto); box-shadow: var(--sombra); }
.bdi-aba input:focus-visible + span { box-shadow: var(--anel); }
.bdi-painel { display: none; }
.bdi-janela form:has(input[value=servico]:checked) [data-painel=servico], .bdi-janela form:has(input[value=venda]:checked) [data-painel=venda] { display: block; }
.bdi-grade { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bdi-grade input { font-weight: 700; }
.bdi-final { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding: 16px; border-radius: 8px; background: rgba(231, 176, 8, .08); border: 1px solid rgba(231, 176, 8, .3); font-weight: 600; }
.bdi-final strong { font-size: 24px; font-weight: 900; color: var(--marca-link); }
@media (max-width: 640px) { .bdi-grade { grid-template-columns: 1fr 1fr; } }
.cf-geral { max-width: 768px; margin: 0 auto 32px; }
.cf-geral-topo h2 { margin: 0; font-size: 20px; font-weight: 700; } .cf-geral-topo p { margin: 2px 0 16px; font-size: 12px; color: var(--texto-2); }
.cf-geral-campos { display: grid; gap: 12px; padding: 24px; }
.cf-geral-campos input[readonly] { background: #fff; }

/* Ficha do colaborador (Meu perfil e Usuários) */
.perfil-grade { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.perfil-lado { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.perfil-lado .cartao { margin: 0; }
@media (max-width: 1024px) { .perfil-grade { grid-template-columns: minmax(0, 1fr); } }
.ficha-secao { border: 1px solid var(--borda); margin: 0 0 16px; min-width: 0; }
.ficha-secao legend { float: left; width: 100%; padding: 0 0 12px; margin: 0; font-size: 18px; line-height: 1.4; font-weight: 700; letter-spacing: -.025em; color: var(--texto); }
.ficha-secao legend + * { clear: both; }
.ficha-rodape { display: flex; justify-content: flex-end; gap: 8px; margin: 0 0 24px; }
.uf-senha { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.uf-senha > div:first-child { flex: 1 1 320px; } .uf-senha h2 { margin-bottom: 4px; } .uf-senha p { margin: 0; }
.uf-link { display: flex; gap: 8px; align-items: center; flex: 1 1 100%; }
.uf-link code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 12px; padding: 8px; border: 1px solid var(--borda); border-radius: 8px; background: var(--fundo); }
@media (max-width: 640px) { .form-grade { grid-template-columns: minmax(0, 1fr); } }
.perfil-token { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 16px; }
.perfil-token .campo { flex: 1 1 200px; margin: 0; } .perfil-token .campo:nth-child(3) { flex: 0 1 140px; }
#janela-senha .campo { margin-bottom: 12px; }

/* Google: mapas e agenda */
.perfil-google-acoes { display: flex; flex-wrap: wrap; gap: 8px; }
.mapa-cartao .mapa-topo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.mapa-cartao h2 { display: flex; align-items: center; gap: 6px; margin: 0; }
.mapa-acoes { display: flex; flex-wrap: wrap; gap: 8px; }
.mapa-area { height: 380px; border-radius: var(--raio); border: 1px solid var(--borda); background: #e2e8f0; margin-bottom: 8px; }
.mapa-rota { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; }
.mapa-geral { height: 70vh; min-height: 420px; border-radius: var(--raio); border: 1px solid var(--borda); background: #e2e8f0; }
.mapa-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-bottom: 12px; font-size: 13px; }
.mapa-filtros label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.mapa-legenda { display: inline-flex; flex-wrap: wrap; gap: 6px 14px; margin-left: auto; color: var(--texto-2); font-size: 12px; }
.mapa-cor::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; background: #64748b; }
.mapa-cor.mc-1::before { background: #d97706; } .mapa-cor.mc-2::before { background: #2563eb; } .mapa-cor.mc-3::before { background: #059669; }
.mapa-cor.mc-4::before { background: #64748b; } .mapa-cor.mc-lic::before { background: #7c3aed; } .mapa-cor.mc-serv::before { background: #0891b2; }
.mapa-info-titulo { font-weight: 700; } .mapa-info-rota { display: inline-block; margin-top: 4px; font-weight: 600; }
.lista-simples { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 13px; color: var(--texto-2); }
.mapa-distancia { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 12px; }
.mapa-distancia > div { padding: 12px 14px; border: 1px solid var(--borda); border-radius: var(--raio); background: var(--fundo); min-width: 0; }
.mapa-distancia span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--texto-2); }
.mapa-distancia b { display: block; margin-top: 2px; font-size: 20px; font-weight: 800; color: var(--texto); }
.mapa-distancia .mapa-destino { grid-column: span 2; } .mapa-distancia .mapa-destino b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 640px) { .mapa-distancia .mapa-destino { grid-column: auto; } }
.marca-icone.marca-logo { background: #fff; padding: 3px; } .marca-icone.marca-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.alertas-grupo { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.alertas-grupo legend { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-2); margin-bottom: 6px; padding: 0; }
.alertas-grupo label { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
.alertas-grupo input { margin-top: 3px; }
.aparelhos { list-style: none; padding: 0; margin-top: 12px; } .aparelhos li { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.alertas-grupo label, .aparelhos li span { overflow-wrap: anywhere; min-width: 0; }
.alertas-grupo label > span .etiqueta { margin-left: 2px; vertical-align: 1px; }

/* Notificações: alertas com ícone e resumo financeiro em blocos coloridos */
.alerta-icone { font-size: 15px; }
.alerta-titulo { font-weight: 600; }
.alerta-blocos { display: grid; gap: 8px; margin-top: 8px; max-width: 720px; }
.alerta-bloco { display: block; border-left: 4px solid var(--azul-borda); background: var(--azul-fundo); border-radius: 8px; padding: 8px 10px; color: var(--texto); text-decoration: none; }
.alerta-bloco:hover { filter: brightness(.98); }
.alerta-bloco.ruim { border-left-color: var(--ruim); background: var(--ruim-fundo); }
.alerta-bloco.meio { border-left-color: var(--meio); background: var(--meio-fundo); }
.alerta-bloco.ok { border-left-color: var(--ok); background: var(--ok-fundo); }
.alerta-bloco.azul { border-left-color: var(--azul); }
.alerta-bloco-topo { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.alerta-total { font-size: 15px; }
.alerta-bloco.ruim .alerta-total { color: var(--ruim); }
.alerta-bloco.meio .alerta-total { color: var(--meio); }
.alerta-bloco.ok .alerta-total { color: var(--ok); }
.alerta-bloco.azul .alerta-total { color: var(--azul); }
.alerta-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; padding: 4px 0; border-top: 1px solid rgba(0,0,0,.06); }
.alerta-nome { flex: 1 1 180px; min-width: 0; }
.alerta-mais { display: block; font-size: 12px; font-style: italic; padding-top: 4px; }
.alerta-dica { margin-top: 6px; font-size: 12px; color: var(--texto-2, #475569); }
@media (max-width: 640px) {
  .tabela-notif tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px 0; }
  .tabela-notif td { display: block; padding: 0 4px; border: 0; }
  .tabela-notif td:first-child { grid-column: 1; font-size: 12px; }
  .tabela-notif td:last-child { grid-column: 2; grid-row: 1; }
  .tabela-notif td:nth-child(2) { grid-column: 1 / -1; }
  .tabela-notif tr + tr { border-top: 1px solid var(--borda, #e2e8f0); }
}


/* ===== Padrão de telas (fase 5) ===== */
/* menu "…" com ações raras (Excluir) */
.mais-acoes > summary.botao { padding: 0 10px; cursor: pointer; }
.mais-acoes .menu-lista { min-width: 180px; z-index: 30; }
.menu-lista a.item-perigo { display: flex; align-items: center; gap: 8px; color: var(--perigo); }
.menu-lista a.item-perigo:hover { background: #fef2f2; }
.botao.perigo-leve { background: #fff; color: var(--perigo); border-color: #fecaca; }
.botao.perigo-leve:hover { background: #fef2f2; border-color: var(--perigo); }
/* cabeçalho de tabela igual em todas as telas */
.principal table th { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; color: #334155; }
.principal table th.num, .principal table td.num { text-align: right; }
/* impressão: cabeçalho da empresa e rodapé */
.so-impressao { display: none; }
@media print {
  @page { margin: 14mm 12mm 16mm; @bottom-right { content: "Página " counter(page) " de " counter(pages); font-size: 9pt; color: #64748b; } }
  .so-impressao { display: flex; }
  .impressao-topo { align-items: center; gap: 12px; padding-bottom: 10px; margin-bottom: 16px; border-bottom: 2px solid #e7b008; font-size: 10pt; color: #334155; }
  .impressao-topo > div { display: flex; flex-direction: column; flex: 1; }
  .impressao-topo strong { font-size: 13pt; color: #000; }
  .impressao-topo small { align-self: flex-end; font-size: 8.5pt; color: #64748b; }
  .mais-acoes, .botao { display: none !important; }
  .principal table th { background: #f1f5f9 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  tr { break-inside: avoid; }
}
.principal td.quebra { overflow-wrap: anywhere; min-width: 140px; }

/* Financeiro: escolha do alcance em lançamentos recorrentes (editar/excluir) */
.opcoes-serie { display: grid; gap: 10px; margin: 8px 0 12px; }
.opcoes-serie > div { display: grid; gap: 10px; }
.opcao-serie { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 12px; padding: 14px 16px; border: 1px solid var(--borda); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.opcao-serie:hover { border-color: #fcd34d; }
.opcao-serie:has(input:checked) { border-color: #e7b008; background: #fffbeb; box-shadow: 0 0 0 1px #e7b008 inset; }
.opcao-serie input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: #e7b008; }
.opcao-serie-texto { display: flex; flex-direction: column; gap: 2px; }
.opcao-serie-texto strong { font-size: 15px; color: var(--texto); }
.opcao-serie-texto small { font-size: 13px; color: var(--texto-2); line-height: 1.4; }
.opcao-serie-qtd { min-width: 26px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--superficie-2); color: #334155; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
dialog.janela-serie { width: min(560px, calc(100vw - 32px)); }
dialog.janela-serie h2 { display: flex; align-items: center; gap: 8px; color: var(--perigo); }
dialog.janela-serie .rodape { display: flex; justify-content: flex-end; gap: 8px; }
.fin-subabas { display: flex; gap: 4px; margin: -8px 0 20px; border-bottom: 1px solid var(--borda); overflow-x: auto; }
.fin-subabas a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--texto-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.fin-subabas a:hover { color: var(--texto); text-decoration: none; }
.fin-subabas a.ativa { color: #e11d48; border-bottom-color: #e11d48; }
.campo[hidden] { display: none !important; }

/* Receita e Custos: tabela cabe na tela (sem rolagem lateral) e vira cartões no celular */
.tabela-fin td.nowrap .pago-em { white-space: normal; }
.tabela-fin .w-venc { width: 118px; }
.tabela-fin .trunca { max-width: 190px; }
.tabela-fin .origem { max-width: 210px; }
.tabela-fin .trunca-340 { max-width: 240px; }
.tabela-fin .desc-custo { max-width: 260px; }
.tabela-fin th, .tabela-fin td { padding-left: 10px; padding-right: 10px; }
.tabela-fin .st-fin { padding: 3px 8px; font-size: 11px; }
.tabela-fin .w-acoes { width: auto; }
@media (max-width: 1360px) {
  .tabela-fin .refs .os { display: none; }
  .tabela-fin .w-tipo, .tabela-fin .col-tipo { display: none; }
}
@media (max-width: 760px) {
  .tabela-fin { overflow: visible; background: none; border: 0; box-shadow: none; }
  .tabela-fin table, .tabela-fin tbody { display: block; }
  .tabela-fin thead { display: none; }
  .tabela-fin tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; margin-bottom: 10px; background: #fff; border: 1px solid var(--borda); border-radius: 12px; }
  .tabela-fin tbody td { display: block; padding: 0; border: 0; white-space: normal; }
  .tabela-fin tbody td.num { text-align: right; justify-self: end; }
  .tabela-fin tbody td:last-child { grid-column: 1 / -1; border-top: 1px solid var(--borda); padding-top: 8px; }
  .tabela-fin tbody td.vazio { grid-column: 1 / -1; }
  .tabela-fin .trunca, .tabela-fin .origem, .tabela-fin .trunca-340, .tabela-fin .desc-custo { max-width: none; white-space: normal; }
}
.tabela-fin .parc-forma { margin-top: 2px; text-align: right; } .tabela-fin .parc-forma .sub { display: block; font-size: 11px; color: var(--texto-2); white-space: nowrap; }
.tabela-fin .trunca { max-width: 165px; } .tabela-fin .origem { max-width: 200px; }
@media (min-width: 761px) {
  .tabela-fin td:last-child .acoes-linha { flex-wrap: nowrap; }
  .tabela-fin .btn-receber { padding-left: 8px; padding-right: 8px; }
  .tabela-fin .desc-custo, .tabela-fin .trunca-340 { max-width: 200px; }
  .tabela-fin .cat-fin span { display: inline-block; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
}
.tabela-fin .origem { max-width: 180px; } .tabela-fin .trunca { max-width: 150px; }
@media (min-width: 761px) { .tabela-fin .desc-custo, .tabela-fin .trunca-340 { max-width: 170px; } .tabela-fin .cat-fin span { max-width: 90px; } }
@media (min-width: 761px) and (max-width: 1440px) { .tabela-fin .rot-desfazer { display: none; } }

/* Escolher serviço: campo + janela flutuante */
.escolher-servico { display: flex; gap: 6px; align-items: stretch; }
.escolher-servico-botao { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border: 1px solid var(--borda); border-radius: var(--raio-p, 8px); background: #fff; color: var(--texto); font: inherit; text-align: left; cursor: pointer; }
.escolher-servico-botao:hover { border-color: #fcd34d; }
.escolher-servico-botao [data-servico-rotulo] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.escolher-servico-lupa { color: var(--texto-2); font-size: 18px; }
.escolher-servico-limpar { width: 40px; border: 1px solid var(--borda); border-radius: var(--raio-p, 8px); background: #fff; color: var(--texto-2); font-size: 18px; cursor: pointer; }
.escolher-servico-limpar[hidden] { display: none; }
dialog.janela-servicos { width: min(860px, calc(100vw - 24px)); max-height: calc(100vh - 48px); display: none; flex-direction: column; gap: 10px; }
dialog.janela-servicos[open] { display: flex; }
.janela-servicos .js-topo { display: flex; justify-content: space-between; align-items: center; }
.janela-servicos .js-topo h2 { margin: 0; }
.janela-servicos .js-filtros { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.janela-servicos .js-filtros input[type=search] { flex: 1 1 260px; min-height: 40px; padding: 0 12px; border: 1px solid var(--borda); border-radius: 8px; font: inherit; }
.janela-servicos .js-todos { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--texto-2); cursor: pointer; }
.janela-servicos .js-info { margin: 0; font-size: 12px; }
.janela-servicos .js-lista { overflow-y: auto; display: grid; gap: 6px; min-height: 120px; max-height: 60vh; padding-right: 2px; }
.janela-servicos .js-item { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--borda); border-radius: 10px; background: #fff; text-align: left; font: inherit; color: var(--texto); cursor: pointer; }
.janela-servicos .js-item:hover, .janela-servicos .js-item:focus-visible { border-color: #e7b008; background: #fffbeb; }
.janela-servicos .js-item.atual { border-color: #e7b008; box-shadow: 0 0 0 1px #e7b008 inset; }
.janela-servicos .js-item.fechado { opacity: .7; }
.janela-servicos .js-nome { display: flex; flex-direction: column; min-width: 0; }
.janela-servicos .js-nome strong, .janela-servicos .js-nome small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.janela-servicos .js-nome small, .janela-servicos .js-valor small { color: var(--texto-2); font-size: 12px; }
.janela-servicos .js-st { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.janela-servicos .js-valor { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.janela-servicos .rodape { display: flex; justify-content: flex-end; }
@media (max-width: 640px) { .janela-servicos .js-item { grid-template-columns: 1fr auto; } .janela-servicos .js-st { grid-column: 1 / -1; justify-content: flex-start; } }
.parcial-caixa { display: flex; flex-direction: column; gap: 8px; }
.caixa-ajuste.azul { background: #eff6ff; border-color: #bfdbfe; }
.parcial-linha { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.parcial-linha input { width: 18px; height: 18px; margin-top: 2px; accent-color: #2563eb; }
.parcial-linha span { display: flex; flex-direction: column; } .parcial-linha small { color: var(--texto-2); font-size: 12px; }
.parcial-campos { display: flex; flex-direction: column; gap: 4px; } .parcial-campos[hidden] { display: none; }
.parcial-campos label { font-size: 12px; font-weight: 600; } .parcial-campos input { min-height: 38px; }
.parcial-resto { color: #1d4ed8; font-size: 12px; font-weight: 600; }
.resumo-receber [hidden] { display: none !important; }

/* ===== Obras: Tabela/Kanban (Licitacoes.tsx em /obras) ===== */
.alternar-visao { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--borda); border-radius: var(--raio); background: var(--superficie-2); }
.alternar-visao .botao { border-color: transparent; background: transparent; color: var(--texto-2); }
.alternar-visao .botao.ativo { background: #fff; color: var(--texto); box-shadow: var(--sombra); }
dialog.janela.larga { width: min(768px, calc(100vw - 32px)); }
.kanban-obras { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.kanban-coluna { background: var(--superficie-2); border: 1px solid var(--borda); border-top: 3px solid var(--c); border-radius: var(--raio-lg); padding: 12px; min-height: 160px; display: flex; flex-direction: column; gap: 8px; }
.kanban-coluna header { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; margin-bottom: 4px; }
.kanban-coluna header .mudo { grid-column: 1 / -1; font-weight: 700; color: var(--texto); }
.kanban-coluna.alvo { outline: 2px dashed var(--c); outline-offset: 2px; }
.kanban-cartao { background: #fff; border: 1px solid var(--borda); border-left: 4px solid transparent; border-radius: var(--raio); padding: 10px 12px; box-shadow: var(--sombra); }
.kanban-cartao[draggable=true] { cursor: grab; }
.kanban-cartao a { color: var(--texto); }
.kanban-cartao .mudo { font-size: 12px; margin-top: 2px; }
.kanban-cartao .kc-rodape { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-variant-numeric: tabular-nums; font-weight: 600; }
.kanban-cartao.prio-5 { border-left-color: #ef4444; }
.kanban-cartao.prio-4 { border-left-color: #f97316; }
.kanban-cartao.prio-3 { border-left-color: #eab308; }
.kanban-cartao.prio-2 { border-left-color: #3b82f6; }
.kanban-cartao.prio-1 { border-left-color: #94a3b8; }
.historico-obra li { padding: 6px 0; border-bottom: 1px solid var(--borda); list-style: none; }
.historico-obra { padding: 0; margin: 0; }
.barra-obra { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.barra-obra form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.barra-obra label { font-weight: 600; font-size: 13px; }
.barra-obra .acoes { display: flex; flex-wrap: wrap; gap: 6px; }

/* Alerta de Licitações (mesmo padrão visual da lista de Licitações) */
.radar-check { flex-direction: row !important; align-items: center; gap: 8px !important; width: auto !important; font-size: 13px; font-weight: 600; align-self: flex-end; padding-bottom: 8px; }
.radar-secao { display: flex; align-items: center; font-size: 16px; margin: 24px 0 10px; }
.radar-cabecalho-lista { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.radar-cabecalho-lista p { margin: 0; font-size: 13px; }
.tabela-radar { padding: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }  /* rola no celular em vez de cortar colunas */
.tabela-radar + .paginacao { margin-top: 12px; }
.tabela-radar table { table-layout: fixed; min-width: 1000px; }
.tabela-radar th { color: var(--texto); line-height: 1.25; }
.tabela-radar .c-edital { width: 22%; }
.tabela-radar td.c-edital { overflow-wrap: anywhere; }
.tabela-radar .c-objetivo { width: 30%; }
.tabela-radar .c-mod { width: 11%; }
.tabela-radar .c-valor { width: 13%; }
.tabela-radar .c-data { width: 11%; }
.tabela-radar th.c-data { white-space: normal; }
.tabela-radar td.c-data { white-space: nowrap; }
.tabela-radar .c-acao { width: 13%; }
.tabela-radar td.valor { white-space: normal; }  /* valor inteiro ("R$" pode ir para a linha de cima), nunca "R$ 802.000,..." */
.tabela-radar td.c-acao { white-space: nowrap; }
.tabela-radar td.mudo { font-weight: 500; }
.tabela-radar .valor { font-variant-numeric: tabular-nums; }
.tabela-radar td { vertical-align: top; }
.radar-objeto { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 500; color: var(--texto); overflow-wrap: anywhere; }
.radar-marcas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.radar-marcas:empty { display: none; }
.radar-termos { font-size: 11.5px; color: var(--texto-2); }
.tabela-radar tr.urgente td:first-child { box-shadow: inset 4px 0 0 #ef4444; }
.tabela-radar tr.urgente .radar-prazo { color: var(--ruim-texto); font-weight: 700; }
.tabela-radar tr.descartado td { opacity: .55; }
.tabela-radar .c-acao form.inline { display: inline-flex; vertical-align: middle; margin: 0; }
.tabela-radar .c-acao .botao { height: 32px; padding: 0 10px; }
.radar-descartar { width: 32px; height: 32px; color: var(--texto-2); }
.radar-descartar:hover { color: var(--perigo); }
.radar-grade-opcoes { border: 0; padding: 0; margin: 0; }
.radar-grade-opcoes legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.radar-opcoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 12px; }
.radar-opcoes.ufs { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.radar-opcao { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 6px 8px; border: 1px solid var(--borda); border-radius: 8px; cursor: pointer; }
.radar-opcao:has(input:checked) { border-color: var(--marca); background: var(--superficie-2); font-weight: 600; }
.radar-contador { grid-column: 1 / -1; margin: -10px 0 0; font-size: 12px; }
.radar-ajuda { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.radar-erro { font-size: 12px; }

/* Licitação aberta (detalhe) */
.lic-cabecalho { margin-bottom: 20px; }
.lic-voltar { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--texto-2); margin-bottom: 10px; }
.lic-voltar:hover { color: var(--marca-link); text-decoration: none; }
.lic-cabecalho .topo { align-items: flex-start; margin-bottom: 0; }
.lic-titulo { min-width: 0; }
.lic-titulo h1 { margin: 0; overflow-wrap: anywhere; text-wrap: balance; }
.lic-orgao { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; color: var(--texto-2); font-weight: 500; }
.lic-orgao .icone { flex: 0 0 auto; }
.lic-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lic-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 18px;
  background: var(--superficie-2); color: var(--texto-2); border: 1px solid var(--borda); white-space: nowrap; }
.menu-lista button.item-perigo { color: var(--perigo); }
.lic-etapas { list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; margin: 0 0 16px; padding: 14px 16px; counter-reset: etapa; }
.lic-etapas li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12px; font-weight: 600; color: var(--texto-2); min-width: 0; }
.lic-etapas li > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.lic-etapas li::before { content: ""; position: absolute; top: 13px; left: calc(-50% + 16px); right: calc(50% + 16px); height: 2px; background: var(--borda); }
.lic-etapas li:first-child::before { display: none; }
.lic-etapas li.feita::before, .lic-etapas li.atual::before { background: var(--c); }
.lic-bolinha { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--superficie-2);
  border: 2px solid var(--borda); color: var(--texto-2); position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
.lic-etapas li.feita .lic-bolinha { background: var(--c); border-color: var(--c); color: #fff; }
.lic-etapas li.atual .lic-bolinha { background: var(--c-fundo); border-color: var(--c); color: var(--c-texto); box-shadow: 0 0 0 4px var(--c-fundo); }
.lic-etapas li.atual { color: var(--texto); }
.lic-encerrada { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 14px 16px; font-weight: 500; }
.lic-numeros { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.lic-numeros .cartao + .cartao { margin-top: 0; }
.lic-num { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; min-width: 0; }
.lic-num .rotulo { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-2); }
.lic-num strong { font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--texto-titulo); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lic-num strong small { font-size: 14px; font-weight: 600; color: var(--texto-2); }
.lic-num .sub { font-size: 12px; color: var(--texto-2); font-weight: 500; }
.lic-num .vazio-num { font-size: 15px; font-weight: 600; color: var(--texto-2); }
.lic-num.urgente { border-color: var(--ruim-borda); background: var(--ruim-fundo); }
.lic-num.urgente .sub, .lic-num.urgente strong { color: var(--ruim-texto); }
.lic-grade { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 16px; margin-bottom: 24px; align-items: start; }
.lic-grade .cartao + .cartao { margin-top: 0; }
.lic-objeto h2, .lic-dados h2 { margin: 0 0 12px; font-size: 16px; }
.lic-objeto h3 { margin: 18px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-2); }
.lic-objeto p { margin: 0; line-height: 1.6; max-width: 75ch; overflow-wrap: anywhere; }
.lic-destaque { padding: 10px 12px; border-radius: 8px; background: var(--meio-fundo); border: 1px solid var(--meio-borda); }
.lic-dados dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 14px; margin: 0 0 14px; font-size: 13.5px; }
.lic-dados dt { color: var(--texto-2); font-weight: 600; }
.lic-dados dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.lic-conta { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px; font-size: 12px;
  background: var(--superficie-2); color: var(--texto-2); vertical-align: middle; }
.lic-vazio { margin: 0; }
@media (max-width: 900px) {
  .lic-grade { grid-template-columns: minmax(0, 1fr); }
  .lic-numeros { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .lic-etapas { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 14px; }
  .lic-etapas li:nth-child(5)::before { display: none; }
  .lic-numeros { grid-template-columns: minmax(0, 1fr); }
}
.radar-mais { margin: 8px 0 0; font-size: 13px; }

/* Obra: alíquota de imposto na linha do título da planilha (campo curto, % e botão lado a lado) */
.planilha-obra > .topo { align-items: center; margin-bottom: 20px; }
.planilha-obra > .topo h2 { margin: 0; }
.planilha-obra > .topo form.inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; }
.planilha-obra > .topo form.inline input { width: 96px; height: 36px; }

/* Agenda, visão mês: sem o ícone de "sem profissional" e com espaçamento menor, o título do compromisso aparece */
.ag-mes .ag-ev { gap: 4px; padding: 4px 6px; }
.ag-mes .ag-av.vazio { display: none; }

/* Aviso das fases que "Qualquer Fase" esconde (Licitações e Obras) */
.nota-ocultas { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 13px; color: var(--texto-2); }
.nota-ocultas .icone { flex: 0 0 auto; color: var(--texto-2); }
.nota-ocultas a { font-weight: 600; }

/* Tabela que rola para o lado: a borda esmaece onde ainda há colunas (classes postas pelo erp.js) */
.rola.mais-dir { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), rgba(0, 0, 0, .25)); mask-image: linear-gradient(to right, #000 calc(100% - 40px), rgba(0, 0, 0, .25)); }
.rola.mais-esq { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 40px), rgba(0, 0, 0, .25)); mask-image: linear-gradient(to left, #000 calc(100% - 40px), rgba(0, 0, 0, .25)); }
.rola.mais-esq.mais-dir { -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, .25), #000 40px, #000 calc(100% - 40px), rgba(0, 0, 0, .25)); mask-image: linear-gradient(to right, rgba(0, 0, 0, .25), #000 40px, #000 calc(100% - 40px), rgba(0, 0, 0, .25)); }
/* Celular: colunas secundárias das tabelas mais largas saem para caber o essencial */
@media (max-width: 640px) { .col-opcional { display: none; } }
@media print { .rola { -webkit-mask-image: none !important; mask-image: none !important; } }
@media (max-width: 640px) {  /* sem as colunas opcionais, as tabelas largas não precisam da largura mínima do desktop */
  .tabela-licitacoes table { min-width: 620px; }
  .tabela-licitacoes .c-edital { width: 34%; }  /* número do edital não quebra letra por letra */
  .tabela-licitacoes td.c-edital .edital { overflow-wrap: normal; word-break: normal; }
  .pc-tabela table { min-width: 560px; } .es .pc-tabela table { min-width: 560px; }
}

/* Oportunidades dos alertas (análise: aprovar / reprovar) */
.botao.aprovar { background: #16a34a; border-color: #16a34a; color: #fff; }
.botao.aprovar:hover { background: #15803d; border-color: #15803d; color: #fff; text-decoration: none; }
.botao.grande { height: 44px; padding: 0 22px; font-size: 15px; }
.op-jornais { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.op-jornal { display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio);
  box-shadow: var(--sombra); color: var(--texto); }
.op-jornal:hover { text-decoration: none; border-color: var(--borda-forte); box-shadow: var(--sombra-md); }
.op-jornal-nome { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; color: var(--texto-titulo); }
.op-jornal-num { font-size: 15px; } .op-jornal-num strong { font-size: 22px; }
.op-jornal-sub { font-size: 13px; color: var(--texto-desc); }
.op-jornal-filtros { font-size: 12px; color: var(--texto-2); overflow-wrap: anywhere; }
.op-jornal-botao { align-self: flex-start; margin-top: 8px; pointer-events: none; }
.op-urgente, .op-data.urgente strong { color: var(--ruim-texto); }
.op-voltar { margin: 0 0 6px; font-size: 13px; } .op-voltar a { display: inline-flex; align-items: center; gap: 4px; color: var(--texto-2); }
.op-filtros { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.op-filtros .com-icone { flex: 1 1 260px; max-width: 460px; }
.op-filtros select { width: auto; }
.op-total { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--texto-desc); }
.op-lista { display: flex; flex-direction: column; gap: 12px; }
.op-card { padding: 18px 20px; background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio); box-shadow: var(--sombra); }
.op-card.urgente { border-left: 4px solid var(--ruim-texto); }
.op-cabeca { display: flex; align-items: flex-start; gap: 8px; }
.op-titulo { font-size: 16px; font-weight: 700; color: var(--texto-titulo); line-height: 1.35; overflow-wrap: anywhere; }
.op-objeto { margin: 6px 0 8px; font-size: 14px; color: var(--texto-forte); line-height: 1.5; overflow-wrap: anywhere; }
.op-termos { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.op-termos.centro { justify-content: center; }
.op-termo { padding: 2px 10px; border-radius: 999px; border: 1px solid var(--ok-borda); background: var(--ok-fundo); color: var(--ok); font-size: 12px; font-weight: 600; }
.op-rodape { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 14px; }
.op-data { display: inline-flex; align-items: center; gap: 6px; }
.op-valor { font-weight: 600; }
.op-fontes { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.op-fonte { padding: 1px 8px; border-radius: 999px; border: 1px solid var(--borda-forte); font-size: 12px; color: var(--texto-desc); background: var(--superficie); }
.op-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--borda); }
.op-detalhe-topo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 16px; font-size: 14px; }
.op-detalhe-topo > a { display: inline-flex; align-items: center; gap: 4px; color: var(--texto-2); }
.op-nav { display: inline-flex; gap: 8px; margin-left: auto; }
.op-detalhe { box-sizing: border-box; width: 100%; text-align: center; max-width: 900px; margin: 0 auto 20px; }
.op-portal { margin: 0; color: var(--texto-desc); font-size: 15px; }
.op-detalhe-titulo { margin: 6px 0 4px; font-size: 22px; }
.op-orgao { margin: 0 0 12px; font-weight: 700; }
.op-detalhe-objeto { margin: 12px auto; max-width: 760px; font-size: 16px; font-weight: 600; line-height: 1.55; overflow-wrap: anywhere; }
.op-detalhe-valor { margin: 10px 0; }
.op-detalhe-data { margin: 10px 0; font-size: 17px; color: #15803d; }
.op-detalhe-links, .op-detalhe-acoes { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.op-detalhe-acoes { padding-top: 16px; border-top: 1px solid var(--borda); }
.op-dica { margin: 8px 0 0; font-size: 12px; }
.op-detalhe-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; gap: 16px; width: 100%; max-width: 900px; margin: 0 auto 16px; }
.op-detalhe-grade > .cartao { margin: 0; }
.op-detalhe-grade h2, .op-itens h2 { font-size: 16px; margin: 0 0 10px; }
.op-dados { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
.op-dados dt { color: var(--texto-2); } .op-dados dd { margin: 0; overflow-wrap: anywhere; }
.op-texto { font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.op-fontes-lista { margin: 0; padding-left: 18px; font-size: 14px; display: flex; flex-direction: column; gap: 10px; overflow-wrap: anywhere; }
.op-itens { display: block; box-sizing: border-box; width: 100%; max-width: 900px; margin: 0 auto 16px; }
.op-itens summary { cursor: pointer; } .op-itens summary h2 { display: inline; }
.op-itens ol { margin: 12px 0 0; padding-left: 22px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; max-height: 480px; overflow-y: auto; }
@media (max-width: 640px) {
  .op-card { padding: 14px; } .op-detalhe-titulo { font-size: 19px; } .op-nav { margin-left: 0; }
  .botao.grande { flex: 1 1 auto; }
}

/* palavras-chave em amarelo (alertas, análise e pesquisa) */
mark.destaque { background: #fef08a; color: inherit; text-decoration: underline; text-decoration-color: #eab308;
  text-decoration-thickness: 2px; text-underline-offset: 2px; padding: 0 1px; border-radius: 2px; }
.op-item-achado { margin: 4px 0 8px; font-size: 13px; color: var(--texto-desc); }
.op-item-num { font-weight: 600; color: var(--texto-titulo); }
.op-itens-achados { margin: 0 0 14px; padding: 12px 14px; background: #fefce8; border: 1px solid #fde68a; border-radius: 8px; }
.op-itens-achados h3 { margin: 0 0 6px; font-size: 14px; }
.op-itens-achados ul { margin: 0; padding-left: 18px; }
.op-itens-achados li { margin: 4px 0; }

/* Reposição de estoque */
.es-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 800; }
.rp-resumo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.rp-kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; margin: 0; color: inherit; text-decoration: none; border: 1px solid var(--borda); }
a.rp-kpi:hover { text-decoration: none; border-color: #94a3b8; }
.rp-kpi.ativo { box-shadow: 0 0 0 2px var(--marca); }
.rp-kpi span { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--texto-2); }
.rp-kpi strong { font-size: 28px; line-height: 1.2; font-weight: 900; font-variant-numeric: tabular-nums; color: var(--texto-titulo); }
.rp-kpi small { font-size: 12px; color: var(--texto-2); }
.rp-kpi.comprar strong { color: #dc2626; } .rp-kpi.em_breve strong { color: #d97706; } .rp-kpi.ok strong { color: #16a34a; }
.rp-st { display: inline-flex; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid; white-space: nowrap; }
.rp-st.comprar { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.rp-st.em_breve { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.rp-st.ok { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.rp-st.sem_consumo { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
tr.rp-comprar { background: rgba(254, 242, 242, .4); }
.rp-resumo > .cartao { margin: 0; }
.rp-tend { white-space: nowrap; display: flex; align-items: center; justify-content: center; gap: 3px; margin-top: 4px; font-size: 11px; font-weight: 600; }
.rp-tend.sobe { color: #dc2626; } .rp-tend.desce { color: #16a34a; }
.rp-sub { display: block; font-size: 11px; color: var(--texto-2); font-weight: 400; }
.rp-aviso { display: flex; align-items: center; gap: 4px; margin: 4px 0 0; font-size: 11px; color: #92400e; }
.rp-comprar-col { background: rgba(254, 243, 199, .35); }
.rp-sel { width: 36px; }
.rp-rodape { display: flex; justify-content: flex-end; margin: 12px 0; }
.rp-como { margin-top: 16px; padding: 16px 20px; }
.rp-como summary { display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 700; }
.rp-como ol { margin: 12px 0 8px; padding-left: 20px; font-size: 14px; line-height: 1.6; }
@media (max-width: 900px) { .rp-resumo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Licitação: trocar a situação clicando no selo do topo */
.lic-situacao > summary.fase { cursor: pointer; gap: 4px; }
.lic-situacao > summary.fase:hover { filter: brightness(.96); }
.lic-situacao > summary.fase svg { opacity: .7; }
.lic-situacao .menu-lista { z-index: 30; max-height: 360px; overflow-y: auto; }
.lic-situacao .menu-lista button[disabled] { cursor: default; font-weight: 600; background: var(--superficie-2); }
.lic-situacao .menu-lista button svg { margin-left: auto; }
.lic-sit-ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }

/* Licitações: possíveis duplicadas */
.botao.botao-alerta { border-color: #fcd34d; background: #fffbeb; color: #92400e; }
.botao .contador { margin-left: 2px; }
.lic-dup { display: inline-block; white-space: nowrap; margin-left: 4px; padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: #fef3c7; color: #92400e; border: 1px solid #fde68a; text-decoration: none; vertical-align: middle; }
.lic-dup:hover { background: #fde68a; text-decoration: none; }
.lic-aviso-dup { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.lic-aviso-dup-acoes { display: flex; gap: 8px; align-items: center; }
.lic-aviso-dup-acoes form { margin: 0; }
.dup-grupo { margin-bottom: 16px; }
.dup-grupo h2 { margin: 0 0 8px; font-size: 16px; }
.dup-tabela td { vertical-align: top; }
.dup-tabela .dup-fica { width: 44px; text-align: center; }
.dup-tabela .dup-origem { max-width: 220px; }
.dup-tabela form { margin: 0; }
.dup-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dup-tabela td:nth-child(2) { min-width: 160px; }
.dup-tabela td:nth-child(3) { min-width: 140px; }
.dup-tabela td:last-child .botao { white-space: nowrap; }
.dup-tabela .dup-origem { min-width: 150px; }
/* Licitação: relevância 0–5 clicando no selo */
.lic-relevancia > summary.prioridade { cursor: pointer; height: 22px; }
.lic-relevancia > summary.prioridade svg:last-child { opacity: .8; }
.lic-relevancia .lic-rel-n { height: 18px; min-width: 18px; padding: 0 5px; font-size: 11px; }

/* Ficha da obra agrupada como no CRM: cabeçalho, coluna de detalhes e coluna principal com abas */
.obra-cabecalho { margin: 8px 0 16px; }
.obra-cabecalho .topo { align-items: flex-start; margin-bottom: 0; }
.obra-cabecalho h1 { margin: 4px 0 8px; }
.obra-tipo { margin: 0; }
.obra-prioridade { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; padding: 4px 6px; border-radius: 999px; background: var(--superficie-2); }
.obra-prioridade .rotulo { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-2); margin: 0 4px; }
.obra-prioridade button { min-width: 26px; height: 24px; padding: 0 6px; border: 1px solid var(--borda); border-radius: 6px; background: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; color: var(--texto-2); }
.obra-prioridade button:hover { border-color: var(--texto-2); }
.obra-prioridade button.ativa { background: #78716c; border-color: transparent; color: #fff; }
.obra-prioridade button.p1.ativa { background: #475569; } .obra-prioridade button.p2.ativa { background: #2563eb; }
.obra-prioridade button.p3.ativa { background: #f59e0b; color: #451a03; } .obra-prioridade button.p4.ativa { background: #f97316; }
.obra-prioridade button.p5.ativa { background: #e11d48; }
.obra-resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 32px; margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--borda); }
.obra-resumo dt { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-2); }
.obra-resumo dd { margin: 4px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.obra-grade { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.obra-lado, .obra-principal { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.obra-lado > .cartao, .obra-principal > .cartao, .obra-principal > section, .obra-abas [data-painel] > .cartao { margin-top: 0; }
.obra-abas [data-painel] { display: flex; flex-direction: column; gap: 16px; }
.obra-abas [data-painel][hidden] { display: none; }
.obra-abas .abas { margin-bottom: 12px; }
.obra-h2, .lic-dados h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; }
.lic-dados h2 { margin-bottom: 12px; }
.obra-sub { margin: 16px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--texto-2); }
.obra-destaque { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; margin-bottom: 14px; border-radius: 10px; background: var(--superficie-2); border: 1px solid var(--borda); }
.obra-destaque .rotulo { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ok); }
.obra-destaque strong { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--texto-titulo); }
.obra-destaque .sub { font-size: 12px; color: var(--texto-2); }
.obra-obs { margin: 0 0 14px; line-height: 1.6; overflow-wrap: anywhere; }
.obra-progresso { display: inline-block; width: 90px; height: 6px; border-radius: 999px; background: var(--superficie-3); vertical-align: middle; overflow: hidden; }
.obra-progresso i { display: block; height: 100%; background: var(--ok); }
.obra-agenda { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.obra-vazio { margin-top: 12px; padding: 14px; border: 1px dashed var(--borda); border-radius: 10px; text-align: center; }
.obra-cards { margin: 16px 0 0; }
.obra-principal .mapa-cartao, .obra-lado .mapa-cartao { margin-top: 0; }
@media (max-width: 1000px) { .obra-grade { grid-template-columns: minmax(0, 1fr); } }
/* Orçamento SINAPI: pesquisa dentro do orçamento */
.orc-sinapi-pesq { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.orc-sinapi-q-wrap { flex: 1 1 360px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--borda); border-radius: var(--raio-s); padding: 0 10px; background: #fff; }
.orc-sinapi-q-wrap svg { color: var(--texto-2); flex: none; }
.orc-sinapi-q { border: 0 !important; outline: none; box-shadow: none !important; width: 100%; padding: 9px 0; background: transparent; }
.orc-sinapi-res { max-height: 380px; overflow-y: auto; margin-top: 6px; }
.orc-sinapi-res td { vertical-align: top; }
.orc-sinapi-res button { white-space: nowrap; }
.orc-sinapi-pesq > select { flex: 0 0 220px; width: 220px; }
.orc-sinapi-res table { table-layout: fixed; width: 100%; min-width: 640px; }
.orc-sinapi-res th:nth-child(1) { width: 76px; } .orc-sinapi-res th:nth-child(2) { width: 96px; }
.orc-sinapi-res th:nth-child(4) { width: 48px; } .orc-sinapi-res th:nth-child(5) { width: 110px; } .orc-sinapi-res th:nth-child(6) { width: 110px; }
.orc-sinapi-res td:nth-child(3) { white-space: normal; overflow-wrap: anywhere; font-size: 13px; }
.orc-sinapi-res { border: 1px solid var(--borda); border-radius: var(--raio-s); }
.orc-sinapi-tab { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.orc-sinapi-tab th { position: sticky; top: 0; background: var(--superficie-2); text-align: left; padding: 8px; font-size: 12px; z-index: 1; }
.orc-sinapi-tab td { padding: 8px; border-top: 1px solid var(--borda); vertical-align: top; }
.orc-sinapi-tab td:nth-child(3) { white-space: normal; overflow-wrap: anywhere; }
.orc-sinapi-tab .orc-num { text-align: right; white-space: nowrap; }

/* licitação suspensa */
.lic-suspensa { border-left: 4px solid #f97316; background: #fff7ed; display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.lic-suspensa h2 { margin: 0 0 4px; font-size: 1rem; }
.lic-suspensa ul { margin: 6px 0 0; padding-left: 18px; }
.lic-suspensa .mudou { color: #9a3412; font-weight: 600; }
.op-decidida { font-size: .8rem; }
.op-total-linha { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.op-total-linha .op-total { margin-left: auto; }
.op-sel-todas { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--texto-2); cursor: pointer; }
.op-sel { width: 18px; height: 18px; margin-top: 3px; flex: 0 0 auto; cursor: pointer; }
.op-card.selecionada { border-color: var(--marca); box-shadow: 0 0 0 2px color-mix(in srgb, var(--marca) 25%, transparent); }
.op-lista { padding-bottom: 72px; }

/* Assinaturas do Alerta de Licitações */
.entrada .cartao.assinar { max-width: 560px; }
.assinar-planos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 4px 0 8px; }
.assinar-planos div { border: 1px solid var(--borda, #e2e8f0); border-radius: 10px; padding: 10px 12px; }
.assinar-planos strong { display: block; font-size: 18px; }
.assinar-lista { margin: 0 0 6px; padding-left: 18px; color: var(--texto-desc); font-size: 13px; }
.pix-caixa { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; }
.pix-caixa img { width: 220px; height: 220px; image-rendering: pixelated; border-radius: 8px; }
.pix-codigo { word-break: break-all; font-family: ui-monospace, monospace; font-size: 12px; background: var(--superficie-3);
  padding: 10px; border-radius: 8px; }
@media (max-width: 640px) { .pix-caixa, .assinar-planos { grid-template-columns: 1fr; } }

/* Área do assinante: tema próprio do serviço de licitações (verde), diferente do ERP */
.tema-licitacoes {
  --lateral: #052e22; --lateral-realce: #0a4433; --lateral-borda: #0f5640;
  --marca: #16a34a; --marca-hover: #15803d; --marca-texto: #ffffff; --marca-clara: #e8f7ee; --marca-link: #15803d;
}
.tema-licitacoes .marca-texto strong { font-size: 15px; white-space: normal; }
.tema-licitacoes .marca-texto small { letter-spacing: .12em; color: #86efac; }
.as-marca-icone { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: #16a34a; color: #fff; }
.as-empresa { margin: 0 0 10px; font-size: 12px; font-weight: 700; color: var(--lateral-texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.as-bolha { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; background: #f59e0b; color: #111827; font-size: 11px; text-align: center; }
.as-faixa-demo { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 10px; justify-content: center;
  padding: 8px 14px; background: #fef3c7; color: #78350f; font-size: 13px; border-bottom: 1px solid #fcd34d; }
.as-faixa-demo form { margin: 0; }
.as-aviso { display: flex; gap: 8px; align-items: flex-start; }
.as-rodape { margin-top: 32px; padding-top: 14px; border-top: 1px solid var(--borda); }
.as-numeros { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.as-numeros a { display: block; color: inherit; text-decoration: none; }
.as-numeros .cartao { margin: 0; }
.as-numeros strong { display: block; font-size: 28px; line-height: 1.1; margin-top: 4px; }
.as-numeros .urgente strong { color: #b42318; }
.as-passos { counter-reset: passo; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.as-passos li { counter-increment: passo; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
.as-passos li::before { content: counter(passo); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--marca); color: #fff; font-weight: 700; font-size: 13px; }
.as-mensagem { border-left: 3px solid var(--borda); padding: 6px 0 6px 12px; margin: 10px 0; }
.as-mensagem.resposta { border-color: var(--marca); background: var(--marca-clara); padding: 10px 12px; border-radius: 0 8px 8px 0; }
@media (max-width: 900px) { .as-numeros { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tema-licitacoes .cabecalho .pilula span { display: none; } .as-faixa-demo { flex-wrap: wrap; } }

/* Páginas públicas do serviço de licitações (divulgação, assinatura, pagamento) */
.pub { background: #fff; }
.pub-largura { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.pub-estreito { max-width: 760px; }
.pub-centro { text-align: center; }
.pub-topo { position: sticky; top: 0; z-index: 20; background: var(--lateral); color: #fff; }
.pub-topo .pub-largura { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.pub-marca { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.pub-marca strong { display: block; font-size: 16px; } .pub-marca small { display: block; font-size: 11px; color: #86efac; letter-spacing: .08em; text-transform: uppercase; }
.pub-nav { display: flex; align-items: center; gap: 14px; }
.pub-nav > a:not(.botao) { color: rgba(255,255,255,.85); font-size: 14px; font-weight: 600; }
.pub-heroi { background: linear-gradient(160deg, #052e22 0%, #0a4433 55%, #14532d 100%); color: #fff; padding: 64px 0; }
.pub-heroi-grade { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.pub-heroi h1 { font-size: 40px; line-height: 1.12; margin: 10px 0 16px; color: #fff; }
.pub-lead { font-size: 18px; line-height: 1.55; color: rgba(255,255,255,.88); }
.pub-heroi .mudo { color: rgba(255,255,255,.7); }
.pub-selo { display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(134,239,172,.18); color: #bbf7d0; font-size: 12px; font-weight: 700; }
.pub-acoes { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 10px; }
.pub-cartao-exemplo { background: #fff; color: var(--texto); border-radius: 16px; padding: 20px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.pub-linha { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--borda); font-weight: 600; }
.pub-faixa { background: var(--marca-clara); padding: 14px 0; font-size: 14px; }
.pub-fontes { text-align: center; line-height: 1.8; }
.pub-secao { padding: 56px 0; } .pub-secao h2 { font-size: 28px; margin: 0 0 24px; text-align: center; }
.pub-cinza { background: var(--superficie-3); }
.pub-grade-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pub-grade-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 32px; }
.pub-grade-3 h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; color: var(--marca-link); }
.pub-num { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--marca); color: #fff; font-weight: 800; }
.pub-planos { display: grid; grid-template-columns: repeat(2, minmax(0, 320px)); gap: 20px; justify-content: center; }
.pub-plano { text-align: center; padding: 28px; position: relative; } .pub-plano ul { list-style: none; padding: 0; color: var(--texto-desc); line-height: 1.9; }
.pub-plano.destaque { border: 2px solid var(--marca); } .pub-plano.destaque .pub-selo { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--marca); color: #fff; }
.pub-preco { font-size: 34px; font-weight: 800; margin: 6px 0; } .pub-preco small { font-size: 15px; font-weight: 600; color: var(--texto-2); }
.pub-chamada { background: var(--lateral); color: #fff; } .pub-chamada h2 { color: #fff; }
.pub details.cartao { margin-bottom: 10px; } .pub details summary { cursor: pointer; font-weight: 700; }
.pub-rodape { background: #0b1f18; color: rgba(255,255,255,.75); padding: 24px 0; font-size: 13px; } .pub-rodape a { color: #86efac; }
.pub-escolha { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pub-opcao { display: flex; gap: 12px; align-items: flex-start; border: 2px solid var(--borda); border-radius: 12px; padding: 14px 16px; cursor: pointer; }
.pub-opcao:has(input:checked) { border-color: var(--marca); background: var(--marca-clara); }
.pub-opcao input { margin-top: 4px; } .pub-opcao strong, .pub-opcao small { display: block; } .pub-opcao small { color: var(--texto-2); }
.pub-preco-mini { display: block; font-size: 22px; font-weight: 800; }
.pub-cupom { display: flex; gap: 8px; max-width: 420px; } .pub-cupom input { flex: 1 1 auto; text-transform: uppercase; }
.pub-total { display: grid; grid-template-columns: max-content auto; gap: 6px 24px; margin: 12px 0 0; } .pub-total dd { margin: 0; text-align: right; }
.ok-texto { color: #047857; } .erro-texto { color: var(--ruim-texto); }
.pub .cartao h2 { text-align: left; font-size: 18px; margin-bottom: 14px; }
@media (max-width: 900px) { .pub-heroi-grade, .pub-grade-4, .pub-grade-3 { grid-template-columns: 1fr; } .pub-heroi h1 { font-size: 30px; } .pub-nav > a:not(.botao) { display: none; } }
@media (max-width: 600px) { .pub-planos, .pub-escolha { grid-template-columns: 1fr; } }
.pub-topo .botao:not(.primario), .pub-heroi .botao:not(.primario), .pub-chamada .botao:not(.primario) {
  background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.pub-topo .botao:not(.primario):hover, .pub-heroi .botao:not(.primario):hover { background: rgba(255,255,255,.12); color: #fff; }
.pub-heroi .pub-cartao-exemplo .mudo { color: var(--texto-2); }
.pub-escolha-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pub-escolha + h3, .pub-usuarios + h3 { margin: 18px 0 10px; font-size: 15px; }
.pub-usuarios { display: flex; align-items: center; gap: 10px; margin-top: 12px; } .pub-usuarios input { width: 110px; }
.pub-usuarios[hidden] { display: none; }
.pub-planos-3 { grid-template-columns: repeat(3, minmax(0, 320px)); }
.pub-plano .pub-anual { color: var(--texto-2); font-size: 14px; margin-top: 0; }
@media (max-width: 900px) { .pub-escolha-3, .pub-planos-3 { grid-template-columns: 1fr; } }
.grade > .cartao + .cartao { margin-top: 0; }
.grade + .cartao, .grade + form.cartao { margin-top: 24px; }
.links-portal h3 { font-size: 15px; margin: 0 0 8px; }
.links-portal li { margin-bottom: 12px; line-height: 1.45; word-break: break-word; }
.link-botao { background: none; border: 0; padding: 0; color: var(--marca-link); cursor: pointer; font: inherit; text-align: left; }
.link-botao:hover { text-decoration: underline; }
@media (max-width: 1000px) { .links-portal { grid-template-columns: 1fr; } }
.pub-texto-legal h2 { text-align: left; font-size: 20px; margin: 28px 0 8px; }
.pub-texto-legal p, .pub-texto-legal li { line-height: 1.65; }
.pub-texto-legal .cartao { margin: 18px 0; }
.entrada-rodape { text-align: center; margin-top: 14px; }
.entrada { align-content: center; gap: 0; }
.memoria-json { white-space: pre-wrap; word-break: break-word; font-size: 12px; max-height: 520px; overflow: auto; background: #f8fafc; padding: 12px; border-radius: 8px; }
.or-numero { font-size: 14px; font-weight: 600; color: #0f172a; font-variant-numeric: tabular-nums; }
.orc-just { width: 100%; margin-top: 4px; font-size: 12px; }
.or-aceite { border: 1px solid var(--borda, #e2e8f0); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; }
.or-aceite legend { font-weight: 600; padding: 0 4px; }
.or-opcao-form { display: flex; flex-direction: column; gap: 6px; }
.orc-condicoes { margin: 12px 0; }
.orc-condicoes > summary { cursor: pointer; font-weight: 600; }
.orc-memoria { display: block; width: 100%; margin-top: 4px; font-size: 11px; padding: 2px 4px; }
.orc-add-grupo { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* Pasta da licitação no Google Drive (ficha) */
.lic-drive .topo { align-items: center; gap: 12px; flex-wrap: wrap; }
.lic-drive h2 { display: flex; align-items: center; gap: 8px; }
.lic-drive .acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lic-drive .acoes form { margin: 0; }
.lic-drive-vincular { padding: 12px; min-width: 320px; }
.lic-drive-vincular form { display: grid; gap: 8px; }
.form-drive .campo { margin-bottom: 8px; }
.form-drive .campo input { width: 100%; }
.form-drive .acoes { display: flex; gap: 6px; flex-wrap: wrap; }

.quebra-tudo { overflow-wrap: anywhere; word-break: break-all; }

/* Alerta pelo ramo da empresa (CNPJ / contrato social) e licitações desertas */
.ramo-atividade { border-top: 1px solid var(--borda); padding: 12px 0; }
.ramo-titulo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 8px; }
.ramo-todos { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.desertas-itens { margin: 6px 0 0; padding-left: 18px; font-size: 13px; }
.desertas-itens li { margin: 2px 0; }

/* Comparar e unir licitações duplicadas */
.cmp-tabela th[scope="row"] { white-space: nowrap; width: 1%; vertical-align: top; }
.cmp-tabela td { vertical-align: top; min-width: 180px; }
.cmp-tabela thead th { vertical-align: top; }
.cmp-diferente { background: var(--fundo-destaque, #fffbeb); }
.cmp-opcao { display: flex; gap: 6px; align-items: flex-start; cursor: pointer; }
.cmp-opcao input { margin-top: 3px; }
.cmp-continua { display: flex; gap: 6px; align-items: center; margin-top: 6px; font-weight: 600; cursor: pointer; }
.cmp-pares { margin: 0; padding-left: 18px; }
.cmp-pares li { margin: 6px 0; }
.dup-acoes form { display: inline; }

/* Alerta: fonte de licitações parada (termômetro das fontes) */
.radar-aviso-fonte { margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--ruim-borda); border-left: 4px solid var(--ruim);
  border-radius: var(--raio-p); background: var(--ruim-fundo); color: var(--ruim); }
.radar-aviso-fonte strong { display: inline-flex; align-items: center; gap: 6px; }
.radar-aviso-fonte p { margin: 6px 0 0; color: inherit; }
.radar-aviso-fonte a { display: inline-block; margin-top: 6px; font-weight: 600; }

/* Pesquisa: avisos do PNCP quebram linha (não estouram a largura da tela) */
.radar-avisos .etiqueta { white-space: normal; line-height: 1.35; padding-top: 3px; padding-bottom: 3px; }

/* Licitações: painel de resultados */
.res-cartoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 16px; }
.res-cartao { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.res-rotulo { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--texto-2); }
.res-num { font-size: 26px; letter-spacing: -.02em; }
.res-barra-col { width: 30%; min-width: 120px; }
.res-barra { display: block; height: 10px; border-radius: 999px; background: #16a34a; min-width: 2px; }
.res-w0 { width: 0; min-width: 0; }
.res-w1 { width: 1%; }
.res-w2 { width: 2%; }
.res-w3 { width: 3%; }
.res-w4 { width: 4%; }
.res-w5 { width: 5%; }
.res-w6 { width: 6%; }
.res-w7 { width: 7%; }
.res-w8 { width: 8%; }
.res-w9 { width: 9%; }
.res-w10 { width: 10%; }
.res-w11 { width: 11%; }
.res-w12 { width: 12%; }
.res-w13 { width: 13%; }
.res-w14 { width: 14%; }
.res-w15 { width: 15%; }
.res-w16 { width: 16%; }
.res-w17 { width: 17%; }
.res-w18 { width: 18%; }
.res-w19 { width: 19%; }
.res-w20 { width: 20%; }
.res-w21 { width: 21%; }
.res-w22 { width: 22%; }
.res-w23 { width: 23%; }
.res-w24 { width: 24%; }
.res-w25 { width: 25%; }
.res-w26 { width: 26%; }
.res-w27 { width: 27%; }
.res-w28 { width: 28%; }
.res-w29 { width: 29%; }
.res-w30 { width: 30%; }
.res-w31 { width: 31%; }
.res-w32 { width: 32%; }
.res-w33 { width: 33%; }
.res-w34 { width: 34%; }
.res-w35 { width: 35%; }
.res-w36 { width: 36%; }
.res-w37 { width: 37%; }
.res-w38 { width: 38%; }
.res-w39 { width: 39%; }
.res-w40 { width: 40%; }
.res-w41 { width: 41%; }
.res-w42 { width: 42%; }
.res-w43 { width: 43%; }
.res-w44 { width: 44%; }
.res-w45 { width: 45%; }
.res-w46 { width: 46%; }
.res-w47 { width: 47%; }
.res-w48 { width: 48%; }
.res-w49 { width: 49%; }
.res-w50 { width: 50%; }
.res-w51 { width: 51%; }
.res-w52 { width: 52%; }
.res-w53 { width: 53%; }
.res-w54 { width: 54%; }
.res-w55 { width: 55%; }
.res-w56 { width: 56%; }
.res-w57 { width: 57%; }
.res-w58 { width: 58%; }
.res-w59 { width: 59%; }
.res-w60 { width: 60%; }
.res-w61 { width: 61%; }
.res-w62 { width: 62%; }
.res-w63 { width: 63%; }
.res-w64 { width: 64%; }
.res-w65 { width: 65%; }
.res-w66 { width: 66%; }
.res-w67 { width: 67%; }
.res-w68 { width: 68%; }
.res-w69 { width: 69%; }
.res-w70 { width: 70%; }
.res-w71 { width: 71%; }
.res-w72 { width: 72%; }
.res-w73 { width: 73%; }
.res-w74 { width: 74%; }
.res-w75 { width: 75%; }
.res-w76 { width: 76%; }
.res-w77 { width: 77%; }
.res-w78 { width: 78%; }
.res-w79 { width: 79%; }
.res-w80 { width: 80%; }
.res-w81 { width: 81%; }
.res-w82 { width: 82%; }
.res-w83 { width: 83%; }
.res-w84 { width: 84%; }
.res-w85 { width: 85%; }
.res-w86 { width: 86%; }
.res-w87 { width: 87%; }
.res-w88 { width: 88%; }
.res-w89 { width: 89%; }
.res-w90 { width: 90%; }
.res-w91 { width: 91%; }
.res-w92 { width: 92%; }
.res-w93 { width: 93%; }
.res-w94 { width: 94%; }
.res-w95 { width: 95%; }
.res-w96 { width: 96%; }
.res-w97 { width: 97%; }
.res-w98 { width: 98%; }
.res-w99 { width: 99%; }
.res-w100 { width: 100%; }
.res-cartoes > .cartao { margin: 0 !important; }
.recibos-busca { display: flex; gap: 8px; align-items: center; }
.recibos-busca input { min-width: 280px; }

/* ---- Busca de cliente enquanto digita (static/js/busca-cliente.js) ---- */
.busca-select { position: relative; width: 100%; }
.busca-select-campo { padding-right: 32px !important; text-overflow: ellipsis; background-repeat: no-repeat; background-position: right 10px center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); }
.busca-select-campo:disabled { background-color: #f8fafc; color: var(--texto-2); cursor: not-allowed; }
.busca-select.invalido .busca-select-campo { border-color: #dc2626; }
select.busca-select-nativo { position: absolute !important; left: 0; bottom: 0; width: 100% !important; height: 1px !important; min-width: 0 !important;
  padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; }
.busca-select-lista { position: fixed; z-index: 1000; margin: 0; padding: 4px; list-style: none; overflow-y: auto; background: #fff;
  border: 1px solid #cbd5e1; border-radius: 8px; box-shadow: 0 10px 24px rgba(15,23,42,.16); }
.busca-select-lista li { padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; color: var(--texto); line-height: 1.3; }
.busca-select-lista li.vazio { color: var(--texto-2); font-style: italic; }
.busca-select-lista li.selecionado { font-weight: 600; }
.busca-select-lista li:hover, .busca-select-lista li.ativo { background: #fef3c7; }
.busca-select-lista li.nada { cursor: default; color: var(--texto-2); font-size: 12px; background: none; }

/* Ambiente de teste (testeerp.construtechrs.com) */
.faixa-teste{position:sticky;top:0;z-index:9999;background:#c0392b;color:#fff;text-align:center;font-weight:700;
  font-size:13px;letter-spacing:.04em;padding:4px 8px}

/* Telas de Compras/Vendas/Relatórios (dez/2026): sem estilo inline (a CSP bloqueia style="") */
.linha-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.linha-form.mt, .mt { margin-top: 12px; }
.linha-form.mv { margin: 12px 0; }
.mt-p { margin-top: 8px; }
.grupo-botoes { display: flex; gap: 8px; flex-wrap: wrap; }
.aviso-linha { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.check-linha { display: flex; gap: 6px; align-items: center; font-weight: normal; }
.lista-checks { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.sem-borda { border: 0; padding: 0; margin: 12px 0 0; }
.entre { display: flex; justify-content: space-between; }
.largura-total { width: 100%; }
.min-320 { min-width: 320px; }
.flutua-direita { float: right; }
input.num-campo { width: 120px; max-width: 120px; text-align: right; }
input.num-campo.p { width: 80px; max-width: 80px; }
.grafico-barras { display: block; width: 100%; height: 140px; }
.grafico-barras rect { fill: var(--borda, #e5e7eb); }
.grafico-barras rect.com-valor { fill: var(--primaria, #e0a800); }
.barra-meta { display: block; width: 100%; height: 6px; margin-top: 6px; }
.barra-meta .fundo { fill: var(--borda, #e5e7eb); }
.barra-meta .feito { fill: var(--primaria, #e0a800); }
.mono.quebra { word-break: break-all; font-size: 13px; background: #f8fafc; padding: 8px; border-radius: 6px; }
/* Frente de caixa (PDV) */
.pdv { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 24px; align-items: start; margin-bottom: 24px; }
.pdv > .cartao + .cartao { margin-top: 0; }
.pdv-busca { display: flex; gap: 8px; }
.pdv-busca input[type=search] { flex: 1; font-size: 18px; padding: 12px; }
.pdv-busca .num-campo { width: 80px; }
.pdv-sugestoes { list-style: none; margin: 8px 0; padding: 0; border: 1px solid var(--borda); border-radius: 8px; max-height: 280px; overflow: auto; }
.pdv-sugestoes button { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; background: none; cursor: pointer; }
.pdv-sugestoes button:hover, .pdv-sugestoes button:focus { background: var(--fundo); }
.pdv-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.pdv-total strong { font-size: 32px; font-variant-numeric: tabular-nums; }
.pdv-formas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.pdv-forma { border: 1px solid var(--borda); border-radius: 8px; padding: 10px; cursor: pointer; }
.pdv-finalizar { width: 100%; font-size: 18px; padding: 14px; }
.pdv-abrir { max-width: 420px; }
.cupom-pdv { max-width: 420px; }
@media (max-width: 900px) { .pdv { grid-template-columns: 1fr; } }
.bloco-form + .bloco-form, .mudo + .bloco-form { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--borda); }
/* Clínica (TetraERP): normas e CID-10 */
.aviso.info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.aviso .icone { vertical-align: -3px; }
.normas { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.norma { border: 1px solid var(--borda); border-radius: var(--raio); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.norma h3 { margin: 0; font-size: 15px; }
.norma p { margin: 0; line-height: 1.55; color: var(--texto-desc); }
.norma .norma-erp { display: flex; gap: 6px; color: #166534; }
.norma .norma-erp .icone { flex: none; margin-top: 2px; }
.norma a { font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.cid-categoria td { background: var(--superficie-3); font-weight: 600; }
td.centro, th.centro { text-align: center; }
label.crescer { flex: 1 1 280px; }
.pdv-pix{display:flex;gap:1rem;align-items:center;flex-wrap:wrap;margin:.6rem 0;padding:.7rem;border:1px dashed var(--borda,#ccc);border-radius:10px}.pdv-pix img{width:180px;height:180px;image-rendering:pixelated}.pdv-pix p{margin:.2rem 0}

/* TetraERP: função do ramo ainda em construção (vitrine e Configurações > Ramo e plano) */
.tetra-breve { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #fef3c7; color: #92400e; text-decoration: none; vertical-align: middle; }
/* PDV: fiado e balança */
.pdv-dica { margin: 6px 0 0; font-size: 13px; }
.pdv-fiado { margin: 10px 0; padding: 10px; border: 1px dashed var(--borda); border-radius: 10px; }
.pdv-fiado p { margin: 6px 0 0; }
.pdv-fiado-numeros .cartao { display: flex; flex-direction: column; gap: 4px; }
.pdv-fiado-numeros strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.texto-ruim { color: #b91c1c; }
.pdv-pix[hidden], .pdv-fiado[hidden] { display: none; }
/* TetraERP: agenda online, mesas e cozinha */
.agendar-largura { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.agendar-topo { background: #0b1f3a; color: #fff; padding: 14px 0; margin-bottom: 18px; }
.agendar-topo .agendar-largura { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 18px; }
.agendar h1 { font-size: 26px; margin: 8px 0; }
.agendar .cartao { margin-bottom: 14px; }
.agendar-opcoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.agendar-opcao { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--borda); border-radius: 10px; color: inherit; text-decoration: none; }
.agendar-opcao.escolhida, .agendar-dia.escolhida, .agendar-hora.escolhida { border-color: #2563eb; background: #eff6ff; }
.agendar-dias { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.agendar-dia { display: flex; flex-direction: column; align-items: center; min-width: 58px; padding: 8px; border: 1px solid var(--borda); border-radius: 10px; color: inherit; text-decoration: none; }
.agendar-horas { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.agendar-hora { text-align: center; padding: 10px 0; border: 1px solid var(--borda); border-radius: 10px; color: inherit; text-decoration: none; font-weight: 700; }
.agendar-robo { position: absolute; left: -10000px; }
.agendar-rodape { margin: 24px auto; color: var(--texto-desc); }
.agenda-colunas { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.agenda-colunas > .cartao + .cartao { margin-top: 0; }
.agenda-reserva { border-left: 4px solid #3b82f6; padding: 8px 10px; margin: 8px 0; background: var(--fundo); border-radius: 6px; display: flex; flex-direction: column; gap: 4px; }
.agenda-reserva.st-confirmada { border-left-color: #16a34a; } .agenda-reserva.st-atendida { border-left-color: #64748b; opacity: .8; }
.agenda-reserva.st-cancelada, .agenda-reserva.st-faltou { border-left-color: #dc2626; opacity: .6; }
.salao-mesas { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.salao-mesa button { width: 100%; min-height: 100px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 2px solid #16a34a; background: #f0fdf4; border-radius: 14px; cursor: pointer; font: inherit; }
.salao-mesa.ocupada button { border-color: #ea580c; background: #fff7ed; }
.cozinha-itens { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cozinha-itens > .cartao + .cartao { margin-top: 0; }
.cozinha-item { display: flex; justify-content: space-between; gap: 10px; border-left: 6px solid #dc2626; }
.cozinha-item.st-preparo { border-left-color: #f59e0b; } .cozinha-item.st-pronto { border-left-color: #16a34a; }
.cozinha-obs { margin: 4px 0; font-weight: 700; color: #b91c1c; }
tr.riscado td { text-decoration: line-through; color: #94a3b8; }
.odonto-linha { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 4px; margin: 6px 0; }
details .odonto-linha { grid-template-columns: repeat(10, minmax(0, 1fr)); max-width: 640px; margin-left: auto; margin-right: auto; }
.odonto-dente { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 54px; border: 1px solid var(--borda); border-radius: 10px 10px 14px 14px; color: inherit; text-decoration: none; font-size: 12px; background: #fff; }
.odonto-dente small { font-size: 9px; color: var(--texto-desc); }
.odonto-dente.existente, .odonto-dente.realizado { background: #dcfce7; border-color: #16a34a; }
.odonto-dente.planejado { background: #ffedd5; border-color: #ea580c; }
@media (max-width: 700px) { .odonto-linha { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
