/* ==========================================================================
   DATA MODEL  (assets/css/data-model.css)  -  data-model.php
   Intro | Manage | Limits | Health | Analysis | Builder. Uses base.css tokens,
   so light + dark themes both work. All classes are prefixed .dm-
   ========================================================================== */

.dm { max-width: 1440px; margin: 0 auto; }
.dm-grow { flex: 1 1 auto; }
.dm-muted { color: var(--text-subtle); }
.dm-no-scroll { overflow: hidden; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------ header + tabs */
.dm-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.dm-head__title { font-size: 24px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.dm-head__actions { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }

.dm-tabs { display: flex; gap: var(--sp-2); border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; margin-bottom: var(--sp-6); }
.dm-tabs::-webkit-scrollbar { display: none; }
.dm-tabs__link { position: relative; padding: 10px 22px 12px; font-size: 15px; font-weight: 500; color: var(--text-muted); white-space: nowrap; text-decoration: none; }
.dm-tabs__link:hover { color: var(--text); }
.dm-tabs__link:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.dm-tabs__link.is-active { color: var(--text); font-weight: 600; }
.dm-tabs__link.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand); }

/* ------------------------------------------------------------------ buttons */
.dm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px; font: inherit; font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-pill); cursor: pointer; text-decoration: none; transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
.dm-btn:hover { background: var(--surface-hover); }
.dm-btn:focus-visible, .dm-icon-btn:focus-visible, .dm-round:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.dm-btn[disabled], .dm-btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.dm-btn--primary { background: var(--brand); border-color: var(--brand); color: var(--brand-contrast); }
.dm-btn--primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.dm-btn--outline { background: var(--surface); }
.dm-btn--soft { background: var(--surface-3); border-color: transparent; color: var(--text-muted); }
.dm-btn--soft:not([disabled]) { background: var(--brand-soft); color: var(--brand-ink); }
.dm-btn--ghost { background: transparent; border-color: transparent; }
.dm-btn--sm { height: 34px; padding: 0 14px; font-size: 13.5px; }
.dm-btn--xs { height: 30px; padding: 0 12px; font-size: 13px; }
.dm-btn--xxs { height: 24px; padding: 0 10px; font-size: 11.5px; font-weight: 500; }
.dm-btn.is-loading { position: relative; color: transparent; }
.dm-btn.is-loading::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: dm-spin .7s linear infinite; }
@keyframes dm-spin { to { transform: rotate(360deg); } }

.dm-icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; color: var(--text-muted); background: transparent; border: 0; border-radius: var(--radius-sm); cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; text-decoration: none; }
.dm-icon-btn:hover { background: var(--surface-hover); color: var(--text); }
.dm-icon-btn--xs { width: 22px; height: 22px; border-radius: 50%; }
.dm-icon-btn--ring { border: 1px solid var(--border-strong); }
.dm-round { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; flex: none; }
.dm-round:hover { background: var(--surface-hover); }
.dm-round[disabled] { opacity: .4; cursor: default; }
.dm-round--sq { border-radius: 8px; }
.dm-link, .dm-link-strong, .dm-num-link, .dm-plain-link { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
.dm-link { color: var(--brand-ink); font-weight: 600; font-size: 14px; margin: -6px 0 var(--sp-4); }
.dm-link-strong { color: var(--brand-ink); font-weight: 600; }
.dm-link-strong:hover, .dm-link:hover, .dm-num-link:hover { text-decoration: underline; }
.dm-num-link { display: inline-flex; align-items: center; gap: 4px; color: var(--brand-ink); font-weight: 600; }
.dm-plain-link { color: var(--text); }
.dm-plain-link:hover { color: var(--brand-ink); }

/* ------------------------------------------------------- popovers / menus */
.dm-dd { position: relative; display: inline-flex; align-items: center; }
.dm-pop { position: fixed; z-index: 1200; min-width: 200px; max-width: min(420px, calc(100vw - 16px)); padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.dm-menu { display: flex; flex-direction: column; max-height: 360px; overflow: auto; }
.dm-menu__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; font: inherit; font-size: 14px; color: var(--text); text-align: left; background: none; border: 0; border-radius: var(--radius-sm); cursor: pointer; text-decoration: none; }
.dm-menu__item:hover { background: var(--surface-hover); }
.dm-menu__item.is-selected { background: var(--brand-soft); color: var(--brand-ink); font-weight: 500; }
.dm-menu__item.is-disabled { color: var(--text-subtle); cursor: not-allowed; }
.dm-menu__item.is-disabled:hover { background: none; }
.dm-menu__item .icon { color: var(--text-muted); flex: none; }
.dm-menu__item > span:not(.dm-ti) { flex: 1 1 auto; min-width: 0; }
.dm-menu__item > .dm-ti { flex: none; width: 16px; }
.dm-menu__div { height: 1px; margin: 6px 0; background: var(--border); }
.dm-menu--switch { width: 240px; max-height: 320px; }
.dm-menu--select { min-width: 0; }
.dm-pop__search { position: relative; display: block; margin: 2px 2px 6px; }
.dm-pop__search input { width: 100%; height: 36px; padding: 0 34px 0 12px; font: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
.dm-pop__search input:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus-ring); }
.dm-pop__search .icon { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--text-subtle); pointer-events: none; }
.dm-pop__empty { margin: 6px 10px; font-size: 13px; color: var(--text-subtle); }

.dm-tours { width: 300px; padding: 4px 0; }
.dm-tour { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 16px; font: inherit; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--border); cursor: pointer; color: var(--text); }
.dm-tour:last-child { border-bottom: 0; }
.dm-tour:hover { background: var(--surface-hover); }
.dm-tour__text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.dm-tour__name { font-size: 14px; }
.dm-tour__time { font-size: 12px; color: var(--text-subtle); }
.dm-tour__state { font-size: 12px; color: var(--text-subtle); }

/* checkbox filter lists */
.dm-checks { width: 260px; }
.dm-checks--wide { width: 300px; }
.dm-checks__list { max-height: 300px; overflow: auto; padding: 2px; }
.dm-check { display: flex; align-items: center; gap: 10px; padding: 7px 10px; font-size: 14px; color: var(--text); border-radius: var(--radius-sm); cursor: pointer; }
.dm-check:hover { background: var(--surface-hover); }
.dm-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); flex: none; }
.dm-check--strong { font-weight: 600; }
.dm-check--indent { padding-left: 34px; }
.dm-check--plain { padding: 0; margin-top: var(--sp-2); }
.dm-check--plain:hover { background: none; }
.dm-check.is-collapsed { display: none; }
.dm-check-group { display: flex; align-items: center; }
.dm-check-group .dm-check { flex: 1; }
.dm-check-group__caret { display: grid; place-items: center; width: 24px; height: 24px; margin-left: -8px; color: var(--text-muted); background: none; border: 0; cursor: pointer; transform: rotate(180deg); transition: transform var(--fast); }
.dm-check-group__caret.is-collapsed { transform: none; }
.dm-checks__foot { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 6px 6px; border-top: 1px solid var(--border); margin-top: 6px; }

/* filter buttons in toolbars */
.dm-filter { gap: 0; }
.dm-filter__btn { display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 12px; font: inherit; font-size: 14px; font-weight: 600; color: var(--text); background: transparent; border: 0; border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap; }
.dm-filter__btn:hover { background: var(--surface-hover); }
.dm-filter__btn--strong { font-weight: 700; }
.dm-filter.has-value { background: var(--surface-3); border-radius: var(--radius-sm); }
.dm-filter.has-value .dm-filter__btn:hover { background: transparent; }
.dm-filter__clear { display: grid; place-items: center; width: 28px; height: 38px; color: var(--text-muted); background: none; border: 0; cursor: pointer; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.dm-filter__clear:hover { color: var(--text); }
.dm-filter--link .dm-filter__btn { color: var(--brand-ink); padding: 0 6px; }
.dm-filter-static { font-weight: 600; font-size: 14px; padding: 0 8px; }

/* ----------------------------------------------------------------- toolbar */
.dm-toolbar { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-4); }
/* DMG3 (B5): the 20 Nov drop's two-row toolbar (css 600-631, 2686, 5697-5701), only where a
   toolbar opts in, so the other toolbars and the Lists page keep their look. */
.dm-toolbar--rows { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.dm-toolbar--rows .dm-toolbar__top { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; width: 100%; }
.dm-toolbar--rows .dm-toolbar__top > .dm-grow { flex: 1 1 auto; }
.dm-toolbar--rows .dm-toolbar__filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; }
.dm-toolbar--rows .dm-toolbar__filters:empty { display: none; }
@media (max-width: 600px) {
  .dm-toolbar--rows .dm-toolbar__top > .dm-grow { display: none; }
}
/* DMG3 (user's call): frozen columns stick while the table scrolls sideways; a line marks the edge. */
.dm-table th.is-frozen-edge, .dm-table td.is-frozen-edge { box-shadow: inset -1px 0 0 var(--border); }
.dm-search { position: relative; display: block; width: 250px; max-width: 100%; }
.dm-search--wide { width: 400px; }
.dm-search input { width: 100%; height: 40px; padding: 0 40px 0 16px; font: inherit; font-size: 15px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-pill); }
.dm-search input:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus-ring); }
.dm-search .icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.dm-search__clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 28px; height: 28px; padding: 0; color: var(--text-muted); background: none; border: 0; border-radius: var(--radius-pill); cursor: pointer; }
.dm-search__clear:hover { color: var(--text); background: var(--surface-hover); }
.dm-search__clear:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.dm-search__clear .icon { position: static; transform: none; color: inherit; }
.dm-viewtoggle { display: inline-flex; gap: 2px; }
.dm-viewtoggle__btn { display: grid; place-items: center; width: 34px; height: 34px; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 50%; cursor: pointer; }
.dm-viewtoggle__btn:hover { color: var(--text); }
.dm-viewtoggle__btn.is-active { color: var(--text); border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }

/* ------------------------------------------------------------------- tables */
.dm-table-wrap { border-top: 1px solid var(--border); overflow-x: auto; max-height: 560px; overflow-y: auto; }
.dm-table-wrap--x { max-height: none; }
.dm-table-wrap--card { border: 1px solid var(--border); border-radius: var(--radius); }
.dm-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.dm-table th { position: sticky; top: 0; z-index: 1; padding: 12px 24px; text-align: left; font-size: 14px; font-weight: 500; color: var(--text); background: var(--surface); border-bottom: 1px solid var(--text-subtle); white-space: nowrap; }
.dm-table td { padding: 14px 24px; vertical-align: middle; border-bottom: 1px solid var(--border); color: var(--text); background: var(--surface); }
.dm-table tbody tr:hover td { background: var(--surface-2); }
.dm-table tr.is-inactive td { background: var(--surface-3); color: var(--text-muted); }
.dm-table__empty td { text-align: center; color: var(--text-subtle); padding: var(--sp-8); }
.dm-th-sort { display: inline-flex; align-items: center; gap: 6px; padding: 0; font: inherit; font-weight: 500; color: inherit; background: none; border: 0; cursor: pointer; text-align: left; }
.dm-th-sort .icon { color: var(--text-muted); }
.dm-th-sort.is-active .icon { color: var(--text); }
th.dm-th-caps { text-transform: uppercase; font-size: 12px !important; letter-spacing: .03em; color: var(--text-muted) !important; }

.dm-pager { display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; padding: var(--sp-4) 0 var(--sp-2); }
.dm-pager__step, .dm-pager__num, .dm-pager__size { display: inline-flex; align-items: center; gap: 4px; min-width: 28px; height: 30px; padding: 0 8px; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--text); background: none; border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; justify-content: center; }
.dm-pager__step[disabled] { color: var(--text-subtle); cursor: default; }
.dm-pager__num.is-current { border-color: var(--text-subtle); font-weight: 500; }
.dm-pager__num:hover:not(.is-current), .dm-pager__step:hover:not([disabled]), .dm-pager__size:hover { background: var(--surface-hover); }
.dm-pager__size { margin-left: var(--sp-3); }

.dm-obj { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dm-obj__icon { display: grid; place-items: center; width: 20px; color: var(--text-muted); flex: none; }
.dm-obj__text { display: flex; flex-direction: column; min-width: 0; }
.dm-obj__desc { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.dm-name-off { color: var(--text); }
.dm-copy-cell { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
/* QA 18 Nov (#744): a long id wraps inside its cell instead of widening the Manage table. */
.dm-copy-cell { flex-wrap: wrap; max-width: 100%; }
.dm-copy-cell__id { min-width: 0; overflow-wrap: anywhere; white-space: normal; }
.dm-copy { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; font: inherit; font-size: 12px; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-pill); cursor: pointer; opacity: 0; transition: opacity var(--fast); }
tr:hover .dm-copy, .dm-copy:focus-visible { opacity: 1; }
.dm-row-hover { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; }
.dm-row-hover__btn { opacity: 0; transition: opacity var(--fast); }
tr:hover .dm-row-hover__btn, .dm-row-hover__btn:focus-visible, .dm-row-hover__btn[aria-expanded="true"] { opacity: 1; }
.dm-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.dm-prop { display: flex; flex-direction: column; color: var(--text); text-decoration: none; }
.dm-prop:hover .dm-prop__name { color: var(--brand-ink); text-decoration: underline; }
.dm-prop__type { font-size: 12.5px; color: var(--text-muted); }
.dm-ti { display: inline-grid; place-items: center; min-width: 16px; font-size: 11px; font-weight: 700; color: var(--text-muted); flex: none; }
.dm-ti--abc { font-size: 8.5px; letter-spacing: -.02em; }
.dm-badge { display: inline-block; padding: 2px 8px; font-size: 11.5px; font-weight: 600; color: var(--text-muted); background: var(--surface-3); border-radius: var(--radius-pill); vertical-align: middle; }
.dm-badge--success { color: var(--success); background: var(--success-bg); margin-left: auto; }

.dm-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dm-chip { display: inline-block; padding: 3px 8px; font-size: 12.5px; font-weight: 600; color: var(--text); background: var(--surface); border: 1px solid var(--text-subtle); border-radius: 4px; white-space: nowrap; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.dm-chip--sm { font-size: 11px; padding: 2px 6px; }
.dm-chip--faint { color: var(--text-muted); border-color: var(--border-strong); }
.dm-chips__more { font: inherit; font-size: 14px; color: var(--text-muted); background: none; border: 0; cursor: pointer; padding: 0 4px; }
.dm-chips__more:hover { color: var(--brand-ink); text-decoration: underline; }

/* ------------------------------------------------------------------ cards */
.dm-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: var(--sp-6) var(--sp-8); }
.dm-card__title { margin: 0 0 var(--sp-5); font-size: 17px; font-weight: 600; }
.dm-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--sp-10) var(--sp-4); color: var(--text-muted); }
.dm-empty p { margin: 4px 0; }
.dm-empty--sm { padding: var(--sp-6) var(--sp-4); }
.dm-empty__badge { display: grid; place-items: center; width: 120px; height: 120px; border-radius: 50%; color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 14px var(--surface-2); margin-bottom: var(--sp-8); }
.dm-empty__title { font-size: 18px; font-weight: 600; color: var(--text); }

