:root {
    color-scheme: light;
    --bg: var(--bgColor-default);
    --panel: var(--bgColor-default);
    --header-bg: var(--bgColor-muted);
    --border: var(--borderColor-default);
    --border-muted: var(--borderColor-muted);
    --text: var(--fgColor-default);
    --muted: var(--fgColor-muted);
    --link: var(--fgColor-accent);
    --success-bg: var(--bgColor-success-muted);
    --success-text: var(--fgColor-success);
    --warn-bg: var(--bgColor-attention-muted);
    --warn-text: var(--fgColor-attention);
    --error-bg: var(--bgColor-danger-muted);
    --error-text: var(--fgColor-danger);
    --accent-bg: var(--bgColor-accent-emphasis);
    --shadow: var(--shadow-resting-small);
    --shadow-float: var(--shadow-floating-medium);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
}

.app-body {
    min-height: 100vh;
}

.app-body--auth {
    background:
        radial-gradient(circle at 25% 20%, rgba(208, 215, 222, 0.38), transparent 24%),
        radial-gradient(circle at 75% 18%, rgba(208, 215, 222, 0.28), transparent 22%),
        radial-gradient(circle at 50% 100%, rgba(208, 215, 222, 0.34), transparent 30%),
        var(--bgColor-muted);
}

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

a:hover {
    text-decoration: underline;
}

code {
    font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}

.app-header {
    border-bottom: 1px solid var(--border);
    background: var(--header-bg);
    box-shadow: none;
}

.app-header__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    width: 100%;
    padding: 0 16px;
}

.app-header__brand-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-header__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
}

.app-header__brand:hover {
    text-decoration: none;
}

.app-header__brand-mark {
    width: 38px;
    height: 19px;
    flex: 0 0 auto;
}

.app-header__spacer {
    flex: 1;
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    font: inherit;
    cursor: pointer;
}

.button-link:hover {
    background: var(--bgColor-muted);
    text-decoration: none;
}

.avatar-menu {
    position: relative;
}

.avatar-menu[open] .avatar-menu__trigger {
    background: var(--button-default-bgColor-hover);
    border-color: var(--button-default-borderColor-hover);
}

.avatar-menu__trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    list-style: none;
    cursor: pointer;
    color: var(--button-invisible-fgColor-rest);
}

.avatar-menu__trigger::-webkit-details-marker {
    display: none;
}

.avatar-menu__avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--avatar-borderColor);
    background: var(--panel);
    box-shadow:
        0 0 0 2px var(--avatar-bgColor),
        0 0 0 3px var(--avatar-borderColor);
}

.avatar-menu__caret {
    margin-right: 3px;
    color: var(--muted);
}

.avatar-menu__panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 20;
    width: 258px;
    padding: 6px 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: var(--shadow-floating-small);
}

.avatar-menu__section + .avatar-menu__section {
    border-top: 1px solid var(--border-muted);
}

.avatar-menu__section--identity {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
}

.avatar-menu__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.avatar-menu__login {
    color: var(--muted);
    font-size: 13px;
}

.avatar-menu__identity-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--avatar-borderColor);
}

.avatar-menu__identity-copy {
    display: grid;
    min-width: 0;
    line-height: 1.25;
}

.avatar-menu__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 16px;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    text-align: left;
    line-height: 20px;
}

.avatar-menu__item:hover {
    background: #eaeef2;
    color: var(--text);
    text-decoration: none;
}

.avatar-menu__item--danger {
    cursor: pointer;
}

.avatar-menu__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    color: var(--muted);
}

.avatar-menu__item:hover .avatar-menu__icon,
.avatar-menu__item--danger:hover .avatar-menu__icon {
    color: currentColor;
}

.avatar-menu__icon svg {
    width: 14px;
    height: 14px;
}

.auth-panel__hint {
    margin: 0;
    color: var(--muted);
}

