:root {
    color-scheme: dark;
    --bg: #0c0c0f;
    --surface: #151519;
    --surface-raised: #1b1b21;
    --surface-hover: #1b1b21;
    --field: #101013;
    --border: #232329;
    --border-strong: #33333c;
    --graph-line: #4a4a56;
    --text: #e9e9ec;
    --text-dim: #9a9aa2;
    --text-faint: #86868f;
    --muted: var(--text-dim);
    --accent: #3fd3e6;
    --accent-text: #0c0c0f;
    --green: #62d332;
    --red: #e0655a;
    --amber: #d9a441;
    --purple: #b18cf0;
    --pink: #f28ab5;
    --blue: #6aa6ff;
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --font-mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f4f5f7;
    --surface: #ffffff;
    --surface-raised: #fafbfc;
    --surface-hover: #f1f3f6;
    --field: #eef0f3;
    --border: #e1e4ea;
    --border-strong: #c9ced8;
    --graph-line: #aeb4c0;
    --text: #1c1f26;
    --text-dim: #5a6170;
    --text-faint: #6b7280;
    --accent: #0a7e90;
    --accent-text: #ffffff;
    --green: #2f7d32;
    --red: #c0392b;
    --amber: #9a6b0b;
    --purple: #6d4fc4;
    --pink: #b8367a;
    --blue: #2d5fc9;
}

/* ------------------------------------------------------------------ */
/* Base                                                                */
/* ------------------------------------------------------------------ */

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.5 var(--font-sans);
    -webkit-font-smoothing: antialiased;
    scrollbar-color: var(--border-strong) var(--bg);
    scrollbar-width: thin;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-strong);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-faint);
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--accent);
}

button {
    font: inherit;
    color: inherit;
}

[hidden] {
    display: none !important;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 2px;
}

.visually-hidden,
.search-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ------------------------------------------------------------------ */
/* Layout                                                              */
/* ------------------------------------------------------------------ */

.page {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 24px 56px;
}

.page-stack {
    display: grid;
    gap: 20px;
}

.page-stack > * {
    min-width: 0;
}

.page-runtime {
    display: grid;
    gap: 20px;
    align-content: start;
}

.page-runtime > .fluxx-topbar,
.page-runtime > .header {
    margin-bottom: 0;
}

/* ------------------------------------------------------------------ */
/* Top bar                                                             */
/* ------------------------------------------------------------------ */

.fluxx-topbar {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 16px;
    min-height: 48px;
    margin: 0 -24px 28px;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-strong);
}

.fluxx-topbar-main {
    display: flex;
    align-items: stretch;
    gap: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.fluxx-brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding-right: 18px;
    margin-right: 18px;
    border-right: 1px solid var(--border-strong);
    color: var(--text);
    line-height: 1;
}

.fluxx-brand-logo {
    display: block;
    width: auto;
    height: 26px;
    max-width: min(140px, 28vw);
    object-fit: contain;
}

.fluxx-nav {
    display: flex;
    align-items: stretch;
    gap: 22px;
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: -1px;
    overflow-x: auto;
    scrollbar-width: none;
}

.fluxx-nav::-webkit-scrollbar {
    display: none;
}

.fluxx-nav-link {
    display: inline-flex;
    align-items: center;
    flex: none;
    padding: 0 2px;
    border-bottom: 2px solid transparent;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.fluxx-nav-link:hover {
    color: var(--text);
    border-bottom-color: var(--border-strong);
}

.fluxx-nav-link.is-active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

.fluxx-nav-link-admin {
    color: var(--text-faint);
}

.fluxx-nav-separator {
    flex: none;
    width: 1px;
    margin: 14px 2px;
    background: var(--border-strong);
}

.fluxx-topbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    flex: none;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dim);
}

.fluxx-topbar-user {
    color: var(--text-faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 22ch;
}

.fluxx-theme-toggle {
    display: inline-flex;
    align-items: center;
    padding: 4px;
    border: 0;
    background: none;
    color: var(--text-dim);
    cursor: pointer;
}

.fluxx-theme-toggle:hover {
    color: var(--accent);
}

.fluxx-theme-toggle .button-icon-svg {
    width: 15px;
    height: 15px;
}

.fluxx-theme-toggle .icon-when-light {
    display: none;
}

:root[data-theme="light"] .fluxx-theme-toggle .icon-when-light {
    display: inline-flex;
}

:root[data-theme="light"] .fluxx-theme-toggle .icon-when-dark {
    display: none;
}

/* ------------------------------------------------------------------ */
/* Typography                                                          */
/* ------------------------------------------------------------------ */

.header {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.header::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 48px;
    height: 1px;
    background: var(--accent);
}

.title {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.title::before {
    content: "» ";
    color: var(--accent);
}

.title-icon {
    display: none;
}

.subtitle {
    margin: 6px 0 0;
    max-width: 72ch;
    color: var(--text-dim);
    font-size: 13px;
}

.section-subtitle {
    margin-top: 4px;
    max-width: none;
}

.item-code {
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.4;
}

.item-code-hero {
    margin-top: 6px;
    letter-spacing: 0.04em;
}

.workflow-description {
    margin-top: 2px;
    color: var(--text-dim);
    font-size: 12px;
    line-height: 1.4;
}

.workflow-description-hero {
    margin: 8px 0 0;
    max-width: 72ch;
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.5;
}

.workflow-category-chip {
    display: inline-block;
    margin-top: 8px;
    padding: 1px 6px;
    border: 1px solid var(--border-strong);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
}

.header-tools,
.header-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin-left: auto;
}

.count {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-faint);
    white-space: nowrap;
}

.list-count {
    margin-bottom: 10px;
    text-align: right;
}

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */

.secondary-button,
.danger-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
}

.secondary-button::before,
.danger-button::before {
    content: "[ ";
    color: var(--text-faint);
}

.secondary-button::after,
.danger-button::after {
    content: " ]";
    color: var(--text-faint);
}

.secondary-button:hover {
    color: var(--text);
}

.secondary-button:hover::before,
.secondary-button:hover::after {
    color: var(--accent);
}

.danger-button {
    color: var(--red);
}