/* ================================================================== INTRO */
.dm-body--intro { margin: calc(var(--sp-6) * -1) calc(clamp(16px, 3vw, 40px) * -1) 0; }
.dm-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: var(--sp-8); padding: var(--sp-8) clamp(16px, 3vw, 48px); background: var(--surface); border-bottom: 1px solid var(--border); }
.dm-hero h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 400; line-height: 1.2; margin: 0 0 var(--sp-5); }
.dm-hero p { color: var(--text); margin: 0 0 var(--sp-2); line-height: 1.6; }
.dm-hero ul { margin: 0; padding-left: 20px; line-height: 1.8; }
.dm-hero__art { display: flex; justify-content: center; }
.dm-art { width: 100%; max-width: 420px; height: auto; }
.dm-art__ground { fill: #8fd8b8; opacity: .6; }
.dm-art__cube .t { fill: var(--surface-2); stroke: #2a7f9e; stroke-width: 2.5; }
.dm-art__cube .l { fill: #e3e8f0; stroke: #2a7f9e; stroke-width: 2.5; }
.dm-art__cube .r { fill: #d2d9e4; stroke: #2a7f9e; stroke-width: 2.5; }
.dm-art__c1 { fill: #fde7c2; stroke: #3b4c5c; stroke-width: 2; }
.dm-art__c2 { fill: #c9eef0; stroke: #3b4c5c; stroke-width: 2; }
.dm-art__c3 { fill: #fbd1d4; stroke: #3b4c5c; stroke-width: 2; }
.dm-art__c4 { fill: #d7f0d5; stroke: #3b4c5c; stroke-width: 2; }
.dm-art__c5 { fill: #e4def8; stroke: #3b4c5c; stroke-width: 2; }
.dm-art__ico { fill: none; stroke: #3b4c5c; stroke-width: 2.2; stroke-linecap: round; }
.dm-art__wand { stroke: #c11574; stroke-width: 6; stroke-linecap: round; }
.dm-art__spark { fill: #f2c94c; }

.dm-intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-6); padding: var(--sp-6) clamp(16px, 3vw, 40px); background: var(--bg); }
.dm-use { margin: 0 clamp(16px, 3vw, 40px) var(--sp-8); }
.dm-ai__inner { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.dm-ai__art { display: grid; place-items: center; height: 150px; color: var(--pink); background: linear-gradient(180deg, var(--pink-bg), #fbd3e9); }
[data-theme="dark"] .dm-ai__art { background: linear-gradient(180deg, rgba(193, 21, 116, .18), rgba(193, 21, 116, .3)); }
.dm-ai__body { padding: var(--sp-5) var(--sp-8); }
.dm-ai__lead { font-weight: 700; margin: 0 0 var(--sp-3); }
.dm-ai__sub { font-size: 13px; color: var(--text-muted); margin: 0 0 var(--sp-4); }
.dm-ai__foot { display: flex; justify-content: flex-end; margin-top: var(--sp-3); }
.dm-ai__foot > .dm-btn { flex: 1 1 0; min-width: 0; height: auto; min-height: 34px; padding-block: 6px; white-space: normal; line-height: 1.2; text-align: center; }
.dm-textarea, .dm-input { width: 100%; padding: 10px 14px; font: inherit; font-size: 15px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); resize: vertical; }
.dm-input { height: 42px; }
.dm-textarea:focus, .dm-input:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus-ring); }

.dm-sugg__wrap { display: flex; align-items: center; gap: var(--sp-4); }
.dm-sugg__card { flex: 1; min-width: 0; padding: var(--sp-4); border: 1px solid var(--text); border-radius: 4px; }
.dm-sugg__text { margin: 0 0 var(--sp-4); font-size: 14.5px; }
.dm-sugg__line { display: flex; align-items: center; margin-bottom: var(--sp-5); }
.dm-sugg__node { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--border-strong); border-radius: 50%; flex: none; }
.dm-sugg__wire { flex: 1; height: 1px; background: var(--text-subtle); min-width: 20px; }
.dm-sugg__label { flex: 0 1 190px; padding: 4px 10px; text-align: center; font-size: 13px; font-weight: 700; background: var(--indigo-bg); border: 1px solid var(--indigo); border-radius: 4px; }
.dm-sugg__many { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--indigo); box-shadow: 4px 0 0 -1px var(--surface), 5px 0 0 0 var(--indigo), 9px 0 0 -1px var(--surface), 10px 0 0 0 var(--indigo); background: var(--indigo-bg); flex: none; }
.dm-sugg__kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 var(--sp-3); font-size: 14px; color: var(--text-muted); }
.dm-sugg__prop { display: flex; align-items: center; gap: 8px; margin: 0 0 var(--sp-2); font-size: 17px; font-weight: 600; }
.dm-sugg__prop .dm-ti { color: var(--indigo); }
.dm-sugg__desc { margin: 0 0 var(--sp-4); color: var(--text-muted); }
.dm-sugg__note { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 14px; font-size: 14px; background: var(--surface-3); border-radius: 4px; }
.dm-sugg__note span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-sugg__note .icon { flex: none; }
.dm-sugg__preview-h { margin: var(--sp-3) 0 6px; font-size: 13px; color: var(--text-muted); }
.dm-sugg__preview { padding: var(--sp-3); border: 1px solid var(--text); border-radius: 4px; }
.dm-sugg__preview label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.dm-sugg__actions { display: flex; justify-content: flex-end; gap: var(--sp-2); margin-top: var(--sp-4); }
.dm-sugg__count { margin: var(--sp-4) 0 0; text-align: center; font-size: 14px; }
.dm-use__row { display: flex; gap: var(--sp-3); overflow-x: auto; padding-bottom: var(--sp-2); }
.dm-use__link { display: inline-flex; align-items: center; gap: 12px; padding: 12px 18px 12px 14px; font-weight: 600; color: var(--text); text-decoration: none; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); white-space: nowrap; flex: none; }
.dm-use__link:hover { border-color: var(--brand); background: var(--brand-soft); }
.dm-use__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; }
.dm-tone--indigo { color: var(--indigo); background: var(--indigo-bg); }
.dm-tone--info { color: var(--info); background: var(--info-bg); }
.dm-tone--yellow { color: var(--yellow); background: var(--yellow-bg); }

/* =================================================================== MANAGE */
.dm-canvas-wrap { position: relative; margin: 0 calc(clamp(16px, 3vw, 40px) * -1); }
.dm-canvas { position: relative; height: calc(100vh - 290px); min-height: 460px; overflow: auto; border-top: 1px solid var(--border); background-color: var(--surface-2); background-image: radial-gradient(var(--border-strong) 1px, transparent 1px); background-size: 16px 16px; cursor: grab; }
.dm-canvas.is-grabbing { cursor: grabbing; user-select: none; }
.dm-canvas__inner { display: flex; gap: 48px; padding: 32px; transform-origin: 0 0; width: 100%; min-width: 1200px; }
.dm-canvas__col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 48px; }
.dm-canvas__ctrl { position: absolute; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 2; }
.dm-gsec__label { display: inline-block; margin-bottom: 14px; padding: 2px 6px; font-size: 11px; font-weight: 600; background: var(--surface); border: 1px solid var(--text-subtle); border-radius: 3px; }
.dm-gsec__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.dm-gcard { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--text-subtle); border-radius: 4px; box-shadow: var(--shadow-sm); font-size: 12px; cursor: default; }
.dm-gcard__head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 8px; border-bottom: 1px solid var(--border); }
.dm-gcard__icon { display: grid; place-items: center; color: var(--text-muted); }
.dm-gcard__name { font-weight: 700; font-size: 12.5px; }
.dm-gcard__row { display: flex; align-items: center; gap: 6px; width: 100%; padding: 9px 10px; font: inherit; font-size: 12px; color: var(--text); background: none; border: 0; border-bottom: 1px solid var(--border); text-align: left; cursor: pointer; }
.dm-gcard__row .icon { color: var(--text-muted); transition: transform var(--fast); }
.dm-gcard__row.is-open > .icon:first-child { transform: rotate(90deg); }
.dm-gcard__row--assoc { cursor: default; border-bottom: 0; }
.dm-gcard__props { padding: 8px 10px; border-bottom: 1px solid var(--border); }
.dm-gcard__th { margin-top: 8px; padding: 5px 8px; font-weight: 700; font-size: 11px; background: var(--surface-3); }
.dm-gcard__list { list-style: none; margin: 0; padding: 0; }
.dm-gcard__list li { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-bottom: 1px solid var(--border); }
.dm-gcard__list li span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-gcard__list li .icon { color: var(--text-muted); }
.dm-gcard__list li:hover { background: var(--surface-2); }
.dm-gcard__edit { opacity: 0; }
.dm-gcard__list li:hover .dm-gcard__edit { opacity: 1; }
.dm-gcard__none { color: var(--text-subtle); }
.dm-gcard__btns { display: flex; gap: 8px; padding-top: 10px; }
.dm-gcard__off { display: grid; place-items: center; padding: 24px 10px 30px; }
.dm-gcard.is-inactive { border-top-color: var(--border-strong); }
.dm-select { display: flex; width: 100%; }
.dm-select__btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 42px; padding: 0 12px; font: inherit; font-size: 15px; color: var(--text); background: var(--surface); border: 1px solid var(--text-subtle); border-radius: var(--radius-sm); cursor: pointer; text-align: left; }
.dm-select__btn > span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-select--sm .dm-select__btn { height: 30px; font-size: 12px; padding: 0 8px; }
.dm-select--inline { width: 240px; }
.dm-select--inline .dm-select__btn { height: 38px; font-size: 14px; }

.dm-tip { display: inline-grid; place-items: center; color: var(--text-muted); cursor: help; vertical-align: middle; }
.dm-tooltip { position: fixed; z-index: 1300; max-width: 280px; padding: 8px 12px; font-size: 12.5px; line-height: 1.45; color: #fff; background: #1d2939; border-radius: var(--radius-sm); box-shadow: var(--shadow); pointer-events: none; }

/* object detail */
.dm-objhead { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.dm-crumb { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.dm-crumb > a { color: var(--brand-ink); font-weight: 600; text-decoration: none; }
.dm-crumb > a:hover { text-decoration: underline; }
.dm-crumb__switch { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px; font: inherit; font-weight: 700; color: var(--text); background: none; border: 0; border-radius: 6px; cursor: pointer; }
.dm-crumb__switch:hover { background: var(--surface-hover); }
.dm-objhead__desc { margin: 6px 0 0; font-size: 13px; color: var(--text-muted); }
.dm-subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 0 calc(clamp(16px, 3vw, 40px) * -1) var(--sp-5); padding: 0 clamp(16px, 3vw, 40px); overflow-x: auto; scrollbar-width: none; }
.dm-subtabs__link { position: relative; padding: 10px 24px 14px 4px; margin-right: 8px; font-size: 15px; color: var(--text); text-decoration: none; white-space: nowrap; }
.dm-subtabs__link.is-active { font-weight: 600; }
.dm-subtabs__link.is-active::after { content: ""; position: absolute; left: -24px; right: 0; bottom: -1px; height: 3px; background: var(--text); border-radius: 3px 3px 0 0; }
.dm-subtabs__link:first-child.is-active::after { left: -24px; }

/* association graph */
.dm-canvas--assoc { height: calc(100vh - 380px); }
.dm-agraph { display: flex; align-items: flex-start; gap: 0; min-height: 100%; padding-top: 24px; }
.dm-agraph__src { position: sticky; top: 260px; display: flex; align-items: center; margin-top: 260px; }
.dm-agraph__plus { display: grid; place-items: center; width: 20px; height: 20px; margin-left: -10px; color: var(--text-muted); background: var(--surface); border: 1px solid var(--text-subtle); border-radius: 50%; }
.dm-agraph__targets { position: relative; display: flex; flex-direction: column; gap: 26px; margin-left: 70px; padding-left: 0; border-left: 1px solid var(--indigo); }
.dm-agraph__row { position: relative; display: flex; align-items: center; padding-left: 70px; }
.dm-agraph__row::before { content: ""; position: absolute; left: 0; width: 70px; top: 50%; border-top: 1px solid var(--indigo); }
.dm-agraph__pill { position: absolute; left: 70px; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; font-size: 11px; font-weight: 600; color: #fff; background: #111; border-radius: 3px; white-space: nowrap; z-index: 1; margin-left: -10px; }
.dm-agraph__pill button { display: grid; place-items: center; padding: 0; color: #fff; background: none; border: 0; cursor: pointer; }
.dm-agraph__row .dm-acard { margin-left: 70px; }
.dm-agraph__none { margin-left: 70px; }
.dm-acard { width: 230px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--text-subtle); border-radius: 4px; box-shadow: var(--shadow); font-size: 11.5px; }
.dm-acard.has-labels { border-top-color: var(--indigo); }
.dm-acard--src { height: 100px; }
.dm-acard h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.dm-acard p { margin: 0; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dm-acard__head { display: flex; align-items: center; gap: 4px; }
.dm-acard__head h4 { margin-bottom: 6px; }
.dm-acard__labels { display: flex; align-items: center; gap: 4px; margin-top: 10px; overflow: hidden; }
.dm-acard__count { margin-left: auto; padding: 0; font: inherit; font-size: 11px; font-weight: 700; color: var(--text); background: none; border: 0; text-decoration: underline; cursor: pointer; white-space: nowrap; }

/* conditional logic */
.dm-logic { display: flex; align-items: center; justify-content: center; gap: var(--sp-12); flex-wrap: wrap; padding: var(--sp-12) var(--sp-4); }
.dm-logic__text { max-width: 320px; }
.dm-logic__text h3 { margin: 0 0 var(--sp-4); font-size: 21px; font-weight: 600; }
.dm-logic__text p { margin: 0 0 var(--sp-5); line-height: 1.6; }
.dm-logic__art { width: 360px; max-width: 100%; }
.dm-logic__art .f rect { fill: var(--surface); stroke: #93c6cf; stroke-width: 2; }
.dm-logic__art .b rect { fill: var(--surface); stroke: #93c6cf; stroke-width: 1.5; }
.dm-logic__art .b rect.o { stroke: var(--indigo); }
.dm-logic__art .l path { stroke: var(--text-subtle); stroke-dasharray: 4 4; fill: none; }
.dm-logic__art .lines path { stroke: var(--border-strong); stroke-width: 4; stroke-linecap: round; }

/* =================================================================== LIMITS */
.dm-limits { display: grid; grid-template-columns: 220px minmax(0, 1fr); margin: calc(var(--sp-6) * -1) calc(clamp(16px, 3vw, 40px) * -1) 0; border-top: 0; min-height: 70vh; }
.dm-lnav { padding: var(--sp-6) 0 var(--sp-6) var(--sp-3); border-right: 1px solid var(--border); }
.dm-lnav__head { display: flex; align-items: center; gap: 6px; margin: var(--sp-5) 0 var(--sp-2) var(--sp-3); font-weight: 700; font-size: 15px; }
.dm-lnav__head:first-child { margin-top: 0; }
.dm-lnav__head .dm-link-strong { display: inline-flex; align-items: center; gap: 6px; }
.dm-lnav__link { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 12px; font: inherit; font-size: 15px; color: var(--text); text-decoration: none; background: none; border: 0; border-left: 3px solid transparent; cursor: pointer; text-align: left; }
.dm-lnav__link:hover { background: var(--surface-hover); }
.dm-lnav__link.is-active { background: var(--surface-3); border-left-color: var(--text); }
.dm-lnav__link--child { padding-left: 24px; }
.dm-lnav__toggle .icon { transition: transform var(--fast); }
.dm-lnav__toggle.is-open .icon { transform: rotate(180deg); }
.dm-lmain { padding: var(--sp-6) clamp(16px, 2vw, 28px); min-width: 0; }
.dm-lhead { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.dm-lhead h2 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.dm-lhead p { margin: 0; font-size: 13px; color: var(--text-muted); max-width: 820px; line-height: 1.5; }
.dm-lhead p a { color: var(--brand-ink); font-weight: 600; }
.dm-lh3 { display: flex; align-items: center; gap: 6px; margin: var(--sp-6) 0 6px; font-size: 18px; font-weight: 600; }
.dm-lp { margin: 0 0 var(--sp-4); font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.dm-ltable td { padding: 18px 24px; }
.dm-ltable__name { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.dm-row-links { display: inline-flex; gap: var(--sp-3); opacity: 0; transition: opacity var(--fast); }
.dm-row-links a { padding: 4px 10px; font-size: 12px; font-weight: 500; color: var(--text); text-decoration: none; border: 1px solid var(--border-strong); border-radius: var(--radius-pill); background: var(--surface); white-space: nowrap; }
.dm-row-links a:hover { border-color: var(--brand); color: var(--brand-ink); }
tr:hover .dm-row-links, .dm-row-links:focus-within, .dm-row-links.is-static { opacity: 1; }
.dm-ltable thead th { border-bottom: 1px solid var(--text); }
.dm-usage { width: 100%; max-width: 520px; }
.dm-usage--wide { max-width: 640px; margin-bottom: var(--sp-3); }
.dm-usage__top { display: flex; justify-content: space-between; gap: var(--sp-3); margin-bottom: 6px; font-size: 12.5px; }
.dm-usage__bar { height: 8px; background: var(--surface-3); border-radius: var(--radius-pill); overflow: hidden; }
.dm-usage__bar span { display: block; height: 100%; background: var(--success); border-radius: inherit; }
.dm-chipbar { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin: var(--sp-2) 0 var(--sp-4); padding: var(--sp-3); }
.dm-chipbar:empty { display: none; }
/* A filter's label and its control wrap onto the next line together. */
.dm-pair { display: inline-flex; align-items: center; gap: var(--sp-3); }
.dm-defcard { padding: var(--sp-4) var(--sp-5); margin-bottom: var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.dm-defcard__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); }
.dm-assocpick { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius-sm); }

/* =================================================================== HEALTH */
.dm-body--health { background: var(--bg); }
.dm-hsum { display: grid; grid-template-columns: 1.15fr 1.2fr 1.1fr auto; gap: 0; padding: var(--sp-6); margin-bottom: var(--sp-6); }
.dm-hsum > * { padding: 0 var(--sp-6); border-left: 1px solid var(--border); }
.dm-hsum > :first-child { border-left: 0; padding-left: 0; }
.dm-hsum h2 { margin: 0 0 var(--sp-3); font-size: 18px; font-weight: 600; }
.dm-hsum p { margin: 0; color: var(--text-muted); line-height: 1.6; }
.dm-hsum__label { margin: 0 0 var(--sp-3) !important; font-size: 14px; color: var(--text) !important; }
.dm-hsum__counts { display: flex; gap: var(--sp-8); }
.dm-hsum__count { display: flex; flex-direction: column; gap: 4px; padding: 0; font: inherit; color: var(--text); background: none; border: 0; cursor: pointer; text-align: left; }
.dm-hsum__count b { font-size: 22px; }
.dm-hsum__count span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
.dm-hsum__count:hover b { color: var(--brand-ink); }
.dm-hsum__top { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dm-hsum__top li { display: flex; justify-content: space-between; gap: var(--sp-4); }
.dm-hsum__top li span { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
.dm-hsum__run { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.dm-hsum__run p { font-size: 14px; color: var(--text-muted); }
.dm-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dm-dot--high { background: var(--danger); }
.dm-dot--medium { background: #f5b301; }
.dm-dot--low { background: var(--info); }
.dm-hlist { padding: var(--sp-5) var(--sp-5) var(--sp-3); }
.dm-hlist__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.dm-hlist__head h3 { margin: 0; font-size: 17px; font-weight: 600; }
.dm-viewby { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-muted); }
.dm-seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-pill); overflow: hidden; }
.dm-seg button { padding: 7px 16px; font: inherit; font-size: 13px; color: var(--text); background: var(--surface); border: 0; cursor: pointer; }
.dm-seg button + button { border-left: 1px solid var(--border-strong); }
.dm-seg button.is-active { background: var(--surface-3); font-weight: 600; }
.dm-sev { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.dm-issue-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; font-size: 12.5px; font-weight: 700; background: var(--surface-3); border-radius: 4px; white-space: nowrap; }
.dm-details { display: inline-block; max-width: 260px; font-size: 13.5px; color: var(--text-muted); }
.dm-hlist .dm-table td, .dm-hlist .dm-table th { padding-left: 16px; padding-right: 16px; }
/* Health issues: the hover Actions button floats over the item instead of widening its column,
   which leaves Details room to stay on a line or two. */
.dm-hlist .dm-row-hover { position: relative; }
.dm-hlist .dm-row-hover__btn { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.dm-hlist .dm-ellipsis { max-width: 200px; }
.dm-hlist .dm-details { min-width: 200px; }

/* ================================================================= ANALYSIS */
.dm-an__head { display: flex; align-items: center; }
.dm-an__obj { display: inline-flex; align-items: center; gap: 4px; padding: 0; font: inherit; font-size: 22px; font-weight: 600; color: var(--text); background: none; border: 0; cursor: pointer; }
.dm-an__desc { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 6px 0 var(--sp-6); font-size: 14px; color: var(--text-muted); }
.dm-an__filters { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-5); font-size: 14px; }
.dm-date { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px solid var(--text-subtle); border-radius: 4px; background: var(--surface); color: var(--text-muted); }
.dm-date input { font: inherit; font-size: 14px; color: var(--text); background: none; border: 0; outline: none; }
/* Analysis date range: the box shows MM/DD/YYYY; the native input covers it, invisible. */
.dm-date--mdy { position: relative; min-width: 130px; font-size: 14px; color: var(--text); cursor: pointer; }
.dm-date--mdy > .icon { color: var(--text-muted); }
.dm-date--mdy:focus-within { border-color: var(--text); box-shadow: var(--focus-ring); }
.dm-date--mdy .dm-date__native { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; opacity: 0; cursor: pointer; }
.dm-chart { position: relative; margin-bottom: var(--sp-3); }
.dm-chart svg { display: block; overflow: visible; }
.dm-chart__grid { stroke: var(--border-strong); stroke-dasharray: 2 3; }
.dm-chart__grid.is-base { stroke: var(--text-subtle); stroke-dasharray: none; }
.dm-chart__ytick, .dm-chart__xtick { font-size: 11px; fill: var(--text-muted); }
.dm-chart__axis { font-size: 12px; font-weight: 700; fill: var(--text); }
.dm-chart__cursor { stroke: var(--text-subtle); stroke-dasharray: 3 3; }
.dm-chart__tip { position: absolute; z-index: 3; min-width: 190px; padding: 10px 12px; font-size: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); pointer-events: none; }
.dm-chart__tip b { display: block; margin-bottom: 6px; }
.dm-chart__tip span { display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.dm-chart__tip i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dm-chart__tip em { margin-left: auto; padding-left: 12px; font-style: normal; font-weight: 600; }
.dm-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: var(--sp-6); }
.dm-legend__item { display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; font: inherit; font-size: 13px; color: var(--text); background: none; border: 0; cursor: pointer; }
.dm-legend__item i { width: 10px; height: 10px; border-radius: 50%; }
.dm-legend__item.is-off { color: var(--text-subtle); text-decoration: line-through; }
.dm-legend__item.is-off i { opacity: .3; }

/* ================================================================== DRAWER */
.dm-drawer-backdrop { position: fixed; inset: 0; z-index: 1050; background: rgba(16, 24, 40, .45); backdrop-filter: blur(2px); opacity: 0; transition: opacity .2s var(--ease); }
.dm-drawer-backdrop.is-open { opacity: 1; }
.dm-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 1100; display: flex; flex-direction: column; width: min(600px, 100vw); background: var(--surface); box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .2s var(--ease); }
.dm-drawer.is-open { transform: none; }
.dm-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 22px 32px 18px; border-bottom: 1px solid var(--border); }
.dm-drawer__head h2 { margin: 0; font-size: 22px; font-weight: 600; }
.dm-drawer__tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); }
.dm-drawer__tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; font: inherit; font-size: 15px; color: var(--text); background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer; }
.dm-drawer__tabs button.is-active { border-bottom-color: var(--text); font-weight: 500; }
.dm-drawer__tabs button[data-dm-ptab="agent"] .icon { color: var(--pink); }
.dm-drawer__body { flex: 1; overflow: auto; padding: 28px 40px; }
.dm-drawer__foot { display: flex; align-items: center; gap: var(--sp-3); padding: 20px 40px; border-top: 1px solid var(--border); }
.dm-drawer__h3 { margin: 0 0 var(--sp-4); font-size: 22px; font-weight: 400; }
.dm-drawer__h3 + .dm-ai-box { margin-bottom: var(--sp-8); }
.dm-drawer__label { margin: var(--sp-4) 0 var(--sp-3); font-weight: 700; font-size: 16px; }
.dm-drawer__note { margin: var(--sp-4) 0 0; font-size: 13px; color: var(--text-muted); }
.dm-ai-box { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-4); background: var(--surface-3); border-radius: var(--radius-lg); }
.dm-ai-box p { margin: 0; line-height: 1.6; }
.dm-pick { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 18px; margin-bottom: var(--sp-3); font: inherit; color: var(--text); text-align: left; background: var(--surface); border: 1px solid var(--text-subtle); border-radius: var(--radius-sm); cursor: pointer; }
.dm-pick:hover { border-color: var(--brand); box-shadow: var(--focus-ring); }
.dm-pick.is-done { opacity: .7; }
.dm-pick__title { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.dm-pick__desc { padding-left: 28px; color: var(--text); }
.dm-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: var(--sp-5); }
.dm-field__label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14.5px; }
.dm-field__hint { margin-top: -6px; font-size: 12px; color: var(--text-muted); }
.dm-field__row { display: flex; align-items: center; gap: var(--sp-2); }
.dm-agent-box { display: flex; align-items: flex-start; gap: 12px; padding: 20px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); color: var(--text-muted); font-size: 14px; line-height: 1.6; cursor: pointer; }
.dm-agent-box input { margin-top: 4px; accent-color: var(--brand); width: 16px; height: 16px; }

