@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("/assets/fonts/Alibaba-PuHuiTi-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("/assets/fonts/Alibaba-PuHuiTi-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  font-family: var(--feishu-font-family);
  color: var(--workbench-text-primary);
  background: var(--workbench-atmosphere-color);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--workbench-atmosphere-color);
  background-image: var(--workbench-atmosphere-image);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
}
button, input, select, textarea { font: inherit; }

.operator-app { min-height: 100vh; }
.site-workbench-nav { position:fixed;z-index:100;inset:0 0 auto;height:60px;padding:0 24px;display:grid;grid-template-columns:102px minmax(0,1fr);align-items:center;gap:24px;border-bottom:1px solid var(--workbench-border-subtle);background:color-mix(in srgb,var(--workbench-surface-panel) 96%,transparent);color:var(--workbench-text-primary) }
.site-nav-brand{width:max-content;display:flex;align-items:center;text-decoration:none}.site-nav-brand img{display:block;width:100px;height:auto;max-height:36px;object-fit:contain;object-position:left center}



.site-nav-actions{min-width:0;display:flex;align-items:center;justify-content:flex-end;gap:8px}.site-nav-actions form{margin:0}.site-nav-utility,.site-nav-logout{min-height:34px;padding:0 10px;display:inline-flex;align-items:center;border:0;border-radius:var(--feishu-border-radius-medium);color:var(--workbench-text-secondary);background:transparent;font-size:13px;font-weight:500;text-decoration:none;white-space:nowrap;cursor:pointer}.site-nav-utility:hover,.site-nav-utility:focus-visible,.site-nav-logout:hover,.site-nav-logout:focus-visible{color:var(--feishu-color-primary);background:var(--workbench-surface-selected);outline:none}.site-nav-current{color:var(--feishu-color-primary)}


.operator-shell {
  width: min(1480px, calc(100% - 48px));
  margin: auto;
  padding: 92px 0 32px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.operator-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--workbench-border-subtle);
  border-radius: var(--feishu-border-radius-large);
  background: var(--workbench-surface-panel);
  box-shadow: var(--workbench-panel-shadow);
}
.sidebar-summary{padding:24px 16px 18px;border-bottom:1px solid var(--workbench-border-subtle)}.sidebar-eyebrow,.sidebar-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.sidebar-eyebrow{color:var(--workbench-text-muted);font-size:12px}.sidebar-eyebrow small{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.sidebar-eyebrow i{width:7px;height:7px;border-radius:50%;background:var(--workbench-status-warning-text)}.sidebar-title-row{margin-top:15px}.sidebar-title-row h1{margin:0;font-size:18px;line-height:1.35}.sidebar-title-row span{color:var(--workbench-text-muted);font-size:12px}.sidebar-summary p{margin:8px 0 0;color:var(--workbench-text-secondary);font-size:12px;line-height:1.6}.sidebar-list{display:grid;gap:0;padding:8px}
.sidebar-item {
  min-height: 64px;
  padding: 10px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 0;
  border-radius: var(--feishu-border-radius-medium);
  color: var(--workbench-text-secondary);
  background: transparent;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.sidebar-copy{min-width:0;display:grid;gap:4px}.sidebar-copy strong{color:inherit;font-size:14px;line-height:1.3}.sidebar-copy small{overflow:hidden;color:var(--workbench-text-muted);font-size:11px;font-weight:400;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}.sidebar-item:hover{color:var(--workbench-text-primary);background:var(--workbench-surface-canvas)}.sidebar-item[aria-current="page"]{position:relative;color:var(--feishu-color-primary);background:var(--workbench-surface-selected)}.sidebar-item[aria-current="page"]::before{position:absolute;inset:10px auto 10px -8px;width:2px;border-radius:2px;background:var(--feishu-color-primary);content:""}.sidebar-footer{padding:14px 16px 16px;display:grid;gap:5px;border-top:1px solid var(--workbench-border-subtle)}.sidebar-footer strong{font-size:12px}.sidebar-footer small{color:var(--workbench-text-muted);font-size:11px;line-height:1.5}
.operator-content, .operator-panel { min-width: 0; }
.operator-content {
  min-height: calc(100dvh - 132px);
  overflow: hidden;
  border: 1px solid var(--workbench-border-subtle);
  border-radius: var(--feishu-border-radius-large);
  background: var(--workbench-surface-panel);
  box-shadow: var(--workbench-panel-shadow);
}
.operator-panel { display: grid; gap: 0; }
.operator-panel[hidden] { display: none; }
.operator-page-heading{min-height:124px;padding:24px 28px 20px;display:flex;align-items:flex-start;justify-content:space-between;gap:18px;border-bottom:1px solid var(--workbench-border-subtle)}.operator-page-heading>div{min-width:0}.operator-page-heading small{color:var(--workbench-text-muted);font-size:11px}.operator-page-heading h1{margin:7px 0 5px;font-size:24px;line-height:1.25}.operator-page-heading p{margin:0;color:var(--workbench-text-secondary);font-size:13px;line-height:1.6}

.operator-section {
  padding: 24px 28px 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.platform-operation-free-note { min-height: 36px; padding: 8px 14px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--workbench-border-subtle); color: var(--workbench-status-success-text); background: var(--workbench-status-success-bg); font-size: 11px; line-height: 18px; }
.platform-operation-free-note strong { flex: none; font-size: 12px; }
.platform-operation-free-note span { min-width: 0; overflow: hidden; color: var(--workbench-text-secondary); text-overflow: ellipsis; white-space: nowrap; }
.operator-content > .operator-panel { height: calc(100% - 36px); }
.operator-panel > .operator-section + .operator-section { border-top: 1px solid var(--workbench-border-subtle); }
.compact-section { padding-block: 24px; }
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.section-heading h1, .section-heading h2 { margin: 0 0 4px; font-size: 19px; }
.section-heading p { margin: 0; color: var(--workbench-text-secondary); font-size: 13px; }

.records { display: grid; gap: 10px; }
.tenant-table-wrap { width: 100%; overflow-x: auto; }
.tenant-table { min-width: 980px; border: 1px solid var(--workbench-border-subtle); border-radius: 10px; overflow: hidden; }
.tenant-table-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.6fr) minmax(105px, .7fr) minmax(130px, .9fr) minmax(130px, .85fr) minmax(190px, 1fr);
  align-items: center;
  min-height: 68px;
  border-bottom: 1px solid var(--workbench-border-subtle);
}
.tenant-table-row:last-child { border-bottom: 0; }
.tenant-table-row > * { min-width: 0; padding: 12px 14px; }
.tenant-table-header { min-height: 42px; color: var(--workbench-text-muted); background: var(--workbench-surface-canvas); font-size: 12px; font-weight: 700; }
.tenant-name-cell, .shortcut-usage-cell { display: grid; gap: 3px; }
.tenant-name-cell strong, .shortcut-usage-cell strong { font-size: 14px; }
.tenant-name-cell small, .shortcut-usage-cell small { color: var(--workbench-text-muted); font-size: 12px; overflow-wrap: anywhere; }
.tenant-balance { font-size: 15px; }
.tenant-pagination { min-height: 34px; margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tenant-pagination[hidden] { display: none; }
.tenant-pagination > p { margin: 0; color: var(--workbench-text-muted); font-size: 12px; }
.tenant-pagination > nav { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.tenant-page-button { min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--workbench-border-strong); border-radius: var(--feishu-border-radius-medium); color: var(--workbench-text-secondary); background: var(--workbench-surface-panel); cursor: pointer; }
.tenant-page-button:hover:not(:disabled), .tenant-page-button:focus-visible { border-color: var(--feishu-color-primary); color: var(--feishu-color-primary); outline: none; }
.tenant-page-button:focus-visible { box-shadow: var(--workbench-focus-ring); }
.tenant-page-button[aria-current="page"] { border-color: var(--feishu-color-primary); color: var(--feishu-color-primary); background: var(--workbench-surface-selected); font-weight: 700; }
.tenant-page-button:disabled { border-color: var(--workbench-border-subtle); color: var(--workbench-text-disabled); background: var(--workbench-surface-subtle); cursor: not-allowed; }
.tenant-page-edge { min-width: 64px; }
.tenant-page-ellipsis { width: 20px; color: var(--workbench-text-muted); font-size: 13px; text-align: center; }
.miniapp-user-table-wrap { width: 100%; overflow-x: auto; }
.miniapp-user-table { min-width: 1040px; overflow: hidden; border: 1px solid var(--workbench-border-subtle); border-radius: 10px; }
.miniapp-user-row { display: grid; grid-template-columns: minmax(230px, 1.4fr) minmax(330px, 1.9fr) minmax(120px, .7fr) minmax(110px, .7fr) minmax(170px, .9fr); min-height: 68px; align-items: center; border-bottom: 1px solid var(--workbench-border-subtle); }
.miniapp-user-row:last-child { border-bottom: 0; }
.miniapp-user-row > * { min-width: 0; padding: 12px 14px; }
.miniapp-user-header { min-height: 42px; background: var(--workbench-surface-canvas); color: var(--workbench-text-muted); font-size: 12px; font-weight: 700; }
.miniapp-user-cell { display: flex; align-items: center; gap: 10px; }
.miniapp-user-avatar { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; object-fit: cover; background: var(--workbench-surface-canvas); }
.miniapp-user-cell span, .miniapp-relation-cell { display: grid; gap: 4px; }
.miniapp-user-cell strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.miniapp-user-cell small, .miniapp-relation-cell, .miniapp-user-updated { color: var(--workbench-text-muted); font-size: 12px; }
.miniapp-relation-cell span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  border: 1px solid var(--workbench-border-subtle);
  border-radius: 11px;
  background: var(--workbench-surface-canvas);
}
.record-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.record-main strong { font-size: 14px; overflow-wrap: anywhere; }
.record-main small { color: var(--workbench-text-muted); font-size: 12px; overflow-wrap: anywhere; }
.record-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.text-button.tenant-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 4px;
  border-radius: var(--feishu-border-radius-small);
  color: var(--feishu-color-primary);
  font-weight: 700;
}
.text-button.tenant-action-button:hover:not(:disabled) { color: var(--feishu-color-primary-hover); }
.text-button.tenant-action-button:focus-visible { outline: none; box-shadow: var(--workbench-focus-ring); }
.text-button.tenant-action-button:disabled { color: var(--workbench-text-disabled); cursor: not-allowed; }
.status-ready { color: var(--workbench-status-success-text); font-size: 12px; flex: none; }
.status-warn { color: var(--workbench-status-warning-text); font-size: 12px; flex: none; }
.empty-note {
  margin: 0;
  padding: 16px;
  border: 1px dashed var(--workbench-border-strong);
  border-radius: 10px;
  color: var(--workbench-text-muted);
  font-size: 13px;
  text-align: center;
}

