:root {
  --red: #C8102E;
  --red-deep: #9f1028;
  --gold: #C4972A;
  --ink: #171412;
  --text: #2d2926;
  --muted: #716962;
  --line: rgba(135, 105, 86, 0.14);
  --line-strong: rgba(135, 105, 86, 0.26);
  --card: rgba(255,255,255,.88);
  --card-solid: #ffffff;
  --bg: #f7f1eb;
  --bg-soft: #fbf8f5;
  --success: #1f8f5f;
  --warning: #b7791f;
  --danger: #b42318;
  --shadow-soft: 0 16px 40px rgba(33, 21, 15, 0.08);
  --shadow-card: 0 22px 55px rgba(33, 21, 15, 0.12);
  --safe-top: max(env(safe-area-inset-top), 16px);
  --safe-bottom: max(env(safe-area-inset-bottom), 16px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(196,151,42,.16) 0, rgba(196,151,42,0) 32%),
    linear-gradient(180deg, #fffdfa 0%, var(--bg) 36%, #f2e9e1 100%);
  color: var(--text);
  font-family: 'Inter', sans-serif;
}
body { min-height: 100vh; }
a { color: var(--red); text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
.app-shell {
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  padding: var(--safe-top) 16px calc(90px + var(--safe-bottom));
  background:
    radial-gradient(circle at top right, rgba(200,16,46,.09) 0, rgba(200,16,46,0) 28%),
    linear-gradient(180deg, rgba(255,255,255,.62), rgba(255,255,255,.16));
  backdrop-filter: blur(14px);
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 12px;
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.brand-logo-wrap {
  background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.55));
  border: 1px solid rgba(255,255,255,.42);
  box-shadow: var(--shadow-soft);
  border-radius: 22px;
  overflow: hidden;
}
.topbar-logo-wrap {
  width: 76px;
  height: 52px;
  padding: 0;
  border-radius: 18px;
}
.brand-logo-badge {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #d61a3d 0%, #bf0f2d 100%);
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 14px 30px rgba(200,16,46,.28), inset 0 1px 0 rgba(255,255,255,.18);
}
.profile-logo-wrap {
  width: 124px;
  margin: 0 auto 12px;
  padding: 10px;
}
.splash-logo-wrap {
  width: min(210px, 68vw);
  margin: 0 auto;
  border-radius: 28px;
  padding: 10px;
  background: rgba(255,255,255,.12);
}
.brand-logo { width: 100%; height: auto; object-fit: contain; }
.brand-logo-topbar-icon {
  width: 60%;
  max-width: 38px;
}
.brand-stack {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.brand-title {
  font-family: 'Playfair Display', serif;
  font-size: 25px;
  line-height: .95;
  color: var(--ink);
  letter-spacing: -.02em;
}
.brand-caption {
  margin-top: 5px;
  font-size: 12px;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: rgba(23,20,18,.62);
  font-weight: 800;
}
.brand-mark { font-family: 'Playfair Display', serif; font-weight: 900; color: var(--red); letter-spacing: 0.02em; }
.brand-mark-sm { font-size: 26px; }
.brand-mark-md { font-size: 32px; }
.brand-tag,
.hero-chip,
.chip,
.status-pill,
.countdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.brand-tag,
.hero-chip,
.chip {
  border: 1px solid rgba(196,151,42,.25);
  color: var(--gold);
  background: rgba(196,151,42,.08);
}
.hero-badges,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.ghost-btn,
.back-btn,
.link-btn {
  background: none;
  border: none;
  color: var(--ink);
}
.ghost-btn {
  border: 1px solid rgba(255,255,255,.5);
  padding: 10px 15px;
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  box-shadow: 0 10px 24px rgba(33,21,15,.06);
  font-weight: 600;
  color: rgba(23,20,18,.92);
}
.main-content { display: grid; gap: 16px; }
.screen { display: none; animation: fade .25s ease; }
.screen.active { display: block; }
@keyframes fade {
  from { opacity: .2; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-panel {
  border-radius: 28px;
  padding: 24px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.hero-panel::before {
  content: '';
  position: absolute;
  inset: auto -40px -60px auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(196,151,42,.24), rgba(196,151,42,0) 68%);
}
.hero-panel.dark {
  background:
    linear-gradient(180deg, rgba(33,24,20,.98) 0%, rgba(18,18,18,.98) 100%),
    radial-gradient(circle at top right, rgba(200,16,46,.24), rgba(0,0,0,0) 42%);
  color: #fff;
}
.hero-panel.light {
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(250,245,239,.94));
  border: 1px solid rgba(255,255,255,.55);
}
.hero-panel.compact { padding-bottom: 18px; }
.hero-panel h1,
.hero-panel h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  line-height: 1.05;
  margin: 8px 0 12px;
  letter-spacing: -0.03em;
  position: relative;
  z-index: 1;
}
.hero-panel h1 { font-size: 32px; }
.hero-panel h2 { font-size: 28px; }
.hero-panel p {
  margin: 0;
  color: rgba(255,255,255,.8);
  line-height: 1.62;
  position: relative;
  z-index: 1;
}
.hero-panel.light p { color: var(--muted); }
.eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 11px;
  font-weight: 800;
  position: relative;
  z-index: 1;
}
.card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.52);
  backdrop-filter: blur(18px);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}