/* ================================================================== MODAL */
.dm-modal { position: fixed; inset: 0; z-index: 1150; display: grid; place-items: center; padding: var(--sp-4); background: rgba(16, 24, 40, .45); }
.dm-modal__box { width: min(460px, 100%); max-height: calc(100dvh - 2 * var(--sp-4)); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.dm-modal__box--wide { width: min(640px, 100%); }
.dm-modal__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.dm-modal__head h2 { margin: 0; font-size: 18px; font-weight: 600; }
/* A long body (a pair's many labels) scrolls between the fixed head and foot. */
.dm-modal__body { padding: 20px 24px 4px; overflow-y: auto; min-height: 0; }
.dm-modal__foot { display: flex; gap: var(--sp-2); padding: 16px 24px; border-top: 1px solid var(--border); }
.dm-radio { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
.dm-radio input { accent-color: var(--brand); }

/* ================================================================= BUILDER */
.dm-builder { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: var(--surface); }
.dm-builder__bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 56px; padding: 0 var(--sp-2); background: #2d3e50; color: #fff; }
[data-theme="dark"] .dm-builder__bar { background: var(--panel); }
.dm-builder__exit { justify-self: start; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; color: #fff; text-decoration: none; font-size: 14px; font-weight: 500; border: 1px solid rgba(255,255,255,.55); border-radius: var(--radius-pill); }
.dm-builder__exit:hover { background: rgba(255,255,255,.1); }
.dm-builder__title { margin: 0; font-size: 15px; font-weight: 600; }
.dm-builder__body { flex: 1; overflow: auto; padding: var(--sp-4) clamp(16px, 2vw, 32px); }
.dm-builder__body .dm-canvas-wrap { margin: 0 calc(clamp(16px, 2vw, 32px) * -1); }
.dm-builder__body .dm-canvas { height: calc(100vh - 150px); }

/* ============================================================== responsive */
@media (max-width: 1100px) {
  .dm-hsum { grid-template-columns: 1fr 1fr; row-gap: var(--sp-6); }
  .dm-hsum > :nth-child(3) { border-left: 0; padding-left: 0; }
  .dm-gsec__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .dm-hero, .dm-intro-grid { grid-template-columns: 1fr; }
  .dm-hero__art { order: -1; }
  .dm-art { max-width: 300px; }
  .dm-limits { grid-template-columns: 1fr; }
  .dm-lnav { border-right: 0; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 4px; padding: var(--sp-3); }
  .dm-lnav__head { width: 100%; margin: var(--sp-2) 0 0; }
  .dm-lnav__link { width: auto; border-left: 0; border-radius: var(--radius-sm); }
  .dm-lnav [data-dm-lnav-children] { display: contents; }
  .dm-search, .dm-search--wide { width: 100%; }
  .dm-card { padding: var(--sp-5); }
  .dm-hsum { grid-template-columns: 1fr; }
  .dm-hsum > * { border-left: 0; padding-left: 0; }
  .dm-sugg__wrap { gap: var(--sp-2); }
  .dm-drawer__body, .dm-drawer__foot { padding-left: 20px; padding-right: 20px; }
  .dm-drawer__head { padding: 18px 20px; }
  .dm-table th, .dm-table td { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 560px) {
  .dm-hsum__counts { gap: var(--sp-5); }
  .dm-tabs__link { padding: 10px 14px 12px; }
  .dm-ai__body { padding: var(--sp-4); }
}

/* graph card sizing fixes */
.dm-canvas__inner { min-width: 1480px; }
.dm-gcard__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dm-gcard__head .dm-tip, .dm-gcard__head .dm-dd, .dm-gcard__head .dm-icon-btn { flex: none; }
/* HUB-603: a pencil that can't be used yet (renaming Contacts, Companies, Deals). */
.dm-icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.dm-gcard__row span { white-space: nowrap; }
.dm-gcard .dm-btn--xxs { height: 22px; padding: 0 9px; font-size: 11px; }
.dm-table th, .dm-table td { padding-left: 16px; padding-right: 16px; }
.dm-obj__desc { max-width: 300px; }
.dm-agraph__src { top: 40px; margin-top: 40px; align-self: flex-start; }
.dm-gcard__list li > span:not(.dm-ti) { flex: 1; }
.dm-gcard__list li > .dm-ti { flex: none; width: 16px; }

.dm-builder__title { color: #fff; }
.dm-table-wrap--card td:first-child, .dm-table-wrap--card th:first-child { white-space: nowrap; }

/* ===================================================== limits: filters + labels */
.dm-chipbar--tight { gap: var(--sp-3); padding-left: 0; padding-right: 0; }
.dm-search--sm { width: 240px; }
.dm-search--sm input { height: 36px; font-size: 14px; }
.dm-defcard--plain { background: transparent; border: 0; padding: 0; }
.dm-sides { display: inline-flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.dm-side { display: inline-flex; align-items: center; gap: 2px; }
.dm-filter__btn.is-off, .dm-filter__btn[disabled] { color: var(--text-subtle); cursor: not-allowed; }
.dm-filter__btn[disabled]:hover { background: transparent; }
/* one line of chips that fades out at the right edge; whole row is a link */
.dm-chiprow {
  display: flex; gap: 6px; max-width: 100%; overflow: hidden; white-space: nowrap; text-decoration: none; padding: 4px 0;
  -webkit-mask-image: linear-gradient(90deg, #000 78%, transparent);
          mask-image: linear-gradient(90deg, #000 78%, transparent);
}
.dm-chiprow .dm-chip { flex: none; }
.dm-chiprow:hover .dm-chip, .dm-chiprow:focus-visible .dm-chip { border-color: var(--text); }
.dm-chiprow:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }
.dm-ltable--labels { table-layout: fixed; }
.dm-ltable--labels td:nth-child(2) { overflow: hidden; }
.dm-row-links a { display: inline-flex; align-items: center; gap: 4px; }
.dm-lhead p a { display: inline-flex; align-items: center; gap: 3px; }
.dm-table tr.is-highlight td { background: var(--brand-soft); }

/* ============================================================ responsive pass
   Every data-model view must fit the screen; wide tables scroll inside their
   own box, toolbars wrap, popovers are clamped by JS (placeMenu).           */
.dm, .dm-body, .dm-lmain, .dm-limits, .dm-objhead, .dm-toolbar, .dm-chipbar { min-width: 0; max-width: 100%; }
.dm-table-wrap { -webkit-overflow-scrolling: touch; }
.dm-ltable--labels { min-width: 640px; }
@media (max-width: 991.98px) {
  .dm-ltable { min-width: 560px; }
  .dm-hsum__counts { flex-wrap: wrap; gap: var(--sp-5); }
}
@media (max-width: 860px) {
  .dm-head__title { font-size: 21px; }
  .dm-body--intro, .dm-limits { margin-left: calc(var(--sp-4) * -1); margin-right: calc(var(--sp-4) * -1); }
  .dm-lmain { padding: var(--sp-5) var(--sp-4); }
  .dm-lhead { flex-direction: column; }
  .dm-chipbar { padding: var(--sp-2) 0; }
  .dm-canvas-wrap { margin-left: calc(var(--sp-4) * -1); margin-right: calc(var(--sp-4) * -1); }
  .dm-canvas { height: 70vh; }
  .dm-subtabs { margin-left: calc(var(--sp-4) * -1); margin-right: calc(var(--sp-4) * -1); padding: 0 var(--sp-4); }
  .dm-subtabs__link { padding: 10px 14px 12px 0; margin-right: 6px; font-size: 14px; }
  .dm-subtabs__link.is-active::after { left: 0; }
  .dm-objhead > .dm-dd { align-self: flex-start; }
  .dm-hlist { padding: var(--sp-4) var(--sp-3) var(--sp-2); }
  .dm-hsum { padding: var(--sp-5); }
  .dm-an__filters { gap: var(--sp-2); }
  .dm-pager { gap: 2px; }
  .dm-pager__size { margin-left: 0; }
  .dm-builder__body { padding: var(--sp-3); }
  .dm-builder__title { font-size: 14px; }
  .dm-intro-grid { padding: var(--sp-4); gap: var(--sp-4); }
  .dm-hero { padding: var(--sp-6) var(--sp-4); gap: var(--sp-4); }
  .dm-use { margin: 0 var(--sp-4) var(--sp-6); }
}
@media (max-width: 560px) {
  .dm-head { margin-bottom: var(--sp-3); }
  .dm-head__actions { width: 100%; }
  .dm-tabs { margin-bottom: var(--sp-4); }
  .dm-toolbar { gap: var(--sp-2); }
  .dm-toolbar > .dm-grow { display: none; }
  .dm-search, .dm-search--wide, .dm-search--sm { width: 100%; flex: 1 1 100%; }
  .dm-card { padding: var(--sp-4); border-radius: var(--radius-lg); }
  .dm-sugg__wrap { flex-wrap: wrap; justify-content: center; }
  .dm-sugg__card { flex: 1 1 100%; order: -1; }
  .dm-sugg__line { flex-wrap: nowrap; }
  .dm-sugg__label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dm-sugg__wire { min-width: 8px; }
  .dm-hsum__counts { gap: var(--sp-4); }
  .dm-hsum__run .dm-btn { width: 100%; }
  .dm-hlist__head { flex-direction: column; align-items: flex-start; }
  .dm-an__obj { font-size: 19px; }
  .dm-date input { width: 118px; }
  .dm-drawer__tabs button { padding: 12px 8px; font-size: 13.5px; }
  .dm-drawer__foot { flex-wrap: wrap; }
  .dm-pick__desc { padding-left: 0; }
  .dm-lnav { gap: 2px; }
  .dm-lnav__link { padding: 8px 10px; font-size: 14px; }
  .dm-assocpick { flex-direction: column; align-items: stretch; }
  .dm-select--inline { width: 100%; }
  .dm-defcard__top { flex-wrap: wrap; gap: var(--sp-2); }
  .dm-usage__top { flex-wrap: wrap; }
  .dm-objhead { flex-direction: column; }
  .dm-crumb { flex-wrap: wrap; }
  .dm-logic { padding: var(--sp-8) 0; gap: var(--sp-6); }
  .dm-empty__badge { width: 88px; height: 88px; margin-bottom: var(--sp-5); }
}
@media (max-width: 380px) {
  .dm-tabs__link { padding: 10px 10px 12px; font-size: 14px; }
  .dm-hsum__count b { font-size: 19px; }
  .dm-btn { padding: 0 12px; }
  .dm-viewby { flex-wrap: wrap; }
}

/* ================================================ Analysis date range picker
   Same component as Sequences > Analyze (.seq-dp*), copied so this page does
   not need sequences.css.                                                     */
.dm-dr__btn { display: inline-flex; align-items: center; gap: 8px; padding: 0; font: inherit; color: var(--text); background: none; border: 0; cursor: pointer; flex-wrap: wrap; }
.dm-dr__btn .dm-date { cursor: pointer; font-size: 14px; color: var(--text); min-width: 130px; }
.dm-dr__btn .dm-date .icon { color: var(--text-muted); }
.dm-dr__btn:hover .dm-date, .dm-dr__btn[aria-expanded="true"] .dm-date { border-color: var(--text); }
.dm-dr__btn:focus-visible { outline: none; }
.dm-dr__btn:focus-visible .dm-date { box-shadow: var(--focus-ring); }
.dm-pop--dp { width: auto; min-width: 0; max-width: calc(100vw - 16px); padding: 0; background: transparent; border: 0; box-shadow: none; }
.seq-dp { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.seq-dp__inputs { display: flex; align-items: center; gap: var(--sp-3); padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-pill); box-shadow: var(--shadow-lg); font-size: 14px; }
.seq-dp__input { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--text); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-muted); }
.seq-dp__input.is-active { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.seq-dp__input input { border: 0; outline: none; background: transparent; font: inherit; color: var(--text); width: 108px; }
.seq-dp__body { display: grid; grid-template-columns: 200px 300px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; max-width: calc(100vw - 16px); }
.seq-dp__presets { display: flex; flex-direction: column; max-height: 330px; overflow-y: auto; padding: 6px 0; border-right: 1px solid var(--text); }
.seq-dp__preset { text-align: left; background: none; border: 0; font: inherit; font-size: 14px; color: var(--text); padding: 10px 20px; cursor: pointer; }
.seq-dp__preset:hover, .seq-dp__preset:focus-visible { background: var(--surface-hover); outline: none; }
.seq-dp__cal { padding: var(--sp-3); }
.seq-dp__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-2); font-size: 15px; }
.seq-dp__nav { width: 32px; height: 32px; border: 0; background: none; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--text); cursor: pointer; }
.seq-dp__nav:hover, .seq-dp__nav:focus-visible { background: var(--surface-hover); outline: none; }
.seq-dp__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.seq-dp__wd { font-size: 12.5px; font-weight: 700; color: var(--text-muted); padding: 4px 0; }
.seq-dp__day { position: relative; height: 32px; border: 0; background: none; border-radius: var(--radius-sm); font: inherit; font-size: 13.5px; font-weight: 600; color: var(--text); cursor: pointer; font-variant-numeric: tabular-nums; }
.seq-dp__day:hover, .seq-dp__day:focus-visible { background: var(--surface-hover); outline: none; box-shadow: inset 0 0 0 1px var(--border-strong); }
.seq-dp__day.is-out { color: var(--text-subtle); font-weight: 500; }
.seq-dp__day.is-range { background: var(--brand-soft); border-radius: 0; }
.seq-dp__day.is-sel { background: var(--text); color: var(--surface); }
.seq-dp__day.is-today:not(.is-sel) { color: var(--danger); }
.seq-dp__day.is-today::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.seq-dp__clear { display: block; width: 100%; margin-top: var(--sp-3); padding: 6px; border: 1px solid var(--border-strong); border-radius: var(--radius-pill); background: var(--surface); font: inherit; font-size: 13.5px; cursor: pointer; color: var(--text); }
.seq-dp__clear:hover { background: var(--surface-hover); }
@media (max-width: 600px) {
  .dm-pop--dp { width: calc(100vw - 16px); max-width: 360px; }
  .seq-dp { align-items: stretch; width: 100%; }
  .seq-dp__inputs { gap: 8px; padding: 8px; border-radius: var(--radius-lg); }
  .seq-dp__inputs > span { flex: none; }
  .seq-dp__input { flex: 1 1 0; min-width: 0; padding: 0 8px; }
  .seq-dp__input input { width: 100%; min-width: 0; }
  .seq-dp__body { grid-template-columns: minmax(0, 1fr); width: 100%; }
  .seq-dp__presets { max-height: 140px; border-right: 0; border-bottom: 1px solid var(--border); }
  .dm-dr__btn .dm-date { min-width: 0; }
}
@media (max-width: 340px) {
  .seq-dp__inputs { flex-wrap: wrap; }
  .seq-dp__input { flex: 1 1 100%; }
  .seq-dp__inputs > span { width: 100%; text-align: center; }
}

/* ======================================== Manage table: row hover tools */
.dm-obj--row { position: relative; }
.dm-obj--row .dm-obj__text { flex: 1 1 auto; }
/* QA 18 Nov (#744): the Name cell keeps to its column (34%) instead of widening the table past
   its box at 1456 px: the description's 300-340px no longer sets the cell's least width, so the
   name and description share what is left beside the icon, the Activate button (#563) and the
   row tools, and end with an ellipsis. With room to spare the cell looks as in the design. In a
   narrow window they keep 150px, so names stay readable and the table scrolls sideways as before. */
.dm-table .dm-obj--row > .dm-obj__text { contain: inline-size; overflow: hidden; min-width: 150px; }
.dm-table .dm-obj--row > .dm-obj__text > * { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-table .dm-obj--row > .dm-btn { flex: none; }
.dm-rowtools { display: inline-flex; align-items: center; gap: 6px; flex: none; margin-left: 8px; opacity: 0; transition: opacity var(--fast); }
.dm-table tr:hover .dm-rowtools, .dm-rowtools:focus-within, .dm-rowtools [aria-expanded="true"] { opacity: 1; }
.dm-rowtools:has([aria-expanded="true"]) { opacity: 1; }
@media (hover: none) { .dm-rowtools { opacity: 1; } }

/* Usage drawer */
.dm-usage-obj h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.dm-usage-obj p { margin: 0 0 var(--sp-5) 26px; color: var(--text); }
.dm-usage-stats { display: flex; gap: var(--sp-6); flex-wrap: wrap; padding: 18px 24px; margin-bottom: var(--sp-6); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); }
.dm-usage-stat { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-muted); }
.dm-usage-stat__num { display: inline-flex; align-items: center; gap: 6px; font-size: 22px; font-weight: 600; color: var(--text); text-decoration: none; }
a.dm-usage-stat__num { color: var(--brand-ink); }
.dm-usage-total { margin: 0; padding-bottom: 10px; font-weight: 700; border-bottom: 1px solid var(--border-strong); }
.dm-acc__item { border-bottom: 1px solid var(--border); }
.dm-acc__btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 4px; font: inherit; font-weight: 600; color: var(--text); text-align: left; background: none; border: 0; cursor: pointer; }
.dm-acc__btn .icon { color: var(--text-muted); transition: transform var(--fast); }
.dm-acc__btn.is-open .icon { transform: rotate(90deg); }
.dm-acc__body { display: flex; flex-direction: column; gap: 6px; padding: 0 0 14px 26px; }
.dm-acc__link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--brand-ink); text-decoration: none; }
.dm-acc__link:hover { text-decoration: underline; }
.dm-acc__all { margin-top: 8px; }

