/* Formulator (Lab) */
.fx-toolbar{display:flex;align-items:center;gap:12px;margin:0 0 6px}
.fx-toolbar input{width:340px;height:36px;border:1px solid #cbdadd;border-radius:7px;padding:0 10px;font:inherit;font-size:13px}
.fx-missing{color:#a3542b;font-weight:600}
.formulator .crm-table td small{display:block}
.fx-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(420px,1fr));gap:12px;align-items:start}
.fx-card{margin:0}
.fx-card h2{font-size:14px;margin:0 0 4px}
.fx-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px;margin:8px 0}
.fx-fields label,.fx-card>div>label{display:block;font-size:12px;font-weight:600;margin:0 0 5px;color:#2c5764}
.fx-fields input,.fx-fields textarea,.fx-card textarea,.fx-spec input{width:100%;box-sizing:border-box;border:1px solid #cbdadd;border-radius:7px;padding:8px 10px;font:inherit;font-size:13px;background:#fff}
.fx-fields small{display:block;font-size:11px;color:#6a7e83;margin-top:3px}
.fx-radio{display:flex;gap:9px;align-items:flex-start;padding:8px 10px;border:1px solid #d6e2e4;border-radius:8px;margin:6px 0;cursor:pointer}
.fx-radio:has(input:checked){border-color:#1286a0;background:#eef7fa}
.fx-radio input{margin-top:3px}.fx-radio strong{display:block;font-size:13px;color:#173f4a}.fx-radio small{display:block;font-size:11.5px;color:#5c757c}
.fx-check{display:flex!important;gap:8px;align-items:center;font-weight:400!important;font-size:13px!important;color:#173f4a!important;margin:6px 0!important}
.fx-check input{width:auto;margin:0}
.fx-example{font-size:12px;color:#45616a;background:#f4f8f9;border-radius:6px;padding:7px 10px;margin:8px 0 0}
.fx-spec{display:grid;grid-template-columns:1.2fr .6fr 2fr 28px;gap:6px;margin-bottom:6px;align-items:center}
.fx-spec .crm-close{font-size:18px;padding:0}
.fx-save{position:sticky;bottom:0;display:flex;justify-content:flex-end;align-items:center;gap:12px;padding:10px 0;margin-top:10px;background:linear-gradient(transparent,#f4f8f9 30%)}
.fx-dialog{max-width:820px}
.fx-subs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 12px;max-height:180px;overflow:auto;border:1px solid #d6e2e4;border-radius:7px;padding:8px}
.fx-subs label{display:flex;gap:6px;align-items:center;font-weight:400;font-size:12.5px;margin:0}
.fx-subs input{width:auto}
.fx-radio input[type=radio],.fx-check input[type=checkbox],.fx-subs input[type=checkbox]{width:16px!important;height:16px!important;min-height:0!important;flex:0 0 16px;margin:2px 0 0;padding:0}
.fx-radio{align-items:flex-start}.fx-radio span{flex:1}
.fx-check{min-height:0!important;line-height:1.4}
.fx-save{background:#f4f8f9;border-top:1px solid #d6e2e4;padding:10px 4px}
.fx-subs label{padding:3px 0}
/* Formula editor */
.fx-right{margin-left:auto;display:flex;gap:8px}
.fx-edhead{display:flex;align-items:center;gap:12px;margin:0 0 8px}
.fx-edhead h2{margin:0;font-size:17px;color:#173f4a}.fx-edhead h2 small{font-size:12px;color:#6a7e83;font-weight:400}
.fx-fields-4{grid-template-columns:repeat(4,minmax(0,1fr))}.fx-span2{grid-column:span 2}
.fx-fields select{width:100%;box-sizing:border-box;border:1px solid #cbdadd;border-radius:7px;padding:8px 10px;font:inherit;font-size:13px;background:#fff}
.formulator .fx-card{margin-bottom:12px}
.fx-lines-head{display:flex;justify-content:space-between;align-items:center}.fx-lines-head h2{margin:0}
.fx-lines-head label{font-size:12px;color:#45616a;display:flex;align-items:center;gap:6px}.fx-lines-head input{width:90px;border:1px solid #cbdadd;border-radius:6px;padding:5px 8px;font:inherit;font-size:13px}
.fx-lines td{vertical-align:middle;padding:6px 8px}
.fx-lines select,.fx-lines input:not([type=checkbox]),.fx-spectable input:not([type=checkbox]){width:100%;box-sizing:border-box;border:1px solid #cbdadd;border-radius:6px;padding:6px 8px;font:inherit;font-size:13px;background:#fff}
.fx-lines input.num{text-align:right;width:100px}
.fx-lines td:nth-child(2){min-width:260px}.fx-lines td:nth-child(8){min-width:160px}
.fx-phase{font-weight:700;text-align:center;color:#173f4a}
.fx-handling{display:block;color:#8a4b12;font-weight:600;font-size:11px;margin-top:2px}
.fx-center{text-align:center}.fx-center input{width:16px;height:16px}
.fx-row-tools{white-space:nowrap}.fx-row-tools button{border:1px solid #d6e2e4;background:#fff;border-radius:5px;padding:3px 7px;margin-left:3px;cursor:pointer;color:#45616a;font-size:12px}
.fx-adjusted td{background:#fbf7ec}
.fx-steprow td{padding:5px 8px}.fx-steprow select{width:120px!important;display:inline-block;margin-right:6px}.fx-steprow input{width:calc(100% - 132px)!important;display:inline-block}
.fx-step-stop td{background:#fff3d7}.fx-step-note td{background:#eef6f8}
.fx-auto td{font-weight:600;color:#6b4300}.fx-auto small{font-weight:400;color:#8a6b2b}
.fx-actions{display:flex;gap:8px;margin:8px 0}
.fx-spectable td{padding:5px 8px}.fx-spectable td:first-child{min-width:220px}.fx-spectable input{max-width:200px}
.fx-lines td small{display:block;font-size:11px;color:#6a7e83}
.formulator .settings-card{max-width:none}
.fx-lines td[data-calc^="amt-"] strong{white-space:nowrap}
.fx-lines td[data-calc^="amt-"]{min-width:120px}
.fx-lines td:nth-child(4){white-space:nowrap}
/* Review and approval */
.fx-status{display:inline-block;border-radius:20px;padding:3px 10px;font-size:11.5px;font-weight:600;background:#e9eef0;color:#45616a}
.fx-status-reviewed{background:#e3eef9;color:#1f5d8c}.fx-status-approved{background:#e3f4ea;color:#21613f}.fx-status-archived{background:#eee;color:#777}
.formulator td .fx-status+small{display:block}
.fx-banner{border-radius:8px;padding:9px 12px;margin:0 0 10px;font-size:13px;background:#f1f6f8;border:1px solid #d6e2e4;color:#2c5764}
.fx-banner-ok{background:#e9f6ee;border-color:#bfe0cb;color:#21613f}.fx-banner-off{background:#f3f3f3;color:#666}
.fx-revisions{font-size:12.5px;color:#45616a;margin:0 0 10px}
.fx-inline{margin:0 0 0 14px!important}
.fx-ask textarea{width:100%;box-sizing:border-box;border:1px solid #cbdadd;border-radius:7px;padding:8px;font:inherit}
.fx-history table td{padding:6px 8px;font-size:12.5px}
#fx-ed-msg.fx-ok{color:#21613f}