.auth-panel__actions {
    margin-top: 16px;
}
.app-main {
    width: 100%;
    margin: 0;
    padding: 0 16px 40px;
}

.app-main--auth {
    width: 100%;
    max-width: none;
    padding: 0;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: calc(100vh - 56px);
}

.app-sidebar {
    border-right: 1px solid var(--border);
    background: var(--panel);
    padding: 20px 14px 28px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.app-sidebar__section {
    display: grid;
    gap: 12px;
}

.app-sidebar__section--projects {
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.app-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.app-sidebar__title {
    margin: 0;
    color: #57606a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.app-sidebar__nav,
.app-sidebar__project-list {
    display: grid;
    gap: 8px;
}

.app-sidebar__filter {
    position: relative;
    display: block;
    padding: 10px 12px 10px 18px;
    border-radius: 8px;
    color: var(--text);
    font-weight: 600;
}

.app-sidebar__filter::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 50%;
    width: 3px;
    height: 20px;
    border-radius: 999px;
    background: transparent;
    transform: translateY(-50%);
}

.app-sidebar__filter:hover {
    text-decoration: none;
    background: #f3f4f6;
}

.app-sidebar__filter--selected {
    background: #eaeef2;
}

.app-sidebar__filter--selected::before {
    background: var(--accent-bg);
}

.app-sidebar__new-project {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 6px;
    background: #1f883d;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.app-sidebar__new-project:hover {
    background: #1a7f37;
    color: #fff;
    text-decoration: none;
}

.app-sidebar__project-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 4px;
    border-radius: 8px;
}

.app-sidebar__project-row::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 50%;
    width: 3px;
    height: 20px;
    border-radius: 999px;
    background: transparent;
    transform: translateY(-50%);
}

.app-sidebar__project-row:hover,
.app-sidebar__project-row:focus-within {
    background: #f6f8fa;
}

.app-sidebar__project {
    display: block;
    min-width: 0;
    padding: 10px 12px 10px 18px;
    border-radius: 8px;
    color: var(--text);
}

.app-sidebar__project:hover {
    text-decoration: none;
}

.app-sidebar__project strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-sidebar__empty {
    color: var(--muted);
    font-size: 12px;
}

.app-sidebar__project-row--selected .app-sidebar__project {
    background: transparent;
}

.app-sidebar__project-row--selected {
    background: #f6f8fa;
}

.app-sidebar__project-row--selected::before {
    background: var(--accent-bg);
}

.app-sidebar__project-settings {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 0;
    color: var(--muted);
    background: transparent;
}

.app-sidebar__project-settings:hover {
    color: var(--text);
    text-decoration: none;
}

.app-sidebar__project-settings svg {
    width: 16px;
    height: 16px;
}

.app-sidebar__project-settings--active {
    color: var(--accent-bg);
    background: transparent;
}

.app-shell__content {
    min-width: 0;
    padding: 24px 24px 40px;
}

.settings-page {
    display: grid;
    gap: 16px;
}

.project-page {
    display: grid;
    gap: 16px;
}

.project-page__header {
    display: grid;
    gap: 8px;
}

.project-page__header h1 {
    margin: 0;
}

.project-page__eyebrow {
    margin: 0;
    color: #57606a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.project-page__lead {
    margin: 0;
    color: var(--muted);
}

.project-page__textarea {
    min-height: 120px;
    resize: vertical;
}

.project-page__actions {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
}

.project-page__submit {
    background: #1f883d;
    border-color: #1f883d;
}

.project-page__submit:hover {
    background: #1a7f37;
    border-color: #1a7f37;
}

.project-settings__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--muted);
    font-size: 12px;
}

.project-settings__api-list {
    display: grid;
    gap: 0;
}

.project-section {
    display: grid;
    gap: 16px;
}

