.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 12px;
  box-sizing: border-box;
}

/* Toast banner styles */
.success-banner,
.error-banner {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 22px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  min-width: 260px;
}

.success-banner {
  background: #22c55e;
  color: #ffffff;
  border: 1px solid #16a34a;
}

.error-banner {
  background: #dc3545;
  color: #ffffff;
  border: 1px solid #c82333;
}

/* Content sections for mobile navigation */
.content-section {
  display: block;
}

.content-section.hidden {
  display: none;
}

/* Dashboard Section - Reusable class for consistent spacing and layout */
.dashboard-section {
  margin-bottom: 34px;
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
  transition: all 0.3s ease;
}

.dashboard-section:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
  .dashboard-section {
    margin-bottom: 34px;
    padding: 16px;
    border-radius: 10px;
  }
}

.section-header {
  font-size: 1.5em;
  color: #333;
  margin: 0px 0 16px !important;
  padding-bottom: 8px;
  border-bottom: 2px solid #eee;
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-icon {
  background: none;
  border: none;
  color: #3498db;
  font-size: 0.9em;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-icon:hover {
  background-color: rgba(52, 152, 219, 0.1);
  transform: scale(1.1);
}

.history-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.history-item {
  margin-bottom: 30px;
}

.history-date {
  font-weight: bold;
  color: #333;
  font-size: 1.1em;
  margin-bottom: 16px;
  padding: 8px 0;
  border-bottom: 2px solid #eee;
}

.shift-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.shift-card {
  background: white;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
  position: relative;
  transition: all 0.3s ease;
}

.shift-card.active {
  border-color: #2cab4d;
  box-shadow: 0 0 0 1px #2cab4d, 0 0 16px rgba(44, 171, 77, 0.15);
  animation: pulse 2s infinite;
}

.shift-card.delete-confirm {
  background: #ffebee;
  border-color: #ef5350;
}

.delete-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: white;
  z-index: 1000;
}

.delete-overlay.active {
  display: flex;
  flex-direction: column;
}

.delete-content {
  background: white;
  flex: 1;
  display: flex;
  flex-direction: column;
}

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

.delete-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
}

.delete-header .modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 4px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-message {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #666;
  padding: 24px 16px;
  text-align: center;
}

.delete-actions {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid #eee;
}

.delete-actions button {
  width: calc(100% - 32px);
  margin: 0 16px;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.delete-btn.confirm {
  background-color: #dc3545;
  color: white;
}

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

.delete-btn.cancel {
  background-color: #f8f9fa;
  color: #666;
}

.delete-btn.cancel:hover {
  background-color: #e9ecef;
}

/* Godber Pick-up special styling */
.task-card.godber-pickup-card {
  background: #fef2f2;      /* light red */
  border-color: #fecaca;    /* soft red border */
}

/* Miscellaneous Tasks special styling */
.task-card.miscellaneous-tasks-card {
  background: #eff6ff;      /* light blue */
  border-color: #bfdbfe;    /* soft blue border */
}

@media (max-width: 768px) {
  .delete-overlay {
    background-color: white;
  }

  .delete-content {
    width: 100%;
    height: 100%;
  }

  .delete-header {
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
  }

  .delete-message {
    font-size: 1.2rem;
  }

  .delete-actions {
    background: white;
  }

  .delete-actions button {
    width: calc(100% - 32px);
    margin: 0 16px;
  }
}

.shift-content {
  width: 100%;
  padding-right: 70px;
  box-sizing: border-box;
}

.shift-time {
  font-weight: bold;
  color: #333;
  font-size: 1.1em;
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 28px;
}

.shift-time-text {
  display: block;
}

.shift-note {
  color: #666;
  font-size: 0.9em;
  margin-top: 4px;
  word-break: break-word;
  padding-right: 70px;
  box-sizing: border-box;
}

.shift-actions {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  z-index: 5;
}

.action-button {
  width: 32px;
  height: 32px;
  padding: 6px;
  border: none;
  border-radius: 6px;
  background-color: #f5f5f5;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-button svg {
  width: 16px;
  height: 16px;
}

.action-button.delete:hover {
  background-color: #ffebee;
  color: #ef5350;
}

.action-button.edit:hover {
  background-color: #e3f2fd;
  color: #2196f3;
}

.shift-edit-form {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: white;
  z-index: 1000;
}

.shift-edit-form.active {
  display: flex;
}

.shift-edit-form-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.shift-edit-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
  margin-bottom: 0;
  background-color: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
}

