/*
 * styles.css — Sistema de diseño Créditos Desvare
 * Basado en el diseño de referencia "Créditos de Confianza"
 * Paleta, tipografía y componentes idénticos al diseño original.
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=DM+Serif+Display&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Variables del sistema ─────────────────────────────────────── */
:root {
  --azul: #1A4B8C;
  --azul-medio: #2260B0;
  --azul-claro: #E8F0FB;
  --azul-hover: #153D74;
  --azul-gradient: linear-gradient(135deg, var(--azul) 0%, #1A5FA0 60%, #2260B0 100%);
  --verde: #1A7A4A;
  --verde-claro: #E6F4ED;
  --rojo: #C0392B;
  --rojo-claro: #FDEDEC;
  --naranja: #B45309;
  --naranja-cl: #FFF8E6;
  --gris-bg: #F4F6FA;
  --gris-card: #FFFFFF;
  --gris-borde: #E4E8F0;
  --gris-texto: #64748B;
  --negro: #0F172A;
  --blanco: #FFFFFF;
  --sidebar-w: 230px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(26, 75, 140, 0.10);
  --shadow-lg: 0 8px 32px rgba(26, 75, 140, 0.14);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-pill: 100px;
  --nav-bg: #2260B0;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--gris-bg);
  color: var(--negro);
  min-height: 100vh;
  overflow-x: hidden;
  /* Bloquear selección de texto para seguridad */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* ── Layout base con sidebar ───────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ───────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--blanco);
  border-right: 1px solid var(--gris-borde);
  display: flex;
  flex-direction: column;
  z-index: 1050; /* Z-index unificado para móvil/escritorio */
  transition: all 0.3s ease;
  position: fixed !important; /* Siempre fijo para que el scroll funcione bien */
  top: 0;
  bottom: 0;
  left: 0;
}

/* Ajuste para el contenido principal */
.main {
  flex: 1;
  padding: 32px;
  background: var(--gris-bg);
  min-height: 100vh;
  margin-left: var(--sidebar-w);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (max-width: 991.98px) {
  .main {
    margin-left: 0 !important;
    padding: 15px !important;
    max-width: 100vw !important;
  }
}

.sidebar-logo {
  padding: 24px;
  border-bottom: 1px solid var(--gris-borde);
}

.logo-text {
  font-family: 'DM Serif Display', serif;
  font-size: 17px;
  color: var(--azul);
  line-height: 1.2;
  display: block;
}

.logo-sub {
  font-size: 10px;
  font-weight: 500;
  color: var(--verde);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-top: 2px;
  display: block;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 14px;
  font-weight: 500;
  color: var(--gris-texto);
  text-decoration: none;
  position: relative;
}

.nav-item:hover {
  background: var(--gris-bg);
  color: var(--azul);
}

.nav-item.active {
  background: var(--azul-claro);
  color: var(--azul);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--azul);
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  flex-shrink: 0;
}

.nav-item.active .nav-icon {
  background: var(--azul);
}

.sidebar-footer {
  margin-top: auto; /* al fondo aunque la barra no tenga menú */
  padding: 16px 12px 24px;
  border-top: 1px solid var(--gris-borde);
}

.aliado-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--gris-bg);
}

.aliado-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--azul);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.aliado-info {
  flex: 1;
  min-width: 0;
}

.aliado-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--negro);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aliado-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--verde);
  letter-spacing: 0.3px;
}

/* Navbar Admin */
.navbar-creditos {
  background: var(--nav-bg) !important;
  background-image: linear-gradient(135deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0) 100%) !important;
  padding: 12px 24px !important;
  box-shadow: var(--shadow-md) !important;
  position: sticky;
  top: 0;
  z-index: 101;
  border-bottom: 1px solid var(--gris-borde) !important;
  transition: all 0.3s ease;
}

.navbar-creditos .navbar-brand {
  color: white !important;
  font-weight: 700 !important;
}

/* ── MAIN CONTENT ──────────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: calc(100vw - var(--sidebar-w));
}

/* ── TOPBAR ────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--nav-bg);
  padding: 18px 28px;
  border-radius: 16px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.topbar-greeting {
  font-size: 22px;
  font-weight: 700;
  color: white;
}

.topbar-greeting span {
  color: #60A5FA;
  /* Un azul más brillante para fondo oscuro */
}

.topbar-date {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-title {
  font-size: 20px;
  font-weight: 700;
  color: white;
}

.topbar-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notif-btn,
.back-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  color: white;
}

.notif-btn:hover,
.back-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.notif-btn svg path,
.back-btn svg path {
  stroke: white;
}

/* Botón Salir (Asociado Topbar) */
.btn-logout-topbar {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: white !important;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}

.btn-logout-topbar:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: #EF4444 !important;
  color: #EF4444 !important;
}

/* ── CUPO CARD (gradiente azul) ─────────────────────────────────── */
.cupo-card {
  background: linear-gradient(135deg, var(--azul) 0%, #2260B0 60%, #1A5FA0 100%);
  border-radius: var(--radius);
  padding: 32px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.cupo-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.cupo-card::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: 40px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}

.cupo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.cupo-header .btn-solicitar {
  margin-top: 0;
  flex-shrink: 0;
}

.cupo-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 8px;
}