/* Association labels: "Go to settings" only takes room on hover so names show in full */
.dm-ltable--labels .dm-row-links { display: none; }
.dm-ltable--labels tr:hover .dm-row-links, .dm-ltable--labels .dm-row-links:focus-within { display: inline-flex; }
.dm-ltable--labels .dm-ltable__name .dm-ellipsis { max-width: none; min-width: 0; flex: 1 1 auto; }
.dm-ltable--labels td:first-child { overflow: hidden; }

/* intro: grid tracks must be allowed to shrink below their content */
@media (max-width: 860px) { .dm-intro-grid { grid-template-columns: minmax(0, 1fr); } .dm-hero { grid-template-columns: minmax(0, 1fr); } }
.dm-intro-grid > *, .dm-use { min-width: 0; }
@media (max-width: 860px) { .dm-hsum { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) {
  .dm-lhead .dm-btn { white-space: normal; height: auto; min-height: 34px; padding: 8px 14px; text-align: left; }
  .dm-hsum__top li { flex-wrap: wrap; }
}

/* select menus: icon + label rows, list scrolls inside the menu */
.dm-menu--select .dm-menu__item { gap: 10px; }
.dm-menu--select .dm-menu__item .icon { color: var(--text-muted); }
.dm-select__btn > span .dm-ti, .dm-select__btn > span .icon { flex: none; }
.dm-pop.dm-menu { overflow-y: auto; overscroll-behavior: contain; }
.dm-drawer .dm-field { min-width: 0; }
.dm-drawer .dm-field__row .dm-input { min-width: 0; flex: 1 1 auto; }
@media (max-width: 420px) {
  .dm-drawer__head h2 { font-size: 19px; }
  .dm-drawer__tabs button { font-size: 13px; padding: 12px 6px; gap: 6px; }
  .dm-drawer__body { padding: 20px 16px; }
  .dm-drawer__foot { padding: 14px 16px; gap: 8px; }
  .dm-drawer__foot .dm-btn { flex: 1 1 auto; }
  .dm-drawer__foot .dm-grow { display: none; }
  .dm-agent-box { padding: 14px; }
}

/* text areas never show the resize handle */
.dm-textarea, .dm textarea, .dm-drawer textarea, .dm-modal textarea { resize: none; }

/* drawer footer on phones: primary + secondary side by side, Cancel as a text link */
@media (max-width: 420px) {
  .dm-drawer__foot { display: grid; grid-template-columns: 1fr 1fr; }
  .dm-drawer__foot > .dm-btn--ghost { grid-column: 1 / -1; height: 30px; }
  .dm-drawer__foot .dm-btn { white-space: normal; height: auto; min-height: 38px; padding: 6px 10px; line-height: 1.2; }
  .dm-drawer__tabs button { flex-direction: column; gap: 2px; }
}

/* ==========================================================================
   Round 18 - property editor, property row actions, association actions,
   limits width (full-bleed like the tabs line) and object switcher heads
   ========================================================================== */
/* the bleed sections must cancel exactly the page gutter at every width */
.dm { --dm-gutter: clamp(16px, 3vw, 40px); }
@media (max-width: 767.98px) { .dm { --dm-gutter: var(--sp-4); } }
.dm-limits, .dm-body--intro { margin-left: calc(var(--dm-gutter) * -1); margin-right: calc(var(--dm-gutter) * -1); max-width: none; width: auto; }
.dm-subtabs, .dm-canvas-wrap { margin-left: calc(var(--dm-gutter) * -1); margin-right: calc(var(--dm-gutter) * -1); }
.dm-subtabs { padding-left: var(--dm-gutter); padding-right: var(--dm-gutter); }
.dm-lmain { padding-left: clamp(16px, 2vw, 28px); padding-right: var(--dm-gutter); }
.dm-lnav { padding-left: calc(var(--dm-gutter) - 12px); }
@media (max-width: 991.98px) { .dm-lnav { padding-left: var(--dm-gutter); padding-right: var(--dm-gutter); } .dm-lmain { padding-left: var(--dm-gutter); } }
.dm-ltable td > .dm-ltable__name { display: flex; }

.dm-btn--danger { color: #fff; background: #c93535; border-color: #c93535; }
.dm-btn--danger:hover { background: #b02a2a; border-color: #b02a2a; }
.dm-btn[disabled] { opacity: .5; cursor: not-allowed; }
.dm-menu__head { margin: 6px 10px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.dm-menu--switch .dm-menu__item { gap: 10px; }
.dm-menu--switch .dm-menu__item > span { flex: 1; }

/* property / association name cell with hover tools */
.dm-prop-cell { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.dm-prop-cell > .dm-prop, .dm-prop-cell > .dm-plain-link { min-width: 0; }
button.dm-prop { padding: 0; font: inherit; text-align: left; background: none; border: 0; cursor: pointer; }
.dm-prop__name { overflow-wrap: anywhere; }
.dm-prop-cell .dm-rowtools { margin-left: auto; }
.dm-prop-cell .dm-rowtools .dm-btn--xxs .icon { margin-right: -2px; }

/* ------------------------------------------------------------ editor shell */
.dm-pe { position: fixed; inset: 0; z-index: 1120; display: flex; flex-direction: column; background: var(--surface); color: var(--text); }
.dm-pe__bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--sp-3); min-height: 56px; padding: 6px var(--sp-4); background: #2d2d2d; color: #fff; flex: none; }
.dm-pe__title { min-width: 0; text-align: center; line-height: 1.2; }
.dm-pe__title h2 { margin: 0; font-size: 19px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-pe__title span { font-size: 12px; opacity: .85; }
.dm-pe__acts { display: flex; justify-content: flex-end; gap: var(--sp-2); }
.dm-pe__btn { height: 38px; padding: 0 18px; font: inherit; font-size: 14px; font-weight: 600; color: #fff; background: transparent; border: 1px solid rgba(255, 255, 255, .7); border-radius: var(--radius-pill); cursor: pointer; white-space: nowrap; }
.dm-pe__btn:hover { background: rgba(255, 255, 255, .1); }
.dm-pe__btn--solid { color: #1d1d1d; background: #fff; border-color: #fff; }
.dm-pe__btn--solid:hover { background: #ececec; }
.dm-pe__btn[disabled] { color: rgba(29, 29, 29, .5); background: #d9d9d9; border-color: #d9d9d9; cursor: not-allowed; }
.dm-pe__main { flex: 1; display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 0; }
.dm-pe__nav { padding: var(--sp-8) var(--sp-5) var(--sp-6); border-right: 1px solid var(--border); overflow-y: auto; }
.dm-pe__nav h3 { margin: 0 0 var(--sp-3) 12px; font-size: 16px; font-weight: 700; }
.dm-pe__navdiv { display: block; height: 1px; margin: var(--sp-5) 12px; background: var(--border-strong); }
.dm-pe__navlink { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 38px; padding: 8px 12px; font: inherit; font-size: 14.5px; color: var(--text); text-align: left; background: none; border: 0; border-left: 3px solid transparent; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; cursor: pointer; }
.dm-pe__navlink:hover:not([disabled]) { background: var(--surface-hover); }
.dm-pe__navlink.is-active { background: var(--surface-3); border-left-color: var(--text); }
.dm-pe__navlink[disabled] { color: var(--text-subtle); cursor: not-allowed; }
.dm-pe__warn { width: 14px; height: 14px; border-radius: 50%; background: #f5b400; flex: none; }
.dm-pe__body { min-width: 0; overflow-y: auto; padding: var(--sp-5) var(--sp-5) var(--sp-10); }
.dm-pe__inner { max-width: 580px; margin: 0 auto; }
.dm-pe__inner--wide { max-width: 880px; }
.dm-pe__banner { margin: 0 calc((100% - min(100%, 1136px)) / 2) var(--sp-6); padding: 16px 20px; font-size: 14px; background: #fff8e6; border: 1px solid #f2c94c; border-radius: var(--radius); }
.dm-pe__inner .dm-pe__banner { margin: 0 0 var(--sp-6); }
.dm-pe__head { padding: var(--sp-6) 0 var(--sp-5); margin-bottom: var(--sp-5); border-bottom: 1px solid var(--border-strong); }
.dm-pe__head h2 { margin: 0 0 6px; font-size: 20px; font-weight: 600; }
.dm-pe__head p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text); }
.dm-pe__head a, .dm-pe__text a, .dm-pe__small a { display: inline-flex; align-items: center; gap: 3px; color: var(--brand-ink); font-weight: 600; text-decoration: none; }
.dm-pe .dm-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-5); }
.dm-pe .dm-field__hint { font-size: 12.5px; font-weight: 500; color: var(--text-muted); line-height: 1.4; }
.dm-pe .dm-input:disabled, .dm-pe .dm-textarea:disabled { color: var(--text-muted); background: var(--surface-2, #f7f8fa); border-color: var(--border); cursor: not-allowed; }
.dm-pe__internal { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: -10px 0 var(--sp-4); font-size: 13px; }
.dm-pe__internal-l { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); font-size: 12.5px; }
.dm-pe__internal code { font-family: inherit; font-size: 14px; overflow-wrap: anywhere; }
.dm-pe__internal .dm-input--sm { flex: 1 1 220px; }
.dm-input--sm { height: 36px; padding: 6px 10px; font-size: 14px; }
.dm-input.is-invalid, .dm-textarea.is-invalid { border-color: #d92d20; }
.dm-select__btn.is-ro, .dm-select__btn[disabled] { color: var(--text-muted); background: var(--surface-2, #f7f8fa); border-color: var(--border); cursor: not-allowed; }
.dm-pe__ph { font-style: normal; color: var(--text-muted); }
.dm-pe__note { padding: 18px 20px; border: 1px solid var(--text-subtle); border-radius: var(--radius-lg); }
.dm-pe__note p { margin: 0 0 4px; font-size: 14px; }
.dm-pe__learn { display: inline-flex; align-items: center; gap: 3px; margin-top: -4px; font-size: 12.5px; font-weight: 700; color: var(--brand-ink); text-decoration: none; }
.dm-pe__fs { padding: 0; margin: 0 0 var(--sp-5); border: 0; }
.dm-pe__fs legend { margin-bottom: 4px; }
.dm-pe__text { margin: 0 0 var(--sp-5); font-size: 14px; line-height: 1.6; }
.dm-pe__styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); }
.dm-pe__style { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 64px; padding: 8px; font: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--text-subtle); border-radius: var(--radius-sm); cursor: pointer; }
.dm-pe__style.is-active { background: var(--surface-3); border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.dm-pe__style[disabled] { cursor: not-allowed; opacity: .7; }
.dm-pe__dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--brand); vertical-align: middle; }
.dm-pe__badge { display: inline-block; padding: 2px 8px; font-size: 12px; font-weight: 700; color: #fff; background: var(--brand); border-radius: 4px; }
.dm-pe__row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-5); }
.dm-pe__row2 .dm-search { width: 100%; }
.dm-pe__optshead { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-3); margin: 0 0 var(--sp-2); font-size: 14.5px; }
.dm-pe__danger { color: #c93535; }
.dm-pe__opts { min-width: 520px; }
.dm-pe__opts th, .dm-pe__opts td { padding: 10px 12px; }
.dm-pe__opts-c { width: 64px; white-space: nowrap; }
.dm-pe__opts-o { width: 110px; }
.dm-pe__grip { display: inline-flex; vertical-align: middle; margin-right: 6px; color: var(--text-muted); cursor: grab; }
.dm-pe__grip-sp { display: inline-block; width: 20px; }
.dm-pe__opts input[type="checkbox"], .dm-pe__smart input { width: 18px; height: 18px; accent-color: var(--brand); vertical-align: middle; }
.dm-pe__optacts { display: flex; flex-wrap: wrap; gap: var(--sp-5); padding: var(--sp-4) var(--sp-3); }
.dm-pe__optacts .dm-link-strong { display: inline-flex; align-items: center; gap: 6px; }
.dm-pe__optacts [disabled] { opacity: .5; cursor: not-allowed; }
.dm-pe__table th, .dm-pe__table td { padding: 10px 16px; }
.dm-pe__table code, .dm-pe__opts code { font-family: inherit; }
.dm-pe__num { text-align: right; }
.dm-pe .dm-pager { justify-content: center; margin-top: var(--sp-3); }
.dm-pe__teams { width: 100%; }
.dm-pe__teams .dm-filter__btn { width: 100%; height: 42px; justify-content: space-between; padding: 0 12px; font-size: 15px; font-weight: 400; border: 1px solid var(--text-subtle); border-radius: var(--radius-sm); }
.dm-pe__seg { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: var(--sp-5); border: 1px solid var(--text-subtle); border-radius: var(--radius-pill); overflow: hidden; width: fit-content; max-width: 100%; }
.dm-pe__seg button { padding: 9px 18px; font: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 0; cursor: pointer; }
.dm-pe__seg button + button { border-left: 1px solid var(--text-subtle); }
.dm-pe__seg button.is-active { background: var(--surface-3); font-weight: 600; }
.dm-pe__preview { display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.dm-pe__pvopts { display: flex; flex-direction: column; gap: 2px; }
.dm-pe__smart { display: inline-flex; align-items: center; gap: 10px; margin-bottom: var(--sp-5); font-size: 15px; }
.dm-pe__smart span { display: inline-flex; align-items: center; gap: 8px; }
.dm-pe__smart .icon { color: #c2187a; }
.dm-pe__h3 { margin: var(--sp-2) 0 var(--sp-3); font-size: 15px; font-weight: 700; }
.dm-pe__msg { margin: 0 0 var(--sp-4); font-size: 14px; line-height: 1.6; }
/* Conditional options (settings-properties design: .pp-condrow): one box per controlling value. */
.dm-condmap { display: flex; flex-direction: column; margin-top: var(--sp-4); }
.dm-condrow { border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-3) var(--sp-4); margin: 0 0 var(--sp-3); }
.dm-condrow legend { padding: 0 4px; font-size: 14px; }
.dm-pe__fill { padding: var(--sp-5); margin-bottom: var(--sp-5); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); }
.dm-pe__fill h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.dm-pe__fill p { margin: 0 0 var(--sp-3); font-size: 14px; }
.dm-pe__fill b { font-size: 22px; margin-right: 6px; }
.dm-pe__export { margin: 0 0 var(--sp-4); font-size: 14px; }
.dm-pe__small { margin: var(--sp-3) 0 var(--sp-2); font-size: 12.5px; line-height: 1.5; color: var(--text-muted); }
.dm-modal .dm-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-4); }
.dm-modal .dm-select { margin-top: 2px; }

@media (max-width: 991.98px) {
  .dm-pe__main { grid-template-columns: 220px minmax(0, 1fr); }
  .dm-pe__nav { padding: var(--sp-6) var(--sp-3); }
}
/* phones / small tablets: nav becomes a scrolling strip under the bar */
@media (max-width: 767.98px) {
  .dm-pe__bar { grid-template-columns: minmax(0, 1fr) auto; padding: 8px var(--sp-3); }
  .dm-pe__bar-side { display: none; }
  .dm-pe__title { text-align: left; }
  .dm-pe__title h2 { font-size: 16px; }
  .dm-pe__btn { height: 34px; padding: 0 14px; font-size: 13px; }
  .dm-pe__main { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .dm-pe__nav { display: flex; align-items: center; gap: 4px; padding: 8px var(--sp-3); border-right: 0; border-bottom: 1px solid var(--border); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .dm-pe__nav::-webkit-scrollbar { display: none; }
  .dm-pe__nav h3, .dm-pe__navdiv { display: none; }
  .dm-pe__navlink { flex: none; width: auto; min-height: 34px; padding: 6px 12px; font-size: 13.5px; white-space: nowrap; border-left: 0; border-radius: var(--radius-pill); }
  .dm-pe__navlink.is-active { background: var(--text); color: var(--surface); }
  .dm-pe__body { padding: var(--sp-3) var(--sp-4) var(--sp-10); }
  .dm-pe__head { padding-top: var(--sp-3); }
  .dm-pe__head h2 { font-size: 18px; }
  .dm-pe__row2 { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dm-pe__styles { gap: var(--sp-2); }
  .dm-pe__style { min-height: 52px; font-size: 13px; }
  .dm-pe__banner { padding: 12px 14px; font-size: 13.5px; }
}
@media (max-width: 380px) {
  .dm-pe__bar { grid-template-columns: minmax(0, 1fr); }
  .dm-pe__acts { justify-content: stretch; }
  .dm-pe__acts .dm-pe__btn { flex: 1; }
  .dm-pe__styles { grid-template-columns: minmax(0, 1fr); }
  .dm-pe__seg { width: 100%; border-radius: var(--radius); }
  .dm-pe__seg button { flex: 1 1 100%; }
  .dm-pe__seg button + button { border-left: 0; border-top: 1px solid var(--text-subtle); }
}
.dm-pe__title h2 { color: #fff; }
.dm-pe .dm-search, .dm-pe .dm-search--wide { width: 100%; max-width: none; }
/* associations toolbar: the search gives way so the actions stay on one row */
@media (min-width: 992px) {
  .dm-toolbar .dm-search--wide { flex: 0 1 400px; min-width: 180px; width: auto; }
}
@media (max-width: 420px) {
  .dm-toolbar .dm-btn { max-width: 100%; white-space: normal; height: auto; min-height: 34px; padding-top: 6px; padding-bottom: 6px; line-height: 1.25; text-align: left; }
}

/* ------------------------------------------------ Edit property logic */
.dm-lg__main { flex: 1; display: grid; grid-template-columns: 480px minmax(0, 1fr); min-height: 0; }
.dm-lg__edit { padding: var(--sp-6) var(--sp-5) var(--sp-10); overflow-y: auto; border-right: 1px solid var(--border-strong); }
.dm-lg__preview { padding: var(--sp-6) var(--sp-5) var(--sp-10); overflow-y: auto; background: #f0f0f0; }
.dm-lg__h { margin: 0 0 var(--sp-4); font-size: 17px; font-weight: 700; }
.dm-lg__h4 { margin: var(--sp-5) 0 var(--sp-3); font-size: 15px; font-weight: 700; }
.dm-lg__p { margin: 0 0 var(--sp-4); font-size: 14.5px; line-height: 1.6; }
.dm-lg__stack { display: flex; flex-direction: column; gap: 12px; }
.dm-lg__stack .dm-select__btn[disabled] { color: var(--text-muted); background: #f0f0f0; border-color: var(--border); cursor: not-allowed; }
.dm-lg__multi { width: 100%; }
.dm-lg__multi .dm-filter__btn { width: 100%; height: 42px; justify-content: space-between; padding: 0 12px; font-size: 15px; font-weight: 400; border: 1px solid var(--text-subtle); border-radius: var(--radius-sm); }
.dm-lg__multi .dm-filter__btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-lg__div { height: 1px; margin: var(--sp-6) 0 0; background: var(--border-strong); }
.dm-lg__dep { display: flex; gap: 8px; padding: 12px 12px 14px 6px; margin-bottom: 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); }
.dm-lg__move { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text-muted); }
.dm-lg__move button { display: grid; place-items: center; width: 20px; height: 18px; padding: 0; color: var(--text-muted); background: none; border: 0; cursor: pointer; }
.dm-lg__move button[disabled] { opacity: .35; cursor: default; }
.dm-lg__depmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.dm-lg__dephead { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; font-size: 14.5px; }
.dm-lg__req { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; cursor: pointer; }
.dm-lg__req input { width: 16px; height: 16px; accent-color: var(--text); }
.dm-lg__rm { display: inline-flex; align-items: center; gap: 4px; }
.dm-lg__add { margin-top: 4px; }
.dm-lg__pv { width: 100%; max-width: 500px; margin: var(--sp-6) auto 0; display: flex; flex-direction: column; gap: 8px; }
.dm-lg__pvlabel { font-weight: 700; font-size: 14.5px; }
.dm-lg__star { font-style: normal; color: #c93535; }
.dm-lg__pv > .dm-select .dm-select__btn[disabled] { background: #e7e7e7; border-color: #e7e7e7; }
.dm-lg__pvcard { display: flex; flex-direction: column; gap: var(--sp-4); margin-top: 8px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); }
.dm-lg__pvcard.has-deps { border-left: 4px solid var(--text-subtle); }
.dm-lg__pvcard > p { margin: 0; font-size: 14.5px; text-align: center; }
.dm-lg__pvfield { display: flex; flex-direction: column; gap: 6px; }
.dm-menu__item.is-disabled { color: var(--text-subtle); cursor: not-allowed; }
@media (max-width: 991.98px) {
  .dm-lg__main { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); }
}
@media (max-width: 767.98px) {
  .dm-lg__main { display: block; overflow-y: auto; }
  .dm-lg__edit { border-right: 0; border-bottom: 1px solid var(--border-strong); overflow: visible; padding: var(--sp-4) var(--sp-4) var(--sp-6); }
  .dm-lg__preview { overflow: visible; padding: var(--sp-4) var(--sp-4) var(--sp-10); }
  .dm-lg__pv { margin-top: var(--sp-3); }
  .dm-lg__pvcard { padding: 16px; }
}

/* ===== Create object drawer: next steps (confirm / from scratch / AI review) ===== */
.dm-co { display: contents; }
.dm-drawer__head .dm-co__back { margin-right: 4px; }
.dm-drawer__head:has(.dm-co__back) { justify-content: flex-start; gap: 8px; }
.dm-drawer__head:has(.dm-co__back) h2 { flex: 1; min-width: 0; padding-left: 12px; border-left: 1px solid var(--border); }
.dm-co__lead { margin: 0 0 var(--sp-5); font-size: 16px; font-weight: 600; }
.dm-co__h { display: flex; align-items: center; gap: 6px; margin: var(--sp-8) 0 var(--sp-3); font-size: 18px; font-weight: 600; }
.dm-co__h--first { margin-top: 0; }
.dm-co__p { margin: 0 0 var(--sp-3); line-height: 1.55; color: var(--text); }
.dm-co__p .icon, .dm-co-meta .icon, .dm-co__h .icon { vertical-align: -2px; color: var(--text-muted); }
.dm-co__reset { display: inline-flex; align-items: center; gap: 4px; margin: -12px 0 var(--sp-4); }
.dm-co__add { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--sp-2); }
.dm-co-meta { margin: -6px 0 var(--sp-5); font-size: 14px; }
.dm-co-internal { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: -10px 0 var(--sp-5); font-size: 13px; color: var(--text-muted); word-break: break-all; }
.dm-co-internal .dm-input { flex: 1 1 180px; margin-left: 4px; }
.dm-icon-btn--xs { width: 24px; height: 24px; }
.dm-co-map { margin-top: var(--sp-3); overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.dm-co-map table { width: 100%; min-width: 440px; border-collapse: collapse; font-size: 14px; }
.dm-co-map th { padding: 10px 12px; font-size: 12px; font-weight: 700; text-align: left; text-transform: uppercase; letter-spacing: .02em; background: var(--surface-3); border-bottom: 1px solid var(--border); }
.dm-co-map td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.dm-co-map tr:last-child td { border-bottom: 0; }
.dm-co-map__arrow { width: 24px; color: var(--text-muted); text-align: center; }
.dm-co-info { display: flex; gap: 10px; margin: var(--sp-6) 0 0; padding: 14px 16px; line-height: 1.55; background: #e5f5f8; border: 1px solid #7fd1de; border-radius: var(--radius-sm); }
.dm-co-info > .icon { flex: none; margin-top: 3px; color: #0b7a8c; }
.dm-co-info p { margin: 0; font-size: 14px; }
.dm-co-info .dm-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; }
.dm-co-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 44px; padding: 6px 8px; background: var(--surface); border: 1px solid var(--text-subtle); border-radius: var(--radius-sm); }
.dm-co-tag { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 8px; font-size: 13px; color: var(--text); background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: 3px; }
.dm-co-tag.is-locked { color: var(--text-muted); }
.dm-co-tag button { display: grid; place-items: center; width: 16px; height: 16px; padding: 0; color: var(--text-muted); background: none; border: 0; border-radius: 2px; cursor: pointer; }
.dm-co-tag button:hover { color: var(--text); background: var(--surface-hover); }
.dm-co-tags__dd { margin-left: auto; }
.dm-co-sec { position: relative; padding-top: var(--sp-2); }
.dm-co-sec + .dm-co-sec { margin-top: var(--sp-2); border-top: 1px dashed var(--border); padding-top: var(--sp-4); }
.dm-co-ai-note { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--sp-6); font-size: 13.5px; }
.dm-co-ai-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; font-size: 11px; font-weight: 700; color: #6b2fd0; background: #f1eafd; border-radius: 3px; }
.dm-co-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dm-co-row .dm-co__h { margin-bottom: var(--sp-2); }
.dm-co-card { display: flex; align-items: flex-start; gap: 12px; margin-bottom: var(--sp-3); padding: 16px 18px; border: 1px solid var(--text-subtle); border-radius: var(--radius-lg); }
.dm-co-card__body { flex: 1; min-width: 0; }
.dm-co-card__k { margin: 0; font-size: 13.5px; font-weight: 700; }
.dm-co-card__v { margin: 2px 0 10px; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.dm-co-card__v:last-child { margin-bottom: 0; }
.dm-co-assoc { display: flex; flex-direction: column; gap: 2px; }
.dm-co-assoc em { font-style: normal; color: var(--text-muted); }
.dm-pick[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }
@media (max-width: 767px) {
  .dm-co__h { margin-top: var(--sp-6); font-size: 16px; }
  .dm-co-card { padding: 12px 14px; }
}
@media (max-width: 420px) {
  .dm-co-card { flex-direction: column; gap: 6px; }
  .dm-drawer__head:has(.dm-co__back) h2 { padding-left: 8px; }
}
.dm-co-card .dm-link, .dm-co-row .dm-link, .dm-co__p .dm-link, .dm-co-info .dm-link, .dm-co-internal .dm-link { margin: 0; }
.dm-co__p .dm-link { display: inline-flex; align-items: center; gap: 4px; }
.dm-co-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.dm-co-meta .icon, .dm-co__p .icon, .dm-co-internal .icon { display: inline-block; flex: none; }
.dm-co .dm-input:disabled, .dm-co .dm-textarea:disabled { color: var(--text-muted); background: var(--surface-2, #f5f8fa); border-color: var(--border); cursor: not-allowed; }
.dm-co-map td:nth-child(2) { white-space: nowrap; }

/* Property assets list (Properties tab "Assets" and the editor's Usage section). */
.dm-assets__list { margin: 0 0 var(--sp-4); padding-left: 20px; font-size: 14px; line-height: 1.8; }
.dm-assets .dm-lh3:first-child { margin-top: 0; }

/* Create object: "Create association" checklist */
.dm-co-assoc { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px 16px; margin-bottom: var(--sp-5); }

/* Self-paced tours (HUB-600): a spotlight on the step's part and its card next to it */
.dm-tour-layer { position: fixed; inset: 0; z-index: 1200; }
.dm-tour-dim { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); }
.dm-tour-spot { position: fixed; border-radius: var(--radius-sm); box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.45); outline: 2px solid var(--brand); pointer-events: none; transition: top 0.2s, left 0.2s, width 0.2s, height 0.2s; }
.dm-tourpop { position: fixed; width: 320px; max-width: calc(100vw - 32px); padding: var(--sp-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg, 0 12px 32px rgba(15, 23, 42, 0.18)); color: var(--text); outline: none; }
.dm-tourpop__meta { margin: 0 0 4px; font-size: 12px; color: var(--text-subtle); }
.dm-tourpop__title { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.dm-tourpop__body { font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.dm-tourpop__links { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.dm-tourpop__foot { display: flex; align-items: center; gap: 8px; margin-top: var(--sp-4); }
.dm-tour__state { flex: none; }

/* Property validation rules (HUB-354), in the property editor's Field type section */
.dm-rules { margin-top: var(--sp-4); }
.dm-rules__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); margin-top: var(--sp-3); }
.dm-rules__grid .dm-field { margin: 0; }
.dm-field__error { margin: var(--sp-2) 0 0; font-size: 13px; color: var(--danger); }
@media (max-width: 767.98px) { .dm-rules__grid { grid-template-columns: 1fr; } }

/* Association labels of a pair: manage, limits, API details (row Actions) */
.dm-labels-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-3); }
.dm-labels-head .dm-muted { margin: 0; }
.dm-labels { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-bottom: var(--sp-3); }
.dm-labels th, .dm-labels td { padding: 8px 10px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
.dm-labels th { font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.dm-labels td .dm-chip { margin-left: 6px; }
.dm-labels code { font-size: 12.5px; overflow-wrap: anywhere; }
.dm-labels__actions { white-space: nowrap; text-align: right; }
.dm-labels__actions .dm-btn + .dm-btn { margin-left: 6px; }
button.dm-chip { cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; }
button.dm-chip:hover { border-color: var(--brand); color: var(--brand-ink); }
/* Export properties dialog */
.dm-export__tools { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-2); }
.dm-export__list { max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px; }
/* Property editor options: active / archived tabs, search, sort and copy */
.dm-pe__opttools { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-3); margin: 0 0 var(--sp-2); }
.dm-pe__opttabs { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.dm-pe__opttab { padding: 5px 12px; font: inherit; font-size: 13px; color: var(--text-muted); background: var(--surface); border: 0; cursor: pointer; }
.dm-pe__opttab + .dm-pe__opttab { border-left: 1px solid var(--border); }
.dm-pe__opttab.is-active { color: var(--brand-ink); background: var(--brand-soft); font-weight: 600; }
.dm-pe__optsearch { width: 180px; }
.dm-pe__opttools .dm-link-strong:disabled { opacity: .5; cursor: not-allowed; }
.dm-labels__actions .dm-btn:disabled { opacity: .45; cursor: not-allowed; }
.dm-labels td:nth-child(3) { white-space: nowrap; }
/* Locked fields in dialogs and side panels (Edit object, Edit association limit) */
.dm-modal .dm-input:disabled, .dm-drawer .dm-input:disabled, .dm-drawer .dm-textarea:disabled { color: var(--text-muted); background: var(--surface-2, #f7f8fa); border-color: var(--border); cursor: not-allowed; }

/* QA 18 Nov (#453): the properties list's bulk action bar. */
.dm-bulkbar { padding: 8px 12px; background: var(--brand-soft); border-radius: var(--radius); gap: 10px; }
/* QA 18 Nov (#738): Reorder property groups. */
.dm-reorder { list-style: none; margin: 12px 0 0; padding: 0; max-height: 360px; overflow: auto; }
.dm-reorder__item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); cursor: grab; }
.dm-reorder__item.is-dragging { opacity: 0.5; }
.dm-reorder__label { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }

/* DMG4: the 20 Nov drop's rules for the Properties table's bulk bar, selection banner,
   internal name, View API details and View history (design css ranges copied as-is). */
.dm-prop-subname {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono, monospace);
  margin-top: 2px;
}
.dm-pbulk-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  margin-top: 14px;
}
.dm-pbulk-check {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin-right: -4px;
}
.dm-pbulk-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--brand);
  border-radius: 4px;
  accent-color: var(--brand);
  cursor: pointer;
}
.dm-pbulk-bar + .dm-selection-banner + div .dm-table-wrap,
.dm-pbulk-bar + div .dm-table-wrap,
/* DMG4: here the table's wrap follows the bar and banner directly (DataTable markup). */
.dm-pbulk-bar + .dm-selection-banner + .dm-table-wrap,
.dm-pbulk-bar + .dm-table-wrap {
  margin-top: 0;
  border-top: none;
  border-radius: 0 0 8px 8px;
}
.dm-pbulk-count {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.dm-pbulk-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  padding: 4px 8px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
  white-space: nowrap;
  border-radius: 4px;
  transition: all 0.15s ease;
}
.dm-pbulk-action:hover {
  text-decoration: underline;
  color: var(--brand);
}
.dm-pbulk-action .icon {
  width: 15px;
  height: 15px;
  color: var(--brand);
}
.dm-selection-banner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  margin: 8px 0 12px;
  padding: 12px 18px;
  background: var(--brand-soft);  
  border: 1px solid var(--brand);
  border-radius: 8px;
  font-size: 14px;
  color: var(--brand);
}
.dm-selection-banner__link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  margin-left: 4px;
}
.dm-selection-banner__link:hover {
  text-decoration: underline;
}
.dm-api-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
  margin-bottom: 8px;
}
.dm-api-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.dm-api-item__label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.dm-api-item__field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px 6px 14px;
}
.dm-api-item__val {
  flex: 1;
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dm-api-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  transition: all var(--fast);
}
.dm-api-copy-btn:hover {
  background: var(--surface-hover);
  border-color: var(--brand);
  color: var(--brand);
}
.dm-api-copy-btn .icon {
  color: inherit;
}
.dm-history-timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}
.dm-history-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.dm-history-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.dm-history-text {
  flex: 1;
}
.dm-history-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.dm-history-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
/* DMG4 (B11): the design's property chips in "Choose new property group" (design css 7895-7950). */
.dm-move-group-sec {
  margin-bottom: 24px;
}
.dm-move-group-h {
  font-size: 15px;
  font-weight: 700;
  color: #2d3e50;
  margin: 0 0 12px 0;
}
.dm-move-props-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}
.dm-move-prop-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.3;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dm-move-prop-chip:hover {
  border-color: var(--border-strong);
}
.dm-move-prop-chip__label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}
.dm-move-prop-chip__rm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #7c98b6;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin-left: 2px;
  transition: color 0.15s ease;
}
.dm-move-prop-chip__rm:hover {
  color: #2d3e50;
}

