@font-face {
    font-family: 'TWK Lausanne';
    src: url('/static/TWKLausanne-300.woff2') format('woff2'),
    url('/static/TWKLausanne-300.woff') format('woff'),
    url('/static/TWKLausanne-300.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'TWK Lausanne';
    src: url('/static/TWKLausanne-700.woff2') format('woff2'),
    url('/static/TWKLausanne-700.woff') format('woff'),
    url('/static/TWKLausanne-700.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

:root {
    --cf-black: #000000;
    --cf-white: #ffffff;
    --cf-bg: #f6f6f6;
    --cf-border: #e7e7e7;
    --cf-divider: #7e7e7e;
    --cf-text-secondary: #6d6d6d;
    --cf-blue: #2a66ff;
    --cf-primary-bg: #000000;
    --cf-primary-color: #ffffff;
    --cf-primary-hover-bg: #222222;
    --cf-primary-hover-border: #222222;
}

@media (prefers-color-scheme: dark) {
    :root:not(.light) {
        --cf-black: #e8e8e8;
        --cf-white: #1a1a1a;
        --cf-bg: #242424;
        --cf-border: #3a3a3a;
        --cf-divider: #888888;
        --cf-text-secondary: #999999;
        --cf-blue: #5a8fff;
        --cf-primary-bg: #e8e8e8;
        --cf-primary-color: #1a1a1a;
        --cf-primary-hover-bg: #cccccc;
        --cf-primary-hover-border: #cccccc;
    }

    :root:not(.light) .topbar-logo img {
        filter: brightness(0) invert(1);
    }

    :root:not(.light) .cf-label {
        background: #e8e8e8;
        color: #1a1a1a;
    }

    :root:not(.light) .cf-label--success {
        background: #10b500;
        color: #ffffff;
    }

    :root:not(.light) .cf-label--failure {
        background: #ff5300;
        color: #ffffff;
    }

    :root:not(.light) .cf-label--pending {
        background: var(--cf-blue);
        color: #ffffff;
    }

    :root:not(.light) .cf-status-label {
        color: var(--cf-white);
    }

    :root:not(.light) .cf-note--warning {
        background: #3d2e0a;
        color: #f5c842;
        border-bottom-color: #f5c842;
    }

    :root:not(.light) .cf-note--warning .cf-note-header,
    :root:not(.light) .cf-note--warning .cf-note-title,
    :root:not(.light) .cf-note--warning .cf-note-content p {
        color: #f5c842;
    }

    :root:not(.light) .cf-note--warning .cf-note-btn {
        border-color: #f5c842;
        color: #f5c842;
    }

    :root:not(.light) .cf-note--warning .cf-note-btn:hover {
        background: rgba(245, 200, 66, 0.1);
    }

    :root:not(.light) .cf-note--info {
        background: #0a1e3d;
        color: #7eb3ff;
    }

    :root:not(.light) .cf-note--success {
        background: #1a3a1a;
        color: #6fcf6f;
        border-bottom-color: #6fcf6f;
    }

    :root:not(.light) .cf-note--success .cf-note-header,
    :root:not(.light) .cf-note--success .cf-note-title,
    :root:not(.light) .cf-note--success .cf-note-content p {
        color: #6fcf6f;
    }

    :root:not(.light) .cf-note--success .cf-note-btn {
        border-color: #6fcf6f;
        color: #6fcf6f;
    }

    :root:not(.light) .cf-note--success .cf-note-btn:hover {
        background: rgba(111, 207, 111, 0.1);
    }

    :root:not(.light) img:not(.no-invert) {
        filter: invert(1) hue-rotate(180deg);
    }

    :root:not(.light) .cf-panel-selectable {
        border-color: var(--cf-border);
    }

    :root:not(.light) .cf-panel-selectable:hover {
        border-color: var(--cf-text-secondary);
    }

    :root:not(.light) .cf-panel--selected {
        border-color: var(--cf-black);
    }

    :root:not(.light) .cf-toast--success {
        background: #1a3a1a;
        border-color: #2e7d32;
        color: #6fcf6f;
    }

    :root:not(.light) .cf-toast--error {
        background: #3a1a1a;
        border-color: #c62828;
        color: #f08080;
    }

    :root:not(.light) .cf-toast--note {
        background: #1a2a3a;
        border-color: #3a7cff;
        color: #8ab4ff;
    }

    :root:not(.light) .topbar-avatar {
        background: var(--cf-bg);
    }

    :root:not(.light) .bg-gray-100 {
        background-color: var(--cf-bg);
    }

    :root:not(.light) input,
    :root:not(.light) select,
    :root:not(.light) textarea {
        color-scheme: dark;
    }

    :root:not(.light) .cf-filter-pill {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='5' fill='none'%3E%3Cpath d='M1 1l3.5 3L8 1' stroke='%23e8e8e8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    }

    :root:not(.light) .cf-deploy-overlay lottie-player {
        filter: invert(1);
    }
}

:root.dark {
    --cf-black: #e8e8e8;
    --cf-white: #1a1a1a;
    --cf-bg: #242424;
    --cf-border: #3a3a3a;
    --cf-divider: #888888;
    --cf-text-secondary: #999999;
    --cf-blue: #5a8fff;
    --cf-primary-bg: #e8e8e8;
    --cf-primary-color: #1a1a1a;
    --cf-primary-hover-bg: #cccccc;
    --cf-primary-hover-border: #cccccc;
}

:root.dark .topbar-logo img {
    filter: brightness(0) invert(1);
}

:root.dark .cf-label {
    background: #e8e8e8;
    color: #1a1a1a;
}

:root.dark .cf-label--success {
    background: #10b500;
    color: #ffffff;
}

:root.dark .cf-label--failure {
    background: #ff5300;
    color: #ffffff;
}

:root.dark .cf-label--pending {
    background: var(--cf-blue);
    color: #ffffff;
}

:root.dark .cf-status-label {
    color: var(--cf-white);
}

:root.dark .cf-note--warning {
    background: #3d2e0a;
    color: #f5c842;
    border-bottom-color: #f5c842;
}

:root.dark .cf-note--warning .cf-note-header,
:root.dark .cf-note--warning .cf-note-title,
:root.dark .cf-note--warning .cf-note-content p {
    color: #f5c842;
}

:root.dark .cf-note--warning .cf-note-btn {
    border-color: #f5c842;
    color: #f5c842;
}

:root.dark .cf-note--warning .cf-note-btn:hover {
    background: rgba(245, 200, 66, 0.1);
}

:root.dark .cf-note--info {
    background: #0a1e3d;
    color: #7eb3ff;
}

:root.dark .cf-note--success {
    background: #1a3a1a;
    color: #6fcf6f;
    border-bottom-color: #6fcf6f;
}

:root.dark .cf-note--success .cf-note-header,
:root.dark .cf-note--success .cf-note-title,
:root.dark .cf-note--success .cf-note-content p {
    color: #6fcf6f;
}

:root.dark .cf-note--success .cf-note-btn {
    border-color: #6fcf6f;
    color: #6fcf6f;
}

:root.dark .cf-note--success .cf-note-btn:hover {
    background: rgba(111, 207, 111, 0.1);
}

:root.dark img:not(.no-invert) {
    filter: invert(1) hue-rotate(180deg);
}

:root.dark .cf-panel-selectable {
    border-color: var(--cf-border);
}

:root.dark .cf-panel-selectable:hover {
    border-color: var(--cf-text-secondary);
}

:root.dark .cf-panel--selected {
    border-color: var(--cf-black);
}

:root.dark .cf-toast--success {
    background: #1a3a1a;
    border-color: #2e7d32;
    color: #6fcf6f;
}

:root.dark .cf-toast--error {
    background: #3a1a1a;
    border-color: #c62828;
    color: #f08080;
}

:root.dark .cf-toast--note {
    background: #1a2a3a;
    border-color: #3a7cff;
    color: #8ab4ff;
}

:root.dark .topbar-avatar {
    background: var(--cf-bg);
}

:root.dark .bg-gray-100 {
    background-color: var(--cf-bg);
}

:root.dark .cf-filter-pill {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='5' fill='none'%3E%3Cpath d='M1 1l3.5 3L8 1' stroke='%23e8e8e8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

:root.dark input, :root.dark select, :root.dark textarea {
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

a {
    color: var(--cf-black);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

body {
    font-family: 'TWK Lausanne', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 300;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--cf-white);
    color: var(--cf-black);
    font-size: 14px;
}

.main-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: var(--cf-white);
    border-bottom: 1px solid var(--cf-border);
    padding: 12px 32px;
    flex-shrink: 0;
    position: relative;
    z-index: 200;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
    flex: 1;
}

.topbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-logo img {
    width: 129px;
    height: 24px;
    display: block;
    transition: filter 0.2s;
}

.cf-beta-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: var(--cf-primary-bg);
    color: var(--cf-primary-color);
    padding: 3px 8px;
    border-radius: 4px;
    line-height: 1;
}

.cf-version-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--cf-text-secondary);
    border: 1px solid var(--cf-border);
    padding: 3px 8px;
    border-radius: 4px;
    line-height: 1;
}

.topbar-divider {
    color: #d1d1d1;
    font-size: 16px;
    font-weight: 300;
    line-height: 16px;
    user-select: none;
}

.topbar-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    min-width: 0;
}

.topbar-crumb {
    font-size: 16px;
    font-weight: 300;
    color: var(--cf-black);
    text-decoration: none;
    white-space: nowrap;
    line-height: 16px;
}

.topbar-crumb:hover {
    text-decoration: none;
    opacity: 0.7;
}

.topbar-crumb--active {
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-crumb-sep {
    color: #d1d1d1;
    font-size: 16px;
    font-weight: 300;
    line-height: 16px;
    user-select: none;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 32px;
}

.topbar-menu {
    position: relative;
}

.topbar-menu-trigger {
    font-size: 16px;
    font-weight: 300;
    line-height: 16px;
    color: var(--cf-black);
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    font-family: inherit;
    padding: 0;
}

.topbar-menu-trigger:hover {
    opacity: 0.7;
}

.topbar-menu-trigger.active {
    font-weight: 700;
}

.topbar-menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    background: var(--cf-white);
    border: 1px solid var(--cf-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    min-width: 200px;
    z-index: 50;
}

.topbar-menu.open .topbar-menu-dropdown {
    display: block;
}

.topbar-menu-item {
    display: block;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 300;
    color: var(--cf-black);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 1px solid var(--cf-border);
}

.topbar-menu-item:last-child {
    border-bottom: none;
}

.topbar-menu-item:hover {
    background: var(--cf-bg);
    text-decoration: none;
}

.topbar-menu-item.active {
    font-weight: 700;
}

.topbar-menu-group {
    padding: 8px 16px 4px;
    font-size: 10px;
    font-weight: bold;
    color: var(--cf-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar-menu-group iconify-icon {
    transition: transform 0.2s;
}

.topbar-menu-group.expanded iconify-icon {
    transform: rotate(180deg);
}

.topbar-item {
    font-size: 16px;
    font-weight: 300;
    line-height: 16px;
    color: var(--cf-black);
    text-decoration: none;
    white-space: nowrap;
}

.topbar-item:hover {
    text-decoration: none;
    opacity: 0.7;
}

.topbar-item.active {
    font-weight: 700;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}

.topbar-util-link {
    font-size: 14px;
    font-weight: 300;
    color: var(--cf-text-secondary);
    text-decoration: none;
    white-space: nowrap;
}

.topbar-util-link:hover {
    color: var(--cf-black);
    text-decoration: none;
}

.topbar-util-link.active {
    color: var(--cf-black);
    font-weight: 700;
}

.topbar-task-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--cf-black);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    position: relative;
}

.topbar-task-btn:hover {
    opacity: 0.7;
}

.topbar-task-btn.has-running iconify-icon {
    animation: spin 1.5s linear infinite;
}

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

.topbar-task-count {
    font-size: 11px;
    font-weight: bold;
    background: var(--cf-black);
    color: var(--cf-white);
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--cf-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--cf-blue);
    cursor: pointer;
    flex-shrink: 0;
}

.topbar-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--cf-black);
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.topbar-profile:hover .topbar-avatar {
    opacity: 0.7;
}