.inline-form {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}
.inline-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
.inline-form input {
  width: 220px;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--workbench-border-strong);
  border-radius: 9px;
  color: var(--workbench-text-primary);
  background: var(--workbench-surface-panel);
  outline: none;
}
.inline-form input:focus-visible { border-color: var(--feishu-color-primary); box-shadow: var(--workbench-focus-ring); }
.miniapp-consultation-form { display: grid; max-width: 620px; gap: 14px; }
.miniapp-consultation-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
.miniapp-consultation-form input[type="text"], .miniapp-consultation-form input[type="file"] { box-sizing: border-box; width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--workbench-border-strong); border-radius: 9px; color: var(--workbench-text-primary); background: var(--workbench-surface-panel); }
.miniapp-consultation-form input:focus-visible { border-color: var(--feishu-color-primary); box-shadow: var(--workbench-focus-ring); outline: none; }
.form-hint { margin: -4px 0 0; color: var(--workbench-text-muted); font-size: 12px; line-height: 1.6; }
.content-database-metadata-form { display: grid; gap: 16px; max-width: 760px; }
.content-database-metadata-form fieldset { min-width: 0; margin: 0; padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 12px; border: 1px solid var(--workbench-border-subtle); border-radius: 10px; }
.content-database-metadata-form legend { padding: 0 6px; color: var(--workbench-text-primary); font-size: 14px; font-weight: 700; }
.content-database-metadata-form legend small { margin-left: 6px; color: var(--workbench-text-muted); font-size: 11px; font-weight: 400; }
.content-database-metadata-form label { min-width: 0; display: grid; gap: 6px; color: var(--workbench-text-secondary); font-size: 13px; font-weight: 600; }
.content-database-metadata-form input { width: 100%; min-width: 0; height: 42px; padding: 0 11px; border: 1px solid var(--workbench-border-strong); border-radius: 9px; color: var(--workbench-text-primary); background: var(--workbench-surface-panel); outline: none; }
.content-database-metadata-form input:focus-visible { border-color: var(--feishu-color-primary); box-shadow: var(--workbench-focus-ring); }
.content-database-metadata-readback { margin: 0; color: var(--workbench-text-secondary); font-size: 13px; line-height: 1.6; }
@media (max-width: 680px) { .content-database-metadata-form fieldset { grid-template-columns: minmax(0, 1fr); } }
.miniapp-consultation-preview { width: 240px; padding: 10px; border: 1px solid var(--workbench-border-subtle); border-radius: 12px; background: #fff; }
.miniapp-consultation-preview img { display: block; width: 218px; height: 218px; object-fit: contain; }

.primary-button, .secondary-button, .text-button, .close-button {
  border: 0;
  cursor: pointer;
  text-decoration: none;
}
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: var(--feishu-border-radius-medium);
  color: #fff;
  background: var(--feishu-color-primary);
  font-weight: 700;
}
.primary-button:hover:not(:disabled) { background: var(--feishu-color-primary-hover); }
.primary-button:active:not(:disabled) { background: var(--feishu-color-primary-active); }
.primary-button:disabled { color: var(--workbench-text-disabled); background: var(--feishu-color-disabled-bg); cursor: not-allowed; opacity: 1; }
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--workbench-border-strong);
  border-radius: 9px;
  color: var(--workbench-text-accent);
  background: var(--workbench-surface-panel);
  font-weight: 700;
}
.text-button, .close-button { color: var(--workbench-text-secondary); background: transparent; }
.close-button { font-size: 28px; line-height: 1; }

.inline-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--workbench-status-danger-text);
  background: var(--workbench-status-danger-bg);
  font-size: 13px;
}

.model-dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 18px;
  color: var(--workbench-text-primary);
  background: var(--workbench-surface-panel);
  box-shadow: var(--feishu-shadow-elevated);
}
.model-dialog::backdrop { background: var(--feishu-color-overlay-bg); backdrop-filter: blur(3px); }
.model-form { display: grid; gap: 15px; padding: 24px; }
.dialog-heading { display: flex; justify-content: space-between; gap: 18px; }
.dialog-heading h2 { margin: 0 0 4px; font-size: 21px; }
.dialog-heading p { margin: 0; color: var(--workbench-text-secondary); font-size: 13px; }
.model-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
.model-form input, .model-form select {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--workbench-border-strong);
  border-radius: 9px;
  color: var(--workbench-text-primary);
  background: var(--workbench-surface-panel);
  outline: none;
}
.model-form input:focus-visible, .model-form select:focus-visible { border-color: var(--feishu-color-primary); box-shadow: var(--workbench-focus-ring); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }

.ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--workbench-border-subtle);
  border-radius: 9px;
}
.ledger-row > div { display: grid; gap: 3px; }
.ledger-row small { color: var(--workbench-text-muted); font-size: 12px; }
.ledger-row > strong { color: var(--workbench-status-danger-text); }
.ledger-row > strong.positive { color: var(--workbench-status-success-text); }

