/* ==========================================================================
   Webboleto — CSS central (tokens de design + estilos compartilhados)

   Antes desta centralização, cada template Thymeleaf duplicava o mesmo
   bloco <style> (tokens, reset, tipografia). Este arquivo único substitui
   todos eles, referenciado via <link rel="stylesheet"> em cada template.

   Estrutura deste arquivo:
     1. Tokens de design (:root)
     2. Reset
     3. Body base + modificador .page-center
     4. Classes compartilhadas entre múltiplas páginas
     5. Shell admin (header + sidebar) — sysadmin/admin
     6. CSS específico de UMA página só (login, index, revisao, landing)
   ========================================================================== */

/* -------------------------------------------------------------------------
   1. Tokens de design — união de todas as variáveis usadas em qualquer um
   dos 8 templates. --ink-soft/--paper-dim/--stamp-dim eram usadas só por
   index.html/revisao.html, mas ficam disponíveis globalmente.
   ------------------------------------------------------------------------- */
:root {
  --ink: #10182B;
  --ink-soft: #1B2740;
  --paper: #FBF7EE;
  --paper-dim: #EFE9D8;
  --stamp: #B34038;
  --stamp-dim: #8f342e;
  --verify: #4B7C6F;
  --text-on-ink: #E8E6DD;
  --text-on-ink-muted: #96A0B8;
  --text-on-paper: #1B2740;
  --text-on-paper-muted: #6b7385;

  --font-display: 'Fraunces', serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

/* -------------------------------------------------------------------------
   2. Reset
   ------------------------------------------------------------------------- */
* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

/* -------------------------------------------------------------------------
   3. Body base (background/gradiente/cor/fonte) + modificador .page-center

   Decisão desta tarefa: a base do body NÃO inclui padding — cada contexto
   define o próprio (via .page-center para as páginas centralizadas, via
   regra dedicada mais abaixo para revisao.html, e via .app-shell para o
   shell admin, que precisa ocupar a tela de ponta a ponta sem respiro
   herdado do body). min-height:100vh entra na base porque é visualmente
   inerte (não adiciona espaçamento) e era idêntico nos 8 templates
   originais — inclusive nas páginas do shell, onde convive sem conflito
   com o min-height:100vh do próprio .app-shell.
   ------------------------------------------------------------------------- */
body {
  background: var(--ink);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(179, 64, 56, 0.06), transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(75, 124, 111, 0.06), transparent 45%);
  color: var(--text-on-ink);
  font-family: var(--font-body);
  min-height: 100vh;
}

body.page-center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

/* -------------------------------------------------------------------------
   4. Classes compartilhadas entre múltiplas páginas
   ------------------------------------------------------------------------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--stamp);
  margin-bottom: 18px;
  font-weight: 500;
}

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 4vw, 30px);
  line-height: 1.2;
  margin: 0 0 10px;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.subtitle {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-on-ink-muted);
  margin: 0 0 32px;
}

/* Centralização de texto para as páginas com .page-center (login, index) —
   as demais (dashboard/shell, revisao) ficam com o alinhamento padrão à
   esquerda, sem precisar de override por página. */
body.page-center .eyebrow,
body.page-center h1,
body.page-center .subtitle {
  text-align: center;
}

footer {
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-on-ink-muted);
  opacity: 0.6;
  text-align: center;
}

.flash-message {
  font-size: 14px;
  margin: 0 0 24px;
  padding: 12px 18px;
  border-radius: 10px;
  background: rgba(75, 124, 111, 0.15);
  color: var(--text-on-ink);
}

.flash-message.is-error {
  background: rgba(179, 64, 56, 0.18);
}

.form-card {
  background: var(--paper);
  border-radius: 14px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.55);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-on-paper-muted);
}

.field input {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-on-paper);
  background: #FFFFFF;
  border: 1px solid rgba(27, 39, 64, 0.18);
  border-radius: 8px;
  padding: 9px 11px;
  width: 100%;
}

