.dms-tabs { overflow-x:auto; white-space:nowrap; border-bottom:0; box-shadow:inset 0 -2px 0 var(--border); }
.dms-tabs > .tab { flex:0 0 auto; margin-bottom:0; text-decoration:none; }
.dms-tabs > button.tab { background:none; border-width:0 0 2px; border-style:solid; border-radius:0; font-family:inherit; }
.dms-tabs > .tab:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
.submission-matrix-scroll { overflow-x:auto; }
.submission-source-note { margin-bottom:10px; color:var(--gray-tx); font-size:12px; }
.submission-matrix :is(th,td) { white-space:normal; }
.submission-matrix thead th { min-width:160px; }
.submission-matrix :is(th,td):first-child { min-width:260px; }
.submission-matrix :is(th,td):nth-last-child(2) { min-width:220px; }
.submission-matrix :is(th,td):last-child { min-width:100px; }
.submission-matrix .law-object-edit { margin-inline-start:6px; }
.submission-matrix .submission-matrix-cell { text-align:center; }
.submission-matrix-cell input[type="checkbox"] { width:17px; height:17px; accent-color:#169447; }
.dms-toolbar, .dms-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.dms-toolbar { justify-content:space-between; margin-bottom:14px; }
.dms-toolbar h2, .dms-toolbar h3, .dms-card h3, #dms-catalog-editor h3 { color:var(--navy); font-size:13px; font-weight:700; margin:0 0 8px; }
.dms-toolbar :is(h2,h3):last-child { margin-bottom:0; }
.dms-toolbar a:not(.btn) { display:inline-block; margin-bottom:6px; color:var(--accent); }
.dms-filters .search-box { display:flex; max-width:100%; }
.dms-filters .search-box i { color:var(--gray-tx); font-size:15px; }
.dms-filters .search-box input { width:238px; max-width:100%; }
.dms-filters input.fsel { min-width:0; width:125px; cursor:text; }
.dms-filter-actions { margin-inline-start:auto; }
.dms-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr)); align-items:start; gap:14px; margin:8px 0 16px; }
.fl label.dms-field { display:grid; gap:5px; min-width:0; margin:0; }
.dms-field :is(input,select,textarea) { min-width:0; max-width:100%; }
.dms-field :is(input,select,textarea):focus-visible { border-color:var(--accent); }
.dms-check { display:inline-flex; gap:6px; align-items:center; margin:6px 8px 6px 0; font-size:12px; }
.dms-table th, .dms-table td { vertical-align:top; }
.dms-table td { white-space:normal; min-width:72px; overflow-wrap:anywhere; }
.dms-table td:has(> b) { min-width:132px; }
.dms-table td small { display:block; margin-top:3px; color:var(--gray-tx); }
.dms-table td input[type=checkbox] { vertical-align:middle; }
#dms-panel .tbl-wrap, .dms-order-picker .tbl-wrap { overflow-x:auto; }
.dms-empty { padding:18px 14px; text-align:center; }
#dms-result .dms-case-list :is(th,td) { text-align:center; }
#dms-result .dms-list-name { color:var(--navy); }
#dms-result .dms-list-code { color:var(--accent); font-family:monospace; font-weight:700; }
#dms-result .dms-list-wrap { white-space:normal; overflow-wrap:anywhere; min-width:130px; }
#dms-result .law-table-empty td { padding:24px; text-align:center; color:#6B84A8; cursor:default; }
.stats-grid.dms-tallies { grid-template-columns:repeat(auto-fit,minmax(118px,1fr)); gap:10px; margin-bottom:16px; }
.dms-tally { display:grid; padding:12px 14px; text-align:left; font-family:inherit; cursor:pointer; }
.dms-tally .scard-value { font-size:22px; }
.dms-tally.active, .dms-tally:hover { border-color:var(--accent); }
.dms-card { padding:14px; margin:8px 0; }
.dms-card progress { width:100%; accent-color:var(--accent); }
.dms-rule { margin:6px 0; }
.dms-rule-row { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
#dms-catalog-editor :is(.dms-rule-row,.dms-ref,.dms-override) :is(input:not([type=checkbox]),select):not(.dms-field *) {
  padding:6px 10px; font:inherit; color:var(--navy); border:1px solid var(--border); border-radius:7px; background:var(--white); max-width:100%;
}
.dms-rule-row select[name=field] { width:min(100%,320px); }
.dms-children { margin-left:12px; padding-left:10px; border-left:2px solid var(--border); }
.dms-children:empty { display:none; }
.dms-overview { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:8px; margin-bottom:14px; }
.dms-overview div { padding:10px 14px; border:1px solid var(--border); border-radius:9px; background:var(--white); }
.dms-overview dt { color:var(--gray-tx); }
.dms-overview dd { margin:4px 0 0; font-weight:600; overflow-wrap:anywhere; }
.dms-order-picker { max-height:320px; overflow:auto; }
.dms-order-picker tr[hidden], .dms-rule [hidden], .dms-document-entry [hidden] { display:none !important; }
.dms-file { display:flex; gap:6px; align-items:center; flex-wrap:wrap; margin:3px 0; overflow-wrap:anywhere; }
.dms-preview { width:100%; height:60vh; border:1px solid var(--border); border-radius:8px; }
#dms-catalog-editor fieldset { border:0; padding:0; min-width:0; }
#dms-test-result { margin-top:10px; }
@media (max-width:600px) {
  .dms-filters .search-box { flex:1 1 100%; }
  .dms-filters .search-box input { width:100%; min-width:0; }
  .dms-filter-actions { margin-inline-start:0; }
  .stats-grid.dms-tallies { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

