:root {
  --ink: #17202a;
  --muted: #64707d;
  --line: #d9dee5;
  --panel: #ffffff;
  --bg: #f6f7f9;
  --gold: #aa8a55;
  --red: #c94343;
  --blue: #2d6cdf;
  --green: #2f8f64;
  --amber: #b7791f;
  --shadow: 0 10px 26px rgba(25, 35, 50, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  background: #20252c;
  color: #fff;
  padding: 24px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  display: grid;
  place-items: center;
  color: #dfc48d;
  font-weight: 700;
}

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

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.82);
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.main {
  min-width: 0;
  padding: 24px;
}

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

.eyebrow {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 4px 0 0;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: 0;
}

.subtle {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  min-height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
}

.button.primary {
  border-color: #1f2933;
  background: #1f2933;
  color: #fff;
}

.button.ghost {
  background: transparent;
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel-header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.panel-body {
  padding: 16px;
}

.task-list {
  display: grid;
  gap: 10px;
}

.task-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 12px;
  cursor: pointer;
}

.task-card.selected {
  border-color: #1f2933;
}

.task-strip {
  border-radius: 6px;
}

.task-strip.red,
.badge.red {
  background: var(--red);
}

.task-strip.blue,
.badge.blue {
  background: var(--blue);
}

.task-strip.green,
.badge.green {
  background: var(--green);
}

.task-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-name {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.badge {
  color: #fff;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.gray {
  background: #68717d;
}

.badge.amber {
  background: var(--amber);
}

.evidence {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.brief-preview {
  display: grid;
  gap: 12px;
}

.brief-screen {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.brief-screen h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.brief-screen p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.metric {
  padding: 16px;
}

.metric-value {
  font-size: 26px;
  font-weight: 700;
}

.metric-label {
  margin-top: 6px;
  color: var(--muted);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 12px 10px;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-size: 13px;
}

.empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #1f2933;
  color: #fff;
  padding: 12px 14px;
  border-radius: 6px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    padding: 16px;
  }

  .grid.two,
  .grid.four {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }
}
