:root {
  --bg: #0B0F0E;
  --card: #131A18;
  --card2: #1A2421;
  --sage: #567572;
  --sage-light: #7FA39E;
  --gold: #E8B54A;
  --text: #EAF0EE;
  --muted: #8FA6A1;
  --green: #3ECF8E;
  --red: #F0616D;
  --radius: 18px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
}

.app {
  max-width: 430px;
  margin: 0 auto;
  padding: 18px 16px 40px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sage), #2F4A47);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; letter-spacing: 0.5px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(86,117,114,.35);
}
.brand-name { font-weight: 700; font-size: 17px; }
.brand-sub { font-size: 11.5px; color: var(--muted); }

.demo-badge {
  background: rgba(232,181,74,.12);
  color: var(--gold);
  border: 1px solid rgba(232,181,74,.4);
  font-size: 10.5px; font-weight: 700;
  padding: 5px 10px; border-radius: 999px;
  letter-spacing: 0.6px;
}

/* Tarjeta virtual */
.card-wrap { margin-bottom: 16px; }
.vcard {
  background: linear-gradient(140deg, #2F4A47 0%, #1B2B28 55%, #14201E 100%);
  border: 1px solid rgba(127,163,158,.25);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 12px 32px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06);
  position: relative;
  overflow: hidden;
}
.vcard::after {
  content: "";
  position: absolute;
  top: -60px; right: -60px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(127,163,158,.22), transparent 70%);
  pointer-events: none;
}
.vcard-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.vcard-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.vcard-label.small { font-size: 10px; }
.vcard-chip { font-size: 20px; filter: saturate(.9); }
.vcard-balance { font-size: 40px; font-weight: 800; margin-bottom: 18px; letter-spacing: -0.5px; }
.vcard-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.vcard-row.bottom { margin-top: 16px; align-items: flex-start; }
.vcard-value { font-size: 15px; font-weight: 600; margin-top: 3px; }
.vcard-value.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; letter-spacing: 0.8px; }
.qr-box {
  background: #fff;
  padding: 7px;
  border-radius: 12px;
  width: 86px; height: 86px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.qr-box img { width: 100%; height: 100%; image-rendering: pixelated; }

/* Stats */
.stats { display: flex; gap: 12px; margin-bottom: 20px; }
.stat {
  flex: 1;
  background: var(--card);
  border: 1px solid rgba(127,163,158,.15);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat-num { font-size: 17px; font-weight: 800; color: var(--gold); }
.stat-label { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* Tiers */
.tiers, .history {
  background: var(--card);
  border: 1px solid rgba(127,163,158,.15);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
h2 { font-size: 14px; font-weight: 700; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--sage-light); }
.tier-row { display: flex; gap: 10px; }
.tier {
  flex: 1;
  background: var(--card2);
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}
.tier-amt { display: block; font-size: 19px; font-weight: 800; color: var(--green); }
.tier-cond { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.tier-note { font-size: 11.5px; color: var(--muted); margin-top: 12px; line-height: 1.5; }

/* Historial */
.tx-list { list-style: none; }
.tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(127,163,158,.1);
}
.tx-item:last-child { border-bottom: none; }
.tx-icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.tx-icon.in { background: rgba(62,207,142,.12); }
.tx-icon.out { background: rgba(240,97,109,.12); }
.tx-body { flex: 1; min-width: 0; }
.tx-title { font-size: 13.5px; font-weight: 600; }
.tx-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tx-amt { font-weight: 800; font-size: 14.5px; white-space: nowrap; }
.tx-amt.in { color: var(--green); }
.tx-amt.out { color: var(--red); }

/* Google Wallet (demo) */
.gw-section { margin-bottom: 16px; }
.gw-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: #111;
  border: none;
  border-radius: 999px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.gw-btn:active { transform: scale(.98); }
.gw-note { font-size: 11px; color: var(--muted); margin-top: 10px; line-height: 1.5; text-align: center; }

.footer { text-align: center; font-size: 11px; color: var(--muted); padding-top: 8px; }
