.sin-logs {
  text-align: center;
  padding: 20px;
  color: #777;
}

.filtros-logs {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 25px;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
}

.select-filtro {
  display: flex;
  flex-direction: column;
  min-width: 180px;
}

.select-filtro span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #777;
}

.select-filtro select {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background-color: #fafafa;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.select-filtro select:focus {
  outline: none;
  border-color: #111;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

.btn-limpiar {
  height: 36px;
  align-self: flex-end;
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 0 16px;
  border-radius: 6px;
  cursor: pointer;
  margin: 0 auto;
  transition: background 0.2s ease;
}

.btn-limpiar:hover {
  background-color: #c82333;
}

.fecha {
  font-weight: 600;
}

.hora {
  font-size: 12px;
  color: #666;
}


#tabla-logs {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

#tabla-logs thead {
  background-color: #111;
  color: white;
}

#tabla-logs th,
#tabla-logs td {
  padding: 12px 14px;
  text-align: left;
}

#tabla-logs tbody tr {
  border-bottom: 1px solid #eee;
  transition: background 0.2s ease;
}

/* Zebra suave */
#tabla-logs tbody tr:nth-child(even) {
  background: #fafafa;
}

#tabla-logs tbody tr:hover {
  background-color: #424B5D;
  transition: 0.2s ease;
}

/* Última fila sin borde */
#tabla-logs tbody tr:last-child td {
  border-bottom: none;
}

/* ===== Badges acción ===== */
.badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-estado {
  background: #D42233;
  color: #ffffff;
}

.badge-rango {
  background: #030F27;
  color: #ffffff;
}

.badge-crear { background: #d4edda; color: #155724; }
.badge-editar { background: #fff3cd; color: #856404; }
.badge-deshabilitar { background: #f8d7da; color: #721c24; }
.badge-cerrado { background: #d4edda; color: #155724; }
.badge-respondido { background: #fff3cd; color: #856404; }
.badge-pendiente { background: #f8d7da; color: #721c24; }


/* ===== Valores ===== */
.valor-anterior {
  background-color: #fdecea;
  color: #c0392b;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.valor-anterior,
.valor-nuevo {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.valor-nuevo {
  background-color: #eafaf1;
  color: #27ae60;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.admin-badge {
  background-color: #eef2ff;
  color: #4338ca;
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-block;
}

.usuario-badge {
  background-color: #f1f5f9;
  color: #334155;
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.85rem;
  display: inline-block;
}

#paginacion {
  margin-top: 20px;
  text-align: center;
}

#paginacion button {
  margin: 0 5px;
  padding: 6px 12px;
  border: none;
  background-color: #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
}

#paginacion button:hover {
  background-color: #cbd5e1;
}

#paginacion .active-page {
  background-color: #2563eb;
  color: white;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding-top: 80px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
  background: rgba(3, 15, 39, 0.75);
  display: flex;
  justify-content: center;
  align-items: flex-start;   /* 🔥 cambio clave */
  padding: 40px 20px;
  backdrop-filter: blur(4px);
}


.modal.hidden {
  display: none;
}

.modal-content {
  background: #FFFFFF;
  width: 720px;
  max-width: 95%;
  border-radius: 14px;
  overflow: hidden;
  animation: aparecer 0.2s ease;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* HEADER */
.modal-header {
  background: #030F27;
  color: #FFFFFF;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.5px;
}

.badge-accion {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

/* BODY */
.modal-body {
  padding: 25px;
  overflow-y: auto;   /* 🔥 scroll interno */
  flex: 1;            /* 🔥 ocupa espacio disponible */
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #424B5D;
  border-radius: 4px;
}

body.modal-open {
  overflow: hidden;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 30px;
  margin-bottom: 25px;
}

.info-item {
  font-size: 14px;
  white-space: pre-line;
}

.info-item strong {
  display: block;
  font-size: 12px;
  color: #424B5D;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.mensaje-box {
  white-space: pre-line;
  background: #f4f6f8;
  padding: 16px;
  border-radius: 10px;
  line-height: 1.6;
  font-size: 0.95rem;
  border: 1px solid #e0e3e7;
  max-height: 250px;
  overflow-y: auto;
}

.mensaje-box::-webkit-scrollbar {
  width: 6px;
}

.asunto-box {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ddd;
}

.cambio-box {
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  background: #F9F9F9;
}

.cambio-box h4 {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: #424B5D;
  text-transform: uppercase;
}

.valor-completo {
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #030F27;
}

/* FOOTER */
.modal-footer {
  padding: 15px 25px;
  background: #F4F4F4;
  font-size: 12px;
  color: #424B5D;
  display: flex;
  justify-content: space-between;
}

.cerrar-modal {
  position: absolute;
  top: 15px;
  right: 18px;
  background: none;
  border: none;
  font-size: 18px;
  color: white;
  cursor: pointer;
}

@keyframes aparecer {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.respuesta-admin {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.respuesta-admin textarea {
  width: 100%;
  min-height: 120px;
  margin: 10px 0 15px 0;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  resize: vertical;
}

.boton-enviar-respuesta {
  padding: 10px 16px;
  background-color: #1a237e;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

.boton-enviar-respuesta:hover {
  background-color: #0f1a60;
}

.respuesta-guardada {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.respuesta-box {
  background: #f8f9fb;
}