* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --yellow: #f5d400;
  --purple: #4b44e0;
  --green: #12a150;
  --text: #1c1c1e;
  --grey: #6b6b70;
  --line: #e6e6e9;
}

html,
body {
  background: #fff;
  font-family:
    "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  color: var(--text);
}

.phone {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #fff;
  position: relative;
  padding-bottom: 104px;
  overflow-x: hidden;
}

/* ===== Header ===== */
.header {
  background: var(--yellow);
  padding: 18px 16px 0;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 20px;
}
.greeting {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo {
  width: 34px;
  height: 34px;
  background: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.hi {
  font-size: 19px;
  font-weight: 700;
}
.header-actions {
  display: flex;
  gap: 10px;
}
.circle-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 14px;
  background: #fbeeb0;
  font-size: 18px;
  position: relative;
  cursor: pointer;
}
.bell .badge {
  position: absolute;
  top: 4px;
  right: 6px;
  background: #e01e5a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  position: relative;
  overflow: hidden;
}
.tab {
  border: none;
  background: transparent;
  font-size: 16px;
  color: #3a3a1a;
  padding: 10px 0 14px;
  cursor: pointer;
  white-space: nowrap;
}
.tab.active {
  background: #fff;
  color: var(--text);
  font-weight: 700;
  padding: 12px 18px 22px;
  margin: 0 6px 0 -4px;
  border-radius: 16px 16px 0 0;
}
.tab-cut {
  opacity: 0.85;
}
.tab-spark {
  margin-left: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff2a8 0%, var(--yellow) 70%);
  color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 0 4px #fbeeb0;
  margin-bottom: 6px;
}

/* ===== Conteúdo ===== */
.content {
  padding: 0 16px;
}

/* Card saldo (encaixado sob a aba branca) */
.balance-card {
  background: #fff;
  margin-top: -2px;
  padding: 18px 4px 0;
}
.balance-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.balance {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.5px;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}
.balance sup {
  font-size: 18px;
  top: -0.7em;
}
.eye {
  margin-left: 8px;
  display: inline-flex;
  vertical-align: middle;
}
.extrato {
  color: var(--purple);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.rendeu {
  color: var(--grey);
  font-size: 15px;
  margin-top: 6px;
}
.green {
  color: var(--green);
}

.promo {
  background: #e5f5e8;
  border-radius: 16px;
  padding: 16px;
  margin: 16px 0 8px;
  position: relative;
}
.promo-text {
  font-size: 16px;
  line-height: 1.4;
  padding-right: 20px;
}
.fire {
  vertical-align: -4px;
}
.promo::after {
  content: "›";
  position: absolute;
  right: 16px;
  top: 16px;
  color: var(--purple);
  font-size: 22px;
  font-weight: 700;
}
.progress {
  height: 5px;
  background: #cfe6d4;
  border-radius: 3px;
  margin: 14px 0;
}
.progress span {
  display: block;
  width: 6px;
  height: 5px;
  background: var(--green);
  border-radius: 3px;
}
.btn-deposit {
  width: 100%;
  border: none;
  background: var(--purple);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  padding: 16px;
  border-radius: 14px;
  cursor: pointer;
}

/* Blocos */
.block {
  margin-top: 30px;
}
.block h2,
.beneficios {
  font-size: 22px;
  font-weight: 700;
}
.beneficios {
  margin-top: 30px;
}
.link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--purple);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  margin: 6px 0 12px;
}
.outline-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.outline-card p {
  font-size: 16px;
  line-height: 1.35;
  color: #2b2b2e;
}
.btn-small {
  flex: none;
  border: none;
  background: var(--purple);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 12px;
  cursor: pointer;
}

/* Gauge score */
.gauge {
  flex: none;
  position: relative;
  width: 96px;
  height: 96px;
}
.score {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: var(--purple);
}

/* ===== Bottom nav ===== */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 10px 8px calc(12px + env(safe-area-inset-bottom, 0px));
}
.nav-item {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--grey);
  cursor: pointer;
}
.nav-item.active {
  color: var(--purple);
}
.nav-ic {
  width: 24px;
  height: 24px;
}
.nav-item.pix {
  position: relative;
}
.pix-btn {
  width: 58px;
  height: 58px;
  margin-top: -34px;
  background: #3fdccb;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 0 0 6px #eafbf8;
}


/* ===== Interatividade: views, abas, telas ===== */
.view { display: none; }
.view.active { display: block; }
.tabpanel { display: none; }
.tabpanel.active { display: block; }

.screen { padding: 6px 0 8px; }
.screen-h { font-size: 22px; font-weight: 700; margin: 4px 0 6px; }
.muted { color: var(--grey); font-size: 15px; }
.small { font-size: 13px; }
.tkr { margin-left: auto; color: var(--grey); font-size: 14px; padding-right: 8px; }

