.work-governance-dialog {
  width: min(1080px, calc(100vw - 32px));
  max-width: 1080px;
  max-height: calc(100vh - 32px);
}

.work-governance-content {
  width: 100%;
  min-height: min(720px, calc(100vh - 48px));
}

.wg-tabs {
  display: flex;
  gap: 2px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border, #d9dde3);
  overflow-x: auto;
}

.wg-tab {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-secondary, #596273);
  white-space: nowrap;
  cursor: pointer;
}

.wg-tab.active {
  border-bottom-color: var(--primary, #2563eb);
  color: var(--text-primary, #1a1d23);
  font-weight: 600;
}

.wg-body {
  min-height: 460px;
  padding: 20px;
  overflow: auto;
}

.wg-panel { display: none; }
.wg-panel.active { display: block; }

.wg-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.wg-section-header h4 { margin: 0; }
.wg-muted { color: var(--text-secondary, #687182); font-size: 13px; }

.wg-message {
  margin: 12px 20px 0;
  padding: 10px 12px;
  border-left: 3px solid var(--primary, #2563eb);
  background: var(--bg-secondary, #f5f7fa);
}

.wg-message[hidden] { display: none; }
.wg-error { border-left-color: #c2413b; color: #9f2f2a; }

.wg-policy-options {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
}

.wg-health-grid { display: grid; gap: 8px; max-width: 680px; }
.wg-health-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px; border-bottom: 1px solid var(--border-color); }
.wg-health-row .is-on { color: #0f8a62; }
.wg-health-row .is-off { color: var(--text-secondary); }
.work-assets-table td:first-child { min-width: 220px; }
.work-assets-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.wg-policy-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.wg-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-top: 1px solid var(--border, #d9dde3);
}

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

.wg-assets-table { min-width: 760px; }

.wg-table th,
.wg-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--border, #e2e5e9);
  text-align: left;
  vertical-align: middle;
}

.wg-table th {
  color: var(--text-secondary, #596273);
  font-size: 12px;
  font-weight: 600;
}

.wg-table select {
  min-width: 130px;
  max-width: 100%;
}

.wg-title {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.wg-subline { margin-top: 3px; color: var(--text-secondary, #687182); font-size: 12px; }

.wg-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 4px;
  background: #edf6ef;
  color: #25633b;
  font-size: 12px;
}

.wg-status.review { background: #fff6df; color: #805d16; }
.wg-status.excluded { background: #f2f3f5; color: #5b6370; }

.wg-proposal-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--border, #d9dde3);
}

.wg-proposal-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(240px, 2fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 6px;
  border-bottom: 1px solid var(--border, #e2e5e9);
}

.wg-proposal-diff {
  max-height: 96px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text-secondary, #596273);
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.wg-actions { display: flex; gap: 8px; }
.wg-empty { padding: 32px 8px; color: var(--text-secondary, #687182); text-align: center; }

@media (max-width: 720px) {
  .work-governance-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .work-governance-content { min-height: calc(100vh - 24px); }
  .wg-body { padding: 14px; }
  .wg-proposal-row { grid-template-columns: 1fr; }
  .wg-section-header { align-items: flex-start; flex-direction: column; }
  .wg-assets-table,
  .wg-assets-table tbody,
  .wg-assets-table tr,
  .wg-assets-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .wg-assets-table thead { display: none; }
  .wg-assets-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border, #e2e5e9);
  }
  .wg-assets-table td {
    padding: 0;
    border: 0;
    overflow-wrap: anywhere;
  }
  .wg-assets-table td:first-child,
  .wg-assets-table td:nth-child(2),
  .wg-assets-table td:nth-child(5),
  .wg-assets-table td:last-child {
    grid-column: 1 / -1;
  }
  .wg-assets-table td::before {
    display: block;
    margin-bottom: 4px;
    color: var(--text-secondary, #687182);
    content: attr(data-label);
    font-size: 11px;
    font-weight: 600;
  }
}
