/* ══════════════════════════════════ VARIABLES ══════ */
:root {
  --primary: #0a2463;
  --primary-mid: #1a3e8a;
  --primary-light: #2d5be3;
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --nav-height: 72px;
  --header-height: 60px;
}

/* ══════════════════════════════════ RESET ══════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6; font-size: 15px;
  min-height: 100vh; overflow-x: hidden;
}
input, button, select, textarea { font-family: inherit; }
a { text-decoration: none; color: inherit; }
ul, ol { padding-left: 1.4em; }

/* ══════════════════════════════════ WELCOME ══════ */
#welcome-screen {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
  background: linear-gradient(145deg, #050e21 0%, #0a2463 45%, #1a3e8a 100%);
}
.welcome-bg {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0;
  background: linear-gradient(145deg, #050e21 0%, #0a2463 45%, #1a3e8a 100%);
  z-index: -1;
}
.welcome-bg::after {
  content: '';
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0;
  background: radial-gradient(ellipse at 70% 20%, rgba(245,158,11,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(45,91,227,0.2) 0%, transparent 60%);
}
.welcome-inner {
  width: 100%; max-width: 420px;
  display: flex; flex-direction: column; align-items: center;
  gap: 24px; padding-bottom: 20px;
}
.welcome-logo {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  animation: fadeInDown 0.6s ease;
}
.logo-mark-lg {
  font-size: 52px; color: var(--accent);
  filter: drop-shadow(0 0 20px rgba(245,158,11,0.5));
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { filter: drop-shadow(0 0 20px rgba(245,158,11,0.5)); }
  50% { filter: drop-shadow(0 0 35px rgba(245,158,11,0.8)); }
}
.logo-text-lg { font-size: 38px; font-weight: 900; color: white; letter-spacing: -1px; }
.welcome-tagline {
  color: rgba(255,255,255,0.8); text-align: center; font-size: 15px;
  font-style: italic; line-height: 1.7; animation: fadeIn 0.8s ease 0.2s both;
}
.welcome-card {
  background: white; border-radius: var(--radius); padding: 28px 24px;
  width: 100%; box-shadow: var(--shadow-lg); animation: fadeInUp 0.6s ease 0.3s both;
}
.welcome-card h2 { font-size: 20px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.welcome-subtitle { color: var(--text-muted); font-size: 13px; margin-bottom: 20px; }
.welcome-footer {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  animation: fadeIn 0.8s ease 0.5s both;
}
.carlos-badge {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 50px; padding: 8px 16px 8px 8px;
  cursor: pointer; transition: all 0.2s;
}
.carlos-badge:hover { background: rgba(255,255,255,0.18); }
.carlos-avatar {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--accent), #e07b00);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: white; flex-shrink: 0;
}
.carlos-name-w { font-size: 13px; font-weight: 600; color: white; }
.carlos-title-w { font-size: 11px; color: rgba(255,255,255,0.7); }
.welcome-counter {
  display: flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.7); font-size: 13px;
}
.counter-dot-w {
  width: 8px; height: 8px; background: var(--success);
  border-radius: 50%; animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ══════════════════════════════════ AVATAR ══════ */
.avatar-section {
  width: 100%; display: flex; justify-content: center;
  animation: fadeInUp 0.5s ease 0.1s both;
}
/* row: avatar à esquerda, bubble à direita — sem empurrar o form abaixo */
.avatar-container {
  display: flex; flex-direction: row; align-items: flex-start;
  gap: 12px; width: 100%; max-width: 400px;
}
.avatar-img-wrap {
  position: relative; flex-shrink: 0;
  width: 100px; height: 100px; border-radius: 50%; overflow: visible;
}
.avatar-img {
  width: 100px; height: 100px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--accent); box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  animation: breathe 4s ease-in-out infinite 1.5s both;
}
.avatar-fallback {
  width: 100px; height: 100px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #e07b00);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900; color: white;
  border: 4px solid rgba(255,255,255,0.3);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  animation: breathe 4s ease-in-out infinite 1.5s both;
}
@keyframes breathe {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.02); }
}
/* emoji de mão posicionado no canto inferior-direito do círculo do avatar */
.avatar-wave-hand {
  position: absolute; bottom: -2px; right: -2px;
  font-size: 22px; background: white; border-radius: 50%;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  transform-origin: 65% 75%;
}
.avatar-wave-hand.waving {
  animation: waveHand 0.8s ease-in-out 3 both;
}
@keyframes waveHand {
  0%,100% { transform: rotate(0deg); }
  30%     { transform: rotate(30deg); }
  70%     { transform: rotate(-15deg); }
}
.avatar-wave-hand.breathing {
  animation: breatheHand 4s ease-in-out infinite;
}
@keyframes breatheHand {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.1); }
}
.avatar-wave-hand.thumbs-up {
  animation: thumbsBounce 0.5s ease-in-out 4 both;
}
@keyframes thumbsBounce {
  0%,100% { transform: scale(1) rotate(0deg); }
  50%     { transform: scale(1.4) rotate(-15deg); }
}
/* bubble ao lado direito do avatar, seta aponta para a esquerda (→ avatar) */
.avatar-bubble {
  flex: 1; min-width: 0; position: relative;
  background: white; border-radius: 14px; border-top-left-radius: 4px;
  padding: 10px 14px; box-shadow: var(--shadow-md);
  color: var(--text); font-size: 13px; line-height: 1.5;
  animation: fadeIn 0.3s ease;
  align-self: flex-start; margin-top: 10px;
}
.avatar-bubble::before {
  content: ''; position: absolute; top: 14px; left: -10px;
  border: 6px solid transparent; border-right-color: white;
}
.bubble-cursor {
  display: inline-block; animation: blink 0.8s step-end infinite;
  font-weight: 700; color: var(--primary-light);
}
.avatar-success {
  display: flex; align-items: center; gap: 12px;
  background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3);
  border-radius: 50px; padding: 10px 20px;
  color: white; font-weight: 600; font-size: 15px;
  animation: fadeInUp 0.4s ease;
}
.avatar-thumbs-up { font-size: 26px; animation: thumbsBounce 0.5s ease-in-out 4 both; }

/* ══════════════════════════════════ FORMS ══════ */
.form-group { margin-bottom: 16px; }
.form-group label, .input-label {
  display: block; font-size: 13px; font-weight: 600; color: var(--text-muted);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px;
}
.form-group input, .money-input-wrap input {
  width: 100%; padding: 12px 14px; border: 2px solid var(--border);
  border-radius: var(--radius-sm); font-size: 15px; color: var(--text);
  background: white; transition: border-color 0.2s, box-shadow 0.2s;
  outline: none; -webkit-appearance: none; appearance: none;
}
.form-group input:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(45,91,227,0.12); }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
.money-input-wrap {
  display: flex; align-items: center; border: 2px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s; background: white;
}
.money-input-wrap:focus-within { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(45,91,227,0.12); }
.money-prefix {
  padding: 0 12px; font-size: 14px; font-weight: 600; color: var(--text-muted);
  background: #f8fafc; border-right: 2px solid var(--border);
  height: 100%; display: flex; align-items: center; min-height: 46px;
}
.money-input-wrap input {
  border: none; box-shadow: none; border-radius: 0;
  font-size: 18px; font-weight: 600; color: var(--primary);
}
.money-input-wrap input:focus { box-shadow: none; }
.input-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.error-msg {
  color: var(--danger); font-size: 13px; margin-top: 8px;
  padding: 8px 12px; background: #fef2f2; border-radius: var(--radius-sm);
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }

/* ══════════════════════════════════ BUTTONS ══════ */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  color: white; border: none; border-radius: var(--radius-sm);
  padding: 13px 20px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; position: relative; overflow: hidden;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(10,36,99,0.35); }
