/* ─── Mais Patrimônio · Simulador de Quitação ───────────────────────
   Paleta oficial:
   #0D3B8E Azul real profundo · #1E73FF Azul vivo · #60A5FA Azul claro
   #1F2937 Cinza azulado      · #E5E7EB Cinza claro
   Tipografia: Inter
   ──────────────────────────────────────────────────────────────── */

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

:root {
  --navy:      #0D3B8E;
  --navy-deep: #061A40;
  --blue:      #1E73FF;
  --sky:       #60A5FA;
  --ink:       #1F2937;
  --gray:      #E5E7EB;

  --bg:        #F3F6FB;
  --surface:   #FFFFFF;
  --surface2:  #F6F8FC;
  --muted:     #64748B;
  --blue-tint: #EAF2FF;
  --sky-tint:  #EFF6FF;
  --danger:    #D93A3A;
  --danger-tint:#FDECEC;

  --grad: linear-gradient(135deg, #1E73FF 0%, #0D3B8E 100%);
  --grad-text: linear-gradient(90deg, #1E73FF 0%, #60A5FA 100%);

  --radius: 16px;
  --shadow: 0 1px 2px rgba(13,59,142,.06), 0 8px 24px rgba(13,59,142,.08);

  /* usadas pelo app.js */
  --c-quitar: #1E73FF;
  --c-parcial: #60A5FA;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ─── Hero ─────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(120% 90% at 85% 0%, #123f93 0%, var(--navy-deep) 55%, #040f27 100%);
  color: #fff;
  padding: 0 20px 120px;
}
.hero-glow {
  position: absolute;
  right: -10%; bottom: -60%;
  width: 720px; height: 720px;
  background: radial-gradient(circle, rgba(30,115,255,.35) 0%, rgba(30,115,255,0) 65%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(115deg, transparent 0 48%, rgba(96,165,250,.07) 48% 52%, transparent 52% 100%);
  background-size: 220px 220px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 85%);
  pointer-events: none;
}

/* Topo, logo e rodapé vêm do CSS do site (/css/style.css). */

.hero-content {
  position: relative; z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding-top: 48px;
  text-align: center;
}
.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(32px, 5.4vw, 56px);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 18px;
}
.grad {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-content > p {
  font-size: 17px;
  color: rgba(255,255,255,.75);
  max-width: 580px;
  margin: 0 auto;
}
.hero-content > p strong { color: #fff; font-weight: 600; }

.pillars {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.pillars li {
  display: flex; align-items: center; gap: 10px;
  text-align: left;
  padding: 10px 16px 10px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(96,165,250,.18);
}
.pillars svg {
  width: 36px; height: 36px; padding: 8px;
  border-radius: 50%;
  background: rgba(30,115,255,.2);
  color: var(--sky);
  flex-shrink: 0;
}
.pillars span { display: flex; flex-direction: column; font-size: 12px; color: rgba(255,255,255,.6); line-height: 1.35; }
.pillars b { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: #fff; }

/* ─── Container & cards ────────────────────────────────────────── */
.container {
  position: relative; z-index: 2;
  max-width: 1040px;
  margin: -80px auto 0;
  padding: 0 20px 64px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--gray);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.card-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 17px; font-weight: 700;
  letter-spacing: -.3px;
  color: var(--ink);
  margin-bottom: 20px;
}
.step {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 13px; font-weight: 700;
  display: grid; place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(30,115,255,.3);
}

.field-main-label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }

.currency-input {
  display: flex; align-items: center;
  border: 1.5px solid var(--gray);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  transition: border-color .2s, box-shadow .2s;
}
.currency-input:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(30,115,255,.12); }
.currency-prefix {
  height: 58px; padding: 0 18px;
  display: flex; align-items: center;
  font-size: 15px; font-weight: 700;
  color: var(--navy);
  background: var(--blue-tint);
  border-right: 1.5px solid var(--gray);
}
.currency-input input {
  flex: 1; min-width: 0;
  border: none; outline: none;
  height: 58px; padding: 0 18px;
  font: inherit;
  font-size: 24px; font-weight: 700;
  letter-spacing: -.5px;
  color: var(--ink);
  background: transparent;
}
.currency-input input::placeholder { color: #B6C0CF; }

.hint { font-size: 13px; color: var(--muted); margin-top: 10px; }
.hint strong { color: var(--ink); font-weight: 600; }

/* ─── Linhas de contas ─────────────────────────────────────────── */
.contas-header,
.conta-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) 150px 150px 120px 42px;
  gap: 10px;
}
.contas-header { padding: 0 14px; margin-bottom: 8px; }
.contas-header span {
  font-size: 11px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted);
}

