/* ===== OVERVIEW PAGE SPECIFIC STYLES ===== */

/* Provider Workload Monitor Styling */
.workload-monitor {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.workload-monitor h4 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-size: 1.6rem;
  font-weight: 600;
}

.provider-load {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--input-bg);
  border-radius: 6px;
}

.provider-load:last-child {
  margin-bottom: 0;
}

.provider-name {
  font-weight: 600;
  min-width: 120px;
  color: var(--text-primary);
}

.load-bar {
  flex: 1;
  height: 24px;
  background: var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  margin: 0 1rem;
}

.load-segment {
  flex: 1;
  height: 100%;
  margin-right: 1px;
  border-radius: 1px;
  transition: background-color 0.3s;
}

.load-segment:last-child {
  margin-right: 0;
}

.load-segment.filled {
  background: var(--success-color);
}

.load-segment.filled.medium {
  background: var(--warning-color);
}

.load-segment.filled.high {
  background: var(--error-color);
}

.load-segment.empty {
  background: var(--border-color);
}

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

.load-percentage {
  font-weight: 600;
  min-width: 40px;
}

.load-percentage.high {
  color: var(--error-color);
}

.load-percentage.medium {
  color: var(--warning-color);
}

.load-percentage.low {
  color: var(--success-color);
}

.load-count {
  font-size: 1.2rem;
  color: var(--text-secondary);
}

/* Patient List Styling */
.patient-list {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 1.6rem;
  overflow: hidden;
}

.patient-item {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  transition: background-color 0.2s;
  position: relative;
}

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

.patient-item:hover {
  background: var(--panel-hover-bg);
}

.patient-item.overdue {
  background: var(--appointment-urgent-bg);
  border-left: 4px solid var(--flow-overdue);
}

.patient-info h4 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 1.5rem;
}

.patient-info p {
  color: var(--text-secondary);
  font-size: 1.3rem;
  line-height: 1.5;
  margin-bottom: 0.3rem;
}

.patient-info .reason {
  font-style: italic;
  color: var(--text-primary);
}

.patient-actions {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Activity Feed Styling */
.activity-feed {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 1.6rem;
  overflow: hidden;
}

.activity-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.activity-time {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Collapse indicator for waiting list preview */
.collapse-indicator {
  text-align: center !important;
  font-style: italic;
  color: var(--text-secondary) !important;
}

.collapse-indicator p {
  margin-bottom: 1rem;
}

/* Quick Actions specific styling */
.overview-quick-actions .action-header {
  background: var(--accent-primary);
  color: white;
  margin: -2rem -2rem 2rem -2rem;
  padding: 1.5rem 2rem;
  border-radius: 8px 8px 0 0;
}

/* Stats cards hover effect specific to overview */
.overview-stats .stat-card:hover {
  background: var(--panel-hover-bg);
  border-color: var(--accent-primary);
}

/* Waiting list preview specific styles */
.waiting-list-preview .list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.waiting-list-preview .list-header button {
  margin: 0;
}

/* Provider workload overview specific styles */
.overview-workload .workload-monitor h4 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.overview-workload .workload-monitor h4::after {
  content: "Live Updates";
  font-size: 1.2rem;
  font-weight: normal;
  color: var(--text-secondary);
  background: var(--success-color);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-size: 1rem;
}

/* Overview activity feed specific styles */
.overview-activity .activity-feed {
  max-height: 300px;
  overflow-y: auto;
}

.overview-activity .activity-item:first-child {
  background: var(--panel-hover-bg);
  border-radius: 4px;
}

/* Priority indicator for overview waiting list */
.waiting-list-preview .patient-item.priority {
  border-left: 4px solid var(--warning-color);
  background: var(--appointment-priority-bg);
}

.waiting-list-preview .patient-item.urgent {
  border-left: 4px solid var(--error-color);
  background: var(--appointment-urgent-bg);
}

/* Loading states for overview dashboard */
.overview-loading .stat-number::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

/* Responsive adjustments for overview page */
@media screen and (max-width: 1200px) {
  .provider-load {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .provider-name {
    min-width: 100px;
  }
}

@media screen and (max-width: 768px) {
  .waiting-list-preview .list-header {
    flex-direction: column;
    align-items: stretch;
  }

  .waiting-list-preview .list-header button {
    width: 100%;
  }

  .overview-workload .workload-monitor h4::after {
    display: none;
  }

  .provider-load {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .load-bar {
    margin: 0;
  }

  .provider-stats {
    justify-content: space-between;
  }

  .patient-item {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .patient-actions {
    text-align: left;
  }
}
