:root {
  --tracker-line: #dce5e3;
}
.tracker-page {
  min-height: 75vh;
}
.tracker-title-row {
  align-items: flex-start;
}
.tracker-title-row .subtitle {
  max-width: 770px;
  font-size: 13px;
  line-height: 1.65;
}
.tracker-title-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: none;
}
.tracker-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 22px;
}
.tracker-stat {
  padding: 20px 18px;
  min-width: 0;
}
.tracker-stat small {
  display: block;
  font-size: 10px;
  color: #6b808b;
  font-weight: 700;
  letter-spacing: 0.7px;
  line-height: 1.4;
}
.tracker-stat strong {
  display: block;
  font-size: 29px;
  letter-spacing: -0.8px;
  line-height: 1.1;
  color: #204551;
  margin: 12px 0 9px;
}
.tracker-stat span {
  font-size: 11px;
  color: #73848d;
  line-height: 1.5;
}
.tracker-ledger {
  min-width: 0;
  overflow: hidden;
}
.tracker-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 15px;
}
.tracker-section-heading h2 {
  font-size: 19px;
  line-height: 1.2;
  margin: 0 0 7px;
}
.tracker-section-heading p:not(.eyebrow) {
  color: #73858d;
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
  max-width: 525px;
}
.tracker-count {
  font-size: 11px;
  color: #53717b;
  border: 1px solid #ccdcda;
  padding: 6px 10px;
  border-radius: 5px;
  white-space: nowrap;
  background: #f5f8f7;
}
.tracker-filters {
  display: grid;
  grid-template-columns: 1.3fr 0.95fr 0.95fr 1.05fr;
  gap: 10px;
  align-items: end;
  padding: 14px 22px 18px;
  border-bottom: 1px solid var(--tracker-line);
}
.tracker-filters label {
  font-size: 11px;
  color: #607782;
  line-height: 1.5;
  margin: 0;
}
.tracker-filters input,
.tracker-filters select {
  font-size: 12px;
  padding: 10px;
  width: 100%;
  min-height: 44px;
  min-width: 0;
  margin-top: 7px;
}
.tracker-filters input::placeholder {
  color: #8fa1a7;
}
.tracker-table tbody td {
  padding: 13px 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  vertical-align: middle;
}
.tracker-row {
  cursor: pointer;
}
.tracker-activity-button {
  border: 0;
  background: transparent;
  display: block;
  text-align: left;
  color: #234b59;
  padding: 0;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.45;
  width: 100%;
  min-height: 44px;
}
.tracker-activity-button:focus-visible {
  outline: 3px solid #b76f4d;
}
.tracker-activity-button small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: #758993;
  margin-top: 5px;
}
.tracker-empty {
  padding: 28px 20px;
  text-align: center;
  font-size: 12px;
  color: #647781;
}
.tracker-list-footer {
  padding: 14px 22px;
  background: #f9faf9;
  border-top: 1px solid #e4e9e8;
  color: #72838b;
  line-height: 1.5;
  font-size: 11px;
}
.tracker-work-queue {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  margin-top: 17px;
}
.tracker-work-queue h2 {
  font-size: 17px;
  margin: 0 0 8px;
}
.tracker-work-queue .hint {
  font-size: 12px;
  margin: 0;
}
.tracker-work-queue .outline-link {
  flex: none;
}
.tracker-page [hidden] {
  display: none !important;
}
@media (max-width: 1050px) {
  .tracker-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tracker-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 780px) {
  .tracker-stat-grid {
    gap: 9px;
  }
  .tracker-title-row {
    flex-wrap: wrap;
  }
  .tracker-title-links {
    justify-content: flex-start;
  }
}
@media (max-width: 600px) {
  .tracker-stat {
    padding: 13px 14px;
  }
  .tracker-stat strong {
    font-size: 25px;
    margin: 8px 0 6px;
  }
  .tracker-stat small {
    font-size: 9px;
  }
  .tracker-stat span {
    font-size: 10px;
  }
  .tracker-filters {
    padding: 13px 14px;
    gap: 11px;
  }
  .tracker-section-heading {
    padding: 16px 14px;
    gap: 9px;
    align-items: start;
  }
  .tracker-section-heading h2 {
    font-size: 17px;
  }
  .tracker-list-footer {
    padding: 13px 14px;
  }
  .tracker-work-queue {
    padding: 16px;
    align-items: stretch;
    flex-direction: column;
  }
  .tracker-work-queue .outline-link {
    align-self: flex-start;
  }
}
@media (max-width: 360px) {
  .tracker-filters {
    grid-template-columns: 1fr;
  }
  .tracker-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* V2: full-width ledger; only the ledger scrolls horizontally. */
.tracker-main {
  display: block;
}
.tracker-ledger {
  width: 100%;
}
.tracker-table-scroll {
  position: relative;
  max-height: 68vh;
  overflow: auto;
  isolation: isolate;
}
.tracker-table {
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 0;
}
.tracker-table thead th {
  width: auto;
  padding: 8px;
  letter-spacing: 0;
  text-transform: none;
  border-right: 1px solid #dce5e3;
}
.tracker-table thead th {
  position: sticky;
  top: 0;
  height: 45px;
  z-index: 3;
  background: #e8f0ed;
}
.tracker-table thead tr:nth-child(2) th {
  top: 45px;
  background: #f7f9f8;
}
.tracker-table th button {
  background: transparent;
  border: 0;
  color: #234b59;
  text-align: left;
  font-size: 11px;
  min-height: 28px;
  cursor: pointer;
  white-space: normal;
}
.tracker-table th .column-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 22px;
  padding: 1px;
  cursor: col-resize;
  touch-action: none;
  background: #dde9e5;
}
.tracker-table .pinned {
  position: sticky;
  background: #f5f9f7;
  z-index: 2;
  box-shadow: 1px 0 #b9ccc5;
}
.tracker-table thead .pinned {
  z-index: 5;
}
.tracker-table td {
  border-right: 1px solid #e2e9e5;
  font-size: 12px;
  background: white;
  overflow-wrap: anywhere;
}
.tracker-table tbody tr:hover td {
  background: #eaf3f0;
}
.tracker-activity-button {
  text-decoration: none;
  display: block;
}
.tracker-columns {
  display: flex;
  gap: 8px;
  padding: 12px 22px;
  flex-wrap: wrap;
  align-items: flex-start;
  border-bottom: 1px solid #dce5e3;
}
.tracker-columns details {
  border: 1px solid #ccdcd5;
  border-radius: 5px;
  padding: 8px;
  background: #f5f9f7;
  max-width: 290px;
}
.tracker-columns summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  min-height: 28px;
}
.tracker-columns label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding: 5px 0;
}
.tracker-columns input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
}
.tracker-columns button,
.tracker-column-menu button {
  padding: 8px;
  border: 1px solid #c7d9d0;
  border-radius: 4px;
  background: white;
  color: #234b59;
  cursor: pointer;
  font-size: 12px;
}
.tracker-column-menu {
  position: fixed;
  z-index: 20;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  box-shadow: 0 8px 40px #183f5260;
  border: 1px solid #9cb5a9;
  border-radius: 8px;
  padding: 20px;
  display: grid;
  gap: 10px;
  width: min(320px, 90vw);
}
.tracker-column-menu label {
  display: grid;
  gap: 6px;
}
.tracker-column-menu input {
  width: 100%;
}
#tracker-layout-status {
  font-size: 11px;
  color: #557566;
  padding: 0 22px;
}
.tracker-page :focus-visible {
  outline: 3px solid #b76f4d;
  outline-offset: 2px;
}
@media (max-width: 600px) {
  .tracker-columns {
    padding: 12px 14px;
  }
  .tracker-columns details {
    max-width: 100%;
  }
}
.tracker-title-links {
  max-width: 100%;
  flex-shrink: 1;
}
.tracker-table thead tr:first-child th button {
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tracker-table tbody tr[data-highlight="true"] td {
  background: #eaf3f0;
}
/* High-density workspace: ledger owns horizontal overflow. */
main.wrap.tracker-page {
  max-width: none;
  width: 100%;
  padding: 12px 12px 24px;
}
.tracker-title-row {
  margin-bottom: 12px;
}
.tracker-title-row h1 {
  font-size: 25px;
}
.tracker-stat-grid {
  gap: 8px;
  margin: 8px 0 12px;
}
.tracker-stat {
  padding: 10px 12px;
}
.tracker-stat strong {
  font-size: 23px;
  margin: 5px 0;
}
.tracker-stat span {
  font-size: 10px;
}
.tracker-section-heading {
  padding: 12px 14px 8px;
}
.tracker-section-heading h2 {
  font-size: 17px;
}
.tracker-section-heading p:not(.eyebrow) {
  max-width: none;
}
.tracker-filters {
  padding: 8px 14px 10px;
  gap: 8px;
}
.tracker-filters input,
.tracker-filters select {
  min-height: 32px;
  margin-top: 3px;
  padding: 5px 8px;
}
.tracker-appearance {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 14px;
}
.tracker-appearance label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  margin: 0;
}
.tracker-appearance select {
  font-size: 12px;
  padding: 5px;
  min-height: 32px;
  width: auto;
}
.tracker-table-scroll {
  max-height: 72vh;
}
.tracker-table tbody td {
  height: 32px;
  padding: 3px 8px;
  line-height: 24px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}
