/* ==========================================================================
   BANKZILLA ONBOARDING STYLES
   ========================================================================== */

/* --- Variables Globales y Root --- */
:root {
  --bs-primary: #72BF44;
  --bs-primary-rgb: 114, 191, 68;

  --bs-secondary: #008FD5;
  --bs-secondary-rgb: 0, 143, 213;

  --primary-hover: #5aa835;
  --primary-active: #4a8f2c;
  --primary-light: #f0f9e9;
  --primary-border: #c8e6b0;

  --brand-gray: #939598;

  --text-dark: #1f2937;
  --text-gray: #939598;
  --text-muted: #939598;
  --text-light: #9ca3af;
  
  --border-color: #edf0f4;
  --border-focus: #72BF44;
  
  --bg-body: #f2f7f5;
  --bg-card: #fff;
  --bg-card-soft: #f6fef9;
  
  font-size: 18px;
}

body {
   background-color: var(--bg-body);
   font-family: 'Avenir', Avenir, Arial, Helvetica, sans-serif;
 }

 /* --- Pie de página general --- */
  .app-footer {
    color: var(--text-gray);
    font-size: 0.85rem;
    text-align: center;
  }
 .app-footer span { font-weight: 500; }

 /* --- Utilidades --- */
 .c-red { color: #dc3545 !important; }
 .c-primary { color: var(--bs-primary) !important; }
 a.c-primary, .c-primary a {
  color: var(--bs-secondary) !important;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
 }
 .text-secondary { color: var(--text-gray) !important; }

.msg_validation { 
  font-size: 0.875em; 
  margin-top: 0.25rem; 
  font-weight: 500; 
}

/* --- Elementos de Formulario Generales --- */
.form-control, .form-select {
  border-radius: 50rem;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  min-height: 52px;
  border-color: #c3cedb;
}

.form-control::placeholder {
  color: #bcc3cf;
  opacity: 1;
}

textarea.form-control {
  border-radius: 1.25rem;
  min-height: auto;
}

.form-floating > .form-control,
.form-floating > .form-select {
  padding-top: 1.625rem;
  padding-bottom: 0.625rem;
}

.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

.form-check-input:checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

/* --- Botones --- */
.btn-primary {
  --bs-btn-bg: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-hover-bg: var(--primary-hover);
  --bs-btn-hover-border-color: var(--primary-hover);
  --bs-btn-active-bg: var(--primary-active);
  --bs-btn-active-border-color: var(--primary-active);
  --bs-btn-disabled-bg: var(--bs-primary);
  --bs-btn-disabled-border-color: var(--bs-primary);
}

.btn-outline-primary {
  --bs-btn-color: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-hover-bg: var(--bs-primary);
  --bs-btn-hover-border-color: var(--bs-primary);
  --bs-btn-active-bg: var(--primary-hover);
  --bs-btn-active-border-color: var(--primary-hover);
}

.btn-primary.next-step,
.btn-primary.prev-step,
.btn-light.prev-step {
  border-radius: 50rem;
}

/* --- Pills (Paso 3) --- */
.pill-group-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-pill-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d1d5db !important;
  color: var(--text-gray);
  background-color: var(--bg-card);
  border-radius: 50rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-pill-toggle::before {
  content: "\2713";
  display: inline-block;
  opacity: 0;
  max-width: 0;
  margin-right: 0;
  font-weight: 700;
  transition: all 0.15s ease;
  overflow: hidden;
}

.btn-check:checked + .btn-pill-toggle {
  border-color: var(--bs-primary) !important;
  color: var(--primary-hover);
  background-color: var(--primary-light);
}

.btn-check:checked + .btn-pill-toggle::before {
  opacity: 1;
  max-width: 1.2rem;
  margin-right: 0.35rem;
}

.btn-check:focus-visible + .btn-pill-toggle {
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
}

.btn-add-dashed {
  border: 1px dashed var(--bs-primary);
  color: var(--text-gray);
  background-color: var(--bg-card);
  border-radius: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.15s;
}

.btn-add-dashed:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-hover);
  color: var(--primary-hover);
}

