:root {
  /* Mismo azul principal de la app (bank_primary) */
  --navy: #1976d2;
  --navy-mid: #1565c0;
  --blue: #1976d2;
  --blue-dark: #1976d2;
  --blue-soft: #e3f2fd;
  --bg: #f4f7fb;
  --text: #111827;
  --muted: #6b7280;
  --card: #ffffff;
  --line: #e8eaed;
  --ok: #1976d2;
  --danger: #9b1c1c;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(25, 118, 210, 0.08), 0 8px 24px rgba(25, 118, 210, 0.06);
  --font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  letter-spacing: 0.01em;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

.top {
  background: #fff;
  color: var(--navy);
  border-bottom: 1px solid var(--line);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 40;
}
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
}
.brand {
  display: flex; gap: 10px; align-items: center; min-width: 0;
  color: inherit; text-decoration: none;
}
.logo {
  width: 42px; height: 42px; border-radius: 6px;
  background: #fff;
  display: grid; place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  padding: 2px;
  border: 1px solid var(--line);
}
.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.brand strong {
  display: block;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--navy);
}
.muted { color: var(--muted); font-size: 0.88rem; font-weight: 400; }
.top .muted { color: var(--muted); font-size: 0.78rem; }

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.btn-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 4px;
  white-space: nowrap;
}
.btn-header-cta:hover { background: var(--navy-mid); }