#profile-menu .topbar-menu-dropdown {
    min-width: 140px;
}

.secondary-sidebar {
    width: 304px;
    background-color: var(--cf-bg);
    border-right: 1px solid var(--cf-border);
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-x: visible;
    overflow-y: clip;
    flex-shrink: 0;
    padding: 40px 32px;
}

.secondary-sidebar-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--cf-black);
    line-height: 1;
}

.secondary-sidebar-header {
    font-size: 12px;
    font-weight: bold;
    color: var(--cf-black);
}

.secondary-sidebar-divider {
    height: 1px;
    background-color: var(--cf-border);
    width: 100%;
}

.secondary-sidebar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--cf-black);
    text-decoration: none;
    font-size: 14px;
    font-weight: 300;
    cursor: pointer;
}

.secondary-sidebar-item:hover {
    color: var(--cf-text-secondary);
}

.secondary-sidebar-item.active {
    font-weight: bold;
}

.secondary-sidebar [data-tooltip]:hover::after {
    bottom: auto;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
}

.secondary-sidebar [data-tooltip]:hover::before {
    bottom: auto;
    left: calc(100% + 2px);
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: var(--cf-black);
}

.secondary-sidebar-item svg,
.secondary-sidebar-item iconify-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.content-wrapper {
    display: flex;
    flex: 1;
    min-height: 0;
}

