/* Global site styles (project-specific) */

:root {
    --ant-border-color: #c7d3dd;
    --ant-bg-container: #ffffff;
    --ant-bg-layout: #eef3f6;
    --ant-text-secondary: #657484;
    --ant-primary: #0f6b8f;
    --control-surface: #f8fafb;
    --control-line: #c7d3dd;
    --control-ink: #1c2b36;
    --control-accent: #b7791f;
    --control-panel-shadow: 0 1px 0 rgba(255, 255, 255, .82) inset, 0 8px 18px rgba(12, 32, 48, .08);
    --scheme-font-title: 15px;
    --scheme-font-section: 14px;
    --scheme-font-body: 13px;
    --scheme-font-control: 12px;
    --scheme-font-meta: 11px;
    --scheme-font-small: 10px;
}

.local-serial-bridge-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.local-serial-bridge-kicker {
    color: #6b7280;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0;
}

.local-serial-bridge-title {
    color: #111827;
    font-size: 1.15rem;
    font-weight: 700;
}

.local-serial-bridge-dialog {
    width: min(560px, 100%);
    max-width: calc(100vw - 2rem);
    padding: 20px;
}

.local-serial-bridge-dialog-head {
    display: grid;
    gap: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid #dbe4ec;
}

.local-serial-bridge-dialog .ctp-prompt-title {
    margin-bottom: 0;
}

.local-serial-bridge-dialog-subtitle {
    color: #647383;
    font-size: var(--scheme-font-body);
    line-height: 1.45;
}

.local-serial-bridge-port-list {
    display: grid;
    gap: 8px;
    margin: 14px 0;
    max-height: min(392px, 56vh);
    overflow: auto;
    padding: 2px;
}

.local-serial-bridge-port-option {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 64px;
    border: 1px solid #d7e0e8;
    border-radius: 8px;
    background: #fff;
    color: #152330;
    padding: 10px 12px 10px 14px;
    text-align: left;
    transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.local-serial-bridge-port-option::before {
    content: "";
    position: absolute;
    inset: 10px auto 10px 0;
    width: 3px;
    border-radius: 0 2px 2px 0;
    background: transparent;
}

.local-serial-bridge-port-body {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.local-serial-bridge-port-name {
    color: #111827;
    font-size: 15px;
    font-weight: 780;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.local-serial-bridge-port-meta {
    color: #637283;
    font-size: 12px;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.local-serial-bridge-port-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    height: 24px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 720;
    line-height: 1;
    white-space: nowrap;
}

.local-serial-bridge-port-status.is-available {
    border-color: #b7d6c8;
    background: #eef8f2;
    color: #11633f;
}

.local-serial-bridge-port-status.is-busy {
    border-color: #efc3b9;
    background: #fff2ef;
    color: #a13c26;
}

.local-serial-bridge-port-option.is-selected {
    border-color: var(--ant-primary);
    background: #f2f8fb;
    box-shadow: 0 0 0 3px rgba(15, 107, 143, 0.12);
}

.local-serial-bridge-port-option.is-selected::before {
    background: var(--ant-primary);
}

.local-serial-bridge-port-option.is-busy {
    background: #f8fafb;
    color: #6b7785;
    cursor: not-allowed;
}

.local-serial-bridge-port-option.is-busy .local-serial-bridge-port-name,
.local-serial-bridge-port-option.is-busy .local-serial-bridge-port-meta {
    color: #7a8794;
}

.local-serial-bridge-port-option:focus,
.local-serial-bridge-port-option:hover {
    border-color: var(--ant-primary);
    box-shadow: 0 0 0 3px rgba(15, 107, 143, 0.14);
    outline: none;
}

.local-serial-bridge-port-option.is-busy:hover,
.local-serial-bridge-port-option.is-busy:focus {
    border-color: #d7e0e8;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.08);
}

@media (max-width: 520px) {
    .local-serial-bridge-dialog {
        padding: 16px;
    }

    .local-serial-bridge-port-option {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 8px;
    }

    .local-serial-bridge-port-status {
        justify-self: start;
    }
}

.alert {
    border-radius: 8px;
    border: 1px solid var(--ant-border-color);
    padding: 8px 10px;
}

.alert-danger {
    color: #cf1322;
    background: #fff2f0;
    border-color: #ffccc7;
}

.card,
.modern-card,
.login-card,
.comm-log-card,
.modern-toast {
    border: 1px solid var(--ant-border-color);
    border-radius: 4px;
    background: var(--ant-bg-container);
    box-shadow: var(--control-panel-shadow);
}

.table,
.modern-table {
    --bs-table-bg: #fff;
    --bs-table-striped-bg: #f6f8fa;
    --bs-table-hover-bg: #e7f2f6;
    border-color: var(--ant-border-color);
    color: var(--control-ink);
}

.table thead th,
.modern-table thead th {
    background: linear-gradient(180deg, #f3f7f9 0%, #e5edf2 100%);
    color: #2f4454;
    font-size: var(--scheme-font-control);
    font-weight: 800;
    letter-spacing: .02em;
    border-bottom: 1px solid #b8c7d2;
    text-transform: none;
}

.form-control,
.form-select,
.form-control-plaintext {
    border-radius: 8px;
    border: 1px solid var(--control-line);
    box-shadow: none;
    min-height: var(--app-control-height);
    padding: var(--app-field-padding-y) var(--app-field-padding-x);
    font-size: var(--scheme-font-body);
    background-color: #fff;
    color: var(--control-ink);
}

.form-control:focus,
.form-select:focus {
    border-color: #0f6b8f;
    box-shadow: 0 0 0 3px rgba(15, 107, 143, .12);
}

.table th,
.table td,
.modern-table th,
.modern-table td,
.task-detail-device-table th,
.task-detail-device-table td,
.direct-selected-table th,
.direct-selected-table td,
.scheme-parameters-table th,
.scheme-parameters-table td,
.scheme-step-manager-table th,
.scheme-step-manager-table td {
    padding: var(--app-table-cell-padding-y) var(--app-table-cell-padding-x);
    font-size: var(--scheme-font-control);
}

.card-body,
.modern-card .card-body,
.communication-setup-card .card-body,
.user-management-page .users-list-card .card-body,
.scheme-flow-card-body,
.scheme-flow-loop-card-body {
    padding: var(--app-card-body-padding);
}

.form-label,
.task-search-box .form-label,
.task-editor-field .form-label,
.dlt-filter-field .form-label,
.dlt-editor-field .form-label,
.dlms-filter-field .form-label,
.dlms-editor-field .form-label,
.compare-flow-panel .form-label,
.scheme-config-panel .form-label,
.scheme-quick-editor .form-label,
.scheme-library-panel .form-label,
.scheme-detail-panel .form-label,
.scheme-library-picker .form-label {
    font-size: var(--scheme-font-control);
}

.badge {
    border-radius: 3px;
    font-weight: 700;
}

.page-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
    padding: 13px 16px;
    border: 1px solid var(--ant-border-color);
    border-radius: 4px;
    background:
        linear-gradient(90deg, rgba(183, 121, 31, .12), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f8fafb 100%);
    box-shadow: var(--control-panel-shadow);
    position: relative;
    overflow: hidden;
}

.page-header-bar::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 4px;
    border-radius: 2px;
    background: var(--control-accent);
}

.app-page-header {
    min-height: calc(var(--app-control-height) + 24px);
}

.app-page-header-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.app-page-header-subtitle,
.app-page-header-stats {
    color: var(--ant-text-secondary);
    font-size: var(--scheme-font-control);
    line-height: 1.35;
}

.app-page-header-stats {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.app-page-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    flex-wrap: wrap;
}

.access-denied-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 12px 14px;
    border: 1px solid #efc3b9;
    border-radius: 4px;
    background: linear-gradient(180deg, #fff8f6 0%, #fff2ef 100%);
    box-shadow: var(--control-panel-shadow);
}

.access-denied-content {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.access-denied-marker {
    width: 4px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 4px;
    background: #b42318;
}

.access-denied-message {
    color: #8f2c1d;
    font-size: var(--scheme-font-body);
    font-weight: 750;
    line-height: 1.35;
}

.app-filter-card {
    margin-bottom: 1rem;
    overflow: visible;
}

.app-filter-body {
    display: grid;
    gap: .75rem;
}

.app-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: .75rem;
    align-items: end;
}

.publish-review-settings {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) minmax(260px, 2fr);
    gap: .75rem;
    width: 100%;
}

.publish-review-note-field {
    min-width: min(100%, 260px);
}

.app-filter-field {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.app-filter-actions {
    display: flex;
    align-items: end;
    gap: .5rem;
    flex-wrap: wrap;
}

.app-filter-actions .btn {
    min-height: var(--app-control-height);
}

.app-filter-quick-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    padding-top: .25rem;
    border-top: 1px solid rgba(199, 211, 221, .62);
}

.app-filter-error {
    margin-top: 0;
}

.inline-feedback {
    display: grid;
    grid-template-columns: 4px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--ant-border-color);
    border-radius: 4px;
    background: #fff;
    box-shadow: var(--control-panel-shadow);
}

.inline-feedback-mark {
    width: 4px;
    min-height: 28px;
    border-radius: 4px;
    background: var(--ant-primary);
}

.inline-feedback-body {
    min-width: 0;
    align-self: stretch;
    display: grid;
    align-content: center;
}

.inline-feedback-message {
    color: var(--control-ink);
    font-size: var(--scheme-font-body);
    font-weight: 750;
    line-height: 1.4;
}

.inline-feedback-detail {
    margin-top: 2px;
    color: var(--ant-text-secondary);
    font-size: var(--scheme-font-control);
    line-height: 1.45;
    word-break: break-word;
}

.inline-feedback-info {
    background: linear-gradient(180deg, #f7fbfd 0%, #eef7fb 100%);
}

.inline-feedback-success {
    border-color: #b7d6c8;
    background: linear-gradient(180deg, #f6fbf8 0%, #eef8f2 100%);
}

.inline-feedback-success .inline-feedback-mark {
    background: #16803a;
}

.inline-feedback-warning {
    border-color: #e2c58b;
    background: linear-gradient(180deg, #fffaf0 0%, #fff6df 100%);
}

.inline-feedback-warning .inline-feedback-mark {
    background: #b7791f;
}

.inline-feedback-danger {
    border-color: #efc3b9;
    background: linear-gradient(180deg, #fff8f6 0%, #fff2ef 100%);
}

.inline-feedback-danger .inline-feedback-mark {
    background: #b42318;
}

.app-empty-state {
    display: grid;
    gap: 4px;
    justify-items: center;
    margin: 0;
    padding: 18px 14px !important;
    border: 1px dashed #c7d3dd;
    border-radius: 4px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafb 100%);
    color: var(--ant-text-secondary);
}

.empty-state-title {
    color: var(--control-ink);
    font-size: var(--scheme-font-section);
    font-weight: 800;
    line-height: 1.3;
}

.empty-state-message {
    color: var(--ant-text-secondary);
    font-size: var(--scheme-font-body);
    line-height: 1.45;
}

.empty-state-detail {
    max-width: 540px;
    color: #7a8794;
    font-size: var(--scheme-font-control);
    line-height: 1.45;
}

.empty-state-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: .35rem;
}

.paged-result-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
    padding: 10px 12px;
    border-top: 1px solid var(--ant-border-color);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafb 100%);
}

.paged-result-footer-top {
    border-top: 0;
    border-bottom: 1px solid var(--ant-border-color);
}

.paged-result-count,
.paged-result-page,
.paged-result-page-size span {
    color: var(--ant-text-secondary);
    font-size: var(--scheme-font-control);
    font-weight: 650;
}

.paged-result-controls,
.paged-result-page-size {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.paged-result-page-size .form-select {
    width: 90px;
}

.comm-log-list > .paged-result-footer {
    margin: 12px calc(var(--app-card-body-padding) * -1) calc(var(--app-card-body-padding) * -1);
}

@media (max-width: 640px) {
    .access-denied-panel,
    .paged-result-footer,
    .app-page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .app-page-header-actions,
    .paged-result-controls,
    .access-denied-panel .btn {
        width: 100%;
    }

    .app-page-header-actions .btn,
    .paged-result-controls .btn,
    .access-denied-panel .btn {
        justify-content: center;
    }

    .app-filter-grid {
        grid-template-columns: 1fr;
    }

    .publish-review-settings {
        grid-template-columns: 1fr;
    }

    .inline-feedback {
        grid-template-columns: 4px minmax(0, 1fr);
    }

    .inline-feedback .btn-close {
        grid-column: 2;
        justify-self: end;
    }
}

.ant-login-shell {
    background:
        radial-gradient(circle at 20% 20%, rgba(15, 107, 143, .14) 0%, transparent 42%),
        linear-gradient(180deg, #eef3f6 0%, #f8fafb 100%);
}

.ant-login-shell-layout {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
    overflow: hidden;
}

.ant-login-wrapper-layout {
    width: 100%;
    max-width: 400px;
    transform: translateY(-15px);
}

.ant-login-wrapper .login-card {
    border-radius: 6px;
}

.ant-captcha-btn-layout {
    min-width: 72px;
    justify-content: center;
    letter-spacing: 2px;
    cursor: pointer;
}

.login-password-toggle {
    width: 48px;
    min-width: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.login-password-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ant-gap-15 {
    height: 15px;
}

.ant-login-wrapper .login-card-body {
    padding: 24px;
}

.ant-captcha-btn {
    border: 1px solid #d9d9d9;
    background: #fafafa;
    color: rgba(0, 0, 0, 0.88);
}

.ant-captcha-btn:hover {
    border-color: #0f6b8f;
    color: #0f6b8f;
    background: #fff;
}

.panel-content {
    font-size: .92rem;
}

.page-title {
    color: var(--control-ink);
    font-size: 1.32rem;
    font-weight: 850;
    line-height: 1.2;
}

#dataItemsBody tr.current-seq {
    background-color: rgba(99, 102, 241, 0.08);
    border-left: 4px solid #6366f1;
}

.final-result-banner {
    position: fixed;
    top: 8px;
    left: 0;
    right: 0;
    z-index: 1060;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.final-result-banner .content {
    transition: opacity 400ms ease, transform 400ms ease;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1.25rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.final-result-banner.hide .content {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

.final-result-success {
    background-color: #10b981;
    color: #fff;
}

.final-result-fail {
    background-color: #ef4444;
    color: #fff;
}

.profile-table-wrapper {
    max-height: 360px;
    overflow: auto;
}

.profile-table {
    min-width: max-content;
    white-space: nowrap;
}

.ant-toast-container {
    z-index: 1080;
}

.app-toast-container {
    position: fixed;
    top: 12px;
    left: 50%;
    z-index: 1080;
    padding: 0 12px;
    max-width: 100vw;
    transform: translateX(-50%);
    pointer-events: none;
}

.app-toast-container .modern-toast {
    width: min(420px, calc(100vw - 24px));
    min-width: 0;
    pointer-events: auto;
}

.confirm-reminder-host {
    position: fixed;
    top: 14px;
    left: 50%;
    z-index: 1210;
    width: min(560px, calc(100vw - 24px));
    transform: translateX(-50%);
    pointer-events: none;
}

.confirm-reminder {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #bfd0df;
    border-left: 4px solid #2f78a1;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.18);
    pointer-events: auto;
    animation: confirm-reminder-enter 140ms ease-out;
}

.confirm-reminder:focus {
    outline: none;
}

.confirm-reminder.is-danger {
    border-color: #e4b7b7;
    border-left-color: #a93535;
}

.confirm-reminder-body {
    min-width: 0;
}

.confirm-reminder-title {
    color: var(--control-ink);
    font-size: var(--scheme-font-title);
    font-weight: 850;
    line-height: 1.25;
}

.confirm-reminder-message {
    margin-top: 4px;
    color: #334155;
    font-size: var(--scheme-font-body);
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.confirm-reminder .users-target-summary,
.confirm-reminder .users-warning-note {
    margin-top: 8px;
    margin-bottom: 0;
}

.confirm-reminder-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.confirm-reminder-actions .btn {
    min-width: 72px;
    font-size: var(--scheme-font-control);
}

@keyframes confirm-reminder-enter {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .confirm-reminder {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .confirm-reminder-actions {
        justify-content: flex-end;
    }
}

.ant-nowrap {
    white-space: nowrap;
}

.ant-comm-table {
    table-layout: fixed;
    width: 100%;
    font-size: .9rem;
}

.ant-col-index {
    width: 100px;
}

.ant-col-frame-description {
    width: calc((100% - 100px) * .4);
}

.ant-col-frame-parameters {
    width: calc((100% - 100px) * .6);
}

.communication-step-table {
    font-size: .82rem;
}

.communication-step-table .ant-col-index {
    width: 72px;
}

.ant-col-command-step {
    width: 28%;
}

.ant-col-communication-summary {
    width: 20%;
}

.ant-col-result-handling {
    width: 20%;
}

.ant-col-flow-rules {
    width: 20%;
}

.ant-col-step-actions {
    width: 92px;
}

.communication-step-row td {
    vertical-align: middle;
}

.communication-step-row.is-invalid-json {
    background: #fff7ed;
}

.comm-step-index {
    display: inline-flex;
    min-width: 28px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: #eef2f7;
    color: #2f4454;
    font-weight: 750;
}

.comm-step-title-line {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.comm-step-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #111827;
    font-weight: 720;
}

.comm-step-type-tag,
.comm-step-chip,
.comm-flow-badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 20px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 750;
    white-space: nowrap;
}

.comm-step-type-tag {
    flex: 0 0 auto;
    color: #31536a;
    background: #e7f0f6;
    border: 1px solid #c9dbe6;
}

.comm-step-summary-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}

.comm-step-strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1f2937;
    font-weight: 760;
}

.comm-step-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.comm-step-chip {
    width: fit-content;
    color: #355161;
    background: #f3f7fa;
    border: 1px solid #dce7ee;
}

.comm-step-chip.result {
    color: #244c3f;
    background: #edf8f4;
    border-color: #cfe8dd;
}

.comm-flow-badge.loop {
    color: #25526b;
    background: #eaf4fb;
    border: 1px solid #cde4f2;
}

.comm-flow-badge.jump {
    color: #5a3f18;
    background: #fff6df;
    border: 1px solid #efdcae;
}

.comm-flow-badge.break {
    color: #7a2e2e;
    background: #fff0f0;
    border: 1px solid #f0caca;
}

.comm-step-muted {
    color: #94a3b8;
}

.comm-step-error {
    margin-top: 4px;
    color: #b45309;
    font-size: 11px;
    font-weight: 750;
}

.comm-step-detail-btn {
    min-width: 58px;
    padding-inline: 8px;
}

.communication-step-details-row td {
    padding: 0;
    background: #f8fafc;
}

.comm-raw-details {
    border-top: 1px solid #d7e2ea;
    padding: 10px 12px 12px;
}

.comm-raw-details-header {
    margin-bottom: 6px;
    color: #4b6475;
    font-size: 12px;
    font-weight: 800;
}

.comm-raw-json {
    max-height: 320px;
    margin: 0;
    padding: 10px;
    overflow: auto;
    border: 1px solid #d7e2ea;
    border-radius: 4px;
    background: #ffffff;
    color: #111827;
    font-size: 12px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.ant-maxw-full {
    max-width: 100%;
}

.ant-text-main {
    color: #111827;
}

.ant-break-anywhere {
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* Ant-style overrides for existing Bootstrap component classes */
.btn {
    border-radius: 4px;
    font-weight: 750;
    box-shadow: none;
    font-size: var(--scheme-font-body);
}

.btn:not(.btn-close):not(.scheme-step-action-btn):not(.login-btn),
.ant-btn,
.modern-btn-primary,
.modern-btn-secondary,
.modern-btn-danger {
    width: auto !important;
    min-width: auto !important;
    max-width: 100%;
    flex: 0 0 auto;
    white-space: nowrap;
}

.btn.w-100:not(.btn-close):not(.scheme-step-action-btn):not(.login-btn),
button.btn:not(.btn-close):not(.scheme-step-action-btn):not(.login-btn) {
    width: auto !important;
    min-width: auto !important;
}

.ant-login-wrapper .login-btn {
    width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 auto;
}

.btn-sm {
    border-radius: 3px;
    font-size: var(--scheme-font-control);
}

.btn-outline-secondary {
    color: #2f4454;
    background: linear-gradient(180deg, #ffffff 0%, #edf3f6 100%);
    border-color: var(--control-line);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
    color: #0f6b8f;
    background: #fff;
    border-color: #7da7ba;
    box-shadow: 0 0 0 3px rgba(15, 107, 143, .1);
}

.card {
    overflow: hidden;
}

.publish-selection-card {
    overflow: visible;
}

.card-header {
    background: linear-gradient(180deg, #f3f7f9 0%, #e5edf2 100%);
    border-bottom: 1px solid var(--ant-border-color);
    padding: 10px 12px;
    color: var(--control-ink);
    font-weight: 800;
}

.card-body {
    padding: 12px;
}

.scheme-actions-row {
    justify-content: flex-end;
}

.scheme-action-btn {
    min-width: auto;
    min-height: auto;
    width: auto;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
}

.scheme-actions-dropdown-wrapper {
    position: relative;
}

.scheme-actions-dropdown-wrapper .dropdown-toggle::after {
    transition: transform .2s ease;
}

.scheme-actions-dropdown-wrapper.show .dropdown-toggle::after {
    transform: rotate(180deg);
}

.scheme-actions-dropdown-menu {
    z-index: 50;
    min-width: 260px;
    max-width: 340px;
    max-height: 420px;
    overflow-y: auto;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--control-line);
    border-radius: 4px;
    box-shadow: 0 16px 28px rgba(12, 32, 48, .18);
}

.scheme-actions-dropdown-menu .dropdown-item {
    border-radius: 3px;
    min-height: 34px;
    padding: 7px 12px;
    white-space: nowrap;
    font-size: var(--scheme-font-control);
}

.scheme-actions-dropdown-menu .dropdown-item:active {
    background: #e7f2f6;
    color: #0f6b8f;
}

.scheme-actions-card {
    overflow: visible;
}

.page-action-row,
.home-header-actions {
    flex-wrap: wrap;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.page-action-row {
    min-height: 34px;
}

.communication-run-actions {
    flex-wrap: nowrap;
}

.channel-readiness-panel {
    display: grid;
    gap: 8px;
    width: 100%;
}

.channel-readiness-title {
    color: var(--control-ink);
    font-size: .88rem;
    font-weight: 900;
}

.channel-readiness-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}

.channel-readiness-item {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid var(--control-line);
    border-radius: 6px;
    background: #ffffff;
}

.channel-readiness-item.is-ready {
    border-color: #97d4aa;
    background: #f5fbf7;
}

.channel-readiness-item.is-unchecked {
    border-color: #f2c18b;
    background: #fff8ef;
}

.channel-readiness-item.is-missing {
    border-color: #f2c18b;
    background: #fff8ef;
}

.channel-readiness-item.is-unavailable {
    border-color: #f0a0a0;
    background: #fff5f5;
}

.channel-readiness-main {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 8px;
    color: var(--control-ink);
    font-weight: 900;
}

.channel-readiness-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #d18a36;
}

.channel-readiness-item.is-ready .channel-readiness-dot {
    background: #23834a;
}

.channel-readiness-item.is-unchecked .channel-readiness-dot {
    background: #d18a36;
}

.channel-readiness-item.is-checking .channel-readiness-dot {
    background: #2d7ecb;
}

.channel-readiness-item.is-unavailable .channel-readiness-dot {
    background: #c93b3b;
}

.channel-readiness-detail,
.channel-readiness-status {
    color: var(--control-muted);
    font-size: .82rem;
    overflow-wrap: anywhere;
}

.channel-readiness-status {
    font-weight: 800;
}

.recoverable-run-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.inline-feedback.recoverable-run-panel .inline-feedback-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.recoverable-run-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.run-export-dropdown {
    position: relative;
}

.run-export-backdrop {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
}

.run-export-dropdown > .dropdown-toggle {
    position: relative;
    z-index: 21;
}

.run-export-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 21;
    min-width: 128px;
    padding: 6px;
    border: 1px solid var(--control-line);
    border-radius: 4px;
    box-shadow: 0 12px 24px rgba(12, 32, 48, .16);
}

.run-export-menu .dropdown-item {
    border-radius: 3px;
    padding: 7px 12px;
    font-size: 13px;
}

.run-export-menu .dropdown-item:active {
    background: #e7f2f6;
    color: #0f6b8f;
}

.run-export-menu .dropdown-divider {
    margin: 6px 4px;
    border-top: 1px solid #dce7ee;
    opacity: 1;
}

.communication-key-input {
    min-height: 38px;
    border-color: var(--control-line);
    background: #fff;
    font-weight: 800;
    color: #172033;
    box-shadow: none;
}

.communication-key-input:focus {
    border-color: #0f6b8f;
    box-shadow: 0 0 0 3px rgba(15, 107, 143, .12);
}

.searchable-select-trigger.communication-published-scheme-input {
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
}

.searchable-select-trigger.communication-published-scheme-input .searchable-select-value {
    display: flex;
    min-height: 36px;
    align-items: center;
}

.communication-load-group {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex-wrap: nowrap;
}

.communication-load-select {
    flex: 1 1 auto;
    min-width: 0;
}

.communication-load-btn {
    min-height: var(--app-control-height);
    white-space: nowrap;
}

.communication-scheme-inline-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: .55rem;
    align-items: center;
    min-width: 0;
}

.communication-published-scheme-row {
    grid-template-columns: minmax(220px, 50%) minmax(0, 1fr);
}

.communication-scheme-fixed-row {
    display: grid;
    grid-template-columns: minmax(0, 42fr) minmax(0, 39fr) minmax(0, 19fr);
    gap: .75rem;
    align-items: end;
    min-width: 0;
}

.communication-scheme-field {
    display: grid;
    grid-template-rows: auto var(--app-control-height);
    gap: .25rem;
    min-width: 0;
}

.communication-scheme-field > .form-label {
    margin-bottom: 0;
}

.communication-scheme-field-spacer {
    display: block;
    min-height: calc(var(--scheme-font-control) * 1.25);
}

.communication-scheme-select-cell {
    min-width: 0;
}

.communication-scheme-select-cell .searchable-select,
.communication-scheme-field .searchable-select {
    width: 100%;
}

.multi-station-inline-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .55rem;
    width: 100%;
    min-width: 0;
    height: var(--app-control-height);
    padding: .25rem .6rem;
    border: 1px solid #d6e2ea;
    border-radius: 6px;
    background: #f8fafb;
    white-space: nowrap;
}

.multi-station-inline-controls .multi-station-toggle,
.multi-station-inline-controls .multi-station-count {
    flex: 0 0 auto;
}

.multi-station-inline-controls .multi-station-count {
    min-width: 112px;
}

.multi-station-inline-controls .multi-station-summary {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
}

.communication-setup-card {
    overflow: visible;
}

.communication-setup-card .card-header {
    padding: 8px 12px;
}

.communication-setup-card .card-body {
    padding: 12px 14px 10px;
}

.communication-setup-card .row.g-3 {
    margin-bottom: .35rem !important;
}

.communication-run-setup {
    display: grid;
    gap: 8px;
}

.communication-setup-ports {
    margin-top: -2px;
}

.communication-port-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 7px 10px;
    border: 1px solid var(--ant-border-color);
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .82) inset, 0 6px 14px rgba(12, 32, 48, .06);
}

.communication-port-toolbar-detailed {
    display: grid;
    align-items: stretch;
    gap: .75rem;
}

.communication-port-heading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 88px;
    flex: 0 0 auto;
}