/* DMG10: the 20 Nov drop's object nav (design css 2220-2386, `.dm-lnav` lines scoped to
   .dm-subtabs-lnav), its narrow-screen toggle (7762-7859), and the Association labels
   section: label cell and badge (6634-6660), top card and empty card (6728-6994). */
.dm-subtabs-lnav .dm-lnav__link--child {
  padding-left: 28px;
  font-size: 14.5px;
}
.dm-subtabs-lnav .dm-lnav__link.is-active {
  background: var(--surface-3);
  border-left-color: var(--text);
  border-radius: 0 6px 6px 0;
  font-weight: 600;
}
.dm-subtabs-lnav .dm-lnav__title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.dm-subtabs-lnav .dm-lnav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-muted);
}
.dm-subtabs-lnav .dm-lnav__link.is-active .dm-lnav__icon {
  color: var(--text);
}
.dm-subtabs-lnav .dm-lnav__toggle {
  font-weight: 700;
  margin-top: var(--sp-2);
}
.dm-subtabs-lnav .dm-lnav__toggle:first-child {
  margin-top: 0;
}
.dm-subtabs-lnav .dm-lnav__toggle .dm-lnav__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}
.dm-subtabs-lnav .dm-lnav__toggle .dm-lnav__chevron .icon {
  transition: transform var(--fast);
}
.dm-subtabs-lnav .dm-lnav__toggle.is-open .dm-lnav__chevron .icon {
  transform: rotate(180deg);
}
.dm-subtabs-lnav .dm-lnav__children {
  display: flex;
  flex-direction: column;
}