.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* toolbar-btn kept for backward compat in page templates */
.toolbar-btn {
    padding: 8px 12px;
    border: 1px solid var(--cf-black);
    background: var(--cf-white);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    font-weight: 300;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--cf-black);
    text-decoration: none;
}

.toolbar-btn:hover {
    background: var(--cf-bg);
}

.toolbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.content-body {
    flex: 1;
    padding: 32px 48px;
    overflow-y: auto;
    background-color: var(--cf-white);
    display: flex;
    flex-direction: column;
    position: relative;
    gap: 16px;
}

.content-body > .btn-cf {
    align-self: flex-start;
}

.content-body > form:not(.cf-filter-bar) {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.content-body > form:not(.cf-filter-bar) > .btn-cf {
    align-self: flex-start;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    flex-shrink: 0;
}

.page-header-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.page-title {
    font-size: 32px;
    font-weight: bold;
    color: var(--cf-black);
    line-height: 1;
    margin: 0;
}

.top-right-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.icon-btn-round {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: var(--cf-black);
    color: var(--cf-white);
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
}

.icon-btn-round:hover {
    opacity: 0.85;
}

.icon-btn-round--notify::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    background: #e53e3e;
    border-radius: 50%;
    border: 2px solid var(--cf-white);
}


.tasks-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 100;
    display: none;
}

.tasks-panel-overlay.open {
    display: block;
}

.tasks-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: var(--cf-white);
    border-left: 1px solid var(--cf-border);
    z-index: 101;
    display: flex;
    flex-direction: column;
    padding: 24px;
    gap: 24px;
    transform: translateX(100%);
    transition: transform 0.2s ease;
}

.tasks-panel-overlay.open .tasks-panel {
    transform: translateX(0);
}

.tasks-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.tasks-panel-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--cf-black);
    line-height: 1;
}

.tasks-panel-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--cf-text-secondary);
    font-size: 24px;
    line-height: 1;
    font-family: inherit;
}

.tasks-panel-close:hover {
    color: var(--cf-black);
}

.tasks-panel-list {
    flex: 1;
    overflow-y: auto;
}

.tasks-panel-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px 0;
    border-top: 1px solid var(--cf-black);
    text-decoration: none;
    color: inherit;
}

.tasks-panel-item:last-child {
    border-bottom: 1px solid var(--cf-black);
}

.tasks-panel-item:hover {
    text-decoration: none;
    opacity: 0.7;
}

.tasks-panel-item-title {
    font-size: 14px;
    font-weight: bold;
    color: var(--cf-black);
}

.tasks-panel-item-sub {
    font-size: 14px;
    font-weight: 300;
    color: var(--cf-text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tasks-panel-item-time {
    font-size: 12px;
    white-space: nowrap;
    margin-left: 8px;
}

.tasks-panel-footer {
    flex-shrink: 0;
}

.tasks-panel-footer a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--cf-black);
    border-radius: 4px;
    padding: 16px;
    font-size: 16px;
    font-weight: 300;
    color: var(--cf-black);
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--cf-border);
    background: var(--cf-white);
    padding: 0 16px;
}

.tab {
    padding: 10px 16px;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: -1px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 300;
    background: none;
}

.tab.active {
    background: var(--cf-white);
    border-color: var(--cf-border);
    border-top: 2px solid var(--cf-black);
    font-weight: bold;
}

.cf-grid {
    width: 100%;
    font-size: 14px;
}

.cf-display-section {
    background: var(--cf-bg);
    padding: 32px;
    width: 600px;
    max-width: 100%;
}

.cf-display-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 24px;
}

.cf-display-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--cf-black);
    line-height: 1;
}

.cf-display-row {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    border-top: 1px solid var(--cf-border);
    align-items: flex-start;
}

.cf-display-label {
    width: 200px;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: bold;
    color: var(--cf-black);
    padding: 8px 0;
}

.cf-display-value {
    flex: 1;
    font-size: 14px;
    font-weight: 300;
    color: var(--cf-black);
    padding: 8px 0;
    min-width: 0;
    word-break: break-all;
}

.cf-tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid var(--cf-text-secondary);
    color: var(--cf-text-secondary);
    font-size: 10px;
    font-weight: bold;
    cursor: help;
    flex-shrink: 0;
    position: relative;
    vertical-align: middle;
    margin-left: 4px;
    pointer-events: auto;
}

.cf-tooltip-icon--clickable {
    cursor: pointer;
}

.cf-tooltip-icon--clickable:hover {
    border-color: var(--cf-black);
    color: var(--cf-black);
}

.cf-tooltip-text {
    display: none;
    position: fixed;
    background: var(--cf-black);
    color: var(--cf-white);
    font-size: 12px;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 4px;
    white-space: normal;
    max-width: 300px;
    z-index: 10000;
    pointer-events: none;
}



/* Form field disabled state */
.cf-field-disabled {
    opacity: 0.4;
}

.cf-field-disabled .cf-tooltip-icon {
    opacity: calc(1 / 0.4);
}

.cf-field-disabled td {
    pointer-events: none;
}

.cf-field-disabled .cf-toggle {
    opacity: calc(1 / 0.4);
}

.cf-field-disabled .cf-toggle-track {
    background: #ccc;
}

.cf-panel--disabled-with-tooltip {
    cursor: default;
    position: relative;
}

.cf-panel--faded {
    opacity: 0.4;
}

.cf-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cf-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cf-toggle-track {
    position: absolute;
    inset: 0;
    background: var(--cf-border);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.cf-toggle-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--cf-white);
    transition: transform 0.2s;
}

.cf-toggle input:checked + .cf-toggle-track {
    background: var(--cf-black);
}

.cf-toggle input:checked + .cf-toggle-track::after {
    transform: translateX(20px);
}

.cf-toggle input:disabled + .cf-toggle-track {
    opacity: 0.4;
    cursor: not-allowed;
}