/* --- Layout y Tarjetas --- */
.brand-logo {
  color: var(--bs-primary);
  font-weight: 800;
  letter-spacing: 0.5px;
}

.login-link {
  color: var(--bs-secondary);
  font-weight: 600;
  text-decoration: none;
}
.login-link:hover { color: var(--primary-hover); }

.card-soft {
  box-shadow: 0 0 1.5rem rgba(17, 24, 39, 0.08);
}

/* Tarjetas Genéricas (DRY) */
.contact-card, .info-card, .recaudos-sidebar-card, .payment-info-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.875rem;
  padding: 1.25rem;
}

.contact-card, .digitized-doc {
  background-color: var(--bg-card-soft);
  border-color: var(--primary-border);
}

.info-card {
  border-color: #ccd5df;
  border-radius: 0.75rem;
}

.contact-card { height: 100%; }
.payment-info-card { margin-bottom: 1rem; }

/* Tipografía de Tarjetas */
.contact-card-title, .info-card-title, .doc-section-title, .payment-factura-title {
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.contact-card-title { font-size: 0.92rem; color: var(--text-gray); }
.info-card-title { font-size: 0.95rem; color: var(--text-gray); margin-bottom: 0.9rem; }
.doc-section-title { font-size: 0.88rem; color: var(--bs-primary); margin-bottom: 1rem; }
.payment-factura-title { font-size: 0.82rem; color: var(--text-muted); }

/* --- Video Demo --- */
.video-placeholder {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 850px;
  background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-secondary) 100%);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-brand {
  position: absolute;
  top: 1.25rem;
  left: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  letter-spacing: 0.15em;
}

.video-tag {
  position: absolute;
  top: 1.45rem;
  right: 1.5rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.25em;
  font-size: 0.65rem;
  font-weight: 600;
}

.video-play {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.95);
  color: var(--text-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  padding-left: 0.4rem;
}

.video-caption {
  position: absolute;
  bottom: 1.25rem;
  left: 1.5rem;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

/* --- Documentos y Recaudos --- */
.check-bullet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: #eef7e3;
  color: var(--text-gray);
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: bold;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.info-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background-color: #eef7e3;
  color: var(--text-gray);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: bold;
  margin-right: 0.75rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.info-card ul li {
  display: flex;
  align-items: flex-start;
}

.doc-icon-green, .doc-icon-blue, .doc-icon-purple, .doc-icon-orange, .doc-icon-teal, .doc-icon-rose, .doc-mini-icon {
  background-color: var(--primary-light) !important;
  color: var(--text-gray) !important;
}

.doc-mini-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.875rem;
  padding: 2.25rem 0.75rem 0.9rem;
  cursor: pointer;
  transition: all 0.18s;
  width: 100%;
  min-height: 250px;
  gap: 0.5rem;
  user-select: none;
}

.doc-mini-card:hover {
  border-color: #c8e6b0;
  box-shadow: 0 3px 12px rgba(5,150,105,0.07);
}

.doc-mini-card.is-loaded {
  border-color: var(--primary-border);
  background-color: var(--bg-card-soft);
}

/* Cards de recaudos (paso 4): fondo gris muy leve cuando están pendientes */
#step-4 .doc-mini-card:not(.is-loaded) {
  background-color: #fafafa;
}

/* Loader de subida dentro del card */
#step-4 .doc-mini-card .card-upload-loader {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 0.875rem;
}
#step-4 .doc-mini-card .card-upload-loader .spinner-border {
  width: 2.5rem;
  height: 2.5rem;
}

.doc-mini-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin: 0.5rem 0;
}

