/**
 * My Work Page - Styles
 * Dedicated page for viewing all work items
 * Mobile-first, responsive design
 */

.my-work-container {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  background: #F9FAFB;
  min-height: 100vh;
}

/* Header Section */
.my-work-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.my-work-title {
  font-size: 2rem;
  font-weight: 600;
  color: #111827;
}

.my-work-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* Active Filter Banner */
.active-filter-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  border: 1px solid #C7D2FE;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.filter-banner-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #4338CA;
}

.filter-banner-icon {
  width: 18px;
  height: 18px;
}

.filter-banner-text {
  font-size: 14px;
}

.filter-banner-text strong {
  font-weight: 600;
}

.filter-banner-clear {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  background: white;
  border: 1px solid #C7D2FE;
  border-radius: 6px;
  font-size: 13px;
  color: #4338CA;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-banner-clear:hover {
  background: #4338CA;
  color: white;
  border-color: #4338CA;
}

.filter-banner-clear i {
  width: 14px;
  height: 14px;
}

/* Summary Stats Bar */
.my-work-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.summary-stat {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.summary-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.summary-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.summary-stat-icon.warning {
  background: #FEF3C7;
  color: #F59E0B;
}

.summary-stat-icon.danger {
  background: #FEE2E2;
  color: #EF4444;
}

.summary-stat-icon.info {
  background: #E0E7FF;
  color: #6366F1;
}

.summary-stat-icon.success {
  background: #D1FAE5;
  color: #10B981;
}

.summary-stat-content {
  flex: 1;
}

.summary-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  line-height: 1;
}

.summary-stat-label {
  font-size: 0.875rem;
  color: #6B7280;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* Filters and Search Section */
.my-work-controls {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.controls-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}

/* Search Box - Left Side */
.search-box {
  position: relative;
  max-width: 500px;
}

.search-box input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1px solid #D1D5DB;
  border-radius: 10px;
  font-size: 14px;
  background: #F9FAFB;
  color: #111827;
  transition: all 0.2s ease;
}

.search-box input:hover {
  background: #FFFFFF;
  border-color: #9CA3AF;
}

.search-box input:focus {
  outline: none;
  background: #FFFFFF;
  border-color: #6366F1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.08);
}

.search-box input::placeholder {
  color: #9CA3AF;
}

.search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #6B7280;
  width: 18px;
  height: 18px;
}

/* Filter Group - Right Side */
.filter-group {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
}

.filter-select {
  padding: 12px 16px;
  border: 1px solid #D1D5DB;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  background: #F9FAFB;
  color: #374151;
  min-width: 160px;
  transition: all 0.2s ease;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.filter-select:hover {
  background: #FFFFFF;
  border-color: #9CA3AF;
}

.filter-select:focus {
  outline: none;
  background: #FFFFFF;
  border-color: #6366F1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.08);
}

/* Quick Filters */
.quick-filters {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #F3F4F6;
  flex-wrap: wrap;
}

.quick-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  background: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.quick-filter-chip:hover {
  background: #F9FAFB;
  border-color: #6366F1;
  color: #6366F1;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.quick-filter-chip.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #6366F1;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.quick-filter-chip i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Individual Quick Filter Colors */
.quick-filter-chip[data-filter="overdue"]:not(.active):hover {
  border-color: #DC2626;
  color: #DC2626;
  background: #FEF2F2;
}

.quick-filter-chip[data-filter="overdue"].active {
  background: #DC2626;
  border-color: #DC2626;
}

.quick-filter-chip[data-filter="due-today"]:not(.active):hover {
  border-color: #F59E0B;
  color: #F59E0B;
  background: #FFFBEB;
}

.quick-filter-chip[data-filter="due-today"].active {
  background: #F59E0B;
  border-color: #F59E0B;
}

.quick-filter-chip[data-filter="pending"]:not(.active):hover {
  border-color: #6366F1;
  color: #6366F1;
  background: #EEF2FF;
}

.quick-filter-chip[data-filter="pending"].active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #6366F1;
}

.quick-filter-chip[data-filter="uar"]:not(.active):hover {
  border-color: #10B981;
  color: #10B981;
  background: #ECFDF5;
}

.quick-filter-chip[data-filter="uar"].active {
  background: #10B981;
  border-color: #10B981;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .controls-row {
    grid-template-columns: 1fr;
  }
  
  .filter-group {
    justify-content: flex-start;
  }
  
  .search-box {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .my-work-controls {
    padding: 16px;
  }
  
  .filter-group {
    flex-direction: column;
    width: 100%;
  }
  
  .filter-select {
    width: 100%;
  }
  
  .quick-filters {
    gap: 8px;
  }
  
  .quick-filter-chip {
    font-size: 13px;
    padding: 8px 14px;
  }
}
  background: #FFFFFF;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.quick-filter-chip:hover {
  border-color: #6366F1;
  color: #6366F1;
  background: #EEF2FF;
}

