/* Treasury operations workspace — configuration area (presentation only; every rule is scoped under .bcrm-tr). RTL-first, uses the existing CRM tokens. */
.bcrm.bcrm-tr{--tr-border:var(--bcrm-border,#dfe6ef);--tr-muted:var(--bcrm-muted,#64748b);--tr-primary:var(--bcrm-primary,#1d4ed8);--tr-bg:#fff;--tr-soft:#f6f8fb;display:block;max-width:none;width:100%}
.bcrm.bcrm-tr *,.bcrm.bcrm-tr *::before,.bcrm.bcrm-tr *::after{box-sizing:border-box}
.bcrm.bcrm-tr h2{font-size:15px;font-weight:700;margin:20px 0 8px}
.bcrm.bcrm-tr .description{color:var(--tr-muted);margin:0 0 10px}
.bcrm.bcrm-tr [hidden]{display:none!important}

.bcrm.bcrm-tr .bcrm-tr-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:14px;margin:0 0 14px;align-items:start}
.bcrm.bcrm-tr .bcrm-tr-card{background:var(--tr-bg);border:1px solid var(--tr-border);border-radius:12px;padding:14px 16px;min-width:0;margin:0 0 14px}
.bcrm.bcrm-tr .bcrm-tr-grid>.bcrm-tr-card{margin:0}
.bcrm.bcrm-tr .bcrm-tr-card h3{font-size:14px;font-weight:700;margin:0 0 4px}
.bcrm.bcrm-tr .bcrm-tr-state{margin:0 0 2px;font-size:13px}
.bcrm.bcrm-tr .bcrm-tr-state b{font-weight:700}
.bcrm.bcrm-tr .bcrm-tr-help{margin:0 0 8px;font-size:12px;color:var(--tr-muted)}

.bcrm.bcrm-tr form.bcrm-tr-form{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr));gap:10px;align-items:end;margin:10px 0 0!important}
.bcrm.bcrm-tr .bcrm-tr-f{display:flex;flex-direction:column;gap:4px;margin:0;font-size:12px;color:var(--tr-muted);min-width:0}
.bcrm.bcrm-tr .bcrm-tr-f input[type=text],.bcrm.bcrm-tr .bcrm-tr-f select{width:100%;min-height:36px;padding:6px 10px;border:1px solid var(--tr-border);border-radius:8px;background:#fff;color:inherit;font:inherit}
.bcrm.bcrm-tr .bcrm-tr-f input[name=date],.bcrm.bcrm-tr .bcrm-tr-f input[name=effective_from],.bcrm.bcrm-tr .bcrm-tr-f input[name=effective_to]{direction:ltr;text-align:right}
.bcrm.bcrm-tr .bcrm-tr-check{flex-direction:row;align-items:center;gap:8px;min-height:36px;color:inherit}
.bcrm.bcrm-tr .bcrm-tr-form .button{min-height:36px;padding:6px 16px;border-radius:8px;justify-self:start;align-self:end}

.bcrm.bcrm-tr details.bcrm-tr-rule{border:1px solid var(--tr-border);border-radius:10px;background:var(--tr-soft);margin:8px 0;padding:8px 12px}
.bcrm.bcrm-tr details.bcrm-tr-rule>summary{display:flex;flex-wrap:wrap;gap:6px 8px;align-items:center;cursor:pointer;font-size:12px}
.bcrm.bcrm-tr details.bcrm-tr-rule[open]>summary{margin-bottom:6px}
.bcrm.bcrm-tr details.bcrm-tr-rule.is-new>summary{color:var(--tr-primary)}
.bcrm.bcrm-tr .bcrm-tr-chip{display:inline-block;padding:2px 10px;border:1px solid var(--tr-border);border-radius:999px;background:#fff;font-size:12px}
.bcrm.bcrm-tr .bcrm-tr-chip i{font-style:normal;color:var(--tr-muted)}
.bcrm.bcrm-tr details.bcrm-tr-rule>summary em{margin-inline-start:auto;font-style:normal;color:var(--tr-primary)}

/* v0.8.66.37 — business-language settings, readiness, calendar markers */
.bcrm.bcrm-tr .bcrm-callout{padding:10px 14px;border-radius:10px;border:1px solid #fde68a;background:#fffbeb;color:#78350f;margin:0 0 12px;font-size:12px}
.bcrm.bcrm-tr .bcrm-callout.is-info{border-color:#bfdbfe;background:#eff6ff;color:#1e3a8a}
.bcrm.bcrm-tr .bcrm-callout ul{margin:6px 18px}
.bcrm.bcrm-tr fieldset.bcrm-tr-state-choice{border:0;padding:0;margin:0;display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.bcrm.bcrm-tr .bcrm-tr-state-choice legend{font-size:12px;color:var(--tr-muted);padding:0 0 4px;float:right;width:100%}
.bcrm.bcrm-tr .bcrm-tr-state-choice label{display:inline-flex;gap:6px;align-items:center;color:inherit}
.bcrm.bcrm-tr details.bcrm-tr-advanced{margin:0 0 14px}
.bcrm.bcrm-tr details.bcrm-tr-advanced>summary{cursor:pointer;color:var(--tr-primary);font-size:13px;margin:0 0 8px}
.bcrm.bcrm-tr .bcrm-tr-nav{margin:0 0 8px}
.bcrm.bcrm-tr .bcrm-ws-tablewrap{overflow-x:auto;border:1px solid var(--tr-border);border-radius:12px;background:#fff;margin:0 0 14px}
.bcrm.bcrm-tr .bcrm-ws-tablewrap table{width:100%;border:0;margin:0}
.bcrm.bcrm-tr tr.is-today td{background:#eff6ff}
.bcrm.bcrm-tr .bcrm-badge{display:inline-block;padding:1px 8px;border-radius:999px;font-size:11px;background:#eef2f7;border:1px solid #d9e1ec}
.bcrm.bcrm-tr .bcrm-st-work{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}
.bcrm.bcrm-tr .bcrm-st-wait{background:#fefce8;border-color:#fde68a;color:#854d0e}

/* Keep mobile queue/calendar columns readable; overflow belongs to each table. */
.bcrm.bcrm-tr .bcrm-ws-tablewrap{width:100%;max-width:100%;min-width:0;overscroll-behavior-x:contain}
@media(max-width:700px){.bcrm.bcrm-tr .bcrm-ws-tablewrap>table{min-width:720px}.bcrm.bcrm-tr .bcrm-ws-tablewrap td,.bcrm.bcrm-tr .bcrm-ws-tablewrap th{word-break:normal}}
.bcrm-tr .bcrm-force-choice input[type=checkbox],.bcrm-force-choice input[type=checkbox]{width:18px!important;height:18px!important;min-height:18px!important;max-height:18px!important}.bcrm-force{max-width:100%;min-width:0}.bcrm-force summary{cursor:pointer;font-weight:600}.bcrm-force p{line-height:1.9}

/* Return workflow context; all selectors remain Treasury scoped. */
.bcrm-tr .bcrm-tr-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.bcrm-tr .bcrm-tr-badge{display:inline-block;border:1px solid var(--tr-border);border-radius:8px;padding:5px 9px;background:var(--tr-soft);font-size:12px}
.bcrm-tr .bcrm-tr-totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;margin:10px 0}
.bcrm-tr .bcrm-tr-totals>div,.bcrm-tr .bcrm-tr-source,.bcrm-tr .bcrm-tr-return{border:1px solid var(--tr-border);background:var(--tr-soft);border-radius:8px;padding:10px;margin:8px 0}
.bcrm-tr .bcrm-tr-totals dt{font-weight:700}.bcrm-tr .bcrm-tr-totals dd{margin:5px 0;font-size:12px}
.bcrm-tr .bcrm-tr-source{min-width:220px}.bcrm-tr .bcrm-tr-return form{display:flex!important;flex-wrap:wrap;gap:6px}
.bcrm-tr .bcrm-tr-return input{max-width:100%;min-width:0}.bcrm-tr .bcrm-tr-overview nav a{display:inline-block;padding:6px}

/* TREASURY-007: read-only operational visibility for a payment that is prepared but not executed (presentation only; no action, no state). */
.bcrm.bcrm-tr tr.bcrm-tr-prepared>td{background:#fffbeb}
.bcrm.bcrm-tr .bcrm-tr-prep{border:1px solid #fde68a;border-inline-start:4px solid #f59e0b;background:#fffdf5;border-radius:8px;padding:8px 10px;margin:6px 0 2px;font-size:12px}
.bcrm.bcrm-tr .bcrm-tr-prep-title{margin:0 0 6px;font-size:13px}
.bcrm.bcrm-tr .bcrm-tr-prep-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:4px 12px;margin:0}
.bcrm.bcrm-tr .bcrm-tr-prep-fields>div{min-width:0}
.bcrm.bcrm-tr .bcrm-tr-prep-fields dt{color:var(--tr-muted);font-size:11px}
.bcrm.bcrm-tr .bcrm-tr-prep-fields dd{margin:0;overflow-wrap:anywhere}
.bcrm.bcrm-tr .bcrm-tr-prep-warning{margin:8px 0 0;padding:6px 8px;border-radius:6px;border:1px solid #fcd34d;background:#fef3c7;color:#78350f;font-weight:600}
.bcrm-tr-early-warning{display:block;margin:4px 0;color:#8a2424;font-weight:600}
