:root {
    --primary: #0047AB;
    --primary-dark: #003366;
    --primary-light: #E1F0FF;
    --accent: #22C55E;
    --danger: #EF4444;
    --warning: #F59E0B;
    --text-main: #1F2937;
    --text-secondary: #4B5563;
    --text-muted: #6B7280;
    --bg-body: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-input: #FAFAFA;
    --border: #E5E7EB;
    --radius-lg: 16px;
    --radius-md: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

[data-theme="dark"] {
    --primary: #3B82F6;
    --primary-dark: #93C5FD;
    --primary-light: #1E3A5F;
    --accent: #34D399;
    --text-main: #F1F5F9;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    --bg-body: #0B1220;
    --bg-card: #121A2B;
    --bg-input: #1A2338;
    --border: #253048;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}

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

body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--bg-body); 
    color: var(--text-main); 
    line-height: 1.5; 
    -webkit-font-smoothing: antialiased; 
    transition: background-color .2s, color .2s; 
}

a { color: var(--primary); }

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

header { 
    background: var(--bg-card); 
    border-bottom: 1px solid var(--border); 
    padding: 16px 0; 
    position: sticky; 
    top: 0; 
    z-index: 100; 
}

.header-content { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

.logo { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    text-decoration: none; 
    font-weight: 800; 
    font-size: 24px; 
    color: var(--primary-dark); 
}

.logo svg { width: 32px; height: 32px; color: var(--primary); }
.logo span { color: var(--primary); }

.header-actions { display: flex; gap: 8px; align-items: center; }

.icon-btn { 
    width: 40px; 
    height: 40px; 
    border-radius: 10px; 
    border: 1px solid var(--border); 
    background: var(--bg-card); 
    color: var(--text-secondary); 
    cursor: pointer; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    transition: all .2s; 
}

.icon-btn:hover { color: var(--primary); border-color: var(--primary); }
.icon-btn svg { width: 18px; height: 18px; }

.brand-badge { 
    background: var(--primary-light); 
    color: var(--primary-dark); 
    padding: 6px 16px; 
    border-radius: 100px; 
    font-size: 13px; 
    font-weight: 600; 
}

.trust-signals { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }

.trust-item { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    font-size: 14px; 
    color: var(--text-secondary); 
    font-weight: 500; 
}

.trust-item span { color: var(--text-secondary); }

.hero { 
    padding: 40px 0; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    gap: 48px; 
}

.hero-text { flex: 1.2; }

.hero-text h1 { 
    font-size: 52px; 
    font-weight: 800; 
    line-height: 1.1; 
    margin-bottom: 20px; 
    color: var(--primary-dark); 
}

.hero-text h1 span { color: var(--primary); }

.hero-text p { 
    font-size: 19px; 
    color: var(--text-secondary); 
    margin-bottom: 32px; 
    max-width: 550px; 
}

.hero-img { flex: 0.8; max-width: 400px; }

.hero-img img { 
    width: 100%; 
    height: auto; 
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.1)); 
    border-radius: 20px; 
}

.tabs-container { 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    border-radius: var(--radius-lg); 
    padding: 6px; 
    margin-bottom: 32px; 
    overflow-x: auto; 
    display: flex; 
    gap: 4px; 
    box-shadow: var(--shadow-sm); 
    scrollbar-width: thin; 
}

.tab-btn { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    padding: 10px 18px; 
    border: none; 
    background: transparent; 
    color: var(--text-secondary); 
    font-size: 14px; 
    font-weight: 600; 
    cursor: pointer; 
    border-radius: var(--radius-md); 
    transition: all 0.2s; 
    white-space: nowrap; 
}

.tab-btn:hover { background: var(--bg-body); color: var(--primary); }
.tab-btn.active { background: var(--primary); color: white; box-shadow: var(--shadow-md); }
.tab-btn:focus-visible, .btn-main:focus-visible, .btn-action:focus-visible, input:focus-visible, select:focus-visible, .icon-btn:focus-visible { 
    outline: 3px solid #FBBF24; 
    outline-offset: 2px; 
}

.panel { display: none; animation: fadeIn 0.4s ease; }
.panel.active { display: block; }

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

.panel-header-card { 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    border-radius: var(--radius-lg); 
    padding: 32px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    margin-bottom: 24px; 
    box-shadow: var(--shadow-md); 
}

.panel-header-text h2 { 
    font-size: 28px; 
    font-weight: 800; 
    color: var(--primary-dark); 
    margin-bottom: 8px; 
}

.panel-header-text p { color: var(--text-secondary); font-size: 15px; max-width: 500px; }

