/* ----------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Página de fondo */
body {
  background: var(--bg-page);
  color: var(--text-color);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

/* ----------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* ----- Formulario de incidencias ----- */
#is-form {
  width: 90%;
  display: flex;
  flex-direction: column;
  margin: 2rem auto;
  padding: 2rem;
  background: #fff;
  border: 1px solid #e1e1e5;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

#seccion3 {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

#seccionEnviar {}
#is-form p {
  margin-bottom: 1.25rem;
}

#btnEnviarReporte {
  border: none;
  padding: 0.9rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7c72, #ff5f5f 60%, #ff8c42 100%);
  color: #fff;
  box-shadow: 0 20px 35px rgba(255, 124, 114, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#btnEnviarReporte:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 45px rgba(255, 124, 114, 0.45);
}

#btnEnviarReporte:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

/* Respuesta obtenida al finalizar el envio del formulario de incidencias */

#is-response {
  margin-top: 1.5rem;
  font-weight: 600;
  text-align: center;
}
/* ----------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* ----- Badges de estado globales ----- */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 0.5rem;
  text-transform: uppercase;
  color: #fff;
  margin-left: 0.5rem;
}

/* Estado “Nuevo” – azul */
.status-nuevo {
  background-color: #0073aa;
}

/* Estado “En progreso” – naranja */
.status-en_progreso {
  background-color: #ff8c42;
}

/* Estado “Pendiente” – amarillo oscuro */
.status-pendiente {
  background-color: #ffb400;
  color: #333;
}

/* Estado “Resuelto” – verde */
.status-resuelto {
  background-color: #28a745;
}

/* Badges de urgencia */
.status-urgent_high {
  background: #e02f44;
}

.status-urgent_medium {
  background: #ff8c42;
}

.status-urgent_low {
  background: #1e90ff;
}

.status-resolved {
  background: #28a745;
}

/* ----- Listado “Mis incidencias” en tarjeta ----- */
.mis-incidencias {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(180deg, #fdfefe 0%, #f4f7fb 80%);
  border-radius: 28px;
  border: 1px solid rgba(15, 34, 64, 0.08);
  box-shadow: 0 35px 70px rgba(15, 34, 64, 0.12);
  position: relative;
}

.mis-incidencias :is(input, button) {
  font-family: inherit;
}

.mis-incidencias #searchIncidencias {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(15, 34, 64, 0.12);
  margin-bottom: 1.5rem;
  background: #fff;
  box-shadow: inset 0 1px 3px rgba(15, 34, 64, 0.08);
}

/* ----- Tabla “Mis incidencias” ----- */
.tabla-incidencias {
  border-collapse: collapse;
  width: 100%;
}

.tabla-incidencias thead {
  display: none;
}

.tabla-incidencias tbody {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tabla-incidencias tbody tr {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(15, 34, 64, 0.08);
  box-shadow: 0 16px 32px rgba(15, 34, 64, 0.08);
  align-items: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tabla-incidencias tbody tr:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 45px rgba(15, 34, 64, 0.12);
}

.tabla-incidencias td {
  padding: 0;
  background: transparent;
  border: none;
  font-weight: 600;
  color: #0f1c2f;
}

.tabla-incidencias td::before {
  content: attr(data-label);
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #93a2bb;
  margin-bottom: 0.3rem;
}

.tabla-incidencias td:last-child {
  display: flex;
  justify-content: flex-end;
}

/* ----- Detalle dentro de la misma vista ----- */
.is-detalle-incidencia {
  margin: 2rem auto 0;
  padding: 2rem;
  background: #0c1c2f;
  color: #fff;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(6, 19, 40, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
  max-width: 1000px;
}

.is-detalle-incidencia:before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.25), transparent 40%);
  pointer-events: none;
}

.is-detalle-incidencia h2,
.is-detalle-incidencia h3,
.is-detalle-incidencia h4 {
  color: #f5f8ff;
}

