:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface2: #f5f2ec;
  --surface3: #ede8dd;
  --border: #eae5dc;
  --border2: #dcd6ca;
  --text: #2a2823;
  --text2: #6b6960;
  --text3: #a09e95;
  --red: #d64545;
  --red-bg: #fceeee;
  --red-text: #a62a2a;
  --amber: #c78a15;
  --amber-bg: #fcf3df;
  --amber-text: #7f5608;
  --green: #4e8a29;
  --green-bg: #edf5e1;
  --green-text: #366019;
  --blue: #2b5bde;
  --blue-bg: #e7effc;
  --blue-text: #174baf;
  --purple-bg: #efeafb;
  --purple-text: #5835a6;
  --orange-bg: #fcead9;
  --orange-text: #a24e0d;
  --teal-bg: #def1ec;
  --teal-text: #16615a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(30, 25, 15, 0.04), 0 2px 8px rgba(30, 25, 15, 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

html,
body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.72), transparent 42%), var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  animation: fade-rise 0.45s ease;
}

.hidden {
  display: none !important;
}

@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-left {
  font-size: 12px;
  color: var(--text2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.toolbar-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 12px rgba(78, 138, 41, 0.28);
}

.toolbar-status {
  font-size: 12px;
  color: var(--text3);
}

.btn {
  font-family: inherit;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 500;
  transition: 0.16s ease;
}

.btn:hover {
  background: var(--surface2);
  border-color: #b3a98f;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--text);
  color: #faf7f2;
  border-color: var(--text);
}

.btn.primary:hover {
  background: #000;
}

.btn.copied {
  background: var(--green-text);
  border-color: var(--green-text);
  color: #fff;
}

.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.h-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Noto Serif SC", serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.h-sub {
  font-size: 13px;
  color: var(--text2);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tag-soft {
  background: var(--surface2);
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--text2);
}

.h-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text2);
}

.mitem {
  display: flex;
  align-items: center;
  gap: 5px;
}

.mitem strong {
  color: var(--text);
  font-weight: 700;
}

.mitem.alert {
  color: var(--red-text);
}

.mitem.warn {
  color: var(--amber-text);
}

.mitem.ok {
  color: var(--green-text);
}

