/* Device card polish: scoped overrides for legacy /device/{id}. */

.erpds-device-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    width: 100%;
    margin-bottom: 12px;
}

.erpds-device-actions > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.erpds-device-actions .j_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    float: none;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--erpds-border, #d9e0ea);
    border-radius: 7px;
    background: var(--erpds-surface, #fff);
    color: var(--erpds-text, #0f172a);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.erpds-device-actions > a:hover .j_button,
.erpds-device-actions .j_button:hover {
    border-color: color-mix(in srgb, var(--erpds-accent, #2563b8) 42%, var(--erpds-border, #d9e0ea));
    background: var(--erpds-accent-soft, #e8f1ff);
    color: var(--erpds-accent, #2563b8);
    box-shadow: 0 4px 12px rgba(37, 99, 184, 0.14);
    transform: translateY(-1px);
}

.erpds-device-actions > a:focus-visible {
    outline: 2px solid var(--erpds-accent, #2563b8);
    outline-offset: 2px;
}

.erpds-device-actions > a:active .j_button {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.erpds-device-actions .us-icon-task-card,
.erpds-device-actions .us-icon-task-card2,
.erpds-device-actions .us-icon-task-card3,
.erpds-device-actions .us-icon-task-card4 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 21px;
    line-height: 1;
}

.erpds-device-actions .us-icon-task-card3 {
    font-size: 19px;
}

.erpds-device-actions .j_button_splitter {
    align-self: stretch;
    width: 1px;
    height: 28px;
    margin: 5px 3px;
    background: var(--erpds-border, #d9e0ea);
}

.slider_content_double.erpds-device-page {
    display: grid !important;
    grid-template-columns: minmax(360px, 400px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    width: 100% !important;
}

.slider_content_double.erpds-device-page > .erpds-device-sidebar,
.slider_content_double.erpds-device-page > .erpds-device-main {
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
    float: none !important;
    margin: 0 !important;
}

.slider_content_double.erpds-device-page > .erpds-device-sidebar {
    position: sticky;
    top: calc(var(--erpds-topbar-height, 56px) + 12px);
    align-self: start;
}

.slider_content_double.erpds-device-page > .erpds-device-main {
    position: static !important;
    align-self: start;
}

.erpds-device-sidebar > .label_h3,
.erpds-device-sidebar .label_h3 {
    display: block;
    margin: 14px 0 6px !important;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--erpds-text, #1f2630);
}

.erpds-device-sidebar .div_center img {
    max-width: 100% !important;
    height: auto;
}

.erpds-device-details {
    overflow: hidden;
}

.erpds-device-details .item:not([style*="display:none"]):not([style*="display: none"]) {
    grid-template-columns: 140px minmax(0, 1fr) !important;
    column-gap: 14px !important;
    align-items: center !important;
}

.erpds-device-details .left_data {
    white-space: normal !important;
    text-align: right;
}

.erpds-device-details .item > div:not(.left_data) {
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.erpds-device-details .item > div:not(.left_data) a {
    overflow-wrap: normal;
    word-break: normal;
}

.erpds-device-details .tagSpan {
    display: inline-block;
    margin: 1px 2px 1px 0;
    white-space: nowrap;
}

.erpds-device-ping-card {
    display: grid;
    gap: 12px;
    width: 100% !important;
    min-height: 0 !important;
    box-sizing: border-box;
    padding: 14px !important;
    border: 1px solid var(--erpds-border, #d8dee8) !important;
    background: var(--erpds-surface, #fff);
    overflow: hidden;
}

.erpds-device-ping-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.erpds-device-ping-card__icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--erpds-accent, #006aa6);
    background: color-mix(in srgb, var(--erpds-accent, #006aa6) 10%, #fff);
}

.erpds-device-ping-card__title {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.erpds-device-ping-card__title > span {
    color: var(--erpds-text-muted, #64748b);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.erpds-device-ping-card__title > strong {
    color: var(--erpds-text, #111827);
    font-size: 18px;
    line-height: 1.2;
}

.erpds-device-ping-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.erpds-device-ping-target {
    display: inline-flex;
    max-width: 100%;
    min-height: 34px;
    box-sizing: border-box;
    align-items: center;
    border: 1px solid var(--erpds-border, #d8dee8);
    border-radius: 999px;
    padding: 6px 12px;
    color: var(--erpds-accent, #006aa6) !important;
    background: var(--erpds-surface-alt, #f8fafc);
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none !important;
    overflow-wrap: anywhere;
}

.erpds-device-ping-target:hover,
.erpds-device-ping-target:focus-visible {
    border-color: color-mix(in srgb, var(--erpds-accent, #006aa6) 35%, var(--erpds-border, #d8dee8));
    background: color-mix(in srgb, var(--erpds-accent, #006aa6) 8%, #fff);
}

.erpds-device-ping-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    color: var(--erpds-text-muted, #64748b);
    font-size: 12px;
    line-height: 1.35;
}

.erpds-device-ping-status > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--erpds-text, #111827);
    font-weight: 800;
}

.erpds-device-ping-status .us-icon {
    color: var(--erpds-accent, #006aa6);
}

.erpds-device-ping-results {
    display: grid;
    gap: 6px;
    min-height: 46px;
    border-radius: 10px;
    padding: 10px 12px;
    background: var(--erpds-surface-alt, #f8fafc);
    color: var(--erpds-text, #111827);
    font-size: 12px;
    line-height: 1.45;
    overflow-x: auto;
}

.erpds-device-ping-results:empty {
    display: none;
}

.erpds-device-ping-results .erpds-ping-result:empty {
    display: none;
}

.erpds-device-ping-results .erpds-ping-line {
    white-space: nowrap;
}

body.erpds-route-device-card .MuiPaper-root[hosts] {
    display: grid !important;
    gap: 8px !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    padding: 12px !important;
    border: 1px solid var(--erpds-border, #d8dee8) !important;
    border-radius: var(--erpds-radius, 8px) !important;
    background: var(--erpds-surface, #fff) !important;
    box-shadow: var(--erpds-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06)) !important;
    overflow: hidden;
}

body.erpds-route-device-card .MuiPaper-root[hosts]::before {
    content: "Диагностика";
    color: var(--erpds-text-muted, #64748b);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.erpds-route-device-card .MuiPaper-root[hosts] .MuiTypography-root {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px 8px;
    align-items: center;
    min-width: 0;
    margin: 0 !important;
    color: var(--erpds-text, #111827);
    font-size: 16px !important;
    font-weight: 800;
    line-height: 1.25;
}

body.erpds-route-device-card .MuiPaper-root[hosts] .MuiTypography-root::after {
    content: "нажмите IP для повторной проверки";
    grid-column: 1 / -1;
    color: var(--erpds-text-muted, #64748b);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
}

body.erpds-route-device-card .MuiPaper-root[hosts] .MuiButton-root {
    justify-self: start;
    min-width: 0 !important;
    min-height: 32px !important;
    max-width: 100%;
    box-sizing: border-box !important;
    padding: 6px 10px !important;
    border: 1px solid var(--erpds-border, #d8dee8) !important;
    border-radius: 999px !important;
    background: var(--erpds-surface-alt, #f8fafc) !important;
    color: var(--erpds-accent, #006aa6) !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    overflow-wrap: anywhere;
}

body.erpds-route-device-card .MuiPaper-root[hosts] .MuiButton-root:hover,
body.erpds-route-device-card .MuiPaper-root[hosts] .MuiButton-root:focus-visible {
    border-color: color-mix(in srgb, var(--erpds-accent, #006aa6) 35%, var(--erpds-border, #d8dee8)) !important;
    background: color-mix(in srgb, var(--erpds-accent, #006aa6) 8%, #fff) !important;
}

/* Struct scheme dialog opened from the device action rail. */
#dialog-box:has(.erpds-struct-scheme-dialog) {
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    overflow: hidden;
}

#dialog-box .erpds-struct-scheme-dialog {
    width: min(460px, calc(100vw - 28px));
    box-sizing: border-box;
    color: var(--erpds-text, #111827);
}

#dialog-box .erpds-struct-scheme-dialog__header {
    margin-bottom: 0;
    padding-bottom: 10px;
}

#dialog-box .erpds-struct-scheme-dialog__body {
    display: grid;
    gap: 10px;
    padding: 12px 14px 14px;
}

#dialog-box .erpds-struct-scheme-intro {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    padding: 0 2px;
    border: 0;
    background: transparent;
    color: var(--erpds-text-muted, #525a66);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#dialog-box .erpds-struct-scheme-intro__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border-radius: var(--erpds-radius-xs, 4px);
    background: var(--erpds-accent-soft, #deedf5);
    color: var(--erpds-accent, #155aaa);
}

#dialog-box .erpds-struct-scheme-action__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: var(--erpds-radius-xs, 4px);
    background: var(--erpds-accent-soft, #deedf5);
    color: var(--erpds-accent, #155aaa);
}

#dialog-box .erpds-struct-scheme-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    min-width: 0;
}

#dialog-box .erpds-struct-scheme-action {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    min-height: 42px;
    box-sizing: border-box;
    padding: 7px 9px;
    border: 1px solid var(--erpds-border, #dde1e8);
    border-radius: var(--erpds-radius-sm, 6px);
    background: var(--erpds-surface, #fff);
    color: var(--erpds-accent-text, #155aaa);
    font-size: 12.5px;
    font-weight: 800;
    line-height: 1.3;
    text-decoration: none;
    overflow-wrap: anywhere;
}

#dialog-box .erpds-struct-scheme-action--primary {
    grid-column: 1 / -1;
    border-color: var(--erpds-accent-soft-hover, #cce0ed);
    background: var(--erpds-accent-soft, #deedf5);
}

#dialog-box .erpds-struct-scheme-action > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

#dialog-box .erpds-struct-scheme-action:hover,
#dialog-box .erpds-struct-scheme-action:focus-visible {
    border-color: var(--erpds-accent, #155aaa);
    background: var(--erpds-accent-soft-hover, #cce0ed);
    color: var(--erpds-accent, #155aaa);
    text-decoration: none;
}

#dialog-box .erpds-struct-scheme-action:focus-visible {
    outline: 2px solid var(--erpds-accent, #155aaa);
    outline-offset: 2px;
}

#dialog-box .erpds-struct-scheme-group {
    display: grid;
    grid-column: 1 / -1;
    gap: 7px;
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--erpds-border-light, #eef1f5);
    border-radius: var(--erpds-radius-sm, 6px);
    background: color-mix(in srgb, var(--erpds-bg-2, #f4f6fa) 68%, var(--erpds-surface, #fff));
}

#dialog-box .erpds-struct-scheme-group__title {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: var(--erpds-text-muted, #525a66);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

#dialog-box .erpds-struct-scheme-port-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

#dialog-box .erpds-struct-scheme-port {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    max-width: 100%;
    box-sizing: border-box;
    padding: 5px 8px;
    border: 1px solid var(--erpds-border, #dde1e8);
    border-radius: var(--erpds-radius-sm, 6px);
    background: var(--erpds-surface, #fff);
    color: var(--erpds-accent-text, #155aaa);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
    overflow-wrap: anywhere;
}

#dialog-box .erpds-struct-scheme-port:hover,
#dialog-box .erpds-struct-scheme-port:focus-visible {
    border-color: var(--erpds-accent-soft-hover, #cce0ed);
    background: var(--erpds-accent-soft, #deedf5);
    color: var(--erpds-accent, #155aaa);
}

#dialog-box .erpds-struct-scheme-port:focus-visible {
    outline: 2px solid var(--erpds-accent, #155aaa);
    outline-offset: 2px;
}

#dialog-box:has(.erpds-device-clear-dialog) {
    left: 50% !important;
    right: auto !important;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    transform: translateX(-50%) !important;
    overflow: hidden !important;
}

#dialog-box .erpds-device-clear-dialog {
    width: min(430px, calc(100vw - 28px));
    box-sizing: border-box;
    color: var(--erpds-text, #1f2630);
}

#dialog-box .erpds-device-clear-dialog__header {
    margin-bottom: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--erpds-border-soft, #e0e6ef);
}

#dialog-box .erpds-device-clear-dialog__body {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    background: var(--erpds-surface-2, #f5f7fa);
}

#dialog-box .erpds-device-clear-card {
    display: grid;
    gap: 8px;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid var(--erpds-border-soft, #e0e6ef);
    border-radius: var(--erpds-radius-sm, 6px);
    background: var(--erpds-surface, #fff);
    box-shadow: var(--erpds-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
}

#dialog-box .erpds-device-clear-card--danger {
    border-color: color-mix(in srgb, var(--erpds-danger, #c0392b) 24%, var(--erpds-border-soft, #e0e6ef));
    background: color-mix(in srgb, var(--erpds-danger, #c0392b) 5%, var(--erpds-surface, #fff));
}

#dialog-box .erpds-device-clear-card__title {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: var(--erpds-text, #1f2630);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

#dialog-box .erpds-device-clear-card__title .us-icon {
    flex: 0 0 auto;
    color: var(--erpds-accent, #155aaa);
}

#dialog-box .erpds-device-clear-card--danger .erpds-device-clear-card__title .us-icon {
    color: var(--erpds-danger, #c0392b);
}

#dialog-box .erpds-device-clear-card__hint {
    color: var(--erpds-text-muted, #525a66);
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

#dialog-box .erpds-device-clear-card__action {
    display: flex;
    justify-content: flex-start;
    min-width: 0;
}

#dialog-box .erpds-device-clear-all {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    min-height: 34px !important;
    max-width: 100%;
    box-sizing: border-box !important;
    padding: 7px 12px !important;
    border: 1px solid color-mix(in srgb, var(--erpds-danger, #c0392b) 34%, var(--erpds-border, #d9e0ea)) !important;
    border-radius: var(--erpds-radius-sm, 6px) !important;
    background: var(--erpds-surface, #fff) !important;
    color: var(--erpds-danger, #c0392b) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    text-decoration: none !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
}

#dialog-box .erpds-device-clear-all:hover,
#dialog-box .erpds-device-clear-all:focus-visible {
    background: color-mix(in srgb, var(--erpds-danger, #c0392b) 10%, var(--erpds-surface, #fff)) !important;
    color: var(--erpds-danger, #c0392b) !important;
}

#dialog-box .erpds-device-clear-range {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
}

#dialog-box .erpds-device-clear-range__field {
    display: grid;
    gap: 5px;
    min-width: 0;
    margin: 0;
}

#dialog-box .erpds-device-clear-range__field > span {
    color: var(--erpds-text-muted, #525a66);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: uppercase;
}

#dialog-box .erpds-device-clear-range__field input {
    width: 100% !important;
    min-width: 0;
    height: 34px !important;
    box-sizing: border-box;
    margin: 0 !important;
    text-align: left;
}

#dialog-box .erpds-device-clear-range__submit {
    display: inline-flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid var(--erpds-accent, #155aaa);
    border-radius: var(--erpds-radius-sm, 6px);
    background: var(--erpds-accent, #155aaa);
    color: #fff !important;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    text-decoration: none !important;
    overflow-wrap: anywhere;
}

#dialog-box .erpds-device-clear-range__submit:hover,
#dialog-box .erpds-device-clear-range__submit:focus-visible {
    background: var(--erpds-accent-strong, #0f4f94);
    color: #fff !important;
}

#dialog-box .erpds-device-work-log-dialog {
    width: min(430px, calc(100vw - 28px));
    box-sizing: border-box;
    color: var(--erpds-text, #1f2630);
}

#dialog-box .erpds-device-work-log-dialog__header {
    margin-bottom: 0;
    padding-bottom: 10px;
}

#dialog-box .erpds-device-work-log-context {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
    margin: 12px 12px 0;
    padding: 10px;
    border: 1px solid var(--erpds-border-soft, #e0e6ef);
    border-radius: var(--erpds-radius, 8px);
    background: var(--erpds-surface-2, #f5f7fa);
}

#dialog-box .erpds-device-work-log-context__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: var(--erpds-radius-sm, 6px);
    background: var(--erpds-accent-soft, #deedf5);
    color: var(--erpds-accent, #155aaa);
}

#dialog-box .erpds-device-work-log-context__body {
    display: grid;
    gap: 3px;
    min-width: 0;
}

#dialog-box .erpds-device-work-log-context__label {
    color: var(--erpds-text-muted, #525a66);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#dialog-box .erpds-device-work-log-context strong {
    color: var(--erpds-text, #1f2630);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

#dialog-box .erpds-device-work-log-context__location {
    color: var(--erpds-text-muted, #525a66);
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

#dialog-box .erpds-device-work-log-body {
    max-height: min(54vh, 460px);
    box-sizing: border-box;
    margin: 12px;
    overflow: auto;
    scrollbar-width: thin;
}

#dialog-box .erpds-device-work-log-empty {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--erpds-accent, #155aaa) 16%, var(--erpds-border-soft, #e0e6ef));
    border-radius: var(--erpds-radius, 8px);
    background: color-mix(in srgb, var(--erpds-accent-soft, #deedf5) 56%, var(--erpds-surface, #fff));
}

#dialog-box .erpds-device-work-log-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: var(--erpds-radius-sm, 6px);
    background: var(--erpds-surface, #fff);
    color: var(--erpds-accent, #155aaa);
}

#dialog-box .erpds-device-work-log-empty__body {
    display: grid;
    gap: 4px;
    min-width: 0;
}

#dialog-box .erpds-device-work-log-empty__body strong {
    color: var(--erpds-text, #1f2630);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
}

#dialog-box .erpds-device-work-log-empty__body span {
    color: var(--erpds-text-muted, #525a66);
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

/* React/MUI карточка устройства: живая /device/{id} страница. */
body.erpds-route-device-card .MuiTableContainer-root:has(.MuiTable-root) {
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--erpds-border, #dde1e8);
    border-radius: var(--erpds-radius, 8px);
    background: var(--erpds-surface, #fff);
    box-shadow: var(--erpds-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
    overflow: hidden;
}

body.erpds-route-device-card .MuiTable-root {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

body.erpds-route-device-card .MuiTableRow-root {
    display: grid;
    grid-template-columns: minmax(132px, 42%) minmax(0, 1fr);
    align-items: center;
    min-width: 0;
    border-bottom: 1px solid var(--erpds-border-light, #eef1f5);
    background: var(--erpds-surface, #fff);
}

body.erpds-route-device-card .MuiTableRow-root:nth-child(odd) {
    background: color-mix(in srgb, var(--erpds-surface-2, #f5f7fa) 58%, var(--erpds-surface, #fff));
}

body.erpds-route-device-card .MuiTableRow-root:last-child {
    border-bottom: 0;
}

body.erpds-route-device-card .MuiTableCell-root {
    display: block;
    width: 100% !important;
    min-width: 0;
    box-sizing: border-box;
    padding: 7px 10px !important;
    border-bottom: 0 !important;
    background: transparent !important;
    color: var(--erpds-text, #1f2630);
    font-size: 12.5px;
    line-height: 1.35;
    letter-spacing: 0 !important;
    text-align: left !important;
    overflow-wrap: anywhere;
}

body.erpds-route-device-card .MuiTableCell-root:first-child {
    color: var(--erpds-text-muted, #525a66);
    font-size: 11.5px;
    font-weight: 700;
    white-space: normal !important;
}

body.erpds-route-device-card .MuiTableCell-root:last-child {
    font-weight: 700;
}

body.erpds-route-device-card .MuiTableCell-root a {
    overflow-wrap: anywhere;
}

body.erpds-route-device-card .MuiDataGrid-root {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    overflow: hidden !important;
    --DataGrid-rowWidth: 100% !important;
}

body.erpds-route-device-card .MuiDataGrid-main {
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

body.erpds-route-device-card .MuiDataGrid-columnHeaders,
body.erpds-route-device-card .MuiDataGrid-virtualScroller {
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

body.erpds-route-device-card .MuiDataGrid-columnHeaders > *,
body.erpds-route-device-card .MuiDataGrid-virtualScrollerContent,
body.erpds-route-device-card .MuiDataGrid-filler {
    min-width: max-content;
}

body.erpds-route-device-card .MuiDataGrid-overlayWrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

body.erpds-route-device-card .erpds-device-ping-card {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
}

.erpds-device-iface-table {
    display: table !important;
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
    padding-left: 0 !important;
    overflow: hidden;
    border: 1px solid var(--erpds-border, #dde1e8);
    border-radius: var(--erpds-radius, 8px);
    background: var(--erpds-surface, #fff);
    box-shadow: var(--erpds-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
}

.erpds-device-iface-table > .legend,
.erpds-device-iface-table > .item {
    display: table-row !important;
    width: 100% !important;
    min-width: 0;
    height: auto !important;
}

.erpds-device-iface-table > .item {
    min-height: 45px;
}

.erpds-device-iface-table > .legend {
    background: var(--erpds-surface-2, #f5f7fa);
}

.erpds-device-iface-table > .legend > div,
.erpds-device-iface-table > .item > div {
    display: table-cell !important;
    min-width: 0;
    box-sizing: border-box;
    padding: 6px 8px !important;
    border-right: 1px solid var(--erpds-border-soft, #eef1f5);
    border-bottom: 1px solid var(--erpds-border-soft, #eef1f5);
    font-size: 12px;
    line-height: 1.3;
}

.erpds-device-iface-table > .legend > div:last-child,
.erpds-device-iface-table > .item > div:last-child {
    border-right: none;
}

.erpds-device-iface-table > .legend > div {
    color: var(--erpds-text-muted, #525a66);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.erpds-device-iface-table > .item:nth-of-type(odd) > div:not(.port_green):not(.port_red):not(.port_black):not(.port_gray):not([id^="ifSpeedAnimation"]) {
    background: color-mix(in srgb, var(--erpds-surface-2, #f5f7fa) 55%, transparent);
}

.erpds-device-iface-table > .item:hover > div:not(.port_green):not(.port_red):not(.port_black):not(.port_gray):not([id^="ifSpeedAnimation"]) {
    background: var(--erpds-accent-soft, #e8f1ff);
}

.erpds-device-iface-table .port_number {
    width: 76px;
    color: var(--erpds-text, #1f2630);
    font-weight: 700;
    text-align: center;
    vertical-align: top;
}

.erpds-device-iface-table .port_number .info_block {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 5px;
    border-radius: 4px;
    background: var(--erpds-ok-soft, #e8f5ec);
    color: var(--erpds-ok-text, #1a5c2e);
    font-size: 11px;
    line-height: 1.2;
}

.erpds-device-iface-table .port_traf {
    overflow-wrap: anywhere;
    color: var(--erpds-text, #1f2630);
    vertical-align: top;
}

.erpds-device-iface-table .port_traf[id^="div_portconnect_"] {
    width: auto;
}

.erpds-device-iface-table .port_traf:not([id]) {
    width: 110px;
    max-width: 110px;
    font-size: 11px;
    line-height: 1.25;
}

.erpds-device-iface-table .port_traf a {
    font-weight: 600;
}

.erpds-device-iface-table .port_gray {
    width: 42px;
    text-align: center;
    vertical-align: middle;
    color: var(--erpds-text-muted, #525a66);
    background: var(--erpds-surface-2, #f5f7fa) !important;
}

.erpds-device-iface-table .port_green {
    background: var(--erpds-ok, #2e8540) !important;
    color: #fff !important;
    text-align: center;
}

.erpds-device-iface-table .port_red {
    background: var(--erpds-bad, #b62a26) !important;
    color: #fff !important;
    text-align: center;
}

.erpds-device-iface-table .port_black {
    background: #000 !important;
    color: #fff !important;
    text-align: center;
}

.erpds-device-iface-table .port_black a {
    color: #fff !important;
}

.erpds-device-iface-table [id^="ifSpeedAnimation"] {
    width: 17px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.erpds-device-iface-table > .legend > div:nth-child(1) { width: 76px; }
.erpds-device-iface-table > .legend > div:nth-child(3),
.erpds-device-iface-table > .legend > div:nth-child(4) { width: 42px; }
.erpds-device-iface-table > .legend > div:nth-child(5) { width: 17px; }
.erpds-device-iface-table > .legend > div:nth-child(6) { width: 110px; }

.erpds-device-iface-table script,
.erpds-device-iface-table div[style*="display: none"],
.erpds-device-iface-table div[style*="display:none"] {
    display: none !important;
}

#dialog-box:has(.erpds-device-task-dialog) {
    left: 50% !important;
    right: auto !important;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    transform: translateX(-50%) !important;
    overflow: auto !important;
    overscroll-behavior: contain;
}

#dialog-box .erpds-device-task-dialog {
    width: min(430px, calc(100vw - 28px));
    box-sizing: border-box;
    color: var(--erpds-text, #1f2630);
}

#dialog-box .erpds-device-task-dialog__header {
    margin-bottom: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--erpds-border-soft, #e0e6ef);
}

#dialog-box .erpds-device-task-context {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
    box-sizing: border-box;
    margin: 12px 12px 0;
    padding: 10px;
    border: 1px solid color-mix(in srgb, var(--erpds-accent, #0071bc) 14%, var(--erpds-border-soft, #e0e6ef));
    border-radius: var(--erpds-radius, 8px);
    background: color-mix(in srgb, var(--erpds-accent-soft, #e8f1ff) 52%, var(--erpds-surface, #fff));
}

#dialog-box .erpds-device-task-context__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: var(--erpds-radius-sm, 6px);
    background: var(--erpds-surface, #fff);
    color: var(--erpds-accent, #0071bc);
}

#dialog-box .erpds-device-task-context__body {
    display: grid;
    gap: 3px;
    min-width: 0;
}

#dialog-box .erpds-device-task-context__meta {
    color: var(--erpds-text-muted, #525a66);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: uppercase;
}

#dialog-box .erpds-device-task-context__title {
    color: var(--erpds-text, #1f2630);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

#dialog-box .erpds-device-task-context__location {
    color: var(--erpds-text-muted, #525a66);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

#dialog-box .erpds-device-task-form {
    display: grid;
    gap: 0;
    margin: 0;
}

#dialog-box .erpds-device-task-picker {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 12px;
    background: var(--erpds-surface-2, #f5f7fa);
}

#dialog-box .erpds-device-task-field {
    display: grid;
    gap: 6px;
    min-width: 0;
    margin: 0;
}

#dialog-box .erpds-device-task-field > span {
    color: var(--erpds-text-muted, #525a66);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
    text-transform: uppercase;
}

#dialog-box .erpds-device-task-select {
    width: 100% !important;
    min-width: 0;
    min-height: 42px;
    box-sizing: border-box;
    margin: 0;
}

#dialog-box .erpds-device-task-selected {
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid var(--erpds-border-soft, #e0e6ef);
    border-radius: var(--erpds-radius-sm, 6px);
    background: color-mix(in srgb, var(--erpds-accent-soft, #e8f1ff) 54%, var(--erpds-surface, #fff));
    color: var(--erpds-text, #1f2630);
    font-size: 12.5px;
    font-weight: 650;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

#dialog-box .erpds-device-task-selected:empty,
#dialog-box .erpds-device-task-selected[hidden] {
    display: none;
}

#dialog-box .erpds-device-task-actions {
    padding: 12px;
    border-top: 1px solid var(--erpds-border-soft, #e0e6ef);
    background: var(--erpds-surface, #fff);
}

#dialog-box .erpds-device-task-actions .div_center {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
}

#dialog-box .erpds-device-task-actions #submit_or_id1 {
    color: var(--erpds-text-muted, #525a66);
    font-size: 12px;
}

#dialog-box .erpds-device-task-actions #linkCancelId1 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    box-sizing: border-box;
    padding: 6px 12px !important;
    border: 1px solid var(--erpds-border, #d9e0ea) !important;
    border-radius: var(--erpds-radius-sm, 6px);
    background: var(--erpds-surface, #fff) !important;
    color: var(--erpds-accent-text, #155aaa);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none !important;
}

#dialog-box .erpds-device-history-dialog {
    color: var(--erpds-text, #1f2630);
}

#dialog-box .erpds-device-history-dialog #divHistoryId > br {
    display: none;
}

#dialog-box .erpds-device-history-dialog .dialog_header {
    margin-bottom: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--erpds-border-soft, #e0e6ef);
}

#dialog-box .erpds-device-history-context {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
    box-sizing: border-box;
    margin: 12px 12px 0;
    padding: 10px;
    border: 1px solid color-mix(in srgb, var(--erpds-accent, #0071bc) 14%, var(--erpds-border-soft, #e0e6ef));
    border-radius: var(--erpds-radius, 8px);
    background: color-mix(in srgb, var(--erpds-accent-soft, #e8f1ff) 52%, var(--erpds-surface, #fff));
}

#dialog-box .erpds-device-history-context__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: var(--erpds-radius-sm, 6px);
    background: var(--erpds-surface, #fff);
    color: var(--erpds-accent, #0071bc);
}

#dialog-box .erpds-device-history-context__body {
    display: grid;
    gap: 3px;
    min-width: 0;
}

#dialog-box .erpds-device-history-context__meta {
    color: var(--erpds-text-muted, #525a66);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: uppercase;
}

#dialog-box .erpds-device-history-context__title {
    color: var(--erpds-text, #1f2630);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

#dialog-box .erpds-device-history-context__location {
    color: var(--erpds-text-muted, #525a66);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

#dialog-box .erpds-device-history-dialog .erpds-pb-12 {
    max-height: min(62vh, 560px) !important;
    box-sizing: border-box;
    padding: 10px 12px 12px !important;
    overflow: auto !important;
    scrollbar-width: thin;
}

#dialog-box .erpds-device-history-dialog .table_table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#dialog-box .erpds-device-history-dialog .table_table thead,
#dialog-box .erpds-device-history-dialog .table_legend,
#dialog-box .erpds-device-history-dialog td[id$="_group_action_data_Id"] {
    display: none !important;
}

#dialog-box .erpds-device-history-dialog .table_table tbody {
    display: grid !important;
    gap: 8px;
    width: 100%;
}

#dialog-box .erpds-device-history-dialog .table_item {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    width: 100% !important;
    box-sizing: border-box;
    margin: 0 !important;
    border: 1px solid var(--erpds-border, #d9e0ea);
    border-radius: var(--erpds-radius-sm, 6px);
    background: var(--erpds-surface, #fff) !important;
    box-shadow: var(--erpds-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
    overflow: hidden;
}

#dialog-box .erpds-device-history-dialog .table_item td {
    display: grid !important;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    width: 100% !important;
    min-width: 0;
    box-sizing: border-box;
    padding: 8px 10px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--erpds-border-soft, #e8edf4) !important;
    background: transparent !important;
    color: var(--erpds-text, #1f2630);
    font-size: 12.5px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

#dialog-box .erpds-device-history-dialog .table_item td:last-child {
    border-bottom: 0 !important;
}

#dialog-box .erpds-device-history-dialog td[id$="_group_action_data_Id"] {
    display: none !important;
}

#dialog-box .erpds-device-history-dialog .table_item td::before {
    content: attr(data-label);
    color: var(--erpds-text-muted, #525a66);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0;
    text-transform: uppercase;
}

#dialog-box .erpds-device-history-dialog .table_item a {
    font-weight: 650;
}

#dialog-box:has(.erpds-device-integrate-dialog) {
    top: 50vh !important;
    left: 50% !important;
    right: auto !important;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 96px);
    box-sizing: border-box;
    transform: translate(-50%, -50%) !important;
    overflow: auto !important;
}

#dialog-box .erpds-device-integrate-dialog {
    width: min(420px, calc(100vw - 28px));
    box-sizing: border-box;
    color: var(--erpds-text, #1f2630);
}

#dialog-box .erpds-device-integrate-dialog__header {
    margin-bottom: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--erpds-border-soft, #e0e6ef);
}

#dialog-box .erpds-device-integrate-context {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
    box-sizing: border-box;
    margin: 12px 0 0;
    padding: 10px;
    border: 1px solid color-mix(in srgb, var(--erpds-accent, #0071bc) 14%, var(--erpds-border-soft, #e0e6ef));
    border-radius: var(--erpds-radius, 8px);
    background: color-mix(in srgb, var(--erpds-accent-soft, #e8f1ff) 58%, var(--erpds-surface, #fff));
}

#dialog-box .erpds-device-integrate-context__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: var(--erpds-radius-sm, 6px);
    background: var(--erpds-surface, #fff);
    color: var(--erpds-accent, #0071bc);
}

#dialog-box .erpds-device-integrate-context__body {
    display: grid;
    gap: 3px;
    min-width: 0;
}

#dialog-box .erpds-device-integrate-context__meta {
    color: var(--erpds-text-muted, #525a66);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: uppercase;
}

#dialog-box .erpds-device-integrate-context__title {
    color: var(--erpds-text, #1f2630);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

#dialog-box .erpds-device-integrate-context__location {
    color: var(--erpds-text-muted, #525a66);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

#dialog-box .erpds-device-integrate-form {
    display: grid;
    gap: 12px;
    padding-top: 12px;
}

#dialog-box .erpds-device-integrate-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--erpds-border-soft, #e0e6ef);
    border-radius: var(--erpds-radius, 8px);
    background: var(--erpds-surface-2, #f5f7fa);
}

#dialog-box .erpds-device-integrate-field {
    display: grid;
    min-width: 0;
    gap: 6px;
    margin: 0;
}

#dialog-box .erpds-device-integrate-label {
    color: var(--erpds-text-muted, #525a66);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
    text-transform: uppercase;
}

#dialog-box .erpds-device-integrate-search,
#dialog-box .erpds-device-integrate-result {
    display: block;
    min-width: 0;
}

#dialog-box .erpds-device-integrate-search__input,
#dialog-box .erpds-device-integrate-result select,
#dialog-box .erpds-device-integrate-port {
    width: 100% !important;
    min-width: 0;
    height: 34px;
    box-sizing: border-box;
    margin: 0;
}

#dialog-box .erpds-device-integrate-actions {
    padding: 0 2px 2px;
}

#dialog-box .erpds-device-integrate-actions .div_center {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin: 0;
    text-align: left;
}

#dialog-box .erpds-device-integrate-actions #submit_or_id_save_integrate {
    display: none;
}

#dialog-box .erpds-device-integrate-actions #submit_but_id_save_integrate {
    min-height: 34px;
    padding: 7px 18px;
}

#dialog-box .erpds-device-integrate-actions #linkCancelId_save_integrate {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    box-sizing: border-box;
    padding: 6px 12px;
    border: 1px solid var(--erpds-border, #cfd8e3);
    border-radius: var(--erpds-radius-sm, 6px);
    background: var(--erpds-surface, #fff);
    color: var(--erpds-text-muted, #525a66);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
}

#dialog-box .erpds-device-integrate-actions #linkCancelId_save_integrate:hover {
    border-color: var(--erpds-accent, #0071bc);
    color: var(--erpds-accent, #0071bc);
}

@media (max-width: 1180px) {
    .slider_content_double.erpds-device-page {
        grid-template-columns: minmax(340px, 360px) minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    .slider_content_double.erpds-device-page {
        grid-template-columns: minmax(0, 1fr);
    }

    .slider_content_double.erpds-device-page > .erpds-device-sidebar {
        position: static;
    }

    .erpds-device-iface-table {
        display: block !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .erpds-device-iface-table > .legend,
    .erpds-device-iface-table > .item {
        display: grid !important;
        grid-template-columns: 76px 431px 42px 42px 17px 110px;
        min-width: 718px;
    }

    .erpds-device-iface-table > .legend > div,
    .erpds-device-iface-table > .item > div {
        display: block !important;
    }

    .erpds-device-details .item:not([style*="display:none"]):not([style*="display: none"]) {
        grid-template-columns: minmax(0, 1fr) !important;
        row-gap: 4px;
        padding: 9px 0 !important;
    }

    .erpds-device-details .item > div {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .erpds-device-details .left_data {
        text-align: left;
    }
}

@media (max-width: 460px) {
    #dialog-box:has(.erpds-struct-scheme-dialog) {
        top: 60px !important;
        left: 50% !important;
        right: auto !important;
        max-height: calc(100vh - 74px);
        transform: translateX(-50%) !important;
        overflow: auto;
    }

    #dialog-box .erpds-struct-scheme-dialog {
        width: min(370px, calc(100vw - 28px));
    }

    #dialog-box .erpds-struct-scheme-dialog__body {
        padding: 10px;
    }

    #dialog-box .erpds-struct-scheme-actions {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    #dialog-box .erpds-struct-scheme-action {
        min-height: 42px;
    }

    #dialog-box .erpds-struct-scheme-port {
        min-height: 32px;
    }

    #dialog-box:has(.erpds-device-clear-dialog) {
        top: 60px !important;
        left: 50% !important;
        right: auto !important;
        max-height: calc(100vh - 74px);
        transform: translateX(-50%) !important;
        overflow: auto !important;
    }

    #dialog-box .erpds-device-clear-dialog {
        width: min(370px, calc(100vw - 28px));
    }

    #dialog-box .erpds-device-clear-dialog__body {
        padding: 10px;
    }

    #dialog-box .erpds-device-clear-range {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #dialog-box .erpds-device-clear-all,
    #dialog-box .erpds-device-clear-range__submit {
        width: 100%;
    }
}

@media (max-width: 700px) {
    body.erpds-route-device-card:has(.MuiModal-root form [class*="ra-input-device"]) {
        overflow: hidden !important;
    }

    body.erpds-route-device-card .MuiTabs-root {
        max-width: 100%;
        min-height: 46px !important;
        box-sizing: border-box;
        border: 1px solid var(--erpds-border, #d9e0ea);
        border-radius: var(--erpds-radius, 8px);
        background: var(--erpds-surface, #fff);
        overflow: hidden !important;
    }

    body.erpds-route-device-card .MuiTabs-scroller {
        min-height: 44px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }

    body.erpds-route-device-card .MuiTabs-scroller::-webkit-scrollbar {
        display: none;
    }

    body.erpds-route-device-card .MuiTabs-list {
        width: max-content;
        min-width: 100%;
        min-height: 44px !important;
        flex-wrap: nowrap !important;
        align-items: stretch !important;
    }

    body.erpds-route-device-card .MuiTabs-list .MuiTab-root {
        flex: 0 0 auto !important;
        min-width: auto !important;
        min-height: 44px !important;
        padding: 8px 13px !important;
        white-space: nowrap !important;
        letter-spacing: 0 !important;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    body.erpds-route-device-card .MuiTabs-list .MuiTab-root:focus-visible {
        outline: 2px solid var(--erpds-accent, #2563b8);
        outline-offset: -3px;
    }

    body.erpds-route-device-card .erpds-device-ping-card {
        gap: 10px;
        padding: 12px !important;
    }

    body.erpds-route-device-card .erpds-device-ping-card__icon {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
        border-radius: 9px;
    }

    body.erpds-route-device-card .erpds-device-ping-card__title > strong {
        font-size: 16px;
    }

    body.erpds-route-device-card .erpds-device-ping-targets {
        gap: 6px;
    }

    body.erpds-route-device-card .erpds-device-ping-target {
        min-height: 32px;
        padding: 6px 10px;
    }

    body.erpds-route-device-card .erpds-device-ping-status {
        font-size: 11px;
    }

    body.erpds-route-device-card .erpds-device-ping-results {
        min-height: 38px;
        max-height: 142px;
        padding: 8px 10px;
    }

    body.erpds-route-device-card .MuiButtonGroup-root:has(.MuiIconButton-root) {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
        box-sizing: border-box;
        padding: 8px;
        border: 1px solid var(--erpds-border, #d9e0ea);
        border-radius: var(--erpds-radius, 8px);
        background: var(--erpds-surface, #fff);
        box-shadow: var(--erpds-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06));
    }

    body.erpds-route-device-card .MuiButtonGroup-root:has(.MuiIconButton-root) .MuiIconButton-root {
        width: 100%;
        min-width: 0;
        min-height: 48px !important;
        margin: 0 !important;
        padding: 7px 6px !important;
        border: 1px solid var(--erpds-border, #d9e0ea) !important;
        border-radius: var(--erpds-radius-sm, 6px) !important;
        background: var(--erpds-surface, #fff);
        box-sizing: border-box;
        white-space: normal;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    body.erpds-route-device-card .MuiButtonGroup-root:has(.MuiIconButton-root) .MuiButtonGroup-grouped {
        border-left: 1px solid var(--erpds-border, #d9e0ea) !important;
        border-radius: var(--erpds-radius-sm, 6px) !important;
    }

    body.erpds-route-device-card .MuiButtonGroup-root:has(.MuiIconButton-root) .wn-divider {
        display: none !important;
    }

    body.erpds-route-device-card .MuiButtonGroup-root:has(.MuiIconButton-root) .MuiIconButton-root:hover,
    body.erpds-route-device-card .MuiButtonGroup-root:has(.MuiIconButton-root) .MuiIconButton-root:focus-visible {
        border-color: color-mix(in srgb, var(--erpds-accent, #2563b8) 42%, var(--erpds-border, #d9e0ea)) !important;
        background: var(--erpds-accent-soft, #e8f1ff);
    }

    body.erpds-route-device-card .MuiDataGrid-root {
        height: 218px !important;
        min-height: 218px;
        max-height: 218px;
        border-radius: var(--erpds-radius, 8px) !important;
    }

    body.erpds-route-device-card .MuiDataGrid-main {
        max-height: 156px !important;
    }

    body.erpds-route-device-card .MuiDataGrid-toolbarContainer {
        min-height: 46px;
        padding: 6px 7px !important;
        gap: 5px !important;
        border-bottom: 1px solid var(--erpds-border, #d9e0ea);
    }

    body.erpds-route-device-card .MuiDataGrid-toolbarContainer .MuiFormControl-root,
    body.erpds-route-device-card .MuiDataGrid-toolbarContainer .MuiTextField-root {
        min-width: 0 !important;
        flex: 1 1 150px;
    }

    body.erpds-route-device-card .MuiDataGrid-toolbarContainer .MuiInputBase-root {
        min-height: 34px;
    }

    body.erpds-route-device-card .MuiDataGrid-toolbarContainer .MuiButtonBase-root {
        width: 34px;
        min-width: 34px !important;
        height: 34px;
        padding: 5px !important;
        border-radius: var(--erpds-radius-xs, 4px) !important;
    }

    body.erpds-route-device-card .MuiDataGrid-columnHeaders {
        min-height: 34px !important;
    }

    body.erpds-route-device-card .MuiDataGrid-columnHeader,
    body.erpds-route-device-card .MuiDataGrid-cell {
        min-width: 74px !important;
        max-width: 220px !important;
        padding-inline: 8px !important;
        font-size: 12px !important;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    body.erpds-route-device-card .MuiDataGrid-overlayWrapper {
        min-height: 98px;
        max-height: 108px;
        color: var(--erpds-text-muted, #525a66);
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) {
        align-items: flex-start !important;
        justify-content: center !important;
        box-sizing: border-box;
        padding: 54px 10px 0 !important;
        padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
        overflow-y: hidden !important;
        overscroll-behavior: contain;
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) .MuiPaper-root {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100dvh - 142px) !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        padding: 14px !important;
        border-radius: var(--erpds-radius, 8px) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form,
    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form .MuiBox-root,
    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form .MuiStack-root,
    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form .MuiCard-root {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form .MuiStack-root {
        gap: 10px !important;
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form .MuiCard-root {
        overflow: hidden !important;
        border: 1px solid var(--erpds-border-soft, #e0e6ef) !important;
        border-radius: var(--erpds-radius, 8px) !important;
        box-shadow: var(--erpds-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.06)) !important;
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form .MuiBox-root:has(> .MuiButton-containedPrimary):has(> .MuiBox-root) {
        position: sticky;
        top: -14px;
        z-index: 4;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(104px, 128px);
        align-items: center !important;
        gap: 8px;
        margin: -14px -14px 10px;
        padding: 10px 12px;
        border-bottom: 1px solid var(--erpds-border-soft, #e0e6ef);
        background: color-mix(in srgb, var(--erpds-surface, #fff) 94%, var(--erpds-bg-2, #f4f6fa));
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form .MuiBox-root:has(> .MuiButton-containedPrimary):has(> .MuiBox-root) > .MuiBox-root:first-child {
        min-width: 0 !important;
        color: var(--erpds-text, #111827);
        font-size: 20px !important;
        font-weight: 800 !important;
        line-height: 1.16 !important;
        overflow-wrap: anywhere;
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form .MuiBox-root:has(> .MuiButton-containedPrimary):has(> .MuiBox-root) > .MuiBox-root:first-child > * {
        max-width: 100%;
        line-height: inherit !important;
        overflow-wrap: anywhere;
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form .MuiBox-root:has(> .MuiButton-containedPrimary):has(> .MuiBox-root) h4.MuiTypography-root {
        margin: 2px 0 0 !important;
        font-size: 24px !important;
        line-height: 1.04 !important;
        letter-spacing: 0 !important;
        overflow-wrap: anywhere;
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form .MuiBox-root:has(> .MuiButton-containedPrimary):has(> .MuiBox-root) h4.MuiTypography-root .MuiBox-root {
        display: block !important;
        margin: 2px 0 0 !important;
        color: var(--erpds-text-muted, #525a66) !important;
        font-size: 11px !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form .MuiBox-root:has(> .MuiButton-containedPrimary):has(> .MuiBox-root) .MuiTypography-caption {
        display: block;
        color: var(--erpds-text-muted, #525a66);
        font-size: 10.5px !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
        letter-spacing: 0.04em !important;
        text-transform: uppercase;
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form .MuiBox-root:has(> .MuiButton-containedPrimary):has(> .MuiBox-root) > .MuiButton-containedPrimary {
        min-width: 0 !important;
        min-height: 40px !important;
        max-height: 48px;
        padding: 7px 9px !important;
        border-radius: var(--erpds-radius-sm, 6px) !important;
        font-size: 12px !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
        text-align: center;
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form .MuiCard-root > .MuiBox-root:first-child {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        min-height: 42px !important;
        gap: 7px;
        align-items: start !important;
        padding: 9px 12px 8px !important;
        border-bottom: 1px solid var(--erpds-border-soft, #e0e6ef);
        background: color-mix(in srgb, var(--erpds-surface-2, #f5f7fa) 72%, var(--erpds-surface, #fff));
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form .MuiCard-root > .MuiBox-root:first-child h6.MuiTypography-root {
        margin: 0 !important;
        font-size: 18px !important;
        font-weight: 800 !important;
        line-height: 1.24 !important;
        letter-spacing: 0 !important;
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form .MuiCard-root > .MuiBox-root:first-child .MuiStack-root {
        display: flex !important;
        flex-flow: row wrap !important;
        justify-content: flex-start !important;
        gap: 6px !important;
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form .MuiCard-root > .MuiBox-root:first-child .MuiButton-root {
        min-height: 30px !important;
        padding: 5px 8px !important;
        font-size: 12px !important;
        line-height: 1.2 !important;
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form .MuiCard-root > .MuiBox-root:first-child + .MuiBox-root {
        padding: 10px 12px 12px !important;
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form .MuiFormControl-root,
    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form .MuiInputBase-root,
    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form input,
    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form textarea {
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) form .MuiFormControl-root {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) .MuiTabs-root {
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) .MuiTabs-scroller {
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) .MuiTabs-scroller::-webkit-scrollbar {
        display: none;
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) .MuiTabs-list {
        width: max-content;
        min-width: 100%;
        flex-wrap: nowrap !important;
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) .MuiTab-root {
        flex: 0 0 auto !important;
        min-width: auto !important;
        padding-inline: 12px !important;
        white-space: nowrap !important;
        letter-spacing: 0 !important;
    }

    body.erpds-route-device-card .MuiModal-root:has(form [class*="ra-input-device"]) .MuiButton-root {
        max-width: 100%;
        white-space: normal;
    }

    body.has-mobile-tab-bar.erpds-route-device-card .MuiSnackbar-root.MuiSnackbar-anchorOriginBottomCenter {
        top: calc(60px + env(safe-area-inset-top, 0px)) !important;
        bottom: auto !important;
        left: 8px;
        right: 8px;
        max-width: calc(100vw - 16px);
        overscroll-behavior: contain;
    }

    body.has-mobile-tab-bar.erpds-route-device-card .MuiSnackbar-root.MuiSnackbar-anchorOriginBottomCenter .MuiSnackbarContent-root {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    #dialog-box:has(.erpds-device-integrate-dialog) {
        top: 64px !important;
        max-height: calc(100vh - 78px);
        transform: translateX(-50%) !important;
    }

    #dialog-box .erpds-device-integrate-dialog {
        width: min(370px, calc(100vw - 28px));
    }

    #dialog-box .erpds-device-integrate-context {
        gap: 8px;
        margin-top: 10px;
        padding: 9px;
    }

    #dialog-box .erpds-device-integrate-fields {
        padding: 10px;
    }

    #dialog-box .erpds-device-task-picker {
        padding: 10px;
    }

    #dialog-box .erpds-device-task-actions .div_center {
        flex-direction: column;
        align-items: stretch;
    }

    #dialog-box .erpds-device-task-actions #submit_or_id1 {
        display: none !important;
    }

    #dialog-box .erpds-device-task-actions input#submit_but_id1,
    #dialog-box .erpds-device-task-actions #linkCancelId1 {
        display: inline-flex !important;
        width: 100% !important;
        min-height: 42px !important;
        box-sizing: border-box;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    #dialog-box .erpds-device-integrate-actions .div_center {
        flex-direction: column;
        flex-wrap: wrap;
        align-items: stretch;
    }

    #dialog-box .erpds-device-integrate-actions #submit_or_id_save_integrate {
        display: none !important;
    }

    #dialog-box .erpds-device-integrate-actions input#submit_but_id_save_integrate,
    #dialog-box .erpds-device-integrate-actions #linkCancelId_save_integrate {
        display: inline-flex !important;
        flex: 1 1 100%;
        width: 100% !important;
        min-height: 42px !important;
        box-sizing: border-box;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    body.erpds-route-device-card .MuiTableContainer-root:has(.MuiTable-root) {
        overflow: hidden;
    }

    body.erpds-route-device-card .MuiTable-root,
    body.erpds-route-device-card .MuiTableBody-root {
        display: block;
        width: 100%;
    }

    body.erpds-route-device-card .MuiTableRow-root {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
        padding: 9px 11px;
        gap: 3px;
    }

    body.erpds-route-device-card .MuiTableCell-root {
        width: 100%;
        padding: 0 !important;
        font-size: 13px;
    }

    body.erpds-route-device-card .MuiTableCell-root:first-child {
        font-size: 11px;
        line-height: 1.25;
    }
}
