/* ==========================================================================
   ESTILOS PROFESIONALES LOCALES SIN BOOTSTRAP (GRID Y FLEXBOX NATIVOS)
   ========================================================================== */
body {
  background-color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  color: #2d3748;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1050px;
  margin: 40px auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Tarjeta Principal */
.card {
  background: #ffffff;
  border: 1px solid #dcdde1;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.card-header {
  background: #f8f9fa; 
  padding: 20px;
  border-bottom: 1px solid #dcdde1;
}

.card-header h4 {
  color: #1c3d5a;
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  text-align: center;
}

.card-body {
  padding: 35px;
}

/* ==========================================================================
   SISTEMA DE GRILLA INFORMATIVA (GRID LOCAL)
   ========================================================================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Crea 2 columnas simétricas idénticas */
  gap: 20px; /* Separación uniforme entre campos */
  width: 100%;
  margin-bottom: 20px;
}

/* Fuerza a un campo a ocupar todo el ancho de la grilla (Fila Completa) */
.full-width {
  grid-column: span 2;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1c3d5a;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  background-color: #f1f2f6;
  border: 1px solid #ced4da;
  border-radius: 4px;
  color: #4f5d73;
  font-size: 0.95rem;
  padding: 10px 14px;
  box-sizing: border-box;
  height: 42px;
}

.form-control[readonly] {
  background-color: #f1f2f6;
  color: #4f5d73;
  cursor: not-allowed;
}

/* Caja de Texto Libre para Observaciones */
textarea.form-control {
  resize: vertical;
  min-height: 110px;
  height: auto;
  background-color: #ffffff;
}

/* Bloques Locales de Alerta (Verde e Info) */
.alert-custom {
  border-radius: 4px;
  padding: 16px;
  font-size: 0.95rem;
  margin: 25px 0;
  box-sizing: border-box;
}

.alert-success-local {
  background-color: #ebf7ee;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.alert-info-local {
  background-color: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

/* ==========================================================================
   TABLA DE EVALUACIÓN ULTRA-PROFESIONAL Y ANIMADA (CSS NATIVO)
   ========================================================================== */
.table-responsive {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px; /* Bordes más curvos y modernos */
  overflow: hidden; 
  margin: 30px 0;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03); /* Sombra difuminada elegante */
  transition: box-shadow 0.3s ease;
}

/* Efecto interactivo en el contenedor de la tabla */
.table-responsive:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
}

/* Cabecera estilizada */
.table thead th {
  background-color: #f8fafc; /* Gris sutil de fondo para contrastar */
  color: #1e293b;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 16px 12px;
  border-bottom: 2px solid #e2e8f0;
  border-left: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  text-align: center;
  vertical-align: middle;
  letter-spacing: 0.3px;
}

/* Celdas del cuerpo con transiciones */
.table tbody td {
  padding: 16px 18px;
  vertical-align: middle;
  border: 1px solid #e2e8f0; 
  font-size: 0.95rem;
  color: #334155;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Animación de iluminación en las filas al pasar el mouse (Row Hover) */
.table tbody tr {
  transition: transform 0.2s ease;
}

.table tbody tr:hover td {
  background-color: #f1f5f9; /* Color de iluminación suave */
  color: #0f172a; /* Oscurece el texto para mejorar el contraste */
}

/* Alineación e interactividad en los textos de los criterios */
.table tbody td.text-left {
  text-align: left;
  font-weight: 500;
}

.table tbody td:not(.text-left) {
  text-align: center;
}

/* ==========================================================================
   ANIMACIÓN AVANZADA PARA LOS SELECTORES (RADIO BUTTONS)
   ========================================================================== */
input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin: 0;
  vertical-align: middle;
  accent-color: #1c3d5a; /* Color institucional */
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), filter 0.2s ease;
}

/* Animación al pasar el mouse sobre el círculo de selección */
input[type="radio"]:hover {
  transform: scale(1.25); /* Se agranda ligeramente de forma fluida */
  filter: brightness(1.1);
}

/* Efecto elástico cuando el estudiante hace clic */
input[type="radio"]:active {
  transform: scale(0.9);
}

/* Destaca la celda donde el botón está seleccionado actualmente */
.table tbody tr td:has(input[type="radio"]:checked) {
  background-color: #f8fafc;
}


/* ==========================================================================
   BOTONES FLUIDOS DE PIE DE PÁGINA (CENTRADOS)
   ========================================================================== */