.cf-expandable {
    background: var(--cf-bg);
    padding: 24px 32px;
    cursor: pointer;
    width: 600px;
    max-width: 100%;
}

.cf-modal .cf-expandable {
    width: 100%;
    padding: 0;
    background: transparent;
}

.cf-expandable-header {
    display: flex;
    align-items: center;
    gap: 24px;
}

.cf-expandable-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--cf-black);
}

.cf-expandable-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cf-expandable-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--cf-black);
    line-height: 16px;
}

.cf-expandable-subtitle {
    font-size: 14px;
    font-weight: 300;
    color: var(--cf-text-secondary);
}

.cf-expandable-toggle {
    width: 44px;
    height: 24px;
    border-radius: 12px;
    background: var(--cf-border);
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s;
}

.cf-expandable-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--cf-white);
    transition: transform 0.2s;
}

.cf-expandable.open .cf-expandable-toggle {
    background: var(--cf-black);
}

.cf-expandable.open .cf-expandable-toggle::after {
    transform: translateX(20px);
}

.cf-expandable-content {
    display: none;
    padding-top: 24px;
}

.cf-expandable.open .cf-expandable-content {
    display: block;
}

.cf-tab-group {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.cf-tab-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    font-size: 16px;
    font-weight: bold;
    line-height: 16px;
    color: var(--cf-black);
    cursor: pointer;
    white-space: nowrap;
}

.cf-tab-item:hover {
    border-bottom-color: var(--cf-border);
}

.cf-tab-item.active {
    border-bottom-color: var(--cf-black);
}

.cf-form-section {
    background: var(--cf-bg);
    padding: 32px;
    width: 600px;
    max-width: 100%;
}

.cf-form-section-header {
    font-size: 20px;
    font-weight: bold;
    color: var(--cf-black);
    line-height: 1;
    padding-bottom: 24px;
}

.cf-grid:not(:has(thead)) {
    border-collapse: separate;
    border-spacing: 0 8px;
}

.cf-grid:not(:has(thead)) th {
    background: transparent;
    text-align: left;
    padding: 16px 8px 16px 0;
    font-weight: bold;
    font-size: 14px;
    width: 200px;
    vertical-align: middle;
}

.cf-grid:not(:has(thead)) td {
    padding: 8px 12px;
    background: var(--cf-white);
    border: none;
    vertical-align: middle;
}

.cf-grid:not(:has(thead)) td:has(.cf-toggle) {
    background: transparent;
    padding: 8px 0;
}

.cf-grid:not(:has(thead)) td input,
.cf-grid:not(:has(thead)) td select,
.cf-grid:not(:has(thead)) td textarea {
    border: none;
    background: transparent;
    width: 100%;
    padding: 0;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    font-weight: 300;
    color: var(--cf-black);
    min-height: 32px;
    line-height: 16px;
}

.cf-grid:not(:has(thead)) td input::placeholder,
.cf-grid:not(:has(thead)) td textarea::placeholder {
    color: var(--cf-text-secondary);
}


.cf-grid:has(thead) {
    border-collapse: collapse;
}

.cf-grid:has(thead) thead th {
    font-size: 12px;
    font-weight: bold;
    color: var(--cf-black);
    text-align: left;
    padding: 8px 16px 16px 0;
    border-bottom: 1px solid var(--cf-black);
    vertical-align: middle;
    background: transparent;
    white-space: nowrap;
}

.cf-sort-header {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}

.cf-sort-header:hover {
    text-decoration: none;
    opacity: 0.7;
}

.cf-grid:has(thead) tbody td {
    padding: 16px 16px 16px 0;
    border-bottom: 1px solid var(--cf-border);
    background: transparent;
    vertical-align: middle;
    height: 65px;
}

.cf-grid:has(thead) thead th:first-child,
.cf-grid:has(thead) tbody td:first-child {
    padding-left: 16px;
}

.cf-grid:has(thead) thead th:last-child,
.cf-grid:has(thead) tbody td:last-child {
    padding-right: 16px;
}

.cf-grid:has(thead) tbody td a:not(.btn-cf) {
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 2px;
    font-weight: bold;
    transition: text-decoration-color 0.25s ease;
}

.cf-grid:has(thead) tbody td a:not(.btn-cf):hover {
    text-decoration-color: var(--cf-black);
}

/* Label badge: black bg, white 12px bold text */
.cf-label {
    display: inline-block;
    background: var(--cf-black);
    color: var(--cf-white);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 6px;
    line-height: normal;
    white-space: nowrap;
}

.cf-label-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cf-label--success {
    background: #10b500;
}

.cf-label--failure {
    background: #ff5300;
}

.cf-label--pending {
    background: var(--cf-blue);
}

/* Status label: solid color pill for deployment status */
.cf-status-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--cf-white);
    background: var(--cf-text-secondary);
    padding: 5px 6px;
    line-height: normal;
    white-space: nowrap;
}

.cf-status-label--success {
    background: #10b500;
}

.cf-status-label--failure {
    background: #ff5300;
}

.cf-status-label--pending {
    background: var(--cf-blue);
}

.cf-connect-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--cf-bg);
    padding: 16px 24px;
    gap: 24px;
}

.cf-connect-card-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cf-connect-card-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cf-connect-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--cf-black);
}

.cf-connect-card-subtitle {
    font-size: 14px;
    font-weight: 300;
    color: var(--cf-text-secondary);
}

.cf-connect-card-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.cf-connect-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--cf-black);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 300;
    font-family: inherit;
    color: var(--cf-black);
    background: none;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.cf-connect-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.cf-connect-btn--copied {
    border-color: #10b500;
    color: #10b500;
}

.cf-connect-btn--primary {
    background: var(--cf-primary-bg);
    color: var(--cf-primary-color);
    border-color: var(--cf-primary-bg);
}

.cf-connect-btn--primary:hover {
    background: var(--cf-primary-hover-bg);
    border-color: var(--cf-primary-hover-border);
}

