/* Enhanced Reports Styling - Professional analytics interface */
.enhanced-reports-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
  animation: modalFadeIn 0.3s ease-out;
}

.enhanced-reports-modal-content {
  background: #ffffff;
  border-radius: 16px;
  max-width: 1000px;
  width: 95vw;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

.enhanced-reports-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.enhanced-reports-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.enhanced-reports-modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.enhanced-reports-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.enhanced-reports-modal-body {
  padding: 32px;
  overflow-y: auto;
  flex: 1;
}

.enhanced-reports-modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 24px 32px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.enhanced-reports-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.enhanced-reports-stat {
  background: #f8fafe;
  border: 1px solid #e1e7f5;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.enhanced-reports-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 8px;
}

.enhanced-reports-stat-label {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.enhanced-reports-chart-container {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin: 20px 0;
  height: 300px;
}

.enhanced-reports-table {
  margin-top: 32px;
}

.enhanced-reports-table h3 {
  margin-bottom: 16px;
  color: #1e293b;
  font-size: 1.125rem;
  font-weight: 600;
}

.enhanced-reports-table table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.enhanced-reports-table th {
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
  padding: 12px 16px;
  text-align: left;
  font-size: 0.875rem;
  border-bottom: 1px solid #e2e8f0;
}

.enhanced-reports-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-size: 0.875rem;
}

.enhanced-reports-table tr:hover {
  background: #f8fafc;
}

.enhanced-reports-status {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.enhanced-reports-status.paid {
  background: #dcfce7;
  color: #166534;
}

.enhanced-reports-status.sent {
  background: #dbeafe;
  color: #1d4ed8;
}

.enhanced-reports-status.draft {
  background: #fef3c7;
  color: #92400e;
}

.enhanced-reports-status.overdue {
  background: #fecaca;
  color: #dc2626;
}

.enhanced-reports-status.todo {
  background: #fef3c7;
  color: #92400e;
}

.enhanced-reports-status.in_progress {
  background: #dbeafe;
  color: #1d4ed8;
}

.enhanced-reports-status.done {
  background: #dcfce7;
  color: #166534;
}

.enhanced-reports-priority {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.enhanced-reports-priority.high {
  background: #fecaca;
  color: #dc2626;
}

.enhanced-reports-priority.medium {
  background: #fef3c7;
  color: #92400e;
}

.enhanced-reports-priority.low {
  background: #dcfce7;
  color: #166534;
}

.enhanced-reports-export-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-left: 16px;
}

/* KPI Cards Enhancement */
.reports-kpi-card {
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.reports-kpi-card:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.reports-kpi-card:hover:before {
  opacity: 1;
}

.reports-kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  border-color: #667eea;
}

.reports-kpi-card:after {
  content: '📊 Click for details';
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 0.75rem;
  color: #64748b;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.reports-kpi-card:hover:after {
  opacity: 1;
}

/* Chart Containers Enhancement */
.reports-chart-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.reports-chart-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.reports-chart-container {
  position: relative;
  height: 300px;
  margin-top: 16px;
}

.reports-chart-container canvas {
  border-radius: 8px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .enhanced-reports-modal-content {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .enhanced-reports-modal-body {
    padding: 20px;
  }

  .enhanced-reports-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .enhanced-reports-stat {
    padding: 16px;
  }

  .enhanced-reports-stat-value {
    font-size: 1.5rem;
  }

  .enhanced-reports-table {
    overflow-x: auto;
  }

  .enhanced-reports-table table {
    min-width: 600px;
  }

  .enhanced-reports-export-buttons {
    flex-direction: column;
    gap: 8px;
    margin-left: 0;
    margin-top: 12px;
  }

  .enhanced-reports-export-buttons button {
    width: 100%;
  }
}

/* Arabic RTL Support */
[dir="rtl"] .enhanced-reports-modal-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .enhanced-reports-modal-footer {
  flex-direction: row-reverse;
}

[dir="rtl"] .enhanced-reports-table th,
[dir="rtl"] .enhanced-reports-table td {
  text-align: right;
}

[dir="rtl"] .enhanced-reports-export-buttons {
  margin-left: 0;
  margin-right: 16px;
}

/* Animation Keyframes */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Loading States */
.enhanced-reports-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #64748b;
}

.enhanced-reports-loading:before {
  content: '📊';
  font-size: 2rem;
  margin-right: 12px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Enhanced Grid Layout for Reports Page */
.reports-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.reports-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

@media (max-width: 1024px) {
  .reports-charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .reports-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .reports-charts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Enhanced Button Styles */
.uba-btn.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.uba-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.uba-btn.secondary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.uba-btn.secondary:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}