	/* ========================================
	   CSS VARIABLES - Using Central Theme System
	   ======================================== */
	/* Theme variables are defined in theme.css */
	/* Mapping old variables to new theme variables for backward compatibility */
	:root {
	  --color-primary: var(--theme-primary);
	  --color-primary-dark: var(--theme-primary-dark);
	  --color-primary-darker: var(--theme-primary-darker);
	  --color-primary-light: var(--theme-primary-light);
	  
	  --color-success: var(--theme-success);
	  --color-danger: var(--theme-danger);
	  --color-warning: var(--theme-warning);
	  --color-info: var(--theme-info);
	  
	  --color-text-primary: var(--theme-text-primary);
	  --color-text-secondary: var(--theme-text-secondary);
	  --color-text-muted: var(--theme-text-muted);
	  --color-border: var(--theme-border);
	  --color-border-light: var(--theme-border-light);
	  --color-bg: var(--theme-bg);
	  --color-bg-secondary: var(--theme-bg-secondary);
	}
	
	/* Dark mode inherits from theme.css — no overrides needed */
	
	/* ========================================
	   USER FEEDBACK / TOAST NOTIFICATIONS
	   ======================================== */
	.schedule-feedback {
	  margin-bottom: 1rem;
	  animation: slideDown 0.3s ease-out;
	}
	@keyframes slideDown {
	  from {
		opacity: 0;
		transform: translateY(-20px);
	  }
	  to {
		opacity: 1;
		transform: translateY(0);
	  }
	}
	.schedule-feedback-content {
	  display: flex;
	  align-items: center;
	  gap: 0.75rem;
	  padding: 1rem 1.25rem;
	  border-radius: 0.625rem;
	  font-size: 0.9375rem;
	  font-weight: 500;
	  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	}
	.schedule-feedback-content i {
	  font-size: 1.25rem;
	  flex-shrink: 0;
	}
	.schedule-feedback-content span {
	  flex: 1;
	}
	.schedule-feedback-close {
	  background: transparent;
	  border: none;
	  color: inherit;
	  opacity: 0.7;
	  cursor: pointer;
	  padding: 0.25rem;
	  display: flex;
	  align-items: center;
	  justify-content: center;
	  border-radius: 0.25rem;
	  transition: opacity 0.2s ease;
	}
	.schedule-feedback-close:hover {
	  opacity: 1;
	}
	.schedule-feedback-error {
	  background: linear-gradient(135deg, rgba(241, 65, 108, 0.15) 0%, rgba(241, 65, 108, 0.05) 100%);
	  border: 1px solid rgba(241, 65, 108, 0.3);
	  color: #f1416c;
	}
	.schedule-feedback-success {
	  background: linear-gradient(135deg, rgba(80, 205, 137, 0.15) 0%, rgba(80, 205, 137, 0.05) 100%);
	  border: 1px solid rgba(80, 205, 137, 0.3);
	  color: #50cd89;
	}
	.schedule-feedback-info {
	  background: linear-gradient(135deg, rgba(0, 158, 247, 0.15) 0%, rgba(0, 158, 247, 0.05) 100%);
	  border: 1px solid rgba(0, 158, 247, 0.3);
	  color: #009ef7;
	}
	[data-theme="dark"] .schedule-feedback-error {
	  background: linear-gradient(135deg, rgba(241, 65, 108, 0.2) 0%, rgba(241, 65, 108, 0.1) 100%);
	  border-color: rgba(241, 65, 108, 0.4);
	}
	[data-theme="dark"] .schedule-feedback-success {
	  background: linear-gradient(135deg, rgba(80, 205, 137, 0.2) 0%, rgba(80, 205, 137, 0.1) 100%);
	  border-color: rgba(80, 205, 137, 0.4);
	}
	[data-theme="dark"] .schedule-feedback-info {
	  background: linear-gradient(135deg, rgba(0, 158, 247, 0.2) 0%, rgba(0, 158, 247, 0.1) 100%);
	  border-color: rgba(0, 158, 247, 0.4);
	}
	
	/* ========================================
	   BASE STYLES
	   ======================================== */
	.mobile-optimized-card {
	  margin-bottom: 1rem;
	}
	@media (max-width: 576px) {
	  .mobile-optimized-card h3 {
		font-size: 1.25rem;
	  }
	  .mobile-optimized-card .btn-link {
		padding: 0.5rem;
	  }
	}
	/* Table Styles - Modern Clean */
	.table-responsive {
	  overflow-x: auto;
	  -webkit-overflow-scrolling: touch;
	  border-radius: 0.5rem;
	}
	.table {
	  margin-bottom: 0;
	  font-size: 0.875rem;
	}
	.table thead th {
	  white-space: nowrap;
	  background: var(--color-bg-secondary, #f8f9fa);
	  border-bottom: 2px solid var(--color-border-light, #e5e7eb);
	  font-weight: 600;
	  color: var(--color-text-secondary);
	  font-size: 0.75rem;
	  text-transform: uppercase;
	  letter-spacing: 0.03em;
	  padding: 0.625rem 0.75rem;
	}
	.table tbody td {
	  white-space: nowrap;
	  overflow: hidden;
	  text-overflow: ellipsis;
	  max-width: 180px;
	  padding: 0.625rem 0.75rem;
	  vertical-align: middle;
	  border-color: #f0f1f3;
	  color: var(--color-text-primary);
	}
	.table tbody tr:last-child td {
	  border-bottom: none;
	}
	.table tbody tr:hover {
	  background: #f5f7fa;
	}
	.table .time-column {
	  font-weight: 600;
	  color: #009ef7;
	  font-size: 0.8125rem;
	}
	.table .flag-img {
	  width: 24px;
	  height: 16px;
	  border-radius: 2px;
	  object-fit: cover;
	}
	@media (max-width: 576px) {
	  .table thead th,
	  .table tbody td {
		font-size: 0.75rem;
		padding: 0.375rem 0.5rem;
	  }
	}

	/* Active Run Highlight */
	.highlight-row {
	  background: rgba(0,158,247,0.05) !important;
	  border-left: 3px solid #009ef7;
	}
	.highlight-row td:first-child {
	  padding-left: calc(0.75rem - 3px);
	}
	.bib-number {
	  font-size: 0.75rem;
	  color: var(--color-text-secondary);
	  margin-left: 0.25rem;
	  font-weight: 500;
	}

	/* Icons for reordering or editing */
	.move-up-btn i, .move-down-btn i {
	  font-size: 1.1rem;
	  color: var(--color-text-secondary);
	}
	
	.move-up-btn:hover i, .move-down-btn:hover i {
	  color: var(--color-primary);
	}
	.edit-datetime-icon,
	.delete-datetime-icon {
	  cursor: pointer;
	  font-size: 1.2rem;
	  margin: 0 0.3rem;
	  line-height: 1.2;
	}
	.delete-datetime-icon {
	  color: red;
	}

	/* Badge samples */
	.badge {
	  display: inline-block;
	  padding: 0.25em 0.4em;
	  font-size: 75%;
	  font-weight: 700;
	  line-height: 1;
	  text-align: center;
	  white-space: nowrap;
	  vertical-align: middle;
	  border-radius: 0.375rem;
	}
	.bg-primary {
	  background-color: #0d6efd !important;
	  color: #fff !important;
	}
	.bg-danger {
	  background-color: #dc3545 !important;
	  color: #fff !important;
	}
	.me-2 {
	  margin-right: 0.5rem !important;
	}

	/* A "completed" card styling.  */
	.competition-complete-card {
	  border: 1px solid #d4edda;
	  border-radius: 6px;
	  padding: 1rem;
	  background-color: #d4edda; /* light greenish */
	  color: #155724;           /* dark greenish text */
	  margin-bottom: 2rem;
	}
	.competition-complete-card h3 {
	  margin-top: 0;
	}
	.competition-complete-card p {
	  margin: 0.75rem 0;
	}

	/* Custom Schedule Item Styles */
	.custom-schedule-item {
	  padding: 0.75rem;
	  padding-left: 2rem;
	  background: #f9fafb;
	  border-radius: 0.5rem;
	  margin-bottom: 0.75rem;
	  position: relative;
	  overflow: hidden;
	  border: 1px solid #e5e7eb;
	}
	.custom-schedule-item .discipline-badge {
	  position: absolute;
	  left: 0;
	  top: 0;
	  bottom: 0;
	  width: 1.5rem;
	  display: flex;
	  align-items: center;
	  justify-content: center;
	  font-weight: 700;
	  font-size: 0.5rem;
	  letter-spacing: 0.02em;
	  color: #fff;
	  writing-mode: vertical-rl;
	  text-orientation: mixed;
	  transform: rotate(180deg);
	  background: #50cd89; /* Green */
	  border-radius: 0;
	}
	.custom-schedule-item .custom-header-content {
	  display: flex;
	  flex-direction: column;
	  gap: 0.25rem;
	}
	.custom-schedule-item .custom-time-row {
	  display: flex;
	  align-items: center;
	  justify-content: space-between;
	  gap: 0.5rem;
	}
	.custom-schedule-item .custom-time {
	  font-size: 0.875rem;
	  font-weight: 600;
	  color: #009ef7;
	  display: flex;
	  align-items: center;
	  gap: 0.375rem;
	}
	.custom-schedule-item .custom-time i {
	  font-size: 0.8rem;
	}
	.custom-schedule-item .custom-duration {
	  font-size: 0.75rem;
	  color: #6b7280;
	  background: #f3f4f6;
	  padding: 0.125rem 0.5rem;
	  border-radius: 1rem;
	}
	.custom-schedule-item .custom-info-row {
	  display: flex;
	  align-items: center;
	  gap: 0.5rem;
	}
	.custom-schedule-item .custom-title {
	  font-weight: 600;
	  font-size: 0.9375rem;
	  color: var(--color-text-primary);
	  display: flex;
	  align-items: center;
	  gap: 0.5rem;
	}
	.custom-schedule-item .custom-title i {
	  color: #50cd89;
	  font-size: 1rem;
	}
	.custom-schedule-item .custom-description {
	  font-size: 0.8125rem;
	  color: var(--color-text-secondary);
	  margin-top: 0.25rem;
	}
	.custom-schedule-item .custom-actions {
	  display: flex;
	  gap: 0.25rem;
	  flex-shrink: 0;
	}
	.custom-schedule-item .custom-actions button {
	  background: transparent;
	  border: none;
	  color: var(--color-text-secondary);
	  padding: 0.375rem;
	  border-radius: 0.375rem;
	  cursor: pointer;
	  font-size: 0.875rem;
	  transition: all 0.15s ease;
	  display: flex;
	  align-items: center;
	  justify-content: center;
	  min-width: 44px;
	  min-height: 44px;
	}
	.custom-schedule-item .custom-actions button:hover {
	  background: #f3f4f6;
	  color: var(--color-text-primary);
	}
	.custom-schedule-item .custom-actions button:focus-visible {
	  outline: 2px solid var(--color-primary);
	  outline-offset: 2px;
	  box-shadow: 0 0 0 4px rgba(0, 158, 247, 0.2);
	}
	.custom-schedule-item .custom-actions .delete-btn {
	  color: #f1416c;
	}
	.custom-schedule-item .custom-actions .delete-btn:hover {
	  background: rgba(241, 65, 108, 0.1);
	  color: #f1416c;
	}
	.custom-schedule-item .custom-actions .delete-btn:focus-visible {
	  outline-color: var(--color-danger);
	  box-shadow: 0 0 0 4px rgba(241, 65, 108, 0.2);
	}

	/* Add Custom Entry Button */
	.add-custom-entry-btn {
	  background-color: #0d6efd;
	  border: none;
	  color: white;
	  padding: 0.5rem 1rem;
	  border-radius: 0.375rem;
	  cursor: pointer;
	  font-weight: 500;
	  font-size: 0.9rem;
	  display: inline-flex;
	  align-items: center;
	  gap: 0.5rem;
	  transition: background-color 0.2s ease;
	}
	.add-custom-entry-btn:hover {
	  background-color: #0b5ed7;
	}
	.add-custom-entry-btn i {
	  font-size: 1rem;
	}
	.add-custom-entry-container {
	  display: flex;
	  justify-content: flex-end;
	  margin-bottom: 1rem;
	}

	/* Custom Entry Modal - Modern Design */
	.custom-modal-overlay {
	  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: 9999;
	  padding: 1rem;
	  padding-top: calc(1rem + env(safe-area-inset-top, 0px));
	  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
	  padding-left: calc(1rem + env(safe-area-inset-left, 0px));
	  padding-right: calc(1rem + env(safe-area-inset-right, 0px));
	  backdrop-filter: blur(8px);
	  -webkit-backdrop-filter: blur(8px);
	  animation: modalFadeIn 0.2s ease-out;
	}
	@keyframes modalFadeIn {
	  from { opacity: 0; }
	  to { opacity: 1; }
	}
	.custom-modal {
	  background: #ffffff;
	  border-radius: 1rem;
	  width: 100%;
	  max-width: 440px;
	  max-height: 85vh;
	  overflow: hidden;
	  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	  animation: modalSlideIn 0.3s ease-out;
	  display: flex;
	  flex-direction: column;
	}
	@keyframes modalSlideIn {
	  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
	  to { opacity: 1; transform: scale(1) translateY(0); }
	}
	.custom-modal-header {
	  padding: 1.25rem 1.5rem;
	  background: linear-gradient(135deg, #009ef7 0%, #0077cc 100%);
	  display: flex;
	  justify-content: space-between;
	  align-items: center;
	  flex-shrink: 0;
	}
	.custom-modal-header h3 {
	  margin: 0;
	  font-size: 1.125rem;
	  font-weight: 600;
	  color: white;
	  letter-spacing: -0.01em;
	}
	.custom-modal-close {
	  background: rgba(255, 255, 255, 0.15);
	  border: none;
	  width: 32px;
	  height: 32px;
	  border-radius: 8px;
	  font-size: 1.25rem;
	  color: rgba(255, 255, 255, 0.9);
	  cursor: pointer;
	  display: flex;
	  align-items: center;
	  justify-content: center;
	  transition: all 0.15s ease;
	}
	.custom-modal-close:hover {
	  background: rgba(255, 255, 255, 0.25);
	  color: white;
	}
	.custom-modal-close:active {
	  transform: scale(0.95);
	}
	.custom-modal-body {
	  padding: 1.5rem;
	  overflow-y: auto;
	  flex: 1;
	}
	.custom-modal-body .form-group {
	  margin-bottom: 1.25rem;
	}
	.custom-modal-body .form-group:last-child {
	  margin-bottom: 0;
	}
	.custom-modal-body label {
	  display: flex;
	  align-items: center;
	  gap: 0.5rem;
	  font-weight: 600;
	  color: var(--color-text-primary);
	  margin-bottom: 0.5rem;
	  font-size: 0.875rem;
	  text-transform: uppercase;
	  letter-spacing: 0.025em;
	}
	.custom-modal-body label i {
	  font-size: 1rem;
	  color: #009ef7;
	}
	.custom-modal-body input,
	.custom-modal-body textarea {
	  width: 100%;
	  padding: 0.75rem 1rem;
	  border: 2px solid #e5e7eb;
	  border-radius: 0.625rem;
	  font-size: 1rem;
	  font-family: inherit;
	  transition: all 0.2s ease;
	  box-sizing: border-box;
	  background: #f9fafb;
	}
	.custom-modal-body input::placeholder,
	.custom-modal-body textarea::placeholder {
	  color: var(--color-text-muted);
	}
	.custom-modal-body input:hover,
	.custom-modal-body textarea:hover {
	  border-color: #d1d5db;
	}
	.custom-modal-body input:focus,
	.custom-modal-body textarea:focus {
	  outline: none;
	  border-color: #009ef7;
	  background: #ffffff;
	  box-shadow: 0 0 0 4px rgba(0, 158, 247, 0.1);
	}
	.custom-modal-body textarea {
	  resize: vertical;
	  min-height: 80px;
	}
	.custom-modal-body .form-row {
	  display: grid;
	  grid-template-columns: 1fr 1fr;
	  gap: 1rem;
	}
	.custom-modal-body .form-row-3 {
	  display: grid;
	  grid-template-columns: 1fr 1fr 1fr;
	  gap: 0.75rem;
	}
	.custom-modal-footer {
	  padding: 1rem 1.5rem;
	  border-top: 1px solid #f3f4f6;
	  display: flex;
	  gap: 0.75rem;
	  justify-content: flex-end;
	  background: #fafafa;
	  flex-shrink: 0;
	}
	.custom-modal-footer button {
	  padding: 0.75rem 1.5rem;
	  border-radius: 0.625rem;
	  font-weight: 600;
	  font-size: 0.9375rem;
	  cursor: pointer;
	  transition: all 0.15s ease;
	  border: none;
	}
	.custom-modal-footer .btn-cancel {
	  background: transparent;
	  color: var(--color-text-secondary);
	}
	.custom-modal-footer .btn-cancel:hover {
	  background: #f3f4f6;
	  color: var(--color-text-primary);
	}
	.custom-modal-footer .btn-save {
	  background: linear-gradient(135deg, #009ef7 0%, #0077cc 100%);
	  color: white;
	  box-shadow: 0 4px 14px -4px rgba(0, 158, 247, 0.4);
	}
	.custom-modal-footer .btn-save:hover {
	  transform: translateY(-1px);
	  box-shadow: 0 6px 20px -4px rgba(0, 158, 247, 0.5);
	}
	.custom-modal-footer .btn-save:active {
	  transform: translateY(0);
	}

	/* Delete Confirmation Modal */
	.delete-modal {
	  max-width: 380px;
	  text-align: center;
	}
	.delete-modal .custom-modal-header {
	  background: linear-gradient(135deg, #f1416c 0%, #d9214e 100%);
	  padding: 1.5rem 1.5rem 1rem;
	}
	.delete-modal .delete-icon {
	  width: 56px;
	  height: 56px;
	  background: rgba(255, 255, 255, 0.15);
	  border-radius: 50%;
	  display: flex;
	  align-items: center;
	  justify-content: center;
	  margin: 0 auto 0.75rem;
	}
	.delete-modal .delete-icon i {
	  font-size: 1.75rem;
	  color: white;
	}
	.delete-modal .custom-modal-header h3 {
	  width: 100%;
	  text-align: center;
	  font-size: 1.125rem;
	}
	.delete-modal .custom-modal-body {
	  padding: 1.5rem;
	}
	.delete-modal .delete-message {
	  color: var(--color-text-secondary);
	  font-size: 0.9375rem;
	  line-height: 1.5;
	  margin: 0;
	}
	.delete-modal .delete-hint {
	  color: var(--color-text-secondary);
	  font-size: 0.8125rem;
	  line-height: 1.4;
	  margin: 0.75rem 0 0;
	  font-style: italic;
	}
	[data-theme="dark"] .delete-modal .delete-hint {
	  color: #a1a5b7;
	}
	.delete-modal .delete-item-name {
	  font-weight: 600;
	  color: var(--color-text-primary);
	  display: block;
	  margin-top: 0.5rem;
	  padding: 0.5rem 0.75rem;
	  background: #f3f4f6;
	  border-radius: 0.5rem;
	  font-size: 0.875rem;
	}
	.delete-modal .custom-modal-footer {
	  justify-content: center;
	  gap: 0.75rem;
	}
	.delete-modal .btn-delete {
	  background: linear-gradient(135deg, #f1416c 0%, #d9214e 100%);
	  color: white;
	  border: none;
	  padding: 0.75rem 1.5rem;
	  border-radius: 0.625rem;
	  font-weight: 600;
	  font-size: 0.9375rem;
	  cursor: pointer;
	  transition: all 0.15s ease;
	  box-shadow: 0 4px 14px -4px rgba(241, 65, 108, 0.4);
	}
	.delete-modal .btn-delete:hover {
	  transform: translateY(-1px);
	  box-shadow: 0 6px 20px -4px rgba(241, 65, 108, 0.5);
	}
	.delete-modal .btn-delete:active {
	  transform: translateY(0);
	}
	
	/* Delete Modal Dark Mode */
	[data-theme="dark"] .delete-modal .delete-message {
	  color: #a1a5b7;
	}
	[data-theme="dark"] .delete-modal .delete-item-name {
	  background: #252536;
	  color: #fff;
	}
	
	/* Delete Modal Mobile */
	@media (max-width: 576px) {
	  .delete-modal {
		max-width: 100%;
	  }
	  .delete-modal .custom-modal-footer {
		flex-direction: column-reverse;
	  }
	  .delete-modal .btn-delete,
	  .delete-modal .btn-cancel {
		width: 100%;
		padding: 1rem;
	  }
	}

	/* Mobile Optimizations - Custom Items */
	@media (max-width: 576px) {
	  .custom-schedule-item {
		padding: 0.625rem;
		padding-left: 1.75rem;
		border-radius: 0.5rem;
	  }
	  .custom-schedule-item .discipline-badge {
		width: 1.25rem;
		font-size: 0.4rem;
	  }
	  .custom-schedule-item .custom-title {
		font-size: 0.875rem;
	  }
	  .custom-schedule-item .custom-time {
		font-size: 0.8125rem;
	  }
	  .custom-schedule-item .custom-description {
		font-size: 0.75rem;
	  }
	  .custom-schedule-item .custom-actions button {
		min-width: 44px;
		min-height: 44px;
	  }
	  .add-custom-entry-btn {
		width: 100%;
		justify-content: center;
		padding: 0.85rem 1rem;
		margin-top: 0.75rem;
	  }
	}

	/* ========================================
	   MOBILE-FIRST OPTIMIZATIONS
	   ======================================== */

	/* Day Card - make entire card sticky-aware */
	.mobile-optimized-card {
	  overflow: visible;
	}
	.mobile-optimized-card > .card-header {
	  position: sticky;
	  top: 60px; /* Account for main header */
	  top: calc(60px + env(safe-area-inset-top, 0px));
	  z-index: 50;
	  background: #fff;
	  border-bottom: 1px solid #e5e7eb;
	}
	@media (max-width: 576px) {
	  .mobile-optimized-card > .card-header {
		top: env(safe-area-inset-top, 0px);
		box-shadow: 0 2px 4px rgba(0,0,0,0.08);
	  }
	}
	
	/* Schedule Day Header - Modern CI Design */
	.schedule-day-header {
	  display: flex;
	  justify-content: space-between;
	  align-items: center;
	  flex-wrap: wrap;
	  gap: 0.75rem;
	  padding: 1rem 1.5rem;
	  background: linear-gradient(135deg, #009ef7 0%, #0078c8 100%);
	  border-radius: 12px;
	  margin-bottom: 1rem;
	  box-shadow: 0 4px 15px rgba(0, 158, 247, 0.25);
	  border: none;
	}
	.day-header-main {
	  display: flex;
	  align-items: center;
	  gap: 0.75rem;
	  flex-wrap: wrap;
	}
	.day-icon {
	  display: flex;
	  align-items: center;
	  justify-content: center;
	  width: 38px;
	  height: 38px;
	  background: rgba(255,255,255,0.3);
	  border-radius: 10px;
	  font-size: 1.125rem;
	  color: #fff;
	}
	.day-name {
	  font-size: 1.25rem;
	  font-weight: 700;
	  color: #fff;
	}
	.day-date {
	  font-size: 0.9375rem;
	  color: rgba(255,255,255,0.85);
	  font-weight: 500;
	}
	.day-timerange {
	  display: flex;
	  align-items: center;
	  gap: 0.5rem;
	  padding: 0.5rem 1rem;
	  background: rgba(255,255,255,0.15);
	  border-radius: 20px;
	  font-size: 0.875rem;
	  font-weight: 600;
	  color: #fff;
	}
	.day-timerange > i:first-child {
	  font-size: 0.875rem;
	  color: #fff;
	}
	.day-time-planned {
	  color: #fff;
	}
	.day-time-arrow {
	  color: rgba(255,255,255,0.7);
	  font-size: 0.75rem;
	}
	.day-time-live {
	  color: #fff;
	  font-weight: 700;
	}
	.day-timerange .delay-chip {
	  font-size: 0.6875rem;
	  padding: 0.2rem 0.5rem;
	  margin-left: 0.25rem;
	  border-radius: 10px;
	}
	.day-timerange .delay-chip.on-time {
	  background: rgba(255,255,255,0.25);
	  color: #fff;
	}
	.day-timerange .delay-chip.ahead {
	  background: rgba(255,255,255,0.25);
	  color: #fff;
	}
	.day-timerange .delay-chip.slight-delay {
	  background: rgba(255,255,255,0.25);
	  color: #fff;
	}
	.day-timerange .delay-chip.moderate-delay {
	  background: rgba(246,194,62,0.85);
	  color: #1a1a1a;
	}
	.day-timerange .delay-chip.heavy-delay {
	  background: rgba(255,255,255,0.9);
	  color: #dc2626;
	  font-weight: 600;
	}
	@media (max-width: 576px) {
	  .schedule-day-header {
		padding: 0.875rem 1rem;
		border-radius: 10px;
		margin-bottom: 0.75rem;
	  }
	  .day-header-main {
		gap: 0.5rem;
		flex: 1;
	  }
	  .day-icon {
		width: 32px;
		height: 32px;
		font-size: 1rem;
		border-radius: 8px;
	  }
	  .day-name {
		font-size: 1rem;
		font-weight: 700;
	  }
	  .day-date {
		font-size: 0.75rem;
	  }
	  .day-timerange {
		font-size: 0.75rem;
		padding: 0.375rem 0.75rem;
		gap: 0.375rem;
	  }
	  .day-time-arrow {
		font-size: 0.625rem;
	  }
	  .day-timerange .delay-chip {
		font-size: 0.5625rem;
		padding: 0.15rem 0.375rem;
	  }
	}

	/* Schedule Day Content Container */
	.schedule-day-content {
	  padding: 0.75rem;
	}
	@media (min-width: 576px) {
	  .schedule-day-content {
		padding: 1rem 1.25rem;
	  }
	}

	/* Mobile Run Cards - Modern Clean Style */
	.mobile-run-cards {
	  display: none;
	  padding: 0.25rem 0;
	}
	/* Ensure mobile cards are visible on mobile */
	@media (max-width: 576px) {
	  .mobile-run-cards {
		display: block !important;
	  }
	}
	.mobile-run-card {
	  background: #fff;
	  border: 1px solid #e5e7eb;
	  border-radius: 0.625rem;
	  padding: 0.75rem 1rem;
	  margin-bottom: 0.5rem;
	  transition: all 0.15s ease;
	  border-left: 3px solid #e5e7eb;
	}
	.mobile-run-card:last-child {
	  margin-bottom: 0;
	}
	.mobile-run-card.active-run {
	  border-left-color: #009ef7;
	  background: linear-gradient(90deg, rgba(0,158,247,0.06) 0%, #fff 100%);
	  box-shadow: 0 4px 12px rgba(0,158,247,0.12);
	}
	.mobile-run-card.completed-run {
	  border-left-color: #50cd89;
	  background: #fafffe;
	}
	.mobile-run-card .run-header {
	  display: flex;
	  justify-content: space-between;
	  align-items: center;
	  margin-bottom: 0.5rem;
	}
	.mobile-run-card .run-time {
	  font-size: 0.8125rem;
	  color: #009ef7;
	  font-weight: 600;
	  display: flex;
	  align-items: center;
	  gap: 0.25rem;
	}
	.mobile-run-card .run-time i {
	  font-size: 0.75rem;
	}
	.mobile-run-card .run-number {
	  font-size: 0.6875rem;
	  font-weight: 700;
	  color: #6b7280;
	  background: #f3f4f6;
	  padding: 0.25rem 0.5rem;
	  border-radius: 1rem;
	  letter-spacing: 0.02em;
	}
	.mobile-run-card .athlete-info {
	  display: flex;
	  align-items: center;
	  gap: 0.625rem;
	  margin-bottom: 0.5rem;
	}
	.mobile-run-card .athlete-flag {
	  flex-shrink: 0;
	}
	.mobile-run-card .athlete-flag .flag-img {
	  width: 26px;
	  height: 18px;
	  border-radius: 3px;
	  object-fit: cover;
	}
	.mobile-run-card .athlete-flag .country-code {
	  font-size: 0.6875rem;
	  font-weight: 600;
	  color: #6b7280;
	  background: #f3f4f6;
	  padding: 0.2rem 0.4rem;
	  border-radius: 0.25rem;
	}
	.mobile-run-card .athlete-name {
	  font-size: 0.9375rem;
	  font-weight: 600;
	  color: var(--color-text-primary);
	  flex: 1;
	}
	.mobile-run-card .athlete-bib {
	  font-size: 0.75rem;
	  color: var(--color-text-secondary);
	  font-weight: 500;
	}
	.mobile-run-card .run-footer {
	  display: flex;
	  justify-content: space-between;
	  align-items: center;
	  padding-top: 0.5rem;
	  border-top: 1px solid #f3f4f6;
	}
	.mobile-run-card .run-score {
	  font-size: 1.125rem;
	  font-weight: 700;
	}
	.mobile-run-card .run-score.score-pending {
	  color: var(--color-text-secondary);
	  font-weight: 500;
	  font-size: 0.875rem;
	}
	.mobile-run-card .run-score.score-completed {
	  color: #50cd89;
	}
	.mobile-run-card .run-score.score-live {
	  color: #009ef7;
	  animation: pulse 1.5s infinite;
	}
	@keyframes pulse {
	  0%, 100% { opacity: 1; }
	  50% { opacity: 0.6; }
	}
	.mobile-run-card .status-chip {
	  font-size: 0.6875rem;
	  font-weight: 700;
	  padding: 0.25rem 0.625rem;
	  border-radius: 1rem;
	  text-transform: uppercase;
	  letter-spacing: 0.02em;
	}
	.status-chip.chip-pending {
	  background: #f3f4f6;
	  color: #6b7280;
	}
	.status-chip.chip-live {
	  background: rgba(0,158,247,0.12);
	  color: #009ef7;
	}
	.status-chip.chip-completed {
	  background: rgba(80,205,137,0.12);
	  color: #50cd89;
	}
	.status-chip.chip-dns {
	  background: rgba(59,130,246,0.12);
	  color: #3b82f6;
	}
	.status-chip.chip-frs {
	  background: rgba(202,138,4,0.12);
	  color: #a16207;
	}
	.status-chip.chip-dsq {
	  background: rgba(241,65,108,0.12);
	  color: #f1416c;
	}

	/* Desktop Table (hide on mobile) */
	.desktop-table {
	  display: block;
	}
	/* Hide desktop table on mobile */
	@media (max-width: 576px) {
	  .desktop-table {
		display: none !important;
	  }
	}

	/* Touch-optimized Action Buttons */
	.touch-action-btn {
	  min-width: 44px;
	  min-height: 44px;
	  display: inline-flex;
	  align-items: center;
	  justify-content: center;
	  border-radius: 0.5rem;
	  transition: all 0.2s ease;
	  color: var(--color-text-secondary);
	}
	
	.touch-action-btn:hover {
	  background-color: rgba(0,158,247,0.08);
	  color: #009ef7;
	}
	.touch-action-btn:active {
	  background-color: rgba(0,158,247,0.15);
	  transform: scale(0.95);
	}
	.touch-action-btn.delete-btn:hover {
	  background-color: rgba(241,65,108,0.1);
	  color: #f1416c;
	}
	
	/* Focus states for accessibility */
	.touch-action-btn:focus-visible,
	.schedule-actions .btn-link:focus-visible,
	.group-tab:focus-visible,
	.add-custom-entry-btn:focus-visible,
	.schedule-feedback-close:focus-visible,
	.custom-modal-close:focus-visible,
	.custom-modal-footer button:focus-visible,
	.delete-modal .btn-delete:focus-visible,
	.delete-modal .btn-cancel:focus-visible,
	.toggle-collapse-btn:focus-visible {
	  outline: 2px solid var(--color-primary);
	  outline-offset: 2px;
	  box-shadow: 0 0 0 4px rgba(0, 158, 247, 0.2);
	}
	
	.touch-action-btn.delete-btn:focus-visible {
	  outline-color: var(--color-danger);
	  box-shadow: 0 0 0 4px rgba(241, 65, 108, 0.2);
	}
	
	/* Mobile focus states - also show on :focus for touch devices */
	@media (max-width: 576px) {
	  .touch-action-btn:focus,
	  .schedule-actions .btn-link:focus,
	  .group-tab:focus,
	  .add-custom-entry-btn:focus,
	  .schedule-feedback-close:focus,
	  .custom-modal-close:focus,
	  .custom-modal-footer button:focus,
	  .delete-modal .btn-delete:focus,
	  .delete-modal .btn-cancel:focus,
	  .toggle-collapse-btn:focus,
	  .custom-schedule-item .custom-actions button:focus {
		outline: 2px solid var(--color-primary);
		outline-offset: 2px;
		box-shadow: 0 0 0 4px rgba(0, 158, 247, 0.2);
	  }
	  
	  .touch-action-btn.delete-btn:focus,
	  .custom-schedule-item .custom-actions .delete-btn:focus {
		outline-color: var(--color-danger);
		box-shadow: 0 0 0 4px rgba(241, 65, 108, 0.2);
	  }
	}
	
	.schedule-actions {
	  display: flex;
	  gap: 0.25rem;
	  flex-wrap: wrap;
	}

	/* Group Tabs for Mobile */
	.group-tabs {
	  display: none;
	  overflow-x: auto;
	  white-space: nowrap;
	  padding: 0.5rem 0;
	  margin-bottom: 0.75rem;
	  -webkit-overflow-scrolling: touch;
	  scrollbar-width: none;
	}
	.group-tabs::-webkit-scrollbar {
	  display: none;
	}
	.group-tab {
	  display: inline-block;
	  padding: 0.5rem 1rem;
	  margin-right: 0.5rem;
	  border-radius: 2rem;
	  font-size: 0.85rem;
	  font-weight: 500;
	  color: #5E6278;
	  background: #f5f8fa;
	  border: none;
	  cursor: pointer;
	  transition: all 0.2s ease;
	}
	.group-tab:last-child {
	  margin-right: 0;
	}
	.group-tab.active {
	  background: #009ef7;
	  color: #fff;
	}
	.group-tab.has-active {
	  background: rgba(0,158,247,0.15);
	  color: #009ef7;
	}
	/* Desktop: Show all group contents */
	.group-content {
	  display: block;
	}
	.group-contents {
	  margin-top: 0;
	}

	/* Schedule Item Styling */
	.schedule-item {
	  padding: 0.5rem 0;
	}
	.schedule-item-header {
	  padding: 0.75rem;
	  padding-left: 2rem;
	  background: #f9fafb;
	  border-radius: 0.5rem;
	  margin-bottom: 0;
	  position: relative;
	  overflow: hidden;
	}
	/* Discipline badge in left border - vertical text */
	.discipline-badge {
	  position: absolute;
	  left: 0;
	  top: 0;
	  bottom: 0;
	  width: 1.5rem;
	  display: flex;
	  align-items: center;
	  justify-content: center;
	  font-weight: 700;
	  font-size: 0.65rem;
	  letter-spacing: 0.05em;
	  color: #fff;
	  writing-mode: vertical-rl;
	  text-orientation: mixed;
	  transform: rotate(180deg);
	  background: #009ef7;
	  border-radius: 0;
	}
	.discipline-badge.discipline-wb {
	  background: #009ef7;
	}
	.discipline-badge.discipline-ws {
	  background: #dc3545;
	}
	.discipline-badge.discipline-st {
	  background: #ffc107;
	  color: #181C32;
	}
	
	/* Groups container - indented to show hierarchy */
	.schedule-item .group-contents {
	  margin-left: 1.5rem;
	  padding-left: 0.5rem;
	  padding-top: 0.5rem;
	}
	.schedule-header-content {
	  display: flex;
	  flex-direction: column;
	  gap: 0.25rem;
	  flex: 1;
	}
	.schedule-time-row {
	  display: flex;
	  justify-content: space-between;
	  align-items: center;
	  gap: 0.5rem;
	}
	.schedule-info-row {
	  display: flex;
	  align-items: center;
	  gap: 0.5rem;
	}
	.schedule-time-container {
	  display: flex;
	  align-items: center;
	  gap: 0.5rem;
	  flex-wrap: wrap;
	}
	.schedule-time-container .delay-chip {
	  font-size: 0.6875rem;
	  padding: 0.125rem 0.5rem;
	  border-radius: 1rem;
	}
	.schedule-name {
	  color: var(--color-text-primary);
	  font-weight: 600;
	  font-size: 0.9375rem;
	  display: flex;
	  align-items: center;
	  gap: 0.5rem;
	}
	.schedule-name i {
	  color: #009ef7;
	  font-size: 0.875rem;
	}
	.schedule-actions {
	  display: flex;
	  gap: 0.125rem;
	  align-items: center;
	  flex-shrink: 0;
	}
	.schedule-actions .btn-link,
	.schedule-actions .touch-action-btn {
	  background: transparent;
	  border: none;
	  color: var(--color-text-secondary);
	  padding: 0.375rem;
	  border-radius: 0.375rem;
	  transition: all 0.15s ease;
	  display: flex;
	  align-items: center;
	  justify-content: center;
	}
	
	.schedule-actions .btn-link i,
	.schedule-actions .touch-action-btn i {
	  color: var(--color-text-secondary);
	}
	
	.schedule-actions .btn-link:hover i,
	.schedule-actions .touch-action-btn:hover i {
	  color: var(--color-primary);
	}
	.schedule-actions .btn-link:hover,
	.schedule-actions .touch-action-btn:hover {
	  background: #f3f4f6;
	  color: var(--color-text-primary);
	}
	
	/* Group Card - Modern Clean Look */
	.group-content .card {
	  border: none;
	  box-shadow: none;
	  background: transparent;
	}
	.group-content .card-header {
	  background: #f3f4f6;
	  border: none;
	  border-radius: 0.5rem;
	  padding: 0.625rem 0.875rem;
	  margin-bottom: 0.25rem;
	  transition: all 0.15s ease;
	  border-left: 3px solid transparent;
	}
	.group-content .card-header:hover {
	  background: #eef0f3;
	}
	.group-content .card-header .btn-link {
	  font-size: 0.875rem;
	  font-weight: 500;
	  color: var(--color-text-secondary);
	  text-decoration: none;
	  padding: 0;
	  display: flex;
	  align-items: center;
	  gap: 0.625rem;
	  width: 100%;
	}
	.group-time-display {
	  display: flex;
	  align-items: center;
	  gap: 0.375rem;
	  font-size: 0.8125rem;
	  color: #009ef7;
	  font-weight: 600;
	}
	.group-time-display i {
	  font-size: 0.75rem;
	}
	.group-planned-time {
	  font-weight: 600;
	  color: #009ef7;
	}
	.group-arrow {
	  color: var(--color-text-secondary);
	  font-size: 0.625rem;
	}
	.group-live-time {
	  font-weight: 600;
	  color: var(--color-text-secondary);
	}
	.group-label {
	  font-weight: 600;
	  color: var(--color-text-primary);
	  font-size: 0.875rem;
	}
	.group-content .card-header .btn-link::after {
	  content: "›";
	  font-size: 1rem;
	  color: var(--color-text-secondary);
	  margin-left: auto;
	  transition: transform 0.2s ease;
	}
	.group-content .card-header .btn-link[aria-expanded="true"]::after {
	  transform: rotate(90deg);
	}
	.group-content.active .card-header {
	  background: linear-gradient(90deg, rgba(0,158,247,0.12) 0%, #f3f4f6 100%);
	  border-left-color: #009ef7;
	}
	.group-content.active .card-header .btn-link {
	  color: #009ef7;
	  font-weight: 600;
	}
	.group-content.active .group-label {
	  color: #009ef7;
	}
	.group-content.completed .card-header {
	  background: linear-gradient(90deg, rgba(80,205,137,0.1) 0%, #f3f4f6 100%);
	  border-left-color: #50cd89;
	}
	.group-content.completed .card-header .btn-link {
	  color: #50cd89;
	}
	.group-content.completed .group-label {
	  color: #50cd89;
	}
	.group-completed-badge {
	  color: #50cd89;
	  font-size: 0.8125rem;
	  margin-left: auto;
	}
	.group-completed-badge i {
	  font-size: 0.875rem;
	}
	.group-content .card-body {
	  padding: 0.5rem 0;
	}
	.group-content .collapse {
	  border: none;
	}
	
	@media (max-width: 576px) {
	  .schedule-item {
		padding: 0.35rem 0;
	  }
	  .schedule-item-header {
		padding: 0.6rem;
		margin-bottom: 0.35rem;
		border-left-width: 3px;
	  }
	  .schedule-header-content {
		gap: 0.25rem;
	  }
	  .schedule-time-row {
		flex-wrap: wrap;
	  }
	  .schedule-time-info {
		font-size: 0.8125rem;
	  }
	  .schedule-time-info .time-arrow {
		font-size: 0.625rem;
	  }
	  .schedule-time-info .time-planned-small {
		font-size: 0.6875rem;
	  }
	  .schedule-time-container .delay-chip {
		font-size: 0.625rem;
		padding: 0.1rem 0.375rem;
	  }
	  .schedule-name {
		font-size: 0.875rem;
	  }
	  .schedule-name i {
		font-size: 0.8rem;
	  }
	  .schedule-actions {
		gap: 0;
	  }
	  .schedule-actions .btn-link {
		padding: 0.25rem !important;
	  }
	  /* Group header mobile */
	  .group-time-display {
		font-size: 0.8rem;
	  }
	  .group-label {
		font-size: 0.85rem;
	  }
	}

	/* Mobile Bottom Sheet Modal */
	@media (max-width: 576px) {
	  .custom-modal-overlay {
		align-items: flex-end;
		padding: 0;
		animation: none;
	  }
	  .custom-modal {
		width: 100%;
		max-width: 100%;
		max-height: 92vh;
		border-radius: 1.25rem 1.25rem 0 0;
		animation: mobileSlideUp 0.35s cubic-bezier(0.32, 0.72, 0, 1);
	  }
	  @keyframes mobileSlideUp {
		from { transform: translateY(100%); opacity: 0.5; }
		to { transform: translateY(0); opacity: 1; }
	  }
	  .custom-modal-header {
		border-radius: 0;
		padding: 0.75rem 1.25rem 1rem;
		padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
		position: relative;
	  }
	  .custom-modal-header::before {
		content: '';
		position: absolute;
		top: calc(0.5rem + env(safe-area-inset-top, 0px));
		left: 50%;
		transform: translateX(-50%);
		width: 36px;
		height: 4px;
		background: rgba(255,255,255,0.35);
		border-radius: 2px;
	  }
	  .custom-modal-header h3 {
		margin-top: 0.5rem;
	  }
	  .custom-modal-body {
		padding: 1.25rem;
	  }
	  .custom-modal-body .form-row,
	  .custom-modal-body .form-row-3 {
		grid-template-columns: 1fr 1fr;
	  }
	  .custom-modal-body label {
		font-size: 0.8125rem;
	  }
	  .custom-modal-body input,
	  .custom-modal-body textarea {
		padding: 0.875rem 1rem;
		font-size: 16px; /* Prevent iOS zoom */
	  }
	  .custom-modal-footer {
		flex-direction: column-reverse;
		gap: 0.625rem;
		padding: 1rem 1.25rem;
		padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
		background: #f8f9fa;
	  }
	  .custom-modal-footer button {
		width: 100%;
		padding: 1rem;
		font-size: 1rem;
		border-radius: 0.75rem;
	  }
	  .custom-modal-footer .btn-save {
		order: -1;
	  }
	  .custom-modal-footer .btn-cancel {
		background: #e5e7eb;
		color: #374151;
	  }

	  /* Switch to Mobile View */
	  .desktop-table {
		display: none !important;
	  }
	  .mobile-run-cards {
		display: block;
		padding: 0.375rem;
	  }
	  .group-tabs {
		display: flex;
	  }
	  .card-header .btn-link {
		display: none;
	  }
	  
	  /* Mobile: All groups visible */
	  .group-content {
		display: block;
		margin-bottom: 0.375rem;
	  }
	  
	  /* Mobile group styling - clean modern look */
	  .group-content .card {
		border: none;
		box-shadow: none;
		background: transparent;
		border-radius: 0;
	  }
	  .group-content .card-header {
		display: block;
		background: #f3f4f6;
		padding: 0.75rem 1rem;
		border: none;
		border-radius: 0.5rem;
		margin-bottom: 0.25rem;
		border-left: 3px solid transparent;
	  }
	  .group-content .card-header .btn-link {
		display: flex !important;
		font-size: 0.875rem;
		font-weight: 500;
		color: #4b5563;
		padding: 0;
		width: 100%;
		text-align: left;
		gap: 0.5rem;
	  }
	  .group-content .card-header .group-time-display {
		font-size: 0.8125rem;
		color: #009ef7;
		font-weight: 600;
	  }
	  .group-content .card-header .group-label {
		font-weight: 600;
		color: #1f2937;
	  }
	  .group-content.active .card-header {
		background: linear-gradient(90deg, rgba(0,158,247,0.1) 0%, #f3f4f6 100%);
		border-left-color: #009ef7;
	  }
	  .group-content.active .card-header .btn-link {
		color: #009ef7;
		font-weight: 600;
	  }
	  .group-content.active .card-header .group-label {
		color: #009ef7;
	  }
	  .group-content.completed .card-header {
		background: linear-gradient(90deg, rgba(80,205,137,0.08) 0%, #f3f4f6 100%);
		border-left-color: #50cd89;
	  }
	  .group-content.completed .card-header .group-label {
		color: #50cd89;
	  }
	  
	  /* All groups collapsed by default */
	  .group-content .collapse {
		display: none;
	  }
	  .group-content .collapse.show {
		display: block;
	  }
	  
	  /* Collapsed indicator - all groups collapsed by default */
	  .group-content .card-header .btn-link::after {
		content: "▶";
		margin-left: auto;
		font-size: 0.65rem;
		opacity: 0.5;
	  }
	  .group-content .card-header .btn-link[aria-expanded="true"]::after {
		content: "▼";
	  }
	  
	  /* Mobile Group Container Styling */
	  .group-contents {
		background: transparent;
		border-radius: 0;
		padding: 0;
		margin-top: 0;
	  }
	  
	  /* Mobile: Hide horizontal tabs, show collapsible cards instead */
	  .group-tabs {
		display: none !important;
	  }
	  
	  /* Mobile Run Card Improvements */
	  .mobile-run-cards {
		padding: 0;
	  }
	  .mobile-run-card {
		background: #fff;
		border-radius: 0.375rem;
		padding: 0.625rem 0.75rem;
		margin-bottom: 0.375rem;
		border: 1px solid #e5e7eb;
		border-left: 3px solid #e5e7eb;
	  }
	  .mobile-run-card:last-child {
		margin-bottom: 0;
	  }
	  .mobile-run-card.active-run {
		border-left-color: #009ef7;
		background: #f0f9ff;
		border-color: #009ef7;
	  }
	  .mobile-run-card.completed-run {
		border-left-color: #50cd89;
		background: #f8fff8;
	  }
	  .mobile-run-card .run-header {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 0.35rem;
	  }
	  .mobile-run-card .run-number {
		font-size: 0.7rem;
		font-weight: 600;
		color: #5E6278;
		background: #f5f8fa;
		padding: 0.1rem 0.4rem;
		border-radius: 0.25rem;
	  }
	  .mobile-run-card .run-time {
		font-size: 0.7rem;
		color: var(--color-text-secondary);
		font-weight: 500;
	  }
	  .mobile-run-card .athlete-info {
		display: flex;
		align-items: center;
		gap: 0.5rem;
	  }
	  .mobile-run-card .athlete-flag {
		display: flex;
		align-items: center;
	  }
	  .mobile-run-card .athlete-flag .flag-img {
		width: 24px;
		height: 18px;
		border-radius: 2px;
		object-fit: cover;
	  }
	  .mobile-run-card .athlete-flag .country-code {
		font-size: 0.75rem;
		font-weight: 600;
		color: var(--color-text-secondary);
		background: #f5f8fa;
		padding: 0.15rem 0.4rem;
		border-radius: 0.25rem;
	  }
	  .mobile-run-card .athlete-name {
		font-weight: 600;
		font-size: 0.95rem;
		color: var(--color-text-primary);
	  }
	  .mobile-run-card .athlete-bib {
		font-size: 0.8rem;
		color: var(--color-text-secondary);
	  }
	  .mobile-run-card .run-score {
		margin-top: 0.25rem;
		font-size: 0.85rem;
		text-align: right;
	  }
	  .mobile-run-card .run-score .score-value {
		font-weight: 700;
		font-size: 1.1rem;
		color: #009ef7;
	  }
	  .mobile-run-card .run-score .score-status {
		color: var(--color-text-secondary);
		font-style: italic;
	  }
	  .mobile-run-card.active-run .run-score .score-status {
		color: #009ef7;
		font-weight: 600;
	  }
	  
	  /* Custom Schedule Items - Mobile optimized */
	  .custom-schedule-item {
		margin: 0.5rem 0;
	  }
	  .custom-schedule-item .custom-actions {
		display: flex;
		gap: 0.125rem;
	  }
	  .custom-schedule-item .custom-actions button {
		min-width: 44px;
		min-height: 44px;
	  }

	  /* Touch Actions */
	  .schedule-actions {
		margin-top: 0.5rem;
	  }
	  .touch-action-btn {
		flex: 1;
		min-height: 48px;
		background: #f5f8fa;
		border: 1px solid #e5e7eb;
	  }
	  .touch-action-btn i {
		font-size: 1.25rem;
	  }
	  .touch-action-btn.delete-btn {
		background: rgba(241,65,108,0.1);
		border-color: rgba(241,65,108,0.3);
		color: #f1416c;
	  }

	  /* Schedule Item Header */
	  .schedule-item-header {
		flex-direction: column;
		align-items: flex-start !important;
		gap: 0.5rem;
	  }
	  .schedule-item-header .fw-bold {
		font-size: 1rem;
	  }
	}

	/* Tablet Optimizations */
	@media (min-width: 577px) and (max-width: 991px) {
	  .touch-action-btn {
		min-width: 44px;
		min-height: 44px;
	  }
	}

	/* ========================================
	   TIME DEVIATION DISPLAY
	   ======================================== */
	
	/* Schedule Time Info - Modern inline display */
	.schedule-time-info {
	  display: inline-flex;
	  align-items: center;
	  gap: 0.375rem;
	  font-size: 0.875rem;
	  font-weight: 600;
	  color: #009ef7;
	}
	.schedule-time-info i {
	  font-size: 0.8rem;
	}
	.schedule-time-info .time-value {
	  font-weight: 600;
	}
	.schedule-time-info .time-arrow {
	  color: var(--color-text-secondary);
	  font-size: 0.75rem;
	}
	.schedule-time-info .time-live {
	  color: #009ef7;
	}
	.schedule-time-info .time-planned-small {
	  font-size: 0.75rem;
	  color: var(--color-text-secondary);
	  font-weight: 500;
	  text-decoration: line-through;
	}
	.schedule-time-info.active {
	  color: #009ef7;
	}
	.schedule-time-info.active .time-live {
	  animation: pulse 1.5s infinite;
	}
	
	/* Legacy support */
	.time-display {
	  display: flex;
	  align-items: center;
	  gap: 0.5rem;
	  flex-wrap: wrap;
	}
	.time-planned {
	  font-weight: 600;
	  color: #009ef7;
	  font-size: 0.875rem;
	}
	.time-live {
	  font-size: 0.8125rem;
	  color: #6b7280;
	}
	
	/* Delay Chip - Base */
	.delay-chip {
	  display: inline-flex;
	  align-items: center;
	  gap: 0.2rem;
	  padding: 0.15rem 0.4rem;
	  border-radius: 0.25rem;
	  font-size: 0.75rem;
	  font-weight: 600;
	  white-space: nowrap;
	}
	.delay-chip i {
	  font-size: 0.7rem;
	}
	
	/* On time (within ±2 min) */
	.delay-chip.on-time {
	  background: rgba(80, 205, 137, 0.15);
	  color: #50cd89;
	}
	
	/* Ahead of schedule (negative delay) */
	.delay-chip.ahead {
	  background: rgba(80, 205, 137, 0.15);
	  color: #50cd89;
	}
	
	/* Slight delay (1-15 min) */
	.delay-chip.slight-delay {
	  background: rgba(202, 138, 4, 0.12);
	  color: #a16207;
	}
	
	/* Significant delay (15-30 min) */
	.delay-chip.moderate-delay {
	  background: rgba(234, 88, 12, 0.12);
	  color: #c2410c;
	}
	
	/* Heavy delay (>30 min) */
	.delay-chip.heavy-delay {
	  background: rgba(241, 65, 108, 0.15);
	  color: #f1416c;
	}
	
	/* Schedule Header Time Display */
	.schedule-time-container {
	  display: flex;
	  align-items: center;
	  gap: 0.5rem;
	  flex-wrap: wrap;
	}
	.schedule-time-planned {
	  font-weight: 600;
	  color: #181C32;
	}
	.schedule-time-live {
	  font-weight: 500;
	  color: #009ef7;
	}
	
	/* Run Table Time Columns */
	.table .time-column {
	  min-width: 130px;
	}
	.time-cell {
	  display: inline-flex;
	  align-items: center;
	  gap: 0.3rem;
	}
	.time-cell .planned {
	  color: var(--color-text-secondary);
	  font-size: 0.8125rem;
	}
	.time-cell .planned-crossed {
	  color: #9ca3af;
	  font-size: 0.75rem;
	  text-decoration: line-through;
	}
	.time-cell .time-arrow {
	  color: #b0b5c3;
	  font-size: 0.65rem;
	}
	.time-cell .live {
	  font-weight: 600;
	  color: var(--color-text-primary);
	  font-size: 0.8125rem;
	}
	.time-cell .live.live-active {
	  color: #009ef7;
	}

	/* Status Chips */
	.status-chip {
	  display: inline-flex;
	  align-items: center;
	  gap: 0.25rem;
	  padding: 0.2rem 0.5rem;
	  border-radius: 4px;
	  font-size: 0.75rem;
	  font-weight: 500;
	}
	.status-chip.chip-riding {
	  background: rgba(0, 158, 247, 0.15);
	  color: #009ef7;
	}
	.status-chip.chip-active {
	  background: rgba(0, 158, 247, 0.1);
	  color: #009ef7;
	}
	.status-chip.chip-active .pulse-icon {
	  animation: pulse 1.5s ease-in-out infinite;
	  font-size: 0.5rem;
	}
	@keyframes pulse {
	  0%, 100% { opacity: 0.4; }
	  50% { opacity: 1; }
	}
	.status-chip.chip-done {
	  color: #50cd89;
	}
	.status-chip.chip-pending {
	  /* Empty for pending */
	}

	/* Status Badges (FRS, DNS, DSQ) */
	.badge-frs, .badge-dns, .badge-dsq {
	  display: inline-block;
	  padding: 0.2rem 0.625rem;
	  font-size: 0.6875rem;
	  border-radius: 1rem;
	  font-weight: 700;
	  letter-spacing: 0.03em;
	  text-transform: uppercase;
	}
	.badge-frs {
	  background: rgba(202,138,4,0.12);
	  color: #a16207;
	}
	.badge-dns {
	  background: rgba(59,130,246,0.15);
	  color: #3b82f6;
	}
	.badge-dsq {
	  background: rgba(241,65,108,0.15);
	  color: #f1416c;
	}

	/* Flag Images in Table */
	.flag-img {
	  width: 22px;
	  height: 15px;
	  object-fit: cover;
	  border-radius: 2px;
	  vertical-align: middle;
	  margin-right: 0.25rem;
	  border: 1px solid rgba(0,0,0,0.06);
	}
	.country-code {
	  font-size: 0.8rem;
	  color: var(--color-text-secondary);
	}
	
	/* Mobile Time Display */
	@media (max-width: 576px) {
	  .time-display {
		gap: 0.35rem;
	  }
	  .delay-chip {
		padding: 0.1rem 0.3rem;
		font-size: 0.7rem;
	  }
	  .schedule-time-container {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.25rem;
	  }
	  .mobile-run-card .time-info {
		display: flex;
		align-items: center;
		gap: 0.35rem;
		flex-wrap: wrap;
	  }
	  .mobile-run-card .time-live-indicator {
		font-size: 0.75rem;
		color: #009ef7;
		font-weight: 600;
	  }
	}

	/* ========================================
	   DARK MODE SUPPORT (data-theme="dark")
	   ======================================== */
	/* Day Card */
	[data-theme="dark"] .mobile-optimized-card {
	  background: #1e1e2d;
	  border-color: #2d2d3a;
	}
	[data-theme="dark"] .mobile-optimized-card > .card-header {
	  background: #1e1e2d;
	  border-color: #2d2d3a;
	  color: #fff;
	}
	[data-theme="dark"] .mobile-optimized-card .card-body {
	  background: #1e1e2d;
	}
	[data-theme="dark"] .schedule-day-header {
	  background: linear-gradient(135deg, #0069b4 0%, #004d87 100%);
	  box-shadow: 0 4px 15px rgba(0, 105, 180, 0.3);
	}
	[data-theme="dark"] .day-icon {
	  background: rgba(255,255,255,0.25);
	  color: #fff;
	}
	[data-theme="dark"] .day-name {
	  color: #fff;
	}
	[data-theme="dark"] .day-date {
	  color: rgba(255,255,255,0.8);
	}
	[data-theme="dark"] .day-timerange {
	  background: rgba(255,255,255,0.12);
	}
	[data-theme="dark"] .day-timerange .delay-chip.heavy-delay {
	  background: rgba(255,255,255,0.85);
	  color: #dc2626;
	}
	[data-theme="dark"] .day-timerange .delay-chip.moderate-delay {
	  background: rgba(246,194,62,0.8);
	  color: #1a1a1a;
	}
	[data-theme="dark"] .day-time-planned,
	[data-theme="dark"] .day-time-live {
	  color: #fff;
	}
	[data-theme="dark"] .day-time-arrow {
	  color: rgba(255,255,255,0.6);
	}
	
	/* Schedule Item Header */
	[data-theme="dark"] .schedule-item {
	  border-color: #2d2d3a;
	}
	[data-theme="dark"] .schedule-item-header {
	  background: #232334;
	}
	[data-theme="dark"] .schedule-name {
	  color: #fff;
	}
	[data-theme="dark"] .schedule-time {
	  color: var(--color-text-muted);
	}
	
	/* Time Display */
	[data-theme="dark"] .schedule-time-info {
	  color: #3dadf7;
	}
	[data-theme="dark"] .schedule-time-info .time-arrow {
	  color: #a1a5b7;
	}
	[data-theme="dark"] .schedule-time-info .time-planned-small {
	  color: #a1a5b7;
	}
	[data-theme="dark"] .time-planned {
	  color: #3dadf7;
	}
	[data-theme="dark"] .time-live {
	  color: #a1a5b7;
	}
	
	/* Group Headers */
	[data-theme="dark"] .group-content .card-header {
	  background: #252536;
	}
	[data-theme="dark"] .group-content .card-header .btn-link {
	  color: #b5b5c3;
	}
	[data-theme="dark"] .group-content.active .card-header {
	  background: linear-gradient(90deg, rgba(0,158,247,0.2) 0%, #252536 100%);
	}
	[data-theme="dark"] .group-content.active .card-header .btn-link {
	  color: #009ef7;
	}
	[data-theme="dark"] .group-content.completed .card-header {
	  background: linear-gradient(90deg, rgba(80,205,137,0.15) 0%, #252536 100%);
	}
	[data-theme="dark"] .group-content.completed .card-header .btn-link {
	  color: #50cd89;
	}
	[data-theme="dark"] .group-planned-time {
	  color: #b5b5c3;
	}
	[data-theme="dark"] .group-label {
	  color: #fff;
	}
	
	/* Tables - Dark Mode */
	[data-theme="dark"] .table {
	  color: #b5b5c3;
	}
	[data-theme="dark"] .table thead th {
	  color: #a1a5b7;
	  background: #252536;
	  border-color: #2d2d3a;
	}
	[data-theme="dark"] .table tbody td {
	  border-color: #2d2d3a;
	  color: #fff;
	}
	[data-theme="dark"] .table tbody tr:hover {
	  background: rgba(0,158,247,0.08);
	}
	[data-theme="dark"] .highlight-row {
	  background: linear-gradient(90deg, rgba(0,158,247,0.12) 0%, #252536 100%) !important;
	}
	[data-theme="dark"] .table .time-column {
	  color: #3dadf7;
	}
	[data-theme="dark"] .bib-number {
	  color: var(--color-text-muted);
	}
	
	/* Mobile Run Cards - Dark Mode */
	[data-theme="dark"] .mobile-run-card {
	  background: #252536;
	  border-color: #2d2d3a;
	  border-left-color: #3d3d4a;
	}
	[data-theme="dark"] .mobile-run-card .athlete-name {
	  color: #fff;
	}
	[data-theme="dark"] .mobile-run-card .run-time {
	  color: #3dadf7;
	}
	[data-theme="dark"] .mobile-run-card .athlete-bib {
	  color: var(--color-text-muted);
	}
	[data-theme="dark"] .mobile-run-card .run-number {
	  background: #2d2d3a;
	  color: #a1a5b7;
	}
	[data-theme="dark"] .mobile-run-card .run-footer {
	  border-color: #2d2d3a;
	}
	[data-theme="dark"] .mobile-run-card.active-run {
	  background: linear-gradient(90deg, rgba(0,158,247,0.12) 0%, #252536 100%);
	  border-left-color: #009ef7;
	  border-color: rgba(0,158,247,0.3);
	}
	[data-theme="dark"] .mobile-run-card.completed-run {
	  background: #252536;
	  border-left-color: #50cd89;
	}
	[data-theme="dark"] .status-chip.chip-pending {
	  background: #2d2d3a;
	  color: var(--color-text-muted);
	}
	[data-theme="dark"] .mobile-run-card.completed-run {
	  background: linear-gradient(90deg, rgba(80,205,137,0.1) 0%, #252536 100%);
	  border-left-color: #50cd89;
	}
	
	/* Status Chips */
	[data-theme="dark"] .status-chip.chip-pending {
	  background: #2d2d3a;
	  color: var(--color-text-muted);
	}
	
	/* Custom Schedule Items */
	[data-theme="dark"] .custom-schedule-item {
	  background: #232334;
	  border-color: #2d2d3a;
	}
	[data-theme="dark"] .custom-schedule-item .custom-title {
	  color: #fff;
	}
	[data-theme="dark"] .custom-schedule-item .custom-description {
	  color: var(--color-text-muted);
	}
	[data-theme="dark"] .custom-schedule-item .custom-duration {
	  background: #2d2d3a;
	  color: var(--color-text-muted);
	}
	[data-theme="dark"] .custom-schedule-item .custom-actions button {
	  color: var(--color-text-muted);
	}
	[data-theme="dark"] .custom-schedule-item .custom-actions button:hover {
	  background: #2d2d3a;
	  color: #fff;
	}
	
	/* Competition Complete Card */
	[data-theme="dark"] .competition-complete-card {
	  background: rgba(80,205,137,0.15);
	  border-color: rgba(80,205,137,0.3);
	  color: #50cd89;
	}
	
	/* Modal Dark Mode */
	[data-theme="dark"] .custom-modal-overlay {
	  background: rgba(0, 0, 0, 0.7);
	}
	[data-theme="dark"] .custom-modal {
	  background: #1e1e2d;
	  color: #fff;
	  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
	}
	[data-theme="dark"] .custom-modal-header {
	  background: linear-gradient(135deg, #009ef7 0%, #0066aa 100%);
	}
	[data-theme="dark"] .custom-modal-body {
	  background: #1e1e2d;
	}
	[data-theme="dark"] .custom-modal-body input,
	[data-theme="dark"] .custom-modal-body textarea {
	  background: #252536;
	  border-color: #3d3d4a;
	  color: #fff;
	}
	[data-theme="dark"] .custom-modal-body input::placeholder,
	[data-theme="dark"] .custom-modal-body textarea::placeholder {
	  color: #6b6b7d;
	}
	[data-theme="dark"] .custom-modal-body input:hover,
	[data-theme="dark"] .custom-modal-body textarea:hover {
	  border-color: #4d4d5a;
	}
	[data-theme="dark"] .custom-modal-body input:focus,
	[data-theme="dark"] .custom-modal-body textarea:focus {
	  border-color: #009ef7;
	  background: #2a2a3c;
	  box-shadow: 0 0 0 4px rgba(0, 158, 247, 0.15);
	}
	[data-theme="dark"] .custom-modal-body label {
	  color: var(--color-text-muted);
	}
	[data-theme="dark"] .custom-modal-body label i {
	  color: #009ef7;
	}
	[data-theme="dark"] .custom-modal-footer {
	  border-color: #2d2d3a;
	  background: #181824;
	}
	[data-theme="dark"] .custom-modal-footer .btn-cancel {
	  color: var(--color-text-muted);
	}
	[data-theme="dark"] .custom-modal-footer .btn-cancel:hover {
	  background: #252536;
	  color: #fff;
	}
	@media (max-width: 576px) {
	  [data-theme="dark"] .custom-modal-footer {
		background: #181824;
	  }
	  [data-theme="dark"] .custom-modal-footer .btn-cancel {
		background: #2d2d3a;
		color: #a1a5b7;
	  }
	}
	
	/* Delay Chips - dark mode with better contrast */
	[data-theme="dark"] .delay-chip.on-time,
	[data-theme="dark"] .delay-chip.ahead {
	  background: rgba(80, 205, 137, 0.2);
	  color: #6ee7a8;
	}
	[data-theme="dark"] .delay-chip.slight-delay {
	  background: rgba(234, 179, 8, 0.2);
	  color: #fbbf24;
	}
	[data-theme="dark"] .delay-chip.moderate-delay {
	  background: rgba(249, 115, 22, 0.2);
	  color: #fb923c;
	}
	[data-theme="dark"] .delay-chip.heavy-delay {
	  background: rgba(241, 65, 108, 0.2);
	  color: #f87171;
	}
	
	/* Buttons */
	[data-theme="dark"] .touch-action-btn {
	  background: #252536;
	  border-color: #2d2d3a;
	  color: #b5b5c3;
	}
	[data-theme="dark"] .touch-action-btn:hover {
	  background: #2d2d3a;
	}
	[data-theme="dark"] .touch-action-btn.delete-btn {
	  background: rgba(241,65,108,0.15);
	  border-color: rgba(241,65,108,0.3);
	}
	
	/* Group Tabs */
	[data-theme="dark"] .group-tab {
	  background: #252536;
	  border-color: #2d2d3a;
	  color: #b5b5c3;
	}
	[data-theme="dark"] .group-tab.active {
	  background: #009ef7;
	  border-color: #009ef7;
	  color: #fff;
	}

	/* Time Cell Dark Mode */
	[data-theme="dark"] .time-cell .planned-crossed {
	  color: #7a7a94;
	}
	[data-theme="dark"] .time-cell .time-arrow {
	  color: #7a7a94;
	}
	[data-theme="dark"] .time-cell .live {
	  color: #fff;
	}
	
	/* Status Chips Dark Mode */
	[data-theme="dark"] .status-chip.chip-riding {
	  background: rgba(0, 158, 247, 0.2);
	}
	[data-theme="dark"] .status-chip.chip-active {
	  background: rgba(0, 158, 247, 0.15);
	}
	[data-theme="dark"] .status-chip.chip-done {
	  color: #50cd89;
	}
	
	/* Flag/Country Dark Mode */
	[data-theme="dark"] .country-code {
	  color: #b5b5c3;
	}
	
	/* Add Custom Entry Button Dark Mode */
	[data-theme="dark"] .add-custom-entry-btn {
	  background-color: #009ef7;
	}
	[data-theme="dark"] .add-custom-entry-btn:hover {
	  background-color: #0077cc;
	}
	
	/* Custom Modal Close Button Dark Mode */
	[data-theme="dark"] .custom-modal-close {
	  background: rgba(255, 255, 255, 0.2);
	  color: rgba(255, 255, 255, 0.95);
	}
	[data-theme="dark"] .custom-modal-close:hover {
	  background: rgba(255, 255, 255, 0.3);
	  color: white;
	}
	/* Judge & Dimmed Styles */
	.current-user-judge {
	  font-weight: bold;
	  color: #009ef7;
	}
	.dimmed {
	  opacity: 0.4;
	  pointer-events: none;
	}
	[data-theme="dark"] .current-user-judge {
	  color: #3dadf7;
	}
	[data-theme="dark"] .dimmed {
	  opacity: 0.3;
	}

	/* ========================================
	   SCHEDULE ITEM VISUAL HIERARCHY
	   ======================================== */

	/* Smooth transitions for schedule items */
	.schedule-item {
	  transition: opacity 0.2s ease;
	}
	
	/* Completed schedule items get subtle styling */
	.schedule-item .group-content.completed + .group-content.completed {
	  margin-top: -0.125rem;
	}

	/* Better visual grouping — card wrapper effect */
	.schedule-item .group-contents {
	  border-left: 2px solid #e5e7eb;
	  padding-left: 0.75rem;
	  margin-left: 0.75rem;
	  margin-top: 0.5rem;
	}
	[data-theme="dark"] .schedule-item .group-contents {
	  border-left-color: #2d2d3a;
	}

	/* Schedule item separator */
	.schedule-item + .schedule-item {
	  margin-top: 0.25rem;
	}
	.schedule-item:last-child {
	  padding-bottom: 0;
	}

	/* Schedule item header — subtle hover */
	.schedule-item-header {
	  transition: background 0.15s ease;
	}
	.schedule-item-header:hover {
	  background: #f3f4f6;
	}
	[data-theme="dark"] .schedule-item-header:hover {
	  background: #292940;
	}

	/* Custom schedule item — subtle hover */
	.custom-schedule-item {
	  transition: background 0.15s ease;
	}
	.custom-schedule-item:hover {
	  background: #f3f4f6;
	}
	[data-theme="dark"] .custom-schedule-item:hover {
	  background: #292940;
	}

	/* Score display in table — better readability */
	.table tbody td:last-child {
	  font-weight: 600;
	  font-variant-numeric: tabular-nums;
	}

	/* Active run score animation */
	.highlight-row td:last-child {
	  color: #009ef7;
	}

	/* Empty state for schedule */
	.schedule-empty-state {
	  text-align: center;
	  padding: 3rem 1.5rem;
	  color: var(--color-text-muted);
	}
	.schedule-empty-state i {
	  font-size: 3rem;
	  opacity: 0.3;
	  margin-bottom: 1rem;
	  display: block;
	}
	.schedule-empty-state p {
	  font-size: 1rem;
	  margin: 0;
	}

	/* Mobile score cards — better layout */
	@media (max-width: 576px) {
	  .mobile-run-card {
		display: grid;
		grid-template-columns: 1fr auto;
		grid-template-rows: auto auto;
		gap: 0.25rem 0.75rem;
	  }
	  .mobile-run-card .run-header {
		grid-column: 1 / -1;
		margin-bottom: 0.25rem;
	  }
	  .mobile-run-card .athlete-info {
		grid-column: 1;
		margin-bottom: 0;
	  }
	  .mobile-run-card .run-score {
		grid-column: 2;
		display: flex;
		align-items: center;
		justify-content: flex-end;
	  }
	  
	  /* Better visual grouping on mobile */
	  .schedule-item .group-contents {
		border-left: 2px solid #e5e7eb;
		padding-left: 0.5rem;
		margin-left: 0.5rem;
		margin-top: 0.375rem;
	  }
	  [data-theme="dark"] .schedule-item .group-contents {
		border-left-color: #2d2d3a;
	  }
	}

/* ========================================
   CRITICAL: Mobile Overrides (Must be at end of file)
   These rules ensure mobile styles are applied correctly
   even on initial page load
   ======================================== */
@media screen and (max-width: 576px) {
  /* Force mobile cards to display */
  .mobile-run-cards {
    display: block !important;
    padding: 0.375rem !important;
  }
  
  /* Force desktop table to hide */
  .desktop-table {
    display: none !important;
  }
  
  /* Force group tabs to hide on mobile (collapsible cards instead) */
  .group-tabs {
    display: none !important;
  }
  
  /* Force group content cards to display properly */
  .group-content {
    display: block !important;
  }
  
  .group-content .card-header {
    display: block !important;
  }
  
  .group-content .card-header .btn-link {
    display: flex !important;
  }
}