.shift-edit-form-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  text-align: left;
}

.shift-edit-form-header .modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 0;
  margin-left: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shift-edit-form form {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.edit-form-row {
  margin-bottom: 16px;
  text-align: left;
}

.time-inputs-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.time-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.edit-buttons {
  margin-top: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid #eee;
  background: white;
}

.edit-buttons button {
  width: calc(100% - 40px);
  margin: 0 20px;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.tasks-link {
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
}

.tasks-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .shift-edit-form form {
    padding: 16px;
  }

  .edit-buttons {
    padding: 16px;
  }

  .edit-buttons button {
    width: calc(100% - 32px);
    margin: 0 16px;
    padding: 12px;
  }
}

.history-drive {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background-color: #e8f5e9;
  color: #2cab4d;
  border-radius: 12px;
  font-size: 0.75em;
  font-weight: 500;
  align-self: flex-start;
}

.shift-date-chip {
  display: inline-block;
  background: #f1f3f5;
  color: #495057;
  border: 1px solid #e9ecef;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 12px;
  margin-right: 8px;
  white-space: nowrap;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-top: 0;
  flex-wrap: wrap;
  gap: 12px;
}

.history-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.tab-button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  background-color: #f5f5f5;
  color: #666;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  height: 36px;
  white-space: nowrap;
  flex: 1;
}

.tab-button:hover {
  background-color: #e0e0e0;
}

.tab-button.active {
  background-color: #2cab4d;
  color: white;
}

.add-record-btn {
  padding: 8px 16px;
  border: 2px solid #2196f3;
  border-radius: 6px;
  background-color: transparent;
  color: #2196f3;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  white-space: nowrap;
  width: 100%;
  justify-content: center;
}

.add-record-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
}

.add-record-btn:hover {
  background-color: #2196f3;
  color: white;
}

.add-record-btn:hover svg {
  stroke: white;
}

.add-record-btn.hidden {
  display: none;
}

@media (max-width: 768px) {
  .history-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 16px;
  }

  .history-tabs {
    display: flex;
    gap: 8px;
    width: 100%;
  }

  .tab-button {
    padding: 10px 16px;
    font-size: 0.95rem;
  }

  .add-record-btn {
    padding: 10px 16px;
    font-size: 0.95rem;
  }
}

.clock-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 0 40px;
}

.clock-time-display {
  font-size: 2.5rem;
  font-weight: 500;
  color: #333;
  text-align: center;
  margin-bottom: 8px;
}

.clock-edit-link {
  color: #2196f3;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
}

.clock-edit-link:hover {
  text-decoration: underline;
}

.my-button {
  padding: 16px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  display: block;
}

.clock-in {
  background-color: #2cab4d;
  color: white;
}

.clock-in:hover {
  background-color: #239a41;
}

.clock-out {
  background-color: #dc3545;
  color: white;
}

.clock-out:hover {
  background-color: #c82333;
}

.cancel-btn {
  background-color: #6c757d;
  color: white;
  margin-top: 8px;
}

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

/* Cancel Confirmation Modal Styles */
.cancel-confirmation-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(2px);
}

.cancel-confirmation-modal {
  background: white;
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* Task Modal Specific Styles */
#property-tasks-modal .cancel-confirmation-modal {
  max-width: calc(100vw - 32px);
  width: calc(100vw - 32px);
  height: calc(100vh - 32px);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  position: relative;
  margin: 16px;
}


#property-tasks-modal .cancel-confirmation-header {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  padding: 12px 16px;
  border-radius: 0;
}

#property-tasks-modal .cancel-confirmation-body {
  flex: 1;
  overflow: auto;
  padding: 24px;
  background: #fafbfc;
}

#property-tasks-modal .cancel-confirmation-footer {
  border-top: 1px solid #e2e8f0;
  padding: 20px 24px;
  background: white;
  border-radius: 0 0 20px 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

#property-tasks-modal .cancel-confirmation-footer.visible {
  opacity: 1;
}

