/* CategoryBreakdown.css */

.category-breakdown-container {
  padding: 20px;
}

.category-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 20px;
}

.category-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 20px;
  color: #6b7280;
}

/* Category Overview Grid */
.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.category-overview-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.category-overview-card.active {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.category-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.category-icon {
  font-size: 24px;
}

.category-card-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #374151;
}

.category-card-stats {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
}

.stat-label {
  font-size: 12px;
  color: #6b7280;
  text-align: center;
}

/* Category Details */
.category-details {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.category-details-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Top Applications */
.top-applications {
  margin-bottom: 40px;
}

.top-applications h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #374151;
}

.applications-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.application-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 15px;
  background: #f9fafb;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.application-item:hover {
  background: #f3f4f6;
}

.app-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-rank {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  width: 30px;
}

.app-name {
  font-weight: 500;
  color: #111827;
  flex: 1;
}

.app-stats {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-left: 30px;
}

.app-duration {
  font-weight: 600;
  color: #374151;
}

.app-percentage {
  font-size: 14px;
  color: #6b7280;
}

.app-progress {
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
  margin-left: 30px;
}

.app-progress-bar {
  height: 100%;
  transition: width 0.5s ease;
  border-radius: 3px;
}

/* Recent Activities Table */
.recent-activities {
  margin-top: 40px;
}

.recent-activities h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #374151;
}

.activities-table {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

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

.activities-table thead {
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.activities-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  color: #374151;
}

.activities-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.2s ease;
}

.activities-table tbody tr:hover {
  background: #f9fafb;
}

.activities-table td {
  padding: 12px 16px;
  font-size: 14px;
  color: #111827;
}

.app-cell {
  font-weight: 500;
}

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

.title-cell {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #6b7280;
}

.duration-cell {
  font-weight: 500;
  color: #374151;
}

.time-cell {
  font-size: 13px;
  color: #6b7280;
}

/* Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .category-overview-grid {
    grid-template-columns: 1fr;
  }
  
  .category-details {
    padding: 20px;
  }
  
  .activities-table {
    font-size: 12px;
  }
  
  .title-cell {
    max-width: 200px;
  }
}