.communication-port-title {
    color: #1d2b35;
    font-size: .88rem;
    font-weight: 850;
    white-space: nowrap;
}

.communication-port-warning {
    max-width: 280px;
    overflow: hidden;
    color: #a15c00;
    font-size: .76rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.communication-port-chip-list {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
    flex-wrap: wrap;
}

.communication-port-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    min-height: 34px;
    padding: 3px 4px 3px 9px;
    border: 1px solid #d6e2ea;
    border-radius: 5px;
    background: #f8fafb;
}

.communication-port-chip.is-selected {
    border-color: #9acdb4;
    background: #f2fbf6;
}

.communication-port-chip.is-unchecked {
    border-color: #f2c18b;
    background: #fff8ef;
}

.communication-port-chip.is-checking {
    border-color: #92b9e6;
    background: #f3f8fe;
}

.communication-port-chip.is-available {
    border-color: #9acdb4;
    background: #f2fbf6;
}

.communication-port-chip.is-unavailable {
    border-color: #f0a0a0;
    background: #fff5f5;
}

.communication-port-chip.is-empty {
    border-color: #d6e2ea;
    background: #f8fafb;
}

.communication-port-chip.is-disabled {
    opacity: .72;
}

.communication-port-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, .16);
    flex: 0 0 auto;
}

.communication-port-chip.is-selected .communication-port-dot {
    background: #16875a;
    box-shadow: 0 0 0 3px rgba(22, 135, 90, .16);
}

.communication-port-chip.is-unchecked .communication-port-dot {
    background: #d18a36;
    box-shadow: 0 0 0 3px rgba(209, 138, 54, .16);
}

.communication-port-chip.is-checking .communication-port-dot {
    background: #2d7ecb;
    box-shadow: 0 0 0 3px rgba(45, 126, 203, .16);
}

.communication-port-chip.is-unavailable .communication-port-dot {
    background: #c93b3b;
    box-shadow: 0 0 0 3px rgba(201, 59, 59, .16);
}

.communication-port-label {
    min-width: 0;
    max-width: min(420px, 42vw);
    overflow: hidden;
    color: #334155;
    font-size: .82rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.communication-port-select-btn {
    min-height: 26px;
    padding: 2px 8px;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}

.communication-bench-port-input {
    width: 86px;
    min-width: 86px;
    height: 26px;
    padding: 2px 7px;
    font-size: .78rem;
    font-weight: 800;
}

.communication-port-recheck-btn {
    padding-inline: 7px;
}

.communication-selection-panel {
    display: grid;
    grid-template-columns: minmax(160px, .7fr) minmax(360px, 1.6fr) auto;
    gap: .45rem .75rem;
    align-items: center;
    margin-top: .25rem;
    padding: .55rem .65rem;
    border: 1px solid #b9d3ee;
    border-left: 3px solid #2563eb;
    border-radius: 6px;
    background: #f7fbff;
    box-shadow: none;
}

.communication-selection-main {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: .45rem;
}

.communication-selection-kicker {
    color: #456179;
    font-size: .76rem;
    font-weight: 800;
}

.communication-selection-title {
    min-width: 0;
    color: #10203a;
    font-size: .95rem;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.communication-selection-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    min-width: 0;
    color: #334155;
    font-size: .8rem;
    font-weight: 750;
}

.communication-selection-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: .16rem .45rem;
    border: 1px solid #d5e4f5;
    border-radius: 4px;
    background: #fff;
    white-space: nowrap;
}

.communication-selection-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .55rem;
    min-width: 0;
}

.communication-selection-action {
    width: auto;
    min-height: 30px;
    padding: .18rem .5rem;
    white-space: nowrap;
}

.communication-selection-foot {
    color: #64748b;
    font-size: .76rem;
    white-space: nowrap;
}

.production-input-panel {
    display: grid;
    grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.6fr) minmax(160px, .7fr);
    gap: .75rem 1rem;
    align-items: center;
    padding: .75rem .85rem;
    border: 1px solid var(--ant-border-color);
    border-radius: 6px;
    background: #f8fafb;
    box-shadow: none;
}

.production-input-main,
.production-input-result {
    min-width: 0;
}

.production-input-kicker {
    color: #64748b;
    font-size: .76rem;
    font-weight: 800;
}

.production-input-title {
    color: var(--control-ink);
    font-size: .98rem;
    font-weight: 900;
}

.production-input-controls {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto auto;
    gap: .5rem;
    align-items: center;
    min-width: 0;
}

.production-scan-input {
    min-height: 38px;
    border-color: var(--control-line);
    background: #ffffff;
    font-weight: 800;
}

.production-input-result {
    font-size: .9rem;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.multi-station-panel {
    display: grid;
    gap: .75rem;
    padding: .75rem .85rem;
    border: 1px solid #cfdce8;
    border-radius: 6px;
    background: #fbfcfe;
}

.multi-station-header {
    display: flex;
    align-items: center;
    gap: .85rem;
    flex-wrap: wrap;
}

.multi-station-toggle,
.multi-station-count {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: #1d2b35;
    font-size: .88rem;
    font-weight: 850;
}

.multi-station-toggle .form-check-input {
    flex: 0 0 auto;
    margin-top: 0;
    transform: translateY(-1px);
}

.multi-station-count .form-control {
    flex: 0 0 64px;
    width: 64px;
    height: 28px;
    min-height: 28px;
    padding: .125rem .35rem;
    font-weight: 850;
    text-align: center;
    transition: none;
}

.multi-station-count .form-control[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.multi-station-count .form-control[type="number"]::-webkit-inner-spin-button,
.multi-station-count .form-control[type="number"]::-webkit-outer-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.multi-station-summary,
.multi-station-scan-progress {
    color: #64748b;
    font-size: .8rem;
    font-weight: 800;
}

.multi-station-section {
    display: grid;
    gap: .5rem;
}

.multi-station-section-title {
    color: #334155;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.multi-station-scan-grid,
.multi-station-status-grid,
.multi-station-port-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: .5rem;
}

.multi-station-port-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "main actions"
        "label actions";
    gap: .2rem .65rem;
    align-items: center;
    min-height: 42px;
    min-width: 0;
    padding: .4rem .5rem;
    border: 1px solid #d6e2ea;
    border-radius: 5px;
    background: #fff;
    overflow: hidden;
}

.multi-station-port-row.is-available {
    border-color: #9acdb4;
    background: #f7fcf9;
}

.multi-station-port-row.is-unchecked {
    border-color: #f2c18b;
    background: #fffaf2;
}

.multi-station-port-row.is-checking {
    border-color: #92b9e6;
    background: #f3f8fe;
}

.multi-station-port-row.is-unavailable {
    border-color: #f0a0a0;
    background: #fff6f6;
}

.multi-station-port-row.is-available .communication-port-dot {
    background: #16875a;
    box-shadow: 0 0 0 3px rgba(22, 135, 90, .16);
}

.multi-station-port-row.is-unchecked .communication-port-dot {
    background: #d18a36;
    box-shadow: 0 0 0 3px rgba(209, 138, 54, .16);
}

.multi-station-port-row.is-checking .communication-port-dot {
    background: #2d7ecb;
    box-shadow: 0 0 0 3px rgba(45, 126, 203, .16);
}

.multi-station-port-row.is-unavailable .communication-port-dot {
    background: #c93b3b;
    box-shadow: 0 0 0 3px rgba(201, 59, 59, .16);
}

.multi-station-port-main,
.multi-station-port-actions {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-width: 0;
}

.multi-station-port-main {
    grid-area: main;
}

.multi-station-port-actions {
    grid-area: actions;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.multi-station-port-actions .communication-port-select-btn {
    flex: 0 0 auto;
}

.multi-station-shared-bench-input {
    grid-area: actions;
    width: 9rem;
}

.multi-station-port-label {
    grid-area: label;
}

.multi-station-port-station,
.multi-station-port-channel,
.multi-station-port-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multi-station-port-station {
    color: #10203a;
    font-size: .84rem;
    font-weight: 900;
}

.multi-station-port-channel,
.multi-station-port-label {
    color: #475569;
    font-size: .78rem;
    font-weight: 800;
}

.multi-station-scan-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    gap: .5rem;
    align-items: center;
}

.multi-station-scan-row,
.multi-station-status-card {
    display: grid;
    gap: .25rem;
    min-width: 0;
    padding: .5rem .55rem;
    border: 1px solid #d6e2ea;
    border-radius: 5px;
    background: #fff;
}

.multi-station-scan-row.is-resolved {
    border-color: #9acdb4;
    background: #f7fcf9;
}

.multi-station-meter {
    color: #1f2937;
    font-size: .82rem;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.multi-station-status-head,
.multi-station-status-counts {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    min-width: 0;
}

.multi-station-status-counts {
    justify-content: flex-start;
    color: #475569;
    font-size: .78rem;
    font-weight: 850;
}

@media (max-width: 720px) {
    .communication-run-actions {
        flex-wrap: wrap;
    }

    .recoverable-run-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .inline-feedback.recoverable-run-panel .inline-feedback-body {
        align-items: flex-start;
        flex-direction: column;
    }

    .communication-port-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .communication-port-heading,
    .communication-port-chip-list,
    .communication-port-chip {
        width: 100%;
    }

    .communication-port-warning,
    .communication-port-label {
        max-width: 100%;
    }

    .communication-port-chip {
        justify-content: space-between;
    }

    .communication-selection-panel {
        grid-template-columns: minmax(0, 1fr);
    }

    .communication-setup-card .communication-load-group {
        flex-wrap: wrap;
    }

    .communication-setup-card .communication-load-group .form-control,
    .communication-setup-card .communication-load-group .searchable-select {
        flex-basis: 100%;
    }

    .communication-scheme-inline-row,
    .communication-scheme-fixed-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .multi-station-inline-controls {
        width: 100%;
        height: auto;
        min-height: var(--app-control-height);
        flex-wrap: wrap;
        white-space: normal;
    }

    .communication-selection-main,
    .communication-selection-tools {
        align-items: flex-start;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .production-input-panel,
    .production-input-controls,
    .multi-station-scan-toolbar,
    .multi-station-port-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .multi-station-port-row {
        grid-template-areas:
            "main"
            "label"
            "actions";
    }

    .multi-station-port-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

.home-header-action-btn {
    justify-content: center;
    padding-left: .75rem;
    padding-right: .75rem;
}

.task-config-header {
    align-items: center;
    flex: 0 0 auto;
    margin-bottom: 10px !important;
}

.task-config-page {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.task-config-title-block {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}

.task-config-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: var(--scheme-font-control);
    color: #526371;
}

.task-config-stats span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 24px;
    padding: 2px 8px;
    border: 1px solid #d8e2ea;
    border-radius: 4px;
    background: #fff;
}

.task-config-stats strong {
    color: var(--control-ink);
    font-size: var(--scheme-font-section);
}

.task-config-add-button {
    white-space: nowrap;
}

.task-config-workbench {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    min-height: 0;
}

.page-load-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 220px;
    padding: 24px;
    border: 1px solid var(--ant-border-color);
    border-radius: 8px;
    background: var(--ant-bg-container);
    box-shadow: var(--control-panel-shadow);
    color: var(--ant-text-secondary);
    font-size: var(--scheme-font-body);
    text-align: center;
}

.page-load-state-error {
    align-items: center;
    flex-direction: column;
    color: #b42318;
}

.task-list-panel,
.task-editor-drawer {
    min-width: 0;
    border: 1px solid var(--ant-border-color);
    border-radius: 8px;
    background: var(--ant-bg-container);
    box-shadow: var(--control-panel-shadow);
}

.task-list-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.task-list-panel-header,
.task-editor-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 14px;
    border-bottom: 1px solid var(--ant-border-color);
    background: #fff;
}

.task-list-panel-header h2,
.task-editor-drawer-header h2,
.task-editor-section-title h3 {
    margin: 0;
    color: var(--control-ink);
    font-size: var(--scheme-font-section);
    font-weight: 800;
    letter-spacing: 0;
}

.task-list-panel-header span,
.task-editor-drawer-header span,
.task-editor-section-title span {
    color: var(--ant-text-secondary);
    font-size: var(--scheme-font-meta);
}

.task-list-toolbar {
    padding: 10px;
    border-bottom: 1px solid #e1e9ef;
    background: #fbfcfd;
}

.task-search-box .form-label,
.task-editor-field .form-label {
    margin-bottom: 4px;
    color: #425466;
    font-size: var(--scheme-font-meta);
    font-weight: 800;
}

.task-search-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: flex-end;
}

.task-compact-button {
    width: auto;
    min-height: 30px;
    padding: 4px 10px;
    white-space: nowrap;
    font-size: var(--scheme-font-control);
    line-height: 1.2;
}

.task-list {
    display: grid;
    flex: 1 1 auto;
    gap: 8px;
    align-content: start;
    min-height: 0;
    overflow: auto;
    padding: 10px;
    background: #f8fafb;
}

.task-summary-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 12px;
    border: 1px solid #d8e2ea;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.task-summary-row:hover {
    border-color: #9fc4d3;
    background: #fff;
}

.task-summary-row.active {
    border-color: var(--ant-primary);
    background: #f4fbfe;
    box-shadow: 0 0 0 2px rgba(15, 107, 143, .12);
}

.task-summary-main {
    min-width: 0;
}

.task-summary-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.task-summary-no {
    min-width: 0;
    overflow: hidden;
    color: #172b3a;
    font-size: var(--scheme-font-body);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-summary-remark {
    margin-top: 3px;
    overflow: hidden;
    color: #35495a;
    font-size: var(--scheme-font-control);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-summary-meta {
    display: flex;
    gap: 8px 12px;
    flex-wrap: wrap;
    margin-top: 5px;
    color: var(--ant-text-secondary);
    font-size: var(--scheme-font-meta);
}

.task-summary-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px dashed #d8e2ea;
}

.task-status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 7px;
    border: 1px solid #d9d9d9;
    border-radius: 999px;
    font-size: var(--scheme-font-meta);
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.task-status-chip.published {
    color: #0f766e;
    border-color: #9bd8cf;
    background: #ecfdf7;
}

.task-status-chip.draft {
    color: #9a5b12;
    border-color: #e6c07a;
    background: #fff8e7;
}

.task-detail-field > .task-status-chip {
    justify-self: start;
    width: fit-content;
    max-width: 100%;
}

.task-empty-state {
    padding: 28px 12px;
    color: var(--ant-text-secondary);
    font-size: var(--scheme-font-body);
    text-align: center;
}

.task-list-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border-top: 1px solid var(--ant-border-color);
    background: #fbfcfd;
    color: var(--ant-text-secondary);
    font-size: var(--scheme-font-meta);
}

.task-list-pagination > div {
    display: flex;
    gap: 6px;
    align-items: center;
}

.task-editor-drawer {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.task-editor-drawer-header .btn-close {
    flex: 0 0 auto;
}

.task-editor-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    overflow: hidden;
    padding: 8px;
}

.task-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
}

.task-detail-field {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 8px;
    border: 1px solid #e1e9ef;
    border-radius: 6px;
    background: #fbfcfd;
}

.task-detail-field.span-full {
    grid-column: 1 / -1;
}

.task-detail-label {
    color: #6c7a86;
    font-size: var(--scheme-font-meta);
    font-weight: 800;
}

.task-detail-value {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #263846;
    font-size: var(--scheme-font-control);
    font-weight: 700;
}

.task-detail-device-list {
    --task-device-list-width: 100%;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    padding: 10px 12px 12px;
    overflow: hidden;
    background: #f6f9fb;
}

.task-detail-device-toolbar {
    display: grid;
    width: var(--task-device-list-width);
    align-self: stretch;
    grid-template-columns: minmax(220px, 1fr) max-content;
    gap: 8px;
    align-items: center;
}