.btn-primary:active { transform: translateY(0); }
.btn-primary.btn-full { width: 100%; }
.btn-primary.btn-lg { padding: 15px 24px; font-size: 16px; border-radius: 12px; }
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent); pointer-events: none;
}
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; background: transparent; color: var(--primary);
  border: 2px solid var(--primary); border-radius: var(--radius-sm);
  padding: 12px 20px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn-outline:hover { background: var(--primary); color: white; }
.btn-outline.btn-full { width: 100%; }
.btn-outline:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-outline-sm {
  background: transparent; color: var(--primary-light); border: 1.5px solid var(--primary-light);
  border-radius: 8px; padding: 6px 14px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.btn-outline-sm:hover { background: var(--primary-light); color: white; }
.btn-share-result {
  width: 100%; background: linear-gradient(135deg, #25d366, #128c7e); color: white;
  border: none; border-radius: var(--radius-sm); padding: 14px;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; margin-bottom: 8px;
}
.btn-share-result:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,211,102,0.4); }
.btn-wa-fixed {
  background: linear-gradient(135deg, #25d366, #128c7e) !important;
  margin-top: 8px;
}

/* ══════════════════════════════════ HEADER ══════ */
#app-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-height); background: var(--primary); z-index: 100;
  box-shadow: 0 2px 16px rgba(10,36,99,0.3);
}
.header-inner {
  max-width: 680px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between; padding: 0 16px;
}
.header-logo { display: flex; align-items: center; gap: 8px; color: white; }
.logo-mark-sm { font-size: 18px; color: var(--accent); }
.logo-name { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }
.carlos-contact-btn {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50px; padding: 6px 14px 6px 6px; cursor: pointer; transition: all 0.2s;
}
.carlos-contact-btn:hover { background: rgba(255,255,255,0.2); }
.carlos-avatar-sm {
  width: 32px; height: 32px; background: linear-gradient(135deg, var(--accent), #e07b00);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px; color: white; flex-shrink: 0;
}
.carlos-contact-info { display: flex; flex-direction: column; }
.cc-name { font-size: 12px; font-weight: 600; color: white; line-height: 1.2; }
.cc-role { font-size: 10px; color: rgba(255,255,255,0.7); line-height: 1.2; }

/* ══════════════════════════════════ USER BANNER ══════ */
#user-banner {
  position: fixed; top: var(--header-height); left: 0; right: 0;
  background: linear-gradient(90deg, var(--primary-mid), var(--primary-light));
  z-index: 99; padding: 8px 16px;
}
.banner-inner {
  max-width: 680px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
#user-welcome-text { color: white; font-size: 13px; font-weight: 500; }
.live-counter-pill {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.15); border-radius: 20px;
  padding: 4px 12px; font-size: 12px; color: white; font-weight: 500;
}
.counter-dot-live {
  width: 7px; height: 7px; background: #4ade80;
  border-radius: 50%; animation: blink 2s infinite;
}