.form-card,
.stack-list,
.settings-list,
.deposit-shell,
.deposit-summary-grid,
.deposit-method-grid { display: grid; gap: 12px; }
.small-links {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}
.label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}
.input {
  width: 100%;
  border: 1px solid rgba(135,105,86,.18);
  background: rgba(255,255,255,.94);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65);
}
.input:focus {
  outline: none;
  border-color: rgba(200,16,46,.48);
  box-shadow: 0 0 0 4px rgba(200,16,46,.08);
}
.primary-btn,
.secondary-btn,
.action-btn,
.settings-item,
.filter-btn,
.inline-btn {
  width: 100%;
  border-radius: 16px;
  padding: 14px 16px;
  border: none;
}
.primary-btn {
  background: linear-gradient(180deg, #d11e3f 0%, var(--red) 100%);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 14px 32px rgba(200,16,46,.26);
}
.primary-btn:disabled { opacity: .6; box-shadow: none; }
.secondary-btn,
.action-btn,
.inline-btn {
  background: rgba(255,255,255,.92);
  color: var(--ink);
  border: 1px solid rgba(135,105,86,.15);
}
.inline-btn { width: auto; padding: 12px 14px; }
.helper {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.feedback {
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 14px;
}
.feedback.error { background: #fef3f2; color: var(--danger); border: 1px solid #fecdca; }
.feedback.success { background: #ecfdf3; color: var(--success); border: 1px solid #a7f3d0; }
.feedback.warning { background: #fffbeb; color: var(--warning); border: 1px solid #fde68a; }
.hidden { display: none; }
.balance-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}
.balance-box > div {
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
}
.balance-box strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  line-height: 1.1;
  font-family: 'Playfair Display', serif;
}
.mini-label {
  color: rgba(255,255,255,.68);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
}
.metric-card .mini-label,
.light-card .mini-label,
.profile-meta { color: var(--muted); }
.grid.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
  line-height: 1.1;
  font-family: 'Playfair Display', serif;
  color: var(--ink);
}
.metric-card {
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.7));
}
.accent-card {
  background: linear-gradient(180deg, rgba(255,250,240,.95) 0%, rgba(255,245,224,.92) 100%);
}
.action-card .section-head,
.card .section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.section-head h3,
.screen-head h2 {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  color: var(--ink);
}
.actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.action-btn { font-weight: 700; }
.product-row,
.statement-row,
.info-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.product-row:last-child,
.statement-row:last-child,
.info-row:last-child { border-bottom: none; }
.product-row strong,
.statement-row strong,
.info-row strong { display: block; color: var(--ink); }
.product-row span,
.statement-row span,
.info-row span { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.45; }
.badge {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 10px;
}
.value { font-weight: 800; color: var(--ink); }
.value.credit { color: var(--success); }
.value.debit { color: var(--danger); }
.screen-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.back-btn {
  border: 1px solid rgba(135,105,86,.14);
  background: rgba(255,255,255,.88);
  padding: 10px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}
