﻿/* ── SERASI — Report Page (in-app filter form) ──────────────────
   Style untuk halaman filter laporan di dalam app (page-report).
   CSS untuk dokumen cetak (popup) di-embed langsung di report.js.
   ──────────────────────────────────────────────────────────── */

/* Section-title override untuk halaman laporan — h2 dibungkus <div>
   sehingga flex:1 bawaan tidak berefek; perlu align center + flex:1 */
#page-report .section-title {
  align-items: center;
}
#page-report .section-title > div {
  flex: 1;
  min-width: 0;
}

/* Filter form container */
.report-filter-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}

.report-filter-card .filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.report-filter-card .filter-row.single {
  grid-template-columns: 1fr;
}

.report-filter-card label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.report-filter-card input[type="date"],
.report-filter-card select {
  padding: 9px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color .15s;
  width: 100%;
}

.report-filter-card input[type="date"]:focus,
.report-filter-card select:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card);
}

/* Divider label inside filter card */
.report-filter-divider {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin: 14px 0 8px;
}

/* Cetak button area */
.report-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

/* Options card — wraps info note + opt-in checkboxes */
.report-opts-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  overflow: hidden;
  /* force own compositing layer — prevents GPU re-composite flicker
     when child checkbox state changes on mobile */
  transform: translateZ(0);
}

/* Info note */
.report-note {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg-dark);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  line-height: 1.5;
}

.report-opts-card .report-note {
  border-radius: 0;
  border-bottom: 1px solid var(--border);
}

/* Opt-in checkbox row in report filter */
.report-opt-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-top: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0;
  transition: background .12s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.report-opt-row:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.report-opt-row:hover {
  background: var(--bg-dark);
}

@media (hover: none) {
  .report-opt-row {
    transition: none;
  }
  .report-opt-row:hover {
    background: transparent;
  }
  .report-opt-row:active {
    background: var(--bg-dark);
  }
}

.report-opt-row span {
  flex: 1;
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.5;
}

.report-opt-row strong {
  font-weight: 600;
  color: var(--text);
}

.report-opt-row input[type="checkbox"] {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  pointer-events: none;
  /* Suppress native platform checkbox animation (iOS spring, Android ripple)
     yang menyebabkan gemetar saat tap — ganti dengan custom CSS indicator */
  -webkit-appearance: none;
  appearance: none;
  border: 1.5px solid var(--border);
  border-radius: 3px;
  background: var(--card);
  transition: none;
}

.report-opt-row input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6l2.5 2.5 4.5-5' stroke='white' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 10px;
  background-repeat: no-repeat;
  background-position: center;
}

/* Kop logo preview in settings */
.kop-logo-preview {
  display: block;
  max-height: 64px;
  max-width: 64px;
  object-fit: contain;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  background: #fff;
}