.cupo-amount {
  font-family: 'DM Serif Display', serif;
  font-size: 48px;
  line-height: 1;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.cupo-sub {
  font-size: 13px;
  opacity: 0.70;
  margin-bottom: 28px;
}

.cupo-meta {
  display: flex;
  margin-top: 22px;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.cupo-meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.meta-label {
  font-size: 11px;
  opacity: 0.65;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-value {
  font-size: 14px;
  font-weight: 700;
}

.meta-value.verde {
  color: #6EE7B7;
}

.meta-value.blanco {
  color: white;
}

.meta-value.rojo {
  color: #FCA5A5;
}

/* Botón de solicitar inhabilitado por mora */
/* Con el cupo bloqueado los botones de solicitar/continuar desaparecen */
.btn-solicitar[hidden],
.btn-primary[hidden] {
  display: none;
}

/* ── AVISO DE MORA (cupo bloqueado) ──────────────────────────────── */
.aviso-mora {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: rgba(192, 57, 43, 0.22);
  border: 1px solid rgba(252, 165, 165, 0.45);
  position: relative;
  z-index: 1;
}

.aviso-mora i {
  font-size: 22px;
  color: #FCA5A5;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Mismo tipo de letra que el monto de la tarjeta */
.aviso-mora-titulo {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.15;
  color: white;
}

.aviso-mora-texto {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 8px;
  line-height: 1.6;
}

/* Variante sobre fondo claro (página de solicitud) */
.aviso-mora.claro {
  background: var(--rojo-claro);
  border-color: rgba(192, 57, 43, 0.3);
  margin-top: 0;
  margin-bottom: 20px;
}
.aviso-mora.claro i { color: var(--rojo); }
.aviso-mora.claro .aviso-mora-titulo { color: var(--rojo); }
.aviso-mora.claro .aviso-mora-texto { color: #7F1D1D; }

/* El atributo hidden debe ganarle al display:flex de arriba */
.aviso-mora[hidden] {
  display: none;
}

.cupo-mini-estado.mora {
  background: rgba(252, 165, 165, 0.18);
  border-color: rgba(252, 165, 165, 0.45);
  color: #FCA5A5;
}

/* "Si pagas hoy" en rojo cuando el crédito está en mora */
.pago-hoy.mora {
  background: var(--rojo-claro);
  border-color: rgba(192, 57, 43, 0.25);
}
.pago-hoy.mora .pago-hoy-label,
.pago-hoy.mora .pago-hoy-monto { color: var(--rojo); }
.pago-hoy.mora .btn-pagar-hoy {
  background: var(--rojo);
  box-shadow: 0 2px 8px rgba(192, 57, 43, 0.3);
}

.cupo-divider {
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
  align-self: stretch;
}

/* Segunda fila de la tarjeta de cupo: barra de cupo y referido por */
.cupo-detalle {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  z-index: 1;
}

.cupo-detalle-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 140px;
  flex: 1;
}

.cupo-barra-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cupo-barra-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
}

.cupo-barra-fill {
  height: 100%;
  background: #6EE7B7;
  border-radius: 10px;
  transition: width 0.3s;
}

/* Tarjeta de cupo más compacta en el celular */
@media (max-width: 768px) {
  .cupo-card {
    padding: 20px 18px;
  }
  .cupo-label {
    font-size: 11px;
    margin-bottom: 4px;
  }
  .cupo-meta {
    gap: 14px;
  }
  .cupo-detalle {
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
  }
  .cupo-detalle-item {
    min-width: 0;
  }
  .aviso-mora {
    padding: 14px 16px;
    gap: 10px;
  }
  .aviso-mora-titulo {
    font-size: 18px;
  }
  .aviso-mora-texto {
    font-size: 13px;
  }
  .meta-value {
    font-size: 13px;
  }
  .cupo-header {
    flex-wrap: nowrap;
    gap: 10px;
  }
  .cupo-header > div:first-child {
    min-width: 0;
  }
  .cupo-amount {
    font-size: 26px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .cupo-meta {
    margin-top: 14px;
  }
  .btn-solicitar {
    padding: 9px 14px;
    font-size: 12px;
    gap: 5px;
    white-space: nowrap;
  }
  .btn-solicitar svg {
    width: 14px;
    height: 14px;
  }
}

/* ── CUPO MINI (para la pantalla de solicitud) ───────────────────── */
.cupo-mini {
  background: linear-gradient(135deg, var(--azul) 0%, #2260B0 100%);
  border-radius: var(--radius);
  padding: 24px 28px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.cupo-mini::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.cupo-mini-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  opacity: 0.70;
  margin-bottom: 4px;
}

.cupo-mini-amount {
  font-family: 'DM Serif Display', serif;
  font-size: 36px;
  line-height: 1;
}

.cupo-mini-estado {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(110, 231, 183, 0.18);
  border: 1px solid rgba(110, 231, 183, 0.35);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #6EE7B7;
}

/* ── BOTÓN SOLICITAR (dentro de cupo card) ──────────────────────── */
.btn-solicitar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: var(--azul);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: none;
  margin-top: 28px;
  position: relative;
  z-index: 1;
  transition: all 0.15s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-solicitar:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.20);
}

/* ── CARDS GENÉRICAS ────────────────────────────────────────────── */
.card {
  background: var(--blanco);
  border-radius: var(--radius);
  border: 1px solid var(--gris-borde);
  box-shadow: var(--shadow-sm);
}

.card-body {
  padding: 24px;
}

.card-header-bar {
  padding: 18px 24px;
  border-bottom: 1px solid var(--gris-borde);
  font-size: 15px;
  font-weight: 700;
  color: var(--negro);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── DESVARES (tabla de créditos) ───────────────────────────────── */
.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--negro);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-count {
  background: var(--azul-claro);
  color: var(--azul);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.desvar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--gris-borde);
  gap: 12px;
}

.desvar-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.desvar-row:first-child {
  padding-top: 0;
}

.desvar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.desvar-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--azul-claro);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 17px;
}

.desvar-fecha {
  font-size: 12px;
  color: var(--gris-texto);
  margin-bottom: 2px;
}

.desvar-monto {
  font-size: 15px;
  font-weight: 700;
  color: var(--negro);
}

.desvar-right {
  text-align: right;
}

.desvar-pago {
  font-size: 12px;
  color: var(--gris-texto);
  margin-bottom: 4px;
}

/* ── STATUS PILLS ───────────────────────────────────────────────── */
.status-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.status-activo,
.status-pendiente {
  background: #FFF3CD;
  color: #856404;
}

.status-aprobado {
  background: var(--azul-claro);
  color: var(--azul);
}

.status-pagado {
  background: #F0F0F0;
  color: #888;
}

.status-rechazado {
  background: var(--rojo-claro);
  color: var(--rojo);
}

/* ── ACCIONES RÁPIDAS (grid de botones) ─────────────────────────── */
.acciones-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.accion-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--gris-borde);
  background: var(--gris-bg);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  text-decoration: none;
}

