/* ============================
   CSS AJUSTADO AL HTML ACTUAL:
   AUDITORÍA EXPEDIENTE CLÍNICO
   - 16 columnas totales
   - 2 datos generales (Fecha + Núm. Empleado Evaluador)
   - 13 criterios (5-17)
   - 1 Acción
   ============================ */

body {
  font-family: 'Roboto', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f7f8;
  margin: 0;
  padding: 20px;
  color: #000000;
}

h1 {
  text-align: center;
  color: #000000;
  margin-bottom: 30px;
  font-size: 20px;
}

form {
  max-width: 100%;
  margin: 0 auto;
  background: #fff;
  padding: 25px 30px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  overflow: auto;
  max-height: 70vh;
}

/* Tabla */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  /* ✅ 16 columnas: 2 generales + 13 criterios + acción */
  min-width: 2200px;
  table-layout: fixed;
}

th,
td {
  padding: 8px 10px;
  border: 1px solid #ddd;
  text-align: center;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  white-space: nowrap;
}

/* ✅ Columna Acción sin recorte */
td:last-child {
  overflow: visible;
  position: relative;
}

/* Encabezados */
th {
  background-color: #071E61;
  color: white;
  font-weight: normal;
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
  white-space: normal;
  line-height: 1.2em;
  padding: 10px 8px;
  word-wrap: break-word;
}

/* ============================
   ANCHOS POR COLUMNA (16)
   ============================ */

/* 1) Fecha auditoría */
th:nth-child(1), td:nth-child(1) { width: 140px; }
/* 2) Núm. Empleado evaluador */
th:nth-child(2), td:nth-child(2) { width: 230px; }

/* 3) EC05 */
th:nth-child(3), td:nth-child(3) { width: 150px; }
/* 4) EC06 */
th:nth-child(4), td:nth-child(4) { width: 150px; }
/* 5) EC07 */
th:nth-child(5), td:nth-child(5) { width: 150px; }
/* 6) EC08 (texto más largo) */
th:nth-child(6), td:nth-child(6) { width: 190px; }
/* 7) EC09 */
th:nth-child(7), td:nth-child(7) { width: 150px; }
/* 8) EC10 */
th:nth-child(8), td:nth-child(8) { width: 150px; }
/* 9) EC11 */
th:nth-child(9), td:nth-child(9) { width: 150px; }
/* 10) EC12 */
th:nth-child(10), td:nth-child(10) { width: 150px; }
/* 11) EC13 */
th:nth-child(11), td:nth-child(11) { width: 150px; }
/* 12) EC14 (texto largo) */
th:nth-child(12), td:nth-child(12) { width: 150px; }
/* 13) EC15 (texto más largo) */
th:nth-child(13), td:nth-child(13) { width: 150px; }
/* 14) EC16 */
th:nth-child(14), td:nth-child(14) { width: 150px; }
/* 15) EC17 */
th:nth-child(15), td:nth-child(15) { width: 150px; }

/* 16) Acción */
th:nth-child(16), td:nth-child(16) { width: 80px; }

/* Inputs y selects */
input[type="date"],
input[type="text"],
input[type="number"],
select {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

input:focus,
select:focus {
  border-color: #8CBDEE;
  outline: none;
}

/* Botones generales */
button {
  background-color: #071E61;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  margin-right: 10px;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #8CBDEE;
}

/* 🔴 Botón eliminar fila */
.btn-eliminar {
  background: transparent !important;
  border: none;
  cursor: pointer;
  font-size: 20px;
  padding: 6px;
  line-height: 1;
  color: #C62828;
  position: relative;
  z-index: 20;
  pointer-events: auto;
}

.btn-eliminar:hover {
  color: #B71C1C;
  transform: scale(1.15);
}

.btn-eliminar:focus {
  outline: none;
}

/* Hover filas */
tbody tr:hover td {
  background-color: #f8fbff;
}
tbody tr:hover td:last-child {
  background-color: #fdecea;
}

/* Responsive */
@media (max-width: 768px) {
  form {
    padding: 15px;
    max-height: 75vh;
  }

  table {
    min-width: 1850px; /* reduce, pero mantiene scroll horizontal */
  }

  th,
  td {
    padding: 6px 8px;
    font-size: 11px;
  }

  button {
    width: 100%;
    margin-bottom: 10px;
  }
}

@media (max-width: 480px) {
  table {
    min-width: 1500px;
  }
}

/* Header */
.header {
  display: flex;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 2px solid #071E61;
  margin-bottom: 30px;
}

.logo {
  max-height: 60px;
  width: auto;
  margin-right: 20px;
}
