/* ============================================================
   DESIGN SYSTEM DO GOVERNO FEDERAL (br.gov.br)
   Tokens extraídos das páginas oficiais:
   - Azul primário: #1351B4 | Escuro: #0C326F | Mais escuro: #071D41
   - Verde: #168821 | Amarelo: #FFCD1D | Foco: #C28C00
   - Texto: #333333 (base) | #555555 (secundário/metadados)
   - Fonte: rawline, helvetica, arial, sans-serif
   - Botões: formato pílula (border-radius 1680px)
   ============================================================ */

@font-face {
    font-family: "rawline";
    src: url("../fonts/rawline-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "rawline";
    src: url("../fonts/rawline-500.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "rawline";
    src: url("../fonts/rawline-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "rawline";
    src: url("../fonts/rawline-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "rawline";
    src: url("../fonts/rawline-800.woff2") format("woff2");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-primary-default: #1351b4;
    --color-primary-dark: #0c326f;
    --color-primary-darken: #071d41;
    --color-primary-light: #e7f1fb;
    --color-success: #168821;
    --color-success-dark: #075b10;
    --color-success-light: #eaf6ec;
    --color-warning: #f8c036;
    --color-danger: #e52222;
    --color-danger-dark: #9a0e0e;
    --color-danger-light: #fbefef;
    --color-info-border: #99c1e8;
    --color-focus: #c28c00;
    --text: #333333;
    --text-secondary: #555555;
    --text-heading: #0c326f;
    --border: #cccccc;
    --border-light: #e0e0e0;
    --bg-gray: #f8f8f8;
    --font: "rawline", helvetica, arial, sans-serif;
    --surface-radius: 4px;
    --btn-radius: 1680px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

[hidden] { display: none !important; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow-x: hidden;
}

/* Normalização mobile (iOS/Android): remove estilos nativos de formulário */
input,
textarea,
select,
button {
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

a { color: var(--color-primary-default); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Ícones SVG (sprite inline) — escalam com o font-size local */
.ic {
    display: inline-block;
    width: 1em;
    height: 1em;
    fill: currentColor;
    vertical-align: -0.125em;
    flex: 0 0 auto;
}

.ic-2x { font-size: 2em; }

:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #fff;
    color: var(--color-primary-default);
    padding: 8px 16px;
    z-index: 1000;
}

.skip-link:focus { left: 0; }

/* ============================================================
   BARRA OFICIAL (fallback) — o componente barra-govbr se
   estiliza sozinho; aqui apenas o fallback sem internet
   ============================================================ */

.header-fallback {
    background: #fff;
    border-bottom: 1px solid var(--border-light);
}

.fallback-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    padding-bottom: 12px;
}

.fallback-logo img { height: 34px; display: block; }

.btn-sm {
    font-size: 14px;
    height: 32px;
    padding: 0 16px;
}

/* ============================================================
   LINHA DO PORTAL — nome do site + busca
   (replicada do portal gov.br)
   ============================================================ */

.portal-row {
    background: #fff;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.portal-row-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 18px;
    padding-bottom: 18px;
}

.site-name-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 auto;
    min-width: 0;
}

.ico-navegacao {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 20px;
    padding: 4px 6px;
    cursor: pointer;
    border-radius: var(--surface-radius);
    line-height: 1;
}

.ico-navegacao:hover { color: var(--color-primary-default); }

.site-name {
    font-size: 20px;
    font-weight: 400;
    min-width: 0;
}

.site-name a {
    color: var(--text);
    text-decoration: none;
}

.site-name a:hover {
    color: var(--color-primary-default);
    text-decoration: none;
}

/* Menu principal — painel fixo igual ao portal gov.br */
.main-nav {
    position: fixed;
    left: 0;
    right: 0;
    background: #ededed;
    box-shadow: 0 8px 6px -6px #808080;
    z-index: 90;
    display: flex;
    flex-direction: column;
}

.nav-columns {
    display: flex;
    align-items: stretch;
    flex: 1 1 auto;
    overflow: auto;
}

.nav-level {
    list-style: none;
    margin: 0;
    padding: 14px 0;
}

.nav-level-1 {
    width: 300px;
    flex: 0 0 300px;
    border-right: 1px solid #d0d0d0;
}

.nav-level-2 {
    flex: 1 1 340px;
    border-right: 1px solid #d0d0d0;
    min-width: 0;
}

.nav-level-3 {
    flex: 1 1 340px;
    min-width: 0;
}

.nav-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 13px 24px;
    font-family: var(--font);
    font-size: 15.5px;
    font-weight: 500;
    line-height: 1.35;
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

.nav-link .ic {
    font-size: 12px;
    color: #8a8a8a;
}

.nav-link:hover,
.nav-link.active {
    background: var(--color-primary-dark);
    color: #fff;
    text-decoration: none;
}

.nav-link:hover .ic,
.nav-link.active .ic { color: #fff; }

.nav-footer {
    background: #fff;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 16px 24px;
}

.nav-footer-block p {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #333;
}

.nav-footer-block > a {
    display: inline-block;
    margin-right: 20px;
    font-size: 14px;
    color: var(--color-primary-default);
}

.nav-footer-help {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary-default);
    align-self: center;
}

.nav-footer-social {
    display: flex;
    gap: 16px;
}

.nav-footer-social a {
    color: var(--color-primary-default);
    font-size: 19px;
}

.nav-footer a:hover { text-decoration: underline; }

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 85;
}

body.menu-open { overflow: hidden; }

.ico-navegacao.open { color: var(--color-primary-default); }

.portal-search {
    position: relative;
    flex: 0 1 320px;
    display: flex;
}

.portal-search input {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 6px;
    background: #ededed;
    padding: 0 44px 0 16px;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text);
    outline: none;
}

.portal-search input::placeholder {
    color: #666;
    font-style: italic;
}

.portal-search button {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    border-radius: 50%;
}

.portal-search button:hover { color: var(--color-primary-default); }

/* ============================================================
   FAIXA DO ÓRGÃO
   ============================================================ */

.ministry-strip {
    background: var(--color-primary-default);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
}

.ministry-strip .container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 11px;
    padding-bottom: 11px;
}

.flag-strip {
    width: 24px;
    height: 13px;
    border-radius: 2px;
    flex: 0 0 24px;
    background: linear-gradient(180deg,
        var(--color-success) 0 34%,
        #ffcd1d 34% 67%,
        #1a3f8f 67% 100%);
}

/* ============================================================
   PÍLULAS DE SERVIÇOS (mais acessados / em destaque)
   ============================================================ */

/* ============================================================
   TELAS DA SPA
   ============================================================ */

.screen { display: none; }

.screen.active {
    display: block;
    animation: screenIn 0.3s ease-out;
}

@keyframes screenIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   CONTEÚDO
   ============================================================ */

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 56px;
    min-height: 420px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 22px;
}

.breadcrumb a { color: var(--color-primary-default); }
.breadcrumb a:hover { text-decoration: underline; }

.breadcrumb .sep {
    font-size: 10px;
    color: #999;
}

.page-title {
    color: var(--color-primary-dark);
    font-size: 36px;
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 10px;
    max-width: 820px;
}

.page-lead {
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 28px;
    max-width: 820px;
}

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--surface-radius);
}