.project-section__header {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.project-section__header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.project-section__header--danger h2 {
    color: var(--fgColor-danger);
}

.project-danger-zone {
    border: 1px solid var(--borderColor-danger-emphasis);
    border-radius: 10px;
    overflow: hidden;
    background: var(--panel);
}

.project-danger-zone__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
}

.project-danger-zone__copy {
    display: grid;
    gap: 4px;
}

.project-danger-zone__copy strong,
.project-danger-zone__copy p {
    margin: 0;
}

.project-danger-zone__copy p {
    color: var(--muted);
}

.settings-page__header {
    display: grid;
    gap: 12px;
}

.settings-page__header h1,
.settings-card h2 {
    margin: 0;
}

.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.settings-tabs__item {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
}

.settings-tabs__item--active {
    background: var(--bgColor-accent-muted);
    border-color: var(--accent-bg);
}

.settings-tabs__item:hover {
    text-decoration: none;
}

.settings-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel);
    box-shadow: var(--shadow);
    display: grid;
    gap: 16px;
}

.settings-form,
.settings-project-row__form {
    display: grid;
    gap: 12px;
}

.settings-form label {
    display: grid;
    gap: 6px;
}

.settings-project-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--border-muted);
}

.settings-project-row:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.settings-project-row__meta {
    color: var(--muted);
    font-size: 12px;
}

.login-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 72px 16px 36px;
}

.login-screen__brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 42px;
    color: var(--text);
}

.login-screen__brand-mark {
    width: 66px;
    height: 32px;
}

.login-screen__brand-wordmark {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.login-screen__content {
    width: min(100%, 720px);
    text-align: center;
}

.login-screen__content h1 {
    margin: 0;
    color: var(--text);
    font-size: 54px;
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.login-screen__lead {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 17px;
}

.login-screen__message {
    margin: 22px auto 0;
    width: min(100%, 620px);
    padding: 12px 14px;
    border: 1px solid var(--border-muted);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--muted);
    font-size: 14px;
    text-align: left;
}

.login-screen__providers {
    display: grid;
    gap: 14px;
    width: min(100%, 610px);
    margin: 28px auto 0;
}

.login-provider-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    min-height: 74px;
    padding: 10px 16px;
    border: 1px solid var(--border-muted);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-float);
    color: var(--text);
    text-align: left;
}

.login-provider-row:hover {
    text-decoration: none;
    border-color: var(--borderColor-emphasis);
    background: var(--panel);
}

.login-provider-row__icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--bgColor-muted);
    color: var(--text);
}

.login-provider-row__icon svg {
    width: 20px;
    height: 20px;
}

.login-provider-row__title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.login-provider-row__badge {
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--warn-bg);
    color: var(--warn-text);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.login-provider-row__badge--muted {
    background: var(--bgColor-muted);
    color: var(--muted);
}

.login-screen__footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 220px;
    color: var(--muted);
    font-size: 14px;
}

.login-screen__footer a {
    color: inherit;
}

.login-screen__footer a:hover {
    color: var(--text);
}

.login-screen__footer-divider {
    color: var(--border-muted);
}

.legal-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 16px;
    background: var(--bgColor-muted);
}

.legal-page__card {
    width: min(100%, 720px);
    min-height: 260px;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
}

.legal-page__card h1 {
    margin: 0;
    font-size: 32px;
    line-height: 1.15;
}

.page-header,
.detail-summary,
.log-panel,
.table-wrap {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.page-header,
.detail-summary,
.log-panel__header {
    padding: 20px 24px;
}

.page-header h1,
.detail-summary h1,
.log-panel__header h2 {
    margin: 0 0 6px;
    font-size: 24px;
}

.page-header p,
.detail-summary__meta,
.log-panel__header p,
.breadcrumb {
    margin: 0;
    color: var(--muted);
}

.table-wrap,
.detail-summary,
.log-panel {
    margin-top: 16px;
}

.table-wrap {
    overflow: hidden;
}

.workflows-shell {
    display: grid;
    grid-template-columns: 296px minmax(0, 1fr);
    min-height: calc(100vh - 145px);
}

.workflows-shell__sidebar {
    min-width: 0;
}

.workflows-shell__sidebar-inner {
    position: sticky;
    top: 24px;
    padding: 24px 16px 32px 0;
}

.workflows-side-nav {
    display: grid;
    gap: 4px;
}

.workflows-side-nav__item {
    position: relative;
    display: block;
    padding: 8px 12px 8px 18px;
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    line-height: 20px;
}

.workflows-side-nav__item::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 50%;
    width: 3px;
    height: 20px;
    border-radius: 999px;
    background: transparent;
    transform: translateY(-50%);
}