.quick-filter-chip.active {
  background: #6366F1;
  color: #FFFFFF;
  border-color: #6366F1;
}

/* Work Items Grid */
.work-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Work Items Section - Grouped Layout */
.work-items-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.work-items-section {
  margin-bottom: 2rem;
}

.work-items-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #E5E7EB;
}

.work-items-section-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.work-items-section-title h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin: 0 0 0.25rem 0;
}

.work-items-section-desc {
  font-size: 0.875rem;
  color: #6B7280;
  margin: 0;
  font-weight: 400;
}

.work-items-section-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: #EEF2FF;
  color: #6366F1;
  flex-shrink: 0;
}

.work-items-section-count {
  background: #6366F1;
  color: #FFFFFF;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  flex-shrink: 0;
}

.work-items-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Work Item Card - Compact List Style */
.work-item-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.work-item-card:hover {
  border-color: #6366F1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.work-item-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 12px 0 0 12px;
}

.work-item-card.priority-critical::before {
  background: #EF4444;
}

.work-item-card.priority-high::before {
  background: #F59E0B;
}

.work-item-card.priority-medium::before {
  background: #6366F1;
}

.work-item-card.priority-low::before {
  background: #10B981;
}

/* Work Item Content - Horizontal Layout */
.work-item-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
  min-width: 0;
}

.work-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.work-item-icon.type-uar {
  background: #FEF3C7;
  color: #F59E0B;
}

.work-item-icon.type-access_request {
  background: #DBEAFE;
  color: #3B82F6;
}

.work-item-icon.type-role_change {
  background: #D1FAE5;
  color: #10B981;
}

.work-item-icon.type-termination {
  background: #FEE2E2;
  color: #EF4444;
}

.work-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.work-item-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.work-item-subtitle {
  font-size: 0.75rem;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.work-item-description {
  color: #6B7280;
  font-size: 0.875rem;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.work-item-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  align-items: center;
}

.work-item-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #6B7280;
  white-space: nowrap;
}

.work-item-meta-item i {
  font-size: 1rem;
  color: #9CA3AF;
}

.work-item-meta-item.overdue {
  color: #EF4444;
  font-weight: 600;
}

.work-item-meta-item.due-today {
  color: #F59E0B;
  font-weight: 600;
}

/* Work Item Actions/Status - Right Side */
.work-item-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.work-item-badge {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.work-item-badge.status-pending {
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
}

.work-item-badge.status-in-progress {
  background: #DBEAFE;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
}

.work-item-badge.status-completed {
  background: #D1FAE5;
  color: #065F46;
  border: 1px solid #6EE7B7;
}

.work-item-badge.priority-high {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
}

.work-item-badge.priority-low {
  background: #E0E7FF;
  color: #3730A3;
  border: 1px solid #C7D2FE;
}

/* Progress Bar */
.work-item-progress {
  margin-bottom: 1rem;
}

.progress-bar-container {
  height: 6px;
  background: var(--input-bg);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s;
}

.progress-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.work-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.work-item-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
}

.work-item-status.status-pending {
  background: rgba(108, 117, 125, 0.1);
  color: var(--text-secondary);
}

.work-item-status.status-in_progress {
  background: rgba(13, 110, 253, 0.1);
  color: var(--info);
}

.work-item-status.status-completed {
  background: rgba(25, 135, 84, 0.1);
  color: var(--success);
}

.work-item-action {
  padding: 0.5rem 1.25rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.work-item-action:hover {
  background: var(--primary-hover);
  transform: translateX(2px);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 2rem;
}

.empty-state-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.empty-state-text {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .my-work-container {
    padding: 1rem;
  }

  .my-work-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .my-work-title {
    font-size: 1.5rem;
  }

  .my-work-summary {
    grid-template-columns: 1fr;
  }

  .work-items-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .controls-row {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    width: 100%;
  }

  .filter-group {
    width: 100%;
  }

  .filter-select {
    flex: 1;
    min-width: 0;
  }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  .work-item-card {
    background: rgba(255, 255, 255, 0.05);
  }

  .work-item-card:hover {
    background: rgba(255, 255, 255, 0.08);
  }
}