.card-pad { padding: 32px; }

.section-title {
    color: var(--color-primary-dark);
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 6px;
}

.section-hint {
    margin: 0 0 20px;
    font-size: 15px;
}

/* ============================================================
   HERO DA CONSULTA (padrão do mockup)
   ============================================================ */

.hero {
    position: relative;
    background:
        radial-gradient(circle at 88% 25%, rgba(38, 112, 232, 0.55) 0%, transparent 50%),
        linear-gradient(135deg, var(--color-primary-darken) 0%, #0d3a7a 100%);
    color: #fff;
    padding: 44px 48px;
    overflow: hidden;
}

.hero-text { max-width: 640px; position: relative; z-index: 1; }

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 16px;
    color: #fff;
}

.hero h1 {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
    margin: 0 0 14px;
}

.hero p {
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.88);
}

.hero-phone {
    position: absolute;
    right: 56px;
    top: 50%;
    transform: translateY(-42%) rotate(6deg);
    width: 128px;
    height: 230px;
    border: 3px solid rgba(255, 255, 255, 0.85);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-phone::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.5);
}

.hero-phone .ic {
    font-size: 56px;
    color: #fff;
}

/* ============================================================
   SELOS DE CONFIANÇA
   ============================================================ */

.trust-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--border-light);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 28px;
}

.trust-item + .trust-item { border-left: 1px solid var(--border-light); }

.trust-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 50%;
    background: var(--color-primary-default);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.trust-item strong {
    display: block;
    font-size: 15px;
    color: var(--color-primary-dark);
    font-weight: 700;
}

