/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

/* Navigation */
.main-nav {
  background: #2c3e50;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1rem;
}

.nav-btn {
  background: transparent;
  border: 2px solid transparent;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.nav-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.3);
}

.nav-btn.active {
  background: #3498db;
  border-color: #3498db;
}

/* Navigation Dropdown */
.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 200px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: none;
  color: #333;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-decoration: none;
}

.dropdown-item:hover {
  background: #f8f9fa;
}

.dropdown-item.active {
  background: #3498db;
  color: white;
}

.dropdown-divider {
  height: 1px;
  background: #e9ecef;
  margin: 0.5rem 0;
}

/* Export Modal */
.export-modal-large {
  max-width: 800px;
  width: 90vw;
}

.export-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.export-section {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.export-section-title {
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  padding: 1rem 1.5rem;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.export-options {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

.export-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f1f3f4;
  background: #fff;
  transition: all 0.2s ease;
}

.export-option:last-child {
  border-bottom: none;
}

.export-option:hover {
  background: #f8f9fa;
}

.export-option-info {
  flex: 1;
}

.export-option-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.export-icon {
  font-size: 1.1rem;
}

.export-option-description {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Responsive Export Modal */
@media (max-width: 768px) {
  .export-modal-large {
    width: 95vw;
    max-width: none;
  }
  
  .export-sections {
    gap: 1.5rem;
  }
  
  .export-section-title {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
  
  .export-option {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
  }
  
  .export-option-info {
    width: 100%;
  }
  
  .export-option .btn {
    align-self: stretch;
    justify-content: center;
  }
}



/* Page Management */
.page {
  display: none;
  padding: 1rem;
  max-width: 95vw;
  margin: 0 auto;
}

.page.active {
  display: block;
}

.page-header {
  margin-bottom: 2rem;
  text-align: center;
}

.page-header h1 {
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: #666;
  font-size: 1.1rem;
}

/* Setup Forms */
.setup-form {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #2c3e50;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #3498db;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: #3498db;
  color: white;
}

.btn-primary:hover {
  background: #2980b9;
}

.btn-secondary {
  background: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background: #7f8c8d;
}

.btn-danger {
  background: #e74c3c;
  color: white;
}

.btn-danger:hover {
  background: #c0392b;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn-tiny {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  min-width: 32px;
  text-align: center;
}

/* Print Status Icon Buttons */
.print-status-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #ddd;
  background: #f8f9fa;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.print-status-icon.printed {
  background: #27ae60;
  color: white;
  border-color: #27ae60;
}

.print-status-icon.printed:hover {
  background: #229954;
  border-color: #229954;
  transform: scale(1.1);
}

.print-status-icon.unprinted {
  background: #f8f9fa;
  color: #6c757d;
  border-color: #dee2e6;
}

.print-status-icon.unprinted:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  transform: scale(1.1);
}

/* Aid Stations Setup */
.default-stations,
.custom-stations {
  margin-bottom: 2rem;
}

.default-stations h3,
.custom-stations h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
}

.station-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.station-item {
  background: #ecf0f1;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.station-item.default {
  background: #3498db;
  color: white;
}

.station-item .remove-btn {
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-station-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.add-station-form input {
  flex: 1;
}

/* Courses Setup */
.courses-list {
  margin-bottom: 2rem;
}

.add-course-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.add-course-form input {
  flex: 1;
}

.course-item {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.course-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.course-name {
  font-size: 1.2rem;
  font-weight: bold;
  color: #2c3e50;
}

.remove-course-btn {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}

.course-stations {
  margin-top: 1rem;
}

.course-stations h4 {
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.station-sequence {
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  min-height: 100px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.station-sequence-item {
  background: #e3f2fd;
  border: 1px solid #2196f3;
  border-radius: 4px;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.station-info {
  flex: 1;
}

.station-info strong {
  display: block;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.station-distance-edit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.distance-input-inline {
  width: 80px;
  padding: 0.25rem 0.5rem;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 0.9rem;
}

.distance-input-inline:disabled {
  background: #f8f9fa;
  color: #666;
  cursor: not-allowed;
}

.total-distance {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  color: #2c3e50;
}

.total-distance label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.total-distance input {
  width: 80px;
  margin: 0;
}

.distance-help {
  color: #666;
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 0.25rem;
}

.station-actions {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.btn-insert {
  background: #17a2b8;
  color: white;
  border: none;
  border-radius: 3px;
  padding: 0.25rem 0.4rem;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background-color 0.2s ease;
}

.btn-insert:hover {
  background: #138496;
}

.btn-remove {
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 3px;
  padding: 0.25rem 0.4rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

.btn-remove:hover {
  background: #c0392b;
}

.station-distance {
  font-size: 0.8rem;
  color: #666;
}

.add-station-to-course {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.add-station-to-course select {
  flex: 1;
}

/* Race Tracker Styles (multi-course layout) */
.header-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.kanban-board {
  padding: 1rem 0;
}

/* Course Swimlanes */
.course-swimlane {
  background: white;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  margin-bottom: 1rem;
  overflow: hidden;
}

.course-swimlane-header {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.course-swimlane-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
}

.course-stats {
  font-size: 0.9rem;
  opacity: 0.9;
}

.course-stations {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  overflow-x: auto;
  min-height: 180px;
}

/* Shared Stations */
.shared-stations {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
  overflow: hidden;
}

.shared-stations-header {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.shared-stations-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.shared-stats {
  font-size: 0.9rem;
  opacity: 0.9;
}

.shared-stations-row {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  justify-content: center;
}

/* Column Styles */
.column {
  background: #f8f9fa;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  min-width: 180px;
  max-width: 250px;
  flex-shrink: 0;
  transition: all 0.2s ease;
  margin: 0.25rem;
}

.course-station {
  border: 2px solid transparent;
}

.shared-station {
  border: 2px solid transparent;
  min-width: 150px;
}

.column-header {
  background: #34495e;
  color: white;
  padding: 0.75rem;
  border-radius: 6px 6px 0 0;
  font-weight: bold;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.column-header:hover {
  background: #2c3e50;
}

.shared-station .column-header {
  background: #95a5a6;
}

.shared-station .column-header:hover {
  background: #7f8c8d;
}

/* Suspect Data station styling */
.column[data-station="suspect"] .column-header {
  background: #f39c12 !important;
  color: white;
}

.column[data-station="suspect"] .column-header:hover {
  background: #e67e22 !important;
}

.column[data-station="suspect"] {
  border: 2px solid #f39c12;
}

.column-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.add-icon {
  font-size: 1.2rem;
  font-weight: bold;
  opacity: 0.8;
}

.bulk-departure-btn {
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  transition: background-color 0.2s ease;
  opacity: 0.8;
}

.bulk-departure-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  opacity: 1;
}

.column-body {
  padding: 0.25rem;
  min-height: 120px;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  align-content: flex-start;
  max-height: 450px;
  overflow-y: auto;
}

.bib-card {
  background: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 2px;
  padding: 0.15rem 0.4rem;
  cursor: move;
  transition: all 0.1s ease;
  display: inline-block;
  min-width: 40px;
  max-width: 120px;
  min-height: 24px;
  text-align: center;
  font-weight: 600;
  font-size: 0.7rem;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  hyphens: auto;
  position: relative; /* Needed for absolute positioning of pace icons */
}

.bib-card:hover {
  border-color: #3498db;
  background: #e3f2fd;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bib-card.dragging {
  opacity: 0.6;
  transform: rotate(5deg);
}

/* Course-specific bib card colors */
.bib-card[class*="course-"] {
  border-left: 3px solid #3498db;
}

.bib-card.course-1 {
  border-left-color: #3498db; /* Blue */
  background: #f8fbff;
}

.bib-card.course-2 {
  border-left-color: #e74c3c; /* Red */
  background: #fff8f8;
}

.bib-card.course-3 {
  border-left-color: #2ecc71; /* Green */
  background: #f8fff8;
}

.bib-card.course-4 {
  border-left-color: #f39c12; /* Orange */
  background: #fffaf8;
}

.bib-card.course-5 {
  border-left-color: #9b59b6; /* Purple */
  background: #faf8ff;
}

.bib-card.course-6 {
  border-left-color: #1abc9c; /* Teal */
  background: #f8fffc;
}

/* Departed participant styling */
.bib-card.departed {
  background-color: #95a5a6 !important;
  color: #2c3e50;
  opacity: 0.8;
  font-style: italic;
}

.bib-card.departed:hover {
  background-color: #7f8c8d !important;
}

/* Participants Setup Styles */
.participants-management {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.add-participant-form {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 6px;
  border: 1px solid #dee2e6;
}

.add-participant-form h3 {
  margin-bottom: 1rem;
  color: #2c3e50;
}

.course-participants {
  margin-bottom: 2rem;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  overflow: hidden;
}

.course-participants-header {
  background: #3498db;
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.course-participants-header h4 {
  margin: 0;
  font-size: 1.1rem;
}

.course-bulk-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.course-bulk-actions label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.participants-table {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
}

.participants-table-header {
  background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
  color: white;
  display: grid;
  grid-template-columns: 40px 80px 150px 120px 1fr;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.participants-table-body {
  max-height: 500px;
  overflow-y: auto;
}

.participant-row {
  display: grid;
  grid-template-columns: 40px 80px 150px 120px 1fr;
  gap: 0.75rem;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid #f1f3f4;
  transition: background-color 0.2s ease;
  border-left: 3px solid #3498db;
  font-size: 0.9rem;
  align-items: center;
}

.participant-row:hover {
  background: #f8f9fa;
}

.participant-row.course-unassigned {
  border-left-color: #95a5a6;
}

.participant-row.course-1 {
  border-left-color: #3498db;
}

.participant-row.course-2 {
  border-left-color: #e74c3c;
}

.participant-row.course-3 {
  border-left-color: #2ecc71;
}

.participant-row.course-4 {
  border-left-color: #f39c12;
}

.participant-row.course-5 {
  border-left-color: #9b59b6;
}

.participant-row.course-6 {
  border-left-color: #1abc9c;
}

.col-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
}

.col-id {
  font-weight: 600;
  color: #2c3e50;
  font-family: monospace;
}

.col-name {
  color: #495057;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.col-course {
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.col-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.col-actions select {
  padding: 0.25rem 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.8rem;
  background: white;
}

.col-actions .btn-small {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  min-width: 30px;
}

.bulk-actions-panel {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #2c3e50;
  color: white;
  padding: 1rem 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.bulk-actions-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.bulk-actions-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.bulk-actions-buttons select {
  padding: 0.5rem;
  border: 1px solid #95a5a6;
  border-radius: 4px;
  font-size: 0.9rem;
}

.column.drag-over {
  border-color: #3498db;
  background: #e3f2fd;
}

.shared-station.drag-over {
  border-color: #e74c3c;
  background: #ffeaea;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  max-width: 800px;
  width: 90%;
  max-height: 90%;
  overflow-y: auto;
}

.modal-header {
  background: #3498db;
  color: white;
  padding: 1rem;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 0 0 8px 8px;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

/* Insert Station Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1001;
  animation: fadeIn 0.2s ease;
}

.modal-overlay .modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay .modal-header {
  background: #17a2b8;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-overlay .modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.modal-close:hover {
  background: rgba(255,255,255,0.2);
}

.modal-overlay .modal-body {
  padding: 1.5rem;
}

.modal-overlay .modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #dee2e6;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  background: #f8f9fa;
  border-radius: 0 0 8px 8px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Advanced Batch Entry Styles */
.batch-entry-row {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  margin-bottom: 1rem;
  background: white;
}

.batch-entry-header {
  background: #f8f9fa;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 6px 6px 0 0;
}

.batch-entry-header h4 {
  margin: 0;
  color: #2c3e50;
  font-size: 1rem;
}

.batch-entry-form {
  padding: 1rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: end;
}

.form-col {
  flex: 1;
  min-width: 0;
}

.form-col-full {
  flex: 1;
  width: 100%;
}

.form-row label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.9rem;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Tags Input System */
.tags-input-container {
  position: relative;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.5rem;
  background: white;
  min-height: 40px;
}

.tags-input-container:focus-within {
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.tags-display {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.tag {
  background: #3498db;
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid #2980b9;
  min-width: 0; /* Allow flex shrinking */
  max-width: 300px; /* Prevent tags from getting too wide */
}

.tag button {
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 1.1rem;
  font-weight: bold;
  line-height: 1;
  margin-left: 0.5rem;
  flex-shrink: 0;
  border-radius: 3px;
  min-width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  font-family: monospace; /* Makes × look more distinctive */
}

.tag button:hover {
  background: rgba(0,0,0,0.5);
  border-color: rgba(255,255,255,0.8);
  transform: scale(1.1);
  color: #fff;
}

/* Enhanced tag styling with course analysis */
.tag-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0; /* Allow text truncation */
  overflow: hidden; /* Prevent content from overflowing */
}

.tag-id {
  font-weight: 600;
  color: #2c3e50;
  white-space: nowrap;
}

.tag-course {
  font-size: 0.75rem;
  color: #7f8c8d;
  white-space: nowrap;
}

.tag-station {
  font-size: 0.75rem;
  color: #95a5a6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag-analysis {
  font-size: 0.9rem;
  margin-left: auto;
  pointer-events: none; /* Not clickable */
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Course analysis colors for tags */
.tag.course-analysis-valid {
  border: 2px solid #27ae60;
  background: linear-gradient(135deg, rgba(39, 174, 96, 0.1) 0%, rgba(39, 174, 96, 0.05) 100%);
}

.tag.course-analysis-warning {
  border: 2px solid #f39c12;
  background: linear-gradient(135deg, rgba(243, 156, 18, 0.1) 0%, rgba(243, 156, 18, 0.05) 100%);
}

.tag.course-analysis-error {
  border: 2px solid #e74c3c;
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(231, 76, 60, 0.05) 100%);
}

/* Distance configuration notice */
.distance-config-notice {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(243, 156, 18, 0.1) 0%, rgba(243, 156, 18, 0.05) 100%);
  border: 2px solid #f39c12;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.distance-config-notice .notice-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.distance-config-notice .notice-content {
  flex: 1;
}

.distance-config-notice .notice-content strong {
  color: #d68910;
  display: block;
  margin-bottom: 0.5rem;
}

.distance-config-notice .notice-content p {
  margin: 0;
  color: #7d6608;
  line-height: 1.4;
}

.distance-config-notice .notice-content a {
  color: #d68910;
  text-decoration: underline;
  font-weight: 500;
}

.distance-config-notice .notice-content a:hover {
  color: #b7950b;
}

.participant-input {
  border: none !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  box-shadow: none !important;
  font-size: 0.9rem;
}

.autocomplete-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.suggestion-item {
  padding: 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid #f1f1f1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.suggestion-item:hover {
  background: #f8f9fa;
}

.suggestion-item:last-child {
  border-bottom: none;
}

/* Enhanced autocomplete suggestions with course analysis */
.suggestion-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.suggestion-id {
  font-weight: 600;
  color: #2c3e50;
  min-width: 60px;
}

.suggestion-course {
  font-size: 0.85rem;
  color: #7f8c8d;
  min-width: 80px;
}

.suggestion-station {
  font-size: 0.85rem;
  color: #95a5a6;
  flex: 1;
}

.suggestion-analysis {
  margin-left: auto;
  font-size: 1.1rem;
}

/* Course analysis colors for suggestions */
.suggestion-item.course-analysis-valid {
  border-left: 4px solid #27ae60;
  background: linear-gradient(90deg, rgba(39, 174, 96, 0.05) 0%, transparent 100%);
}

.suggestion-item.course-analysis-warning {
  border-left: 4px solid #f39c12;
  background: linear-gradient(90deg, rgba(243, 156, 18, 0.05) 0%, transparent 100%);
}

.suggestion-item.course-analysis-error {
  border-left: 4px solid #e74c3c;
  background: linear-gradient(90deg, rgba(231, 76, 60, 0.05) 0%, transparent 100%);
}

.suggestion-item.course-analysis-valid:hover {
  background: linear-gradient(90deg, rgba(39, 174, 96, 0.1) 0%, rgba(39, 174, 96, 0.02) 100%);
}

.suggestion-item.course-analysis-warning:hover {
  background: linear-gradient(90deg, rgba(243, 156, 18, 0.1) 0%, rgba(243, 156, 18, 0.02) 100%);
}

.suggestion-item.course-analysis-error:hover {
  background: linear-gradient(90deg, rgba(231, 76, 60, 0.1) 0%, rgba(231, 76, 60, 0.02) 100%);
}

/* Preview Mode Styles */
.batch-preview {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 1rem;
}

.preview-entry {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.preview-time {
  color: #666;
  font-size: 0.9rem;
  font-family: monospace;
}

.preview-action {
  display: inline-block;
  background: #e3f2fd;
  color: #1976d2;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.preview-participants {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.preview-participant {
  background: #3498db;
  color: white;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.8rem;
}

.preview-message {
  font-style: italic;
  color: #666;
  background: #fff3cd;
  padding: 0.5rem;
  border-radius: 3px;
  border-left: 3px solid #ffc107;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  margin-top: 1rem;
}

/* Legacy Batch Entry Styles (for compatibility) */
.batch-entry {
  margin-bottom: 1rem;
}

.batch-entry label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #2c3e50;
}

.batch-entry textarea,
.batch-entry input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  margin-bottom: 1rem;
  transition: border-color 0.3s ease;
}

.batch-entry textarea:focus,
.batch-entry input:focus {
  outline: none;
  border-color: #3498db;
}

.batch-entry textarea {
  resize: vertical;
  min-height: 80px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-nav {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .page {
    padding: 1rem;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .kanban-board {
    flex-direction: column;
  }
  
  .column {
    min-width: auto;
    max-width: none;
  }
}

/* Activity Log Management Styles */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: #666;
  margin-bottom: 2rem;
}

.activity-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-bottom: 1.5rem;
}

.log-stats {
  display: flex;
  gap: 2rem;
}

.stat-card {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #3498db;
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

.log-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-icon {
  margin-right: 0.5rem;
}

.btn-outline {
  background: transparent;
  border: 2px solid #ddd;
  color: #666;
}

.btn-outline:hover {
  background: #f8f9fa;
  border-color: #bbb;
}

.activity-log-filters {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-bottom: 1.5rem;
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.filter-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.filter-select {
  padding: 0.75rem;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  min-width: 180px;
  font-size: 0.9rem;
  background: white;
  transition: all 0.2s ease;
}

.filter-select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.bulk-actions-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 2px solid #e9ecef;
}

.bulk-selection-info {
  font-weight: 600;
  color: #495057;
}

.bulk-action-buttons {
  display: flex;
  gap: 0.5rem;
}

.activity-log-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  overflow-x: auto;
  border: 1px solid #e1e8ed;
}

.activity-log-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 1230px;
}

.activity-log-table th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 0.75rem 0.5rem;
  text-align: left;
  font-weight: 600;
  color: #2c3e50;
  border-bottom: 2px solid #dee2e6;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1px;
}

.activity-log-table td {
  padding: 1rem;
  border-bottom: 1px solid #f1f3f4;
  vertical-align: middle;
}

.activity-row {
  transition: all 0.2s ease;
}

.activity-row:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.activity-row.editing {
  background: #fff3cd;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

.activity-row.editing:hover {
  background: #fff3cd;
}

.checkbox-column {
  width: 50px;
}

.time-column {
  width: 120px;
}

.participant-column {
  width: 150px;
}

.course-column {
  width: 120px;
}

.activity-column {
  width: 120px;
}

.station-column {
  width: 140px;
}

.prior-station-column {
  width: 140px;
}

.course-analysis-column {
  width: 90px;
  text-align: center;
}

.print-status-column {
  width: 80px;
  text-align: center;
}

.distance-column {
  width: 100px;
}

.duration-column {
  width: 100px;
}

.notes-column {
  min-width: 200px;
}

.actions-column {
  width: 160px;
}

.bulk-checkbox,
.row-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #3498db;
  cursor: pointer;
}

.time-cell,
.participant-cell,
.course-cell,
.activity-cell,
.station-cell,
.prior-station-cell,
.course-analysis-cell,
.distance-cell,
.duration-cell,
.notes-cell {
  position: relative;
}

.time-edit input,
.participant-edit select,
.activity-edit select,
.station-edit select,
.prior-station-edit select,
.notes-edit textarea {
  width: 100%;
  padding: 0.5rem;
  border: 2px solid #3498db;
  border-radius: 4px;
  font-size: 0.9rem;
}

.notes-edit textarea {
  min-height: 60px;
  resize: vertical;
}

.activity-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.activity-badge.activity-arrival {
  background: #d4edda;
  color: #155724;
}

.activity-badge.activity-departed {
  background: #cce5f0;
  color: #0c5460;
}

.activity-badge.activity-suspect {
  background: #f8d7da;
  color: #721c24;
}

.activity-badge.activity-other {
  background: #e2e3e5;
  color: #383d41;
}

.actions-cell {
  white-space: nowrap;
  padding: 0.5rem 0.25rem;
  width: 120px;
  min-width: 120px;
  max-width: 120px;
}

.action-buttons,
.edit-actions {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.time-cell {
  width: 140px;
  min-width: 140px;
  max-width: 140px;
}

.time-edit {
  min-width: 120px !important;
}

.edit-actions {
  justify-content: flex-end;
}

.save-btn {
  background: #28a745;
  color: white;
}

.save-btn:hover {
  background: #218838;
}

.cancel-btn {
  background: #6c757d;
  color: white;
}

.cancel-btn:hover {
  background: #5a6268;
}

.edit-btn {
  background: #17a2b8;
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.edit-btn:hover {
  background: #138496;
}

.delete-btn {
  background: #dc3545;
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.delete-btn:hover {
  background: #c82333;
}

.save-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.cancel-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.hidden {
  display: none !important;
}

/* Bulk Edit Modal Styles */
.bulk-edit-form {
  display: grid;
  gap: 1.5rem;
}

.form-section {
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  padding: 1rem;
  background: #fafbfc;
}

.form-section h4 {
  margin: 0 0 0.75rem 0;
  color: #2c3e50;
  font-size: 1rem;
}

.form-section label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
  color: #495057;
  cursor: pointer;
}

.form-section input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #3498db;
}

.form-section input[type="time"],
.form-section select,
.form-section textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e1e8ed;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.form-section input[type="time"]:focus,
.form-section select:focus,
.form-section textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-section input:disabled,
.form-section select:disabled,
.form-section textarea:disabled {
  background: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Activity Log Responsive */
@media (max-width: 1024px) {
  .activity-log-controls {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .log-stats {
    justify-content: center;
  }
  
  .log-actions {
    justify-content: center;
  }
  
  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-row select {
    min-width: auto;
  }
}

@media (max-width: 768px) {
  .activity-log-table-container {
    overflow-x: auto;
  }
  
  .activity-log-table {
    min-width: 800px;
  }
  
  .activity-log-table th,
  .activity-log-table td {
    padding: 0.5rem;
    font-size: 0.9rem;
  }
}

/* Export Page Styles */
.exports-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.export-section {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid #e1e8ed;
}

.export-section-header {
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #f1f3f4;
  padding-bottom: 1rem;
}

.export-section-header h3 {
  color: #2c3e50;
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
}

.export-section-header p {
  color: #6c757d;
  margin: 0;
  font-size: 0.95rem;
}

.export-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.export-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  background: #f8f9fa;
  transition: all 0.2s ease;
}

.export-option:hover {
  border-color: #007bff;
  background: #f0f8ff;
}

.export-option-content {
  flex: 1;
}

.export-option-title {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.25rem;
}

.export-option-description {
  color: #6c757d;
  font-size: 0.9rem;
}

.admin-toggle .hamburger {
  font-size: 1.2rem;
  margin-right: 0.5rem;
}

/* Race Results Compact Header */
.race-results-header.compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #e1e8ed;
  margin-bottom: 1.5rem;
}

.race-results-header.compact .course-navigation {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.race-results-header.compact .nav-label {
  font-weight: 600;
  color: #2c3e50;
  margin-right: 0.5rem;
}

.race-results-header.compact .course-nav-link {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 0.375rem 0.75rem;
  text-decoration: none;
  color: #495057;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.race-results-header.compact .course-nav-link:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  color: #212529;
}

/* Export Icon Button */
.export-icon-btn {
  background: #17a2b8;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  margin-left: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.export-icon-btn:hover {
  background: #138496;
  transform: scale(1.1);
}

.export-icon-btn .btn-icon {
  color: white;
  font-size: 0.875rem;
}

.course-results-title {
  display: flex;
  align-items: center;
}

/* Print styles - hide export buttons */
@media print {
  .export-icon-btn,
  .results-actions {
    display: none !important;
  }
}

/* Participant Filter Styles */
.participant-filter-container {
  position: relative;
  display: inline-block;
  min-width: 200px;
}

.participant-filter-header {
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.participant-filter-header:hover {
  background: #f8f9fa;
}

.participant-filter-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
}

.participant-filter-search {
  padding: 0.5rem;
  border-bottom: 1px solid #eee;
}

.search-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}

.participant-filter-actions {
  padding: 0.5rem;
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid #eee;
}

.participant-filter-list {
  max-height: 200px;
  overflow-y: auto;
}

.participant-filter-item {
  display: block;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  border-bottom: 1px solid #f5f5f5;
}

.participant-filter-item:hover {
  background: #f8f9fa;
}

.participant-filter-item input {
  margin-right: 0.5rem;
}

/* Course Analysis Styles */
.course-analysis-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.course-analysis-valid {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.course-analysis-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.course-analysis-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Course Analysis Icon Styles */
.course-analysis-icon {
  display: inline-block;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  text-align: center;
  min-width: 24px;
}

.course-analysis-icon:hover {
  background: rgba(0,0,0,0.1);
  transform: scale(1.1);
}

.course-analysis-icon.course-analysis-valid:hover {
  background: rgba(40, 167, 69, 0.2);
}

.course-analysis-icon.course-analysis-warning:hover {
  background: rgba(255, 193, 7, 0.2);
}

.course-analysis-icon.course-analysis-error:hover {
  background: rgba(220, 53, 69, 0.2);
}

.distance-display {
  font-weight: 500;
  color: #666;
}

.duration-display {
  font-weight: 500;
  color: #666;
  font-family: monospace;
}

.course-display {
  font-size: 0.9rem;
  color: #495057;
  font-weight: 500;
}

/* Event Management Styles */
.dropdown-section {
  padding: 0.5rem 0;
}

.dropdown-section-title {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.events-management {
  max-width: 1000px;
  margin: 0 auto;
}

.current-event-info {
  margin-bottom: 2rem;
}

.current-event-info h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.all-events-list h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.events-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.event-card {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.event-card:hover {
  border-color: #3498db;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
  transform: translateY(-2px);
}

.event-card.current {
  border-color: #27ae60;
  background: #f8fff9;
}

.event-card.current::before {
  content: "CURRENT";
  position: absolute;
  top: -1px;
  right: -1px;
  background: #27ae60;
  color: white;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 0 6px 0 6px;
}

.event-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.event-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
}

.event-actions {
  display: flex;
  gap: 0.5rem;
}

.event-action-btn {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.event-action-btn:hover {
  color: #333;
  background: rgba(0,0,0,0.05);
}

.event-action-btn.delete {
  color: #e74c3c;
}

.event-action-btn.delete:hover {
  color: #c0392b;
  background: rgba(231, 76, 60, 0.1);
}

.event-details {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.4;
}

.event-detail-row {
  display: flex;
  margin-bottom: 0.5rem;
}

.event-detail-label {
  font-weight: 500;
  min-width: 70px;
  color: #555;
}

.event-detail-value {
  color: #666;
}

.event-stats {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
  font-size: 0.85rem;
  color: #666;
}

.event-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.event-stat-number {
  font-weight: 600;
  font-size: 1.1rem;
  color: #2c3e50;
}

.event-stat-label {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.event-actions {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #e9ecef;
}

.event-actions .btn {
  margin: 0 0.5rem;
}

.empty-events-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #666;
}

.empty-events-state h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
}

.empty-events-state p {
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* Confirmation Dialog */
.confirmation-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.confirmation-content {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.confirmation-content h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
}

.confirmation-content p {
  color: #666;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.confirmation-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.confirmation-actions .btn {
  min-width: 100px;
}

@media (max-width: 768px) {
  .events-container {
    grid-template-columns: 1fr;
  }
  
  .event-card {
    padding: 1rem;
  }
  
  .event-stats {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .event-stat {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Footer Styles */
.main-footer {
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
  padding: 1.5rem 0;
  margin-top: 3rem;
  text-align: center;
  color: #6c757d;
  font-size: 0.9rem;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-links {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #2980b9;
  text-decoration: underline;
}

.footer-divider {
  margin: 0 1rem;
  color: #adb5bd;
}

.footer-copyright {
  color: #6c757d;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .footer-links {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .footer-divider {
    display: none;
  }
  
  .main-footer {
    padding: 1rem 0;
    margin-top: 2rem;
  }
}

/* ===== DISPLAY MODE (BIG SCREEN) ===== */

.display-mode-container {
  height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

/* Fullscreen mode adjustments - remove side whitespace */
:fullscreen .page {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100vh !important;
}

:-webkit-full-screen .page {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100vh !important;
}

:-moz-full-screen .page {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100vh !important;
}

:-ms-fullscreen .page {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100vh !important;
}

/* Fullscreen display mode container adjustments */
:fullscreen .display-mode-container {
  height: 100vh !important;
}

:-webkit-full-screen .display-mode-container {
  height: 100vh !important;
}

:-moz-full-screen .display-mode-container {
  height: 100vh !important;
}

:-ms-fullscreen .display-mode-container {
  height: 100vh !important;
}

/* Activity Ticker */
.activity-ticker {
  background: rgba(0, 0, 0, 0.8);
  height: 60px;
  overflow: hidden;
  position: relative;
  border-bottom: 3px solid #4a90e2;
}

.ticker-content {
  display: flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  animation: scroll-ticker 60s linear infinite;
  font-size: 1.1rem;
  font-weight: 500;
}

.ticker-item {
  margin-right: 4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.ticker-time {
  color: #4a90e2;
  font-weight: 600;
}

.ticker-update {
  color: #e8f4f8;
}

@keyframes scroll-ticker {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* Main Display Area */
.display-main {
  flex: 1;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.display-controls {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.display-info h2 {
  margin: 0 0 0.5rem 0;
  font-size: 2.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.display-stats {
  display: flex;
  gap: 1rem;
  font-size: 1.2rem;
  opacity: 0.9;
}

.display-stats .divider {
  opacity: 0.6;
}

.display-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.display-nav-buttons {
  display: flex;
  gap: 0.25rem;
  margin-right: 1rem;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.display-nav-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.8) !important;
  transition: all 0.2s ease !important;
  min-width: 80px !important;
  font-size: 0.85rem !important;
}

.display-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
  transform: none !important;
}

.display-nav-btn.active {
  background: rgba(255, 255, 255, 0.9) !important;
  color: #2c3e50 !important;
  border-color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 600;
}

.display-actions .btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  transition: all 0.3s ease;
  min-width: 120px;
  text-align: center;
}

.display-actions .btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Display View Container */
.display-view-container {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 2rem;
  backdrop-filter: blur(5px);
  overflow: auto;
}

/* Live Update Alert */
.live-update-alert {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  background: linear-gradient(135deg, #ff1744, #d50000);
  color: white;
  padding: 1rem 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(255, 23, 68, 0.4);
  animation: slideInAlert 0.5s ease-out, fadeOutAlert 0.5s ease-in 2.5s forwards;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.alert-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-icon {
  font-size: 1.2rem;
  animation: pulse 1s infinite;
}

.alert-text {
  font-size: 1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes slideInAlert {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOutAlert {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Vertical layout for multiple activities */
.alert-content.vertical {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.alert-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-title {
  font-size: 1rem;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.alert-activities {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-left: 2rem;
  max-width: 400px;
}

.alert-activity {
  font-size: 0.9rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Compact Header Styles */
.display-controls.compact {
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
}

.display-controls.compact .display-info h2 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.display-controls.compact .display-stats {
  font-size: 1rem;
}

.display-actions .btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  transition: all 0.3s ease;
  min-width: 120px;
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.display-actions .btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.display-actions .btn-tiny {
  min-width: 36px;
  padding: 0.5rem;
  font-size: 1rem;
}

/* Compact Kanban Board - fits everything on screen */
.compact-kanban {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  height: 100%;
  max-height: calc(100vh - 200px);
}

.compact-station {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
}

.compact-station-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.compact-station-name {
  font-size: 1.2rem;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.compact-station-count {
  background: rgba(255, 255, 255, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 2rem;
  text-align: center;
}

.compact-participants {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  flex: 1;
  align-content: flex-start;
  max-height: 200px;
  overflow-y: auto;
}

.compact-participant {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}

.compact-participant.recent-update {
  animation: pulse-highlight 2s infinite;
  border: 1px solid #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
  background: rgba(255, 235, 59, 0.9);
  color: #333;
}

.compact-participant.finishing {
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  color: white;
  border: 1px solid #1b5e20;
  box-shadow: 0 0 15px rgba(76, 175, 80, 0.7);
  font-weight: 700;
  animation: finishing-glow 3s infinite;
}

/* Pace-based colors for compact participants in display mode */
.compact-participant.pace-arriving-soon {
  background: linear-gradient(135deg, #66bb6a, #4caf50) !important;
  color: white !important;
  border: 2px solid #388e3c !important;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3) !important;
}

.compact-participant.pace-arriving-closer {
  background: linear-gradient(135deg, #ffeb3b, #ffc107) !important;
  color: #333 !important;
  border: 2px solid #ff8f00 !important;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3) !important;
}

.compact-participant.pace-arriving-later {
  background: linear-gradient(135deg, #ffa726, #ff9800) !important;
  color: white !important;
  border: 2px solid #f57c00 !important;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3) !important;
}

.compact-station.final-station {
  border: 2px solid #4caf50;
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.4);
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(46, 125, 50, 0.1));
}

.compact-station.final-station .compact-station-header {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(46, 125, 50, 0.2));
  border-radius: 6px;
  margin: -0.5rem -0.5rem 0.75rem -0.5rem;
  padding: 0.75rem;
}

.compact-station.final-station .compact-station-name {
  color: white;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.compact-station.recent-activity {
  border: 2px solid #ff9800;
  box-shadow: 0 0 15px rgba(255, 152, 0, 0.3);
}

.compact-station.recent-activity .compact-station-header {
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.2), rgba(255, 193, 7, 0.2));
}

.compact-station.final-station.recent-activity {
  border: 2px solid #4caf50;
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.4), 0 0 10px rgba(255, 152, 0, 0.3);
}

@keyframes finishing-glow {
  0%, 100% { 
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.7);
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 0 25px rgba(76, 175, 80, 0.9);
    transform: scale(1.05);
  }
}

.empty-station {
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
  font-size: 0.9rem;
}

@keyframes pulse-highlight {
  0%, 100% { 
    transform: scale(1); 
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
  }
  50% { 
    transform: scale(1.02); 
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
  }
}

/* Original Display Kanban Board (for larger screens) */
.display-kanban {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  height: 100%;
}

.display-station {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.display-station-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.display-station-name {
  font-size: 1.6rem;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.display-station-count {
  background: rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 1.1rem;
}

.display-participants {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
}

.display-participant {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  padding: 0.5rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  position: relative;
}

.display-participant.recent-update {
  animation: pulse-highlight 2s infinite;
  border: 2px solid #ffd700;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* Pace-based colors for regular display participants */
.display-participant.pace-arriving-soon {
  background: linear-gradient(135deg, #66bb6a, #4caf50) !important;
  color: white !important;
  border: 2px solid #388e3c !important;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3) !important;
}

.display-participant.pace-arriving-closer {
  background: linear-gradient(135deg, #ffeb3b, #ffc107) !important;
  color: #333 !important;
  border: 2px solid #ff8f00 !important;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3) !important;
}

.display-participant.pace-arriving-later {
  background: linear-gradient(135deg, #ffa726, #ff9800) !important;
  color: white !important;
  border: 2px solid #f57c00 !important;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3) !important;
}

/* Recent Activity View */
.display-recent-activity {
  display: grid;
  gap: 1rem;
  max-height: 100%;
  overflow-y: auto;
}

.display-activity-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 4px solid;
  transition: all 0.3s ease;
}

.display-activity-item.arrival { border-left-color: #4caf50; }
.display-activity-item.departed { border-left-color: #ff9800; }
.display-activity-item.other { border-left-color: #2196f3; }

.display-activity-info {
  flex: 1;
}

.display-activity-main {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.display-activity-details {
  font-size: 1rem;
  opacity: 0.8;
}

.display-activity-time {
  font-size: 1.4rem;
  font-weight: 600;
  color: #4a90e2;
  text-align: right;
}

/* Statistics View */
.display-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  height: 100%;
}

.display-stat-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.display-stat-number {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.display-stat-label {
  font-size: 1.2rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Responsive adjustments for compact layout */
@media (max-width: 1200px) {
  .compact-kanban {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
  }
  
  .compact-station {
    padding: 0.75rem;
  }
  
  .compact-station-name {
    font-size: 1rem;
  }
  
  .compact-participant {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
  }
}

/* Responsive adjustments for very large screens */
@media (min-width: 1920px) {
  .display-info h2 {
    font-size: 3.5rem;
  }
  
  .display-stats {
    font-size: 1.4rem;
  }
  
  .compact-kanban {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }
  
  .compact-station-name {
    font-size: 1.4rem;
  }
  
  .compact-station-count {
    font-size: 1rem;
  }
  
  .compact-participant {
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
  }
}

/* Courses Display Styles - Horizontal & Dense Layout */
.courses-display-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  overflow-y: auto;
}

.course-display {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.course-display-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.course-display-header h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.course-display-stats {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.stations-display {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 0.75rem;
}

.station-display-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.station-display-row:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.station-display-row.final-station-row {
  border: 2px solid #4caf50;
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(46, 125, 50, 0.1));
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.station-display-name {
  font-size: 1rem;
  font-weight: 600;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  flex: 1;
  margin-right: 1rem;
}

.station-display-stats {
  display: flex;
  gap: 1rem;
}

.station-stat {
  text-align: center;
  min-width: 50px;
}

.station-stat .stat-number {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.station-stat .stat-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.no-active-stations {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
  padding: 2rem;
  font-size: 1.1rem;
}

@media (max-width: 1600px) {
  .stations-display {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

@media (max-width: 1400px) {
  .stations-display {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media (max-width: 1200px) {
  .stations-display {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .station-display-stats {
    gap: 0.75rem;
  }
  
  .station-stat {
    min-width: 45px;
  }
  
  .station-stat .stat-number {
    font-size: 1rem;
  }
  
  .station-stat .stat-label {
    font-size: 0.65rem;
  }
}

@media (max-width: 900px) {
  .stations-display {
    grid-template-columns: 1fr;
  }
  
  .station-display-row {
    padding: 0.5rem 0.75rem;
  }
  
  .station-display-name {
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .course-display-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
  }
  
  .course-display-header h3 {
    font-size: 1.2rem;
  }
  
  .course-display-stats {
    font-size: 0.85rem;
  }
  
  .station-display-row {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    padding: 0.5rem;
  }
  
  .station-display-name {
    margin-right: 0;
    margin-bottom: 0.25rem;
  }
  
  .station-display-stats {
    justify-content: center;
  }
}

/* Pace Tracking Styles */

/* Pace-based color coding for bib cards - based on ETA proximity */
.bib-card.pace-arriving-soon {
  background: linear-gradient(135deg, #66bb6a, #4caf50) !important;
  color: white !important;
  border: 2px solid #388e3c !important;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3) !important;
}

.bib-card.pace-arriving-closer {
  background: linear-gradient(135deg, #ffeb3b, #ffc107) !important;
  color: #333 !important;
  border: 2px solid #ff8f00 !important;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3) !important;
}

.bib-card.pace-arriving-later {
  background: linear-gradient(135deg, #ffa726, #ff9800) !important;
  color: white !important;
  border: 2px solid #f57c00 !important;
  box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3) !important;
}

/* Animation for urgent attention */
@keyframes pulse-urgent {
  0%, 100% { 
    transform: scale(1); 
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
  }
  50% { 
    transform: scale(1.05); 
    box-shadow: 0 4px 16px rgba(255, 71, 87, 0.6);
  }
}

/* Animation for attention */
@keyframes pulse-attention {
  0%, 100% { 
    transform: scale(1); 
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
  }
  50% { 
    transform: scale(1.02); 
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.5);
  }
}

/* Pace Tooltip Styles */
.pace-tooltip {
  position: absolute;
  background: rgba(44, 62, 80, 0.95);
  color: white;
  padding: 0.75rem;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  font-size: 0.8rem;
  z-index: 10000;
  max-width: 220px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.pace-tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.pace-tooltip-header strong {
  font-size: 1.1rem;
  color: #3498db;
}

.estimated-badge {
  background: #e67e22;
  color: white;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.pace-tooltip-content {
  margin-bottom: 0.5rem;
}

.pace-info,
.eta-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
  align-items: center;
}

.pace-info .label,
.eta-info .label {
  color: #bdc3c7;
  font-size: 0.85rem;
}

.pace-info .value,
.eta-info .value {
  font-weight: 600;
  color: white;
}

.pace-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0.5rem 0;
}

.confidence-info {
  text-align: center;
  margin-top: 0.3rem;
}

.confidence-high {
  color: #2ecc71;
  font-weight: 600;
  font-size: 0.75rem;
}

.confidence-medium {
  color: #f39c12;
  font-weight: 600;
  font-size: 0.75rem;
}

.confidence-low {
  color: #e74c3c;
  font-weight: 600;
  font-size: 0.75rem;
}

.pace-tooltip-footer {
  text-align: center;
  font-size: 0.8rem;
  color: #95a5a6;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pace-tooltip-footer .status-message {
  color: #f39c12;
  font-weight: 500;
  margin-top: 4px;
}

.pace-tooltip-footer .help-message {
  color: #3498db;
  font-size: 0.7rem;
  margin-top: 4px;
  text-align: center;
}

/* Enhanced bib card hover effects with pace data */
.bib-card:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15) !important;
  z-index: 10;
  position: relative;
}

.bib-card.pace-arriving-soon:hover {
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4) !important;
}

.bib-card.pace-arriving-closer:hover {
  box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4) !important;
}

.bib-card.pace-arriving-later:hover {
  box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4) !important;
}

/* Pace performance icons for bib cards - now using DOM elements for better rendering */
.pace-icon {
  z-index: 10;
}

/* Pace legend for reference - only show on race tracker page */
.pace-legend {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.95);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  font-size: 0.8rem;
  z-index: 1000;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  max-width: 200px;
  display: none; /* Hidden by default */
}

/* Only show pace legend on race tracker page */
#race-tracker .pace-legend {
  display: block;
}

.pace-legend-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #2c3e50;
  text-align: center;
}

.pace-legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.3rem;
}

.pace-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.pace-legend-color.arriving-soon {
  background: #4caf50;
}

.pace-legend-color.arriving-closer {
  background: #ffeb3b;
}

.pace-legend-color.arriving-later {
  background: #ff9800;
}

.pace-legend-text {
  color: #555;
  font-size: 0.75rem;
}

/* Toggle button for pace legend - only show on race tracker page */
.pace-legend-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(52, 152, 219, 0.9);
  color: white;
  border: none;
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  z-index: 1001;
  box-shadow: 0 4px 16px rgba(52, 152, 219, 0.3);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  display: none; /* Hidden by default */
}

/* Only show pace legend toggle on race tracker page */
#race-tracker .pace-legend-toggle {
  display: block;
}

.pace-legend-toggle:hover {
  background: rgba(52, 152, 219, 1);
  transform: scale(1.1);
}

.pace-legend-toggle.active {
  background: rgba(231, 76, 60, 0.9);
}

/* Responsive adjustments for pace features */
@media (max-width: 768px) {
  .pace-tooltip {
    max-width: 250px;
    font-size: 0.85rem;
  }
  
  #race-tracker .pace-legend {
    top: 10px;
    right: 10px;
    padding: 0.75rem;
    max-width: 180px;
  }
  
  #race-tracker .pace-legend-toggle {
    top: 10px;
    right: 10px;
    padding: 0.4rem;
    font-size: 1rem;
  }
}

/* Sorting indicator for fastest participants (removed - using pace performance icons instead) */

/* Background refresh indicator */
.refresh-indicator {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(46, 204, 113, 0.9);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  z-index: 1000;
  animation: fadeInOut 3s ease-in-out;
  backdrop-filter: blur(10px);
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0; transform: translateY(10px); }
  10%, 90% { opacity: 1; transform: translateY(0); }
}

/* Enhanced column headers with pace sorting indicator */
.column-header .sorting-indicator {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.7;
}

.column-header .sorting-indicator.active {
  opacity: 1;
  animation: pulse 2s infinite;
}

/* Browser search highlighting has been replaced with custom search system
   Use Ctrl+F to open the custom search overlay with better cross-browser compatibility */

/* Pace-based gradient backgrounds for enhanced visual hierarchy */
.bib-card.pace-arriving-later {
  background: linear-gradient(135deg, #ffa726 0%, #ff9800 50%, #f57c00 100%) !important;
  background-size: 200% 200% !important;
  animation: gradientShift 4s ease-in-out infinite;
}

.bib-card.pace-arriving-closer {
  background: linear-gradient(135deg, #ffeb3b 0%, #ffc107 50%, #ff8f00 100%) !important;
  background-size: 200% 200% !important;
  animation: gradientShift 5s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Custom Search Overlay */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding-top: 80px;
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 600px;
  overflow: hidden;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.search-overlay.active .search-container {
  transform: translateY(0);
}

.search-header {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.1rem;
  padding: 0.5rem 0;
  background: transparent;
}

.search-input::placeholder {
  color: #999;
}

.search-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
}

.search-results {
  font-size: 0.9rem;
  color: #666;
  min-width: 80px;
  text-align: center;
}

.search-nav-btn {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-nav-btn:hover:not(:disabled) {
  background: #e9e9e9;
  border-color: #bbb;
}

.search-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.search-close {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.2rem;
}

.search-close:hover {
  background: #ff4757;
  border-color: #ff4757;
  color: white;
}

.search-help {
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
  font-size: 0.85rem;
  color: #666;
}

.search-help kbd {
  background: #e9ecef;
  border: 1px solid #ced4da;
  border-radius: 3px;
  font-size: 0.75rem;
  padding: 0.1rem 0.3rem;
  margin: 0 0.1rem;
  font-family: monospace;
}

/* Search Highlighting */
.search-match {
  position: relative;
  box-shadow: 0 0 0 3px #3498db !important;
  z-index: 1;
  transform: scale(1.02);
  transition: all 0.2s ease;
}

.search-current {
  box-shadow: 0 0 0 4px #e74c3c !important;
  z-index: 2;
  transform: scale(1.05);
}

.search-highlight {
  background: #ffeb3b !important;
  color: #000 !important;
  padding: 0.1rem 0.2rem;
  border-radius: 2px;
  font-weight: bold;
}

/* Search highlighting for different pace cards */
.pace-arriving-soon .search-highlight {
  background: #333 !important;
  color: #4caf50 !important;
}

.pace-arriving-closer .search-highlight {
  background: #333 !important;
  color: #ff9800 !important;
}

.pace-arriving-later .search-highlight {
  background: #333 !important;
  color: #ffffff !important;
}

/* Ensure search matches are visible on different backgrounds */
.search-match.pace-arriving-soon,
.search-match.pace-arriving-closer,
.search-match.pace-arriving-later {
  border: 3px solid #3498db !important;
  box-shadow: 0 0 0 2px #3498db, 0 0 20px rgba(52, 152, 219, 0.5) !important;
}

.search-current.pace-arriving-soon,
.search-current.pace-arriving-closer,
.search-current.pace-arriving-later {
  border: 4px solid #e74c3c !important;
  box-shadow: 0 0 0 2px #e74c3c, 0 0 20px rgba(231, 76, 60, 0.8) !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .search-container {
    width: 95%;
    margin: 0 auto;
  }
  
  .search-header {
    padding: 0.75rem;
  }
  
  .search-input {
    font-size: 1rem;
  }
  
  .search-controls {
    margin-left: 0.5rem;
  }
  
  .search-nav-btn,
  .search-close {
    width: 28px;
    height: 28px;
  }
  
  .search-help {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }
}

/* Animation for search matches */
@keyframes search-highlight {
  0% {
    box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.7);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.3);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
  }
}

@keyframes search-fade-out {
  0% {
    opacity: 1;
    transform: scale(1.02);
  }
  100% {
    opacity: 0.3;
    transform: scale(1);
  }
}

.search-match {
  animation: search-highlight 0.6s ease-out;
}

.search-closing {
  animation: search-fade-out 0.3s ease-out forwards;
}

/* Ensure search overlay is above all other content */
.search-overlay {
  z-index: 99999;
}

/* Add at the end of the file */

/* Print Status Styling */
.print-indicator {
  font-size: 0.7em;
  margin-left: 5px;
  opacity: 0.6;
  color: #6c757d;
}

.print-indicator:hover {
  opacity: 1;
}

/* Print button styling */
.btn-secondary:has(.btn-icon:contains('🖨️')) {
  position: relative;
}

/* Print dialog styling */
.print-header {
  text-align: center;
  font-weight: bold;
  margin-bottom: 10px;
  border-bottom: 2px solid #000;
  padding-bottom: 5px;
}

.print-entry {
  margin-bottom: 5px;
  padding-bottom: 3px;
  border-bottom: 1px dotted #ccc;
}

.print-time {
  font-weight: bold;
}

.print-participant {
  font-weight: bold;
}

.print-station {
  font-weight: bold;
}

.print-notes {
  font-style: italic;
  color: #666;
  margin-top: 2px;
}

.print-footer {
  margin-top: 15px;
  text-align: center;
  font-size: 10px;
  color: #666;
}

/* Race Results Styling */
.race-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid #e9ecef;
}

.results-actions {
  display: flex;
  gap: 1rem;
}

.course-navigation {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.course-navigation h3 {
  margin: 0 0 1rem 0;
  color: #2c3e50;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.course-nav-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.course-nav-link:hover {
  background: #0056b3;
  text-decoration: none;
  color: white;
}

.course-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.back-to-top {
  font-size: 0.9rem;
  color: #6c757d;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background 0.2s;
}

.back-to-top:hover {
  background: #f8f9fa;
  text-decoration: none;
  color: #495057;
}

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

.course-results-section {
  margin-bottom: 3rem;
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.course-results-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.course-results-meta {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  color: #666;
  font-size: 0.9rem;
}

.participant-count,
.course-distance {
  font-weight: 500;
}

.issues-summary {
  margin-top: 8px;
  padding: 8px 12px;
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 4px;
  font-size: 0.9rem;
}

.issues-text {
  color: #856404;
  font-weight: 500;
}

.results-table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  display: block;
  width: 100%;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 0.9rem;
  display: table;
  table-layout: fixed;
}

.results-table th {
  background: #f8f9fa;
  padding: 1rem 0.75rem;
  text-align: left;
  font-weight: 600;
  color: #2c3e50;
  border-bottom: 2px solid #dee2e6;
  position: sticky;
  top: 0;
  z-index: 10;
  display: table-cell;
  vertical-align: top;
}

.results-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #f1f3f4;
  vertical-align: top;
  display: table-cell;
}

.results-table thead {
  display: table-header-group;
}

.results-table tbody {
  display: table-row-group;
}

.results-table tr {
  display: table-row;
}

.results-table tr:hover {
  background: #f8f9fa;
}

.participant-col {
  min-width: 120px;
  max-width: 150px;
}

.start-time-col {
  min-width: 100px;
}

.station-col {
  min-width: 120px;
  text-align: center;
}

.issues-col {
  min-width: 60px;
  text-align: center;
}

.finish-col {
  min-width: 80px;
  text-align: center;
}

.finish-cell {
  text-align: center;
  border-left: 2px solid #ddd;
  background-color: #f9f9f9;
  min-height: 40px;
}

.participant-cell {
  font-weight: 500;
}

.participant-id {
  font-size: 1rem;
  color: #2c3e50;
  font-weight: 600;
}

.participant-name {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.25rem;
}

.start-time-cell {
  font-family: 'Courier New', monospace;
  color: #2c3e50;
}

.station-cell {
  text-align: center;
}

.station-data {
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  display: inline-block;
  width: 100%;
}

.arrival-time {
  font-family: 'Courier New', monospace;
  color: #2c3e50;
  font-weight: 500;
  font-size: 0.9rem;
  display: inline;
}

.pace-separator {
  color: #999;
  font-size: 0.8rem;
  margin: 0 0.3rem;
  display: inline;
}

.pace-info {
  font-size: 0.75rem;
  color: #666;
  font-weight: normal;
  display: inline;
}

.station-distance {
  font-size: 0.8rem;
  color: #666;
  font-weight: normal;
}

.no-data {
  color: #999;
  font-style: italic;
}

.station-cell.no-data {
  color: #ccc;
}

.issue-indicator {
  font-size: 1.2rem;
  color: #ff6b00;
}

.participant-row.has-issues {
  background: rgba(255, 107, 0, 0.05);
}

.participant-row.has-issues:hover {
  background: rgba(255, 107, 0, 0.1);
}

.no-participants {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-style: italic;
}

/* Print-specific styling for race results - FIXED VERSION */
@media print {
  /* Hide navigation elements */
  .course-navigation,
  .main-nav,
  .main-footer,
  .back-to-top,
  .results-actions,
  .nav-links,
  .course-nav-link {
    display: none !important;
  }

  
  /* Reset margins/padding */
  body {
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .page {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
  }
  
  #race-results {
    padding: 0 !important;
    margin: 0 !important;
  }
  
  #race-results-container {
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Compact page header */
  .page-header {
    margin: 0 !important;
    padding: 0.1in 0 0.1in 0 !important;
    border-bottom: 1px solid #ccc;
    text-align: left !important;
  }
  
  .page-header h1 {
    font-size: 14px !important;
    margin: 0 !important;
    line-height: 1.2 !important;
  }
  
  .page-header p {
    font-size: 10px !important;
    margin: 0.05in 0 0 0 !important;
    color: #666 !important;
    line-height: 1.1 !important;
  }
  
  /* Course sections */
  .course-results-section {
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    background: white !important;
    border: none !important;
    break-after: page;
  }
  
  /* Don't break after the last course */
  .course-results-section:last-child {
    break-after: avoid;
  }
  
  .course-results-title {
    font-size: 16px !important;
    margin: 0 0 0.1in 0 !important;
    padding: 0 !important;
  }
  
  .course-results-meta {
    margin: 0 0 0.1in 0 !important;
    padding: 0 !important;
    font-size: 10px !important;
  }
  
  /* Table styling */
  .results-table-container {
    border: none;
    border-radius: 0;
  }
  
  .results-table {
    border-collapse: collapse;
    font-size: 10px;
  }
  
  .results-table th {
    background: #f5f5f5 !important;
    border: 1px solid #333;
    padding: 4px 6px;
    font-size: 10px;
    position: static;
  }
  
  .results-table td {
    border: 1px solid #333;
    padding: 4px 6px;
    font-size: 10px;
  }
  
  .results-table tr:hover {
    background: white;
  }
  
  .participant-id {
    font-size: 10px;
  }
  
  .participant-name {
    font-size: 9px;
  }
  
  .station-data {
    line-height: 1.0;
  }
  
  .arrival-time {
    font-size: 9px;
  }
  
  .pace-separator {
    font-size: 8px;
    margin: 0 0.1rem;
  }
  
  .pace-info {
    font-size: 8px;
  }
  
  .station-distance {
    font-size: 8px;
  }
  
  .issue-indicator {
    font-size: 12px;
    color: #ff6b00;
  }
  
  .no-data {
    font-size: 9px;
  }
  
  .finish-col {
    border-left: 1px solid #333;
  }
  
  .finish-cell {
    border-left: 1px solid #333;
    background-color: #f9f9f9 !important;
    min-height: 20px;
  }
}

/* Responsive design for race results */
@media (max-width: 768px) {
  .race-results-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .results-actions {
    justify-content: center;

  }
  
  .course-navigation {
    padding: 1rem;
  }
  
  .course-navigation h3 {
    font-size: 1rem;
  }
  
  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .course-nav-link {
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
  }
  
  .course-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .back-to-top {
    align-self: flex-end;
  }
  
  .course-results-section {
    padding: 1rem;
    margin-bottom: 2rem;
  }
  
  .course-results-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .results-table {
    font-size: 0.8rem;
  }
  
  .results-table th,
  .results-table td {
    padding: 0.5rem 0.4rem;
  }
  
  .participant-col {
    min-width: 100px;
  }
  
  .station-col {
    min-width: 100px;
  }
  
  .participant-id {
    font-size: 0.9rem;
  }
  
  .participant-name {
    font-size: 0.8rem;
  }
  
  .arrival-time {
    font-size: 0.8rem;
  }
  
  .pace-separator {
    font-size: 0.7rem;
    margin: 0 0.2rem;
  }
  
  .pace-info {
    font-size: 0.65rem;
  }
}