:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --line: #dbe3ed;
  --line-soft: #edf2f7;
  --text: #182334;
  --muted: #68758a;
  --muted-2: #98a5b6;
  --nav: #132739;
  --nav-2: #0f2232;
  --teal: #0f8f88;
  --teal-2: #e8f7f4;
  --blue: #2563eb;
  --blue-2: #e9f1ff;
  --amber: #c88416;
  --amber-2: #fff5d8;
  --red: #d83a3a;
  --red-2: #ffeaea;
  --green: #0e9f6e;
  --green-2: #e6f7ef;
  --shadow: 0 14px 40px rgba(25, 38, 56, 0.08);
  --radius: 8px;
  --sidebar: 272px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  color: #eff6ff;
  background: linear-gradient(180deg, var(--nav) 0%, var(--nav-2) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 84px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(72, 211, 187, 0.45);
  border-radius: 8px;
  background: rgba(22, 156, 149, 0.18);
}

.brand-mark svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: #42d8c5;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand strong {
  display: block;
  font-size: 18px;
  line-height: 1.15;
  color: #ffffff;
}

.brand span {
  display: block;
  margin-top: 4px;
  color: #aab9c9;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 4px;
  padding: 18px 12px;
}

.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 12px;
  color: #dce8f2;
  text-align: left;
  border: 0;
  border-radius: 7px;
  background: transparent;
}

.nav-item:hover,
.nav-item.active {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(19, 143, 136, 0.95), rgba(17, 118, 139, 0.88));
}

.nav-icon,
[data-icon] {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: currentColor;
}

.nav-icon svg,
[data-icon] svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.count-dot,
.alert-dot {
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  color: #ffffff;
  border-radius: 999px;
  background: #f04438;
  font-size: 11px;
  font-weight: 700;
}

.collapse-button {
  height: 50px;
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 22px;
  color: #d6e2ee;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 760;
  line-height: 1.1;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted-2);
  font-size: 13px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.system-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  color: #234034;
  border: 1px solid #cceadd;
  border-radius: 7px;
  background: #f2fbf7;
  white-space: nowrap;
}

.live-dot,
.dot-text i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
}

.icon-button {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #344256;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.alert-dot {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 10px;
}

.user-menu {
  height: 42px;
  display: grid;
  grid-template-columns: 32px auto 16px;
  align-items: center;
  gap: 10px;
  padding: 0 8px 0 6px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
}

.user-menu:hover {
  border-color: var(--line);
  background: var(--surface);
}

.avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 50%;
  background: #344256;
  font-weight: 720;
}

.user-menu strong,
.user-menu small {
  display: block;
  text-align: left;
}

.user-menu strong {
  font-size: 13px;
}

.user-menu small {
  color: var(--muted);
  font-size: 11px;
}

.control-strip {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(180px, 240px) minmax(180px, 240px) 1fr;
  gap: 16px;
  align-items: end;
  padding: 18px 24px;
}

.control-strip label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

select {
  width: 100%;
  height: 42px;
  padding: 0 36px 0 12px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.strip-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.primary-button,
.secondary-button,
.danger-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.primary-button {
  color: #ffffff;
  border: 1px solid #0b7771;
  background: #0f8f88;
}

.primary-button:hover {
  background: #0c7e78;
}

.secondary-button {
  color: #2d3b4f;
  border: 1px solid var(--line);
  background: var(--surface);
}

.danger-button {
  color: #b42318;
  border: 1px solid #ffd0d0;
  background: #fff7f7;
}

.text-button {
  height: 32px;
  padding: 0;
  color: var(--blue);
  border: 0;
  background: transparent;
  font-weight: 650;
}

.compact {
  height: 34px;
  padding: 0 10px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.25fr);
  gap: 16px;
  padding: 0 24px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(20, 31, 47, 0.03);
}

.panel-heading {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.panel-heading h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.panel-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.goal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  padding: 16px;
}

.goal-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  overflow: hidden;
}

.goal-list li {
  display: grid;
  grid-template-columns: 20px minmax(160px, 1fr) 70px 64px;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line-soft);
}

.goal-list li:last-child {
  border-bottom: 0;
}

.goal-list strong {
  text-align: right;
  font-size: 13px;
}

.check-box {
  width: 15px;
  height: 15px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #9aacbd;
  border-radius: 3px;
}

.check-box.checked::before {
  content: "";
  width: 7px;
  height: 4px;
  border-left: 2px solid #53657a;
  border-bottom: 2px solid #53657a;
  transform: rotate(-45deg) translate(1px, -1px);
}

.status,
.priority,
.health {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.status.running {
  color: #08745a;
  background: var(--green-2);
}

.status.waiting {
  color: #1f64c8;
  background: var(--blue-2);
}

.status.review {
  color: #ad6800;
  background: var(--amber-2);
}

.ceo-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.ceo-card-title {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 8px;
  align-items: center;
}

dl {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  font-weight: 720;
}

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

.segmented {
  display: inline-flex;
  height: 32px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-muted);
}

.segmented button {
  height: 24px;
  padding: 0 10px;
  color: var(--muted);
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
}

