/* Advanced Features CSS */

/* ========================================== */
/* CSS VARIABLES FOR CONSISTENCY */
/* ========================================== */
:root {
  /* Colors */
  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-secondary: #6b7280;
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-danger-bg: #fef2f2;
  --color-danger-border: #fecaca;
  
  /* Grays */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 20px;
  --spacing-2xl: 24px;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Priority and Status Form Elements */
.priority-status-row { 
  display: flex; 
  gap: 8px; 
  margin-bottom: 8px; 
}

/* Base input styling - reusable class */
.priority-select, 
.status-select, 
.hours-input { 
  flex: 1; 
  padding: var(--spacing-sm); 
  border: 1px solid var(--gray-300); 
  border-radius: var(--radius-sm); 
  font-family: inherit;
}

/* Badge styling - reusable */
.priority-badge, 
.status-display { 
  font-weight: bold; 
  font-size: 12px; 
  margin-right: var(--spacing-sm); 
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.time-info { 
  font-size: 12px; 
  color: var(--gray-500); 
  background: var(--gray-50);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* Edit Task Modal */
.modal { 
  position: fixed; 
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0; 
  background: rgba(0,0,0,0.5); 
  display: flex; /* Always use flex layout */
  visibility: hidden; /* Hidden by default - doesn't block clicks */
  opacity: 0;
  align-items: center; 
  justify-content: center; 
  z-index: -1; /* Negative z-index prevents any blocking */
  pointer-events: none; /* Don't block clicks when hidden */
  transition: opacity 0.2s, visibility 0.2s;
}

.modal.show {
  visibility: visible; /* Show when .show class is added */
  opacity: 1;
  pointer-events: auto; /* Allow clicks when visible */
  z-index: 1000; /* Restore normal z-index when shown */
}

#notificationsModal.show {
  z-index: 10001; /* Higher z-index for notifications */
}

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

.modal-content h3 { 
  margin-top: 0; 
  color: var(--gray-800); 
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: var(--spacing-md);
}

.edit-task-form .form-group { 
  margin-bottom: 16px; 
}

.edit-task-form label { 
  display: block; 
  margin-bottom: var(--spacing-xs); 
  font-weight: 600; 
  color: var(--gray-700); 
}

/* Consolidated input styling */
.edit-task-form input, 
.edit-task-form textarea, 
.edit-task-form select { 
  width: 100%; 
  padding: var(--spacing-sm); 
  border: 1px solid var(--gray-300); 
  border-radius: var(--radius-sm); 
  font-family: inherit;
  font-size: 14px;
}

.edit-task-form input:focus,
.edit-task-form textarea:focus,
.edit-task-form select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-row { 
  display: flex; 
  gap: var(--spacing-lg); 
}

.form-row .form-group { 
  flex: 1; 
}

.modal-actions { 
  display: flex; 
  gap: var(--spacing-sm); 
  justify-content: flex-end; 
  margin-top: var(--spacing-2xl); 
  border-top: 1px solid var(--gray-200);
  padding-top: var(--spacing-lg);
}

/* Reusable button styling */
.secondary-btn { 
  padding: var(--spacing-sm) var(--spacing-lg); 
  background: var(--gray-100); 
  color: var(--gray-700); 
  border: 1px solid var(--gray-300); 
  border-radius: var(--radius-sm); 
  cursor: pointer;
  font-weight: 500;
}

.secondary-btn:hover { 
  background: var(--gray-200); 
}

/* Task Card Enhancements */
.task-badges { 
  display: flex; 
  gap: 8px; 
  align-items: center; 
  flex-wrap: wrap;
}

.task-priority, 
.task-status-display { 
  font-size: 12px; 
  font-weight: bold; 
}

.task-time { 
  font-size: 12px; 
  color: var(--gray-500); 
  margin-right: var(--spacing-sm); 
  background: var(--gray-50);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* Status and Priority Colors */
.status-not-started { color: var(--gray-500) !important; }
.status-in-progress { color: var(--color-primary) !important; }
.status-waiting { color: var(--color-warning) !important; }
.status-paused { color: #8b5cf6 !important; }
.status-completed { color: var(--color-success) !important; }

.priority-high { color: var(--color-danger) !important; }
.priority-medium { color: var(--color-warning) !important; }
.priority-low { color: var(--color-success) !important; }

/* Time Tracking Elements */
.time-entry-form {
  background: var(--gray-50);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  margin: var(--spacing-lg) 0;
}

.time-entry-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-sm);
}

.time-entry-item:last-child {
  margin-bottom: 0;
}

.time-entry-info {
  flex: 1;
}

.time-entry-user {
  font-size: 12px;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 12px;
}

/* Timer Interface */
.quick-timer {
  background: #f9fafb;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
}

.timer-display {
  margin: 16px 0;
}

#timerDisplay {
  font-family: 'Courier New', monospace;
  font-size: 32px;
  font-weight: bold;
  color: #1f2937;
  background: white;
  padding: 16px 24px;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
}

.timer-controls {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.timer-controls button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  min-width: 100px;
}

.timer-controls button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Manual Entry */
.manual-entry {
  background: white;
  border: 1px solid #e5e7eb;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.manual-entry h4 {
  margin-top: 0;
  color: #1f2937;
}

/* Time Entries List */
.time-entries-list {
  background: white;
  border: 1px solid #e5e7eb;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.time-entries-list h4 {
  margin-top: 0;
  color: #1f2937;
}


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

.form-toggle-btn {
  width: 32px;
  height: 32px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 50%;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: #374151;
}

.form-toggle-btn:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
  transform: scale(1.05);
}



