/* Performance Studio — Domain Owner home (domain page main content only) */

body.studio-domain .main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

body.studio-domain .topbar {
  height: auto;
  min-height: 52px;
  padding-top: 10px;
  padding-bottom: 10px;
}

body.studio-domain .topbar,
body.studio-domain .governance-strip,
body.studio-domain .signal-summary-row,
body.studio-domain .nlq,
body.studio-domain .admin-section,
body.studio-domain .domain-footer-collapsibles {
  flex-shrink: 0;
}

body.studio-domain .domain-content-grid {
  flex: 1 1 auto;
  min-height: clamp(220px, 38vh, 720px);
  overflow: hidden;
  align-items: stretch;
  /* Fill the flex slot so % heights and stretch resolve (avoids 0px grid rows). */
  grid-template-rows: minmax(0, 1fr);
}

body.studio-domain .domain-col-metrics,
body.studio-domain .domain-col-schema {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Workforce: Connected systems + Schema & data access share one card (single scroll region). */
body.studio-domain .domain-col-schema .schema-data-merged-panel {
  flex: 1 1 0;
  flex-shrink: 1;
  min-height: 12rem;
  max-height: calc(100dvh - var(--dev-banner-h, 0px) - 400px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.studio-domain .domain-col-schema .schema-data-merged-panel .schema-data-merged-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body.studio-domain .domain-col-schema .schema-data-merged-panel .schema-access-subsection {
  border-top: 1px solid #E8EDF2;
}

body.studio-domain .domain-col-schema .schema-data-merged-panel .schema-access-body {
  overflow: visible;
  flex: none;
  min-height: auto;
}

body.studio-domain .domain-col-schema .schema-access-panel {
  flex: 1 1 0;
  min-height: 12rem;
  max-height: calc(100dvh - var(--dev-banner-h, 0px) - 400px);
}

body.studio-domain .topbar .tb-r .btn-ghost-domain {
  background: transparent;
  border: 1px solid #E0E8F0;
  color: #5A7080;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

body.studio-domain .topbar .tb-r .btn-ghost-domain:hover {
  border-color: #5A7080;
  color: #0F1F2E;
}

body.studio-domain .topbar .tb-r .btn-icon-domain {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #E0E8F0;
  background: transparent;
  color: #8A9BB0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.studio-domain .topbar .tb-r .btn-icon-domain:hover {
  border-color: #8A9BB0;
  color: #0F1F2E;
}

.charter-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
}
.charter-badge.signed {
  background: #EAF4EE;
  color: #2D6A4F;
  border: 1px solid #C8DDD2;
}
.charter-badge.unsigned {
  background: #FEF3E2;
  color: #D97706;
  border: 1px solid #FCD34D;
}
.charter-badge.approved {
  background: #EAF4EE;
  color: #2D6A4F;
  border: 1px solid #C8DDD2;
}

/* Governance strip */
.governance-strip {
  background: #0F1F2E;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}
.gov-block {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
}
.gov-block:first-child { padding-left: 0; }
.gov-divider {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}
.gov-label {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.gov-value {
  font-size: 13px;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}
.gov-value.warn { color: #F59E0B; }
.gov-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.gov-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #6BAE8A;
}
.gov-icon.muted { color: rgba(255,255,255,0.5); }
.gov-icon.warn { color: #F59E0B; }
.charter-dl-btn {
  background: rgba(107,174,138,0.2);
  border: 1px solid rgba(107,174,138,0.5);
  color: #6BAE8A;
  font-size: 11px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  margin-left: auto;
}
.charter-dl-btn:hover {
  background: rgba(107,174,138,0.35);
}

/* Signal summary cards */
.signal-summary-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 12px 20px 0;
}
.signal-card {
  background: white;
  border: 1px solid #E8EDF2;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
}
.signal-card-bar {
  width: 3px;
  border-radius: 3px 0 0 3px;
  flex-shrink: 0;
  margin: -12px 12px -12px -14px;
}
.signal-card-body { min-width: 0; }
.signal-card-label {
  font-size: 9px;
  font-weight: 700;
  color: #8A9BB0;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.signal-card-value {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 4px;
}
.signal-card-sub {
  font-size: 11px;
  color: #8A9BB0;
}

/* Two-column content area: Metric Library | Schema & data access */
.domain-content-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  grid-template-rows: minmax(0, 1fr);
  gap: 16px;
  padding: 12px 20px;
  overflow: hidden;
  align-items: stretch;
}
.domain-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  min-width: 0;
}

.domain-panel {
  background: white;
  border: 1px solid #E8EDF2;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}
.domain-panel-header {
  background: white;
  border-bottom: 1px solid #E8EDF2;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.domain-panel-title {
  font-size: 13px;
  font-weight: 700;
  color: #0F1F2E;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.domain-count-badge {
  font-size: 10px;
  font-weight: 600;
  color: #8A9BB0;
  background: #F4F6F8;
  padding: 2px 8px;
  border-radius: 10px;
}
.domain-panel-link {
  font-size: 11px;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.domain-panel-link:hover { text-decoration: underline; }
.metric-filters {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.metric-filter-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  border: none;
  background: #F4F6F8;
  color: #8A9BB0;
  cursor: pointer;
}
.metric-filter-chip.active {
  color: #fff;
}

/* Metric library */
.metric-library-panel { /* alias */ }
.metric-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid #F4F6F8;
  min-height: 58px;
  cursor: default;
  transition: background 0.1s;
}
.metric-row:hover { background: #FAFBFC; }
.metric-row:last-child { border-bottom: none; }
.metric-rag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px currentColor;
}
.metric-rag-dot.red   { color: rgba(232,81,26,0.15); background: #E8511A; }
.metric-rag-dot.amber { color: rgba(245,158,11,0.15); background: #F59E0B; }
.metric-rag-dot.green { color: rgba(107,174,138,0.15); background: #6BAE8A; }
.metric-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.metric-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.metric-name {
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #0F1F2E;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.metric-def {
  font-size: 10px;
  color: #8A9BB0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.metric-locked-badge {
  font-size: 9px;
  font-weight: 700;
  background: #EAF4EE;
  color: #2D6A4F;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #C8DDD2;
  white-space: nowrap;
  flex-shrink: 0;
}
.metric-proposed-badge {
  font-size: 9px;
  font-weight: 700;
  background: #FEF3E2;
  color: #9A6700;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #F0D9A8;
  white-space: normal;
  flex-shrink: 1;
  line-height: 1.25;
  max-width: 220px;
}
.metric-approved-badge {
  font-size: 9px;
  font-weight: 700;
  background: #EAF4EE;
  color: #2D6A4F;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #C8DDD2;
  white-space: normal;
  flex-shrink: 1;
  line-height: 1.25;
  max-width: 240px;
}
.metric-target-badge {
  font-size: 9px;
  font-weight: 700;
  background: #EEF2FF;
  color: #4338CA;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #C7D2FE;
  white-space: nowrap;
  flex-shrink: 0;
}
.metric-owner-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 52px;
  flex-shrink: 0;
}
.metric-owner-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  flex-shrink: 0;
}
.metric-owner-name {
  font-size: 10px;
  color: #5A7080;
  text-align: center;
  line-height: 1.1;
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.metric-value-col {
  text-align: right;
  flex-shrink: 0;
  min-width: 72px;
}
.metric-value {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.1;
}
.metric-threshold {
  font-size: 10px;
  color: #8A9BB0;
}
.domain-empty {
  padding: 28px 16px;
  text-align: center;
  color: #8A9BB0;
  font-size: 12px;
  line-height: 1.5;
}
.domain-empty .btn-ghost-domain {
  margin-top: 10px;
}

/* Performance projects */
.perf-project-card {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid #F4F6F8;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.1s;
}
.perf-project-card:hover { background: #FAFBFC; }
.perf-project-card:last-child { border-bottom: none; }
.perf-proj-row1 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.perf-proj-name {
  font-size: 12px;
  font-weight: 700;
  color: #0F1F2E;
  flex: 1;
  min-width: 0;
}
.perf-role-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}
.perf-role-badge.supporting {
  background: #F4F6F8;
  color: #8A9BB0;
}
.perf-metric-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.perf-metric-chip {
  font-size: 9px;
  background: #F4F6F8;
  color: #5A7080;
  padding: 1px 7px;
  border-radius: 8px;
}
.perf-proj-row3 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.perf-lead-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 800;
  background: #F4F6F8;
  color: #5A7080;
  flex-shrink: 0;
}
.perf-lead-name {
  font-size: 10px;
  color: #8A9BB0;
  flex-shrink: 0;
}
.perf-last-signal {
  font-size: 10px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}
.perf-arrow {
  color: #B0BAC4;
  font-size: 12px;
  flex-shrink: 0;
}

/* Right column signals + governance */
.domain-signal-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-bottom: 1px solid #F4F6F8;
  min-height: 0;
}
.domain-signal-row:last-child { border-bottom: none; }
.domain-signal-bar {
  width: 3px;
  flex-shrink: 0;
  align-self: stretch;
}
.domain-signal-bar.red { background: #E8511A; }
.domain-signal-bar.amber { background: #F59E0B; }
.domain-signal-bar.green { background: #6BAE8A; }
.domain-signal-body {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
}
.domain-signal-title {
  font-size: 11px;
  font-weight: 700;
  color: #0F1F2E;
  margin-bottom: 4px;
}
.domain-signal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.domain-signal-proj {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.domain-signal-desc {
  font-size: 10px;
  color: #8A9BB0;
}
.domain-signal-time {
  font-size: 9px;
  color: #B0BAC4;
}
.domain-signal-rag {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 10px 10px 10px 0;
  align-self: center;
  flex-shrink: 0;
}

.governance-panel {
  background: #F8FAFC;
  border: 1px solid #E8EDF2;
  border-radius: 12px;
  padding: 14px;
}
.governance-panel-title {
  font-size: 12px;
  font-weight: 700;
  color: #0F1F2E;
  margin-bottom: 12px;
}
.gov-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.gov-row:last-child { margin-bottom: 0; }
.gov-row-icon {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  flex-shrink: 0;
  color: #8A9BB0;
}
.gov-row-icon.ok { color: #6BAE8A; }
.gov-row-icon.warn { color: #F59E0B; }
.gov-row-l1 {
  font-size: 11px;
  font-weight: 700;
  color: #0F1F2E;
}
.gov-row-l2 {
  font-size: 10px;
  color: #8A9BB0;
  margin-top: 2px;
}
.gov-row-dl {
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
  margin-left: auto;
  white-space: nowrap;
}
.pending-label {
  font-size: 9px;
  font-weight: 700;
  color: #8A9BB0;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 12px 0 8px;
}
.pending-req {
  background: white;
  border: 1px solid #E8EDF2;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 6px;
}
.pending-req-title {
  font-size: 11px;
  font-weight: 700;
  color: #0F1F2E;
  margin-bottom: 4px;
}
.pending-req-meta {
  font-size: 10px;
  color: #8A9BB0;
  margin-bottom: 8px;
}
.pending-req-acts {
  display: flex;
  gap: 6px;
}
.pending-req-acts .bap {
  background: #EAF4EE;
  color: #2D6A4F;
  border: none;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 5px;
  cursor: pointer;
}
.pending-req-acts .bdc {
  background: #F4F6F8;
  color: #8A9BB0;
  border: none;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 5px;
  cursor: pointer;
}

/* Schema & data access — primary right panel (scrollable body) */
.schema-access-panel,
.schema-data-merged-panel,
.metric-library-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 0; /* fill column after fixed panels (e.g. Connected systems) */
  flex-shrink: 1; /* override .domain-panel flex-shrink:0 so height can constrain */
  min-height: 0;
  overflow: hidden;
}
.schema-access-panel .domain-panel-header,
.metric-library-panel .domain-panel-header {
  flex-shrink: 0;
}
.domain-panel-subtitle {
  font-size: 13px;
  font-weight: 700;
  color: #0F1F2E;
  padding: 14px 16px 8px;
  flex-shrink: 0;
}
.schema-data-subsection .domain-panel-subtitle {
  padding-bottom: 6px;
}
.schema-access-panel .schema-access-meta,
.schema-data-merged-panel .schema-access-meta {
  flex-shrink: 0;
}
.schema-access-body {
  padding: 4px 18px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1 1 0;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
#metric-library-body {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1 1 0;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
.schema-access-meta {
  font-family: inherit;
  font-size: 12px;
  color: #8A9BB0;
  margin: 0;
  padding: 0 18px 10px;
}
.schema-access-panel .schema-access-meta {
  padding-top: 4px;
}
.schema-data-merged-panel .schema-access-subsection .schema-access-meta {
  padding-top: 0;
}
/* Same page font as Metric Library content — not a code/mono technical face */
.schema-cat-label {
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: normal;
  margin: 14px 0 6px;
  text-transform: uppercase;
}
.schema-cat-label:first-of-type {
  margin-top: 0;
}
.schema-cat-structured { color: #1f6fb2; }
.schema-cat-unstructured { color: #5a4fc4; }
.schema-cat-external { color: #c07f0e; }
.schema-cat-private { color: #c0392b; }
.schema-data-row {
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 0;
  border-top: 1px solid #E8EDF2;
  color: #0F1F2E;
}
.schema-data-row.first {
  border-top: none;
  padding-top: 2px;
}
.schema-data-label {
  display: inline;
}
.schema-data-status {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  margin-left: 6px;
  white-space: nowrap;
}
.schema-data-status.live {
  color: #2D6A4F;
}
.schema-data-status.illustrative {
  color: #8A9BB0;
}
.schema-data-source-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #EEF4FA;
  color: #1B4F72;
  white-space: nowrap;
}

/* Connected systems — Workforce domain charter (intro within merged panel) */
.connected-systems-body {
  padding: 0 18px 14px;
}
.connected-flow-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.connected-flow-step-first {
  margin-bottom: 10px;
}
.connected-flow-step-last {
  margin-top: 12px;
  margin-bottom: 0;
}
.connected-flow-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.connected-flow-title {
  font-size: 13px;
  font-weight: 700;
  color: #0F1F2E;
}
.connected-flow-desc {
  font-size: 12px;
  color: #5A7080;
  margin-top: 2px;
  line-height: 1.35;
}
.connected-systems-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0 0 4px 36px;
}
.connected-system-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid #E8EDF2;
  border-radius: 8px;
  background: #FAFBFC;
}
.connected-system-step {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #E8EDF2;
  color: #5A7080;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.connected-system-name {
  font-size: 12px;
  font-weight: 700;
  color: #0F1F2E;
}
.connected-system-badge {
  font-size: 10px;
  font-weight: 600;
  color: #5A7080;
  margin-top: 2px;
}
.connected-system-desc {
  font-size: 11px;
  color: #5A7080;
  margin-top: 4px;
  line-height: 1.35;
}
.connected-recon-stat {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid #E8EDF2;
}
.connected-recon-line {
  margin: 0 0 8px 36px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #E6F4ED;
  border: 1px solid #C8E6D4;
  font-size: 12px;
  font-weight: 600;
  color: #1B4332;
  line-height: 1.4;
}

/* Footer collapsibles: Performance projects / Active signals / Governance */
.domain-footer-collapsibles {
  padding: 0 20px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.domain-details {
  background: #fff;
  border: 1px solid #E8EDF2;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
}
.domain-details > summary {
  font-size: 14px;
  font-weight: 600;
  color: #0F1F2E;
  cursor: pointer;
  list-style: none;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.domain-details > summary::-webkit-details-marker { display: none; }
.domain-details > summary::before {
  content: '▸';
  color: #8A9BB0;
  font-size: 12px;
  width: 12px;
  flex-shrink: 0;
}
.domain-details[open] > summary::before { content: '▾'; }
.domain-details-count {
  font-weight: 400;
  color: #8A9BB0;
}
.domain-details-link {
  margin-left: auto;
}
.domain-details-body {
  font-size: 13px;
  padding: 0 0 8px;
  border-top: 1px solid #E8EDF2;
}
.domain-footer-gov {
  border: none;
  border-radius: 0;
  margin: 0;
  background: #F8FAFC;
}

/* Legacy admin strip (kept for any residual markup) */
.admin-section {
  border-top: 1px solid #E8EDF2;
  background: #F8FAFC;
}
.admin-section-header {
  padding: 10px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.admin-section-header:hover { background: #F0F2F5; }
.admin-section-toggle {
  font-size: 11px;
  font-weight: 700;
  color: #5A7080;
}
.admin-section-meta {
  font-size: 10px;
  color: #8A9BB0;
}
.admin-section-body {
  padding: 0 20px 16px;
}
.admin-section-body .stbl {
  background: white;
  border: 1px solid #E8EDF2;
  border-radius: 8px;
  overflow: hidden;
}

@media (max-width: 1280px) {
  .domain-content-grid {
    grid-template-columns: 1fr 1.15fr;
    gap: 12px;
    padding: 10px 14px;
  }
  .domain-footer-collapsibles { padding: 0 14px 8px; }
  .signal-summary-row { padding: 10px 14px 0; }
  .governance-strip { padding: 10px 14px; }
  .gov-block { padding: 0 12px; }
}

@media (max-width: 1100px) {
  .domain-content-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    overflow-y: auto;
  }
  body.studio-domain .domain-col-metrics,
  body.studio-domain .domain-col-schema {
    overflow: visible;
  }
  .schema-access-panel,
  .schema-data-merged-panel,
  .metric-library-panel {
    flex: 0 0 auto;
  }
  .schema-access-body,
  .schema-data-merged-scroll,
  #metric-library-body {
    flex: 0 1 auto;
    overflow-y: visible;
  }
  .domain-col { overflow: visible; }
  .signal-summary-row { grid-template-columns: repeat(2, 1fr); }
  .governance-strip { flex-wrap: wrap; gap: 10px; }
  .gov-divider { display: none; }
  .charter-dl-btn { margin-left: 0; }
}