.sync-banner {
  border-radius: var(--radius);
  padding: 13px 16px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sync-banner.ok {
  background: linear-gradient(135deg, #f2f8ea 0%, #edf5e1 100%);
  border-color: #cfe4b7;
}

.sync-banner.warn {
  background: linear-gradient(135deg, #fdf6e3 0%, #faedcc 100%);
  border-color: #e8d08a;
}

.sync-banner.error {
  background: linear-gradient(135deg, #fff0ef 0%, #fceeee 100%);
  border-color: #efb4b4;
}

.sync-copy {
  flex: 1;
  min-width: 260px;
}

.sync-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.sync-text {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.7;
  white-space: pre-wrap;
}

.sync-meta {
  font-size: 12px;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sync-meta a {
  color: var(--blue-text);
  text-decoration: none;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.stat-jump {
  width: 100%;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.stat-jump:hover {
  transform: translateY(-2px);
  border-color: #d5c7ad;
}

.stat-jump:focus-visible {
  outline: none;
  border-color: rgba(43, 91, 222, 0.45);
  box-shadow: 0 0 0 3px rgba(43, 91, 222, 0.14), var(--shadow);
}

.stat-jump.active {
  border-width: 2px;
  transform: translateY(-2px);
  background: var(--surface2);
}
.stat-jump.active[data-jump-kind="inProgress"] {
  border-color: var(--blue);
  box-shadow: 0 4px 12px rgba(43, 91, 222, 0.2);
}
.stat-jump.active[data-jump-kind="needsDecision"] {
  border-color: var(--red);
  box-shadow: 0 4px 12px rgba(214, 69, 69, 0.2);
}
.stat-jump.active[data-jump-kind="dueSoon"] {
  border-color: var(--amber);
  box-shadow: 0 4px 12px rgba(199, 138, 21, 0.2);
}
.stat-jump.active[data-jump-kind="completed"] {
  border-color: var(--green);
  box-shadow: 0 4px 12px rgba(78, 138, 41, 0.2);
}

.stat-num {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.1;
}

.stat-label {
  font-size: 13px;
  color: var(--text2);
  margin-top: 4px;
  font-weight: 500;
}

.stat-trend {
  font-size: 12px;
  margin-top: 6px;
}

.stat-trend.neutral {
  color: var(--text3);
}

.stat-trend.up-red {
  color: var(--red-text);
}

.stat-trend.warn {
  color: var(--amber-text);
}

.stat-trend.up-green {
  color: var(--green-text);
}

.track-panel,
.req-panel,
.panel,
.copy-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  overflow: hidden;
}

.jump-target {
  scroll-margin-top: 24px;
  animation: jumpTargetPulse 1.6s ease;
}

@keyframes jumpTargetPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(43, 91, 222, 0);
  }
  20% {
    box-shadow: 0 0 0 4px rgba(43, 91, 222, 0.16);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(43, 91, 222, 0);
  }
}

.track-head,
.req-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.track-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.track-title,
.req-title,
.panel-title,
.copy-title {
  font-size: 14px;
  font-weight: 700;
}

.track-sub,
.req-sub,
.panel-title .sub,
.copy-title-sub {
  font-size: 12px;
  color: var(--text3);
  font-weight: 400;
}

.prio-filter {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
  flex-wrap: wrap;
}

.prio-filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s ease;
}

.prio-filter-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(30, 25, 15, 0.1);
}

.prio-filter-btn.active {
  box-shadow: 0 0 0 3px rgba(42, 40, 35, 0.12);
}
.prio-filter-btn.active[data-priority="all"] {
  border-color: var(--text);
}
.prio-filter-btn.active[data-priority="p0"] {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.15);
}
.prio-filter-btn.active[data-priority="p1"] {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(199, 138, 21, 0.15);
}
.prio-filter-btn.active[data-priority="p2"] {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(43, 91, 222, 0.15);
}
.prio-filter-btn.active[data-priority="p3"] {
  border-color: #b3a98f;
  box-shadow: 0 0 0 3px rgba(179, 169, 143, 0.2);
}

.prio-filter-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.prio-filter-color.all {
  background: linear-gradient(135deg, var(--red) 0%, var(--amber) 33%, var(--blue) 66%, #b3a98f 100%);
}

.prio-filter-color.p0 {
  background: var(--red);
}

.prio-filter-color.p1 {
  background: var(--amber);
}

.prio-filter-color.p2 {
  background: var(--blue);
}

.prio-filter-color.p3 {
  background: #b3a98f;
}

.prio-filter-label {
  font-weight: 600;
}

.track-body {
  border-top: 1px solid var(--border);
}

.schedule-rows {
  display: flex;
  flex-direction: column;
}

.schedule-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  border-bottom: 1px solid var(--border);
  min-height: 72px;
}

.schedule-row:last-child {
  border-bottom: none;
}

.schedule-label {
  background: var(--surface2);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border-right: 1px solid var(--border);
}

.schedule-label-name {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}

.schedule-label-count {
  font-size: 11px;
  color: var(--text3);
  font-weight: 600;
}

.schedule-track {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x proximity;
}

.schedule-track::-webkit-scrollbar {
  height: 6px;
}

.schedule-track::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px;
}

.schedule-card {
  flex-shrink: 0;
  width: 220px;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(42, 40, 35, 0.1);
  scroll-snap-align: start;
}

.schedule-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 25, 15, 0.15);
  border-color: rgba(42, 40, 35, 0.2);
}

.schedule-card.p3 {
  opacity: 0.7;
}

.schedule-card-header {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 8px;
}

.schedule-card-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.schedule-card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  min-width: 0;
  flex: 1;
}

.schedule-card-status {
  flex-shrink: 0;
  max-width: 72px;
  padding: 1px 6px;
  border: 1px solid rgba(42, 40, 35, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--text2);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-card.p3 .schedule-card-title {
  text-decoration: line-through;
  color: var(--text2);
}

.schedule-card-meta {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text2);
}

.schedule-card-owner {
  background: rgba(255, 255, 255, 0.6);
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 500;
  border: 1px solid rgba(42, 40, 35, 0.1);
}

.schedule-card-date {
  font-variant-numeric: tabular-nums;
}