/* Collapsible form animation */
.task-form {
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

.task-form-collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.task-form-expanded {
  max-height: 500px;
  opacity: 1;
  margin-top: 0;
  margin-bottom: 0;
}


.btn {
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}



/* Dashboard Widgets */
.customize-widgets-btn {
  padding: 8px 16px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 20px;
}

.customize-widgets-btn:hover {
  background: #2563eb;
}

.widget {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 16px;
}

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

.widget-header h3 {
  margin: 0;
  color: #1f2937;
  font-size: 16px;
}

.widget-toggle {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.widget-toggle:hover {
  background: #f3f4f6;
  color: #374151;
}

.widget-content {
  padding: 16px 20px;
}

.widget.collapsed .widget-content {
  display: none;
}

.widget.collapsed .widget-toggle::before {
  content: '+';
}

/* Productivity Widget */
.productivity-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
}

.productivity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
}

.productivity-icon {
  font-size: 24px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
}

.productivity-value {
  font-size: 18px;
  font-weight: bold;
  color: #1f2937;
}

.productivity-label {
  font-size: 12px;
  color: #6b7280;
}

/* Quick Actions Widget */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  background: #f8fafc;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: #374151;
}

.quick-action-btn:hover {
  background: #f1f5f9;
  border-color: #3b82f6;
  transform: translateY(-2px);
}

.quick-action-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
}