/* Object layout (2-column left nav + content) */
.dm-objlayout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  margin: var(--sp-4) calc(clamp(16px, 3vw, 40px) * -1) 0;
  border-top: 1px solid var(--border);
  min-height: 75vh;
}
.dm-subtabs-mobile-toggle {
  display: none !important;
}
.dm-subtabs-lnav__body {
  display: flex !important;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}
.dm-subtabs-lnav {
  padding: 16px 16px 32px 12px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dm-subtabs-lnav .dm-lnav__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border-radius: 6px;
  margin-top: 14px;
  text-align: left;
  transition: background 0.15s ease;
}
.dm-subtabs-lnav .dm-lnav__toggle:first-child {
  margin-top: 0;
}
.dm-subtabs-lnav .dm-lnav__toggle:hover {
  background: var(--surface-2);
}
.dm-subtabs-lnav .dm-lnav__toggle .dm-lnav__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--text-muted, #7c98b6);
  transition: transform 0.2s ease;
}
.dm-subtabs-lnav .dm-lnav__toggle.is-open .dm-lnav__chevron {
  transform: rotate(180deg);
}
.dm-subtabs-lnav .dm-lnav__children {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 4px 0;
}
.dm-subtabs-lnav .dm-lnav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  border-left: none;
  transition: all 0.15s ease;
}
.dm-subtabs-lnav .dm-lnav__link:hover {
  background: var(--brand-soft);
  color: var(--brand);
}
.dm-subtabs-lnav .dm-lnav__link.is-active {
  background: var(--brand-soft);
  color: var(--brand);
}
.dm-subtabs-lnav .dm-lnav__link.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 4px;
  background: var(--brand);
  border-radius: 0 3px 3px 0;
}
.dm-subtabs-lnav .dm-lnav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--text-muted, #7c98b6);
  flex-shrink: 0;
}
.dm-subtabs-lnav .dm-lnav__link.is-active .dm-lnav__icon {
  color: var(--text);
}
.dm-subcontent {
  padding: 20px 28px 48px;
  min-width: 0;
}
/* Mobile & Tablet Collapsible dm-subtabs-lnav (max-width: 991px) */
@media (max-width: 991px) {
  .dm-objlayout {
    grid-template-columns: 1fr !important;
    min-height: auto;
  }
  .dm-subtabs-lnav {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 10px 16px !important;
    width: 100% !important;
    background: var(--surface);
  }
  .dm-subtabs-mobile-toggle {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    background: var(--surface-2, #f5f8fa);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 6px);
    font: inherit;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .dm-subtabs-mobile-toggle:hover {
    background: var(--surface-hover, #edf2f7);
    border-color: var(--border);
  }
  .dm-subtabs-mobile-toggle__left {
    display: inline-flex;
    align-items: center;
    gap: 10px;
  }
  .dm-subtabs-mobile-toggle__icon {
    display: inline-flex;
    color: var(--text-muted);
  }
  .dm-subtabs-mobile-toggle__left strong {
    color: var(--brand);
    font-weight: 600;
  }
  .dm-subtabs-mobile-toggle__chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    color: var(--text-muted, #7c98b6);
  }
  .dm-subtabs-lnav.is-mobile-open .dm-subtabs-mobile-toggle__chevron {
    transform: rotate(180deg);
  }
  .dm-subtabs-lnav__body {
    display: none !important;
    flex-direction: column;
    gap: 4px;
    padding-top: 10px;
    width: 100%;
  }
  .dm-subtabs-lnav.is-mobile-open .dm-subtabs-lnav__body {
    display: flex !important;
    animation: dmSubtabsSlideDown 0.2s ease;
  }
  .dm-subtabs-lnav .dm-lnav__toggle {
    width: 100% !important;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }
  .dm-subtabs-lnav .dm-lnav__link {
    width: 100% !important;
  }
  .dm-subtabs-lnav [data-dm-subnav-children] {
    display: flex !important;
    flex-direction: column !important;
    padding-left: 8px;
  }
  .dm-subcontent {
    padding: 16px !important;
  }
}

@keyframes dmSubtabsSlideDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.dm-label-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dm-label-cell__row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dm-assoc-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.dm-label-cell__paired {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.3;
}
.dm-assoc-top-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  padding: 12px 20px;
  margin-bottom: var(--sp-4, 16px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  z-index: 30;
  overflow: visible;
}
.dm-assoc-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  position: relative;
  overflow: visible;
}
.dm-assoc-selector__label {
  font-weight: 700;
  color: var(--text);
}
.dm-assoc-target-wrap,
.dm-assoc-target-dd {
  position: relative;
  display: inline-block;
}
.dm-assoc-target-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  background: var(--surface);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--fast, 0.15s), box-shadow var(--fast, 0.15s);
}
.dm-assoc-target-btn:hover {
  border-color: var(--border-strong, #99acc2);
}
.dm-assoc-target-btn.is-open,
.dm-assoc-target-btn[aria-expanded="true"] {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(0, 122, 135, 0.15);
}
.dm-assoc-target-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 240px;
  max-width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  padding: 8px;
  box-sizing: border-box;
}
.dm-assoc-target-menu[hidden] {
  display: none !important;
}
.dm-assoc-target-search-wrap {
  position: relative;
  margin-bottom: 8px;
}
.dm-assoc-target-search {
  width: 100%;
  height: 38px;
  padding: 0 34px 0 14px;
  border: 2px solid var(--brand);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  box-sizing: border-box;
}
.dm-assoc-target-search:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 122, 135, 0.2);
}
.dm-assoc-target-search-wrap .icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted, #7c98b6);
  pointer-events: none;
}
.dm-assoc-target-list {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dm-assoc-target-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background var(--fast, 0.15s);
  box-sizing: border-box;
}
.dm-assoc-target-opt:hover {
  background: var(--surface-hover);
}
.dm-assoc-target-opt.is-selected {
  background: var(--surface-hover);
  color: var(--text);
}
.dm-assoc-target-opt .icon {
  color: var(--brand);
  flex-shrink: 0;
}