.field input:focus {
  outline: none;
  border-color: var(--verify);
  box-shadow: 0 0 0 2px rgba(75, 124, 111, 0.25);
}

.confirm-button {
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-on-ink);
  background: var(--verify);
  border: none;
  border-radius: 10px;
  padding: 11px 26px;
  cursor: pointer;
  transition: background 180ms ease;
}

.confirm-button:hover {
  background: #3d6a5e;
}

/* Mantidas mesmo após a reestruturação dos painéis (item 2) parar de usá-las
   diretamente — remover uma classe sem grep confirmando zero uso não é
   seguro (ver CLAUDE.md / prompt da tarefa). */
.panel-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-link {
  display: block;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-on-paper);
  background: #FFFFFF;
  border: 1px solid rgba(27, 39, 64, 0.18);
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.panel-link:hover {
  border-color: var(--verify);
  box-shadow: 0 0 0 2px rgba(75, 124, 111, 0.25);
}

.table-card {
  background: var(--paper);
  border-radius: 14px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.55);
  padding: 8px 28px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-on-paper-muted);
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid rgba(27, 39, 64, 0.18);
}

td {
  font-size: 14px;
  color: var(--text-on-paper);
  padding: 14px 10px;
  border-bottom: 1px solid rgba(27, 39, 64, 0.10);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

.col-acoes {
  white-space: nowrap;
  text-align: right;
}

.action-link {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--verify);
  text-decoration: none;
  margin-right: 14px;
}

.action-link:hover {
  text-decoration: underline;
}

.atuar-form {
  display: inline;
}

.atuar-button {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--verify);
  background: none;
  border: none;
  padding: 0;
  margin-right: 14px;
  cursor: pointer;
}

.atuar-button:hover {
  text-decoration: underline;
}

.delete-form {
  display: inline;
}

.delete-button {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--stamp);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.delete-button:hover {
  text-decoration: underline;
}

.empty-state {
  padding: 24px 10px;
  font-size: 14px;
  color: var(--text-on-paper-muted);
}

.toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.new-tenant-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-on-ink);
  background: var(--verify);
  border-radius: 10px;
  padding: 10px 18px;
  text-decoration: none;
  transition: background 180ms ease;
}

.new-tenant-link:hover {
  background: #3d6a5e;
}

/* -------------------------------------------------------------------------
   5. Shell admin (header + sidebar) — sysadmin-panel, sysadmin-tenant-list,
   sysadmin-tenant-form, sysadmin-tenant-edit, admin-panel.
   ------------------------------------------------------------------------- */

.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--ink-soft, #1B2740);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.app-sidebar__brand { display: flex; align-items: center; gap: 10px; }

.app-sidebar__brand-mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--stamp);
  background: var(--paper);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-sidebar__brand-name {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--text-on-ink);
}

.app-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }

.app-nav-link {
  display: block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-on-ink-muted);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 8px;
  border-left: 3px solid transparent;
  transition: background 150ms ease, color 150ms ease;
}

.app-nav-link:hover { color: var(--text-on-ink); background: rgba(232, 230, 221, 0.06); }

.app-nav-link.is-active {
  color: #FFFFFF;
  background: rgba(75, 124, 111, 0.18);
  border-left-color: var(--verify);
}

.app-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.app-header {
  background: var(--paper);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.app-header__title { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--text-on-paper); }

.app-header__user { display: flex; align-items: center; gap: 12px; }

.app-header__role-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #FFFFFF;
  background: var(--stamp);
  padding: 4px 8px;
  border-radius: 6px;
}

.app-header__name { font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--text-on-paper); }

.app-header__tenant {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-on-paper-muted);
  padding-left: 12px;
  border-left: 1px solid rgba(27, 39, 64, 0.18);
}

.app-header__logout-button {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--verify);
  background: none;
  border: 1px solid rgba(75, 124, 111, 0.35);
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  transition: background 150ms ease;
}

.app-header__logout-button:hover { background: rgba(75, 124, 111, 0.12); }