.cf-panel {
    background: var(--cf-bg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.cf-panel-header {
    font-weight: bold;
    font-size: 12px;
    color: var(--cf-black);
}

.cf-panel-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    flex: 1;
}

.cf-panel-icon {
    width: 32px;
    height: 32px;
    color: var(--cf-black);
}

/* Selectable panels (product tiles, group tiles) */
.cf-panel-selectable {
    cursor: pointer;
    transition: border-color 0.15s;
    border: 1px solid var(--cf-border);
    height: 100%;
}

.cf-panel-selectable:hover {
    border-color: var(--cf-text-secondary);
}

.cf-panel--selected {
    border-color: var(--cf-black);
}

.cf-group-tile--active {
    border-color: #2e7d32;
    background: rgba(46, 125, 50, 0.05);
}

/* Data panels: restore left alignment, full width */
.cf-panel:has(.cf-grid),
.cf-panel:has(.cf-panel-header[onclick]) {
    align-items: stretch;
    text-align: left;
}

.cf-panel:has(.cf-grid) .cf-panel-header,
.cf-panel:has(.cf-panel-header[onclick]) .cf-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cf-panel:has(.cf-grid) .cf-panel-body,
.cf-panel:has(.cf-panel-header[onclick]) .cf-panel-body {
    align-items: stretch;
}

.cluster-selector {
    position: relative;
    display: flex;
    align-items: center;
}

.cluster-selector-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border: 1px solid var(--cf-border);
    background: var(--cf-white);
    font-size: 12px;
    font-family: inherit;
    font-weight: 300;
    color: var(--cf-black);
    cursor: pointer;
    white-space: nowrap;
    height: 32px;
}

.cluster-selector-btn:hover {
    border-color: var(--cf-black);
}

.cluster-selector-label {
    color: var(--cf-text-secondary);
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cluster-selector-value {
    font-weight: 700;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cluster-selector-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: var(--cf-white);
    border: 1px solid var(--cf-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 50;
}

.cluster-selector.open .cluster-selector-dropdown {
    display: block;
}

.cluster-selector-option {
    display: block;
    width: 100%;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 300;
    color: var(--cf-black);
    text-decoration: none;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    border-bottom: 1px solid var(--cf-border);
}

.cluster-selector-option:last-child {
    border-bottom: none;
}

.cluster-selector-option:hover {
    background: var(--cf-bg);
}

.cluster-selector-option.active {
    font-weight: 700;
}

.cf-sort-filter-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 300;
    color: var(--cf-black);
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    padding: 4px 8px;
    position: relative;
}

.cf-sort-filter-trigger:hover {
    opacity: 0.7;
}

.cf-dialog {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 285px;
    background: var(--cf-bg);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
    padding: 24px;
    z-index: 50;
}

.cf-dialog.open {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.cf-dialog-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--cf-black);
    line-height: 1;
}

.cf-dialog-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cf-dialog-select {
    background: var(--cf-white);
    padding: 8px 12px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cf-dialog-select-label {
    font-size: 10px;
    font-weight: bold;
    color: var(--cf-black);
    line-height: 12px;
}

.cf-dialog-select select {
    border: none;
    background: transparent;
    font-size: 14px;
    font-family: inherit;
    font-weight: 300;
    color: var(--cf-black);
    outline: none;
    width: 100%;
    padding: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.cf-dialog-divider {
    height: 1px;
    background: var(--cf-border);
    width: 100%;
}

.cf-dialog-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 24px;
}

.cf-dialog-toggle-label {
    flex: 1;
    font-size: 14px;
    font-weight: 300;
    color: var(--cf-black);
}

.cf-dialog-footer {
    border-top: 1px solid var(--cf-black);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.cf-dialog-btn {
    padding: 8px 12px;
    border: 1px solid var(--cf-black);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    font-weight: 300;
    cursor: pointer;
    line-height: 16px;
    text-align: center;
}

.cf-dialog-btn--outline {
    background: transparent;
    color: var(--cf-black);
}

.cf-dialog-btn--outline:hover {
    background: var(--cf-white);
}

.cf-dialog-btn--filled {
    background: var(--cf-black);
    color: var(--cf-white);
}

.cf-dialog-btn--filled:hover {
    background: #222;
}

.cf-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--cf-bg);
    padding: 12px;
}

.cf-filter-bar .cf-filter-search {
    margin-right: 8px;
}

.cf-filter-bar .cf-filter-label {
    margin-right: 4px;
}

.cf-filter-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--cf-white);
    padding: 12px;
    width: 230px;
    height: 40px;
}

.cf-filter-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    font-weight: 300;
    color: var(--cf-black);
    flex: 1;
    min-width: 0;
    line-height: 16px;
}

.cf-filter-search input::placeholder {
    color: var(--cf-text-secondary);
}

.cf-filter-search iconify-icon {
    flex-shrink: 0;
    color: var(--cf-text-secondary);
}

.cf-filter-label {
    font-size: 12px;
    font-weight: bold;
    color: var(--cf-black);
}

.cf-filter-bar .btn-cf {
    padding: 8px 12px;
    font-size: 14px;
    height: 40px;
    box-sizing: border-box;
}

.cf-filter-pill {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 1px solid #888;
    border-radius: 999px;
    padding: 12px 36px 12px 12px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    line-height: 16px;
    color: var(--cf-black);
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='5' fill='none'%3E%3Cpath d='M1 1l3.5 3L8 1' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
    cursor: pointer;
    white-space: nowrap;
}

.cf-filter-pill:hover {
    border-color: var(--cf-black);
}

.cf-filter-pill:focus {
    outline: none;
    border-color: var(--cf-black);
}

.cf-filter-clear {
    font-size: 14px;
    font-weight: 300;
    color: var(--cf-black);
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
}

.cf-filter-clear:hover {
    opacity: 0.7;
}

.cf-related-section {
    margin-top: 16px;
}

.cf-section-card {
    background: var(--cf-bg);
    padding: 32px;
}

.cf-section-card .cf-related-header {
    padding-bottom: 24px;
}

.cf-related-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.cf-related-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--cf-black);
    line-height: 1;
}

.cf-bulk-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.cf-bulk-toggle-label {
    font-size: 12px;
    font-weight: 300;
    color: var(--cf-text-secondary);
}

.cf-related-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    min-height: 48px;
    border-top: 1px solid var(--cf-border);
    gap: 12px;
    flex-wrap: wrap;
}

.cf-related-row:last-child {
    border-bottom: 1px solid var(--cf-border);
}

.cf-related-row-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    min-height: 24px;
}

.cf-related-row-name {
    font-size: 14px;
    font-weight: 300;
    color: var(--cf-black);
    text-decoration: underline;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cf-related-row-actions {
    flex-shrink: 0;
    position: relative;
}

.cf-dots-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--cf-black);
    padding: 4px;
    display: flex;
    align-items: center;
}

.cf-dots-btn:hover {
    opacity: 0.6;
}

.cf-dots-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--cf-white);
    border: 1px solid var(--cf-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 20;
    min-width: 140px;
}