.wrap { max-width: 880px; margin: 0 auto; padding: 28px 20px 56px; }
.nav-interna {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
}
.nav-interna-top {
  margin: 0 0 10px;
}
.nav-interna-bottom {
  margin: 16px 0 0;
  justify-content: flex-start;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.nav-interna .btn-ghost,
.nav-interna .btn-out {
  margin: 0;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: 600;
}
.nav-interna-atras {
  min-width: 110px;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 24px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.hero {
  overflow: hidden;
}
.kicker {
  color: var(--blue);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
h1 {
  margin: 0 0 14px;
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1.25;
}
h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.01em;
}
h3 { font-weight: 600; color: var(--navy); }
.body { white-space: pre-wrap; color: #334155; }
.media { margin: 12px 0 16px; }
.media img, .media video {
  width: 100%; border-radius: 6px; display: block; background: #eef2f6;
}

.downloads { display: flex; flex-direction: column; gap: 8px; }
.downloads-stores { margin-bottom: 4px; }
.downloads-apk { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.btn-store {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--navy);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 11px 16px;
  border-radius: 4px;
  letter-spacing: 0.01em;
}
.btn-store:hover {
  background: var(--blue-soft);
  color: var(--navy);
  border-color: var(--navy);
}
.btn-store-play {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.btn-store-play:hover {
  background: var(--navy-mid);
  color: #fff;
  border-color: var(--navy-mid);
}
.app-casos { margin: 8px 0 14px; padding-left: 1.2rem; color: var(--text); }
.app-casos li { margin: 6px 0; }

.btn {
  display: block; text-align: center; text-decoration: none;
  padding: 10px 16px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.btn-play,
.btn-cta {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.btn-play:hover,
.btn-cta:hover {
  background: var(--navy-mid);
  border-color: var(--navy-mid);
}
.btn-cta-alt,
.btn-cta-pay,
.btn-cta-app,
.btn-apk,
.btn-abrir {
  background: #fff;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-cta-alt:hover,
.btn-cta-pay:hover,
.btn-cta-app:hover,
.btn-apk:hover,
.btn-abrir:hover {
  background: var(--blue-soft);
  color: var(--navy);
  border-color: var(--navy);
}
.card .btn, .card .btn-save, .card .btn-out { margin-top: 10px; }
.btn[hidden], .btn.is-off {
  opacity: 0.4; pointer-events: none;
}
.hint { font-size: 0.85rem; color: var(--muted); margin: 0; }
.hint code, .lista code { font-size: 0.8em; }
footer {
  text-align: center;
  padding: 8px 16px 32px;
  color: var(--muted);
  font-size: 0.82rem;
}

section[id] { scroll-margin-top: 88px; }
details { margin: 10px 0 0; border-bottom: 1px solid var(--line); }
details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
  padding: 12px 0;
  list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details p { margin: 0 0 12px; color: var(--text); }

.menu-btn {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.menu-btn:hover { background: var(--blue-soft); }
.menu-btn:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}
.menu-btn-bars {
  width: 18px;
  height: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.menu-btn-bars span {
  display: block;
  height: 1.5px;
  background: var(--navy);
  border-radius: 1px;
  transition: transform .2s ease, opacity .2s ease;
}
.menu-btn.is-open .menu-btn-bars span:nth-child(1) {
  transform: translateY(5.25px) rotate(45deg);
}
.menu-btn.is-open .menu-btn-bars span:nth-child(2) { opacity: 0; }
.menu-btn.is-open .menu-btn-bars span:nth-child(3) {
  transform: translateY(-5.25px) rotate(-45deg);
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 42, 74, .35);
  z-index: 45;
  opacity: 0;
  transition: opacity .22s ease;
}
.menu-overlay.is-open { opacity: 1; }
.menu-overlay[hidden],
.menu-panel[hidden] { display: none !important; }

.menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  width: min(100%, 400px);
  max-height: none;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  color: var(--text);
  border-radius: 0;
  box-shadow: -8px 0 32px rgba(11, 42, 74, .12);
  padding: 12px 8px 32px;
  z-index: 50;
  overscroll-behavior: contain;
  opacity: 1;
  transform: translateX(100%);
  transition: transform .24s ease;
}
.menu-panel.is-open {
  opacity: 1;
  transform: translateX(0);
}
.menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 18px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
}
.menu-head-title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.menu-close {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 4px;
}
.menu-close:hover { background: var(--blue-soft); }
.menu-close svg { width: 18px; height: 18px; }

.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 10px 18px;
  text-decoration: none;
  color: var(--text);
  border-radius: 0;
  font-weight: 400;
  font-size: 1.05rem;
}
.menu-item + .menu-item {
  border-top: 0;
}
.menu-item:first-child { border-radius: 0; }
.menu-item:last-child { border-radius: 0; }
.menu-item:active,
.menu-item:hover {
  background: #f7f9fc;
}
.menu-item-brand .menu-label {
  color: var(--blue);
  font-weight: 600;
}
.menu-ico {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: var(--navy);
  display: grid;
  place-items: center;
}
.menu-ico svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-item-destacado .menu-ico { color: var(--navy); }
.menu-item-cuenta {
  margin-top: 10px;
  border-top: 1px solid var(--line) !important;
  background: transparent;
  border-radius: 0 !important;
}
.menu-label { flex: 1; font-size: 1.02rem; line-height: 1.3; }
.menu-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #94a3b8;
  border-bottom: 1.5px solid #94a3b8;
  transform: rotate(-45deg);
  flex: 0 0 auto;
  margin-right: 6px;
}
.menu-item-destacado .menu-label { color: var(--text); font-weight: 500; }

body.menu-bloqueado { overflow: hidden; }

@media (min-width: 860px) {
  .menu-panel {
    width: 380px;
  }
}

/* Admin */
.login-box { max-width: 420px; margin: 48px auto; }
.login-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}
.login-brand .logo {
  width: 64px;
  height: 64px;
}
label { display: block; font-weight: 600; margin: 12px 0 6px; color: var(--navy); font-size: 0.9rem; }
input[type="text"], input[type="password"], input[type="url"], input[type="number"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px;
  font: inherit;
  background: #fff;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid rgba(26, 79, 139, 0.25);
  border-color: var(--blue);
}
.pass-wrap {
  position: relative;
  display: block;
}
.pass-wrap input {
  padding-right: 48px;
}
.pass-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  color: var(--muted);
  display: grid;
  place-items: center;
  -webkit-tap-highlight-color: transparent;
}
.pass-toggle svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.pass-toggle:hover,
.pass-toggle[aria-pressed="true"] {
  color: var(--navy);
  background: var(--blue-soft);
}
textarea { min-height: 160px; resize: vertical; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-save, .btn-out, .btn-ghost {
  border: 1px solid transparent; cursor: pointer; font: inherit; font-weight: 600;
  padding: 9px 14px; border-radius: 4px; font-size: 0.88rem;
}
.btn-save { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-out { background: #fff; border-color: var(--line); color: var(--text); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--navy); }
.msg { margin: 10px 0; font-weight: 600; }
.msg.ok { color: var(--navy); }
.msg.err { color: var(--danger); }
.preview { max-width: 100%; border-radius: 6px; margin-top: 8px; }

.credito {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  margin: 12px 0 0;
  background: #fafbfc;
}
.credito h3 { margin: 0 0 6px; font-size: 1.05rem; }
.lista { padding-left: 1.1rem; }
.tabla-wrap { overflow: auto; -webkit-overflow-scrolling: touch; margin-top: 8px; }
.tabla { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.tabla th, .tabla td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sep-o { text-align: center; color: var(--muted); margin: 16px 0 8px; font-weight: 500; }
.google-wrap { min-height: 44px; display: flex; justify-content: center; }
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  padding: 10px 16px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}
.btn-google:hover { background: #f8f9fa; }

.cta-panel h2 { margin-bottom: 4px; }
.cta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 14px;
}
@media (min-width: 560px) {
  .cta-grid { grid-template-columns: 1fr 1fr; }
}
.cta-grid-compact { margin: 12px 0; }
.btn-cta {
  box-shadow: none;
  transition: background .15s ease;
}
.btn-cta:hover { transform: none; }
.btn-cta:active { transform: none; }

.reg-callout {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.sim-resultado {
  margin-top: 16px;
  padding: 14px;
  border-radius: 6px;
  background: #fafbfc;
  border: 1px solid var(--line);
  animation: fadeUp .35s ease;
}
.sim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.sim-bloque { margin: 16px 0; }
.sim-label { font-weight: 600; margin: 0 0 8px; color: var(--navy); }
.sim-monto-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.sim-monto-head strong { font-size: 1.25rem; color: var(--navy); font-weight: 600; }
.sim-slider {
  width: 100%;
  accent-color: var(--navy);
  height: 22px;
}
.sim-rango {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
}
.sim-tasa-card {
  padding: 12px 14px;
  border-radius: 6px;
  background: #fafbfc;
  border: 1px solid var(--line);
}
.sim-tasa-card strong {
  display: block;
  font-size: 1.25rem;
  margin-top: 4px;
  font-weight: 600;
  color: var(--navy);
}
.sim-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sim-chip {
  min-width: 64px;
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--navy);
}
.sim-chip.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.sim-chip:disabled,
.sim-chip.is-locked {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: line-through;
}
.sim-chip.is-active:disabled {
  opacity: 0.55;
}
.sim-grid span { display: block; font-size: 0.85rem; }
.sim-grid strong { font-size: 1.02rem; font-weight: 600; }
.btn-solicitar-este {
  display: block;
  width: 100%;
  text-align: center;
  margin: 8px 0 12px;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  text-transform: none;
}
.auth-gate {
  margin: 12px 0;
  padding: 14px;
  border-radius: 6px;
  background: #f7f9fc;
  border: 1px solid var(--line);
}
.sol-estado { margin-top: 14px; }
.sol-estado-box {
  padding: 14px;
  border-radius: 6px;
  background: #f7f9fc;
  border: 1px solid var(--line);
}
.credito.is-focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(26, 79, 139, 0.15);
}
.row-actions { margin-top: 10px; }
.btn-pagar-cuota { padding: 6px 10px; font-size: 0.82rem; white-space: nowrap; }

.reveal {
  animation: fadeUp .45s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .wrap { padding: 18px 14px 44px; }
  .card { padding: 18px 16px; }
  h1 { font-size: 1.38rem; }
  .tabla { font-size: 0.82rem; }
  .sim-grid { grid-template-columns: 1fr; }
  .btn-header-cta { padding: 7px 10px; font-size: 0.75rem; }
  .brand strong { font-size: 0.95rem; }
}

.publicaciones-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pub-item {
  overflow: visible;
  max-height: none;
}
.pub-item .pub-titulo { margin: 0 0 6px; font-size: 1.12rem; font-weight: 600; }
.pub-subtitulo {
  margin: 0 0 12px;
  color: var(--blue);
  font-weight: 600;
  white-space: pre-wrap;
  word-break: break-word;
}
.pub-desc {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  margin: 0 0 8px;
  color: var(--text);
  max-height: none;
  overflow: visible;
}
.pub-media {
  margin: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pub-media img,
.pub-media video {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  border-radius: 6px;
  display: block;
  background: #eef2f6;
  object-fit: contain;
}
.pub-media video {
  min-height: 160px;
}
.pub-galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.pub-galeria img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  background: #eef2f6;
}
.pub-btn { margin-top: 8px; }
.pub-texto-largo {
  min-height: 220px;
  resize: vertical;
}
.pub-galeria-admin {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin: 10px 0 12px;
}
.pub-seleccion-prev {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin: 10px 0 12px;
}
.pub-sel-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px;
  background: #fff;
}
.pub-sel-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  background: #eef2f7;
  display: block;
}
.pub-sel-quitar {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.pub-sel-quitar:hover {
  background: #fff;
  border-color: #c62828;
}
.pub-sel-nombre {
  font-size: 0.72rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pub-galeria-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}
.pub-galeria-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  background: #eef2f7;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.admin-tab {
  border: 1px solid var(--line);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  font-size: 0.88rem;
}
.admin-tab.is-active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.admin-hint { margin-top: 8px; }
.pub-admin-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 20px; }
.pub-admin-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.pub-admin-item.is-off { opacity: 0.55; }
.pub-admin-thumb {
  width: 72px;
  height: 54px;
  border-radius: 4px;
  overflow: hidden;
  background: #eef2f7;
  display: grid;
  place-items: center;
}
.pub-admin-thumb img, .pub-admin-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pub-admin-meta strong { display: block; }
.pub-admin-actions { display: flex; flex-direction: column; gap: 6px; }
.pub-admin-form { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 4px; }
.pub-preview { max-height: 200px; object-fit: contain; }
