/* Tracking Report — align with Dashboard / 本波 sticky ops rail + zone panels */

.page-tracking-report .tr-shell {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 0;
  flex: 1 1 auto;
}

.tr-top.top-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.5rem;
  min-width: 0;
}

.tr-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.5rem;
  min-width: 0;
}

.tr-mode,
.tr-day-nav,
.tr-chase,
.tr-grain {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.tr-day-nav.is-dim {
  opacity: 0.45;
  pointer-events: none;
}

.tr-day {
  font: inherit;
}

.tr-mode-btn.is-on,
.tr-chase-btn[aria-pressed="true"],
.tr-grain-btn.is-on {
  border-color: var(--board-accent, var(--accent));
  color: var(--board-ink, var(--ink));
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.tr-empty {
  padding: 1.25rem 0.35rem;
  font-size: var(--fs-meta, 0.85rem);
  line-height: 1.45;
}

.tr-main {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 0;
  flex: 1 1 auto;
}

.tr-kpi.dashboard-top-totals {
  opacity: 0.78;
  padding: 0.1rem 0.05rem;
}

.tr-kpi .tr-kpi-item {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  white-space: nowrap;
}

.tr-kpi .tr-kpi-item + .tr-kpi-item::before {
  content: "·";
  margin-right: 0.35rem;
  opacity: 0.45;
}

.tr-kpi .tr-kpi-lab {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  opacity: 0.88;
}

.tr-kpi .tr-kpi-val {
  font-size: 0.68rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.tr-day-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "ibd gr";
  gap: 0.55rem;
  min-height: 0;
  flex: 1 1 auto;
}

@media (max-width: 960px) {
  .tr-day-view {
    grid-template-columns: 1fr;
    grid-template-areas:
      "ibd"
      "gr";
  }
}

.tr-panel.dashboard-zone--ibd {
  grid-area: ibd;
}

.tr-panel.dashboard-zone--gr {
  grid-area: gr;
}

.tr-panel.dashboard-zone {
  display: flex;
  flex-direction: column;
  min-height: 12rem;
  min-width: 0;
  margin: 0;
}

.tr-panel-head.dashboard-zone-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  margin-bottom: 0.35rem;
}

.tr-panel-head .tr-day-ch-chips {
  margin-left: auto;
  justify-content: flex-end;
  max-width: 100%;
}

.tr-table-wrap {
  max-height: min(48vh, 28rem);
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.tr-footnote {
  margin: 0.4rem 0 0;
}

.tr-wide-view {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 0;
  flex: 1 1 auto;
}

.tr-wide-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.tr-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--fs-meta, 0.85rem);
}

.tr-wide-wrap {
  max-height: min(62vh, 36rem);
}

/* 日轴 dock：贴底 · IBD/GR 双色柱 · 跨月分隔 · 无「日轴」标题 */
.tr-day-dock.tr-timeline {
  margin-top: auto;
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 5;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 0.55rem 0.75rem;
  padding: 0.4rem 0.15rem 0.35rem;
  border-top: 1px solid var(--board-line, var(--line));
  background: color-mix(in srgb, var(--panel, var(--surface)) 92%, transparent);
  backdrop-filter: blur(6px);
  box-shadow: 0 -6px 18px color-mix(in srgb, #000 12%, transparent);
}

.tr-day-legend {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding-bottom: 0.85rem;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  user-select: none;
}

.tr-day-leg {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  white-space: nowrap;
  opacity: 0.85;
}

.tr-day-swatch {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 1px;
}

.tr-day-leg--ibd .tr-day-swatch {
  background: var(--board-ibd, var(--accent, #5b8def));
}

.tr-day-leg--gr .tr-day-swatch {
  background: var(--board-gr, var(--ok, #3aa676));
}

.tr-bars {
  display: flex;
  gap: 0.12rem;
  align-items: flex-end;
  overflow-x: auto;
  min-height: 4.1rem;
  padding: 0.05rem 0.1rem 0.05rem;
  scrollbar-width: thin;
}

.tr-bar {
  flex: 0 0 auto;
  width: 1.28rem;
  display: grid;
  grid-template-rows: 0.85rem 2.55rem auto;
  justify-items: center;
  align-items: end;
  gap: 0.12rem;
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  border-radius: 3px;
}

.tr-bar.is-month-start {
  margin-left: 0.35rem;
  padding-left: 0.35rem;
  border-left: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
}

.tr-bar-month {
  font-size: 0.52rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--muted);
  opacity: 0.8;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  align-self: start;
}

.tr-bar-month--gap {
  visibility: hidden;
}

.tr-bar:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tr-bar-stack {
  width: 100%;
  height: 2.55rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1px;
  border-radius: 2px 2px 1px 1px;
  background: color-mix(in srgb, var(--line) 22%, transparent);
  overflow: hidden;
  transition: box-shadow 0.16s ease;
}

.tr-bar-ibd,
.tr-bar-gr {
  width: 100%;
  min-height: 0;
}

.tr-bar-ibd {
  background: var(--board-ibd, var(--accent, #5b8def));
}

.tr-bar-gr {
  background: var(--board-gr, var(--ok, #3aa676));
}

.tr-bar:hover .tr-bar-stack {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}

.tr-bar.is-on .tr-bar-stack {
  box-shadow:
    inset 0 0 0 1.5px var(--accent),
    0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent);
}

.tr-bar.is-on .tr-bar-lab {
  color: var(--ink, var(--text));
  opacity: 1;
  font-weight: 650;
}

.tr-bar-lab {
  font-size: 0.58rem;
  line-height: 1;
  opacity: 0.62;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  min-height: 0.7rem;
}

.tr-toast.dashboard-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
}

.tr-shell.is-drag {
  outline: 2px dashed color-mix(in srgb, var(--accent) 55%, var(--line));
  outline-offset: -4px;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

@media (max-width: 720px) {
  .tr-day-dock.tr-timeline {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .tr-day-legend {
    flex-direction: row;
    padding-bottom: 0;
    gap: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tr-bar-stack,
  .tr-shell.is-drag {
    transition: none;
  }
}