.doc-mini-title { font-size: 0.85rem; font-weight: 600; color: var(--text-dark); line-height: 1.25; width: 100%; min-height: 2.5em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.doc-mini-subtitle { font-size: 0.76rem; color: #b0b9c6; }

/* Botón "Seleccionar" del card de subida: anclado al fondo para igualar alturas */
.doc-mini-card > .doc-mini-btn { margin-top: auto; }

/* Lista de documentos subidos por tarjeta (paso 4) */
.doc-file-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-height: 7.5rem;
  overflow-y: auto;
  margin-bottom: 0.75rem;
}

.doc-file-list.collapsed { display: none; }

.doc-file-toggle {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--bs-secondary);
  background: transparent;
  border: none;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  transition: color 0.15s;
}
.doc-file-toggle:hover { color: var(--bs-secondary); }

.doc-file-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  text-align: left;
  background: #eef7e3;
  border: 1px solid #eef7e3;
  border-radius: 0.5rem;
  padding: 0.28rem 0.4rem 0.28rem 0.55rem;
  font-size: 0.75rem;
}

.doc-file-item > i {
  color: var(--text-gray);
  flex-shrink: 0;
}

.doc-file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-dark);
}

.doc-file-remove {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.doc-file-remove:hover { color: #dc3545; background: #fdecec; }

.doc-state-pill {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 50rem;
  text-transform: uppercase;
}
.doc-state-approved { background-color: #eef7e3; color: var(--text-gray); }
.doc-state-review { background-color: #fef3c7; color: #92400e; }
.doc-state-pending { background-color: #f3f4f6; color: var(--text-muted); }

.doc-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-gray);
  border: 1px solid #eef7e3;
  border-radius: 50rem;
  padding: 0.4rem 1.1rem;
  background: #eef7e3;
  transition: all 0.15s;
  text-decoration: none !important;
}

.doc-mini-btn:not(.letter-btn-dl):hover,
label.doc-mini-card:hover .doc-mini-btn:not(.letter-btn-dl),
.doc-mini-card.is-loaded .doc-mini-btn:not(.letter-btn-dl) {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}

.letter-btn-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 100%;
  margin-top: auto;
}
.letter-btn-group .doc-mini-btn { width: 100%; justify-content: center; }

.letter-btn-dl { color: var(--bs-secondary); border-color: #e5e7eb; background: #f9fafb; }
.letter-btn-dl:hover { background: #e3f3fb; border-color: #b3d9f2; color: var(--bs-secondary); }

/* --- Drag and Drop --- */
.payment-dropzone {
  border: 1px dashed #cbd5e1;
  border-radius: 0.75rem;
  padding: 1.75rem 1.25rem;
  background: #f8fafc;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.payment-dropzone:hover {
  border-color: var(--bs-primary);
  background: #eef7e3;
}

.payment-dropzone.is-loaded {
  border: 1px solid var(--primary-border);
  background-color: var(--bg-card-soft);
}

.payment-dropzone-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--text-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  transition: transform 0.2s;
}

.payment-dropzone:hover .payment-dropzone-icon { transform: translateY(-2px); }
.payment-dropzone.is-loaded .payment-dropzone-icon { background-color: #eef7e3; }
.payment-dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* --- Miscellaneous --- */
.alert-banner-amber {
  background-color: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #92400e;
}

.step-kicker {
  color: var(--text-gray);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* Encabezado del paso: mensaje del aprobador en una fila propia de ancho completo,
   debajo de la barra de progreso (desktop y mobile). */
.step-header-progress { margin-top: 0.5rem; }
.step-header-msg { margin-top: 0.5rem; }

/* Muestra el mensaje completo: si es largo hace wrap sin recortar texto. */
.step-header-msg-item {
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

@media (min-width: 992px) {
  .step-header-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    column-gap: 1rem;
  }
  .step-header-grid .step-header-kicker { grid-column: 1; grid-row: 1; }
  .step-header-grid .step-header-msg {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 0.5rem;
    min-width: 0;
    text-align: left;
  }
  .step-header-grid .step-header-progress {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

.step-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
}

.step-headline {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
}

.payment-amount-huge {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--bs-primary);
  line-height: 1.1;
}

.payment-amount-huge .currency-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.transfer-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.9rem;
}

.transfer-detail-row:last-child { border-bottom: none; }
.transfer-detail-label { color: var(--text-light); }
.transfer-detail-value { font-weight: 700; color: var(--text-dark); text-align: right; }

#bank2illa_loader {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.65);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

#signature_pad {
  touch-action: none;
  cursor: crosshair;
}

/* Campo de código (safecode) */
.safecode-input {
  padding-left: 2.2rem;
}
.safecode-input::placeholder {
  letter-spacing: 0;
}
@media (max-width: 576px) {
  .safecode-input {
    font-size: 1.5rem !important;
  }
}

@media (min-width: 992px) {
  .panel-divider { border-right: 1px solid var(--border-color); }
}

@media (max-width: 576px) {
  .btn-pill-toggle {
    font-size: 0.88rem;
    padding: 0.5rem 0.9rem;
  }
  .issued-docs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .issued-docs-grid .pill-short { grid-column: span 1; text-align: center; }
  .issued-docs-grid .pill-long { grid-column: span 2; text-align: center; }
  .video-caption { font-size: 0.75rem; }
  .video-tag { font-size: 0.55rem; }
}

.recaudos-sidebar-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--text-gray);
  text-transform: uppercase;
}

.recaudos-progress-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--bs-primary);
  line-height: 1;
}

