/* Модальный реестр ошибок: читаемые карточки и изолированная прокрутка содержимого. */
dialog.error-rules-dialog { width:min(1100px,calc(100vw - 32px)); max-width:calc(100vw - 32px); max-height:90vh; padding:0; overflow:hidden; border:1px solid var(--border); border-radius:16px; background:var(--panel); color:var(--text); box-shadow:0 25px 90px #0005; }
dialog.error-rules-dialog::backdrop { background:#101b3b80; }
.error-rules-view { display:grid; gap:18px; min-width:0; max-height:90vh; padding:0 20px 20px; overflow-y:auto; overflow-wrap:anywhere; }
.error-rules-header { position:sticky; top:0; z-index:2; display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin:0 -20px; padding:20px 20px 16px; border-bottom:1px solid var(--border); background:var(--panel); }
.error-rules-heading { min-width:0; }
.error-rules-title { margin:0; font-size:22px; }
.error-rules-heading p { margin:6px 0 0; }
.error-rules-close { flex:0 0 44px; display:grid; place-items:center; width:44px; height:44px; padding:0; border:0; border-radius:8px; background:transparent; color:var(--muted); font-size:28px; cursor:pointer; }
.error-rules-close:hover { background:var(--hover); color:var(--text); }
.error-rules-toolbar { display:flex; align-items:center; gap:16px; }
.error-rules-toolbar .help { flex:1; margin:0; }
.error-rules-toolbar .primary { flex-shrink:0; }
.error-rule-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr)); gap:14px; }
.error-rule-card { min-width:0; padding:18px; border:1px solid var(--border); border-radius:12px; background:var(--panel); box-shadow:var(--shadow); }
.error-rule-card.is-disabled { opacity:.68; }
.error-rule-title { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:10px; }
.error-rule-title code { overflow-wrap:anywhere; font-size:12px; color:var(--primary); }
.error-rule-state { flex-shrink:0; padding:3px 9px; border-radius:999px; background:var(--hover); color:var(--muted); font-size:11px; white-space:nowrap; }
.error-rule-card p { margin:10px 0 0; overflow-wrap:anywhere; }
.error-rule-pause { font-weight:600; }
.error-rule-actions { justify-content:flex-start; flex-wrap:wrap; margin-top:14px; }
.error-rule-actions .quiet { padding:8px; }
.error-rule-form { min-width:0; }
.error-rule-duration { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; }
.error-rules-audit { min-width:0; }
.error-rules-audit h2 { margin:0 0 14px; }
.error-rules-table-wrap { max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; border:1px solid var(--border); border-radius:10px; }
.error-rules-table { width:100%; min-width:720px; border-collapse:collapse; background:var(--panel); }
.error-rules-table th,.error-rules-table td { padding:11px 12px; border-bottom:1px solid var(--border); text-align:left; font-size:12px; white-space:nowrap; }
.error-rules-table tr:last-child td { border-bottom:0; }
@media (max-width:640px) {
    dialog.error-rules-dialog { width:calc(100vw - 16px); max-width:calc(100vw - 16px); max-height:calc(100vh - 16px); }
    .error-rules-view { max-height:calc(100vh - 16px); padding:0 14px 14px; }
    .error-rules-header { margin:0 -14px; padding:14px; }
    .error-rules-title { font-size:19px; }
    .error-rules-toolbar { align-items:stretch; flex-direction:column; }
    .error-rules-toolbar .primary { width:100%; }
    .error-rule-duration { grid-template-columns:1fr; gap:0; }
}
