/* =====================================================
   Declaração IR - SeuSaúde
   Padrão visual oficial: paleta teal #006666, Roboto + Merriweather
   ===================================================== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #006666;
    --primary-dark: #004444;
    --secondary: #008080;
    --accent: #00A6A6;
    --success: #52C41A;
    --warning: #b45309;
    --danger: #dc2626;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-light: #666666;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --border: #e0e0e0;
}

html, body { overflow-x: hidden; width: 100%; }
body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-primary);
    background: var(--bg-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: 'Merriweather', serif; font-weight: 700; line-height: 1.2; overflow-wrap: break-word; }
a { text-decoration: none; }

/* ============ HEADER ============ */
header {
    position: fixed; top: 0; left: 0; right: 0;
    background: rgba(26, 26, 26, .92);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}
header nav {
    max-width: 1200px; width: 100%; margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex; justify-content: space-between; align-items: center;
}
.logo { height: 60px; }
.nav-menu { display: flex; list-style: none; gap: 2rem; align-items: center; }
.nav-menu a {
    color: #fff; font-weight: 500; font-size: 0.95rem;
    transition: color 0.2s;
}
.nav-menu a:hover { color: var(--accent); }
.nav-contact {
    background: var(--accent); color: white !important;
    padding: 0.75rem 2rem; font-weight: 600; border-radius: 6px;
    white-space: nowrap; transition: all .25s;
    box-shadow: 0 2px 8px rgba(0, 166, 166, .3);
}
.nav-contact:hover {
    background: #25D366; transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, .3);
}
.nav-user-info {
    color: rgba(255, 255, 255, 0.85); font-size: 0.9rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.btn-link {
    background: none; border: none; color: var(--accent);
    cursor: pointer; font-size: 0.9rem; padding: 0.25rem 0.5rem;
    font-family: inherit;
}
.btn-link:hover { color: #fff; text-decoration: underline; }
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-toggle span {
    display: block; width: 24px; height: 2px;
    background: #fff; margin: 5px 0; border-radius: 2px;
}

/* ============ HERO ============ */
.hero {
    margin-top: 90px;
    padding: 5rem 2rem;
    min-height: 70vh;
    display: flex; align-items: center;
    background: linear-gradient(to bottom, #fafafa, #fff);
}
.hero-content {
    max-width: 1200px; width: 100%; margin: 0 auto;
    display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 4rem;
    align-items: center;
}
.hero-text h1 {
    font-size: 2.6rem; margin-bottom: 1.5rem; font-weight: 900;
}
.hero-text h1 .highlight { color: var(--primary); }
.hero-tag {
    display: inline-block; background: var(--primary); color: #fff;
    padding: 0.4rem 1.2rem; font-size: 0.8rem; font-weight: 600;
    margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: 1px;
    border-radius: 4px;
}
.hero-subtitle {
    font-size: 1.15rem; color: var(--text-secondary);
    margin-bottom: 2rem; line-height: 1.8;
}
.hero-cta { display: flex; gap: 1.5rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.btn {
    padding: 1rem 2.5rem; font-weight: 600; border-radius: 4px;
    display: inline-flex; align-items: center; justify-content: center;
    text-transform: uppercase; letter-spacing: 0.5px; font-size: 0.9rem;
    border: 2px solid transparent; cursor: pointer; font-family: inherit;
    transition: all .25s;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white; border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 102, 102, .25);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #003333 100%);
    border-color: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(0, 102, 102, .35);
    transform: translateY(-2px); color: white;
}
.btn-secondary {
    background: transparent; color: var(--primary);
    border-color: var(--primary);
}
.btn-secondary:hover { background: var(--primary); color: white; }
.btn-disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.hero-stats {
    margin-top: 2rem; padding: 1.5rem;
    background: var(--bg-white); border: 1px solid var(--border);
    border-radius: 8px;
}
.hero-stats h4 {
    font-family: 'Roboto', sans-serif; font-size: 1rem;
    margin-bottom: 1rem; color: var(--text-secondary); font-weight: 500;
}
.hero-stats ul { list-style: none; }
.hero-stats li {
    padding: 0.4rem 0 0.4rem 1.5rem; position: relative;
    font-size: 0.95rem; color: var(--text-light);
}
.hero-stats li::before {
    content: '\25B8'; position: absolute; left: 0;
    color: var(--primary); font-weight: bold;
}

.hero-visual {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px; padding: 3rem 2rem;
    color: white; text-align: center;
    box-shadow: 0 20px 60px rgba(0, 102, 102, 0.25);
}
.hero-visual-eyebrow {
    display: inline-block;
    font-size: 0.72rem; font-weight: 600; letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
    padding-bottom: 0.6rem; margin-bottom: 1.25rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.35);
}
.hero-visual h3 {
    font-size: 1.6rem; margin-bottom: 0.75rem; color: white;
}
.hero-visual p {
    color: rgba(255, 255, 255, 0.9); font-size: 1rem; line-height: 1.6;
}

/* ============ MÉTRICAS ============ */
.metrics { padding: 4rem 2rem; background: var(--bg-light); }
.metrics-container {
    max-width: 1200px; width: 100%; margin: 0 auto;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
    text-align: center;
}
.metric-item {
    background: var(--bg-white); padding: 2rem 1.5rem; border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform .2s, box-shadow .2s;
    border-top: 3px solid var(--primary);
}
.metric-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-top-color: var(--accent);
}
.metric-number {
    font-size: 2.5rem; font-weight: 700; color: var(--primary);
    font-family: 'Merriweather', serif;
    line-height: 1.1;
}
.metric-label {
    font-size: 0.78rem; color: var(--text-secondary);
    margin-top: 0.6rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px;
}

/* ============ SEÇÕES GENÉRICAS ============ */
.section-header { text-align: center; max-width: 800px; margin: 0 auto 4rem; }
.section-title { font-size: 2.25rem; margin-bottom: 1rem; }
.section-subtitle { font-size: 1.05rem; color: var(--text-secondary); }

/* ============ COMO FUNCIONA ============ */
.como { padding: 6rem 2rem; }
.como-grid {
    max-width: 1200px; width: 100%; margin: 0 auto;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
}
.como-card {
    padding: 2rem; border-radius: 8px;
    border: 1px solid var(--border);
    transition: all .3s;
}
.como-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
    transform: translateY(-4px);
}
.como-num {
    display: flex; flex-direction: column; gap: 5px;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}
.como-num span {
    display: block;
    width: 40px; height: 3px;
    background: var(--primary);
    border-radius: 2px;
}
.como-card:hover .como-num span { background: var(--accent); }
.como-card h3 {
    font-size: 1.15rem; margin-bottom: 0.6rem;
    font-family: 'Roboto', sans-serif; font-weight: 700;
}
.como-card p { color: var(--text-secondary); font-size: 0.92rem; }

/* ============ FEATURES (calculadora) ============ */
.features { padding: 6rem 2rem; background: var(--bg-light); }
.feat-grid {
    max-width: 1200px; width: 100%; margin: 0 auto;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
}
.feat-card {
    background: white; padding: 2rem; border-radius: 8px;
    border: 1px solid var(--border);
    transition: all .3s;
}
.feat-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px); border-color: var(--primary);
}
.feat-rule {
    display: block;
    width: 48px; height: 3px;
    background: var(--primary);
    border-radius: 2px;
    margin-bottom: 1.25rem;
    transition: width 0.25s ease, background 0.25s ease;
}
.feat-card:hover .feat-rule { width: 72px; background: var(--accent); }
.feat-card h3 {
    font-size: 1.1rem; margin-bottom: 0.6rem;
    font-family: 'Roboto', sans-serif; font-weight: 700;
}
.feat-card p { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.6; }