.workflows-side-nav__item:hover {
    background: var(--bgColor-muted);
    text-decoration: none;
}

.workflows-side-nav__item--active {
    background: #eaeef2;
}

.workflows-side-nav__item--active::before {
    background: var(--accent-bg);
}

.workflows-side-section {
    margin-top: 20px;
    padding: 20px 8px 0 0;
}

.workflows-side-section h2 {
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.workflows-side-section__placeholder {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.workflows-shell__content {
    min-width: 0;
    padding: 24px 0 40px 24px;
}

.workflows-pagehead {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.workflows-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: min(100%, 300px);
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--panel);
    color: var(--muted);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.workflows-filter:focus-within {
    border-color: var(--borderColor-accent-emphasis);
    box-shadow: inset 0 0 0 1px var(--borderColor-accent-emphasis);
}

.workflows-filter svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.workflows-filter input {
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    outline: none;
}

.workflows-runs-box {
    overflow: hidden;
    border-color: var(--border);
}

.workflows-runs-box__table {
    background: var(--panel);
}

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

.section-heading h2 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.section-heading__brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(31, 111, 235, 0.14), rgba(56, 139, 253, 0.3));
    color: #1f6feb;
    box-shadow: inset 0 0 0 1px rgba(31, 111, 235, 0.12);
}

.section-heading__brand-mark svg {
    width: 16px;
    height: 16px;
}

.overview-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.overview-metric {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 88px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--panel);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.overview-metric__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
}

.overview-metric__icon svg {
    width: 22px;
    height: 22px;
}

.overview-metric__content {
    display: grid;
    gap: 4px;
}

.overview-metric__value {
    font-size: 34px;
    line-height: 1;
    letter-spacing: -0.03em;
}

.overview-metric__label {
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
}

.overview-metric--active .overview-metric__icon {
    color: #1f6feb;
}

.overview-metric--success .overview-metric__icon {
    color: #1f883d;
}

.overview-metric--danger .overview-metric__icon {
    color: #d1242f;
}

.overview-metric--neutral .overview-metric__icon {
    color: #59636e;
}

.live-run-gallery {
    margin-bottom: 24px;
}

.live-run-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.live-run-card {
    display: grid;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--panel);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.live-run-card__stage {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.32), transparent 34%),
        linear-gradient(135deg, #0f172a 0%, #172554 52%, #1d4ed8 100%);
}

.live-run-card__placeholder,
.live-run-card__video {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}

.live-run-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.live-run-card__placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-run-card__video {
    display: block;
    background: #000;
    opacity: 0;
    transition: opacity 120ms ease;
}

.live-run-card--connected .live-run-card__video {
    opacity: 1;
}

.live-run-card--connected .live-run-card__placeholder {
    display: none;
}

.live-run-card__body {
    display: grid;
    gap: 12px;
    padding: 14px 16px 16px;
}

.live-run-card__meta {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.live-run-card__throughput {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}

.live-run-card__throughput-label {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 10px;
}

.live-run-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
}

.runs-section {
    margin-top: 12px;
}

.live-run-card__footer .status-pill {
    text-transform: none;
}

.runs-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    min-width: 980px;
}

.runs-table th,
.runs-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-size: 14px;
    vertical-align: top;
}