.buttons-footer-container {
  margin-top: 35px;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.btn {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 10px 24px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-danger {
  background-color: #e74c3c;
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #c0392b;
}

.btn-success {
  background-color: #2ecc71;
  color: #ffffff;
}

.btn-success:hover {
  background-color: #27ae60;
}

/* ==========================================================================
   REGLAS RESPONSIVE PARA DISPOSITIVOS MÓVILES
   ========================================================================== */
@media (max-width: 768px) {
  .container {
    margin: 15px auto;
    padding: 0 10px;
  }
  
  .card-body {
    padding: 20px;
  }

  /* La grilla colapsa a una única columna vertical en celulares */
  .form-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .full-width {
    grid-column: span 1;
  }

  .table thead th {
    font-size: 0.85rem;
    padding: 8px;
  }

  .table tbody td {
    font-size: 0.85rem;
    padding: 12px 6px;
  }
}


/* ==========================================================================
   ESTILOS GENERALES Y DISEÑO NATIVO (100% LOCAL Y RESPONSIVO)
   ========================================================================== */
body {
  background-color: #f4f6f9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  color: #2d3748;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1050px;
  margin: 20px;
  padding: 0 15px;
  box-sizing: border-box;
}

/* ==========================================================================
   INTERFAZ DE INICIO DE SESIÓN (index.php - DOS COLUMNAS NATIVAS)
   ========================================================================== */
.login-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  display: flex;
  flex-wrap: wrap; /* Permite colapsar en pantallas móviles */
  width: 100%;
}

/* Columna Izquierda: Imagen de la Biblioteca */
.login-card-img-wrapper {
  flex: 1 1 45%;
  min-width: 300px;
  max-height: 600px;
}

.login-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Columna Derecha: Formulario */
.login-card-form-wrapper {
  flex: 1 1 55%;
  min-width: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.card-body {
  width: 100%;
  padding: 45px;
  display: flex;
  flex-direction: column;
  align-items: center; /* Centra horizontalmente logo y títulos */
  text-align: center;
  box-sizing: border-box;
}

.brand-wrapper {
  margin-bottom: 2rem;
  width: 100%;
  display: flex;
  justify-content: center;
}

.brand-wrapper .logo {
  height: 65px;
  width: auto;
}

.login-card-description {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 2rem;
  width: 100%;
}

.login-form {
  width: 100%;
}

/* Campos de entrada e información */
.form-group {
  margin-bottom: 1.5rem;
  text-align: left; /* Mantiene las etiquetas sobre el input alineadas a la izquierda */
  width: 100%;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 8px;
}

.form-control {
  display: block;
  width: 100%;
  height: 46px;
  padding: 10px 14px;
  font-size: 0.95rem;
  color: #334155;
  background-color: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-control:focus {
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
  outline: none;
}

/* Estilo del botón principal de ingreso */
.login-btn {
  display: block;
  width: 100%;
  background-color: #1c3d5a; /* Azul institucional */
  border: none;
  border-radius: 8px;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  margin-top: 1.5rem;
}

.login-btn:hover {
  background-color: #142c42;
}

.login-btn:active {
  transform: scale(0.98);
}

.login-card-footer-nav {
  margin-top: 2.5rem;
  border-top: 1px solid #edf2f7;
  padding-top: 1.2rem;
  font-size: 0.85rem;
  color: #718096;
  width: 100%;
}

/* ==========================================================================
   ESTILOS COMPLEMENTARIOS PARA LA SEGUNDA PÁGINA (evaluacion_tutorias.php)
   ========================================================================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  width: 100%;
  margin-bottom: 20px;
}

.full-width { grid-column: span 2; }
.form-control[readonly] { background-color: #f1f5f9; color: #475569; cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 110px; height: auto; }

.alert-custom { border-radius: 6px; padding: 16px; font-size: 0.95rem; margin: 25px 0; box-sizing: border-box; text-align: center; }
.alert-success-local { background-color: #ebf7ee; border: 1px solid #c3e6cb; color: #155724; }
.alert-info-local { background-color: #d1ecf1; border: 1px solid #bee5eb; color: #0c5460; }

.table-responsive { width: 100%; border: 1px solid #e2e8f0; border-radius: 10px; overflow-x: auto; margin: 30px 0; background: #ffffff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02); }
.table { width: 100%; border-collapse: collapse; margin-bottom: 0; }
.table thead th { background-color: #ffffff; color: #1e293b; font-weight: 700; font-size: 0.95rem; padding: 14px; border-bottom: 2px solid #e2e8f0; border-left: 1px solid #e2e8f0; border-right: 1px solid #e2e8f0; text-align: center; }
.table tbody td { padding: 14px 16px; vertical-align: middle; border: 1px solid #e2e8f0; font-size: 0.95rem; color: #334155; transition: background-color 0.2s ease; }
.table tbody tr:hover td { background-color: #f1f5f9; color: #0f172a; }
.table tbody td.text-left { text-align: left; font-weight: 500; }
.table tbody td:not(.text-left) { text-align: center; }
input[type="radio"] { width: 16px; height: 16px; cursor: pointer; accent-color: #1c3d5a; transition: transform 0.2s ease; }
input[type="radio"]:hover { transform: scale(1.2); }

.buttons-footer-container { margin-top: 35px; display: flex; justify-content: center; gap: 15px; }
.btn-danger { background-color: #e74c3c; color: #ffffff; } .btn-danger:hover { background-color: #c0392b; }
.btn-success { background-color: #2ecc71; color: #ffffff; } .btn-success:hover { background-color: #27ae60; }

/* ==========================================================================
   REGLAS RESPONSIVE PARA DISPOSITIVOS MÓVILES
   ========================================================================== */
@media (max-width: 768px) {
  body { padding: 10px; }
  .container { margin: 10px auto; padding: 0; }
  
  /* Oculta la imagen lateral en móviles para dar prioridad absoluta al login */
  .login-card-img-wrapper { display: none; }
  .card-body { padding: 30px 20px; }
  .login-card-description { font-size: 1.3rem; margin-bottom: 1.5rem; }
  
  .form-grid { grid-template-columns: 1fr; gap: 15px; }
  .full-width { grid-column: span 1; }
  .table thead th { font-size: 0.85rem; padding: 8px; }
  .table tbody td { font-size: 0.85rem; padding: 12px 6px; }
}


/* ==========================================================================
   PERSONALIZACIÓN PROFESIONAL DE LA TIPOGRAFÍA EN SWEETALERT2
   ========================================================================== */

/* Contenedor perimetral y fuente base del modal */
.swal2-popup, .swal2-modal {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  font-smoothing: antialiased;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  border-radius: 12px !important; /* Bordes suaves acordes a tu tarjeta */
  padding: 30px !important;
}

/* Estilo del Título Principal */
.swal2-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  color: #1a202c !important; /* Gris oscuro elegante, menos agresivo que el negro puro */
  margin-top: 15px !important;
  margin-bottom: 10px !important;
  letter-spacing: -0.3px !important;
}

/* Estilo del Contenido de Texto e HTML Interno */
.swal2-content, #swal2-content {
  font-size: 1rem !important;
  font-weight: 400 !important;
  color: #4a5568 !important; /* Color gris intermedio de alta legibilidad */
  line-height: 1.5 !important;
}

/* Estilo del Botón de Confirmación Principal */
.swal2-styled.swal2-confirm {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  padding: 10px 28px !important;
  border-radius: 6px !important;
  background-color: #1c3d5a !important; /* Azul institucional uniforme con tu login */
  box-shadow: 0 2px 4px rgba(28, 61, 90, 0.15) !important;
  transition: all 0.2s ease-in-out !important;
}

.swal2-styled.swal2-confirm:hover {
  background-color: #142c42 !important; /* Oscurece sutilmente al pasar el cursor */
  transform: translateY(-1px);
}

/* Estilo específico para los mensajes informativos tipo Toast Centrados (Duplicados) */
.swal2-modal.swal2-toast-center {
  border-left: 5px solid #e74c3c !important; /* Línea roja de advertencia */
}

.swal2-modal.swal2-toast-center .swal2-title {
  color: #c0392b !important; /* Título rojo para el aviso de duplicado */
  font-size: 1.3rem !important;
}

/* ==========================================================================
   PERSONALIZACIÓN TIPOGRÁFICA MODERNA PARA SWEETALERT2 (CLASES ACTUALES)
   ========================================================================== */

/* Contenedor perimetral del cuadro */
.swal2-popup {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  border-radius: 12px !important;
  padding: 30px !important;
}

/* Título Principal */
.swal2-title {
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  color: #1a202c !important;
  margin-top: 15px !important;
  letter-spacing: -0.3px !important;
}

/* CORREGIDO: Contenedor oficial para el texto del mensaje e HTML */
.swal2-html-container {
  font-size: 1rem !important;
  font-weight: 400 !important;
  color: #4a5568 !important;
  line-height: 1.6 !important;
  margin-top: 15px !important;
}

/* CORREGIDO: Botón de confirmación oficial */
button.swal2-confirm.swal2-styled {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  padding: 12px 32px !important;
  border-radius: 6px !important;
  background-color: #1c3d5a !important; /* Azul de tu login */
  box-shadow: 0 2px 4px rgba(28, 61, 90, 0.15) !important;
  transition: all 0.2s ease !important;
}

button.swal2-confirm.swal2-styled:hover {
  background-color: #142c42 !important;
}

/* Toast flotante personalizado para duplicados */
.swal2-popup.swal2-toast-center {
  border-left: 5px solid #e74c3c !important;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}