/* ============ APP / WIZARD ============ */
.app-shell {
    padding: 5rem 2rem;
    background: linear-gradient(180deg, #fafafa 0%, #f0f4f5 100%);
    border-top: 4px solid var(--primary);
}
.app-card {
    max-width: 980px; width: 100%; margin: 0 auto;
    background: var(--bg-white); border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid var(--border);
}

/* steps container */
.step { display: none; padding: 3rem 2.5rem; }
.step.active { display: block; }
.step h2 {
    font-size: 1.6rem; margin-bottom: 0.4rem;
    color: var(--text-primary); font-family: 'Merriweather', serif;
}
.step h2 small {
    color: var(--text-light); font-size: 0.95rem;
    font-family: inherit; font-weight: 400;
}
.step-sub {
    color: var(--text-secondary); font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* form fields */
.form-grid {
    display: grid; gap: 1.25rem 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-bottom: 1.5rem;
}
.fld { display: flex; flex-direction: column; gap: 0.4rem; }
.fld span {
    font-size: 0.875rem; font-weight: 600; color: var(--text-primary);
}
.fld em {
    color: var(--text-light); font-weight: 400;
    font-style: normal; font-size: 0.8rem;
}
.fld input, .fld select, .fld textarea {
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--border); border-radius: 6px;
    font-size: 0.95rem; background: var(--bg-white);
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit; color: var(--text-primary);
}
.fld input:focus, .fld select:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 102, 0.12);
}
.fld-full { grid-column: 1 / -1; }
.radio-row { display: flex; gap: 1.5rem; padding-top: 0.4rem; flex-wrap: wrap; }
.radio-row label {
    display: flex; align-items: center; gap: 0.4rem;
    cursor: pointer; font-weight: 500; font-size: 0.95rem;
    color: var(--text-primary);
}