/* Task Section Styles */
.task-section {
  margin-bottom: 24px;
  background: white;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease;
}

.task-section:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.task-section summary {
  padding: 16px 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.2s ease;
}

.task-section summary:hover {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.task-section[open] summary {
  border-bottom-color: #cbd5e1;
}

.task-section-content {
  padding: 20px;
  background: white;
}

.task-description {
  margin-bottom: 16px;
  font-size: 0.9em;
  color: #64748b;
  line-height: 1.5;
  padding: 12px 16px;
  background: #f1f5f9;
  border-radius: 8px;
  border-left: 3px solid #3b82f6;
}

/* Task List Styles */
.task-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.task-item:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.task-item.completed {
  opacity: 0.7;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.task-checkbox {
  width: 20px;
  height: 20px;
  accent-color: #22c55e;
  cursor: pointer;
  margin-top: 2px;
  flex-shrink: 0;
}

.task-label {
  flex: 1;
  line-height: 1.5;
  word-break: break-word;
  white-space: normal;
  font-size: 0.95em;
  color: #334155;
}

.task-category {
  padding: 8px 0 4px 0;
  font-weight: 600;
  color: #1e293b;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 12px;
}

/* Section Headers */
.section-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 1;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #1e293b;
  font-size: 1.05em;
}

.section-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.section-dot.required {
  background: #dc2626;
}

.section-dot.optional {
  background: #2563eb;
}

.section-dot.deadline {
  background: #9333ea;
}

.section-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 0.9em;
}

.section-complete {
  display: none;
  color: #16a34a;
  font-weight: 500;
}

.section-toggle-btn {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #64748b;
  border-radius: 6px;
  transition: all 0.2s ease;
}

/* Completion badge styles */
.completion-badge {
  transition: opacity 0.2s;
}

.completion-badge:hover {
  opacity: 0.8;
}

.staff-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
}

.section-toggle-btn:hover {
  background: #f1f5f9;
  color: #334155;
}

.toggle-icon {
  font-size: 14px;
  transition: transform 0.2s ease;
}

.task-section[open] .toggle-icon {
  transform: rotate(90deg);
}

/* Progress Bar Styles */
.section-progress {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
  width: 100%;
}

.section-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
  transition: width 0.3s ease;
}

/* Snooze Button Styles */
.snooze-btn {
  font-size: 0.85em;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.snooze-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  transform: scale(1.05);
}

/* Make snoozed state match regular state */
.snooze-btn.snoozed {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
}

/* Snoozed task item styles */
.task-item.snoozed {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  background-color: #f9fafb;
  border-left: 3px solid #fbbf24;
}

.task-item.snoozed .task-checkbox {
  cursor: not-allowed !important;
  opacity: 0.6;
}

.task-item.snoozed .task-label {
  color: #6b7280 !important;
  cursor: not-allowed !important;
}

/* Event Details and Assignment Styles */
.event-details-section {
  margin-bottom: 32px;
}