.refund-preview {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--workbench-border-subtle);
}
.refund-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.refund-preview-heading > div { display: grid; gap: 3px; }
.refund-preview-heading small { color: var(--workbench-text-muted); font-size: 12px; overflow-wrap: anywhere; }
.refund-details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.refund-detail {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid var(--workbench-border-subtle);
  border-radius: 9px;
  background: var(--workbench-surface-canvas);
}
.refund-detail small { color: var(--workbench-text-muted); font-size: 12px; }
.refund-detail strong { font-size: 14px; overflow-wrap: anywhere; }
.refund-history { display: grid; gap: 10px; }
.refund-warning {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--workbench-status-warning-text);
  background: var(--workbench-status-warning-bg);
  font-size: 13px;
}
.allocation-preview {
  margin: -5px 0 0;
  color: var(--workbench-text-secondary);
  font-size: 13px;
}
.billing-records { display: grid; overflow-x: auto; border: 1px solid var(--workbench-border-subtle); border-radius: 10px; scrollbar-gutter: stable; }
.billing-table-header,
.billing-feature-group {
  min-width: 760px;
  display: grid;
  grid-template-columns: minmax(92px, .72fr) minmax(118px, .92fr) minmax(178px, 1.62fr) minmax(126px, .92fr) minmax(108px, .88fr) 64px;
  align-items: center;
  gap: 10px;
  padding-inline: 12px;
}
.billing-table-header > span { padding-inline: 10px; }
.billing-table-header {
  min-height: 34px;
  color: var(--workbench-text-muted);
  background: var(--workbench-surface-subtle);
  font-size: 12px;
  font-weight: 700;
}
.billing-feature-group {
  align-items: stretch;
  border-bottom: 1px solid var(--workbench-border-subtle);
  background: var(--workbench-surface-panel);
}
.billing-feature-group:last-child { border-bottom: 0; }
.billing-feature-name {
  display: flex;
  min-width: 0;
  align-items: center;
  padding: 7px 10px;
  border-right: 1px solid var(--workbench-border-subtle);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.billing-feature-meter-list { grid-column: 2 / -1; min-width: 0; }
.billing-meter-row {
  display: grid;
  grid-template-columns: minmax(118px, .92fr) minmax(178px, 1.62fr) minmax(126px, .92fr) minmax(108px, .88fr) 64px;
  min-height: 54px;
  align-items: center;
  gap: 10px;
  padding-block: 7px;
  border-bottom: 1px solid var(--workbench-border-subtle);
}
.billing-meter-row:last-child { border-bottom: 0; }
.billing-meter-scenario,
.billing-meter-status { min-width: 0; padding-inline: 10px; display: grid; gap: 2px; }
.billing-meter-scenario strong { font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.billing-meter-scenario small,
.billing-meter-status small { color: var(--workbench-text-muted); font-size: 11px; overflow-wrap: anywhere; }
.billing-meter-desc { min-width: 0; padding-inline: 10px; color: var(--workbench-text-secondary); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.billing-price-control { display: flex; align-items: center; gap: 7px; padding-inline: 10px; color: var(--workbench-text-secondary); font-size: 12px; white-space: nowrap; }
.billing-price-control input { width: 78px; height: 34px; padding: 0 9px; border: 1px solid var(--workbench-border-strong); border-radius: 7px; outline: none; background: var(--workbench-surface-panel); color: var(--workbench-text-primary); }
.billing-price-control input:focus-visible { border-color: var(--feishu-color-primary); box-shadow: var(--workbench-focus-ring); }
.billing-save-button { min-width: 64px; min-height: 34px; padding: 0 14px; font-size: 13px; }
.billing-meter-readback { margin: 0; color: var(--workbench-status-success-text); font-size: 12px; }
.billing-meter-error { grid-column: 1 / -1; margin: 0; padding-block: 7px; }

@media (max-width: 960px) {
  .site-workbench-nav{padding:0 12px;grid-template-columns:88px minmax(0,1fr);gap:8px}.site-nav-brand img{width:82px}.site-nav-actions .site-nav-utility:not(.site-nav-current),.site-nav-actions form{display:none}
}
@media (max-width: 640px) {
  .site-workbench-nav{height:52px;grid-template-columns:84px minmax(0,1fr)}
  .operator-shell { width: calc(100% - 24px); grid-template-columns: 1fr; gap: 12px; padding: 64px 0 16px; }
  .operator-sidebar { position: static; }
  .sidebar-summary{padding:18px 14px 14px}.sidebar-list{grid-template-columns:1fr}.sidebar-item{min-height:58px}.operator-page-heading{min-height:0;padding:20px 18px 16px}.operator-page-heading h1{font-size:21px}.operator-section{padding:20px 18px 22px}
  .inline-form input { width: 100%; }
  .tenant-pagination { align-items: flex-start; flex-direction: column; }
  .tenant-pagination > nav { width: 100%; justify-content: flex-start; overflow-x: auto; padding-bottom: 2px; }
  .refund-preview-heading { align-items: stretch; flex-direction: column; }
  .record-row { align-items: stretch; flex-direction: column; }
  .record-actions { width: 100%; }
  .record-actions .secondary-button { flex: 1; }
  .refund-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .billing-table-header { display: none; }
  .billing-feature-group { grid-template-columns: 1fr; gap: 0; padding-inline: 12px; }
  .billing-feature-name { grid-column: 1; padding: 9px 0 7px; border-right: 0; border-bottom: 1px solid var(--workbench-border-subtle); }
  .billing-feature-meter-list { grid-column: 1; }
  .billing-meter-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .billing-meter-scenario { grid-column: 1; grid-row: 1; }
  .billing-meter-desc { grid-column: 1; grid-row: 2; }
  .billing-meter-status { grid-column: 1; grid-row: 3; }
  .billing-price-control { grid-column: 2; grid-row: 1; align-self: start; }
  .billing-save-button { grid-column: 2; grid-row: 2; }
}

/* 2026-09-01 图 5 真源：独立管理页改为顶栏下方贴边、全高、连续分栏。 */
.operator-shell {
  width: 100%;
  height: calc(100dvh - 60px);
  min-height: 0;
  margin: 60px 0 0;
  padding: 0;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  overflow: hidden;
}

.operator-sidebar {
  position: static;
  top: auto;
  height: 100%;
  min-height: 0;
  grid-template-rows: 54px minmax(0, 1fr) auto;
  border: 0;
  border-right: 1px solid var(--workbench-border-subtle);
  border-radius: 0;
  box-shadow: none;
}

.sidebar-summary {
  min-height: 54px;
  height: 54px;
  padding: 0 16px;
  display: flex;
  align-items: center;
}

.sidebar-summary > .sidebar-eyebrow,
.sidebar-title-row > span,
.sidebar-summary > p {
  display: none;
}

.sidebar-title-row { margin: 0; }
.sidebar-title-row h1 { font-size: 14px; line-height: 20px; }
.sidebar-list { min-height: 0; align-content: start; grid-auto-rows: max-content; overflow: auto; }

.operator-app { height: 100dvh; overflow: hidden; }

.operator-content {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--workbench-surface-canvas);
  box-shadow: none;
}

.operator-panel,
.employee-panel {
  height: 100%;
  min-height: 0;
  align-content: start;
  overflow: auto;
}

.operator-page-heading {
  position: sticky;
  z-index: 3;
  top: 0;
  min-height: 54px;
  height: 54px;
  padding: 0 18px;
  align-items: center;
  background: var(--workbench-surface-panel);
}

.operator-page-heading > div { display: grid; gap: 1px; }
.operator-page-heading small { display: none; }
.operator-page-heading h1 { margin: 0; font-size: 14px; line-height: 20px; }
.operator-page-heading p { overflow: hidden; font-size: 10px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.operator-page-heading .section-heading { margin: 0; }

.operator-section {
  margin: 12px 12px 0;
  padding: 24px 28px 28px;
  border: 1px solid var(--workbench-border-subtle);
  border-radius: 0;
  background: var(--workbench-surface-panel);
}

.operator-page-heading + .operator-section { border-radius: 8px 8px 0 0; }
.operator-panel > .operator-section + .operator-section,
.employee-panel > .operator-section + .operator-section {
  margin-top: 0;
  border-top: 0;
}
.operator-panel > .operator-section:last-child,
.employee-panel > .operator-section:last-child {
  margin-bottom: 12px;
  border-radius: 0 0 8px 8px;
}
.operator-page-heading + .operator-section:last-child { border-radius: 8px; }

.section-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.workflow-source-nav { display: flex; align-items: center; gap: 28px; padding: 0 18px; border-bottom: 1px solid var(--workbench-border-subtle); background: var(--workbench-surface-panel); }
.workflow-source-nav button { position: relative; min-height: 46px; padding: 0; border: 0; outline-offset: 3px; background: transparent; color: var(--workbench-text-primary); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.workflow-source-nav button:hover,
.workflow-source-nav button:focus-visible,
.workflow-source-nav button[aria-selected="true"] { color: var(--workbench-brand-primary); }
.workflow-source-nav button[aria-selected="true"] > span::after { position: absolute; right: 0; bottom: 8px; left: 0; height: 2px; background: currentColor; content: ""; }
.workflow-source-panel[hidden] { display: none !important; }
.workflow-config-records { display: grid; gap: 10px; }
.workflow-config-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 16px 18px; border: 1px solid var(--workbench-border-subtle); border-radius: 10px; background: var(--workbench-surface-panel); }
.workflow-config-list-copy { min-width: 0; display: grid; gap: 4px; }
.workflow-config-list-copy small { color: var(--workbench-text-muted); font-size: 11px; }
.workflow-config-list-copy h2 { margin: 0; font-size: 16px; }
.workflow-config-list-copy p { margin: 0; overflow: hidden; color: var(--workbench-text-secondary); font-size: 12px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.workflow-config-list-copy code { overflow: hidden; color: var(--workbench-text-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.workflow-config-list-meta { display: grid; justify-items: end; gap: 7px; }
.workflow-config-list-meta > small { color: var(--workbench-text-muted); font-size: 11px; }
.workflow-config-open { min-width: 96px; }
.workflow-config-version { flex: none; padding: 4px 8px; border-radius: 999px; color: var(--workbench-text-accent); background: var(--workbench-surface-selected); font-size: 11px; }
.workflow-config-dialog,
.skill-import-dialog { width: min(1120px, calc(100vw - 28px)); }
.model-dialog.workflow-config-dialog {
  width: min(1120px, calc(100vw - 28px));
  max-width: min(1120px, calc(100vw - 28px));
  height: min(860px, calc(100dvh - 28px));
  max-height: calc(100dvh - 28px);
  overflow: hidden;
  border-radius: 12px;
}
.workflow-dialog-shell { display: grid; gap: 16px; padding: 22px; }
.workflow-config-dialog .workflow-dialog-shell { height: 100%; min-height: 0; grid-template-rows: auto minmax(0, 1fr) auto; gap: 0; padding: 0; }
.workflow-config-dialog .dialog-heading { padding: 20px 22px 16px; border-bottom: 1px solid var(--workbench-border-subtle); }
.workflow-config-dialog .dialog-heading > div { min-width: 0; }
.workflow-config-dialog .dialog-heading p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workflow-config-dialog .close-button { align-self: start; }
.workflow-config-dialog-content { min-height: 0; overflow: hidden; }
.workflow-config-dialog .dialog-actions { padding: 12px 22px 16px; border-top: 1px solid var(--workbench-border-subtle); background: var(--workbench-surface-panel); }
.workflow-dialog-workspace { height: 100%; min-height: 0; display: grid; grid-template-rows: auto 44px minmax(0, 1fr); }
.workflow-source-readback { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 12px 22px 0; overflow: hidden; border: 1px solid var(--workbench-border-subtle); border-radius: 9px; background: var(--workbench-surface-canvas); }
.workflow-source-readback > span { position: relative; display: grid; gap: 3px; padding: 9px 13px; }
.workflow-source-readback > span + span { border-left: 1px solid var(--workbench-border-subtle); }
.workflow-source-readback > span:first-child::after { content: "✓"; position: absolute; right: 12px; top: 9px; color: var(--workbench-status-success-text); font-weight: 800; }
.workflow-source-readback strong { color: var(--workbench-text-primary); font-size: 12px; }
.workflow-source-readback small { color: var(--workbench-text-muted); font-size: 11px; }
.workflow-source-readback .active { background: var(--workbench-surface-selected); }
.workflow-dialog-tabs { display: flex; align-items: stretch; gap: 20px; padding: 0 22px; border-bottom: 1px solid var(--workbench-border-subtle); }
.workflow-dialog-tab { position: relative; min-width: 0; padding: 0; border: 0; color: var(--workbench-text-secondary); background: transparent; font-size: 13px; font-weight: 700; }
.workflow-dialog-tab > span { position: relative; height: 100%; display: inline-flex; align-items: center; }
.workflow-dialog-tab[aria-selected="true"] { color: var(--feishu-color-primary); }
.workflow-dialog-tab[aria-selected="true"] > span::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; content: ""; background: var(--feishu-color-primary); }
.workflow-dialog-tab:hover { color: var(--feishu-color-primary); }
.workflow-dialog-tab:focus-visible { outline: none; box-shadow: var(--workbench-focus-ring); }
.workflow-dialog-panels { min-height: 0; }
.workflow-dialog-tab-panel { height: 100%; min-height: 0; overflow: hidden; padding: 18px 22px 22px; }
.workflow-dialog-tab-panel[hidden] { display: none; }
.workflow-dialog-standalone-panel { height: 100%; overflow: auto; padding: 18px 22px 22px; scrollbar-gutter: stable; }
.workflow-config-dialog .workflow-config-body { height: 100%; min-height: 0; overflow: hidden; border: 1px solid var(--workbench-border-subtle); border-radius: 10px; }
.workflow-dialog-section-heading h3 { margin: 0; font-size: 15px; }
.workflow-dialog-section-heading p,
.skill-import-dialog-toolbar p { margin: 5px 0 0; color: var(--workbench-text-secondary); font-size: 12px; line-height: 1.55; }
.skill-import-dialog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.skill-import-dialog-toolbar p { margin: 0; }
.workflow-config-body { display: grid; grid-template-columns: minmax(280px, .78fr) minmax(0, 1.72fr); align-items: stretch; }
.workflow-config-body.workflow-config-body-merged { grid-template-columns: minmax(0, 1fr); }
.workflow-execution-readonly, .workflow-presentation-form, .workflow-task-home-form { min-width: 0; min-height: 0; padding: 18px; overflow: auto; scrollbar-gutter: stable; }
.workflow-execution-readonly { border-right: 1px solid var(--workbench-border-subtle); background: color-mix(in srgb, var(--workbench-surface-canvas) 55%, transparent); }
.workflow-task-home-form { display: grid; align-content: start; gap: 0; padding: 0; }
.workflow-dialog-presentation-panel > .workflow-presentation-form { height: 100%; border: 1px solid var(--workbench-border-subtle); border-radius: 10px; }
.workflow-execution-readonly h3, .workflow-presentation-form h3 { margin: 0 0 5px; font-size: 15px; }
.workflow-execution-readonly > p { margin: 0 0 14px; color: var(--workbench-text-secondary); font-size: 12px; line-height: 1.55; }
.workflow-stage-list { margin: 0; padding: 0; display: grid; gap: 9px; list-style: none; }
.workflow-condition-tree-root { position: relative; display: grid; gap: 2px; margin: 0 0 14px 6px; padding: 10px 12px; border: 1px solid var(--workbench-border-strong); border-radius: 8px; background: var(--workbench-surface-panel); }
.workflow-condition-tree-root strong { font-size: 12px; }
.workflow-condition-tree-root small { color: var(--workbench-text-muted); font-size: 10px; }
.workflow-condition-tree { position: relative; margin-left: 16px; }
.workflow-condition-tree::before { position: absolute; top: -14px; bottom: 12px; left: -10px; width: 1px; background: var(--workbench-border-strong); content: ""; }
.workflow-condition-tree > li { position: relative; }
.workflow-condition-tree > li::before { position: absolute; top: 11px; left: -10px; width: 10px; height: 1px; background: var(--workbench-border-strong); content: ""; }
.workflow-stage-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; }
.workflow-stage-list li > strong { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--feishu-color-primary); background: var(--workbench-surface-selected); font-size: 11px; }
.workflow-stage-list li > span { min-width: 0; display: grid; gap: 2px; }
.workflow-stage-list b { font-size: 12px; }
.workflow-stage-list small { color: var(--workbench-text-muted); font-size: 11px; line-height: 1.45; }
.workflow-stage-list .workflow-stage-config-state { width: fit-content; margin-top: 2px; padding: 2px 6px; border-radius: 999px; color: var(--workbench-text-accent); background: var(--workbench-surface-selected); font-weight: 700; }
.workflow-stage-condition-nodes { position: relative; display: grid; gap: 6px; margin: 7px 0 3px 10px; padding-left: 12px; border-left: 1px solid var(--workbench-border-strong); }
.workflow-stage-condition-node { position: relative; display: grid; gap: 2px; padding: 7px 9px; border: 1px solid var(--workbench-border-subtle); border-radius: 7px; background: var(--workbench-surface-panel); }
.workflow-stage-condition-node::before { position: absolute; top: 12px; left: -13px; width: 12px; height: 1px; background: var(--workbench-border-strong); content: ""; }
.workflow-stage-condition-node strong { font-size: 11px; }
.workflow-stage-condition-node small { font-size: 10px; }
.workflow-execution-attribute { margin-top: 14px !important; padding: 9px 10px; border: 1px solid var(--workbench-border-subtle); border-radius: 8px; background: var(--workbench-surface-panel); }
.workflow-presentation-form { display: grid; align-content: start; gap: 0; padding: 0; }
.workflow-presentation-scope-tabs { position: sticky; top: 0; z-index: 3; display: flex; align-items: flex-end; gap: 24px; min-height: 48px; padding: 0 18px; border-bottom: 1px solid var(--workbench-border-subtle); background: color-mix(in srgb, var(--workbench-surface-panel) 96%, transparent); backdrop-filter: blur(8px); }
.workflow-presentation-scope-tab { position: relative; align-self: stretch; padding: 2px 0 0; border: 0; color: var(--workbench-text-secondary); background: transparent; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.workflow-presentation-scope-tab::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 2px 2px 0 0; background: transparent; content: ""; }
.workflow-presentation-scope-tab:hover { color: var(--workbench-text-primary); }
.workflow-presentation-scope-tab[aria-selected="true"] { color: var(--feishu-color-primary); }
.workflow-presentation-scope-tab[aria-selected="true"]::after { background: var(--feishu-color-primary); }
.workflow-presentation-scope-tab:focus-visible { outline: none; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--feishu-color-primary) 34%, transparent); }
.workflow-presentation-section[hidden] { display: none; }
.workflow-presentation-section { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 18px; }
.workflow-presentation-section > h3,
.workflow-presentation-section > p { grid-column: 1 / -1; }
.workflow-presentation-section > p { margin: -1px 0 2px; color: var(--workbench-text-secondary); font-size: 12px; line-height: 1.5; }
.workflow-task-home-toggle { grid-column: 1 / -1; min-height: 64px; padding: 12px 14px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; border: 1px solid var(--workbench-border-subtle); border-radius: 8px; background: var(--workbench-surface-muted); cursor: pointer; }
.workflow-task-home-toggle input { width: 18px; height: 18px; accent-color: var(--feishu-color-primary); }
.workflow-task-home-toggle span { display: grid; gap: 4px; }
.workflow-task-home-toggle strong { color: var(--workbench-text-primary); font-size: 13px; }
.workflow-task-home-toggle small { color: var(--workbench-text-secondary); font-size: 11px; line-height: 1.45; }
.workflow-task-home-branches { grid-column: 1 / -1; display: grid; gap: 10px; }
.workflow-task-home-branches-heading { display: grid; gap: 3px; }
.workflow-task-home-branches-heading h4 { margin: 0; font-size: 13px; }
.workflow-task-home-branches-heading p { margin: 0; color: var(--workbench-text-secondary); font-size: 11px; line-height: 1.5; }
.workflow-config-tree-root { position: relative; display: grid; gap: 2px; padding: 11px 13px; border: 1px solid var(--workbench-border-strong); border-radius: 8px; background: var(--workbench-surface-panel); }
.workflow-config-tree-root strong { font-size: 13px; }
.workflow-config-tree-root small { color: var(--workbench-text-muted); font-size: 10px; }
.workflow-config-stage-tree { position: relative; display: grid; gap: 10px; margin-left: 18px; padding-left: 18px; }
.workflow-config-stage-tree::before { position: absolute; top: -10px; bottom: 18px; left: 0; width: 1px; background: var(--workbench-border-strong); content: ""; }
.workflow-config-stage-node { position: relative; display: grid; gap: 7px; padding: 12px; border: 1px solid var(--workbench-border-subtle); border-radius: 8px; background: var(--workbench-surface-canvas); }
.workflow-config-stage-node::before { position: absolute; top: 20px; left: -19px; width: 18px; height: 1px; background: var(--workbench-border-strong); content: ""; }
.workflow-config-stage-node > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.workflow-config-stage-node > header strong { font-size: 12px; }
.workflow-config-stage-node > header span { padding: 2px 7px; border-radius: 999px; color: var(--workbench-text-accent); background: var(--workbench-surface-selected); font-size: 10px; font-weight: 700; }
.workflow-config-stage-node > p { margin: 0; color: var(--workbench-text-secondary); font-size: 11px; line-height: 1.45; }
.workflow-config-stage-conditions { display: grid; gap: 8px; }
.workflow-config-stage-conditions > small { padding: 8px 10px; border: 1px dashed var(--workbench-border-strong); border-radius: 7px; color: var(--workbench-text-muted); font-size: 10px; }
.workflow-config-stage-conditions .workflow-task-home-branch { background: var(--workbench-surface-panel); }
.workflow-task-home-branch > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.workflow-task-home-visibility { display: inline-flex; align-items: center; gap: 7px; margin: 0; color: var(--workbench-text-secondary); font-size: 11px; cursor: pointer; }
.workflow-task-home-visibility input { width: 14px; height: 14px; margin: 0; accent-color: var(--workbench-brand); }
.workflow-task-home-condition-values { display: grid; gap: 6px; }
.workflow-task-home-condition-values > small { color: var(--workbench-text-muted); font-size: 10px; }
.workflow-task-home-condition-values > div { display: flex; flex-wrap: wrap; gap: 6px; }
.workflow-task-home-condition-values > div > span { padding: 4px 8px; border: 1px solid var(--workbench-border-subtle); border-radius: 6px; color: var(--workbench-text-secondary); background: var(--workbench-surface-canvas); font-size: 10px; }
.workflow-task-home-branches-empty { margin: 0; padding: 13px; border: 1px dashed var(--workbench-border-strong); border-radius: 8px; color: var(--workbench-text-muted); font-size: 12px; }
.workflow-task-home-branch { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(0, 1.2fr); gap: 10px 12px; padding: 12px; border: 1px solid var(--workbench-border-subtle); border-radius: 8px; background: var(--workbench-surface-canvas); }
.workflow-task-home-branch > strong { grid-column: 1 / -1; font-size: 12px; }
.workflow-task-home-branch > label { display: grid; align-content: start; gap: 6px; color: var(--workbench-text-primary); font-size: 11px; font-weight: 700; }
.workflow-task-home-branch select { width: 100%; height: 38px; padding: 0 9px; border: 1px solid var(--workbench-border-strong); border-radius: 8px; color: var(--workbench-text-primary); background: var(--workbench-surface-panel); outline: none; }
.workflow-task-home-branch select:focus-visible { border-color: var(--feishu-color-primary); box-shadow: var(--workbench-focus-ring); }
.workflow-task-home-branch-options { min-width: 0; display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0; padding: 10px; border: 1px solid var(--workbench-border-subtle); border-radius: 8px; }
.workflow-task-home-branch-options[hidden] { display: none; }
.workflow-task-home-branch-options legend { padding: 0 4px; color: var(--workbench-text-secondary); font-size: 11px; font-weight: 700; }
.workflow-task-home-branch-options label { display: inline-flex; align-items: center; gap: 6px; color: var(--workbench-text-primary); font-size: 12px; }
.workflow-task-home-branch-options input { width: 16px; height: 16px; accent-color: var(--feishu-color-primary); }
.workflow-task-home-branch-default { grid-column: 2; }
.workflow-task-home-state.enabled { color: var(--workbench-status-success-text); }
.workflow-task-home-state.disabled { color: var(--workbench-status-danger-text); }
.workflow-config-field { min-width: 0; display: grid; align-content: start; gap: 6px; color: var(--workbench-text-primary); font-size: 12px; font-weight: 700; }
.workflow-config-field:has(textarea[name="dialog_overview"]), .workflow-config-field:has(textarea[name="dialog_scene"]), .workflow-config-field:has(textarea[name="dialog_skills"]), .workflow-config-field:has(textarea[name="dialog_steps"]) { grid-column: 1 / -1; }
.workflow-config-field input, .workflow-config-field textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--workbench-border-strong); border-radius: 8px; color: var(--workbench-text-primary); background: var(--workbench-surface-panel); outline: none; resize: vertical; }
.workflow-config-field input { height: 40px; }
.workflow-config-field input:focus-visible, .workflow-config-field textarea:focus-visible { border-color: var(--feishu-color-primary); box-shadow: var(--workbench-focus-ring); }
.workflow-config-field small { color: var(--workbench-text-muted); font-size: 11px; font-weight: 400; line-height: 1.45; }
.workflow-detail-toolbar,
.workflow-detail-editor { grid-column: 1 / -1; }
.workflow-detail-toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.workflow-detail-toolbar .secondary-button { min-height: 34px; padding: 6px 10px; }
.workflow-detail-editor { display: grid; gap: 10px; }
.workflow-detail-block { min-width: 0; display: grid; gap: 10px; padding: 12px; border: 1px solid var(--workbench-border-subtle); border-radius: 8px; background: var(--workbench-surface-canvas); }
.workflow-detail-block > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.workflow-detail-block > header strong { font-size: 12px; }
.workflow-detail-block > header div { display: flex; align-items: center; gap: 10px; }
.workflow-detail-block .text-button { min-height: 28px; padding: 2px 0; }
.workflow-detail-block input,
.workflow-detail-block textarea,
.workflow-detail-block select { width: 100%; padding: 9px 10px; border: 1px solid var(--workbench-border-strong); border-radius: 8px; color: var(--workbench-text-primary); background: var(--workbench-surface-panel); outline: none; }
.workflow-detail-block input { height: 38px; }
.workflow-detail-block textarea { resize: vertical; line-height: 1.55; }
.workflow-detail-block :is(input, textarea, select):focus-visible { border-color: var(--feishu-color-primary); box-shadow: var(--workbench-focus-ring); }
.workflow-detail-list-controls { display: grid; grid-template-columns: 128px minmax(0, 1fr); align-items: start; gap: 10px; }
.workflow-detail-image-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; }
.workflow-detail-image-layout img { width: 180px; height: 128px; display: block; object-fit: contain; border: 1px solid var(--workbench-border-subtle); border-radius: 8px; background: var(--workbench-surface-panel); }
.workflow-detail-image-fields { min-width: 0; display: grid; align-content: start; gap: 8px; }
.workflow-detail-image-fields .secondary-button { justify-self: start; min-height: 34px; }
.workflow-detail-empty { margin: 0; padding: 22px 14px; border: 1px dashed var(--workbench-border-strong); border-radius: 8px; color: var(--workbench-text-muted); text-align: center; }
.workflow-presentation-form > .inline-error, .workflow-config-actions { grid-column: 1 / -1; }
.workflow-presentation-form > .inline-error { margin: 0 18px 12px; }
.workflow-config-actions { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--workbench-border-subtle); background: color-mix(in srgb, var(--workbench-surface-panel) 94%, transparent); backdrop-filter: blur(8px); }
.workflow-config-actions small { color: var(--workbench-text-muted); font-size: 11px; }
.skill-import-form { display: grid; grid-template-columns: minmax(300px, 1.4fr) minmax(220px, .8fr); gap: 12px; padding: 18px; border: 1px solid var(--workbench-border-subtle); border-radius: 10px; background: var(--workbench-surface-canvas); }
.skill-import-field { min-width: 0; display: grid; align-content: start; gap: 6px; color: var(--workbench-text-primary); font-size: 12px; font-weight: 700; }
.skill-import-field input, .skill-import-field select { width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--workbench-border-strong); border-radius: 8px; color: var(--workbench-text-primary); background: var(--workbench-surface-panel); outline: none; }
.skill-import-field select { padding-right: 32px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--workbench-text-muted) 50%), linear-gradient(135deg, var(--workbench-text-muted) 50%, transparent 50%); background-position: calc(100% - 15px) 17px, calc(100% - 10px) 17px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.skill-import-field input:focus-visible, .skill-import-field select:focus-visible { border-color: var(--feishu-color-primary); box-shadow: var(--workbench-focus-ring); }
.skill-import-field small { color: var(--workbench-text-muted); font-size: 11px; font-weight: 400; line-height: 1.45; }
.skill-import-field[hidden] { display: none; }
.skill-import-form-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.skill-import-form-actions p { margin: 0; color: var(--workbench-text-secondary); font-size: 12px; }
.skill-adaptation-track { margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); list-style: none; border: 1px solid var(--workbench-border-subtle); border-radius: 10px; background: var(--workbench-surface-panel); overflow: hidden; }
.skill-adaptation-track li { position: relative; min-width: 0; padding: 13px 14px 13px 38px; display: grid; gap: 2px; border-right: 1px solid var(--workbench-border-subtle); }
.skill-adaptation-track li:last-child { border-right: 0; }
.skill-adaptation-track li::after { content: ""; position: absolute; right: -5px; top: 50%; z-index: 1; width: 9px; height: 9px; border-top: 1px solid var(--workbench-border-subtle); border-right: 1px solid var(--workbench-border-subtle); background: var(--workbench-surface-panel); transform: translateY(-50%) rotate(45deg); }
.skill-adaptation-track li:last-child::after { display: none; }
.skill-adaptation-track span { position: absolute; left: 12px; top: 14px; color: var(--workbench-text-accent); font-size: 11px; font-weight: 700; }
.skill-adaptation-track strong { color: var(--workbench-text-primary); font-size: 12px; }
.skill-adaptation-track small { color: var(--workbench-text-muted); font-size: 11px; }
.skill-import-review { margin-top: 14px; padding: 18px; border: 1px solid var(--workbench-border-subtle); border-radius: 10px; background: var(--workbench-surface-panel); }
.skill-import-review-heading, .skill-import-record-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.skill-import-review-heading h3, .skill-import-record-heading h3 { margin: 0; font-size: 15px; }
.skill-import-review-heading p { margin: 5px 0 0; color: var(--workbench-text-secondary); font-size: 12px; line-height: 1.55; }
.skill-import-badge { flex: none; padding: 4px 8px; border-radius: 999px; color: var(--workbench-text-accent); background: var(--workbench-surface-selected); font-size: 11px; }
.skill-import-badge.medium { color: var(--workbench-status-warning-text); background: var(--workbench-status-warning-bg); }
.skill-import-badge.blocked { color: var(--workbench-status-danger-text); background: var(--workbench-status-danger-bg); }
.skill-import-review-summary { margin: 14px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.skill-import-review-summary > div { min-width: 0; padding: 9px 10px; border: 1px solid var(--workbench-border-subtle); border-radius: 8px; }
.skill-import-review-summary dt { color: var(--workbench-text-muted); font-size: 11px; }
.skill-import-review-summary dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 12px; }
.skill-import-findings { margin-top: 14px; }
.skill-import-findings h4 { margin: 0 0 8px; font-size: 13px; }
.skill-import-findings p, .skill-import-findings ul { margin: 0; color: var(--workbench-text-secondary); font-size: 12px; line-height: 1.55; }
.skill-import-findings ul { padding-left: 18px; }
.skill-import-findings li.blocked { color: var(--workbench-status-danger-text); }
.skill-workflow-adaptation { margin-top: 14px; padding: 14px; border: 1px solid var(--workbench-border-subtle); border-radius: 10px; background: var(--workbench-surface-canvas); }
.skill-adaptation-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.skill-adaptation-heading h4, .skill-adaptation-plan h5, .skill-resource-mapping-heading h5 { margin: 0; font-size: 13px; }
.skill-adaptation-heading p, .skill-adaptation-plan p, .skill-resource-mapping-heading p { margin: 5px 0 0; color: var(--workbench-text-secondary); font-size: 12px; line-height: 1.55; }
.skill-adaptation-contract-state { margin-top: 12px; padding: 10px 12px; border-left: 3px solid var(--workbench-status-warning-text); background: var(--workbench-status-warning-bg); border-radius: 0 8px 8px 0; }
.skill-adaptation-contract-state strong { font-size: 12px; }
.skill-adaptation-contract-state p { margin: 4px 0 0; color: var(--workbench-text-secondary); font-size: 11px; }
.skill-adaptation-actions { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.skill-adaptation-actions p { margin: 0; color: var(--workbench-text-muted); font-size: 11px; text-align: right; }
.skill-adaptation-actions.verify { padding-top: 12px; border-top: 1px solid var(--workbench-border-subtle); }
.skill-adaptation-plan { margin-top: 12px; padding: 12px; border: 1px solid var(--workbench-border-subtle); border-radius: 8px; background: var(--workbench-surface-panel); }
.skill-adaptation-plan ol { margin: 8px 0 0; padding-left: 20px; color: var(--workbench-text-secondary); font-size: 12px; line-height: 1.6; }
.skill-resource-mapping-form { margin-top: 12px; display: grid; gap: 10px; }
.skill-resource-stage { min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--workbench-border-subtle); border-radius: 8px; background: var(--workbench-surface-panel); }
.skill-resource-stage legend { padding: 0 6px; color: var(--workbench-text-primary); font-size: 12px; font-weight: 700; }
.skill-resource-stage > p { margin: 0 0 9px; color: var(--workbench-text-secondary); font-size: 11px; line-height: 1.5; }
.skill-resource-row { display: grid; grid-template-columns: minmax(120px, .35fr) minmax(180px, .7fr) minmax(220px, 1fr); gap: 8px; margin-top: 8px; }
.skill-resource-row select, .skill-resource-row input { min-width: 0; width: 100%; height: 36px; padding: 0 9px; border: 1px solid var(--workbench-border-strong); border-radius: 8px; color: var(--workbench-text-primary); background: var(--workbench-surface-canvas); outline: none; }
.skill-resource-row select:focus-visible, .skill-resource-row input:focus-visible { border-color: var(--feishu-color-primary); box-shadow: var(--workbench-focus-ring); }
.skill-import-publish-form { margin-top: 14px; padding-top: 14px; display: grid; grid-template-columns: minmax(280px, 1fr); gap: 12px; border-top: 1px solid var(--workbench-border-subtle); }
.skill-import-records { margin-top: 14px; display: grid; gap: 10px; }
.skill-import-record { padding: 14px 16px; border: 1px solid var(--workbench-border-subtle); border-radius: 10px; background: var(--workbench-surface-panel); }
.skill-import-record-heading small, .skill-import-record > small { color: var(--workbench-text-muted); font-size: 11px; overflow-wrap: anywhere; }
.skill-import-record > p { margin: 8px 0; color: var(--workbench-text-secondary); font-size: 12px; line-height: 1.5; }

