/* ============================================================
   Reports — past-due banner, inline routing bar, subtotals.
   ============================================================ */

.past-due-banner {
  padding: var(--geist-space-3x) var(--geist-space-4x);
  background: var(--ds-red-100);
  border-radius: var(--geist-radius);
  box-shadow: 0 0 0 1px var(--ds-red-700);
  color: var(--ds-red-900);
  font-size: 13px;
  line-height: 18px;
}

.routing-bar {
  display: inline-flex;
  gap: var(--geist-space);
}

.routing-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  border-radius: var(--geist-radius);
  box-shadow: var(--ds-shadow-border);
}

.routing-cell.is-complete { background: var(--ds-green-100); color: var(--ds-green-900); }
.routing-cell.is-partial { background: var(--ds-amber-100); color: var(--ds-amber-900); }
.routing-cell.is-open { background: var(--ds-red-100); color: var(--ds-red-900); }
.routing-cell-detail { display: none; }

.table tr.is-past-due td:nth-child(7) {
  color: var(--ds-red-900);
  font-weight: 600;
}

.report-subtotal td {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 20px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  border-top: 1px solid var(--ds-gray-500);
  border-bottom: 1px solid var(--ds-gray-400);
  background: var(--ds-gray-100);
}

/* Reports landing menu — a named table of contents. */
.report-menu {
  margin: 0;
  overflow: hidden;
  background: var(--ds-background-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--ds-shadow-menu);
}

.report-menu-item {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: var(--geist-space-4x);
  align-items: baseline;
  padding: var(--geist-space-3x) var(--geist-space-4x);
  border-bottom: 1px solid var(--ds-gray-400);
}

.report-menu-item:last-child { border-bottom: 0; }
.report-menu-item dt { margin: 0; font-size: 14px; line-height: 20px; font-weight: 500; }
.report-menu-item dt a { color: var(--ink); text-decoration: none; }
.report-menu-item dt a:hover { color: var(--ds-blue-700); }
.report-menu-item dt a:focus-visible { outline: none; border-radius: var(--geist-radius); box-shadow: var(--ds-focus-ring); }
.report-menu-item dd { margin: 0; color: var(--ink-muted); font-size: 13px; line-height: 18px; }

@media (max-width: 640px) {
  .report-menu-item { grid-template-columns: 1fr; gap: 4px; }
}

/* Linked landing cards — one clear target per destination. */
.linked-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--geist-space-6x);
}

.linked-card {
  display: flex;
  flex-direction: column;
  gap: var(--geist-space-2x);
  min-height: 7rem;
  padding: var(--geist-space-4x);
  color: var(--ink);
  text-decoration: none;
  background: var(--ds-background-100);
  border-radius: var(--geist-radius);
  box-shadow: var(--ds-shadow-border);
  transition: background-color .15s cubic-bezier(.4, 0, .2, 1), box-shadow .15s cubic-bezier(.4, 0, .2, 1), transform .15s cubic-bezier(.4, 0, .2, 1);
}

.linked-card:hover {
  color: var(--ink);
  background: var(--ds-gray-100);
  box-shadow: var(--ds-shadow-border-small);
  transform: translateY(-1px);
}

.linked-card:focus-visible {
  outline: none;
  box-shadow: var(--ds-shadow-border), var(--ds-focus-ring);
}

.linked-card-title {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  color: var(--ink);
}

.linked-card-code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 20px;
  font-weight: 400;
  color: var(--ink);
}

.linked-card-meta {
  font-family: var(--font-mono);
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
}

.linked-card-description {
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 18px;
}

@media (prefers-reduced-motion: reduce) {
  .linked-card { transition: none; }
  .linked-card:hover { transform: none; }
}
