/* ============================================================
   Reports — shared shell for all report screens
   (Profit & Loss, Vendor Spend, Audit Trail, Delinquency, etc.)

   This file carries:
     1) Styling for the shared macros in
        templates/members/reports/_macros.html.twig
        (breadcrumb, header + export buttons, stat card)
     2) Common utility classes every report template reuses directly
        (filter bar, data card, table grid, rows, empty state, badges)
        because each report's exact markup/columns differ too much for
        a macro, but the visual language must stay identical.

   NOTE for future report tasks: .report-table-grid only sets the
   shared header-row look (padding, background, font, color,
   text-transform, letter-spacing). Each report defines its own
   grid-template-columns via a per-report modifier class appended
   below this file's "Per-report column layouts" section, e.g.
   ".report-table-grid.is-vendorspend { grid-template-columns: ...; }".
   Do not add inline styles for column widths — add a scoped rule here.
   ============================================================ */

/* ---------- Page shell ---------- */

.report-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---------- Breadcrumb ---------- */

.report-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--phoa-sp-2);
  font-size: var(--phoa-fs-body-sm);
}

.report-breadcrumb-back {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--phoa-primary);
  font-weight: var(--phoa-fw-bold);
  cursor: pointer;
  text-decoration: none;
}

.report-breadcrumb-back:hover {
  color: var(--phoa-primary-hover);
  text-decoration: none;
}

.report-breadcrumb-sep {
  color: #C2CBDC;
}

.report-breadcrumb-current {
  color: var(--phoa-muted-1);
  font-weight: var(--phoa-fw-semibold);
}

/* ---------- Header (title + live badge + subtitle + export actions) ---------- */

.report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--phoa-sp-4);
  flex-wrap: wrap;
  margin-top: 18px;
}

.report-header-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.report-title {
  font-size: var(--phoa-fs-title);
  font-weight: var(--phoa-fw-extrabold);
  letter-spacing: -0.01em;
  color: var(--phoa-text);
}

.report-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 11px;
  border-radius: var(--phoa-r-badge);
  font-size: 11.5px;
  font-weight: var(--phoa-fw-extrabold);
  background: var(--phoa-success-bg);
  color: var(--phoa-success-text);
}

.report-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--phoa-success-text);
}

.report-subtitle {
  font-size: var(--phoa-fs-label);
  color: var(--phoa-muted-3);
  margin-top: 2px;
}

.report-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- Export buttons ---------- */

.report-btn-export {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  background: var(--phoa-card);
  border: 1px solid var(--phoa-border-input);
  color: var(--phoa-secondary);
  font-size: var(--phoa-fs-body);
  font-weight: var(--phoa-fw-bold);
  border-radius: var(--phoa-r-button);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.12s ease, color 0.12s ease;
}

.report-btn-export:hover {
  text-decoration: none;
}

.report-btn-export.is-pdf:hover {
  border-color: var(--phoa-primary);
  color: var(--phoa-primary);
}

.report-btn-export.is-csv:hover {
  border-color: var(--phoa-success-text);
  color: var(--phoa-success-text);
}

/* ---------- Stat card grid ---------- */

.report-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.report-stat-card {
  background: var(--phoa-card);
  border: 1px solid var(--phoa-border);
  border-radius: var(--phoa-r-card);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.report-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--phoa-r-icon-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  font-weight: var(--phoa-fw-extrabold);
  background: var(--phoa-primary-tint-2);
  color: var(--phoa-primary);
}

.report-stat-value {
  font-size: 22px;
  font-weight: var(--phoa-fw-extrabold);
  color: var(--phoa-text);
  line-height: 1;
}

.report-stat-label {
  font-size: 12.5px;
  color: var(--phoa-muted-3);
  margin-top: 5px;
}

/* Dark "highlight" variant (e.g. Net Income / Net Actual stat card) */
.report-stat-card.is-dark {
  background: var(--phoa-navy);
  border-color: var(--phoa-navy);
}

.report-stat-card.is-dark .report-stat-value {
  color: #fff;
}