@media (max-width: 760px) {
  .operator-shell {
    width: 100%;
    height: auto;
    min-height: calc(100dvh - 52px);
    margin-top: 52px;
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }
  .operator-sidebar { height: auto; border-right: 0; border-bottom: 1px solid var(--workbench-border-subtle); }
  .operator-content { height: auto; overflow: visible; }
  .operator-panel, .employee-panel { height: auto; overflow: visible; }
  .operator-app { height: auto; overflow: visible; }
  .section-heading, .section-actions, .skill-import-dialog-toolbar { align-items: flex-start; flex-direction: column; }
  .workflow-config-card { grid-template-columns: 1fr; }
  .workflow-config-list-meta { justify-items: start; }
  .workflow-dialog-tab-panel { overflow: auto; scrollbar-gutter: stable; }
  .workflow-config-dialog .workflow-config-body { height: auto; min-height: 100%; overflow: visible; }
  .workflow-config-body { grid-template-columns: 1fr; }
  .workflow-execution-readonly, .workflow-presentation-form, .workflow-task-home-form { overflow: visible; }
  .workflow-execution-readonly { border-right: 0; border-bottom: 1px solid var(--workbench-border-subtle); }
  .workflow-presentation-section { grid-template-columns: 1fr; padding: 16px; }
  .workflow-presentation-section > *, .workflow-config-field:has(textarea) { grid-column: 1; }
  .workflow-detail-list-controls, .workflow-detail-image-layout { grid-template-columns: 1fr; }
  .workflow-task-home-branch { grid-template-columns: 1fr; }
  .workflow-task-home-branch-default { grid-column: 1; }
  .workflow-detail-image-layout img { width: 100%; height: min(220px, 42vw); }
  .model-dialog.workflow-config-dialog { width: calc(100vw - 16px); max-width: calc(100vw - 16px); height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); }
  .workflow-config-dialog .dialog-heading { padding: 16px; }
  .workflow-source-readback { grid-template-columns: 1fr; margin: 10px 16px 0; }
  .workflow-source-readback > span + span { border-left: 0; border-top: 1px solid var(--workbench-border-subtle); }
  .workflow-config-dialog .dialog-heading p { white-space: normal; }
  .workflow-dialog-tabs { padding: 0 16px; }
  .workflow-dialog-tab-panel, .workflow-dialog-standalone-panel { padding: 14px 16px 18px; }
  .workflow-config-dialog .dialog-actions { padding: 10px 16px 14px; }
  .workflow-config-actions { position: static; align-items: stretch; flex-direction: column; }
  .workflow-config-actions small { line-height: 1.45; }
  .skill-import-form, .skill-import-review-summary, .skill-adaptation-track, .skill-resource-row { grid-template-columns: 1fr; }
  .skill-adaptation-track li { border-right: 0; border-bottom: 1px solid var(--workbench-border-subtle); }
  .skill-adaptation-track li:last-child { border-bottom: 0; }
  .skill-adaptation-track li::after { display: none; }
  .skill-adaptation-actions { align-items: flex-start; flex-direction: column; }
  .skill-adaptation-actions p { text-align: left; }
  .platform-operation-free-note { align-items: flex-start; flex-direction: column; gap: 2px; }
  .platform-operation-free-note span { overflow: visible; white-space: normal; }
  .operator-content > .operator-panel { height: auto; }
  .skill-import-form-actions { grid-column: 1; align-items: flex-start; flex-direction: column; }
  .billing-records { overflow: hidden; scrollbar-gutter: auto; }
  .billing-table-header { display: none; }
  .billing-feature-group { min-width: 0; grid-template-columns: 1fr; gap: 0; padding-inline: 12px; }
  .billing-feature-name { grid-column: 1; padding: 9px 0 7px; border-right: 0; border-bottom: 1px solid var(--workbench-border-subtle); }
  .billing-feature-meter-list { grid-column: 1; }
  .billing-meter-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .billing-meter-scenario { grid-column: 1; grid-row: 1; }
  .billing-meter-desc { grid-column: 1; grid-row: 2; }
  .billing-meter-status { grid-column: 1; grid-row: 3; }
  .billing-price-control { grid-column: 2; grid-row: 1; align-self: start; }
  .billing-save-button { grid-column: 2; grid-row: 2; }
}