.panel-header-img { max-width: 140px; font-size: 64px; line-height: 1; }
.panel-header-img img { width: 100%; height: auto; }

.calc-grid { display: grid; grid-template-columns: 400px 1fr; gap: 24px; align-items: start; }

.seo-content { 
    margin-top: 48px; 
    background: var(--bg-card); 
    padding: 40px; 
    border-radius: var(--radius-lg); 
    border: 1px solid var(--border); 
    box-shadow: var(--shadow-sm); 
    line-height: 1.7; 
}

.seo-content h3 { 
    font-size: 24px; 
    color: var(--primary-dark); 
    margin-bottom: 20px; 
    font-weight: 800; 
    border-bottom: 2px solid var(--primary-light); 
    display: inline-block; 
    padding-bottom: 4px; 
}

.seo-content h4 { font-size: 18px; color: var(--text-main); margin: 24px 0 12px; font-weight: 700; }
.seo-content p { color: var(--text-secondary); font-size: 15.5px; margin-bottom: 16px; }
.seo-content ul { margin-bottom: 16px; padding-left: 20px; }
.seo-content li { margin-bottom: 8px; color: var(--text-secondary); font-size: 15px; }

.card { 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    border-radius: var(--radius-lg); 
    padding: 24px; 
    box-shadow: var(--shadow-sm); 
    backdrop-filter: blur(10px); 
    transition: transform 0.2s; 
}

.card:hover { transform: translateY(-2px); border-color: var(--primary-light); }

.field { margin-bottom: 16px; }

.field label { 
    display: block; 
    font-size: 11px; 
    font-weight: 800; 
    color: var(--text-secondary); 
    margin-bottom: 6px; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
}

input[type="text"], input[type="number"], select {
    width: 100%; 
    padding: 14px 16px; 
    border: 1px solid var(--border); 
    border-radius: var(--radius-md);
    font-family: 'JetBrains Mono', monospace; 
    font-size: 16px; 
    font-weight: 600; 
    color: var(--text-main);
    transition: all 0.2s; 
    background: var(--bg-input);
}

input:focus { 
    outline: none; 
    border-color: var(--primary); 
    box-shadow: 0 0 0 4px var(--primary-light); 
    background: var(--bg-card); 
}

input.invalid { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(239,68,68,.15); }

.field-error { 
    color: var(--danger); 
    font-size: 12px; 
    margin-top: 4px; 
    font-weight: 600; 
    display: none; 
}

.field-error.show { display: block; }

.btn-main { 
    width: 100%; 
    padding: 16px; 
    background: var(--primary); 
    color: white; 
    border: none; 
    border-radius: var(--radius-md); 
    font-size: 15px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: all 0.2s; 
    letter-spacing: 0.5px; 
}

.btn-main:hover { 
    background: var(--primary-dark); 
    transform: translateY(-1px); 
    box-shadow: var(--shadow-md); 
}

.res-summary { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); 
    gap: 12px; 
    margin-bottom: 24px; 
}

.res-item { 
    background: var(--bg-card); 
    padding: 20px; 
    border-radius: var(--radius-md); 
    border: 1px solid var(--border); 
}

.res-label { 
    font-size: 10px; 
    font-weight: 700; 
    text-transform: uppercase; 
    margin-bottom: 4px; 
    color: var(--primary); 
}

.res-val { 
    font-size: 22px; 
    font-weight: 800; 
    color: var(--primary-dark); 
    font-family: 'JetBrains Mono', monospace; 
    word-break: break-word; 
}

.res-val.accent { color: var(--accent); }

.action-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.btn-action { 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    padding: 8px 16px; 
    border: 1px solid var(--border); 
    border-radius: 8px; 
    background: var(--bg-card); 
    font-size: 13px; 
    font-weight: 700; 
    cursor: pointer; 
    color: var(--text-secondary); 
    transition: all 0.2s; 
}

.btn-action:hover { background: var(--bg-body); border-color: var(--primary); color: var(--primary); }
.btn-action svg { width: 14px; height: 14px; }

.chart-wrap { 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    border-radius: var(--radius-lg); 
    padding: 20px; 
    height: 350px; 
}

.table-wrap { 
    margin-top: 16px; 
    border: 1px solid var(--border); 
    border-radius: var(--radius-md); 
    overflow: auto; 
    background: var(--bg-card); 
    font-size: 13px; 
    max-height: 420px; 
}

table { width: 100%; border-collapse: collapse; }

th { 
    background: var(--bg-body); 
    padding: 12px; 
    text-align: left; 
    font-weight: 700; 
    border-bottom: 1px solid var(--border); 
    position: sticky; 
    top: 0; 
    color: var(--text-main); 
}

