/* Estilos para el formulario de registro dinámico */
    .role-display {
      text-align: center;
      margin-bottom: 20px;
      padding: 10px;
      background: linear-gradient(135deg, #007bff, #0056b3);
      color: white;
      border-radius: 8px;
      font-weight: bold;
      font-size: 1.1rem;
    }

    .registration-fields {
      display: flex;
      flex-direction: column;
      gap: 15px;
      margin-top: 15px;
      padding-top: 15px;
      border-top: 2px solid #f0f0f0;
    }

    .registration-fields input {
      padding: 12px;
      border: 2px solid #ddd;
      border-radius: 8px;
      font-size: 16px;
      transition: border-color 0.3s ease;
    }

    .registration-fields input:focus {
      outline: none;
      border-color: #007bff;
      box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
    }

    .registration-fields input:valid {
      border-color: #28a745;
    }

    .container {
      max-width: 450px;
    }

    #submitBtn {
      margin-top: 20px;
      padding: 12px;
      font-size: 16px;
      font-weight: bold;
    }

    .fade-in {
      animation: fadeIn 0.3s ease-in;
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(-10px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* Validación visual */
    input:invalid:not(:focus):not(:placeholder-shown) {
      border-color: #dc3545;
      background-color: #fff5f5;
    }

    input:valid:not(:focus):not(:placeholder-shown) {
      border-color: #28a745;
      background-color: #f8fff9;
    }

    /* Estilos para Términos y Condiciones */
    .terms-section {
      background: #f8f9fa;
      padding: 15px;
      border-radius: 8px;
      border: 2px solid #dee2e6;
      margin-top: 10px;
    }

    .terms-header {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .terms-header input[type="checkbox"] {
      width: 20px;
      height: 20px;
      cursor: pointer;
      flex-shrink: 0;
    }

    .terms-header label {
      font-size: 14px;
      color: #333;
      cursor: pointer;
      user-select: none;
    }

    .terms-link {
      color: #007bff;
      text-decoration: underline;
      font-weight: bold;
    }

    .terms-link:hover {
      color: #0056b3;
    }

    /* Modal de Términos */
    .terms-modal {
      display: none;
      position: fixed;
      z-index: 2000;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.7);
      backdrop-filter: blur(5px);
    }

    .terms-modal-content {
      background: #fff;
      margin: 3% auto;
      padding: 30px;
      border-radius: 15px;
      width: 90%;
      max-width: 800px;
      max-height: 85vh;
      overflow-y: auto;
      position: relative;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
      animation: modalSlideIn 0.3s ease-out;
    }

    @keyframes modalSlideIn {
      from {
        opacity: 0;
        transform: translateY(-50px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .close {
      color: #aaa;
      float: right;
      font-size: 32px;
      font-weight: bold;
      cursor: pointer;
      transition: color 0.3s ease;
      line-height: 20px;
    }

    .close:hover,
    .close:focus {
      color: #000;
    }

    #termsModalTitle {
      color: #007bff;
      margin-bottom: 20px;
      padding-bottom: 10px;
      border-bottom: 3px solid #007bff;
    }

    .terms-content {
      line-height: 1.8;
      color: #333;
      padding: 20px 0;
    }

    .terms-content h3 {
      color: #007bff;
      font-size: 1.4rem;
      margin-top: 25px;
      margin-bottom: 15px;
      padding-bottom: 8px;
      border-bottom: 2px solid #e9ecef;
    }

    .terms-content h4 {
      color: #0056b3;
      font-size: 1.1rem;
      margin-top: 18px;
      margin-bottom: 10px;
    }

    .terms-content p {
      margin-bottom: 12px;
      text-align: justify;
    }

    .terms-content ul, .terms-content ol {
      margin-left: 25px;
      margin-bottom: 15px;
    }

    .terms-content li {
      margin-bottom: 8px;
    }

    .terms-content strong {
      color: #0056b3;
    }

    .terms-footer {
      display: flex;
      justify-content: center;
      gap: 20px;
      margin-top: 30px;
      padding-top: 20px;
      border-top: 2px solid #e9ecef;
    }

    .accept-terms-btn {
      background: linear-gradient(135deg, #28a745, #20c997);
      color: white;
      padding: 12px 30px;
      border: none;
      border-radius: 8px;
      font-size: 16px;
      font-weight: bold;
      cursor: pointer;
      transition: all 0.3s ease;
    }

    .accept-terms-btn:hover {
      background: linear-gradient(135deg, #218838, #1e7e34);
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    }

    .cancel-terms-btn {
      background: linear-gradient(135deg, #6c757d, #5a6268);
      color: white;
      padding: 12px 30px;
      border: none;
      border-radius: 8px;
      font-size: 16px;
      font-weight: bold;
      cursor: pointer;
      transition: all 0.3s ease;
    }

    .cancel-terms-btn:hover {
      background: linear-gradient(135deg, #5a6268, #545b62);
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
    }

    /* Responsive */
    @media (max-width: 768px) {
      .terms-modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 20px;
      }

      .terms-footer {
        flex-direction: column;
      }

      .accept-terms-btn, .cancel-terms-btn {
        width: 100%;
      }

      .terms-content h3 {
        font-size: 1.2rem;
      }
    }

    /* Estado del checkbox cuando está marcado */
    #acceptTerms:checked {
      accent-color: #28a745;
    }

    /* Indicador visual cuando los términos no están aceptados */
    #acceptTerms:invalid {
      outline: 2px solid #dc3545;
      outline-offset: 2px;
    }