.task-detail-device-search {
    min-height: 30px;
    border-color: #c9d8e3;
    border-radius: 6px;
    background: #fff;
    font-size: var(--scheme-font-control);
}

.task-detail-device-summary,
.task-detail-device-pagination {
    color: var(--ant-text-secondary);
    font-size: var(--scheme-font-meta);
    font-weight: 700;
}

.task-detail-device-summary {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid #d6e2eb;
    border-radius: 999px;
    background: #fff;
    white-space: nowrap;
}

.task-detail-device-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    border: 1px dashed #d8e2ea;
    border-radius: 6px;
    background: #fbfcfd;
    color: var(--ant-text-secondary);
    font-size: var(--scheme-font-control);
    font-weight: 700;
}

.task-detail-device-table-wrap {
    width: var(--task-device-list-width);
    align-self: stretch;
    max-height: 320px;
    overflow: auto;
    border: 1px solid #cfdde8;
    border-radius: 6px 6px 0 0;
    background: #fff;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset;
}

.task-detail-device-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.task-detail-device-table th,
.task-detail-device-table td {
    padding: 6px 12px;
    border-bottom: 1px solid #e8eff4;
    color: #263846;
    font-size: var(--scheme-font-control);
    text-align: left;
    vertical-align: middle;
}

.task-detail-device-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #eef5f8;
    color: #6c7a86;
    font-size: var(--scheme-font-meta);
    font-weight: 800;
}

.task-detail-device-table th:first-child,
.task-detail-device-table td:first-child {
    width: 68px;
    color: var(--ant-text-secondary);
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.task-detail-device-table th:last-child,
.task-detail-device-table td:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    text-align: left;
}

.task-detail-device-table tbody tr:hover td {
    background: #f8fbfd;
}

.task-detail-device-table tbody tr:last-child td {
    border-bottom: 0;
}

.task-detail-device-pagination {
    display: flex;
    width: var(--task-device-list-width);
    align-self: stretch;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: -8px;
    padding: 7px 10px;
    border: 1px solid #cfdde8;
    border-top: 0;
    border-radius: 0 0 6px 6px;
    background: #fff;
}

.task-detail-device-pagination > div {
    display: flex;
    gap: 6px;
    align-items: center;
}

.task-detail-device-pagination .btn {
    min-height: 28px;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: var(--scheme-font-control);
    line-height: 1.2;
}

.task-editor-section {
    flex: 0 0 auto;
    border: 1px solid #d8e2ea;
    border-radius: 6px;
    background: #fff;
}

.task-editor-body > .task-editor-section:last-child {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.task-editor-body > .task-detail-device-section {
    flex: 0 0 auto;
}

.task-detail-device-section .task-detail-device-list {
    flex: 0 0 auto;
}

.task-editor-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 10px;
    border-bottom: 1px solid #e1e9ef;
    background: #f8fafb;
}

.task-editor-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 8px 10px;
}

.task-editor-grid.three-column {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.task-editor-grid.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.task-editor-field {
    min-width: 0;
}

.task-editor-field.span-2 {
    grid-column: span 2;
}

.task-editor-field.span-full {
    grid-column: 1 / -1;
}

.task-editor-check-field {
    display: flex;
    align-items: flex-end;
    padding-bottom: 7px;
}

.task-editor-check-field .form-check-label {
    color: #425466;
    font-size: var(--scheme-font-control);
    font-weight: 700;
}

.task-device-textarea {
    flex: 1 1 auto;
    min-height: 120px;
    height: 100%;
    border: 0;
    border-radius: 0 0 6px 6px;
    resize: none;
}

.task-editor-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 10px;
    border-top: 1px solid var(--ant-border-color);
    background: #fbfcfd;
}

.dlt-workbench-page {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
    min-height: 0;
    overflow: hidden;
}

.dlt-workbench-header {
    align-items: center;
    flex: 0 0 auto;
}

.dlt-workbench-title-block {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}

.dlt-workbench-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    color: #526371;
    font-size: var(--scheme-font-control);
}

.dlt-workbench-stats span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 24px;
    padding: 2px 8px;
    border: 1px solid #d8e2ea;
    border-radius: 4px;
    background: #fff;
}

.dlt-workbench-stats strong {
    color: var(--control-ink);
    font-size: var(--scheme-font-section);
}

.dlt-workbench {
    display: grid;
    grid-template-columns: minmax(380px, 460px) minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
}

.dlt-list-panel,
.dlt-editor-panel {
    min-width: 0;
    border: 1px solid var(--ant-border-color);
    border-radius: 6px;
    background: var(--ant-bg-container);
    box-shadow: var(--control-panel-shadow);
}

.dlt-list-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.dlt-list-panel-header,
.dlt-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--ant-border-color);
    background: linear-gradient(180deg, #f8fafb 0%, #eef3f6 100%);
}

.dlt-list-panel-header h2,
.dlt-editor-header h2,
.dlt-editor-section-title h3 {
    margin: 0;
    color: var(--control-ink);
    font-size: var(--scheme-font-section);
    font-weight: 800;
    letter-spacing: 0;
}

.dlt-list-panel-header span,
.dlt-editor-header span {
    color: var(--ant-text-secondary);
    font-size: var(--scheme-font-meta);
}

.dlt-filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(110px, 140px);
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #e1e9ef;
    background: #fbfcfd;
}

.dlt-filter-field {
    min-width: 0;
}

.dlt-filter-field .form-label,
.dlt-editor-field .form-label {
    margin-bottom: 4px;
    color: #425466;
    font-size: var(--scheme-font-meta);
    font-weight: 800;
}

.dlt-item-list {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
}

.dlt-item-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    align-items: start;
    padding: 12px 14px;
    border-bottom: 1px solid #e1e9ef;
    background: #fff;
    cursor: pointer;
    transition: background-color .15s ease, box-shadow .15s ease;
}

.dlt-item-row:hover,
.dlt-item-row.active {
    background: #f2f8fa;
}

.dlt-item-row.active {
    box-shadow: inset 3px 0 0 var(--ant-primary);
}

.dlt-item-row.dragging,
.dlms-item-row.dragging {
    opacity: .68;
}

.template-sort-controls {
    display: none;
    grid-template-columns: 14px 44px;
    grid-template-rows: 26px 24px;
    gap: 3px 5px;
    align-items: center;
    width: 68px;
}

.template-sort-handle {
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 48px;
    color: #78909f;
    cursor: grab;
    font-size: 13px;
    line-height: 1;
    user-select: none;
}

.template-sort-handle:active {
    cursor: grabbing;
}

.template-sort-input {
    width: 44px;
    height: 26px;
    padding: 2px 4px;
    text-align: center;
    font-size: var(--scheme-font-meta);
    font-weight: 800;
}

.template-sort-buttons {
    display: flex;
    gap: 3px;
}

.template-sort-buttons .scheme-step-action-btn {
    min-width: 20px !important;
    width: 20px !important;
    min-height: 20px;
    height: 20px;
    padding: 0 !important;
}

.dlt-item-main {
    min-width: 0;
}

.dlt-item-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.dlt-item-title > span:first-child {
    min-width: 0;
    overflow: hidden;
    color: #172b3a;
    font-size: var(--scheme-font-body);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dlt-item-meta,
.dlt-item-format {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 5px;
    color: var(--ant-text-secondary);
    font-size: var(--scheme-font-meta);
}

.dlt-item-format {
    color: #5a6d7c;
}

.dlt-item-actions {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 4px;
    flex-wrap: wrap;
    padding-top: 1px;
}

.dlt-item-actions .scheme-step-action-btn,
.dlms-item-actions .scheme-step-action-btn {
    min-width: 24px !important;
    width: 24px !important;
    min-height: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    line-height: 1;
    color: #2f4454;
}

.dlt-frame-chip {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 7px;
    border: 1px solid #d9d9d9;
    border-radius: 999px;
    font-size: var(--scheme-font-meta);
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.dlt-frame-chip.read {
    color: #0f6b8f;
    border-color: #9fc4d3;
    background: #e7f2f6;
}

.dlt-frame-chip.write {
    color: #9a5b12;
    border-color: #e6c07a;
    background: #fff8e7;
}

.dlt-empty-state,
.dlms-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 154px;
    padding: 24px 12px;
    border: 1px dashed #c8d8e3;
    border-radius: 8px;
    background: #f8fbfd;
    color: var(--ant-text-secondary);
    font-size: var(--scheme-font-body);
    text-align: center;
}

.template-empty-title {
    color: var(--ant-text-primary);
    font-size: var(--scheme-font-body);
    font-weight: 800;
}

.template-empty-copy {
    max-width: 360px;
    line-height: 1.45;
}

.template-empty-actions {
    display: flex;
    justify-content: center;
    margin-top: 2px;
}

.dlt-editor-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: none;
    overflow: hidden;
}

.dlt-editor-header > div {
    min-width: 0;
}

.dlt-editor-header h2 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dlt-editor-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    overflow-y: auto;
    padding: 10px;
}

.dlt-editor-section {
    border: 1px solid #d8e2ea;
    border-radius: 6px;
    background: #fff;
}

.dlt-editor-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid #e1e9ef;
    background: #f8fafb;
}

.dlt-editor-grid {
    display: grid;
    gap: 8px;
    padding: 10px;
}

.dlt-editor-grid.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dlt-editor-grid.six-column {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dlt-editor-field {
    min-width: 0;
}

.dlt-editor-field.span-2 {
    grid-column: span 2;
}

.dlt-editor-field.span-4 {
    grid-column: span 4;
}

.dlt-editor-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 10px;
    border-top: 1px solid var(--ant-border-color);
    background: #fbfcfd;
}

.dlt-compact-button {
    width: auto;
    min-height: 30px;
    padding: 4px 10px;
    white-space: nowrap;
    font-size: var(--scheme-font-control);
    line-height: 1.2;
}

.dlms-workbench-page {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
    min-height: 0;
    overflow: hidden;
}

.dlms-workbench-header {
    align-items: center;
    flex: 0 0 auto;
}

.dlms-workbench-title-block {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}

.dlms-workbench-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    color: #526371;
    font-size: var(--scheme-font-control);
}

.dlms-workbench-stats span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 24px;
    padding: 2px 8px;
    border: 1px solid #d8e2ea;
    border-radius: 4px;
    background: #fff;
}

.dlms-workbench-stats strong {
    color: var(--control-ink);
    font-size: var(--scheme-font-section);
}

.dlms-workbench {
    display: grid;
    grid-template-columns: minmax(380px, 460px) minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
}

.dlms-list-panel,
.dlms-editor-panel {
    min-width: 0;
    border: 1px solid var(--ant-border-color);
    border-radius: 6px;
    background: var(--ant-bg-container);
    box-shadow: var(--control-panel-shadow);
}

.dlms-list-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.dlms-list-panel-header,
.dlms-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--ant-border-color);
    background: linear-gradient(180deg, #f8fafb 0%, #eef3f6 100%);
}

.dlms-list-panel-header h2,
.dlms-editor-header h2,
.dlms-editor-section-title h3 {
    margin: 0;
    color: var(--control-ink);
    font-size: var(--scheme-font-section);
    font-weight: 800;
    letter-spacing: 0;
}

.dlms-list-panel-header span,
.dlms-editor-header span {
    color: var(--ant-text-secondary);
    font-size: var(--scheme-font-meta);
}

.dlms-filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(110px, 140px);
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #e1e9ef;
    background: #fbfcfd;
}

.dlms-filter-field,
.dlms-editor-field {
    min-width: 0;
}

.dlms-filter-field .form-label,
.dlms-editor-field .form-label {
    margin-bottom: 4px;
    color: #425466;
    font-size: var(--scheme-font-meta);
    font-weight: 800;
}

.dlms-item-list {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
}

.dlms-item-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    align-items: start;
    padding: 12px 14px;
    border-bottom: 1px solid #e1e9ef;
    background: #fff;
    cursor: pointer;
    transition: background-color .15s ease, box-shadow .15s ease;
}

.dlms-item-row:hover,
.dlms-item-row.active {
    background: #f2f8fa;
}

.dlms-item-row.active {
    box-shadow: inset 3px 0 0 var(--ant-primary);
}

.dlms-item-main {
    min-width: 0;
}

.dlms-item-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.dlms-item-title > span:first-child {
    min-width: 0;
    overflow: hidden;
    color: #172b3a;
    font-size: var(--scheme-font-body);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dlms-item-meta,
.dlms-item-format {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 5px;
    color: var(--ant-text-secondary);
    font-size: var(--scheme-font-meta);
}

.dlms-item-format {
    color: #5a6d7c;
}

.dlms-item-actions {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 4px;
    flex-wrap: wrap;
    padding-top: 1px;
}

.dlms-frame-chip {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 7px;
    border: 1px solid #d9d9d9;
    border-radius: 999px;
    font-size: var(--scheme-font-meta);
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.dlms-frame-chip.read {
    color: #0f6b8f;
    border-color: #9fc4d3;
    background: #e7f2f6;
}

.dlms-frame-chip.write {
    color: #9a5b12;
    border-color: #e6c07a;
    background: #fff8e7;
}

.dlms-frame-chip.method {
    color: #4d5a12;
    border-color: #b8c86b;
    background: #f5f8df;
}

.dlms-editor-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: none;
    overflow: hidden;
}

.dlms-editor-header > div {
    min-width: 0;
}

.dlms-editor-header h2 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dlms-editor-fieldset {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.dlms-editor-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    padding: 10px;
}

.dlms-editor-section {
    border: 1px solid #d8e2ea;
    border-radius: 6px;
    background: #fff;
}

.dlms-object-result-section {
    display: flex;
    flex-direction: column;
    min-height: 260px;
}

.dlms-object-result-section .dlms-filter-bar {
    flex: 0 0 auto;
}

.dlms-object-result-scroll {
    flex: 1 1 auto;
    min-height: 180px;
    max-height: clamp(180px, 38vh, 420px);
    overflow: auto;
}

.dlms-object-result-scroll .table {
    margin-bottom: 0;
}

.dlms-object-result-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #edf3f6;
    border-bottom: 1px solid #b8c7d2;
}

.dlms-editor-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid #e1e9ef;
    background: #f8fafb;
}

.dlms-editor-grid {
    display: grid;
    gap: 8px;
    padding: 10px;
}

.dlms-editor-grid.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dlms-editor-grid.six-column {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dlms-editor-grid.dlms-object-mapping-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.dlms-object-type-field {
    grid-column: span 5;
}

.dlms-logical-name-field {
    grid-column: span 4;
}

.dlms-index-field {
    grid-column: span 3;
}

.dlms-method-data-type-field {
    grid-column: span 3;
}

.dlms-method-parameter-field {
    grid-column: span 9;
}

.dlms-full-row {
    grid-column: 1 / -1;
}

.dlms-editor-field.span-2 {
    grid-column: span 2;
}

.dlms-editor-field.span-4 {
    grid-column: span 4;
}

.dlms-editor-field.span-full {
    grid-column: 1 / -1;
}

.dlms-editor-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 10px;
    border-top: 1px solid var(--ant-border-color);
    background: #fbfcfd;
}

.dlms-compact-button {
    width: auto;
    min-height: 30px;
    padding: 4px 10px;
    white-space: nowrap;
    font-size: var(--scheme-font-control);
    line-height: 1.2;
}

.task-search-col {
    flex: 0 0 20.833333%;
    max-width: 20.833333%;
}

.modal-content {
    border: 1px solid var(--ant-border-color);
    border-radius: 4px;
    box-shadow: 0 24px 60px rgba(12, 32, 48, .22);
}

.modal-header {
    border-bottom: 1px solid var(--ant-border-color);
    padding: 12px 14px;
    background: linear-gradient(180deg, #f8fafb 0%, #eef3f6 100%);
}

.modal-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--control-ink);
}

.modal-footer {
    border-top: 1px solid var(--ant-border-color);
    padding: 8px 12px;
}

.input-group-text {
    border: 1px solid var(--control-line);
    background: #f4f7f9;
    color: var(--ant-text-secondary);
}

.table {
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    border-bottom-color: var(--ant-border-color);
    vertical-align: middle;
}

.table-hover > tbody > tr:hover > * {
    --bs-table-hover-bg: #e7f2f6;
}

.pagination .page-link {
    border-radius: 3px;
    margin: 0 2px;
    border-color: #d9d9d9;
    color: rgba(0, 0, 0, 0.88);
}

.pagination .page-link:hover {
    color: #0f6b8f;
    border-color: #0f6b8f;
    background: #fff;
}

.pagination .page-item.active .page-link {
    color: #fff;
    background: #0f6b8f;
    border-color: #0f6b8f;
}

.ant-tag-success {
    color: #389e0d;
    background: #f6ffed;
    border-color: #b7eb8f;
}

.ant-tag-error {
    color: #cf1322;
    background: #fff2f0;
    border-color: #ffccc7;
}

.ant-tag-warning {
    color: #d48806;
    background: #fffbe6;
    border-color: #ffe58f;
}

.ant-tag-info {
    color: #0f6b8f;
    background: #e7f2f6;
    border-color: #9fc4d3;
}

.ant-tag-default {
    color: rgba(0, 0, 0, 0.65);
    background: #fafafa;
    border-color: #d9d9d9;
}

.ant-role-select {
    flex: 0 1 auto;
    min-width: 120px;
    height: calc(2.25rem + 2px);
}

