:root {
  --bg: #f3f6fb;
  --card: rgba(255, 255, 255, 0.88);
  --border: rgba(15, 23, 42, 0.08);
  --text: #122033;
  --muted: #5f6c80;
  --primary: #1447e6;
  --primary-soft: #dbe6ff;
  --ok: #0f9f6e;
  --ok-soft: #d8f6eb;
  --warn: #c57a00;
  --warn-soft: #fff1cc;
  --danger: #cf1f46;
  --danger-soft: #ffe0e7;
  --shadow: 0 20px 45px rgba(16, 24, 40, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(20, 71, 230, 0.12), transparent 30%),
    radial-gradient(circle at bottom right, rgba(15, 159, 110, 0.14), transparent 24%),
    var(--bg);
  color: var(--text);
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 28px;
  padding: 28px;
}

.demo-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand-lockup,
.panel-card,
.phone-frame,
.balance-card,
.quick-card,
.tx-item,
.info-card,
.feature-card,
.module-card,
.chat-card,
.semaforo-card,
.report-card,
.benefit-card,
.map-card,
.sos-card,
.list-card,
.credit-card-main,
.profile-card,
.mini-balance,
.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.brand-lockup,
.panel-card {
  padding: 20px;
}

.panel-card ol {
  padding-left: 18px;
  margin: 12px 0 0;
  color: var(--muted);
}

.panel-card li + li {
  margin-top: 10px;
}

.logo-badge,
.hero-logo {
  display: grid;
  place-items: center;
  border-radius: 22px;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--primary), #0f9f6e);
}

.logo-badge {
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
}

