.sota-rules-panel { max-width: 1380px; width: calc(100% - 40px); box-sizing: border-box; margin: 80px auto 20px; padding: 20px; border: 1px solid var(--sota-color-border-subtle, #52766d); border-radius: 18px; background: var(--sota-color-bg-surface-solid, #14372e); color: var(--sota-color-text-primary, #eef5f0); font: 15px/1.5 system-ui,sans-serif; }
.sota-rules-panel h2 { margin: 0; font-size: 21px; }
.sota-rules-panel p { margin: 8px 0; color: var(--sota-color-text-secondary, #c2d9d0); }
.sota-rules-panel details { margin-top: 12px; }
.sota-rules-panel summary { cursor: pointer; font-weight: 600; }
.rule-actions,.rule-history-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.rule-history-row span { flex: 1; overflow-wrap: anywhere; min-width: 160px; }
.rule-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 12px 0; }
.rule-form label { display: grid; gap: 5px; }
.sota-rules-panel input,.sota-rules-panel select { box-sizing: border-box; width: 100%; min-width: 0; padding: 10px; border: 1px solid #648078; border-radius: 8px; background: var(--sota-color-bg-surface-solid, #14372e); color: inherit; }
.sota-rules-panel button { cursor: pointer; padding: 9px 14px; border: 1px solid #648078; border-radius: 8px; background: #dcefe5; color: #163e30; font: inherit; }
.sota-rules-panel button:disabled { opacity: .55; cursor: default; }
@media(max-width:600px) { .sota-rules-panel { width: calc(100% - 20px); margin: 70px 10px 16px; padding: 14px; } .rule-form { grid-template-columns: 1fr; } }

html[data-sota-prototype-module="crm"] .sota-rules-panel { margin-left: max(96px, calc((100% - 1380px) / 2)); width: calc(100% - 120px); }
@media(max-width:600px) { html[data-sota-prototype-module="crm"] .sota-rules-panel { margin-left: 10px; width: calc(100% - 20px); } }

.crm-field-guide { display:grid; gap:10px; }
.crm-field-guide article { display:grid; grid-template-columns: minmax(140px,1fr) auto; gap:6px 16px; padding:10px 0; border-bottom:1px solid var(--sota-color-border-subtle); }
.crm-field-guide p { grid-column:1/-1; margin:0; }
.crm-app [aria-label="Сценарий работы"] [aria-pressed="true"] { outline:2px solid var(--sota-color-focus); }
.crm-app .sota-rules-list { min-height:0; }

.dds-personal-allocation { margin:20px 0; padding-top:14px; border-top:1px solid var(--sota-color-border-subtle,#52766d); }
.dds-personal-allocation h3 { margin:0; font-size:20px; }
.dds-allocation-cards { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.dds-allocation-cards > div { display:flex; flex-direction:column; gap:8px; padding:14px; border:1px solid var(--sota-color-border-subtle,#52766d); border-radius:12px; }
.dds-allocation-cards b { font-size:22px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.dds-allocation-currency { margin:12px 0; }
.dds-allocation-warning { padding:12px; border:1px solid #b59039; border-radius:8px; }
@media(max-width:900px) { .dds-allocation-cards { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:440px) { .dds-allocation-cards { grid-template-columns:1fr; } }

.dds-rule-choice-hint { grid-column: 1 / -1; overflow-wrap: anywhere; }

.dds-attention-scroll { overflow-x: auto; }
.dds-attention table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dds-attention th,.dds-attention td { padding: 10px; text-align: left; border-bottom: 1px solid var(--sota-color-border-subtle,#52766d); }
.dds-attention td:first-child { min-width: 160px; max-width: 280px; overflow-wrap: anywhere; }
.dds-attention caption { text-align: left; margin: 8px 0; }

#crm-first-rule{scroll-margin-top:90px}#crm-first-rule h2{font-size:22px}#crm-first-rule .crm-first-rule-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px}#crm-first-rule label{display:flex;flex-direction:column;gap:8px}#crm-first-rule :is(input,select){max-width:100%;min-width:0;padding:10px;border:1px solid #698d80;border-radius:8px;background:#0c2921;color:#eaf6ef}#crm-first-rule form>p,#crm-first-rule form>button{grid-column:1/-1}#crm-first-rule p{margin:12px 0}#crm-first-rule button:disabled{opacity:.5;cursor:not-allowed}@media(max-width:720px){#crm-first-rule .crm-first-rule-form{grid-template-columns:1fr}}