.tracker-table .tracker-activity-button {
  min-height: 0;
  height: 24px;
  line-height: 24px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}
body[data-density="comfortable"] .tracker-table tbody td {
  height: 44px;
  padding: 9px 10px;
}
.tracker-table td[data-type="quantity"],
.tracker-table td[data-type="money"] {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.tracker-table thead th {
  height: 32px;
  padding: 2px 8px;
}
.tracker-table thead tr:nth-child(2) th {
  top: 32px;
}
.tracker-table th > button:not(.column-resize) {
  width: 100%;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 28px;
  padding: 2px 4px;
}
.tracker-table th .column-resize {
  inset: 0 0 0 auto;
  width: 7px;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  opacity: 0;
  cursor: col-resize;
  background: #6a8b8e;
  z-index: 1;
}
.tracker-table th:hover .column-resize,
.tracker-table .column-resize:focus-visible {
  opacity: 1;
}
.tracker-columns {
  position: fixed;
  z-index: 25;
  top: 18vh;
  left: 50%;
  transform: none;
  width: min(360px, calc(100vw - 24px));
  max-height: 75vh;
  overflow: auto;
  display: block;
  background: white;
  border: 1px solid #9cb5a9;
  border-radius: 6px;
  box-shadow: 0 8px 40px #183f5260;
  padding: 14px;
}
.tracker-columns strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}
.tracker-columns button {
  margin: 3px;
  min-height: 32px;
}
.group-navigation {
  display: flex;
  flex-wrap: wrap;
}
.group-checkboxes {
  padding: 6px 0;
}
.tracker-columns label {
  padding: 3px 0;
}
#tracker-layout-status {
  margin: 3px 0;
  padding: 0 14px;
  min-height: 14px;
}
.tracker-list-footer {
  padding: 8px 14px;
}
.tracker-work-queue {
  padding: 12px 14px;
  margin-top: 10px;
}
@media (max-width: 600px) {
  main.wrap.tracker-page {
    padding: 10px 8px 20px;
  }
  .tracker-appearance {
    justify-content: flex-start;
  }
  .tracker-table-scroll {
    max-height: 65vh;
  }
}
.tracker-table thead th {
  height: 34px;
}
.tracker-table thead tr:nth-child(2) th {
  top: 34px;
}
