:root {
  --primary: #4361EE;
  --primary-dark: #3651D4;
  --primary-light: #F0F4FF;
  --success: #06D6A0;
  --danger: #EF476F;
  --warning: #FFD166;
  --text-primary: #1A202C;
  --text-secondary: #718096;
  --border: #E2E8F0;
  --bg-gray: #F7FAFC;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius: 12px;
  --radius-lg: 16px;
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
  background: var(--bg-gray);
  line-height: 1.625;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: var(--spacing-lg) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}

nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
}

nav a:hover,
nav a.active {
  color: var(--primary);
}

nav a:active {
  opacity: 0.7;
}

main {
  padding: var(--spacing-2xl) 0;
  min-height: calc(100vh - 200px);
}

.page-header {
  margin-bottom: var(--spacing-xl);
}

.page-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.5;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow);
  margin-bottom: var(--spacing-lg);
  border: 1px solid var(--border);
}

.card-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  color: var(--text-primary);
}

.card-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
}

.form-section {
  margin-bottom: var(--spacing-xl);
}

.form-section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
  font-size: 14px;
}

.form-help {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: var(--spacing-xs);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s ease;
  background: var(--white);
  color: var(--text-primary);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #A0AEC0;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--spacing-md);
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.checkbox-item {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--white);
  user-select: none;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

.checkbox-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.checkbox-item:active {
  transform: scale(0.98);
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}

.checkbox-item input[type="checkbox"]:checked+label {
  color: var(--primary);
  font-weight: 600;
}

.btn {
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  text-decoration: none;
  font-family: inherit;
  white-space: nowrap;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--primary-light);
  border-color: var(--primary);
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-success:hover:not(:disabled) {
  background: #05C090;
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-danger:hover:not(:disabled) {
  background: #DC3558;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.slot-item {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: var(--spacing-md);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.slot-item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.slot-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.slot-item.available {
  background: var(--white);
  border-color: var(--border);
}

.slot-item.blocked {
  background: #fee2e2;
  border-color: #fecaca;
}

.slot-item.booked {
  background: #dbeafe;
  border-color: #bfdbfe;
}

.slot-time {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--spacing-xs);
}

.slot-date {
  font-size: 13px;
  color: var(--text-secondary);
}

.provider-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.provider-item:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.provider-info h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: var(--text-primary);
}

.provider-info p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--spacing-sm);
  margin-top: var(--spacing-lg);
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.calendar-header-day {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  padding: var(--spacing-sm);
}

.calendar-day {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 4px 4px 4px;
  /* Top padding for date */
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 140px;
  /* Taller cells */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  /* Stretch items */
  justify-content: flex-start;
  position: relative;
}

.calendar-day:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  z-index: 10;
  box-shadow: var(--shadow-md);
}

.calendar-day-num {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  position: absolute;
  top: 8px;
  left: 8px;
}