.trust-item span {
    font-size: 13.5px;
    color: var(--text);
}

/* ============================================================
   ÁREA DE CONSULTA (formulário + cartão lateral)
   ============================================================ */

.consulta-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 32px;
    padding: 32px;
    align-items: start;
}

.consulta-form .section-title {
    margin-bottom: 6px;
}

.consulta-form .section-hint {
    margin: 0 0 20px;
    font-size: 15px;
}

.consulta-form .input-field { max-width: none; }

.consulta-form .btn-block { width: 100%; margin-top: 24px; }

.side-card {
    background: var(--color-primary-light);
    border-radius: 12px;
    padding: 28px;
    text-align: center;
}

.side-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: var(--color-primary-default);
    color: #fff;
    font-size: 24px;
    margin-bottom: 14px;
}

.side-card p {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    text-align: center;
}

.side-card strong { color: var(--color-primary-dark); display: block; margin-bottom: 4px; font-size: 15.5px; }

/* ============================================================
   FORMULÁRIOS
   ============================================================ */

.field-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--text);
}

.cpf-label {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 12px;
}

.input-field {
    width: 100%;
    max-width: 360px;
    display: block;
    font-family: var(--font);
    font-size: 16px;
    padding: 0 14px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: var(--surface-radius);
    color: #333;
    background: #fff;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.input-field::placeholder { color: #999; }

.input-field:focus {
    border-color: var(--color-primary-default);
    box-shadow: 0 0 0 1px var(--color-primary-default);
}

.cpf-field {
    letter-spacing: 0.06em;
    font-size: 24px;
    font-weight: 600;
    padding: 16px 20px;
    height: 60px;
}

.cpf-field.is-invalid {
    border-color: var(--color-danger);
    box-shadow: 0 0 0 1px var(--color-danger);
}

.field-error {
    display: block;
    color: var(--color-danger-dark);
    font-size: 14px;
    font-weight: 600;
    margin-top: 6px;
}

/* ============================================================
   BOTÕES (pílula, padrão gov.br)
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    height: 40px;
    padding: 0 28px;
    border-radius: var(--btn-radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.08s;
}

.btn:active { transform: translateY(1px); }

/* Honeypot anti-bot — fora da viewport, mas presente no DOM */
.hp-field {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: var(--color-primary-default);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-dark);
    text-decoration: none;
}

.btn-secondary {
    background: #fff;
    color: var(--color-primary-default);
    border: 1px solid var(--color-primary-default);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--color-primary-light);
    text-decoration: none;
}

.btn-lg {
    height: 46px;
    font-size: 16px;
    padding: 0 36px;
}

.actions-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.actions-row .btn { flex: 0 1 auto; }

/* Feedback visual ao copiar o código PIX (app.js: setupCopyButton) */
.btn.copied {
    background: var(--color-success);
    border-color: var(--color-success);
    color: #fff;
}

.spinner {
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: spin 0.7s linear infinite;
    flex: 0 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   MENSAGENS (br-message)
   ============================================================ */

.message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border-radius: var(--surface-radius);
    padding: 16px 20px;
    font-size: 15px;
    line-height: 1.5;
    margin: 20px 0;
}

.message .ic { margin-top: 3px; flex: 0 0 auto; font-size: 18px; }

.message.info {
    background: var(--color-primary-light);
    border: 1px solid var(--color-info-border);
    color: var(--color-primary-dark);
}

.message.success {
    background: var(--color-success-light);
    border: 1px solid #a8d8b0;
    color: var(--color-success-dark);
}

.message.danger {
    background: var(--color-danger-light);
    border: 1px solid var(--color-danger);
    color: var(--color-danger-dark);
    font-weight: 600;
}

.message strong.title {
    display: block;
    margin-bottom: 4px;
}

.message ul {
    margin: 0;
    padding-left: 18px;
}

.message li { margin-bottom: 4px; }

/* ============================================================
   VALOR ENCONTRADO
   ============================================================ */

.found-box {
    background: var(--color-success-light);
    border: 1px solid #a8d8b0;
    border-radius: var(--surface-radius);
    padding: 32px;
    text-align: center;
}

.found-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.found-value {
    display: block;
    font-size: 44px;
    font-weight: 800;
    color: var(--color-success);
    line-height: 1.15;
    margin: 6px 0 10px;
}

.person-box {
    background: var(--color-primary-light);
    border: 1px solid var(--color-info-border);
    border-radius: var(--surface-radius);
    padding: 24px;
    margin-bottom: 24px;
}