.segmented button.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(20, 31, 47, 0.08);
}

.table-wrap {
  padding: 0 12px 12px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.task-panel table {
  min-width: 820px;
  table-layout: fixed;
}

.task-panel tbody tr {
  cursor: pointer;
}

.task-panel tbody tr:focus {
  outline: 2px solid #8cc7be;
  outline-offset: -2px;
}

.task-panel th:nth-child(1),
.task-panel td:nth-child(1) {
  width: 34%;
  white-space: normal;
  line-height: 1.3;
}

.task-panel th:nth-child(2),
.task-panel td:nth-child(2) {
  width: 18%;
}

.task-panel th:nth-child(3),
.task-panel td:nth-child(3),
.task-panel th:nth-child(4),
.task-panel td:nth-child(4),
.task-panel th:nth-child(5),
.task-panel td:nth-child(5),
.task-panel th:nth-child(6),
.task-panel td:nth-child(6) {
  width: 12%;
}

th,
td {
  min-height: 42px;
  padding: 0 10px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
}

th {
  color: #53657a;
  background: #f7f9fc;
  font-size: 12px;
  font-weight: 740;
}

td {
  font-size: 13px;
}

.priority.p0 {
  color: #b42318;
  background: var(--red-2);
}

.priority.p1 {
  color: #a15c00;
  background: var(--amber-2);
}

.priority.p2 {
  color: #08745a;
  background: var(--green-2);
}

.progress {
  width: 64px;
  height: 8px;
  border-radius: 999px;
  background: #e8eef5;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.progress.muted span {
  background: #cbd5e1;
}

.agent-panel,
.model-panel {
  grid-column: 1 / 2;
}

.review-panel,
.report-panel {
  grid-column: 2 / 3;
}

.agent-map {
  position: relative;
  padding: 18px 16px 20px;
  min-height: 250px;
  overflow: hidden;
}

.agent-node {
  width: 150px;
  min-height: 54px;
  display: grid;
  align-content: center;
  gap: 3px;
  margin: 0 auto;
  padding: 8px 10px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.agent-node[data-agent-id] {
  cursor: pointer;
}

.agent-node[data-agent-id]:focus {
  outline: 2px solid #8cc7be;
  outline-offset: 2px;
}

.agent-node strong {
  font-size: 13px;
}

.agent-node span {
  color: var(--muted);
  font-size: 11px;
}

.agent-node.root {
  border-color: #bbd8d4;
  box-shadow: var(--shadow);
}

.agent-node.active::after,
.agent-node.idle::after {
  content: "运行中";
  justify-self: center;
  margin-top: 3px;
  padding: 1px 6px;
  color: #08745a;
  border-radius: 999px;
  background: var(--green-2);
  font-size: 10px;
  font-weight: 700;
}

.agent-node.idle::after {
  content: "空闲中";
  color: #1f64c8;
  background: var(--blue-2);
}

.connector.vertical {
  width: 1px;
  height: 24px;
  margin: 0 auto;
  background: #9aacbd;
}

.agent-row {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.agent-row::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 70px;
  right: 70px;
  height: 1px;
  background: #b7c5d4;
}

.secondary-agents {
  margin-top: 22px;
}

.review-list {
  display: grid;
  padding: 0 12px 12px;
}

.review-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.review-list article:last-child {
  border-bottom: 0;
}

.review-list strong,
.review-list small {
  display: block;
}

.review-list strong {
  margin-top: 5px;
}

.review-list small {
  margin-top: 3px;
  color: var(--muted);
}

.review-actions {
  display: flex;
  gap: 8px;
}

.review-actions button {
  height: 32px;
  min-width: 52px;
  color: #344256;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 650;
}

.review-actions .approve {
  color: var(--blue);
  border-color: #b8cffc;
  background: #f7fbff;
}

.compact-table table {
  min-width: 560px;
}

.dot-text {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #08745a;
  font-weight: 650;
}

.dot-text.muted {
  color: var(--amber);
}

.dot-text.muted i {
  background: var(--amber);
}

.health.excellent {
  color: #08745a;
  background: var(--green-2);
}

.health.good {
  color: #1f64c8;
  background: var(--blue-2);
}

.health.normal {
  color: #a15c00;
  background: var(--amber-2);
}

.health.warn {
  color: #b42318;
  background: var(--red-2);
}

.review-list article.empty-state {
  grid-template-columns: 1fr;
  color: var(--muted);
}

.report-panel {
  grid-column: 2 / 3;
}

.report-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
  padding: 14px;
}

.metrics div {
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface);
}

.metrics span,
.metrics small {
  display: block;
}

.metrics span {
  color: var(--muted);
  font-size: 12px;
}

.metrics strong {
  display: block;
  margin-top: 6px;
  font-size: 25px;
  line-height: 1.15;
}

.metrics small {
  margin-top: 8px;
  color: #08745a;
  font-size: 12px;
}

.report-bottom {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 12px;
  padding: 0 14px 14px;
}

