.reports-container {
  padding: 24px;
  background: #f8f9fa;
  min-height: calc(100vh - 80px);
}

.reports-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reports-title h2 {
  margin: 0 0 8px 0;
  color: #2c3e50;
  font-size: 28px;
  font-weight: 600;
}

.reports-title p {
  margin: 0;
  color: #6c757d;
  font-size: 16px;
}

.reports-controls {
  display: flex;
  gap: 16px;
  align-items: center;
}

.filter-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.report-select,
.period-select {
  padding: 10px 16px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  background: white;
  font-size: 14px;
  color: #495057;
  min-width: 200px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.report-select:hover,
.period-select:hover,
.report-select:focus,
.period-select:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.action-group {
  display: flex;
  gap: 12px;
}

.btn-secondary,
.btn-primary {
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-secondary::before,
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-secondary:hover:not(:disabled)::before,
.btn-primary:hover:not(:disabled)::before {
  left: 100%;
}

.btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover:not(:disabled) {
  background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(108, 117, 125, 0.4);
}

.btn-primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 123, 255, 0.4);
}

.btn-secondary:disabled,
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary:disabled::before,
.btn-primary:disabled::before {
  display: none;
}

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

.overview-card {
  background: white;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.overview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.overview-card:hover::before {
  opacity: 1;
}

.card-icon-container {
  position: relative;
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.card-content {
  flex: 1;
}

.card-title {
  margin: 0 0 8px 0;
  color: #6c757d;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-value {
  margin: 0 0 8px 0;
  color: #2c3e50;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}

.card-change {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.card-change.positive {
  color: #28a745;
}

.card-change.negative {
  color: #dc3545;
}

.report-main {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.report-display {
  min-height: 400px;
}

.welcome-section {
  padding: 48px 24px;
  text-align: center;
}

.welcome-header {
  margin-bottom: 48px;
}

.welcome-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.welcome-header h3 {
  margin: 0 0 8px 0;
  color: #2c3e50;
  font-size: 24px;
  font-weight: 600;
}

.welcome-header p {
  margin: 0;
  color: #6c757d;
  font-size: 16px;
}

.welcome-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.welcome-card {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 16px;
  padding: 28px;
  cursor: pointer;
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  gap: 20px;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.welcome-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.welcome-card:hover {
  background: white;
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.welcome-card:hover::before {
  left: 100%;
}

.card-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: transform 0.3s ease;
}

.welcome-card:hover .card-icon-wrapper {
  transform: scale(1.1);
}

.card-info {
  flex: 1;
}

.card-info h4 {
  margin: 0 0 8px 0;
  color: #2c3e50;
  font-size: 18px;
  font-weight: 600;
}

.card-info p {
  margin: 0;
  color: #6c757d;
  font-size: 14px;
  line-height: 1.5;
}

.card-arrow {
  font-size: 20px;
  color: #007bff;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.welcome-card:hover .card-arrow {
  opacity: 1;
}

.loading-section {
  padding: 48px 24px;
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px auto;
}

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

.loading-section p {
  margin: 0;
  color: #6c757d;
  font-size: 16px;
}

.report-section {
  padding: 24px;
}

.report-header {
  margin-bottom: 32px;
  padding: 24px 0;
  border-bottom: 1px solid #e9ecef;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 12px 12px 0 0;
  padding: 24px;
  margin: -24px -24px 32px -24px;
}

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

.header-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-icon {
  font-size: 32px;
  opacity: 0.9;
}

.header-title h3 {
  margin: 0;
  color: #2c3e50;
  font-size: 28px;
  font-weight: 700;
}

.header-period {
  margin: 0;
  color: #6c757d;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #e9ecef;
}

.data-table-container {
  margin-bottom: 32px;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.data-table th,
.data-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
}

.data-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  font-size: 14px;
  color: #495057;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table .positive {
  color: #28a745;
  font-weight: 600;
}

.data-table .negative {
  color: #dc3545;
  font-weight: 600;
}

.data-table .neutral {
  color: #6c757d;
  font-weight: 600;
}

.data-table .ranking {
  font-weight: 700;
  font-size: 16px;
}

.data-table .rank-1 {
  color: #ffc107;
}

.data-table .rank-2 {
  color: #6c757d;
}

.data-table .rank-3 {
  color: #cd7f32;
}

.data-table .tipo-entrada {
  color: #28a745;
  font-weight: 600;
}

.data-table .tipo-saida {
  color: #dc3545;
  font-weight: 600;
}

.data-table .tipo-lucro {
  color: #007bff;
  font-weight: 600;
}

.chart-container {
  margin-bottom: 32px;
  background: white;
  border-radius: 16px;
  border: 1px solid #e9ecef;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.chart-container:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f0;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.chart-header h4 {
  margin: 0;
  color: #2c3e50;
  font-size: 18px;
  font-weight: 600;
}

.chart-actions {
  display: flex;
  gap: 8px;
}

.btn-chart-action {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 14px;
}

.btn-chart-action:hover {
  background: #3b82f6;
  color: white;
  transform: translateY(-1px);
}

.chart-wrapper {
  padding: 24px;
  position: relative;
}

.chart-canvas {
  width: 100% !important;
  height: 400px !important;
  max-height: 400px !important;
}

.chart-placeholder {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 2px dashed #dee2e6;
  border-radius: 12px;
  height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 24px;
}

.chart-info {
  color: #6c757d;
}

.chart-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.6;
}

.chart-info p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.insights-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid #e9ecef;
}

.insights-section h4 {
  margin: 0 0 24px 0;
  color: #2c3e50;
  font-size: 18px;
  font-weight: 600;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.insight-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.insight-icon {
  font-size: 32px;
  opacity: 0.8;
}

.insight-content h5 {
  margin: 0 0 8px 0;
  color: #2c3e50;
  font-size: 16px;
  font-weight: 600;
}

.insight-content p {
  margin: 0;
  color: #6c757d;
  font-size: 14px;
  line-height: 1.5;
}

.no-results {
  padding: 48px 24px;
  text-align: center;
}

.no-results p {
  margin: 0;
  color: #6c757d;
  font-size: 16px;
}

.error-section {
  padding: 48px 24px;
  text-align: center;
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 12px;
  margin: 24px;
}

.error-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.error-section h3 {
  margin: 0 0 8px 0;
  color: #c53030;
  font-size: 20px;
  font-weight: 600;
}

.error-section p {
  margin: 0 0 24px 0;
  color: #744210;
  font-size: 14px;
}

.overview-card.loading {
  flex-direction: column;
  justify-content: center;
  text-align: center;
  min-height: 120px;
}

.overview-card.loading .loading-spinner {
  width: 24px;
  height: 24px;
  margin-bottom: 8px;
}

.overview-card.loading p {
  margin: 0;
  color: #6c757d;
  font-size: 14px;
}


.chart-container:-webkit-full-screen {
  background: white;
  padding: 20px;
}

.chart-container:-moz-full-screen {
  background: white;
  padding: 20px;
}

.chart-container:fullscreen {
  background: white;
  padding: 20px;
}

.chart-container:fullscreen .chart-canvas {
  height: calc(100vh - 200px) !important;
}


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

.overview-card.loading {
  animation: pulse 1.5s ease-in-out infinite;
}


.reports-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
}

.reports-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  pointer-events: none;
}

.reports-header,
.report-main,
.overview-card {
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .reports-container {
    padding: 16px;
  }

  .reports-header {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }

  .header-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .reports-controls {
    flex-direction: column;
    gap: 16px;
  }

  .filter-group {
    flex-direction: column;
    gap: 12px;
  }

  .report-select,
  .period-select {
    min-width: auto;
    width: 100%;
  }

  .action-group {
    flex-direction: column;
  }

  .overview-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .overview-card {
    padding: 20px;
    flex-direction: row;
    text-align: left;
  }

  .card-value {
    font-size: 24px;
  }

  .welcome-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .welcome-card {
    padding: 20px;
  }

  .data-table-container {
    font-size: 12px;
  }

  .data-table th,
  .data-table td {
    padding: 12px 8px;
  }

  .insights-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .chart-canvas {
    height: 250px !important;
  }

  .chart-wrapper {
    padding: 16px;
  }

  .chart-header {
    padding: 16px 20px;
  }
}

@media (max-width: 480px) {
  .reports-header {
    padding: 20px;
  }

  .overview-card {
    padding: 16px;
    flex-direction: column;
    text-align: center;
  }

  .card-value {
    font-size: 24px;
  }

  .welcome-section {
    padding: 32px 16px;
  }

  .welcome-header h3 {
    font-size: 20px;
  }

  .report-section {
    padding: 16px;
  }

  .data-table th,
  .data-table td {
    padding: 8px 4px;
    font-size: 12px;
  }
}