.event-details-section .section-label {
  font-size: 0.75em;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.event-details-content {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 12px 16px;
  border-radius: 12px;
  border-left: 4px solid #3b82f6;
  font-size: 0.95em;
  line-height: 1.5;
}

.assignment-details {
  margin-bottom: 24px;
}

.assignment-role {
  color: #374151;
  font-size: 0.95em;
}

.assignment-role-label {
  color: #64748b;
  font-weight: 500;
}

/* Property Title and Actions */
.property-title {
  margin: 0;
  font-size: 1.1em;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.3;
}

.property-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.action-pill {
  font-size: 0.85em;
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}

/* Close Button */
.modal-close-btn {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.9em;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

/* Mark Complete Button */
.mark-complete-btn {
  width: 100%;
  background: #22c55e;
  color: #fff;
  padding: 14px 20px;
  font-size: 1.05em;
  border-radius: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: none;
}

.mark-complete-btn:hover:not(:disabled) {
  background: #16a34a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.mark-complete-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.mark-complete-btn.incomplete {
  background: #8b5cf6;
}

.mark-complete-btn.incomplete:hover:not(:disabled) {
  background: #7c3aed;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Ensure purple "Mark As Incomplete" is never dimmed even if disabled gets set */
.mark-complete-btn.incomplete:disabled {
  opacity: 1;
  cursor: pointer;
}

/* Pending (not all required tasks complete yet) - show as grey, disabled when tasks incomplete */
.mark-complete-btn.pending {
  background: #e5e7eb;
  color: #2c3e50;
  border: 1px solid #ddd;
}

.mark-complete-btn.pending:hover:not(:disabled) {
  background: #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mark-complete-btn.pending:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.cancel-confirmation-header h3 {
  margin: 0 0 16px 0;
  color: #333;
  font-size: 1.2em;
}

.cancel-confirmation-body {
  margin-bottom: 24px;
}

.cancel-confirmation-body p {
  margin: 8px 0;
  color: #666;
  line-height: 1.5;
}

.cancel-confirmation-buttons {
  display: flex;
  gap: 12px;
  flex-direction: column;
}

.cancel-confirmation-btn {
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

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

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

.cancel-btn-primary {
  background-color: #dc3545;
  color: white;
}

.cancel-btn-primary:hover {
  background-color: #c82333;
}

/* Message Popup Styles */
.message-popup {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 20px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 1001;
  max-width: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.message-success {
  background-color: #28a745;
}

.message-error {
  background-color: #dc3545;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .cancel-confirmation-overlay {
    padding: 12px;
  }

  .cancel-confirmation-modal {
    padding: 20px;
  }

  .cancel-confirmation-buttons {
    gap: 8px;
  }

  .message-popup {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  /* Task Modal Mobile Optimizations - TRUE FULL SCREEN */
  #property-tasks-modal {
    padding: 0;
  }

  #property-tasks-modal .cancel-confirmation-modal {
    max-width: 100vw;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    /* Use dynamic viewport height for mobile browsers */
    border-radius: 0;
    margin: 0;
    max-height: none;
  }

  #property-tasks-modal .cancel-confirmation-header {
    padding: 10px 12px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: white;
    padding-top: max(10px, env(safe-area-inset-top));
  }

  #property-tasks-modal .cancel-confirmation-body {
    padding: 16px;
    padding-bottom: 24px;
    -webkit-overflow-scrolling: touch;
  }

  #property-tasks-modal .cancel-confirmation-footer {
    padding: 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: white;
  }

  .property-title {
    font-size: 1em;
  }

  .modal-close-btn {
    padding: 6px 10px;
    font-size: 0.85em;
  }

  .task-section {
    margin-bottom: 16px;
    margin-left: 0;
    margin-right: 0;
  }

  .task-section summary {
    padding: 12px 12px;
  }

  .task-section-content {
    padding: 12px;
  }

  .task-item {
    padding: 10px 12px;
    gap: 10px;
  }

  .task-checkbox {
    width: 18px;
    height: 18px;
  }

  .task-label {
    font-size: 0.9em;
  }

  .section-title {
    font-size: 1em;
  }

  .section-dot {
    width: 8px;
    height: 8px;
  }

  .snooze-btn {
    font-size: 0.8em;
    padding: 5px 10px;
  }

  .mark-complete-btn {
    padding: 12px 16px;
    font-size: 1em;
  }

  .event-details-content,
  .task-description {
    padding: 10px 12px;
    font-size: 0.9em;
  }

  .assignment-role {
    font-size: 0.9em;
  }

  .action-pill {
    font-size: 0.8em;
    padding: 3px 8px;
  }
}

@media (max-width: 480px) {

  /* Small screens also get true full screen */
  #property-tasks-modal .cancel-confirmation-modal {
    max-width: 100vw;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    margin: 0;
  }

  #property-tasks-modal .cancel-confirmation-header {
    padding: 8px 10px;
    padding-top: max(8px, env(safe-area-inset-top));
  }

  #property-tasks-modal .cancel-confirmation-body {
    padding: 12px;
  }

  #property-tasks-modal .cancel-confirmation-footer {
    padding: 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .task-section {
    margin-bottom: 12px;
  }

  .task-section summary {
    padding: 10px;
  }

  .task-section-content {
    padding: 10px;
  }

  .property-title {
    font-size: 1em;
  }

  .task-section summary {
    padding: 10px 12px;
  }

  .task-section-content {
    padding: 12px;
  }

  .task-item {
    padding: 8px 10px;
  }

  .section-title {
    font-size: 0.95em;
  }
}