.cf-dots-menu.show {
    display: block;
}

.cf-dots-menu-item {
    display: block;
    width: 100%;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 300;
    color: var(--cf-black);
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.cf-dots-menu-item:hover {
    background: var(--cf-bg);
}

.cf-dots-menu-item--danger {
    color: #dc2626;
}

.btn-add-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f97316, #ec4899);
    color: var(--cf-white);
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.btn-add-circle:hover {
    opacity: 0.85;
}

.cf-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 64px;
    z-index: 1000;
}

.cf-modal {
    background: var(--cf-bg);
    width: 620px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cf-modal--wide {
    width: 960px;
    background: var(--cf-white);
}

.cf-modal--wide .cf-grid:not(:has(thead)) td {
    background: var(--cf-bg);
}

.cf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.cf-modal-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--cf-black);
}

.cf-modal-close {
    background: none;
    border: 1px solid var(--cf-black);
    border-radius: 50%;
    cursor: pointer;
    color: var(--cf-black);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 16px;
    line-height: 1;
    font-family: inherit;
    flex-shrink: 0;
}

.cf-modal-close:hover {
    background: var(--cf-bg);
}

.cf-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cf-modal-footer {
    border-top: 1px solid var(--cf-black);
    margin-top: 24px;
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.cf-modal-footer .btn-cf-blue {
    margin-left: auto;
}

.cf-manage-section {
    border-bottom: 1px solid var(--cf-black);
    padding-bottom: 32px;
    margin-top: 40px;
}

.cf-manage-heading {
    font-size: 16px;
    font-weight: bold;
    color: var(--cf-black);
    line-height: 1;
    margin-bottom: 24px;
}

.cf-action-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
    border-top: 1px solid var(--cf-border);
    min-width: 320px;
    color: var(--cf-black);
    font-size: 14px;
    font-weight: 300;
    font-family: inherit;
    background: none;
    border-left: none;
    border-right: none;
    border-bottom: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

a.cf-action-row {
    text-decoration: none;
}

a.cf-action-row:hover,
button.cf-action-row:hover {
    text-decoration: none;
    opacity: 0.7;
}

.cf-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--cf-black);
    color: var(--cf-white);
    flex-shrink: 0;
}

.cf-action-row--danger .cf-action-icon {
    background: #dc2626;
}

.cf-action-row--disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

input, select, textarea, button {
    font-size: 14px;
    font-family: 'TWK Lausanne', -apple-system, sans-serif;
    font-weight: 300;
}

.btn-cf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--cf-white);
    border: 1px solid var(--cf-black);
    padding: 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-family: inherit;
    font-weight: 300;
    color: var(--cf-black);
    text-decoration: none;
    line-height: 16px;
}

.btn-cf:hover {
    background: var(--cf-bg);
}

.btn-cf-primary {
    background: var(--cf-primary-bg);
    color: var(--cf-primary-color);
    border-color: var(--cf-primary-bg);
}

.btn-cf-primary:hover {
    background: var(--cf-primary-hover-bg);
    border-color: var(--cf-primary-hover-border);
}

.btn-cf:disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

.cf-grid .btn-cf,
.cf-panel .btn-cf {
    padding: 8px 12px;
    font-size: 14px;
}

.cf-panel-header .btn-cf-primary {
    background: var(--cf-white);
    color: var(--cf-black);
    border-color: var(--cf-black);
}

.cf-panel-header .btn-cf-primary:hover {
    background: var(--cf-bg);
}

.status-badge {
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
    padding: 5px 6px;
    display: inline-block;
    line-height: normal;
    letter-spacing: 0.04em;
    background: var(--cf-black);
    color: var(--cf-white);
}

.status-badge.status-success {
    background: #10b500;
}

.status-badge.status-failure, .status-badge.status-error, .status-badge.status-revoked {
    background: #dc2626;
}

.status-badge.status-running, .status-badge.status-started {
    background: var(--cf-blue);
}

.status-badge.status-pending {
    background: var(--cf-black);
}

.cf-highlight,
.cf-grid tbody tr.cf-highlight td {
    background: rgba(42, 102, 255, 0.06);
    border-radius: 8px;
    padding: 16px;
}

.cf-grid tbody tr.task-row-highlight td {
    background: rgba(42, 102, 255, 0.06);
}

.task-row-revoked {
    opacity: 0.4;
}

.cf-spec-card {
    margin-bottom: 32px;
}

.cf-spec-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.cf-spec-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--cf-black);
    line-height: 1;
}

.cf-spec-results {
    border-top: 1px solid var(--cf-black);
}

.cf-spec-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--cf-border);
}

.cf-spec-row-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.cf-spec-row-text {
    font-size: 14px;
    font-weight: 300;
    color: var(--cf-black);
}

.icon-success {
    color: #2e7d32;
}

.icon-failure {
    color: #c62828;
}

.pagination-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.pagination {
    display: flex;
    gap: 4px;
}

.pagination-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--cf-border);
    background: var(--cf-white);
    text-decoration: none;
    color: var(--cf-black);
    font-size: 14px;
    font-weight: 300;
    line-height: 1;
}

.pagination-item:hover {
    background: var(--cf-bg);
    text-decoration: none;
}

.pagination-item.active {
    background: var(--cf-black);
    color: var(--cf-white);
    border-color: var(--cf-black);
    font-weight: 700;
}

.pagination-item.disabled {
    color: var(--cf-text-secondary);
    pointer-events: none;
    opacity: 0.4;
}

.pagination-jump {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 300;
    color: var(--cf-black);
}

.pagination-jump input {
    width: 48px;
    height: 36px;
    border: 1px solid var(--cf-border);
    background: var(--cf-white);
    text-align: center;
    font-size: 14px;
    font-family: inherit;
    font-weight: 300;
    color: var(--cf-black);
    outline: none;
}

.pagination-jump input::placeholder {
    color: var(--cf-text-secondary);
}

.pagination-jump button {
    height: 36px;
    padding: 0 16px;
    background: var(--cf-black);
    color: var(--cf-white);
    border: none;
    font-size: 16px;
    font-family: inherit;
    font-weight: 300;
    cursor: pointer;
}

.pagination-jump button:hover {
    background: #222;
}

.login-container {
    display: flex;
    min-height: 100vh;
}

.login-left {
    width: 50%;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.login-hero {
    height: 50%;
    background: var(--cf-bg);
    overflow: hidden;
}

.login-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 85%;
    filter: none;
}

