/* Checklist page */
.checklist-page {
  position: relative;
  justify-content: flex-start;
  padding: 2rem 2.5rem 3rem;
}

.checklist-page .header {
  width: 100%;
  max-width: 1400px;
  margin-bottom: 1.5rem;
  padding-top: 2.5rem;
  margin-left: auto;
  margin-right: auto;
}

.back-link {
  position: fixed;
  left: 1.5rem;
  top: 1.5rem;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: #8b8a87;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  z-index: 10;
}

.back-link:hover {
  color: #f4c23b;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(244, 194, 59, 0.3);
}

.checklist-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.filter-label {
  font-size: 0.9rem;
  color: #8b8a87;
  font-weight: 500;
}

.continent-select {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  color: #e8e6e3;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  cursor: pointer;
}

.continent-select:focus {
  outline: none;
  border-color: rgba(244, 194, 59, 0.4);
}

.continent-select option {
  background: #1a1a25;
  color: #e8e6e3;
}

.search-input {
  flex: 1;
  min-width: 200px;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  color: #e8e6e3;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.search-input::placeholder {
  color: #6b6a67;
}

.search-input:focus {
  outline: none;
  border-color: rgba(244, 194, 59, 0.4);
}

.checklist-main {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

.checklist-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.checklist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.checklist-table th,
.checklist-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.checklist-table th {
  font-weight: 600;
  color: #8b8a87;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
}

.checklist-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}

.checklist-table th.sortable:hover {
  color: #f4c23b;
}

.checklist-table th.sortable .sort-icon {
  opacity: 0.4;
  margin-left: 0.25rem;
  font-size: 0.7em;
}

.checklist-table th.sortable.sorted-asc .sort-icon::before {
  content: '▲';
}

.checklist-table th.sortable.sorted-desc .sort-icon::before {
  content: '▼';
}

.checklist-table th.sortable.sorted-asc .sort-icon,
.checklist-table th.sortable.sorted-desc .sort-icon {
  opacity: 1;
  color: #f4c23b;
}

.checklist-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.checklist-table td {
  color: #e8e6e3;
  vertical-align: top;
}

.checklist-table td:first-child {
  font-weight: 500;
  color: #e8e6e3;
}

.checklist-table td:nth-child(2) {
  color: #8b8a87;
  font-size: 0.9em;
}

.checklist-table td:nth-child(3) {
  color: #b8b6b3;
}

.checklist-table td:nth-child(4) {
  color: #6b6a67;
  font-size: 0.9em;
  font-style: italic;
}

.checklist-count {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #8b8a87;
  text-align: center;
}

/* Responsive: tablet and below */
@media (max-width: 768px) {
  .checklist-page {
    padding: 1.5rem 1rem 2rem;
  }

  .checklist-page .header {
    padding-top: 3rem;
  }

  .checklist-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .search-input {
    min-width: 0;
  }

  .checklist-table th,
  .checklist-table td {
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
  }

  .checklist-table th {
    font-size: 0.75rem;
  }

  .back-link {
    left: 0.75rem;
    top: 0.75rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
  }
}

/* Responsive: small mobile */
@media (max-width: 480px) {
  .checklist-page {
    padding: 1rem 0.75rem 1.5rem;
  }

  .checklist-table th,
  .checklist-table td {
    padding: 0.5rem 0.5rem;
    font-size: 0.85rem;
  }

  .continent-select,
  .search-input {
    font-size: 0.9rem;
  }
}