.modern-btn-danger {
    color: #ffffff;
    background: linear-gradient(180deg, #c53a32 0%, #a92720 100%);
    border: 1px solid #8f211b;
    border-radius: 4px;
    padding: var(--app-field-padding-y) var(--app-control-padding-x);
    font-size: var(--scheme-font-body);
    font-weight: 700;
    transition: background .14s ease, border-color .14s ease, box-shadow .14s ease;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 2px 0 rgba(64, 20, 16, .12);
    letter-spacing: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-sm.modern-btn-primary,
.btn-sm.modern-btn-secondary,
.btn-sm.modern-btn-danger {
    min-height: var(--app-control-height-sm);
    padding: 0 var(--app-control-padding-x-sm);
    font-size: var(--scheme-font-control);
    line-height: 1.2;
    gap: .35rem;
}

.modern-btn-danger:hover {
    color: #ffffff;
    background: linear-gradient(180deg, #d0443c 0%, #b22b23 100%);
    border-color: #7f1d17;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .24) inset, 0 2px 0 rgba(64, 20, 16, .16);
}

.modern-btn-danger:disabled {
    color: rgba(0, 0, 0, 0.25);
    background: #f5f5f5;
    border-color: #d9d9d9;
    box-shadow: none;
}

.ant-users-table {
    table-layout: fixed;
    width: 100%;
    min-width: 780px;
    --bs-table-cell-padding-y: .6rem;
    --bs-table-cell-padding-x: .8rem;
}

.ant-users-table th:first-child,
.ant-users-table td:first-child {
    width: 190px;
}

.ant-users-table th:nth-child(2),
.ant-users-table td:nth-child(2) {
    width: 150px;
}

.ant-users-table th:nth-child(3),
.ant-users-table td:nth-child(3) {
    width: 230px;
}

.user-management-page {
    width: 100%;
}

.user-management-page .users-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.user-management-page .users-page-heading {
    min-width: 0;
}

.user-management-page .page-title {
    font-size: 1.32rem;
    font-weight: 850;
    line-height: 1.2;
}

.user-management-page .users-page-summary {
    margin-top: 4px;
    color: #657484;
    font-size: 12px;
    font-weight: 750;
}

.user-management-page .users-toolbar-primary {
    flex: 0 0 auto;
    min-width: 112px;
}

.user-management-page .users-list-card .card-body {
    overflow-x: auto;
}

.user-management-page .users-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #d7e2ea;
    background: linear-gradient(180deg, #fbfdfe 0%, #f4f8fa 100%);
}

.user-management-page .users-list-title {
    color: #1c2b36;
    font-size: 14px;
    font-weight: 850;
}

.user-management-page .users-list-subtitle {
    margin-top: 2px;
    color: #657484;
    font-size: 12px;
    font-weight: 700;
}

.user-management-page .users-name-cell {
    min-width: 0;
    overflow: hidden;
    color: #172838;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-management-page .users-role-badge,
.user-management-page .users-resource-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    max-width: 100%;
    padding: 3px 9px;
    border: 1px solid #d7e2ea;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-management-page .users-role-badge.is-admin {
    color: #7a3f00;
    border-color: #e5b15c;
    background: #fff6e7;
}

.user-management-page .users-role-badge.is-technician {
    color: #0e5b75;
    border-color: #93cfdf;
    background: #eef9fc;
}

.user-management-page .users-role-badge.is-operator {
    color: #2f5d2e;
    border-color: #a9d2a7;
    background: #f1faf0;
}

.user-management-page .users-resource-badge.is-custom {
    color: #23406f;
    border-color: #abc2ea;
    background: #f1f6ff;
}

.user-management-page .users-resource-badge.is-default {
    color: #55616b;
    border-color: #d7e2ea;
    background: #f7fafc;
}

.user-management-page .users-resource-badge.is-muted {
    color: #73808b;
    border-color: #e0e6eb;
    background: #f8f9fa;
}

.user-management-page .users-action-header {
    width: 390px;
}

.user-management-page .users-action-col {
    width: 390px;
}

.user-management-page .users-action-cell {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    white-space: nowrap;
}

.user-management-page .users-action-cell .btn {
    min-width: 64px;
}

.user-management-page .users-form-grid {
    display: grid;
    gap: 12px;
}

.user-management-page .users-safety-modal .modal-title {
    font-weight: 800;
}

.user-management-page .users-target-summary {
    display: grid;
    gap: 8px;
    margin: 0 0 14px;
    padding: 10px;
    border: 1px solid #d7e2ea;
    border-radius: 6px;
    background: #f8fafb;
}

.user-management-page .users-target-summary > div {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.user-management-page .users-target-summary dt {
    color: #657484;
    font-size: 12px;
    font-weight: 800;
}

.user-management-page .users-target-summary dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    color: #1c2b36;
    font-weight: 800;
}

.user-management-page .users-danger-summary {
    border-color: #efb5b0;
    background: #fff7f6;
}

.user-management-page .users-warning-note {
    margin-bottom: 10px;
    padding: 8px 10px;
    border: 1px solid #f1c27d;
    border-radius: 6px;
    color: #7a4a04;
    background: #fff8e8;
    font-size: 12px;
    font-weight: 750;
}

.users-permission-modal .modal-body {
    display: grid;
    gap: 12px;
}

.users-permission-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.users-permission-section {
    min-width: 0;
    padding: 12px;
    border: 1px solid #d7e2ea;
    border-radius: 6px;
    background: #fbfcfd;
}

.users-permission-all {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    margin: 0;
    padding-left: 0;
    color: #1c2b36;
    font-size: 13px;
    font-weight: 800;
}

.users-permission-title {
    margin: 10px 0 6px;
    color: #657484;
    font-size: 12px;
    font-weight: 800;
}

.users-permission-title-top {
    margin-top: 0;
}

.users-permission-search {
    margin-bottom: 6px;
    font-size: 12px;
}

.users-permission-list {
    display: grid;
    gap: 4px;
    max-height: 280px;
    overflow: auto;
    padding: 6px;
    border: 1px solid #e0e8ee;
    border-radius: 5px;
    background: #fff;
}

.users-permission-option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    margin: 0;
    padding: 5px 7px;
    border-radius: 4px;
    color: #243746;
    font-size: 12px;
    font-weight: 700;
}

.users-permission-option .form-check-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.users-permission-option:hover {
    background: #eef6f9;
}

.users-permission-option .form-check-input,
.users-permission-all .form-check-input {
    margin: 0;
}

@media (max-width: 992px) {
    .user-management-page .users-action-header,
    .user-management-page .users-action-col {
        width: 330px;
    }
}

@media (max-width: 768px) {
    .user-management-page {
        width: 100%;
    }

    .user-management-page .users-page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .user-management-page .users-toolbar-primary {
        align-self: flex-start;
    }

    .user-management-page .users-action-cell {
        align-items: stretch;
        white-space: normal;
    }

    .ant-users-table {
        min-width: 760px;
    }

    .user-management-page .users-action-cell .btn {
        min-width: 58px;
    }

    .user-management-page .users-action-header {
        width: 300px;
    }

    .user-management-page .users-target-summary > div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .users-permission-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.ant-pagesize-select {
    width: 90px;
}

.ant-col-time {
    width: 170px;
}

.ant-col-username {
    width: 120px;
}

.ant-col-role {
    width: 110px;
}

.ant-col-action {
    width: 160px;
}

.ant-col-target {
    width: 180px;
}

.ant-col-status {
    width: 90px;
}

.ant-dialog-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
}

.ant-dialog-shell {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1060;
    width: 90%;
}

.ant-dialog-shell-lg {
    max-width: 720px;
}

.ant-col-actions {
    width: 180px;
}

.ant-minw-0 {
    min-width: 0;
}

.ant-cursor-help {
    cursor: help;
}

.ant-modal-mask {
    background: rgba(0, 0, 0, 0.45);
}

/* Global table font sizing for consistency across pages
   Ensure both Scheme Configuration and Communication tables use same font size */
.table.table-striped.mb-0,
.table.table-hover.mb-0,
.modern-table {
    font-size: .88rem;
}

/* Optional: reduce line-height for dense tables */
.table.table-striped.mb-0 td,
.table.table-striped.mb-0 th,
.table.table-hover.mb-0 td,
.table.table-hover.mb-0 th,
.modern-table td,
.modern-table th {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

.modern-toast {
    min-width: 320px;
    border: 1px solid var(--ant-border-color);
    border-radius: 4px;
    box-shadow: 0 14px 28px rgba(12, 32, 48, 0.18);
    background: #fff;
}

.modern-toast .toast-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.form-error-text {
    color: #b91c1c;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.save-precheck-panel {
    max-height: 240px;
    overflow: auto;
    margin-top: 12px;
    padding: 10px;
    border: 1px solid #f0b6b6;
    border-radius: 6px;
    background: #fff8f8;
}

.save-precheck-panel .scheme-field-group-title {
    margin-bottom: 6px;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 .2rem rgba(239, 68, 68, 0.15);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1090;
    overflow: auto;
    background-color: rgba(12, 32, 48, 0.52);
    backdrop-filter: blur(2px);
}

.scheme-share-modal {
    display: flex;
    flex-direction: column;
    min-height: min(640px, calc(100vh - 56px));
    max-height: calc(100vh - 32px);
    overflow: hidden;
}

.scheme-share-body {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    padding: 14px;
    overflow: hidden;
    background: #eef3f6;
}

.scheme-share-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, .7fr);
    gap: 14px;
    align-items: stretch;
    padding: 14px;
    border: 1px solid #c7d3dd;
    border-radius: 6px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.scheme-share-summary-main,
.scheme-share-summary-meta {
    min-width: 0;
}

.scheme-share-eyebrow,
.scheme-share-section-title,
.scheme-share-summary-meta span {
    color: #647486;
    font-size: var(--scheme-font-control);
    font-weight: 800;
    line-height: 1.25;
}

.scheme-share-title {
    min-width: 0;
    margin-top: 4px;
    color: #17212b;
    font-size: 20px;
    font-weight: 850;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scheme-share-summary-meta {
    display: grid;
    gap: 8px;
}

.scheme-share-summary-meta div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-width: 0;
}

.scheme-share-summary-meta strong {
    min-width: 0;
    color: #243442;
    font-size: var(--scheme-font-body);
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scheme-share-workspace {
    display: grid;
    grid-template-columns: minmax(260px, .78fr) minmax(360px, 1.22fr);
    gap: 12px;
    min-height: 0;
}

.scheme-share-panel {
    min-width: 0;
    min-height: 0;
    padding: 14px;
    border: 1px solid #c7d3dd;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .88) inset;
}

.scheme-share-name-input {
    height: 40px;
    font-weight: 750;
}

.scheme-share-users-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.scheme-share-user-list {
    display: grid;
    gap: 8px;
    min-height: 0;
    margin-top: 10px;
    overflow: auto;
    padding-right: 2px;
    scrollbar-gutter: stable;
}

.scheme-share-user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 9px 10px;
    border: 1px solid #d8e2ea;
    border-radius: 6px;
    background: #f9fbfc;
    color: #1f2d38;
    cursor: pointer;
    transition: border-color .14s ease, background-color .14s ease, box-shadow .14s ease;
}

.scheme-share-user-row:hover {
    border-color: #9fb9c8;
    background: #ffffff;
}

.scheme-share-user-row.is-selected {
    border-color: #0f6b8f;
    background: #edf7fb;
    box-shadow: 0 0 0 2px rgba(15, 107, 143, .08);
}

.scheme-share-user-row .form-check-input {
    flex: 0 0 auto;
    margin: 0;
}

.scheme-share-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border: 1px solid #cbd8e1;
    border-radius: 50%;
    background: #eaf1f5;
    color: #315164;
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
}

.scheme-share-user-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 750;
}

.scheme-share-empty {
    margin-top: 10px;
    padding: 18px;
    border: 1px dashed #c7d3dd;
    border-radius: 6px;
    background: #f8fafc;
    color: #647486;
    text-align: center;
    font-size: var(--scheme-font-body);
    font-weight: 700;
}

@media (max-width: 760px) {
    .scheme-share-dialog {
        width: 100vw;
        max-width: none;
        margin: 0;
    }

    .scheme-share-modal {
        min-height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .scheme-share-summary,
    .scheme-share-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .scheme-share-body {
        overflow: auto;
    }

    .scheme-share-user-list {
        max-height: 44vh;
    }
}

.scheme-parameters-workspace {
    border: 1px solid #c7d3dd;
    box-shadow: 0 18px 40px rgba(12, 32, 48, .18);
}

.scheme-parameters-workspace-body {
    display: grid;
    grid-template-columns: clamp(320px, 28vw, 380px) minmax(0, 1fr);
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    background: #edf3f6;
}

.scheme-parameters-editor-pane {
    min-width: 0;
    min-height: 0;
    padding: 16px;
    overflow: auto;
    border-right: 1px solid #d8e0e7;
    background: linear-gradient(180deg, #ffffff 0%, #f7fafb 100%);
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scheme-parameters-list-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    padding: 16px 18px;
    overflow: hidden;
    background: #edf3f6;
}

.scheme-parameters-add {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    align-content: start;
    gap: 14px;
    width: 100%;
    min-width: 0;
    padding: 14px;
    border: 1px solid #d7e3ea;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(32, 61, 80, .06);
    box-sizing: border-box;
}

.scheme-parameters-add-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.scheme-parameters-add-name {
    min-width: 0;
}

.scheme-parameters-add-type {
    min-width: 0;
}

.scheme-parameters-add-default {
    min-width: 0;
}

.scheme-parameters-add .form-label {
    margin-bottom: 5px;
    color: #405366;
    font-size: var(--scheme-font-control);
    font-weight: 800;
}

.scheme-parameters-add .form-control,
.scheme-parameters-add .form-select {
    width: 100%;
    min-height: 38px;
    border-color: #c9d7e1;
    border-radius: 8px;
    background-color: #fbfdfe;
}

.scheme-parameters-add-required {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    padding-top: 2px;
}

.scheme-parameters-required-switch {
    height: 34px;
    margin: 0;
    max-width: 100%;
    padding-left: 2.35rem;
    white-space: nowrap;
    width: auto;
}

.scheme-parameters-add-action {
    display: flex;
    align-items: center;
    justify-content: stretch;
    min-width: 0;
    padding-top: 2px;
}

.scheme-parameters-add-action .btn {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 38px;
    padding-right: 12px;
    padding-left: 12px;
    font-size: var(--scheme-font-control);
    white-space: nowrap;
}

.scheme-parameters-add-btn {
    border-color: #0f6b8f !important;
    background: #0f6b8f !important;
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(15, 107, 143, .18);
}

.scheme-parameters-add-btn:hover,
.scheme-parameters-add-btn:focus {
    border-color: #0b5876 !important;
    background: #0b5876 !important;
    color: #ffffff !important;
}

.scheme-parameters-empty {
    display: grid;
    flex: 0 1 auto;
    min-height: 0;
    padding: 30px 24px;
    place-items: center;
    border: 1px dashed #becdd7;
    border-radius: 8px;
    background: #ffffff;
    font-size: var(--scheme-font-body);
}

.scheme-parameters-table-wrap {
    flex: 0 1 auto;
    min-height: 0;
    max-height: 100%;
    border: 1px solid #d8e2ea;
    border-radius: 8px;
    overflow-x: hidden;
    overflow-y: auto;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(32, 61, 80, .05);
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scheme-parameters-editor-pane::-webkit-scrollbar,
.scheme-parameters-table-wrap::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.scheme-parameters-table {
    width: 100%;
    min-width: 0;
    margin-bottom: 0;
    table-layout: fixed;
}

.scheme-parameters-col-name {
    width: 25%;
}

.scheme-parameters-col-type {
    width: 18%;
}

.scheme-parameters-col-default {
    width: auto;
}

.scheme-parameters-col-required {
    width: 82px;
}

.scheme-parameters-col-actions {
    width: 96px;
}

.scheme-parameters-table > thead > tr > th {
    white-space: nowrap;
    font-size: var(--scheme-font-control);
}

.scheme-parameters-table > thead > tr > th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding-top: .62rem;
    padding-bottom: .62rem;
    color: #294259;
    background: #f3f8fb;
    box-shadow: inset 0 -1px 0 #d8e0e7;
}

.scheme-parameters-table > tbody > tr > td {
    padding: .5rem .55rem;
    font-size: var(--scheme-font-body);
    vertical-align: middle;
    border-color: #e1e9ef;
}

.scheme-parameters-table > tbody > tr {
    background: #ffffff;
}

.scheme-parameters-table > tbody > tr:hover {
    background: #f7fbfd;
}

.scheme-parameters-table > thead > tr > th:last-child,
.scheme-parameters-table > tbody > tr > td:last-child {
    text-align: right;
    white-space: nowrap;
}

.scheme-parameters-table > tbody > tr > td:nth-child(4) {
    text-align: center;
}

.scheme-parameters-table .form-control,
.scheme-parameters-table .form-select {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    border-color: #c9d7e1;
    border-radius: 8px;
    background-color: #fbfdfe;
}

.scheme-parameters-table .small {
    white-space: normal;
    overflow-wrap: anywhere;
}

.scheme-parameter-extra-field .form-label {
    margin-bottom: .2rem;
    font-size: var(--scheme-font-small);
    color: #526273;
}

.scheme-parameter-delete-btn {
    width: auto;
}

.add-item-modal {
    max-width: min(1180px, calc(100vw - 32px));
}

.add-item-modal-body {
    padding: 0;
    background: #eef3f6;
}

.add-item-modal-footer {
    justify-content: flex-end;
    gap: .5rem;
    background: #f8fafb;
}

.scheme-config-shell {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 10px 12px 0;
    background: #eef3f6;
}

.scheme-item-type-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 8px;
    padding: 6px;
    border: 1px solid #c7d3dd;
    border-radius: 6px;
    background: #f8fafb;
}

.scheme-item-type-label {
    flex: 0 0 auto;
    padding: 0 4px;
    color: #2367ff;
    font-size: var(--scheme-font-control);
    font-weight: 850;
    white-space: nowrap;
}

.scheme-item-type-options {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
}

.scheme-command-options {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    min-width: 0;
    padding-top: 6px;
    border-top: 1px solid #d8e2ea;
    overflow-x: auto;
}

.scheme-item-type-button {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 5px 10px;
    background: transparent;
    color: #2f4454;
    font-size: var(--scheme-font-control);
    font-weight: 850;
    white-space: nowrap;
}

.scheme-command-button {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d8e2ea;
    border-radius: 4px;
    padding: 4px 9px;
    background: #fff;
    color: #3a4f60;
    font-size: var(--scheme-font-control);
    font-weight: 800;
    white-space: nowrap;
}

.scheme-item-type-button:hover {
    color: #0f6b8f;
    background: #fff;
    border-color: #d8e2ea;
}

.scheme-command-button:hover {
    color: #0f6b8f;
    border-color: #9fc4d3;
}

.scheme-item-type-button.active {
    color: #fff;
    background: #0f6b8f;
    border-color: #0f6b8f;
    box-shadow: 0 5px 12px rgba(12, 32, 48, .12);
}

.scheme-command-button.active {
    color: #fff;
    background: #0f6b8f;
    border-color: #0f6b8f;
    box-shadow: 0 5px 12px rgba(12, 32, 48, .1);
}

.scheme-config-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding: 4px;
    border: 1px solid #c7d3dd;
    border-radius: 6px;
    background: #f8fafb;
}

.scheme-config-tab {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 6px 10px;
    background: transparent;
    color: #2f4454;
    font-size: var(--scheme-font-control);
    font-weight: 800;
    white-space: nowrap;
}

.scheme-config-tab:hover {
    color: #0f6b8f;
    background: #fff;
    border-color: #d8e2ea;
}

.scheme-config-tab.active {
    color: #0f6b8f;
    background: #fff;
    border-color: #9fc4d3;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 5px 12px rgba(12, 32, 48, .08);
}

.scheme-tab-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #9aa8b4;
}

.scheme-tab-dot-ready {
    background: #0f8a5f;
}

.scheme-tab-dot-muted {
    background: #aeb8c2;
}

.scheme-config-panel {
    margin: 12px;
    padding: 14px;
    border: 1px solid #c7d3dd;
    border-radius: 6px;
    background: #fff;
    box-shadow: var(--control-panel-shadow);
}

.scheme-quick-editor {
    margin: 12px;
    padding: 12px;
    border: 1px solid #c7d3dd;
    border-radius: 6px;
    background: #fff;
    box-shadow: var(--control-panel-shadow);
}

.scheme-quick-editor-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 9px;
    border-bottom: 1px solid #e0e8ee;
}

.scheme-quick-chip {
    flex: 0 0 auto;
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 3px 8px;
    border: 1px solid #bfd6e1;
    border-radius: 4px;
    color: #0f6b8f;
    background: #eef8fb;
    font-size: var(--scheme-font-control);
    font-weight: 850;
}

.scheme-quick-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 8px;
}

.scheme-quick-field {
    grid-column: span 2;
    min-width: 0;
}

.scheme-quick-field-wide {
    grid-column: 1 / -1;
}

.scheme-editor-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 8px;
}

.scheme-editor-field,
.span-2 {
    grid-column: span 2;
    min-width: 0;
}

.span-3 {
    grid-column: span 3;
}

.span-4 {
    grid-column: span 4;
}

.upload-location-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.upload-location-description-field {
    grid-column: span 6;
}

.upload-location-api-field,
.upload-location-access-key-field {
    grid-column: span 4;
}

.upload-location-timeout-field,
.upload-location-stop-field {
    grid-column: span 2;
}

.upload-location-stop-field .scheme-switch {
    min-height: 38px;
}

.span-full {
    grid-column: 1 / -1;
}

.scheme-detail-editor .scheme-config-panel,
.scheme-detail-editor .scheme-quick-editor,
.scheme-detail-editor .scheme-flow-rules {
    margin: 10px;
    padding: 10px;
}

.scheme-detail-editor .scheme-section-header {
    margin-bottom: 10px;
    padding-bottom: 8px;
}

.scheme-detail-editor .scheme-field-group {
    padding: 10px;
}

.scheme-detail-editor .scheme-config-panel .scheme-field-group > .scheme-field-group-title {
    margin-bottom: 14px;
    line-height: 1.25;
}

.scheme-detail-editor .scheme-config-panel .scheme-field-group > .scheme-field-group-title + .row.g-2,
.scheme-detail-editor .scheme-config-panel .scheme-field-group > .scheme-field-group-title + .row.g-3 {
    --bs-gutter-y: 0;
    margin-top: 0;
}

.scheme-detail-editor .scheme-config-panel .row.g-2,
.scheme-detail-editor .scheme-config-panel .row.g-3,
.scheme-detail-editor .scheme-flow-rules > .row.g-2,
.scheme-detail-editor .scheme-flow-rules > .row.g-3 {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 8px;
    margin-right: 0;
    margin-left: 0;
}

.scheme-detail-editor .scheme-config-panel .row.g-2 > [class*="col-"],
.scheme-detail-editor .scheme-config-panel .row.g-3 > [class*="col-"],
.scheme-detail-editor .scheme-flow-rules > .row.g-2 > [class*="col-"],
.scheme-detail-editor .scheme-flow-rules > .row.g-3 > [class*="col-"] {
    width: auto;
    max-width: none;
    min-width: 0;
    padding-right: 0;
    padding-left: 0;
}

.scheme-detail-editor .scheme-config-panel .row.g-2 > .row,
.scheme-detail-editor .scheme-config-panel .row.g-3 > .row {
    grid-column: 1 / -1;
}

.scheme-detail-editor .scheme-config-panel .row.g-2 > .scheme-dlt-params-grid,
.scheme-detail-editor .scheme-config-panel .row.g-3 > .scheme-dlt-params-grid {
    grid-column: 1 / -1;
}

.scheme-detail-editor .scheme-config-panel .row.g-3.scheme-communication-picker-row {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
    grid-column: 1 / -1;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    margin-right: 0;
    margin-left: 0;
    width: 100%;
}

.scheme-detail-editor .scheme-config-panel .scheme-communication-protocol-field,
.scheme-detail-editor .scheme-config-panel .scheme-communication-frame-field,
.scheme-detail-editor .scheme-config-panel .scheme-communication-data-item-field {
    width: 100%;
    max-width: none;
    min-width: 0;
    padding-right: 0;
    padding-left: 0;
}

.scheme-detail-editor .scheme-config-panel .scheme-communication-protocol-field,
.scheme-detail-editor .scheme-config-panel .scheme-communication-frame-field {
    grid-column: span 3;
}

.scheme-detail-editor .scheme-config-panel .scheme-communication-data-item-field {
    grid-column: span 6;
}

.scheme-detail-editor .scheme-config-panel .row.g-3.scheme-dlms-config-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
}

.scheme-detail-editor .scheme-config-panel .scheme-dlms-config-grid > .scheme-dlms-config-field {
    grid-column: span 1;
    width: 100%;
    min-width: 0;
}

.scheme-detail-editor .scheme-config-panel .scheme-dlms-config-field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.scheme-detail-editor .scheme-config-panel .scheme-dlms-config-field .form-control,
.scheme-detail-editor .scheme-config-panel .scheme-dlms-config-field .form-select {
    width: 100%;
    max-width: none;
}

.scheme-detail-editor .scheme-config-panel .scheme-dlms-key-row {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
}

.scheme-detail-editor .scheme-config-panel .scheme-dlms-key-field {
    min-width: 0;
}

.scheme-detail-editor .scheme-config-panel .row.g-3.scheme-dlms-object-row,
.scheme-detail-editor .scheme-config-panel .row.g-3.scheme-dlms-method-params-row {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    margin-right: 0;
    margin-left: 0;
    width: 100%;
}

