/* Reports Section */
.report-section {
  background: var(--secondBackground);
  padding: 2rem;
  overflow: auto;
  height: 100%;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
  gap: 1rem;
  justify-content: start; /* Align cards to left instead of center */
  max-width: 100%;
}

/* Report Card Styles */
.report-card {
  background: var(--secondBackground);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-width: 280px;
  max-width: 320px;
  width: 100%;
}

.report-card:hover {
  transform: translateY(-0.125rem);
  box-shadow: 0 0.5rem 1.25rem rgba(var(--secondBackground-rgb), 0.15);
}

.report-card:hover::before {
  transform: scaleX(1);
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
  gap: 10px;
  position: relative;
}

.report-icon {
  width: 2.25rem;
  height: 2.25rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 1.125rem;
}

.report-card:hover .report-icon {
  background: linear-gradient(
    135deg,
    var(--primaryHover),
    var(--secondaryHover)
  );
}

.report-icon svg {
  width: 1.125rem;
  height: 1.125rem;
  stroke: var(--onPrimary);
}

.report-card .report-body {
  display: flex;
  flex-direction: column;
  min-height: 9rem;
}

.report-category {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--tertiary);
  padding: 0.1875rem 0.5rem;
  border-radius: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03125rem;
}

.report-content {
  flex: 1;
  padding: 0.5rem 1rem;
}

.report-title {
  font-size: 0.9375rem;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--onSecondBackground);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.report-card:hover .report-title {
  color: var(--onSecondBackgroundHover);
}

.report-description {
  color: var(--placeholder);
  font-size: 0.75rem;
}

.report-card:hover .report-description {
  color: var(--placeholderHover);
}

.report-footer {
  border-top: 1px solid var(--border);
  padding: 0.75rem 1rem;
  margin-top: auto;
}

.report-generate-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--onPrimary);
  border: none;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}

.report-generate-btn:hover {
  background: linear-gradient(
    135deg,
    var(--primaryHover),
    var(--secondaryHover)
  );
  color: var(--onPrimary);
  transform: translateY(-0.03125rem);
}

.report-btn-icon {
  width: 0.875rem;
  height: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .report-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 300px));
  }
  .report-card {
    min-width: 260px;
    max-width: 300px;
  }
}

@media (max-width: 768px) {
  .report-section {
    padding: 1.5rem;
  }
  .report-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
  }
  .report-card {
    min-width: 250px;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .report-section {
    padding: 1rem;
  }
  .report-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .report-card {
    min-width: 100%;
    max-width: 100%;
    gap: 1rem;
  }
  .report-icon {
    width: 2.5rem;
    height: 2.5rem;
  }
  .report-icon svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

.report-section .header-content {
  flex: 1;
}

.report-section .card-title {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

.report-section .card-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* new class */
.report-header-content {
  flex: 1;
}
/* .report-icon-container {
  height: 100%;
  display: flex;
  align-items: center;
} */

.report-header-title {
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.report-header-subtitle {
  font-size: 0.725rem;
  color: var(--placeholder);
  margin: 0;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.report-section .progress-section {
  flex: 1;
  padding: 0.5rem 1rem;
}

.report-section .progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.report-section .progress-label {
  font-size: 0.75rem;
  color: var(--placeholder);
  font-weight: 500;
}

.report-section .progress-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--onSecondBackground);
}

.report-section .progress-bar-container {
  width: 100%;
  height: 0.5rem;
  background-color: var(--border);
  border-radius: 0.375rem;
  overflow: hidden;
  position: relative;
}

.report-section .progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 0.375rem;
  position: relative;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* .report-section .progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1.25rem;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-1.25rem);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(1.25rem);
    opacity: 0;
  }
} */

/* Progress Details - additional content section */
.report-section .progress-details {
  display: flex;
  justify-content: space-between;
  margin: 0.5rem 1rem 0.5rem 1rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

.report-section .detail-item {
  text-align: center;
  flex: 1;
}

.report-section .detail-value {
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--onTertiary);
  margin-bottom: 0.25rem;
}