.accion-btn:hover {
  border-color: var(--azul);
  background: var(--azul-claro);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.accion-btn:hover .accion-icon {
  background: var(--azul);
}

.accion-btn:hover .accion-label {
  color: var(--azul);
}

.accion-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.accion-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gris-texto);
  transition: color 0.15s;
}

/* ── PERFIL CARD ───────────────────────────────────────────────── */
.perfil-avatar-lg {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--azul), #2260B0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.perfil-nombre {
  font-size: 15px;
  font-weight: 700;
  color: var(--negro);
}

.perfil-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--verde);
  margin-top: 2px;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

.stat-label {
  font-size: 13px;
  color: var(--gris-texto);
}

.stat-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--negro);
}

.score-bar-track {
  height: 6px;
  background: var(--gris-borde);
  border-radius: 10px;
  overflow: hidden;
  flex: 1;
  margin: 0 10px;
}

.score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--azul), #2260B0);
  border-radius: 10px;
}

.ver-perfil-btn {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--azul);
  background: transparent;
  color: var(--azul);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.ver-perfil-btn:hover {
  background: var(--azul);
  color: white;
}

/* ── FORMULARIO ────────────────────────────────────────────────── */
.form-card {
  background: var(--blanco);
  border-radius: var(--radius);
  border: 1px solid var(--gris-borde);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.form-section {
  margin-bottom: 32px;
}

.form-section:last-child {
  margin-bottom: 0;
}

.form-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--negro);
  margin-bottom: 6px;
}

.form-section-hint {
  font-size: 13px;
  color: var(--gris-texto);
  margin-bottom: 18px;
  line-height: 1.5;
}

.form-section-hint strong {
  color: var(--azul);
}

.form-divider {
  height: 1px;
  background: var(--gris-borde);
  margin: 28px 0;
}

/* MONTO INPUT */
.monto-wrap {
  position: relative;
}

.monto-prefix {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 700;
  color: var(--azul);
  pointer-events: none;
}

.monto-input {
  width: 100%;
  padding: 20px 20px 20px 44px;
  font-size: 28px;
  font-weight: 700;
  font-family: 'DM Serif Display', serif;
  color: var(--negro);
  border: 2px solid var(--gris-borde);
  border-radius: var(--radius-sm);
  background: var(--gris-bg);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

.monto-input:focus {
  border-color: var(--azul);
  background: var(--blanco);
}

.monto-input.error {
  border-color: var(--rojo);
  background: var(--rojo-claro);
}

/* CAMPOS NORMALES */
.field-group {
  margin-bottom: 18px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--negro);
  margin-bottom: 7px;
}

.field-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--negro);
  border: 1.5px solid var(--gris-borde);
  border-radius: var(--radius-sm);
  background: var(--blanco);
  outline: none;
  transition: border-color 0.15s;
}

.field-input:focus {
  border-color: var(--azul);
}

.field-input::placeholder {
  color: #b0bac6;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ── CALENDARIO ────────────────────────────────────────────────── */
.fecha-hint-row {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.fecha-hint-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gris-bg);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gris-texto);
}

.fecha-hint-chip span {
  color: var(--azul);
  font-weight: 700;
}

.calendar-wrap {
  border: 1.5px solid var(--gris-borde);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--gris-bg);
  border-bottom: 1px solid var(--gris-borde);
}

.cal-nav {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gris-borde);
  background: var(--blanco);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.cal-nav:hover {
  background: var(--azul-claro);
  border-color: var(--azul);
}

.cal-month {
  font-size: 15px;
  font-weight: 700;
  color: var(--negro);
}

.cal-grid {
  padding: 12px 16px 16px;
}

.cal-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 6px;
}

.cal-day-name {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--gris-texto);
  padding: 6px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
  color: var(--negro);
  border: 1.5px solid transparent;
}

.cal-day:hover:not(.disabled):not(.past) {
  background: var(--azul-claro);
  color: var(--azul);
}

/* Días no seleccionables: hoy, anteriores, y más allá de 90 días.
   El JS aplica .disabled; .past se mantiene por compatibilidad. */
.cal-day.past,
.cal-day.disabled {
  color: #C8D0DC;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.45;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.cal-day.past:hover,
.cal-day.disabled:hover {
  background: transparent;
  color: #C8D0DC;
}

/* Hoy: bloqueado (el plazo empieza mañana) pero visible como referencia. */
.cal-day.disabled.es-hoy {
  border: 1.5px dashed var(--gris-texto);
  opacity: 0.6;
  text-decoration: none;
}

.cal-day.min-day {
  background: var(--verde-claro);
  color: var(--verde);
  font-weight: 700;
  border-color: var(--verde);
}

.cal-day.max-day {
  background: var(--azul-claro);
  color: var(--azul);
  font-weight: 700;
  border-color: var(--azul);
}

.cal-day.in-range {
  background: rgba(26, 75, 140, 0.06);
}

.cal-day.selected {
  background: var(--azul);
  color: white;
  font-weight: 700;
  border-color: var(--azul);
}

.cal-day.today {
  border-color: var(--azul);
  color: var(--azul);
  font-weight: 700;
}

.cal-day.empty {
  cursor: default;
}

.fecha-selected-box {
  display: none;
  align-items: center;
  gap: 12px;
  background: var(--verde-claro);
  border: 1.5px solid var(--verde);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-top: 14px;
}

.fecha-selected-box.visible {
  display: flex;
}

.fecha-selected-icon {
  font-size: 20px;
}

.fecha-selected-text {
  font-size: 14px;
  color: var(--verde);
  font-weight: 600;
}

.fecha-selected-sub {
  font-size: 12px;
  color: var(--verde);
  opacity: 0.75;
  margin-top: 1px;
}

/* ── BOTONES ────────────────────────────────────────────────────── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  background: var(--azul);
  color: white;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-primary:hover {
  background: var(--azul-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
  background: #C8D0DC;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  width: 100%;
  padding: 14px;
  background: transparent;
  color: var(--gris-texto);
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--gris-borde);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-secondary:hover {
  border-color: var(--rojo);
  color: var(--rojo);
  background: var(--rojo-claro);
}

/* ── PANELES INFORMATIVOS ──────────────────────────────────────── */
.info-card {
  background: var(--blanco);
  border-radius: var(--radius);
  border: 1px solid var(--gris-borde);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.info-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--negro);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.autonomia-card {
  background: var(--azul-claro);
  border-radius: var(--radius);
  border: 1px solid rgba(26, 75, 140, 0.15);
  padding: 20px;
}

.autonomia-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--azul);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.autonomia-text {
  font-size: 13px;
  color: var(--azul);
  line-height: 1.6;
  opacity: 0.85;
}