.danger-button:hover {
    color: var(--red);
}

.danger-button:hover::before,
.danger-button:hover::after {
    color: var(--red);
}

.secondary-button:disabled,
.danger-button:disabled {
    opacity: 0.45;
    cursor: default;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 16px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: var(--accent-text);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
}

.primary-button:hover {
    background: transparent;
    color: var(--accent);
}

.button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    line-height: 1;
}

.button-icon-svg {
    width: 14px;
    height: 14px;
}

.button-icon-toggle .icon-when-active,
.button-icon-toggle .icon-when-inactive {
    display: inline-flex;
}

[aria-pressed="true"] .button-icon-toggle .icon-when-inactive,
[aria-pressed="false"] .button-icon-toggle .icon-when-active {
    display: none;
}

.button-label {
    white-space: nowrap;
}

.inline-form,
.inline-action-form,
.execution-action-form {
    display: inline-flex;
    margin: 0;
}

/* ------------------------------------------------------------------ */
/* Forms                                                               */
/* ------------------------------------------------------------------ */

.run-filter-label,
.login-label,
.definition-label {
    display: block;
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.search-input,
.operation-textarea,
.login-field input {
    width: 100%;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    background: var(--field);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 13px;
}

.search-input::placeholder,
.operation-textarea::placeholder {
    color: var(--text-faint);
}

.search-input:focus,
.operation-textarea:focus,
.login-field input:focus {
    outline: 1px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
}

.search-input:disabled {
    opacity: 0.55;
}

select.search-input {
    appearance: none;
    padding-right: 28px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2386868f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

select.search-input option {
    background: var(--surface);
    color: var(--text);
}

input[type="checkbox"] {
    accent-color: var(--accent);
}

.search-form {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.search-form .search-input {
    width: min(360px, calc(100vw - 48px));
}

.run-filter-form {
    display: grid;
    gap: 14px;
    align-items: end;
    margin-bottom: 16px;
}

.run-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.run-filter-grid-executions {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: start;
}

.run-filter-grid-executions .run-filter-field:first-child {
    grid-column: span 2;
}

.run-filter-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.run-filter-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.operation-form {
    display: grid;
    gap: 16px;
}

.operation-field {
    display: grid;
    gap: 6px;
}

.operation-textarea {
    min-height: 92px;
    padding: 10px;
    line-height: 1.5;
    resize: vertical;
}

.operation-confirm {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text);
    font-size: 13px;
}

.operation-confirm input {
    width: 15px;
    height: 15px;
    margin-top: 2px;
}

.user-form {
    display: grid;
    gap: 18px;
    max-width: 480px;
}

.user-form-field {
    display: grid;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.user-form-field-inline {
    grid-auto-flow: column;
    justify-content: start;
    align-items: center;
    gap: 10px;
}

.user-form-hint,
.settings-help {
    color: var(--text-faint);
    font-size: 12px;
    line-height: 1.45;
}

.user-form-actions,
.settings-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
}

.user-form-divider {
    margin: 24px 0 16px;
    border: none;
    border-top: 1px solid var(--border);
}

.user-form-danger {
    display: inline-flex;
    margin: 0;
}

.choice-list {
    list-style: none;
    margin: 4px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.choice-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    background: var(--field);
    cursor: pointer;
}

.choice-option input {
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.form-error,
.login-error {
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid color-mix(in srgb, var(--red) 45%, var(--border));
    border-left: 3px solid var(--red);
    color: var(--text);
    font-size: 13px;
}

.settings-fieldset {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 24px;
}

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

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.settings-toggle-card {
    padding: 14px 16px;
}

.settings-switch {
    align-items: flex-start;
}

.settings-switch > span {
    display: grid;
    gap: 4px;
}

.settings-switch-title {
    font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Flash messages                                                      */
/* ------------------------------------------------------------------ */

.flash-list {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}

.flash {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border-strong);
    border-left: 3px solid var(--green);
    background: var(--surface);
    font-size: 13px;
}

.flash::before {
    content: "OK";
    flex: none;
    min-width: 2.4rem;
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.flash-error {
    border-left-color: var(--red);
}

.flash-error::before {
    content: "ERR";
    color: var(--red);
}

.flash-warning {
    border-left-color: var(--amber);
}

.flash-warning::before {
    content: "WARN";
    color: var(--amber);
}

/* ------------------------------------------------------------------ */
/* Cards & sections                                                    */
/* ------------------------------------------------------------------ */

.section-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--border);
    background: var(--surface);
}

[data-tab-content] {
    min-width: 0;
    max-width: 100%;
}

.section-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px 16px;
    margin-bottom: 16px;
}

.section-heading-compact {
    margin-bottom: 10px;
}

.section-overline {
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.section-title {
    margin: 0;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-title-compact {
    font-size: 11px;
}

.section-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    border-bottom: 1px solid var(--border-strong);
}

.section-tab {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 1px 10px;
    margin-bottom: -1px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
}

.section-tab .button-icon {
    display: none;
}

.section-tab:hover {
    color: var(--text);
    border-bottom-color: var(--border-strong);
}

.section-tab.is-active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

.section-tab.is-active::before {
    content: "» ";
    color: var(--accent);
}

.empty {
    padding: 32px 20px;
    border: 1px dashed var(--border-strong);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 13px;
    text-align: center;
}

.detail-message {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid var(--border-strong);
    font-size: 13px;
    line-height: 1.5;
}

.detail-message-error {
    border-color: color-mix(in srgb, var(--red) 45%, var(--border));
    border-left: 3px solid var(--red);
}

.detail-message-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-bottom: 8px;
}

.detail-message-body {
    overflow-wrap: anywhere;
}

.detail-message-body + .code-block {
    margin-top: 10px;
}

.code-block {
    margin: 0;
    padding: 14px;
    border: 1px solid var(--border);
    background: var(--field);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.55;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    scrollbar-width: thin;
}

.code-block-compact {
    padding: 10px 12px;
}

.code-block-details {
    margin: 0;
}

.code-block-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid var(--border);
    background: var(--field);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.code-block-summary:hover {
    color: var(--text);
}

.code-block-summary::-webkit-details-marker,
.code-block-summary::marker {
    display: none;
    content: '';
}

.code-block-summary::before {
    content: "▸";
    color: var(--accent);
}

.code-block-details[open] > .code-block-summary::before {
    content: "▾";
}

.code-block-details > .code-block {
    margin-top: -1px;
}

/* Definition panels (key / value) */

.workflow-definition-groups,
.definition-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.workflow-definition-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.definition-block {
    display: grid;
    gap: 8px;
    align-content: start;
    padding: 12px 14px;
    border: 1px solid var(--border);
    background: var(--field);
}

.definition-block-compact {
    gap: 6px;
}

.definition-inline-list {
    display: grid;
    gap: 0;
}

.definition-inline-list-divider {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-strong);
}

