/* DeveloperDashboard.css */

/* Base Dashboard Styles */
.developer-dashboard {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
  background: #f9fafb;
  min-height: 100vh;
}

/* Header Styles */
.dev-dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.activity-date {
  font-size: 11px;
  color: rgba(150,150,150,0.8);
  font-weight: 400;
}

.back-button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-button:hover {
  background: #e5e7eb;
  transform: translateX(-2px);
}

.dev-dashboard-header h1 {
  font-size: 24px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.date-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #6b7280;
}

.date-picker-wrapper input {
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  color: #374151;
}

/* Overlap Warning */
.overlap-warning {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.overlap-warning-icon {
  color: #f59e0b;
  flex-shrink: 0;
  margin-top: 2px;
}

.overlap-warning-text {
  font-size: 14px;
  color: #92400e;
  line-height: 1.5;
}

.overlap-detail {
  display: block;
  font-size: 12px;
  color: #78350f;
  margin-top: 4px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Primary stat card highlight */
.stat-card.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.stat-card.primary svg {
  color: white;
  opacity: 0.9;
}

.stat-card.primary h3 {
  color: white;
  opacity: 0.9;
}

.stat-card.primary .stat-value {
  font-size: 32px;
  font-weight: 700;
  color: white;
}

.stat-card.primary small {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  display: block;
  margin-top: 4px;
}

/* Regular stat cards */
.stat-card h3 {
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  margin: 12px 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card p {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

.stat-card small {
  font-size: 12px;
  color: #9ca3af;
  display: block;
  margin-top: 4px;
}

/* Daily Breakdown Section */
.daily-breakdown {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

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

.daily-breakdown h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
}

.insight-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.insight-badge svg {
  color: #f59e0b;
}

.daily-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.daily-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
}

.daily-card:hover {
  background: #f3f4f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.daily-card.weekend {
  background: #ede9fe;
  border-color: #c7d2fe;
}

.daily-card.long-day {
  border-color: #fbbf24;
  border-width: 2px;
}

.daily-date {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.daily-hours {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 8px;
}

.daily-times {
  font-size: 12px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 6px;
}

.daily-times svg {
  width: 12px;
  height: 12px;
}

.time-separator {
  margin: 0 4px;
  color: #d1d5db;
}

.daily-activity-count {
  font-size: 11px;
  color: #9ca3af;
}

.long-day-indicator {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #fbbf24;
  color: #78350f;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* Weekly Summary */
.weekly-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.summary-label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.summary-value {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

/* Category Pie Chart */
.category-pie-chart {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.category-pie-chart h3 {
  margin: 0 0 20px 0;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
}

.chart-flex-wrapper {
  display: flex;
  gap: 40px;
  align-items: center;
}

.chart-big {
  flex: 1;
  max-width: 400px;
  height: 300px;
}

.chart-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.legend-color {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  flex-shrink: 0;
}

.legend-label {
  flex: 1;
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

.legend-percent {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

/* Category Details */
.category-details {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.category-details h3 {
  margin: 0 0 20px 0;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
}

/* Category Tabs */
.category-tabs {
  background: #f9fafb;
  border-radius: 8px;
  overflow: hidden;
}

.tab-headers {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  background: white;
}

.tab-header {
  flex: 1;
  padding: 12px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #6b7280;
}

.tab-header:hover {
  background: #f9fafb;
  color: #374151;
}

.tab-header.active {
  color: #4f46e5;
  border-bottom-color: #4f46e5;
  background: #f9fafb;
  font-weight: 600;
}

.tab-content {
  padding: 20px;
  background: #f9fafb;
  min-height: 200px;
}

/* Activity List in Categories */
.category-activity-list h4 {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: #374151;
}

.activity-scroll {
  max-height: 300px;
  overflow-y: auto;
}

.category-activity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: white;
  border-radius: 6px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.category-activity-item:hover {
  background: #f3f4f6;
  transform: translateX(4px);
}

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

.activity-title {
  font-size: 14px;
  color: #1f2937;
  font-weight: 500;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.activity-duration {
  font-size: 14px;
  font-weight: 600;
  color: #4f46e5;
  white-space: nowrap;
}

/* Top Activities Table */
.top-activities {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.top-activities h3 {
  margin: 0 0 20px 0;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
}

.top-activities table {
  width: 100%;
  border-collapse: collapse;
}

.top-activities th {
  text-align: left;
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e5e7eb;
}

.top-activities td {
  padding: 16px 12px;
  border-bottom: 1px solid #f3f4f6;
}

.top-activities tr:last-child td {
  border-bottom: none;
}

.top-activities tr:hover td {
  background: #f9fafb;
}

.activity-details {
  max-width: 500px;
}

.activity-count {
  font-size: 12px;
  color: #9ca3af;
  margin-left: 8px;
}

.project-badge {
  display: inline-block;
  padding: 4px 8px;
  background: #e0e7ff;
  color: #4338ca;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
}

/* Category Badges */
.category-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-productive {
  background: #d1fae5;
  color: #065f46;
}

.category-browser {
  background: #dbeafe;
  color: #1e40af;
}

.category-server {
  background: #e9d5ff;
  color: #6b21a8;
}

.category-non-work {
  background: #fee2e2;
  color: #991b1b;
}

/* Loading and No Data States */
.loading-spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px;
  background: white;
  border-radius: 12px;
  margin: 20px 0;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.no-data {
  text-align: center;
  padding: 60px;
  background: white;
  border-radius: 12px;
  color: #6b7280;
  font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .developer-dashboard {
    padding: 16px;
  }
  
  .dev-dashboard-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .date-picker-wrapper {
    width: 100%;
    flex-wrap: wrap;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .daily-breakdown-grid {
    grid-template-columns: 1fr;
  }
  
  .chart-flex-wrapper {
    flex-direction: column;
  }
  
  .chart-big {
    max-width: 100%;
  }
  
  .weekly-summary {
    grid-template-columns: 1fr;
  }
  
  .stat-card.primary .stat-value {
    font-size: 24px;
  }
  
  .top-activities {
    overflow-x: auto;
  }
  
  .top-activities table {
    min-width: 500px;
  }
}

/* Scrollbar Styling */
.activity-scroll::-webkit-scrollbar {
  width: 6px;
}

.activity-scroll::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 3px;
}

.activity-scroll::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.activity-scroll::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Print Styles */
@media print {
  .dev-dashboard-header {
    position: static;
  }
  
  .back-button,
  .date-picker-wrapper {
    display: none;
  }
  
  .developer-dashboard {
    background: white;
  }
  
  .stat-card,
  .daily-breakdown,
  .category-pie-chart,
  .category-details,
  .top-activities {
    box-shadow: none;
    border: 1px solid #e5e7eb;
    page-break-inside: avoid;
  }
}