.notes-div {
  width: 100%;
}

.notes-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  min-height: 100px;
  resize: vertical;
}

.checkbox-div {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 4px 0;
}

.checkbox-label {
  font-size: 1rem;
  color: #666;
}

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

  .shift-content {
    padding-right: 0;
  }

  .shift-note {
    padding-right: 0;
  }

  .shift-actions {
    position: static;
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
    gap: 8px;
  }

  .action-button {
    width: 40px;
    height: 40px;
  }

  .clock-status {
    padding: 16px 0 32px;
  }

  .my-button {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
  }

  .notes-input {
    padding: 10px;
    font-size: 0.95rem;
    box-sizing: border-box;
  }

  .checkbox-div {
    width: 100%;
    box-sizing: border-box;
  }

  /* Enhanced mobile touch targets */
  .schedule-item {
    min-height: 44px;
    padding: 16px;
  }

  .work-record-card {
    min-height: 44px;
    padding: 12px 16px;
  }

  .add-record-btn {
    min-height: 44px;
    padding: 12px 16px;
  }

  .view-all-history-btn {
    min-height: 44px;
    padding: 12px 16px;
  }

  .section-header {
    font-size: 1.3em;
    margin: 16px 0 12px;
  }

  /* Better grid layout for task cards on mobile */
  .schedule-list>div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
}



.history-tab {
  display: none;
}

.history-tab.active {
  display: block;
}

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

.modal-content {
  background: white;
  padding: 24px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
}

.form-label {
  display: block;
  font-size: 1rem;
  color: #333;
  margin-bottom: 8px;
  font-weight: 500;
  text-align: left;
}

.time-inputs-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.time-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.edit-form-row {
  margin-bottom: 16px;
  text-align: left;
}

.date-input,
.time-input,
.notes-input-edit {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  color: #333;
  background: white;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .modal-overlay {
    background-color: white;
    padding: 0;
  }

  .modal-content {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
  }

  .modal-header {
    padding: 16px 20px;
    margin: 0;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1;
  }

  form {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
  }

  .time-inputs-container {
    gap: 12px;
    margin-bottom: 16px;
  }

  .time-input-wrapper {
    gap: 6px;
  }

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

.clock-status-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.button-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.clock-in-time {
  color: #666;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-align: center;
  border-bottom: 1px dashed #2cab4d;
  padding-bottom: 4px;
  margin-bottom: 4px;
}

.clock-in-display {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
}

.clock-in-display a {
  color: #2cab4d;
  text-decoration: none;
}

.clock-in-display a:hover {
  text-decoration: underline;
}

.notes-div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
}

/* Update the shift-card styles to disable edit button for active records */
.shift-card.active .action-button.edit {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.clock-in-edit {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: white;
  z-index: 1000;
}

.clock-in-edit.active {
  display: flex;
}

.clock-in-edit-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.clock-in-edit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
  margin-bottom: 0;
  background-color: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
}

.clock-in-edit-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  text-align: left;
}

.clock-in-edit-header .modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 0;
  margin-left: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clock-in-edit-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.clock-in-edit-form .form-label {
  display: block;
  font-size: 1rem;
  color: #333;
  margin-bottom: 8px;
  font-weight: 500;
  text-align: left;
}

.clock-in-edit-form .time-input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  min-width: 200px;
}

.clock-in-edit-buttons {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid #eee;
}

