* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    padding: 20px;
    background: #f5f5f5;
    color: #333;
  }
  
  .header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
  
  h1 {
    font-size: 24px;
	text-align: center;
    margin-bottom: 15px;
    color: #2c3e50;
  }
  
  .week-toggle {
    display: flex;
    gap: 15px;
  }
  
  .week-toggle button {
    padding: 12px 24px;
    border: 2px solid #667eea;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #667eea;
    transition: all 0.3s;
    flex: 1;
    max-width: 200px;
  }
  
  .week-toggle button:hover {
    background: #f0f4ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
  }
  
  .week-toggle button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  }
  

  
  .schedule-container {
    margin-top: 20px;
  }
  
  .location-section {
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s;
  }
  
  .location-section.hidden {
    display: none;
  }
  
  .location-header {
    display: flex;
    align-items: center;
    padding: 18px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s;
  }
  
  .location-header:hover {
    background: linear-gradient(135deg, #5568d3 0%, #63408a 100%);
    transform: translateX(5px);
  }
  
  .location-header.expanded {
    background: linear-gradient(135deg, #5568d3 0%, #63408a 100%);
  }
  
  .location-header h2 {
    font-size: 20px;
    flex: 1;
    font-weight: 600;
  }
  
  .stats-badge {
    background: rgba(255,255,255,0.25);
    padding: 6px 14px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
  }
  
  .location-content {
    padding: 0;
  }
  
  .location-content.collapsed {
    display: none;
  }
  
  .day-section {
    margin: 15px 24px;
    border-left: 4px solid #667eea;
    padding-left: 20px;
  }
  
  .day-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 12px;
  }
  
  .day-header h3 {
    font-size: 16px;
    flex: 1;
    color: #495057;
    font-weight: 600;
  }
  
  .time-slots-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-bottom: 15px;
  }
  
  .time-slots-table th {
    background: #f8f9fa;
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    border: 1px solid #dee2e6;
    color: #495057;
  }
  
  .time-slots-table td {
    padding: 8px;
    border: 1px solid #dee2e6;
    background: white;
  }
  
  .time-slots-table .time-slot {
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
    min-width: 90px;
  }
  
  .time-slots-table input[type="text"] {
    width: 100%;
    border: none;
    padding: 6px;
    background: transparent;
    font-size: 14px;
  }
  
  .time-slots-table input[type="text"]:focus {
    outline: 2px solid #0366d6;
    outline-offset: -2px;
    background: #f0f8ff;
    border-radius: 2px;
  }
  
  .time-slots-table input[type="number"] {
    text-align: center;
    width: 100%;
    border: none;
    padding: 6px;
    background: transparent;
    font-size: 14px;
  }
  
  .person-cell {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  
  .person-cell input[type="text"] {
    flex: 1;
  }
  
  .person-cell input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
  }
  
  .person-cell input[type="checkbox"]:focus {
    outline: 2px solid #0366d6;
    outline-offset: 2px;
  }
  
  .time-slots-table tr.slot-filled {
    background: #d4edda;
  }
  
  .time-slots-table tr.slot-filled td {
    background: #d4edda;
  }
  
  .time-slots-table tr.slot-partial {
    background: #fff3cd;
  }
  
  .time-slots-table tr.slot-partial td {
    background: #fff3cd;
  }
  
  .time-slots-table tr.slot-empty td {
    background: white;
  }
  
  .loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
  
  .error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
  
  /* --- Responsive Table Styles for Mobile --- */
@media (max-width: 768px) {
  
  /* Hide the original table headers */
  .time-slots-table thead {
    display: none;
  }

  /* Make the table, body, and rows behave like simple blocks */
  .time-slots-table, 
  .time-slots-table tbody, 
  .time-slots-table tr {
    display: block;
    width: 100%;
  }

  /* Style each row as a self-contained "card" */
  .time-slots-table tr {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden; /* Important for keeping child backgrounds contained */
  }

  /* Change each cell to be a full-width row with its label */
  .time-slots-table td {
    display: flex; /* Use flexbox for easy alignment */
    justify-content: space-between; /* Pushes label left, content right */
    align-items: center;
    width: 100%;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
  }

  /* Remove border from the last cell in each card */
  .time-slots-table tr td:last-child {
    border-bottom: none;
  }

  /* This is the magic: create the label using the data-label attribute */
  .time-slots-table td::before {
    content: attr(data-label); /* Reads from the data-label we added in JS */
    font-weight: 600;
    color: #495057;
    padding-right: 15px;
  }

  /* Make the Time cell act as a header for each card */
  .time-slots-table td.time-slot {
    background-color: #f8f9fa;
    font-size: 1.1em;
  }

  /* Ensure the input/checkbox container takes up appropriate space */
  .person-cell {
    flex-basis: 60%; /* Give the input area a good amount of space */
    justify-content: flex-end; /* Align input/checkbox to the right */
  }
}