.person-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 12px 0;
}

.person-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(19, 81, 180, 0.15);
}

.person-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.person-label {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.person-value {
    font-weight: 700;
    font-size: 16px;
    color: var(--color-primary-dark);
    text-align: right;
    word-break: break-word;
}

.person-name {
    font-weight: 800;
    font-size: 18px;
    color: var(--color-primary-dark);
    text-align: right;
    word-break: break-word;
}

.found-cpf {
    display: inline-block;
    color: var(--text);
    font-size: 15px;
}

.found-cpf strong { color: #333; }

.tag-success {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-success);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: var(--btn-radius);
    margin-top: 14px;
}

/* ============================================================
   RESUMOS DE VALORES
   ============================================================ */

.summary-box {
    background: var(--bg-gray);
    border: 1px solid var(--border-light);
    border-radius: var(--surface-radius);
    padding: 4px 24px;
    margin: 0 0 28px;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 15px;
}

.summary-row:last-child { border-bottom: none; }

.summary-row .label { color: var(--text); }

.summary-row .value {
    font-weight: 600;
    color: #333;
    text-align: right;
}

.summary-total {
    background: var(--color-success-light);
    margin: 8px -24px -4px;
    padding: 14px 24px;
    border-radius: var(--surface-radius);
}

.summary-total .label,
.summary-total .value {
    color: var(--color-success-dark);
    font-weight: 700;
}

/* ============================================================
   OPÇÃO DE PAGAMENTO
   ============================================================ */

.pay-option {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid var(--color-primary-default);
    background: #f5f8fd;
    border-radius: var(--surface-radius);
    padding: 16px 20px;
    margin-bottom: 8px;
}

.pay-radio {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin-top: 3px;
    border-radius: 50%;
    border: 5px solid var(--color-primary-default);
    background: #fff;
}

.pay-option strong {
    display: block;
    font-size: 16px;
    color: var(--color-primary-dark);
}

.pay-option span {
    font-size: 14px;
    color: var(--text);
}

/* ============================================================
   QR CODE
   ============================================================ */

.qr-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 32px;
    align-items: start;
    margin: 8px 0 16px;
}

.qr-frame {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--surface-radius);
    padding: 16px;
}

.qr-frame .qr-target {
    width: 216px;
    height: 216px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-target svg {
    width: 100%;
    height: 100%;
    display: block;
}

.qr-side { min-width: 0; }

.qr-amount-label {
    font-size: 13px;
    color: var(--text);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.qr-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin: 4px 0 20px;
}

.copy-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.copy-row .input-field {
    flex: 1 1 220px;
    max-width: none;
    min-width: 0;
    font-size: 13px;
    height: 40px;
    background: var(--bg-gray);
}

.copy-row .btn {
    flex: 0 0 auto;
    font-size: 14px;
    height: 40px;
    padding: 0 20px;
}

.copy-status {
    font-size: 13.5px;
    color: var(--color-success);
    font-weight: 600;
    min-height: 1.3em;
    margin: 6px 0 0;
}

.timer-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-gray);
    border: 1px solid var(--border-light);
    border-radius: var(--surface-radius);
    padding: 12px 18px;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text);
}

.timer-box .ic { color: #b54708; }

.timer-box strong {
    color: #b54708;
    font-variant-numeric: tabular-nums;
    font-size: 18px;
    font-weight: 700;
    margin-left: auto;
}

.footnote {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    color: var(--text);
    font-size: 14px;
    margin-top: 20px;
}

.footnote .ic { color: var(--color-primary-default); }

.secure-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text);
    font-size: 14px;
    margin-top: 24px;
}

.secure-foot .ic { color: var(--color-success); }

/* ============================================================
   TELA FINAL
   ============================================================ */

.final-head {
    background: var(--color-success);
    color: #fff;
    text-align: center;
    padding: 44px 24px;
}

.final-check {
    width: 76px;
    height: 76px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    animation: pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

@keyframes pop {
    from { transform: scale(0.3); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.final-head h2 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 700;
}

.final-head p {
    margin: 0 auto;
    max-width: 520px;
    font-size: 16px;
    opacity: 0.95;
}

.txn-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-light);
    border-radius: var(--surface-radius);
    overflow: hidden;
    font-size: 15px;
    margin: 12px 0 8px;
}

.txn-table th,
.txn-table td {
    padding: 13px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
}