.scheme-detail-editor .scheme-config-panel .scheme-dlms-object-row > .scheme-dlms-object-type-field,
.scheme-detail-editor .scheme-config-panel .scheme-dlms-object-row > .scheme-dlms-logical-name-field,
.scheme-detail-editor .scheme-config-panel .scheme-dlms-object-row > .scheme-dlms-index-field,
.scheme-detail-editor .scheme-config-panel .scheme-dlms-object-row > .scheme-dlms-full-row,
.scheme-detail-editor .scheme-config-panel .scheme-dlms-method-params-row > .scheme-dlms-object-type-field,
.scheme-detail-editor .scheme-config-panel .scheme-dlms-method-params-row > .scheme-dlms-logical-name-field,
.scheme-detail-editor .scheme-config-panel .scheme-dlms-method-params-row > .scheme-dlms-index-field,
.scheme-detail-editor .scheme-config-panel .scheme-dlms-method-params-row > .scheme-dlms-method-data-type-field,
.scheme-detail-editor .scheme-config-panel .scheme-dlms-method-params-row > .scheme-dlms-method-parameter-field {
    width: 100%;
    max-width: none;
    padding-right: 0;
    padding-left: 0;
}

.scheme-detail-editor .scheme-config-panel .scheme-dlms-object-type-field {
    grid-column: span 5;
    min-width: 0;
}

.scheme-detail-editor .scheme-config-panel .scheme-dlms-logical-name-field {
    grid-column: span 4;
    min-width: 0;
}

.scheme-detail-editor .scheme-config-panel .scheme-dlms-index-field {
    grid-column: span 3;
    min-width: 0;
}

.scheme-detail-editor .scheme-config-panel .scheme-dlms-method-data-type-field {
    grid-column: span 3;
    min-width: 0;
}

.scheme-detail-editor .scheme-config-panel .scheme-dlms-method-parameter-field {
    grid-column: span 9;
    min-width: 0;
}

.scheme-detail-editor .scheme-config-panel .scheme-dlms-full-row {
    grid-column: 1 / -1;
    min-width: 0;
}

.scheme-detail-editor .scheme-config-panel .row.g-3.scheme-dlms-read-params-row {
    grid-template-columns: 4fr 3fr 3fr;
    justify-content: center;
    width: min(100%, 1120px);
    margin-right: auto;
    margin-left: auto;
}

.scheme-detail-editor .scheme-config-panel .row.g-3.scheme-dlms-read-params-row > [class*="col-"] {
    grid-column: auto;
}

.scheme-detail-editor .row.g-2 > .col-md-2,
.scheme-detail-editor .row.g-3 > .col-md-2 {
    grid-column: span 1;
}

.scheme-detail-editor .row.g-2 > .col-md-3,
.scheme-detail-editor .row.g-3 > .col-md-3,
.scheme-detail-editor .row.g-2 > .col-md-4,
.scheme-detail-editor .row.g-3 > .col-md-4,
.scheme-detail-editor .row.g-2 > .col-md-auto,
.scheme-detail-editor .row.g-3 > .col-md-auto {
    grid-column: span 2;
}

.scheme-detail-editor .row.g-2 > .col-md-5,
.scheme-detail-editor .row.g-3 > .col-md-5 {
    grid-column: span 3;
}

.scheme-detail-editor .row.g-2 > .col-md-6,
.scheme-detail-editor .row.g-3 > .col-md-6 {
    grid-column: span 4;
}

.scheme-detail-editor .row.g-2 > .col-md-8,
.scheme-detail-editor .row.g-3 > .col-md-8,
.scheme-detail-editor .row.g-2 > .col-md-9,
.scheme-detail-editor .row.g-3 > .col-md-9 {
    grid-column: span 6;
}

.scheme-detail-editor .row.g-2 > .col-12,
.scheme-detail-editor .row.g-3 > .col-12,
.scheme-detail-editor .row.g-2 > .col-md-12,
.scheme-detail-editor .row.g-3 > .col-md-12 {
    grid-column: 1 / -1;
}

.scheme-quick-compare .compare-flow-panel {
    margin: 10px;
    box-shadow: var(--control-panel-shadow);
}

.scheme-advanced-toggle-row {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 10px 10px;
}

.scheme-advanced-parameters {
    margin: 0 10px 10px;
    padding: 10px;
    border: 1px dashed #b9ccd8;
    border-radius: 6px;
    background: #f7fafc;
}

.scheme-advanced-parameters .scheme-config-tabs {
    margin: 0;
}

.source-advanced-parameters {
    margin: 12px 0 0;
    background: #fff;
}

.scheme-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 13px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e8ee;
}

.scheme-section-title {
    color: var(--control-ink);
    font-size: var(--scheme-font-section);
    font-weight: 850;
    line-height: 1.25;
}

.test-server-action {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
    text-align: right;
}

.test-server-status {
    max-width: min(320px, 36vw);
    overflow-wrap: anywhere;
    line-height: 1.3;
}

.location-upload-api-doc-button.btn {
    width: 32px !important;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #31556d;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.location-upload-api-doc-button.btn:hover,
.location-upload-api-doc-button.btn:focus-visible {
    color: #17384f;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.location-upload-api-doc-button.btn:focus-visible {
    outline: 2px solid rgba(15, 107, 143, .25);
    outline-offset: 2px;
}

.location-upload-api-doc-icon {
    width: 17px;
    height: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid currentColor;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

.location-upload-api-doc-body {
    display: grid;
    gap: 12px;
    padding: 14px;
}

.location-upload-api-doc-section {
    padding: 12px;
    border: 1px solid #d8e2ea;
    border-radius: 6px;
    background: #fbfdfe;
}

.location-upload-api-doc-section h6 {
    margin: 0 0 8px;
    color: var(--control-ink);
    font-size: var(--scheme-font-body);
    font-weight: 850;
}

.location-upload-api-doc-section p {
    margin: 0 0 8px;
    color: var(--ant-text-secondary);
    line-height: 1.55;
}

.location-upload-api-doc-code {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d9e3ea;
    border-radius: 4px;
    background: #f3f7fa;
    color: #203747;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: var(--scheme-font-control);
}

.location-upload-api-doc-fields {
    display: grid;
    gap: 0;
    margin: 0;
}

.location-upload-api-doc-fields > div {
    display: grid;
    grid-template-columns: minmax(108px, max-content) minmax(0, 1fr);
    gap: 14px;
    padding: 8px 0;
    border-bottom: 1px solid #e5edf2;
}

.location-upload-api-doc-fields > div:first-child {
    padding-top: 0;
}

.location-upload-api-doc-fields > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.location-upload-api-doc-fields dt,
.location-upload-api-doc-fields dd {
    margin: 0;
}

.location-upload-api-doc-fields dd {
    color: var(--ant-text-secondary);
    line-height: 1.45;
}

.location-upload-api-doc-fields code {
    color: #203747;
    font-size: var(--scheme-font-control);
}

@media (max-width: 640px) {
    .location-upload-api-doc-fields > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

.scheme-switch {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.scheme-switch .form-check-input {
    cursor: pointer;
}

.scheme-switch-with-label-gap {
    margin-top: 24px;
}

.scheme-parameter-groups {
    display: grid;
    gap: 10px;
}

.scheme-field-group {
    padding: 12px;
    border: 1px solid #d8e2ea;
    border-radius: 6px;
    background: #fbfdfe;
}

.scheme-field-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.scheme-field-group-title {
    margin-bottom: 10px;
    color: #2f4454;
    font-size: var(--scheme-font-control);
    font-weight: 850;
}

.power-calibration-switch-field .scheme-switch {
    min-height: 34px;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.power-calibration-switch-field .form-check-label {
    white-space: nowrap;
}

.power-calibration-switch-row {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: nowrap;
    min-width: max-content;
}

@media (max-width: 768px) {
    .power-calibration-switch-row {
        flex-wrap: wrap;
        min-width: 0;
    }
}

.power-calibration-readonly-value {
    display: flex;
    align-items: center;
    padding: .375rem .75rem;
    line-height: 1.5;
}

.power-calibration-timing-field {
    min-width: 0;
}

.power-calibration-timing-field .form-label {
    white-space: nowrap;
}

.power-calibration-meter-read-table-wrap {
    position: relative;
    z-index: auto;
    overflow: visible;
}

.power-calibration-meter-read-table-wrap .searchable-select.is-open {
    z-index: auto;
}

.power-calibration-meter-read-table-wrap .searchable-select-panel {
    z-index: 1100;
}

.ctp-prompt-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.36);
}

.ctp-prompt-dialog {
    width: min(440px, 100%);
    padding: 18px;
    border: 1px solid #c9d6e2;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
}

.ctp-prompt-title {
    margin-bottom: 10px;
    color: var(--control-ink);
    font-size: var(--scheme-font-title);
    font-weight: 850;
}

.ctp-prompt-message {
    min-height: 40px;
    color: #334155;
    font-size: var(--scheme-font-body);
    white-space: pre-wrap;
    word-break: break-word;
}

.ctp-prompt-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.ctp-prompt-actions .btn {
    font-size: var(--scheme-font-control);
}

.scheme-field-group-head .scheme-field-group-title {
    margin-bottom: 0;
}

.scheme-dlt-params-grid {
    display: grid;
    grid-template-columns: repeat(18, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
}

.scheme-dlt-field {
    grid-column: span 3;
    min-width: 0;
}

.scheme-dlt-field-wide {
    grid-column: span 6;
    min-width: 0;
}

.scheme-dlt-params-grid .form-control {
    width: 100%;
}

.prompt-parameter-action-button {
    width: auto;
}

.prompt-parameter-editor {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.prompt-parameter-editor .form-control,
.prompt-parameter-editor .form-select {
    font-size: var(--scheme-font-body);
}

.prompt-parameter-editor .btn {
    font-size: var(--scheme-font-control);
}

.prompt-parameter-row {
    display: grid;
    grid-template-columns: minmax(140px, 1.4fr) minmax(120px, .9fr) minmax(140px, 1.2fr) minmax(110px, auto) auto;
    gap: 10px;
    align-items: start;
    padding: 10px;
    border: 1px solid #dce6ee;
    border-radius: 4px;
    background: #fbfcfe;
}

.prompt-parameter-row > .d-flex.align-items-end {
    padding-top: 27px;
}

.prompt-confirmation-row {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding: 10px;
    border: 1px solid #dce6ee;
    border-radius: 4px;
    background: #fbfcfe;
}

.macro-highlight-editor,
.prompt-confirmation-highlight-editor {
    position: relative;
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
}

.macro-highlight-layer,
.macro-highlight-input {
    min-height: calc(var(--app-control-height) * 3);
}

.prompt-confirmation-highlight-layer,
.prompt-confirmation-highlight-input {
    min-height: 96px;
}

.macro-highlight-layer,
.macro-highlight-input,
.prompt-confirmation-highlight-layer,
.prompt-confirmation-highlight-input {
    font: inherit;
    line-height: 1.5;
    letter-spacing: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    tab-size: 4;
}

.macro-highlight-editor.is-input {
    height: var(--app-control-height);
}

.macro-highlight-editor.is-input .macro-highlight-layer,
.macro-highlight-editor.is-input .macro-highlight-input {
    box-sizing: border-box;
    min-height: var(--app-control-height);
    height: var(--app-control-height);
    padding-top: 0;
    padding-bottom: 0;
    line-height: calc(var(--app-control-height) - 2px);
    white-space: pre;
    overflow-wrap: normal;
}

.macro-highlight-layer,
.prompt-confirmation-highlight-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    margin: 0;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: var(--bs-border-radius, .375rem);
    color: #243449;
    pointer-events: none;
}

.macro-highlight-layer {
    padding: var(--app-field-padding-y) var(--app-field-padding-x);
}

.prompt-confirmation-highlight-layer {
    padding: .375rem .75rem;
}

.macro-highlight-editor.is-input .macro-highlight-layer {
    white-space: pre;
}

.macro-highlight-input,
.prompt-confirmation-highlight-input {
    position: relative;
    z-index: 2;
    resize: vertical;
    color: transparent !important;
    background: transparent !important;
    caret-color: #1d2c3d;
}

.macro-highlight-editor.is-input .macro-highlight-input {
    resize: none;
}

.macro-highlight-input:placeholder-shown {
    color: inherit !important;
    -webkit-text-fill-color: currentColor;
}

.macro-highlight-input:disabled {
    opacity: 1;
}

.macro-highlight-editor.is-disabled .macro-highlight-layer {
    background-color: var(--bs-secondary-bg, #e9ecef);
}

.macro-highlight-input::selection,
.prompt-confirmation-highlight-input::selection {
    color: transparent;
    background: rgba(51, 123, 190, .26);
}

.macro-highlight-layer .macro-var,
.prompt-confirmation-highlight-layer .macro-var,
.macro-highlight-layer .macro-ctx,
.prompt-confirmation-highlight-layer .macro-ctx,
.macro-highlight-layer .macro-token,
.prompt-confirmation-highlight-layer .macro-token,
.macro-highlight-layer .macro-data,
.prompt-confirmation-highlight-layer .macro-data,
.macro-highlight-layer .macro-date,
.prompt-confirmation-highlight-layer .macro-date {
    color: #1d65c1;
    font-weight: 700;
}

.macro-highlight-layer .macro-unknown,
.prompt-confirmation-highlight-layer .macro-unknown {
    color: #b42318;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-style: dotted;
}

.prompt-confirmation-dialog-item {
    padding: 14px 16px 16px;
    margin: 0 0 20px;
    border: 1px solid #d7e2ec;
    border-radius: 8px;
    background: #fbfdff;
    box-shadow: 0 1px 0 rgba(21, 41, 67, .04);
}

.prompt-confirmation-dialog-item + .prompt-confirmation-dialog-item {
    margin-top: 22px;
}

.prompt-confirmation-dialog-item .form-label:first-child {
    margin-bottom: 10px;
}

.prompt-confirmation-dialog-item textarea.form-control {
    min-height: 96px;
}

.prompt-parameter-wide {
    grid-column: 1 / -1;
}

.scheme-empty-state {
    padding: 10px 12px;
    border: 1px dashed #c7d3dd;
    border-radius: 4px;
    background: #f8fafb;
    color: #657484;
    font-size: var(--scheme-font-control);
}

.compare-flow-panel .form-label,
.scheme-config-panel .form-label,
.scheme-quick-editor .form-label {
    margin-bottom: 4px;
    color: #2367ff;
    font-size: var(--scheme-font-control);
    font-weight: 800;
}

.scheme-config-panel .form-control,
.scheme-config-panel .form-select,
.scheme-quick-editor .form-control,
.scheme-quick-editor .form-select,
.compare-flow-panel .form-control,
.compare-flow-panel .form-select {
    font-size: var(--scheme-font-body);
}

.scheme-config-panel .btn,
.scheme-quick-editor .btn,
.compare-flow-panel .btn,
.scheme-advanced-toggle-row .btn {
    font-size: var(--scheme-font-control);
}

.scheme-config-panel .form-check-label,
.scheme-quick-editor .form-check-label,
.compare-flow-panel .form-check-label,
.scheme-switch .form-check-label {
    font-size: var(--scheme-font-control);
}

.value-assistant-inline-label {
    display: inline-flex;
    align-items: center;
    line-height: 1.5;
    margin-bottom: 4px;
}

.value-assistant-title-inline {
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 3px;
    width: fit-content;
    max-width: 100%;
    height: 18px;
    font-size: var(--scheme-font-control);
    line-height: 1.5;
    margin-bottom: 4px;
    white-space: nowrap;
}

.value-assistant-title-inline .value-assistant-inline-label {
    flex: 0 1 auto;
    min-width: 0;
    line-height: inherit;
    margin-bottom: 0;
}

.value-assistant-title-inline .value-assistant-link,
.value-assistant-inline-label + .value-assistant-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 20px;
    min-width: 20px;
    height: auto;
    min-height: 0;
    margin-bottom: 0;
    padding: 0;
    color: #2367ff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    position: relative;
    align-self: baseline;
    text-align: center;
    text-decoration: none;
    top: 1px;
}

.value-field-control {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.value-field-control:not(.value-field-control-textarea) {
    align-items: stretch;
}

.value-field-control .form-control {
    flex: 1 1 auto;
    min-width: 0;
}

.value-field-control:not(.value-field-control-textarea) .form-control,
.value-field-control:not(.value-field-control-textarea) .value-assistant-link {
/*    height: 38px;
    min-height: 38px;*/
}

.value-field-control-textarea {
    align-items: start;
}

.value-assistant-link {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    width: 20px;
    min-width: 20px;
    height: 18px;
/*    height: 38px;*/
    padding: 0;
    background: transparent;
    color: #2367ff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .12s ease, color .12s ease, box-shadow .12s ease;
}

.value-assistant-link:hover:not(.is-disabled) {
    background: transparent;
    color: #174a75;
    text-decoration: underline;
}

.value-assistant-link:focus-visible {
    outline: 2px solid #2f7abf;
    outline-offset: 1px;
}

.value-assistant-link.is-disabled {
    cursor: not-allowed;
    opacity: .55;
    pointer-events: none;
}

.value-assistant-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
}

.value-assistant-tabs .nav-link {
    white-space: nowrap;
}

.value-assistant-variable-pill code {
    color: inherit;
}

.compare-flow-panel textarea.form-control,
.scheme-config-panel textarea.form-control {
    min-height: 90px;
}

.compare-ignore-case-col {
    display: flex;
    align-items: flex-start;
    padding-top: 22px;
}

.compare-ignore-case-option {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    height: calc(1.5em + 0.75rem + 2px);
    margin-bottom: 0;
}

.compare-ignore-case-option .form-check-input {
    flex: 0 0 auto;
    margin-top: 0;
}

.compare-ignore-case-option .form-check-label {
    line-height: 1;
}

.flow-loop-row > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

.flow-loop-compact-row {
    column-gap: .65rem;
}

.flow-loop-check-col {
    padding-top: 22px;
}

.flow-loop-inline-option {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    height: calc(1.5em + 0.75rem + 2px);
    margin-bottom: 0;
    white-space: nowrap;
}

.flow-loop-inline-option .form-check-input {
    flex: 0 0 auto;
    margin-top: 0;
}

.flow-loop-inline-option .form-check-label {
    line-height: 1;
}

@media (max-width: 768px) {
    .add-item-modal {
        max-width: calc(100vw - 16px);
        margin-left: 8px;
        margin-right: 8px;
    }

    .scheme-config-shell {
        padding: 8px 8px 0;
    }

    .scheme-item-type-panel {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .scheme-item-type-options {
        width: 100%;
    }

    .scheme-config-panel {
        margin: 8px;
        padding: 10px;
    }

    .scheme-quick-editor,
    .scheme-quick-compare .compare-flow-panel {
        margin: 8px;
    }

    .scheme-quick-editor-head {
        align-items: stretch;
        flex-direction: column;
    }

    .scheme-quick-chip {
        max-width: 100%;
    }

    .scheme-quick-grid {
        grid-template-columns: 1fr;
    }

    .scheme-editor-grid,
    .scheme-detail-editor .scheme-config-panel .row.g-2,
    .scheme-detail-editor .scheme-config-panel .row.g-3,
    .scheme-detail-editor .scheme-flow-rules > .row.g-2,
    .scheme-detail-editor .scheme-flow-rules > .row.g-3 {
        grid-template-columns: 1fr;
    }

    .scheme-detail-editor .scheme-config-panel .row.g-3.scheme-dlms-config-grid {
        grid-template-columns: 1fr;
    }

    .scheme-detail-editor .scheme-config-panel .row.g-3.scheme-communication-picker-row {
        grid-template-columns: 1fr;
    }

    .scheme-detail-editor .scheme-config-panel .scheme-communication-protocol-field,
    .scheme-detail-editor .scheme-config-panel .scheme-communication-frame-field,
    .scheme-detail-editor .scheme-config-panel .scheme-communication-data-item-field {
        grid-column: 1 / -1;
    }

    .scheme-detail-editor .scheme-config-panel .row.g-3.scheme-dlms-object-row,
    .scheme-detail-editor .scheme-config-panel .row.g-3.scheme-dlms-method-params-row {
        grid-template-columns: 1fr;
    }

    .scheme-detail-editor .scheme-config-panel .scheme-dlms-object-type-field,
    .scheme-detail-editor .scheme-config-panel .scheme-dlms-logical-name-field,
    .scheme-detail-editor .scheme-config-panel .scheme-dlms-index-field,
    .scheme-detail-editor .scheme-config-panel .scheme-dlms-method-data-type-field,
    .scheme-detail-editor .scheme-config-panel .scheme-dlms-method-parameter-field,
    .scheme-detail-editor .scheme-config-panel .scheme-dlms-full-row {
        grid-column: 1 / -1;
    }

    .scheme-detail-editor .scheme-config-panel .scheme-dlms-key-row {
        grid-template-columns: 1fr;
    }

    .scheme-quick-field,
    .scheme-quick-field.span-3,
    .scheme-editor-field,
    .span-2,
    .span-3,
    .span-4,
    .span-full,
    .scheme-detail-editor .scheme-config-panel .scheme-dlms-config-grid > .scheme-dlms-config-field,
    .scheme-detail-editor .row.g-2 > [class*="col-"],
    .scheme-detail-editor .row.g-3 > [class*="col-"] {
        grid-column: 1 / -1;
    }

    .scheme-dlt-field,
    .scheme-dlt-field-wide {
        grid-column: 1 / -1;
    }

    .scheme-advanced-toggle-row,
    .scheme-advanced-parameters {
        margin-right: 8px;
        margin-left: 8px;
    }

    .scheme-section-header,
    .scheme-field-group-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .scheme-parameters-workspace-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
    }

    .scheme-parameters-editor-pane {
        max-height: 42vh;
        border-right: 0;
        border-bottom: 1px solid #d8e0e7;
    }

    .scheme-parameters-list-pane {
        min-height: 0;
    }

    .scheme-parameters-add {
        gap: 10px;
        padding: 12px;
    }

    .scheme-parameters-add-required,
    .scheme-parameters-add-action {
        justify-content: flex-start;
        padding-top: 0;
    }

    .scheme-parameters-table-wrap {
        flex: 1 1 auto;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .scheme-parameters-table,
    .scheme-parameters-table tbody,
    .scheme-parameters-table tr,
    .scheme-parameters-table > tbody > tr > td {
        display: block;
        width: 100%;
    }

    .scheme-parameters-table colgroup,
    .scheme-parameters-table thead {
        display: none;
    }

    .scheme-parameters-table > tbody {
        display: grid;
        gap: 10px;
    }

    .scheme-parameters-table > tbody > tr {
        display: grid;
        gap: 8px;
        padding: 10px;
        border: 1px solid #d8e2ea;
        border-radius: 8px;
        background: #ffffff;
        box-shadow: 0 8px 18px rgba(32, 61, 80, .05);
    }

    .scheme-parameters-table > tbody > tr > td {
        display: grid;
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 10px;
        align-items: center;
        padding: 0;
        border: 0;
        text-align: left !important;
        white-space: normal;
    }

    .scheme-parameters-table > tbody > tr > td::before {
        content: attr(data-label);
        color: #526273;
        font-size: var(--scheme-font-small);
        font-weight: 800;
    }

    .scheme-parameters-table > tbody > tr > td:nth-child(4) .form-check-input {
        justify-self: start;
    }

    .scheme-parameters-table > tbody > tr > td:last-child .btn {
        justify-self: start;
    }
}

@media (max-width: 420px) {
    .scheme-parameters-editor-pane,
    .scheme-parameters-list-pane {
        padding: 10px;
    }
}

.log-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #edf3f6;
    border-bottom: 1px solid #b8c7d2;
}

.log-detail-cell {
    word-break: break-all;
    overflow-wrap: anywhere;
}

.comm-log-content {
    font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-height: 8.5rem;
    overflow: hidden;
    border: 1px solid #d7e0e8;
    border-radius: 4px;
    background: #f7fafc;
    color: #1f2a44;
    padding: .5rem .6rem;
    font-size: .82rem;
    line-height: 1.35;
}

.comm-log-content.is-expanded {
    max-height: 22rem;
    overflow: auto;
}

.comm-log-content-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .35rem;
}

.comm-log-content-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .35rem;
}

.comm-log-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.comm-log-card {
    border: 1px solid var(--ant-border-color);
    border-radius: 4px;
    padding: .65rem;
    background: linear-gradient(180deg, #ffffff 0%, #fafcfd 100%);
}

.comm-log-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    margin-bottom: .75rem;
}

.execution-progress-card {
    border-color: #d9e3f0;
}

.execution-progress-count {
    color: #1f2a44;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
}

.execution-progress-bar {
    height: .75rem;
    border-radius: 999px;
    background: #edf2f7;
}

.execution-progress-bar .progress-bar {
    background: linear-gradient(90deg, #2f5fe3 0%, #0f8a7b 100%);
}

.execution-progress-indeterminate {
    position: relative;
    height: .35rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e7edf5;
}

.execution-progress-indeterminate-bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: 38%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f8a7b 0%, #2f5fe3 100%);
    animation: execution-progress-indeterminate 1.15s ease-in-out infinite;
}

@keyframes execution-progress-indeterminate {
    0% {
        transform: translateX(-110%);
    }

    50% {
        transform: translateX(92%);
    }

    100% {
        transform: translateX(265%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .execution-progress-indeterminate-bar {
        width: 100%;
        animation: none;
        opacity: .7;
    }
}

.execution-progress-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .75rem;
}

.execution-progress-label {
    color: #64748b;
    font-size: .78rem;
    font-weight: 700;
}

.execution-progress-value {
    color: #1f2a44;
    font-size: .98rem;
    font-weight: 800;
}

.execution-cockpit-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.1fr) minmax(280px, 1.4fr) minmax(240px, .9fr);
    gap: .75rem;
}

.execution-cockpit-title {
    color: #64748b;
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.execution-current-step-card,
.execution-timeline-card,
.execution-variable-card {
    min-width: 0;
}

.execution-current-step-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .65rem;
}

.execution-step-seq {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 .45rem;
    border: 1px solid #cfdbe8;
    border-radius: 4px;
    background: #f3f7fb;
    color: #1f2a44;
    font-weight: 850;
}

.execution-timeline {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    max-height: 92px;
    overflow: auto;
    padding-top: .45rem;
}

.execution-timeline-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #cfdbe8;
    border-radius: 4px;
    background: #ffffff;
    color: #334155;
    font-size: .8rem;
    font-weight: 800;
}