.clock-in-edit-buttons button {
  width: calc(100% - 40px);
  margin: 0 20px;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.clock-in-edit-buttons .btn-save {
  background-color: #2cab4d;
  color: white;
}

.clock-in-edit-buttons .btn-cancel {
  background-color: #f8f9fa;
  color: #666;
}

@media (max-width: 768px) {
  .clock-in-edit-form {
    padding: 16px;
  }

  .clock-in-edit-buttons {
    padding: 16px;
  }

  .clock-in-edit-buttons button {
    width: calc(100% - 32px);
    margin: 0 16px;
    padding: 12px;
  }
}

.clock-display {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  color: #2c3e50;
  margin-bottom: 20px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.clock-in-time {
  font-weight: 600;
  color: #2cab4d;
}

.current-time {
  font-weight: 600;
  color: #3498db;
}

.time-separator {
  color: #95a5a6;
}

/* Year and month sections */
.year-section {
  margin-bottom: 25px;
}

.month-section {
  margin: 10px 0 20px 20px;
}

.section-header {
  cursor: pointer;
  color: #2c3e50;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.section-header:hover {}

.month-header {
  cursor: pointer;
  color: #3498db;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  padding: 8px;
  border-radius: 6px;
  transition: background-color 0.2s;
  gap: 8px;
}

.month-header:hover {
  background-color: #f8f9fa;
}

.hidden {
  display: none;
}

.toggle-icon {
  display: inline-block;
  width: 20px;
  margin-right: 8px;
  transition: transform 0.3s ease;
}

.month-content {
  margin-left: 20px;
}

.year-content {
  margin-left: 10px;
}

/* Mobile-friendly layout for header progress bars */
@media (max-width: 640px) {
  .month-header {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .month-header .prop-progress {
    flex: 1 1 100%;
    margin-left: 28px;
    /* align under text after the caret */
    margin-top: 6px;
  }
}

.date-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.yesterday-btn {
  background-color: transparent;
  color: #3498db;
  border: 1px solid #3498db;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  height: fit-content;
}

.yesterday-btn:hover {
  background-color: #f1f9fe;
}

.time-summary {
  color: #666;
  font-size: 0.9em;
  margin-left: 8px;
}

.period-summary {
  background-color: #f8f9fa;
  padding: 12px;
  border-radius: 8px;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.period-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.period-summary-label {
  color: #666;
  font-weight: 500;
}

.period-summary-value {
  color: #333;
  font-weight: 600;
}

@media (max-width: 768px) {
  .period-summary {
    padding: 10px;
    margin: 12px 0;
  }
}

/* New styles for Hour Bank */
.hour-bank-container {
  width: 100%;
  background-color: #f8f9fa;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.hour-bank-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.hour-bank-title {
  font-size: 1.2em;
  font-weight: bold;
  color: #333;
}

.hour-bank-value {
  font-size: 1.2em;
  font-weight: bold;
  color: #2cab4d;
  /* Green for hours below 0 (ahead of quota) */
}

.hour-bank-value.neutral {
  color: #3498db;
  /* Blue for hours between 0-40 (normal range) */
}

.hour-bank-value.negative {
  color: #dc3545;
  /* Red for hours above 40 (over quota) */
}

.hour-bank-progress {
  height: 10px;
  background-color: #e0e0e0;
  border-radius: 5px;
  margin-bottom: 12px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: #3498db;
  /* Blue for normal range (0-40 hours) */
  border-radius: 5px;
  transition: width 0.3s ease-in-out;
}

.progress-fill.negative {
  background-color: #dc3545;
  /* Red for negative hour bank */
}

.progress-fill.overtime {
  background-color: #2cab4d;
  /* Green for overtime (over 40 hours) */
}

.progress-bar {
  height: 100%;
  background-color: #3498db;
  /* Blue for normal range */
  border-radius: 5px;
  transition: width 0.3s ease-in-out;
}

.progress-bar.negative {
  background-color: #dc3545;
  /* Red for negative hour bank */
}

.progress-bar.overtime {
  background-color: #2cab4d;
  /* Green for overtime */
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8em;
  color: #666;
  margin-top: 8px;
}

.current-week-hours {
  font-weight: bold;
  color: #333;
}

.target-hours {
  font-weight: bold;
  color: #666;
}

.hour-bank-details {
  font-size: 0.9em;
  color: #666;
  margin-top: 10px;
}

.week-info {
  display: inline-block;
  margin-right: 10px;
}

.overtime-info {
  display: inline-block;
  color: #2cab4d;
  /* Overtime color */
  font-weight: bold;
}

/* Weekly Breakdown Styles */
.weekly-breakdown-container {
  margin-top: 16px;
  border-top: 1px solid #eee;
  padding-top: 16px;
}

.weekly-breakdown-toggle {
  width: 100%;
  padding: 12px 16px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  color: #333;
  transition: all 0.2s;
}

.weekly-breakdown-toggle:hover {
  background-color: #e9ecef;
}

.dropdown-arrow {
  transition: transform 0.3s ease;
}

.weekly-breakdown-toggle.active .dropdown-arrow {
  transform: rotate(180deg);
}

.weekly-breakdown-content {
  display: none;
  margin-top: 12px;
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 12px;
  max-height: 300px;
  overflow-y: auto;
}

.weekly-breakdown-content.active {
  display: block;
}

.week-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
  font-size: 0.9rem;
}

.week-row:last-child {
  border-bottom: none;
}

.week-label {
  font-weight: 500;
  color: #333;
  flex: 1;
}

.week-hours {
  color: #666;
  margin: 0 12px;
}

.week-bank {
  font-weight: 500;
  min-width: 80px;
  text-align: right;
}

.week-bank.positive {
  color: #2cab4d;
  /* Green for hours below 0 (ahead of quota) */
}

.week-bank.neutral {
  color: #3498db;
  /* Blue for hours between 0-40 (normal range) */
}

.week-bank.negative {
  color: #dc3545;
  /* Red for hours above 40 (over quota) */
}

.no-data {
  text-align: center;
  color: #666;
  font-style: italic;
}

@media (max-width: 768px) {
  .week-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .week-hours {
    margin: 0;
  }

  .week-bank {
    text-align: left;
    min-width: auto;
  }
}

/* My Schedule Section Styles */
#my-schedule {
  margin-bottom: 30px;
}

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.schedule-item {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
  transition: all 0.3s ease;
  cursor: pointer;
}

.schedule-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #007bff;
}

.schedule-item:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.schedule-date {
  font-weight: bold;
  color: #333;
  font-size: 1.1em;
  text-align: center;
  padding: 12px 0;
}

/* Removed detailed schedule styles - no longer needed */

/* Hour Bank Section Styles */
#hour-bank {
  margin-bottom: 30px;
}

.hour-bank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid #eee;
  margin-bottom: 16px;
}

