/* ============================================================
   Reports V2 — Card-based hub styles
   ============================================================ */

/* --- Report page: white card with rounded corners, margins, full height --- */
#pageReport {
  background: #ffffff !important;
  border-radius: 12px !important;
  margin: 10px 0 10px 10px !important;
  width: calc(100% - 26px) !important;
  min-height: calc(100vh - 65px) !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  overflow: hidden;
}

#pageReport .settings-page {
  padding: 16px 20px 40px 20px !important;
  background: #ffffff !important;
  min-height: 100% !important;
  box-sizing: border-box !important;
}

#pageReport .v2-nav-header.settings-header-rounded {
  margin: 0 0 20px 0 !important;
  justify-content: flex-start !important;
  padding: 0 !important;
}

#pageReport .page-region-content {
  padding: 4px 0 0 0 !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: #ffffff !important;
}

/* Override global .page-control .frames .frame { padding:15px } from modern.css */
#pageReport .frames,
#pageReport .formFrame,
#pageReport .frame {
  padding: 0 !important;
  margin: 0 !important;
  background: #ffffff !important;
}


/* --- Report Hub Container --- */
.v2-report-hub {
  padding: 20px 16px;
  max-width: 900px;
  margin: 0 auto;
}

.v2-report-hub-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.v2-report-hub-title i {
  color: #3b82f6;
}

/* --- Report Card Grid --- */
.v2-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

/* --- Individual Report Card --- */
.v2-report-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.v2-report-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
  transform: translateY(-2px);
}

.v2-report-card:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.1);
}

/* Card Icon */
.v2-report-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.v2-report-card-icon.icon-blue {
  background: #3b82f6;
  color: #ffffff;
}

.v2-report-card-icon.icon-green {
  background: #22c55e;
  color: #ffffff;
}

.v2-report-card-icon.icon-purple {
  background: #8b5cf6;
  color: #ffffff;
}

.v2-report-card-icon.icon-orange {
  background: #f97316;
  color: #ffffff;
}

.v2-report-card-icon.icon-teal {
  background: #14b8a6;
  color: #ffffff;
}

.v2-report-card-icon.icon-rose {
  background: #f43f5e;
  color: #ffffff;
}

/* Card Title */
.v2-report-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  line-height: 1.3;
}

/* Card Description */
.v2-report-card-desc {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .v2-report-grid {
    grid-template-columns: 1fr;
  }

  .v2-report-hub {
    padding: 16px 12px;
  }
}

/* ============================================================
   Reports V2 — Filter/Form Styles (individual report pages)
   ============================================================ */

/* --- Back button in report detail pages (matches scrolltab arrows) --- */
#pageReport .nav-back-button {
  position: relative !important;
  left: auto !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px;
  flex-shrink: 0;
  background-color: #ffffff !important;
  border-radius: 50% !important;
  border: 1px solid #e2e8f0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

#pageReport .nav-back-button::before {
  content: "" !important;
  display: block !important;
  width: 12px !important;
  height: 12px !important;
  border-left: 3px solid #2b5797 !important;
  border-bottom: 3px solid #2b5797 !important;
  transform: rotate(45deg) !important;
  margin-left: 4px !important;
  transition: border-color 0.2s ease !important;
}

#pageReport .nav-back-button:hover {
  background-color: #2b5797 !important;
  border-color: #2b5797 !important;
  transform: scale(1.1) !important;
  box-shadow: 0 6px 18px rgba(43, 87, 151, 0.3) !important;
}

#pageReport .nav-back-button:hover::before {
  border-color: #ffffff !important;
}
/* --- Filter form layout --- */
.v2-report-filters {
  padding: 0;
}

.v2-report-filter-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.v2-report-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v2-report-filter-group h4 {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin: 0;
}

.v2-report-filter-group .v2-select-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

.v2-report-filter-group .v2-select {
  width: 100%;
  padding: 9px 36px 9px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  background-color: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 12px !important;
}

.v2-report-filter-group .v2-select:hover {
  border-color: #94a3b8;
}

.v2-report-filter-group .v2-select:focus {
  outline: none;
  border-color: #3b5998;
  box-shadow: 0 0 0 3px rgba(59, 89, 152, 0.12);
}

/* --- Date inputs in reports --- */
.v2-report-filter-group .v2-date-input {
  width: 100%;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  background-color: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.v2-report-filter-group .v2-date-input:focus {
  outline: none;
  border-color: #3b5998;
  box-shadow: 0 0 0 3px rgba(59, 89, 152, 0.12);
}

/* --- Checkbox label --- */
.v2-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  padding-top: 28px;
}

/* --- Section title (e.g. "Payments options") --- */
.v2-report-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin: 8px 0 12px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}

/* --- Action buttons row --- */
.v2-report-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.v2-btn-primary {
  padding: 0 24px;
  height: 42px;
  min-height: 42px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: linear-gradient(135deg, #3b5998, #2b4583);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.v2-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 89, 152, 0.3);
}

.v2-btn-secondary {
  padding: 0 24px;
  height: 42px;
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: #ffffff;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.v2-btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

/* --- Chart containers --- */
.v2-report-chart-container {
  margin-top: 20px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .v2-report-filter-row {
    grid-template-columns: 1fr;
  }

  .v2-checkbox-label {
    padding-top: 0;
  }

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

  .v2-btn-primary,
  .v2-btn-secondary {
    width: 100%;
    text-align: center;
  }
}
