.rules-panel>.muted{margin-bottom:16px}.rules-filters{align-items:end;gap:12px;flex-wrap:wrap}.rules-filters label{min-width:130px}.rules-filters input{width:240px}.rules-filters select{width:160px}#rules-result-count{margin:12px 0}.rules-table td{vertical-align:top}.rules-table .rule-name{display:block;white-space:normal;min-width:170px;max-width:230px;line-height:1.7}.rules-table .rule-summary{white-space:normal;min-width:260px;max-width:420px;line-height:1.8}.rule-gap{display:block;font-size:11px;line-height:1.7;white-space:normal;max-width:240px;color:var(--muted);margin-top:4px}.rule-toggle{display:flex;align-items:center;gap:6px;white-space:nowrap;border:0;padding:4px;background:transparent;font-size:12px}.rule-toggle-track{display:block;width:32px;height:18px;border-radius:12px;background:#9aa7b9;padding:2px;flex-shrink:0}.rule-toggle-track i{display:block;background:white;width:14px;height:14px;border-radius:50%;transition:transform .12s}.rule-toggle.is-on .rule-toggle-track{background:var(--blue)}.rule-toggle.is-on .rule-toggle-track i{transform:translateX(14px)}.rule-toggle[aria-busy=true]{opacity:.6}.rule-drawer{inset:0 0 0 auto;margin:0;height:100dvh;max-height:100dvh;width:min(980px,95vw);max-width:95vw;border-radius:0;padding:0;border-right:0;overflow:auto}.rule-drawer-top{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fff;padding:20px 24px;border-bottom:1px solid var(--border)}.rule-drawer-top h2{margin:0;overflow-wrap:anywhere}.rule-drawer-top button{margin:0;flex-shrink:0}#rule-drawer-body{padding:24px}.rule-detail-meta{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}.rule-details{display:grid;grid-template-columns:150px minmax(0,1fr);gap:14px;margin:0 0 20px;line-height:1.8;font-size:13px}.rule-details dt{color:var(--muted)}.rule-details dd{margin:0;overflow-wrap:anywhere;white-space:pre-wrap}.rule-details ul{margin:0;padding-left:18px}.rule-condition-text{background:#f4f7fc;padding:12px;border-radius:6px}.rule-archive-confirm{margin:20px 0;padding:16px;border:1px solid #e7cd9d;background:#fffaf0;border-radius:8px}.rule-archive-confirm[hidden]{display:none}.rule-history{margin-top:25px;padding-top:20px;border-top:1px solid var(--border)}.rule-history h3{margin-bottom:12px}.rule-history-item{border-bottom:1px solid var(--border);padding:12px 0;font-size:12px;line-height:1.8}.rule-history-item summary{cursor:pointer;color:#405779}.rule-history-item p{margin-top:8px;overflow-wrap:anywhere}.rule-history-changes{padding:8px 12px;background:#f7f9fc;max-height:240px;overflow:auto;margin-top:8px}#rule-editor-form{gap:20px}.rule-editor-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.rule-editor-fields input,.rule-editor-fields select{width:100%}#rule-condition-builder{margin-top:12px}.rule-group{min-width:0;border:1px solid #dbe4f1;border-left:3px solid #83a6e5;border-radius:7px;padding:12px;margin:0;background:#fbfcff}.rule-group legend{color:#63758c;padding:0 6px;font-size:11px}.rule-group-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.rule-group-head>label{min-width:0;flex:1}.rule-group-head select{width:230px;max-width:100%}.rule-group-children{display:grid;gap:12px;margin:12px 0}.rule-group .row-actions button,.rule-group-head button,.rule-comparison-head button{margin:0;padding:6px 9px;font-size:12px}.rule-comparison{padding:12px;border:1px solid var(--border);border-radius:6px;background:#fff;min-width:0}.rule-comparison-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;font-size:12px}.rule-comparison-inputs{display:grid;grid-template-columns:minmax(0,1fr) 110px minmax(0,1fr);gap:12px;align-items:start}.rule-expression{min-width:0;display:grid;gap:8px}.rule-expression select,.rule-expression input{width:100%;min-width:0;font-size:12px;padding:8px}.rule-expression label{min-width:0}.rule-op{padding-top:0}.rule-op select{width:100%;font-size:12px;padding:8px}.rule-function-args{display:grid;gap:8px;border-left:2px solid #e1e8f2;padding-left:8px}.rule-function-args>div>small{font-size:10px}.rule-expression .rule-gap{max-width:none}.rule-summary-preview{background:#edf3ff;border:1px solid #d9e6fb;padding:14px;border-radius:7px}.rule-summary-preview h3{font-size:12px;color:#46618c}.rule-summary-preview p{margin-top:8px;line-height:1.8;font-size:13px;overflow-wrap:anywhere}.rule-editor-footer{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.rule-editor-footer button{margin:0}.rule-drawer .row-actions button{margin-top:0}.rule-drawer #rule-editor-error[hidden]{display:none}
.rule-editor-fields .checkbox input{width:auto}.rule-source{padding:16px 0;border-top:1px solid var(--border);margin-top:20px;font-size:12px}.rule-source summary{cursor:pointer}.rule-source p{white-space:pre-wrap;margin-top:10px}.rule-incomplete{padding:12px;background:#fff8eb;border:1px solid #ecd7ac;border-radius:6px}.rule-incomplete button{margin-top:10px}
.rule-ready-cell,.rule-sources-cell{min-width:200px;white-space:normal!important}.rule-blockers,.rule-sources-cell details{margin-top:8px;font-size:12px;max-width:320px}.rule-blockers summary,.rule-sources-cell summary{cursor:pointer;color:#345d99}.rule-issues,.rule-dependencies{padding-left:17px;margin:10px 0;white-space:normal;max-width:none;min-width:0}.rule-issues li,.rule-dependencies li{margin-bottom:12px;line-height:1.8;overflow-wrap:anywhere}.rule-issues li>b{display:block;margin-top:4px}.rule-issues p,.rule-dependencies p{white-space:normal;margin:4px 0;font-size:12px;overflow-wrap:anywhere}.rule-dependencies .badge{white-space:normal}.rule-issues li>small{color:var(--muted)}.rules-filters label{min-width:0}.rule-reasons-toolbar{display:flex;gap:12px;flex-wrap:wrap;align-items:end;margin-top:18px}.rule-reasons-toolbar label{min-width:0}.rule-reasons-toolbar select{width:150px}.rule-reasons-toolbar input{width:240px}#rule-reasons-context{margin:14px 0}.rule-reason-group{border-top:1px solid var(--border);padding-top:20px;margin-top:20px}.rule-reason-group>.panel-head{margin-bottom:12px}.rule-reason-table td{white-space:normal;vertical-align:top;min-width:130px;max-width:340px;overflow-wrap:anywhere;line-height:1.8}.rule-reason-table td:first-child{min-width:190px}.rule-reason-table td:nth-child(2){min-width:250px}.rule-reason-table td strong{display:block;margin-top:5px}.rule-reason-links{display:grid;gap:6px;min-width:160px}.rule-reason-links button{white-space:normal;text-align:left;padding:4px 7px;font-size:11px;line-height:1.6}.rule-reasons-panel>.muted{max-width:900px}#rule-reasons-error[hidden]{display:none}
.rule-evidence-summary{white-space:normal;line-height:1.8;font-size:12px;min-width:180px}.rule-required-fields{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}.rule-required-calculations{margin:10px 0;padding-left:20px;font-size:12px;line-height:1.8;overflow-wrap:anywhere}.rule-extra-evidence{margin-top:14px;border:1px solid var(--border);border-radius:7px;padding:12px;font-size:12px}.rule-extra-evidence summary{cursor:pointer;color:#345d99}.rule-extra-evidence>p{margin:10px 0}.rule-extra-field-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.rule-extra-field-grid .checkbox{align-items:start;line-height:1.6;overflow-wrap:anywhere;min-width:0}.rule-extra-field-grid input{width:auto;flex-shrink:0;margin-top:3px}#rule-editor-evidence>h3{margin-bottom:7px}
@media(max-width:700px){.rule-extra-field-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.rule-required-fields .badge{white-space:normal;overflow-wrap:anywhere}.rule-extra-evidence{padding:10px}}
@media(max-width:700px){.rule-reasons-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.rule-reasons-toolbar>label:last-of-type{grid-column:1/-1}.rule-reasons-toolbar input,.rule-reasons-toolbar select{width:100%}.rule-reasons-toolbar .month-picker{width:100%}.rule-reasons-panel{min-width:0}.rule-reason-group{min-width:0}.rule-reason-group>.panel-head{align-items:start}.rule-reason-group>.panel-head>span{width:100%}.rule-details .rule-issues,.rule-details .rule-dependencies{padding-left:14px}}
@media(max-width:700px){.rules-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.rules-filters label{min-width:0}.rules-filters input,.rules-filters select{width:100%}.rules-filters>label:first-child{grid-column:1/-1}.rule-drawer{width:100vw;max-width:100vw}.rule-drawer-top{padding:16px}.rule-drawer-top h2{font-size:16px}#rule-drawer-body{padding:16px}.rule-details{grid-template-columns:1fr;gap:6px}.rule-details dd{margin-bottom:10px}.rule-editor-fields{grid-template-columns:1fr}.rule-comparison-inputs{grid-template-columns:1fr}.rule-group{padding:8px}.rule-group-children{gap:10px}.rule-comparison{padding:10px}.rule-op select{max-width:180px}.rule-group-head select{width:100%}.rule-summary-preview{padding:10px}}
.policy-pages{display:grid;gap:12px}.policy-page{border:1px solid var(--border);border-radius:8px;padding:12px;min-width:0}.policy-page summary{cursor:pointer;font-weight:600}.policy-page .row-actions{margin:12px 0}.policy-page .table-wrap{max-height:320px}.policy-page th:not(:first-child),.policy-page td:not(:first-child){text-align:center;width:70px}.policy-page input[type=checkbox]{width:auto}.policy-page .checkbox{display:flex;align-items:center;gap:6px}.permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.rules-table .rule-summary{min-width:240px;max-width:480px}.rules-table th{white-space:nowrap}@media(max-width:700px){.permission-grid{grid-template-columns:1fr}.policy-page .row-actions{flex-wrap:wrap}.policy-page{padding:8px}}

/* Labeled filter inputs must not shrink inside their column flex layout. */
.settings-filters>label>input,.settings-filters>label>select{flex:none;height:38px;min-height:38px;box-sizing:border-box;padding:8px 10px;font-size:13px;line-height:20px}