.form-legend {
  color: var(--bs-primary);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* --- Missing Classes Restored --- */
.sample-upload {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  border: 1px dashed #d1d5db;
  border-radius: 50rem;
  padding: 0.65rem 1.5rem;
  background-color: var(--bg-card);
  cursor: pointer;
  font-size: 1rem;
}
.sample-upload:hover {
  border-color: var(--bs-primary);
}
.sample-upload .sample-label {
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.95rem;
}
.sample-upload input[type="file"] {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.sample-upload .msg_validation {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
}

.payment-factura-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.payment-pdf-dl {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--bs-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.15s;
}
.payment-pdf-dl:hover {
  color: var(--primary-hover);
}
.payment-factura-meta {
  font-size: 0.86rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}
.payment-exchange-rate {
  font-size: 0.76rem;
  color: var(--text-muted);
}
.copy-btn {
  background: none;
  border: none;
  color: var(--text-gray);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0;
  margin-left: 0.4rem;
  cursor: pointer;
  transition: color 0.15s;
}
.copy-btn:hover {
  color: var(--primary-hover);
}

/* ==========================================================================
   LOGIN (premium UI)
   ========================================================================== */
.login-body {
  background: #f2f7f5;
  overflow-x: hidden;
}

.bg-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(135deg, #f2f7f5 0%, #e6f4ea 100%);
}

.shape {
  position: absolute;
  filter: blur(80px);
  border-radius: 50%;
  opacity: 0.15;
  animation: float 20s infinite alternate ease-in-out;
}

.shape-1 {
  width: 500px;
  height: 500px;
  background: var(--bs-secondary);
  top: -150px;
  left: -100px;
  animation-delay: 0s;
}

.shape-2 {
  width: 600px;
  height: 600px;
  background: var(--bs-primary);
  bottom: -200px;
  right: -150px;
  animation-delay: -5s;
}

.shape-3 {
  width: 400px;
  height: 400px;
  background: #c8e6b0;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 25s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
  100% { transform: translate(0, 0) scale(1); }
}

.login-wrapper {
  max-width: 460px;
  margin: 0 auto;
  perspective: 1000px;
}

.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 25px 50px -12px rgba(5, 150, 105, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  border-radius: 1.5rem;
  padding: 2.5rem 3rem;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  will-change: transform;
}

.glass-card:hover {
  transform: translateY(-5px);
}

.premium-input {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid #c3cedb !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) inset;
  transition: all 0.3s ease;
  font-weight: 500;
}

.premium-input:focus {
  background: #fff !important;
  border-color: var(--bs-primary) !important;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.15) !important;
}

.btn-premium {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  background: var(--bs-primary);
  border: none;
  box-shadow: 0 10px 20px -10px rgba(114, 191, 68, 0.5);
}

.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -10px rgba(114, 191, 68, 0.6);
  background: var(--primary-hover);
}