.login-pitch {
    height: 50%;
    background: var(--cf-black);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 64px;
}

.login-pitch-heading {
    font-size: 40px;
    font-weight: 300;
    color: var(--cf-white);
    line-height: 1;
    margin-bottom: 32px;
}

.login-logo-grid {
    display: flex;
    align-items: center;
    gap: 32px;
}

.login-logo-grid img {
    height: 48px;
    width: auto;
    opacity: 0.5;
}

.login-logo-grid img.invert {
    filter: invert(1);
}

.login-right {
    width: 50%;
    background: var(--cf-white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px;
}

.login-form-wrapper {
    width: 480px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.login-logo img {
    width: 100%;
    height: auto;
    filter: none;
}

.login-badges {
    display: flex;
    gap: 8px;
    margin-top: -36px;
}

.login-badges .cf-beta-badge,
.login-badges .cf-version-badge {
    font-size: 12px;
    padding: 4px 10px;
}

.login-fields {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.login-input {
    width: 100%;
    border: none;
    border-bottom: 1px solid #888;
    padding: 16px 0;
    font-size: 32px;
    font-family: inherit;
    font-weight: 300;
    color: var(--cf-black);
    background: transparent;
    outline: none;
    line-height: 1;
}

.login-input::placeholder {
    color: var(--cf-text-secondary);
}

.login-input:focus {
    border-bottom-color: var(--cf-black);
}

.login-error {
    background: #ffecd3;
    border-bottom: 1px solid #82280c;
    color: #82280c;
    padding: 16px;
    font-size: 14px;
    line-height: 16px;
    font-weight: 300;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-error iconify-icon {
    flex-shrink: 0;
}

.cf-note {
    background: #d9e6ff;
    border-bottom: 1px solid #172cb6;
    padding: 24px 24px 24px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cf-note-header {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #172cb6;
}

.cf-note-title {
    font-size: 14px;
    font-weight: bold;
    line-height: 16px;
    color: #172cb6;
}

.cf-note-content {
    padding-left: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.cf-note-content p {
    font-size: 14px;
    font-weight: 300;
    line-height: 16px;
    color: #172cb6;
}

.cf-note-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid #172cb6;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 300;
    line-height: 16px;
    color: #172cb6;
    text-decoration: none;
}

.cf-note-btn:hover {
    background: rgba(23, 44, 182, 0.08);
}

.cf-note--warning {
    background: #ffecd3;
    border-bottom-color: #82280c;
}

.cf-note--warning .cf-note-header,
.cf-note--warning .cf-note-title,
.cf-note--warning .cf-note-content p {
    color: #82280c;
}

.cf-note--warning .cf-note-btn {
    border-color: #82280c;
    color: #82280c;
}

.cf-note--warning .cf-note-btn:hover {
    background: rgba(130, 40, 12, 0.08);
}

.cf-note--success {
    background: #d2ffc5;
    border-bottom-color: #115b0c;
}

.cf-note--success .cf-note-header,
.cf-note--success .cf-note-title,
.cf-note--success .cf-note-content p {
    color: #115b0c;
}

.cf-note--success .cf-note-btn {
    border-color: #115b0c;
    color: #115b0c;
}

.cf-note--success .cf-note-btn:hover {
    background: rgba(17, 91, 12, 0.08);
}

.login-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 16px;
    border: 2px solid var(--cf-black);
    border-radius: 8px;
    background: transparent;
    font-size: 32px;
    font-family: inherit;
    font-weight: 300;
    color: var(--cf-black);
    cursor: pointer;
    line-height: 1;
}

.login-btn:hover {
    background: var(--cf-bg);
}

.form-group {
    margin-bottom: 16px;
}

.form-group-large {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 13px;
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--cf-border);
    box-sizing: border-box;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

.form-input:focus {
    border-color: var(--cf-black);
}

.form-actions {
    text-align: right;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-grow {
    flex-grow: 1;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.justify-end {
    justify-content: flex-end;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.w-full {
    width: 100%;
}

.w-200 {
    width: 200px;
}

.h-full {
    height: 100%;
}

.h-32 {
    height: 8rem;
}

.h-48 {
    height: 12rem;
}

.h-64 {
    height: 16rem;
}

.hidden {
    display: none !important;
}

.tab-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tab-content.hidden {
    display: none;
}

.inline {
    display: inline;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-05 {
    margin-bottom: 0.125rem;
}

.ml-4 {
    margin-left: 1rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.pb-4 {
    padding-bottom: 1rem;
}

.pl-2 {
    padding-left: 0.5rem;
}

.pl-4 {
    padding-left: 1rem;
}

.px-1 {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.py-05 {
    padding-top: 0.125rem;
    padding-bottom: 0.125rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.text-xxs {
    font-size: 10px;
}

.text-xs {
    font-size: 12px;
}

.text-lg {
    font-size: 18px;
}

.text-6xl {
    font-size: 3.75rem;
    line-height: 1;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.font-bold {
    font-weight: bold;
}

.font-mono {
    font-family: monospace;
}

.uppercase {
    text-transform: uppercase;
}

.no-underline {
    text-decoration: none;
}

.text-white {
    color: var(--cf-white);
}

.text-gray-600 {
    color: var(--cf-text-secondary);
}

.text-green-600 {
    color: #2e7d32;
}

.text-red-600 {
    color: #c62828;
}

.text-green {
    color: #2e7d32;
}

.text-red {
    color: #c62828;
}

.bg-black {
    background-color: var(--cf-black);
}

.bg-gray-100 {
    background-color: var(--cf-bg);
}

.bg-opacity-50 {
    background-color: rgba(0, 0, 0, 0.5);
}

.bg-opacity-75 {
    background-color: rgba(0, 0, 0, 0.75);
}

.border {
    border: 1px solid var(--cf-border);
}

.border-b {
    border-bottom: 1px solid var(--cf-border);
}

.border-r {
    border-right: 1px solid var(--cf-border);
}

.border-l {
    border-left: 1px solid var(--cf-border);
}

.border-r-0 {
    border-right: 0;
}

.rounded {
    border-radius: 4px;
}

.cf-input-prefix {
    font: inherit;
    color: var(--cf-text-secondary);
    white-space: nowrap;
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
}

.rounded-l {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.rounded-l-none {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.rounded-r-none {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.fixed {
    position: fixed;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.z-50 {
    z-index: 50;
}

.max-w-600px {
    max-width: 600px;
}

.opacity-60 {
    opacity: 0.6;
}

.overflow-x-auto {
    overflow-x: auto;
}

.cursor-pointer {
    cursor: pointer;
}

.grid {
    display: grid;
}

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

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

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.input-with-button {
    display: flex;
    gap: 6px;
}

.input-with-button input {
    flex: 1;
}

/* Sticky bar */
.cf-sticky-bar {
    position: sticky;
    bottom: -32px;
    z-index: 10;
    background: var(--cf-white);
    margin-top: auto;
    padding: 0 0 32px;
}

.cf-sticky-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--cf-black);
    padding-top: 24px;
}

/* Animations */
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

.animate-spin {
    animation: spin 1.5s linear infinite;
}

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

.cf-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    overflow-x: hidden;
}

.cf-toast {
    width: 500px;
    border-bottom: 1px solid;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    font-size: 14px;
    line-height: 16px;
    opacity: 0;
    transform: translateX(20px);
    animation: cf-toast-in 0.3s ease forwards;
}

.cf-toast--note {
    background: #d9e6ff;
    border-color: #172cb6;
    color: #172cb6;
}

.cf-toast--alert {
    background: #ffecd3;
    border-color: #82280c;
    color: #82280c;
}

.cf-toast--error {
    background: #fde8e8;
    border-color: #991b1b;
    color: #991b1b;
}

.cf-toast--success {
    background: #d2ffc5;
    border-color: #115b0c;
    color: #115b0c;
}

.cf-toast-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.cf-toast-icon {
    flex-shrink: 0;
}

.cf-toast-title {
    flex: 1;
    font-weight: 700;
    white-space: pre-line;
}

.cf-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    font-weight: 300;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.cf-toast-body {
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cf-toast-btn {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid currentColor;
    border-radius: 4px;
    color: inherit;
    font-size: 14px;
    font-weight: 300;
    text-decoration: none;
}

.cf-toast--out {
    animation: cf-toast-out 0.25s ease forwards;
}

.cf-toast-progress {
    height: 6px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
    overflow: hidden;
    display: flex;
}

.cf-toast-progress-fill {
    height: 100%;
    background: currentColor;
    opacity: 0.6;
    transition: width 0.3s ease;
    flex-shrink: 0;
}

.cf-toast-progress-running {
    height: 100%;
    opacity: 0.3;
    background: currentColor;
    transition: width 0.3s ease;
    flex-shrink: 0;
}

@keyframes cf-toast-in {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes cf-toast-out {
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}


@keyframes progress-stream {
    from {
        transform: translateX(-50%);
    }
    to {
        transform: translateX(0);
    }
}

.progress-running {
    position: relative;
    overflow: hidden;
    background: #666 !important;
}

.progress-running::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: repeating-linear-gradient(
            -45deg,
            #444 0,
            #444 4px,
            #666 4px,
            #666 8px
    );
    animation: progress-stream 32s linear infinite;
}


[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover {
    z-index: 1001;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--cf-black);
    color: var(--cf-white);
    font-size: 12px;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--cf-black);
    z-index: 1000;
    pointer-events: none;
}

[data-tooltip-position="bottom"]:hover::after {
    bottom: auto;
    top: calc(100% + 8px);
}

[data-tooltip-position="bottom"]:hover::before {
    bottom: auto;
    top: calc(100% + 2px);
    border-top-color: transparent;
    border-bottom-color: var(--cf-black);
}

[data-tooltip-position="right"]:hover::after {
    bottom: auto;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
}

[data-tooltip-position="right"]:hover::before {
    bottom: auto;
    left: calc(100% + 2px);
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: var(--cf-black);
}

[data-tooltip-position="left"]:hover::after {
    left: auto;
    right: 0;
    transform: none;
}

[data-tooltip-position="left"]:hover::before {
    left: auto;
    right: 12px;
    transform: none;
}

.cf-hover-list {
    position: relative;
    display: inline-block;
}

.cf-hover-list-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 300;
    text-decoration: underline;
    cursor: default;
}

.cf-hover-list-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: var(--cf-white);
    border: 1px solid var(--cf-border);
    padding: 12px 16px;
    z-index: 100;
    white-space: nowrap;
    min-width: 160px;
}

.cf-hover-list-dropdown::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 16px;
    width: 12px;
    height: 12px;
    background: var(--cf-white);
    border-left: 1px solid var(--cf-border);
    border-top: 1px solid var(--cf-border);
    transform: rotate(45deg);
}

.cf-hover-list:hover .cf-hover-list-dropdown {
    display: block;
}

.cf-hover-list-item {
    font-size: 14px;
    font-weight: 300;
    padding: 4px 0;
    color: var(--cf-black);
    text-decoration: none;
    display: block;
}

a.cf-hover-list-item:hover {
    text-decoration: underline;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mt-4 {
    margin-top: 32px;
}

.ml-1 {
    margin-left: 8px;
}

.ml-2 {
    margin-left: 16px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

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

.text-danger {
    color: #dc2626;
}

.justify-end {
    justify-content: flex-end;
}

.cf-icon-img {
    height: 32px;
    width: 32px;
    object-fit: contain;
}

.cf-icon-img-sm {
    height: 16px;
    width: auto;
    vertical-align: middle;
    margin-right: 4px;
}

.cf-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 48px;
    margin-top: 32px;
}

.cf-disabled {
    color: var(--cf-text-secondary);
    cursor: default;
    width: fit-content;
}

.cf-disabled iconify-icon {
    opacity: 0.4;
}

.btn-danger {
    color: #dc2626;
    border-color: #dc2626;
}

#infrastructure-graph .vis-navigation {
    display: none !important;
}

#infrastructure-graph div.vis-tooltip {
    background: var(--cf-black);
    color: var(--cf-white);
    font-family: inherit;
    font-size: 12px;
    font-weight: 300;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    white-space: pre-line;
    box-shadow: none;
}

.infra-controls {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    gap: 4px;
    z-index: 10;
}

.infra-controls button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cf-white);
    border: 1px solid var(--cf-border);
    border-radius: 4px;
    cursor: pointer;
    color: var(--cf-black);
    padding: 0;
    font-family: inherit;
}

.infra-controls button:hover {
    background: var(--cf-bg);
}

.cf-deploy-overlay {
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--cf-white) 85%, transparent);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cf-deploy-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

:root.dark .cf-deploy-overlay lottie-player {
    filter: invert(1);
}

.cf-deploy-overlay-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--cf-black);
}

.cf-deploy-overlay-subtitle {
    font-size: 16px;
    font-weight: 300;
    color: var(--cf-black);
}