/* Aviso "atuando como admin do tenant X" (sys_admin usando o contexto de
   tenant ativo na sessão — ver AtuarComoAdminController). Cor de destaque
   (--stamp, vermelho) de propósito: precisa ser visualmente diferente do
   resto do header, nunca aparece para admin/user comuns. */
.app-impersonation-banner {
  background: var(--stamp);
  color: var(--text-on-ink);
  padding: 10px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
}

.app-impersonation-banner__button {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-on-ink);
  background: none;
  border: 1px solid rgba(232, 230, 221, 0.6);
  border-radius: 8px;
  padding: 5px 14px;
  cursor: pointer;
  transition: background 150ms ease;
}

.app-impersonation-banner__button:hover { background: rgba(232, 230, 221, 0.18); }

.app-main { flex: 1; padding: 32px 40px 48px; overflow-y: auto; }

.app-main .page { max-width: 900px; margin: 0; text-align: left; }
.app-main .eyebrow, .app-main h1, .app-main .subtitle { text-align: left; }

/* sysadmin-tenant-list.html: tabela é mais larga que o form padrão de 900px. */
.app-main .page.page--wide { max-width: 1320px; }

/* -------------------------------------------------------------------------
   6. CSS específico de UMA página só
   ------------------------------------------------------------------------- */

/* ---- login.html ---- */

body.page-center:not(:has(.stub-wrap)) .page {
  width: 100%;
  max-width: 400px;
}

/* login.html original tinha o fundo de erro (vermelho) como PADRÃO do
   .flash-message — diferente das demais páginas, cujo padrão é verde
   (sucesso) com .is-error para o caso vermelho. A mensagem de logout
   continua verde via style inline no próprio template (maior
   especificidade, não afetado por esta regra).

   Escopo via .page-login (não mais via ":not(:has(.stub-wrap))" genérico) —
   registrar.html (tarefa "autorregistro de tenant") também é page-center
   sem .stub-wrap, mas segue o padrão padrão (verde/sucesso com .is-error
   para erro), então precisava ficar de fora desta regra específica do
   login. */
body.page-login .flash-message {
  background: rgba(179, 64, 56, 0.18);
}

/* ---- index.html ---- */

body:has(.stub-wrap) .page {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Ajustes finos que diferiam do padrão compartilhado no index.html original
   (eyebrow/h1/subtitle/footer com métricas próprias, preservadas aqui). */
body:has(.stub-wrap) .eyebrow { margin-bottom: 28px; }
body:has(.stub-wrap) h1 { font-size: clamp(26px, 4.5vw, 34px); }
body:has(.stub-wrap) .subtitle { margin: 0 0 40px; max-width: 360px; }
body:has(.stub-wrap) footer { margin-top: 36px; }

.stub-wrap {
  position: relative;
  width: 100%;
}

.stub {
  position: relative;
  width: 100%;
  background: var(--paper);
  border-radius: 14px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  outline: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
  overflow: hidden;
}

.stub:focus-visible {
  box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--stamp);
}

.stub.is-dragover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 28px 70px -18px rgba(179, 64, 56, 0.45);
}

/* recortes laterais imitando o canhoto do boleto */
.notch {
  position: absolute;
  width: 26px;
  height: 26px;
  background: var(--ink);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  transition: background 180ms ease;
}
.notch::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: transparent;
}
.notch-left { left: -13px; }
.notch-right { right: -13px; }

.stub-body {
  padding: 44px 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.stub-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  color: var(--stamp);
  transition: transform 180ms ease;
}

.stub.is-dragover .stub-icon {
  transform: translateY(-4px);
}

.stub-instruction {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--text-on-paper);
  margin: 0;
}

.stub-alt {
  font-size: 14px;
  color: var(--text-on-paper-muted);
  margin: 2px 0 0;
}

.stub-alt .link {
  color: var(--stamp);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.stub-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-on-paper-muted);
  margin-top: 14px;
  opacity: 0.75;
}

.filename-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--verify);
  margin: 0;
}

.filename-row svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.error-row {
  font-size: 14px;
  color: var(--stamp);
  margin: 0;
  font-weight: 500;
}