/* avisos */
.aviso-box {
    background: #fff8e1; border-left: 4px solid var(--warning);
    padding: 1rem 1.25rem; border-radius: 4px;
    color: #6b4408; font-size: 0.9rem; margin-bottom: 1.5rem;
}
.aviso-box strong { color: #92400e; }
.aviso-warn { background: #fef2f2; border-left-color: var(--danger); color: #7f1d1d; }
.aviso-warn strong { color: var(--danger); }
.aviso-info {
    background: #e6f5f5; border-left-color: var(--primary); color: #003333;
}
.aviso-info strong { color: var(--primary-dark); }

/* step actions */
.step-actions {
    display: flex; justify-content: space-between; gap: 1rem;
    margin-top: 1rem; padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.step-actions .btn { padding: 0.85rem 2rem; font-size: 0.85rem; }

/* mensagens */
.step-msg {
    margin-top: 1rem; padding: 0.7rem 1rem;
    border-radius: 6px; font-size: 0.9rem;
}
.step-msg.ok { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.step-msg.err { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }

/* OTP */
.otp-box {
    margin-top: 1.5rem; padding: 1.5rem;
    border: 2px dashed var(--primary);
    border-radius: 8px; background: #f0f9f9;
}
.otp-box p { margin-bottom: 0.75rem; color: var(--text-primary); }
.otp-box input {
    font-size: 1.4rem; letter-spacing: 8px; text-align: center;
    padding: 0.75rem; border: 1.5px solid var(--border); border-radius: 6px;
    width: 220px; font-family: 'Roboto Mono', Consolas, monospace;
    margin-right: 0.75rem; vertical-align: middle;
}
.otp-actions { display: flex; gap: 0.75rem; margin-top: 0.75rem; flex-wrap: wrap; }

/* wizard header (steps) */
.wizard { display: none; }
.wizard.active { display: block; }
.wizard-header {
    background: var(--text-primary); padding: 1rem 2.5rem;
    overflow-x: auto;
}
.wizard-steps {
    display: flex; gap: 1.25rem; min-width: max-content;
    color: rgba(255, 255, 255, 0.55); font-size: 0.78rem;
    font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px;
}
.wizard-steps .ws {
    white-space: nowrap;
    padding-left: 0.65rem;
    border-left: 3px solid rgba(255, 255, 255, 0.18);
    transition: color 0.2s, border-color 0.2s;
}
.wizard-steps .ws-active { color: white; border-bottom: 2px solid var(--accent); padding-bottom: 0.25rem; }
.wizard-steps .ws-done { color: var(--accent); }
.wizard-steps .ws-ok { border-left-color: #86C98C; color: rgba(255, 255, 255, 0.85); }
.wizard-steps .ws-progresso { border-left-color: #b45309; color: rgba(255, 255, 255, 0.78); }
.wizard-steps .ws-pendente { border-left-color: rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.55); }

/* uploads */
.upload-area input[type="file"] { display: none; }
.upload-cta {
    border: 2px dashed var(--border); border-radius: 8px;
    padding: 2.5rem 1.5rem; text-align: center; cursor: pointer;
    transition: all .15s; background: #fafafa;
}
.upload-cta:hover, .upload-cta.drag {
    border-color: var(--primary); background: #f0f9f9;
    transform: scale(1.005);
}
.upload-icon {
    width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 28px; font-weight: 300;
    box-shadow: 0 4px 12px rgba(0, 166, 166, 0.3);
}
.upload-cta p { margin: 0; color: var(--text-primary); font-weight: 500; }
.upload-cta small { color: var(--text-light); font-size: 0.82rem; display: block; margin-top: 0.25rem; }

.uploads-list { margin-top: 1.5rem; display: grid; gap: 0.75rem; }
.up-item {
    background: var(--bg-light); border: 1px solid var(--border);
    border-radius: 8px; padding: 0.85rem 1.15rem;
    display: grid; grid-template-columns: 44px 1fr auto auto;
    gap: 1rem; align-items: center;
}
.up-icon {
    width: 44px; height: 44px; border-radius: 8px;
    background: var(--bg-white); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700; color: var(--primary);
    letter-spacing: 0.5px;
}
.up-meta { font-size: 0.9rem; min-width: 0; }
.up-name {
    font-weight: 600; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.up-detail {
    color: var(--text-light); font-size: 0.82rem; margin-top: 0.2rem;
}
.up-status {
    font-size: 0.72rem; padding: 0.25rem 0.6rem; border-radius: 999px;
    font-weight: 600; letter-spacing: 0.3px;
    white-space: nowrap;
}
.up-status-ok { background: #d1fae5; color: #065f46; }
.up-status-err { background: #fee2e2; color: #991b1b; }
.up-status-proc { background: #fdf6ec; color: #92400e; }
.up-rm {
    background: none; border: 1px solid var(--border);
    color: var(--text-light); cursor: pointer;
    font-size: 0.8rem; padding: 0.3rem 0.7rem; border-radius: 4px;
    font-family: inherit;
}
.up-rm:hover { color: var(--danger); border-color: var(--danger); }

/* Rendimentos especiais (bets, rural, exterior, trust) */
.rend-especiais {
    margin-top: 1.25rem;
    padding: 0.85rem 1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}
.rend-especiais summary {
    cursor: pointer;
    color: #1f2937;
    font-size: 0.92rem;
    line-height: 1.5;
    user-select: none;
}
.rend-especiais summary em { color: #64748b; font-style: normal; }
.rend-especiais[open] summary { margin-bottom: 0.85rem; padding-bottom: 0.6rem; border-bottom: 1px solid #e2e8f0; }
.rend-especiais .form-grid { margin-top: 0.4rem; }

/* Painel de Conferência final na aba Resultado */
.res-conferencia {
    padding: 1.25rem 1.4rem;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.res-conferencia-ok { background: #f0fdf4; border-color: #86C98C; }
.res-conferencia-pendente { background: #fffbeb; border-color: #d8b774; }
.res-conferencia h3 {
    margin: 0 0 0.4rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1f2937;
}
.res-conferencia .rc-resumo {
    margin: 0 0 0.85rem;
    font-size: 0.92rem;
    color: #475569;
}
.res-conferencia-pendente .rc-resumo strong { color: #b45309; }
.rc-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.rc-item {
    display: flex;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    background: #fff;
    border-radius: 6px;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #1f2937;
    border: 1px solid #e2e8f0;
}
.rc-icon {
    flex-shrink: 0;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 0.78rem;
}
.rc-ok .rc-icon { background: #15803d; }
.rc-err .rc-icon { background: #dc2626; }
.rc-err { background: #fef2f2; border-color: #fecaca; }

/* Reconciliação de divergências fontes/pagamentos */
.reconciliacao-aviso {
    display: none;
    padding: 0.75rem 1rem;
    margin: 0.6rem 0;
    border-radius: 6px;
    background: #fff;
    border-left: 4px solid #d8b774;
    font-size: 0.88rem;
    color: #1f2937;
    line-height: 1.5;
}
.reconciliacao-aviso strong { display: block; color: #92400e; margin-bottom: 0.2rem; }
.reconciliacao-aviso-erro { border-left-color: #dc2626; background: #fef2f2; }
.reconciliacao-aviso-erro strong { color: #991b1b; }

/* ============ RESULTADO ============ */
.res-cabecalho {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.res-cabecalho h2 {
    margin: 0 0 0.4rem;
    color: #1f2937;
    font-family: 'Merriweather', serif;
    font-weight: 700;
}
.res-cabecalho .step-sub {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.55;
    max-width: 56rem;
}

.resultado-box { display: grid; gap: 1.25rem; }

/* Hero card no topo: status grande do resultado da apuração */
.res-hero {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.5rem;
    padding: 1.75rem 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, #ffffff 0%, #f8faf9 100%);
}
.res-hero-pos {
    background: linear-gradient(135deg, #f1f5f9 0%, #f8fafc 100%);
    border-color: #86C98C;
}
.res-hero-neg {
    background: linear-gradient(135deg, #fef2f2 0%, #fff6f6 100%);
    border-color: #fecaca;
}
.res-hero-zero {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-color: #cbd5e1;
}
.res-hero-eyebrow {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4d7752;
    margin-bottom: 0.4rem;
}
.res-hero-titulo {
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: #1f2937;
    margin-bottom: 0.6rem;
}
.res-hero-valor {
    font-family: 'Merriweather', serif;
    font-weight: 900;
    font-size: 2.6rem;
    color: #1f2937;
    line-height: 1.05;
    margin-bottom: 0.6rem;
    letter-spacing: -0.01em;
}
.res-hero-pos .res-hero-valor { color: #15803d; }
.res-hero-neg .res-hero-valor { color: #b91c1c; }
.res-hero-zero .res-hero-valor { color: #475569; }
.res-hero-acoes { margin-top: 0.85rem; }
.res-hero-cta {
    background: #b91c1c;
    color: #fff;
    border: none;
    padding: 0.7rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
}
.res-hero-cta:hover { background: #991b1b; }
.res-hero-sub {
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.55;
    max-width: 38rem;
}
.res-hero-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.6rem;
    border-left: 1px solid rgba(15, 23, 42, 0.08);
    padding-left: 1.5rem;
}
.res-hero-mini {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.res-hero-mini span {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}
.res-hero-mini strong {
    font-size: 1rem;
    color: #1f2937;
    font-weight: 700;
}
@media (max-width: 720px) {
    .res-hero {
        grid-template-columns: 1fr;
        padding: 1.4rem 1.25rem;
    }
    .res-hero-right {
        border-left: none;
        border-top: 1px solid rgba(15, 23, 42, 0.08);
        padding-left: 0;
        padding-top: 1rem;
    }
    .res-hero-valor { font-size: 2.1rem; }
}

/* Alertas críticos */
.res-alertas {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem 1.4rem;
    border-radius: 10px;
    background: #fffbeb;
    border: 1px solid #d8b774;
}
.res-alertas h3 {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #92400e;
}
.res-alerta {
    padding: 0.75rem 0.95rem;
    border-radius: 6px;
    background: #ffffff;
    border-left: 4px solid #d8b774;
}
.res-alerta strong {
    display: block;
    color: #1f2937;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}
.res-alerta p {
    margin: 0;
    color: #475569;
    font-size: 0.86rem;
    line-height: 1.5;
}
.res-alerta-erro { border-left-color: #dc2626; }
.res-alerta-erro strong { color: #991b1b; }
.res-alerta-aviso { border-left-color: #b45309; }
.res-alerta-info { border-left-color: #3b82f6; }
.res-alerta-info strong { color: #1e40af; }

.res-card {
    background: var(--bg-light); border: 1px solid var(--border);
    border-radius: 8px; padding: 1.5rem;
}
.res-card h3 {
    margin: 0 0 1rem; font-size: 0.95rem; color: var(--text-primary);
    text-transform: uppercase; letter-spacing: 0.6px;
    border-bottom: 2px solid var(--border); padding-bottom: 0.6rem;
    font-family: 'Roboto', sans-serif; font-weight: 700;
}
.res-grid {
    display: grid; gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.res-item .lbl {
    color: var(--text-light); font-size: 0.72rem;
    text-transform: uppercase; letter-spacing: 0.4px;
    margin-bottom: 0.3rem;
}
.res-item .val {
    font-size: 1.3rem; font-weight: 700;
    color: var(--text-primary);
    font-family: 'Merriweather', serif;
}
.res-item.pos .val { color: var(--success); }
.res-item.neg .val { color: var(--danger); }

.res-modelo-grid {
    display: grid; gap: 1rem;
    grid-template-columns: 1fr 1fr; margin-top: 0.5rem;
}
.res-modelo {
    padding: 1.25rem; background: var(--bg-white);
    border: 1.5px solid var(--border); border-radius: 8px;
}
.res-modelo.vencedor {
    border-color: var(--primary); background: #f0f9f9;
    box-shadow: 0 4px 12px rgba(0, 102, 102, 0.08);
}
.res-modelo h4 { margin-bottom: 0.5rem; font-size: 0.95rem; }
.res-modelo .grande {
    font-size: 1.6rem; font-weight: 800;
    color: var(--primary); font-family: 'Merriweather', serif;
}
.res-modelo small { display: block; color: var(--text-light); font-size: 0.82rem; margin-top: 0.4rem; }

/* ============ CTA / FOOTER ============ */
.cta-final {
    padding: 5rem 2rem; background: var(--primary);
    color: white; text-align: center;
}
.cta-final-content { max-width: 800px; width: 100%; margin: 0 auto; }
.cta-final h2 {
    font-size: 2rem; margin-bottom: 1rem; color: white;
}
.cta-final p {
    font-size: 1.1rem; margin-bottom: 2rem;
    opacity: 0.95;
}
.cta-final .btn {
    background: white; color: var(--primary); border-color: white;
}
.cta-final .btn:hover {
    background: var(--accent); color: white; border-color: var(--accent);
}

footer.ftr {
    padding: 3rem 2rem 2rem; background: #1a1a1a; color: white;
}
.ftr-content {
    max-width: 1200px; width: 100%; margin: 0 auto;
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem;
}
.ftr-brand img { height: 50px; margin-bottom: 1rem; filter: brightness(0) invert(1); }
.ftr-brand p { color: rgba(255, 255, 255, 0.7); line-height: 1.7; font-size: 0.92rem; }
.ftr-section h4 {
    margin-bottom: 1rem; font-size: 1rem;
    font-family: 'Roboto', sans-serif; font-weight: 600;
}
.ftr-section ul { list-style: none; }
.ftr-section a {
    color: rgba(255, 255, 255, 0.7); display: block;
    padding: 0.4rem 0; font-size: 0.9rem;
}
.ftr-section a:hover { color: white; }
.ftr-bottom {
    margin-top: 2.5rem; padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center; color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}
.footnote {
    text-align: center; max-width: 720px; margin: 1.5rem auto 0;
    color: var(--text-light); font-size: 0.82rem;
    line-height: 1.6;
}

/* ============ RESPONSIVO ============ */
@media (max-width: 968px) {
    .mobile-toggle { display: block; }
    .nav-menu {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        background: #1a1a1a; flex-direction: column;
        padding: 1rem 1.5rem; gap: 0;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    }
    .nav-menu.active { display: flex; }
    .nav-menu li { list-style: none; width: 100%; }
    .nav-menu a {
        display: block; padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .hero-content { grid-template-columns: 1fr; gap: 2rem; }
    .metrics-container { grid-template-columns: repeat(2, 1fr); }
    .como-grid { grid-template-columns: repeat(2, 1fr); }
    .feat-grid { grid-template-columns: 1fr; }
    .ftr-content { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
}
@media (max-width: 768px) {
    header nav { padding: 0.5rem 1rem; }
    .logo { height: 42px; }
    .hero { margin-top: 62px; padding: 2rem 1rem; }
    .hero-text h1 { font-size: 1.6rem; }
    .hero-subtitle { font-size: 0.95rem; }
    .metrics, .como, .features { padding: 2.5rem 1rem; }
    .metric-number { font-size: 1.9rem; }
    .section-title { font-size: 1.5rem; }
    .step { padding: 2rem 1.25rem; }
    .step h2 { font-size: 1.3rem; }
    .res-modelo-grid { grid-template-columns: 1fr; }
    .cta-final { padding: 2.5rem 1rem; }
    .cta-final h2 { font-size: 1.4rem; }
    .hero-visual { padding: 2rem 1.25rem; }
    .hero-visual h3 { font-size: 1.3rem; }
    .como-card { padding: 1.5rem 1.25rem; }
    .como-num { gap: 4px; padding-bottom: 1rem; margin-bottom: 1.1rem; }
    .como-num span { width: 32px; height: 3px; }
    .feat-card { padding: 1.5rem 1.25rem; }
    .feat-rule { width: 36px; margin-bottom: 1rem; }
    .feat-card:hover .feat-rule { width: 56px; }
}
@media (max-width: 480px) {
    .logo { height: 36px; }
    .hero-text h1 { font-size: 1.35rem; }
    .metrics-container, .como-grid { grid-template-columns: 1fr; }
    .btn { width: 100%; padding: 0.85rem 1rem; }
    .step-actions .btn { padding: 0.75rem 1rem; }
}

/* ============ WIZARD ACTION BAR ============ */
.wizard-actions {
    display: flex; flex-wrap: wrap; gap: 0.5rem;
    padding: 0.75rem 1.25rem; background: #f5f5f5;
    border-bottom: 1px solid var(--border);
    border-radius: 8px 8px 0 0;
}
.btn-link-acao {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: white; color: var(--primary);
    border: 1px solid var(--border); border-radius: 6px;
    padding: 0.45rem 0.85rem; font-size: 0.84rem; font-weight: 500;
    font-family: inherit; cursor: pointer; transition: all 0.15s;
}
.btn-link-acao:hover { border-color: var(--primary); background: #f0f9f9; }
.btn-link-acao svg { stroke: currentColor; }

/* ============ PATRIMÔNIO TABS ============ */
.patr-tabs {
    display: flex; gap: 0.4rem; flex-wrap: wrap;
    border-bottom: 1px solid var(--border); margin-bottom: 1.25rem;
}
.ptab {
    background: transparent; border: none; padding: 0.75rem 1.1rem;
    font-family: inherit; font-size: 0.92rem; color: var(--text-light);
    cursor: pointer; border-bottom: 3px solid transparent;
    margin-bottom: -1px; font-weight: 500;
}
.ptab:hover { color: var(--primary); }
.ptab-active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.ptab-pane { display: none; }
.ptab-pane-active { display: block; }
.ptab-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1rem; gap: 1rem; flex-wrap: wrap;
}
.btn-sm { padding: 0.5rem 1rem !important; font-size: 0.85rem !important; }

.patr-list { display: flex; flex-direction: column; gap: 0.5rem; }
.patr-item {
    background: var(--bg-light); border: 1px solid var(--border);
    border-radius: 6px; padding: 0.85rem 1rem;
    display: grid; grid-template-columns: auto 1fr auto auto; gap: 0.85rem;
    align-items: center; font-size: 0.9rem;
}
.patr-item .pi-grupo {
    font-size: 0.72rem; background: var(--primary); color: white;
    padding: 0.18rem 0.5rem; border-radius: 4px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.4px;
}
.patr-item .pi-desc { color: var(--text-primary); }
.patr-item .pi-desc small { display: block; color: var(--text-light); font-size: 0.78rem; margin-top: 0.15rem; }
.patr-item .pi-val {
    font-family: 'Merriweather', serif; font-weight: 700;
    color: var(--text-primary); text-align: right;
}
.patr-item .pi-acoes { display: flex; gap: 0.4rem; }
.patr-item .pi-btn {
    background: white; border: 1px solid var(--border);
    border-radius: 4px; padding: 0.3rem 0.6rem; cursor: pointer;
    font-size: 0.78rem; color: var(--text-secondary);
}
.patr-item .pi-btn:hover { border-color: var(--primary); color: var(--primary); }
.patr-item .pi-btn-rm:hover { border-color: var(--danger); color: var(--danger); }
.patr-vazio {
    text-align: center; padding: 1.5rem; color: var(--text-light);
    font-size: 0.9rem; background: var(--bg-light);
    border: 1px dashed var(--border); border-radius: 6px;
}

/* ============ MENSAL GRID ============ */
.mensal-grade { display: grid; gap: 0.5rem; }
.mensal-row {
    display: grid; grid-template-columns: 130px 1fr 1fr 1fr 1fr 1fr; gap: 0.5rem;
    align-items: center; padding: 0.5rem 0.6rem;
    background: var(--bg-light); border-radius: 6px;
}
.mensal-row.mensal-head {
    background: var(--primary); color: white; padding: 0.6rem;
    font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.4px;
    font-weight: 600;
}
.mensal-row.mensal-head label,
.mensal-row.mensal-head label * { color: white !important; font-weight: 600; }
.mensal-row input {
    width: 100%; padding: 0.4rem 0.5rem; border: 1px solid var(--border);
    border-radius: 4px; font-family: inherit; font-size: 0.86rem;
}
.mensal-row label { font-weight: 500; color: var(--text-primary); }

/* ============ AUTO-MALHA ============ */
.malha-box {
    margin-top: 1.25rem; padding: 1.5rem;
    background: #fff8e1; border-left: 4px solid var(--warning);
    border-radius: 6px;
}
.malha-box h3 {
    color: #6b4408; font-size: 1rem; margin-bottom: 0.75rem;
    font-family: 'Roboto', sans-serif;
}
.malha-list { list-style: none; padding: 0; }
.malha-item {
    background: white; padding: 0.85rem 1rem; margin-bottom: 0.5rem;
    border-radius: 4px; border-left: 3px solid var(--warning);
}
.malha-item.sev-alta { border-left-color: var(--danger); }
.malha-item.sev-baixa { border-left-color: var(--accent); }
.malha-item strong { display: block; margin-bottom: 0.25rem; color: var(--text-primary); font-size: 0.92rem; }
.malha-item small { color: var(--text-light); font-size: 0.82rem; }

/* ============ MODAIS ============ */
.ir-modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem; overflow-y: auto;
}
.ir-modal-card {
    background: white; border-radius: 12px;
    max-width: 720px; width: 100%; max-height: 90vh;
    overflow-y: auto; box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    display: flex; flex-direction: column;
}
.ir-modal-head {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
}
.ir-modal-head h3 {
    margin: 0; font-size: 1.15rem; color: var(--text-primary);
    font-family: 'Roboto', sans-serif; font-weight: 600;
}
.ir-modal-close {
    background: none; border: none; font-size: 1.8rem;
    color: var(--text-light); cursor: pointer; line-height: 1;
    padding: 0; width: 32px; height: 32px;
}
.ir-modal-close:hover { color: var(--danger); }
.ir-modal-body { padding: 1.5rem; }
.ir-modal-body p { margin-bottom: 0.75rem; color: var(--text-secondary); font-size: 0.92rem; }

/* ============ LOGIN REPOSICIONADO ============ */
.login-hero { text-align: center; margin-bottom: 1.5rem; }
.login-hero h2 { font-size: 1.6rem; color: var(--primary); margin-bottom: 0.5rem; }
.login-hero .step-sub { max-width: 520px; margin: 0 auto; color: var(--text-secondary); }

.login-card {
    max-width: 460px; margin: 0 auto;
    background: white; border: 1px solid var(--border); border-radius: 12px;
    padding: 2rem 1.75rem; box-shadow: 0 8px 28px rgba(0, 102, 102, 0.08);
}
.login-form { display: flex; flex-direction: column; gap: 0.5rem; }
.login-label {
    font-size: 0.95rem; font-weight: 600; color: var(--text-primary);
    margin-bottom: 0.15rem;
}
.login-input {
    width: 100%; padding: 0.95rem 1rem; font-size: 1.05rem;
    border: 2px solid var(--border); border-radius: 8px;
    font-family: inherit; transition: all 0.15s;
    background: var(--bg-light);
}
.login-input:focus {
    outline: none; border-color: var(--primary); background: white;
    box-shadow: 0 0 0 3px rgba(0, 102, 102, 0.12);
}
.login-hint { color: var(--text-light); font-size: 0.82rem; margin-top: 0.2rem; line-height: 1.5; }
.btn-login {
    width: 100%; margin-top: 1rem; padding: 1rem 1.5rem !important;
    font-size: 0.95rem !important;
}

.login-otp-box {
    margin-top: 1.25rem; padding: 1.25rem; background: #f0f9f9;
    border: 1.5px solid var(--primary); border-radius: 10px;
}
.login-otp-titulo {
    font-weight: 600; color: var(--primary-dark);
    margin-bottom: 0.4rem; font-size: 1rem;
}
.login-otp-sub { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 0.75rem; }
.login-otp-input {
    width: 100%; padding: 1rem; font-size: 1.6rem; font-weight: 700;
    text-align: center; letter-spacing: 0.6rem;
    border: 2px solid var(--primary); border-radius: 8px;
    font-family: 'Roboto Mono', monospace; background: white;
    margin-bottom: 0.75rem;
}
.login-otp-input:focus { outline: none; box-shadow: 0 0 0 3px rgba(0, 102, 102, 0.18); }
.otp-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.otp-actions .btn { flex: 1; min-width: 130px; }

.govbr-divisor {
    display: flex; align-items: center; gap: 0.85rem;
    margin: 1.5rem 0 1rem; color: var(--text-light); font-size: 0.85rem;
}
.govbr-divisor::before, .govbr-divisor::after {
    content: ''; flex: 1; border-bottom: 1px solid var(--border);
}
.btn-govbr {
    display: inline-flex; align-items: center; gap: 0.6rem;
    width: 100%; justify-content: center;
    background: white; color: #1351b4;
    border: 1.5px solid #1351b4; border-radius: 8px;
    padding: 0.85rem 1.25rem; font-size: 0.95rem; font-weight: 600;
    font-family: inherit; cursor: pointer; transition: all 0.15s;
    text-decoration: none;
}
.btn-govbr:hover:not(:disabled) { background: #1351b4; color: white; transform: translateY(-1px); }
.btn-govbr:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-govbr small { font-size: 0.75rem; }

.consent-row {
    display: flex; align-items: flex-start; gap: 0.6rem;
    padding: 0.85rem 1rem; margin-bottom: 0.5rem;
    background: var(--bg-light); border-radius: 6px;
    border: 1px solid var(--border);
}
.consent-row input[type="checkbox"] { margin-top: 0.18rem; flex-shrink: 0; width: 18px; height: 18px; cursor: pointer; }
.consent-row label { font-size: 0.92rem; color: var(--text-secondary); cursor: pointer; line-height: 1.55; }
.consent-row a { color: var(--primary); text-decoration: underline; }
.consent-row em { color: var(--text-light); font-style: italic; font-size: 0.85rem; }
.consent-row-optional { border-style: dashed; background: #f6fbf7; }
.consent-row-optional label::before {
    content: "Opcional";
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #f1f5f9;
    color: #4d7752;
    padding: 0.12rem 0.45rem;
    border-radius: 3px;
    margin-right: 0.45rem;
    vertical-align: 0.05em;
}

.consent-status-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.6rem 0.85rem; background: var(--bg-light);
    border-radius: 6px; margin-bottom: 0.4rem; font-size: 0.9rem;
}
.consent-status-item .csi-tag {
    font-size: 0.72rem; padding: 0.2rem 0.55rem; border-radius: 4px;
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px;
}
.consent-status-item .csi-aceito { background: #15803d; color: white; }
.consent-status-item .csi-revogado { background: #6b7280; color: white; }
.consent-status-item .csi-pendente { background: #b45309; color: white; }

.log-item {
    padding: 0.4rem 0; border-bottom: 1px solid #e0e0e0;
    font-size: 0.82rem; display: grid;
    grid-template-columns: 130px 1fr; gap: 0.6rem;
}
.log-item:last-child { border-bottom: none; }
.log-item .log-tempo { color: var(--text-light); font-family: 'Roboto Mono', monospace; font-size: 0.78rem; }
.log-item .log-evento { color: var(--text-primary); }

.check-row { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.5rem 0; }
.check-row label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; color: var(--text-secondary); cursor: pointer; }

/* Histórico */
.hist-item {
    padding: 0.85rem 1rem; background: var(--bg-light);
    border-radius: 6px; margin-bottom: 0.5rem;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 0.75rem;
}
.hist-item .hi-info strong { display: block; font-size: 1rem; color: var(--text-primary); }
.hist-item .hi-info small { color: var(--text-light); font-size: 0.82rem; }
.hist-item .hi-actions { display: flex; gap: 0.4rem; }

/* ftr 4 colunas */
.ftr-content-4col { grid-template-columns: 2fr 1fr 1fr 1fr !important; }
@media (max-width: 968px) {
    .ftr-content-4col { grid-template-columns: 1fr !important; }
    .mensal-row { grid-template-columns: 1fr 1fr; }
    .mensal-row.mensal-head { display: none; }
    .patr-item { grid-template-columns: 1fr; gap: 0.5rem; text-align: left; }
    .patr-item .pi-val { text-align: left; }
}

/* ============ TOOLTIPS ============ */
.tip {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; margin-left: 0.35rem;
    background: var(--primary); color: #fff;
    border-radius: 50%; font-size: 0.68rem; font-weight: 700;
    cursor: help; user-select: none;
    position: relative; vertical-align: middle;
    transition: background 0.15s;
}
.tip:hover, .tip:focus {
    background: var(--primary-dark); outline: none;
}
.tip::after {
    content: attr(data-tip);
    position: absolute; left: 50%; bottom: calc(100% + 8px);
    transform: translateX(-50%);
    background: #1a1a1a; color: #fff;
    padding: 0.6rem 0.85rem;
    border-radius: 6px;
    font-size: 0.78rem; font-weight: 400;
    line-height: 1.5; letter-spacing: 0;
    white-space: normal; width: 240px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    opacity: 0; pointer-events: none;
    transition: opacity 0.15s;
    z-index: 100; text-align: left;
}
.tip::before {
    content: ''; position: absolute;
    left: 50%; bottom: calc(100% + 2px);
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1a1a1a;
    opacity: 0; pointer-events: none;
    transition: opacity 0.15s;
    z-index: 100;
}
.tip:hover::after, .tip:hover::before,
.tip:focus::after, .tip:focus::before {
    opacity: 1;
}
@media (max-width: 600px) {
    .tip::after { width: 180px; font-size: 0.74rem; }
}

/* ============ EXPLICATIVO POR ETAPA ============ */
.step-explica {
    background: #f0f9f9; border-left: 4px solid var(--primary);
    padding: 0.95rem 1.15rem; border-radius: 4px;
    margin-bottom: 1.5rem; font-size: 0.9rem;
    color: var(--text-secondary); line-height: 1.6;
}
.step-explica strong { color: var(--primary-dark); }
.step-explica em {
    display: block; margin-top: 0.4rem;
    font-style: normal; color: var(--text-light); font-size: 0.85rem;
}

/* ============ INDICADOR DE PROGRESSO ============ */
.wizard-progress {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.6rem 1.25rem; background: #fafafa;
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem; color: var(--text-secondary);
}
.wizard-progress .wp-step { font-weight: 600; color: var(--primary); }
.wizard-progress .wp-bar {
    flex: 1; height: 6px; background: #e0e0e0;
    border-radius: 999px; margin: 0 1rem; overflow: hidden;
}
.wizard-progress .wp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.4s ease; border-radius: 999px;
}

/* ============ AVISOS INLINE ============ */
.fld.fld-error input,
.fld.fld-error select {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}
.fld-msg {
    font-size: 0.78rem; margin-top: 0.25rem;
    color: var(--danger); display: none;
}
.fld.fld-error .fld-msg { display: block; }

/* ============ BOTÃO COM ÍCONE ============ */
.btn .btn-icon {
    width: 16px; height: 16px; margin-right: 0.5rem;
    flex-shrink: 0;
}
.btn:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}
.btn:disabled,
.btn.is-loading {
    opacity: 0.55; cursor: not-allowed; pointer-events: none;
    transform: none !important; box-shadow: none !important;
}
.btn-danger {
    background: transparent; color: var(--danger);
    border-color: var(--danger);
}
.btn-danger:hover { background: var(--danger); color: white; }

/* ============ FOCO VISÍVEL ============ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============ TOAST ============ */
.ir-toast {
    position: fixed; bottom: 24px; right: 24px;
    background: #1a1a1a; color: #fff;
    padding: 0.85rem 1.25rem; border-radius: 6px;
    font-size: 0.88rem; font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    z-index: 10000; max-width: 360px;
    transform: translateY(120%); opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-left: 4px solid var(--primary);
}
.ir-toast.show { transform: translateY(0); opacity: 1; }
.ir-toast-ok { border-left-color: var(--success); }
.ir-toast-err { border-left-color: var(--danger); }
.ir-toast-info { border-left-color: var(--accent); }
@media (max-width: 600px) {
    .ir-toast { left: 12px; right: 12px; max-width: none; bottom: 12px; }
}

/* ============ LOADER / SPINNER ============ */
.spinner {
    display: inline-block; width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%; vertical-align: middle;
    animation: spin 0.6s linear infinite; margin-right: 0.5rem;
}
.btn-secondary .spinner {
    border-color: rgba(0, 102, 102, 0.25);
    border-top-color: var(--primary);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ GLOSSÁRIO ============ */
.glossario {
    max-width: 980px; width: 100%; margin: 2rem auto 0;
    padding: 0 2rem;
}
.glossario-toggle {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px; padding: 1rem 1.25rem;
    cursor: pointer; font-family: inherit;
    font-size: 1rem; font-weight: 600; color: var(--primary-dark);
    transition: background 0.15s;
}
.glossario-toggle:hover { background: #ebf3f3; }
.glossario-toggle .gl-arrow {
    transition: transform 0.25s; font-size: 0.85rem;
}
.glossario.is-open .gl-arrow { transform: rotate(180deg); }
.glossario-content {
    display: none; padding: 1.5rem 1.25rem;
    background: #fafafa; border: 1px solid var(--border);
    border-top: none; border-radius: 0 0 8px 8px;
}
.glossario.is-open .glossario-content { display: block; }
.glossario-content dl {
    display: grid; gap: 0.85rem;
}
.glossario-content dt {
    font-weight: 700; color: var(--primary-dark);
    font-size: 0.95rem; margin-bottom: 0.15rem;
}
.glossario-content dd {
    color: var(--text-secondary); font-size: 0.9rem;
    line-height: 1.6; margin-left: 0;
}

/* ============ RESULTADO: CHECKLIST PRÓXIMAS AÇÕES ============ */
.proximas-acoes {
    background: linear-gradient(135deg, #f0f9f9 0%, #fafafa 100%);
    border: 1px solid var(--primary);
    border-radius: 8px; padding: 1.5rem;
    margin-top: 1.25rem;
}
.proximas-acoes h3 {
    margin: 0 0 0.4rem; color: var(--primary-dark);
    font-size: 1.05rem; font-family: 'Roboto', sans-serif;
}
.proximas-acoes p.pa-sub {
    color: var(--text-secondary); font-size: 0.88rem;
    margin: 0 0 1rem;
}
.proximas-acoes ul {
    list-style: none; padding: 0; display: grid; gap: 0.4rem;
}
.proximas-acoes li {
    display: flex; align-items: flex-start; gap: 0.6rem;
    padding: 0.65rem 0.85rem; background: white;
    border: 1px solid var(--border); border-radius: 6px;
    transition: border-color 0.15s;
}
.proximas-acoes li:hover { border-color: var(--primary); }
.proximas-acoes input[type="checkbox"] {
    margin-top: 0.18rem; width: 16px; height: 16px;
    accent-color: var(--primary); cursor: pointer;
}
.proximas-acoes label {
    flex: 1; font-size: 0.9rem; color: var(--text-primary);
    line-height: 1.5; cursor: pointer;
}
.proximas-acoes label small {
    display: block; color: var(--text-light); font-size: 0.8rem;
    margin-top: 0.15rem;
}
.proximas-acoes a { color: var(--primary); font-weight: 600; }
.proximas-acoes a:hover { text-decoration: underline; }

/* ============ MODAL CONFIRMAÇÃO ============ */
.confirm-modal-body {
    text-align: center; padding: 1.5rem !important;
}
.confirm-modal-body h4 {
    color: var(--text-primary); font-size: 1.1rem;
    margin-bottom: 0.6rem; font-family: 'Roboto', sans-serif;
}
.confirm-modal-body p {
    color: var(--text-secondary); margin-bottom: 1.25rem;
}
.confirm-actions {
    display: flex; gap: 0.6rem; justify-content: center;
    flex-wrap: wrap;
}
@media (max-width: 480px) {
    .confirm-actions .btn { width: 100%; }
}

/* ============ RENDA VARIÁVEL ============ */
.rv-toggle {
    display: flex; align-items: flex-start; gap: 0.7rem;
    background: var(--bg-light); border: 1px solid var(--border);
    border-radius: 6px; padding: 1rem 1.1rem; cursor: pointer;
    margin-top: 0.4rem;
}
.rv-toggle input[type="checkbox"] {
    width: 18px; height: 18px; cursor: pointer; accent-color: var(--primary);
    margin-top: 0.15rem;
}
.rv-toggle span { font-weight: 500; color: var(--text-primary); flex: 1; }
.rv-toggle small { display: block; color: var(--text-light); font-size: 0.82rem; font-weight: 400; margin-top: 0.2rem; }

.rv-tabs {
    display: flex; gap: 0.4rem; flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    margin-top: 1.25rem;
}
.rvtab {
    background: transparent; border: none; padding: 0.6rem 0.9rem;
    font-family: inherit; font-size: 0.88rem; color: var(--text-light);
    cursor: pointer; border-bottom: 3px solid transparent;
    margin-bottom: -1px; font-weight: 500;
}
.rvtab:hover { color: var(--primary); }
.rvtab-active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

.rv-descricao { margin-top: 0.5rem; }

.rv-grade { display: grid; gap: 0.4rem; margin-top: 0.6rem; }
.rv-row {
    display: grid;
    grid-template-columns: 70px 1fr 1fr 1fr 110px 110px 200px;
    gap: 0.5rem; align-items: center; padding: 0.45rem 0.6rem;
    background: var(--bg-light); border-radius: 6px; font-size: 0.86rem;
}
.rv-row.rv-head {
    background: var(--primary); color: white; padding: 0.55rem 0.6rem;
    font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.4px;
    font-weight: 600;
}
.rv-row.rv-head label,
.rv-row.rv-head label * { color: white !important; font-weight: 600; }

/* Detalhamento de uploads consolidados (banco/corretora) */
.up-multilinha { margin-top: 0.5rem; font-size: 0.84rem; }
.up-multilinha summary { cursor: pointer; color: var(--primary); font-weight: 500; padding: 0.25rem 0; user-select: none; }
.up-multilinha summary:hover { text-decoration: underline; }
.up-multilinha .up-grupo { margin-top: 0.5rem; color: var(--text-primary); font-size: 0.82rem; }
.up-multilinha .up-linhas { margin: 0.25rem 0 0.5rem 1rem; padding: 0; list-style: none; }
.up-multilinha .up-linhas li { padding: 0.2rem 0; border-bottom: 1px dashed var(--border); font-size: 0.8rem; color: var(--text-primary); }
.up-multilinha .up-linhas li:last-child { border-bottom: none; }

/* Projeção de restituição */
.res-projecao { background: linear-gradient(135deg, #f0fdf4 0%, #f0f9ff 100%); border-left: 4px solid #15803d; }
.res-projecao h3 { color: #15803d; }
.res-projecao .proj-atual { font-size: 1.05rem; padding: 0.6rem 0.9rem; border-radius: 6px; margin: 0.4rem 0 1rem; background: white; border: 1px solid #e5e7eb; }
.res-projecao .proj-atual.proj-pos { color: #15803d; }
.res-projecao .proj-atual.proj-neg { color: #b91c1c; }
.res-projecao .proj-impacto { font-size: 0.94rem; color: var(--text-primary); margin-bottom: 0.5rem; }
.res-projecao .proj-impacto strong { color: #15803d; }
.res-projecao .proj-aviso { font-size: 0.78rem; color: #64748b; font-style: italic; margin-bottom: 1rem; }
.res-projecao .proj-lista { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.65rem; }
.res-projecao .proj-item { padding: 0.75rem 0.9rem; background: white; border: 1px solid #e5e7eb; border-radius: 6px; }
.res-projecao .proj-item-titulo { font-weight: 600; font-size: 0.92rem; color: var(--text-primary); }
.res-projecao .proj-item-desc { font-size: 0.83rem; color: #475569; margin: 0.3rem 0; line-height: 1.45; }
.res-projecao .proj-item-ganho { font-size: 0.84rem; color: #15803d; font-weight: 600; }
.res-projecao .proj-item-ganho small { color: #64748b; font-weight: 400; font-style: italic; }
.res-projecao .proj-lembrete { margin-top: 1.25rem; padding: 0.85rem 1rem; background: #fffbeb; border: 1px solid #d8b774; border-radius: 6px; font-size: 0.86rem; color: #78350f; }
.res-projecao .proj-lembrete ul { margin: 0.4rem 0 0 1.2rem; padding: 0; }
.res-projecao .proj-lembrete li { margin: 0.3rem 0; line-height: 1.45; }
.rv-row.rv-head label .hint {
    display: inline-block; width: 14px; height: 14px; line-height: 13px; text-align: center;
    background: rgba(255,255,255,0.25); color: white; border-radius: 50%;
    font-size: 0.7rem; cursor: help; margin-left: 0.2rem;
}
.rv-row input {
    width: 100%; padding: 0.4rem 0.5rem; border: 1px solid var(--border);
    border-radius: 4px; font-family: inherit; font-size: 0.84rem;
}
.rv-row label { font-weight: 500; color: var(--text-primary); }
.rv-row .rv-out { text-align: right; font-weight: 600; }
.rv-row .rv-acoes { display: flex; gap: 0.3rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.rv-row .rv-imposto { color: var(--danger); }
.rv-row .rv-ganho-pos { color: #15803d; }
.rv-row .rv-ganho-neg { color: var(--danger); }

.rv-tag {
    display: inline-block; padding: 0.15rem 0.5rem;
    border-radius: 12px; font-size: 0.72rem;
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px;
}
.rv-tag-isento { background: #d1fae5; color: #065f46; }
.rv-tag-pago { background: #dbeafe; color: #1e3a8a; }
.pi-btn-darf { border-color: var(--primary) !important; color: white !important; background: var(--primary) !important; }
.pi-btn-darf:hover { background: var(--primary-dark) !important; }

.rv-totais { margin-top: 1.25rem; }
.rv-totais-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.6rem;
}
.rv-tot-card {
    background: white; border: 1px solid var(--border);
    border-radius: 6px; padding: 0.85rem 1rem; font-size: 0.88rem;
}
.rv-tot-card .lbl {
    font-weight: 600; color: var(--primary); font-size: 0.82rem;
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.4rem;
}
.rv-prej-box {
    margin-top: 0.85rem; padding: 0.85rem 1rem;
    background: #fff8e1; border-left: 3px solid var(--warning);
    border-radius: 6px; font-size: 0.92rem;
}
.rv-total-final {
    margin-top: 0.85rem; padding: 0.85rem 1rem;
    background: #fff1f0; border-left: 3px solid var(--danger);
    border-radius: 6px; font-weight: 600; color: var(--text-primary);
}

@media (max-width: 760px) {
    .rv-row {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "label label" "v1 v2" "v3 v3" "out1 out2" "acoes acoes";
    }
    .rv-row.rv-head { display: none; }
    .rv-row label { grid-area: label; font-size: 1rem; color: var(--primary); }
    .rv-row input:nth-of-type(1) { grid-area: v1; }
    .rv-row input:nth-of-type(2) { grid-area: v2; }
    .rv-row input:nth-of-type(3) { grid-area: v3; }
    .rv-row .rv-out:nth-of-type(1) { grid-area: out1; }
    .rv-row .rv-out:nth-of-type(2) { grid-area: out2; }
    .rv-row .rv-acoes { grid-area: acoes; justify-content: stretch; }
}


/* =====================================================
   CADASTRO COMPLETO (step obrigatório pós-OTP)
   ===================================================== */
.cadastro-card {
    margin-top: 0.75rem;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.cad-secao {
    border-top: 1px dashed #e0e0e0;
    padding-top: 1.1rem;
}
.cad-secao:first-child {
    border-top: 0;
    padding-top: 0;
}
.cad-titulo {
    margin: 0 0 0.85rem;
    font-size: 0.95rem;
    color: #003333;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.cad-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.78rem;
    color: #666;
    font-style: italic;
}
.cad-tip {
    display: inline-block;
    width: 1.1rem;
    height: 1.1rem;
    line-height: 1.1rem;
    text-align: center;
    border-radius: 50%;
    background: #e0f0f0;
    color: #006666;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: help;
    margin-left: 0.25rem;
    border: 1px solid #b3d9d9;
}
.cad-msg {
    margin: 0;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.88rem;
}
.cad-msg-info {
    background: #eef7f7;
    color: #003333;
    border-left: 3px solid #006666;
}
.cad-msg-err {
    background: #fdecec;
    color: #b91c1c;
    border-left: 3px solid #b91c1c;
}
.cad-msg-ok {
    background: #ecfdf3;
    color: #15803d;
    border-left: 3px solid #15803d;
}
.cad-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}
#btn-salvar-cadastro:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
@media (max-width: 640px) {
    .cadastro-card { padding: 1rem; }
    .cad-actions { flex-direction: column; }
    .cad-actions .btn { width: 100%; }
}

/* ============ DARF: cartão e listagem ============ */
.darf-card {
    margin-top: 1.5rem;
    background: #fff;
    border: 1px solid #d6e6e6;
    border-radius: 10px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.darf-card-head {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.darf-card-head h3 {
    margin: 0; font-size: 1.05rem; font-weight: 600;
    color: #003333;
}
.darf-glossario {
    margin: 0 0 0.85rem;
    font-size: 0.85rem;
    color: #555;
    background: #f0f9f9;
    border-left: 3px solid #006666;
    padding: 0.5rem 0.7rem;
    border-radius: 4px;
}
.darf-lista { display: flex; flex-direction: column; gap: 0.55rem; }
.darf-empty { color: #777; font-size: 0.9rem; padding: 0.85rem; background: #fafafa; border-radius: 6px; text-align: center; }

.darf-item {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 0.85rem;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 0.95rem;
}
.darf-item-info { display: flex; flex-direction: column; gap: 0.18rem; flex: 1 1 250px; min-width: 0; }
.darf-item-info strong { font-size: 0.98rem; color: #003333; }
.darf-item-info small { color: #666; font-size: 0.78rem; }
.darf-item-actions { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }

.darf-status {
    font-size: 0.7rem; padding: 0.18rem 0.5rem; border-radius: 3px;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    color: #fff;
}
.darf-st-rascunho { background: #6b7280; }
.darf-st-aprovado { background: #b45309; }
.darf-st-emitido  { background: #006666; }
.darf-st-pago     { background: #15803d; }
.darf-st-cancelado{ background: #991b1b; }

/* Form do modal */
.darf-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem 1rem;
    margin: 0.5rem 0 0.85rem;
}
.darf-form-grid label {
    display: flex; flex-direction: column; gap: 0.25rem;
    font-size: 0.85rem; color: #444; font-weight: 500;
}
.darf-form-grid input, .darf-form-grid select {
    padding: 0.55rem 0.7rem;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
}
@media (max-width: 580px) { .darf-form-grid { grid-template-columns: 1fr; } }

.darf-preview, .darf-resumo {
    margin-top: 0.85rem;
    padding: 0.85rem 1rem;
    background: #f8fafa;
    border: 1px solid #d6e6e6;
    border-radius: 8px;
}
.darf-preview h4 { margin: 0 0 0.5rem; font-size: 0.95rem; color: #003333; }
.darf-preview-tbl {
    width: 100%; border-collapse: collapse; font-size: 0.88rem;
}
.darf-preview-tbl th {
    text-align: left; padding: 0.32rem 0.4rem 0.32rem 0;
    font-weight: 500; color: #555; width: 36%;
}
.darf-preview-tbl td { padding: 0.32rem 0; color: #1a1a1a; }
.darf-preview-tbl tr.darf-tot th, .darf-preview-tbl tr.darf-tot td {
    border-top: 1px solid #cfd8dc;
    padding-top: 0.55rem; font-size: 0.95rem;
}
.darf-obs { font-size: 0.83rem; color: #555; margin: 0.55rem 0 0; }

.darf-aviso-amarelo {
    background: #fff8e6;
    border: 1px solid #f0d896;
    color: #6b4d00;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 0.85rem;
}
.darf-confirma-label {
    display: block; margin: 0.85rem 0 0.4rem;
    font-size: 0.92rem; color: #1a1a1a;
}
.darf-confirma-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 2px solid #b45309;
    border-radius: 6px;
    font-family: 'Roboto Mono', Consolas, monospace;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.darf-confirma-input:focus { outline: 2px solid #b45309; outline-offset: 1px; }

.darf-pill {
    display: inline-block; font-size: 0.74rem; padding: 0.2rem 0.55rem;
    border-radius: 3px; font-weight: 600; letter-spacing: 0.4px;
    text-transform: uppercase;
}
.darf-pill-ok { background: #15803d; color: #fff; }
.darf-pill-warn { background: #b45309; color: #fff; }

.darf-linha {
    margin-top: 0.65rem; padding: 0.55rem 0.7rem;
    background: #fff8e6; border: 1px solid #f0d896; border-radius: 6px;
    font-size: 0.78rem; color: #5a4400; word-break: break-all;
}
.darf-linha code { font-family: 'Roboto Mono', Consolas, monospace; font-size: 0.82rem; }

.darf-rodape-aviso {
    margin: 0.85rem 0 0;
    font-size: 0.8rem; color: #666; text-align: center;
}

.btn-sm { padding: 0.45rem 0.85rem !important; font-size: 0.82rem !important; }
.pi-btn-rm { background: #fee2e2 !important; color: #991b1b !important; border-color: #fca5a5 !important; }

/* ============================================================
   gov.br : badge de identidade no header, banner do cadastro,
   campos verificados e seção "Identidade" no modal Meus dados.
   ============================================================ */

.id-badge {
    display: inline-block;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    line-height: 1.2;
    border: 1px solid transparent;
    cursor: help;
    white-space: nowrap;
    user-select: none;
}
.id-badge:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
.id-badge-ouro {
    background: linear-gradient(135deg, #fdf6ec 0%, #b45309 60%, #b45309 100%);
    color: #4a2f04;
    border-color: #b45309;
    box-shadow: 0 1px 3px rgba(180, 83, 9, 0.25);
}
.id-badge-prata {
    background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 60%, #64748b 100%);
    color: #1e293b;
    border-color: #64748b;
}
.id-badge-bronze {
    background: linear-gradient(135deg, #fcd9b6 0%, #c08457 60%, #7c3a14 100%);
    color: #3a1d09;
    border-color: #7c3a14;
}
.id-badge-email {
    background: #e0e7ff;
    color: #1e3a8a;
    border-color: #818cf8;
}

/* Banner no topo da tela de cadastro quando o usuário entrou pelo gov.br */
.cadastro-govbr-banner {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin: 0 0 1.4rem;
    padding: 0.95rem 1.1rem;
    background: linear-gradient(90deg, #ecfdf5 0%, #f0fdfa 100%);
    border: 1px solid #99f6e4;
    border-left: 4px solid #0d9488;
    border-radius: 8px;
    color: #134e4a;
    font-size: 0.94rem;
    line-height: 1.55;
}
.cadastro-govbr-banner svg {
    flex: 0 0 auto;
    color: #0d9488;
}
.cadastro-govbr-banner-text {
    flex: 1 1 auto;
}
.cadastro-govbr-banner-text strong {
    color: #115e59;
}
.cad-tip-govbr {
    flex: 0 0 auto;
    margin-left: auto;
    cursor: help;
    background: #ccfbf1;
    color: #0f766e;
    border: 1px solid #5eead4;
}

/* Campo de cadastro quando o dado está confirmado pelo gov.br */
.fld-verificado input[readonly],
.fld-verificado input:read-only {
    background-color: #f0fdfa;
    border-color: #5eead4;
    color: #134e4a;
    cursor: not-allowed;
}
.cad-verificado {
    display: inline-block;
    margin-left: 0.45rem;
    padding: 0.12rem 0.5rem;
    background: #ccfbf1;
    color: #0f766e;
    border: 1px solid #5eead4;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    vertical-align: middle;
}

/* Seção "Identidade verificada" no modal Meus dados */
.id-info {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.95rem 1.1rem;
    background: #f8fafc;
}
.id-info-govbr {
    background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 100%);
    border-color: #99f6e4;
}
.id-info .id-badge {
    margin-bottom: 0.7rem;
}
.id-info-list {
    margin: 0.4rem 0 0.85rem;
    padding-left: 1.1rem;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #334155;
}
.id-info-list strong {
    color: #003333;
}
.id-info-text {
    margin: 0.5rem 0 0.85rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #475569;
}
.id-info-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Pequeno ajuste responsivo: o badge no header não deve quebrar a barra */
@media (max-width: 768px) {
    .id-badge { font-size: 0.7rem; padding: 0.22rem 0.55rem; }
    .cadastro-govbr-banner { flex-wrap: wrap; }
    .cadastro-govbr-banner svg { width: 18px; height: 18px; }
}

/* ============================================================
   .dica-box: caixa orientativa sutil
   Usada em pontos estratégicos do wizard para lembrar o usuário
   de informações que costumam ser esquecidas.
   ============================================================ */
.dica-box {
    background: #ecfdf5;
    border-left: 4px solid var(--primary);
    padding: 0.85rem 1rem 0.85rem 2.6rem;
    border-radius: 4px;
    color: #064e3b;
    font-size: 0.88rem;
    line-height: 1.55;
    margin-bottom: 1rem;
    position: relative;
}
.dica-box::before {
    content: '';
    position: absolute;
    left: 0.85rem;
    top: 0.95rem;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23006666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 18h6'/><path d='M10 22h4'/><path d='M12 2a7 7 0 0 0-4 12.7c.6.5 1 1.3 1 2.1V18h6v-1.2c0-.8.4-1.6 1-2.1A7 7 0 0 0 12 2z'/></svg>");
    background-repeat: no-repeat;
    background-size: contain;
}
.dica-box strong { color: var(--primary-dark); }
.dica-box em { font-style: normal; color: #047857; font-weight: 500; }
.dica-box ul {
    margin: 0.4rem 0 0 1.1rem;
    padding: 0;
}
.dica-box li {
    margin: 0.2rem 0;
    line-height: 1.5;
}

/* ============================================================
   .dicas-resultado: bloco de orientações dinâmicas no resultado
   ============================================================ */
.dicas-resultado {
    margin-top: 2rem;
    padding: 1.5rem 1.75rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0f9f9 100%);
    border-radius: 10px;
    border: 1px solid #a7f3d0;
}
.dicas-resultado h3 {
    color: var(--primary-dark);
    font-size: 1.15rem;
    margin: 0 0 0.4rem;
    font-family: 'Merriweather', serif;
}
.dicas-resultado .dr-sub {
    font-size: 0.88rem;
    color: #047857;
    margin: 0 0 1rem;
}
.dicas-resultado ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.dicas-resultado li {
    padding: 0.7rem 0.8rem 0.7rem 2.4rem;
    margin: 0.5rem 0;
    background: #ffffff;
    border-radius: 6px;
    border-left: 3px solid var(--primary);
    font-size: 0.9rem;
    line-height: 1.55;
    color: #1a1a1a;
    position: relative;
}
.dicas-resultado li::before {
    content: '';
    position: absolute;
    left: 0.8rem;
    top: 0.9rem;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23006666' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><polyline points='9 12 11 14 15 10'/></svg>");
    background-repeat: no-repeat;
    background-size: contain;
}
.dicas-resultado li strong { color: var(--primary-dark); }
@media (max-width: 768px) {
    .dica-box { font-size: 0.85rem; padding: 0.75rem 0.85rem 0.75rem 2.3rem; }
    .dica-box::before { left: 0.7rem; top: 0.85rem; width: 16px; height: 16px; }
    .dicas-resultado { padding: 1.1rem 1rem; }
    .dicas-resultado li { font-size: 0.86rem; padding-left: 2.1rem; }
}


/* =====================================================
   DIRPF v4: caixas "Detalhar" e mini-listas
   (dependentes, fontes pagadoras, pagamentos efetuados)
   ===================================================== */
.dirpf-detalhar-box {
    margin-top: 1.5rem;
    padding: 1rem 1.1rem;
    background: #f7fbf6;
    border-left: 4px solid var(--primary-dark, #609165);
    border-radius: 8px;
}
.dirpf-detalhar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.dirpf-detalhar-head strong {
    color: #003333;
    font-size: 0.98rem;
}
.dirpf-detalhar-sub {
    margin: 0.5rem 0 0.85rem;
    font-size: 0.86rem;
    color: #555;
    line-height: 1.45;
}
.dirpf-mini-lista {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.dirpf-mini-vazio {
    padding: 0.85rem 1rem;
    font-size: 0.86rem;
    color: #777;
    background: #fff;
    border: 1px dashed #cfd8d2;
    border-radius: 6px;
    text-align: center;
}
.dirpf-mini-item {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "titulo acoes"
        "meta acoes";
    align-items: center;
    gap: 0.25rem 0.75rem;
    padding: 0.7rem 0.85rem;
    background: #fff;
    border: 1px solid #e3ebe6;
    border-radius: 6px;
}
.dirpf-mini-item .dmi-titulo {
    grid-area: titulo;
    font-weight: 600;
    color: #003333;
    font-size: 0.92rem;
}
.dirpf-mini-item .dmi-titulo small {
    font-weight: 400;
    color: #666;
    font-size: 0.82rem;
    margin-left: 0.35rem;
}
.dirpf-mini-item .dmi-meta {
    grid-area: meta;
    font-size: 0.82rem;
    color: #555;
}
.dirpf-mini-item .dmi-acoes {
    grid-area: acoes;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
@media (max-width: 600px) {
    .dirpf-mini-item {
        grid-template-columns: 1fr;
        grid-template-areas:
            "titulo"
            "meta"
            "acoes";
    }
    .dirpf-mini-item .dmi-acoes { justify-content: flex-start; }
}