.runs-table th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    background: var(--bgColor-muted);
}

.runs-table tr:last-child td {
    border-bottom: 0;
}

.runs-table tbody tr:hover {
    background: var(--bgColor-muted);
}

@media (max-width: 1279px) {
    .overview-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 767px) {
    .workflows-pagehead {
        flex-direction: column;
        align-items: stretch;
    }

    .overview-metrics {
        grid-template-columns: 1fr;
    }

    .overview-metric {
        min-height: 92px;
        padding: 18px;
    }

    .overview-metric__value {
        font-size: 28px;
    }

    .live-run-gallery__grid {
        grid-template-columns: 1fr;
    }
}

.run-link {
    color: var(--text);
    font-weight: 600;
}

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

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: lowercase;
}

.status-pill--running {
    background: var(--warn-bg);
    color: var(--warn-text);
}

.status-pill--active {
    background: var(--success-bg);
    color: var(--success-text);
}

.status-pill--pending {
    background: var(--warn-bg);
    color: var(--warn-text);
}

.status-pill--issue {
    background: var(--error-bg);
    color: var(--error-text);
}

.status-pill--subtle {
    background: #f6f8fa;
    color: var(--muted);
    border: 1px solid var(--border);
}

.status-pill--completed {
    background: var(--success-bg);
    color: var(--success-text);
}

.status-pill--completed-with-errors {
    background: var(--error-bg);
    color: var(--error-text);
}

.detail-summary__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px 24px;
    margin: 20px 0 0;
}

.detail-summary__grid dt {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.detail-summary__grid dd {
    margin: 0;
    font-size: 14px;
}

.log-panel__header {
    border-bottom: 1px solid var(--border);
}

.log-lines {
    padding: 8px 0;
    font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
}

.live-session {
    padding: 20px 24px 24px;
}

.live-session__video {
    display: block;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #000;
}

.live-session {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 20px;
    align-items: start;
}

.live-session__stage {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.32), transparent 34%),
        linear-gradient(135deg, #0f172a 0%, #172554 52%, #1d4ed8 100%);
}

.live-session__placeholder,
.live-session__video {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}

.live-session__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    background: transparent;
}

.live-session__placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-session__video {
    display: block;
    opacity: 0;
    transition: opacity 120ms ease;
}

.live-session--connected .live-session__video {
    opacity: 1;
}

.live-session--connected .live-session__placeholder {
    display: none;
}

.live-session__sidebar {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 18px;
    height: 100%;
}

.live-session__connection-box,
.live-session__traffic-box {
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f6f8fa;
}

.live-session__eyebrow {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.live-session__status {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.live-session__status {
    font-size: 15px;
    color: var(--text);
    font-weight: 600;
}

.live-session__steps {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.live-session__step {
    position: relative;
    padding-left: 28px;
    color: var(--muted);
    font-size: 14px;
}

.live-session__step::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid #d0d7de;
    background: #fff;
}

.live-session__step--active,
.live-session__step--done {
    color: var(--text);
}

.live-session__step--active::before {
    border-color: #1f6feb;
    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.16);
}

.live-session__step--done::before {
    border-color: #1a7f37;
    background: #1a7f37;
}

.live-session__metrics {
    display: grid;
    gap: 12px;
    margin: 0;
}

.live-session__metrics div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 13px;
}

.live-session__metrics dt {
    color: var(--muted);
}

.live-session__metrics dd {
    margin: 0;
    font-weight: 600;
    color: var(--text);
}

.live-session__connection-box,
.live-session__traffic-box {
    display: grid;
    gap: 12px;
}

.live-session__connection-box {
    align-content: start;
    min-height: 100%;
}

.live-session__traffic-box {
    padding: 14px 14px 12px;
    background: #fff;
}