[hidden] { display: none !important; }

/* ---- Linha de corte perfurada ---- */

.perforation {
  position: relative;
  height: 0;
  border-top: 2px dashed rgba(27, 39, 64, 0.22);
  margin: 0 22px;
}

/* ---- Faixa inferior estilo código de barras ---- */

.barcode-strip {
  padding: 18px 32px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.barcode {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 30px;
  opacity: 0.85;
}

.barcode span {
  display: block;
  width: 2px;
  background: var(--text-on-paper);
  border-radius: 1px;
}

.barcode-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-on-paper-muted);
}

input[type="file"] { display: none; }

.send-button {
  margin-top: 24px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-on-ink);
  background: var(--stamp);
  border: none;
  border-radius: 10px;
  padding: 14px 32px;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.send-button:hover:not(:disabled) {
  background: var(--stamp-dim);
}

.send-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.logout-bar {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}

.logout-button {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-on-ink-muted);
  background: transparent;
  border: 1px solid rgba(232, 230, 221, 0.25);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  text-decoration: none;
  transition: color 180ms ease, border-color 180ms ease;
}

.logout-button:hover {
  color: var(--text-on-ink);
  border-color: rgba(232, 230, 221, 0.5);
}

@media (max-width: 420px) {
  .stub-body { padding: 36px 20px 22px; }
  .barcode-strip { padding: 16px 20px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .stub, .stub-icon { transition: none; }
  .stub.is-dragover { transform: none; }
}

/* ---- revisao.html ----
   Página fora do shell e sem .page-center: body sem classe própria, então a
   distinção usa :has(.field-grid) (marcador já exclusivo desta página, sem
   precisar alterar o HTML) para restaurar o padding original (32px 20px
   64px) e o alinhamento à esquerda do conteúdo. */

body:has(.field-grid),
body:has(.revisao-page) {
  padding: 32px 20px 64px;
}

body:has(.field-grid) .page,
body:has(.revisao-page) .page {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

/* Ajustes finos que diferiam do padrão compartilhado no revisao.html
   original (subtitle mais largo, footer mais próximo do conteúdo). O espaço acima dos botões vem de
   .boleto-actions. */
body:has(.field-grid) .subtitle { margin: 0 0 36px; max-width: 560px; }
body:has(.field-grid) footer { margin-top: 12px; }

/* Botão secundário "Descartar" (fila de revisão persistida) e link de
   volta — só o necessário sobre .confirm-button/.logout-button. */
.discard-button {
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: #9a3b3b;
  background: transparent;
  border: 1px solid #9a3b3b;
  border-radius: 10px;
  padding: 10px 22px;
  cursor: pointer;
}

.discard-button:hover {
  background: rgba(154, 59, 59, 0.1);
}

.boleto-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 22px;
}

.boleto-actions .confirm-button,
.boleto-actions .discard-button {
  margin-top: 0;
}

.boleto-origin {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.7;
  margin: 0 0 8px;
}

.revisao-back-link {
  display: inline-block;
  margin-bottom: 20px;
}

.boleto-card {
  background: var(--paper);
  border-radius: 14px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.55);
  padding: 28px 28px 24px;
  margin-bottom: 28px;
}

.boleto-card-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--text-on-paper);
  margin: 0 0 20px;
}

/* Grid de 6 colunas iguais — só pra permitir posicionamento exato
   (largo=4/6, estreito=2/6, terço=2/6) igual ao desenho do boleto
   real. Cada campo tem grid-row E grid-column explícitos (classes
   .pos-*), então a posição não depende de ordem no DOM nem de
   auto-flow — inclusive as células vazias (ao lado do valor, do
   pagador e do CNPJ pagador) simplesmente não têm elemento nenhum
   naquele slot. */
.field-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px 18px;
}