.resumen-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--gris-borde);
  font-size: 14px;
}

.resumen-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.resumen-label {
  color: var(--gris-texto);
}

.resumen-value {
  font-weight: 700;
  color: var(--negro);
}

.resumen-value.pending {
  color: #C8D0DC;
  font-style: italic;
  font-weight: 400;
}

.resumen-value.highlight {
  color: var(--azul);
  font-size: 16px;
}

/* ── PASOS (stepper) ───────────────────────────────────────────── */
.steps-bar {
  display: flex;
  align-items: center;
  gap: 0;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.step.done .step-circle {
  background: var(--verde-claro);
  color: var(--verde);
}

.step.done .step-label {
  color: var(--gris-texto);
}

.step.active .step-circle {
  background: var(--azul);
  color: white;
}

.step.active .step-label {
  color: var(--azul);
}

.step.pending .step-circle {
  background: var(--gris-borde);
  color: var(--gris-texto);
}

.step.pending .step-label {
  color: #C0CAD8;
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--gris-borde);
  margin: 0 8px;
  min-width: 32px;
}

.step-line.done {
  background: var(--verde);
}

/* ── CONFIRMACIÓN ──────────────────────────────────────────────── */
.resumen-card {
  background: var(--blanco);
  border-radius: var(--radius);
  border: 1px solid var(--gris-borde);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.resumen-header {
  background: linear-gradient(135deg, var(--azul) 0%, #2260B0 100%);
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.resumen-header-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 4px;
}

.resumen-header-amount {
  font-family: 'DM Serif Display', serif;
  font-size: 40px;
  color: white;
  line-height: 1;
}

.resumen-header-right {
  text-align: right;
}

.resumen-header-fecha-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 4px;
}

.resumen-header-fecha {
  font-size: 16px;
  font-weight: 700;
  color: white;
}

.resumen-header-dias {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 2px;
}

.resumen-body {
  padding: 0 28px;
}

.resumen-fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--gris-borde);
  gap: 16px;
}

.resumen-fila:last-child {
  border-bottom: none;
}

.resumen-fila-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.resumen-fila-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--gris-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.resumen-fila-nombre {
  font-size: 13px;
  color: var(--gris-texto);
  margin-bottom: 3px;
  font-weight: 500;
}

.resumen-fila-valor {
  font-size: 16px;
  font-weight: 700;
  color: var(--negro);
}

.resumen-fila-valor.azul {
  color: var(--azul);
}

.resumen-fila-valor.total {
  font-size: 20px;
  font-family: 'DM Serif Display', serif;
  color: var(--azul);
}

.resumen-fila.total-row {
  background: var(--azul-claro);
  margin: 0 -28px;
  padding: 18px 28px;
  border-bottom: none;
  border-top: 1px solid rgba(26, 75, 140, 0.12);
}

/* AVISOS */
.avisos-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.aviso {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.55;
}

.aviso.condiciones {
  background: var(--naranja-cl);
  border: 1px solid #F0C040;
  color: var(--naranja);
}

.aviso.velocidad {
  background: var(--verde-claro);
  border: 1px solid rgba(26, 122, 74, 0.25);
  color: var(--verde);
}

.aviso-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.aviso-text strong {
  font-weight: 700;
}

/* ── MODALS / POPUPS ───────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 500;
  align-items: center;
  justify-content: center;
}

.modal-overlay.visible {
  display: flex;
}

.modal {
  background: white;
  border-radius: var(--radius);
  padding: 40px 36px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: popIn 0.22s ease;
}

@keyframes popIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-icon {
  font-size: 52px;
  margin-bottom: 16px;
}

.modal-title {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  color: var(--negro);
  margin-bottom: 8px;
}

.modal-text {
  font-size: 14px;
  color: var(--gris-texto);
  line-height: 1.65;
  margin-bottom: 8px;
}

.modal-amount {
  font-family: 'DM Serif Display', serif;
  font-size: 36px;
  color: var(--azul);
  margin: 12px 0;
}

.modal-fecha {
  font-size: 14px;
  color: var(--gris-texto);
  margin-bottom: 24px;
}

.modal-btn {
  width: 100%;
  padding: 14px;
  background: var(--azul);
  color: white;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.modal-btn:hover {
  background: var(--azul-hover);
}

/* ── ADMIN — TABLAS ─────────────────────────────────────────────── */
.tabla-admin {
  width: 100%;
  border-collapse: collapse;
}

.tabla-admin th {
  background: var(--azul);
  color: white;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}

.tabla-admin th:first-child {
  border-radius: 8px 0 0 0;
}

.tabla-admin th:last-child {
  border-radius: 0 8px 0 0;
}

.tabla-admin td {
  padding: 13px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--gris-borde);
  vertical-align: middle;
}

.tabla-admin tr:last-child td {
  border-bottom: none;
}

.tabla-admin tr:hover td {
  background: var(--gris-bg);
}

/* BOTONES DE ACCIÓN SMALL */
.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
  white-space: nowrap;
}

.btn-sm-green {
  background: var(--verde-claro);
  color: var(--verde);
}

.btn-sm-green:hover {
  background: var(--verde);
  color: white;
}

.btn-sm-blue {
  background: var(--azul-claro);
  color: var(--azul);
}

.btn-sm-blue:hover {
  background: var(--azul);
  color: white;
}

.btn-sm-red {
  background: var(--rojo-claro);
  color: var(--rojo);
}

.btn-sm-red:hover {
  background: var(--rojo);
  color: white;
}