.execution-timeline-item.ok {
    border-color: #9fd9b4;
    background: #ecfdf3;
    color: #067647;
}

.execution-timeline-item.ng {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b42318;
}

.execution-timeline-item.current {
    border-color: #8ca8ff;
    box-shadow: 0 0 0 2px rgba(47, 95, 227, .15);
}

.execution-timeline-item.selected {
    border-color: #1f2a44;
}

.execution-timeline-indeterminate {
    margin-top: .5rem;
}

.execution-variable-list {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    max-height: 112px;
    overflow: auto;
    padding-top: .45rem;
}

.execution-variable-row {
    display: grid;
    grid-template-columns: minmax(78px, .8fr) minmax(0, 1.2fr);
    gap: .5rem;
    align-items: center;
    min-width: 0;
    font-size: .82rem;
}

.execution-variable-row span {
    min-width: 0;
    color: #475569;
    font-weight: 750;
    cursor: help;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.execution-variable-row code {
    min-width: 0;
    padding: .14rem .35rem;
    border-radius: 4px;
    background: #edf3f6;
    color: #1f2a44;
    cursor: help;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.execution-log-filter {
    width: min(280px, 58vw);
}

.execution-station-filter {
    width: min(150px, 42vw);
}

.comm-log-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: .5rem .9rem;
}

.comm-log-meta-item {
    min-width: 0;
}

.comm-log-meta-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comm-log-meta-label {
    color: #64748b;
    font-size: .8rem;
    margin-bottom: .1rem;
}

.comm-log-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 22px;
    padding: 0 .45rem;
    border: 1px solid #cfd8e3;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.comm-log-status-badge.is-success {
    border-color: #9fd9b4;
    background: #ecfdf3;
    color: #067647;
}

.comm-log-status-badge.is-fail {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b42318;
}

.comm-log-status-badge.is-unknown {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #475569;
}

.comm-log-scope-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    height: 22px;
    padding: 0 .45rem;
    border: 1px solid #cfd8e3;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.comm-log-scope-badge.is-published {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.comm-log-scope-badge.is-unpublished {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #c2410c;
}

.comm-log-scope-badge.is-unknown {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #475569;
}

.empty-state-container {
    padding: .5rem;
}

.empty-state-message {
    font-size: .95rem;
}

@media (max-width: 768px) {
    .page-header-bar {
        align-items: stretch;
    }

    .page-header-bar .btn {
        width: auto;
        align-self: flex-start;
    }

    .serial-port-group {
        flex-wrap: wrap;
    }

    .serial-port-group .serial-refresh-btn {
        width: auto;
        align-self: flex-start;
    }

    .comm-log-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .execution-progress-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .execution-cockpit-grid {
        grid-template-columns: 1fr;
    }

    .execution-current-step-main {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .execution-current-step-main .badge {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .prompt-parameter-row {
        grid-template-columns: 1fr;
    }

    .prompt-parameter-row > .d-flex.align-items-end {
        padding-top: 0;
    }

    .prompt-confirmation-row {
        grid-template-columns: 1fr;
    }

    .prompt-parameter-action-button {
        width: auto;
        justify-self: flex-start;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .comm-log-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .execution-cockpit-grid {
        grid-template-columns: 1fr 1fr;
    }

    .execution-variable-card {
        grid-column: 1 / -1;
    }
}

/* Display density layer */
.table th,
.table td,
.modern-table th,
.modern-table td,
.table.table-striped.mb-0 th,
.table.table-striped.mb-0 td,
.table.table-hover.mb-0 th,
.table.table-hover.mb-0 td,
.task-detail-device-table th,
.task-detail-device-table td,
.direct-selected-table th,
.direct-selected-table td,
.scheme-parameters-table th,
.scheme-parameters-table td,
.scheme-step-manager-batch-preview-table th,
.scheme-step-manager-batch-preview-table td,
.scheme-step-manager-table th,
.scheme-step-manager-table td {
    padding: var(--app-table-cell-padding-y) var(--app-table-cell-padding-x);
    font-size: var(--scheme-font-control);
}

.task-detail-device-section .task-detail-device-search {
    min-height: 30px;
    padding: 4px 10px;
    font-size: var(--scheme-font-control);
}

.task-detail-device-section .task-detail-device-table th,
.task-detail-device-section .task-detail-device-table td {
    padding: 6px 12px;
    font-size: var(--scheme-font-control);
}

.form-control,
.form-select,
.scheme-config-panel .form-control,
.scheme-config-panel .form-select,
.scheme-quick-editor .form-control,
.scheme-quick-editor .form-select,
.compare-flow-panel .form-control,
.compare-flow-panel .form-select,
.scheme-library-panel .form-control,
.scheme-library-panel .form-select,
.scheme-detail-panel .form-control,
.scheme-detail-panel .form-select,
.scheme-flow-rules .form-control,
.scheme-flow-rules .form-select,
.scheme-library-picker .form-control,
.scheme-library-picker .form-select {
    min-height: var(--app-control-height);
    padding: var(--app-field-padding-y) var(--app-field-padding-x);
    font-size: var(--scheme-font-body);
}

.form-label,
.task-search-box .form-label,
.task-editor-field .form-label,
.dlt-filter-field .form-label,
.dlt-editor-field .form-label,
.dlms-filter-field .form-label,
.dlms-editor-field .form-label,
.compare-flow-panel .form-label,
.scheme-config-panel .form-label,
.scheme-quick-editor .form-label,
.scheme-library-panel .form-label,
.scheme-detail-panel .form-label,
.scheme-library-picker .form-label,
.scheme-step-manager-filter-bar .form-label,
.scheme-step-manager-move-target .form-label,
.scheme-step-manager-batch-grid .form-label {
    font-size: var(--scheme-font-control);
}

.card-body,
.modern-card .card-body,
.communication-setup-card .card-body,
.user-management-page .users-list-card .card-body,
.scheme-flow-card-body,
.scheme-flow-loop-card-body,
.scheme-library-panel,
.scheme-detail-panel,
.dlt-list-panel,
.dlt-editor-panel,
.dlms-list-panel,
.dlms-editor-panel {
    padding: var(--app-card-body-padding);
}

@media (max-width: 980px) {
    .task-config-page {
        height: auto;
        overflow: visible;
    }

    .task-config-workbench {
        grid-template-columns: minmax(0, 1fr);
    }

    .task-list-panel,
    .task-editor-drawer {
        position: static;
        height: auto;
        min-height: 0;
        max-height: none;
    }
}

@media (max-width: 1200px) {
    .dlt-workbench-page {
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    .dlt-workbench {
        grid-template-columns: minmax(0, 1fr);
    }

    .dlt-item-list {
        overflow-y: visible;
    }

    .dlt-editor-panel {
        height: auto;
        max-height: none;
    }

    .dlms-workbench {
        grid-template-columns: minmax(0, 1fr);
    }

    .dlms-workbench-page {
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    .dlms-item-list {
        overflow-y: visible;
    }

    .dlms-editor-panel {
        position: static;
        height: auto;
        max-height: none;
    }
}

@media (max-width: 768px) {
    .task-config-title-block {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .dlt-workbench-title-block {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .dlms-workbench-title-block {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .task-search-controls,
    .task-detail-device-toolbar,
    .task-editor-grid,
    .task-editor-grid.three-column,
    .task-editor-grid.two-column,
    .task-detail-grid,
    .dlt-filter-bar,
    .dlt-editor-grid.two-column,
    .dlt-editor-grid.six-column,
    .dlms-filter-bar,
    .dlms-editor-grid.two-column,
    .dlms-editor-grid.six-column,
    .dlms-editor-grid.dlms-object-mapping-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .task-editor-field.span-2,
    .task-editor-field.span-full,
    .dlt-editor-field.span-2,
    .dlt-editor-field.span-4,
    .dlms-editor-field.span-2,
    .dlms-editor-field.span-4,
    .dlms-editor-field.span-full,
    .dlms-object-type-field,
    .dlms-logical-name-field,
    .dlms-index-field,
    .dlms-method-data-type-field,
    .dlms-method-parameter-field,
    .dlms-full-row {
        grid-column: auto;
    }

    .task-summary-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .dlt-item-row,
    .dlms-item-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .task-summary-actions,
    .dlt-item-actions,
    .dlms-item-actions,
    .task-list-pagination {
        justify-content: flex-start;
    }

    .dlt-item-actions,
    .dlms-item-actions {
        grid-column: 1;
    }
}

.scheme-workbench-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--control-line);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(183, 121, 31, .12), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f8fafb 100%);
    box-shadow: var(--control-panel-shadow);
    position: relative;
}

.scheme-workbench-header::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 4px;
    border-radius: 2px;
    background: var(--control-accent);
    pointer-events: none;
}

.scheme-workbench-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #526371;
    font-size: var(--scheme-font-control);
}

.scheme-workbench-status span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border: 1px solid #d8e2ea;
    border-radius: 4px;
    background: #fff;
}

.scheme-library-trigger {
    min-height: 24px;
    padding: 2px 10px;
    border-radius: 4px;
    line-height: 1.2;
}

.scheme-status-unsaved {
    border-color: #e3b34c !important;
    color: #7a5313;
    background: #fff8e6 !important;
}

.scheme-status-saved {
    border-color: #a9d3bd !important;
    color: #16704a;
    background: #edf8f1 !important;
}

.scheme-precheck-status-pending {
    border-color: #d8e2ea !important;
    color: #526371;
    background: #f8fafb !important;
}

.scheme-precheck-status-ok {
    border-color: #a9d3bd !important;
    color: #16704a;
    background: #edf8f1 !important;
}

.scheme-precheck-status-warning {
    border-color: #e3cf8a !important;
    color: #715914;
    background: #fff9e6 !important;
}

.scheme-precheck-status-blocking {
    border-color: #f0b6b6 !important;
    color: #8b2323;
    background: #fff4f4 !important;
}

.scheme-workbench-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.scheme-workbench-actions .btn,
.scheme-more-actions-menu .dropdown-item,
.scheme-library-panel .btn,
.scheme-timeline-panel .btn,
.scheme-detail-panel .btn {
    font-size: var(--scheme-font-control);
}

.scheme-library-panel .form-label,
.scheme-detail-panel .form-label {
    margin-bottom: 4px;
    color: #374b5b;
    font-size: var(--scheme-font-control);
    font-weight: 800;
}

.scheme-library-panel .form-control,
.scheme-library-panel .form-select,
.scheme-detail-panel .form-control,
.scheme-detail-panel .form-select,
.scheme-flow-rules .form-control,
.scheme-flow-rules .form-select {
    font-size: var(--scheme-font-body);
}

.scheme-more-actions-menu {
    right: 0;
    left: auto;
}

.scheme-workbench-grid {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.scheme-workbench-left-stack {
    position: sticky;
    top: 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    height: calc(100vh - 110px);
    min-height: 0;
}

.scheme-library-panel,
.scheme-timeline-panel,
.scheme-detail-panel {
    min-width: 0;
    border: 1px solid var(--control-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--control-panel-shadow);
}

.scheme-library-panel {
    position: sticky;
    top: 12px;
    padding: 14px;
}

.scheme-workbench-left-stack .scheme-library-panel {
    position: static;
    top: auto;
    flex: 0 0 auto;
}

.scheme-workbench-left-stack .scheme-timeline-panel {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.scheme-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid #e0e8ee;
}

.scheme-panel-title {
    color: var(--control-ink);
    font-size: var(--scheme-font-title);
    font-weight: 850;
}

.scheme-timeline-panel .scheme-panel-head {
    display: block;
}

.scheme-timeline-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.scheme-timeline-title-row > .scheme-panel-title {
    flex: 0 0 auto;
    min-width: max-content;
    white-space: nowrap;
}

.scheme-panel-subtitle {
    margin-top: 3px;
    color: #6c7a86;
    font-size: var(--scheme-font-control);
}

.scheme-timeline-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
}

.scheme-view-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    overflow: hidden;
    min-height: 32px;
    padding: 2px;
    border: 1px solid #cfdbe4;
    border-radius: 8px;
    background: #f5f8fa;
}

.scheme-view-toggle-btn {
    min-width: 58px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #526575;
    font-size: var(--scheme-font-control);
    font-weight: 850;
    line-height: 1;
}

.scheme-view-toggle-btn:hover,
.scheme-view-toggle-btn:focus {
    color: #12384d;
    outline: 0;
}

.scheme-view-toggle-btn.active {
    background: #fff;
    color: #0f5d7d;
    box-shadow: 0 1px 5px rgba(22, 38, 54, .12);
}

.scheme-timeline-batch-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 14px;
    border-bottom: 1px solid #dce7ee;
    background: #f6fafc;
}

.scheme-timeline-batch-count {
    margin-right: auto;
    color: #263947;
    font-size: var(--scheme-font-control);
    font-weight: 850;
}

.scheme-library-fields {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.batch-delete-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.batch-delete-toolbar span {
    color: #4f5f6d;
    font-size: .9rem;
    font-weight: 700;
    margin-right: auto;
}

.batch-delete-schemes-modal {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.batch-delete-schemes-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.batch-delete-schemes-body .scheme-library-fields {
    flex: 0 0 auto;
    margin-top: 0;
}

.batch-delete-scheme-list {
    flex: 1 1 auto;
    min-height: 160px;
    overflow: auto;
    border: 1px solid #d8e1e8;
    border-radius: 6px;
}

.batch-delete-scheme-list thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f7fafc;
}

.batch-delete-result {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #d8e1e8;
    border-radius: 6px;
    background: #f7fafc;
    color: #243241;
    font-size: .85rem;
    white-space: pre-wrap;
}

.searchable-select {
    position: relative;
    min-width: 0;
}

.searchable-select.is-open {
    z-index: auto;
}

.searchable-select-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1;
    border: 0;
    background: transparent;
    cursor: default;
}

.searchable-select-trigger {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    min-height: var(--app-control-height);
    align-items: center;
    justify-content: space-between;
    gap: var(--app-control-padding-x-sm);
    padding: var(--app-field-padding-y) var(--app-field-padding-x);
    border: 1px solid var(--control-line);
    border-radius: 8px;
    background: #fff;
    color: #172033;
    font-size: var(--scheme-font-body);
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
    box-shadow: none;
}

.searchable-select-trigger:hover {
    border-color: #9eb9c8;
}

.searchable-select-trigger:focus,
.searchable-select-trigger.is-open {
    border-color: #0f6b8f;
    box-shadow: 0 0 0 3px rgba(15, 107, 143, .12);
    outline: 0;
}

.searchable-select-trigger:disabled {
    opacity: .65;
    cursor: not-allowed;
}

.searchable-select-trigger.is-invalid {
    border-color: #dc3545;
}

.searchable-select-trigger.is-invalid:focus,
.searchable-select-trigger.is-invalid.is-open {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, .12);
}

.searchable-select-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.searchable-select-placeholder {
    color: #6c7a86;
    font-weight: 600;
}

.searchable-select-caret {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    margin-right: 2px;
    border-right: 2px solid #526371;
    border-bottom: 2px solid #526371;
    transform: translateY(-2px) rotate(45deg);
}

.searchable-select-panel {
    position: fixed;
    z-index: 1100;
    display: grid;
    gap: max(4px, calc(var(--app-density-gap) * .5));
    box-sizing: border-box;
    max-height: min(360px, calc(100vh - 16px));
    overflow: hidden;
    padding: max(4px, calc(var(--app-density-gap) * .75));
    border: 1px solid #c8d6df;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 18px 34px rgba(12, 32, 48, .18);
}

.searchable-select-panel:not(.is-positioned) {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
}

.searchable-select-input {
    min-height: var(--app-control-height);
    padding: var(--app-field-padding-y) var(--app-field-padding-x);
    font-size: var(--scheme-font-control);
}

.searchable-select-options {
    display: grid;
    gap: max(2px, calc(var(--app-density-gap) * .25));
    max-height: var(--searchable-select-options-max-height, 220px);
    overflow: auto;
    overscroll-behavior: contain;
}

.searchable-select-option {
    display: block;
    width: 100%;
    min-height: var(--app-control-height-sm);
    padding: var(--app-table-cell-padding-y) var(--app-field-padding-x);
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #243746;
    font-size: var(--scheme-font-control);
    line-height: 1.3;
    text-align: left;
}

.searchable-select-option:hover,
.searchable-select-option:focus {
    background: #eef6f9;
    color: #0f5672;
    outline: 0;
}

.searchable-select-option.active {
    background: #dceff6;
    color: #0f4f6d;
    box-shadow: inset 3px 0 0 #0f6b8f;
}

.searchable-select-option.selected {
    background: #e7f2f6;
    color: #0f6b8f;
    font-weight: 800;
}

.searchable-select-option.placeholder-option {
    color: #6c7a86;
}

.searchable-select-empty {
    min-height: var(--app-control-height-sm);
    padding: var(--app-table-cell-padding-y) var(--app-field-padding-x);
    color: #6c7a86;
    font-size: var(--scheme-font-meta);
    line-height: 1.25;
}

.editable-searchable-select-control {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
}