.pos-linha        { grid-row: 1; grid-column: 1 / 7; }
.pos-beneficiario  { grid-row: 2; grid-column: 1 / 5; }
.pos-vencimento    { grid-row: 2; grid-column: 5 / 7; }
.pos-cnpj-benef    { grid-row: 3; grid-column: 1 / 5; }
.pos-agencia       { grid-row: 3; grid-column: 5 / 7; }
.pos-data-doc      { grid-row: 4; grid-column: 1 / 3; }
.pos-numero-doc    { grid-row: 4; grid-column: 3 / 5; }
.pos-nosso-numero  { grid-row: 4; grid-column: 5 / 7; }
.pos-valor         { grid-row: 5; grid-column: 5 / 7; }
.pos-divider       { grid-row: 6; grid-column: 1 / 7; }
.pos-pagador       { grid-row: 7; grid-column: 1 / 5; }
.pos-cnpj-pagador  { grid-row: 8; grid-column: 1 / 5; }

.field.is-baixa-confianca input {
  border-color: var(--stamp);
  background: rgba(179, 64, 56, 0.06);
}

.field.is-baixa-confianca input:focus {
  border-color: var(--stamp);
  box-shadow: 0 0 0 2px rgba(179, 64, 56, 0.25);
}

/* Erro de validação determinística: mais forte que is-baixa-confianca. */
.field.has-erro input {
  border: 2px solid var(--stamp);
  background: rgba(179, 64, 56, 0.16);
}

.field.has-erro input:focus {
  box-shadow: 0 0 0 3px rgba(179, 64, 56, 0.4);
}

.field.has-erro label {
  color: var(--stamp);
  font-weight: 600;
}

.field-error {
  font-size: 12px;
  font-weight: 500;
  color: var(--stamp);
}

.boleto-erro-aviso {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-left: 4px solid var(--stamp);
  background: rgba(179, 64, 56, 0.12);
  color: var(--stamp);
  font-size: 13px;
  font-weight: 600;
}

.confidence-flag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--stamp);
  font-weight: 500;
}

.pos-linha input {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.pos-divider {
  border-top: 2px dashed rgba(27, 39, 64, 0.22);
  align-self: center;
}

.results {
  width: 100%;
  text-align: left;
  margin-bottom: 28px;
}

.results-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--verify);
  margin: 0 0 10px;
}

.results-title.is-error {
  color: var(--stamp);
}

.result-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-item {
  background: rgba(75, 124, 111, 0.12);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
}

.result-item-invalid {
  background: rgba(179, 64, 56, 0.14);
  flex-direction: column;
  align-items: stretch;
}

.result-item-main {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-on-ink);
}

.result-errors {
  margin: 6px 0 0;
  padding: 0 0 0 18px;
  font-size: 13px;
  color: var(--stamp);
}

.result-errors li {
  margin: 2px 0;
}

@media (max-width: 560px) {
  .field-grid { grid-template-columns: 1fr; }
  .field-grid > * { grid-column: 1 / 2 !important; }
  .boleto-card { padding: 22px 18px 20px; }
}

/* ---- landing.html ----
   Página pública de marketing (destinada a visitantes de campanha),
   separada de "/" (upload de boleto, autenticado) e de /registrar (que
   reaproveita o padrão .page-center existente sem precisar de CSS novo).
   Layout próprio — nem o card único centralizado de .page-center, nem o
   shell admin/sys_admin — então ganha uma seção dedicada em vez de forçar
   reuso onde não cabe. Decisão desta tarefa: só desktop, mesmo critério já
   usado no shell admin/sys_admin (sem responsividade elaborada). */

body.landing-page {
  padding: 0;
}

.landing {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 40px 64px;
}

.landing-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 48px;
}

.landing-brand {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--text-on-ink);
}

.landing-login-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-on-ink-muted);
  text-decoration: none;
}

.landing-login-link:hover {
  color: var(--text-on-ink);
}

.landing-hero {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 72px;
}

.landing-hero h1 {
  font-size: clamp(30px, 5vw, 44px);
}

.landing-hero-subtitle {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.landing-cta {
  display: inline-block;
  margin-top: 0;
  text-decoration: none;
  font-size: 16px;
  padding: 14px 32px;
}

.landing footer {
  margin-top: 56px;
}