.event-times {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.event-time-badge {
  font-size: 11px;
  background: #dbeafe;
  color: #1e40af;
  padding: 2px 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-time-badge.blocked {
  background: #fee2e2;
  color: #991B1B;
}

.more-events-badge {
  font-size: 10px;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 2px;
  font-weight: 500;
}

/* Compact Table Styles */
.table-compact th,
.table-compact td {
  padding: 8px 12px;
  /* Smaller padding */
  font-size: 13px;
}

.table-row-today {
  background-color: #F0F9FF;
  /* Light blue highlight */
  border-left: 3px solid var(--primary);
}

.table-row-today:hover {
  background-color: #E0F2FE !important;
}

.calendar-day-name {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table-container {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  padding: 16px;
  text-align: left;
}

.table thead {
  background: var(--bg-gray);
  border-bottom: 2px solid var(--border);
}

.table th {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

.table tbody tr:last-child {
  border-bottom: none;
}

.table tbody tr:hover {
  background: var(--bg-gray);
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.badge-success {
  background: #D1FAE5;
  color: #065F46;
}

.badge-warning {
  background: #FEF3C7;
  color: #92400E;
}

.badge-danger {
  background: #FEE2E2;
  color: #991B1B;
}

.badge-info {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.alert {
  padding: var(--spacing-md);
  border-radius: var(--radius);
  margin-bottom: var(--spacing-lg);
  border-left: 4px solid;
}

.alert-info {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary);
}

.alert-success {
  background: #D1FAE5;
  color: #065F46;
  border-color: var(--success);
}

.alert-danger {
  background: #FEE2E2;
  color: #991B1B;
  border-color: var(--danger);
}

.alert-warning {
  background: #FEF3C7;
  color: #92400E;
  border-color: var(--warning);
}

.empty-state {
  text-align: center;
  padding: var(--spacing-2xl) var(--spacing-lg);
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: var(--spacing-md);
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 20px;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
  font-weight: 600;
}

.empty-state p {
  margin-bottom: var(--spacing-lg);
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-secondary);
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--bg-gray);
  color: var(--text-primary);
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.tabs {
  display: flex;
  gap: var(--spacing-sm);
  border-bottom: 2px solid var(--border);
  margin-bottom: var(--spacing-lg);
}

.tab {
  padding: var(--spacing-md) var(--spacing-lg);
  border: none;
  background: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
}

.tab:hover {
  color: var(--primary);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: var(--spacing-xl) 0;
  margin-top: var(--spacing-2xl);
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--spacing-md);
  }

  header {
    padding: var(--spacing-md) 0;
  }

  .header-content {
    flex-wrap: wrap;
    gap: var(--spacing-md);
  }

  .logo {
    font-size: 18px;
  }

  nav {
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
  }

  nav a {
    font-size: 13px;
    padding: 8px 12px;
    background: var(--bg-gray);
    border-radius: 8px;
  }

  main {
    padding: var(--spacing-lg) 0;
  }

  .page-title {
    font-size: 24px;
    line-height: 1.3;
  }

  .page-subtitle {
    font-size: 15px;
  }

  .card {
    padding: var(--spacing-md);
    border-radius: 12px;
  }

  .dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    /* Narrower list, wider calendar */
    gap: var(--spacing-lg);
  }

  .icon-img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    vertical-align: middle;
  }

  /* Timeline View Styles */
  .timeline-container {
    display: block;
    /* Changed from flex to block for absolute positioning */
    position: relative;
    /* Critical for absolute positioning of events */
    padding-left: 50px;
    /* Space for time labels */
    height: 600px;
    /* Fixed height with scroll */
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
  }

  .timeline-hour {
    height: 60px !important;
    min-height: 60px !important;
    /* 1 hour = 60px */
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    box-sizing: border-box;
    background: #ffffff;
    display: block !important;
    width: 100%;
  }
  
  .timeline-hour:nth-child(even) {
    background: #fafafa;
  }

  .timeline-hour::before {
    content: attr(data-time);
    position: absolute;
    left: -45px;
    top: -6px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
  }

  .timeline-event {
    position: absolute;
    left: 4px;
    right: 4px;
    background: #EFF6FF;
    border-left: 3px solid var(--primary);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    color: var(--text-primary);
    overflow: hidden;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  }

  .timeline-event.blocked {
    display: none;
    /* Visually hide blocked slots */
  }

  .timeline-slot-btn {
    position: absolute;
    left: 4px;
    right: 4px;
    height: 50px;
    /* Slightly smaller than hour */
    top: 5px;
    background: #F0FDF9;
    border: 1px dashed var(--success);
    border-radius: 4px;
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    opacity: 0.8;
  }

  .timeline-slot-btn:hover {
    opacity: 1;
    background: #DCFCE7;
  }

  /* Responsive Calendar Tweaks */
  .calendar-grid {
    gap: 2px;
    /* Minimal gap */
  }

  .calendar-day {
    padding: 8px;
    min-height: 50px;
  }

  .calendar-day-num {
    font-size: 14px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-group {
    margin-bottom: var(--spacing-md);
  }

  .form-label {
    font-size: 14px;
    margin-bottom: 6px;
  }

  .form-input,
  .form-select {
    font-size: 16px;
    padding: 12px;
  }

  .form-section {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
  }

  .form-section-title {
    font-size: 18px;
    margin-bottom: var(--spacing-md);
  }

  .checkbox-group {
    gap: var(--spacing-sm);
  }

  .checkbox-item {
    padding: 8px 12px;
    font-size: 14px;
  }

  .provider-item {
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: flex-start;
  }

  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table {
    font-size: 13px;
    min-width: 600px;
  }

  .table th,
  .table td {
    padding: 10px 8px;
    font-size: 12px;
  }

  .modal-content {
    padding: var(--spacing-md);
    max-width: 95vw;
    margin: 10vh auto;
  }

  .modal-header h2 {
    font-size: 20px;
  }

  .btn {
    padding: 14px 20px;
    font-size: 15px;
    width: 100%;
    justify-content: center;
  }

  .btn-block {
    width: 100%;
  }

  .alert {
    font-size: 14px;
    padding: var(--spacing-md);
  }

  .toggle-switch {
    gap: var(--spacing-sm);
  }

  .toggle-label {
    font-size: 14px;
  }

  .stat-card h3 {
    font-size: 28px;
  }

  .stat-card p {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  * {
    box-sizing: border-box;
  }

  html,
  body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .container {
    padding: 0 8px;
    width: 100%;
    max-width: 100%;
  }

  /* Force vertical stacking */
  .dashboard-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px;
    width: 100%;
  }

  .grid-3 {
    grid-template-columns: 1fr !important;
  }

  /* Stats cards - make more compact */
  #statsCards {
    display: none !important;
    /* Hide stats on mobile to save space */
  }

  /* Card containers */
  .card {
    padding: 8px;
    margin-bottom: 12px;
    width: 100%;
    max-width: 100%;
  }

  .card-title {
    font-size: 16px;
    margin-bottom: 8px;
  }

  /* Calendar Grid - ensure it fits */
  .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    width: 100%;
    max-width: 100%;
  }

  .calendar-day {
    aspect-ratio: 1 / 1;
    /* Square cells */
    padding: 0;
    min-height: 0;
    min-width: 0;
    max-width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: hidden;
  }

  .calendar-day-num {
    font-size: 10px;
    position: absolute;
    top: 2px;
    left: 2px;
    font-weight: 500;
  }

  .event-times {
    width: 100%;
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 1px;
  }

  .event-time-badge {
    font-size: 7px;
    padding: 1px 2px;
    height: auto;
    min-height: 10px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .more-events-badge {
    font-size: 6px;
    margin: 0;
  }

  /* Compact table for upcoming events */
  .table-container {
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
  }

  .table-compact {
    font-size: 11px;
    min-width: 100%;
  }

  .table-compact th,
  .table-compact td {
    padding: 4px 6px;
    font-size: 11px;
  }

  /* Navigation */
  header {
    padding: 8px 0;
  }

  .logo {
    font-size: 14px;
  }

  nav a {
    font-size: 11px;
    padding: 4px 8px;
  }

  /* Page header */
  .page-title {
    font-size: 20px;
    margin-bottom: 4px;
  }

  .page-subtitle {
    font-size: 12px;
    margin-bottom: 8px;
  }

  /* Forms and buttons */
  .btn {
    padding: 10px 16px;
    font-size: 14px;
  }

  .form-input,
  .form-select {
    font-size: 14px;
    padding: 8px;
  }

  /* Modal adjustments */
  .modal-content {
    width: 95vw;
    max-width: 95vw;
    margin: 5vh auto;
    max-height: 90vh;
    overflow-y: auto;
  }

  /* Timeline container mobile optimizations */
  .timeline-container {
    height: 400px;
    /* Shorter on mobile */
    max-height: 60vh;
    font-size: 11px;
  }

  .timeline-hour {
    height: 50px;
    /* Smaller hour blocks on mobile */
  }

  .timeline-event {
    font-size: 10px;
    padding: 2px 4px;
  }

  #editDayModal .modal-content {
    height: 85vh;
    max-height: 85vh;
  }
}

/* Toggle Switch */
.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-md);
  cursor: pointer;
  user-select: none;
}

.toggle-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  background-color: var(--border);
  border-radius: 34px;
  transition: background-color 0.3s ease;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: var(--white);
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input[type="checkbox"]:checked+.toggle-slider {
  background-color: var(--primary);
}

.toggle-switch input[type="checkbox"]:checked+.toggle-slider::before {
  transform: translateX(24px);
}

.toggle-switch input[type="checkbox"]:focus+.toggle-slider {
  box-shadow: 0 0 0 3px var(--primary-light);
}

.toggle-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}