.live-session__traffic-caption {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.live-session__traffic-chart {
    display: block;
    width: 100%;
    height: 96px;
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.live-session__traffic-grid {
    fill: none;
    stroke: #d8dee4;
    stroke-width: 1;
}

.live-session__traffic-line {
    fill: none;
    stroke: #1f6feb;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.replay-session {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 20px;
    align-items: start;
    padding: 20px 24px 24px;
}

.replay-session__stage {
    min-height: 320px;
}

.replay-session__video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #000;
}

.replay-session__sidebar {
    display: grid;
    gap: 18px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f6f8fa;
}

.replay-session__status {
    margin: 0;
    font-size: 15px;
    color: var(--text);
    font-weight: 600;
}

.replay-session__clip-list ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.replay-session__clip-list li,
.replay-session__clip-list a {
    color: var(--text);
    font-size: 14px;
}

.log-line {
    display: grid;
    grid-template-columns: 84px 64px minmax(0, 1fr);
    gap: 12px;
    padding: 6px 24px;
    border-bottom: 1px solid #f0f3f6;
    white-space: pre-wrap;
}

.log-line:last-child {
    border-bottom: 0;
}

.log-line__timestamp {
    color: var(--muted);
}

.log-line__level {
    font-weight: 700;
    text-transform: uppercase;
}

.log-line__level--error {
    color: var(--error-text);
}

.log-line__level--warn {
    color: var(--warn-text);
}

.log-line__level--info {
    color: #57606a;
}

.log-line__artifact {
    display: block;
    margin-top: 10px;
}

.log-line__artifact img {
    max-width: min(100%, 720px);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.empty-state {
    padding: 24px;
    color: var(--muted);
    text-align: center;
}

.empty-state--log {
    text-align: left;
}

.breadcrumb {
    margin-bottom: 8px;
}

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--border);
        padding-bottom: 20px;
    }

    .settings-project-row {
        flex-direction: column;
        align-items: stretch;
    }

    .project-danger-zone__row {
        flex-direction: column;
        align-items: stretch;
    }

    .app-header__inner {
        flex-wrap: wrap;
        padding: 10px 12px;
    }

    .app-header__spacer {
        display: none;
    }

    .avatar-menu {
        margin-left: auto;
    }

    .app-main {
        padding: 0 12px 32px;
    }

    .app-shell__content {
        padding: 20px 0 32px;
    }

    .login-screen__content h1 {
        font-size: 42px;
    }

    .login-screen__footer {
        margin-top: 120px;
    }

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

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

    .workflows-shell {
        grid-template-columns: 1fr;
    }

    .workflows-shell__sidebar {
        position: static;
    }

    .workflows-shell__sidebar-inner {
        position: static;
        padding: 0 0 20px;
    }

    .workflows-shell__content {
        padding: 0 0 40px;
    }

    .workflows-pagehead {
        flex-direction: column;
    }

    .workflows-filter {
        width: 100%;
        min-width: 0;
    }

    .log-line {
        grid-template-columns: 72px 52px minmax(0, 1fr);
        padding: 6px 16px;
        gap: 10px;
    }

    .live-session {
        grid-template-columns: 1fr;
    }

    .replay-session {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .login-screen {
        justify-content: flex-start;
        padding-top: 56px;
    }

    .login-screen__brand {
        margin-bottom: 32px;
    }

    .login-screen__brand-wordmark {
        font-size: 24px;
    }

    .login-screen__content h1 {
        font-size: 34px;
    }

    .login-screen__lead {
        font-size: 16px;
    }

    .login-provider-row {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 14px;
        padding: 12px 14px;
    }

    .login-provider-row__badge {
        grid-column: 1 / -1;
        justify-self: start;
        margin-left: 58px;
    }

    .login-screen__footer {
        margin-top: 88px;
        font-size: 13px;
    }

    .workflows-shell__content h2.f2,
    .workflows-shell__sidebar h1.f2 {
        font-size: 26px;
    }

    .live-run-gallery__grid {
        grid-template-columns: 1fr;
    }
}