.schedule-card-alert {
  margin-top: 6px;
  font-size: 11px;
  color: var(--red-text);
  font-weight: 600;
  padding: 3px 6px;
  background: var(--red-bg);
  border-radius: 4px;
}

.decision-panel {
  background: var(--surface);
  border: 2px dashed var(--amber);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  overflow: hidden;
}

.decision-head {
  padding: 16px 20px 12px;
  background: var(--amber-bg);
  border-bottom: 1px solid var(--amber);
}

.decision-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--amber-text);
}

.decision-sub {
  font-size: 12px;
  color: var(--text2);
  margin-left: 8px;
}

.decision-body {
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.decision-card {
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid rgba(42, 40, 35, 0.15);
}

.decision-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 25, 15, 0.15);
  border-color: var(--amber);
}

.decision-card-dept {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.decision-card-header {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 8px;
}

.decision-card-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.decision-card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  min-width: 0;
  flex: 1;
}

.decision-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--text2);
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.decision-card-owner {
  background: rgba(255, 255, 255, 0.6);
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 500;
  border: 1px solid rgba(42, 40, 35, 0.1);
}

.decision-card-date {
  font-variant-numeric: tabular-nums;
}

.decision-card-alert {
  font-size: 11px;
  color: var(--red-text);
  font-weight: 600;
  padding: 3px 6px;
  background: var(--red-bg);
  border-radius: 4px;
  margin-bottom: 6px;
  display: inline-block;
}

.decision-card-note {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.5;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.due-progress {
  position: relative;
  height: 18px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.04);
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  display: block;
}

.due-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  transition: width 0.4s ease;
}

.due-progress[data-kind="overdue"] .due-progress-fill {
  background: rgba(214, 69, 69, 0.85);
}

.due-progress[data-kind="today"] .due-progress-fill {
  background: rgba(214, 69, 69, 0.6);
}

.due-progress[data-kind="tomorrow"] .due-progress-fill {
  background: rgba(199, 138, 21, 0.6);
}

.due-progress[data-kind="soon"] .due-progress-fill {
  background: rgba(218, 188, 51, 0.6);
}

.due-progress[data-kind="future"] .due-progress-fill {
  background: rgba(120, 144, 156, 0.45);
}

.due-progress-text {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 8px;
  white-space: nowrap;
  color: var(--red-text);
  z-index: 1;
}

.due-progress[data-kind="tomorrow"] .due-progress-text,
.due-progress[data-kind="soon"] .due-progress-text {
  color: var(--amber-text);
}

.due-progress[data-kind="future"] .due-progress-text {
  color: var(--text2);
}

.prio-legend,
.req-legend {
  display: flex;
  gap: 14px;
  padding: 0 20px 12px;
  font-size: 12px;
  color: var(--text2);
  flex-wrap: wrap;
  align-items: center;
}

.plg,
.rlg {
  display: flex;
  align-items: center;
  gap: 5px;
}

.plg-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.plg-dot.p0 {
  background: var(--red);
}

.plg-dot.p1 {
  background: var(--amber);
}

.plg-dot.p2 {
  background: var(--blue);
}

.plg-dot.p3 {
  background: #b3a98f;
}

.plg-hint {
  color: var(--text3);
  margin-left: auto;
}

.rlg-pill,
.dept-tag {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.pill-boss {
  background: #fff1de;
  color: #8c5a0a;
  border: 1px solid #f2d6a2;
}

.pill-cross {
  background: var(--blue-bg);
  color: var(--blue-text);
  border: 1px solid #bbd0f0;
}

.pill-help {
  background: var(--teal-bg);
  color: var(--teal-text);
  border: 1px solid #afd6c9;
}

.track-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  border-bottom: 1px solid var(--border);
  min-height: 82px;
}

.track-row:last-child {
  border-bottom: none;
}

.track-label {
  background: var(--surface2);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  border-right: 1px solid var(--border);
}

.track-label-name {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}

.track-label-sub {
  font-size: 11px;
  color: var(--text3);
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.cnt {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--text2);
}

.track-scroll {
  overflow-x: auto;
  padding: 12px 14px;
}

.track-scroll::-webkit-scrollbar {
  height: 8px;
}

.track-scroll::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px;
}

.track-cards {
  display: flex;
  gap: 10px;
  min-width: min-content;
}

