/* Custom Reports Styles */

.custom-report-builder-page {
  max-width: 1400px;
  margin: 0 auto;
}

.report-builder-container {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 24px;
}

/* Builder Main */
.builder-main {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 32px;
}

.report-builder-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.builder-section {
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.builder-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.step-number {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #a78bfa 0%, #e94560 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.section-header h2 {
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

/* Metrics Selector */
.metrics-selector {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.metric-category {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-name {
  color: white;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.metric-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.metric-checkbox-card {
  position: relative;
  cursor: pointer;
  display: block;
}

.metric-checkbox-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-card-content {
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.checkbox-card-content:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(167, 139, 250, 0.4);
}

.metric-checkbox-card input[type="checkbox"]:checked + .checkbox-card-content {
  background: rgba(167, 139, 250, 0.2);
  border-color: #a78bfa;
}

.checkbox-icon {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.metric-checkbox-card input[type="checkbox"]:checked + .checkbox-card-content .checkbox-icon {
  background: #a78bfa;
  border-color: #a78bfa;
  color: white;
}

.metric-name {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  font-weight: 500;
}

/* Date Range Options */
.date-range-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.radio-card {
  position: relative;
  cursor: pointer;
  display: block;
}

.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-card-content {
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  text-align: center;
  justify-content: center;
}

.radio-card-content:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(167, 139, 250, 0.4);
}

.radio-card input[type="radio"]:checked + .radio-card-content {
  background: rgba(167, 139, 250, 0.2);
  border-color: #a78bfa;
}

.radio-icon {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.radio-card input[type="radio"]:checked + .radio-card-content .radio-icon {
  border-color: #a78bfa;
  background: radial-gradient(circle, #a78bfa 0%, #a78bfa 40%, transparent 40%);
}

.option-text {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  font-weight: 500;
}

.custom-date-inputs {
  margin-top: 16px;
}

.date-inputs-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Frequency Options */
.frequency-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* Checkbox Group */
.checkbox-group {
  display: flex;
  gap: 16px;
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-option input {
  cursor: pointer;
}

.checkbox-option span {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
}

/* Builder Actions */
.builder-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Builder Sidebar */
.builder-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.preview-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
  position: sticky;
  top: 20px;
}

.preview-panel h3 {
  color: white;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.preview-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preview-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.preview-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.preview-value {
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
}

.template-suggestions {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
}

.template-suggestions h3 {
  color: white;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.template-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.template-btn {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.template-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(167, 139, 250, 0.4);
  transform: translateX(4px);
}

/* Form Elements */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-group label {
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
}

.form-input {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: white;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(167, 139, 250, 0.6);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-help {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  margin-top: -4px;
}

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

  .builder-sidebar {
    order: -1;
  }

  .preview-panel {
    position: relative;
    top: 0;
  }
}

@media (max-width: 768px) {
  .metric-options {
    grid-template-columns: 1fr;
  }

  .date-range-options {
    grid-template-columns: 1fr;
  }

  .frequency-options {
    grid-template-columns: repeat(2, 1fr);
  }

  .date-inputs-row {
    grid-template-columns: 1fr;
  }

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

  .builder-actions {
    flex-direction: column-reverse;
  }

  .builder-actions .btn {
    width: 100%;
  }
}