/* --- Styles for Hierarchical Day Expansion --- */

.day-header {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease-in-out;
}

.day-header:hover {
  background-color: #f1f3f5; /* A subtle highlight on hover */
}

.day-header.expanded {
  background-color: #e9ecef; /* A slightly darker color when open */
}

/* New collapsible container for the table */
.day-content.collapsed {
  display: none;
}

.guidelines-section {
  background: white;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  overflow: hidden;
}

.guidelines-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  cursor: pointer;
  user-select: none;
  transition: background 0.3s;
}

.guidelines-header:hover {
  background: linear-gradient(135deg, #5568d3 0%, #63408a 100%);
}

.guidelines-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.toggle-icon {
  font-size: 18px;
  transition: transform 0.3s;
}

.guidelines-header.expanded .toggle-icon {
  transform: rotate(180deg);
}

.guidelines-content {
  padding: 20px 24px;
  line-height: 1.6;
  color: #333;
  background: #f9f9fb;
}

.guidelines-content.collapsed {
  display: none;
}

.guidelines-content ol {
  margin-left: 20px;
  margin-bottom: 10px;
}

.guidelines-content li {
  margin-bottom: 8px;
}

.guidelines-content .note {
  color: #b00020;
  font-weight: 600;
  margin-top: 10px;
}
.notice {
  text-align: center;
  margin-top: 10px;
}

.admin-link {
  text-align: center;
  margin-top: 20px;
}

.admin-section {
  display: none;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  max-width: 400px;
}

.admin-section input,
.admin-section button {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px;
  font-size: 14px;
}

.location-inputs input {
  margin-top: 5px;
}

.save-btn {
  display: none; /* will be toggled via JS */
  margin-top: 10px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.save-btn:hover {
  background-color: #0056b3;
}
.note {
  color: red;
}

.note .minor-text {
  color: black;
}
/* Dialog Styles */
.dialog-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: 10000;
}

.dialog-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow: hidden;
  animation: dialogSlideIn 0.3s ease-out;
}

@keyframes dialogSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.dialog-header {
  padding: 20px 20px 10px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: between;
  align-items: center;
}

.dialog-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.2em;
}

.dialog-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dialog-close:hover {
  color: #666;
}

.dialog-body {
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
}

.dialog-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  margin-top: 10px;
}

.dialog-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 4px;
}

.dialog-list-item {
  padding: 12px 15px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  transition: background-color 0.2s;
}

.dialog-list-item:hover {
  background-color: #f8f9fa;
}

.dialog-list-item:last-child {
  border-bottom: none;
}

.dialog-list-item.selected {
  background-color: #e3f2fd;
  color: #1976d2;
}

.dialog-footer {
  padding: 15px 20px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.dialog-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.dialog-confirm {
  background: #007bff;
  color: white;
}

.dialog-confirm:hover {
  background: #0056b3;
}

.dialog-cancel {
  background: #6c757d;
  color: white;
}

.dialog-cancel:hover {
  background: #545b62;
}

.dialog-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Unique login page styles - won't conflict with existing CSS */
.login-body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: #333;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0.5rem;
}

.login-title {
  margin: 0 0 1rem 0;
  color: #2c3e50;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.login-icon {
  color: #6a11cb;
  margin-bottom: 0.5rem;
}

.login-input-group {
  position: relative;
  width: 100%;
}

.login-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  font-size: 1rem;
  border-radius: 10px;
  border: 2px solid #e1e8ed;
  outline: none;
  transition: all 0.3s ease;
  background: #f8f9fa;
  box-sizing: border-box;
}

.login-input:focus {
  border-color: #6a11cb;
  background: white;
  box-shadow: 0 0 0 4px rgba(106, 17, 203, 0.1);
}

.login-input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  pointer-events: none;
}

.login-button {
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(106, 17, 203, 0.3);
  letter-spacing: 0.5px;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(106, 17, 203, 0.4);
}

.login-button:active {
  transform: translateY(0);
}

.login-button:disabled {
  background: #a0a0a0;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.login-message {
  margin-top: 1rem;
  color: #e74c3c;
  font-weight: 500;
  min-height: 1.2em;
  font-size: 0.9rem;
  padding: 0.5rem;
  border-radius: 6px;
  background: rgba(231, 76, 60, 0.1);
}

.login-footer {
  margin-top: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

/* Animation for form appearance */
@keyframes formSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-form {
  animation: formSlideIn 0.5s ease-out;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .login-form {
    padding: 2rem 1.5rem;
  }
  
  .login-title {
    font-size: 1.5rem;
  }
}

.password-toggle {
  margin-top: 8px;
}