.tcard {
  flex-shrink: 0;
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  position: relative;
  border-left-width: 4px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.tcard:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 25, 15, 0.1);
}

.tcard.p0 {
  border-left-color: var(--red);
  background: var(--red-bg);
}

.tcard.p1 {
  border-left-color: var(--amber);
  background: var(--amber-bg);
}

.tcard.p2 {
  border-left-color: var(--blue);
  background: var(--blue-bg);
}

.tcard.p3 {
  border-left-color: #b3a98f;
  background: var(--surface2);
  opacity: 0.9;
}

.tcard-prio {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  margin-bottom: 6px;
  color: #fff;
}

.tcard.p0 .tcard-prio {
  background: var(--red);
}

.tcard.p1 .tcard-prio {
  background: var(--amber);
}

.tcard.p2 .tcard-prio {
  background: var(--blue);
}

.tcard.p3 .tcard-prio {
  background: #b3a98f;
}

.tcard-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  display: flex;
  gap: 5px;
  align-items: flex-start;
}

.tcard.p3 .tcard-title {
  text-decoration: line-through;
  color: var(--text2);
}

.tcard-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--text2);
  margin-bottom: 6px;
}

.tcard-progress-label {
  letter-spacing: 0.02em;
}

.tcard-progress-value {
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.tcard-progress-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(42, 40, 35, 0.1);
  overflow: hidden;
  margin-bottom: 8px;
}

.tcard-progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: rgba(42, 40, 35, 0.48);
}

.tcard-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  gap: 6px;
  flex-wrap: wrap;
}

.tcard-owner {
  background: rgba(255, 255, 255, 0.65);
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 500;
  color: var(--text2);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.tcard-date {
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 3px;
  font-variant-numeric: tabular-nums;
  flex: 1;
  justify-content: flex-end;
  text-align: right;
}

.tcard-date.alert {
  color: var(--red-text);
  font-weight: 600;
}

.tcard-empty,
.empty-row {
  padding: 18px 14px;
  font-size: 12px;
  color: var(--text3);
  font-style: italic;
}

.req-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.req-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

.req-scroll::-webkit-scrollbar {
  height: 8px;
}

.req-scroll::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px;
}

.req-table th {
  background: var(--surface2);
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.req-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.req-table tbody tr:last-child td {
  border-bottom: none;
}

.req-table tbody tr:hover {
  background: var(--surface2);
}

.req-dept-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  white-space: nowrap;
}

.req-detail {
  color: var(--text);
  line-height: 1.55;
}

.req-from {
  font-size: 12px;
  color: var(--text2);
  display: inline-block;
  background: var(--surface2);
  padding: 1px 8px;
  border-radius: 10px;
  margin-right: 4px;
}

.req-status {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.status-urgent {
  background: var(--red-bg);
  color: var(--red-text);
}

.status-waiting {
  background: var(--amber-bg);
  color: var(--amber-text);
}

.status-normal {
  background: var(--surface2);
  color: var(--text2);
}

.panel,
.copy-panel {
  padding: 18px 20px;
}

.panel-title,
.copy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 40px;
  gap: 10px;
  align-items: center;
  padding: 5px 0;
}

