.dm-list, .dm-detail { display: grid; gap: 18px; }
.dm-list .page-heading { margin: 0; }
.dm-reading-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.dm-table-card .table-toolbar { flex-wrap: wrap; gap: 10px 20px; position: relative; }
.dm-table-card .filters { flex-wrap: wrap; gap: 7px; align-items: center; }
.dm-table-card .inline-search { width: 255px; }
.dm-table-card .inline-search input { min-width: 0; }
.dm-list-title { display: grid; gap: 6px; }
.dm-scope { display: flex; align-items: center; gap: 8px; color: #395684; font-size: 12px; }
.dm-scope .link-btn { padding: 0; }
.dm-filter .user-filter-menu { z-index: 4; }
.dm-device-table { min-width: 900px; }
.dm-device-table :is(th, td):not(:first-child) { white-space: nowrap; }
.dm-secondary { display: block; margin-top: 4px; color: #67758c; font-size: 11px; font-weight: 400; }
.dm-secondary.dm-updatable { color: #2866c7; }
.dm-date { font-variant-numeric: tabular-nums; }
.dm-table-card .table tbody .dm-empty { padding: 38px 16px; text-align: center; color: #64728a; }
.dm-table-card .pagination button:disabled { cursor: default; opacity: .45; }
.dm-icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.75; }
.dm-icon-box { display: grid; width: 36px; height: 36px; flex: none; place-items: center; border-radius: 9px; color: #246bff; background: #edf3ff; }
.dm-identity { display: flex; align-items: center; gap: 12px; }
.dm-detail { min-width: 0; gap: 14px; }
.dm-detail-nav { width: fit-content; }
.dm-back { display: inline-flex; align-items: center; gap: 4px; padding: 0; }
.dm-back .dm-icon { width: 15px; }
.dm-detail-header { overflow: hidden; }
.dm-hero { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 20px 24px; }
.dm-hero { padding: 16px 20px; }
.dm-hero .dm-icon-box { width: 46px; height: 46px; border-radius: 10px; }
.dm-hero .dm-icon { width: 23px; height: 23px; }
.dm-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dm-title h1 { margin: 0; color: #16263f; font-size: 24px; letter-spacing: -.025em; overflow-wrap: anywhere; }
.dm-hero p { margin: 5px 0 0; color: #596982; font-size: 13px; }
.dm-hero p span { margin: 0 8px; }
.dm-detail-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(285px, 1fr); gap: 14px; }
.dm-detail-grid > .dm-detail-card { display: flex; flex-direction: column; min-width: 0; }
.dm-detail-card .card-header { gap: 12px; padding: 13px 20px; border-bottom: 1px solid #edf1f6; }
.dm-detail-card .card-header h2 { font-size: 16px; margin: 0; }
.dm-card-body { padding: 15px 20px 18px; }
.dm-fields { margin: 0; }
.dm-fields dt { color: #61708a; font-size: 12px; }
.dm-fields dd { margin: 5px 0 0; color: #23344d; font-size: 14px; font-weight: 650; }
.dm-connection, .dm-maintenance-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); gap: 14px; }
.dm-connection > div { min-width: 0; }
.dm-connection > div + div { border-left: 1px solid #e9eef6; padding-left: 16px; }
.dm-reading-grid { margin-top: 15px; gap: 1px; border: 1px solid #ebeff6; border-radius: 9px; background: #ebeff6; overflow: hidden; }
.dm-reading { display: grid; align-content: start; gap: 8px; min-width: 0; min-height: 82px; padding: 10px 12px; background: #f7f9fd; }
.dm-reading-label { display: flex; align-items: center; gap: 8px; color: #52627c; font-size: 12px; }
.dm-reading .dm-icon-box { width: 28px; height: 28px; border-radius: 7px; }
.dm-reading .dm-icon { width: 16px; height: 16px; }
.dm-reading strong { color: #182a43; font-size: 21px; font-variant-numeric: tabular-nums; line-height: 1.2; overflow-wrap: anywhere; }
.dm-reading-capsule strong { font-size: 15px; padding-top: 3px; }
.dm-binding { padding: 2px 20px; }
.dm-binding > div, .dm-diagnostics > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.dm-binding > div + div, .dm-diagnostics > div + div { border-top: 1px solid #edf1f6; }
.dm-binding dd, .dm-diagnostics dd { margin: 0; text-align: right; }
.dm-binding-footer { display: flex; justify-content: flex-end; margin-top: auto; padding: 6px 20px 12px; }
.dm-binding-footer .btn { color: #ad3547; border-color: transparent; box-shadow: none; }
.dm-binding-footer .btn:hover:not(:disabled) { background: #fff1f3; }
.dm-history-link { padding: 4px 0; white-space: nowrap; }
.dm-records { min-width: 0; }
.dm-records .table-toolbar { min-height: 56px; padding: 13px 20px; }
.dm-records .table td:first-child { white-space: nowrap; }
.dm-records .table-scroll:focus-visible { outline-offset: -2px; }
.dm-activity-links, .dm-maintenance-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; }
.dm-activity-links > :last-child { padding-left: 18px; border-left: 1px solid #dfe6ef; }
.dm-activity .table th:first-child { width: 180px; }
.dm-activity .table th:nth-child(2) { width: 155px; }
.dm-activity .table th:nth-child(3) { width: 100px; }
.dm-activity .table td:last-child { color: #52627a; }
.dm-maintenance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dm-maintenance-grid > section { display: flex; flex-direction: column; gap: 12px; padding: 15px 20px; min-width: 0; }
.dm-maintenance-grid > section + section { border-left: 1px solid #edf1f6; }
.dm-maintenance-grid h3 { margin: 0; color: #23344d; font-size: 14px; }
.dm-maintenance-actions { justify-content: space-between; margin-top: auto; min-height: 36px; }
.dm-current-issue { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 12px 16px; border: 1px solid #f0d7bb; border-radius: 10px; background: #fff8ef; color: #873c18; }
.dm-current-issue strong { margin-right: 12px; font-size: 14px; }
.dm-current-issue span { color: #765943; font-size: 12px; }
.dm-inline-note { color: #61708a; margin: 12px 0 0; font-size: 13px; }
.dm-detail button:disabled { cursor: default; opacity: .5; box-shadow: none; }
.dm-progress { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: #1e58bb; border: 1px solid #d8e6ff; border-radius: 9px; background: #f1f6ff; }
.dm-progress progress { accent-color: #246bff; width: min(380px, 48%); }
.dm-dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border: 1px solid #e1e8f3; border-radius: 14px; background: #fff; color: #1d2a40; box-shadow: 0 24px 70px rgba(19,33,57,.24); }
.dm-dialog::backdrop { background: rgba(17,28,47,.38); }
.dm-form > header, .dm-form > footer { display: flex; align-items: center; gap: 8px; padding: 14px 20px; }
.dm-form > header { border-bottom: 1px solid #edf1f6; justify-content: space-between; }
.dm-form > header h2 { font-size: 18px; margin: 0; }
.dm-form > footer { border-top: 1px solid #edf1f6; justify-content: flex-end; }
.dm-close { width: 32px; height: 32px; border: 0; border-radius: 7px; font: inherit; font-size: 18px; color: #61708a; background: #f1f4f9; cursor: pointer; }
.dm-dialog-body { display: grid; gap: 14px; padding: 18px 20px; }
.dm-dialog-body p { margin: 0; color: #56657c; line-height: 1.65; }
.dm-dialog-body label { display: grid; min-width: 0; gap: 6px; color: #35435a; font-size: 13px; }
.dm-dialog-body :is(input:not([type="checkbox"]), select) { width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid #dce4ee; border-radius: 8px; color: #23344d; background: #fff; font: inherit; }
.dm-dialog-body select { padding-right: 24px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, #73839a 50%), linear-gradient(135deg, #73839a 50%, transparent 50%); background-position: calc(100% - 15px) 16px, calc(100% - 10px) 16px; background-size: 5px 5px; background-repeat: no-repeat; }
.dm-dialog-body input:disabled { background: #f5f7fa; color: #7a879b; }
.dm-dialog-body .dm-check { display: flex; align-items: center; gap: 8px; }
.dm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dm-form .btn.dm-danger { color: #fff; background: #c03548; border-color: #c03548; }
@media (max-width: 1080px) {
  .dm-detail-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .dm-title h1 { font-size: 21px; }
  .dm-card-body { padding: 14px; }
}
@media (max-width: 1180px) {
  body:has(.dm-list, .dm-detail) { min-width: 0; }
  body:has(.dm-list, .dm-detail) .layout { grid-template-columns: 184px minmax(0, 1fr); }
  body:has(.dm-list, .dm-detail) .sidebar { width: 184px; }
  body:has(.dm-list, .dm-detail) :is(.topbar, .content) { padding-inline: 20px; }
}
@media (max-width: 720px) {
  .dm-maintenance-grid { grid-template-columns: minmax(0, 1fr); }
  .dm-maintenance-grid > section + section { border-left: 0; border-top: 1px solid #edf1f6; }
  .dm-connection { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dm-connection > div + div { border-left: 0; padding-left: 0; }
  .dm-hero { padding-inline: 14px; }
  .dm-reading-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dm-records .table { min-width: 590px; }
  .dm-activity .table { min-width: 520px; }
  .dm-table-card .filters { justify-content: flex-start; }
  body:has(.dm-list, .dm-detail) .layout { grid-template-columns: 132px minmax(0, 1fr); }
  body:has(.dm-list, .dm-detail) .sidebar { width: 132px; padding-inline: 8px; }
  body:has(.dm-list, .dm-detail) :is(.topbar, .content) { padding-inline: 12px; }
}
