/* ==================== ESTILOS EXISTENTES ==================== */

/* === Lista de inscripciones === */
.lista-inscripciones {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 600px;
}

.lista-inscripciones li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #ddd;
}

.lista-inscripciones li span {
  flex: 1;
  font-weight: 500;
}

.lista-inscripciones li form {
  margin-left: auto;
  padding-right: 10px;
}

.boton-borrar {
  background-color: #c0392b;
  color: #fff;
  border: none;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-right: 12px;
  transition: background-color 0.2s ease;
}

.boton-borrar:hover {
  background-color: #e74c3c;
}

/* === FORMULARIO DE INSCRIPCIÓN === */
.form-inscripcion {
  margin: 10px 0;
}

.form-linea {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.form-linea label {
  font-weight: 600;
  margin-right: 8px;
  white-space: nowrap;
}

.form-linea select {
  flex: 1;
  min-width: 200px;
  padding: 6px;
  font-size: 0.95rem;
}

.boton-inscribir {
  background-color: #2e86de;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.boton-inscribir:hover {
  background-color: #1b4f9c;
}

/* === ESTILOS GENERALES === */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f5f5f5;
  color: #333;
}

h1,
h2,
h3 {
  color: #ffffff;
  text-align: left;
  margin: 5px 0;
  font-weight: 600;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

ul,
ol {
  margin-top: 5px;
  /* antes podía ser 1em o más */
  margin-bottom: 5px;
  padding-left: 1.2em;
  /* controla la sangría */
}

li {
  margin-top: 0.25em;
  /* espacio entre ítems */
  margin-bottom: 0.25em;
}


h2.negro {
  color: #000000;
}

h3.negro {
  color: #000000;
}

h4.negro {
  color: #000000;
}

a {
  text-align: left;
  text-decoration: none;
  font-weight: 400;
  color: #000000;
  transition: color 0.3s ease;
}

a:hover {
  color: #007bff;
}

/* === HEADER === */
header {
  background-color: #004a99;
  /* Azul más profundo y elegante */
  color: white;
  padding: 10px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-bottom: 3px solid #003d81;
}

header h1 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0.5px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 0.95rem;
}

.user-info span {
  font-weight: 500;
  opacity: 0.9;
}

.btn-logout,
.btn-header {
  color: #fff;
  font-size: 1.1rem;
  opacity: 0.8;
  transition: opacity 0.2s, transform 0.2s;
  text-decoration: none;
}

.btn-logout:hover,
.btn-header:hover {
  opacity: 1;
  color: #fff;
  transform: scale(1.1);
}

.btn-logout:hover {
  color: #ff4d4d;
}

.btn-header:hover {
  color: #55C9C6;
  /* Using a color from the main palette or similar accent */
}