@media (min-width: 761px) and (max-width: 900px) {
  .workflow-dialog-tab-panel { overflow: auto; scrollbar-gutter: stable; }
  .workflow-config-dialog .workflow-config-body { height: auto; min-height: 100%; overflow: visible; }
  .workflow-config-body { grid-template-columns: 1fr; }
  .workflow-execution-readonly, .workflow-presentation-form { overflow: visible; }
  .workflow-execution-readonly { border-right: 0; border-bottom: 1px solid var(--workbench-border-subtle); }
  .workflow-config-actions { position: static; }
  .workflow-detail-block > header { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .workflow-dialog-tab { transition: none; }
}

/* Scene adaptation keeps draft editing separate from the active binding. */
.workflow-scene-form { display: grid; align-content: start; gap: 16px; height: 100%; overflow: auto; min-width: 0; padding: 18px; border: 1px solid var(--workbench-border-subtle); border-radius: 10px; scrollbar-gutter: stable; }
.workflow-scene-form h3, .workflow-scene-form p { margin: 0; }
.workflow-scene-form h3 { font-size: 15px; }
.workflow-scene-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px; border-radius: 8px; background: var(--workbench-surface-selected); }
.workflow-scene-summary > div { display: grid; gap: 6px; min-width: 0; }
.workflow-scene-summary small, .workflow-scene-note, .workflow-scene-attribute > small { color: var(--workbench-text-secondary); font-size: 12px; line-height: 1.6; }
.workflow-scene-summary strong { font-size: 14px; overflow-wrap: anywhere; }
.workflow-scene-form .workflow-field { display: grid; gap: 8px; min-width: 0; font-size: 12px; }
.workflow-scene-form select { width: 100%; min-height: 36px; padding: 6px 10px; border: 1px solid var(--workbench-border-subtle); border-radius: 6px; color: var(--workbench-text-primary); background: var(--workbench-surface-panel); font: inherit; }
.workflow-scene-compatibility, .workflow-scene-validation { padding: 12px; border: 1px solid var(--workbench-border-subtle); border-radius: 8px; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.workflow-scene-compatibility ul, .workflow-scene-validation ul { margin: 6px 0 0; padding-left: 20px; }
.workflow-scene-attributes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.workflow-scene-attribute { display: grid; gap: 12px; min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--workbench-border-subtle); border-radius: 8px; }
.workflow-scene-attribute legend { padding: 0 5px; font-size: 13px; font-weight: 700; }
.workflow-scene-choices { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.workflow-scene-choices label, .workflow-scene-visibility { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; font-size: 12px; }
.workflow-scene-form input[type="checkbox"] { width: 16px; height: 16px; flex: 0 0 16px; accent-color: var(--feishu-color-primary); }
.workflow-scene-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding-top: 6px; }
.workflow-scene-form select:focus-visible, .workflow-scene-form input:focus-visible { outline: 2px solid var(--feishu-color-primary); outline-offset: 2px; }
@media (max-width: 720px) {
  .workflow-scene-form { height: auto; overflow: visible; padding: 14px; }
  .workflow-scene-attributes, .workflow-scene-summary { grid-template-columns: 1fr; }
  .workflow-scene-actions > button { flex: 1 1 auto; }
}
.workflow-scene-navigation { display: flex; flex-wrap: wrap; gap: 10px; }
.workflow-scene-navigation-item { display: grid; gap: 6px; flex: 1 1 140px; padding: 14px 16px; text-align: left; color: var(--workbench-text-primary); background: var(--workbench-surface-panel); border: 1px solid var(--workbench-border-subtle); border-radius: 9px; }
.workflow-scene-navigation-item strong { font-size: 13px; }
.workflow-scene-navigation-item small { color: var(--workbench-text-secondary); font-size: 12px; }
.workflow-scene-navigation-item[aria-pressed="true"] { border-color: var(--feishu-color-primary); background: var(--workbench-surface-selected); }
.workflow-scene-navigation-item:focus-visible { outline: 2px solid var(--feishu-color-primary); outline-offset: 2px; }
.workflow-scene-list-heading { padding-top: 8px; }
.workflow-scene-list-heading h2 { margin: 0 0 6px; font-size: 17px; }
.workflow-scene-list-heading p, .workflow-scene-list-group > p { margin: 0; color: var(--workbench-text-secondary); font-size: 12px; line-height: 1.6; }
.workflow-scene-list-group { display: grid; gap: 12px; min-width: 0; }
.workflow-scene-list-group > h3 { margin: 10px 0 0; font-size: 14px; }
.workflow-scene-card-issues { max-width: 720px; margin-top: 8px; font-size: 12px; line-height: 1.6; color: var(--workbench-text-secondary); }
.workflow-scene-card-issues summary { cursor: pointer; }
.workflow-scene-card-issues ul { margin: 6px 0 0; padding-left: 18px; }
.workflow-scene-effective-issue { margin: 0; padding: 12px 14px; border: 1px solid #d8a447; border-radius: 8px; color: #805213; background: #fff8e6; font-size: 12px; line-height: 1.6; }
.workflow-scene-effective-issue[hidden] { display: none; }

/* Workflow scene layout: navigation, active bindings, and candidates. */
#panel-workflows { grid-template-rows: max-content max-content; overflow-y: auto; scrollbar-gutter: stable; }
#workflow-config-records {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  align-items: start;
  gap: 0;
  min-height: 0;
}
.workflow-scene-rail {
  align-self: stretch;
  min-width: 0;
  padding: 24px 14px;
  border-right: 1px solid var(--workbench-border-strong);
  background: var(--workbench-surface-panel);
}
.workflow-scene-rail-heading { padding: 0 12px 20px; }
.workflow-scene-rail-heading h2 { margin: 0 0 6px; font-size: 15px; }
.workflow-scene-rail-heading p { margin: 0; font-size: 12px; color: var(--workbench-text-secondary); }
#workflow-config-records .workflow-scene-navigation { display: grid; gap: 8px; }
#workflow-config-records .workflow-scene-navigation-item {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 76px;
  gap: 8px;
  padding: 14px 14px 14px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
