:root {
  --mb-azul: #0d6efd;
  --mb-azul-oscuro: #0a58ca;
  --mb-verde: #198754;
  --mb-fondo: #f5f7fb;
  --mb-borde: #e6e9f0;
}

body {
  background-color: var(--mb-fondo);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #1c2430;
}

body.modal-abierto,
body.menu-abierto {
  overflow: hidden;
}

a {
  text-decoration: none;
}

.marca-icono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
  background: linear-gradient(145deg, var(--mb-azul), #6ea8fe);
  color: #fff;
  font-size: 1.05rem;
  box-shadow: 0 4px 10px rgba(13, 110, 253, 0.25);
}

.selector-banco {
  max-width: 13rem;
  min-width: 8rem;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #e7f0ff;
  color: var(--mb-azul-oscuro);
  font-size: 0.72rem;
  font-weight: 700;
}

.sidebar {
  max-height: calc(100vh - 4.25rem);
  position: sticky;
  top: 3.5rem;
  overflow-y: auto;
}

.sidebar .nav-link {
  color: #33404f;
  font-size: 0.94rem;
  transition: background-color 0.15s ease;
}

.sidebar .nav-link:hover {
  background: #f0f4fb;
}

.sidebar .nav-link.active {
  background: #e7f0ff;
  color: var(--mb-azul-oscuro);
  font-weight: 600;
}

.page-main {
  max-width: 1200px;
}

.card {
  border-radius: 0.9rem;
}

.card-header {
  background: #fff;
  border-bottom-color: var(--mb-borde);
  font-weight: 600;
}

.table {
  --bs-table-bg: transparent;
  vertical-align: middle;
}

.table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6b7785;
  font-weight: 600;
  white-space: nowrap;
}

.table td,
.table th {
  padding: 0.65rem 0.75rem;
}

.tarjeta-saldo {
  background: #fff;
}

.icono-tono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  background: #eef3fb;
  font-size: 1.05rem;
}

.hero {
  background:
    radial-gradient(circle at 85% 15%, rgba(13, 110, 253, 0.14), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(25, 135, 84, 0.1), transparent 40%),
    #fff;
  border: 1px solid var(--mb-borde);
  border-radius: 1.2rem;
}

.hero-icono {
  font-size: 2.4rem;
  color: var(--mb-azul);
}

.auth-card {
  max-width: 430px;
  width: 100%;
}

.auth-envoltura {
  min-height: calc(100vh - 9rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0;
}

.recovery-codes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
}

.recovery-codes code {
  background: #f4f6fa;
  border: 1px dashed #cfd6e0;
  border-radius: 0.4rem;
  padding: 0.35rem 0.5rem;
  text-align: center;
  color: #1c2430;
}

.qr-contenedor {
  background: #fff;
  border: 1px solid var(--mb-borde);
  border-radius: 0.75rem;
  padding: 0.75rem;
  display: inline-block;
}

/* uqr devuelve <svg viewBox> sin width/height: sin tamaño intrínseco, dentro
   de un inline-block colapsa a 0 y el QR no se pinta. */
.qr-contenedor svg {
  display: block;
  width: 200px;
  height: 200px;
}

.secreto-manual {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
  background: #f4f6fa;
  border-radius: 0.4rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.85rem;
}

.monto-positivo {
  color: var(--mb-verde);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.monto-negativo {
  color: #b02a37;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.monto-neutro {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.fila-compacta td {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.panel-destacado {
  background: linear-gradient(160deg, #0d6efd, #0a58ca);
  color: #fff;
  border-radius: 1rem;
  border: none;
}

.panel-destacado .text-secondary {
  color: rgba(255, 255, 255, 0.75) !important;
}

.menu-movil {
  position: fixed;
  inset: 0;
  z-index: 1055;
  display: flex;
}

.menu-movil-panel {
  position: relative;
  z-index: 2;
  width: min(85vw, 320px);
  height: 100%;
  overflow-y: auto;
  box-shadow: 0 0 40px rgba(15, 23, 42, 0.35);
  animation: deslizar 0.18s ease-out;
}

.menu-movil-fondo {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  border: none;
  z-index: 1;
}

@keyframes deslizar {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.modal {
  background: rgba(15, 23, 42, 0.45);
  z-index: 1060;
}

.tabla-movil {
  font-size: 0.88rem;
}

.codigo-otp {
  letter-spacing: 0.45rem;
  font-size: 1.25rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.dropdown-menu {
  z-index: 1050;
}

@media (max-width: 575.98px) {
  .page-main {
    padding-left: 0.85rem !important;
    padding-right: 0.85rem !important;
  }

  .tarjeta-saldo .fs-3 {
    font-size: 1.4rem !important;
  }

  .selector-banco {
    max-width: 8.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
