/* Reset y estilo base */
* {
  margin: 0; 
  padding: 0; 
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #121212;
  color: #eee;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.container {
  background-color: #1E1E1E;
  max-width: 900px;
  width: 100%;
  border-radius: 12px;
  padding: 30px 40px;
  box-shadow: 0 0 25px rgba(25, 118, 210, 0.7);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.screen.active {
  display: flex;
}

h1 {
  color: #EF5350;
  margin-bottom: 25px;
  font-size: 2.8rem;
  text-shadow: 0 0 6px #EF5350AA;
}

h2 {
  color: #42A5F5;
  margin-bottom: 20px;
  font-size: 2rem;
  text-shadow: 0 0 5px #42A5F5AA;
}

.btn {
  background-color: #42A5F5;
  color: #eee;
  border: none;
  padding: 14px 36px;
  font-size: 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  margin: 12px 20px;
  transition: background-color 0.3s, box-shadow 0.3s;
  box-shadow: 0 3px 8px rgba(66, 165, 245, 0.8);
  user-select: none;
}

.btn:hover, 
.btn:focus {
  background-color: #EF5350;
  box-shadow: 0 6px 15px rgba(239, 83, 80, 0.85);
  outline: none;
}

.menu-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  width: 100%;
  max-width: 500px;
}

.menu-btn {
  flex: 1 1 40%;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: transform 0.2s;
}

.menu-btn:hover {
  transform: scale(1.05);
}

/* Barra superior en contenido */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  width: 100%;
  gap: 10px;
  flex-wrap: wrap;
}

.back-btn {
  background-color: #EF5350;
  box-shadow: 0 3px 8px rgba(239, 83, 80, 0.85);
  flex-shrink: 0;
  min-width: 150px;
  font-weight: 700;
}

.back-btn:hover {
  background-color: #42A5F5;
  box-shadow: 0 6px 15px rgba(66, 165, 245, 0.9);
}

.content-screen.hide-search .search-controls {
  display: none;
}

.search-controls {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  flex: 1 1 auto;
}

.search-controls input {
  padding: 12px 18px;
  font-size: 1.05rem;
  border-radius: 8px;
  border: none;
  width: 220px;
  outline: none;
  box-shadow: 0 0 14px #42A5F5;
  background-color: #292929;
  color: #eee;
  transition: box-shadow 0.3s;
  user-select: text;
}

.search-controls input::placeholder {
  color: #bbb;
  font-style: italic;
}

.search-controls input:focus {
  box-shadow: 0 0 18px #EF5350;
}

/* Tabla estilizada */
table {
  width: 100%;
  border-collapse: collapse;
  box-shadow: 0 0 20px rgba(66, 165, 245, 0.6);
  border-radius: 10px;
  overflow: hidden;
  background-color: #222;
  user-select: none;
}

thead {
  background-color: #42A5F5;
  box-shadow: inset 0 -3px 8px rgba(21,101,192,0.6);
}

thead th {
  padding: 16px 14px;
  color: #eee;
  font-weight: 700;
  text-align: left;
  border-bottom: 3px solid #EF5350;
  letter-spacing: 0.03em;
  user-select: none;
}

tbody tr {
  background-color: #292929;
  cursor: pointer;
  transition: background-color 0.25s;
}

tbody tr:hover {
  background-color: #3C97F5;
  color: #fff;
  font-weight: 600;
}

tbody td {
  padding: 14px 14px;
  border-bottom: 1px solid #444;
  color: #ddd;
  user-select: none;
}

/* Modal estilos */

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.88);
  justify-content: center;
  align-items: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: #1E1E1E;
  padding: 30px 40px;
  border-radius: 16px;
  max-width: 520px;
  width: 90%;
  box-shadow: 0 0 25px #42A5F5;
  color: #eee;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
  text-align: left;
  user-select: text;
}

.modal-close {
  position: absolute;
  right: 18px;
  top: 12px;
  font-size: 2rem;
  color: #EF5350;
  cursor: pointer;
  font-weight: bold;
  user-select: none;
  transition: color 0.25s;
}

.modal-close:hover {
  color: #42A5F5;
}

.modal-content h3 {
  margin-bottom: 12px;
  color: #EF5350;
  text-shadow: 0 0 8px #EF5350AA;
}

.modal-content h4 {
  margin-top: 24px;
  margin-bottom: 10px;
  border-bottom: 2px solid #EF5350;
  padding-bottom: 6px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.modal-content p {
  margin-bottom: 10px;
  line-height: 1.4;
  font-size: 1rem;
}

.modal-content a {
  color: #42A5F5;
  text-decoration: none;
}

.modal-content a:hover {
  text-decoration: underline;
}

#modal-notas {
  margin-top: 10px;
  list-style-type: disc;
  padding-left: 24px;
  color: #EF5350;
  font-weight: 600;
}

#modal-responsables .responsable-item {
  margin-bottom: 18px; 
  padding-bottom: 12px;
  border-bottom: 1px dashed #555; 
  font-size: 0.95rem;
  line-height: 1.3;
}

#modal-responsables .responsable-item:last-child {
  border-bottom: none; 
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Responsive */
@media (max-width: 650px) {
  .menu-buttons {
    flex-direction: column;
    gap: 18px;
  }
  
  .menu-btn {
    flex: 1 1 100%;
  }

  .search-controls input {
    width: 100%;
  }

  .top-bar {
    flex-direction: column;
    gap: 15px;
  }

  .back-btn {
    width: 100%;
    min-width: unset;
  }
}