.editable-searchable-select-input {
    min-height: var(--app-control-height);
    padding: var(--app-field-padding-y) calc(var(--app-field-padding-x) + 30px) var(--app-field-padding-y) var(--app-field-padding-x);
    border-color: var(--control-line);
    border-radius: 8px;
    color: #172033;
    font-size: var(--scheme-font-body);
    font-weight: 700;
    line-height: 1.35;
}

.editable-searchable-select-input:hover {
    border-color: #9eb9c8;
}

.editable-searchable-select-input:focus,
.editable-searchable-select-control.is-open .editable-searchable-select-input {
    border-color: #0f6b8f;
    box-shadow: 0 0 0 3px rgba(15, 107, 143, .12);
}

.editable-searchable-select-input.is-invalid:focus,
.editable-searchable-select-control.is-open .editable-searchable-select-input.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, .12);
}

.editable-searchable-select-toggle {
    position: absolute;
    top: 1px;
    right: 1px;
    bottom: 1px;
    display: grid;
    width: 34px;
    place-items: center;
    border: 0;
    border-radius: 0 7px 7px 0;
    background: transparent;
}

.editable-searchable-select-toggle:disabled {
    cursor: not-allowed;
    opacity: .6;
}

.editable-searchable-select-panel {
    --searchable-select-options-max-height: 190px;
}

.scheme-library-picker-dialog {
    max-width: 560px;
}

.scheme-library-picker .form-label {
    margin-bottom: 4px;
    color: #374b5b;
    font-size: var(--scheme-font-control);
    font-weight: 800;
}

.scheme-library-picker .form-control,
.scheme-library-picker .form-select {
    font-size: var(--scheme-font-body);
}

.scheme-library-picker-fields {
    margin-top: 0;
}

.scheme-step-list {
    display: grid;
    gap: 8px;
    align-content: start;
    grid-auto-rows: max-content;
    max-height: calc(100vh - 210px);
    overflow: auto;
    padding: 10px;
}

.scheme-workbench-left-stack .scheme-step-list {
    flex: 1 1 auto;
    max-height: none;
    min-height: 0;
}

.scheme-step-card {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    max-height: 168px;
    overflow: hidden;
    padding: 12px;
    border: 1px solid #d8e2ea;
    border-radius: 8px;
    background: #fbfcfd;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.scheme-step-card.batch-mode {
    cursor: pointer;
}

.scheme-step-card:hover {
    border-color: #9fc4d3;
    background: #fff;
}

.scheme-step-card.active {
    border-color: #0f6b8f;
    box-shadow: 0 0 0 2px rgba(15, 107, 143, .12);
    background: #f4fbfe;
}

.scheme-step-card.has-precheck-warning {
    border-color: #d8b75a;
    box-shadow: inset 3px 0 0 #d8b75a;
}

.scheme-step-card.has-precheck-blocking {
    border-color: #d66a6a;
    box-shadow: inset 3px 0 0 #c74444;
}

.scheme-step-card.active.has-precheck-warning {
    box-shadow: inset 3px 0 0 #d8b75a, 0 0 0 2px rgba(216, 183, 90, .16);
}

.scheme-step-card.active.has-precheck-blocking {
    box-shadow: inset 3px 0 0 #c74444, 0 0 0 2px rgba(199, 68, 68, .16);
}

.scheme-step-card.disabled {
    border-color: #d7dde2;
    background: #f4f6f7;
    opacity: .74;
}

.scheme-step-card.disabled .scheme-step-index {
    background: #91a0a8;
}

.scheme-step-card.disabled.active {
    border-color: #7f919b;
    box-shadow: 0 0 0 2px rgba(127, 145, 155, .14);
    background: #eef2f4;
}

.scheme-step-manager-modal {
    background: rgba(12, 24, 34, .52);
}

.scheme-step-manager-dialog {
    width: calc(100vw - 28px);
    max-width: none;
    height: calc(100vh - 28px);
    margin: 14px auto;
}

.scheme-step-manager-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    border: 1px solid #c5d5df;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(12, 24, 34, .24);
}

.scheme-step-manager-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid #dce7ee;
    background: #f8fbfd;
}

.scheme-step-manager-title {
    color: var(--control-ink);
    font-size: 1.18rem;
    font-weight: 850;
    line-height: 1.2;
}

.scheme-step-manager-subtitle {
    margin-top: 4px;
    color: #627482;
    font-size: var(--scheme-font-control);
    font-weight: 700;
}

.scheme-step-manager-filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(5, minmax(130px, 1fr)) auto;
    gap: 10px;
    align-items: end;
    padding: 12px 18px;
    border-bottom: 1px solid #dce7ee;
    background: #f6fafc;
}

.scheme-step-manager-filter-bar .form-label {
    margin-bottom: 4px;
    color: #445766;
    font-size: var(--scheme-font-meta);
    font-weight: 850;
}

.scheme-step-manager-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.scheme-step-manager-toolbar {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 18px;
    border-bottom: 1px solid #dce7ee;
    background: #fff;
}

.scheme-step-manager-toolbar-main,
.scheme-step-manager-toolbar-more,
.scheme-step-manager-move-target {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.scheme-step-manager-toolbar-main {
    flex: 1 1 620px;
}

.scheme-step-manager-toolbar-more {
    flex: 0 1 auto;
}

.scheme-step-manager-move-target {
    justify-content: flex-end;
    flex: 1 1 380px;
}

.scheme-step-manager-move-target .form-label {
    margin: 0;
    color: #445766;
    font-size: var(--scheme-font-control);
    font-weight: 800;
}

.scheme-step-manager-move-target .form-control {
    width: 84px;
}

.scheme-step-manager-confirm {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 18px;
    border-bottom: 1px solid #e7d7a4;
    background: #fff8df;
}

.scheme-step-manager-confirm-title {
    color: #6f5200;
    font-size: var(--scheme-font-control);
    font-weight: 900;
}

.scheme-step-manager-confirm-message {
    margin-top: 2px;
    color: #6f5200;
    font-size: var(--scheme-font-control);
    font-weight: 700;
}

.scheme-step-manager-confirm-actions,
.scheme-step-manager-batch-mode-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.scheme-step-manager-message {
    padding: 8px 18px;
    border-bottom: 1px solid #dce7ee;
    background: #f2f8fb;
    color: #245a74;
    font-size: var(--scheme-font-control);
    font-weight: 750;
}

.scheme-step-manager-batch-panel {
    padding: 12px 18px;
    border-bottom: 1px solid #dce7ee;
    background: #fbfdfe;
}

.scheme-step-manager-batch-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.scheme-step-manager-batch-title {
    color: #1f3442;
    font-size: var(--scheme-font-section);
    font-weight: 850;
}

.scheme-step-manager-batch-subtitle {
    margin-top: 3px;
    color: #657584;
    font-size: var(--scheme-font-meta);
    font-weight: 700;
}

.scheme-step-manager-batch-grid {
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(160px, 1fr) minmax(160px, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.scheme-step-manager-batch-grid .form-label {
    color: #445766;
    font-size: var(--scheme-font-meta);
    font-weight: 850;
}

.scheme-step-manager-batch-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.scheme-step-manager-batch-preview {
    margin-top: 10px;
    border: 1px solid #dce7ee;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.scheme-step-manager-batch-preview-title {
    padding: 8px 10px;
    border-bottom: 1px solid #e4edf2;
    background: #f2f8fb;
    color: #245a74;
    font-size: var(--scheme-font-control);
    font-weight: 850;
}

.scheme-step-manager-batch-preview-list {
    max-height: 180px;
    overflow: auto;
}

.scheme-step-manager-batch-preview-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.scheme-step-manager-batch-preview-table th,
.scheme-step-manager-batch-preview-table td {
    padding: 7px 9px;
    border-bottom: 1px solid #e8eff3;
    color: #253541;
    font-size: var(--scheme-font-meta);
    vertical-align: top;
    overflow-wrap: anywhere;
}

.scheme-step-manager-batch-preview-table th {
    background: #f7fafc;
    color: #526676;
    font-weight: 850;
}

.scheme-step-manager-batch-preview.skipped .scheme-step-manager-batch-preview-title {
    background: #fff8df;
    color: #7a5a00;
}

.scheme-step-manager-batch-preview-table.compact {
    min-width: 520px;
}

.scheme-step-manager-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    background: #f7fafc;
}

.scheme-step-manager-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    background: #f7fafc;
}

.scheme-step-manager-table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.scheme-step-manager-table th,
.scheme-step-manager-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #e4edf2;
    color: #21313d;
    font-size: var(--scheme-font-control);
    vertical-align: top;
}

.scheme-step-manager-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #edf4f7;
    color: #526676;
    font-size: var(--scheme-font-meta);
    font-weight: 850;
    text-transform: none;
}

.scheme-step-manager-table tbody tr {
    background: #fff;
    cursor: pointer;
}

.scheme-step-manager-table tbody tr:hover {
    background: #f7fcfe;
}

.scheme-step-manager-table tbody tr.focused {
    background: #f3fafd;
    box-shadow: inset 3px 0 0 #0f6b8f;
}

.scheme-step-manager-table tbody tr.selected {
    background: #eef8fb;
}

.scheme-step-manager-table tbody tr.disabled {
    color: #71808b;
    background: #f8fafb;
}

.scheme-step-manager-select-col {
    width: 46px;
    text-align: center;
}

.scheme-step-manager-table th:nth-child(2),
.scheme-step-manager-table td:nth-child(2) {
    width: 72px;
}

.scheme-step-manager-table th:nth-child(3),
.scheme-step-manager-table td:nth-child(3) {
    width: 148px;
}

.scheme-step-manager-table th:nth-child(4),
.scheme-step-manager-table td:nth-child(4) {
    width: 170px;
}

.scheme-step-manager-table th:nth-child(6),
.scheme-step-manager-table td:nth-child(6) {
    width: 150px;
}

.scheme-step-manager-table th:nth-child(7),
.scheme-step-manager-table td:nth-child(7) {
    width: 180px;
}

.scheme-step-manager-seq {
    color: #0f6b8f;
    font-size: .95rem;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
}

.scheme-step-manager-type,
.scheme-step-manager-protocol,
.scheme-step-manager-status,
.scheme-step-manager-precheck {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 6px;
    overflow-wrap: anywhere;
    font-weight: 800;
    line-height: 1.25;
}

.scheme-step-manager-type {
    border: 1px solid #bfd8e5;
    background: #f1f8fb;
    color: #245f7b;
}

.scheme-step-manager-protocol {
    background: #f3f6f8;
    color: #50606d;
}

.scheme-step-manager-desc {
    min-width: 0;
    color: #1e2d38;
    font-weight: 820;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.scheme-step-manager-meta {
    margin-top: 4px;
    color: #778694;
    font-size: var(--scheme-font-meta);
    font-weight: 700;
    line-height: 1.3;
}

.scheme-step-manager-status.enabled {
    border: 1px solid #b8d5c5;
    background: #eff8f3;
    color: #17603e;
}

.scheme-step-manager-status.disabled {
    border: 1px solid #d2dbe2;
    background: #f2f5f7;
    color: #71808b;
}

.scheme-step-manager-precheck {
    margin-top: 6px;
}

.scheme-step-manager-precheck.warning {
    border: 1px solid #e2ca7d;
    background: #fff8df;
    color: #7a5a00;
}

.scheme-step-manager-precheck.blocking {
    border: 1px solid #e5b5b5;
    background: #fff1f1;
    color: #963333;
}

.scheme-step-manager-flow {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.scheme-step-manager-empty {
    height: 220px;
    color: #758594;
    font-weight: 800;
    text-align: center;
    vertical-align: middle !important;
}

.scheme-step-manager-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 18px;
    border-top: 1px solid #dce7ee;
    background: #fff;
}

.scheme-step-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #0f6b8f;
    color: #fff;
    font-size: var(--scheme-font-control);
    font-weight: 850;
}

.scheme-step-main {
    min-width: 0;
}

.scheme-step-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.scheme-step-title-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.scheme-step-title-text {
    min-width: 0;
    overflow: hidden;
    color: #1d2b35;
    font-size: var(--scheme-font-control);
    font-weight: 850;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scheme-step-summary-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin-top: 8px;
}

.scheme-step-summary-row strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1d2b35;
    font-size: var(--scheme-font-control);
    font-weight: 800;
    line-height: 1.25;
}

.scheme-step-type {
    flex: 0 0 auto;
    padding: 2px 7px;
    border: 1px solid #bfd6e1;
    border-radius: 4px;
    color: #0f6b8f;
    background: #eef8fb;
    font-size: var(--scheme-font-control);
    font-weight: 850;
}

.scheme-step-disabled-badge {
    flex: 0 0 auto;
    padding: 2px 7px;
    border: 1px solid #cfd8de;
    border-radius: 4px;
    color: #5f6f78;
    background: #e7ecef;
    font-size: var(--scheme-font-meta);
    font-weight: 850;
}

.scheme-step-precheck-badge {
    flex: 0 0 auto;
    max-width: 100%;
    overflow: hidden;
    padding: 2px 7px;
    border: 1px solid #e3cf8a;
    border-radius: 4px;
    color: #715914;
    background: #fff9e6;
    font-size: var(--scheme-font-meta);
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scheme-step-precheck-badge.blocking {
    border-color: #f0b6b6;
    color: #8b2323;
    background: #fff4f4;
}

.scheme-step-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
    color: #667782;
    font-size: var(--scheme-font-meta);
}

.scheme-step-meta-stack {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    margin-top: 7px;
    font-size: var(--scheme-font-control);
}

.scheme-step-meta span {
    max-width: 100%;
    overflow: hidden;
    min-height: 20px;
    padding: 1px 6px;
    border-radius: 4px;
    background: #eef3f6;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scheme-step-protocol {
    flex: 0 0 auto;
    max-width: 44%;
    overflow: hidden;
    min-height: 20px;
    padding: 1px 6px;
    border-radius: 4px;
    color: #667782;
    background: #eef3f6;
    font-size: var(--scheme-font-meta);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scheme-step-meta-stack .scheme-step-protocol {
    max-width: 100%;
}

.scheme-step-protocol-line {
    display: flex;
    align-items: center;
    max-width: 100%;
    min-width: 0;
    gap: 6px;
}

.scheme-step-description {
    min-width: 0;
    overflow: hidden;
    color: #1d2b35;
    font-size: var(--scheme-font-control);
    font-weight: 850;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scheme-flow-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}

.scheme-flow-badge {
    max-width: 100%;
    overflow: hidden;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: var(--scheme-font-meta);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scheme-flow-badge.loop {
    color: #70510d;
    background: #fff2c2;
}

.scheme-flow-badge.jump {
    color: #9b2c2c;
    background: #ffe4e4;
}

.scheme-flow-badge.break {
    color: #315f41;
    background: #dff3e6;
}

.scheme-step-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    flex: 0 0 auto;
    margin-left: auto;
}

.scheme-step-actions .btn {
    min-width: 24px !important;
    width: 24px !important;
    min-height: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    line-height: 1;
}

.scheme-step-action-btn {
    color: #2f4454;
}

.scheme-action-icon {
    position: relative;
    display: inline-block;
    width: 10px;
    height: 10px;
    color: currentColor;
}

.scheme-action-icon-copy {
    width: 12px;
    height: 12px;
}

.scheme-action-icon-delete {
    width: 12px;
    height: 12px;
}

.scheme-action-icon-up::before,
.scheme-action-icon-down::before {
    content: "";
    position: absolute;
    left: 3px;
    width: 7px;
    height: 7px;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
}

.scheme-action-icon-up::before {
    top: 4px;
    transform: rotate(225deg);
}

.scheme-action-icon-down::before {
    top: 0;
    transform: rotate(45deg);
}

.scheme-action-icon-copy::before,
.scheme-action-icon-copy::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 8px;
    border: 1.4px solid currentColor;
    border-radius: 2px;
    background: #fff;
    box-sizing: border-box;
}

.scheme-action-icon-copy::before {
    right: 1px;
    bottom: 1px;
    z-index: 1;
}

.scheme-action-icon-copy::after {
    left: 1px;
    top: 1px;
    opacity: 0.72;
}

.scheme-action-icon-delete::before,
.scheme-action-icon-delete::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 11px;
    height: 1.8px;
    border-radius: 2px;
    background: currentColor;
    transform-origin: center;
}

.scheme-action-icon-delete::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.scheme-action-icon-delete::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.scheme-detail-panel {
    position: sticky;
    top: 12px;
    max-height: calc(100vh - 110px);
    overflow: auto;
}

.scheme-detail-editor .scheme-config-shell {
    position: static;
    top: auto;
}

.scheme-step-enabled-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 10px 10px 0;
    padding: 10px 12px;
    border: 1px solid #d8e2ea;
    border-radius: 7px;
    background: #f8fbfc;
}

.scheme-step-enabled-title {
    color: #1d2b35;
    font-size: var(--scheme-font-control);
    font-weight: 850;
    line-height: 1.25;
}

.scheme-step-enabled-subtitle {
    margin-top: 2px;
    color: #6b7b85;
    font-size: var(--scheme-font-meta);
    line-height: 1.3;
}

.scheme-step-detail-tabs {
    margin: 10px 10px 0;
}

.scheme-step-detail-tab-panel {
    min-width: 0;
}

.scheme-precheck-ok {
    color: #16704a !important;
}

.scheme-precheck-warning {
    color: #715914 !important;
}

.scheme-precheck-blocking {
    color: #8b2323 !important;
}

.scheme-detail-footer {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #d8e2ea;
    background: #f8fafb;
    z-index: 4;
}

.scheme-flow-rules {
    margin: 12px;
    padding: 12px;
    border: 1px solid #c7d3dd;
    border-radius: 6px;
    background: #fff;
}

.scheme-flow-active-strip {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid #d8e4ec;
    border-radius: 6px;
    background: #f8fbfd;
}

.scheme-current-flow-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.scheme-flow-empty-state {
    padding: 8px 10px;
    background: #fff;
}

.scheme-flow-rule-items {
    display: grid;
    gap: 8px;
}

.scheme-flow-rule-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    padding: 8px;
    border: 1px solid #e1e9ef;
    border-radius: 6px;
    background: #fff;
}

.scheme-flow-rule-item .scheme-flow-badge,
.scheme-flow-rule-item .scheme-current-flow-badges {
    min-width: 0;
}

.scheme-flow-remove-btn {
    flex: 0 0 auto;
}

.scheme-detail-panel .btn,
.scheme-flow-rules .btn,
.scheme-detail-footer .btn {
    font-size: var(--scheme-font-control);
}

.scheme-detail-panel .btn,
.scheme-flow-rules .btn {
    width: auto;
    max-width: 100%;
    flex: 0 0 auto;
    justify-self: start;
    white-space: nowrap;
}

.scheme-flow-quick-grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.35fr);
    gap: 12px;
    margin-top: 8px;
}

.scheme-flow-shortcuts-head {
    margin-top: 12px;
}

.scheme-flow-shortcut-card {
    display: grid;
    align-content: start;
    gap: 10px;
    min-width: 0;
    padding: 10px;
    border: 1px solid #d6e1e9;
    border-radius: 6px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
}

.scheme-flow-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.scheme-flow-card-title {
    color: #1f2f3d;
    font-size: var(--scheme-font-control);
    font-weight: 850;
}

.scheme-flow-group-preview {
    flex: 0 0 auto;
    max-width: 50%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 3px 8px;
    border: 1px solid #b9d6c7;
    border-radius: 999px;
    color: #14633d;
    background: #eef8f2;
    font-size: var(--scheme-font-control);
    font-weight: 800;
}