/* ══════════════════════════════════ LAYOUT ══════ */
#main-app { padding-top: calc(var(--header-height) + 40px); }
#tab-content { max-width: 680px; margin: 0 auto; padding: 16px 16px calc(var(--nav-height) + 16px); }
.tab-section { display: none; }
.tab-section.active { display: block; animation: fadeIn 0.3s ease; }
.section-header { margin-bottom: 16px; }
.section-header h2 { font-size: 22px; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.section-header p { font-size: 14px; color: var(--text-muted); }

/* ══════════════════════════════════ CARDS ══════ */
.card {
  background: var(--card); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.card h3 { font-size: 16px; font-weight: 700; color: var(--primary); margin-bottom: 14px; }

/* ══════════════════════════════════ INÍCIO ══════ */
.inicio-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px;
}
.inicio-card {
  background: white; border-radius: var(--radius-sm);
  padding: 16px 14px; box-shadow: var(--shadow);
  cursor: pointer; transition: all 0.2s; text-align: center;
  border: 2px solid transparent;
}
.inicio-card:hover { border-color: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.inicio-icon { font-size: 28px; display: block; margin-bottom: 6px; }
.inicio-card h3 { font-size: 14px; font-weight: 700; color: var(--primary); margin-bottom: 3px; }
.inicio-card p { font-size: 11px; color: var(--text-muted); }
.inicio-tip-card p { font-size: 14px; color: var(--text-muted); }

/* ══════════════════════════════════ TRAFFIC LIGHT ══════ */
.traffic-light-wrap { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
.traffic-light-housing {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: #1a1a2e; border-radius: 50px; padding: 12px 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3), inset 0 1px 3px rgba(255,255,255,0.1); flex-shrink: 0;
}
.tl-light { width: 30px; height: 30px; border-radius: 50%; transition: all 0.4s ease; background: #333; }
#tl-red { background: rgba(239,71,71,0.2); }
#tl-yellow { background: rgba(245,158,11,0.2); }
#tl-green { background: rgba(16,185,129,0.2); }
#tl-red.on { background: #ef4444; box-shadow: 0 0 16px #ef4444, 0 0 30px rgba(239,68,68,0.5); }
#tl-yellow.on { background: #f59e0b; box-shadow: 0 0 16px #f59e0b, 0 0 30px rgba(245,158,11,0.5); }
#tl-green.on { background: #10b981; box-shadow: 0 0 16px #10b981, 0 0 30px rgba(16,185,129,0.5); }
.health-text-block { flex: 1; }
.health-status { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.health-pct { font-size: 32px; font-weight: 900; color: var(--primary); line-height: 1; margin-bottom: 4px; }
.health-detail { font-size: 13px; color: var(--text-muted); }
.balance-display {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.balance-item { text-align: center; padding: 10px 8px; background: #f8fafc; border-radius: var(--radius-sm); }
.balance-item span { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.balance-item strong { font-size: 15px; font-weight: 700; color: var(--text); }
.balance-item.highlight { background: #f0fdf4; }
.balance-item.highlight strong { color: var(--success); }

/* ══════════════════════════════════ EXPENSES ══════ */
.expenses-header-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.expenses-header-row h3 { margin: 0; }
.expense-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border); animation: fadeIn 0.2s ease;
}
.expense-row:last-child { border-bottom: none; }
.expense-icon { font-size: 20px; flex-shrink: 0; }
.expense-name {
  flex: 1; font-size: 14px; font-weight: 500; color: var(--text);
  border: none; background: transparent; outline: none; min-width: 0;
}
.expense-value-wrap {
  display: flex; align-items: center;
  background: #f8fafc; border: 1.5px solid var(--border); border-radius: 8px; overflow: hidden;
}
.expense-value-prefix { padding: 0 6px; font-size: 12px; color: var(--text-muted); font-weight: 600; }
.expense-value {
  border: none; background: transparent; outline: none;
  font-size: 14px; font-weight: 600; color: var(--text);
  width: 80px; padding: 7px 8px 7px 0; -moz-appearance: textfield;
}
.expense-value::-webkit-outer-spin-button, .expense-value::-webkit-inner-spin-button { -webkit-appearance: none; }
.expense-delete {
  background: none; border: none; cursor: pointer;
  color: #cbd5e1; font-size: 18px; padding: 4px;
  border-radius: 6px; transition: all 0.15s; flex-shrink: 0;
}
.expense-delete:hover { color: var(--danger); background: #fef2f2; }
.expenses-total-row {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; margin-top: 8px; border-top: 2px solid var(--border);
  font-size: 15px; color: var(--text-muted);
}
.expenses-total-row strong { font-size: 17px; color: var(--primary); }

/* ══════════════════════════════════ SIMULADORES SUB-NAV ══════ */
.sim-sub-nav {
  display: flex; gap: 8px; margin-bottom: 16px;
  background: white; border-radius: var(--radius-sm); padding: 6px;
  box-shadow: var(--shadow);
}
.sim-sub-btn {
  flex: 1; padding: 10px 12px; border: none; background: transparent;
  border-radius: 8px; font-size: 13px; font-weight: 600;
  color: var(--text-muted); cursor: pointer; transition: all 0.2s;
}
.sim-sub-btn.active {
  background: var(--primary); color: white;
  box-shadow: 0 2px 8px rgba(10,36,99,0.3);
}
.sim-panel { display: block; }
.sim-panel.hidden { display: none; }

/* ══════════════════════════════════ 50/30/20 ══════ */
.method-pills-card { padding: 16px 20px; }
.method-pills { display: flex; gap: 8px; }
.mpill {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 12px 6px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 600;
  text-align: center; color: white;
}
.mp-pct { font-size: 22px; font-weight: 900; display: block; margin-bottom: 2px; }
.mp-nec { background: linear-gradient(135deg, var(--primary), var(--primary-mid)); }
.mp-des { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.mp-inv { background: linear-gradient(135deg, #059669, #10b981); }

.sim-income-card { }
.sim-thermo-sync {
  display: flex; align-items: flex-start; gap: 10px;
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px;
  padding: 10px 14px; margin-bottom: 12px;
}
.sync-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.sim-thermo-sync span { font-size: 13px; color: var(--primary); }

.grid-3-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.mini-result-card {
  background: white; border-radius: var(--radius-sm); padding: 14px 10px;
  text-align: center; box-shadow: var(--shadow); border-top: 3px solid transparent;
}
.mnec { border-top-color: var(--primary); }
.mdes { border-top-color: #7c3aed; }
.minv { border-top-color: var(--success); }
.mr-label { font-size: 11px; color: var(--text-muted); font-weight: 600; margin-bottom: 6px; }
.mr-val { font-size: 16px; font-weight: 800; color: var(--primary); margin-bottom: 2px; }
.mr-pct { font-size: 11px; color: var(--text-muted); }

.inv-breakdown { display: flex; flex-direction: column; gap: 12px; }
.inv-row-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px; font-size: 13px; color: var(--text-muted);
}
.inv-row-top strong { font-size: 14px; color: var(--text); }
.inv-bar-bg { height: 8px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.inv-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.inv-fixa-fill { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.inv-var-fill { background: linear-gradient(90deg, #7c3aed, #a855f7); }
.inv-cons-fill { background: linear-gradient(90deg, var(--accent), var(--accent-light)); }
.inv-row-highlight .inv-row-top { color: var(--accent); }
.inv-row-highlight .inv-row-top strong { color: var(--accent); font-size: 15px; }

.highlight-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  color: white; display: flex; align-items: flex-start; gap: 16px;
}
.highlight-card h3 { color: white; }
.hl-icon { font-size: 36px; flex-shrink: 0; }
.hl-text { font-size: 15px; color: rgba(255,255,255,0.9); }
.hl-label { font-size: 13px; color: rgba(255,255,255,0.8); margin-bottom: 6px; }
.hl-big-value { font-size: 36px; font-weight: 900; color: var(--accent-light); line-height: 1; margin-bottom: 4px; }
.hl-sub { font-size: 12px; color: rgba(255,255,255,0.7); }

/* Portfolio allocation dentro do 50/30/20 */
.portfolio-alloc-list { display: flex; flex-direction: column; gap: 12px; }
.pa-row { display: flex; align-items: center; gap: 10px; }
.pa-label { width: 130px; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.pa-bar-wrap { flex: 1; height: 8px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.pa-bar { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
.pa-val { width: 90px; text-align: right; font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; }
.pa-val small { font-weight: 400; color: var(--text-muted); }

.sim-retirement-hook {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #86efac; padding: 20px;
}
.sim-retirement-hook .hook-text p { font-size: 15px; color: #166534; margin-bottom: 14px; line-height: 1.6; }

.cta-link {
  display: block; text-align: center; color: var(--primary-light);
  font-size: 14px; font-weight: 600; padding: 12px; border-radius: var(--radius-sm);
  background: #eff6ff; margin-bottom: 16px; transition: all 0.2s;
}
.cta-link:hover { background: #dbeafe; }

/* ══════════════════════════════════ RETIREMENT ══════ */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-top: 1px solid var(--border); margin-top: 8px;
}
.toggle-label { font-size: 14px; font-weight: 600; color: var(--text); }
.toggle-hint { font-size: 12px; color: var(--text-muted); }
.switch { position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; inset: 0; background: #cbd5e1; border-radius: 26px;
  cursor: pointer; transition: 0.3s;
}
.switch-slider::before {
  content: ''; position: absolute; height: 20px; width: 20px;
  left: 3px; bottom: 3px; background: white; border-radius: 50%;
  transition: 0.3s; box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.switch input:checked + .switch-slider { background: var(--primary-light); }
.switch input:checked + .switch-slider::before { transform: translateX(22px); }
.comparison-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.comp-card { border-radius: var(--radius-sm); padding: 14px; text-align: center; }
.comp-without { background: #f8fafc; border: 2px solid var(--border); }
.comp-with { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border: 2px solid var(--success); }
.comp-card h4 { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.comp-without h4 { color: var(--text-muted); }
.comp-with h4 { color: var(--success); }
.comp-val { font-size: 20px; font-weight: 900; margin-bottom: 6px; }
.comp-without .comp-val { color: var(--text-muted); }
.comp-with .comp-val { color: var(--success); }
.comp-card p { font-size: 11px; color: var(--text-muted); }
.benefits-list { display: flex; flex-direction: column; gap: 14px; }
.benefit-item { display: flex; gap: 14px; align-items: flex-start; }
.benefit-icon { font-size: 24px; flex-shrink: 0; }
.benefit-item strong { display: block; font-size: 14px; color: var(--text); margin-bottom: 2px; }
.benefit-item p { font-size: 13px; color: var(--text-muted); }

/* ══════════════════════════════════ CARTEIRA CENÁRIOS ══════ */
.cart-context-card { background: #fefce8; border: 1px solid #fef08a; }
.cart-context-text { font-size: 13px; color: #713f12; line-height: 1.6; }
.cart-auto-hint {
  display: flex; align-items: flex-start; gap: 10px;
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px;
  padding: 10px 14px; margin-bottom: 12px;
}
.cart-auto-hint span { font-size: 13px; color: var(--primary); }

/* Slider customizado */
.custom-slider {
  width: 100%; -webkit-appearance: none; appearance: none;
  height: 6px; background: var(--border); border-radius: 3px; outline: none;
  cursor: pointer; margin: 10px 0;
}
.custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px;
  border-radius: 50%; background: var(--primary);
  border: 3px solid white; box-shadow: 0 2px 8px rgba(10,36,99,0.3); cursor: pointer;
}
.custom-slider::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: var(--primary);
  border: 3px solid white; box-shadow: 0 2px 8px rgba(10,36,99,0.3); cursor: pointer;
}
.slider-wrap { margin: 8px 0; }
.slider-group { margin-bottom: 20px; }
.slider-display-row {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px;
}
.slider-display {
  font-size: 24px; font-weight: 900; color: var(--primary);
}
.slider-hint { font-size: 12px; color: var(--text-muted); }
.slider-minmax {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-muted); margin-top: 2px;
}

/* Botões de cenário */
.scenario-btns {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
}
.scenario-btn {
  padding: 8px 12px; border: 2px solid var(--border); border-radius: 8px;
  background: white; font-size: 12px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.scenario-btn:hover { border-color: var(--primary-light); color: var(--primary); }
.scenario-btn.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 2px 8px rgba(10,36,99,0.3); }
.scenario-desc-box { background: #f8fafc; border-radius: 10px; padding: 14px; }
.scenario-desc-box p { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 0; }
.scenario-badge { display: inline-block; margin-top: 8px; padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-ok { background: #dcfce7; color: #166534; }

.chart-legend-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 14px; font-size: 12px; color: var(--text-muted); }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }

/* Tabela resultado */
.cart-table-wrap { overflow-x: auto; }
.cart-result-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cart-result-table th {
  padding: 8px 10px; background: #f8fafc; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); text-align: left;
}
.cart-result-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.cart-result-table tr.rt-final td { background: #f0fdf4; font-weight: 700; }
.cart-result-table tr:last-child td { border-bottom: none; }
.rt-val { font-weight: 700; color: var(--text); }
.rt-cdb { color: var(--text-muted) !important; }
.rt-lucro { color: var(--text-muted); font-weight: 400; }
.rt-pos { color: var(--success); font-weight: 700; }
.rt-neg { color: var(--danger); font-weight: 700; }

/* Snowball card */
.snowball-card {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b;
}
.snowball-inner { display: flex; gap: 14px; align-items: flex-start; }
.snowball-icon { font-size: 32px; flex-shrink: 0; }
.snowball-inner h4 { font-size: 16px; font-weight: 700; color: #92400e; margin-bottom: 6px; }
.snowball-inner p { font-size: 13px; color: #78350f; line-height: 1.6; }

/* ══════════════════════════════════ MAPA ESTRATÉGICO ══════ */
.mapa-cards-grid { display: flex; flex-direction: row; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }

/* Card base */
.mapa-card {
  background: white; border-radius: var(--radius-sm); padding: 16px;
  box-shadow: var(--shadow); border-left: 4px solid transparent;
  box-sizing: border-box; width: 268px; flex-shrink: 0; flex-grow: 0;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
}
.mapa-card-credit { border-left-color: var(--primary); align-items: center; }
.mapa-card-cdb    { border-left-color: var(--text-muted); align-items: center; }
.mapa-card-sale   { border-left-color: var(--accent); align-items: center; }

/* Todos os três cards: ícone centralizado entre título e valor */
.mapa-card-credit .mapa-card-icon, .mapa-card-cdb .mapa-card-icon, .mapa-card-sale .mapa-card-icon { font-size: 26px; }
.mapa-card-credit .mapa-card-label, .mapa-card-cdb .mapa-card-label, .mapa-card-sale .mapa-card-label,
.mapa-card-credit .mapa-card-value, .mapa-card-cdb .mapa-card-value, .mapa-card-sale .mapa-card-value { width: 100%; text-align: center; }

/* Textos internos */
.mapa-card-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.mapa-card-value { font-size: 17px; font-weight: 900; color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mapa-card-hint  { font-size: 11px; color: var(--text-muted); }

/* Terceiro quadro: texto longo quebra entre palavras */
.mapa-sale-msg { font-size: 13px; font-weight: 600; line-height: 1.5; color: var(--primary); white-space: normal; overflow-wrap: break-word; word-break: normal; }

/* Zona indicator */
.zone-indicator-card {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px;
  transition: background 0.4s ease, border-color 0.4s ease;
}
.zone-green { background: linear-gradient(135deg, #dcfce7, #f0fdf4); border: 1px solid #86efac; }
.zone-yellow { background: linear-gradient(135deg, #fef9c3, #fef3c7); border: 1px solid #fbbf24; }
.zone-red { background: linear-gradient(135deg, #fee2e2, #fef2f2); border: 1px solid #fca5a5; }
.zone-dot {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  animation: zonePulse 2s ease-in-out infinite;
}
.zone-green .zone-dot { background: var(--success); box-shadow: 0 0 12px rgba(16,185,129,0.5); }
.zone-yellow .zone-dot { background: var(--warning); box-shadow: 0 0 12px rgba(245,158,11,0.5); }
.zone-red .zone-dot { background: var(--danger); box-shadow: 0 0 12px rgba(239,68,68,0.5); }
@keyframes zonePulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.3)} }
.zone-content { flex: 1; }
.zone-label { font-size: 15px; font-weight: 800; margin-bottom: 2px; }
.zone-desc { font-size: 12px; color: var(--text-muted); }
.zone-months { font-size: 11px; font-weight: 700; color: var(--text-muted); white-space: nowrap; }

.mapa-markers-card h3 { margin-bottom: 14px; }
.mapa-marker { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.mapa-marker:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.marker-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.marker-93 { background: #f59e0b; }
.marker-166 { background: #ef4444; }
.mapa-marker > div > strong { font-size: 14px; color: var(--text); display: block; margin-bottom: 3px; }
.mapa-marker p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.mapa-marker p strong { display: inline; font-size: inherit; color: inherit; }

/* ══════════════════════════════════ QUIZ ══════ */
.quiz-progress-bar { height: 4px; background: var(--border); border-radius: 2px; margin-bottom: 8px; }
.qpb-fill { height: 100%; background: linear-gradient(90deg, var(--primary-light), var(--accent)); border-radius: 2px; transition: width 0.4s ease; }
.quiz-progress-label { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; font-weight: 600; }
.quiz-question-card {
  background: white; border-radius: var(--radius); padding: 20px;
  margin-bottom: 16px; box-shadow: var(--shadow); animation: fadeIn 0.25s ease;
}
.quiz-question-num { font-size: 11px; font-weight: 700; color: var(--primary-light); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.quiz-question-text { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 18px; line-height: 1.4; }
.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.quiz-option {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 2px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s;
  font-size: 14px; color: var(--text); background: #f8fafc;
}
.quiz-option:hover { border-color: var(--primary-light); background: #eff6ff; }
.quiz-option.selected { border-color: var(--primary); background: #eff6ff; color: var(--primary); font-weight: 600; }
.quiz-option-letter {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; background: var(--border); color: var(--text-muted);
  flex-shrink: 0; transition: all 0.2s;
}
.quiz-option.selected .quiz-option-letter { background: var(--primary); color: white; }
.quiz-btn-row { display: flex; gap: 10px; margin-top: 4px; }
.quiz-btn-row .btn-outline { flex: 1; }
.quiz-btn-row .btn-primary { flex: 2; }

/* Resultado de perfil */
.profile-result-hero {
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  color: white; padding: 32px 24px;
}
.prh-badge { font-size: 52px; margin-bottom: 12px; display: block; }
.profile-result-hero h2 { font-size: 26px; font-weight: 900; color: white; margin-bottom: 10px; }
.profile-result-hero p { font-size: 14px; color: rgba(255,255,255,0.85); line-height: 1.6; }
.alloc-bar-row { margin-bottom: 12px; }
.alloc-label-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.alloc-label-row strong { font-weight: 700; color: var(--text); }
.alloc-label-row span { color: var(--text-muted); }
.alloc-bar-bg { height: 10px; background: #f1f5f9; border-radius: 5px; overflow: hidden; }
.alloc-bar-fill { height: 100%; border-radius: 5px; transition: width 0.6s ease; }

/* Perguntas estratégicas */
.strategic-question { transition: all 0.35s ease; }
.sq-header { margin-bottom: 14px; }
.sq-num { font-size: 11px; font-weight: 700; color: var(--primary-light); text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 6px; }
.sq-progress-bar { height: 3px; background: var(--border); border-radius: 2px; }
.sq-progress-fill { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.sq-options { display: flex; flex-direction: column; gap: 8px; }
.sq-opt {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; font-size: 14px; color: var(--text); background: #f8fafc;
  transition: all 0.2s;
}
.sq-opt:hover { border-color: var(--primary-light); background: #eff6ff; }
.sq-opt.selected { border-color: var(--primary); background: #eff6ff; color: var(--primary); font-weight: 600; }
.sq-opt span:first-child { font-size: 20px; }

.sq-entering { animation: fadeInUp 0.35s ease; }
.sq-exit { animation: fadeOut 0.3s ease forwards; }
@keyframes fadeOut { to { opacity: 0; transform: translateY(-10px); } }

/* ══════════════════════════════════ ACCORDION ══════ */
.accordion { display: flex; flex-direction: column; gap: 8px; }
.acc-item { background: white; border-radius: var(--radius-sm); box-shadow: var(--shadow); overflow: hidden; }
.acc-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; background: none; border: none; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--primary);
  text-align: left; transition: background 0.2s;
}
.acc-btn:hover { background: #f8fafc; }
.acc-icon { font-size: 20px; transition: transform 0.3s; flex-shrink: 0; color: var(--text-muted); }
.acc-item.open .acc-icon { transform: rotate(45deg); }
.acc-content {
  padding: 0 20px; max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}
.acc-item.open .acc-content { max-height: 2000px; padding: 0 20px 20px; }
.acc-content p { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-bottom: 10px; }
.acc-content p:last-child { margin-bottom: 0; }
.edu-list { display: flex; flex-direction: column; gap: 8px; padding-left: 0; list-style: none; }
.edu-list li { font-size: 14px; color: var(--text-muted); line-height: 1.6; padding-left: 20px; position: relative; }
.edu-list li::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.myth-block { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.myth-block:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.myth-tag, .fact-tag {
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;
}
.myth-tag { background: #fef2f2; color: var(--danger); }
.fact-tag { background: #ecfdf5; color: var(--success); margin-top: 8px; }
.comp-table-wrap { overflow-x: auto; }
.comp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.comp-table th { padding: 10px; background: #f8fafc; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.comp-table td { padding: 10px; border-bottom: 1px solid var(--border); }
.ct-pos { color: var(--success); font-weight: 600; }
.ct-neg { color: var(--danger); font-weight: 600; }
.ct-neu { color: var(--text-muted); }

/* Cards de estratégia na educação */
.edu-strategy-cards { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.edu-strat-card {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, #f8fafc, white); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px; transition: all 0.2s;
}
.edu-strat-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); }
.edu-strat-icon { font-size: 28px; flex-shrink: 0; }
.edu-strat-card h4 { font-size: 14px; font-weight: 700; color: var(--primary); margin-bottom: 2px; }
.edu-strat-card > div { flex: 1; }
.edu-strat-card p { font-size: 12px; color: var(--text-muted); }
.edu-strat-btn {
  padding: 8px 14px; background: var(--primary); color: white;
  border: none; border-radius: 8px; font-size: 12px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: all 0.2s;
}
.edu-strat-btn:hover { background: var(--primary-mid); }

/* ══════════════════════════════════ JORNADA ══════ */
.j-screen { }
.j-screen.hidden { display: none; }

/* Hook */
.hook-card {
  background: linear-gradient(135deg, var(--primary), #050e21);
  color: white; text-align: center; padding: 40px 24px;
}
.hook-animated-text {
  font-size: 22px; font-weight: 800; color: white;
  line-height: 1.4; margin-bottom: 24px; min-height: 80px; text-align: center;
}
.hook-animated-text span { display: block; text-align: center; }

/* Qualificação */
.qual-btns { display: flex; flex-direction: column; gap: 12px; }
.qual-btn {
  display: flex; align-items: center; gap: 14px;
  background: white; border: 2px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px; cursor: pointer; transition: all 0.2s; text-align: left; width: 100%;
}
.qual-btn:hover { border-color: var(--primary-light); background: #eff6ff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.qual-icon { font-size: 32px; flex-shrink: 0; }
.qual-btn > div { flex: 1; }
.qual-btn strong { display: block; font-size: 15px; font-weight: 700; color: var(--primary); margin-bottom: 3px; }
.qual-btn p { font-size: 13px; color: var(--text-muted); }
.qual-arrow { font-size: 20px; color: var(--text-muted); flex-shrink: 0; }

/* Journey stepper */
.journey-stepper {
  display: flex; gap: 8px; margin-bottom: 20px; justify-content: center;
}
.stepper-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--border); transition: all 0.3s;
}
.stepper-dot.active { background: var(--primary); transform: scale(1.2); }

/* Badges de jornada */
.r3p-badge {
  background: linear-gradient(135deg, #059669, #10b981);
  color: white; padding: 3px 12px; border-radius: 20px; font-size: 14px; font-weight: 800;
}
.mit-badge {
  background: linear-gradient(135deg, #b91c1c, #ef4444);
  color: white; padding: 3px 12px; border-radius: 20px; font-size: 14px; font-weight: 800;
}

/* Journey cards */
.journey-card { animation: fadeIn 0.3s ease; }
.j-card-inner {
  border-radius: var(--radius); padding: 24px; margin-bottom: 16px;
  box-shadow: var(--shadow-md);
}
.r3p-theme {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1px solid #86efac;
}
.mit-theme {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 1px solid #fca5a5;
}
.j-card-num {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px;
  margin-bottom: 8px;
}
.r3p-theme .j-card-num { color: #059669; }
.mit-theme .j-card-num { color: #b91c1c; }
.j-card-inner h3 { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.j-card-inner p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.j-note { font-size: 12px; color: var(--text-muted); margin-top: 12px; font-style: italic; }

/* Fases R3P */
.r3p-phases { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.r3p-phase { display: flex; align-items: center; gap: 12px; }
.phase-dot {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: white;
}
.p1 { background: #059669; }
.p2 { background: #d97706; }
.p3 { background: #0a2463; }
.r3p-phase strong { display: block; font-size: 14px; color: var(--text); }
.r3p-phase p { font-size: 12px; color: var(--text-muted); }

/* Simulação nas jornadas */
.r3p-simulation { background: rgba(255,255,255,0.7); border-radius: 10px; padding: 14px; margin-top: 14px; }
.r3p-sim-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,0.07); font-size: 13px;
}
.r3p-sim-row:last-child { border-bottom: none; }
.r3p-sim-row strong { font-weight: 700; color: var(--primary); }
.r3p-sim-highlight strong { color: var(--accent); font-size: 16px; }

/* Reposicionamento */
.reposition-options { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.repo-option {
  display: flex; align-items: center; gap: 12px;
  background: white; border: 2px solid var(--border); border-radius: 10px;
  padding: 12px; cursor: pointer; transition: all 0.2s;
}
.repo-option:hover { border-color: #059669; }
.repo-option.selected { border-color: #059669; background: #ecfdf5; }
.repo-icon { font-size: 24px; flex-shrink: 0; }
.repo-option strong { font-size: 13px; display: block; margin-bottom: 2px; }
.repo-option p { font-size: 12px; color: var(--text-muted); }

/* Proteção */
.protection-items { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.protect-item { display: flex; gap: 12px; align-items: flex-start; }
.protect-item > span { font-size: 24px; flex-shrink: 0; }
.protect-item strong { display: block; font-size: 14px; color: var(--text); margin-bottom: 3px; }
.protect-item p { font-size: 12px; color: var(--text-muted); }

/* MIT fases */
.mit-phases { display: flex; gap: 8px; margin-top: 16px; }
.mit-phase {
  flex: 1; text-align: center; background: rgba(255,255,255,0.6); border-radius: 10px; padding: 12px 8px;
}
.mit-phase > span { font-size: 22px; display: block; margin-bottom: 6px; }
.mit-phase strong { display: block; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.mit-phase p { font-size: 11px; color: var(--text-muted); }
.mit-highlight-box {
  background: rgba(185,28,28,0.08); border: 1px solid #fca5a5;
  border-radius: 10px; padding: 12px 16px; margin-top: 14px;
  font-size: 15px; font-weight: 700; color: #b91c1c; line-height: 1.4; font-style: italic;
}
.mit-construct-items { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.mit-item { display: flex; gap: 12px; align-items: flex-start; }
.mit-item > span { font-size: 24px; flex-shrink: 0; }
.mit-item strong { display: block; font-size: 14px; color: var(--text); margin-bottom: 3px; }
.mit-item p { font-size: 12px; color: var(--text-muted); }

.journey-controls { display: flex; gap: 10px; margin-bottom: 16px; }
.journey-controls .btn-outline { flex: 1; }
.journey-controls .btn-primary { flex: 2; }
.journey-end { animation: fadeInUp 0.4s ease; }

/* ══════════════════════════════════ GALERIA ══════ */
.gallery-modal {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.gallery-backdrop {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.gallery-container {
  position: relative; background: white; border-radius: var(--radius);
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  padding: 20px; box-shadow: var(--shadow-lg); z-index: 1;
  display: flex; flex-direction: column; gap: 16px;
}
.gallery-header { display: flex; align-items: center; justify-content: space-between; }
.gallery-header h3 { font-size: 18px; font-weight: 700; color: var(--primary); }
.gallery-close {
  background: none; border: none; font-size: 22px; cursor: pointer;
  color: var(--text-muted); padding: 4px 8px; border-radius: 8px; transition: all 0.2s;
}
.gallery-close:hover { background: #f1f5f9; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gallery-thumb {
  border-radius: 10px; padding: 14px; cursor: pointer;
  transition: all 0.2s; border: 2px solid var(--border);
}
.r3p-thumb { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border-color: #86efac; }
.mit-thumb { background: linear-gradient(135deg, #fef2f2, #fee2e2); border-color: #fca5a5; }
.gallery-thumb:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }
.gt-badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 700; margin-bottom: 6px; }
.gt-badge.r3p { background: #059669; color: white; }
.gt-badge.mit { background: #b91c1c; color: white; }
.gt-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.gt-sub { font-size: 11px; color: var(--text-muted); }

/* Fullscreen */
.gallery-fullscreen { }
.gfs-nav {
  display: flex; justify-content: space-between; margin-bottom: 10px;
}
.gfs-arrow {
  background: var(--primary); color: white; border: none;
  width: 40px; height: 40px; border-radius: 50%; font-size: 20px;
  cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center;
}
.gfs-arrow:hover { background: var(--primary-mid); }
.gfs-arrow:disabled { opacity: 0.3; cursor: not-allowed; }
.gfs-content { min-height: 280px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gfs-card {
  border-radius: var(--radius); padding: 28px 24px; width: 100%;
  text-align: center; transform-origin: center; transition: transform 0.2s ease;
}
.r3p-gfs { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border: 2px solid #86efac; }
.mit-gfs { background: linear-gradient(135deg, #fef2f2, #fee2e2); border: 2px solid #fca5a5; }
.gfs-badge { display: inline-block; padding: 3px 14px; border-radius: 20px; font-size: 12px; font-weight: 800; margin-bottom: 12px; }
.gfs-badge.r3p { background: #059669; color: white; }
.gfs-badge.mit { background: #b91c1c; color: white; }
.gfs-card h3 { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.gfs-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.gfs-body { font-size: 14px; color: var(--text); line-height: 1.7; margin-bottom: 14px; }
.gfs-counter { font-size: 12px; color: var(--text-muted); }
.gfs-zoom-controls { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.gfs-zoom-btn {
  background: #f1f5f9; border: none; border-radius: 8px; width: 36px; height: 36px;
  font-size: 16px; cursor: pointer; transition: all 0.2s;
}
.gfs-zoom-btn:hover { background: var(--primary); color: white; }
.gallery-wa-btn { background: linear-gradient(135deg, #25d366, #128c7e) !important; }

/* ══════════════════════════════════ BOTTOM NAV ══════ */
#bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--nav-height); background: white;
  display: flex; align-items: stretch; border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08); z-index: 100;
  overflow-x: auto; overflow-y: hidden;
  padding-bottom: env(safe-area-inset-bottom);
  scrollbar-width: none; -ms-overflow-style: none;
}
#bottom-nav::-webkit-scrollbar { display: none; }
.nav-btn {
  flex: 0 0 auto; min-width: 64px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; background: none; border: none; cursor: pointer;
  padding: 8px 6px; color: #94a3b8; transition: all 0.2s; position: relative;
}
.nav-btn.active { color: var(--primary); }
.nav-btn.active::before {
  content: ''; position: absolute; top: 0; left: 15%; right: 15%;
  height: 3px; background: var(--primary); border-radius: 0 0 3px 3px;
}
.nav-icon { font-size: 18px; line-height: 1; }
.nav-label { font-size: 9px; font-weight: 600; white-space: nowrap; }

/* ══════════════════════════════════ CANVAS ══════ */
canvas { max-width: 100%; }

/* ══════════════════════════════════ UTILITIES ══════ */
.hidden { display: none !important; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* ══════════════════════════════════ RESPONSIVE ══════ */
@media (min-width: 600px) {
  .inicio-grid { grid-template-columns: repeat(3, 1fr); }
  .edu-strategy-cards { flex-direction: row; }
}

@media (min-width: 768px) {
  :root { --header-height: 64px; }
  #tab-content { padding: 24px 24px calc(var(--nav-height) + 24px); }
  .section-header h2 { font-size: 26px; }
  .card { padding: 24px; }
  .grid-3-cards { gap: 14px; }
  .mr-val { font-size: 18px; }
  .scenario-btns { flex-wrap: nowrap; }
}

@media (min-width: 900px) {
  #bottom-nav {
    top: var(--header-height); bottom: auto; left: 0; right: auto;
    width: 200px; height: auto; flex-direction: column;
    border-top: none; border-right: 1px solid var(--border);
    box-shadow: 2px 0 10px rgba(0,0,0,0.06);
    padding-bottom: 0; padding-top: 16px;
    align-items: stretch; overflow-y: auto; overflow-x: hidden;
  }
  .nav-btn { flex: 0 0 auto; min-width: unset; flex-direction: row; gap: 10px; padding: 12px 20px; justify-content: flex-start; }
  .nav-btn.active::before { top: 0; bottom: 0; left: 0; right: auto; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
  .nav-icon { font-size: 18px; }
  .nav-label { font-size: 13px; white-space: normal; }
  #main-app { padding-top: calc(var(--header-height) + 40px); }
  #tab-content { margin-left: 200px; max-width: calc(680px + 200px); padding-bottom: 32px; }
  #user-banner { left: 0; }
}

/* ══════════════════════════════════ FALE COMIGO ══════ */
.falecomigo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 8px 0 32px;
}

.falecomigo-photo-wrap {
  width: 100%;
  max-width: 320px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--accent);
  background: var(--card);
}

.falecomigo-photo {
  width: 100%;
  height: auto;
  display: block;
}

.falecomigo-btns {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 360px;
}

.falecomigo-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  box-shadow: var(--shadow-md);
  letter-spacing: 0.01em;
}

.falecomigo-btn:hover, .falecomigo-btn:focus {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  opacity: 0.93;
}

.falecomigo-btn:active {
  transform: translateY(0);
}

.falecomigo-btn--whatsapp  { background: #25D366; }
.falecomigo-btn--instagram { background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 55%, #fcb045 100%); }
.falecomigo-btn--linkedin  { background: #0077B5; }

.falecomigo-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: #fff;
}

/* ══════════════════════════════════ INDIQUE & GANHE ══════ */
.indicacoes-avatar-row {
  display: flex;
  justify-content: center;
  padding: 20px 0 4px;
}
.indicacoes-avatar-wrap {
  position: relative;
  width: 84px;
  height: 84px;
}
.indicacoes-avatar-img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  animation: breathe 4s ease-in-out infinite;
}
.indicacoes-avatar-fallback {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #e07b00);
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 900;
  color: white;
  border: 3px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  animation: breathe 4s ease-in-out infinite;
}
.indicacoes-thumbs {
  position: absolute;
  bottom: -2px;
  right: -2px;
  font-size: 18px;
  background: white;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  transform-origin: 65% 75%;
}
.indicacoes-thumbs.animating {
  animation: thumbsBounce 0.5s ease-in-out 4 both;
}

/* ══════════════════════════════════ INSTALL POPUP ══════ */
#install-popup-overlay {
  position: fixed; inset: 0; z-index: 1500;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(5, 14, 33, 0.78);
  backdrop-filter: blur(4px);
}
#install-popup-card {
  background: white; border-radius: var(--radius);
  padding: 28px 24px; width: 100%; max-width: 380px;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.4s ease both;
}
.install-popup-title {
  font-size: 18px; font-weight: 800; color: var(--primary);
  margin-bottom: 18px; text-align: center; line-height: 1.4;
}
.install-popup-steps {
  list-style: none; padding: 0;
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 16px;
}
.install-popup-steps li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 14px; line-height: 1.55; color: #374151;
}
.install-step-num {
  min-width: 26px; height: 26px;
  background: linear-gradient(135deg, var(--primary), var(--primary-mid));
  color: white; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0; margin-top: 1px;
}
.install-popup-footer {
  font-size: 13px; color: #6b7280; text-align: center;
  margin-bottom: 18px; font-style: italic;
}
.install-popup-text {
  font-size: 14px; color: #374151; line-height: 1.6;
  text-align: center; margin-bottom: 20px;
}

.indicacoes-intro {
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.7;
}

.indicacoes-main-btns {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.indicacoes-main-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  text-align: left;
  width: 100%;
}
.indicacoes-main-btn:hover,
.indicacoes-main-btn:focus {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.indicacoes-main-btn:active { transform: translateY(0); }
.indicacoes-main-btn--pix {
  background: linear-gradient(135deg, #10b981, #059669);
}
.indicacoes-btn-icon { font-size: 22px; flex-shrink: 0; }
.indicacoes-btn-arrow {
  margin-left: auto;
  font-size: 22px;
  transition: transform 0.3s ease;
}
.indicacoes-btn-arrow.open { transform: rotate(90deg); }

.indicacoes-panel { animation: fadeIn 0.3s ease; }
.indicacoes-panel-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}
.indicacoes-panel-text {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
}
.indicacoes-exemplo {
  display: block;
  padding: 2px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.btn-copy-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--primary-light);
  background: rgba(45, 91, 227, 0.07);
  color: var(--primary-light);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
}
.btn-copy-link:hover { background: rgba(45, 91, 227, 0.14); }
.btn-copy-link.copied {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--success);
  color: var(--success);
}
.copy-confirm {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--success);
  animation: fadeIn 0.3s ease;
}

.indicado-set {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
  animation: fadeIn 0.3s ease;
}
.indicado-set-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.indicado-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.indicado-inputs input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s;
}
.indicado-inputs input:focus {
  outline: none;
  border-color: var(--primary-light);
}
.indicado-inputs input::placeholder { color: var(--text-muted); }

.btn-add-indicado {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 2px dashed var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  margin-bottom: 10px;
}
.btn-add-indicado:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
  background: rgba(45, 91, 227, 0.05);
}

.btn-enviar-indicacoes { margin-bottom: 4px; }

.indicacoes-feedback {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  animation: fadeIn 0.3s ease;
}
.indicacoes-feedback.success {
  color: var(--success);
  background: rgba(16, 185, 129, 0.1);
}
.indicacoes-feedback.error {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

/* ══════════════════════════════════ TEASER SIMULADOR AVANÇADO ══════ */
.adv-teaser-card {
  border: 2px solid rgba(45, 91, 227, 0.18);
  background: linear-gradient(135deg, rgba(10,36,99,0.03) 0%, rgba(45,91,227,0.05) 100%);
  margin-top: 4px;
}
.adv-teaser-title {
  font-size: 18px; font-weight: 800; color: var(--primary); margin-bottom: 10px;
}
.adv-teaser-desc {
  font-size: 14px; color: var(--text-muted); line-height: 1.65; margin-bottom: 12px;
}
.adv-teaser-list {
  list-style: none; padding: 0; margin: 0 0 4px;
}
.adv-teaser-list li {
  position: relative; padding-left: 18px; margin-bottom: 8px;
  font-size: 14px; color: var(--text); line-height: 1.5;
}
.adv-teaser-list li::before {
  content: '→'; position: absolute; left: 0;
  color: var(--primary-light); font-weight: 700;
}

/* ══════════════════════════════════ PÁGINA SIMULADOR AVANÇADO ══════ */
.adv-ret-page {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 400;
  background: var(--bg);
  overflow-y: scroll; -webkit-overflow-scrolling: touch;
}
.adv-ret-topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; gap: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}
.adv-ret-back-btn {
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3);
  color: white; font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background 0.15s; white-space: nowrap;
}
.adv-ret-back-btn:hover { background: rgba(255,255,255,0.25); }
.adv-btn-help {
  background: rgba(245,158,11,0.2); border: 1px solid rgba(245,158,11,0.5);
  color: #fbbf24; font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background 0.15s; white-space: nowrap;
}
.adv-btn-help:hover { background: rgba(245,158,11,0.35); }
.adv-ret-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
  color: white; padding: 20px 16px 24px; text-align: center;
}
.adv-ret-hero h1 {
  font-size: 20px; font-weight: 800; margin-bottom: 6px; line-height: 1.3;
}
.adv-ret-hero p { font-size: 13px; color: rgba(255,255,255,0.78); }
.adv-ret-body {
  padding: 16px; max-width: 640px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 16px; padding-bottom: 48px;
}
.adv-card {
  background: var(--card); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.adv-card-title {
  font-size: 16px; font-weight: 700; color: var(--primary); margin-bottom: 16px;
}
.adv-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.adv-form-group {
  display: flex; flex-direction: column; gap: 6px;
}
.adv-form-group label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.adv-form-group input {
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 15px; color: var(--text);
  background: white; transition: border-color 0.15s; width: 100%;
}
.adv-form-group input:focus { outline: none; border-color: var(--primary-light); }
.adv-real-rate-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding: 10px 14px;
  background: rgba(10,36,99,0.05); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-muted); gap: 8px;
}
.adv-real-rate-row strong { color: var(--primary); font-size: 15px; font-weight: 700; }
.adv-table-hint {
  font-size: 12px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.5;
}
.adv-table-wrap { overflow-x: auto; margin-bottom: 8px; }
.adv-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 220px; }
.adv-table thead th {
  text-align: left; padding: 8px 10px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
  color: var(--text-muted); border-bottom: 2px solid var(--border);
}
.adv-table tbody td { padding: 6px 8px; border-bottom: 1px solid var(--border); }
.adv-table tbody tr:last-child td { border-bottom: none; }
.adv-table-input {
  border: 1.5px solid var(--border); border-radius: 6px;
  padding: 6px 8px; font-size: 13px; color: var(--text);
  background: white; width: 100%; min-width: 68px;
}
.adv-table-input:focus { outline: none; border-color: var(--primary-light); }
.adv-rm-row {
  background: none; border: none; color: #ef4444; cursor: pointer;
  font-size: 14px; padding: 4px 8px; border-radius: 4px; transition: background 0.15s;
}
.adv-rm-row:hover { background: rgba(239,68,68,0.1); }

/* Botões de direção: ⬆️ Aumentar / ⬇️ Reduzir */
.adv-dir-group {
  display: flex; gap: 3px; min-width: 158px;
}
.adv-dir-btn {
  flex: 1; padding: 5px 7px; border-radius: 6px;
  border: 1.5px solid var(--border); background: white;
  cursor: pointer; font-size: 11px; font-weight: 600;
  transition: all 0.15s; white-space: nowrap; line-height: 1.3;
  color: var(--text-muted);
}
.adv-dir-btn:not(.active):hover {
  border-color: var(--primary-light); color: var(--primary);
}
.adv-dir-up.active {
  border-color: #10b981; background: rgba(16,185,129,0.12); color: #065f46;
}
.adv-dir-down.active {
  border-color: #ef4444; background: rgba(239,68,68,0.1); color: #991b1b;
}
.adv-add-row-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 8px 16px; border-radius: var(--radius-sm);
  border: 2px dashed var(--border); background: transparent;
  color: var(--text-muted); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.15s; width: 100%; margin-top: 4px;
}
.adv-add-row-btn:hover:not(:disabled) {
  border-color: var(--primary-light); color: var(--primary-light);
  background: rgba(45,91,227,0.04);
}
.adv-add-row-btn:disabled { opacity: 0.38; cursor: not-allowed; }
.adv-note {
  font-size: 12px; color: var(--text-muted); margin-top: 8px;
  font-style: italic; line-height: 1.5;
}
.adv-calc-btn { font-size: 16px; font-weight: 800; letter-spacing: 0.3px; }
.adv-results-grid { display: flex; flex-direction: column; gap: 2px; }
.adv-result-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 14px; border-radius: var(--radius-sm);
  background: rgba(241,245,249,0.7); gap: 12px;
}
.adv-result-item:nth-child(odd) { background: rgba(10,36,99,0.045); }
.adv-result-label { font-size: 13px; color: var(--text-muted); font-weight: 500; flex: 1; }
.adv-result-value { font-size: 15px; font-weight: 700; color: var(--primary); text-align: right; }
.adv-analysis-msg {
  padding: 14px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; line-height: 1.6;
}
.adv-analysis-green {
  background: rgba(16,185,129,0.1); border-left: 4px solid #10b981; color: #064e3b;
}
.adv-analysis-orange {
  background: rgba(245,158,11,0.1); border-left: 4px solid #f59e0b; color: #78350f;
}
.adv-analysis-blue {
  background: rgba(45,91,227,0.07); border-left: 4px solid var(--primary-light); color: var(--primary);
}

/* ══════════════════════════════════ POPUP COMO USAR ══════ */
.adv-help-modal {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; z-index: 600;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.adv-help-backdrop {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; background: rgba(0,0,0,0.52); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.adv-help-content {
  position: relative; z-index: 1;
  background: white; border-radius: var(--radius);
  width: 100%; max-width: 480px; max-height: 82vh; overflow-y: auto;
  box-shadow: var(--shadow-lg); animation: fadeInUp 0.22s ease;
}
.adv-help-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 13px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: white; z-index: 1;
}
.adv-help-header h3 { font-size: 16px; font-weight: 700; color: var(--primary); }
.adv-help-close {
  background: none; border: none; cursor: pointer;
  font-size: 18px; color: var(--text-muted); padding: 4px 8px;
  border-radius: 6px; transition: background 0.15s; line-height: 1;
}
.adv-help-close:hover { background: var(--border); color: var(--text); }
.adv-help-body { padding: 14px 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.adv-help-item {
  padding: 12px 14px; background: rgba(10,36,99,0.03);
  border-radius: var(--radius-sm); border-left: 3px solid var(--primary-light);
}
.adv-help-item strong {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--primary); margin-bottom: 4px;
}
.adv-help-item p { font-size: 12px; color: var(--text-muted); line-height: 1.55; }

/* ── Descrição opcional nas tabelas ── */
.adv-desc-input {
  width: 100%; min-width: 100px; padding: 6px 8px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 12px; color: var(--text); background: var(--surface);
  font-family: inherit; outline: none; transition: border-color .15s;
}
.adv-desc-input:focus { border-color: var(--primary-light); }
.adv-desc-input::placeholder { color: var(--text-muted); font-style: italic; }

/* ── CTA de contato WhatsApp ── */
.adv-cta-card { background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); border: 1.5px solid #86efac; }
.adv-cta-inner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.adv-cta-icon { font-size: 28px; flex-shrink: 0; }
.adv-cta-text { flex: 1; min-width: 150px; }
.adv-cta-text strong { display: block; font-size: 14px; font-weight: 700; color: #166534; margin-bottom: 3px; }
.adv-cta-text p { font-size: 12px; color: #166534; opacity: .85; margin: 0; line-height: 1.4; }
.adv-cta-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #25d366; color: #fff; font-weight: 700; font-size: 13px;
  padding: 9px 16px; border-radius: 999px; text-decoration: none;
  white-space: nowrap; transition: background .2s, transform .15s; flex-shrink: 0;
}
.adv-cta-btn:hover { background: #1ebe5d; transform: translateY(-1px); }
.adv-cta-btn::before { content: ''; display: inline-block; width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='%23fff' d='M16 3C9 3 3 9 3 16c0 2.3.6 4.5 1.7 6.4L3 29l6.8-1.7C11.6 28.4 13.8 29 16 29c7 0 13-6 13-13S23 3 16 3zm6.7 18.1c-.3.8-1.5 1.5-2.1 1.6-.5.1-1.2.1-1.9-.1-.4-.1-1-.3-1.7-.6-3-1.3-4.9-4.3-5.1-4.5-.2-.2-1.4-1.9-1.4-3.6s.9-2.5 1.2-2.9c.3-.4.6-.4.8-.4h.6c.2 0 .4 0 .6.5l.8 2c.1.2 0 .4-.1.5l-.3.4c-.1.1-.3.3-.4.4-.1.1-.2.2-.1.4.1.2.7 1.1 1.5 1.8.9.8 1.7 1.1 2 1.2.2.1.4 0 .5-.1l.5-.6c.2-.2.4-.2.6-.1l1.8.8c.2.1.4.2.4.4.1.2 0 .9-.3 1.7z'/%3E%3C/svg%3E") center/contain no-repeat; }

/* ── Tutorial modal de 5 passos ── */
.adv-tut-content {
  position: relative; z-index: 1; background: #0f172a;
  border-radius: 16px; width: 92%; max-width: 480px; margin: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,.55); overflow: hidden;
  display: flex; flex-direction: column;
}
.adv-tut-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.adv-tut-header h3 { font-size: 15px; font-weight: 700; color: #f8fafc; margin: 0; }
.adv-tut-dots {
  display: flex; gap: 7px; justify-content: center; padding: 14px 20px 0;
}
.adv-tut-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.2); cursor: pointer;
  transition: background .2s, transform .2s;
}
.adv-tut-dot.active { background: var(--accent, #f59e0b); transform: scale(1.25); }
.adv-tut-dot:hover:not(.active) { background: rgba(255,255,255,.45); }
.adv-tut-steps { flex: 1; padding: 0; }
.adv-tut-step {
  display: none; flex-direction: column; align-items: center; text-align: center;
  padding: 20px 24px 16px; gap: 10px;
}
.adv-tut-step.active { display: flex; }
.adv-tut-icon { font-size: 36px; line-height: 1; }
.adv-tut-title { font-size: 15px; font-weight: 700; color: #f8fafc; margin: 0; }
.adv-tut-body {
  font-size: 13px; color: rgba(248,250,252,.75); line-height: 1.65;
  text-align: left; margin: 0; white-space: pre-line;
}
.adv-tut-body strong { color: #fbbf24; font-weight: 600; }
.adv-tut-body em { color: #93c5fd; font-style: normal; }
.adv-tut-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 18px; border-top: 1px solid rgba(255,255,255,.08);
}
.adv-tut-btn {
  background: rgba(255,255,255,.08); border: none; color: #f8fafc;
  font-size: 13px; font-weight: 600; padding: 8px 16px;
  border-radius: 999px; cursor: pointer; font-family: inherit;
  transition: background .2s;
}
.adv-tut-btn:hover:not(:disabled) { background: rgba(255,255,255,.15); }
.adv-tut-btn:disabled { opacity: .3; cursor: not-allowed; }
.adv-tut-next { background: var(--accent, #f59e0b); color: #1a1a2e; }
.adv-tut-next:hover:not(:disabled) { background: #d97706; }
.adv-tut-counter { font-size: 12px; color: rgba(248,250,252,.45); font-weight: 500; }

@media (max-width: 380px) {
  .adv-form-grid { grid-template-columns: 1fr; }
  .adv-ret-hero h1 { font-size: 17px; }
  .adv-tut-body { font-size: 12px; }
  .adv-tut-step { padding: 16px 16px 12px; }
}
