/* ============================================
      ESTILOS PROPIETARIOS AFOCAT
      Nombres únicos para evitar conflictos con Bootstrap
      ============================================ */
   
   /* === CONTENEDORES PRINCIPALES === */
   .afo-contenedor {
       width: 100%;
       padding-right: 15px;
       padding-left: 15px;
       margin-right: auto;
       margin-left: auto;
   }
   
   @media (min-width: 576px) {
       .afo-contenedor { max-width: 540px; }
   }
   @media (min-width: 768px) {
       .afo-contenedor { max-width: 720px; }
   }
   @media (min-width: 992px) {
       .afo-contenedor { max-width: 960px; }
   }
   @media (min-width: 1200px) {
       .afo-contenedor { max-width: 1140px; }
   }
   
   /* === SISTEMA DE FILAS === */
   .afo-fila {
       display: -ms-flexbox;
       display: flex;
       -ms-flex-wrap: wrap;
       flex-wrap: wrap;
       margin-right: -15px;
       margin-left: -15px;
   }
   
   /* === SISTEMA DE COLUMNAS CON PREFIJO AFO === */
   .afo-col, .afo-col-1, .afo-col-2, .afo-col-3, .afo-col-4, .afo-col-5, .afo-col-6, 
   .afo-col-7, .afo-col-8, .afo-col-9, .afo-col-10, .afo-col-11, .afo-col-12,
   .afo-col-sm-1, .afo-col-sm-2, .afo-col-sm-3, .afo-col-sm-4, .afo-col-sm-5, .afo-col-sm-6,
   .afo-col-sm-7, .afo-col-sm-8, .afo-col-sm-9, .afo-col-sm-10, .afo-col-sm-11, .afo-col-sm-12,
   .afo-col-md-1, .afo-col-md-2, .afo-col-md-3, .afo-col-md-4, .afo-col-md-5, .afo-col-md-6,
   .afo-col-md-7, .afo-col-md-8, .afo-col-md-9, .afo-col-md-10, .afo-col-md-11, .afo-col-md-12 {
       position: relative;
       width: 100%;
       padding-right: 15px;
       padding-left: 15px;
   }
   
   .afo-col { -ms-flex-preferred-size: 0; flex-basis: 0; -ms-flex-positive: 1; flex-grow: 1; max-width: 100%; }
   .afo-col-1 { -ms-flex: 0 0 8.333333%; flex: 0 0 8.333333%; max-width: 8.333333%; }
   .afo-col-2 { -ms-flex: 0 0 16.666667%; flex: 0 0 16.666667%; max-width: 16.666667%; }
   .afo-col-3 { -ms-flex: 0 0 25%; flex: 0 0 25%; max-width: 25%; }
   .afo-col-4 { -ms-flex: 0 0 33.333333%; flex: 0 0 33.333333%; max-width: 33.333333%; }
   .afo-col-5 { -ms-flex: 0 0 41.666667%; flex: 0 0 41.666667%; max-width: 41.666667%; }
   .afo-col-6 { -ms-flex: 0 0 50%; flex: 0 0 50%; max-width: 50%; }
   .afo-col-7 { -ms-flex: 0 0 58.333333%; flex: 0 0 58.333333%; max-width: 58.333333%; }
   .afo-col-8 { -ms-flex: 0 0 66.666667%; flex: 0 0 66.666667%; max-width: 66.666667%; }
   .afo-col-9 { -ms-flex: 0 0 75%; flex: 0 0 75%; max-width: 75%; }
   .afo-col-10 { -ms-flex: 0 0 83.333333%; flex: 0 0 83.333333%; max-width: 83.333333%; }
   .afo-col-11 { -ms-flex: 0 0 91.666667%; flex: 0 0 91.666667%; max-width: 91.666667%; }
   .afo-col-12 { -ms-flex: 0 0 100%; flex: 0 0 100%; max-width: 100%; }
   
   /* === TARJETAS (CARDS) === */
   .afo-tarjeta {
       position: relative;
       display: -ms-flexbox;
       display: flex;
       -ms-flex-direction: column;
       flex-direction: column;
       min-width: 0;
       word-wrap: break-word;
       background-color: #fff;
       background-clip: border-box;
       border: 1px solid rgba(0,0,0,.125);
       border-radius: 0.25rem;
       margin-bottom: 1rem;
       box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
   }
   
   .afo-tarjeta-encabezado {
       padding: 0.75rem 1.25rem;
       margin-bottom: 0;
       background-color: rgba(0,0,0,.03);
       border-bottom: 1px solid rgba(0,0,0,.125);
   }
   
   .afo-tarjeta-encabezado:first-child {
       border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0;
   }
   
   .afo-tarjeta-cuerpo {
       -ms-flex: 1 1 auto;
       flex: 1 1 auto;
       min-height: 1px;
       padding: 1.25rem;
   }
   
   .afo-tarjeta-primaria .afo-tarjeta-encabezado {
       background-color: #007bff;
       color: #fff;
       border-bottom: 1px solid #0062cc;
   }
   
   .afo-tarjeta-peligro .afo-tarjeta-encabezado {
       background-color: #dc3545;
       color: #fff;
       border-bottom: 1px solid #bd2130;
   }
   
   .afo-tarjeta-exito .afo-tarjeta-encabezado {
       background-color: #28a745;
       color: #fff;
       border-bottom: 1px solid #1e7e34;
   }
   
   .afo-tarjeta-info .afo-tarjeta-encabezado {
       background-color: #17a2b8;
       color: #fff;
       border-bottom: 1px solid #117a8b;
   }
   
   /* === ALERTAS === */
   .afo-alerta {
       position: relative;
       padding: 0.75rem 1.25rem;
       margin-bottom: 1rem;
       border: 1px solid transparent;
       border-radius: 0.25rem;
   }
   
   .afo-alerta-advertencia {
       color: #856404;
       background-color: #fff3cd;
       border-color: #ffeeba;
   }
   
   .afo-alerta-informacion {
       color: #0c5460;
       background-color: #d1ecf1;
       border-color: #bee5eb;
   }
   
   .afo-alerta-peligro {
       color: #721c24;
       background-color: #f8d7da;
       border-color: #f5c6cb;
   }
   
   .afo-alerta-exito {
       color: #155724;
       background-color: #d4edda;
       border-color: #c3e6cb;
   }
   
   /* === BOTONES === */
   .afo-boton {
       display: inline-block;
       font-weight: 400;
       text-align: center;
       vertical-align: middle;
       cursor: pointer;
       -webkit-user-select: none;
       -moz-user-select: none;
       -ms-user-select: none;
       user-select: none;
       padding: 0.375rem 0.75rem;
       font-size: 1rem;
       line-height: 1.5;
       border-radius: 0.25rem;
       transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
       border: 1px solid transparent;
       text-decoration: none;
   }
   
   .afo-boton-primario {
       color: #fff;
       background-color: #007bff;
       border-color: #007bff;
   }
   
   .afo-boton-primario:hover {
       color: #fff;
       background-color: #0069d9;
       border-color: #0062cc;
   }
   
   .afo-boton-secundario {
       color: #fff;
       background-color: #6c757d;
       border-color: #6c757d;
   }
   
   .afo-boton-secundario:hover {
       color: #fff;
       background-color: #5a6268;
       border-color: #545b62;
   }
   
   .afo-boton-exito {
       color: #fff;
       background-color: #28a745;
       border-color: #28a745;
   }
   
   .afo-boton-exito:hover {
       color: #fff;
       background-color: #218838;
       border-color: #1e7e34;
   }
   
   .afo-boton-peligro {
       color: #fff;
       background-color: #dc3545;
       border-color: #dc3545;
   }
   
   .afo-boton-peligro:hover {
       color: #fff;
       background-color: #c82333;
       border-color: #bd2130;
   }
   
   /* === VENTANA MODAL (CORREGIDA PARA SCROLL EN MÓVILES) === */
   .afo-modal {
       position: fixed;
       top: 0;
       left: 0;
       z-index: 9999;
       display: none;
       width: 100%;
       height: 100%;
       overflow: hidden;
       outline: 0;
       background-color: rgba(0,0,0,0.5);
   }
   
   /* Cuando el modal es visible - ACTIVA EL SCROLL */
   .afo-modal.afo-modal-visible {
       display: block;
       overflow-y: auto;  /* ¡CLAVE! Permite hacer scroll en el modal */
       overflow-x: hidden;
   }
   
   /* Clase para el body cuando el modal está abierto */
   body.afo-modal-abierto {
       overflow: hidden !important;  /* Oculta el scroll de la página principal */
       position: relative;
       width: 100%;
       height: 100%;
   }
   
   .afo-modal-dialogo {
       position: relative;
       width: auto;
       margin: 0.5rem;
       pointer-events: none;
       max-width: 500px;
   }
   
   .afo-modal-visible .afo-modal-dialogo {
       animation: afo-aparecer 0.3s ease-out;
   }
   
   @media (min-width: 576px) {
       .afo-modal-dialogo {
           margin: 1.75rem auto;
       }
   }
   
   .afo-modal-contenido {
       position: relative;
       display: -ms-flexbox;
       display: flex;
       -ms-flex-direction: column;
       flex-direction: column;
       width: 100%;
       pointer-events: auto;
       background-color: #fff;
       background-clip: padding-box;
       border: 1px solid rgba(0,0,0,.2);
       border-radius: 0.3rem;
       outline: 0;
   }
   
   .afo-modal-encabezado {
       display: -ms-flexbox;
       display: flex;
       -ms-flex-align: start;
       align-items: flex-start;
       -ms-flex-pack: justify;
       justify-content: space-between;
       padding: 1rem;
       border-bottom: 1px solid #dee2e6;
       border-top-left-radius: calc(0.3rem - 1px);
       border-top-right-radius: calc(0.3rem - 1px);
   }
   
   .afo-modal-titulo {
       margin-bottom: 0;
       line-height: 1.5;
       font-size: 1.25rem;
       font-weight: 500;
   }
   
   .afo-modal-cuerpo {
       position: relative;
       -ms-flex: 1 1 auto;
       flex: 1 1 auto;
       padding: 1rem;
   }
   
   .afo-modal-pie {
       display: -ms-flexbox;
       display: flex;
       -ms-flex-wrap: wrap;
       flex-wrap: wrap;
       -ms-flex-align: center;
       align-items: center;
       -ms-flex-pack: end;
       justify-content: flex-end;
       padding: 0.75rem;
       border-top: 1px solid #dee2e6;
       border-bottom-right-radius: calc(0.3rem - 1px);
       border-bottom-left-radius: calc(0.3rem - 1px);
   }
   
   .afo-modal-pie > * {
       margin: 0.25rem;
   }
   
   .afo-modal-cerrar {
       float: right;
       font-size: 1.5rem;
       font-weight: 700;
       line-height: 1;
       color: #000;
       text-shadow: 0 1px 0 #fff;
       opacity: .5;
       padding: 0;
       background-color: transparent;
       border: 0;
       cursor: pointer;
   }
   
   .afo-modal-cerrar:hover {
       color: #000;
       text-decoration: none;
       opacity: .75;
   }
   
   /* === UTILIDADES DE ESPACIADO === */
   .afo-mb-2 { margin-bottom: 0.5rem; }
   .afo-mb-3 { margin-bottom: 1rem; }
   .afo-mt-2 { margin-top: 0.5rem; }
   .afo-mt-3 { margin-top: 1rem; }
   .afo-ml-2 { margin-left: 0.5rem; }
   .afo-mr-2 { margin-right: 0.5rem; }
   .afo-p-2 { padding: 0.5rem; }
   .afo-p-3 { padding: 1rem; }
   
   /* === ALINEACIÓN DE TEXTO === */
   .afo-texto-centro { text-align: center; }
   .afo-texto-izquierda { text-align: left; }
   .afo-texto-derecha { text-align: right; }
   
   /* === IMÁGENES === */
   .afo-imagen-responsive {
       max-width: 100%;
       height: auto;
   }
   
   .afo-logo {
       max-height: 50px;
       width: auto;
   }
   
   /* === TABLAS === */
   .afo-tabla-responsive {
       display: block;
       width: 100%;
       overflow-x: auto;
       -webkit-overflow-scrolling: touch;
   }
   
   .afo-tabla {
       width: 100%;
       margin-bottom: 1rem;
       color: #212529;
       border-collapse: collapse;
   }
   
   .afo-tabla th,
   .afo-tabla td {
       padding: 0.75rem;
       vertical-align: top;
       border-top: 1px solid #dee2e6;
   }
   
   .afo-tabla thead th {
       vertical-align: bottom;
       border-bottom: 2px solid #dee2e6;
       background-color: #f8f9fa;
   }
   
   /* === BADGES / ETIQUETAS === */
   .afo-etiqueta {
       display: inline-block;
       padding: 0.25em 0.4em;
       font-size: 75%;
       font-weight: 700;
       line-height: 1;
       text-align: center;
       white-space: nowrap;
       vertical-align: baseline;
       border-radius: 0.25rem;
   }
   
   .afo-etiqueta-exito {
       color: #fff;
       background-color: #28a745;
   }
   
   .afo-etiqueta-peligro {
       color: #fff;
       background-color: #dc3545;
   }
   
   .afo-etiqueta-informacion {
       color: #fff;
       background-color: #17a2b8;
   }
   
   /* === ESTADOS DE AFILIACIÓN === */
   .afo-estado-vigente {
       color: #063;
       font-weight: bold;
   }
   
   .afo-estado-vencido {
       color: #F00;
       font-weight: bold;
   }
   
   .afo-estado-desconocido {
       color: #F00;
       font-weight: bold;
   }
   
   /* === CAMPOS DE FORMULARIO === */
   .afo-campo {
       display: block;
       width: 100%;
       height: calc(1.5em + 0.75rem + 2px);
       padding: 0.375rem 0.75rem;
       font-size: 1rem;
       font-weight: 400;
       line-height: 1.5;
       color: #495057;
       background-color: #fff;
       background-clip: padding-box;
       border: 1px solid #ced4da;
       border-radius: 0.25rem;
       transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
   }
   
   .afo-campo:focus {
       color: #495057;
       background-color: #fff;
       border-color: #80bdff;
       outline: 0;
       box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
   }
   
   .afo-etiqueta-campo {
       display: inline-block;
       margin-bottom: 0.5rem;
       font-weight: 600;
   }
   
   /* === GRUPOS DE FORMULARIO === */
   .afo-grupo {
       margin-bottom: 1rem;
   }
   
   /* === ANIMACIONES === */
   @keyframes afo-girar {
       0% { transform: rotate(0deg); }
       100% { transform: rotate(360deg); }
   }
   
   @keyframes afo-aparecer {
       from {
           opacity: 0;
           transform: translateY(-50px);
       }
       to {
           opacity: 1;
           transform: translateY(0);
       }
   }