/* ── LOGIN ──────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  background: var(--gris-bg);
}

.login-left {
  flex: 1;
  background: linear-gradient(135deg, var(--azul) 0%, #1A5FA0 60%, #2260B0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.login-left::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -60px;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}

.login-brand {
  position: relative;
  z-index: 1;
  color: white;
}

.login-brand-name {
  font-family: 'DM Serif Display', serif;
  font-size: 36px;
  line-height: 1.1;
  margin-bottom: 12px;
}

.login-brand-tagline {
  font-size: 15px;
  opacity: 0.75;
  line-height: 1.6;
  max-width: 320px;
}

.login-brand-dots {
  display: flex;
  gap: 8px;
  margin-top: 32px;
}

.login-brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}

.login-brand-dot.active {
  background: white;
  width: 24px;
  border-radius: 4px;
}

.login-right {
  width: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: white;
}

.login-form-wrap {
  width: 100%;
}

.login-title {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  color: var(--negro);
  margin-bottom: 6px;
}

.login-sub {
  font-size: 14px;
  color: var(--gris-texto);
  margin-bottom: 32px;
}

.login-error {
  background: var(--rojo-claro);
  border: 1px solid rgba(192, 57, 43, 0.2);
  color: var(--rojo);
  font-size: 13px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  display: none;
}

.login-error.visible {
  display: block;
}

.login-link {
  font-size: 13px;
  color: var(--gris-texto);
  margin-top: 24px;
  text-align: center;
}

.login-link a {
  color: var(--azul);
  font-weight: 600;
  text-decoration: none;
}

.login-link a:hover {
  text-decoration: underline;
}

/* SHOW/HIDE PASSWORD */
.password-wrap {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gris-texto);
  display: flex;
  align-items: center;
}

/* ── REGISTRO ───────────────────────────────────────────────────── */
.registro-page {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 24px;
  background: var(--gris-bg);
}

.registro-card {
  width: 100%;
  max-width: 540px;
  background: var(--blanco);
  border-radius: var(--radius);
  border: 1px solid var(--gris-borde);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.registro-logo {
  text-align: center;
  margin-bottom: 28px;
}

.registro-logo .logo-text {
  font-size: 20px;
  display: block;
  text-align: center;
}

.registro-logo .logo-sub {
  display: block;
  text-align: center;
  margin-top: 4px;
}

.welcome-box {
  background: var(--azul-claro);
  border-left: 4px solid var(--azul);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--azul);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── ADMIN STATS GRID ────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--blanco);
  border-radius: var(--radius);
  border: 1px solid var(--gris-borde);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.stat-card-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gris-texto);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-card-value {
  font-family: 'DM Serif Display', serif;
  font-size: 28px;
  color: var(--negro);
  margin-bottom: 2px;
}

.stat-card-sub {
  font-size: 12px;
  color: var(--gris-texto);
}

.stat-card.accent-blue {
  border-top: 3px solid var(--azul);
}

.stat-card.accent-green {
  border-top: 3px solid var(--verde);
}

.stat-card.accent-orange {
  border-top: 3px solid #F59E0B;
}

.stat-card.accent-red {
  border-top: 3px solid var(--rojo);
}

/* ── MISC ───────────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--gris-borde);
  margin: 20px 0;
}

.alert-info {
  background: var(--azul-claro);
  border: 1px solid rgba(26, 75, 140, 0.15);
  color: var(--azul);
  font-size: 13px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}

.alert-success {
  background: var(--verde-claro);
  border: 1px solid rgba(26, 122, 74, 0.2);
  color: var(--verde);
  font-size: 13px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}

.alert-error {
  background: var(--rojo-claro);
  border: 1px solid rgba(192, 57, 43, 0.2);
  color: var(--rojo);
  font-size: 13px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* TOAST */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast-item {
  background: var(--negro);
  color: white;
  font-size: 13px;
  font-weight: 500;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
}

.toast-item.success {
  background: var(--verde);
}

.toast-item.error {
  background: var(--rojo);
}

.toast-item.warning {
  background: #B45309;
}

@keyframes slideIn {
  from {
    transform: translateX(20px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Responsive básico */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .main {
    margin-left: 0;
    padding: 20px;
  }

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

  .login-left {
    display: none;
  }

  .login-right {
    width: 100%;
  }
}

/* ── WHATSAPP BUBBLE ───────────────────────────────────────────── */
.whatsapp-bubble {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 1010;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-bubble:hover {
  transform: scale(1.1) rotate(8deg);
  background-color: #128c7e;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  color: white;
}

.whatsapp-bubble i {
  line-height: 0;
}

/* ── MÁS AJUSTES DARK MODE ─────────────────────────────────────── */

/* ── ADMIN DARK MODE REFINEMENTS ─────────────────────────────── */

/* Fix para inputs en admin bootstrap */

/* Botón Premium para Admin */
.btn-primary-cd {
  background: var(--azul-gradient);
  border: none;
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.btn-primary-cd:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  opacity: 0.9;
  color: white;
}

@media (max-width: 768px) {
  .whatsapp-bubble {
    bottom: 20px;
    right: 20px;
    width: 54px;
    height: 54px;
    font-size: 28px;
  }
  .sidebar-cd {
    width: 100% !important;
    height: auto !important;
    position: relative !important;
    z-index: 1000;
  }
  .main, .main-admin, .main-asociado {
    margin-left: 0 !important;
    padding: 15px !important;
    max-width: 100vw !important;
  }
  .card-stats-grid, .dashboard-grid {
    grid-template-columns: 1fr !important;
  }
  .topbar {
    flex-direction: row !important;
    justify-content: space-between !important;
    height: auto !important;
    padding: 15px 20px !important;
    gap: 10px !important;
    align-items: center !important;
    text-align: left !important;
  }
  .navbar-creditos {
    padding: 10px !important;
  }
  
  /* Sidebar Unificado Offcanvas */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: -280px !important; /* Escondido por defecto en móvil */
    width: 280px !important;
    height: 100vh !important;
    display: flex !important;
    visibility: visible !important;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2) !important;
    z-index: 2000 !important; /* Por encima de todo */
    transition: left 0.3s ease !important;
  }
  
  .sidebar.open {
    left: 0 !important;
  }
  
  .mobile-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0,0,0,0.4) !important;
    z-index: 1040 !important;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease !important;
  }
  
  .mobile-overlay.show {
    display: block !important;
    opacity: 1 !important;
  }
  
  /* Botón hamburguesa unificado */
  .mobile-menu-btn {
    display: flex !important;
    background: transparent !important;
    border: none !important;
    color: white !important; /* Forzamos blanco para visibilidad en fondos oscuros */
    font-size: 26px !important;
    margin-right: 12px !important;
    cursor: pointer !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    z-index: 100 !important;
  }
  
  .topbar-greeting {
    font-size: 18px !important;
    color: white !important;
  }
}