/* Toolbar adjustments for Association labels */
.dm-pill-search {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.dm-pill-search input {
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 0 36px 0 16px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  min-width: 240px;
}
.dm-pill-search input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(0, 122, 135, 0.15);
  outline: none;
}
.dm-pill-search .icon {
  position: absolute;
  right: 12px;
  pointer-events: none;
  color: var(--text-muted, #7c98b6);
}
.dm-btn--teal-pill {
  background: var(--brand) !important;
  color: #ffffff !important;
  border: 1px solid var(--brand) !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  height: 38px !important;
  padding: 0 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer;
}
.dm-btn--teal-pill:hover {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
}
.dm-btn--outline-pill {
  background: var(--surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--text) !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  height: 38px !important;
  padding: 0 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer;
}
.dm-btn--outline-pill:hover {
  background: var(--surface-hover) !important;
}
.dm-gear-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  padding: 0;
}
.dm-gear-btn:hover {
  border-color: var(--border-strong, #99acc2);
}

/* Empty State Card (Screenshot 1) */
.dm-assoc-empty-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  padding: 48px 36px;
  margin-top: var(--sp-4, 16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.dm-assoc-empty-card__content {
  flex: 1;
  max-width: 520px;
}
.dm-assoc-empty-card__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
}
.dm-assoc-empty-card__desc {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  margin: 0 0 24px;
}
.dm-assoc-empty-card__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.dm-assoc-empty-card__learn {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dm-assoc-empty-card__learn:hover {
  text-decoration: underline;
}
.dm-assoc-empty-card__art {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* DMG10 review: the object layout follows the page gutter, as the design (css 4963-4971), so it
   never spills past the page below 768px (where the gutter is 16px). */
.dm-objlayout { margin-left: calc(var(--dm-gutter) * -1); margin-right: calc(var(--dm-gutter) * -1); }

/* DMG5: the 20 Nov drop's Archived properties table cells (design css 2422-2599), the asset
   usage accordion (7037-7075), and the archive drawer's notes, cards and confirm (7617-7760). */
.dm-arch-name-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
}
.dm-arch-name-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.dm-arch-name-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}
.dm-arch-name-type {
  font-size: 13px;
  color: var(--text-muted, #7c98b6);
}
.dm-arch-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}
.dm-table tbody tr:hover .dm-arch-actions,
.dm-arch-actions:focus-within {
  opacity: 1;
  pointer-events: auto;
}

.dm-arch-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.35;
  white-space: nowrap;
}
.dm-arch-pill-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border);
  color: var(--text);
}
.dm-arch-pill-btn--delete {
  border-color: transparent;
  background: transparent;
  color: #7c98b6;
}
.dm-arch-pill-btn--delete:hover {
  border-color: #f2545b;
  color: #f2545b;
  background: #fff5f5;
}