#contas-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }

.conta-row {
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--gray);
  transition: border-color .2s, background .2s, box-shadow .2s;
  animation: rowIn .25s ease;
}
@keyframes rowIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.conta-row.conta-selected {
  background: var(--blue-tint);
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(30,115,255,.1);
}
.conta-row .field-label { display: none; }

.field-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1.5px solid var(--gray);
  border-radius: 10px;
  background: var(--surface);
  font: inherit; font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field-input.mono { font-weight: 600; }
.field-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30,115,255,.12); }
.field-input::placeholder { color: #A3AEBF; font-weight: 400; }

.btn-remove {
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1.5px solid var(--gray);
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  display: grid; place-items: center;
  transition: all .2s;
}
.btn-remove:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-tint); }

.btn-add {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px;
  border: 1.5px dashed #C7D2E3;
  border-radius: 12px;
  background: transparent;
  font: inherit; font-size: 14px; font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  transition: all .2s;
}
.btn-add:hover { border-color: var(--blue); background: var(--blue-tint); color: var(--blue); }
.btn-add .plus {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: grid; place-items: center;
  font-size: 15px; line-height: 1;
}

.msg-error {
  display: none;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--danger-tint);
  border: 1px solid rgba(217,58,58,.25);
  color: var(--danger);
  font-size: 14px; font-weight: 600;
}
.msg-error.show { display: block; }

.actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.btn-calc {
  flex: 1; min-width: 220px;
  height: 56px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: none; border-radius: 12px;
  background: var(--grad);
  color: #fff;
  font: inherit; font-size: 16px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(30,115,255,.3);
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.btn-calc svg { width: 20px; height: 20px; transition: transform .2s; }
.btn-calc:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(30,115,255,.4); filter: brightness(1.05); }
.btn-calc:hover svg { transform: translateX(3px); }
.btn-calc:active { transform: none; }

.btn-clear {
  height: 56px; padding: 0 22px;
  border: 1.5px solid var(--gray); border-radius: 12px;
  background: var(--surface);
  font: inherit; font-size: 14px; font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all .2s;
}
.btn-clear:hover { color: var(--navy); border-color: var(--navy); }

/* ─── Resultado ────────────────────────────────────────────────── */
#resultado { display: none; scroll-margin-top: 20px; }
#resultado.show { display: block; animation: rowIn .35s ease; }

