/* ─── Transparency Page ─────────────────────────────────────────────────────────────────────── */

/* Hero */
.tp-hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
  color: #fff;
  padding: 3.5rem 0 2.5rem;
}
.tp-hero h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.tp-hero__sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.82);
  max-width: 680px;
  line-height: 1.65;
  margin-bottom: 2rem;
}

/* Pipeline strip */
.tp-pipeline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tp-pipeline__stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-size: 0.82rem;
  min-width: 110px;
  text-align: center;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
}
.tp-pipeline__stage strong { font-size: 0.88rem; }
.tp-pipeline__stage span   { color: rgba(255,255,255,0.7); font-size: 0.78rem; }
.tp-pipeline__icon         { font-size: 1.3rem; }
.tp-pipeline__stage--verified  { background: rgba(52,211,153,0.18); border-color: rgba(52,211,153,0.4); }
.tp-pipeline__stage--approved  { background: rgba(74,222,128,0.18); border-color: rgba(74,222,128,0.4); }
.tp-pipeline__arrow {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.4);
  padding: 0 0.25rem;
}

/* Filters */
.tp-filters {
  background: var(--color-surface, #fff);
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.tp-filters__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
}
.tp-filters__group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted, #64748b);
  margin-bottom: 0.5rem;
}
.tp-filter-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-text-muted, #94a3b8);
  font-size: 0.72rem;
}

/* Community chips */
.tp-community-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tp-chip {
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 2px solid var(--chip-color, #cbd5e1);
  background: transparent;
  color: var(--color-text, #1e293b);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tp-chip--active {
  background: var(--chip-color, #3b82f6);
  color: #fff;
}
.tp-chip:hover:not(.tp-chip--active) {
  background: color-mix(in srgb, var(--chip-color) 12%, transparent);
}

/* Type buttons */
.tp-type-btns { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tp-type-btn {
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--color-border, #e2e8f0);
  background: transparent;
  color: var(--color-text-muted, #64748b);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tp-type-btn--active,
.tp-type-btn:hover {
  background: var(--color-primary, #3b82f6);
  color: #fff;
  border-color: var(--color-primary, #3b82f6);
}

/* Visualizations grid */
.tp-viz {
  background: var(--color-surface-alt, #f8fafc);
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--color-border, #e2e8f0);
}
.tp-viz__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.tp-viz__card {
  background: #fff;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: var(--radius-lg, 12px);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
}
.tp-viz__card h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: var(--color-text, #1e293b);
}
.tp-viz__desc {
  font-size: 0.78rem;
  color: var(--color-text-muted, #64748b);
  margin-bottom: 1rem;
}
.tp-viz__canvas-wrap { position: relative; max-height: 260px; }
.tp-viz__canvas-wrap canvas { max-height: 260px; }

/* Records section */
.tp-records { padding: 2.5rem 0 4rem; }
.tp-empty {
  color: var(--color-text-muted, #64748b);
  text-align: center;
  padding: 3rem 0;
}

/* Community block */
.tp-community-block {
  margin-bottom: 2.5rem;
  border: 1px solid var(--color-border, #e2e8f0);
  border-top: 4px solid var(--community-color, #3b82f6);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.05));
}
.tp-community-block__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--color-surface-alt, #f8fafc);
  border-bottom: 1px solid var(--color-border, #e2e8f0);
}
.tp-community-block__header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--community-color, #1e293b);
  margin: 0;
}
.tp-community-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}
.tp-total { font-size: 0.83rem; color: var(--color-text-muted, #64748b); }
.tp-total strong { color: var(--color-text, #1e293b); }
.tp-total--income   strong { color: #15803d; }
.tp-total--expense  strong { color: #b91c1c; }
.tp-total--intended strong { color: #1d4ed8; }
.tp-total--pending  { color: #92400e; font-style: italic; }

/* Records table */
.tp-table-wrap { overflow-x: auto; }
.tp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.tp-table th {
  background: var(--color-surface-alt, #f1f5f9);
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted, #64748b);
  padding: 0.55rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  white-space: nowrap;
}
.tp-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  color: var(--color-text, #1e293b);
  vertical-align: middle;
}
.tp-table tbody tr:last-child td { border-bottom: none; }
.tp-table tbody tr:hover          { background: #f8fafc; }

/* Pending rows */
.tp-row--pending td:first-child { border-left: 3px solid #fbbf24; }
.tp-row--pending { background: #fffbeb; }
.tp-row--pending:hover { background: #fef9c3; }

/* Celebrated rows (intended_higher) */
.tp-row--celebrated {
  background: linear-gradient(90deg, #fefce8 0%, #fef9c3 100%);
}
.tp-row--celebrated td:first-child { border-left: 3px solid #f59e0b; }
.tp-row--celebrated:hover { background: #fef08a; }

/* Pending amount */
.tp-amount-pending {
  color: #92400e;
  font-style: italic;
  font-size: 0.85rem;
}

/* Paid badge */
.tp-paid-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  margin-left: 0.35rem;
  vertical-align: middle;
}

/* Type badges */
.tp-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  background: #e2e8f0;
  color: #475569;
}
.tp-badge--income           { background: #dcfce7; color: #15803d; }
.tp-badge--expense          { background: #fee2e2; color: #b91c1c; }
.tp-badge--intended         { background: #dbeafe; color: #1d4ed8; }
.tp-badge--intended_lower   { background: #fef3c7; color: #92400e; }
.tp-badge--intended_higher  { background: #fef9c3; color: #78350f; border: 1px solid #f59e0b; font-weight: 700; }
.tp-badge--message          { background: #f3e8ff; color: #6b21a8; }

/* Status pills */
.tp-status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}
.tp-status--pending       { background: #f1f5f9; color: #475569; }
.tp-status--returned      { background: #fee2e2; color: #991b1b; }
.tp-status--self_reported { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }
.tp-status--verified      { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.tp-status--approved      { background: #bbf7d0; color: #14532d; border: 1px solid #86efac; }

/* Responsive */
@media (max-width: 640px) {
  .tp-pipeline { flex-direction: column; align-items: flex-start; }
  .tp-pipeline__arrow { transform: rotate(90deg); }
  .tp-community-block__header { flex-direction: column; }
  .tp-filters__inner { flex-direction: column; }
}