.bar-label {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.bar-track {
  background: var(--surface2);
  height: 16px;
  border-radius: 10px;
  position: relative;
}

.bar-fill {
  height: 100%;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.bar-busy-tag {
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  background: var(--red-bg);
  color: var(--red-text);
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.bar-count {
  font-size: 13px;
  color: var(--text2);
  font-weight: 600;
  text-align: right;
}

.bar-hint {
  font-size: 12px;
  color: var(--amber-text);
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--amber-bg);
  border-radius: 6px;
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.member {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  transition: 0.16s ease;
}

.member:hover {
  border-color: #b3a98f;
  background: var(--surface);
}

.mem-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.mem-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.mem-dept {
  font-size: 11px;
  color: var(--text3);
  margin: 1px 0 2px;
}

.mem-status {
  font-size: 11.5px;
  color: var(--text2);
}

.copy-body {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
}

.copy-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  gap: 8px;
}

.dept-zcb {
  background: var(--purple-bg);
  color: var(--purple-text);
}

.dept-bjb {
  background: var(--teal-bg);
  color: var(--teal-text);
}

.dept-swb {
  background: var(--orange-bg);
  color: var(--orange-text);
}

.dept-yyb {
  background: var(--amber-bg);
  color: var(--amber-text);
}

.dept-jsb {
  background: var(--blue-bg);
  color: var(--blue-text);
}

.dept-rsxz {
  background: var(--red-bg);
  color: var(--red-text);
}

.dept-cwb {
  background: var(--surface3);
  color: var(--text2);
}

.dept-sbp {
  background: var(--green-bg);
  color: var(--green-text);
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 12, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-mask.show {
  display: flex;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 24px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text3);
  padding: 0 4px;
}

.modal-row {
  display: flex;
  padding: 7px 0;
  font-size: 13px;
  gap: 10px;
}

.modal-row + .modal-row {
  border-top: 1px solid var(--border);
}

.modal-row .k {
  color: var(--text3);
  min-width: 84px;
}

.modal-row .v {
  color: var(--text);
  flex: 1;
  word-break: break-word;
}

.modal-row .v a {
  color: var(--blue-text);
  text-decoration: none;
}

@media (max-width: 960px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .track-row {
    grid-template-columns: 100px 1fr;
  }

  .schedule-row {
    grid-template-columns: 130px 1fr;
  }

  .decision-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .page {
    padding: 16px 12px 32px;
  }

  .toolbar,
  .header,
  .sync-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .toolbar,
  .header,
  .sync-banner,
  .track-head,
  .req-head,
  .panel,
  .copy-panel {
    gap: 12px;
  }

  .toolbar {
    padding: 12px;
  }

  .toolbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .h-title {
    font-size: 20px;
    line-height: 1.3;
    flex-wrap: wrap;
  }

  .h-meta {
    width: 100%;
    gap: 8px;
  }

  .mitem {
    flex-wrap: wrap;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .stat {
    padding: 14px 16px;
  }

  .track-head-left {
    align-items: flex-start;
    flex-direction: column;
  }

  .prio-legend,
  .req-legend {
    padding-left: 14px;
    padding-right: 14px;
    gap: 8px;
  }

  .plg-hint {
    width: 100%;
    margin-left: 0;
  }

  .prio-filter {
    padding: 10px 14px;
    gap: 6px;
  }

  .prio-filter-btn {
    padding: 5px 10px;
    font-size: 12px;
  }

  .prio-filter-color {
    width: 18px;
    height: 18px;
  }

  .track-row {
    grid-template-columns: 1fr;
  }

  .schedule-row {
    grid-template-columns: 1fr;
  }

  .schedule-label {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 10px 12px;
  }

  .schedule-track {
    padding: 10px 12px;
  }

  .schedule-card {
    width: 200px;
  }

  .decision-head {
    padding: 14px 14px 10px;
  }

  .decision-body {
    padding: 14px;
  }

  .track-scroll {
    padding: 10px 12px 12px;
  }

  .tcard {
    width: 250px;
    min-width: 250px;
  }

  .req-scroll {
    width: 100%;
  }

  .req-table {
    min-width: 760px;
  }

  .panel,
  .copy-panel {
    padding: 16px 14px;
  }

  .bar-row {
    grid-template-columns: 90px 1fr 34px;
  }

  .bar-hint {
    align-items: flex-start;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .member {
    padding: 10px 12px;
  }

  .copy-actions {
    justify-content: stretch;
  }

  .copy-actions .btn {
    width: 100%;
  }

  .modal-mask {
    padding: 12px;
  }

  .modal {
    padding: 18px 16px;
    max-height: min(84vh, 720px);
    overflow-y: auto;
  }

  .modal-row {
    flex-direction: column;
    gap: 4px;
  }

  .modal-row .k {
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .toolbar-right {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-right .btn,
  .toolbar-status {
    width: 100%;
  }

  .sync-meta {
    width: 100%;
    gap: 6px;
    flex-direction: column;
    align-items: flex-start;
  }

  .h-sub,
  .h-meta {
    font-size: 12px;
  }

  .req-head,
  .track-head {
    padding: 14px 14px 10px;
  }

  .req-table th,
  .req-table td {
    padding-left: 10px;
    padding-right: 10px;
  }

  .bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .bar-count {
    text-align: left;
  }

  .bar-busy-tag {
    right: 8px;
  }
}