.quick-action-btn span:last-child {
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

/* Team Status Widget */
.team-member {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}

.team-member:last-child {
  border-bottom: none;
}

.team-member-avatar {
  width: 32px;
  height: 32px;
  background: #3b82f6;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.team-member-info {
  flex: 1;
}

.team-member-name {
  font-weight: 500;
  color: #1f2937;
  font-size: 14px;
}

.team-member-status {
  font-size: 12px;
  color: #6b7280;
}

.team-member-activity {
  font-size: 12px;
  color: #9ca3af;
}

/* Widget Customization Modal */
.widget-customization-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.widget-customization-content {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.widget-customization-header {
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.widget-customization-body {
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
}

.widget-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.widget-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.widget-item:hover {
  border-color: #3b82f6;
}

.widget-item.active {
  border-color: #3b82f6;
  background: #eff6ff;
}

.widget-checkbox {
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.widget-checkbox.checked {
  background: #3b82f6;
  border-color: #3b82f6;
}

.widget-checkbox.checked::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.widget-info {
  flex: 1;
}

.widget-name {
  font-weight: 500;
  color: #1f2937;
  margin-bottom: 2px;
}

.widget-description {
  font-size: 14px;
  color: #6b7280;
}

/* Advanced Search */
.advanced-search-btn {
  padding: 8px 16px;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.advanced-search-btn:hover {
  background: #059669;
}

.advanced-search-panel {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.search-filters {
  margin-bottom: 24px;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-group label {
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

.filter-group input,
.filter-group select {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background: white;
}

.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.execute-search-btn {
  padding: 10px 20px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

.execute-search-btn:hover {
  background: #2563eb;
}

.clear-search-btn {
  padding: 10px 20px;
  background: #6b7280;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.clear-search-btn:hover {
  background: #4b5563;
}

.save-search-btn {
  padding: 10px 20px;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.save-search-btn:hover {
  background: #059669;
}

.saved-searches {
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
}

.saved-searches h4 {
  margin: 0 0 12px;
  color: #1f2937;
  font-size: 16px;
}

.saved-search-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 8px;
}

.saved-search-name {
  font-weight: 500;
  color: #1f2937;
}

.saved-search-description {
  font-size: 12px;
  color: #6b7280;
}

.saved-search-actions {
  display: flex;
  gap: 8px;
}

.saved-search-btn {
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.load-search-btn {
  background: #3b82f6;
  color: white;
}

.delete-search-btn {
  background: #ef4444;
  color: white;
}

.search-results-summary {
  padding: 12px 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  margin-bottom: 16px;
  color: #1e40af;
}

.no-results {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
  font-style: italic;
}

/* Activity Log */
.activity-item {
  display: flex;
  align-items: start;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.2s;
}

.activity-item:hover {
  background-color: #f9fafb;
}

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

.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: white;
  font-weight: bold;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-description {
  font-weight: 500;
  color: #1f2937;
  margin-bottom: 4px;
  line-height: 1.4;
}

.activity-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.activity-user {
  color: #6b7280;
  font-weight: 500;
}

.activity-timestamp {
  color: #9ca3af;
}

/* Advanced Search */
.search-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
}

.search-filter {
  flex: 1;
  min-width: 150px;
}

.search-filter label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 4px;
}

.search-filter input,
.search-filter select {
  width: 100%;
  padding: 6px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
}

/* Bulk Operations */
.bulk-actions {
  position: sticky;
  top: 0;
  background: white;
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  z-index: 10;
}

.bulk-select-all {
  margin-right: 16px;
}

.bulk-action-btn {
  margin-right: 8px;
  padding: 8px 12px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.bulk-action-btn:hover {
  background: #2563eb;
}

.bulk-action-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}



/* Reports and Analytics */
.report-section {
  margin-bottom: 32px;
}

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

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  padding: 20px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  text-align: center;
}

.stat-value {
  font-size: 32px;
  font-weight: bold;
  color: #1f2937;
}

.stat-label {
  font-size: 14px;
  color: #6b7280;
  margin-top: 4px;
}

/* Deadline Management */
.deadlines-section {
  margin-bottom: 32px;
}

.deadlines-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.deadline-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  transition: all 0.2s;
}

.deadline-item:hover {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.deadline-item.deadline-overdue {
  border-left: 4px solid #ef4444;
  background: #fef2f2;
}

.deadline-item.deadline-today {
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
}

.deadline-item.deadline-urgent {
  border-left: 4px solid #f97316;
  background: #fff7ed;
}

.deadline-item.deadline-upcoming {
  border-left: 4px solid #10b981;
  background: #f0fdf4;
}

.deadline-icon {
  font-size: 20px;
  width: 32px;
  text-align: center;
}

.deadline-content {
  flex: 1;
}

.deadline-title {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 2px;
}

.deadline-project {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}

.deadline-time {
  font-size: 12px;
  font-weight: 600;
}

.deadline-overdue .deadline-time {
  color: #ef4444;
}

.deadline-today .deadline-time {
  color: #f59e0b;
}

.deadline-urgent .deadline-time {
  color: #f97316;
}

.deadline-upcoming .deadline-time {
  color: #10b981;
}

.deadline-action {
  padding: 6px 12px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}

.deadline-action:hover {
  background: #2563eb;
}

/* Task Card Deadline Styling */
.task-deadline {
  font-size: 12px;
  font-weight: bold;
  margin: 4px 0;
}

/* Project Groups Styles */
.groups-section {
    margin: 20px 0;
}

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

.create-group-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.create-group-btn:hover {
    background: #2563eb;
}

.project-groups-list {
    display: grid;
    gap: 15px;
}

.project-group-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    background: white;
    position: relative;
}

.project-group-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.group-info h4 {
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.group-info p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.group-actions {
    display: flex;
    gap: 8px;
}

.group-actions button {
    background: none;
    border: 1px solid #d1d5db;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.group-actions button:hover {
    background: #f3f4f6;
}

.group-members {
    margin-top: 12px;
}

.group-members h5 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #374151;
}

.members-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.member-badge {
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: #374151;
}

.create-group-form {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #e5e7eb;
}

.create-group-form h4 {
    margin: 0 0 16px 0;
    color: #374151;
}

.create-group-form .form-group {
    margin-bottom: 16px;
}

.create-group-form label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: #374151;
}

.create-group-form input,
.create-group-form textarea,
.create-group-form select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
}

.create-group-form textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.secondary-btn {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.secondary-btn:hover {
    background: #f9fafb;
}

.primary-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.primary-btn:hover {
    background: #2563eb;
}

.add-member-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.add-member-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.add-member-form select {
    flex: 1;
}

.add-member-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 500;
}

.add-member-btn:hover {
    background: #2563eb;
}

.add-external-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.external-member {
    background-color: #f0fdf4 !important;
    border-color: #10b981 !important;
    color: #065f46 !important;
}

.external-member::before {
    content: '👥 ';
    margin-right: 4px;
}

/* Assignment Row */
.assignment-row {
    margin: 15px 0;
}

.assignment-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.assignment-select optgroup {
    font-weight: bold;
    color: #374151;
}

.assignment-select option {
    font-weight: normal;
    color: #6b7280;
}

/* Assignment Display */
.task-assignment {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
}

.assignment-type {
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.assignment-type.user {
    background: #dbeafe;
    color: #1e40af;
}

.assignment-type.group {
    background: #dcfce7;
    color: #166534;
}

/* Responsive Design for Advanced Features */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
  }
  
  .priority-status-row {
    flex-direction: column;
  }
  
  .search-filters {
    flex-direction: column;
  }
  
  .filter-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  
  .filter-group {
    width: 100% !important;
  }
  
  .filter-group input,
  .filter-group select {
    font-size: 16px !important;
    padding: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .modal-content {
    width: 95%;
    padding: 16px;
  }
  
  .stat-grid {
    grid-template-columns: 1fr;
  }
  
  .deadline-item {
    flex-direction: column;
    text-align: center;
  }
  
  .deadline-content {
    text-align: center;
  }

  .project-groups-list {
    grid-template-columns: 1fr;
  }
  
  .project-group-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .add-member-form {
    flex-direction: column;
  }
}

/* Notifications */
.notifications-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  pointer-events: none;
}

.notification {
  background: white;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-left: 4px solid #3b82f6;
  min-width: 300px;
  max-width: 400px;
  pointer-events: auto;
  opacity: 1;
  transform: translateX(0);
  transition: all 0.3s ease;
  position: relative;
}

.notification.notification-success {
  border-left-color: #10b981;
  background: #f0fdf4;
}

.notification.notification-error {
  border-left-color: #ef4444;
  background: #fef2f2;
}

.notification.notification-warning {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.notification-title {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
  font-size: 14px;
}

.notification-message {
  color: #4b5563;
  font-size: 14px;
  line-height: 1.4;
}

.notification-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 18px;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.notification-close:hover {
  color: #4b5563;
}

/* User Modal Fixed Size */
.user-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11000;
}

.user-modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 900px;
  height: 85vh;
  max-height: 700px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.user-modal-header {
  padding: 20px 24px;
  border-bottom: 2px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.user-modal-header h2 {
  margin: 0;
  color: #1f2937;
  font-size: 24px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 32px;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--gray-800);
}

.user-modal-tabs {
  padding: 0 var(--spacing-2xl);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  gap: var(--spacing-sm);
  flex-shrink: 0;
  overflow-x: auto;
}

.roles-section {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.user-tab {
  padding: var(--spacing-md) var(--spacing-xl);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-weight: 500;
  color: var(--gray-500);
  transition: all 0.2s;
  white-space: nowrap;
}

.user-tab:hover {
  color: var(--gray-700);
  background: var(--gray-50);
}

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

.user-tab-content {
  display: none;
  padding: var(--spacing-2xl);
  overflow-y: auto;
  flex: 1;
}

.user-tab-content.active {
  display: block;
}

/* Templates Management */
.templates-management-section {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  flex: 1;
  overflow-y: auto;
}

.template-card {
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
  height: fit-content;
}

.template-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

.template-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: var(--spacing-md);
}

.template-icon {
  font-size: 32px;
  margin-bottom: var(--spacing-sm);
}

.template-actions {
  display: flex;
  gap: var(--spacing-xs);
  opacity: 0;
  transition: opacity 0.2s;
}

.template-card:hover .template-actions {
  opacity: 1;
}

.template-action-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--gray-300);
  background: white;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s;
}

.template-action-btn:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
}