td { 
    padding: 10px 12px; 
    border-bottom: 1px solid var(--border); 
    font-family: 'JetBrains Mono', monospace; 
    color: var(--text-main); 
}

.help-icon { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    width: 16px; 
    height: 16px; 
    border-radius: 50%; 
    background: var(--primary-light); 
    color: var(--primary); 
    font-size: 11px; 
    font-weight: 800; 
    cursor: help; 
    margin-left: 4px; 
    border: 1px solid var(--primary); 
    vertical-align: middle; 
}

.advise-box { 
    font-size: 14px; 
    background: rgba(34,197,94,.08); 
    border-left: 4px solid var(--accent); 
    color: var(--text-main); 
    font-weight: 600; 
    padding: 12px 16px; 
    border-radius: 8px; 
    margin-top: 12px; 
    display: none; 
}

.advise-box.show { display: block; }

.rate-toggle { 
    display: inline-flex; 
    border: 1px solid var(--border); 
    border-radius: 8px; 
    overflow: hidden; 
    margin-left: 8px; 
}

.rate-toggle button { 
    padding: 4px 10px; 
    border: none; 
    background: var(--bg-input); 
    color: var(--text-secondary); 
    font-size: 11px; 
    font-weight: 700; 
    cursor: pointer; 
}

.rate-toggle button.active { background: var(--primary); color: white; }

.mode-toggle { display: flex; gap: 4px; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 4px; }
.mode-btn { flex: 1; padding: 10px 12px; border: none; background: transparent; color: var(--text-secondary); font-size: 13px; font-weight: 700; cursor: pointer; border-radius: 8px; transition: all .2s; }
.mode-btn.active { background: var(--primary); color: white; box-shadow: var(--shadow-sm); }
.mode-btn:hover:not(.active) { color: var(--primary); }

.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 6px; animation: pulse 1.5s infinite; vertical-align: middle; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.live-indicator { font-size: 11px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }

.mini-chart { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; margin-top: 12px; height: 220px; }

.history-panel { 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    border-radius: var(--radius-lg); 
    padding: 16px; 
    margin-bottom: 24px; 
}

.history-title { 
    font-size: 12px; 
    font-weight: 800; 
    color: var(--text-secondary); 
    text-transform: uppercase; 
    letter-spacing: .5px; 
    margin-bottom: 10px; 
}

.history-list { display: flex; gap: 8px; flex-wrap: wrap; }

.history-chip { 
    background: var(--bg-body); 
    border: 1px solid var(--border); 
    padding: 6px 12px; 
    border-radius: 100px; 
    font-size: 12px; 
    color: var(--text-main); 
    cursor: pointer; 
    font-weight: 600; 
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
}

.history-chip:hover { border-color: var(--primary); color: var(--primary); }
.history-chip .x { color: var(--text-muted); font-size: 14px; line-height: 1; }

.cookie-banner { 
    position: fixed; 
    bottom: 20px; 
    left: 20px; 
    right: 20px; 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    padding: 16px 24px; 
    display: none; 
    align-items: center; 
    justify-content: space-between; 
    gap: 16px; 
    box-shadow: var(--shadow-lg); 
    z-index: 2000; 
    color: var(--text-main); 
}

.cookie-banner.show { display: flex; }

.btn-cookie { 
    padding: 8px 16px; 
    border-radius: 6px; 
    font-size: 13px; 
    font-weight: 700; 
    cursor: pointer; 
    border: 1px solid var(--border); 
    background: var(--primary); 
    color: white; 
}