.report-stat-card.is-dark .report-stat-label {
  color: #9FB0D8;
}

.report-stat-card.is-dark .report-stat-icon {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Optional third line under value + label, e.g. "$X of $Y" or "of total revenue" */
.report-stat-sub {
  font-size: 12.5px;
  font-weight: var(--phoa-fw-bold);
  color: var(--phoa-muted-4);
  margin-top: 8px;
}

.report-stat-card.is-dark .report-stat-sub {
  color: #9FB0D8;
}

/* ---------- Card wrapper (filter bars, data tables) ---------- */

.report-card {
  background: var(--phoa-card);
  border: 1px solid var(--phoa-border);
  border-radius: 16px;
  overflow: hidden;
}

/* ---------- Filter bar ---------- */

.report-filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--phoa-card);
  border: 1px solid var(--phoa-border);
  border-radius: var(--phoa-r-card);
  padding: 14px 16px;
}

.report-filter-field {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 150px;
}

.report-filter-field.is-narrow {
  flex: 0 0 auto;
  min-width: 110px;
}

.report-filter-label {
  font-size: 12.5px;
  font-weight: var(--phoa-fw-bold);
  color: var(--phoa-muted-1);
  margin-bottom: 6px;
}

.report-input,
.report-select {
  width: 100%;
  height: var(--phoa-input-h);
  padding: 0 14px;
  border: 1px solid var(--phoa-border-input-2);
  border-radius: var(--phoa-r-input);
  font-size: var(--phoa-fs-body);
  font-weight: var(--phoa-fw-semibold);
  color: var(--phoa-text);
  background: var(--phoa-card);
  box-sizing: border-box;
  font-family: inherit;
}

.report-input:focus,
.report-select:focus {
  border-color: var(--phoa-primary);
  outline: none;
}

.report-select {
  cursor: pointer;
}

.report-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--phoa-input-h);
  padding: 0 24px;
  background: var(--phoa-primary);
  border: 1px solid var(--phoa-primary);
  color: #fff;
  font-size: var(--phoa-fs-body);
  font-weight: var(--phoa-fw-bold);
  border-radius: var(--phoa-r-button);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s ease;
}

.report-btn-primary:hover {
  background: var(--phoa-primary-hover);
  border-color: var(--phoa-primary-hover);
  color: #fff;
  text-decoration: none;
}

/* ---------- Table grid ---------- */

.report-table-grid {
  display: grid;
  gap: 12px;
  padding: 13px 22px;
  background: var(--phoa-subtle-1);
  border-bottom: 1px solid #EEF1F6;
  font-size: var(--phoa-fs-eyebrow);
  font-weight: var(--phoa-fw-extrabold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--phoa-muted-2);
}

.report-table-row {
  display: grid;
  gap: 12px;
  align-items: center;
  padding: 14px 22px;
  border-bottom: 1px solid var(--phoa-border-divider);
  transition: background-color 0.12s ease;
}

.report-table-row:last-child {
  border-bottom: none;
}

.report-table-row:hover {
  background: var(--phoa-subtle-2);
}

.report-table-row.is-total {
  background: #F7F9FD;
  padding: 15px 22px;
}

.report-table-row.is-total:hover {
  background: #F7F9FD;
}

/* ---------- Table cell content helpers ---------- */

.report-table-link {
  color: inherit;
  text-decoration: none;
}

.report-table-link:hover {
  text-decoration: underline;
}