.template-action-btn.delete:hover {
  background: var(--color-danger-bg);
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.template-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0 0 var(--spacing-sm) 0;
}

.template-description {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.5;
  margin-bottom: var(--spacing-md);
}

.template-meta {
  display: flex;
  gap: var(--spacing-md);
  font-size: 12px;
  color: var(--gray-400);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--gray-100);
}

.template-meta-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.template-badge {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-sm);
  background: #eff6ff;
  color: var(--color-primary);
  border-radius: var(--radius-xl);
  font-size: 11px;
  font-weight: 600;
  margin-top: var(--spacing-sm);
}

.template-badge.custom {
  background: #f0fdf4;
  color: var(--color-success);
}

/* Add/Edit Template Modal */
.template-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

.template-modal-content {
  background: white;
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
}

.template-modal-header {
  padding: var(--spacing-xl) var(--spacing-2xl);
  border-bottom: 2px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.template-modal-header h3 {
  margin: 0;
  color: var(--gray-800);
  font-size: 20px;
}

.template-modal-body {
  padding: var(--spacing-2xl);
  overflow-y: auto;
  flex: 1;
}

.template-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

.template-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.template-form label {
  font-weight: 600;
  color: #374151;
  font-size: 14px;
}

.template-form input,
.template-form textarea,
.template-form select {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

.template-form input:focus,
.template-form textarea:focus,
.template-form select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.template-form textarea {
  resize: vertical;
  min-height: 80px;
}

.template-phases {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  background: #f9fafb;
}

.template-phases h4 {
  margin: 0 0 12px 0;
  color: #1f2937;
  font-size: 16px;
}

.phase-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
}

.phase-item:last-child {
  margin-bottom: 0;
}

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

.phase-title-input {
  flex: 1;
  margin-right: 8px;
}

.remove-phase-btn {
  padding: 4px 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #ef4444;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.remove-phase-btn:hover {
  background: #fee2e2;
}

.phase-tasks {
  margin-top: 8px;
  padding-left: 16px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.task-item input {
  flex: 1;
}

.remove-task-btn {
  padding: 2px 6px;
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 16px;
}

.add-task-btn {
  padding: 6px 12px;
  background: white;
  border: 1px dashed #d1d5db;
  color: #6b7280;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  width: 100%;
  margin-top: 6px;
}

.add-task-btn:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

.add-phase-btn {
  padding: 10px 16px;
  background: white;
  border: 2px dashed #d1d5db;
  color: #6b7280;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  margin-top: 12px;
}

.add-phase-btn:hover {
  border-color: #3b82f6;
  color: #3b82f6;
  background: #f0f9ff;
}

.template-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Language Selector */
.language-selector-box {
  padding: var(--spacing-md);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-lg);
}

.language-label {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
  cursor: pointer;
}

.language-icon {
  font-size: 16px;
}

.language-select {
  width: 100%;
  padding: var(--spacing-sm);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  color: white;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.language-select:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.language-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.language-select option {
  background: #1f2937;
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .user-modal-content {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .language-selector-box {
    padding: var(--spacing-sm);
  }
  
  .templates-grid {
    grid-template-columns: 1fr;
  }
  
  .user-modal-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}