/* Accountant report screens: the accounting shell's cards and greens, sized for dense tables. */
.report-title {
  max-width: none;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.report-shell a {
  color: #173f32;
  text-underline-offset: 0.2em;
}

.report-shell .button--accounting {
  color: #fff;
}

.report-entities,
.report-tabs,
.report-presets,
.report-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.report-entities {
  margin-top: 1.5rem;
}

.report-tabs {
  margin-top: 1.25rem;
  border-bottom: 1px solid rgba(21, 37, 31, 0.14);
}

.report-tabs a,
.report-subtabs a,
.report-entities a {
  padding: 0.75rem 0;
  border-bottom: 2px solid transparent;
  color: #536159;
  text-decoration: none;
}

.report-tabs a[aria-current="page"],
.report-subtabs a[aria-current="page"],
.report-entities a[aria-current="page"] {
  border-color: #173f32;
  color: #15251f;
  font-weight: 700;
}

.report-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: end;
  margin-top: 1.25rem;
}

.report-filters label {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
  color: #536159;
  font-size: 0.8rem;
  font-weight: 700;
}

.report-filters input[type="date"],
.report-filters select {
  max-width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(21, 37, 31, 0.2);
  border-radius: 0.55rem;
  color: #15251f;
  background: #fff;
  font: inherit;
  font-weight: 400;
}

.report-presets {
  gap: 0.4rem;
  margin-top: 0.9rem;
}

.report-presets a {
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(21, 37, 31, 0.16);
  border-radius: 999px;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}

.report-presets a[aria-current="page"] {
  border-color: #173f32;
  color: #fff;
  background: #173f32;
}

.report-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0 3rem;
  margin-top: 0.75rem;
}

.report-hint {
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 0.8rem;
  color: #6b4b12;
  background: rgba(255, 189, 89, 0.24);
  font-size: 0.9rem;
  line-height: 1.6;
}

.report-exports {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: center;
  margin-top: 1.25rem;
}

.report-export {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 700;
}

.report-card {
  margin-top: 1rem;
  padding: 1.25rem;
  border: 1px solid rgba(21, 37, 31, 0.14);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
}

.report-card__heading h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.5;
}

.report-card__heading .meta {
  line-height: 1.6;
}

.report-table {
  margin-top: 1.5rem;
}

.report-table h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.report-table .meta {
  font-variant-numeric: tabular-nums;
}

/* Wide tables scroll inside the card; the page itself never scrolls sideways. */
.report-scroll {
  max-width: 100%;
  margin-top: 0.6rem;
  overflow-x: auto;
  border-top: 1px solid rgba(21, 37, 31, 0.3);
}

.report-grid {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}

.report-grid--trial-balance {
  min-width: 46rem;
}

/* One column per month: the table keeps its natural width and scrolls. */
.report-grid--monthly-trend {
  width: max-content;
  min-width: 100%;
}

.report-grid--monthly-trend tbody th[scope="row"] {
  max-width: min(45vw, 18rem);
}

.report-grid--general-ledger,
.report-grid--subsidiary-ledger {
  min-width: 44rem;
}

.report-grid th,
.report-grid td {
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid rgba(21, 37, 31, 0.1);
  font-weight: 400;
  text-align: left;
  vertical-align: top;
}

.report-grid thead th {
  color: #536159;
  background: #eef0ea;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.report-grid .report-cell--amount,
.report-grid .report-cell--ratio {
  text-align: right;
  white-space: nowrap;
}

.report-grid .report-cell--date {
  white-space: nowrap;
}

.report-grid .report-cell--text {
  min-width: 8rem;
  overflow-wrap: anywhere;
}

/* The name column stays in view while the amounts scroll. */
.report-grid tbody th[scope="row"],
.report-grid thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
}

.report-grid tbody th[scope="row"] {
  max-width: 45vw;
  background: #fbfaf6;
}

.report-grid small {
  display: block;
  color: #637068;
  font-size: 0.78rem;
  font-weight: 400;
}

.report-row--group th {
  padding-top: 0.9rem;
  background: #f6f7f3;
  font-weight: 700;
}

.report-row--heading th,
.report-row--total th,
.report-row--total td {
  font-weight: 700;
}

.report-row--total th,
.report-row--total td {
  border-top: 1px solid rgba(21, 37, 31, 0.45);
}

.report-grid .report-indent-1 { padding-left: 1.5rem; }
.report-grid .report-indent-2 { padding-left: 2.4rem; }
.report-grid .report-indent-3 { padding-left: 3.3rem; }
.report-grid .report-indent-4 { padding-left: 4.2rem; }
.report-grid .report-indent-5 { padding-left: 5.1rem; }
.report-grid .report-indent-6 { padding-left: 6rem; }
.report-grid .report-indent-7 { padding-left: 6.9rem; }

.report-notes {
  margin: 1.25rem 0 0;
  padding: 0;
  color: #637068;
  font-size: 0.82rem;
  line-height: 1.7;
  list-style: none;
}

.report-pagination {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  margin-top: 1.25rem;
}

.report-pagination a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  font-weight: 700;
}

.report-pagination span {
  color: #637068;
  font-size: 0.9rem;
}

.report-shell a:focus-visible,
.report-shell .report-scroll:focus-visible,
.report-filters :focus-visible {
  outline: 2px solid #173f32;
  outline-offset: 3px;
}

.activity-filters {
  margin-top: 1.5rem;
}

.activity-list li > div {
  display: grid;
  gap: 0.2rem;
  align-content: start;
  min-width: 0;
  overflow-wrap: anywhere;
}

.activity-list small {
  color: #637068;
  font-size: 0.85rem;
}

.activity-when {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 42rem) {
  .report-shell {
    width: calc(100% - 2rem);
    padding-top: 2rem;
  }

  .report-shell .page-heading {
    flex-direction: column;
    gap: 0.5rem;
  }

  .report-tabs,
  .report-subtabs,
  .report-entities {
    gap: 0 1.1rem;
    font-size: 0.92rem;
  }

  .report-filters label {
    flex: 1 1 9rem;
  }

  .report-card {
    padding: 1rem 0.75rem;
  }

  .report-grid {
    font-size: 0.82rem;
  }

  .report-grid th,
  .report-grid td {
    padding: 0.45rem;
  }

  .report-grid .report-indent-1 { padding-left: 1rem; }
  .report-grid .report-indent-2 { padding-left: 1.5rem; }
  .report-grid .report-indent-3 { padding-left: 2rem; }
  .report-grid .report-indent-4 { padding-left: 2.5rem; }
  .report-grid .report-indent-5 { padding-left: 3rem; }
  .report-grid .report-indent-6 { padding-left: 3.5rem; }
  .report-grid .report-indent-7 { padding-left: 4rem; }

  .activity-list li {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .activity-when {
    text-align: left;
  }
}

.report-card > h2,
.report-card .page-heading h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.5;
}

.report-card .page-heading {
  align-items: center;
}

.evidence-grid small,
.evidence-journals small {
  color: #637068;
  font-size: 0.85rem;
}

.evidence-original {
  display: block;
  width: 100%;
  height: min(80vh, 60rem);
  margin-top: 1rem;
  border: 1px solid rgba(21, 37, 31, 0.14);
  border-radius: 0.55rem;
  background: #fff;
}

.evidence-original--image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 80vh;
}

.evidence-journals {
  display: grid;
  gap: 0.6rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.evidence-journals li {
  display: grid;
  gap: 0.1rem;
  overflow-wrap: anywhere;
}

.evidence-retired {
  color: #9a3412;
}

.journal-card:target {
  outline: 2px solid #173f32;
  outline-offset: 3px;
}
