/**
 * Professional Reports Module Styles
 * Comprehensive report generation with charts and analytics
 */

/* Main Container */
.reports-module {
  padding: 1.5rem;
  max-width: 1800px;
  margin: 0 auto;
  min-height: calc(100vh - 150px);
}

/* Header */
.reports-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 2rem;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
  border-radius: 20px;
  color: white;
  box-shadow: 0 10px 40px rgba(59, 130, 246, 0.3);
}

.reports-title h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.reports-title p {
  margin: 0;
  opacity: 0.9;
  font-size: 1rem;
}

/* Steps */
.reports-step {
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.reports-step.hidden {
  display: none;
}

.reports-step.collapsed {
  padding: 1rem 2rem;
}

.reports-step.collapsed .report-types-grid,
.reports-step.collapsed .config-grid,
.reports-step.collapsed .report-actions {
  display: none;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.reports-step.collapsed .step-header {
  margin-bottom: 0;
}

.step-number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
}

.step-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  flex: 1;
}

.btn-back {
  padding: 0.5rem 1rem;
  background: #f1f5f9;
  border: none;
  border-radius: 8px;
  color: #475569;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.btn-back:hover {
  background: #e2e8f0;
}

/* Report Types Grid */
.report-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.report-type-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

.report-type-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

.report-type-card.premium {
  border-color: #f59e0b;
  background: linear-gradient(to right, #fffbeb, #ffffff);
}

.report-type-card.premium:hover {
  border-color: #d97706;
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.2);
}

.card-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.card-content {
  flex: 1;
}

.card-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.25rem 0;
}

.card-content p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 0.5rem 0;
}

.sections-count {
  font-size: 0.75rem;
  color: #94a3b8;
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: #f1f5f9;
  border-radius: 4px;
}

.premium-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* Configuration Grid */
.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.config-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.25rem;
}

.config-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
  margin: 0 0 1rem 0;
}

.sections-card {
  grid-column: 1 / -1;
}

/* Period Selection */
.period-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.period-btn {
  padding: 0.5rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: white;
  color: #475569;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.period-btn:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

.period-btn.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

.custom-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.custom-dates.hidden {
  display: none;
}

.date-input {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.date-input label {
  font-size: 0.8rem;
  color: #64748b;
}

.date-input input {
  padding: 0.5rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.9rem;
}

.date-input input:focus {
  outline: none;
  border-color: #3b82f6;
}

/* Sections Selection */
.sections-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  color: #475569;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.btn-sm:hover {
  background: #f1f5f9;
}

.sections-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

.section-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.section-item:hover {
  background: #e0f2fe;
}

.section-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #3b82f6;
}

.section-name {
  font-size: 0.85rem;
  color: #334155;
}

/* Report Title Input */
.report-title-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
}

.report-title-input:focus {
  outline: none;
  border-color: #3b82f6;
}