.toast { 
    position: fixed; 
    bottom: 90px; 
    left: 50%; 
    transform: translateX(-50%) translateY(20px); 
    background: var(--text-main); 
    color: var(--bg-card); 
    padding: 12px 24px; 
    border-radius: 100px; 
    font-size: 14px; 
    font-weight: 600; 
    box-shadow: var(--shadow-lg); 
    opacity: 0; 
    transition: all .3s; 
    z-index: 3000; 
    pointer-events: none; 
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

footer { 
    background: var(--bg-card); 
    padding: 60px 0 30px; 
    border-top: 1px solid var(--border); 
    margin-top: 80px; 
}

.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-col h4 { color: var(--text-main); margin-bottom: 12px; font-size: 14px; }
.footer-links { list-style: none; }
.footer-links a { color: var(--text-secondary); text-decoration: none; font-size: 14px; display: block; padding: 4px 0; }
.footer-links a:hover { color: var(--primary); }
.footer-about p { color: var(--text-secondary); font-size: 14px; margin-top: 8px; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 30px; text-align: center; color: var(--text-muted); font-size: 12px; }

.faq { 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    border-radius: var(--radius-lg); 
    padding: 24px; 
    margin-top: 32px; 
}

.faq h3 { color: var(--primary-dark); margin-bottom: 16px; font-size: 22px; }

details { border-top: 1px solid var(--border); padding: 14px 0; }
details:first-of-type { border-top: none; }
summary { cursor: pointer; font-weight: 700; color: var(--text-main); padding: 4px 0; }
details[open] summary { color: var(--primary); }
details p { color: var(--text-secondary); margin-top: 10px; font-size: 14px; }

@media (max-width: 900px) {
    .hero { flex-direction: column; text-align: center; }
    .calc-grid { grid-template-columns: 1fr; }
    .panel-header-card { flex-direction: column; text-align: center; gap: 16px; }
    .hero-text h1 { font-size: 36px; }
    .hero-text p { font-size: 16px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .brand-badge { display: none; }
}

.panel-transition { animation: slideIn 0.3s ease-out; }

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

.smart-banner { 
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)); 
    color: white; 
    padding: 24px; 
    border-radius: var(--radius-lg); 
    margin-top: 40px; 
    display: flex; 
    align-items: center; 
    gap: 24px; 
}

.smart-banner-text h4 { font-size: 20px; margin-bottom: 4px; }
.smart-banner-text p { font-size: 14px; opacity: 0.9; }

.btn-white { 
    background: white; 
    color: var(--primary-dark); 
    padding: 10px 20px; 
    border-radius: 8px; 
    border: none; 
    font-weight: 700; 
    cursor: pointer; 
    white-space: nowrap; 
}

/* ============= LIVE BCB RATES ============= */
.live-rates {
    display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: white; padding: 10px 16px; border-radius: var(--radius-md);
    margin: 20px 0; font-size: 13px; font-weight: 600;
}
.live-rate { display: flex; align-items: center; gap: 6px; }
.live-rate .rate-label { opacity: 0.85; font-weight: 400; }
.live-rate-meta { margin-left: auto; font-size: 11px; opacity: 0.75; display: flex; align-items: center; gap: 8px; }
.live-rate-meta a { color: white; text-decoration: none; padding: 2px 6px; border-radius: 50%; background: rgba(255,255,255,0.15); }
.live-rate-meta a:hover { background: rgba(255,255,255,0.25); }

/* ============= SOCIAL PROOF STRIP ============= */
.social-proof {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 24px;
    padding: 14px 20px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); margin-bottom: 24px; font-size: 13px;
}
.sp-item { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.sp-item strong { color: var(--primary); font-size: 16px; font-weight: 800; }

/* ============= TESTIMONIALS ============= */
.testimonials { margin: 40px 0; }
.testimonials h3 { text-align: center; font-size: 24px; margin-bottom: 24px; color: var(--primary); }
.testimonials-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.testimonial-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm);
}
.testimonial-card .stars { font-size: 14px; margin-bottom: 8px; }
.testimonial-card p { font-size: 14px; line-height: 1.5; color: var(--text); margin-bottom: 12px; font-style: italic; }
.tm-author { font-size: 12px; color: var(--text-muted); font-weight: 700; }

/* ============= RENDA FIXA PODIUM ============= */
.rf-podium { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.rf-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-md); transition: transform .2s;
}
.rf-row.winner { border-color: var(--accent); background: rgba(34,197,94,0.06); }
.rf-rank { font-size: 24px; }
.rf-info { flex: 1; }
.rf-name { font-weight: 700; color: var(--text); }
.rf-sub { font-size: 12px; color: var(--text-muted); }
.rf-val { text-align: right; font-weight: 700; }
.rf-val > div:first-child { font-size: 18px; color: var(--primary); }
.rf-diff { font-size: 11px; font-weight: 600; color: var(--danger); }
.rf-diff.win { color: var(--accent); }

/* ============= INSIGHT BOX ============= */
.insight-box {
    background: linear-gradient(135deg, rgba(0,71,171,0.08), rgba(34,197,94,0.08));
    border-left: 4px solid var(--accent);
    padding: 14px 16px; border-radius: var(--radius-md); margin-top: 14px;
    font-size: 14px; line-height: 1.5; color: var(--text);
}

/* ============= HELP ICON STYLE ============= */
.help-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--border); color: var(--text-muted);
    font-size: 11px; font-weight: 700; cursor: pointer;
    margin-left: 4px; transition: all .15s;
}
.help-icon:hover, .help-icon:focus { background: var(--primary); color: white; outline: none; }