.hour-bank-label {
  font-weight: 500;
  color: #333;
  font-size: 1em;
}

.hour-bank-value {
  font-weight: bold;
  font-size: 1.1em;
}

.hour-bank-value.positive {
  color: #28a745;
}

.hour-bank-value.negative {
  color: #dc3545;
}

.no-schedule .schedule-date {
  color: #666;
  font-style: italic;
}

.schedule-actions {
  text-align: center;
  margin-top: 16px;
}

.view-full-schedule-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #007bff;
  color: white;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.view-full-schedule-btn:hover {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.view-full-schedule-btn i {
  font-size: 1.1em;
}

/* Work History Section Styles */
.work-history-section {
  margin-bottom: 24px;
}

.work-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.work-history-title {
  font-size: 1.5em;
  color: #333;
  margin: 0;
  font-weight: 600;
}

/* Work history list now styled via work_history_shared.css */
.work-records-list {}

/* Work history cards now styled via work_history_shared.css */
.work-record-card {}

.work-record-card:hover {}

.work-record-info {}

.work-record-date {}

.work-record-time {}

.work-record-notes {}

.work-record-arrow {}

.work-record-card:hover .work-record-arrow {}

.view-all-history-btn {
  width: 100%;
  background: #6c757d;
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.view-all-history-btn:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

.view-all-history-btn i {
  font-size: 1.1em;
}

@media (max-width: 768px) {
  .schedule-item {
    padding: 14px;
  }

  .view-full-schedule-btn {
    padding: 14px 20px;
  }

  .work-history-header {
    flex-direction: column;
    align-items: stretch;
  }

  .work-record-card {
    padding: 10px 12px;
  }

  .work-record-date {
    font-size: 0.9em;
  }

  .work-record-time,
  .work-record-notes {
    font-size: 0.8em;
  }
}

/* Admin Date Picker Styles */
#admin-date-picker {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  background: white;
  cursor: pointer;
  transition: border-color 0.2s;
}

#admin-date-picker:hover {
  border-color: #17a9e4;
}

#admin-date-picker:focus {
  outline: none;
  border-color: #17a9e4;
  box-shadow: 0 0 0 2px rgba(23, 169, 228, 0.1);
}

@media (max-width: 768px) {
  .section-header {
    flex-direction: column;
    align-items: flex-start !important;
  }

  #admin-date-picker {
    width: 100%;
    margin-top: 8px;
  }
}