.definition-inline-list-divider > .definition-label {
    margin-bottom: 4px;
}

.definition-inline-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    padding: 5px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.definition-inline-item:last-child {
    border-bottom: 0;
}

.definition-inline-key {
    margin-right: auto;
    color: var(--text-dim);
}

.definition-inline-value,
.definition-value {
    font-family: var(--font-mono);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    text-align: right;
    overflow-wrap: anywhere;
}

.definition-inline-item .workflow-link {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 2px 8px;
}

.definition-metric {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
}

/* ------------------------------------------------------------------ */
/* Chips, badges, metrics                                              */
/* ------------------------------------------------------------------ */

.system-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 1px 6px;
    border: 1px solid var(--border-strong);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    white-space: nowrap;
    vertical-align: middle;
}

.system-chip-source {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.system-chip-target {
    color: var(--green);
    border-color: color-mix(in srgb, var(--green) 45%, transparent);
}

.system-chip-sync {
    color: var(--blue);
    border-color: color-mix(in srgb, var(--blue) 45%, transparent);
}

.system-chip-lock {
    color: var(--text-faint);
    font-variant-numeric: tabular-nums;
}

.system-chip-lock .button-icon-svg {
    width: 12px;
    height: 12px;
}

.system-chip .item-code {
    color: inherit;
    font-size: inherit;
}

td .system-chip,
.definition-inline-item .system-chip {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.lock-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    color: var(--text-faint);
    vertical-align: middle;
}

.lock-badge .button-icon-svg {
    width: 12px;
    height: 12px;
}

.status-badge,
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}

.status-badge::before,
.status-chip::before {
    content: "";
    flex: none;
    width: 7px;
    height: 7px;
    background: currentColor;
}

.status-badge-pending {
    color: var(--text-faint);
}

.status-badge-running,
.status-badge-started {
    color: var(--accent);
}

.status-badge-running::before,
.status-badge-started::before {
    animation: status-pulse 1.6s ease-in-out infinite;
}

.status-badge-retrying,
.status-badge-relaunched,
.status-badge-warning {
    color: var(--amber);
}

.status-badge-retrying::before {
    animation: status-pulse 1.6s ease-in-out infinite;
}

.status-badge-cancelled {
    color: var(--text-dim);
}

.status-badge-completed,
.status-chip.is-enabled {
    color: var(--green);
}

.status-badge-failed,
.status-badge-partially-failed,
.status-chip.is-disabled {
    color: var(--red);
}

@keyframes status-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
}