#workflow-config-records .workflow-scene-navigation-item strong { line-height: 1.6; }
#workflow-config-records .workflow-scene-navigation-item:hover { background: var(--workbench-surface-muted); }
#workflow-config-records .workflow-scene-navigation-item[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--feishu-color-primary) 35%, transparent);
  background: var(--workbench-surface-selected);
  color: var(--workbench-text-accent);
}
.workflow-scene-navigation-item[aria-pressed="true"]::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--feishu-color-primary);
}
#workflow-config-records .workflow-scene-navigation-all { margin-top: 16px; border-top-color: var(--workbench-border-strong); border-radius: 0 0 8px 8px; }
.workflow-scene-content { display: grid; align-content: start; gap: 24px; min-width: 0; padding: 24px; }
.workflow-scene-content .workflow-scene-list-heading { padding: 0 0 20px; border-bottom: 1px solid var(--workbench-border-strong); }
.workflow-scene-content .workflow-scene-list-heading h2 { margin-bottom: 8px; font-size: 21px; line-height: 1.5; }
.workflow-scene-content .workflow-scene-list-group {
  gap: 12px; padding: 20px; border: 1px solid var(--workbench-border-strong); border-radius: 12px;
  background: var(--workbench-surface-panel);
}
.workflow-scene-content .workflow-scene-list-group[data-group="bound"] { border-top: 3px solid var(--feishu-color-primary); }
.workflow-scene-content .workflow-scene-list-group > h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 15px; }
.workflow-scene-group-count { min-width: 24px; padding: 2px 7px; border-radius: 5px; background: var(--workbench-surface-muted); color: var(--workbench-text-secondary); text-align: center; font-size: 12px; }
.workflow-scene-content .workflow-scene-list-group > p { margin-bottom: 4px; }
.workflow-scene-content .workflow-config-card {
  padding: 18px; gap: 24px; border-radius: 8px; border-color: var(--workbench-border-strong);
  background: color-mix(in srgb, var(--workbench-surface-panel) 96%, var(--workbench-text-primary));
  box-shadow: none;
}
.workflow-scene-content .workflow-config-list-copy { gap: 7px; }
.workflow-scene-content .workflow-config-list-copy h2 { font-size: 17px; }
.workflow-scene-content .workflow-config-list-copy > code { font-size: 10px; opacity: .75; overflow-wrap: anywhere; }
.workflow-scene-content .workflow-config-list-meta { min-width: 144px; padding-left: 20px; border-left: 1px solid var(--workbench-border-strong); align-content: center; gap: 10px; }
.workflow-scene-content .workflow-config-open { min-width: 112px; }
.workflow-config-dialog .workflow-dialog-tabs { gap: 8px; padding-top: 12px; padding-bottom: 12px; background: var(--workbench-surface-canvas); }
.workflow-config-dialog .workflow-dialog-tab { min-height: 40px; padding: 0 18px; border: 1px solid transparent; border-radius: 7px; }
.workflow-config-dialog .workflow-dialog-tab[aria-selected="true"] { background: var(--workbench-surface-selected); border-color: color-mix(in srgb, var(--feishu-color-primary) 40%, transparent); }
.workflow-config-dialog .workflow-dialog-tab[aria-selected="true"] > span::after { display: none; }
.workflow-config-dialog .workflow-dialog-tab-panel { background: var(--workbench-surface-canvas); }
.workflow-config-dialog .workflow-scene-form { gap: 20px; padding: 24px; border-color: var(--workbench-border-strong); background: var(--workbench-surface-panel); }
.workflow-config-dialog .workflow-scene-summary { padding: 18px; border-left: 3px solid var(--feishu-color-primary); }
.workflow-config-dialog .workflow-scene-attribute { padding: 18px; background: var(--workbench-surface-canvas); border-color: var(--workbench-border-strong); }
.workflow-config-dialog .workflow-scene-actions { position: sticky; bottom: -24px; margin: 0 -24px -24px; padding: 16px 24px; border-top: 1px solid var(--workbench-border-strong); background: var(--workbench-surface-panel); z-index: 2; }
@media (max-width: 1100px) {
  #workflow-config-records { grid-template-columns: 196px minmax(0, 1fr); }
  .workflow-scene-content { padding: 18px; }
  .workflow-scene-content .workflow-config-card { grid-template-columns: 1fr; gap: 16px; }
  .workflow-scene-content .workflow-config-list-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 14px 0 0; border-left: 0; border-top: 1px solid var(--workbench-border-strong); }
}
@media (max-width: 760px) {
  #workflow-config-records { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .workflow-scene-rail { padding: 16px; border-right: 0; border-bottom: 1px solid var(--workbench-border-strong); }
  .workflow-scene-rail-heading { padding: 0 0 12px; }
  #workflow-config-records .workflow-scene-navigation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #workflow-config-records .workflow-scene-navigation-all { margin-top: 0; border: 1px solid var(--workbench-border-strong); border-radius: 8px; }
  .workflow-scene-content { padding: 16px; gap: 18px; }
  .workflow-scene-content .workflow-scene-list-group { padding: 14px; }
  .workflow-scene-content .workflow-scene-list-heading h2 { font-size: 18px; }
  .workflow-config-dialog .workflow-scene-form { padding: 16px; }
  .workflow-config-dialog .workflow-scene-actions { bottom: -16px; margin: 0 -16px -16px; padding: 14px 16px; }
}