.txn-table tr:last-child th,
.txn-table tr:last-child td { border-bottom: none; }

.txn-table th {
    width: 46%;
    font-weight: 500;
    color: var(--text);
}

.txn-table td {
    font-weight: 600;
    color: #333;
    text-align: right;
}

.txn-table .mono {
    font-family: "Consolas", "Courier New", monospace;
    letter-spacing: 0.02em;
}

.txn-table tr.liq th,
.txn-table tr.liq td {
    background: var(--color-success-light);
    color: var(--color-success-dark);
    font-weight: 700;
}

.badge-done {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-success);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: var(--btn-radius);
}

/* ============================================================
   RODAPÉ OFICIAL
   ============================================================ */

.govbr-footer {
    background: var(--color-primary-darken);
    color: #fff;
    margin-top: 64px;
}

.govbr-footer .container { padding-top: 40px; padding-bottom: 24px; }

.footer-logo {
    width: 165px;
    height: 60px;
    margin-bottom: 40px;
    display: block;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 28px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.footer-col h3 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 14px;
}

.footer-col h3 + h3 { margin-top: 22px; }

.footer-col h3 a { color: #fff; }

.footer-sub {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin: 12px 0 8px;
}

.footer-sub:first-of-type { margin-top: 0; }

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-col li { margin-bottom: 10px; }

.footer-col a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
}

.footer-col a:hover { color: #fff; }

.footer-col-logo {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.footer-social {
    padding: 24px 0;
}

.footer-social h3 {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 12px;
}

.footer-social ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 22px;
}

.footer-social a {
    color: rgba(255, 255, 255, 0.9);
    font-size: 22px;
}

.footer-social a:hover { color: #ffcd1d; }

.footer-copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-copyright a { color: #fff; }

.footer-social img {
    width: 22px;
    height: 22px;
    display: block;
}

/* ============================================================
   BANNER DE COOKIES (LGPD)
   ============================================================ */

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1080;
    background: var(--color-primary-dark);
    color: #fff;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.25);
}

.cookie-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.cookie-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    max-width: 640px;
}

.cookie-text a { color: #fff; text-decoration: underline; }

.cookie-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.cookie-actions .btn-outline-light {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.85);
    color: #fff;
}

.cookie-actions .btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); }

.cookie-gerenciar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 0;
    color: #fff;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    padding: 6px 2px;
}

.cookie-gerenciar:hover { text-decoration: underline; }

/* Modal de gerenciamento de cookies */

.cookie-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.cookie-modal {
    background: #fff;
    color: var(--text);
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    max-width: 520px;
    width: 100%;
    padding: 24px;
}

.cookie-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.cookie-modal-head h2 {
    font-size: 20px;
    color: var(--text-heading);
    margin: 0;
}

.cookie-modal-close {
    background: none;
    border: 0;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}

.cookie-modal-text { font-size: 14px; margin: 0 0 18px; }

.cookie-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.cookie-switch-row strong { display: block; font-size: 15px; }

.cookie-switch-row span:not(.cookie-slider) {
    font-size: 13px;
    color: var(--text-secondary);
}

.cookie-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.cookie-switch input { opacity: 0; width: 0; height: 0; }

.cookie-slider {
    position: absolute;
    inset: 0;
    background: #bbb;
    border-radius: 26px;
    transition: background 0.2s;
    cursor: pointer;
}

.cookie-slider::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
}

.cookie-switch input:checked + .cookie-slider { background: var(--color-primary-default); }

.cookie-switch input:checked + .cookie-slider::before { transform: translateX(22px); }

.cookie-switch.is-disabled .cookie-slider { opacity: 0.45; cursor: default; }

.cookie-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
}

/* ============================================================
   TOOLTIP "PARA COMEÇAR" (botão Entrar)
   ============================================================ */

.govbr-tooltip {
    position: absolute;
    top: 64px;
    right: 96px;
    z-index: 1070;
    background: var(--color-primary-default);
    color: #fff;
    border-radius: 4px;
    padding: 12px 36px 12px 16px;
    max-width: 240px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.govbr-tooltip::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 32px;
    width: 12px;
    height: 12px;
    background: var(--color-primary-default);
    transform: rotate(45deg);
}

.govbr-tooltip strong { display: block; margin-bottom: 2px; }

.govbr-tooltip p { margin: 0; line-height: 1.4; }

.govbr-tooltip-close {
    position: absolute;
    top: 6px;
    right: 6px;
    background: none;
    border: 0;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
}