.scheme-flow-graph-panel {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.scheme-flow-graph-toolbar {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(150px, .5fr) minmax(230px, auto) auto;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #dce7ee;
    background: #f7fafc;
}

.scheme-flow-graph-panel.compact .scheme-flow-graph-toolbar {
    grid-template-columns: minmax(160px, 1fr) minmax(140px, .55fr) auto;
}

.scheme-flow-graph-toolbar .form-label {
    margin-bottom: 4px;
    color: #4f6070;
    font-size: var(--scheme-font-control);
    font-weight: 800;
}

.scheme-flow-graph-search,
.scheme-flow-graph-filter {
    min-width: 0;
}

.scheme-flow-graph-zoom {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
}

.scheme-flow-graph-zoom .btn {
    min-width: 34px;
}

.scheme-flow-graph-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.scheme-flow-graph-zoom-value {
    box-sizing: border-box;
    display: inline-flex;
    min-width: 48px;
    height: var(--app-control-height-sm);
    align-items: center;
    justify-content: center;
    border: 1px solid #cfdae3;
    border-radius: 6px;
    background: #fff;
    color: #223241;
    font-size: var(--scheme-font-control);
    font-weight: 850;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.scheme-flow-graph-filter-state {
    flex: 0 0 auto;
    padding: 8px 14px;
    border-bottom: 1px solid #dbe7ee;
    background: #fff8e8;
    color: #72500b;
    font-size: var(--scheme-font-control);
    font-weight: 800;
}

.scheme-flow-graph-legend {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid #e2eaf0;
    background: #fff;
}

.scheme-flow-graph-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    color: #465766;
    font-size: var(--scheme-font-control);
    font-weight: 750;
}

.legend-line,
.legend-dot {
    display: inline-block;
    flex: 0 0 auto;
}

.legend-line {
    width: 24px;
    border-top: 3px solid #6b7a86;
}

.legend-line.success {
    border-color: #16704a;
}

.legend-line.failure,
.legend-dot.issue {
    border-color: #b42318;
}

.legend-line.conditional {
    border-color: #1f5e8c;
}

.legend-line.loop {
    border-color: #8a5a00;
}

.legend-dot.issue {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: #b42318;
}

.scheme-flow-graph-canvas-shell {
    flex: 1 1 auto;
    min-height: 280px;
    overflow: auto;
    background:
        linear-gradient(#eef4f8 1px, transparent 1px),
        linear-gradient(90deg, #eef4f8 1px, transparent 1px),
        #fbfdff;
    background-size: 28px 28px;
}

.scheme-flow-graph-canvas-scale {
    position: relative;
    margin: 0 auto;
}

.scheme-flow-graph-canvas {
    position: relative;
    transform-origin: top left;
}

.scheme-flow-graph-svg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: visible;
}

.scheme-flow-graph-edge {
    fill: none;
    stroke: #6b7a86;
    stroke-width: 2.5;
    cursor: pointer;
    pointer-events: stroke;
}

.scheme-flow-graph-edge.sequential {
    stroke: #96a6b1;
    stroke-width: 2;
}

.scheme-flow-graph-edge.success {
    stroke: #16704a;
}

.scheme-flow-graph-edge.failure {
    stroke: #b42318;
}

.scheme-flow-graph-edge.conditional {
    stroke: #1f5e8c;
    stroke-dasharray: 8 5;
}

.scheme-flow-graph-edge.loop {
    stroke: #8a5a00;
    stroke-dasharray: 10 4;
}

.scheme-flow-graph-edge.issue {
    stroke: #b42318;
    stroke-dasharray: 4 4;
}

.scheme-flow-graph-edge:hover {
    stroke-width: 4;
}

.scheme-flow-graph-edge.active {
    stroke-width: 4.5;
    filter: drop-shadow(0 0 4px rgba(15, 107, 143, .25));
}

.scheme-flow-graph-edge-label {
    fill: #263947;
    paint-order: stroke;
    stroke: #fbfdff;
    stroke-width: 5px;
    stroke-linejoin: round;
    font-size: 11px;
    font-weight: 850;
    pointer-events: none;
}

.scheme-flow-graph-edge-label.success {
    fill: #16704a;
}

.scheme-flow-graph-edge-label.failure,
.scheme-flow-graph-edge-label.issue {
    fill: #b42318;
}

.scheme-flow-graph-edge-label.conditional {
    fill: #1f5e8c;
}

.scheme-flow-graph-edge-label.loop {
    fill: #8a5a00;
}

.scheme-flow-node {
    position: absolute;
    z-index: 1;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
    border: 1px solid #ccd8e1;
    border-radius: 7px;
    background: #fff;
    color: #1f2f3d;
    text-align: left;
    box-shadow: 0 8px 20px rgba(20, 35, 50, .07);
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.scheme-flow-node:hover,
.scheme-flow-node:focus {
    border-color: #0f6b8f;
    box-shadow: 0 14px 30px rgba(15, 107, 143, .16);
    outline: 0;
}

.scheme-flow-node.active {
    border-color: #0f6b8f;
    box-shadow: 0 0 0 3px rgba(15, 107, 143, .16), 0 14px 30px rgba(15, 107, 143, .15);
}

.scheme-flow-node.disabled {
    background: #f2f5f7;
    color: #657583;
}

.scheme-flow-node.has-warning {
    border-color: #e2bc49;
}

.scheme-flow-node.has-blocking {
    border-color: #d46a64;
}

.scheme-flow-node-index {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: #e9f3f7;
    color: #0f5d7d;
    font-size: var(--scheme-font-control);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.scheme-flow-node.disabled .scheme-flow-node-index {
    background: #e1e6ea;
    color: #687887;
}

.scheme-flow-node-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.scheme-flow-node-title-row,
.scheme-flow-node-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.scheme-flow-node-title-row {
    flex-wrap: wrap;
}

.scheme-flow-node .scheme-step-disabled-badge,
.scheme-flow-node .scheme-step-precheck-badge {
    padding: 1px 5px;
    border-radius: 3px;
    line-height: 1.15;
}

.scheme-flow-node-title-row strong {
    min-width: 0;
    overflow: hidden;
    color: #152434;
    font-size: var(--scheme-font-control);
    font-weight: 900;
    line-height: 1.18;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scheme-flow-node-protocol {
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    padding: 1px 6px;
    border: 1px solid #d4e0e8;
    border-radius: 999px;
    background: #f6fafc;
    color: #405463;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scheme-flow-node-description {
    min-width: 0;
    overflow: hidden;
    color: #243444;
    font-size: var(--scheme-font-control);
    font-weight: 800;
    line-height: 1.18;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scheme-flow-node-meta {
    flex-wrap: wrap;
    color: #687887;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.18;
}

.scheme-flow-node-meta span {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scheme-flow-graph-edge-summary {
    flex: 0 0 auto;
    border-top: 1px solid #dce7ee;
    background: #fff;
}

.scheme-flow-graph-summary-title {
    padding: 10px 14px 0;
    color: #1f2f3d;
    font-size: var(--scheme-font-control);
    font-weight: 900;
}

.scheme-flow-graph-edge-list {
    display: grid;
    gap: 8px;
    max-height: 160px;
    overflow: auto;
    padding: 10px 14px 14px;
}

.scheme-flow-edge-summary-row {
    display: grid;
    grid-template-columns: minmax(120px, .8fr) minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #d8e3eb;
    border-left-width: 4px;
    border-radius: 7px;
    background: #fff;
    color: #223241;
    text-align: left;
}

.scheme-flow-edge-summary-row:hover,
.scheme-flow-edge-summary-row:focus {
    border-color: #0f6b8f;
    outline: 0;
}

.scheme-flow-edge-summary-row.active {
    border-color: #0f6b8f;
    box-shadow: 0 0 0 3px rgba(15, 107, 143, .12);
}

.scheme-flow-edge-summary-row.success {
    border-left-color: #16704a;
}

.scheme-flow-edge-summary-row.failure,
.scheme-flow-edge-summary-row.issue {
    border-left-color: #b42318;
}

.scheme-flow-edge-summary-row.conditional {
    border-left-color: #1f5e8c;
}

.scheme-flow-edge-summary-row.loop {
    border-left-color: #8a5a00;
}

.scheme-flow-edge-kind {
    font-size: var(--scheme-font-control);
    font-weight: 900;
}

.scheme-flow-edge-route {
    color: #526675;
    font-size: var(--scheme-font-control);
    font-weight: 750;
}

.scheme-flow-edge-issue {
    padding: 2px 7px;
    border-radius: 999px;
    background: #fff1f0;
    color: #a11b13;
    font-size: 11px;
    font-weight: 900;
}

.scheme-flow-workbench {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 190px);
    border: 1px solid var(--control-line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--control-panel-shadow);
}

.scheme-flow-workbench-head {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    border-bottom: 1px solid #dbe7ee;
    background: #f8fbfd;
}

.scheme-flow-workbench-head-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.scheme-flow-workbench-body {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    min-height: 0;
}

.scheme-flow-workbench-canvas {
    display: flex;
    min-width: 0;
    min-height: 0;
    border-right: 1px solid #dbe7ee;
}

.scheme-flow-graph-panel.workspace {
    width: 100%;
    min-height: 0;
}

.scheme-flow-graph-panel.workspace .scheme-flow-graph-canvas-shell {
    min-height: 520px;
}

.scheme-flow-workbench-drawer {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    background: #fff;
}

.scheme-flow-drawer-head {
    flex: 0 0 auto;
    padding: 14px;
    border-bottom: 1px solid #dbe7ee;
    background: #fbfdff;
}

.scheme-flow-drawer-section {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid #e3edf3;
}

.scheme-flow-drawer-empty {
    min-height: 180px;
    border-bottom: 1px solid #e3edf3;
}

.scheme-flow-inspector-node {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid #d8e3eb;
    border-radius: 8px;
    background: #f8fbfd;
}

.scheme-flow-inspector-node div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.scheme-flow-inspector-node strong,
.scheme-flow-inspector-node span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scheme-flow-inspector-grid {
    display: grid;
    grid-template-columns: minmax(82px, .45fr) minmax(0, 1fr);
    gap: 8px 10px;
    align-items: start;
}

.scheme-flow-inspector-grid span {
    color: #617382;
    font-size: var(--scheme-font-control);
    font-weight: 750;
}

.scheme-flow-inspector-grid strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #203342;
    font-size: var(--scheme-font-control);
    font-weight: 850;
}

.scheme-flow-inspector-issues {
    display: grid;
    gap: 8px;
}

.scheme-flow-edge-inspector {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid #d8e3eb;
    border-left-width: 4px;
    border-radius: 8px;
    background: #fbfdff;
}

.scheme-flow-edge-inspector span {
    font-size: var(--scheme-font-control);
    font-weight: 900;
}

.scheme-flow-edge-inspector strong {
    color: #526675;
    font-size: var(--scheme-font-control);
    font-weight: 800;
}

.scheme-flow-edge-inspector.success {
    border-left-color: #16704a;
}

.scheme-flow-edge-inspector.failure,
.scheme-flow-edge-inspector.issue {
    border-left-color: #b42318;
}

.scheme-flow-edge-inspector.conditional {
    border-left-color: #1f5e8c;
}

.scheme-flow-edge-inspector.loop {
    border-left-color: #8a5a00;
}

.scheme-flow-graph-edge-list.drawer {
    max-height: 280px;
    padding: 0;
}

.scheme-flow-card-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: end;
    gap: 8px;
    min-width: 0;
}

.scheme-flow-loop-card-body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(72px, .45fr) minmax(116px, .58fr);
}

.scheme-flow-field,
.scheme-flow-action-cell {
    min-width: 0;
}

.scheme-flow-action-cell {
    display: flex;
    align-items: end;
    justify-content: flex-start;
}

.scheme-flow-action-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
    min-width: 0;
}

.scheme-flow-action-cell .btn,
.scheme-flow-action-pair .btn {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    justify-self: stretch;
    flex: 1 1 auto;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
    line-height: 1.2;
}

.scheme-flow-loop-card-body .scheme-flow-action-cell .btn {
    min-height: calc(1.5em + .75rem + 2px);
    height: calc(1.5em + .75rem + 2px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-top: 0;
    padding-bottom: 0;
}

.scheme-flow-rules-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e8ee;
}

.scheme-flow-shortcut-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.scheme-flow-advanced {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #c7d3dd;
}

.scheme-flow-advanced .compare-flow-panel {
    margin: 0;
    border-color: #d8e2ea;
    box-shadow: none;
}

.scheme-flow-advanced .compare-flow-panel-embedded {
    padding: 0;
    border: 0;
    background: transparent;
}

.scheme-flow-advanced .compare-flow-panel-embedded .scheme-parameter-groups {
    gap: 10px;
}

.scheme-empty-workspace {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 180px;
    padding: 24px;
    color: #687782;
    text-align: center;
}

.scheme-empty-title {
    color: #334653;
    font-size: var(--scheme-font-section);
    font-weight: 850;
}

.scheme-precheck-panel {
    margin: 12px;
    padding: 12px;
    border: 1px solid #d8e2ea;
    border-radius: 6px;
    background: #fbfcfd;
}

.scheme-precheck-issue {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    margin-top: 6px;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: var(--scheme-font-control);
    text-align: left;
    background: #fff;
}

.scheme-precheck-issue.blocking {
    border-color: #f0b6b6;
    color: #8b2323;
    background: #fff4f4;
}

.scheme-precheck-issue.warning {
    border-color: #e3cf8a;
    color: #715914;
    background: #fff9e6;
}

.scheme-precheck-quick-fix {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 6px 0 8px;
    padding: 8px;
    border: 1px dashed #b8c9d6;
    border-radius: 5px;
    color: #365064;
    background: #f6f9fb;
    font-size: var(--scheme-font-control);
}

.scheme-precheck-quick-fix span {
    min-width: 0;
}

@media (min-width: 769px) {
    .home-page {
        display: flex;
        flex-direction: column;
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    .home-page .scheme-workbench-header {
        flex: 0 0 auto;
    }

    .home-page .scheme-workbench-grid {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        align-items: stretch;
    }

    .home-page .scheme-flow-workbench {
        flex: 1 1 auto;
        min-height: 0;
        height: 100%;
    }

    .home-page .scheme-workbench-left-stack {
        position: static;
        top: auto;
        height: 100%;
        max-height: none;
    }

    .home-page .scheme-detail-panel {
        position: static;
        top: auto;
        height: 100%;
        max-height: none;
        min-height: 0;
    }
}

@media (max-width: 768px) {
    .scheme-workbench-header,
    .scheme-workbench-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .scheme-panel-head {
        align-items: stretch;
        flex-direction: column;
    }

    .scheme-timeline-head-actions {
        justify-content: flex-start;
    }

    .scheme-timeline-title-row {
        align-items: stretch;
        flex-direction: column;
    }

    .scheme-timeline-batch-count {
        flex: 1 0 100%;
    }

    .scheme-step-manager-dialog {
        width: 100vw;
        height: 100vh;
        margin: 0;
    }

    .scheme-step-manager-content {
        border-radius: 0;
    }

    .scheme-step-manager-head,
    .scheme-step-manager-filter-bar,
    .scheme-step-manager-toolbar,
    .scheme-step-manager-footer {
        padding-right: 12px;
        padding-left: 12px;
    }

    .scheme-step-manager-filter-bar {
        grid-template-columns: 1fr;
    }

    .scheme-step-manager-filter-actions,
    .scheme-step-manager-confirm,
    .scheme-step-manager-toolbar,
    .scheme-step-manager-toolbar-main,
    .scheme-step-manager-toolbar-more,
    .scheme-step-manager-move-target {
        align-items: stretch;
        flex-direction: column;
    }

    .scheme-step-manager-move-target {
        margin-left: 0;
    }

    .scheme-step-manager-move-target .form-control,
    .scheme-step-manager-toolbar .btn,
    .scheme-step-manager-filter-actions .btn,
    .scheme-step-manager-confirm .btn,
    .scheme-step-manager-footer .btn {
        width: 100%;
    }

    .scheme-workbench-grid {
        grid-template-columns: 1fr;
    }

    .scheme-workbench-left-stack {
        position: static;
        height: auto;
        max-height: none;
    }

    .scheme-library-panel,
    .scheme-detail-panel {
        position: static;
        max-height: none;
    }

    .scheme-step-card {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .scheme-step-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .scheme-flow-rules-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .scheme-flow-shortcut-grid {
        grid-template-columns: 1fr;
    }

    .scheme-flow-quick-grid,
    .scheme-flow-card-body,
    .scheme-flow-loop-card-body,
    .scheme-flow-action-pair {
        grid-template-columns: 1fr;
    }

    .scheme-flow-rule-item,
    .scheme-flow-card-head {
        align-items: stretch;
        flex-direction: column;
    }

    .scheme-flow-group-preview {
        max-width: 100%;
        align-self: flex-start;
    }

    .scheme-flow-action-cell .btn,
    .scheme-flow-action-pair .btn,
    .scheme-flow-remove-btn {
        width: 100%;
    }

    .scheme-flow-jump-row,
    .scheme-flow-loop-row {
        grid-template-columns: 1fr;
    }

    .scheme-detail-footer .btn {
        flex: 0 0 auto;
    }

    .scheme-flow-workbench {
        min-height: auto;
    }

    .scheme-flow-workbench-head {
        align-items: stretch;
        flex-direction: column;
    }

    .scheme-flow-workbench-head-actions,
    .scheme-flow-workbench-head-actions .scheme-view-toggle {
        justify-content: flex-start;
        width: 100%;
    }

    .scheme-flow-workbench-body {
        grid-template-columns: 1fr;
    }

    .scheme-flow-workbench-canvas {
        min-height: 520px;
        border-right: 0;
        border-bottom: 1px solid #dbe7ee;
    }

    .scheme-flow-workbench-drawer {
        max-height: none;
    }

    .scheme-flow-graph-toolbar,
    .scheme-flow-graph-panel.compact .scheme-flow-graph-toolbar {
        grid-template-columns: 1fr;
    }

    .scheme-flow-graph-zoom,
    .scheme-flow-graph-toolbar-actions {
        justify-content: flex-start;
    }

    .scheme-flow-graph-toolbar-actions .btn {
        flex: 1 1 auto;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .scheme-workbench-grid {
        grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    }

    .scheme-flow-workbench-body {
        grid-template-columns: 1fr;
    }

    .scheme-flow-workbench-canvas {
        min-height: 560px;
        border-right: 0;
        border-bottom: 1px solid #dbe7ee;
    }

    .scheme-flow-workbench-drawer {
        max-height: 360px;
    }

    .scheme-flow-graph-toolbar {
        grid-template-columns: minmax(220px, 1fr) minmax(150px, .6fr);
    }

    .scheme-flow-graph-zoom,
    .scheme-flow-graph-toolbar-actions {
        justify-content: flex-start;
    }

    .scheme-detail-panel {
        max-height: calc(100vh - 110px);
    }

    .scheme-quick-grid,
    .scheme-editor-grid,
    .scheme-detail-editor .scheme-config-panel .row.g-2,
    .scheme-detail-editor .scheme-config-panel .row.g-3,
    .scheme-detail-editor .scheme-flow-rules > .row.g-2,
    .scheme-detail-editor .scheme-flow-rules > .row.g-3 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .upload-location-grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .scheme-detail-editor .scheme-config-panel .row.g-3.scheme-communication-picker-row {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .scheme-detail-editor .scheme-config-panel .row.g-3.scheme-dlms-object-row,
    .scheme-detail-editor .scheme-config-panel .row.g-3.scheme-dlms-method-params-row {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .scheme-detail-editor .scheme-config-panel .scheme-dlms-key-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .scheme-quick-field,
    .scheme-detail-editor .row.g-2 > .col-md-2,
    .scheme-detail-editor .row.g-3 > .col-md-2,
    .scheme-detail-editor .row.g-2 > .col-md-3,
    .scheme-detail-editor .row.g-3 > .col-md-3,
    .scheme-detail-editor .row.g-2 > .col-md-4,
    .scheme-detail-editor .row.g-3 > .col-md-4,
    .scheme-detail-editor .row.g-2 > .col-md-auto,
    .scheme-detail-editor .row.g-3 > .col-md-auto {
        grid-column: span 2;
    }

    .scheme-quick-field.span-3,
    .scheme-detail-editor .row.g-2 > .col-md-5,
    .scheme-detail-editor .row.g-3 > .col-md-5,
    .scheme-detail-editor .row.g-2 > .col-md-6,
    .scheme-detail-editor .row.g-3 > .col-md-6,
    .scheme-detail-editor .row.g-2 > .col-md-8,
    .scheme-detail-editor .row.g-3 > .col-md-8,
    .scheme-detail-editor .row.g-2 > .col-md-9,
    .scheme-detail-editor .row.g-3 > .col-md-9 {
        grid-column: 1 / -1;
    }

    .scheme-dlt-params-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .scheme-dlt-field {
        grid-column: span 2;
    }

    .scheme-dlt-field-wide {
        grid-column: span 3;
    }
}

.read-only-scheme-viewer .modal-footer {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    border-top: 1px solid #d8e0e7;
    background: #fff;
}

.read-only-scheme-viewer .read-only-scheme-viewer-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.read-only-scheme-viewer .read-only-scheme-editor.scheme-workbench-grid {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    align-items: stretch;
}

.read-only-scheme-viewer .read-only-scheme-left-stack {
    position: static;
    top: auto;
    height: 100%;
    max-height: none;
    min-height: 0;
    overflow: hidden;
}

.read-only-scheme-viewer .read-only-scheme-detail-panel {
    position: static;
    top: auto;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: none;
    min-height: 0;
    overflow: hidden;
}

.read-only-scheme-viewer .read-only-scheme-detail-editor {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding-bottom: 18px;
    overscroll-behavior: contain;
}

.read-only-scheme-viewer .read-only-scheme-config-panel {
    min-height: 0;
    padding-bottom: 12px;
}

@media (max-width: 900px) {
    .read-only-scheme-viewer .read-only-scheme-editor.scheme-workbench-grid {
        height: auto;
        overflow: auto;
    }

    .read-only-scheme-viewer .read-only-scheme-left-stack,
    .read-only-scheme-viewer .read-only-scheme-detail-panel {
        height: auto;
    }
}

.data-item-library-tabs {
    align-items: stretch;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0;
    border: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.data-item-library-tabs .scheme-workspace-tab {
    min-height: 46px;
    padding: 0.65rem 0.9rem;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #475569;
    font-size: var(--scheme-font-body);
    font-weight: 700;
}

.data-item-library-tabs .scheme-workspace-tab:hover,
.data-item-library-tabs .scheme-workspace-tab:focus {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    color: #0f172a;
}

.data-item-library-tabs .scheme-workspace-tab:focus-visible {
    outline: 2px solid rgba(37, 99, 235, .34);
    outline-offset: -2px;
}

.data-item-library-tabs .scheme-workspace-tab.active {
    border-color: #2563eb;
    background: transparent;
    box-shadow: none;
    color: #0f172a;
}

@media (max-width: 720px) {
    .data-item-library-tabs {
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
    }

    .data-item-library-tabs .scheme-workspace-tab {
        width: auto !important;
        flex: 0 0 auto;
    }
}

.serial-tools-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
}

.serial-tools-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    margin-left: auto;
    max-width: 100%;
}

.serial-tools-header-actions .btn {
    overflow: hidden;
    text-overflow: ellipsis;
}

.serial-tools-tab {
    appearance: none;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #475569;
    font-weight: 600;
    padding: 0.65rem 0.9rem;
}

.serial-tools-tab:hover,
.serial-tools-tab:focus {
    color: #0f172a;
}

.serial-tools-tab.active {
    color: #0f172a;
    border-bottom-color: #2563eb;
}

@media (max-width: 768px) {
    .serial-tools-header-actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }
}