.mobile-menu-btn {
  display: none;
}


/* COMO PAGAR (Dashboard Asociados) */
.pagar-card {
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--gris-border);
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.pagar-titulo {
  color: var(--azul);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
/* Título de "Cómo pagar" como botón que abre y cierra los pasos */
.pagar-toggle {
  width: 100%;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 4px 0;
  margin-bottom: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.pagar-toggle.abierto {
  margin-bottom: 20px;
}
.pagar-toggle-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pagar-chevron {
  font-size: 18px;
  transition: transform 0.2s;
}
.pagar-toggle.abierto .pagar-chevron {
  transform: rotate(180deg);
}
.pagar-steps[hidden] {
  display: none;
}
.pagar-card[hidden] {
  display: none;
}
.pagar-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pagar-step {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--blanco);
}
.pagar-step:nth-child(even) {
  background: var(--azul-claro);
}
.step-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 24px;
  flex-shrink: 0;
}
.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--azul);
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-line-v {
  width: 2px;
  flex: 1;
  background: var(--gris-border);
  border-radius: 1px;
}
.step-content {
  flex: 1;
  padding-bottom: 8px;
}
.step-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--negro);
  margin-bottom: 4px;
  margin-top: 2px;
}
.step-desc {
  font-size: 13px;
  color: var(--gris-texto);
  line-height: 1.5;
  margin-bottom: 8px;
}
.dato-copiable {
  background: var(--gris-bg);
  border: 1px solid var(--gris-border);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.dato-label {
  font-size: 11px;
  color: var(--gris-texto);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.dato-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--negro);
}
.dato-value.highlight {
  color: var(--verde);
}
.copy-btn {
  background: var(--bg);
  color: var(--azul);
  border: 1px solid var(--gris-border);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.copy-btn:hover {
  background: var(--azul);
  border-color: var(--azul);
  color: white;
}

/* ── CAMBIAR CONTRASEÑA ──────────────────────────────────────────── */
.pwd-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, var(--azul) 0%, #1A5FA0 55%, #2260B0 100%);
}

.pwd-card {
  width: 100%;
  max-width: 430px;
  background: var(--blanco);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: popIn 0.28s ease;
}

.pwd-header {
  text-align: center;
  margin-bottom: 26px;
}

.pwd-icono {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--naranja-cl);
  color: var(--naranja);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.pwd-titulo {
  font-family: 'DM Serif Display', serif;
  font-size: 25px;
  color: var(--negro);
  margin-bottom: 8px;
  line-height: 1.2;
}

.pwd-sub {
  font-size: 13.5px;
  color: var(--gris-texto);
  line-height: 1.6;
}

.pwd-alerta {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
}

.pwd-alerta.visible { display: flex; }

.pwd-alerta.error {
  background: var(--rojo-claro);
  color: var(--rojo);
  border: 1px solid rgba(192, 57, 43, 0.2);
}

.pwd-alerta.success {
  background: var(--verde-claro);
  color: var(--verde);
  border: 1px solid rgba(26, 122, 74, 0.25);
}

/* Medidor de fortaleza */
.pwd-fuerza {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.pwd-fuerza-track {
  flex: 1;
  height: 4px;
  background: var(--gris-borde);
  border-radius: 10px;
  overflow: hidden;
}

.pwd-fuerza-fill {
  height: 100%;
  width: 0;
  border-radius: 10px;
  transition: width 0.25s ease, background 0.25s ease;
}

.pwd-fuerza-fill.debil  { background: var(--rojo); }
.pwd-fuerza-fill.media  { background: #F59E0B; }
.pwd-fuerza-fill.fuerte { background: var(--verde); }

.pwd-fuerza-texto {
  font-size: 11px;
  font-weight: 700;
  color: var(--gris-texto);
  min-width: 42px;
  text-align: right;
}

.pwd-fuerza-texto.debil  { color: var(--rojo); }
.pwd-fuerza-texto.media  { color: var(--naranja); }
.pwd-fuerza-texto.fuerte { color: var(--verde); }

/* Coincidencia */
.pwd-match {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 7px;
}

.pwd-match.ok,
.pwd-match.error { display: flex; }
.pwd-match.ok    { color: var(--verde); }
.pwd-match.error { color: var(--rojo); }

/* ── MODALES DEL ADMIN (íconos y pasos) ──────────────────────────── */
.modal-icono-wrap {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.modal-icono-wrap.warning {
  background: var(--naranja-cl);
  color: var(--naranja);
}

.modal-icono-wrap.success {
  background: var(--verde-claro);
  color: var(--verde);
}

.modal-icono-wrap.danger {
  background: var(--rojo-claro);
  color: var(--rojo);
}

.modal-icono-wrap.primary {
  background: var(--azul-claro);
  color: var(--azul);
}

/* Detalle del modal de confirmación */
.conf-detalle {
  background: var(--gris-bg);
  border-radius: var(--radius-sm);
  padding: 6px 16px;
  text-align: left;
}

.conf-fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-size: 13px;
  color: var(--gris-texto);
  border-bottom: 1px solid var(--gris-borde);
}

.conf-fila:last-child {
  border-bottom: none;
}

.conf-fila strong {
  color: var(--negro);
  font-weight: 700;
  text-align: right;
}

.conf-fila code {
  background: var(--azul-claro);
  color: var(--azul);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12.5px;
}

.text-verde {
  color: var(--verde) !important;
}

.reset-pasos {
  background: var(--gris-bg);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reset-paso {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--gris-texto);
  line-height: 1.45;
}

.reset-paso-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--azul);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── TARJETA DE CRÉDITO (Mis créditos) ───────────────────────────── */
/* ── TARJETAS DE "MIS CRÉDITOS" ──────────────────────────────────── */
/* Misma tipografía de la tarjeta azul: etiqueta pequeña en mayúsculas y
   monto en serif. Compactas, sin ícono ni borde de color. */
.credito-card {
  background: linear-gradient(135deg, #F4F8FD 0%, #FFFFFF 70%);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
  transition: box-shadow 0.15s, transform 0.15s;
}

.credito-card:last-child {
  margin-bottom: 0;
}

.credito-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.credito-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.credito-card-info {
  flex: 1;
  min-width: 0;
}

.credito-card-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--azul);
  opacity: 0.7;
  margin-bottom: 3px;
}