.header-transparent {
  background: transparent !important;
  border-bottom: none !important;
  box-shadow: none !important;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 10;
}

.fade-enter {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.5s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 576px) {
  .glass-card {
    padding: 1.5rem 1.25rem;
    border-radius: 1.25rem;
  }
  .login-wrapper {
    padding: 0 0.25rem;
  }
}

/* ==========================================================================
   USER LIST / ADMIN
   ========================================================================== */
.badge-new      { background: #e0f2fe; color: #008FD5; }
.badge-pending  { background: #fef9c3; color: #a16207; }
.badge-active   { background: #eef7e3; color: #4a8f2c; }
.badge-reject   { background: #fee2e2; color: #b91c1c; }
.badge-onway    { background: #e3f3fb; color: #0369a1; }
.badge-inactive { background: #f3f4f6; color: #6b7280; }
.badge-payment  { background: #e3f3fb; color: #008FD5; }
.badge-seniat   { background: #ffe4e6; color: #be123c; }
.status-badge   { font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; letter-spacing: .4px; white-space: nowrap; }

.status-flash { animation: statusFlash .8s ease; }
@keyframes statusFlash {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(5,150,105,.25); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(5,150,105,0); }
}

.table > tbody > tr { cursor: pointer; transition: background .12s; }
.table > tbody > tr:hover { background: #eef7e3; }
.table thead th { background: var(--bs-primary) !important; color: #fff !important; border-bottom: none; }

.modal-xl { max-width: 1200px; }

/* Header compacto del modal de detalle de usuario */
#userDetailModal .modal-header { padding: .7rem 1rem; align-items: flex-start; }
#userDetailModal .user-modal-heading { flex: 1 1 auto; min-width: 0; }
#userDetailModal .user-modal-heading .modal-title { font-size: 1.05rem; line-height: 1.25; overflow-wrap: anywhere; }
#userDetailModal #modal-status-badge { font-size: .78rem; padding: 4px 12px; }
#userDetailModal .user-modal-id { display: block; margin-top: .15rem; overflow-wrap: anywhere; }
#userDetailModal .modal-header .btn-close { flex-shrink: 0; margin-top: .15rem; }
.summary-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 0.875rem; padding: 1.1rem 1.25rem; }
.summary-card-title { font-size: 0.78rem; text-transform: uppercase; font-weight: 700; color: var(--text-muted); letter-spacing: .6px; margin-bottom: .75rem; display: flex; align-items: center; gap: .4rem; }
.detail-row { display: flex; justify-content: space-between; align-items: baseline; padding: .35rem 0; border-bottom: 1px dashed #f1f5f9; font-size: .875rem; gap: .5rem; }
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--text-muted); flex-shrink: 0; }
.detail-value  { font-weight: 600; color: var(--text-dark); text-align: right; flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; }

.doc-mini-card-sm {
  position: relative; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 0.75rem; padding: 1.5rem 0.5rem 0.75rem; cursor: pointer;
  transition: all 0.18s; width: 100%; min-height: 150px; gap: 0.35rem; user-select: none;
}
.doc-mini-card-sm:hover { border-color: #c8e6b0; box-shadow: 0 3px 12px rgba(114,191,68,0.1); transform: translateY(-1px); }
.doc-mini-card-sm.is-loaded { border-color: var(--primary-border); background: var(--bg-card-soft); }
.doc-mini-card-sm.is-missing { border-color: #fed7aa; background: #fff7ed; }
.doc-mini-icon-sm { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; }
.doc-mini-title-sm { font-size: 0.75rem; font-weight: 600; color: var(--text-dark); line-height: 1.3; width: 100%; min-height: 2.6em; padding: 0 0.25rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; overflow-wrap: break-word; }
a.doc-mini-card-sm { text-decoration: none !important; color: var(--bs-secondary); }
.doc-state-pill { position: absolute; top: 0.5rem; right: 0.5rem; }

.approve-btn { background: var(--bs-primary); border: none; color:#fff; border-radius: 50rem; padding:.55rem 1.4rem; font-weight:700; font-size:.875rem; transition:opacity .2s; }
.approve-btn:hover { opacity:.88; color:#fff; }
.approve-btn:disabled { opacity:.5; cursor:not-allowed; }
.reject-btn  { border:1px solid #ef4444; color:#ef4444; border-radius:50rem; padding:.55rem 1.4rem; font-weight:600; font-size:.875rem; transition:all .2s; background:transparent; }
.reject-btn:hover { background:#fef2f2; }
.modify-btn  { border:1px solid #f59e0b; color:#b45309; border-radius:50rem; padding:.55rem 1.4rem; font-weight:600; font-size:.875rem; transition:all .2s; background:transparent; }
.modify-btn:hover { background:#fffbeb; }

@media (max-width: 576px) {
  .modal-footer .modify-btn,
  .modal-footer .reject-btn,
  .modal-footer .approve-btn {
    flex: 1 1 0;
    white-space: nowrap;
    padding: .45rem .35rem;
    font-size: .82rem;
  }

  #userDetailModal .modal-dialog { margin: .4rem; }
  #userDetailModal .modal-header { padding: .6rem .8rem; }
  #userDetailModal .user-modal-heading .modal-title { font-size: .98rem; max-width: 100%; }
  #userDetailModal #modal-status-badge { font-size: .7rem; padding: 3px 10px; }
  #userDetailModal .modal-body { padding: .85rem !important; }
  #userDetailModal .summary-card { padding: .85rem .9rem; }
  #userDetailModal .detail-row { font-size: .82rem; }
  #userDetailModal .modal-footer { padding: .7rem .8rem; }
}

/* Línea de estatus (historial de aprobaciones) */
.history-timeline { position: relative; margin: 0; padding-left: 1.75rem; }
.history-timeline::before {
  content: ''; position: absolute; left: 6px; top: 10px; bottom: 10px;
  width: 2px; background: #e5e7eb;
}
.history-item { position: relative; padding: .6rem 0; }
.history-item:not(:last-child) { border-bottom: 1px dashed #f1f5f9; }
.history-dot {
  position: absolute; left: -1.75rem; top: .9rem;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bs-primary); border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--bs-primary);
}
.history-body { min-width: 0; }
.history-head { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.history-label { font-weight: 600; font-size: .85rem; color: var(--text-dark); }
.history-label .bi-arrow-right { font-size: 1.1rem; margin: 0 .3rem; vertical-align: middle; }
.history-date { font-size: .74rem; color: var(--text-muted); white-space: nowrap; }
.history-sub { font-size: .78rem; color: var(--text-muted); margin-top: .1rem; }
.history-msg-toggle {
  background: none; border: none; padding: 0; margin-top: .35rem;
  font-size: .74rem; font-weight: 600; color: var(--bs-secondary);
  cursor: pointer; display: inline-flex; align-items: center; gap: .3rem;
}
.history-msg {
  font-size: .78rem; color: var(--text-dark); margin-top: .35rem;
  padding: .4rem .6rem; background: #f8fafc;
  border-radius: 4px; white-space: pre-wrap; word-break: break-word;
}
