/* A single settings surface; section labels and controls share a steady grid. */
.rs-layout{background:var(--sy-surface,#fff);border:1px solid var(--sy-border,#e2e8f0);border-radius:10px;overflow:hidden;color:var(--sy-text,#2c3245)}
.rs-layout .rs-card{display:grid;grid-template-columns:164px minmax(0,1fr);gap:24px;padding:26px 28px;border:0;border-radius:0;background:transparent;min-width:0}
.rs-layout .rs-card+.rs-card{border-top:1px solid var(--sy-border,#e2e8f0)}
.rs-card header{padding-top:2px}.rs-card h3{margin:0 0 8px;font-size:14px;font-weight:600;line-height:22px}.rs-scope{display:block;font-size:12px;color:var(--sy-muted,#8490a5);line-height:20px}
.rs-content{min-width:0;max-width:940px}.rs-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;max-width:680px}.rs-rules-fields{grid-template-columns:repeat(3,minmax(0,1fr));max-width:940px}.rs-field{min-width:0}.rs-fields .fld{margin:0;min-width:0}.rs-fields .fld label,.rs-add label{font-size:13px;line-height:20px;margin:0 0 8px;color:var(--sy-text,#2c3245)}
.rs-hint{font-size:12px;line-height:20px;color:var(--sy-muted,#7b879b);margin:0 0 14px}.rs-field .rs-hint{margin:6px 0 0}.rs-layout input,.rs-layout select{width:100%;height:36px;box-sizing:border-box;border:1px solid var(--sy-border,#e2e8f0);border-radius:6px;padding:0 10px;background:var(--sy-surface,#fff);color:var(--sy-text,#2c3245);font:inherit;font-size:13px;outline:none;box-shadow:none}.rs-layout input:focus,.rs-layout select:focus{border-color:var(--sy-primary,#5f7cf4);box-shadow:0 0 0 2px var(--sy-primary-soft,#eef1ff)}
.rs-layout button.btn{height:34px;min-height:34px;border-radius:6px;padding:0 14px;font-size:13px;white-space:nowrap}.rs-card footer{margin-top:18px;display:flex;justify-content:flex-start}.rs-details{margin-top:12px;font-size:12px;line-height:20px;color:var(--sy-muted,#7b879b)}.rs-details summary{display:list-item;width:fit-content;cursor:pointer;color:var(--sy-muted,#7b879b)}.rs-details summary:hover{color:var(--sy-primary,#5f7cf4)}.rs-details p{max-width:720px;margin:8px 0 0;line-height:1.8}.rs-details summary:focus-visible,.rs-layout button:focus-visible{outline:2px solid var(--sy-primary,#5f7cf4);outline-offset:3px}
.rs-budget-state{display:flex;gap:10px;align-items:center;margin-top:12px;color:var(--sy-muted,#7b879b);font-size:12px;line-height:20px;flex-wrap:wrap}.rs-status{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--sy-muted,#8490a5);white-space:nowrap}.rs-status:before{content:'';width:5px;height:5px;border-radius:50%;background:currentColor}.rs-status.on{color:#0d9488}
.rs-table-wrap{overflow-x:auto;max-width:720px}.rs-relations{border-collapse:collapse;width:100%;font-size:13px;table-layout:fixed}.rs-relations th{text-align:left;color:var(--sy-muted,#8490a5);font-weight:400;font-size:12px;background:var(--sy-bg,#f8f9fc)}.rs-relations th,.rs-relations td{height:42px;padding:0 14px;border-bottom:1px solid var(--sy-border,#e2e8f0);box-sizing:border-box}.rs-relations th:first-child{width:32%}.rs-relations th:nth-child(2){width:26%}.rs-relations th:nth-child(3){width:24%}.rs-relations th:last-child{width:18%}.rs-relations td:first-child{overflow-wrap:anywhere}.rs-sort{display:flex;gap:4px}.rs-layout .rs-sort-btn{display:inline-flex;justify-content:center;align-items:center;padding:0;width:26px;height:26px;border:0;border-radius:4px;background:transparent;color:var(--sy-muted,#8490a5);cursor:pointer}.rs-sort-btn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.rs-layout .rs-sort-btn:hover:not(:disabled){background:var(--sy-primary-soft,#eef1ff);color:var(--sy-primary,#5f7cf4)}.rs-layout .rs-toggle{border:0;background:transparent;padding:4px 0;color:var(--sy-muted,#8490a5);font:inherit;font-size:12px;cursor:pointer}.rs-layout .rs-toggle:hover{color:var(--sy-primary,#5f7cf4)}.rs-layout button:disabled{opacity:.3;cursor:default}.rs-add{margin-top:18px;max-width:440px}.rs-add label{display:block}.rs-add>div{display:flex;gap:10px;align-items:center}.rs-add input{min-width:0;flex:1}.rs-add .btn{flex-shrink:0}
@media(max-width:1200px){.rs-layout .rs-card{grid-template-columns:142px minmax(0,1fr);gap:20px;padding:24px}.rs-rules-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.rs-rules-fields .rs-field:last-child{grid-column:1/-1;max-width:320px}}
@media(max-width:700px){.rs-layout .rs-card{grid-template-columns:minmax(0,1fr);gap:16px;padding:20px}.rs-card header{display:flex;align-items:center;justify-content:space-between;gap:12px}.rs-card h3{margin:0}.rs-fields,.rs-rules-fields{grid-template-columns:minmax(0,1fr)}.rs-rules-fields .rs-field:last-child{max-width:none}.rs-relations th,.rs-relations td{padding:0 8px}}
/* Keep the shared business-table decorator from stretching this small dictionary. */
.sy-admin .rs-layout .rs-table-wrap{width:100%;max-width:720px;scrollbar-gutter:auto}
.sy-admin .rs-layout .rs-relations{max-width:720px;min-width:0}
.sy-admin .rs-layout .rs-relations th,.sy-admin .rs-layout .rs-relations td{height:42px;padding:0 14px;font-size:13px;line-height:20px}
.sy-admin .rs-layout .rs-relations th{font-size:12px}
@media(max-width:700px){.sy-admin .rs-layout .rs-relations th,.sy-admin .rs-layout .rs-relations td{padding:0 8px}}

.rs-test-switch{display:flex;align-items:center;gap:10px;font-size:13px;margin:0 0 10px;cursor:pointer}.rs-layout .rs-test-switch input{width:16px;height:16px;min-height:16px;flex:0 0 16px;margin:0;padding:0;accent-color:var(--sy-primary,#5f7cf4)}