.info-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin: 14px 0;
}
.big-amount { font-size: 30px; font-weight: 700; margin: 4px 0 8px; }

.mini-progress { height: 8px; background: #eceaf9; border-radius: 4px; margin: 10px 0 6px; }
.mini-progress span { display: block; height: 8px; background: var(--purple); border-radius: 4px; }

.two-btns { display: flex; gap: 10px; margin-top: 12px; }
.btn-deposit.slim, .btn-ghost.slim { padding: 12px; font-size: 15px; }
.btn-ghost {
  width: 100%;
  border: 1.5px solid var(--purple);
  background: #fff;
  color: var(--purple);
  font-weight: 700;
  border-radius: 14px;
  cursor: pointer;
}

/* Listas de linhas */
.row-list {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  margin: 14px 0;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 15px 16px;
  border: none;
  border-bottom: 1px solid var(--line);
  background: #fff;
  font-size: 16px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.row:last-child { border-bottom: none; }
.row:active { background: #faf9ff; }
.row .r-ic {
  width: 38px; height: 38px; flex: none;
  border-radius: 11px; background: #f4f3fb;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.row .chev { margin-left: auto; color: #c4c4c9; font-size: 20px; }

/* Grade de ações */
.action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 18px 0;
}
.action {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  font-size: 12px; color: var(--text);
}
.action .ic {
  width: 54px; height: 54px; border-radius: 16px;
  background: #f0effe; color: var(--purple);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.action:active .ic { background: #e4e2fb; }

/* Cartão visual */
.card-visual {
  background: linear-gradient(135deg, #4B44E0, #8a7bff);
  color: #fff;
  border-radius: 18px;
  padding: 22px;
  min-height: 175px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 8px 24px rgba(75, 68, 224, 0.3);
  margin: 14px 0;
}
.cv-top, .cv-bot { display: flex; justify-content: space-between; font-size: 14px; }
.cv-flag { font-weight: 800; letter-spacing: 1px; }
.cv-num { font-size: 21px; letter-spacing: 2px; font-weight: 600; }

/* Toast */
.toast {
  position: fixed;
  left: 50%; bottom: 100px;
  transform: translateX(-50%) translateY(16px);
  background: #1c1c1e; color: #fff;
  padding: 12px 18px; border-radius: 12px;
  font-size: 14px; max-width: 88%; text-align: center;
  opacity: 0; pointer-events: none; transition: 0.25s;
  z-index: 300;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Modal (folha de baixo) */
.modal-back {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none; align-items: flex-end; justify-content: center;
  z-index: 400;
}
.modal-back.show { display: flex; animation: fade 0.15s ease; }
.modal {
  background: #fff;
  width: 100%; max-width: 480px;
  border-radius: 20px 20px 0 0;
  padding: 20px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  max-height: 85vh; overflow: auto;
  animation: up 0.22s ease;
}
.modal h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.modal .close {
  float: right; font-size: 24px; line-height: 1;
  background: none; border: none; color: var(--grey); cursor: pointer;
}
.field {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; font-size: 17px; margin: 12px 0; font-family: inherit;
}
.tx-list { margin-top: 6px; }
.tx {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15px;
}
.tx:last-child { border-bottom: none; }
.tx .amt.pos { color: var(--green); font-weight: 600; }
.tx .amt.neg { color: #c0392b; font-weight: 600; }

@keyframes up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* cor dinâmica dos ícones da barra inferior */
.nav-item { color: #6b6b70; }
.nav-item.active { color: var(--purple); }

/* ===== Trava por digital ===== */
.lock-overlay {
  position: fixed; inset: 0;
  background: #fff;
  z-index: 999;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.lock-overlay.hidden { display: none; }
body.locked { overflow: hidden; }

.lock-box { width: 100%; max-width: 340px; text-align: center; }
.lock-logo {
  width: 64px; height: 64px; margin: 0 auto 14px;
  background: #f0effe; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.lock-app-name { font-weight: 700; font-size: 15px; color: var(--grey); margin-bottom: 28px; }
.lock-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.lock-hint { color: var(--grey); font-size: 14px; margin-bottom: 20px; }

.fp-button {
  width: 84px; height: 84px; margin: 0 auto 14px;
  border-radius: 50%; border: 2px solid #e4e2fb; background: #f7f6ff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.fp-button:active { background: #ece9ff; }
.fp-ic { display: inline-flex; margin-right: 8px; vertical-align: -5px; }

.lock-link {
  display: block; margin: 14px auto 0;
  background: none; border: none; color: var(--purple);
  font-weight: 600; font-size: 14px; cursor: pointer;
}

#setup-pin-form, #unlock-pin-form { margin-top: 8px; }
.lock-pin-field { text-align: center; letter-spacing: 6px; font-size: 20px; }