.credito-card-monto {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--azul);
  line-height: 1.05;
}

.credito-card-sub {
  font-size: 12px;
  color: var(--gris-texto);
  margin-top: 4px;
}

.credito-chip {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

.estado-pendiente .credito-chip { background: var(--naranja-cl);  color: var(--naranja); }
.estado-pagado    .credito-chip { background: var(--verde-claro); color: var(--verde); }
.estado-rechazado .credito-chip { background: var(--rojo-claro);  color: var(--rojo); }

/* Progreso del plazo */
.credito-progreso {
  margin-top: 12px;
}

.credito-progreso-track {
  height: 4px;
  background: var(--gris-borde);
  border-radius: 10px;
  overflow: hidden;
}

.credito-progreso-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--azul), #2260B0);
  border-radius: 10px;
  transition: width 0.4s ease;
}

.credito-progreso-fill.urgente { background: #F59E0B; }
.credito-progreso-fill.vencido { background: var(--rojo); }

.credito-progreso-texto {
  font-size: 11px;
  font-weight: 600;
  color: var(--gris-texto);
  margin-top: 5px;
}

.credito-progreso-texto.urgente { color: var(--naranja); }
.credito-progreso-texto.vencido { color: var(--rojo); }

/* Sin créditos activos */
.creditos-vacio {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 0 12px;
  color: var(--gris-texto);
  font-size: 13.5px;
}

.creditos-vacio i {
  font-size: 20px;
  color: var(--azul);
  opacity: 0.6;
}

/* ── CHIP DE ESTADO (tablas del admin) ───────────────────────────── */
/* Define fondo Y color de texto juntos: un badge sin fondo propio hereda
   el texto blanco de Bootstrap y desaparece sobre la tabla clara. */
.chip-estado {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  line-height: 1.4;
}

.chip-estado.ok {
  background: var(--verde-claro);
  color: var(--verde);
  border: 1px solid rgba(26, 122, 74, 0.25);
}

.chip-estado.espera {
  background: var(--naranja-cl);
  color: var(--naranja);
  border: 1px solid rgba(180, 83, 9, 0.25);
}

.chip-estado.error {
  background: var(--rojo-claro);
  color: var(--rojo);
  border: 1px solid rgba(192, 57, 43, 0.25);
}

/* ── DESGLOSE DE CRÉDITOS (Cómo pagar, con varios activos) ───────── */
.desglose-creditos {
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.desglose-titulo {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--gris-bg);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gris-texto);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--gris-borde);
}

.desglose-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--gris-borde);
}

.desglose-item:last-child {
  border-bottom: none;
}

.desglose-item.vencido {
  background: var(--rojo-claro);
}

.desglose-item-monto {
  font-size: 15px;
  font-weight: 700;
  color: var(--negro);
  line-height: 1.2;
}

.desglose-item-meta {
  font-size: 11.5px;
  color: var(--gris-texto);
  margin-top: 2px;
}

.txt-vencido {
  color: var(--rojo);
  font-weight: 700;
}

.desglose-item-ahorro {
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  color: var(--verde);
  flex-shrink: 0;
  line-height: 1.2;
}

.desglose-item-ahorro small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.desglose-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--azul-claro);
  padding: 13px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--azul);
  border-top: 1px solid var(--gris-borde);
}

.desglose-total strong {
  font-size: 17px;
  font-weight: 700;
}

/* ── PAGO ANTICIPADO (incentivo de ahorro) ───────────────────────── */

.pago-hoy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--verde-claro);
  border: 1px solid rgba(26, 122, 74, 0.18);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 12px;
}

.pago-hoy-left {
  min-width: 0;
}

.pago-hoy-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--verde);
  opacity: 0.8;
  margin-bottom: 1px;
}

.pago-hoy-monto {
  font-family: 'DM Serif Display', serif;
  font-size: 19px;
  color: var(--verde);
  line-height: 1.1;
}

/* Botón "Pagar" al frente de "Si pagas hoy" */
.btn-pagar-hoy {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  background: var(--verde);
  color: white;
  border: none;
  border-radius: var(--radius-pill);
  padding: 7px 10px 7px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(26, 122, 74, 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-pagar-hoy i {
  font-size: 18px;
  line-height: 1;
}

.btn-pagar-hoy:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 122, 74, 0.35);
}

@media (max-width: 575.98px) {
  .credito-card {
    padding: 14px;
  }
  .credito-card-monto {
    font-size: 22px;
  }
  .pago-hoy {
    gap: 8px;
    padding: 9px 12px;
  }
  .pago-hoy-monto {
    font-size: 17px;
  }
}

/* ══════════════════════════════════════════════════════════════════
   ADMIN — REDISEÑO (insight cards, acordeones, filtros, paginación)
   ══════════════════════════════════════════════════════════════════ */