.is-detalle-incidencia .seccionSuperiorRow {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.is-detalle-incidencia .seccionSuperiorCol {
  flex: 1;
  min-width: 220px;
}

.is-detalle-incidencia .comments-area {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.is-detalle-incidencia .comment-list li.comment {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: none;
}

.is-detalle-incidencia .comment-list li.comment.bypostauthor {
  border-left: 4px solid #25b6f4;
}

.is-detalle-incidencia .comment-list li.comment.byuser {
  border-left: 4px solid #ffb400;
}

.is-detalle-incidencia .comments-area.comment-reply {
  background: rgba(255, 255, 255, 0.06);
}

.is-detalle-incidencia .incidencia-archivo {
  margin-top: 1.5rem;
}

.is-detalle-incidencia .incidencia-archivo img {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  object-fit: cover;
  max-height: 420px;
}

.is-detalle-incidencia .button {
  background: #25b6f4;
  color: #0a1b2f;
  border: none;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.is-detalle-incidencia .button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(37, 182, 244, 0.35);
}

.is-detalle-incidencia .status-badge {
  background: linear-gradient(135deg, #ffb400, #ff6a00);
  color: #0c1c2f;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

.is-detalle-incidencia .is-error {
  color: #ffb400;
  font-weight: 600;
}

/* ----- Tabla “Mis incidencias” como cards ----- */
.tabla-incidencias {
  border-collapse: collapse;
  width: 100%;
}

.tabla-incidencias thead {
  display: none;
}

.tabla-incidencias tbody {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tabla-incidencias tbody tr {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(19, 35, 78, 0.09);
  box-shadow: 0 18px 35px rgba(19, 35, 78, 0.08);
  align-items: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tabla-incidencias tbody tr:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 45px rgba(19, 35, 78, 0.18);
}

.tabla-incidencias td {
  padding: 0;
  background: transparent;
  border: none;
  font-size: 1rem;
  color: #1f2c3e;
  font-weight: 600;
  position: relative;
  min-height: 52px;
}

.tabla-incidencias td::before {
  content: attr(data-label);
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8fa4c0;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.tabla-incidencias td:last-child {
  display: flex;
  justify-content: flex-end;
}
/* ----------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* ----- Conversación ----- */
.comments-area {
  margin: 2%;
  padding: 1.5rem;
  background: #fafafa;
  border-radius: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.comments-area .comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comments-area .comment-list li.comment {
  background: #fff;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  transition: background 0.3s;
}

.comments-area .comment-list li.comment.bypostauthor {
  background: #e8f5e9;
  align-items: flex-start;
}

.comments-area .comment-list li.comment.byuser {
  background: #e3f2fd;
  align-items: flex-end;
}

.comments-area .comment-meta {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.comments-area .comment-content {
  font-size: 1rem;
  line-height: 1.6;
}

.comments-area .comment-form {
  margin-top: 2rem;
  background: #fff;
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.comments-area .comment-form label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.comments-area .comment-form textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  resize: vertical;
}

.comments-area .comment-form .form-submit input {
  padding: 0.75rem 1.5rem;
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s;
}

.comments-area .comment-form .form-submit input:hover {
  background: #005177;
}

/* ----- Utilidades de sección ----- */
.seccionSuperior {
  display: flex;
  flex-direction: column;
}

.seccionSuperiorRow {
  display: flex;
  flex-direction: row;
  align-items: center;
  align-content: center;
}
/* ----------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* ----- Responsive unificado ----- */
@media (max-width: 600px) {
  #is-form {
    padding: 1.5rem;
    margin: 1rem auto;
  }
  #is-form button {
    width: 100%;
  }
  .mis-incidencias {
    grid-template-columns: 1fr;
  }
  .mis-incidencias li {
    padding: 1rem;
  }
  .comments-area .comment-list li.comment {
    flex-direction: column;
  }
}
