/* Shared prototype controls: source DOM stays interactive; no cloned action columns. */
:root { --overlay-backdrop: #10182838; --drawer-shadow: -10px 0 32px #00000012; }
.ui-dialog { position:fixed; inset:0 0 0 auto; margin:0; width:560px; max-width:100vw; height:100dvh; max-height:100dvh; padding:0; border:0; border-left:1px solid var(--border-subtle); background:var(--white); color:var(--neutral-800); box-shadow:var(--drawer-shadow); }
.ui-dialog[open] { display:flex; flex-direction:column; }
.ui-dialog::backdrop { background:var(--overlay-backdrop); }
.ui-dialog .m-head,.ui-dialog .m-foot { display:flex; align-items:center; gap:var(--space-sm); flex-shrink:0; padding:var(--space-md) var(--space-lg); }
.ui-dialog .m-head { justify-content:space-between; border-bottom:1px solid var(--border-subtle); }
.ui-dialog .m-head h3 { margin:0; font-size:16px; font-weight:600; }
.ui-dialog .m-foot { justify-content:flex-end; border-top:1px solid var(--border-subtle); }
.ui-dialog .m-body { flex:1; min-height:0; overflow:auto; padding:var(--space-lg); }
.ui-dialog-error { color:var(--danger); font-size:13px; margin:0; padding:12px var(--space-lg); }
.ui-dialog-error:empty { display:none; }
.ui-dialog .picker-row { min-height:52px; cursor:pointer; gap:12px; }
.ui-dialog .picker-row small { margin-left:auto; color:var(--neutral-500); }
.ui-dialog input[type=checkbox] { accent-color:var(--primary); }

/* Indicator association picker: a full-height three-pane transfer workflow. */
.ui-picker-indicator {
  inset: 0;
  width: 100vw;
  max-width: 100vw;
  border: 0;
  box-shadow: none;
}
.ui-picker-indicator .m-head { padding: 20px 32px; }
.ui-picker-indicator .m-head h3 { font-size: 20px; }
.ui-picker-indicator .m-body { min-height: 0; padding: 24px 32px; overflow: hidden; }
.ui-picker-indicator .m-foot { padding: 16px 32px; }
.indicator-picker { display: flex; min-width: 0; min-height: 0; height: 100%; gap: 24px; }
.indicator-picker-tree { display: flex; width: 30%; min-width: 230px; min-height: 0; flex-direction: column; border: 1px solid var(--border-subtle); border-radius: 4px; background: var(--white); }
.indicator-picker-tree-title { flex: 0 0 auto; padding: 20px 20px 14px; font-size: 18px; font-weight: 600; color: var(--neutral-800); }
.indicator-picker-tree-search { position: relative; display: block; flex: 0 0 auto; margin: 0 20px 12px; }
.indicator-picker-tree-search input { width: 100%; height: 42px; padding: 0 40px 0 14px; border: 1px solid var(--border-default); border-radius: 6px; background: var(--white); }
.indicator-picker-tree-search svg { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; color: var(--neutral-400); pointer-events: none; }
.indicator-picker-tree-scroll { min-height: 0; overflow: auto; padding: 0 12px 16px; }
.ui-picker-tree-row { display: flex; min-height: 40px; align-items: center; gap: 8px; padding: 7px 10px; padding-left: calc(10px + var(--tree-depth) * 22px); border-radius: 6px; color: var(--neutral-700); font-size: 14px; cursor: pointer; }
.ui-picker-tree-row:hover { background: var(--neutral-50); }
.ui-picker-tree-row.is-active { background: var(--primary-50); color: var(--primary-700); }
.ui-picker-tree-row > span[data-indicator-tree-toggle-wrap] { display: inline-flex; width: 16px; height: 18px; flex: 0 0 16px; align-items: center; justify-content: center; }
.ui-picker-tree-arrow { display: inline-flex; width: 16px; height: 18px; align-items: center; justify-content: center; padding: 0; color: var(--neutral-500); }
.ui-picker-tree-arrow svg { width: 12px; height: 12px; transition: transform .16s ease; }
.ui-picker-tree-arrow.is-expanded svg { transform: rotate(90deg); }
.ui-picker-tree-arrow.is-empty { pointer-events: none; }
.ui-picker-tree-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.indicator-picker-stage { display: flex; min-width: 0; min-height: 0; flex: 1; flex-direction: column; gap: 24px; }
.indicator-picker-filter { display: flex; min-height: 74px; flex: 0 0 auto; align-items: center; gap: 14px; padding: 20px 24px; border: 1px solid var(--border-subtle); border-radius: 4px; }
.indicator-picker-filter label { flex: 0 0 auto; color: var(--neutral-800); font-size: 16px; font-weight: 500; }
.indicator-picker-filter input { width: min(440px, 42vw); height: 42px; }
.indicator-picker-filter .btn { height: 42px; min-width: 84px; }
.indicator-picker-transfer-layout { display: grid; min-height: 0; flex: 1; grid-template-columns: minmax(260px, 1fr) 112px minmax(260px, 1fr); gap: 16px; }
.indicator-picker-panel { display: flex; min-width: 0; min-height: 0; flex-direction: column; border: 1px solid var(--border-subtle); border-radius: 4px; background: var(--white); }
.indicator-picker-panel-head { display: flex; min-height: 64px; flex: 0 0 auto; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--border-subtle); }
.indicator-picker-panel-head h4 { margin: 0; color: var(--neutral-800); font-size: 16px; font-weight: 500; }
.indicator-picker-panel-head .btn-text { color: var(--neutral-400); font-size: 14px; }
.indicator-picker-panel-head .btn-text:not(:disabled):hover { color: var(--primary-700); }
.indicator-picker-list-head { display: flex; min-height: 48px; flex: 0 0 auto; align-items: center; padding: 0 20px; border-bottom: 1px solid var(--border-subtle); color: var(--neutral-500); font-size: 14px; }
.indicator-picker-list-head label { display: inline-flex; align-items: center; gap: 12px; }
.indicator-picker-list { min-height: 0; flex: 1; overflow: auto; }
.indicator-picker-row { display: flex; min-height: 48px; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--neutral-100); color: var(--neutral-800); font-size: 14px; cursor: pointer; }
.indicator-picker-row:hover { background: var(--neutral-50); }
.indicator-picker-row input { flex: 0 0 auto; }
.indicator-picker-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.indicator-picker-empty { display: grid; min-height: 180px; place-items: center; color: var(--neutral-400); font-size: 14px; }
.indicator-picker-pagination { display: flex; min-height: 52px; flex: 0 0 auto; align-items: center; justify-content: center; gap: 10px; border-top: 1px solid var(--border-subtle); color: var(--neutral-500); font-size: 12px; }
.indicator-picker-pagination .pg-btn { min-width: 56px; height: 30px; padding: 0 10px; border: 1px solid var(--border-default); border-radius: 4px; color: var(--neutral-600); }
.indicator-picker-pagination .pg-btn:disabled { color: var(--neutral-300); cursor: not-allowed; }
.indicator-picker-actions { display: flex; min-width: 0; flex-direction: column; align-items: stretch; justify-content: center; gap: 12px; }
.indicator-picker-actions .btn { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.indicator-picker-actions svg { width: 16px; height: 16px; }
@media(max-width:1100px) {
  .ui-picker-indicator .m-body { padding-inline: 20px; }
  .ui-picker-indicator .m-head { padding-inline: 20px; }
  .ui-picker-indicator .m-foot { padding-inline: 20px; }
  .indicator-picker { gap: 16px; }
  .indicator-picker-tree { min-width: 210px; }
  .indicator-picker-transfer-layout { grid-template-columns: minmax(220px, 1fr) 100px minmax(220px, 1fr); gap: 12px; }
}
@media(max-width:820px) {
  .ui-picker-indicator .m-body { overflow: auto; }
  .indicator-picker { min-height: 0; flex-direction: column; }
  .indicator-picker-tree { width: 100%; min-width: 0; min-height: 230px; max-height: 34vh; }
  .indicator-picker-stage { min-height: 620px; }
  .indicator-picker-filter input { width: auto; min-width: 0; flex: 1; }
  .indicator-picker-transfer-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(300px, 1fr) auto minmax(300px, 1fr); }
  .indicator-picker-actions { flex-direction: row; justify-content: center; }
  .indicator-picker-actions .btn { min-width: 100px; }
}
.ui-category-row { display:flex; gap:12px; align-items:center; margin-bottom:12px; }
.ui-category-row .input { flex:1; min-width:0; }
.ui-category-row .text-sm { white-space:nowrap; }
.resource-actions { text-align:right; }
.native-sticky-table > thead > tr > th:last-child,
.native-sticky-table > tbody > tr > td:last-child:not([colspan]) { position:sticky; right:0; background:var(--white); z-index:1; white-space:nowrap; }
.native-sticky-table > thead > tr > th:last-child { z-index:2; }
@media(max-width:820px) {
  body .list-workbench.list-workbench, body[data-page] .list-workbench.list-workbench { grid-template-columns:minmax(0,1fr) !important; height:auto; min-height:0; overflow:visible; }
  .list-workbench > .cat-tree-panel, .list-workbench > .list-rail { max-height:180px; width:auto; display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; }
  .list-workbench .ctp-head,.list-workbench .list-rail-head { width:100%; margin-bottom:4px; }
  .list-workbench .cat-tree-item,.list-workbench .std-category { width:auto; display:inline-flex; gap:8px; white-space:nowrap; margin:0; }
  .list-workbench .std-categories { width:100%; display:flex; flex-direction:row; overflow:auto; gap:8px; }
  .list-workbench .std-category { flex:0 0 auto; }
  .list-workbench .cat-tree-item .cti-count { margin-left:4px; }
  .std-reference > .flex { flex-wrap:wrap; }
  .std-reference > .flex .select { flex:1; min-width:180px; }
  .std-reference > .flex .btn-text { white-space:nowrap; flex-shrink:0; }
  .list-workbench .list-main { min-width:0; }
  .list-workbench .table-wrap { overflow:auto; }
  .list-workbench table.t { table-layout:auto; min-width:680px; }
  .native-sticky-table > tbody > tr > td:last-child:not([colspan]), .native-sticky-table > thead > tr > th:last-child { position:static !important; }
  .ui-dialog input,.ui-dialog select,.ui-dialog textarea { font-size:16px; }
  .ui-dialog .m-foot { padding-bottom:calc(var(--space-md) + env(safe-area-inset-bottom)); }
}

/* Inline actions share alignment regardless of whether they navigate or mutate. */
.btn-text { display:inline-flex; align-items:center; justify-content:center; vertical-align:middle; }
.std-reference > .flex, table.t td > .flex { align-items:center; }
/* Sticky cells must use the surrounding scroller, not a clipped table. */
table.t.native-sticky-table { overflow:visible; }
.btn-text[hidden] { display:none; }
#plan-table { min-width:0; width:100%; table-layout:auto; }
#plan-table th,#plan-table td { white-space:normal; }
#plan-table .resource-actions { white-space:nowrap; }