.report-section .detail-label {
  font-size: 0.75rem;
  color: var(--placeholder);
  font-weight: 500;
}

.report-section .details-section {
  margin: 0 1rem 0.5rem 1rem;
}

.report-section .sub-heading {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

/* details section */

.report-section .details-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* max-height: 80px;
  overflow: auto; */
  scrollbar-width: none;
  scrollbar-color: transparent transparent;
}

.report-section .details-list::-webkit-scrollbar {
  width: 0;
  height: 0;
  background: transparent;
}

.report-section .details-list::-webkit-scrollbar-thumb {
  background: transparent;
}

.report-section .details-list::-webkit-scrollbar-track {
  background: transparent;
}

.report-section .details-list .list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background-color: var(--tertiary);
  border-radius: 6px;
}

.report-card .list-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-card .list-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}
.report-card .list-item-icon svg {
  width: 20px;
  height: 20px;
}

.report-card .list-item-type {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary);
}

.report-card .list-item-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.report-card .list-item-amount {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--onSecondBackground);
}

.report-card .list-item-jobs {
  font-size: 0.625rem;
  color: var(--primaryHover);
  background-color: var(--secondBackground);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 10px;
}

.report-card .more-items-indicator {
  font-size: 0.75rem;
  color: var(--accent);
}

.report-card .toggle-btn {
  background: var(--tertiary);
  border: none;
  cursor: pointer;
  padding: 4px;
  position: absolute;
  right: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.report-card .toggle-btn svg {
  height: 18px;
  width: 18px;
  fill: var(--primary);
}

.report-card .toggle-btn.open {
  transform: rotate(180deg);
}

.report-card .toggle-btn.closed {
  transform: rotate(0deg);
}

/* event card css */
.report-card .events-section {
  flex: 1;
  padding: 0.67rem 1rem;
}

.report-card .events-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.report-card .event-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.report-card .event-item:last-child {
  border-bottom: none;
}

.report-card .event-status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  flex-shrink: 0;
}

.report-card .event-status-indicator svg {
  height: 1.375rem;
  width: 1.375;
}

.report-card .event-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0.25rem;
}

.report-card .event-title {
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--onSecondBackground);
  line-height: 1.3;
  margin: 0;
}

.report-card .event-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.report-card .event-user {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 500;
  white-space: nowrap;
}

.report-card .event-timestamp {
  font-size: 0.688rem;
  color: var(--placeholder);
  font-weight: 500;
  white-space: nowrap;
}

/* Responsive adjustments for progress */
@media (max-width: 768px) {
  .report-section .progress-value {
    font-size: 1.125rem;
  }

  .report-section .progress-details {
    margin: 0.5rem 0.75rem 0.5rem 0.75rem;
    padding: 0.5rem;
  }

  .report-section .detail-value {
    font-size: 0.875rem;
  }

  .report-section .detail-label {
    font-size: 0.6875rem;
  }
}

/* detailed event */

.report-card .detailed-event {
  flex: 1;
  padding: 0 1rem 0.5rem 1rem;
}

.report-card .detailed-event .detailed-event-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.report-card .detailed-event .detailed-event-item:last-child {
  border-bottom: none;
}

.report-card .detailed-event .status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.report-card .detailed-event .status-indicator.not-exceeded {
  background: var(--success);
}

.report-card .detailed-event .event-status.not-exceeded {
  background: var(--successOn);
  color: var(--success);
}

.report-card .detailed-event .status-indicator.exceeded {
  background: var(--error);
}
.report-card .detailed-event .event-status.exceeded {
  background: var(--errorOn);
  color: var(--error);
}

.report-card .detailed-event .event-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0.25rem;
}

.report-card .detailed-event .event-title {
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--onSecondBackground);
  line-height: 1.3;
  margin: 0;
}

.report-card .detailed-event .event-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.report-card .detailed-event .event-status {
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 2px 8px;
  border-radius: 12px;
}

.report-card .detailed-event .event-amount {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 500;
  white-space: nowrap;
}

.report-card .detailed-event .event-date {
  font-size: 0.688rem;
  color: var(--placeholder);
  font-weight: 500;
  white-space: nowrap;
}