.logo-mark {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.hero-logo {
  width: 110px;
  height: 110px;
  font-size: 1.6rem;
  margin-bottom: 12px;
  overflow: hidden;
}

.hero-logo-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.brand-lockup {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-lockup h1,
.screen-header h2,
.screen-body h2,
.screen-body h3,
.panel-card h2,
.panel-card h3 {
  margin: 0;
}

.brand-lockup p,
.panel-card p,
.screen-body p,
.screen-header p,
.screen-body small,
.screen-body span {
  margin: 0;
}

.small {
  margin-top: auto;
}

.phone-stage {
  display: grid;
  place-items: center;
}

.phone-frame {
  width: min(430px, 100%);
  min-height: 860px;
  border-radius: 38px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(245,248,255,0.92));
}

.app-screen {
  position: relative;
  min-height: 828px;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, #fbfdff 0%, #eef3fb 100%);
}

.screen {
  display: none;
  min-height: 828px;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

.screen-header {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  padding: 20px 20px 12px;
}

.screen-header.minimal {
  justify-content: flex-start;
  color: var(--muted);
}

.screen-body {
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.screen-body.has-footer {
  padding-bottom: 92px;
}

.center-content {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.splash-bg {
  background:
    radial-gradient(circle at top, rgba(20, 71, 230, 0.18), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, #ecf3fb 100%);
}

.eyebrow {
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
  line-height: 1.5;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.biometric-btn,
.danger-btn {
  border-radius: 18px;
  padding: 14px 16px;
  font-weight: 700;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.biometric-btn:hover,
.danger-btn:hover,
.quick-card:hover,
.module-card:hover,
.feature-card:hover,
.map-chip:hover,
.nav-btn:hover,
.switch-btn:hover,
.back-btn:hover {
  transform: translateY(-1px);
}

.primary-btn {
  background: var(--primary);
  color: white;
}

.secondary-btn,
.biometric-btn {
  background: #e8eefc;
  color: var(--primary);
}

.ghost-btn {
  background: rgba(20, 71, 230, 0.08);
  color: var(--primary);
}

.small-btn {
  padding: 10px 12px;
  border-radius: 14px;
}

.danger-btn {
  background: var(--danger);
  color: white;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 6px rgba(15, 159, 110, 0.12);
}

.login-layout {
  justify-content: center;
}

.login-card {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.biometric-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 72px;
}

.fingerprint {
  font-size: 1.6rem;
}

.pin-box {
  display: grid;
  gap: 12px;
}

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.pin-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #cbd5e1;
}

.banner {
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.ok-banner {
  background: var(--ok-soft);
  color: #0a6c4b;
}

.soft-banner {
  background: #edf2ff;
  color: #27408d;
}

.wallet-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.switch-btn {
  border-radius: 16px;
  padding: 12px 10px;
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 700;
}

.switch-btn.active,
.feature-card.selected,
.benefit-card.selected,
.module-card.selected {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: rgba(20, 71, 230, 0.2);
}

.balance-card,
.info-card,
.chat-card,
.semaforo-card,
.report-card,
.map-card,
.sos-card,
.credit-card-main,
.profile-card,
.mini-balance,
.list-card {
  padding: 18px;
}

.balance-card h3,
.credit-card-main h3 {
  font-size: 2rem;
  margin: 8px 0 6px;
}

.balance-card span,
.info-card p,
.tx-item p,
.feature-card p,
.module-card span,
.benefit-card p,
.profile-card p,
.mini-balance p {
  color: var(--muted);
}

.quick-grid,
.module-grid,
.map-grid {
  display: grid;
  gap: 12px;
}

.quick-grid {
  grid-template-columns: repeat(2, 1fr);
}

.quick-card.full-span {
  grid-column: 1 / -1;
}

.accent-card {
  background: linear-gradient(135deg, rgba(20, 71, 230, 0.1), rgba(15, 159, 110, 0.1));
}

.compact-info h3 {
  margin-bottom: 8px;
}

.quick-card,
.module-card,
.feature-card {
  text-align: left;
  padding: 16px;
}

.quick-card {
  display: grid;
  gap: 6px;
  min-height: 132px;
}

.quick-card span:first-child {
  font-size: 1.35rem;
  color: var(--primary);
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.compact {
  margin-bottom: 12px;
}

.tx-list,
.card-stack,
.benefit-list,
.list-card,
.assistance-grid {
  display: grid;
  gap: 12px;
}

.tx-item {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.positive {
  color: var(--ok);
  font-weight: 700;
}

.floating-action {
  position: absolute;
  right: 20px;
  bottom: 92px;
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: white;
  border-radius: 999px;
  padding: 14px 18px;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(20, 71, 230, 0.28);
}

.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 14px 16px 18px;
  background: rgba(251, 253, 255, 0.94);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.nav-btn {
  border-radius: 16px;
  padding: 10px 8px;
  color: var(--muted);
  font-weight: 700;
}

.nav-btn.active {
  background: rgba(20, 71, 230, 0.1);
  color: var(--primary);
}

.back-btn {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(20, 71, 230, 0.08);
  color: var(--primary);
  font-size: 1rem;
}

.feature-card,
.module-card,
.benefit-card {
  border: 1px solid var(--border);
}

.module-grid {
  grid-template-columns: repeat(2, 1fr);
}

.highlight {
  background: linear-gradient(135deg, rgba(20, 71, 230, 0.08), rgba(15, 159, 110, 0.08));
}

.warn-copy {
  color: #7a5300;
  background: var(--warn-soft);
  border-radius: 16px;
  padding: 12px;
  margin-top: 10px;
}

.semaforo-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  align-items: center;
}

.traffic-bar {
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  min-height: 220px;
}

.zone {
  display: grid;
  place-items: center;
  text-align: center;
  color: rgba(18, 32, 51, 0.78);
  font-weight: 700;
}

.zone small {
  color: inherit;
}

.zone.green { background: #dcfce7; }
.zone.yellow { background: #fef3c7; }
.zone.red { background: #fee2e2; }
.zone.active {
  box-shadow: inset 0 0 0 4px rgba(18, 32, 51, 0.08);
}

.traffic-copy p {
  color: var(--muted);
  line-height: 1.5;
}

.bars {
  height: 150px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 12px;
}

.bar-col {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.bar-col span {
  width: 100%;
  border-radius: 14px 14px 8px 8px;
  background: linear-gradient(180deg, #76a5ff, var(--primary));
  min-height: 24px;
}

.mini-balance {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.map-grid {
  grid-template-columns: 1fr;
}

.map-chip {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(20, 71, 230, 0.08);
  color: var(--primary);
  text-align: left;
  font-weight: 700;
}

.sos-card {
  background: linear-gradient(135deg, rgba(207, 31, 70, 0.08), rgba(255, 255, 255, 0.9));
}

.step-badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(20, 71, 230, 0.08);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
}

.steps-inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.steps-inline span,
.sos-mini-list span {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 700;
}

.sos-mini-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.sos-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.atm-map {
  position: relative;
  min-height: 200px;
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(20, 71, 230, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(20, 71, 230, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,0.95), rgba(235, 243, 255, 0.92));
  background-size: 42px 42px, 42px 42px, auto;
  border: 1px solid var(--border);
  overflow: hidden;
}

.atm-point {
  position: absolute;
  padding: 8px 12px;
  border-radius: 999px;
  background: white;
  color: var(--primary);
  font-weight: 700;
  box-shadow: var(--shadow);
}

.atm-point:nth-child(1) { top: 28px; left: 24px; }
.atm-point:nth-child(2) { top: 46px; right: 28px; }
.atm-point:nth-child(3) { bottom: 30px; left: 66px; }
.atm-point:nth-child(4) { bottom: 46px; right: 52px; }

.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, #0f9f6e, var(--primary));
}

.toast {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 98px;
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(18, 32, 51, 0.94);
  color: white;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.35);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .page-shell {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .demo-panel {
    order: 2;
  }

  .phone-stage {
    order: 1;
  }
}

@media (max-width: 480px) {
  .page-shell {
    padding: 0;
    gap: 0;
  }

  .demo-panel {
    display: none;
  }

  .phone-frame {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
  }

  .app-screen,
  .screen,
  .screen.active {
    min-height: 100vh;
    border-radius: 0;
  }
}