.dm-arch-internal-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
}
.dm-arch-internal-text {
  font-size: 14px;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Allow tooltip to overflow table row & cell cleanly */
.dm-table td:has(.dm-arch-copy-wrap),
.lp-table td:has(.dm-arch-copy-wrap),
.dm-table td.dm-td--internal,
.lp-table td.dm-td--internal,
.dm-td.dm-td--internal,
.dm-td--internal {
  overflow: visible !important;
}

/* DMG5 review: the design lifts every hovered row of every list (.lp-table, .dm-table) above
   the sticky headers; here only the archived row whose Copy is hovered, for its tooltip. */
.dm-table tbody tr:has(.dm-arch-copy-btn:hover) {
  position: relative;
  z-index: 50;
}

.dm-arch-copy-wrap {
  position: relative !important;
  display: inline-flex !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
  z-index: 60 !important;
}
.dm-table tbody tr:hover .dm-arch-copy-wrap,
.dm-arch-copy-wrap:focus-within {
  opacity: 1;
  pointer-events: auto;
}
.dm-arch-copy-btn {
  position: relative !important;
  border-color: var(--border);
  border-radius: var(--radius-sm);
  padding: 3px 14px;
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
  z-index: 70 !important;
}
.dm-arch-copy-btn:hover,
.dm-arch-copy-btn:focus,
.dm-arch-copy-btn.is-copied {
  background: var(--surface-hover);
  border-color: var(--border);
}

/* Tooltip on Copy button (Screenshots 2 & 3) */
.dm-arch-tooltip {
  position: absolute !important;
  bottom: calc(100% + 8px) !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(4px) !important;
  opacity: 0;
  visibility: hidden;
  background: var(--text) !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 6px 12px !important;
  border-radius: 4px !important;
  white-space: nowrap !important;
  pointer-events: none !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease !important;
  z-index: 99999 !important;
}
.dm-arch-tooltip::after {
  content: "";
  position: absolute !important;
  top: 100% !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  border: 5px solid transparent !important;
  border-top-color: var(--text) !important;
}
.dm-arch-copy-btn:hover .dm-arch-tooltip,
.dm-arch-copy-btn:focus .dm-arch-tooltip,
.dm-arch-copy-btn.is-copied .dm-arch-tooltip {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(-50%) translateY(0) !important;
}

.dm-arch-time {
  font-size: 14.5px;
  color: var(--text);
}
.dm-usedin-accordion {
  display: flex;
  flex-direction: column;
}
.dm-usedin-item {
  border-bottom: 1px solid var(--border, #f0f2f5);
}
.dm-usedin-item__trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 0;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.dm-usedin-item__trigger:hover {
  color: var(--brand);
}
.dm-usedin-item__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: transform var(--fast);
}
.dm-usedin-item.is-open .dm-usedin-item__chevron {
  transform: rotate(-90deg);
}
.dm-usedin-item__content {
  padding: 4px 0 14px 22px;
  font-size: 13.5px;
  color: var(--text-muted, #7c98b6);
}
.dm-track-note-card {
  margin-top: 24px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
}
.dm-track-note-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text, var(--text));
  margin-bottom: 6px;
}
.dm-track-note-head .icon,
.dm-track-lightbulb {
  color: var(--text, var(--text));
  flex-shrink: 0;
}
.dm-track-note-body {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.5;
  margin: 0;
}
.dm-track-op-info-note {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--surface-2, #f5f8fa);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.45;
}
.dm-track-cancel-btn {
  background: none;
  border: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.dm-track-cancel-btn:hover {
  background: rgba(0, 122, 135, 0.08);
}
.dm-track-submit-btn:disabled {
  background: #f5f8fa !important;
  color: #99acc2 !important;
  border: 1px solid var(--border) !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

/* Archive Property Side Drawer */
.dm-archive-info-box {
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.dm-archive-info-box ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted, #516f90);
}
.dm-archive-info-box li {
  margin-bottom: 6px;
}
.dm-archive-info-box li:last-child {
  margin-bottom: 0;
}
.dm-archive-prop-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 8px);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dm-archive-prop-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.dm-archive-prop-label {
  color: var(--text-muted, #7c98b6);
}
.dm-archive-prop-val {
  color: var(--text);
  font-weight: 500;
}
.dm-archive-prop-val code {
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text);
  font-family: var(--font-mono, monospace);
}
.dm-archive-note-danger {
  border-left: 4px solid #f2545b !important;
  background: #fff5f5 !important;
  padding: 14px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
}
.dm-archive-note-danger .dm-track-note-head {
  color: #c93535;
  margin-bottom: 6px;
}
.dm-archive-note-danger .dm-track-note-body {
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}
.dm-archive-confirm-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  cursor: pointer;
  user-select: none;
}
.dm-archive-confirm-label input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--brand);
}
.dm-archive-confirm-label span {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}
/* Restore and Delete show on row hover, as the design (css 950-965), and on keyboard focus. */
.dm-arch-actions { opacity: 0; transition: opacity 0.15s ease; }
.dm-table tr:hover .dm-arch-actions, .dm-arch-actions:focus-within { opacity: 1; }
/* DMG6: the 20 Nov drop's logic filters (design css 2689-2716), bulk header (2886-2950) and
   delete-logic text (7412-7438). */
/* Conditional Logic Filters & Pointer Popovers (Screenshots 1-3) */
.dm-filter--logic .dm-filter__btn {
  background: transparent !important;
  border: none !important;
  padding: 0 2px !important;
  height: 32px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  box-shadow: none !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}
.dm-filter--logic .dm-filter__btn:hover {
  color: var(--brand) !important;
}
.dm-filter--logic.has-value .dm-filter__btn {
  color: var(--brand) !important;
}
.dm-toolbar__filters--logic {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 4px;
}

/* Bulk Bar & Header for Conditional Logic (Screenshot media_1795068297222_9863c216.png) */
.dm-th.dm-th--bulk,
.lp-th.dm-th--bulk,
th.dm-th--bulk {
  background: var(--surface, #ffffff) !important;
  border-bottom: 1px solid var(--border, var(--border)) !important;
  padding: 0 16px !important;
  text-align: left !important;
  vertical-align: middle !important;
  font-weight: normal !important;
  height: 48px !important;
}

.dm-lbulk-header,
.dm-lbulk-bar {
  display: flex !important;
  align-items: center !important;
  gap: 20px !important;
  min-height: 44px !important;
  font-size: 14px !important;
}

.dm-lbulk-count {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--text, #33475b) !important;
  white-space: nowrap !important;
}

.dm-lbulk-delete-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: none !important;
  border: none !important;
  padding: 4px 8px !important;
  font: inherit !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--brand) !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  border-radius: 4px !important;
  transition: all 0.15s ease !important;
  line-height: 1.2 !important;
}

.dm-lbulk-delete-btn:hover {
  background: var(--brand-soft) !important;
  color: var(--brand) !important;
}

.dm-lbulk-delete-btn .icon {
  width: 14px !important;
  height: 14px !important;
  color: #516f90 !important;
  stroke-width: 1.8 !important;
}

.dm-lbulk-delete-btn:hover .icon {
  color: var(--brand) !important;
}
.dm-delete-logic-intro {
  margin: 0 0 16px 0 !important;
  font-size: 14.5px !important;
  color: #33475b !important;
}
.dm-delete-logic-details {
  margin-bottom: 20px !important;
  line-height: 1.55 !important;
  font-size: 14.5px !important;
  color: #33475b !important;
}
.dm-delete-logic-ctrl {
  font-weight: 700 !important;
  color: #2d3e50 !important;
  margin-bottom: 2px !important;
}
.dm-delete-logic-cond {
  color: #33475b !important;
}
.dm-delete-logic-deps {
  color: #33475b !important;
}
.dm-delete-logic-warning {
  margin: 0 !important;
  font-size: 14.5px !important;
  color: #33475b !important;
}

/* DMG11: the 20 Nov drop's create-label drawer and limit diagram (design css 6241-6488), the
   pair pill (6663-6680) and the label history dialog (7098-7190). */
.dm-al-badge {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--sp-4);
}
.dm-al-badge .icon {
  color: var(--text-muted);
  flex-shrink: 0;
}
.dm-al-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  margin-bottom: var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition:
    border-color var(--fast),
    box-shadow var(--fast);
  cursor: pointer;
}
.dm-al-card:hover {
  border-color: var(--border-strong);
}
.dm-al-card.is-selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}
.dm-al-card__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.dm-al-card__header input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--brand);
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.dm-al-card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.dm-al-card__desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}
.dm-al-card__body {
  padding-left: 28px;
}
.dm-al-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
@media (max-width: 480px) {
  .dm-al-grid-2 {
    grid-template-columns: 1fr;
  }
}
.dm-al-sublabel {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.dm-al-internal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.dm-al-internal code {
  font-family: inherit;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.dm-al-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.dm-al-section {
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border);
}
.dm-al-section:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}
.dm-al-section__title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--sp-2);
}
.dm-al-radio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}
.dm-al-radio-row input[type="radio"] {
  accent-color: var(--brand);
  width: 16px;
  height: 16px;
}
.dm-al-custom-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  padding-left: 26px;
}
.dm-al-num-input {
  width: 80px;
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  text-align: center;
}
.dm-al-num-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}
.dm-al-diagram {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-top: var(--sp-4);
}
.dm-al-diagram-item + .dm-al-diagram-item {
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px dashed var(--border);
}
.dm-al-diagram__sentence {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.5;
  margin-top: 12px;
}
.dm-al-diagram__sentence strong {
  color: var(--text);
  font-weight: 600;
}
.dm-al-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dm-al-flow__node {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  white-space: nowrap;
  flex-shrink: 0;
}
.dm-al-flow__node .icon {
  color: var(--brand);
}
.dm-al-flow__line {
  flex: 1;
  position: relative;
  height: 2px;
  background: var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
}
.dm-al-flow__line::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -4px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid var(--border-strong);
}
.dm-al-flow__pill {
  position: relative;
  z-index: 1;
  padding: 3px 12px;
  background: var(--surface);
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dm-al-flow__node--target {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
.dm-al-flow__node--target .icon {
  color: var(--text-muted);
}
.dm-al-split-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.dm-al-split-pill span {
  padding: 3px 12px;
  color: var(--brand);
}
.dm-al-split-pill span:first-child {
  border-right: 1px solid var(--border-strong);
}
.dm-history-modal-body {
  display: flex;
  flex-direction: column;
}
.dm-history-label-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 18px;
}
.dm-history-meta-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  color: var(--text);
}
.dm-history-meta-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  line-height: 1.45;
}
.dm-history-meta-item strong {
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}
.dm-history-author-link {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dm-history-author-link:hover {
  text-decoration: underline;
}
.dm-history-author-link svg {
  color: var(--brand);
  flex-shrink: 0;
}
.dm-history-timeline-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 12px;
}
.dm-history-timeline-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.dm-history-timeline-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 18px;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s;
}
.dm-history-timeline-btn:hover {
  background: var(--surface-hover);
}
.dm-history-chevron-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  flex-shrink: 0;
}
.dm-history-timeline-content {
  padding: 0 18px 18px 40px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}
.dm-history-detail-text {
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

/* DMG12: the design's pair-view breadcrumb (css 6606-6633). */
.dm-assoc-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: var(--sp-2);
}
.dm-assoc-breadcrumb a,
.dm-assoc-breadcrumb button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  margin: 0;
}
.dm-assoc-breadcrumb a:hover,
.dm-assoc-breadcrumb button:hover {
  text-decoration: underline;
}
.dm-assoc-breadcrumb .sep {
  color: var(--text-muted);
  font-size: 13px;
}
.dm-assoc-breadcrumb .current {
  color: var(--text);
  font-weight: 700;
}
.dm-assoc-breadcrumb button { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