/* === NAV BAR === */
nav {
  background-color: #0056b3;
  padding: 8px 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

nav a,
.dropdown-btn {
  color: #fff;
  background-color: transparent;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

nav a:hover,
.dropdown-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Icons Adjustment */
nav i,
.dropdown-btn i {
  font-size: 1rem;
}

/* === IFRAME PRINCIPAL === */
iframe#contenido {
  width: 100%;
  height: calc(100vh - 60px);
  border: none;
  background: #f7f9fb;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

/* === TARJETA DE DATOS === */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin: 15px auto;
  max-width: 700px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card h4 {
  margin-top: 0;
  color: #0056b3;
  border-bottom: 2px solid #0056b3;
  padding-bottom: 5px;
  font-size: 1.1rem;
}

.card p {
  margin: 6px 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* === TABLAS === */
table {
  table-layout: auto;
  border-collapse: collapse;
  margin: 1rem auto;
  background: #fbfbfb;
  border-radius: 8px;
  overflow: visible;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

table th,
table td {
  padding: 12px 10px;
  text-align: center;
  border-bottom: 1px solid #e0e0e0;
}

table th {
  background-color: #0056b3;
  color: #fff;
  font-weight: 500;
}

table tr:hover {
  background-color: #f1f7ff;
}

td.acciones {
  text-align: center;
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* === BOTONES === */
.boton-accion {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: 0.2s;
}

.boton-inscribir {
  background-color: #28a745;
  color: #fff;
}

.boton-inscribir:hover {
  background-color: #218838;
}

.boton-baja {
  background-color: #dc3545;
  color: #fff;
}

.boton-baja:hover {
  background-color: #c82333;
}

/* === FORMULARIOS === */
.formulario {
  background: #fff;
  border-radius: 12px;
  padding: 25px;
  max-width: 600px;
  margin: 15px auto 25px auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.formulario label {
  font-weight: 500;
  color: #004085;
}

.formulario select,
.formulario textarea,
.formulario input[type="text"],
.formulario input[type="number"],
.formulario input[type="email"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  box-sizing: border-box;

}

.formulario select:focus,
.formulario textarea:focus,
.formulario input:focus {
  border-color: #0056b3;
  outline: none;
  box-shadow: 0 0 3px rgba(0, 86, 179, 0.3);
}

.formulario input[type="submit"] {
  background-color: #0056b3;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.formulario input[type="submit"]:hover {
  background-color: #004494;
}

textarea {
  resize: vertical;
}

/* === MENSAJES DE ERROR === */
p[style*="color:red"] {
  color: #b30000 !important;
  text-align: center;
  font-weight: 500;
}

/* === RESPONSIVE === */
@media (max-width: 700px) {

  .card,
  .formulario,
  table {
    width: 95%;
  }

  nav {
    flex-direction: column;
    gap: 8px;
  }
}

/* === Buscador de alumnos === */
.busqueda {
  text-align: center;
  margin: 1rem 0;
}

.busqueda input {
  width: 80%;
  max-width: 400px;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
  transition: 0.2s;
}

.busqueda input:focus {
  border-color: #007BFF;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
  outline: none;
}

/* === BASE GENERAL === */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f5f5f5;
}

/* Removed redundant styles, handled above */

/* === MENÚ DESPLEGABLE PREMIUM === */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content-form {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  min-width: 220px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  padding: 8px 0;
  overflow: hidden;
  z-index: 9999;
}

.dropdown-content-form a {
  display: flex !important;
  align-items: center;
  gap: 10px;
  color: #333 !important;
  text-decoration: none;
  padding: 10px 16px;
  margin: 0;
  border-radius: 0;
  background-color: transparent;
  font-weight: 400;
  font-size: 0.9rem;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.dropdown-content-form a i {
  width: 18px;
  text-align: center;
  color: #0056b3;
}

.dropdown-content-form a:hover {
  background-color: #f0f7ff;
  color: #0056b3 !important;
}

.dropdown-content-form hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 5px 0;
}

.dropdown:hover .dropdown-content-form {
  display: block;
}

@media (min-width: 769px) {
  .dropdown:hover .dropdown-content-form {
    display: block;
  }
}

@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: stretch;
  }

  .dropdown {
    width: 100%;
  }

  .dropdown-btn {
    width: 100%;
    text-align: left;
  }

  .dropdown-content-form {
    position: static;
    border: 1px solid #ddd;
    border-radius: 0;
    box-shadow: none;
    display: none;
  }

  .dropdown.open .dropdown-content-form {
    display: block;
  }
}

/* === IFRAME === */
iframe {
  width: 100%;
  height: calc(100vh - 80px);
  border: none;
  background: white;
}


.buscador-contenedor {
  display: flex;
  /* Activamos flexbox */
  justify-content: center;
  /* Centra horizontalmente */
  margin: 15px 0;
  /* Espacio arriba y abajo */
}

.buscador-contenedor input {
  width: 80%;
  /* Ancho adaptable */
  max-width: 400px;
  /* Limita tamaño máximo */
}



/* === CONTENEDOR Y BUSCADOR === */
body {
  font-family: Arial, sans-serif;
  margin: 20px;
  background: #f9f9f9;
}

h2 {
  margin-bottom: 5px;
  color: #333;
}

#searchInput {
  width: 100%;
  max-width: 400px;
  padding: 8px 10px;
  margin-bottom: 15px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

/* === TABLA === */
.table-container {
  overflow-x: auto;
}

table {
  width: auto;
  border-collapse: collapse;
  min-width: 600px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

th,
td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

th {
  background-color: #0056b3;
  color: white;
}

td.doc-col,
td.accion-col {
  text-align: center;
}

/* === BOTONES === */

/* ==== CENTRAR BOTONES ==== */
.boton-centro {
  margin-top: 15px;
  text-align: center;
}


button.boton-accion,
a.boton-accion {
  display: inline-block;
  padding: 6px 12px;
  margin: 2px 2px 2px 0;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: 0.2s;
}

/* Marcar Sí */
button.boton-marcar {
  background-color: #28a745;
  color: white;
  border-color: #28a745;
}

button.boton-marcar:hover {
  background-color: #218838;
  border-color: #1e7e34;
}

/* Editar / Inscribir */
a.boton-accion {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

a.boton-accion:hover {
  background-color: #0056b3;
  border-color: #004085;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  table {
    min-width: 0;
  }

  th,
  td {
    padding: 8px;
    font-size: 0.85rem;
  }

  td.accion-col {
    white-space: nowrap;
  }
}

/* ==== FORMULARIO EN CARD ==== */
.form-card {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.form-linea {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.form-linea label {
  min-width: 120px;
  font-weight: bold;
}

.form-linea input,
.form-linea select {
  flex: 1;
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.botones-ficha {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.boton-accion {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: #fff;
  text-align: center;
  text-decoration: none;
}

.boton-crear {
  background-color: #28a745;
}

.boton-crear:hover {
  background-color: #218838;
}

.boton-volver {
  background-color: #6c757d;
}

.boton-volver:hover {
  background-color: #5a6268;
}

/* ==== LOGIN ==== */
.login-container {
  max-width: 400px;
  margin: 50px auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.login-container h2 {
  text-align: center;
  margin-bottom: 20px;
}

.login-container label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

.login-container input[type="text"],
.login-container input[type="password"] {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.login-container .boton-accion {
  width: 100%;
  padding: 10px;
  margin-top: 20px;
  border: none;
  border-radius: 4px;
  background-color: #007bff;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

.login-container .boton-accion:hover {
  background-color: #0069d9;
}

.mensaje-error {
  color: red;
  text-align: center;
  margin-bottom: 10px;
}

/* Aseguramos que la etiqueta label se muestre en bloque */
.checkbox-group {
  display: block !important;
  /* fuerza el bloque aunque haya flex heredado */
}

.checkbox-group .checkbox-item {
  display: block !important;
  /* cada checkbox en su propia línea */
  margin-bottom: 5px;
  /* separación entre ellos */
}

.checkbox-item-block {
  display: block !important;
  margin-bottom: 5px;
  cursor: pointer;
}







.radio-group {
  display: block;
  /* fuerza el bloque aunque haya flex heredado */
}

.radio-group .radio-item {
  display: block;
  margin-bottom: 5px;
  /* separación entre radios */
}



.info-importante {
  max-width: 700px;
  margin: 20px auto;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  font-family: sans-serif;
}

.info-importante h3 {
  margin: 0 0 10px 0;
  font-size: 1.5em;
  color: #333;
}

.info-bloque h4 {
  margin: 10px 0 5px 0;
  font-size: 1.2em;
  font-weight: bold;
}

.info-bloque ul {
  margin: 0 0 10px 20px;
  /* margen inferior pequeño y sangría */
  padding: 0;
}

.info-bloque li {
  margin: 2px 0;
  /* espacio mínimo entre items */
  line-height: 1.3em;
}

.info-bloque p {
  margin: 2px 0;
  line-height: 1.3em;
}