/* Action Buttons */
.report-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-preview,
.btn-excel,
.btn-pdf {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-preview {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
}

.btn-preview:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-excel {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}

.btn-excel:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.btn-pdf {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.btn-pdf:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-icon {
  font-size: 1.1rem;
}

/* Preview */
.preview-container {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.5rem;
  min-height: 400px;
}

.preview-actions {
  display: flex;
  gap: 0.75rem;
  margin-left: auto;
}

.preview-actions .btn-excel,
.preview-actions .btn-pdf {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Report Preview */
.report-preview {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.preview-header {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: white;
  padding: 2rem;
}

.preview-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
}

.preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

.preview-content {
  padding: 1.5rem;
}

/* Sections */
.preview-section {
  display: block;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e2e8f0;
  overflow: visible;
  clear: both;
}

.preview-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.section-title {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e40af;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #dbeafe;
  clear: both;
}

.section-content {
  overflow: visible;
  clear: both;
  position: relative;
  z-index: 1;
}

/* Executive Summary */
.executive-summary {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.summary-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  width: 100%;
}

.summary-kpi {
  background: #f8fafc;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  border: 2px solid transparent;
}

.summary-kpi.main {
  grid-column: span 1;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
  border-color: #3b82f6;
}

.summary-kpi.positive {
  border-color: #22c55e;
}

.summary-kpi.negative {
  border-color: #ef4444;
}

.summary-kpi .kpi-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.summary-kpi.main .kpi-value {
  font-size: 1.75rem;
}

.summary-kpi .kpi-label {
  display: block;
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.summary-kpi .kpi-variation {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: #f1f5f9;
}

.summary-kpi .kpi-variations {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.summary-kpi .kpi-variation.positive {
  color: #16a34a;
  background: #dcfce7;
}

.summary-kpi .kpi-variation.negative {
  color: #dc2626;
  background: #fee2e2;
}

.summary-kpi .kpi-variation.homologo {
  background: #fef3c7;
  color: #b45309;
  font-size: 0.8rem;
}

.summary-kpi .kpi-variation.homologo.positive {
  background: linear-gradient(135deg, #fef3c7, #dcfce7);
  color: #16a34a;
}

.summary-kpi .kpi-variation.homologo.negative {
  background: linear-gradient(135deg, #fef3c7, #fee2e2);
  color: #dc2626;
}

.summary-kpi.homologo {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-color: #f59e0b;
}

.summary-kpi.homologo .kpi-label {
  color: #b45309;
}

.summary-kpi .kpi-sublabel {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
}

.summary-highlights {
  background: #fefce8;
  border-radius: 12px;
  padding: 1.25rem;
  border-left: 4px solid #facc15;
}

.summary-highlights h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  color: #a16207;
}

.summary-highlights ul {
  margin: 0;
  padding-left: 1.25rem;
}

.summary-highlights li {
  color: #78350f;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.summary-highlights li:last-child {
  margin-bottom: 0;
}

/* KPIs Grid */
.kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  width: 100%;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
  border-radius: 10px;
  padding: 1.25rem 1rem;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
}

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

.kpi-card .kpi-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1e293b;
}

.kpi-card .kpi-label {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.25rem;
}

.kpi-card .kpi-variations {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.kpi-card .kpi-variation {
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: #f1f5f9;
}

.kpi-card .kpi-variation.positive {
  background: #dcfce7;
  color: #16a34a;
}

.kpi-card .kpi-variation.negative {
  background: #fee2e2;
  color: #dc2626;
}

.kpi-card .kpi-variation.homologo {
  background: #fef3c7;
  color: #b45309;
}

.kpi-card .kpi-variation.homologo.positive {
  background: linear-gradient(135deg, #fef3c7, #dcfce7);
  color: #16a34a;
}

.kpi-card .kpi-variation.homologo.negative {
  background: linear-gradient(135deg, #fef3c7, #fee2e2);
  color: #dc2626;
}

/* Alerts */
.alertas-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.alerta-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: 10px;
  background: #fefce8;
  border-left: 4px solid #facc15;
}

.alerta-card.warning {
  background: #fff7ed;
  border-left-color: #f97316;
}

.alerta-card.danger {
  background: #fef2f2;
  border-left-color: #ef4444;
}

.alerta-card.success {
  background: #f0fdf4;
  border-left-color: #22c55e;
}

.alerta-card.info {
  background: #eff6ff;
  border-left-color: #3b82f6;
}

.alerta-icon {
  font-size: 1.5rem;
}

.alerta-content h5 {
  margin: 0 0 0.25rem 0;
  font-size: 0.95rem;
  color: #1e293b;
}

.alerta-content p {
  margin: 0 0 0.5rem 0;
  font-size: 0.85rem;
  color: #475569;
}

.alerta-acao {
  font-size: 0.8rem;
  color: #3b82f6;
  font-weight: 500;
}

.recomendacoes h4 {
  font-size: 1.1rem;
  color: #1e40af;
  margin: 0 0 1rem 0;
}

.recomendacoes-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.recomendacao-card {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: #eff6ff;
  border-radius: 10px;
}

.rec-icon {
  font-size: 1.25rem;
}

.rec-content h5 {
  margin: 0 0 0.25rem 0;
  font-size: 0.9rem;
  color: #1e293b;
}

.rec-content p {
  margin: 0;
  font-size: 0.8rem;
  color: #475569;
}

/* Previsões */
.previsao-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.previsao-stat {
  background: #f0fdf4;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}

.previsao-stat .stat-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.previsao-stat .stat-label {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
}

.previsao-stat .stat-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: #166534;
  margin-top: 0.25rem;
}

.previsoes-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.previsao-card {
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}

.previsao-mes {
  display: block;
  font-size: 0.85rem;
  color: #1e40af;
  margin-bottom: 0.25rem;
}

.previsao-valor {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
}

/* Segmentação */
.segmentacao-container {
  display: block;
  width: 100%;
  margin-bottom: 1.5rem;
  clear: both;
}

.segmentos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.segmento-card {
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
}

.segmento-card.success {
  background: linear-gradient(to bottom, #dcfce7, #d1fae5);
}

.segmento-card.info {
  background: linear-gradient(to bottom, #dbeafe, #e0f2fe);
}

.segmento-card.warning {
  background: linear-gradient(to bottom, #fef3c7, #fef9c3);
}

.segmento-card.danger {
  background: linear-gradient(to bottom, #fee2e2, #fef2f2);
}

.segmento-card .seg-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.segmento-card .seg-count {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
}

.segmento-card .seg-volume {
  display: block;
  font-size: 0.9rem;
  color: #475569;
  margin-top: 0.25rem;
}

.segmento-card .seg-desc {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.5rem;
}

/* RFM */
.rfm-container {
  display: block;
  width: 100%;
  margin-bottom: 1.5rem;
  clear: both;
}

.rfm-segments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.rfm-segment {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  text-align: center;
}

.rfm-segment.success {
  background: #dcfce7;
}
.rfm-segment.info {
  background: #dbeafe;
}
.rfm-segment.primary {
  background: #e0e7ff;
}
.rfm-segment.warning {
  background: #fef3c7;
}
.rfm-segment.danger {
  background: #fee2e2;
}
.rfm-segment.muted {
  background: #f1f5f9;
}
.rfm-segment.secondary {
  background: #e5e7eb;
}

.rfm-segment .seg-name {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e293b;
}

.rfm-segment .seg-count {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 0.25rem;
}

/* Comparativo */
.comparativo-container {
  display: block;
  width: 100%;
  margin-bottom: 1.5rem;
  clear: both;
}

.comparativo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.comparativo-card {
  background: #f8fafc;
  border-radius: 10px;
  padding: 1.25rem;
  border: 2px solid #e2e8f0;
  transition: all 0.2s;
}

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

.comparativo-card.positive {
  border-color: #22c55e;
}

.comparativo-card.negative {
  border-color: #ef4444;
}

.comp-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.comp-values {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.comp-value-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comp-period-label {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.comp-atual {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
}

.comp-anterior {
  font-size: 0.95rem;
  color: #64748b;
}

.comp-homologo {
  font-size: 0.95rem;
  color: #f59e0b;
  font-weight: 600;
}

.comp-value-row.homologo {
  background: #fffbeb;
  margin: 0 -0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
}

.comp-variacoes {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.comp-variacao {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
}

.comp-variacao.positive {
  background: #dcfce7;
  color: #16a34a;
}

.comp-variacao.negative {
  background: #fee2e2;
  color: #dc2626;
}

.comp-variacao.homologo {
  background: #fef3c7;
  color: #b45309;
}

.comp-variacao.homologo.positive {
  background: linear-gradient(135deg, #fef3c7, #dcfce7);
  color: #16a34a;
}

.comp-variacao.homologo.negative {
  background: linear-gradient(135deg, #fef3c7, #fee2e2);
  color: #dc2626;
}

/* Pareto */
.pareto-container {
  /* Container */
}

.pareto-insight {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #fef3c7;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.pareto-insight .insight-icon {
  font-size: 1.5rem;
}

.pareto-insight .insight-text {
  font-size: 0.95rem;
  color: #78350f;
}

/* Charts */
.chart-container {
  display: block;
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 1.5rem auto;
  background: #ffffff;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  clear: both;
  overflow: hidden;
}

.chart-container.large {
  max-width: 900px;
}

.chart-container.half {
  max-width: 500px;
}

/* Horizontal bar charts need more height for labels */
.chart-container.horizontal {
  max-width: 700px;
}

/* Pie/Doughnut charts should be square-ish */
.chart-container.pie {
  max-width: 450px;
}

.chart-container canvas {
  width: 100% !important;
  height: auto !important;
}

/* Summary Stats */
.summary-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.summary-stats .stat {
  font-size: 0.85rem;
  color: #64748b;
  background: #f1f5f9;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
}

/* Data Tables */
.table-wrapper {
  overflow-x: auto;
  margin-top: 1rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  background: linear-gradient(to bottom, #1e40af, #1d4ed8);
  color: white;
  padding: 0.75rem 0.5rem;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.data-table th:first-child {
  border-radius: 8px 0 0 0;
}

.data-table th:last-child {
  border-radius: 0 8px 0 0;
}

.data-table td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
}

.data-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.data-table tbody tr:hover {
  background: #e0f2fe;
}

/* Loading */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: #64748b;
}

.loading-spinner::before {
  content: "";
  width: 20px;
  height: 20px;
  border: 3px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 0.75rem;
}

.loading-spinner.large::before {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

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

/* Error */
.error-message {
  text-align: center;
  padding: 2rem;
  color: #dc2626;
  background: #fef2f2;
  border-radius: 10px;
}

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

  .reports-header {
    padding: 1.5rem;
  }

  .reports-title h2 {
    font-size: 1.5rem;
  }

  .reports-step {
    padding: 1.25rem;
  }

  .report-types-grid {
    grid-template-columns: 1fr;
  }

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

  .sections-list {
    grid-template-columns: 1fr;
  }

  .report-actions {
    flex-direction: column;
  }

  .btn-preview,
  .btn-excel,
  .btn-pdf {
    width: 100%;
    justify-content: center;
  }

  .preview-header {
    padding: 1.25rem;
  }

  .preview-header h1 {
    font-size: 1.25rem;
  }

  .preview-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

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

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

  .chart-container {
    height: 250px;
  }
}

/* Print Styles */
@media print {
  .reports-header,
  .report-actions,
  .step-header .btn-back,
  .preview-actions {
    display: none !important;
  }

  .reports-step {
    box-shadow: none;
    padding: 0;
  }

  .preview-container {
    padding: 0;
    background: white;
  }

  .report-preview {
    box-shadow: none;
  }

  .data-table {
    font-size: 10px;
  }
}
