        body {
            margin: 0;
            font-family: Arial, sans-serif;
            background: linear-gradient(180deg, #f6f8fb 0%, #eef2f7 100%);
            color: #1f2937;
        }

        .top-menu {
            width: 100%;
            box-sizing: border-box;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 16px;
            padding: 12px 16px;
            background: linear-gradient(135deg, #e3e9f1 0%, #c6d1df 100%);
            color: #2c3e50;
            border-bottom: 1px solid #b5c3d4;
            box-shadow: inset 0 3px 0 #3498db, 0 4px 14px rgba(44, 62, 80, 0.1);
            position: sticky;
            top: 0;
            z-index: 20;
        }

        .top-menu-title {
            font-size: 18px;
            font-weight: 700;
            letter-spacing: 0.03em;
            text-transform: uppercase;
            color: #3498db;
        }

        .top-menu-section {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .top-menu-server-status {
            display: grid;
            grid-template-columns: repeat(5, max-content);
            align-items: center;
            gap: 8px;
            margin-left: auto;
            justify-content: flex-end;
        }

        @media (max-width: 1100px) {
            .top-menu {
                flex-wrap: wrap;
            }

            .top-menu-server-status {
                grid-template-columns: repeat(3, max-content);
                flex-basis: 100%;
                margin-left: 0;
                justify-content: flex-start;
            }
        }

        @media (max-width: 760px) {
            .top-menu-server-status {
                grid-template-columns: repeat(2, max-content);
            }
        }

        .top-menu-stopwatch {
            background: #fff;
            border: 1px solid #d5e0eb;
            border-radius: 999px;
            padding: 6px 12px;
            font-weight: 700;
            letter-spacing: 0.06em;
            white-space: nowrap;
        }

        .top-menu-stopwatch-label {
            opacity: 0.75;
            margin-right: 6px;
            font-size: 11px;
            text-transform: uppercase;
        }

        .top-menu-stopwatch-value {
            font-variant-numeric: tabular-nums;
        }

        .server-status-chip {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            border-radius: 0;
            border: 1px solid transparent;
            padding: 4px 10px;
            font-size: 12px;
            font-weight: 700;
            line-height: 1;
            white-space: nowrap;
            cursor: pointer;
            background: transparent;
            font: inherit;
            font-weight: 400;
            transition: transform 0.12s ease, opacity 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
        }

        .server-status-chip:hover {
            transform: translateY(-1px);
            opacity: 0.96;
        }

        .server-status-chip::before {
            content: '';
            width: 8px;
            height: 8px;
            border-radius: 50%;
            flex: 0 0 auto;
        }

        .server-status-chip.is-online {
            background: #166534;
            border-color: #14532d;
            color: #ffffff;
        }

        .server-status-chip.is-online .server-status-state {
            opacity: 1;
        }

        .server-status-chip.is-online::before {
            background: #22c55e;
            box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
        }

        .server-status-chip.is-offline {
            background: rgba(239, 68, 68, 0.2);
            border-color: rgba(239, 68, 68, 0.4);
            color: #991b1b;
        }

        .server-status-chip.is-offline::before {
            background: #ef4444;
            box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
        }

        .server-status-chip.is-loading {
            background: rgba(148, 163, 184, 0.16);
            border-color: rgba(148, 163, 184, 0.3);
            color: #475569;
        }

        .server-status-chip.is-loading::before {
            background: #94a3b8;
            box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.2);
        }

        .server-status-chip.is-paused {
            background: #92400e;
            border-color: #78350f;
            color: #ffffff;
        }

        .server-status-chip.is-paused .server-status-state {
            opacity: 1;
        }

        .server-status-chip.is-paused::before {
            background: #f59e0b;
            box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22);
        }

        .server-status-state {
            font-size: 10px;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            opacity: 0.85;
        }

        .top-menu-label {
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            opacity: 0.75;
        }

        .layout-switcher {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .top-menu-dropdown {
            position: relative;
        }

        .top-menu-dropdown > summary {
            list-style: none;
            user-select: none;
        }

        .top-menu-dropdown > summary::-webkit-details-marker {
            display: none;
        }

        .top-menu-dropdown-panel {
            position: absolute;
            top: calc(100% + 8px);
            left: 0;
            min-width: 270px;
            padding: 10px;
            border-radius: 10px;
            border: 1px solid #dce3ed;
            background: #fff;
            box-shadow: 0 14px 30px rgba(44, 62, 80, 0.16);
            display: none;
            flex-direction: column;
            gap: 8px;
            z-index: 40;
        }

        .top-menu-dropdown[open] .top-menu-dropdown-panel {
            display: flex;
        }

        .top-menu-dropdown-panel .layout-button {
            width: 100%;
            text-align: left;
        }

        .top-menu-dropdown-panel .top-menu-toggle-button {
            justify-content: flex-start;
        }

        .top-menu-submenu > summary {
            list-style: none;
            user-select: none;
        }

        .top-menu-submenu > summary::-webkit-details-marker {
            display: none;
        }

        .top-menu-submenu > summary::after {
            content: ' +';
        }

        .top-menu-submenu[open] > summary::after {
            content: ' -';
        }

        .top-menu-submenu-panel {
            display: flex;
            flex-direction: column;
            gap: 8px;
            padding: 10px 0 0 12px;
        }

        .top-menu-submenu-panel .layout-button {
            white-space: normal;
            overflow-wrap: anywhere;
        }

        @media (max-width: 760px) {
            .top-menu-dropdown-panel {
                left: auto;
                right: 0;
                min-width: min(320px, calc(100vw - 24px));
            }
        }

        .layout-button {
            border: 1px solid rgba(255, 255, 255, 0.2);
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
            padding: 8px 12px;
            border-radius: 999px;
            cursor: pointer;
            transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
        }

        .layout-button:hover {
            background: rgba(255, 255, 255, 0.16);
            transform: translateY(-1px);
        }

        .layout-button.is-active {
            background: #fff;
            color: #10233e;
            border-color: #fff;
            font-weight: 700;
        }

        .top-menu .layout-button {
            background: transparent;
            border-color: transparent;
            color: #2c3e50;
            border-radius: 8px;
            font-weight: 700;
        }

        .top-menu .layout-button:hover {
            background: #e8f3fb;
            border-color: #c4dff2;
            color: #176b9f;
            transform: none;
        }

        .top-menu .layout-button:has(> .top-menu-icon) {
            position: relative;
            padding-left: 24px;
            padding-right: 0;
        }

        .top-menu-icon {
            position: absolute;
            left: 5px;
            top: 50%;
            transform: translateY(-50%);
            width: 14px;
            font-size: 14px;
            line-height: 1;
            text-align: center;
            pointer-events: none;
        }

        .top-menu .layout-button:focus-visible,
        .top-menu .server-status-chip:focus-visible {
            outline: 2px solid #176b9f;
            outline-offset: 2px;
        }

        .top-menu .layout-button.is-active,
        .top-menu .top-menu-dropdown[open] > summary {
            background: #e8f3fb;
            border-color: #b8d9ef;
            color: #176b9f;
        }

        .top-menu .top-menu-toggle-button.is-hidden-state {
            background: rgba(251, 191, 36, 0.18);
            border-color: rgba(251, 191, 36, 0.42);
            color: #92400e;
        }

        .top-menu .top-menu-toggle-button.is-disabled-state {
            background: #edf1f5;
            border-color: #dce3ed;
            color: #64748b;
        }

        .top-menu .top-menu-toggle-button.is-disabled-state:hover {
            transform: none;
            background: #edf1f5;
        }

        .federation-ui-hidden {
            display: none !important;
        }

        .top-menu-placeholder {
            color: rgba(255, 255, 255, 0.7);
            font-size: 13px;
        }

        .page-shell {
            padding: 16px;
        }

        .container {
            display: flex;
            justify-content: space-between;
            width: 100%;
            box-sizing: border-box; /* Sørger for, at padding og border er inkluderet i bredden */
            gap: 16px;
        }

        .form-container, .help-container {
            width: 100%;
            padding: 10px;
            box-sizing: border-box;
        }

        .form-container {
            border: 1px solid #ddd;
        }

        .form-row {
            display: flex;
            align-items: center;
            margin-bottom: 10px; /* Kan justeres hvis der er behov for mindre afstand mellem rækker */
        }

        .form-row label {
            width: 15%; /* Reduceret width for label for at reducere afstanden til input felter */
            margin-right: 5px; /* Reduceret margin-right for mindre afstand mellem label og input */
            box-sizing: border-box;
            font-weight: bold;
        }

        .form-row input, .form-row select, .form-row textarea {
            width: 80%; /* Øget width for input og select for at kompensere for den reducerede label width */
            box-sizing: border-box; /* Forhindrer at padding påvirker bredden */
            padding: 5px; /* Mindsker padding for at reducere højden på felterne */
        }

        .form-row button {
            width: auto;
            margin-left: 10px;
        }

        .argument-help-tooltip {
            position: fixed;
            background: #fffbeb;
            border: 1px solid #fbbf24;
            border-radius: 4px;
            padding: 8px 10px;
            font-size: 12px;
            color: #78350f;
            max-width: 200px;
            z-index: 100;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            white-space: normal;
            word-break: break-word;
            pointer-events: none;
        }

        .form-row {
            position: relative;
        }

        .form-row button {
            width: auto;
            margin-left: 10px;
        }

        .form-row.flow-add-right .add-command-btn {
            margin-left: auto;
        }

        #addCommandRow {
            display: grid;
            grid-template-columns: 1fr auto 1fr;
            align-items: center;
            column-gap: 12px;
        }

        #addCommandRow .add-command-btn {
            margin-left: 0;
            grid-column: 2;
            justify-self: center;
        }

        .add-command-btn .add-command-spinner {
            display: none;
            width: 12px;
            height: 12px;
            border: 2px solid currentColor;
            border-top-color: transparent;
            border-radius: 50%;
            margin-left: 8px;
            vertical-align: middle;
            animation: add-command-spin 0.8s linear infinite;
        }

        .add-command-btn.is-waiting .add-command-spinner {
            display: inline-block;
        }

        #addCommandWaitHint {
            display: none;
            align-items: center;
            gap: 6px;
            grid-column: 2;
            justify-self: center;
            margin-top: 4px;
            font-size: 12px;
            color: #334155;
        }

        #addCommandRow.is-waiting #addCommandWaitHint {
            display: inline-flex;
        }

        #addCommandWaitHint .spinner {
            width: 10px;
            height: 10px;
            border: 2px solid currentColor;
            border-top-color: transparent;
            border-radius: 50%;
            animation: add-command-spin 0.8s linear infinite;
        }

        @keyframes add-command-spin {
            from {
                transform: rotate(0deg);
            }
            to {
                transform: rotate(360deg);
            }
        }

        #addCommandRow.flow-add-right .add-command-btn {
            margin-left: 0;
        }

        .job-editor-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
            margin-bottom: 10px;
        }

        .job-editor-card {
            border: 1px solid #d8dee8;
            border-radius: 8px;
            background: #f8fafc;
            padding: 10px;
            box-sizing: border-box;
        }

        .job-editor-title {
            font-weight: 700;
            color: #10233e;
            margin: 0 0 8px 0;
            font-size: 13px;
        }

        .job-editor-card .form-row {
            margin-bottom: 8px;
        }

        .job-editor-card .form-row label {
            width: 22%;
        }

        .job-editor-card .form-row input,
        .job-editor-card .form-row textarea {
            width: 70%;
        }

        @media (max-width: 1200px) {
            .job-editor-grid {
                grid-template-columns: 1fr;
            }
        }

        #hasNextHint,
        #dependencyHint {
            font-size: 12px;
            color: #475569;
            margin-left: 8px;
        }

        .chain-draft-actions {
            justify-content: space-between;
            align-items: center;
        }

        #addChainJobBtn {
            margin-left: 0;
        }

        #chainDraftCount {
            font-size: 12px;
            color: #334155;
            margin-left: 8px;
        }

        .chain-draft-list {
            border: 1px dashed #94a3b8;
            border-radius: 6px;
            padding: 6px;
            background: #ffffff;
            max-height: 180px;
            overflow: auto;
        }

        .chain-draft-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
            padding: 6px 4px;
            border-bottom: 1px solid #e2e8f0;
            font-size: 12px;
            color: #1f2937;
        }

        .chain-draft-item:last-child {
            border-bottom: none;
        }

        .chain-draft-remove {
            margin-left: 0;
            padding: 3px 6px;
            font-size: 11px;
        }

        .flow-submenu-hidden {
            display: none;
        }

        .flow-standard-hidden {
            display: none !important;
        }

        #flowtemplateLabel {
            width: auto;
            margin-left: 12px;
            margin-right: 8px;
        }

        #flowtemplate {
            width: auto;
            min-width: 220px;
        }

        #flowTargetSubfolderLabel {
            width: auto;
            margin-left: 12px;
            margin-right: 8px;
        }

        #flowTargetSubfolderMode {
            width: auto;
            min-width: 260px;
        }

        .job-editor-card #flowtemplateLabel,
        .job-editor-card #flowTargetSubfolderLabel,
        .job-editor-card #flowRulesEditorBtnLabel {
            width: 22%;
            margin-left: 0;
            margin-right: 0;
        }

        .job-editor-card #flowtemplate,
        .job-editor-card #flowTargetSubfolderMode {
            width: 70%;
            min-width: 0;
        }

        #flowRulesEditorBtn {
            width: auto;
            margin-left: 12px;
        }

        .top-menu #flowRulesEditorBtn {
            margin-left: 0;
        }

        .flow-rules-overlay {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.55);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 2200;
        }

        .flow-rules-overlay.is-open {
            display: flex;
        }

        .flow-rules-modal {
            width: min(1120px, 97vw);
            max-height: 86vh;
            overflow: auto;
            background: #f8fafc;
            border: 1px solid #cbd5e1;
            border-radius: 10px;
            padding: 12px;
            box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
        }

        .release-status-overlay {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.55);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 2250;
            padding: 16px;
        }

        .release-status-overlay.is-open {
            display: flex;
        }

        .release-status-modal {
            width: min(1020px, 97vw);
            max-height: 88vh;
            overflow: auto;
            background: #f8fafc;
            border: 1px solid #cbd5e1;
            border-radius: 10px;
            padding: 12px;
            box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
        }

        .release-status-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
            margin-bottom: 10px;
        }

        .release-status-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 8px;
            margin-bottom: 10px;
        }

        .release-status-card {
            border: 1px solid #dbe4ee;
            border-radius: 8px;
            background: #ffffff;
            padding: 8px;
        }

        .release-status-card .k {
            font-size: 12px;
            color: #6b7280;
        }

        .release-status-card .v {
            font-size: 16px;
            font-weight: 700;
            color: #111827;
            margin-top: 2px;
            word-break: break-word;
        }

        .release-status-table-wrap {
            overflow-x: auto;
        }

        .release-status-table {
            width: 100%;
            min-width: 760px;
            border-collapse: collapse;
        }

        .release-status-table th,
        .release-status-table td {
            border-bottom: 1px solid #e5e7eb;
            text-align: left;
            padding: 8px;
            font-size: 13px;
        }

        .release-status-table th {
            color: #374151;
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }

        .release-status-pill {
            display: inline-flex;
            align-items: center;
            border-radius: 999px;
            padding: 2px 8px;
            font-size: 11px;
            font-weight: 700;
            border: 1px solid transparent;
            white-space: nowrap;
        }

        .release-status-pill.state-up_to_date {
            background: #dcfce7;
            border-color: #86efac;
            color: #166534;
        }

        .release-status-pill.state-behind {
            background: #fef3c7;
            border-color: #fcd34d;
            color: #92400e;
        }

        .release-status-pill.state-failed {
            background: #fee2e2;
            border-color: #fca5a5;
            color: #991b1b;
        }

        .release-status-pill.state-paused {
            background: #e0e7ff;
            border-color: #a5b4fc;
            color: #3730a3;
        }

        .release-status-pill.state-unknown {
            background: #f3f4f6;
            border-color: #d1d5db;
            color: #374151;
        }

        .release-status-pill.conn-online {
            background: #dcfce7;
            border-color: #86efac;
            color: #166534;
        }

        .release-status-pill.conn-stale {
            background: #fef3c7;
            border-color: #fcd34d;
            color: #92400e;
        }

        .release-status-pill.conn-offline {
            background: #fee2e2;
            border-color: #fca5a5;
            color: #991b1b;
        }

        .release-status-pill.conn-unknown {
            background: #f3f4f6;
            border-color: #d1d5db;
            color: #374151;
        }

        .federation-timeline {
            margin: 0;
            padding: 0;
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-width: 260px;
        }

        .federation-timeline-item {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            color: #374151;
            line-height: 1.2;
        }

        .federation-timeline-dot {
            width: 8px;
            height: 8px;
            border-radius: 999px;
            flex: 0 0 auto;
            background: #d1d5db;
        }

        .federation-timeline-item.status-done .federation-timeline-dot {
            background: #16a34a;
        }

        .federation-timeline-item.status-running .federation-timeline-dot {
            background: #d97706;
        }

        .federation-timeline-item.status-failed .federation-timeline-dot {
            background: #dc2626;
        }

        .federation-timeline-item.status-pending {
            color: #6b7280;
        }

        .federation-timeline-progress {
            font-size: 11px;
            color: #6b7280;
            margin-bottom: 6px;
        }

        @media (max-width: 900px) {
            .release-status-grid {
                grid-template-columns: 1fr;
            }
        }

        .flow-rules-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
            margin-bottom: 10px;
        }

        .flow-rules-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 8px;
            margin-bottom: 10px;
        }

        .flow-rules-grid label {
            display: block;
            width: 100%;
            text-align: left;
            font-size: 12px;
            color: #0f172a;
        }

        .flow-rules-grid input,
        .flow-rules-grid select {
            width: 100%;
        }

        .programs-editor-modal {
            width: min(1400px, 98vw);
        }

        .programs-editor-grid {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }

        .programs-editor-grid label {
            display: block;
            text-align: left;
            line-height: 1.3;
        }

        .programs-editor-grid label input,
        .programs-editor-grid label textarea,
        .programs-editor-grid label select {
            display: block;
            width: 100%;
            box-sizing: border-box;
            margin-top: 4px;
        }

        .programs-editor-grid label small {
            display: block;
            margin-top: 4px;
            margin-left: 0;
            padding-left: 0;
            text-indent: 0;
            text-align: left;
            color: #64748b;
        }

        #programsEditorSelect {
            min-width: 520px;
        }

        #pe_whattodo,
        #pe_rules,
        #pe_extra,
        #pe_meta {
            font-family: Consolas, "Courier New", monospace;
            font-size: 12px;
            width: 100%;
        }

        #pe_whattodo,
        #pe_rules,
        #pe_extra,
        #pe_meta {
            min-height: 130px;
            resize: vertical;
        }

        .flow-fixed-target-row {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 6px;
            align-items: center;
        }

        .flow-fixed-target-browse {
            min-width: 110px;
            white-space: nowrap;
        }

        .flow-rules-list {
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            background: #ffffff;
            padding: 6px;
            max-height: 320px;
            overflow: auto;
        }

        .flow-rules-item {
            display: grid;
            grid-template-columns: 1fr auto;
            align-items: center;
            gap: 10px;
            border-bottom: 1px solid #e2e8f0;
            padding: 6px 4px;
            font-size: 12px;
            color: #1f2937;
        }

        .flow-rules-item-actions {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            white-space: nowrap;
        }

        .flow-rules-item:last-child {
            border-bottom: none;
        }

        .flow-rules-actions {
            display: flex;
            justify-content: space-between;
            margin-top: 10px;
            gap: 10px;
        }

        @media (max-width: 1000px) {
            .flow-rules-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .programs-editor-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            #programsEditorSelect {
                min-width: 360px;
            }
        }

        @media (max-width: 760px) {
            .programs-editor-grid {
                grid-template-columns: 1fr;
            }

            #programsEditorSelect {
                min-width: 0;
            }
        }

        #commandsContainer {
            margin-top: 20px;
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
            align-items: start;
        }

        .commands-panel {
            border: 1px solid #d8dee8;
            border-radius: 10px;
            background: #ffffff;
            overflow: hidden;
            transition: background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
        }

        .commands-panel:hover {
            background-color: #eef2f7;
            box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
        }

        #commandsPanelRoot:hover {
            border-color: #3b82f6;
        }

        #commandsPanelChain:hover {
            border-color: #10b981;
        }

        .commands-panel-scroll {
            overflow: auto;
            max-width: 100%;
        }

        .commands-panel-title {
            padding: 10px 12px;
            font-weight: 700;
            color: #10233e;
            background: #eef2f7;
            border-bottom: 1px solid #d8dee8;
        }

        .commands-list {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            padding: 10px;
            box-sizing: border-box;
            min-height: 90px;
        }

        .commands-header {
            display: none;
        }

        :root {
            --commands-grid-compact: minmax(4ch, 0.5fr) minmax(10ch, 1fr) minmax(10ch, 1fr) minmax(18ch, 2.3fr) minmax(18ch, 2.3fr) minmax(12ch, 1.1fr) minmax(10ch, 0.9fr) minmax(11ch, 1fr) minmax(10ch, 0.9fr) minmax(10ch, 0.8fr);
        }

        body.layout-compact #commandsContainer {
            display: block;
        }

        body.layout-compact .commands-panel {
            margin-bottom: 12px;
        }

        body.layout-compact .commands-list {
            display: table;
            width: 100%;
            min-width: 1800px;
            border-collapse: collapse;
            table-layout: auto;
            padding: 0;
            gap: 0;
            min-height: 0;
        }

        body.layout-compact .commands-header,
        body.layout-compact .command-set {
            display: table-row;
            margin: 0;
            width: 100%;
            white-space: nowrap;
        }

        body.layout-compact .commands-header {
            background: #eef2f7;
            font-weight: 700;
            color: #334155;
        }

        body.layout-compact .commands-header > span,
        body.layout-compact .command-set > span,
        body.layout-compact .command-set > button,
        body.layout-compact .command-set > button {
            display: table-cell;
            padding: 7px 8px;
            border-right: 1px solid #d8dee8;
            border-bottom: 1px solid #d8dee8;
            vertical-align: middle;
            box-sizing: border-box;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            min-width: 0;
        }

        body.layout-compact .commands-header > span {
            font-family: inherit;
            font-size: 11px;
            line-height: 1.05;
        }

        body.layout-compact .command-set > span {
            font-family: inherit;
            font-size: 11px;
            line-height: 1.05;
        }

        body.layout-compact .command-set > button {
            font-family: inherit;
            font-size: 11px;
            line-height: 1.05;
        }

        body.layout-compact .commands-header > span:first-child,
        body.layout-compact .command-set > span:first-child,
        body.layout-compact .command-set > button:first-child,
        body.layout-compact .command-set > button:first-child {
            border-left: 1px solid #d8dee8;
        }

        body.layout-compact .commands-header > span:last-child,
        body.layout-compact .command-set > span:last-child,
        body.layout-compact .command-set > button:last-child,
        body.layout-compact .command-set > button:last-child {
            border-right: 1px solid #d8dee8;
        }

        body.layout-compact .commands-header > span {
            background: inherit;
        }

        body.layout-compact .commands-header .commands-header-action,
        body.layout-compact .command-set button {
            text-align: right;
        }

        .command-set {
            border: 1px solid #d8dee8;
            padding: 12px;
            margin: 0;
            width: calc(20% - 8px);
            background: #ffffff;
            border-radius: 10px;
            box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
            white-space: normal;
            overflow: visible;
            text-overflow: clip;
            box-sizing: border-box;
        }

        body.layout-cards .command-set:hover {
            background-color: #eef2f7;
            box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
            border-color: #94a3b8;
        }

        #commandsPanelRoot .command-set:hover {
            border-color: #3b82f6;
            background-color: #eff6ff;
        }

        #commandsPanelChain .command-set:hover {
            border-color: #10b981;
            background-color: #ecfdf5;
        }

        /* Make child elements transparent on hover so parent background shows through */
        #commandsPanelRoot .command-set:hover > span,
        #commandsPanelRoot .command-set:hover > button:not(.stop-local-job-btn),
        #commandsPanelRoot .command-set:hover .remove-command-btn:not(.stop-local-job-btn),
        #commandsPanelChain .command-set:hover > span,
        #commandsPanelChain .command-set:hover > button:not(.stop-local-job-btn),
        #commandsPanelChain .command-set:hover .remove-command-btn:not(.stop-local-job-btn) {
            background-color: transparent !important;
        }

        body.layout-compact .command-set {
            background: #ffffff;
            border-top: 0;
        }

        body.layout-compact .commands-list > .command-set:nth-child(2) {
            border-top: 1px solid #d8dee8;
        }

        @media (max-width: 1200px) {
            #commandsContainer {
                grid-template-columns: 1fr;
            }
        }

        body.layout-compact .command-set button {
            width: auto;
            justify-self: auto;
            margin: 0;
            height: auto;
            border: 0;
            border-radius: 0;
            background: #f8fafc;
            padding: 6px 8px;
            font-size: 11px;
        }

        body.layout-compact .command-set > .command-action-cell {
            padding: 0;
        }

        body.layout-compact .command-action-cell > .remove-command-btn {
            display: block;
            width: 100%;
            box-sizing: border-box;
            padding: 7px 8px;
            text-align: center;
        }

        body.layout-cards .command-set {
            font-family: inherit;
            font-size: 11px;
            line-height: 1.05;
            min-width: 0;
            overflow-wrap: anywhere;
            word-break: break-word;
        }

        body.layout-cards .command-set strong {
            font-family: inherit;
            font-size: 11px;
            line-height: 1.05;
        }

        body.layout-cards .command-set button {
            font-family: inherit;
            font-size: 11px;
            line-height: 1.05;
            padding: 6px 8px;
        }

        .remove-command-btn {
            cursor: pointer;
            border: 1px solid #94a3b8;
            border-radius: 4px;
            background: #ffffff;
            color: #1f2937;
            font-weight: 600;
        }

        body.layout-compact .command-set .remove-command-btn {
            border: 1px solid #cbd5e1;
            border-radius: 0;
            background: #f8fafc;
        }

        @keyframes warningBlinkCard {
            0%, 100% { background-color: #ffb347; }
            50% { background-color: #ff8c00; }
        }

        @keyframes warningBlinkRowCell {
            0%, 100% { background-color: #ffb347; }
            50% { background-color: #ff8c00; }
        }

        body.layout-cards .command-set.warning-blink {
            animation: warningBlinkCard 1s step-end infinite;
            border: 2px solid #ff8c00;
        }

        body.layout-compact .command-set.warning-blink > span,
        body.layout-compact .command-set.warning-blink > button {
            animation: warningBlinkRowCell 1s step-end infinite;
        }

        .command-set[data-status="queued"] {
            background: #fff7e6;
        }

        .command-set[data-status="processing"] {
            background: #fff8b3;
        }

        .command-set[data-status="processed"] {
            background: #e7f8eb;
        }

        .command-set[data-status="failed"] {
            background: #fde8e8;
        }

        body.layout-compact .command-set[data-status="queued"] > span,
        body.layout-compact .command-set[data-status="queued"] > button {
            background: #fff7e6;
        }

        body.layout-compact .command-set[data-status="processing"] > span,
        body.layout-compact .command-set[data-status="processing"] > button {
            background: #fff8b3;
        }

        body.layout-compact .command-set[data-status="processed"] > span,
        body.layout-compact .command-set[data-status="processed"] > button {
            background: #e7f8eb;
        }

        body.layout-compact .command-set[data-status="failed"] > span,
        body.layout-compact .command-set[data-status="failed"] > button {
            background: #fde8e8;
        }

        .command-set .stop-local-job-btn,
        body.layout-compact .command-set button.stop-local-job-btn {
            background: #b42318;
            border: 1px solid #912018;
            color: #ffffff;
            animation: none;
        }

        .command-set .stop-local-job-btn:hover:not(:disabled),
        body.layout-compact .command-set button.stop-local-job-btn:hover:not(:disabled) {
            background: #912018;
        }

        @keyframes localJobStopping {
            0%, 100% { background-color: #b42318; }
            50% { background-color: #7a1912; }
        }

        .command-set .stop-local-job-btn.is-stopping,
        body.layout-compact .command-set button.stop-local-job-btn.is-stopping {
            animation: localJobStopping 1.2s ease-in-out infinite;
            opacity: 1;
            cursor: wait;
        }

        @media (prefers-reduced-motion: reduce) {
            .command-set .stop-local-job-btn.is-stopping,
            body.layout-compact .command-set button.stop-local-job-btn.is-stopping {
                animation: none;
            }
        }

        .late-added-badge {
            display: inline-block;
            margin-left: 6px;
            padding: 1px 6px;
            border-radius: 999px;
            background: #1f2937;
            color: #ffffff;
            font-size: 11px;
            font-weight: 700;
            line-height: 1.3;
            vertical-align: middle;
            letter-spacing: 0.02em;
            white-space: nowrap;
        }

        .federated-badge {
            display: inline-block;
            margin-left: 6px;
            padding: 1px 6px;
            border-radius: 999px;
            background: #d9f7ec;
            color: #0b3b2d;
            border: 1px solid rgba(8, 117, 88, 0.28);
            font-size: 11px;
            font-weight: 700;
            line-height: 1.3;
            vertical-align: middle;
            letter-spacing: 0.02em;
            white-space: nowrap;
        }

        .command-flow-inline {
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-width: 220px;
        }

        .command-flow-inline.is-local {
            min-width: 0;
        }

        .command-flow-inline.is-federated {
            min-width: 0;
        }

        .command-flow-federated {
            color: #b91c1c;
            font-size: 11px;
            font-weight: 700;
            line-height: 1.3;
            white-space: nowrap;
        }

        .command-flow-progress {
            font-size: 10px;
            color: #475569;
            line-height: 1.1;
        }

        .command-flow-toggle {
            align-self: flex-start;
            border: 1px solid #cbd5e1;
            border-radius: 6px;
            background: #ffffff;
            color: #334155;
            padding: 2px 7px;
            font-size: 10px;
            line-height: 1.2;
            cursor: pointer;
        }

        .command-flow-toggle:hover {
            background: #f8fafc;
        }

        .command-flow-steps {
            display: flex;
            flex-wrap: wrap;
            gap: 4px;
        }

        .command-flow-step {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            border: 1px solid #cbd5e1;
            border-radius: 999px;
            background: #f8fafc;
            color: #334155;
            padding: 1px 6px;
            font-size: 10px;
            line-height: 1.2;
            white-space: nowrap;
        }

        .command-flow-step::before {
            content: '';
            width: 6px;
            height: 6px;
            border-radius: 999px;
            background: #cbd5e1;
            flex: 0 0 auto;
        }

        .command-flow-step.status-done::before {
            background: #16a34a;
        }

        .command-flow-step.status-done {
            border-color: #86efac;
            background: #dcfce7;
            color: #166534;
        }

        .command-flow-step.status-running::before {
            background: #d97706;
        }

        .command-flow-step.status-running {
            border-color: #fdba74;
            background: #ffedd5;
            color: #9a3412;
        }

        .command-flow-step.status-failed::before {
            background: #dc2626;
        }

        .command-flow-step.status-failed {
            border-color: #fca5a5;
            background: #fee2e2;
            color: #991b1b;
        }

        .command-flow-step.status-pending {
            opacity: 0.8;
            border-color: #cbd5e1;
            background: #f8fafc;
            color: #64748b;
        }

        .command-flow-muted {
            font-size: 10px;
            color: #64748b;
            white-space: nowrap;
        }

        .command-flow-details {
            display: flex;
            flex-direction: column;
            gap: 3px;
            margin-top: 2px;
            padding-top: 3px;
            border-top: 1px dashed #dbe4ef;
        }

        .command-flow-detail-row {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 10px;
            line-height: 1.2;
            color: #334155;
            white-space: nowrap;
        }

        .command-flow-detail-state {
            display: inline-block;
            min-width: 54px;
            text-transform: lowercase;
            color: #64748b;
        }

        .command-flow-detail-time {
            color: #475569;
        }

        body.layout-compact .command-flow-cell {
            white-space: normal;
            min-width: 240px;
        }

        .queue-filter-row {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 10px;
            margin: 6px 0 10px;
            font-size: 13px;
            color: #334155;
            flex-wrap: wrap;
        }

        #addCommandRow .queue-filter-row {
            margin: 0;
            grid-column: 3;
            justify-self: end;
        }

        @media (max-width: 1100px) {
            #addCommandRow {
                grid-template-columns: 1fr;
                row-gap: 8px;
            }

            #addCommandRow .add-command-btn,
            #addCommandWaitHint,
            #addCommandRow .queue-filter-row {
                grid-column: 1;
                justify-self: center;
            }
        }

        .queue-filter-row label {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            user-select: none;
        }

        .queue-filter-stats {
            font-size: 12px;
            color: #475569;
            white-space: nowrap;
        }

        .queue-filter-modes {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .queue-filter-mode-btn {
            border: 1px solid #cbd5e1;
            background: #f8fafc;
            color: #334155;
            border-radius: 999px;
            padding: 3px 10px;
            font-size: 12px;
            line-height: 1.4;
            cursor: pointer;
        }

        .queue-filter-mode-btn.is-active {
            border-color: #3b82f6;
            background: #eff6ff;
            color: #1d4ed8;
            font-weight: 600;
        }

        #status {
            color: red;
            font-size: 20px;
            font-weight: bold;
        }

        #cpu-load {
            color: blue;
            font-size: 18px;
            font-weight: bold;
        }

        .button-container {
            display: flex;
            gap: 10px;
            margin-top: 20px;
            align-items: center;
            flex-wrap: wrap;
        }

        .button-container .stop-execution-btn {
            color: #fff;
            background-color: #b42318;
            border-color: #8f1d15;
        }

        .button-container .stop-execution-btn:hover:not(:disabled) {
            background-color: #912018;
        }


        .red-bold-label {
            color: red; /* Gør teksten rød */
            font-weight: bold; /* Gør teksten fed */
        }

        .command-index {
            font-weight: 700;
        }

        .command-program {
            font-weight: 700;
        }

        .command-status-cell,
        .command-tool-cell,
        .command-server,
        .command-id,
        .command-source,
        .command-target,
        .command-whattodo {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            min-width: 0;
        }

        body.layout-cards .command-status-cell,
        body.layout-cards .command-tool-cell,
        body.layout-cards .command-server,
        body.layout-cards .command-id,
        body.layout-cards .command-source,
        body.layout-cards .command-target,
        body.layout-cards .command-whattodo {
            white-space: normal;
            text-overflow: clip;
            overflow-wrap: anywhere;
            word-break: break-word;
        }

        .previews {
            display: flex;
            justify-content: stretch;
        }
        #preview {
            padding: 10px;
            border: none; /* Gør border usynlig */
            overflow: auto; /* Tilføj scrollbar, hvis indholdet overskrider området */
            max-width: 100%;
            box-sizing: border-box; /* Gør det nemmere at håndtere padding og bredder */
        }
        .local-queue-reset-notice {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -45%);
            z-index: 10000;
            box-sizing: border-box;
            max-width: min(460px, calc(100vw - 40px));
            padding: 22px 30px;
            border: 1px solid #a7d8bd;
            border-radius: 16px;
            background: #f0fff6;
            color: #17613c;
            box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
            font-size: 18px;
            font-weight: 500;
            line-height: 1.5;
            text-align: center;
            text-transform: none;
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: opacity 450ms ease, transform 450ms ease, visibility 450ms;
        }
        .local-queue-reset-notice.is-visible {
            opacity: 1;
            visibility: visible;
            transform: translate(-50%, -50%);
        }
        .local-queue-reset-notice[data-severity="warning"] {
            background: #fff8e6;
            border-color: #e6c46a;
            color: #795300;
        }
        .local-queue-reset-notice[data-severity="pending"] {
            background: #eff7ff;
            border-color: #9dc2e8;
            color: #245783;
        }
        .local-queue-reset-notice[data-severity="error"] {
            background: #fff0f0;
            border-color: #e3a4a4;
            color: #982c2c;
        }
        @media (prefers-reduced-motion: reduce) {
            .local-queue-reset-notice {
                transition: none;
            }
        }
        button:disabled {
            background-color: #ccc; /* Gør knappen grå */
            cursor: not-allowed;
        }