.report-table-section-label {
  padding: 14px 22px 6px;
  font-size: var(--phoa-fs-eyebrow);
  font-weight: var(--phoa-fw-extrabold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.report-table-section-label.is-success { color: var(--phoa-success-text); }
.report-table-section-label.is-warning { color: var(--phoa-warning-text-2); }

.report-table-row.is-total.is-success { background: var(--phoa-success-bg); }
.report-table-row.is-total.is-success:hover { background: var(--phoa-success-bg); }
.report-table-row.is-total.is-warning { background: var(--phoa-warning-bg); }
.report-table-row.is-total.is-warning:hover { background: var(--phoa-warning-bg); }

.report-table-row.is-net {
  background: var(--phoa-navy);
  padding: 16px 22px;
}
.report-table-row.is-net:hover { background: var(--phoa-navy); }
.report-table-row.is-net .report-value-label { color: #fff; }
.report-table-row.is-net .report-value-amount { color: #7FE3B0; }

.report-value-amount.is-success { color: var(--phoa-success-text); }
.report-value-amount.is-warning { color: var(--phoa-warning-text-2); }
.report-value-amount.is-danger { color: var(--phoa-danger-text); }

/* Inline progress bar (Budget vs. Actual "Used/Collected", Transaction Summary "Share") */
.report-progress-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.report-progress-track {
  flex: 1;
  height: 8px;
  background: var(--phoa-border-divider);
  border-radius: 5px;
  overflow: hidden;
}

.report-progress-fill {
  height: 100%;
  border-radius: 5px;
  background: var(--phoa-primary);
}

.report-progress-fill.is-success { background: var(--phoa-success-text); }
.report-progress-fill.is-warning { background: var(--phoa-warning-text-2); }
.report-progress-fill.is-danger { background: var(--phoa-danger-text); }

.report-progress-label {
  font-size: 12px;
  font-weight: var(--phoa-fw-bold);
  color: var(--phoa-muted-1);
  min-width: 34px;
  text-align: right;
  flex-shrink: 0;
}

/* Width buckets in 10% steps — avoids inline styles for data-driven bar widths */
.report-progress-fill.is-w0 { width: 0%; }
.report-progress-fill.is-w10 { width: 10%; }
.report-progress-fill.is-w20 { width: 20%; }
.report-progress-fill.is-w30 { width: 30%; }
.report-progress-fill.is-w40 { width: 40%; }
.report-progress-fill.is-w50 { width: 50%; }
.report-progress-fill.is-w60 { width: 60%; }
.report-progress-fill.is-w70 { width: 70%; }
.report-progress-fill.is-w80 { width: 80%; }
.report-progress-fill.is-w90 { width: 90%; }
.report-progress-fill.is-w100 { width: 100%; }

/* ---------- Empty state ---------- */

.report-empty-state {
  padding: 48px 22px;
  text-align: center;
  color: var(--phoa-muted-4);
}

.report-empty-state-title {
  font-size: var(--phoa-fs-body);
  font-weight: var(--phoa-fw-bold);
}

.report-empty-state-hint {
  font-size: var(--phoa-fs-label);
  margin-top: 4px;
}

/* ---------- Badges / pills ---------- */

.report-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 11px;
  border-radius: var(--phoa-r-badge);
  font-size: 11.5px;
  font-weight: var(--phoa-fw-extrabold);
  white-space: nowrap;
}

.report-badge.is-success {
  background: var(--phoa-success-bg);
  color: var(--phoa-success-text);
}

.report-badge.is-warning {
  background: var(--phoa-warning-bg);
  color: var(--phoa-warning-text);
}

.report-badge.is-danger {
  background: var(--phoa-danger-bg);
  color: var(--phoa-danger-text);
}

.report-badge.is-info {
  background: var(--phoa-primary-tint-2);
  color: var(--phoa-primary);
}

/* ---------- Per-report column layouts ----------
   Each report screen adds its own grid-template-columns rule here,
   scoped with an .is-{report} modifier on .report-table-grid /
   .report-table-row, instead of inline styles. Example:
   .report-table-grid.is-vendorspend,
   .report-table-row.is-vendorspend { grid-template-columns: 2.2fr 1.4fr 1.2fr 0.8fr 1fr 1.1fr; }
   ------------------------------------------------ */

/* Owner Directory (report-owners): Owner | Unit | Email | Phone | Occupancy */
.report-table-grid.is-owners,
.report-table-row.is-owners { grid-template-columns: 1.6fr 1.6fr 1.6fr 1.1fr 1fr; }

/* Unit Roster (report-roster): Unit | Type | Layout | Owner | Occupancy | Status */
.report-table-grid.is-roster,
.report-table-row.is-roster { grid-template-columns: 2fr 1.2fr 1.2fr 1.5fr 1.1fr 1fr; }

/* Delinquency Report (report-delinq): Owner/Unit | Current | 30 | 60 | 90+ | Total | Status */
.report-table-grid.is-delinq,
.report-table-row.is-delinq { grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1.1fr 1fr; }

/* Disbursement History: Pay Period | Status | Collected | Fees | Net | Balance | Paid Date | Actions */
.report-table-grid.is-disbursements,
.report-table-row.is-disbursements { grid-template-columns: 1.6fr 1fr 1.2fr 1.1fr 1.2fr 1.2fr 1.1fr 64px; }

/* ---------- Avatar initials chip (Owner Directory + Delinquency rows) ---------- */

.report-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: var(--phoa-fw-extrabold);
  flex-shrink: 0;
}

.report-avatar.is-lg {
  width: 38px;
  height: 38px;
  font-size: 13px;
}

.report-avatar.is-c0 { background: var(--phoa-primary-tint-2); color: var(--phoa-primary); }
.report-avatar.is-c1 { background: var(--phoa-success-bg); color: var(--phoa-success-text); }
.report-avatar.is-c2 { background: var(--phoa-warning-bg); color: var(--phoa-warning-text); }
.report-avatar.is-c3 { background: var(--phoa-danger-bg); color: var(--phoa-danger-text); }
.report-avatar.is-c4 { background: var(--phoa-purple-bg); color: var(--phoa-purple-text); }

/* ---------- Delinquency aging amount colors ---------- */

.report-amount-current { color: var(--phoa-muted-3); }
.report-amount-30 { color: var(--phoa-warning-text-2); }
.report-amount-60 { color: #C77700; }
.report-amount-90 { color: #D6453E; font-weight: var(--phoa-fw-bold); }

/* ---------- Generic table-cell utility classes (Owner Directory,
   Unit Roster, Delinquency Report rows) — used instead of inline
   styles so column content lines up with the shared visual language. ---------- */

.report-table-scroll { overflow-x: auto; }
.report-table-scroll-inner { min-width: 900px; }

.report-cell-group {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.report-cell-group.is-lg { gap: 12px; }

.report-cell-body { min-width: 0; }

.report-cell-title {
  font-size: 14px;
  font-weight: var(--phoa-fw-bold);
  color: var(--phoa-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-cell-subtitle {
  font-size: 12.5px;
  color: var(--phoa-muted-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-cell-secondary {
  font-size: 13.5px;
  color: var(--phoa-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-cell-muted {
  font-size: 13px;
  color: var(--phoa-muted-3);
}

.report-cell-muted.is-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-cell-right { text-align: right; }

.report-cell-amount {
  font-size: 13.5px;
  color: var(--phoa-muted-3);
}

.report-cell-amount-total {
  font-size: 14px;
  font-weight: var(--phoa-fw-extrabold);
  color: var(--phoa-text);
}

.report-table-grid.is-vendorspend,
.report-table-row.is-vendorspend {
  grid-template-columns: 2.2fr 1.4fr 1.2fr 0.8fr 1fr 1.1fr;
}

.report-table-grid.is-vendorspend .report-cell-right,
.report-table-row.is-vendorspend .report-cell-right {
  text-align: right;
}

.report-vendor-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* Profit & Loss (report-pl) statement: Account | Amount */
.report-table-grid.is-pl,
.report-table-row.is-pl { grid-template-columns: 2.4fr 1fr; }

/* Profit & Loss by Month (report-plmonth): Account + 12 month columns + Total */
.report-table-grid.is-plm,
.report-table-row.is-plm { grid-template-columns: 1.6fr repeat(12, 1fr) 1.1fr; }

/* Wider min-width than the shared .report-table-scroll-inner default (900px)
   to fit the 12-month matrix without column crushing. */
.report-table-scroll-inner.is-plm { min-width: 1180px; }

/* Sticky first column so "Account" label stays visible while scrolling months */
.report-table-cell-sticky {
  position: sticky;
  left: 0;
  background: inherit;
  z-index: 1;
}

.report-table-row { background: var(--phoa-card); }
.report-table-row.is-plm-income { background: var(--phoa-success-bg); }
.report-table-row.is-plm-income:hover { background: var(--phoa-success-bg); }
.report-table-row.is-plm-expense { background: var(--phoa-warning-bg); }
.report-table-row.is-plm-expense:hover { background: var(--phoa-warning-bg); }
.report-table-row.is-plm-net { background: var(--phoa-navy); }
.report-table-row.is-plm-net:hover { background: var(--phoa-navy); }
.report-table-row.is-plm-net .report-cell-right { color: #fff; }

/* Budget vs. Actual (report-bva): Category | Budget | Actual | Variance | Used | Status */
.report-table-grid.is-bva,
.report-table-row.is-bva { grid-template-columns: 1.7fr 1fr 1fr 1fr 1.5fr 1fr; }

/* Transaction Summary by Category (report-txsum): Category | Txns | Share | Total */
.report-table-grid.is-txsum,
.report-table-row.is-txsum { grid-template-columns: 1.8fr 0.9fr 2fr 1fr; }

/* ---------- Year selector (used by date-scoped reports like Vendor Spend) ---------- */

.report-year-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.report-year-selector-label {
  font-size: var(--phoa-fs-label);
  font-weight: var(--phoa-fw-bold);
  color: var(--phoa-muted-3);
  margin-right: 4px;
}

.report-year-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 13px;
  border-radius: var(--phoa-r-badge);
  font-size: 13px;
  font-weight: var(--phoa-fw-bold);
  color: var(--phoa-secondary);
  background: var(--phoa-card);
  border: 1px solid var(--phoa-border-input);
  text-decoration: none;
  transition: border-color 0.12s ease, color 0.12s ease, background-color 0.12s ease;
}

.report-year-link:hover {
  border-color: var(--phoa-primary);
  color: var(--phoa-primary);
  text-decoration: none;
}

.report-year-link.is-active {
  background: var(--phoa-primary);
  border-color: var(--phoa-primary);
  color: #fff;
}

/* ============================================================
   Violations Trends (report-viotrend)
   ============================================================ */

/* "Opened" bar color from the design spec — not one of the shared semantic
   warning tokens (which read more gold/yellow), so scoped here exactly. */
.report-viotrend-chart-card {
  --report-viotrend-amber: #F0B357;
  --report-viotrend-amber-text: #B47A08;
}

/* By Type table: Violation Type | Count | Share */
.report-table-grid.is-viotrend,
.report-table-row.is-viotrend { grid-template-columns: 1.6fr 0.7fr 2fr; }

.report-viotrend-card-title {
  padding: 16px 24px;
  border-bottom: 1px solid #EEF1F6;
  font-size: 15px;
  font-weight: var(--phoa-fw-extrabold);
  color: var(--phoa-text);
}

.report-viotrend-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 24px 0;
  margin-bottom: 20px;
}

.report-viotrend-chart-title {
  font-size: 15px;
  font-weight: var(--phoa-fw-extrabold);
  color: var(--phoa-text);
}

.report-viotrend-legend {
  display: flex;
  align-items: center;
  gap: 16px;
}

.report-viotrend-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: var(--phoa-fw-semibold);
  color: var(--phoa-secondary);
}

.report-viotrend-legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 3px;
}

.report-viotrend-legend-item.is-opened .report-viotrend-legend-dot { background: var(--report-viotrend-amber); }
.report-viotrend-legend-item.is-resolved .report-viotrend-legend-dot { background: var(--phoa-success-text); }

.report-viotrend-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 14px;
  height: 170px;
  padding: 0 24px 22px;
}

.report-viotrend-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.report-viotrend-bar-pair {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 130px;
}

.report-viotrend-bar-col {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  height: 100%;
}

.report-viotrend-bar-value {
  font-size: 11px;
  font-weight: var(--phoa-fw-extrabold);
}

.report-viotrend-bar-value.is-opened { color: var(--report-viotrend-amber-text); }
.report-viotrend-bar-value.is-resolved { color: var(--phoa-success-text); }

.report-viotrend-bar {
  width: 16px;
  border-radius: 4px 4px 0 0;
}

.report-viotrend-bar.is-opened { background: var(--report-viotrend-amber); }
.report-viotrend-bar.is-resolved { background: var(--phoa-success-text); }

/* Bar height in 10% steps of the 130px-tall chart area — avoids an inline
   style for this data-driven value, same bucket technique as
   .report-progress-fill.is-wNN above. */
.report-viotrend-bar.is-h0 { height: 0%; }
.report-viotrend-bar.is-h10 { height: 10%; }
.report-viotrend-bar.is-h20 { height: 20%; }
.report-viotrend-bar.is-h30 { height: 30%; }
.report-viotrend-bar.is-h40 { height: 40%; }
.report-viotrend-bar.is-h50 { height: 50%; }
.report-viotrend-bar.is-h60 { height: 60%; }
.report-viotrend-bar.is-h70 { height: 70%; }
.report-viotrend-bar.is-h80 { height: 80%; }
.report-viotrend-bar.is-h90 { height: 90%; }
.report-viotrend-bar.is-h100 { height: 100%; }

.report-viotrend-bar-month {
  font-size: 12px;
  font-weight: var(--phoa-fw-bold);
  color: var(--phoa-muted-3);
}

/* ============================================================
   Audit Trail (report-audit)
   ============================================================ */

/* Timestamp | User | Action | Category */
.report-table-grid.is-audit,
.report-table-row.is-audit { grid-template-columns: 1.5fr 1.4fr 2.6fr 1fr; }

.report-audit-search {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 200px;
  height: 42px;
  padding: 0 14px;
  background: var(--phoa-subtle-1);
  border: 1px solid var(--phoa-border-input);
  border-radius: var(--phoa-r-input);
}

.report-audit-search svg { flex-shrink: 0; color: var(--phoa-muted-4); }

.report-audit-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  color: var(--phoa-text);
  font-family: inherit;
}

.report-audit-dropdown {
  position: relative;
}

.report-audit-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 170px;
  height: 42px;
  padding: 0 14px;
  background: var(--phoa-card);
  border: 1px solid var(--phoa-border-input);
  color: var(--phoa-text);
  font-size: 14px;
  font-weight: var(--phoa-fw-bold);
  border-radius: var(--phoa-r-input);
  cursor: pointer;
  text-decoration: none;
}

.report-audit-dropdown-trigger:hover {
  border-color: var(--phoa-primary);
  color: var(--phoa-text);
  text-decoration: none;
}

.report-audit-dropdown-menu {
  left: 0;
  top: calc(100% + 6px);
  transform: none;
  min-width: 190px;
  max-height: 280px;
  overflow-y: auto;
  border-radius: 11px;
}

.report-audit-dropdown-menu::after {
  display: none;
}

.report-audit-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  font-size: 13.5px;
  font-weight: var(--phoa-fw-semibold);
  color: var(--phoa-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--phoa-border-divider);
}

.report-audit-dropdown-item:last-child { border-bottom: none; }

.report-audit-dropdown-item:hover {
  background: var(--phoa-subtle-4);
  color: var(--phoa-secondary);
  text-decoration: none;
}

.report-audit-dropdown-item.is-active { color: var(--phoa-primary); }

.report-audit-detail {
  font-size: 12.5px;
  color: var(--phoa-muted-3);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-audit-pagination {
  padding: 14px 22px;
  border-top: 1px solid var(--phoa-border-divider);
}

/* ============================================================
   Reports catalog (index page) — group labels + report cards
   ============================================================ */

.report-catalog-groups {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.report-catalog-group {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.report-catalog-group-label {
  display: flex;
  align-items: center;
  gap: 9px;
}

.report-catalog-group-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--group-accent-color, var(--phoa-primary));
}

.report-catalog-group-label-text {
  font-size: var(--phoa-fs-eyebrow);
  font-weight: var(--phoa-fw-extrabold);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--phoa-muted-2);
}

.report-catalog-card {
  background: var(--phoa-card);
  border: 1px solid var(--phoa-border);
  border-radius: 14px;
  overflow: hidden;
}

.report-catalog-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-top: 1px solid var(--phoa-border-divider);
  text-decoration: none;
  transition: background-color 0.12s ease;
}

.report-catalog-card > .report-catalog-row:first-child {
  border-top: none;
}

.report-catalog-row:hover {
  background: var(--phoa-subtle-2);
  text-decoration: none;
}

.report-catalog-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--group-accent-bg, var(--phoa-primary-tint-2));
  color: var(--group-accent-color, var(--phoa-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
}

.report-catalog-body {
  min-width: 0;
  flex: 1;
}

.report-catalog-title {
  font-size: 14.5px;
  font-weight: var(--phoa-fw-bold);
  color: var(--phoa-text);
}

.report-catalog-desc {
  font-size: 12.5px;
  color: var(--phoa-muted-3);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-catalog-freq-pill {
  font-size: 11.5px;
  font-weight: var(--phoa-fw-bold);
  color: var(--phoa-muted-2);
  background: var(--phoa-subtle-1);
  padding: 4px 10px;
  border-radius: 20px;
  flex-shrink: 0;
  white-space: nowrap;
}

.report-catalog-chevron {
  color: #C2CBDC;
  flex-shrink: 0;
}

/* Group accent modifier classes (avoids inline styles for dynamic colors) */
.report-catalog-group.is-financial {
  --group-accent-color: #3B6EF6;
  --group-accent-bg: #E7EEFF;
}

.report-catalog-group.is-owners-units {
  --group-accent-color: #12A594;
  --group-accent-bg: #E0F5F1;
}

.report-catalog-group.is-compliance {
  --group-accent-color: #7A4DED;
  --group-accent-bg: #F2ECFE;
}

/* ---------- Profit & Loss transactions drill-down ---------- */

.report-table-grid.is-pltx,
.report-table-row.is-pltx {
  grid-template-columns: 1fr 2fr 1.2fr 1.5fr 1fr 0.6fr;
}

.report-pagination {
  display: flex;
  justify-content: center;
  padding: 16px 22px;
}

.report-icon-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: var(--phoa-subtle-4);
  color: var(--phoa-muted-1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.report-icon-btn:hover {
  background: var(--phoa-primary-tint-2);
  color: var(--phoa-primary);
}

/* ---------- Card section title bar (e.g. "Disbursement History") ---------- */

.report-card-title {
  padding: 16px 24px;
  border-bottom: 1px solid var(--phoa-border-divider);
  font-size: 15px;
  font-weight: var(--phoa-fw-extrabold);
  color: var(--phoa-text);
}

/* ---------- Disbursements & Payouts summary cards ---------- */

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.report-summary-card {
  background: var(--phoa-card);
  border: 1px solid var(--phoa-border);
  border-radius: 16px;
  padding: 22px 24px;
}

.report-summary-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.report-summary-icon {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--phoa-success-bg);
  color: var(--phoa-success-text);
}

.report-summary-value {
  font-size: 34px;
  font-weight: var(--phoa-fw-extrabold);
  color: var(--phoa-success-text);
  line-height: 1.1;
  margin-top: 6px;
}

.report-summary-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--phoa-muted-3);
  margin-top: 8px;
}

.report-summary-progress {
  height: 8px;
  border-radius: 5px;
  background: var(--phoa-subtle-4);
  margin-top: 18px;
  overflow: hidden;
}

.report-summary-progress-fill {
  height: 100%;
  background: var(--phoa-success-text);
  border-radius: 5px;
}

.report-summary-footnote {
  font-size: 12px;
  color: var(--phoa-muted-4);
  margin-top: 8px;
}

.report-provider-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  background: #F0EDFF;
  border-radius: 9px;
  font-size: 17px;
  font-weight: var(--phoa-fw-extrabold);
  color: #5B3DF5;
  letter-spacing: -0.02em;
}

.report-provider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--phoa-border-divider);
}

.report-empty-state-icon {
  font-size: 40px;
  color: var(--phoa-muted-4);
  margin-bottom: 12px;
}
