/* css/dashboard.css - Dashboard panels, modals, notifications, tabs, and switches */

/* Common Section Header */
.section-header {
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.section-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
}
.section-header p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: 4px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
}
.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.2);
}
.stat-card:nth-child(2) .stat-icon {
  background: rgba(6, 182, 212, 0.1);
  color: var(--info);
  border-color: rgba(6, 182, 212, 0.2);
}
.stat-card:nth-child(3) .stat-icon {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.2);
}
.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  font-family: var(--font-headings);
  line-height: 1.2;
}
.stat-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Toggle Switch Container */
.toggle-container {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.toggle-switch {
  position: relative;
  width: 48px;
  height: 24px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  transition: all var(--transition-fast);
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-secondary);
  transition: all var(--transition-fast);
}
.toggle-container.active .toggle-switch {
  background: var(--primary-dark);
  border-color: var(--primary-light);
}
.toggle-container.active .toggle-switch::after {
  left: 26px;
  background: var(--text-primary);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.25s ease;
}
.modal-overlay.active {
  display: flex;
}
.modal-content {
  width: 100%;
  max-width: 500px;
  border-radius: var(--radius-lg);
  position: relative;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  transition: color var(--transition-fast);
}
.modal-close:hover {
  color: var(--text-primary);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}
.toast {
  background: var(--bg-secondary);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  min-width: 300px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn var(--transition-normal);
  transition: all var(--transition-normal);
}
.toast.success { border-left-color: var(--success); }
.toast.warning { border-left-color: var(--warning); }
.toast.danger { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--info); }

.toast-icon {
  font-size: 1.25rem;
}
.toast.success .toast-icon { color: var(--success); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.danger .toast-icon { color: var(--danger); }
.toast.info .toast-icon { color: var(--info); }

.toast-message {
  font-size: 0.9rem;
  font-weight: 500;
  flex-grow: 1;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Tabs */
.tabs-container {
  display: flex;
  gap: 8px;
  background: rgba(255,255,255,0.03);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  margin-bottom: 24px;
  align-self: flex-start;
}
.tab-btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.tab-btn:hover {
  color: var(--text-primary);
}
.tab-btn.active {
  color: var(--text-primary);
  background: var(--bg-tertiary);
  box-shadow: var(--shadow-sm);
}
