* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.title {
  color: white;
  font-size: 2rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.back-button {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem;
}

/* Report Filters */
.report-filters {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 200px;
}

.filter-group label {
  font-weight: 500;
  color: #333;
}

.filter-group select {
  padding: 10px;
  border: 2px solid #f0f0f0;
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.filter-group select:focus {
  outline: none;
  border-color: #2196f3;
}

.btn-primary {
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
  color: white;
  height: fit-content;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(33, 150, 243, 0.3);
}

/* Dashboard */
.reports-dashboard {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Dashboard Cards */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.dashboard-card {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.card-header h3 {
  color: #333;
  font-size: 1.1rem;
}

.card-header svg {
  color: #2196f3;
}

.card-content {
  text-align: center;
}

.metric {
  margin-bottom: 0.5rem;
}

.metric-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: #2196f3;
}

.metric-label {
  color: #666;
  font-size: 0.9rem;
}

.metric-trend {
  font-size: 0.8rem;
  font-weight: 500;
}

.metric-trend.positive {
  color: #4caf50;
}

.metric-trend.negative {
  color: #f44336;
}

.metric-trend.neutral {
  color: #666;
}

/* Charts Section */
.charts-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.chart-container {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.chart-container h3 {
  color: #333;
  margin-bottom: 1rem;
}

.chart-placeholder {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  color: #666;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Bar Chart */
.chart-bars {
  display: flex;
  align-items: end;
  justify-content: space-around;
  height: 200px;
  margin-bottom: 1rem;
}

.bar {
  width: 40px;
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
  border-radius: 4px 4px 0 0;
  display: flex;
  align-items: end;
  justify-content: center;
  color: white;
  font-weight: 500;
  font-size: 0.8rem;
  padding-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.bar:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.chart-labels {
  display: flex;
  justify-content: space-around;
  font-size: 0.9rem;
  color: #666;
}

/* Pie Chart */
.pie-chart {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  margin: 0 auto;
  background: conic-gradient(#4caf50 0% 35%, #2196f3 35% 75%, #ff9800 75% 95%, #f44336 95% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pie-chart::before {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  background: white;
  border-radius: 50%;
}

.pie-segment {
  position: absolute;
  font-size: 0.7rem;
  font-weight: 500;
  text-align: center;
  z-index: 1;
}

/* Detailed Reports */
.detailed-reports {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.detailed-reports h3 {
  color: #333;
  margin-bottom: 1.5rem;
}

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

.report-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.report-item:hover {
  background: #e3f2fd;
  transform: translateX(5px);
}

.report-info {
  flex: 1;
}

.report-info h4 {
  color: #333;
  margin-bottom: 0.5rem;
}

.report-info p {
  color: #666;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.report-date {
  font-size: 0.8rem;
  color: #888;
}

.report-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-small {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  background: #e3f2fd;
  color: #2196f3;
  transition: all 0.3s ease;
}

.btn-small:hover {
  background: #2196f3;
  color: white;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: white;
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal.extra-large {
  max-width: 1200px;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.2rem;
  color: #333;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
}

.modal-body {
  padding: 1.5rem;
}

/* Report Preview */
.report-preview {
  max-width: 100%;
}

.report-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f0f0f0;
}

.report-header h2 {
  color: #333;
  margin-bottom: 0.5rem;
}

.report-header p {
  color: #666;
}

.report-content h3 {
  color: #333;
  margin: 1.5rem 0 1rem 0;
}

.report-content p {
  color: #666;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.metric-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.metric-item .metric-label {
  color: #666;
}

.metric-item .metric-value {
  font-weight: 600;
  color: #2196f3;
  font-size: 1.1rem;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid #f0f0f0;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.btn-secondary {
  padding: 10px 20px;
  border: 2px solid #2196f3;
  background: white;
  color: #2196f3;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #2196f3;
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .main-content {
    padding: 1rem;
  }

  .header {
    padding: 1rem;
  }

  .header-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .title {
    font-size: 1.5rem;
  }

  .report-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    min-width: auto;
  }

  .dashboard-cards {
    grid-template-columns: 1fr;
  }

  .charts-section {
    grid-template-columns: 1fr;
  }

  .report-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .report-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dashboard-card,
.chart-container,
.report-item {
  animation: fadeInUp 0.6s ease forwards;
}

.dashboard-card:nth-child(1) {
  animation-delay: 0.1s;
}
.dashboard-card:nth-child(2) {
  animation-delay: 0.2s;
}
.dashboard-card:nth-child(3) {
  animation-delay: 0.3s;
}
.dashboard-card:nth-child(4) {
  animation-delay: 0.4s;
}