/* ── INSIGHT CARDS (KPIs de valor con gradiente) ─────────────────── */
.insight-card {
  border-radius: var(--radius);
  padding: 22px 24px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.insight-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.insight-card.tono-azul {
  background: linear-gradient(135deg, var(--azul) 0%, #2260B0 100%);
}

.insight-card.tono-verde {
  background: linear-gradient(135deg, var(--verde) 0%, #22A35F 100%);
}

.insight-card.tono-naranja {
  background: linear-gradient(135deg, var(--naranja) 0%, #D97706 100%);
}

.insight-card.tono-rojo {
  background: linear-gradient(135deg, var(--rojo) 0%, #E05A4A 100%);
}

.insight-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.insight-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.insight-card-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 6px;
}

.insight-card-value {
  font-family: 'DM Serif Display', serif;
  font-size: 30px;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}

.insight-card-sub {
  font-size: 12px;
  opacity: 0.8;
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

/* ── ACORDEONES ───────────────────────────────────────────────────── */
.accordion-admin .accordion-item {
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: var(--radius) !important;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.accordion-admin .accordion-item:last-child {
  margin-bottom: 0;
}

.accordion-admin .accordion-button {
  background: var(--blanco);
  color: var(--negro);
  font-weight: 700;
  font-size: 15px;
  padding: 16px 20px;
  box-shadow: none !important;
}

.accordion-admin .accordion-button:not(.collapsed) {
  background: var(--azul-claro);
  color: var(--azul);
}

.accordion-admin .accordion-button::after {
  flex-shrink: 0;
}

.accordion-admin .accordion-button:focus {
  box-shadow: none;
  border-color: var(--gris-borde);
}

.accordion-admin .accordion-body {
  padding: 0;
}

.accordion-header-count {
  background: var(--azul-claro);
  color: var(--azul);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-left: 10px;
}

/* ── BARRA DE FILTRO EN TIEMPO REAL ──────────────────────────────── */
.filtro-tabla-wrap {
  position: relative;
  max-width: 280px;
}

.filtro-tabla-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gris-texto);
  font-size: 13px;
  pointer-events: none;
}

.filtro-tabla {
  width: 100%;
  padding: 7px 12px 7px 32px;
  font-size: 13px;
  border: 1.5px solid var(--gris-borde);
  border-radius: var(--radius-pill);
  background: var(--gris-bg);
  color: var(--negro);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}

.filtro-tabla:focus {
  border-color: var(--azul);
  background: var(--blanco);
}

/* ── PAGINACIÓN ADMIN ────────────────────────────────────────────── */
.pagination .page-link {
  color: var(--azul);
  border-color: var(--gris-borde);
  font-size: 13px;
  font-weight: 600;
}

.pagination .page-item.active .page-link {
  background: var(--azul);
  border-color: var(--azul);
}

.pagination .page-item.disabled .page-link {
  color: #C8D0DC;
}

/* ── BOTONES DE ACCIÓN PREMIUM (tablas admin) ────────────────────── */
.btn-accion {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-accion:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-accion-verde {
  background: var(--verde-claro);
  color: var(--verde);
}

.btn-accion-verde:hover {
  background: var(--verde);
  color: white;
}

.btn-accion-azul {
  background: var(--azul-claro);
  color: var(--azul);
}

.btn-accion-azul:hover {
  background: var(--azul);
  color: white;
}

.btn-accion-rojo {
  background: var(--rojo-claro);
  color: var(--rojo);
}

.btn-accion-rojo:hover {
  background: var(--rojo);
  color: white;
}

.btn-accion-naranja {
  background: var(--naranja-cl);
  color: var(--naranja);
}

.btn-accion-naranja:hover {
  background: var(--naranja);
  color: white;
}

/* ── TARJETAS DE GRÁFICAS ────────────────────────────────────────── */
.chart-card-wrap {
  position: relative;
  height: 260px;
}

.chart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 260px;
  color: var(--gris-texto);
  gap: 8px;
}

.chart-empty-state i {
  font-size: 28px;
  opacity: 0.5;
}

/* ── SECTION HEADER (usado en header de página) ──────────────────── */
.section-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.section-header h4 {
  font-weight: 700;
  margin: 0;
}


/* ── LOGIN: SELECTOR DE MÓDULOS ───────────────────────────────── */
.login-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--verde);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.login-step[hidden] {
  display: none;
}

.login-step--in {
  animation: loginStepIn 0.28s ease-out;
}

@keyframes loginStepIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.login-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gris-texto);
  cursor: pointer;
  font-family: inherit;
}

.login-back:hover {
  color: var(--azul);
}

.choice-grid {
  display: grid;
  gap: 14px;
}

.choice-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 18px 18px 18px 16px;
  background: var(--blanco);
  border: 2px solid var(--gris-borde);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.choice-card:hover,
.choice-card:focus-visible {
  border-color: var(--azul);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  outline: none;
}

.choice-card:hover .choice-arrow,
.choice-card:focus-visible .choice-arrow {
  color: var(--azul);
  transform: translateX(3px);
}

.choice-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--azul-claro);
  color: var(--azul);
}

.choice-card--nuevo .choice-icon {
  background: var(--verde-claro);
  color: var(--verde);
}

.choice-card--nuevo:hover,
.choice-card--nuevo:focus-visible {
  border-color: var(--verde);
}

.choice-card--nuevo:hover .choice-arrow,
.choice-card--nuevo:focus-visible .choice-arrow {
  color: var(--verde);
}

.choice-body {
  flex: 1;
  min-width: 0;
}

.choice-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--negro);
  margin-bottom: 3px;
}

.choice-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--gris-texto);
}

.choice-arrow {
  flex-shrink: 0;
  font-size: 18px;
  color: #C8D0DC;
  transition: color 0.15s, transform 0.15s;
}

/* Pasos explicativos para quien es nuevo */
.nuevo-pasos {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  gap: 14px;
}

.nuevo-pasos li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.nuevo-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--verde);
  color: var(--blanco);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nuevo-paso-titulo {
  font-size: 15px;
  font-weight: 700;
  color: var(--negro);
  margin-bottom: 2px;
}

.nuevo-paso-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--gris-texto);
}

.nuevo-aviso {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 18px;
  border-radius: var(--radius-sm);
  background: var(--naranja-cl);
  border: 1px solid rgba(180, 83, 9, 0.2);
  color: var(--naranja);
  font-size: 13px;
  line-height: 1.5;
}

.nuevo-aviso i {
  flex-shrink: 0;
  margin-top: 2px;
}

@media (max-width: 575.98px) {
  .choice-card {
    padding: 14px;
    gap: 12px;
  }

  .choice-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .choice-title {
    font-size: 15px;
  }
}