.filters-row {
  display: flex;
  gap: 8px;
  overflow: auto;
  margin-bottom: 14px;
}
.filter-btn {
  background: rgba(255,255,255,.92);
  color: var(--muted);
  border: 1px solid rgba(135,105,86,.16);
  white-space: nowrap;
  width: auto;
}
.filter-btn.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.profile-card { text-align: center; }
.profile-card p {
  margin: 8px 0 4px;
  font-size: 20px;
  font-weight: 700;
}
.settings-item {
  text-align: left;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(135,105,86,.15);
  color: var(--ink);
}
.settings-item.danger { color: var(--red); }
.faq-card details {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.faq-card details:last-child { border-bottom: none; }
.faq-card summary { cursor: pointer; font-weight: 700; }
.faq-card p,
.legal-card p,
.card p { color: var(--muted); line-height: 1.65; }
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(430px, 100%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(24px);
  border-top: 1px solid rgba(135,105,86,.12);
  padding: 10px 12px calc(10px + var(--safe-bottom));
  box-shadow: 0 -10px 40px rgba(0,0,0,.05);
}
.nav-item {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.nav-item.active { color: var(--red); }
.splash {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at top, rgba(255,255,255,.16), rgba(255,255,255,0) 22%), linear-gradient(180deg, #d31d3f 0%, #9f1028 100%);
  z-index: 20;
}
.splash.active { display: flex; }
.splash-card {
  width: min(360px, 100%);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 30px;
  text-align: center;
  padding: 34px 28px;
  color: #fff;
  box-shadow: 0 28px 80px rgba(0,0,0,.22);
}
.brand-subtitle { color: rgba(255,255,255,.8); margin-top: 16px; line-height: 1.55; }
.loading-bar {
  height: 6px;
  background: rgba(255,255,255,.12);
  border-radius: 999px;
  margin-top: 18px;
  overflow: hidden;
}
.loading-bar span {
  display: block;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, #f8d7a3, #ffffff, #f8d7a3);
  animation: load 1.2s infinite;
}
@keyframes load {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(260%); }
}
.deposit-shell { margin-top: 2px; }
.deposit-summary-grid {
  grid-template-columns: 1fr 1fr;
}
.deposit-summary-item,
.deposit-method-card,
.deposit-pix-card,
.deposit-history-card {
  border-radius: 20px;
  padding: 16px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(135,105,86,.12);
}
.deposit-summary-item strong,
.deposit-method-card strong,
.deposit-pix-card strong {
  display: block;
  color: var(--ink);
  margin-top: 6px;
  font-size: 18px;
}
.deposit-summary-item span,
.deposit-method-card span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
}
.deposit-method-grid { grid-template-columns: 1fr 1fr; }
.deposit-method-card.active {
  border-color: rgba(200,16,46,.32);
  box-shadow: 0 14px 35px rgba(200,16,46,.1);
}
.deposit-pix-card {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(250,245,239,.96));
}
.deposit-qr-box {
  width: min(100%, 240px);
  margin: 16px auto 0;
  padding: 14px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(135,105,86,.14);
  box-shadow: var(--shadow-soft);
}
.deposit-qr-box img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}
.deposit-code-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(23,20,18,.96);
  color: #fff;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.6;
}
.countdown-pill {
  color: #fff;
  background: linear-gradient(180deg, #292320, #171412);
}
.status-pill.pending { background: #fffbeb; color: var(--warning); }
.status-pill.approved { background: #ecfdf3; color: var(--success); }
.status-pill.failed { background: #fef3f2; color: var(--danger); }
.history-list .statement-row { padding: 12px 0; }
.empty-state {
  padding: 20px;
  border-radius: 18px;
  border: 1px dashed rgba(135,105,86,.22);
  text-align: center;
  color: var(--muted);
}
@media (max-width: 380px) {
  .hero-panel h1 { font-size: 28px; }
  .grid.metrics-grid,
  .balance-box,
  .actions-grid,
  .deposit-summary-grid,
  .deposit-method-grid { grid-template-columns: 1fr; }
  .topbar-logo-wrap { width: 68px; height: 46px; }
  .brand-logo-topbar-icon { max-width: 34px; }
}