.metric-value {
    display: inline-flex;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.metric-empty {
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 12px;
}

.metric-error {
    color: var(--red);
}

.execution-count,
.error-count {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.error-count {
    color: var(--red);
}

.error-count.is-zero {
    color: var(--text-faint);
}

.run-id {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

a.run-id {
    color: var(--text-dim);
    border-bottom: 1px dashed var(--border-strong);
}

a.run-id:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.role-list {
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 12px;
}

.table-note {
    margin-top: 4px;
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.4;
}

.table-note .system-chip + .system-chip {
    margin-left: 6px;
}

.table-note-compact {
    margin-top: 2px;
}

.payload-chip {
    display: inline-flex;
    align-items: center;
    padding: 0 6px;
    border: 1px solid var(--border-strong);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 11px;
}

.payload-chip-shared {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

/* ------------------------------------------------------------------ */
/* Tables                                                              */
/* ------------------------------------------------------------------ */

.workflow-list {
    min-width: 0;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

th,
td {
    padding: 11px 10px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom-color: var(--border-strong);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

td {
    font-size: 13px;
    overflow-wrap: anywhere;
}

tbody tr:hover > td {
    background: var(--surface-hover);
}

.workflow-table-compact th,
.workflow-table-compact td {
    padding: 10px 8px;
}

.workflow-table-compact td {
    font-size: 12px;
}

.run-catalog-table {
    min-width: 1180px;
}

.workflow-table-compact .execution-cell-run .system-chip {
    display: table;
    margin-top: 4px;
    padding: 1px 4px;
    font-size: 10px;
    letter-spacing: 0;
    white-space: nowrap;
}

.run-id-short {
    white-space: nowrap;
}

.run-workflow-meta {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.run-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.run-flow-arrow {
    color: var(--text-faint);
    font-size: 11px;
}

td .run-flow .system-chip {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.run-trigger {
    margin-top: 4px;
    font-size: 11px;
}

.run-timing {
    display: grid;
    gap: 4px;
}

.run-timing .item-code,
.run-timing .metric-empty {
    font-size: 11px;
}

.workflow-table-compact .execution-cell-trigger,
.workflow-table-compact .execution-cell-status {
    white-space: nowrap;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: -1px;
}

.workflow-link {
    color: inherit;
}

.workflow-link:hover .workflow-name {
    color: var(--accent);
}

.workflow-name {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
}

.workflow-group-header {
    cursor: pointer;
    user-select: none;
}

.workflow-group-header td {
    padding: 8px 10px;
    background: var(--field);
    border-bottom: 1px solid var(--border-strong);
}

.workflow-group-header:hover td {
    background: var(--field);
}

.workflow-group-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.workflow-group-chevron {
    display: inline-flex;
    align-items: center;
    color: var(--text-faint);
    transition: transform 0.15s ease;
}

.workflow-group-chevron .button-icon-svg {
    width: 12px;
    height: 12px;
}

.workflow-group-header:not(.is-collapsed) .workflow-group-chevron {
    color: var(--accent);
    transform: rotate(90deg);
}

.workflow-group-title {
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.workflow-group-count {
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 12px;
}

.runtime-table-empty {
    padding: 20px 12px;
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 12px;
    text-align: center;
}

.runtime-messages-table td {
    vertical-align: top;
}

.execution-dates {
    display: grid;
    gap: 4px;
}

.execution-dates-item {
    display: grid;
    gap: 0;
}

.execution-dates-label {
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.execution-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.execution-actions-compact {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.execution-error-preview {
    display: -webkit-box;
    overflow: hidden;
    color: var(--red);
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.execution-status-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin-bottom: 12px;
}

.execution-status-legend-label {
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.execution-status-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 11px;
}

/* ------------------------------------------------------------------ */
/* Pagination                                                          */
/* ------------------------------------------------------------------ */

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.pagination-pages {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 14px;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
    border-bottom: 1px solid transparent;
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 12px;
}

.pagination-link:hover {
    color: var(--text);
}

.pagination-link.is-active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

.pagination-link.is-disabled {
    pointer-events: none;
    opacity: 0.4;
}

/* ------------------------------------------------------------------ */
/* Polling                                                             */
/* ------------------------------------------------------------------ */

.polling-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.polling-controls-inline {
    margin-bottom: 0;
}

.polling-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 11px;
}

.polling-spinner {
    width: 10px;
    height: 10px;
    border: 1px solid var(--border-strong);
    border-top-color: var(--accent);
    animation: polling-spin 0.8s linear infinite;
}

@keyframes polling-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.runtime-refresh {
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.runtime-status {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

/* ------------------------------------------------------------------ */
/* Step tones                                                          */
/* ------------------------------------------------------------------ */

.step-tone-read {
    --step-tone-text: var(--accent);
    --step-tone-bg: color-mix(in srgb, var(--accent) 14%, transparent);
}

.step-tone-transform {
    --step-tone-text: var(--purple);
    --step-tone-bg: color-mix(in srgb, var(--purple) 14%, transparent);
}

.step-tone-splitter {
    --step-tone-text: var(--amber);
    --step-tone-bg: color-mix(in srgb, var(--amber) 14%, transparent);
}

.step-tone-write {
    --step-tone-text: var(--green);
    --step-tone-bg: color-mix(in srgb, var(--green) 14%, transparent);
}

.step-tone-linker {
    --step-tone-text: var(--pink);
    --step-tone-bg: color-mix(in srgb, var(--pink) 14%, transparent);
}

.step-tone-join {
    --step-tone-text: var(--text-faint);
    --step-tone-bg: transparent;
}

.step-tone-custom {
    --step-tone-text: var(--text-dim);
    --step-tone-bg: color-mix(in srgb, var(--text-dim) 14%, transparent);
}

.step-tone-text {
    color: var(--step-tone-text);
}

.step-tone-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--step-tone-text);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1.4;
}

.step-tone-pill::before {
    content: "";
    flex: none;
    width: 6px;
    height: 6px;
    background: currentColor;
}

.step-tone-pill .button-icon-svg {
    width: 11px;
    height: 11px;
}

.step-tone-surface {
    border-color: var(--border-strong);
}

.step-definition-type {
    min-width: 0;
}

.step-definition-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.step-definition-card {
    position: relative;
    display: grid;
    gap: 2px;
    align-content: start;
    padding: 8px 10px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
}

.step-definition-card.step-tone-join {
    border-style: dashed;
    background: transparent;
}

.step-definition-card:hover {
    border-color: var(--text-faint);
}

.step-definition-card-compact {
    padding: 8px 10px;
}

.step-definition-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.step-definition-list-compact {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 0;
}

/* ------------------------------------------------------------------ */
/* Workflow graph                                                      */
/* ------------------------------------------------------------------ */

.workflow-step-flow-scroll,
.execution-step-flow-scroll {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.workflow-step-flow-scroll {
    padding: 16px;
    border: 1px solid var(--border);
    background: var(--field);
}

.execution-step-flow-scroll {
    max-width: min(100%, 760px);
    padding: 4px 2px 6px;
}

.workflow-step-flow {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--workflow-graph-columns, 1), 220px);
    grid-template-rows: repeat(var(--workflow-graph-rows, 1), 120px);
    justify-content: start;
    align-items: center;
    width: max-content;
    min-width: max-content;
}

.workflow-step-flow-row,
.execution-step-flow-column {
    display: contents;
}

.workflow-step-flow-connector,
.execution-step-flow-connector {
    display: none;
}

.workflow-step-flow-lines,
.execution-step-flow-lines {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.workflow-step-flow-lines path,
.execution-step-flow-lines path {
    fill: none;
    stroke: var(--graph-line);
    stroke-width: 1.25;
    stroke-linecap: square;
    stroke-linejoin: miter;
    vector-effect: non-scaling-stroke;
}

.workflow-step-flow-lines marker path,
.execution-step-flow-lines marker path {
    fill: var(--graph-line);
    stroke: none;
}

.workflow-step-flow-card {
    position: relative;
    z-index: 1;
    width: 180px;
    min-height: 86px;
    min-width: 0;
    gap: 3px;
    padding: 10px 12px 10px 14px;
    border: 1px solid var(--border-strong);
    border-left: 3px solid var(--step-tone-text);
    background: var(--surface-raised);
    justify-self: center;
}

.workflow-step-flow-card:hover {
    border-color: var(--text-faint);
    border-left-color: var(--step-tone-text);
}

.workflow-step-flow-card.step-tone-join {
    justify-items: center;
    align-content: center;
    padding: 10px 12px;
    border: 1px dashed var(--border-strong);
    background: transparent;
    text-align: center;
}

.workflow-step-flow-card .step-tone-pill {
    font-size: 9px;
    letter-spacing: 0.14em;
    line-height: 1.2;
}

.workflow-step-flow-card .step-tone-pill::before {
    content: none;
}

.workflow-step-flow-card .step-definition-type,
.workflow-step-flow-card .item-code,
.workflow-step-flow-card .step-tone-pill {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workflow-step-flow-card .step-definition-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.25;
    color: var(--text);
}

.workflow-step-flow-card .item-code {
    font-size: 10px;
    line-height: 1.3;
}

/* Execution graph (executions tab) */

.execution-step-flow {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--workflow-graph-columns, 1), 200px);
    grid-template-rows: repeat(var(--workflow-graph-rows, 1), 88px);
    align-items: center;
    width: max-content;
    padding: 0;
}

.step-status-link {
    position: relative;
    z-index: 1;
    display: grid;
    align-self: center;
    align-items: center;
    justify-items: center;
    color: inherit;
}

.step-status-cell {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.execution-step-card {
    position: relative;
    width: 176px;
    min-height: 64px;
    padding: 8px 24px 8px 12px;
    border: 1px solid var(--border-strong);
    border-left: 3px solid var(--step-tone-text);
    background: var(--surface-raised);
    justify-self: center;
}

.execution-step-card .step-tone-pill {
    font-size: 9px;
    letter-spacing: 0.14em;
}

.execution-step-card .step-tone-pill::before {
    content: none;
}

.execution-step-card.step-tone-join {
    border: 1px dashed var(--border-strong);
    background: transparent;
}

.step-status-link:hover .execution-step-card {
    border-color: var(--text-faint);
    border-left-color: var(--step-tone-text);
}

.execution-step-card .step-definition-type,
.execution-step-card .execution-step-name,
.execution-step-card .execution-step-meta,
.execution-step-card .execution-step-meta-item,
.execution-step-card .step-tone-pill {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.execution-step-name {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.execution-step-meta {
    display: flex;
    align-items: center;
    gap: 0;
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 10px;
    line-height: 1.3;
}

.execution-step-meta-item {
    display: inline-flex;
    align-items: center;
    min-height: 13px;
}

.execution-step-meta-item + .execution-step-meta-item {
    margin-left: 6px;
    padding-left: 6px;
    border-left: 1px solid var(--border-strong);
}

/* Status dots */

.step-status-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--border-strong);
}

.step-status-dot.step-status-dot-inline {
    position: static;
    display: inline-block;
    margin-right: 6px;
    vertical-align: middle;
}

.step-status-dot-completed {
    background: var(--green);
}

.step-status-dot-failed {
    background: var(--red);
}

.step-status-dot-partially-failed {
    background: linear-gradient(135deg, var(--red) 0 50%, var(--amber) 50% 100%);
}

.step-status-dot-pending {
    background: var(--border-strong);
}

.step-status-dot-payloads-pruned {
    background: linear-gradient(135deg, var(--text-faint) 0 50%, var(--border-strong) 50% 100%);
}

.step-status-dot-relaunched {
    background: var(--purple);
}

.step-status-dot-running {
    background: var(--accent);
    animation: status-pulse 1.6s ease-in-out infinite;
}

.step-status-dot-retrying {
    background: var(--amber);
    animation: status-pulse 1.6s ease-in-out infinite;
}

.step-status-dot-cancelled {
    background: var(--text-dim);
}

/* ------------------------------------------------------------------ */
/* Payloads                                                            */
/* ------------------------------------------------------------------ */

.payload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.payload-column {
    display: grid;
    gap: 12px;
    min-width: 0;
    align-content: start;
}

.payload-title {
    margin: 0;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.payload-list {
    display: grid;
    gap: 12px;
    align-content: start;
}

.payload-card {
    display: grid;
    gap: 8px;
}

.payload-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.payload-table {
    width: 100%;
    table-layout: auto;
    border: 1px solid var(--border);
}

.payload-table-caption {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-bottom: 0;
    background: var(--field);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 12px;
    text-align: left;
    caption-side: top;
}

.payload-table th,
.payload-table td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    white-space: normal;
}

.payload-table th[scope="row"] {
    width: 1%;
    white-space: nowrap;
    color: var(--text-faint);
    font-size: 10px;
}

.payload-table td {
    color: var(--text);
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.payload-table tr:last-child th,
.payload-table tr:last-child td {
    border-bottom: 0;
}

.payload-table tbody tr:hover > td {
    background: transparent;
}

/* ------------------------------------------------------------------ */
/* Run timeline                                                        */
/* ------------------------------------------------------------------ */

.run-timeline-window {
    display: flex;
    align-items: center;
    gap: 8px;
    font-variant-numeric: tabular-nums;
}

.run-timeline {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.run-timeline-row {
    display: grid;
    grid-template-columns: 16rem 1fr;
    align-items: center;
    gap: 12px;
}

.run-timeline-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding-left: calc(var(--run-timeline-level, 0) * 8px);
}

.run-timeline-label .step-status-dot {
    position: static;
    flex: none;
}

.run-timeline-label .workflow-link {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.run-timeline-label .item-code {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.run-timeline-name {
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.run-timeline-track {
    position: relative;
    min-height: 26px;
    border: 1px solid var(--border);
    background: var(--field);
    overflow: hidden;
}

.run-timeline-bar {
    position: absolute;
    top: 3px;
    bottom: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 5px;
    padding: 0 6px;
    border: 1px solid color-mix(in srgb, var(--step-tone-text) 45%, transparent);
    background: color-mix(in srgb, var(--step-tone-text) 16%, var(--surface));
    color: var(--step-tone-text);
    font-family: var(--font-mono);
    font-size: 11px;
    overflow: hidden;
    white-space: nowrap;
}

.run-timeline-bar.is-narrow {
    padding: 0;
}

.run-timeline-bar:hover {
    border-color: var(--step-tone-text);
    color: var(--step-tone-text);
}

.run-timeline-bar-meta {
    pointer-events: none;
    overflow: hidden;
    text-overflow: ellipsis;
}

.run-timeline-bar-label {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    pointer-events: none;
}

.run-timeline-bar.step-status-bar-completed {
    border-color: color-mix(in srgb, var(--green) 45%, transparent);
    background: color-mix(in srgb, var(--green) 16%, var(--surface));
    color: var(--green);
}

.run-timeline-bar.step-status-bar-failed,
.run-timeline-bar.step-status-bar-cancelled {
    border-color: color-mix(in srgb, var(--red) 45%, transparent);
    background: color-mix(in srgb, var(--red) 16%, var(--surface));
    color: var(--red);
}

.run-timeline-bar.step-status-bar-partially-failed {
    border-color: color-mix(in srgb, var(--red) 40%, transparent);
    background: color-mix(in srgb, var(--amber) 16%, var(--surface));
    color: var(--red);
}

.run-timeline-bar.step-status-bar-running,
.run-timeline-bar.is-running {
    border-color: color-mix(in srgb, var(--accent) 50%, transparent);
    background: color-mix(in srgb, var(--accent) 18%, var(--surface));
    color: var(--accent);
    animation: status-pulse 1.6s ease-in-out infinite;
}

.run-timeline-bar.step-status-bar-retrying,
.run-timeline-bar.step-status-bar-relaunched {
    border-color: color-mix(in srgb, var(--amber) 45%, transparent);
    background: color-mix(in srgb, var(--amber) 16%, var(--surface));
    color: var(--amber);
    animation: status-pulse 1.6s ease-in-out infinite;
}

.run-timeline-pending {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 0 8px;
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 11px;
}

/* ------------------------------------------------------------------ */
/* Statistics                                                          */
/* ------------------------------------------------------------------ */

.statistics-controls {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 16px;
}

.statistics-range {
    display: inline-flex;
    align-items: center;
    padding: 2px 0;
    border-bottom: 1px solid transparent;
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
}

.statistics-range:hover {
    color: var(--text);
}

.statistics-range.is-active {
    color: var(--text);
    border-bottom-color: var(--accent);
}

.statistics-controls-top {
    display: flex;
    margin-bottom: 16px;
}

.statistics-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    min-width: 220px;
}

.statistics-filter-form .run-filter-field {
    flex: 1 1 220px;
}

.statistics-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.statistics-summary-extended {
    margin-bottom: 0;
}

.statistics-summary-item,
.runtime-overview-card,
.active-runs-summary-item {
    display: grid;
    gap: 2px;
    align-content: start;
    padding: 12px 14px;
    border: 1px solid var(--border);
    background: var(--field);
}

.statistics-summary-label,
.runtime-overview-label,
.active-runs-summary-label,
.health-fact-label,
.health-metric-label {
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.statistics-summary-value,
.runtime-overview-value,
.active-runs-summary-value,
.health-metric-value {
    font-size: 24px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}

.statistics-summary-item-error .statistics-summary-value {
    color: var(--red);
}

.statistics-summary-item-warning .statistics-summary-value {
    color: var(--amber);
}

.statistics-chart-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.statistics-chart {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px;
    margin-top: 14px;
    padding: 8px 0 22px;
}

.statistics-y-axis {
    position: relative;
    height: 190px;
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 10px;
}

.statistics-y-axis span {
    position: absolute;
    right: 0;
    transform: translateY(50%);
    line-height: 1;
}

.statistics-bars {
    position: relative;
    display: flex;
    gap: 2px;
    height: 190px;
    border-left: 1px solid var(--border-strong);
    border-bottom: 1px solid var(--border-strong);
}

.statistics-gridline {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px dashed var(--border);
    pointer-events: none;
}

.statistics-bar-group {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
}

.statistics-bar {
    position: absolute;
    bottom: 0;
    left: 50%;
    min-height: 2px;
    transform: translateX(-50%);
}

.statistics-bar-executions {
    width: min(12px, 100%);
    background: color-mix(in srgb, var(--accent) 70%, var(--surface));
}

.statistics-bar-errors {
    width: min(5px, 45%);
    background: var(--red);
}

.statistics-axis-label {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 10px;
    text-align: center;
    white-space: nowrap;
}

.statistics-step-section {
    margin-top: 24px;
}

/* ------------------------------------------------------------------ */
/* Active runs                                                         */
/* ------------------------------------------------------------------ */

.active-runs-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.active-runs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.active-run-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    background: var(--field);
}

.active-run-card:hover {
    border-color: var(--border-strong);
}

.active-run-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.active-run-title {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

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

.active-run-arrow {
    display: inline-flex;
    color: var(--text-faint);
}

.active-run-arrow .button-icon-svg {
    width: 12px;
    height: 12px;
}

.active-run-duration {
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.active-run-steps {
    display: flex;
    align-items: center;
    gap: 8px 16px;
    flex-wrap: wrap;
}

.active-run-step {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
}

.active-run-step .step-tone-pill {
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: none;
}

.active-run-step-elapsed,
.active-run-step-progress,
.active-run-worker {
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.active-run-step-progress {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.active-run-step-progress-bar {
    position: relative;
    display: inline-block;
    width: 72px;
    height: 4px;
    background: var(--border-strong);
    overflow: hidden;
}

.active-run-step-progress-fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: var(--step-tone-text, var(--accent));
    transition: width 0.4s ease;
}

.active-run-worker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.active-run-worker .button-icon-svg {
    width: 12px;
    height: 12px;
}

.active-run-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.active-run-progress-bar {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 4px;
    background: var(--border-strong);
    overflow: hidden;
}

.active-run-progress-fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: var(--accent);
    transition: width 0.4s ease;
}

.active-run-progress-failed {
    position: absolute;
    top: 0;
    bottom: 0;
    background: var(--red);
}

.active-run-progress-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.active-run-progress-failed-label {
    color: var(--red);
}

.runtime-limiter-fill-warn {
    background: var(--amber);
}

.runtime-limiter-fill-danger {
    background: var(--red);
}

.active-run-activity {
    margin-top: 24px;
}

.active-run-activity-title {
    margin: 0 0 10px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.active-run-activity-empty {
    margin: 0;
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 12px;
}

.active-run-activity-list {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--border-strong);
    max-height: 280px;
    overflow: hidden auto;
    scrollbar-width: thin;
}

.active-run-activity-item {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 7px 10px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.active-run-activity-item:hover {
    background: var(--surface-hover);
}

.active-run-activity-time {
    min-width: 4.2rem;
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.active-run-activity-item .status-badge {
    min-width: 7rem;
}

.active-run-activity-step {
    color: var(--text);
    font-size: 13px;
}

.active-run-activity-run {
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 14rem;
}

.active-run-activity-run:hover {
    color: var(--accent);
}

.active-run-activity-error {
    flex-basis: 100%;
    color: var(--red);
    font-family: var(--font-mono);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Runtime & health                                                    */
/* ------------------------------------------------------------------ */

.runtime-overview-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.runtime-overview-card-warning .runtime-overview-value {
    color: var(--amber);
}

.runtime-overview-card-error .runtime-overview-value {
    color: var(--red);
}

.runtime-overview-hint {
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 11px;
}

.runtime-self-heal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.runtime-self-heal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}

.runtime-step-cell {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    border: 1px solid var(--border-strong);
    background: var(--field);
}

.runtime-step-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.runtime-worker-empty {
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 12px;
}

.health-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.6fr);
    gap: 20px;
    align-items: start;
}

.health-panel {
    min-height: 0;
}

.health-fact-list {
    display: grid;
    gap: 0;
}

.health-fact-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.health-fact-row:last-child {
    border-bottom: 0;
}

.health-fact-value {
    font-family: var(--font-mono);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.health-fact-row-warning .health-fact-value {
    color: var(--amber);
}

.health-fact-row-error .health-fact-value {
    color: var(--red);
}

.health-metric-list {
    display: grid;
    gap: 8px;
}

.health-metric-row {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--green);
    background: var(--field);
}

.health-metric-row-warning {
    border-left-color: var(--amber);
}

.health-metric-row-error {
    border-left-color: var(--red);
}

.health-metric-main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.health-metric-hint {
    color: var(--text-faint);
    font-size: 12px;
}

.health-panel-separator {
    height: 1px;
    margin: 20px 0;
    background: var(--border);
}

.health-findings,
.health-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.health-check,
.health-finding {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--green);
    background: var(--field);
}

.health-check-warning,
.health-finding-warning {
    border-left-color: var(--amber);
}

.health-check-critical,
.health-finding-critical {
    border-left-color: var(--red);
}

.health-check-head,
.health-finding-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
}

.health-check-title,
.health-finding-title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.health-check-message,
.health-finding-message {
    margin: 0;
    color: var(--text-dim);
    font-size: 12px;
    line-height: 1.45;
}

/* ------------------------------------------------------------------ */
/* Home                                                                */
/* ------------------------------------------------------------------ */

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

.home-tile {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

.home-tile:hover {
    border-color: var(--border-strong);
    color: var(--text);
}

.home-tile-label {
    font-size: 15px;
    font-weight: 600;
}

.home-tile-copy {
    color: var(--text-dim);
    font-size: 13px;
}

/* ------------------------------------------------------------------ */
/* Login                                                               */
/* ------------------------------------------------------------------ */

.page-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 24px;
}

.login-shell {
    width: 100%;
    display: flex;
    justify-content: center;
}

.login-panel {
    width: min(400px, 100%);
    padding: 28px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
}

.login-brand {
    display: block;
    height: 30px;
    width: auto;
    margin-bottom: 20px;
}

.login-form {
    display: grid;
    gap: 16px;
    margin-top: 22px;
}

.login-field {
    display: grid;
    gap: 6px;
}

.login-field input {
    min-height: 38px;
}

.login-error {
    margin: 16px 0 0;
}

.login-panel .primary-button {
    width: 100%;
    min-height: 40px;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 900px) {
    table:not(.payload-table),
    table:not(.payload-table) thead,
    table:not(.payload-table) tbody,
    table:not(.payload-table) tr,
    table:not(.payload-table) th,
    table:not(.payload-table) td {
        display: block;
    }

    table:not(.payload-table) thead {
        display: none;
    }

    .run-catalog-table {
        min-width: 0;
    }

    table:not(.payload-table) tr {
        padding: 6px 0;
        border-bottom: 1px solid var(--border-strong);
    }

    table:not(.payload-table) td {
        padding: 6px 10px;
        border-bottom: 0;
    }

    td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        color: var(--text-faint);
        font-family: var(--font-mono);
        font-size: 10px;
        letter-spacing: 0.1em;
        text-transform: uppercase;
    }

    td:not([data-label])::before {
        content: none;
    }

    .workflow-group-header td::before {
        content: none;
    }

    .page {
        padding-left: 16px;
        padding-right: 16px;
    }

    .fluxx-topbar {
        flex-wrap: wrap;
        margin: 0 -16px 24px;
        padding: 8px 16px 0;
        gap: 0;
    }

    .fluxx-topbar-main {
        flex-wrap: wrap;
    }

    .fluxx-brand {
        padding: 0 0 8px;
        margin: 0;
        border-right: 0;
    }

    .fluxx-topbar-actions {
        margin-left: auto;
        padding-bottom: 8px;
    }

    .fluxx-nav {
        flex: 0 0 100%;
        order: 3;
        min-height: 36px;
        margin-bottom: -1px;
        border-top: 1px solid var(--border);
    }

    .header-tools,
    .header-actions,
    .search-form,
    .run-filter-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .search-form .search-input {
        width: 100%;
    }

    .section-tabs {
        gap: 18px;
    }

    .home-grid,
    .runtime-overview-grid,
    .health-layout,
    .workflow-definition-groups,
    .workflow-definition-summary,
    .definition-grid,
    .step-definition-list,
    .payload-grid,
    .run-filter-grid,
    .run-filter-grid-executions,
    .settings-fieldset,
    .settings-grid,
    .active-runs-summary {
        grid-template-columns: 1fr;
    }

    .run-filter-grid-executions .run-filter-field:first-child {
        grid-column: auto;
    }

    .workflow-step-flow,
    .execution-step-flow {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        width: 100%;
        min-width: 0;
        gap: 8px;
    }

    .workflow-step-flow-lines,
    .execution-step-flow-lines {
        display: none;
    }

    .workflow-step-flow-card,
    .step-status-link {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
        width: 100%;
    }

    .execution-step-card {
        width: 100%;
    }

    .run-timeline-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .active-run-progress {
        flex-direction: column;
        align-items: stretch;
    }

    .section-card {
        padding: 16px;
    }
}

/* ------------------------------------------------------------------ */
/* Run detail                                                          */
/* ------------------------------------------------------------------ */

.header-actions {
    display: contents;
}

.run-parameters {
    margin-top: 12px;
}

/* ------------------------------------------------------------------ */
/* Observer: fleet dashboard                                           */
/* ------------------------------------------------------------------ */

.fleet-source-token {
    overflow-wrap: anywhere;
    user-select: all;
}

.fleet-source-card {
    margin-bottom: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.fleet-source-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    padding: 14px 20px;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.fleet-source-summary:hover {
    background: var(--surface-hover);
}

.fleet-source-summary::-webkit-details-marker,
.fleet-source-summary::marker {
    display: none;
    content: '';
}

.fleet-source-identity {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 16px;
    min-width: 0;
}

.fleet-source-name {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.fleet-source-name::before {
    content: "▸ ";
    color: var(--accent);
}

.fleet-source-card[open] .fleet-source-name::before {
    content: "▾ ";
}

.fleet-source-version-badge {
    padding: 1px 6px;
    border: 1px solid var(--border-strong);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
}

.fleet-source-refresh {
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.fleet-source-meta {
    display: flex;
    align-items: center;
    flex: 0 1 auto;
    min-width: 0;
}

.fleet-source-url {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 40ch;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 12px;
}

.fleet-source-url-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fleet-source-url .button-icon-svg {
    width: 13px;
    height: 13px;
}

.fleet-source-body {
    padding: 20px;
    border-top: 1px solid var(--border);
}

/* Observer: supervision report */

.window-switch {
    display: inline-flex;
    border: 1px solid var(--border-strong);
    font-family: var(--font-mono);
    font-size: 12px;
}

.window-switch-option {
    padding: 4px 12px;
    color: var(--text-dim);
}

.window-switch-option.is-active {
    background: var(--surface-raised);
    color: var(--text);
    box-shadow: inset 0 -2px 0 var(--accent);
}

.fleet-source-refresh.is-late {
    color: var(--amber);
}

.fleet-source-body {
    display: grid;
    gap: 22px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1px;
    margin: 0;
    border: 1px solid var(--border);
    background: var(--border);
}

.kpi {
    display: grid;
    align-content: start;
    gap: 4px;
    padding: 12px 14px;
    background: var(--field);
}

.kpi dd {
    margin: 0;
}

.kpi-label,
.report-block-title {
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.report-block-title {
    margin: 0;
}

.kpi-value {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.kpi-note {
    color: var(--text-faint);
    font-size: 12px;
}

.kpi-note.is-bad,
.is-bad {
    color: var(--red);
}

.is-warn {
    color: var(--amber);
}

.report-block {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0;
}

.report-block-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px 16px;
}

.report-legend,
.report-empty {
    margin: 0;
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 11px;
}

.report-empty {
    font-size: 12px;
}

.legend-runs {
    color: var(--accent);
}

.legend-failed {
    color: var(--red);
}

.report-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;
}

.activity {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 72px;
    border-bottom: 1px solid var(--border-strong);
}

.activity-bar {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    justify-content: flex-end;
    min-width: 2px;
    background: color-mix(in srgb, var(--accent) 45%, var(--surface));
}

.activity-bar-failed {
    display: block;
    background: var(--red);
}

.activity-axis {
    display: flex;
    justify-content: space-between;
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 10px;
}

.alert-list,
.error-code-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.alert {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 12px;
    align-items: baseline;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--amber);
    background: var(--field);
}

.alert-critical {
    border-left-color: var(--red);
}

.alert-title {
    font-size: 13px;
    font-weight: 600;
}

.alert-detail {
    grid-column: 2;
    color: var(--text-dim);
    font-size: 12px;
}

.error-code {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 90px 34px;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.error-code-name {
    overflow: hidden;
    font-family: var(--font-mono);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.error-category {
    padding: 1px 6px;
    border: 1px solid var(--border-strong);
    font-family: var(--font-mono);
    font-size: 11px;
}

.error-category-technical {
    color: var(--amber);
}

.error-category-business {
    color: var(--blue);
}

.error-code-bar {
    height: 6px;
    background: var(--surface-raised);
}

.error-code-bar > span {
    display: block;
    height: 6px;
    background: currentColor;
}

.error-code-bar > .error-category-none {
    color: var(--text-faint);
}

.error-code-count {
    font-family: var(--font-mono);
    text-align: right;
}

.report-table-scroll {
    overflow-x: auto;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.report-table th,
.report-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    text-align: left;
    white-space: nowrap;
}

.report-table thead th {
    border-bottom-color: var(--border-strong);
    color: var(--text-faint);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.report-table .is-number {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.report-table .is-code {
    font-family: var(--font-mono);
    font-size: 12px;
}

.overview-kpis {
    margin-bottom: 32px;
}

.overview-section + .overview-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-strong);
}

.overview-section .section-title a {
    color: inherit;
}

.fleet-source-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.confirm-dialog {
    width: min(480px, calc(100vw - 32px));
    padding: 0;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
}

.confirm-dialog::backdrop {
    background: color-mix(in srgb, var(--bg) 75%, transparent);
}

.confirm-dialog-body {
    display: grid;
    gap: 14px;
    padding: 22px 24px;
}

.confirm-dialog-text {
    margin: 0;
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.5;
}

.confirm-dialog-warning {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--red);
    background: var(--field);
    color: var(--text);
}

.confirm-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

.report-health > summary {
    cursor: pointer;
    list-style: none;
}

.report-health > summary::-webkit-details-marker,
.report-health > summary::marker {
    display: none;
    content: '';
}

.report-health > summary::before {
    content: "▸ ";
    color: var(--accent);
}

.report-health[open] > summary::before {
    content: "▾ ";
}

.fleet-health {
    margin-top: 12px;
}

@media (max-width: 900px) {
    .fleet-source-summary {
        flex-wrap: wrap;
        padding: 12px 16px;
    }

    .fleet-source-body {
        padding: 16px;
    }
}
