/* =========================================================
   Kaixa — Sistema de caixa da gráfica (família Kromia)
   ========================================================= */

:root {
  --whale: #023544;
  --whale-2: #0d3f4d;
  --verdigris: #49b3b3;
  --teal: #3a7b79;
  --teal-escuro: #2e6765;
  --teal-claro: #e7f3f2;

  --fundo: #f4f6f7;
  --card: #ffffff;
  --borda: #e1e7e9;
  --borda-forte: #c9d3d6;
  --texto: #0f2e38;
  --texto-2: #4f666e;
  --texto-3: #7e9198;

  --verde: #2b8a5e;
  --verde-fundo: #e5f3ea;
  --verde-texto: #24683f;
  --vermelho: #c9473f;
  --vermelho-fundo: #fbeceb;
  --vermelho-texto: #a2342d;
  --ambar-fundo: #fff6e5;
  --ambar-borda: #f1d79f;
  --ambar-texto: #7a5410;

  --raio: 26px;
  --raio-m: 16px;
  --raio-p: 12px;
  --sombra: 0 1px 2px rgba(2, 53, 68, .04), 0 8px 28px rgba(2, 53, 68, .05);
  --sombra-forte: 0 20px 60px rgba(2, 53, 68, .22);

  --fonte: "Plus Jakarta Sans", "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--fonte);
  font-size: 17px;
  line-height: 1.45;
  color: var(--texto);
  background: var(--fundo);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Topo ---------- */
.topo {
  position: sticky; top: 0; z-index: 40;
  background: rgba(244, 246, 247, .86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(2, 53, 68, .06);
}
.topo-in {
  max-width: 1320px; margin: 0 auto; padding: 14px 32px;
  display: flex; align-items: center; gap: 28px;
}
.marca { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--whale); flex-shrink: 0; }
.marca-icone {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(140deg, var(--whale) 10%, #1f5f66 70%, var(--verdigris) 130%);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 6px 16px rgba(2, 53, 68, .25);
}
.marca-icone svg { width: 22px; height: 22px; }
.marca-nome { font-size: 23px; font-weight: 800; letter-spacing: -.035em; }
.menu {
  display: flex; gap: 4px; padding: 5px;
  background: #e8edef; border-radius: 999px;
  overflow-x: auto; scrollbar-width: none;
}
.menu::-webkit-scrollbar { display: none; }
.menu a {
  white-space: nowrap; text-decoration: none; color: var(--texto-2);
  font-weight: 600; font-size: 15.5px;
  padding: 9px 17px; border-radius: 999px;
  transition: background .15s, color .15s;
}
.menu a:hover { color: var(--texto); background: rgba(255, 255, 255, .55); }
.menu a.ativo { background: #fff; color: var(--whale); box-shadow: 0 1px 3px rgba(2, 53, 68, .1); }

/* ---------- Avisos de topo ---------- */
.avisos { max-width: 1320px; margin: 0 auto; padding: 0 32px; }
.aviso {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 20px; margin-top: 20px;
  border-radius: var(--raio-m); border: 1px solid;
  font-size: 16px;
}
.aviso svg { width: 22px; height: 22px; flex-shrink: 0; }
.aviso .aviso-txt { flex: 1; }
.aviso-info { background: #eaf5f4; border-color: #9fd1cf; color: #1b4c55; }
.aviso-alerta { background: var(--ambar-fundo); border-color: var(--ambar-borda); color: var(--ambar-texto); }
.aviso-trava { background: #eef1f6; border-color: #c4cddb; color: #2c3d58; }

/* ---------- Página ---------- */
main { max-width: 1320px; margin: 0 auto; padding: 34px 32px 80px; }
.cab {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 24px; margin-bottom: 28px; flex-wrap: wrap;
}
.cab h1 { font-size: 40px; font-weight: 800; color: var(--whale); letter-spacing: -.035em; }
.cab .sub { margin-top: 8px; font-size: 17.5px; color: var(--texto-2); max-width: 720px; }
.cab-acoes { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--borda);
  border-radius: var(--raio); padding: 32px;
  box-shadow: var(--sombra);
}
.card-cab {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.card-cab h2 { font-size: 25px; font-weight: 750; color: var(--texto); }
.rotulo-cab {
  font-size: 12.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--texto-2);
}
.grade-caixa { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: stretch; }
.grade-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.grade-2-igual { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.pilha { display: grid; gap: 28px; }
.mt { margin-top: 28px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border: 1.5px solid transparent; border-radius: var(--raio-m);
  padding: 14px 22px; font-weight: 700; font-size: 16.5px;
  text-decoration: none; line-height: 1.1;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-pri { background: var(--teal); color: #fff; }
.btn-pri:hover { background: var(--teal-escuro); }
.btn-sec { background: #fff; color: var(--texto); border-color: var(--borda-forte); }
.btn-sec:hover { border-color: var(--teal); color: var(--teal-escuro); }
.btn-perigo { background: var(--vermelho); color: #fff; }
.btn-perigo:hover { background: #b23a33; }
.btn-perigo-sec { background: #fff; color: var(--vermelho-texto); border-color: #eab7b3; }
.btn-perigo-sec:hover { background: var(--vermelho-fundo); }
.btn-grande { width: 100%; padding: 20px 24px; font-size: 19px; border-radius: 18px; }
.btn-p { padding: 10px 16px; font-size: 15px; border-radius: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.link {
  background: none; border: 0; padding: 0; color: var(--teal);
  font-weight: 650; font-size: 16.5px; display: inline-flex; align-items: center; gap: 6px;
}
.link:hover { color: var(--teal-escuro); text-decoration: underline; text-underline-offset: 3px; }
.link svg { width: 18px; height: 18px; }

/* ---------- Formulário ---------- */
.campo { margin-bottom: 22px; }
.campo:last-child { margin-bottom: 0; }
.campo > label, .rotulo {
  display: block; font-weight: 650; font-size: 16px; margin-bottom: 10px; color: var(--texto);
}
.obrig { color: #b3261e; margin-left: 2px; }
.ajuda { font-size: 14.5px; color: var(--texto-3); margin-top: 8px; }
.entrada {
  width: 100%; height: 58px; padding: 0 18px;
  border: 1.5px solid var(--borda-forte); border-radius: var(--raio-m);
  background: #fff; font-size: 17.5px;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
textarea.entrada { height: auto; min-height: 92px; padding: 14px 18px; resize: vertical; }
.entrada::placeholder { color: #9aabb1; }
.entrada:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(73, 179, 179, .2); }
.entrada:disabled { background: #f3f6f7; color: var(--texto-2); border-color: var(--borda); -webkit-text-fill-color: var(--texto-2); opacity: 1; }
.entrada.erro { border-color: #d0504a; box-shadow: 0 0 0 4px rgba(208, 80, 74, .12); }
.entrada-valor { height: 76px; font-size: 34px; font-weight: 750; letter-spacing: -.02em; }
.entrada-valor-wrap { position: relative; }
.entrada-valor-wrap .prefixo {
  position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 700; color: var(--texto-3); pointer-events: none;
}
.entrada-valor-wrap .entrada-valor { padding-left: 62px; }
input[type="date"].entrada { padding-right: 12px; }
.linha-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.linha-campos-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* Botões grandes de escolha (tipo, onde foi) */
.duplo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.opcao {
  height: 64px; border-radius: var(--raio-m);
  border: 1.5px solid var(--borda-forte); background: #fff;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-weight: 650; font-size: 18px; color: var(--texto);
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.opcao svg { width: 23px; height: 23px; }
.opcao:hover { border-color: var(--teal); }
.opcao.sel { background: var(--teal); border-color: var(--teal); color: #fff; }
.opcao.entrada-op.sel { background: var(--verde); border-color: var(--verde); }
.opcao.saida-op.sel { background: var(--vermelho); border-color: var(--vermelho); }
.opcao.entrada-op:not(.sel):hover { border-color: var(--verde); color: var(--verde-texto); }
.opcao.saida-op:not(.sel):hover { border-color: var(--vermelho); color: var(--vermelho-texto); }

/* Pílulas */
.pilulas { display: flex; flex-wrap: wrap; gap: 10px; }
.pilula {
  border: 1.5px solid var(--borda-forte); background: #fff;
  border-radius: 999px; padding: 12px 22px;
  font-weight: 600; font-size: 16.5px; color: var(--texto);
  transition: background .15s, border-color .15s, color .15s;
}
.pilula:hover { border-color: var(--teal); }
.pilula.sel { background: var(--teal); border-color: var(--teal); color: #fff; }
.pilula.sel-vermelho { background: var(--vermelho); border-color: var(--vermelho); color: #fff; }

/* Segmentado (filtros) */
.seg { display: inline-flex; padding: 4px; background: #edf1f2; border-radius: 999px; gap: 2px; }
.seg button {
  border: 0; background: none; border-radius: 999px;
  padding: 8px 16px; font-weight: 650; font-size: 14.5px; color: var(--texto-2);
}
.seg button.sel { background: #fff; color: var(--whale); box-shadow: 0 1px 3px rgba(2, 53, 68, .12); }

/* ---------- Card escuro (resumo) ---------- */
.escuro {
  position: relative; overflow: hidden;
  border-radius: var(--raio); padding: 34px 36px;
  color: #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(73, 179, 179, .38) 0%, rgba(73, 179, 179, 0) 55%),
    linear-gradient(160deg, #0f3442 0%, #163f4c 55%, #1b4753 100%);
  box-shadow: 0 18px 50px rgba(2, 53, 68, .22);
}
.escuro .eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}
.escuro-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.setas { display: flex; align-items: center; gap: 4px; }
.seta {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: #fff;
  transition: background .15s;
}
.seta:hover { background: rgba(255, 255, 255, .18); }
.seta svg { width: 20px; height: 20px; }
.seta:disabled { opacity: .3; cursor: default; }
.btn-hoje {
  border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .1); color: #fff;
  border-radius: 999px; padding: 8px 14px; font-weight: 650; font-size: 14px; margin-right: 6px;
}
.btn-hoje:hover { background: rgba(255, 255, 255, .2); }
.escuro .data-grande { font-size: 23px; font-weight: 650; margin-top: 8px; letter-spacing: -.01em; }
.escuro .total { font-size: 64px; font-weight: 800; letter-spacing: -.04em; margin-top: 26px; line-height: 1; }
.escuro .total-sub { color: rgba(255, 255, 255, .65); font-size: 17px; margin-top: 12px; }
.escuro .divisor { height: 1px; background: rgba(255, 255, 255, .12); margin: 26px 0; }
.lista-escura { display: grid; gap: 13px; }
.lista-escura .li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 17px; }
.lista-escura .li span:first-child { color: rgba(255, 255, 255, .72); }
.lista-escura .li strong { font-weight: 700; }
.lista-escura .li.zero strong { color: rgba(255, 255, 255, .4); font-weight: 600; }
.gaveta {
  margin-top: 22px; padding: 18px 20px; border-radius: 18px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.gaveta .g-tit { font-weight: 650; font-size: 16px; }
.gaveta .g-sub { font-size: 13.5px; color: rgba(255, 255, 255, .55); margin-top: 2px; }
.gaveta strong { font-size: 24px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.mes-ate-agora {
  margin-top: 22px; font-size: 15px; color: rgba(255, 255, 255, .66);
  display: flex; flex-wrap: wrap; gap: 6px 18px;
}
.mes-ate-agora b { color: #fff; font-weight: 700; }
.negativo { color: #ffb4ac !important; }

/* ---------- Lista de movimento ---------- */
.mov { list-style: none; margin: 0; padding: 0; }
.mov li {
  display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 18px;
  padding: 18px 10px; border-bottom: 1px solid var(--borda);
  border-radius: 14px; cursor: pointer; transition: background .12s;
}
.mov li:last-child { border-bottom: 0; }
.mov li:hover { background: #f6f9f9; }
.mov .hora { color: var(--texto-3); font-size: 16px; }
.mov .desc { font-weight: 650; font-size: 18px; overflow-wrap: anywhere; }
.mov .meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 7px; color: var(--texto-2); font-size: 15.5px; }
.mov .valor { font-weight: 750; font-size: 19px; white-space: nowrap; text-align: right; }
.mov .valor.saida { color: var(--vermelho-texto); }
.mov li.estornado .desc, .mov li.estornado .valor { text-decoration: line-through; color: var(--texto-3); }
.mov li.estornado .hora { opacity: .6; }
.estorno-info { font-size: 14px; color: var(--vermelho-texto); }

.tag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 14px; font-weight: 700; line-height: 1.2;
}
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tag-balcao { background: var(--verde-fundo); color: var(--verde-texto); }
.tag-externo { background: #e6eef9; color: #2a5390; }
.tag-pedido { background: #f1e9f8; color: #6a3f93; }
.tag-saida { background: var(--vermelho-fundo); color: var(--vermelho-texto); }
.tag-estorno { background: #eef0f1; color: #5b6b71; }
.tag-sem-ponto::before { display: none; }

.rodape-info {
  display: flex; gap: 12px; align-items: center;
  margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--borda);
  color: var(--texto-2); font-size: 15.5px;
}
.rodape-info svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--texto-3); }

.vazio { text-align: center; padding: 46px 20px; color: var(--texto-2); }
.vazio .v-icone {
  width: 62px; height: 62px; border-radius: 20px; margin: 0 auto 16px;
  display: grid; place-items: center; background: var(--teal-claro); color: var(--teal);
}
.vazio .v-icone svg { width: 28px; height: 28px; }
.vazio h3 { font-size: 20px; color: var(--texto); margin-bottom: 6px; }

/* ---------- Fechamento ---------- */
.seletor-mes { display: flex; align-items: center; gap: 8px; }
.seletor-mes .mes-nome { font-weight: 750; font-size: 20px; min-width: 210px; text-align: center; color: var(--texto); }
.seta-clara {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; border: 1.5px solid var(--borda-forte); color: var(--teal);
}
.seta-clara:hover:not(:disabled) { border-color: var(--teal); }
.seta-clara:disabled { opacity: .35; cursor: default; }
.seta-clara svg { width: 20px; height: 20px; }
.barra-fech { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }

.hero {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 30px; align-items: center;
}
.hero .total { margin-top: 12px; font-size: 72px; }
.selo-parcial {
  display: inline-flex; align-items: center; gap: 7px; vertical-align: middle;
  margin-left: 10px; padding: 5px 12px; border-radius: 999px;
  background: rgba(73, 179, 179, .22); color: #bdeceb;
  font-size: 12.5px; font-weight: 700; letter-spacing: .06em;
}
.selo-parcial.fechado { background: rgba(255, 255, 255, .14); color: #fff; }
.origens { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 26px; }
.origem { border-left: 2px solid rgba(255, 255, 255, .22); padding-left: 18px; }
.origem span { display: block; color: rgba(255, 255, 255, .62); font-size: 16px; }
.origem strong { display: block; font-size: 27px; font-weight: 750; margin-top: 4px; letter-spacing: -.02em; }

.part-lista { display: grid; gap: 14px; }
.part {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 22px 24px; border-radius: 20px;
  background: linear-gradient(135deg, #eef7f6, #f6fafa); border: 1px solid #d4e9e7;
}
.part .p-nome { font-weight: 750; font-size: 20px; }
.part .p-conta { color: var(--texto-2); font-size: 15.5px; margin-top: 4px; }
.part .p-valor { font-size: 34px; font-weight: 800; color: var(--whale); letter-spacing: -.03em; white-space: nowrap; }

.linhas { display: grid; gap: 4px; }
.linha {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 11px 0; font-size: 17px;
}
.linha + .linha { border-top: 1px dashed var(--borda); }
.linha .l-sub { display: block; font-size: 14.5px; color: var(--texto-3); margin-top: 2px; }
.linha strong { font-weight: 750; white-space: nowrap; }
.linha.total-linha { border-top: 1.5px solid var(--texto) !important; margin-top: 6px; padding-top: 14px; font-size: 19px; }

.barras { display: grid; gap: 18px; }
.barra-item .b-topo { display: flex; justify-content: space-between; gap: 12px; font-size: 17px; margin-bottom: 9px; }
.barra-item .b-topo strong { font-weight: 750; }
.barra-trilho { height: 11px; border-radius: 99px; background: #edf1f2; overflow: hidden; }
.barra-cheia { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #5fb0ae, var(--verdigris)); min-width: 6px; }

.status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px; font-weight: 750; font-size: 15px;
}
.status svg { width: 16px; height: 16px; }
.status-pendente { background: var(--ambar-fundo); color: var(--ambar-texto); }
.status-pago { background: var(--verde-fundo); color: var(--verde-texto); }
.status-parcial { background: #e6eef9; color: #2a5390; }
.status-andamento { background: #edf1f2; color: var(--texto-2); }

.acerto-data { font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--whale); }
.acerto-bloco + .acerto-bloco { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--borda); }
.pagamentos { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.pagamentos li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; background: #f6f9f9; border-radius: 12px; font-size: 16px; }

.tabela { width: 100%; border-collapse: collapse; font-size: 16px; }
.tabela th { text-align: left; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-2); padding: 0 12px 12px; font-weight: 700; }
.tabela td { padding: 14px 12px; border-top: 1px solid var(--borda); }
.tabela .dir { text-align: right; }

/* ---------- Configurações ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 8px 8px 16px; border-radius: 999px;
  background: #f0f4f5; border: 1px solid var(--borda); font-weight: 600; font-size: 15.5px;
}
.chip button {
  width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; color: var(--texto-3);
  display: grid; place-items: center;
}
.chip button:hover { background: #fff; color: var(--vermelho); }
.chip button svg { width: 15px; height: 15px; }
.chip.fixo { padding-right: 16px; }
.add-linha { display: flex; gap: 10px; }
.add-linha .entrada { height: 50px; }
.add-linha .btn { flex-shrink: 0; }

.logo-area { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.logo-prev {
  width: 150px; height: 90px; border-radius: 14px; border: 1.5px dashed var(--borda-forte);
  display: grid; place-items: center; background: #fafbfb; overflow: hidden; color: var(--texto-3); font-size: 13px;
}
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }

.part-edit { display: grid; gap: 10px; padding: 14px; margin-bottom: 12px; border: 1.5px solid var(--borda); border-radius: 16px; background: rgba(255, 255, 255, .6); }
.pe-topo { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 10px; align-items: center; }
.pe-valores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pe-campo { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--texto-2); }
.pe-campo small { font-weight: 500; color: var(--texto-3); }
.part-edit .entrada { height: 50px; }
.icone-btn {
  width: 48px; height: 48px; border-radius: 12px; border: 1.5px solid var(--borda); background: #fff;
  display: grid; place-items: center; color: var(--texto-3);
}
.icone-btn:hover { color: var(--vermelho); border-color: #eab7b3; }
.icone-btn svg { width: 19px; height: 19px; }
.sufixo-wrap { position: relative; }
.sufixo-wrap .sufixo { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--texto-3); font-weight: 650; pointer-events: none; }

.zona-perigo { border-color: #efcfcc; }

/* ---------- Modal ---------- */
.modal-fundo {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8, 30, 38, .45);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 24px;
  animation: aparecer .15s ease-out;
}
.modal {
  width: 100%; max-width: 560px; max-height: calc(100vh - 48px); overflow: auto;
  background: #fff; border-radius: 26px; padding: 32px;
  box-shadow: var(--sombra-forte);
  animation: subir .2s cubic-bezier(.2, .8, .2, 1);
}
.modal h2 { font-size: 25px; font-weight: 750; margin-bottom: 8px; }
.modal .m-texto { color: var(--texto-2); font-size: 17px; margin-bottom: 22px; }
.modal-acoes { display: flex; justify-content: flex-end; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.detalhe { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; font-size: 16.5px; margin: 18px 0 4px; }
.detalhe dt { color: var(--texto-3); }
.detalhe dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@keyframes aparecer { from { opacity: 0; } }
@keyframes subir { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* ---------- Toast ---------- */
.toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 200; display: grid; gap: 10px; justify-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 12px;
  background: var(--whale); color: #fff; border-radius: 16px;
  padding: 15px 22px; font-weight: 600; font-size: 16px;
  box-shadow: 0 14px 40px rgba(2, 53, 68, .35);
  animation: subir .22s cubic-bezier(.2, .8, .2, 1);
}
.toast svg { width: 20px; height: 20px; color: var(--verdigris); flex-shrink: 0; }
.toast.erro { background: #8f2a24; }
.toast.erro svg { color: #ffc2bb; }
.toast.saindo { opacity: 0; transform: translateY(6px); transition: .25s; }

/* ---------- Em breve ---------- */
.em-breve { text-align: center; padding: 70px 30px; }
.em-breve .v-icone { width: 76px; height: 76px; border-radius: 24px; }
.em-breve .v-icone svg { width: 34px; height: 34px; }
.em-breve h2 { font-size: 28px; margin-bottom: 10px; }
.em-breve p { color: var(--texto-2); max-width: 520px; margin: 0 auto; font-size: 17.5px; }
.em-breve .fase { display: inline-block; margin-bottom: 18px; }

/* ---------- Impressão ---------- */
#area-impressao { display: none; }

@media print {
  body { background: #fff; }
  body > *:not(#area-impressao) { display: none !important; }
  #area-impressao { display: block !important; }
}

/* Relatório do mês (A4) */
.rel { font-family: var(--fonte); color: #111d22; font-size: 11pt; line-height: 1.4; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rel-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 16pt; padding-bottom: 12pt; border-bottom: 2pt solid #023544; }
.rel-graf { display: flex; gap: 12pt; align-items: center; }
.rel-graf img { max-height: 54pt; max-width: 130pt; object-fit: contain; }
.rel-graf .rg-nome { font-size: 15pt; font-weight: 800; color: #023544; }
.rel-graf .rg-info { font-size: 9pt; color: #4b5f66; margin-top: 2pt; }
.rel-tit { text-align: right; }
.rel-tit .rt-1 { font-size: 9pt; letter-spacing: .1em; text-transform: uppercase; color: #4b5f66; font-weight: 700; }
.rel-tit .rt-2 { font-size: 17pt; font-weight: 800; color: #023544; margin-top: 2pt; }
.rel-tit .rt-3 { font-size: 9pt; color: #4b5f66; margin-top: 3pt; }
.rel-parcial { margin-top: 10pt; padding: 7pt 10pt; border: 1pt solid #e2c27e; background: #fff6e5; border-radius: 6pt; font-size: 9.5pt; color: #6d4b0d; }
.rel-destaque { display: flex; gap: 12pt; margin-top: 14pt; }
.rel-box { flex: 1; border: 1pt solid #cfd9dc; border-radius: 8pt; padding: 10pt 12pt; }
.rel-box.forte { background: #023544; border-color: #023544; color: #fff; }
.rel-box .rb-rot { font-size: 8.5pt; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; opacity: .75; }
.rel-box .rb-val { font-size: 19pt; font-weight: 800; margin-top: 3pt; letter-spacing: -.01em; }
.rel-box .rb-sub { font-size: 8.5pt; opacity: .75; margin-top: 2pt; }
.rel-colunas { display: flex; gap: 16pt; margin-top: 14pt; }
.rel-colunas > div { flex: 1; }
.rel h3 { font-size: 10pt; letter-spacing: .08em; text-transform: uppercase; color: #023544; margin: 14pt 0 5pt; font-weight: 800; }
.rel table { width: 100%; border-collapse: collapse; font-size: 10pt; }
.rel td, .rel th { padding: 4.5pt 4pt; border-bottom: .75pt solid #dde4e6; text-align: left; }
.rel th { font-size: 8pt; text-transform: uppercase; letter-spacing: .06em; color: #4b5f66; }
.rel .d { text-align: right; white-space: nowrap; }
.rel tr.tot td { border-top: 1.2pt solid #111d22; border-bottom: 0; font-weight: 800; }
.rel-comissao { margin-top: 16pt; border: 1.5pt solid #023544; border-radius: 8pt; padding: 12pt 14pt; }
.rel-comissao .rc-linha { display: flex; justify-content: space-between; align-items: baseline; gap: 12pt; }
.rel-comissao .rc-linha + .rc-linha { margin-top: 5pt; }
.rel-comissao .rc-val { font-size: 17pt; font-weight: 800; color: #023544; }
.rel-obs { font-size: 8.5pt; color: #4b5f66; margin-top: 8pt; }
.rel-ass { display: flex; gap: 40pt; margin-top: 52pt; }
.rel-ass > div { flex: 1; text-align: center; border-top: 1pt solid #111d22; padding-top: 5pt; font-size: 10pt; }
.rel-ass small { display: block; color: #4b5f66; font-size: 8.5pt; }
.rel-rodape { margin-top: 22pt; font-size: 8pt; color: #7b8c92; text-align: center; }


/* ---------- Fase 2: clientes, pedidos, a receber ---------- */
.voltar { margin-bottom: 14px; font-size: 16px; }
.voltar svg { width: 18px; height: 18px; }
.barra-filtros { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.barra-filtros .entrada { flex: 1 1 280px; height: 52px; }
.seg-rolar { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg-rolar::-webkit-scrollbar { display: none; }
.seg-rolar button { white-space: nowrap; }
.seg-largo { display: flex; width: 100%; }
.seg-largo button { flex: 1; padding: 12px 10px; font-size: 15.5px; }
.filtros-ped { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.filtros-ped .campo { margin: 0; }
.filtros-ped label { font-size: 14px; margin-bottom: 6px; color: var(--texto-2); }
.filtros-ped .entrada { height: 52px; }
.resumo-filtro { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--texto-2); font-size: 15.5px; padding: 4px 4px 12px; border-bottom: 1px solid var(--borda); }
.resumo-filtro b { color: var(--texto); }

.lista-cli, .lista-ped, .lista-rec { list-style: none; margin: 0; padding: 0; }
.lista-cli li + li, .lista-ped li + li, .lista-rec li + li { border-top: 1px solid var(--borda); }
.lista-cli a, .lista-ped a {
  display: grid; align-items: center; gap: 18px; padding: 16px 10px;
  text-decoration: none; color: inherit; border-radius: 14px; transition: background .12s;
}
.lista-cli a { grid-template-columns: 52px 1fr auto 20px; }
.lista-ped a { grid-template-columns: 92px 1fr auto 20px; }
.lista-cli a:hover, .lista-ped a:hover { background: #f6f9f9; }
.lc-seta { width: 20px; height: 20px; color: var(--texto-3); }
.avatar {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--teal-claro); color: var(--teal-escuro); font-weight: 800; font-size: 18px; letter-spacing: -.02em;
}
.lc-info { min-width: 0; display: grid; gap: 6px; }
.lc-nome { font-weight: 700; font-size: 18px; overflow-wrap: anywhere; }
.lista-cli .meta, .lista-ped .meta, .lista-rec .meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; color: var(--texto-2); font-size: 15px; }
.lc-valores { display: grid; justify-items: end; gap: 4px; text-align: right; }
.lc-valores small, .pd-total small, .lr-valores small { display: block; font-size: 13.5px; font-weight: 500; color: var(--texto-3); }
.lc-pago { font-weight: 650; color: var(--texto-2); }
.lc-aberto { font-weight: 750; color: var(--ambar-texto); }
.lc-aberto small { display: inline; color: var(--ambar-texto); opacity: .8; }
.lc-pago small { display: inline; }
.pd-num { font-weight: 800; font-size: 17px; color: var(--whale); }
.pd-num small { display: block; font-weight: 500; font-size: 14px; color: var(--texto-3); margin-top: 2px; }
.pd-total { font-weight: 750; font-size: 19px; text-align: right; white-space: nowrap; }
.pd-total small { color: var(--ambar-texto); font-weight: 650; }
.lista-ped li.cancelado { opacity: .55; }
.lista-ped li.cancelado .pd-total { text-decoration: line-through; }
.status-p { padding: 4px 11px; font-size: 13.5px; }

.tag-tipo-avulso { background: #eef1f2; color: #4b5f66; }
.tag-tipo-empresa { background: #e6eef9; color: #2a5390; }
.tag-tipo-publico { background: #f1e9f8; color: #6a3f93; }
.tag-st-aberto { background: #eef1f2; color: #44585f; }
.tag-st-pronto { background: #e6eef9; color: #2a5390; }
.tag-st-entregue { background: var(--verde-fundo); color: var(--verde-texto); }

.numeros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.num-card { padding: 24px 26px; display: grid; gap: 6px; align-content: start; }
.num-card span { color: var(--texto-2); font-weight: 600; font-size: 15.5px; }
.num-card strong { font-size: 32px; font-weight: 800; letter-spacing: -.03em; color: var(--whale); }
.num-card small { color: var(--texto-3); font-size: 14px; }
.num-card.alerta { background: var(--ambar-fundo); border-color: var(--ambar-borda); }
.num-card.alerta strong { color: var(--ambar-texto); }

/* Editor de itens */
.item-linha {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr) 82px 130px 118px 48px;
  gap: 10px; align-items: end; padding: 12px 0; border-bottom: 1px dashed var(--borda);
}
.item-linha .entrada { height: 52px; padding: 0 14px; font-size: 16.5px; }
.il-campo label { display: block; font-size: 13px; font-weight: 650; color: var(--texto-3); margin-bottom: 6px; }
.item-linha + .item-linha .il-campo label { display: none; }
.subtotal { display: flex; align-items: center; justify-content: flex-end; height: 52px; font-weight: 750; white-space: nowrap; }
.il-sub label { text-align: right; }
.total-ped { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; margin-top: 20px; padding-top: 18px; border-top: 1.5px solid var(--texto); }
.total-ped span { font-weight: 700; font-size: 18px; }
.total-ped strong { font-size: 32px; font-weight: 800; letter-spacing: -.03em; color: var(--whale); }
.opcao:disabled { opacity: .55; cursor: not-allowed; }
.opcao:disabled:hover { border-color: var(--borda-forte); }

.dicas ul { margin: 0; padding-left: 20px; display: grid; gap: 12px; color: var(--texto-2); font-size: 16px; }
.dicas b { color: var(--texto); }

/* A receber */
.grupo-total { text-align: right; }
.grupo-total strong { display: block; font-size: 28px; font-weight: 800; letter-spacing: -.03em; color: var(--ambar-texto); margin-top: 4px; }
.link-titulo { color: inherit; text-decoration: none; }
.link-titulo:hover { color: var(--teal); }
.lista-rec li { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 16px; align-items: center; padding: 14px 4px; }
.lista-rec.sem-check li { grid-template-columns: 1fr auto auto; }
.lr-info { text-decoration: none; color: inherit; display: grid; gap: 4px; min-width: 0; }
.lr-info:hover .lc-nome { color: var(--teal); }
.lr-valores { text-align: right; white-space: nowrap; }
.lr-valores strong { font-size: 19px; font-weight: 750; }
.check { position: relative; width: 28px; height: 28px; cursor: pointer; }
.check input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.check span { position: absolute; inset: 0; border: 2px solid var(--borda-forte); border-radius: 8px; background: #fff; transition: .15s; }
.check input:checked + span { background: var(--teal); border-color: var(--teal); }
.check input:checked + span::after { content: ""; position: absolute; left: 8px; top: 3px; width: 7px; height: 13px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.check input:focus-visible + span { box-shadow: 0 0 0 4px rgba(73, 179, 179, .3); }
.rec-varios { flex-wrap: wrap; }

@media (max-width: 1080px) {
  .item-linha { grid-template-columns: 1fr 1fr; align-items: start; background: #f7fafa; border: 1px solid var(--borda); border-radius: 16px; padding: 14px; margin-bottom: 12px; position: relative; }
  .item-linha + .item-linha .il-campo label { display: block; }
  .item-linha .il-desc { grid-column: 1 / -1; padding-right: 54px; }
  .item-linha .il-mod { grid-column: 1 / -1; }
  .item-linha .il-sub { grid-column: 1 / -1; }
  .item-linha .il-sub label { display: none !important; }
  .item-linha .subtotal { height: auto; justify-content: flex-end; font-size: 17px; }
  .item-linha .il-rem { position: absolute; top: 14px; right: 14px; }
  .item-linha .il-desc label { margin-top: 0; }
}
@media (max-width: 720px) {
  .filtros-ped { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .filtros-ped .entrada { min-width: 0; padding: 0 10px; font-size: 15.5px; }
  .filtros-ped .campo:first-child { grid-column: 1 / -1; }
  .lista-cli a { grid-template-columns: 44px 1fr; gap: 12px; padding: 14px 4px; }
  .lista-cli .avatar { width: 44px; height: 44px; border-radius: 13px; font-size: 16px; }
  .lista-cli .lc-valores { grid-column: 2; justify-items: start; text-align: left; }
  .lista-ped a { grid-template-columns: 1fr auto; gap: 8px 12px; padding: 14px 4px; }
  .lista-ped .pd-num { grid-column: 1 / -1; display: flex; gap: 8px; align-items: baseline; }
  .lista-ped .pd-num small { display: inline; }
  .lc-seta { display: none; }
  .numeros { grid-template-columns: 1fr; gap: 14px; }
  .num-card strong { font-size: 27px; }
  .lista-rec li { grid-template-columns: 30px 1fr; gap: 8px 12px; }
  .lista-rec.sem-check li { grid-template-columns: 1fr; }
  .lista-rec.sem-check .lr-valores, .lista-rec.sem-check li .btn { grid-column: 1; }
  .lista-rec .lr-valores { grid-column: 2; text-align: left; }
  .lista-rec li .btn { grid-column: 2; justify-self: start; }
  .grupo-total { text-align: left; }
  .total-ped strong { font-size: 27px; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
  .grade-caixa, .grade-2, .grade-2-igual, .hero { grid-template-columns: minmax(0, 1fr); }
  .escuro-caixa { order: -1; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .topo-in { padding: 12px 16px; gap: 12px; flex-direction: column; align-items: stretch; }
  .marca-nome { font-size: 21px; }
  .marca-icone { width: 34px; height: 34px; border-radius: 10px; }
  .menu a { padding: 8px 14px; font-size: 15px; }
  .avisos { padding: 0 16px; }
  main { padding: 24px 16px 64px; }
  .cab h1 { font-size: 31px; }
  .cab .sub { font-size: 16px; }
  .card { padding: 22px 18px; border-radius: 22px; }
  .card-cab h2 { font-size: 22px; }
  .escuro { padding: 26px 22px; border-radius: 22px; }
  .escuro .total { font-size: 50px; }
  .hero .total { font-size: 50px; }
  .origem strong { font-size: 22px; }
  .linha-campos, .linha-campos-3 { grid-template-columns: 1fr; }
  .opcao { font-size: 16.5px; height: 58px; }
  .pilula { padding: 10px 17px; font-size: 15.5px; }
  .mov li { grid-template-columns: 1fr auto; gap: 4px 12px; padding: 16px 6px; }
  .mov .hora { grid-column: 1 / -1; font-size: 14px; }
  .part { flex-direction: column; align-items: flex-start; }
  .part .p-valor { font-size: 30px; }
  .seletor-mes .mes-nome { min-width: 0; flex: 1; font-size: 18px; }
  .seletor-mes { width: 100%; }
  .barra-fech .seg { width: 100%; }
  .cab-acoes { width: 100%; }
  .cab-acoes .btn { flex: 1; }
  .so-desktop { display: none !important; }
  .aviso { flex-wrap: wrap; align-items: flex-start; padding: 14px 16px; font-size: 15px; }
  .aviso .aviso-txt { flex: 1 1 calc(100% - 40px); }
  .aviso .btn { width: 100%; }
  .detalhe { grid-template-columns: 1fr; gap: 2px; }
  .detalhe dd { margin-bottom: 10px; }
  .modal { padding: 24px 20px; border-radius: 22px; }
  .modal-acoes .btn { flex: 1; }
  .pe-valores { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pe-valores .pe-campo:first-child { grid-column: 1 / -1; }
  .tabela { font-size: 15px; }
  .tabela th, .tabela td { padding-left: 6px; padding-right: 6px; }
}

/* =========================================================
   Fase 3 — Notinha (14 x 20 cm, 2 por A4) e ficha de serviço (4 por A4)
   Medidas em mm: iguais na prévia da tela e na impressão.
   ========================================================= */
.folha {
  position: relative; width: 210mm; height: 296.8mm; overflow: hidden;
  background: #fff; color: #14262c; font-family: var(--fonte);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
  break-after: page; page-break-after: always;
}
.folha:last-child { break-after: auto; page-break-after: auto; }
.metade { position: absolute; left: 0; width: 210mm; height: 148.4mm; display: flex; align-items: center; justify-content: center; }
.metade.m1 { top: 0; }
.metade.m2 { top: 148.5mm; }
.corte-h { position: absolute; left: 0; right: 0; top: 148.5mm; border-top: .25mm dashed #9aa9ae; height: 0; }
.corte-v { position: absolute; top: 0; bottom: 0; left: 105mm; border-left: .25mm dashed #9aa9ae; width: 0; }
.tesoura { position: absolute; left: 6mm; top: -2.4mm; width: 4.8mm; height: 4.8mm; background: #fff; color: #7e9198; }
.tesoura svg { width: 4.8mm; height: 4.8mm; display: block; }
.corte-v .tesoura { left: -2.4mm; top: 74mm; transform: rotate(90deg); }

/* Folha deitada (A4 paisagem) com 2 notinhas em pé, corte vertical no meio */
.folha.paisagem { width: 297mm; height: 209.8mm; }
.paisagem .metade { top: 0; width: 148.4mm; height: 209.8mm; }
.paisagem .metade.m1 { left: 0; }
.paisagem .metade.m2 { left: 148.5mm; top: 0; }
.corte-meio { position: absolute; top: 0; bottom: 0; left: 148.5mm; border-left: .25mm dashed #9aa9ae; width: 0; }
.corte-meio .tesoura { left: -2.4mm; top: 6mm; transform: rotate(90deg); }

/* Notinha em pé: 140 x 200 mm dentro da metade de 148,5 x 210 mm */
.nota { width: 140mm; height: 200mm; display: flex; flex-direction: column; font-size: 9.5pt; line-height: 1.25; }
.n-cab { height: 30mm; flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; gap: 4mm; padding-bottom: 2.5mm; border-bottom: .6mm solid #023544; }
.n-graf { display: flex; align-items: center; gap: 3mm; min-width: 0; }
.n-graf img { max-height: 17mm; max-width: 30mm; object-fit: contain; display: block; flex-shrink: 0; }
.n-graf .ng-nome { font-size: 12pt; font-weight: 800; color: #023544; letter-spacing: -.01em; line-height: 1.15; }
.n-graf .ng-info { font-size: 7.2pt; color: #4b5f66; margin-top: 1mm; line-height: 1.35; }
.n-tit { text-align: right; flex-shrink: 0; }
.n-tit .nt-1 { font-size: 7.5pt; font-weight: 800; letter-spacing: .16em; color: #4b5f66; }
.n-tit .nt-2 { font-size: 16pt; font-weight: 800; color: #023544; margin-top: .5mm; letter-spacing: -.01em; white-space: nowrap; }
.n-tit .nt-3 { font-size: 8.5pt; color: #14262c; margin-top: 1mm; white-space: nowrap; }
.n-cli { margin-top: 3mm; flex-shrink: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 11mm 11mm; gap: 2mm 5mm; }
.n-cli .n-campo:first-child { grid-column: 1 / -1; }
.n-campo { display: flex; flex-direction: column; justify-content: flex-end; border-bottom: .25mm solid #9aa9ae; padding-bottom: 1mm; min-width: 0; }
.n-campo .nc-rot { font-size: 6.8pt; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6b7d83; }
.n-campo .nc-val { font-size: 10pt; font-weight: 600; min-height: 5mm; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.n-itens { margin-top: 3mm; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.n-itens table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.n-itens th { height: 6mm; font-size: 6.6pt; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6b7d83; text-align: left; border-bottom: .35mm solid #14262c; padding: 0 1.2mm; }
.n-itens td { border-bottom: .2mm solid #cfd9dc; padding: 0 1.2mm; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.n-itens .c-qtd { width: 12mm; text-align: center; }
.n-itens .c-unit { width: 22mm; text-align: right; }
.n-itens .c-sub { width: 24mm; text-align: right; font-weight: 700; }
.n-itens td.c-desc { font-weight: 500; }
.n-rod { height: 15mm; flex-shrink: 0; margin-top: 2.5mm; display: grid; grid-template-columns: 1fr 50mm; gap: 4mm; align-items: stretch; }
.n-rod .nr-esq { display: grid; grid-template-rows: 1fr 1fr; gap: 1.5mm; }
.n-rod .n-campo { flex-direction: row; align-items: flex-end; gap: 2mm; }
.n-rod .n-campo .nc-rot { flex-shrink: 0; }
.n-rod .n-campo .nc-val { font-size: 9pt; min-height: 0; }
.n-total { border-radius: 2.5mm; background: #023544; color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 0 3.5mm; }
.n-total span { font-size: 7pt; font-weight: 800; letter-spacing: .12em; }
.n-total strong { font-size: 14pt; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.nota.branca .n-total { background: #fff; color: #14262c; border: .35mm solid #023544; }
.nota.branca .n-total strong::before { content: "R$"; font-size: 10pt; font-weight: 700; color: #6b7d83; }
.n-ass { height: 14mm; flex-shrink: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; align-items: end; }
.n-ass div { border-top: .25mm solid #14262c; padding-top: 1mm; text-align: center; font-size: 7pt; color: #4b5f66; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nota .num-mao { display: inline-block; width: 20mm; border-bottom: .25mm solid #9aa9ae; height: 5mm; vertical-align: bottom; }

/* Ficha de serviço: 97 x 140 mm, 4 por folha */
.quarto { position: absolute; width: 105mm; height: 148.4mm; display: flex; align-items: center; justify-content: center; }
.quarto.q1 { top: 0; left: 0; } .quarto.q2 { top: 0; left: 105mm; }
.quarto.q3 { top: 148.5mm; left: 0; } .quarto.q4 { top: 148.5mm; left: 105mm; }
.ficha { width: 95mm; height: 138mm; display: flex; flex-direction: column; font-size: 8.5pt; }
.f-cab { display: flex; justify-content: space-between; align-items: center; gap: 3mm; padding-bottom: 2mm; border-bottom: .5mm solid #023544; height: 15mm; flex-shrink: 0; }
.f-cab .fg { display: flex; align-items: center; gap: 2.5mm; min-width: 0; }
.f-cab img { max-height: 10mm; max-width: 24mm; object-fit: contain; display: block; }
.f-cab .fg-nome { font-size: 9pt; font-weight: 800; color: #023544; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-cab .ft { text-align: right; flex-shrink: 0; }
.f-cab .ft-1 { font-size: 7pt; font-weight: 800; letter-spacing: .12em; color: #023544; }
.f-cab .ft-2 { font-size: 8pt; color: #4b5f66; margin-top: 1mm; }
.f-corpo { flex: 1; display: flex; flex-direction: column; justify-content: space-between; padding-top: 1mm; }
.f-linha { border-bottom: .25mm solid #9aa9ae; height: 8mm; display: flex; align-items: flex-end; padding-bottom: .8mm; }
.f-linha .fr { font-size: 6.8pt; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6b7d83; }
.f-dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; }
.f-checks { display: flex; gap: 5mm; font-size: 7.5pt; color: #4b5f66; padding-top: 2.5mm; }
.f-checks span::before { content: ""; display: inline-block; width: 3mm; height: 3mm; border: .25mm solid #6b7d83; border-radius: .6mm; margin-right: 1.2mm; vertical-align: -.5mm; }

/* Prévia na tela */
.previa { position: relative; overflow: hidden; border-radius: 14px; min-width: 0; }
.previa > * { transform-origin: top left; }
.previa-folha { background: #e3e9eb; padding: 18px; border-radius: 20px; }
.previa-folha .previa { max-width: 640px; margin: 0 auto; box-shadow: 0 6px 24px rgba(2, 53, 68, .14); border-radius: 4px; }
.previa-nota .previa { max-width: 400px; margin: 0 auto; }
.previa-nota { background: #fff; border: 1px solid var(--borda); border-radius: 16px; padding: 14px; }
.previa-folhas .folha + .folha { margin-top: 0; }

.abas-nota { margin-bottom: 24px; }
.nitem-linha { display: grid; grid-template-columns: 76px minmax(0, 1fr) 128px 110px 48px; gap: 10px; align-items: end; padding: 10px 0; border-bottom: 1px dashed var(--borda); }
.nitem-linha .entrada { height: 52px; padding: 0 14px; font-size: 16.5px; }
.nitem-linha + .nitem-linha .il-campo label { display: none; }
.opcoes-imp { display: grid; gap: 12px; }
.opcao-imp { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1.5px solid var(--borda-forte); border-radius: 16px; cursor: pointer; background: #fff; text-align: left; width: 100%; }
.opcao-imp:hover { border-color: var(--teal); }
.opcao-imp.sel { border-color: var(--teal); background: var(--teal-claro); }
.opcao-imp .oi-radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--borda-forte); flex-shrink: 0; margin-top: 2px; position: relative; background: #fff; }
.opcao-imp.sel .oi-radio { border-color: var(--teal); }
.opcao-imp.sel .oi-radio::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--teal); }
.opcao-imp b { display: block; font-size: 16.5px; }
.opcao-imp small { display: block; color: var(--texto-2); font-size: 14.5px; margin-top: 2px; }
.dica-imp { font-size: 14.5px; color: var(--texto-2); background: #f4f7f8; border-radius: 14px; padding: 14px 16px; margin-top: 18px; }
.dica-imp b { color: var(--texto); }
.lista-notas a { grid-template-columns: 92px 1fr auto 20px; }

@media (max-width: 720px) {
  .nitem-linha .il-rem { position: absolute; top: 14px; right: 14px; }
  .nitem-linha .il-sub label { display: none !important; }
  .nitem-linha .subtotal { height: auto; }
  .nitem-linha { grid-template-columns: 70px 1fr; background: #f7fafa; border: 1px solid var(--borda); border-radius: 16px; padding: 14px; margin-bottom: 12px; position: relative; align-items: start; }
  .nitem-linha + .nitem-linha .il-campo label { display: block; }
  .nitem-linha .il-desc { grid-column: 2; padding-right: 54px; }
  .nitem-linha .il-sub { grid-column: 1 / -1; }
  .lista-notas a { grid-template-columns: 1fr auto; }
  .previa-folha { padding: 10px; }
}

/* =========================================================
   Tema: fundo em degradê azul-petróleo + botões em vidro (liquid glass)
   ========================================================= */
html { background: #0b3441; }
body { background: transparent; position: relative; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70% 55% at 92% -8%, rgba(73, 179, 179, .50) 0%, rgba(73, 179, 179, 0) 62%),
    radial-gradient(55% 50% at -8% 108%, rgba(73, 179, 179, .28) 0%, rgba(73, 179, 179, 0) 60%),
    radial-gradient(40% 35% at 55% 45%, rgba(255, 255, 255, .05) 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(160deg, #052a36 0%, #0e3a47 42%, #18505a 75%, #226066 100%);
}

/* Vidro: receitas */
:root {
  --vidro-claro: linear-gradient(180deg, rgba(255, 255, 255, .26) 0%, rgba(255, 255, 255, .10) 100%);
  --vidro-borda: rgba(255, 255, 255, .34);
  --vidro-brilho: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -1px 0 rgba(255, 255, 255, .08);
  --vidro-sombra: 0 10px 30px rgba(1, 22, 29, .28);
  --vidro-blur: blur(18px) saturate(170%);
}

/* Topo */
.topo { background: rgba(4, 34, 44, .42); border-bottom-color: rgba(255, 255, 255, .08); }
.marca { color: #fff; }
.marca-icone { background: var(--vidro-claro); border: 1px solid var(--vidro-borda); box-shadow: var(--vidro-brilho), var(--vidro-sombra); backdrop-filter: var(--vidro-blur); -webkit-backdrop-filter: var(--vidro-blur); }
.menu { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.menu a { color: rgba(255, 255, 255, .74); }
.menu a:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.menu a.ativo {
  color: var(--whale);
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(234, 244, 245, .88));
  box-shadow: inset 0 1px 0 #fff, 0 4px 14px rgba(1, 22, 29, .25);
}

/* Textos sobre o fundo escuro */
.cab h1 { color: #fff; }
.cab .sub, .cab .sub.meta span { color: rgba(255, 255, 255, .72); }
.voltar, .voltar:hover { color: rgba(255, 255, 255, .85); }
.seletor-mes .mes-nome { color: #fff; }
main > .rodape-info { color: rgba(255, 255, 255, .72); border-top-color: rgba(255, 255, 255, .12); }
main > .rodape-info svg { color: rgba(255, 255, 255, .55); }

/* Cards brancos com acabamento de vidro fosco */
.card { background: rgba(255, 255, 255, .965); border-color: rgba(255, 255, 255, .7); box-shadow: inset 0 1px 0 #fff, 0 18px 50px rgba(1, 22, 29, .22); }

/* Cards escuros viram vidro sobre o degradê */
.escuro {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(73, 179, 179, .30) 0%, rgba(73, 179, 179, 0) 55%),
    linear-gradient(160deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, .05) 100%);
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 24px 60px rgba(1, 22, 29, .30);
  backdrop-filter: var(--vidro-blur); -webkit-backdrop-filter: var(--vidro-blur);
}
.gaveta { background: rgba(255, 255, 255, .10); border-color: rgba(255, 255, 255, .2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }

/* Botões de vidro: fora dos cards (sobre o degradê) */
.btn { position: relative; overflow: hidden; }
.btn-sec {
  background: var(--vidro-claro); color: #fff; border: 1px solid var(--vidro-borda);
  box-shadow: var(--vidro-brilho), var(--vidro-sombra);
  backdrop-filter: var(--vidro-blur); -webkit-backdrop-filter: var(--vidro-blur);
}
.btn-sec:hover { background: linear-gradient(180deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, .16)); color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-pri {
  background: linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(226, 241, 242, .90) 100%);
  color: var(--whale); border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 6px rgba(73, 179, 179, .18), 0 10px 30px rgba(1, 22, 29, .30);
}
.btn-pri:hover { background: #fff; color: var(--whale); }
.btn::after {
  content: ""; position: absolute; left: 1px; right: 1px; top: 1px; height: 50%;
  border-radius: inherit; border-bottom-left-radius: 0; border-bottom-right-radius: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .20), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.btn > * { position: relative; z-index: 1; }

/* Botões dentro dos cards brancos: vidro claro e vidro verde-azulado */
.card .btn-sec, .modal .btn-sec, .aviso .btn-sec {
  background: linear-gradient(180deg, #ffffff 0%, #eef4f5 100%); color: var(--texto);
  border: 1px solid rgba(2, 53, 68, .14);
  box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(2, 53, 68, .08);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.card .btn-sec:hover, .modal .btn-sec:hover, .aviso .btn-sec:hover { color: var(--teal-escuro); border-color: rgba(58, 123, 121, .5); background: linear-gradient(180deg, #fff, #e8f3f3); }
.card .btn-pri, .modal .btn-pri {
  background: linear-gradient(180deg, #5aa9a6 0%, #3a7b79 52%, #2f6b69 100%); color: #fff;
  border: 1px solid rgba(255, 255, 255, .35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -2px 6px rgba(1, 30, 36, .25), 0 10px 24px rgba(46, 103, 101, .32);
}
.card .btn-pri:hover, .modal .btn-pri:hover { background: linear-gradient(180deg, #62b3b0 0%, #3f8482 52%, #31706e 100%); color: #fff; }
.btn-perigo {
  background: linear-gradient(180deg, #e06a62 0%, #c9473f 55%, #b23a33 100%); color: #fff;
  border: 1px solid rgba(255, 255, 255, .3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 6px rgba(80, 10, 6, .25), 0 10px 24px rgba(178, 58, 51, .3);
}
.btn-perigo-sec { background: linear-gradient(180deg, #fff, #fdf3f2); box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(178, 58, 51, .08); }
.btn-pri:disabled, .btn-sec:disabled { opacity: .5; }

/* Pílulas e opções com brilho de vidro */
.pilula, .opcao {
  background: linear-gradient(180deg, #ffffff 0%, #f1f6f7 100%);
  box-shadow: inset 0 1px 0 #fff, 0 1px 3px rgba(2, 53, 68, .06);
}
.pilula.sel, .opcao.sel {
  background: linear-gradient(180deg, #5aa9a6 0%, #3a7b79 55%, #326f6d 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 5px rgba(1, 30, 36, .22), 0 6px 16px rgba(46, 103, 101, .25);
}
.opcao.entrada-op.sel { background: linear-gradient(180deg, #4fb184 0%, #2b8a5e 55%, #24774f 100%); }
.opcao.saida-op.sel, .pilula.sel-vermelho {
  background: linear-gradient(180deg, #e06a62 0%, #c9473f 55%, #b23a33 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 5px rgba(80, 10, 6, .22), 0 6px 16px rgba(178, 58, 51, .25);
}

/* Segmentados: claro dentro dos cards, vidro fora */
.seg { box-shadow: inset 0 1px 2px rgba(2, 53, 68, .08); }
.seg button.sel { background: linear-gradient(180deg, #fff, #f2f7f8); box-shadow: inset 0 1px 0 #fff, 0 2px 8px rgba(2, 53, 68, .14); }
main > .seg, .barra-fech .seg {
  background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
  backdrop-filter: var(--vidro-blur); -webkit-backdrop-filter: var(--vidro-blur);
}
main > .seg button { color: rgba(255, 255, 255, .78); }
main > .seg button:hover { color: #fff; }
main > .seg button.sel { color: var(--whale); }

/* Setas do seletor de mês */
.seta-clara {
  background: var(--vidro-claro); border: 1px solid var(--vidro-borda); color: #fff;
  box-shadow: var(--vidro-brilho), var(--vidro-sombra);
  backdrop-filter: var(--vidro-blur); -webkit-backdrop-filter: var(--vidro-blur);
}
.seta-clara:hover:not(:disabled) { border-color: rgba(255, 255, 255, .6); }

/* Avisos sobre o degradê */
.aviso { box-shadow: 0 10px 30px rgba(1, 22, 29, .18); }

/* Prévia da folha */
.previa-folha { background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15); }

@media print {
  html, body { background: #fff !important; }
  body::before { display: none !important; }
}

/* ---------------- Importar do Kromia ---------------- */
.tab-import { width: 100%; border-collapse: collapse; font-size: 15px; margin: 4px 0 12px; }
.tab-import th { text-align: left; font-size: 13px; font-weight: 600; color: var(--texto-2, #5b6b70); padding: 6px 4px; border-bottom: 1px solid rgba(2, 53, 68, .12); }
.tab-import td { padding: 7px 4px; border-bottom: 1px solid rgba(2, 53, 68, .07); }
.tab-import td small { color: var(--texto-2, #5b6b70); }
.tab-import .dir { text-align: right; white-space: nowrap; }
.tab-import tfoot td { font-weight: 700; border-bottom: 0; padding-top: 10px; }
.check-linha { display: flex; gap: 10px; align-items: center; font-size: 15px; cursor: pointer; }
.check-linha input { width: 18px; height: 18px; accent-color: #18505a; }

/* Marca: só o desenho, branco, sem caixa atrás */
.marca-icone { width: 38px; height: 38px; background: none; border: 0; border-radius: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; color: #fff; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .18)); }
.marca-icone svg { width: 100%; height: 100%; }
@media (max-width: 720px) { .marca-icone { width: 32px; height: 32px; } }
