/* =============================================
   REPORTS PAGE
============================================= */
.rpt-page { padding: 0; }

.rpt-filter-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 16px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r);
}
.rpt-filter-left  { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; flex: 1; }
.rpt-filter-right { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-left: auto; }

.rpt-preset-sel { min-width: 130px; }

.rpt-to-sep { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
.rpt-bar-sep { width: 1px; height: 18px; background: var(--border); margin: 0 2px; flex-shrink: 0; }

.rpt-inc-row { display: flex; gap: 4px; flex-wrap: wrap; }
.rpt-inc-btn {
  padding: 4px 9px; font-size: 11.5px; font-weight: 500;
  border: 1px solid var(--border); border-radius: 4px;
  background: var(--surface-3); color: var(--text-muted);
  cursor: pointer; transition: background 0.12s, color 0.12s, border-color 0.12s;
  opacity: 0.65;
}
.rpt-inc-btn.active {
  background: var(--brand-muted, rgba(99,102,241,0.12));
  border-color: var(--brand); color: var(--brand); opacity: 1;
}
.rpt-inc-btn:hover { opacity: 1; }

.rpt-export-btn { gap: 5px; white-space: nowrap; }

.rpt-stat-row {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px;
}
.rpt-stat-chip {
  flex: 1; min-width: 90px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 14px 16px; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--border); text-align: center;
}
.rpt-stat-val { font-size: 22px; font-weight: 700; line-height: 1.1; color: var(--text-primary); margin-bottom: 4px; }
.rpt-stat-lbl { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.7px; color: var(--text-muted); }
.rpt-stat-done .rpt-stat-val { color: var(--brand); }
.rpt-stat-prog .rpt-stat-val { color: #60a5fa; }
.rpt-stat-over .rpt-stat-val { color: var(--red); }

.rpt-range-label { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; padding-left: 2px; }
.rpt-section { margin-bottom: 16px; }

.rpt-table-wrap { overflow-x: auto; }
.rpt-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.rpt-table th {
  text-align: center; padding: 8px 14px;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.rpt-table th:first-child,
.rpt-th-first { text-align: left !important; }

.rpt-th-sort        { cursor: pointer; user-select: none; white-space: nowrap; }
.rpt-th-sort:hover  { color: var(--text-primary); }
.rpt-th-active      { color: var(--brand) !important; }
.rpt-sort-icon      { display: inline-block; margin-left: 4px; font-size: 10px; opacity: 0.35; vertical-align: middle; }
.rpt-sort-on        { opacity: 1; color: var(--brand); }

.rpt-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text-primary); text-align: center; }
.rpt-table tr:last-child td { border-bottom: none; }
.rpt-table tr:hover td { background: var(--surface-2); }

.rpt-td-first, .rpt-td-name { white-space: nowrap; }
.rpt-table th:first-child { white-space: nowrap; }
.rpt-table td:first-child { text-align: left; }

.rpt-table-tasklist th:nth-child(2),
.rpt-table-tasklist td:nth-child(2) { text-align: left; }

.rpt-table-tasklist td:first-child,
.rpt-table-tasklist th:first-child { min-width: 220px; }

.rpt-num      { text-align: center; font-variant-numeric: tabular-nums; }
.rpt-cell-center { text-align: center; }
.rpt-done     { color: var(--brand) !important; }
.rpt-prog     { color: #60a5fa !important; }
.rpt-over     { color: var(--red) !important; }

.rpt-pct-cell { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 160px; }
.rpt-pct-bar  { flex: 0 0 64px; height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.rpt-pct-fill { height: 100%; background: var(--brand); border-radius: 3px; transition: width 0.3s ease; }
.rpt-pct-lbl  { font-size: 11px; color: var(--text-muted); min-width: 30px; text-align: right; }

.rpt-table:not(.rpt-table-tasklist) th:last-child,
.rpt-table:not(.rpt-table-tasklist) td:last-child { min-width: 160px; }

.rpt-fmt-row {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.rpt-fmt-option {
  flex: 1; min-width: 130px;
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px; border-radius: 6px;
  border: 1.5px solid var(--border); background: var(--surface-2);
  cursor: pointer; font-size: 13px; font-weight: 500;
  transition: border-color 0.12s, background 0.12s;
}
.rpt-fmt-option:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-muted, rgba(99,102,241,0.1));
  color: var(--brand);
}
.rpt-fmt-option input[type="radio"] { accent-color: var(--brand); }
.rpt-exp-sections {
  display: flex; flex-direction: column; gap: 10px;
}
.rpt-exp-check {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; cursor: pointer; padding: 2px 0;
}
.rpt-exp-check input[type="checkbox"] {
  width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer;
}
.rpt-exp-sep {
  height: 1px; background: var(--border); margin: 4px 0 10px;
}

@media (min-width: 720px) {
  .rpt-exp-sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 18px;
    row-gap: 10px;
    align-items: start;
  }
}

.rpt-no-print { }
