/* ==========================================================================
   Cabeçalho compartilhado das telas de extrato (index + resultado + erro).
   Abordagem "Opção 1": header root-site (zona BRANCA diagonal com o logo +
   zona AZUL com o nome do sistema) + tratamento de título de página.
   Prefixo .xth-  |  gov.br DS, sóbrio.  Tokens com fallback hex.
   O app alterna os headers desktop/mobile em 992px (custom.css), então o
   "modo mobile" abaixo usa o mesmo breakpoint (<= 991.98px).
   ========================================================================== */

.xth-sysbar,
.xth-shell {
  --xth-ink: #1c1c1c;
  --xth-muted: #5b6573;
  --xth-blue: var(--blue-warm-vivid-70, #1351b4);
  --xth-blue-dk: var(--blue-warm-vivid-80, #0c326f);
  --xth-tint: #eaf0fb;
  --xth-tint-ln: #c5d4eb;
  --xth-green: var(--green-cool-vivid-50, #168821);
  --xth-yellow: var(--yellow-vivid-20, #ffcd07);
  --xth-line: #dfe3e8;
}

/* ============ 1) HEADER DO SISTEMA (fundo azul) ============ */
.xth-sysbar {
  background: var(--blue-warm-vivid-70, #1351b4);
  background-image: linear-gradient(135deg, var(--blue-warm-vivid-80, #0c326f) 0%, var(--blue-warm-vivid-70, #1351b4) 78%);
}
.xth-rootbar {
  display: flex;
  align-items: stretch;
  min-height: 88px;
  text-decoration: none;
}
/* zona branca à esquerda com o logo, corte diagonal (mais larga em cima) */
.xth-rootbar-white {
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 10px 58px 10px 28px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 38px) 100%, 0 100%);
}
.xth-rootbar-white .xth-brasao { height: 58px; width: auto; display: block; }
.xth-rootbar-white .xth-wm { height: 38px; width: auto; display: block; }

/* zona azul à direita com o nome do sistema */
.xth-rootbar-blue {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 24px;
}
.xth-name-kicker {
  font-family: "Rawline", sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}
.xth-name-main {
  font-family: "Rawline", sans-serif;
  font-size: 1.18rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.18;
}

/* filete de assinatura na base do header (verde → amarelo) */
.xth-rule {
  height: 4px;
  background: linear-gradient(90deg, var(--xth-green) 0 60%, var(--xth-yellow) 60% 100%);
}

/* ---- header em modo mobile (app mostra o m_header abaixo de 992px) ---- */
@media (max-width: 991.98px) {
  .xth-rootbar { min-height: 72px; }
  .xth-rootbar-white {
    padding: 8px 34px 8px 14px;
    gap: 10px;
    clip-path: polygon(0 0, 100% 0, calc(100% - 26px) 100%, 0 100%);
  }
  .xth-rootbar-white .xth-brasao { height: 46px; }
  .xth-rootbar-white .xth-wm { height: 30px; }
  .xth-rootbar-blue { padding: 8px 14px; }
  .xth-name-kicker { font-size: 0.58rem; letter-spacing: 0.08em; }
  .xth-name-main { font-size: 1.02rem; }
}
@media (max-width: 380px) {
  /* telas muito estreitas: só o logo, sem o nome */
  .xth-rootbar { justify-content: flex-start; }
  .xth-rootbar-blue { display: none; }
}

/* ============ 2) TÍTULO DE CONTEÚDO (index + resultado) ============ */
.xth-shell {
  box-sizing: border-box;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 0 18px;
}
.xth-shell--narrow {
  max-width: 780px;
}
.xth-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  position: relative;
  padding-left: 18px;
}
/* barra azul vertical (accent) à esquerda do título */
.xth-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 5px;
  border-radius: 3px;
  background: var(--xth-blue);
}
.xth-head-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--xth-tint);
  color: var(--xth-blue);
  font-size: 1.15rem;
}
.xth-head-title {
  margin: 2px 0 0;
  font-family: "Rawline", sans-serif;
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1.2;
  color: var(--xth-ink);
}
.xth-head-sub {
  margin: 6px 0 0;
  font-size: 1rem;
  color: var(--xth-muted);
  max-width: 60ch;
}
.xth-tag {
  display: inline-flex;
  align-items: center;
  font-family: "Rawline", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--xth-blue-dk);
  background: var(--xth-tint);
  border: 1px solid var(--xth-tint-ln);
  border-radius: 100em;
  padding: 3px 12px;
}

@media (max-width: 600px) {
  .xth-shell { padding: 16px 0 14px; }
  .xth-head-title { font-size: 1.32rem; }
  .xth-head-icon { width: 40px; height: 40px; font-size: 1rem; }
}
