body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  background: #f4f6f9;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header {
  background-color: #007DB7;
  color: white;
  width: 100%;
  text-align: center;
}

main {
  margin-top: 2rem;
  width: 95%;
  max-width: 1200px;
  text-align: center;
}

.btn {
  display: block;
  margin: 1rem auto;
  padding: 1rem;
  width: 80%;
  max-width: 300px;
  font-size: 1.2rem;
  text-decoration: none;
  background-color: #007DB7;
  color: white;
  border-radius: 8px;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #005f8e;
}

.container {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card {
  background-color: white;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: none;
  text-align: center;
}

.navigation {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn.secondary {
  background-color: #cccccc;
  color: black;
}

#status {
  margin-top: 1rem;
  font-weight: bold;
}

.scroll-table {
  max-height: 400px;
  overflow-y: auto;
  margin-top: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  padding: 1rem;
}

.scroll-table table {
  width: 100%;
  border-collapse: collapse;
}

.scroll-table th,
.scroll-table td {
  border-bottom: 1px solid #eee;
  padding: 0.5rem;
  text-align: left;
}

.scroll-table tr:hover {
  background-color: #f0f8ff;
}

.input-file-wrapper {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.input-file-wrapper input {
  width: 70%;
}

.status {
  font-size: 0.9rem;
  color: #555;
}

.table-header {
  font-weight: bold;
  background-color: #f9f9f9;
  padding: 0.5rem;
  border-bottom: 2px solid #ccc;
  text-align: left;
}

.table-cell {
  padding: 0.5rem;
  border-bottom: 1px solid #eee;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.navigation-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.btn.small {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  width: auto;
  max-width: none;
  margin: 0;
  margin-right: 5px;
}

.selector-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  margin: 0px 83px 0px 83px;
}

.selector-container label {
  font-weight: bold;
}

.selector-custom {
  height: 31px;
}


/* TABULATOR GLOBAL */
.tabulator {
  font-family: 'Segoe UI', sans-serif;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: white;
  overflow-x: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ENCABEZADO */
.tabulator .tabulator-header {
  background-color: #007DB7 !important;
  color: white !important;
  font-weight: bold;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}


.tabulator .tabulator-header input {
  padding: 4px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.85rem;
  width: 95%;
  box-sizing: border-box;
}

.tabulator .tabulator-header .tabulator-col {
  background-color: #007DB7 !important;
  color: white !important;
  border-right: 1px solid #005f8e !important;
}

/* TITULO COLUMNA (evita corte de texto) */
.tabulator-col-title {
  white-space: normal !important;
}

/* CELDAS */
.tabulator .tabulator-cell {
  padding: 8px;
  font-size: 0.95rem;
  border-bottom: 1px solid #e0e0e0;
}

/* FILAS INTERCALADAS */
.tabulator .tabulator-row:nth-child(even) {
  background-color: #f9fbfd;
}

.tabulator .tabulator-row:nth-child(odd) {
  background-color: #ffffff;
}

/* HOVER */
.tabulator .tabulator-row:hover {
  background-color: #e6f7ff;
  transition: background-color 0.2s ease;
}

/* FOOTER / PAGINADOR */
.tabulator .tabulator-footer {
  background-color: #f4f6f9;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  padding: 8px;
}

/* ENVOLTURA EXTERNA EN CASO DE USARLA */
#tablaResultados {
  overflow-x: auto;
}

/* Panel general */
.column-panel {
  background: #f9fbfd;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem auto 1rem auto;
  width: 100%;
  max-width: 1000px;
  font-size: 0.9rem;
  text-align: left;
}

/* Contenedor de los checkboxes */
.column-checkboxes {
  display: grid;
  grid-template-rows: repeat(2, auto);
  grid-auto-flow: column;
  gap: 5px 10px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #f9f9f9;
}

/* Etiquetas con checkbox */
.column-checkboxes label {
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  white-space: nowrap;
  gap: 0.4rem;
  cursor: pointer;
}

/* Separación visual */
.column-checkboxes input[type="checkbox"] {
  margin-right: 6px;
}

#timer-container {
  position: fixed;
  bottom: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-family: monospace;
  z-index: 9999;
  pointer-events: none;
  /* evita que interfiera con clics */
}

#selectorOpcional {
  padding: 0.6rem;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  margin-right: 10px;
  background-color: white;
  color: #333;
  cursor: pointer;
  max-width: 300px;
}

.btn.agregar-opcional {
  background-color: #28a745;
  color: white;
  font-weight: bold;
}

.btn.agregar-opcional:hover {
  background-color: #218838;
}

.input-file-wrapper {
  background-color: #f9fbfd;
  padding: 0.5rem 1rem;
  border-left: 3px solid #007DB7;
  border-radius: 6px;
}

.btn.eliminar-opcional {
  background-color: #dc3545;
  color: white;
  font-size: 0.75rem;
  padding: 0.4rem 0.6rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn.eliminar-opcional:hover {
  background-color: #bd2130;
}


.spin {
  animation: spin 1s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.diccionarios-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.diccionario-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed #ccc;
  padding: 0.5rem 0;
}

.estado-subida {
  margin-left: 1rem;
  font-size: 0.9rem;
}