/* ============================================================
   VLIBRAS (botão flutuante de acessibilidade)
   ============================================================ */

.vlibras-btn {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1060;
    width: 48px;
    height: 48px;
    background: var(--color-primary-default);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.vlibras-btn:hover { background: var(--color-primary-dark); color: #fff; }

/* ============================================================
   RESPONSIVO
   ============================================================ */

@media (max-width: 900px) {
    .footer-columns { grid-template-columns: repeat(3, 1fr); }
    .footer-col-logo { justify-content: flex-start; }
}

@media (max-width: 767px) {
    .page-title { font-size: 26px; }

    .portal-row-inner { flex-wrap: wrap; }

    .site-name { font-size: 16px; }

    .portal-search { flex: 1 1 100%; order: 3; }

    .nav-columns { flex-direction: column; }

    .nav-level-1,
    .nav-level-2,
    .nav-level-3 {
        width: 100%;
        flex: 1 1 auto;
        border-right: none;
    }

    .nav-level-2,
    .nav-level-3 { border-top: 1px solid #d0d0d0; }

    .nav-footer { flex-direction: column; gap: 14px; }

    .hero { padding: 30px 20px; }

    .hero h1 { font-size: 24px; }

    .cpf-field {
        font-size: 18px;
        padding: 12px 16px;
        height: 50px;
        max-width: 100%;
    }

    .cpf-label {
        font-size: 16px;
    }

    .input-field { max-width: 100%; }

    .hero-phone { display: none; }

    .trust-row { grid-template-columns: 1fr; }

    .trust-item + .trust-item {
        border-left: none;
        border-top: 1px solid var(--border-light);
    }

    .consulta-grid {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }

    .card-pad { padding: 20px; }

    .qr-grid { grid-template-columns: 1fr; justify-items: center; }
    .qr-side { width: 100%; }
    .qr-frame .qr-target { width: 180px; height: 180px; }
    .copy-row { flex-direction: column; }
    .copy-row .input-field { flex: 1 1 100%; font-size: 12px; }
    .copy-row .btn { width: 100%; justify-content: center; }

    .actions-row .btn { flex: 1 1 100%; }

    .txn-table th,
    .txn-table td {
        display: block;
        width: 100%;
        text-align: left;
    }

    .txn-table th {
        padding-bottom: 2px;
        border-bottom: none;
    }

    .txn-table td { padding-top: 2px; }

    .summary-total { margin: 8px -20px -4px; padding: 14px 20px; }

    .person-box { padding: 16px; margin-bottom: 20px; }
    .person-title { font-size: 12px; margin-bottom: 10px; }
    .person-row { padding: 10px 0; gap: 8px; }
    .person-label { font-size: 13px; }
    .person-value { font-size: 15px; }
    .person-name { font-size: 16px; }

    .found-box { padding: 20px 16px; }
    .found-value { font-size: 32px; }
    .found-label { font-size: 13px; }
    .qr-amount { font-size: 26px; }

    .footer-columns { grid-template-columns: 1fr; }

    .cookie-inner { flex-direction: column; align-items: stretch; gap: 14px; }

    .cookie-text { max-width: none; }

    .cookie-actions { flex-direction: column; align-items: stretch; gap: 10px; }

    .cookie-actions .btn { width: 100%; }

    .cookie-actions .cookie-gerenciar { justify-content: center; }

    .govbr-tooltip { right: 12px; top: 108px; max-width: 210px; }

    .vlibras-btn { right: calc(12px + env(safe-area-inset-right)); width: 42px; height: 42px; font-size: 19px; }

    /* Evita zoom automático do iOS em campos focados (fonte < 16px) */
    #pixCopy1,
    #pixCopy2 { font-size: 16px; }

    .cookie-inner { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

/* ============================================================
   IMPRESSÃO DO COMPROVANTE
   ============================================================ */

@media print {
    body { background: #fff; }

    barra-govbr,
    .header-fallback,
    .portal-row,
    .main-nav,
    .nav-overlay,
    .ministry-strip,
    .breadcrumb,
    .govbr-footer,
    .cookie-banner,
    .govbr-tooltip,
    .vlibras-btn,
    .secure-foot,
    .footnote,
    .actions-row { display: none !important; }

    .card { box-shadow: none; border: 1px solid #ddd; }

    .final-head {
        background: #fff !important;
        color: var(--color-success-dark);
        -webkit-print-color-adjust: exact;
    }
}