/* Scene management keeps configuration independent of workflow availability. */
.workflow-scene-list-heading > .secondary-button { margin-top: 14px; }
.workflow-scene-list-heading > small { display: block; margin-top: 12px; color: var(--workbench-text-secondary); }
.workflow-scene-content .workflow-scene-definition { margin-top: 12px; overflow-wrap: anywhere; }
.workflow-scene-manager-dialog { width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; overflow: auto; }
.workflow-scene-manager-form { display: grid; min-width: 0; }
.workflow-scene-manager-form > .dialog-heading { position: sticky; top: 0; z-index: 1; margin: 0; padding: 20px 24px; border-bottom: 1px solid var(--workbench-border-strong); background: var(--workbench-surface-panel); }
.workflow-scene-manager-fields { display: grid; gap: 20px; padding: 24px; }
.workflow-scene-manager-fields .workflow-field { display: grid; gap: 8px; font-size: 13px; }
.workflow-scene-manager-fields input, .workflow-scene-manager-fields textarea, .workflow-scene-manager-fields select { width: 100%; min-width: 0; min-height: 40px; padding: 9px 12px; border: 1px solid var(--workbench-border-strong); border-radius: 6px; color: var(--workbench-text-primary); background: var(--workbench-surface-panel); }
.workflow-scene-manager-fields textarea { resize: vertical; }
.workflow-scene-manager-fields input:focus-visible, .workflow-scene-manager-fields textarea:focus-visible, .workflow-scene-manager-fields select:focus-visible { outline: 2px solid var(--feishu-color-primary); outline-offset: 2px; }
.workflow-scene-manager-form > .dialog-actions { position: sticky; bottom: 0; margin: 0; padding: 16px 24px; border-top: 1px solid var(--workbench-border-strong); background: var(--workbench-surface-panel); }
#panel-workflows > .operator-section > .section-heading .section-actions { flex-wrap: wrap; }
@media (max-width: 700px) { #panel-workflows > .operator-section > .section-heading { flex-wrap: wrap; } }

/* Workflow list and independent configuration dialogs; existing platform table tokens. */
#workflow-config-records.workflow-list-records{display:block;padding:0;border:0;background:transparent}
#workflow-search{width:190px;min-height:36px;padding:8px 10px;border:1px solid var(--workbench-border-strong);border-radius:6px;background:var(--workbench-surface-panel);color:var(--workbench-text-primary)}
#panel-workflows .section-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.workflow-live-table{min-width:800px}.workflow-live-table .tenant-table-row{grid-template-columns:minmax(160px,1.25fr) minmax(125px,1fr) 80px 180px}
.workflow-list-ops{display:flex;flex-wrap:wrap;gap:12px}.workflow-list-action{border:0;background:transparent;color:var(--feishu-color-primary);font:inherit;font-size:13px;padding:2px 0;cursor:pointer;text-align:left}
.workflow-list-status{font-size:12px;color:var(--workbench-text-secondary)}.workflow-list-foot{font-size:12px;color:var(--workbench-text-muted);margin-top:14px}
.model-dialog.workflow-independent-dialog{width:min(920px,calc(100vw - 32px));height:auto;max-height:calc(100dvh - 32px)}
.workflow-independent-dialog .workflow-dialog-shell{height:auto;max-height:calc(100dvh - 32px)}
.workflow-independent-dialog .workflow-config-dialog-content{overflow:auto;padding:20px;max-height:calc(100dvh - 210px)}
.workflow-independent-form{display:grid;gap:16px}.workflow-independent-form>button{justify-self:end}.workflow-binding-choice{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--workbench-border-subtle);cursor:pointer}
.workflow-binding-choice span{display:grid;gap:5px}.workflow-binding-choice small{color:var(--workbench-text-muted)}
.workflow-independent-dialog .workflow-presentation-form{display:grid;grid-template-columns:1fr;overflow:visible;height:auto}.workflow-independent-dialog .workflow-presentation-section{display:block}
.workflow-independent-dialog .workflow-detail-editor{overflow:visible;max-height:none}.workflow-independent-dialog .workflow-config-actions{position:sticky;bottom:0;background:var(--workbench-surface-panel);padding:14px 0;border-top:1px solid var(--workbench-border-subtle)}
.workflow-scene-manager-dialog{width:min(680px,calc(100vw - 32px));padding:0;max-height:calc(100dvh - 32px)}
.workflow-scene-manager-form{display:grid;grid-template-rows:auto minmax(0,1fr) auto;max-height:calc(100dvh - 32px)}
.workflow-scene-manager-form>.dialog-heading,.workflow-scene-manager-form>.dialog-actions{padding:18px 22px;margin:0}
.workflow-scene-manager-fields{padding:18px 22px;overflow:auto;display:grid;gap:16px}.workflow-scene-manager-fields .workflow-field{display:grid;gap:8px}.workflow-scene-manager-fields input,.workflow-scene-manager-fields textarea,.workflow-scene-manager-fields select{width:100%;padding:10px;border:1px solid var(--workbench-border-strong);border-radius:6px;background:var(--workbench-surface-panel);color:inherit;font:inherit}
.workflow-scene-manager-row{padding:12px 0;border-bottom:1px solid var(--workbench-border-subtle)}.workflow-scene-manager-row p,.workflow-scene-manager-row small{font-size:12px;color:var(--workbench-text-secondary)}