.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.result-head .card-title { margin-bottom: 0; }
.best-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: var(--blue-tint);
  color: var(--navy);
  font-size: 12px; font-weight: 700;
}
.best-badge svg { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: var(--blue); color: #fff; stroke-width: 3; }

.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.score-tile {
  padding: 18px;
  border-radius: 14px;
  background: var(--surface2);
  border: 1px solid var(--gray);
}
.score-tile:first-child {
  background: radial-gradient(120% 120% at 100% 0%, #1b56c4 0%, var(--navy) 45%, var(--navy-deep) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 24px rgba(13,59,142,.25);
}
.tile-val {
  font-size: 22px; font-weight: 800;
  letter-spacing: -.6px;
  line-height: 1.15;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.tile-val span { font-size: 13px; font-weight: 600; letter-spacing: 0; opacity: .7; }
.tile-val.green { color: var(--blue); }
.tile-val.gold  { color: var(--navy); }
.tile-val.red   { color: var(--muted); }
.score-tile:first-child .tile-val { color: #fff; font-size: 26px; }
.tile-label {
  margin-top: 6px;
  font-size: 11px; font-weight: 600;
  letter-spacing: .8px; text-transform: uppercase;
  color: var(--muted);
}
.score-tile:first-child .tile-label { color: rgba(255,255,255,.7); }

.prog-wrap { margin-top: 10px; }
.prog-label { font-size: 12px; color: var(--muted); }
.score-tile:first-child .prog-label { color: rgba(255,255,255,.75); }
.prog-track { height: 6px; border-radius: 3px; background: rgba(13,59,142,.1); overflow: hidden; margin-top: 6px; }
.score-tile:first-child .prog-track { background: rgba(255,255,255,.15); }
.prog-fill { height: 100%; border-radius: 3px; background: var(--grad-text); transition: width .6s ease; }

.result-list { display: flex; flex-direction: column; gap: 10px; }
.result-item {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--gray);
  background: var(--surface);
  transition: box-shadow .2s;
}
.result-item:hover { box-shadow: var(--shadow); }
.result-item.result-pay { border-color: rgba(30,115,255,.5); background: var(--blue-tint); }
.result-item.result-pay-partial { border-color: rgba(96,165,250,.6); background: var(--sky-tint); }
.result-item.result-skip { background: var(--surface2); }
.result-item.result-skip .result-name { color: var(--muted); }

.result-rank {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  font-size: 14px; font-weight: 800;
  background: var(--surface); border: 1.5px solid var(--gray); color: var(--muted);
}
.result-pay .result-rank { background: var(--grad); border-color: transparent; color: #fff; }
.result-pay-partial .result-rank { background: var(--sky); border-color: transparent; color: #fff; }

.result-body { flex: 1; min-width: 0; }
.result-name { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.result-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.result-body .prog-label { color: var(--ink); opacity: .8; }

.result-action { text-align: right; flex-shrink: 0; }
.action-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
}
.tag-pay { background: var(--blue); color: #fff; }
.tag-partial { background: var(--sky); color: #fff; }
.tag-hold { background: var(--surface); color: var(--muted); border: 1px solid var(--gray); }
.result-amount { margin-top: 6px; font-size: 17px; font-weight: 800; letter-spacing: -.3px; color: var(--navy); }

.explain-box {
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--surface2);
  border-left: 4px solid var(--blue);
  font-size: 15px; line-height: 1.65;
  color: #475569;
}
.explain-box strong { color: var(--ink); }

.compare-section { margin-top: 28px; }
.compare-title {
  font-size: 12px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.compare-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.compare-card {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--gray);
  background: var(--surface);
}
.cc-header { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.cc-sub { font-size: 12px; color: var(--muted); margin-bottom: 10px; line-height: 1.45; }
.cc-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 7px 0;
  font-size: 13px;
  border-top: 1px solid var(--gray);
}
.cc-row span:last-child { font-weight: 700; white-space: nowrap; }
.cc-row:last-child span:last-child { color: var(--navy); }

.tip-box {
  display: flex; gap: 12px; align-items: flex-start;
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 14px;
  background: radial-gradient(120% 140% at 100% 0%, #1b56c4 0%, var(--navy) 50%, var(--navy-deep) 100%);
  color: rgba(255,255,255,.85);
  font-size: 14px; line-height: 1.6;
}
.tip-box strong { color: #fff; }
.tip-icon {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(96,165,250,.2);
  display: grid; place-items: center;
  flex-shrink: 0; font-size: 0;
}
.tip-icon::before {
  content: '';
  width: 16px; height: 16px;
  background: var(--sky);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 22h4M12 2a7 7 0 0 0-4 12.7V17h8v-2.3A7 7 0 0 0 12 2Z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 22h4M12 2a7 7 0 0 0-4 12.7V17h8v-2.3A7 7 0 0 0 12 2Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ─── Responsivo ───────────────────────────────────────────────── */
@media (max-width: 820px) {
  .compare-grid { grid-template-columns: 1fr; }
  .contas-header { display: none; }
  .conta-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px;
  }
  .conta-row > :nth-child(1) { grid-column: 1 / -1; }
  .conta-row > :nth-child(5) { justify-self: end; align-self: end; }
  .conta-row .field-label {
    display: block;
    font-size: 11px; font-weight: 700;
    letter-spacing: .8px; text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 5px;
  }
  .conta-row.conta-selected .field-label { color: var(--navy); }
}

@media (max-width: 600px) {
  .hero { padding-bottom: 104px; }
  .hero-content { padding-top: 32px; }
  .hero-content > p { font-size: 15px; }
  .pillars { flex-direction: column; align-items: stretch; margin-top: 28px; }
  .container { margin-top: -72px; padding: 0 16px 48px; }
  .card { padding: 22px 16px; }
  .currency-input input { font-size: 20px; }
  .score-grid { grid-template-columns: 1fr 1fr; }
  .score-tile:first-child { grid-column: 1 / -1; }
  .result-item { flex-wrap: wrap; align-items: flex-start; gap: 12px; }
  .result-body { flex-basis: calc(100% - 50px); }
  .result-action {
    width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    padding-left: 50px;
  }
  .result-amount { margin-top: 0; }
  .btn-clear { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Ajustes de composição */
.hero-content { max-width: 900px; }
.score-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.score-tile:first-child { grid-column: span 2; }
.score-tile:first-child .tile-val { white-space: nowrap; font-size: 30px; }
@media (max-width: 600px) { .score-tile:first-child .tile-val { font-size: 26px; } }
.score-grid { display: flex; flex-wrap: wrap; }
.score-tile { flex: 1 1 150px; }
.score-tile:first-child { flex: 2 1 300px; }
.tile-val { white-space: nowrap; }
@media (max-width: 600px) {
  .score-tile { flex-basis: calc(50% - 6px); padding: 16px 14px; }
  .score-tile:first-child { flex-basis: 100%; }
  .tile-val { font-size: 18px; }
}
@media (min-width: 601px) {
  .score-tile { flex: 1 1 120px; padding: 16px; }
  .score-tile:first-child { flex: 2 1 250px; }
  .tile-val { font-size: 20px; }
}

/* Sem coluna de juros */
.contas-header, .conta-row { grid-template-columns: minmax(0,1fr) 180px 180px 42px; }
@media (max-width: 820px) {
  .conta-row { grid-template-columns: 1fr 1fr; }
  .conta-row > :nth-child(4) { grid-column: 1 / -1; justify-self: end; }
}

.explain-box small { display: block; font-size: 13px; color: var(--muted); }


/* Celular: botões um em cada linha */
@media (max-width: 600px) {
  .actions { flex-direction: column; }
  .btn-calc, .btn-clear { width: 100%; flex: none; min-width: 0; }
}

/* "+" desenhado em CSS: centralizado de verdade no círculo */
.btn-add .plus { position: relative; font-size: 0; flex-shrink: 0; }
.btn-add .plus::before,
.btn-add .plus::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 10px; height: 2px;
  border-radius: 1px;
  background: #fff;
  transform: translate(-50%, -50%);
}
.btn-add .plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.btn-add .plus::before,
.btn-add .plus::after { left: 0; top: 0; right: 0; bottom: 0; margin: auto; transform: none; }
.btn-add .plus::after { width: 2px; height: 10px; transform: none; }

/* Título: evita que o "?" encoste no "o" e que o degradê corte a letra */
.hero h1 .grad { padding-right: .12em; margin-right: -.075em; }

/* Botões fora dos blocos: valem para o formulário inteiro */
.actions-bar { margin: 4px 0 28px; }
.actions-bar .msg-error { margin: 0 0 14px; }
.actions-bar .actions { margin-top: 0; }
.actions-bar .btn-clear { background: transparent; }
.actions-bar .btn-clear:hover { background: var(--surface); }

/* Dica: ícone e texto centralizados verticalmente */
.tip-box { align-items: center; }

/* Selo de confiança abaixo do texto do topo */
.hero-content > p.hero-trust {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  max-width: 100%;
  margin-top: 20px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(96,165,250,.35);
  background: rgba(30,115,255,.12);
  color: #CFE2FF;
  font-size: 13px; font-weight: 600; line-height: 1.4;
}
.hero-trust .icon { width: 18px; height: 18px; color: var(--sky); flex-shrink: 0; }
@media (max-width: 600px) {
  .hero-content > p.hero-trust { border-radius: 14px; text-align: left; font-size: 12.5px; padding: 10px 14px; }
}

/* Rodapé do site: números normais (no Inter, tabular-nums alarga o hífen de "e-mail") */
.site-footer { font-variant-numeric: normal; }
