/* U138 tool-policy B: layout only; controls, type, colors and states use Click parts. */
.u138-tools-b{min-width:0;display:flex;flex-direction:column;gap:var(--sp-4)}
.u138-tools-b .lx-lhead{margin:0;flex-direction:column;align-items:stretch}
.u138-tools-b .lx-ltools{flex-wrap:wrap}
.u138-tools-b .lx-lcard{min-width:0}
.u138-table-scroll{overflow-x:auto;min-width:0}
.u138-rules-table{width:100%;min-width:960px;table-layout:auto}
.u138-history-table{width:100%;min-width:860px;table-layout:auto}
.u138-requests-table{width:100%;min-width:980px;table-layout:auto}
.u138-tools-b .lx-t th{white-space:nowrap}
.u138-tools-b .lx-t td:first-child{min-width:210px;width:28%}
.u138-tools-b .lx-t td:last-child{width:18px}
.u138-tools-b .lx-t :is(th,td):first-child{padding-left:var(--sp-5)}
.u138-tools-b .lx-t :is(th,td):last-child{padding-right:var(--sp-5)}
.u138-tools-b .lx-t .u138-num{text-align:right}
.u138-name{width:100%;text-align:left}
.u138-tools-b .lx-find{flex:0 1 240px}
.u138-tools-b .lx-find input{min-width:0}
.u138-tools-b .lx-dr-bar{margin-bottom:calc(-1 * var(--sp-4))}
.u138-tools-b .lx-dr-sec{min-width:0}
.u138-tools-b .lx-dr-sec .lx-field+.lx-field{margin-top:var(--sp-4)}
.u138-tools-b .lx-dr-foot{position:sticky;bottom:0;margin-top:auto}
.u138-tools-b .lx-dr-foot>.lx-btn:first-child{margin-left:auto}
.u138-tools-b .lx-dr-note{margin:0 var(--sp-6)}
.u138-tools-b .lx-dr-stats{margin:0 var(--sp-6)}
.u138-rules-actions,.u138-rules-header-actions{display:flex;justify-content:flex-end;align-items:center;gap:var(--sp-2)}
.u138-decision-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--sp-2);margin-bottom:var(--sp-4)}
.u138-tools-b .lx-banner-tx{flex:1;min-width:0}
@media(max-width:768px){
  .u138-tools-b .lx-find{flex:1 1 200px}
  .u138-tools-b .lx-dr-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
  .u138-decision-options{grid-template-columns:1fr}
}
.u138-setting-options{display:flex;flex-direction:column;gap:var(--sp-2)}
.u138-form-foot{display:flex;align-items:center;justify-content:flex-end;gap:var(--sp-2);padding:var(--sp-4) var(--sp-6)}
.u138-tools-b [data-gov-picker]{display:flex;flex-direction:column;gap:var(--sp-3)}
.u138-tools-b .lx-dr-sec>.lx-dr-sec{padding-inline:0}

/* U138 common pending: exact diff /tmp/main-poc-issues/work/u138-common-tools-b.diff */
.u138-form-foot{z-index:2;border-top:1px solid var(--divider);background:var(--surface)}
.u138-still{padding:0;border:0;background:transparent;color:var(--danger-ink);font:inherit;font-weight:var(--fw-bold);cursor:pointer}
/* The reference's tool actions share the segment row; keep their list's DOM ownership. */
.ra6-page:has(.u138-tools-b){position:relative}
.u138-tools-b .lx-ltools{width:100%}
.u138-tools-b .lx-ltools>select{width:auto;max-width:100%;flex:0 0 auto;margin:0}
.lx-aside-dr .u138-tools-b{gap:0;min-height:100dvh}
.lx-aside-dr .u138-tools-b .lx-dr-bar{margin-bottom:0}
.lx-aside-dr .u138-tools-b>.lx-dr-acts{padding:0 var(--sp-6) var(--sp-5)}
.lx-aside-dr .u138-tools-b>.lx-dr-note{margin-bottom:var(--sp-4)}
.lx-aside-dr .u138-tools-b>.lx-dr-stats{margin-bottom:var(--sp-5)}
@media(min-width:1000px){
 .ra6-page .u138-rules-actions{position:absolute;top:var(--sp-4);right:calc(var(--ctl-h) + var(--sp-3))}
 .ra6-page .u138-tools-b :is([data-hist-csv],[data-gov-requests-csv]){position:absolute;top:var(--sp-4);right:calc(var(--ctl-h) + var(--sp-3))}
}
/* U138 common pending: native tables in lx-lcard must share the frame once. */
.u138-table-scroll>table.lx-t{border:0;border-radius:0}
/* U138 common pending: plain list decisions reuse the pill's canonical tone and marker. */
.u138-tools-b .lx-pill-st-plain{height:auto;padding:0;border-radius:0;background:transparent;color:var(--ink-3);font-size:var(--fs-sm);font-weight:var(--fw-regular);line-height:var(--lh-body)}
/* U138 common pending: drawer identity tile and short decision note from the supplied reference. */
.u138-tools-b .lx-dr-id>.lx-ico{width:calc(var(--sp-6) * 2);height:calc(var(--sp-6) * 2);border-radius:var(--r-card)}
.u138-tools-b .lx-dr-stat>b{line-height:var(--lh-tight)}
.u138-tools-b textarea[name="note"]{min-height:calc(var(--sp-8) * 2);height:calc(var(--sp-8) * 2)}
.u138-policy-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--sp-2)}
.u138-policy-options>.lx-opt{position:relative;padding-right:var(--sp-8)}
.u138-policy-options>.lx-opt>input{position:absolute;right:var(--sp-3);top:var(--sp-3)}
.u138-label-line{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-2)}
.u138-kind-seg{display:inline-flex;max-width:100%;flex-wrap:wrap;align-items:center}
.u138-kind-seg>.lx-chip,.u138-kind-seg>details>summary{font-size:var(--fs-xs);font-weight:var(--fw-semibold);white-space:nowrap}
.u138-kind-seg>details>summary{height:28px;padding:0 var(--sp-3);border:0;border-radius:var(--r-inner);background:transparent;color:var(--ink-3)}
.u138-kind-seg .lx-fdd-o.lx-on{background:var(--bg-hover);font-weight:var(--fw-semibold)}
.u138-tools-b .lx-dr-bar>.lx-fdd{margin-left:auto}
.u138-tools-b .lx-dr-bar>.lx-fdd+.lx-aside-x{margin-left:0}
.u138-tools-b .lx-fdd-pop .ra6-link{display:block;padding:var(--sp-2) var(--sp-3);text-align:left}
.u138-tools-b .lx-rel-tx{min-width:0}