#workflow-scene-filter{max-width:240px;min-height:36px;padding:8px 10px;border:1px solid var(--workbench-border-strong);border-radius:6px;background:var(--workbench-surface-panel);color:var(--workbench-text-primary);font:inherit}

/* Scene management uses the platform table layout. */
.model-dialog.workflow-scene-list-dialog{width:min(1040px,calc(100vw - 32px));max-width:calc(100vw - 32px)}
.workflow-scene-table{min-width:760px}
.workflow-scene-table .tenant-table-row{grid-template-columns:minmax(190px,1.5fr) minmax(120px,1fr) minmax(180px,1.4fr) 80px 100px}
.workflow-scene-table [role="cell"]{overflow-wrap:anywhere}

.workflow-live-table .tenant-table-row:not(.tenant-table-header),.workflow-scene-table .tenant-table-row:not(.tenant-table-header){background:var(--workbench-surface-panel)}


/* Presentation sections own their forms and save actions. */
.workflow-independent-dialog .workflow-presentation-scope-panel[hidden] { display: none; }
.workflow-presentation-scope-panel { min-width: 0; }
.workflow-presentation-scope-panel > .inline-error { margin: 0 18px 12px; }
.workflow-independent-dialog .workflow-presentation-scope-panel .workflow-config-actions { position: static; padding: 14px 18px; }

/* Billing reuses the enterprise-status table and action components. */
.operator-billing-table{min-width:980px}
.operator-billing-table .tenant-table-row{grid-template-columns:minmax(125px,.9fr) minmax(170px,1.2fr) minmax(235px,1.8fr) 160px minmax(155px,1.1fr) 85px}
.operator-billing-description{color:var(--workbench-text-secondary);font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.operator-billing-price{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--workbench-text-secondary);white-space:nowrap}
.operator-billing-price input{width:78px;min-width:0;height:42px;padding:0 11px;border:1px solid var(--workbench-border-strong);border-radius:9px;background:var(--workbench-surface-panel);color:var(--workbench-text-primary);font:inherit}
.operator-billing-price input:focus-visible{outline:none;border-color:var(--feishu-color-primary);box-shadow:var(--workbench-focus-ring)}
.operator-billing-table .operator-billing-error{grid-column:1/-1;margin:0 14px 12px}
.workflow-list-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:16px}

/* Presentation footer: one fixed action row, scroll only the editor. */
#workflow-config-dialog:has(.workflow-presentation-form) { height: fit-content; min-height: 0; max-height: calc(100dvh - 32px); overflow: hidden; }
#workflow-config-dialog:has(.workflow-presentation-form) .workflow-dialog-shell { display: flex; flex-direction: column; height: auto; min-height: 0; max-height: calc(100dvh - 32px); }
#workflow-config-dialog:has(.workflow-presentation-form) .dialog-heading { flex: none; margin: 0; }
#workflow-config-dialog:has(.workflow-presentation-form) .workflow-dialog-shell > .dialog-actions { display: none; }
#workflow-config-dialog:has(.workflow-presentation-form) .workflow-config-dialog-content { display: flex; flex-direction: column; padding: 0; min-height: 0; max-height: none; overflow: hidden; }
#workflow-config-dialog .workflow-presentation-form { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
#workflow-config-dialog .workflow-presentation-scope-tabs { flex: none; position: static; min-height: 48px; }
#workflow-config-dialog .workflow-presentation-scope-panel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; margin: 0; }
#workflow-config-dialog .workflow-presentation-scope-panel[hidden] { display: none; }
#workflow-config-dialog .workflow-presentation-scroll-body { min-height: 0; overflow: auto; overscroll-behavior: contain; }
#workflow-config-dialog .workflow-presentation-section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 20px 22px; }
#workflow-config-dialog .workflow-presentation-scope-panel .workflow-config-actions { position: static; flex: none; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px 22px; margin: 0; background: var(--workbench-surface-panel); }
#workflow-config-dialog .workflow-presentation-save-controls { display: flex; gap: 10px; margin-left: auto; flex: none; }
#workflow-config-dialog .workflow-config-actions .workflow-detail-toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
#workflow-config-dialog .workflow-config-actions small { flex: 1; }
#workflow-config-dialog .workflow-config-actions:has(.workflow-detail-toolbar) small { flex-basis: 100%; order: 2; }
#workflow-config-dialog .workflow-presentation-scroll-body > .inline-error { margin: 0 22px 12px; }
/* End presentation footer. */

/* Ledger fixed header clearance */
