body {
  font-family: Arial;
  background-color: #f2f2f2;
  margin: 0;
  padding: 20px;
}

nav {
  background: #0033a0;
  display: flex;
  align-items: center;
  padding: 1rem 3rem;
}

nav h1 {
  flex: auto;
  color: white;
  font-size: 32px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #0033a0;
}

label {
  font-size: 16px;
  font-weight: 500;
}

input[type="text"],
input[type="password"],
select {
  width: 80%;
  display: block;
  padding: 10px;
  font-size: 14px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  outline: none;
  transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
  border-color: #0033a0;
  box-shadow: 0 0 5px rgba(0, 51, 160, 0.5);
}

button {
  padding: 10px 15px;
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 16px;
  color: #fff;
  background-color: #00aec7;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition:
    transform 0.2s,
    background-color 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:hover {
  background-color: #002080;
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.secondary-button {
  background-color: #768692;
}

.icon-button {
  all: unset; /* quitar estilos por defecto */
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-button:hover,
.icon-button:focus,
.icon-button:focus-visible,
.icon-button:active {
  outline: none;
  box-shadow: none;
  background: transparent;
}

.icon-button:disabled {
  cursor: not-allowed;
}

.form-section {
  background-color: #f9f9f9;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
}

h2 {
  margin-top: 0px;
}

#log {
  height: 20vh;
  overflow-y: scroll;
  background-color: #1e1e1e;
  color: #d4d4d4;
  padding: 10px;
  font-family: monospace;
  white-space: pre-wrap;
  border-radius: 10px;
}

#log span {
  display: flex;
}

#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 3000;
}

.toast {
  padding: 12px 20px;
  border-radius: 5px;
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  font-weight: bold;
  color: white;
}

.toast-success {
  background-color: #28a745;
}

.toast-error {
  background-color: #dc3545;
}

.toast-warning {
  background-color: #ffc107;
  color: black;
}

.toast-info {
  background-color: #17a2b8;
}

.toast.hide {
  opacity: 0;
}

.input-group {
  margin-top: 15px;
  margin-bottom: 15px;
}

input[type="file"] {
  display: block;
  padding: 5px;
  font-size: 14px;
  margin-bottom: 10px;
}

/* CHECKBOXES */

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  cursor: pointer;
}

/* TABLAS */

table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 10px;
}

th,
td {
  border: 1px solid #e0e0e0;
  padding: 10px;
  text-align: center;
  vertical-align: center;
}

table thead th {
  background-color: #e9effa;
  color: #0033a0;
  position: sticky;
  top: 0;
  z-index: 2;
}

table tbody tr:nth-child(even) {
  background-color: #fafbfe;
}

table tbody tr:hover {
  background-color: #eef3ff;
}

.boton-descargar,
.boton-eliminar,
#tablaAnalisisDisponibles tr:hover {
  cursor: pointer;
}

/* MODAL */

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.45); /* fondo semi-transparente */
  backdrop-filter: blur(3px);
  padding-top: 60px;
}

.modal-content {
  background-color: #fff;
  margin: auto;
  padding: 25px 30px;
  border: 1px solid #ccc;
  width: 40%;
  min-width: 350px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  animation: modalSlideDown 0.3s ease;
}

.modal .input-group {
  margin-bottom: 15px;
}

.modal-buttons {
  margin-top: 15px;
}

.modal button {
  width: 100%;
  margin-top: 5px;
}

@keyframes modalSlideDown {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0px);
    opacity: 1;
  }
}

/* === Collapsible sections === */

.collapsible .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.collapsible .section-header:hover {
  color: #17a2b8;
}

.section-toggle {
  font-size: 18px;
  transition: transform 0.2s ease;
}

/* Collapsed state */
.collapsible:not(.open) .section-content {
  display: none;
}

.collapsible:not(.open) {
  opacity: 0.6;
  padding-bottom: 10px;
}

/* DATOS ANALISIS */

.datos-analisis {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 20px;
  margin: 0;
}

.datos-analisis dt {
  color: #0033a0;
  font-weight: 600;
  font-size: 14px;
}

.datos-analisis dd {
  margin: 0;
  font-size: 14px;
  color: #333;
}