.report-bottom > div {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.report-bottom h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.report-bottom ul,
.report-bottom ol {
  margin: 0;
  padding-left: 18px;
  color: #334155;
}

.report-bottom li + li {
  margin-top: 6px;
}

.detail-view {
  padding: 0 24px;
}

.detail-shell {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(20, 31, 47, 0.03);
}

.detail-heading {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.detail-heading h2 {
  margin: 4px 0 0;
  font-size: 18px;
  line-height: 1.25;
}

.detail-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.readonly-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  color: #08745a;
  border: 1px solid #bde4d8;
  border-radius: 6px;
  background: var(--green-2);
  font-size: 12px;
  font-weight: 740;
}

.detail-grid {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.detail-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

.detail-card.wide {
  grid-column: 1 / -1;
}

.detail-card h3 {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.25;
}

.kv-list {
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  overflow: hidden;
}

.kv-list div {
  display: grid;
  grid-template-columns: minmax(140px, 0.42fr) minmax(0, 1fr);
  gap: 12px;
  min-height: 40px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line-soft);
}

.kv-list div:last-child {
  border-bottom: 0;
}

.kv-list dt {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.kv-list dd {
  min-width: 0;
  color: #243247;
  font-size: 13px;
  font-weight: 680;
  overflow-wrap: anywhere;
}

.detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.compact-list {
  padding-left: 0;
}

.compact-list button {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  padding: 10px;
  color: var(--text);
  text-align: left;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface);
}

.compact-list button:hover,
.compact-list button.selected {
  border-color: #a8d8d1;
  background: #f4fbfa;
}

.compact-list button strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.compact-list button small {
  grid-column: 2;
  color: var(--muted);
}

.note-box {
  margin-top: 12px;
  padding: 11px 12px;
  color: #29384d;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface-muted);
  overflow-wrap: anywhere;
}

.note-box.muted,
.muted-text {
  color: var(--muted);
}

.metric-list {
  display: grid;
  gap: 8px;
}

.metric-list div {
  display: grid;
  grid-template-columns: minmax(88px, 0.35fr) minmax(64px, auto) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}

.metric-list div:last-child {
  border-bottom: 0;
}

.metric-list span,
.metric-list small {
  color: var(--muted);
  font-size: 12px;
}

.metric-list strong {
  font-size: 18px;
}

.operations-catalog {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.operations-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.operations-row:last-child {
  border-bottom: 0;
}

.operations-row p {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.operations-category-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.operations-category-head h4 {
  margin: 0;
  font-size: 14px;
}

.operations-category-head small,
.operations-category-head span {
  color: var(--muted);
  font-size: 12px;
}

.operations-category-head span {
  flex: 0 0 auto;
  padding-top: 2px;
}

.operations-metric-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.operations-metric-list div {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface-muted);
}

.operations-metric-list span,
.operations-metric-list small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.operations-metric-list strong {
  display: block;
  margin: 2px 0;
  font-size: 17px;
  overflow-wrap: anywhere;
}

.operations-notes {
  display: grid;
  gap: 6px;
  margin-top: 9px;
}

.operations-notes span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10;
  display: none;
  min-width: 260px;
  max-width: min(380px, calc(100vw - 40px));
  padding: 12px 14px;
  color: #ffffff;
  border-radius: 7px;
  background: #182334;
  box-shadow: var(--shadow);
}

.toast.show {
  display: block;
}

@media (max-width: 1180px) {
  :root {
    --sidebar: 230px;
  }

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

  .agent-panel,
  .model-panel,
  .review-panel,
  .report-panel {
    grid-column: auto;
  }

  .control-strip {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .strip-actions {
    justify-content: flex-start;
  }

  .detail-grid.two-col {
    grid-template-columns: 1fr;
  }
}

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

  .sidebar {
    position: relative;
    height: auto;
  }

  .brand {
    min-height: 72px;
  }

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

  .collapse-button {
    display: none;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .control-strip {
    grid-template-columns: 1fr;
  }

  .goal-layout,
  .report-bottom {
    grid-template-columns: 1fr;
  }

  .task-panel table {
    min-width: 680px;
  }

  .goal-list li {
    grid-template-columns: 20px minmax(0, 1fr);
    padding: 10px 12px;
  }

  .goal-list strong,
  .goal-list em {
    grid-column: 2;
    text-align: left;
  }

  .agent-row {
    flex-wrap: wrap;
  }

  .agent-row::before,
  .connector.vertical {
    display: none;
  }

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

  .operations-metric-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .workspace,
  .control-strip,
  .dashboard-grid,
  .detail-view {
    padding-left: 12px;
    padding-right: 12px;
  }

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

  .panel-heading,
  .detail-heading,
  .review-list article,
  .report-actions,
  .strip-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-heading {
    display: grid;
  }

  .detail-heading {
    display: grid;
  }

  .review-list article {
    grid-template-columns: 1fr;
  }

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

  .operations-category-head {
    display: grid;
  }

  .operations-metric-list {
    grid-template-columns: 1fr;
  }

  .kv-list div,
  .metric-list div,
  .compact-list button {
    grid-template-columns: 1fr;
  }

  .compact-list button small {
    grid-column: auto;
  }
}
