/* NAUAS RH — identidade: azul-marinho Nauas, neutros frios, sem emojis */
:root {
  --marinho: #1f3864; --marinho-2: #2a4a80; --azul: #2f6fd6; --azul-claro: #e8f0fc;
  --fundo: #f3f5f9; --cartao: #ffffff; --borda: #dfe4ec; --borda-forte: #c9d1de;
  --texto: #1d2533; --texto-2: #566176; --texto-3: #8a94a6;
  --verde: #18864b; --verde-claro: #e3f4ea; --vermelho: #c43a3a; --vermelho-claro: #fbe9e9;
  --ambar: #b7791f; --ambar-claro: #fdf3dc; --info: #e9f2fb; --info-borda: #b9d3ee;
  --raio: 10px; --sombra: 0 1px 2px rgba(16, 30, 60, .06), 0 2px 8px rgba(16, 30, 60, .04);
  --lateral: 248px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14.5px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--texto); background: var(--fundo); }
a { color: var(--azul); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; font-weight: 600; margin: 0; }
h2 { font-size: 17px; font-weight: 600; margin: 0 0 12px; }
h3 { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.mudo { color: var(--texto-2); } .fraco { color: var(--texto-3); font-size: 13px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.oculto { display: none !important; }
svg.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- topo */
.topo { position: fixed; inset: 0 0 auto 0; height: 56px; background: var(--marinho); color: #fff; display: flex; align-items: center; gap: 6px; padding: 0 12px; z-index: 30; }
.topo .marca { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .5px; font-size: 16px; color: #fff; margin-right: 8px; white-space: nowrap; }
.topo .marca span.rh { background: #fff; color: var(--marinho); border-radius: 6px; padding: 1px 7px; font-size: 13px; }
.topo .espaco { flex: 1; }
.btn-topo { background: transparent; border: 0; color: #fff; height: 40px; min-width: 40px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; position: relative; padding: 0 8px; font: inherit; }
.btn-topo:hover { background: rgba(255, 255, 255, .12); }
.btn-topo .bolha { position: absolute; top: 4px; right: 3px; background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #d6deeb; color: var(--marinho); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.avatar.g { width: 76px; height: 76px; font-size: 26px; }

/* ---------- barra de contexto (entidade / perfil) */
.contexto { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; padding: 10px 0 12px; border-bottom: 1px solid var(--borda); margin-bottom: 16px; }
.seletor { background: none; border: 0; font: inherit; color: var(--texto-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 4px 2px; }
.seletor b { color: var(--texto); font-weight: 600; }
.seletor:hover b { color: var(--azul); }

/* ---------- lateral */
.lateral { position: fixed; top: 56px; bottom: 0; left: 0; width: var(--lateral); background: #fff; border-right: 1px solid var(--borda); overflow-y: auto; z-index: 20; transition: width .15s; display: flex; flex-direction: column; }
.lateral nav { padding: 10px 0; flex: 1; }
.lateral .grupo { font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--texto-3); padding: 14px 20px 6px; }
.lateral a { display: flex; align-items: center; gap: 14px; padding: 11px 20px; color: var(--texto); border-left: 3px solid transparent; white-space: nowrap; }
.lateral a:hover { background: var(--fundo); text-decoration: none; }
.lateral a.ativo { background: var(--azul-claro); color: var(--marinho); border-left-color: var(--marinho); font-weight: 600; }
.lateral .rodape { padding: 12px 20px; font-size: 12px; color: var(--texto-3); border-top: 1px solid var(--borda); white-space: nowrap; }
body.recolhido { --lateral: 64px; }
body.recolhido .lateral .grupo, body.recolhido .lateral a span, body.recolhido .lateral .rodape { display: none; }
body.recolhido .lateral a { justify-content: center; padding: 13px 0; }
.principal { margin: 56px 0 0 var(--lateral); padding: 4px 28px 40px; min-height: calc(100vh - 56px); transition: margin .15s; }
.fundo-lateral { display: none; }

/* ---------- títulos e trilha */
.titulo { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.trilha { font-size: 13px; color: var(--texto-3); }
.trilha b { color: var(--texto-2); font-weight: 500; }

/* ---------- cartões e grades */
.cartao { background: var(--cartao); border: 1px solid var(--borda); border-radius: var(--raio); padding: 20px; box-shadow: var(--sombra); }
.cartao + .cartao { margin-top: 16px; }
.grade { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.destaque { border-left: 4px solid var(--marinho); }
.kpi .rot { color: var(--texto-2); font-size: 13px; }
.kpi .val { font-size: 26px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .sub { color: var(--texto-3); font-size: 12.5px; margin-top: 2px; }
.valores { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.valores .v { font-size: clamp(20px, 2.1vw, 30px); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.valores .bruto { color: var(--texto-3); } .valores .desc { color: var(--vermelho); } .valores .liq { color: var(--verde); }
.borrado { filter: blur(9px); user-select: none; }

/* ---------- cabeçalho do servidor */
.cab { display: grid; grid-template-columns: auto minmax(220px, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 16px 22px; align-items: center; background: #eef1f6; border-radius: var(--raio); padding: 18px 22px; margin-bottom: 18px; }
.cab .nome { font-size: 18px; font-weight: 600; }
.cab .campo .r { font-size: 12.5px; color: var(--texto-2); }
.cab .campo .v { font-weight: 500; }
.linha-acoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }

/* ---------- botões e etiquetas */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--borda-forte); background: #fff; color: var(--texto); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--fundo); text-decoration: none; }
.btn.p { background: var(--marinho); border-color: var(--marinho); color: #fff; }
.btn.p:hover { background: var(--marinho-2); }
.btn.ok { background: var(--verde); border-color: var(--verde); color: #fff; }
.btn.perigo { color: var(--vermelho); border-color: #e6b8b8; }
.btn.perigo:hover { background: var(--vermelho-claro); }
.btn.peq { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.icone { width: 34px; padding: 0; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.etq { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12.5px; font-weight: 600; background: var(--fundo); color: var(--texto-2); white-space: nowrap; }
.etq.verde { background: var(--verde-claro); color: var(--verde); } .etq.vermelho { background: var(--vermelho-claro); color: var(--vermelho); }
.etq.ambar { background: var(--ambar-claro); color: var(--ambar); } .etq.azul { background: var(--azul-claro); color: var(--marinho); }
.chip { background: #e2e7ef; border-radius: 6px; padding: 1px 8px; font-variant-numeric: tabular-nums; }

/* ---------- avisos */
.aviso { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--raio); background: var(--info); border: 1px solid var(--info-borda); margin-bottom: 16px; }
.aviso.ambar { background: var(--ambar-claro); border-color: #efd9a4; }
.aviso.vermelho { background: var(--vermelho-claro); border-color: #efc4c4; }
.vazio { text-align: center; padding: 50px 20px; color: var(--texto-2); }
.vazio svg { width: 96px; height: 96px; stroke: #9bb5dc; stroke-width: 1.2; margin-bottom: 12px; }
.vazio p { font-size: 16px; margin: 0; }

/* ---------- tabelas */
.tabela-wrap { overflow-x: auto; border: 1px solid var(--borda); border-radius: var(--raio); background: #fff; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--borda); text-align: left; vertical-align: middle; }
th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .3px; color: var(--texto-2); font-weight: 600; background: #f8f9fc; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tr.clicavel { cursor: pointer; } tr.clicavel:hover td { background: #f6f8fc; }
tfoot td { font-weight: 600; background: #f8f9fc; border-top: 1px solid var(--borda-forte); }
td.ref { text-decoration: underline dotted var(--texto-3); }
.tabela-meses th, .tabela-meses td { white-space: nowrap; }
.tabela-meses .fixa { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 220px; }
.tabela-meses th.fixa { background: #f8f9fc; }
.tabela-meses .tot { position: sticky; right: 0; background: #f8f9fc; font-weight: 600; }

/* ---------- linha do tempo de meses */
.ano-sel { display: inline-flex; align-items: center; gap: 10px; font-size: 22px; color: var(--azul); }
.ano-sel button { background: none; border: 0; font-size: 18px; cursor: pointer; color: var(--texto-2); padding: 4px 8px; border-radius: 6px; }
.ano-sel button:hover { background: var(--fundo); }
.meses { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; margin: 6px 0 20px; }
.linha-meses { display: grid; grid-template-columns: repeat(12, 1fr); position: relative; }
.linha-meses::before { content: ""; position: absolute; top: 9px; left: 4%; right: 4%; height: 2px; background: var(--borda); }
.mes { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; color: var(--texto-3); font: inherit; font-size: 13px; position: relative; padding: 0; }
.mes i { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--borda-forte); }
.mes.tem { color: var(--texto); } .mes.tem i { border-color: var(--azul); }
.mes.sel { color: var(--azul); font-weight: 700; } .mes.sel i { background: var(--azul); border-color: var(--azul); box-shadow: 0 0 0 4px var(--azul-claro); }
.mes:disabled { cursor: default; }

/* ---------- abas e filtros */
.abas { display: flex; gap: 2px; border-bottom: 1px solid var(--borda); margin-bottom: 18px; overflow-x: auto; }
.abas button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 16px; font: inherit; font-weight: 600; color: var(--texto-2); cursor: pointer; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.abas button.sel { color: var(--marinho); border-bottom-color: var(--marinho); }
.filtro { display: flex; align-items: stretch; background: #eef1f6; border-radius: 8px; overflow: hidden; margin-bottom: 12px; flex-wrap: wrap; }
.filtro .r { font-weight: 700; font-size: 12.5px; padding: 9px 14px; color: var(--texto-2); letter-spacing: .3px; display: flex; align-items: center; }
.filtro button { background: none; border: 0; padding: 9px 14px; font: inherit; color: var(--texto-2); cursor: pointer; }
.filtro button.sel { background: #d9dfe9; color: var(--texto); }
.barra { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.barra .cresce { flex: 1; min-width: 200px; }

/* ---------- formulários */
label.campo { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--texto-2); font-weight: 500; }
input, select, textarea { font: inherit; color: var(--texto); border: 1px solid var(--borda-forte); border-radius: 8px; padding: 8px 10px; background: #fff; min-height: 38px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid #b9cff3; border-color: var(--azul); }
input[type=checkbox] { width: 18px; min-height: 18px; height: 18px; }
label.marcar { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--texto); cursor: pointer; }
textarea { min-height: 90px; resize: vertical; }
.form { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.form .c2 { grid-column: span 2; } .form .c3 { grid-column: span 3; } .form .c4 { grid-column: span 4; } .form .c5 { grid-column: span 5; }
.form .c6 { grid-column: span 6; } .form .c8 { grid-column: span 8; } .form .c12 { grid-column: span 12; }
.form .sep { grid-column: span 12; font-weight: 600; color: var(--marinho); border-bottom: 1px solid var(--borda); padding-bottom: 6px; margin-top: 6px; }
.dados { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 22px; }
.dados .r { font-size: 13px; color: var(--texto-2); font-weight: 600; }
.dados .v { margin-top: 3px; }
.pend { color: var(--ambar); font-size: 12.5px; display: inline-flex; gap: 4px; align-items: center; margin-left: 4px; }

/* ---------- menus suspensos, modal, aviso rápido */
.menu-susp { position: fixed; background: #fff; border: 1px solid var(--borda); border-radius: 10px; box-shadow: 0 10px 30px rgba(16, 30, 60, .18); z-index: 60; min-width: 220px; max-height: 80vh; overflow: auto; color: var(--texto); }
.menu-susp .tit { padding: 10px 16px 6px; font-weight: 700; font-size: 13px; color: var(--texto-2); }
.menu-susp button.item { display: flex; width: 100%; gap: 12px; align-items: center; padding: 11px 16px; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; color: var(--texto); }
.menu-susp button.item:hover { background: var(--fundo); }
.menu-susp button.item.sel { color: var(--azul); font-weight: 600; }
.notif { width: min(420px, 94vw); }
.notif .lista { padding: 4px 0; }
.notif .n { padding: 12px 16px; border-bottom: 1px solid var(--borda); cursor: pointer; }
.notif .n:hover { background: var(--fundo); }
.notif .n.nova { border-left: 3px solid var(--azul); }
.notif .n b { display: block; }
.vela { position: fixed; inset: 0; background: rgba(15, 25, 45, .45); z-index: 70; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 12px; width: min(720px, 100%); max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.modal.largo { width: min(1080px, 100%); }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--borda); }
.modal header h2 { margin: 0; }
.modal .corpo { padding: 20px; overflow: auto; }
.modal footer { padding: 14px 20px; border-top: 1px solid var(--borda); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--texto); color: #fff; padding: 11px 18px; border-radius: 8px; z-index: 90; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); max-width: 92vw; }
.toast.erro { background: var(--vermelho); }

/* ---------- mural */
.mural-item { border: 1px solid var(--borda); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; }
.mural-item.novo { border-left: 4px solid var(--azul); }
.mural-item .t { font-weight: 600; display: flex; justify-content: space-between; gap: 10px; }
.mural-item .txt { margin-top: 6px; color: var(--texto-2); white-space: pre-wrap; }

/* ---------- gráfico de barras simples */
.barras { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding-top: 10px; }
.barras .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.barras .b i { width: 100%; max-width: 38px; background: var(--marinho); border-radius: 4px 4px 0 0; min-height: 2px; }
.barras .b:last-child i { background: var(--azul); }
.barras .b span { font-size: 11.5px; color: var(--texto-3); }

/* ---------- login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .lado { background: var(--marinho); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.login .lado h1 { font-size: 34px; line-height: 1.2; margin: 24px 0 14px; }
.login .lado p { color: #c9d4e8; max-width: 440px; font-size: 15.5px; }
.login .lado ul { color: #dfe7f5; padding-left: 18px; line-height: 1.9; }
.login .caixa { display: grid; place-items: center; padding: 32px 20px; }
.login form { width: min(380px, 100%); display: grid; gap: 16px; }

/* ---------- recibo / documento */
.doc { background: #fff; }
.doc-cab { display: none; }
.bases { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--borda); border-radius: 8px; overflow: hidden; margin-top: 14px; }
.bases div { padding: 10px 12px; border-right: 1px solid var(--borda); }
.bases div:last-child { border-right: 0; }
.bases .r { font-size: 12px; text-transform: uppercase; color: var(--texto-2); font-weight: 600; }
.quadro { border: 1px solid var(--borda-forte); border-radius: 8px; margin-bottom: 14px; overflow: hidden; }
.quadro > .t { background: #eef1f6; padding: 8px 12px; font-weight: 700; font-size: 13px; }
.quadro table td { padding: 8px 12px; }

/* ---------- folha impressa */
table.compacta th, table.compacta td { padding: 4px 6px; font-size: 12.5px; }
.recibo-impr { border: 1px solid var(--borda); border-radius: 6px; padding: 10px 12px; margin: 10px 0; break-inside: avoid; page-break-inside: avoid; }
.corte { border-top: 1px dashed #999; margin: 16px 0; }
@media print {
  .quebra-pagina { break-after: page; page-break-after: always; }
  .folha-impressa .doc-cab { display: flex; }
  .recibo-impr { border-color: #999; }
}

/* ---------- celular e tablet */
@media (max-width: 1100px) {
  .cab { grid-template-columns: auto 1fr 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .lateral { transform: translateX(-100%); transition: transform .2s; width: 270px; }
  body.menu-aberto .lateral { transform: none; }
  body.menu-aberto .fundo-lateral { display: block; position: fixed; inset: 56px 0 0 0; background: rgba(0, 0, 0, .35); z-index: 15; }
  body.recolhido .lateral .grupo, body.recolhido .lateral a span, body.recolhido .lateral .rodape { display: revert; }
  body.recolhido .lateral a { justify-content: flex-start; padding: 11px 20px; }
  .principal { margin-left: 0; padding: 4px 16px 32px; }
  .g2, .g3, .g4, .g-1-2, .valores, .dados { grid-template-columns: minmax(0, 1fr); }
  .valores .v { font-size: 24px; }
  .cab { grid-template-columns: auto 1fr; padding: 14px; }
  .cab .campo { grid-column: span 1; }
  .form { grid-template-columns: repeat(6, 1fr); }
  .form .c2, .form .c3 { grid-column: span 3; } .form .c4, .form .c5, .form .c6, .form .c8 { grid-column: span 6; }
  .meses { grid-template-columns: 1fr; }
  .linha-meses { grid-template-columns: repeat(6, 1fr); row-gap: 14px; }
  .linha-meses::before { display: none; }
  .bases { grid-template-columns: 1fr 1fr; }
  .login { grid-template-columns: 1fr; }
  .login .lado { padding: 28px 22px; }
  .login .lado h1 { font-size: 24px; }
  .login .lado ul, .login .lado .rod { display: none; }
  .topo .marca .txt { display: none; }
  .esconde-cel { display: none !important; }
}

/* ---------- impressão / PDF */
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; font-size: 11.5px; }
  .topo, .lateral, .contexto, .nao-imprime, .abas, .ano-sel, .meses, .aviso, .toast, .fundo-lateral { display: none !important; }
  .principal { margin: 0; padding: 0; }
  .cartao { box-shadow: none; border: 0; padding: 0; }
  .cab { background: #fff; border: 1px solid #999; padding: 10px; grid-template-columns: 1fr 1fr 1fr; }
  .cab .avatar { display: none; }
  .doc-cab { display: flex; justify-content: space-between; border-bottom: 2px solid #1f3864; padding-bottom: 8px; margin-bottom: 10px; }
  th, td { padding: 5px 7px; }
  .tabela-wrap { overflow: visible; border-color: #999; }
  .tabela-meses .fixa, .tabela-meses .tot { position: static; }
  table { page-break-inside: auto; } tr { page-break-inside: avoid; }
}

/* ---------- boleto */
.bol-folha { position: relative; background: #fff; color: #000; max-width: 820px; margin: 0 auto 30px; padding: 24px 26px; border: 1px solid var(--borda); border-radius: 8px; font-family: Arial, Helvetica, sans-serif; overflow: hidden; }
.bol-marca { position: absolute; top: 46%; left: 50%; transform: translate(-50%, -50%) rotate(-24deg); font-size: 64px; font-weight: 800; color: rgba(200, 30, 30, .13); white-space: nowrap; pointer-events: none; letter-spacing: 2px; }
.bol-pix { display: flex; gap: 18px; align-items: center; border: 1px solid #c9d3e3; border-radius: 8px; padding: 14px 16px; margin-bottom: 22px; background: #f6f9fd; }
.bol-pix h3 { margin: 0 0 4px; font-size: 16px; } .bol-pix p { margin: 0 0 8px; font-size: 13px; }
.bol-qr { width: 150px; height: 150px; flex: none; }
.bol-copia { font-family: Consolas, monospace; font-size: 11px; word-break: break-all; background: #fff; border: 1px dashed #9aa8bf; border-radius: 6px; padding: 6px 8px; margin-bottom: 6px; max-height: 64px; overflow: auto; }
.bol-peq { font-size: 12px; color: #333; }
.bol-topo { display: flex; flex-wrap: wrap; row-gap: 4px; align-items: flex-end; border-bottom: 2px solid #000; padding-bottom: 4px; gap: 12px; }
.bol-banco { display: flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; font-weight: 800; font-size: 19px; padding-right: 12px; border-right: 2px solid #000; }
.bol-banco span { font-size: 18px; padding-left: 10px; border-left: 2px solid #000; margin-left: 4px; }
.bol-banco .ic { width: 22px; height: 22px; }
.bol-tit { margin-left: auto; font-weight: 700; font-size: 13px; }
.bol-linha { margin-left: auto; font-family: Consolas, "Courier New", monospace; font-weight: 700; font-size: clamp(10px, 1.9vw, 15.5px); white-space: nowrap; max-width: 100%; overflow-wrap: anywhere; letter-spacing: .3px; text-align: right; }
.bol-g { display: grid; grid-template-columns: repeat(12, 1fr); border-left: 1px solid #000; }
.bol-c { border-right: 1px solid #000; border-bottom: 1px solid #000; padding: 2px 5px 3px; min-height: 30px; min-width: 0; }
.bol-c span { display: block; font-size: 9px; color: #333; } .bol-c b { display: block; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.bol-c.dir b { text-align: right; } .bol-c.forte b { font-size: 14px; font-weight: 800; }
.bol-g .s1 { grid-column: span 1; } .bol-g .s2 { grid-column: span 2; } .bol-g .s3 { grid-column: span 3; } .bol-g .s6 { grid-column: span 6; } .bol-g .s9 { grid-column: span 9; } .bol-g .s12 { grid-column: span 12; }
.bol-pilha { display: flex; flex-direction: column; } .bol-pilha .bol-c { flex: 1; }
.bol-instr div { font-size: 11.5px; line-height: 1.45; }
.bol-aut { text-align: right; font-size: 9px; margin-top: 4px; }
.bol-corte { border-top: 1px dashed #000; margin: 18px 0 16px; text-align: right; font-size: 9px; padding-top: 2px; }
.bol-rodape { margin-top: 8px; }
.bol-barras { display: block; width: 103mm; max-width: 100%; height: 13mm; }
@media (max-width: 640px) {
  .bol-folha { padding: 14px 10px; } .bol-pix { flex-direction: column; text-align: center; } .bol-linha { font-size: 11px; }
  .bol-banco { font-size: 15px; } .bol-marca { font-size: 34px; }
  .bol-g .s1, .bol-g .s2 { grid-column: span 4; } .bol-g .s3 { grid-column: span 6; } .bol-g .s6, .bol-g .s9 { grid-column: span 12; }
}
@media print {
  .bol-folha { border: 0; padding: 0; max-width: none; margin: 0; }
  .bol-pix { background: #fff; }
}

/* ---------- agenda (linha do tempo) */
.agenda { display: flex; flex-direction: column; }
.ag-dia { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--borda); }
.ag-dia:first-child { border-top: 0; }
.ag-dia.passou .ag-data { opacity: .6; }
.ag-data { text-align: center; } .ag-data b { display: block; font-size: 22px; line-height: 1; color: var(--marinho); } .ag-data span { font-size: 12px; color: var(--texto-3); }
.ag-dia.hoje .ag-data b { background: var(--azul); color: #fff; border-radius: 8px; padding: 4px 0; }
.ag-itens { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ag-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; }
.ag-item:hover { background: var(--fundo); }
.ag-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #eef1f6; color: var(--texto-2); flex: none; }
.ag-ic.azul { background: #e3edfb; color: var(--azul); } .ag-ic.verde { background: #e2f4ea; color: var(--verde); } .ag-ic.ambar { background: #fdf1dc; color: #b26b00; } .ag-ic.vermelho { background: #fbe4e4; color: var(--vermelho); }
.ag-ic .ic { width: 16px; height: 16px; }
.ag-txt { flex: 1; min-width: 0; } .ag-txt b { display: block; font-weight: 600; } .ag-txt span { display: block; font-size: 12.5px; color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-dir { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
@media (max-width: 640px) {
  .meses { grid-template-columns: 1fr; gap: 10px; } .linha-meses { overflow-x: auto; grid-template-columns: repeat(12, minmax(34px, 1fr)); padding-bottom: 4px; }
  .ag-dia { grid-template-columns: 40px 1fr; gap: 8px; } .ag-item { flex-wrap: wrap; } .ag-dir { width: 100%; padding-left: 40px; }
}
@media (max-width: 860px) { .ag-kpis { grid-template-columns: 1fr 1fr !important; gap: 10px; } .ag-kpis .kpi .val { font-size: 19px; } .ag-kpis .cartao { padding: 12px 14px; margin: 0; } }

/* boleto colorido: Nauas Tech + Sicoob */
.bol-folha { --sc-escuro: #003641; --sc-turquesa: #00ae9d; --sc-verde: #7db61c; --sc-claro: #c9d200; }
.bol-cab { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 18px; margin: -24px -26px 20px; padding: 16px 26px; color: #fff;
  background: linear-gradient(110deg, var(--marinho, #1f3864) 0%, var(--sc-escuro) 55%, var(--sc-turquesa) 100%); border-bottom: 4px solid var(--sc-verde); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.bol-emp { display: flex; align-items: center; gap: 12px; } .bol-emp img { background: #fff; border-radius: 10px; padding: 4px; }
.bol-emp b { display: block; font-size: 18px; letter-spacing: .5px; } .bol-emp span { font-size: 12px; opacity: .85; letter-spacing: 2px; text-transform: uppercase; }
.bol-cab-dir { text-align: right; } .bol-cab-dir span { display: block; font-size: 11px; opacity: .85; } .bol-cab-dir b { display: block; font-size: 22px; }
.bol-cab-banco { background: #fff; border-radius: 10px; padding: 6px 12px; display: flex; align-items: center; min-height: 40px; }
.bol-cab-banco img { height: 30px; max-width: 130px; object-fit: contain; }
.bol-nome-banco { font-family: Arial Black, Arial, sans-serif; font-weight: 900; font-size: 21px; letter-spacing: -.5px; color: var(--sc-escuro); text-transform: lowercase; }
.bol-nome-banco::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--sc-verde); margin-left: 2px; }
.bol-logo-banco { height: 24px; max-width: 110px; object-fit: contain; }
.bol-banco { color: var(--sc-escuro); border-right-color: var(--sc-escuro); } .bol-banco span { border-left-color: var(--sc-escuro); }
.bol-topo { border-bottom-color: var(--sc-escuro); }
.bol-tit { color: var(--sc-escuro); }
.bol-g { border-left-color: var(--sc-escuro); } .bol-c { border-color: var(--sc-escuro); }
.bol-c span { color: var(--sc-escuro); font-weight: 600; }
.bol-c.forte { background: #eefaf8; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.bol-linha { color: var(--sc-escuro); }
.bol-pix { background: linear-gradient(135deg, #f1fbf9, #f7fbe9); border-color: var(--sc-turquesa); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.bol-pix h3 { color: var(--sc-escuro); display: flex; align-items: center; gap: 8px; }
.bol-pix-sel { background: var(--sc-turquesa); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 5px; letter-spacing: 1px; }
.bol-qr { width: 170px; height: 170px; border-radius: 10px; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--sc-turquesa); }
.bol-copia { border-color: var(--sc-turquesa); }
@media (max-width: 640px) { .bol-cab { grid-template-columns: 1fr auto; margin: -14px -10px 14px; padding: 12px; } .bol-cab-banco { grid-column: 1 / -1; justify-self: start; } .bol-cab-dir b { font-size: 18px; } }
@media print { .bol-cab { margin: 0 0 16px; } }
.bol-emp img { height: 52px; width: auto; background: #fff; border-radius: 10px; padding: 5px 10px; }
@media (max-width: 640px) { .bol-emp img { height: 40px; } }
.ag-kpis > .cartao { margin: 0 !important; }

/* ---------- atendimentos e SLA */
.sla-datas { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; } .sla-datas input { width: auto; }
.sla-custo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px; } .sla-custo > span:first-child { font-weight: 600; } .sla-custo input { width: 110px; }
.sla-lista { display: flex; flex-direction: column; gap: 8px; }
.sla-item { display: grid; grid-template-columns: 36px minmax(0, 2fr) 70px 70px minmax(0, 2fr); gap: 12px; align-items: center; padding: 12px 14px; margin: 0; color: inherit; text-decoration: none; }
.sla-item:hover { box-shadow: 0 0 0 2px var(--azul-claro); }
.sla-pos { font-weight: 800; color: var(--marinho); font-size: 16px; }
.sla-cli b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sla-cli span { font-size: 12.5px; color: var(--texto-2); }
.sla-num { text-align: center; } .sla-num b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; } .sla-num span { font-size: 11.5px; color: var(--texto-3); }
.sla-consumo span { font-size: 12.5px; color: var(--texto-2); display: block; margin-top: 4px; }
.sla-barra { height: 10px; background: #eef1f6; border-radius: 5px; overflow: hidden; } .sla-barra i { display: block; height: 100%; border-radius: 5px; }
.sla-barra i.verde { background: var(--verde); } .sla-barra i.ambar { background: #e0a100; } .sla-barra i.vermelho { background: var(--vermelho); }
.t-verde { color: var(--verde); } .t-ambar { color: #b26b00; } .t-vermelho { color: var(--vermelho); }
@media (max-width: 760px) {
  .sla-datas { margin-left: 0; width: 100%; } .sla-datas input { flex: 1; min-width: 0; }
  .sla-item { grid-template-columns: 30px minmax(0, 1fr) 58px 58px; row-gap: 8px; }
  .sla-consumo { grid-column: 2 / -1; }
}

/* boleto v2: cabeçalho limpo da Nauas Tech; o Sicoob aparece só no recibo e na ficha, como no boleto bancário */
.bol-folha .bol-cab { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: -24px -26px 0; padding: 18px 26px 16px; background: #fff; color: #0f1a3a;
  border-bottom: 0; border-top: 6px solid transparent; border-image: linear-gradient(90deg, #1f3864, #2f6fd6 45%, #33c8e8) 1; grid-template-columns: none; }
.bol-logo { height: 58px; width: auto; display: block; }
.bol-cab-info { text-align: right; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: #4a5672; }
.bol-cab-info span:first-child { font-size: 15px; font-weight: 700; color: #0f1a3a; }
.bol-resumo { display: grid; grid-template-columns: 1.4fr 1fr 1fr; margin: 0 -26px 20px; background: #f4f7fc; border-top: 1px solid #e1e7f2; border-bottom: 1px solid #e1e7f2; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.bol-resumo > div { padding: 12px 26px; border-left: 1px solid #e1e7f2; } .bol-resumo > div:first-child { border-left: 0; }
.bol-resumo span { display: block; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; color: #6a7590; }
.bol-resumo b { display: block; font-size: 22px; color: #1f3864; font-variant-numeric: tabular-nums; } .bol-resumo small { font-size: 11.5px; color: #6a7590; }
.bol-sit.em_aberto { color: #2f6fd6; } .bol-sit.liquidado { color: #1e8a4c; } .bol-sit.baixado { color: #6a7590; }
.bol-folha .bol-pix { background: #fff; border: 1px solid #dbe3f0; border-left: 5px solid #33c8e8; }
.bol-folha .bol-pix h3 { color: #1f3864; }
.bol-folha .bol-qr { box-shadow: none; border: 1px solid #e1e7f2; border-radius: 8px; }
.bol-folha .bol-copia { border-color: #c5d2e6; background: #f8fafd; }
@media (max-width: 640px) {
  .bol-folha .bol-cab { margin: -14px -10px 0; padding: 14px 12px; flex-direction: column; align-items: flex-start; } .bol-cab-info { text-align: left; } .bol-logo { height: 46px; }
  .bol-resumo { grid-template-columns: 1fr 1fr; margin: 0 -10px 14px; } .bol-resumo > div { padding: 10px 12px; } .bol-resumo > div:first-child { grid-column: 1 / -1; border-bottom: 1px solid #e1e7f2; }
}
@media print { .bol-folha .bol-cab { margin: 0; padding: 0 0 12px; } .bol-resumo { margin: 0 0 16px; } }
@media (max-width: 640px) { .bol-resumo b { font-size: 18px; } }
.sla-lista > .sla-item { margin: 0 !important; } .sla-item, .sla-item:hover, .sla-item * { text-decoration: none !important; }
.bol-logo-banco { height: 26px; max-width: 120px; }

/* ---------- fatura de contrato mensal (modelo Nauas Tech) */
.fat { position: relative; background: #fff; color: #1c2433; max-width: 860px; margin: 0 auto 30px; padding: 30px 34px; border: 1px solid var(--borda); border-radius: 8px; font-family: Arial, Helvetica, sans-serif; overflow: hidden; font-size: 13px;
  --fat-escuro: #0f2a3f; --fat-azul: #1590c8; --fat-cinza: #eef2f7; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.fat-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 14px; border-bottom: 3px solid var(--fat-escuro); margin-bottom: 18px; }
.fat-logo { height: 62px; width: auto; }
.fat-tit { text-align: right; } .fat-tit h2 { margin: 0; font-size: 21px; line-height: 1.25; color: var(--fat-escuro); letter-spacing: .3px; }
.fat-tit span { display: block; margin-top: 6px; color: var(--fat-azul); font-weight: 700; font-size: 13px; }
.fat-partes { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #cfd8e3; margin-bottom: 18px; }
.fat-partes > div { padding: 0 12px 10px; line-height: 1.55; } .fat-partes > div + div { border-left: 1px solid #cfd8e3; }
.fat-partes h3 { margin: 0 -12px 8px; padding: 9px 12px; background: var(--fat-cinza); font-size: 12.5px; letter-spacing: .4px; color: #1c2433; border-bottom: 1px solid #cfd8e3; }
.fat-itens { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.fat-itens th { background: var(--fat-escuro); color: #fff; text-align: left; padding: 9px 10px; font-size: 12.5px; }
.fat-itens td { border: 1px solid #cfd8e3; padding: 9px 10px; vertical-align: top; } .fat-itens .num { text-align: right; white-space: nowrap; }
.fat-itens tfoot td { background: var(--fat-cinza); font-weight: 800; text-align: right; font-size: 13.5px; }
.fat-pix { display: grid; grid-template-columns: 170px 1fr; border: 2px solid var(--fat-escuro); margin-bottom: 6px; }
.fat-qr { display: grid; place-items: center; padding: 12px; border-right: 1px solid #cfd8e3; }
.fat-qr .bol-qr { width: 140px; height: 140px; border: 0; }
.fat-qr-vazio { width: 130px; height: 130px; display: grid; place-items: center; text-align: center; border: 2px dashed #b7c3d3; color: #6a7590; font-size: 12px; border-radius: 8px; }
.fat-pix > div:last-child { padding: 12px 14px; } .fat-pix h3 { margin: 0 0 6px; font-size: 14px; color: var(--fat-escuro); } .fat-pix p { margin: 0 0 8px; color: #44506a; }
.fat-pix .bol-copia { border: 1px dashed var(--fat-azul); background: #fff; }
.fat-peq { font-size: 12px; border-top: 1px solid #e2e8f0; padding-top: 6px; }
.fat-pend { color: #8a95ab; font-weight: 400; font-style: italic; font-size: 12px; }
.fat-barras-vazio { width: 103mm; max-width: 100%; height: 13mm; border: 2px dashed #b7c3d3; display: grid; place-items: center; color: #8a95ab; font-size: 12px; }
.fat .bol-corte { text-align: right; color: #6a7590; margin: 18px 0 14px; }
.fat .bol-banco, .fat .bol-topo, .fat .bol-g, .fat .bol-c { border-color: var(--fat-escuro); } .fat .bol-c span { color: #44506a; text-transform: uppercase; font-size: 8.5px; letter-spacing: .3px; }
.fat .bol-c.forte { background: var(--fat-cinza); } .fat .bol-linha { color: var(--fat-escuro); }
.fat-end { font-weight: 400; }
.fat-recibo { border: 2px solid #1e8a4c; border-radius: 8px; padding: 14px 16px; background: #f1faf4; }
.fat-recibo h3 { margin: 0 0 10px; color: #1e8a4c; display: flex; align-items: center; gap: 8px; font-size: 15px; }
.fat-rec-g { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; } .fat-rec-g span { display: block; font-size: 11px; color: #44506a; text-transform: uppercase; } .fat-rec-g b { font-size: 15px; }
.fat-recibo p { margin: 10px 0 0; color: #44506a; }
.fat-pago { position: absolute; top: 120px; right: 40px; transform: rotate(-12deg); border: 4px solid #1e8a4c; color: #1e8a4c; font-weight: 900; font-size: 40px; padding: 2px 18px; border-radius: 10px; text-align: center; line-height: 1; opacity: .85; }
.fat-pago small { display: block; font-size: 13px; font-weight: 700; margin-top: 2px; }
.fat-rod { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 22px; padding-top: 8px; border-top: 1px solid #e2e8f0; color: #6a7590; font-size: 11.5px; }
.acoes-cel { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 680px) {
  .fat { padding: 16px 12px; } .fat-cab { flex-direction: column; } .fat-tit { text-align: left; } .fat-logo { height: 48px; }
  .fat-partes { grid-template-columns: 1fr; } .fat-partes > div + div { border-left: 0; border-top: 1px solid #cfd8e3; }
  .fat-itens th:nth-child(3), .fat-itens td:nth-child(3), .fat-itens th:nth-child(4), .fat-itens td:nth-child(4) { display: none; } .fat-itens tfoot td:first-child { }
  .fat-pix { grid-template-columns: 1fr; } .fat-qr { border-right: 0; border-bottom: 1px solid #cfd8e3; }
  .fat-rec-g { grid-template-columns: 1fr 1fr; } .fat-pago { top: 90px; right: 14px; font-size: 28px; }
}
@media print { .fat { border: 0; padding: 0; max-width: none; } }
@media (max-width: 900px) { .fat-itens th:nth-child(3), .fat-itens td:nth-child(3), .fat-itens th:nth-child(4), .fat-itens td:nth-child(4) { display: none; } .fat-itens tfoot td[colspan] { } } .fat-itens { table-layout: auto; } .fat-itens td:nth-child(2) { overflow-wrap: anywhere; }
@media (max-width: 900px) { .fat-tot-rot { } .fat-itens tfoot td.fat-tot-rot { text-align: right; } }
.fat-recibo { position: relative; } .fat-recibo .fat-pago { top: 10px; right: 14px; font-size: 30px; } @media (max-width: 680px) { .fat-recibo .fat-pago { position: static; display: inline-block; transform: rotate(-6deg); margin-bottom: 8px; } }
.fat-itens th { white-space: normal !important; } .fat-itens td { white-space: normal !important; } .fat-itens td.num { white-space: nowrap !important; } @media (max-width: 1180px) { .fat-itens th:nth-child(3), .fat-itens td:nth-child(3), .fat-itens th:nth-child(4), .fat-itens td:nth-child(4) { display: none; } } .fat-recibo .fat-rec-g { padding-right: 150px; } @media (max-width: 680px) { .fat-recibo .fat-rec-g { padding-right: 0; } }

/* ---------- impressão / PDF: sempre A4 retrato, sem menu nem botões, seções inteiras */
@media print {
  @page { size: A4 portrait; margin: 10mm 10mm 12mm; }
  html, body { width: auto !important; background: #fff !important; }
  .topo, .lateral, .contexto, .nao-imprime, .toast, .fundo-lateral, .vela { display: none !important; }
  .principal, #tela { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  .fat, .bol-folha { border: 0 !important; border-radius: 0; padding: 0 !important; margin: 0 !important; max-width: none !important; width: 100% !important; font-size: 11.5px; box-shadow: none; }
  .fat-cab, .fat-partes, .fat-itens, .fat-pix, .fat-recibo, .bol-ficha, .bol-recibo, .fat-rod { break-inside: avoid; page-break-inside: avoid; }
  .fat-partes { grid-template-columns: 1fr 1fr !important; } .fat-partes > div + div { border-left: 1px solid #cfd8e3 !important; border-top: 0 !important; }
  .fat-pix { grid-template-columns: 150px 1fr !important; } .fat-qr { border-right: 1px solid #cfd8e3 !important; border-bottom: 0 !important; }
  .fat-cab { flex-direction: row !important; } .fat-tit { text-align: right !important; } .fat-logo { height: 54px !important; }
  .fat-rec-g { grid-template-columns: repeat(4, 1fr) !important; }
  .bol-g .s1 { grid-column: span 1 !important; } .bol-g .s2 { grid-column: span 2 !important; } .bol-g .s3 { grid-column: span 3 !important; } .bol-g .s6 { grid-column: span 6 !important; } .bol-g .s9 { grid-column: span 9 !important; }
  .bol-linha { font-size: 13px !important; } .bol-barras { width: 103mm !important; height: 13mm !important; }
  .bol-marca { font-size: 56px; }
}
/* tabela de itens da fatura tem 3 colunas: nunca esconder (regras antigas escondiam a 3ª e a 4ª) */
.fat-itens th, .fat-itens td { display: table-cell !important; }
@media print {
  .fat { font-size: 10.5px !important; }
  .fat-cab { padding-bottom: 8px; margin-bottom: 10px; } .fat-logo { height: 44px !important; } .fat-tit h2 { font-size: 17px; } .fat-tit span { margin-top: 3px; }
  .fat-partes { margin-bottom: 10px; } .fat-partes > div { line-height: 1.4; padding-bottom: 6px; } .fat-partes h3 { padding: 5px 12px; margin-bottom: 5px; }
  .fat-itens { margin-bottom: 10px; } .fat-itens th, .fat-itens td { padding: 5px 8px; }
  .fat-pix { grid-template-columns: 120px 1fr !important; } .fat-qr { padding: 6px; } .fat-qr .bol-qr { width: 104px; height: 104px; } .fat-pix > div:last-child { padding: 8px 12px; } .fat-pix p { margin-bottom: 5px; }
  .fat .bol-corte { margin: 10px 0 8px; }
  .fat .bol-c { min-height: 24px; padding: 1px 4px 2px; } .fat .bol-c b { font-size: 11px; } .fat .bol-instr div { font-size: 10px; line-height: 1.35; }
  .fat-rod { margin-top: 10px; }
  .fat-recibo { padding: 10px 12px; }
}

/* ---------- portal: atendimentos e compras */
.lista-at { display: flex; flex-direction: column; gap: 10px; }
.lista-at > .cartao { margin: 0 !important; }
.at-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .at-item p { margin: 8px 0 6px; }
.compra summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; cursor: pointer; list-style: none; }
.compra summary::-webkit-details-marker { display: none; } .compra summary::before { content: "▸"; color: var(--texto-3); margin-right: 4px; } .compra[open] summary::before { content: "▾"; }
.compra summary > div:first-child { flex: 1; min-width: 200px; } .compra-dir { display: flex; align-items: center; gap: 8px; }
.compra-corpo { margin-top: 12px; border-top: 1px solid var(--borda); padding-top: 10px; }
.escolha-tipo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .escolha-tipo .marcar { border: 1px solid var(--borda); border-radius: 8px; padding: 10px 12px; align-items: flex-start; }
.escolha-tipo .marcar:has(input:checked) { border-color: var(--azul); background: #f3f7fe; }
.nfse-cab { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid var(--marinho); padding-bottom: 10px; margin-bottom: 12px; }
@media (max-width: 640px) { .escolha-tipo { grid-template-columns: 1fr; } }
@media print { body.imprimindo-modal #app { display: none !important; } body.imprimindo-modal .vela { position: static; background: none; } body.imprimindo-modal .modal { box-shadow: none; max-width: none; width: 100%; } body.imprimindo-modal .modal header, body.imprimindo-modal .modal footer { display: none; } }

/* ---------- documentos com autenticação (espelho NFS-e, demonstrativo de compra) */
.doc .doc-sub { font-size: 12.5px; margin: 4px 0 6px; color: #1c2433; letter-spacing: .3px; }
.doc-valores, .doc-fiscal { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #cfd8e3; margin-bottom: 14px; }
.doc-valores > div, .doc-fiscal > div { padding: 8px 10px; } .doc-valores > div + div, .doc-fiscal > div + div { border-left: 1px solid #cfd8e3; }
.doc-valores span, .doc-fiscal span { display: block; font-size: 10.5px; text-transform: uppercase; color: #44506a; letter-spacing: .3px; } .doc-valores b, .doc-fiscal b { font-size: 14px; }
.doc-fiscal { background: #f4f7fc; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc-aut { display: grid; grid-template-columns: 120px 1fr; gap: 14px; border: 2px solid #0f2a3f; padding: 12px; margin-top: 6px; break-inside: avoid; }
.doc-qr { width: 116px; height: 116px; } .doc-aut h3 { margin: 0 0 4px; font-size: 13px; letter-spacing: .4px; }
.doc-cod { font-family: Consolas, monospace; font-size: 20px; font-weight: 800; color: #1f3864; letter-spacing: 1px; margin-bottom: 6px; }
.doc-aut p { margin: 0 0 6px; } .doc-aviso { font-size: 11px; color: #6a7590; }
.aut-pub { min-height: 100vh; display: grid; place-items: center; background: #f3f6fb; padding: 20px; }
.aut-caixa { background: #fff; max-width: 620px; width: 100%; border-radius: 12px; padding: 26px; box-shadow: 0 6px 30px rgba(15, 42, 63, .1); }
.aut-caixa h1 { font-size: 22px; margin: 14px 0 12px; } .aut-busca { display: flex; gap: 8px; } .aut-busca input { flex: 1; font-family: Consolas, monospace; text-transform: uppercase; }
@media (max-width: 640px) { .doc-valores, .doc-fiscal { grid-template-columns: 1fr 1fr; } .doc-valores > div:nth-child(3), .doc-fiscal > div:nth-child(3) { border-left: 0; } .doc-aut { grid-template-columns: 1fr; } }
@media print { .doc-valores, .doc-fiscal { grid-template-columns: repeat(4, 1fr) !important; } .doc-aut { grid-template-columns: 110px 1fr !important; } .doc-qr { width: 104px; height: 104px; } }
.escolha-tipo .marcar { display: flex !important; justify-content: flex-start !important; gap: 10px; text-align: left; cursor: pointer; } .escolha-tipo .marcar input { width: 18px !important; height: 18px !important; flex: none; margin: 2px 0 0 !important; } .escolha-tipo .marcar > span { flex: 1; }

/* ---------- portal: detalhe de chamado e OS */
.at-link { display: block; color: inherit; text-decoration: none !important; } .at-link:hover { box-shadow: 0 0 0 2px var(--azul-claro); } .at-link * { text-decoration: none !important; }
.os-g { grid-template-columns: repeat(3, 1fr) !important; margin-bottom: 8px; } .os-h { font-size: 14px; margin: 16px 0 6px; color: var(--marinho); }
.os-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.os-foto { display: block; border: 1px solid var(--borda); border-radius: 8px; overflow: hidden; color: inherit; } .os-foto img { width: 100%; height: 120px; object-fit: cover; display: block; background: #eef1f6; }
.os-foto span { display: block; font-size: 11.5px; padding: 4px 6px; color: var(--texto-2); }
.os-ass { display: inline-block; border: 1px solid var(--borda); border-radius: 8px; padding: 8px 14px; text-align: center; } .os-ass img { max-height: 90px; max-width: 280px; display: block; }
.conversa { display: flex; flex-direction: column; gap: 8px; } .msg { max-width: 80%; padding: 8px 12px; border-radius: 10px; background: #eef1f6; } .msg.cliente { align-self: flex-end; background: #e3edfb; }
.msg-de { font-size: 11.5px; color: var(--texto-3); margin-bottom: 2px; }
@media (max-width: 640px) { .os-g { grid-template-columns: 1fr 1fr !important; } .msg { max-width: 95%; } }
@media print { .os-g { grid-template-columns: repeat(3, 1fr) !important; } .os-fotos { grid-template-columns: repeat(3, 1fr); } .os-foto img { height: 110px; } .doc .fat-rec-g span { font-size: 9.5px; } }
.at-top .cresce { flex: 1; } .at-link .ic:last-child { transform: rotate(-90deg); color: var(--texto-3); }

/* ---------- sino de notificações */
.btn-topo.sino { position: relative; } .btn-topo.sino .ic { width: 22px; height: 22px; }
.sino-n { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e5484d; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--marinho, #1f3864); }
.notif-caixa { width: min(380px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; }
.notif-cab { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--borda); position: sticky; top: 0; background: #fff; }
.notif-sec { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--texto-3); padding: 10px 16px 4px; }
.notif { display: flex; gap: 10px; padding: 10px 16px; color: inherit; text-decoration: none; border-bottom: 1px solid #f0f2f6; }
.notif:hover { background: var(--fundo); } .notif.nova { background: #f3f7fe; } .notif.nova b::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--azul); margin-left: 6px; vertical-align: middle; }
.notif-txt { display: flex; flex-direction: column; min-width: 0; } .notif-txt b { font-size: 13.5px; } .notif-txt span { font-size: 12.5px; color: var(--texto-2); } .notif-txt small { font-size: 11px; color: var(--texto-3); margin-top: 2px; }
.ag-ic.roxo { background: #efe8fb; color: #6b3fc4; }
.notif-caixa { overflow-x: hidden; } .notif-txt { flex: 1; } .notif-txt span, .notif-txt b { overflow-wrap: anywhere; }

/* ---------- galeria de fotos da OS */
.galeria { position: fixed; inset: 0; z-index: 200; background: rgba(8, 14, 28, .94); display: grid; grid-template-columns: 64px 1fr 64px; grid-template-rows: 1fr auto; align-items: center; }
.galeria figure { margin: 0; grid-column: 2; grid-row: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; min-height: 0; padding: 16px 0 8px; }
.galeria figure img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); background: #111; }
.galeria figcaption { color: #dfe6f3; font-size: 13.5px; margin-top: 10px; text-align: center; }
.gal-seta { grid-row: 1; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; justify-self: center; display: grid; place-items: center; }
.gal-seta:hover { background: rgba(255, 255, 255, .28); } .gal-seta .ic { width: 26px; height: 26px; }
.gal-seta.ant { grid-column: 1; } .gal-seta.ant .ic { transform: rotate(90deg); } .gal-seta.prox { grid-column: 3; } .gal-seta.prox .ic { transform: rotate(-90deg); }
.gal-fechar { position: absolute; top: 12px; right: 12px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; display: grid; place-items: center; z-index: 1; }
.gal-fechar:hover { background: rgba(255, 255, 255, .28); }
.gal-miniaturas { grid-column: 1 / -1; grid-row: 2; display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px 14px; justify-content: center; }
.gal-miniaturas button { flex: none; width: 64px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: #222; cursor: pointer; opacity: .6; }
.gal-miniaturas button.sel { border-color: #fff; opacity: 1; } .gal-miniaturas img { width: 100%; height: 100%; object-fit: cover; display: block; }
.os-foto { cursor: zoom-in; }
@media (max-width: 640px) { .galeria { grid-template-columns: 44px 1fr 44px; } .gal-seta { width: 38px; height: 38px; } .gal-miniaturas { justify-content: flex-start; } }
.gal-baixar { position: absolute; top: 12px; right: 62px; height: 42px; padding: 0 14px; border-radius: 21px; background: rgba(255, 255, 255, .14); color: #fff; display: flex; align-items: center; gap: 6px; text-decoration: none; font-size: 14px; z-index: 1; } .gal-baixar:hover { background: rgba(255, 255, 255, .28); } .gal-baixar .ic { width: 18px; height: 18px; }

/* ---------- botão de sugestões anônimas no topo do portal */
.btn-topo.opina { display: inline-flex; align-items: center; gap: 6px; width: auto; padding: 0 12px; border-radius: 18px; background: rgba(255, 255, 255, .12); color: #fff; height: 36px; margin-right: 4px; }
.btn-topo.opina:hover { background: rgba(255, 255, 255, .22); } .btn-topo.opina span { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.btn-topo.opina small { font-weight: 400; opacity: .8; font-size: 11px; margin-left: 2px; } .btn-topo.opina .ic { width: 18px; height: 18px; }
@media (max-width: 640px) { .btn-topo.opina span { display: none; } .btn-topo.opina { padding: 0 9px; } }
.anon { display: flex; gap: 10px; background: #eef6f0; border: 1px solid #cfe7d6; color: #1d5a33; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; font-size: 13.5px; } .anon .ic { flex: none; width: 22px; height: 22px; }
.tipos-man { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } .tipos-man label { cursor: pointer; } .tipos-man input { position: absolute; opacity: 0; }
.tipos-man span { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 1px solid var(--borda); border-radius: 8px; padding: 10px 6px; font-size: 13px; font-weight: 600; }
.tipos-man input:checked + span { border-color: var(--azul); background: #f3f7fe; color: var(--azul); } .tipos-man input:focus-visible + span { outline: 2px solid var(--azul); }
@media (max-width: 640px) { .tipos-man { grid-template-columns: 1fr 1fr; } }

/* ---------- contratos agrupados por cliente */
.tab-grupos .grupo-cli { cursor: pointer; background: #f6f8fc; } .tab-grupos .grupo-cli:hover { background: #eef3fb; }
.tab-grupos .grupo-cli .ic { width: 16px; height: 16px; vertical-align: -3px; transform: rotate(-90deg); transition: transform .15s; color: var(--texto-3); }
.tab-grupos .grupo-cli.aberto .ic { transform: rotate(0); color: var(--azul); }
.tab-grupos .sub-cli td:first-child { padding-left: 34px; position: relative; } .tab-grupos .sub-cli td:first-child::before { content: ""; position: absolute; left: 18px; top: 0; bottom: 0; border-left: 2px solid var(--azul-claro, #dbe7fb); }
.tab-grupos .sub-nome { font-weight: 600; }
.aviso.vermelho .btn.perigo { flex: none; align-self: center; }
.kpi-filtro { text-align: left; cursor: pointer; font: inherit; color: inherit; border: 1px solid var(--borda); } .kpi-filtro.sel { box-shadow: 0 0 0 2px var(--azul); } .kpi-filtro:hover { box-shadow: 0 0 0 2px var(--azul-claro); }

/* ---------- relatórios */
.relatorio .rel-cab { display: none; } .rel-bloco { margin-bottom: 14px; } .rel-bloco h2 { font-size: 16px; }
.rel-tab tfoot td { background: #f4f7fc; } .rel-g2 { align-items: start; } .rel-g2 > .cartao { margin: 0; }
@media print {
  .relatorio .rel-cab { display: flex !important; }
  .relatorio { font-size: 10.5px; } .relatorio .cartao { padding: 0 !important; border: 0 !important; box-shadow: none !important; }
  .relatorio .rel-tab th, .relatorio .rel-tab td { padding: 4px 6px; } .relatorio .rel-tab thead { display: table-header-group; } .relatorio .rel-tab tr { break-inside: avoid; }
  .relatorio .ag-kpis { grid-template-columns: repeat(4, 1fr) !important; } .relatorio .ag-kpis .kpi-filtro { border: 1px solid #cfd8e3; }
  .relatorio .rel-g2 { grid-template-columns: 1fr 1fr !important; gap: 14px; } .relatorio .esconde-cel { display: table-cell !important; }
}
@media print { .relatorio .rel-bloco h2 { break-after: avoid; page-break-after: avoid; } .relatorio .rel-bloco { break-inside: auto; } }
.aud-erro td { background: #fdf1f1; }
.fat-prop { border: 1px solid #b9d2f5; background: #f1f6fe; border-radius: 6px; padding: 8px 12px; margin: -6px 0 14px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; -webkit-print-color-adjust: exact; print-color-adjust: exact; } .fat-prop span { color: #44506a; }

/* ---------- impressão SEM o cabeçalho/rodapé do navegador (título, endereço, data e hora):
   com a margem da página zerada não sobra espaço para eles; a margem do documento passa a ser interna */
@media print {
  @page { size: A4 portrait; margin: 0; }
  html, body { margin: 0 !important; padding: 0 !important; }
  .fat, .relatorio, .bol-folha { padding: 10mm 11mm 10mm !important; box-sizing: border-box; }
  .relatorio .rel-tab thead { display: table-header-group; }
}

/* ---------- NFS-e (formato do DANFSe nacional) */
.nf { position: relative; background: #fff; color: #111; max-width: 860px; margin: 0 auto 30px; padding: 22px 26px; border: 1px solid var(--borda); font-family: Arial, Helvetica, sans-serif; font-size: 12px; overflow: hidden; }
.nf-cab { display: grid; grid-template-columns: 150px 1fr 260px; gap: 12px; align-items: center; border: 1px solid #333; padding: 8px 10px; }
.nf-brasao b { display: block; font-size: 22px; color: #1f3864; } .nf-brasao span { font-size: 10.5px; color: #333; }
.nf-tit { text-align: center; } .nf-tit h2 { margin: 0; font-size: 16px; } .nf-tit span { font-size: 11.5px; }
.nf-num { display: grid; gap: 4px; } .nf-num .nf-c { border: 0; padding: 0; }
.nf-chave { display: grid; grid-template-columns: 1fr 200px; border: 1px solid #333; border-top: 0; }
.nf-chave .nf-c + .nf-c { border-left: 1px solid #333; }
.nf-bloco { border: 1px solid #333; border-top: 0; } .nf-bloco h3 { margin: 0; font-size: 11px; background: #e9edf3; padding: 4px 8px; border-bottom: 1px solid #333; letter-spacing: .3px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.nf-g { display: grid; grid-template-columns: repeat(12, 1fr); }
.nf-g .s3 { grid-column: span 3; } .nf-g .s4 { grid-column: span 4; } .nf-g .s6 { grid-column: span 6; } .nf-g .s8 { grid-column: span 8; } .nf-g .s12 { grid-column: span 12; }
.nf-c { padding: 4px 8px; border-right: 1px solid #ccc; border-bottom: 1px solid #ccc; min-width: 0; } .nf-c span { display: block; font-size: 9.5px; color: #444; text-transform: uppercase; } .nf-c b { display: block; font-size: 12px; overflow-wrap: anywhere; }
.nf-c.forte b { font-size: 15px; } .nf-c.largo b { font-family: Consolas, monospace; letter-spacing: .5px; }
.nf-nao { margin: 0; padding: 6px 8px; font-weight: 700; color: #444; } .nf-obs { margin: 0; padding: 6px 8px; color: #333; }
@media (max-width: 680px) { .nf { padding: 12px 8px; } .nf-cab { grid-template-columns: 1fr; } .nf-chave { grid-template-columns: 1fr; } .nf-g .s3, .nf-g .s4 { grid-column: span 6; } .nf-g .s6, .nf-g .s8 { grid-column: span 12; } }
@media print { .nf { border: 0 !important; padding: 10mm 11mm !important; max-width: none; } }
.nf-cab { grid-template-columns: 230px 1fr 230px; } .nf-brasao { display: flex; align-items: center; gap: 10px; } .nf-logo { height: 54px; width: auto; }
.nf-brasao b { font-size: 18px; } .nf-brasao span { display: block; font-size: 10px; line-height: 1.25; }
@media (max-width: 680px) { .nf-cab { grid-template-columns: 1fr; } }
