/* Supermemory-inspired structure with Ramp's warm neutrals and lime accent. */
:root,
.dark {
    color-scheme: light;
    --background: #fdfdfb;
    --foreground: #20211c;
    --card: #fff;
    --card-foreground: #20211c;
    --popover: #fff;
    --popover-foreground: #20211c;
    --primary: #e4f45b;
    --primary-foreground: #20211c;
    --secondary: #f2f3ec;
    --secondary-foreground: #20211c;
    --muted: #f3f3ed;
    --muted-foreground: #696c61;
    --accent: #eef2ce;
    --accent-foreground: #20211c;
    --border: #deded7;
    --input: #d6d8ce;
    --ring: #8a9c30;
    --sidebar: #fafaf7;
    --sidebar-foreground: #62665b;
    --sidebar-accent: #eef2ce;
    --sidebar-accent-foreground: #20211c;
    --sidebar-border: #deded7;
    --sidebar-primary: #e4f45b;
    --sidebar-primary-foreground: #20211c;
    --bg: #fdfdfb;
    --surface: #fff;
    --surface-raised: #f4f4ee;
    --sidebar-bg: #fafaf7;
    --text: #20211c;
    --line: #deded7;
}
body {
    background: #fdfdfb;
    color: #20211c;
    font-family: Manrope, Arial, sans-serif;
}
h1,
h2,
h3 {
    font-weight: 500 !important;
    letter-spacing: -0.7px;
}
h1,
.heading h1 {
    font-size: 34px;
    font-weight: 500;
    line-height: 1.2;
}
.sidebar {
    background: #fafaf7;
    border-right: 1px solid #deded7;
}
.topbar,
#app > main > header {
    background: #fdfdfb;
    color: #696c61;
    border-color: #deded7;
}
.primary,
button.primary,
.copilot-launcher {
    background: #e4f45b;
    color: #20211c;
    border: 1px solid #d7e749;
    border-radius: 3px;
    font-weight: 600;
}
.primary:hover,
button.primary:hover,
.copilot-launcher:hover {
    background: #d9eb45;
    color: #20211c;
}
.secondary,
button {
    border-radius: 4px;
}
.secondary {
    background: #fff;
    color: #20211c;
    border-color: #d6d8ce;
}
.secondary:hover {
    background: #f3f4ec;
}
.nav,
.portal-link,
.home-link,
.back-home {
    color: #62665b;
}
.nav.active,
.nav:hover,
.portal-link:hover {
    background: #eef2ce;
    color: #20211c;
}
.nav.active {
    box-shadow: inset 3px 0 #9dae2b;
}
.nav span {
    color: inherit;
}
.muted,
.subtle,
p,
small {
    color: #696c61;
}
.badge,
.pill {
    background: #f0f1e9;
    color: #555c43;
    border-color: #dde1cf;
}
.badge.completed,
.badge.active,
.pill.green {
    background: #eef3cc;
    color: #536320;
}
.badge.in-progress {
    background: #e7eff6;
    color: #355e7c;
}
.badge.on-hold,
.pill.amber {
    background: #fbefd7;
    color: #8a6022;
}
.badge.cancelled,
.badge.paused,
.pill.red {
    background: #f7e8e3;
    color: #934d3c;
}
.text-link {
    color: #596c1f;
}
.avatar,
.avatar.small,
.brandmark {
    background: #eef2cf !important;
    color: #536020 !important;
    border-color: #dce2b2;
}
.workflow-icon,
.type-icon,
.agent-symbol {
    background: #eef2cf;
    color: #566626;
    border-radius: 3px;
}
.powered img {
    filter: brightness(0);
}
input,
select,
textarea {
    background: #fff;
    color: #20211c;
    border-color: #d6d8ce;
    border-radius: 4px;
}
.search input {
    background: transparent;
}
.metrics {
    background: #fff;
    border-radius: 4px;
}
.metrics strong {
    font-weight: 500;
}
.case-tile,
.workflow-card,
.agent-card,
.case-group {
    background: #fff;
    border-color: #deded7;
    border-radius: 4px;
}
.case-tile:hover,
.workflow-card:hover,
.agent-card:hover {
    background: #f7f8ef;
    border-color: #a5b263;
}
.page-tabs [data-slot="tabs-trigger"]:after {
    background: #9dae2b !important;
}
.prompt-document p,
.prompt-box,
.agent-prompt-text {
    color: #3f4538;
}
.prompt-box,
.result {
    background: #f5f5ef;
    border-color: #deded7;
}
.context,
.context-sidebar {
    background: #fafaf7;
    border-color: #deded7;
}
.context p {
    color: #696c61;
}
.agent-card p,
.agent-card small {
    color: #696c61;
}
.agent-card,
.run-row {
    color: #20211c;
}
.tabs-demo button {
    color: #696c61;
}
.tabs-demo button.active {
    color: #20211c;
    border-color: #9dae2b;
}
.notice {
    background: #eef2cf;
    color: #394419;
}
.event-dot,
.live-dot {
    background: #8a9e37;
}
.back-link {
    color: #62665b;
}
.recharts-text {
    fill: #696c61;
}
.recharts-cartesian-grid line {
    stroke: #deded7;
}
th {
    background: #f5f5ef !important;
    color: #696c61 !important;
}
.heading,
.page-heading,
.detail-heading {
    background:
        linear-gradient(90deg, #ffffffb8, #ffffff30),
        url("/assets/personalization-background.webp") center 43%/cover;
    border: 1px solid #e3e3da;
    padding: 28px;
    border-radius: 5px;
    min-height: 130px;
}
.heading p {
    color: #50564a;
}
.agent-card .badge {
    white-space: nowrap;
}
.content-demo > h1 {
    padding: 30px;
    background:
        linear-gradient(90deg, #ffffffb8, #ffffff30),
        url("/assets/personalization-background.webp") center 43%/cover;
    border: 1px solid #e3e3da;
    border-radius: 5px;
    margin-bottom: 28px;
}
.toolbar-demo input {
    background: #fff;
}
.error {
    color: #a34f3d;
}
.agent-config-block,
.tabs-demo,
.run-row,
.event-row {
    border-color: #deded7;
}
.agent-card:hover {
    background: #f8f9ef;
}
.tabs-demo button {
    background: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #8a9c30;
    outline-offset: 3px;
}
dialog {
    background: #fff;
    color: #20211c;
    border-color: #deded7;
}
@media (max-width: 650px) {
    .heading,
    .page-heading,
    .detail-heading {
        padding: 22px;
        min-height: 110px;
    }
    h1,
    .heading h1 {
        font-size: 28px;
    }
}

.hero-info,
.peek,
.modal,
.dropdown,
.filter-popover,
.filter-menu {
    background: #fff;
    color: #20211c;
}
.chart-grid {
    stroke: #deded7;
}
.chart-label {
    fill: #696c61;
}
.segmented {
    background: #f1f2e9;
}
.segmented button.selected {
    background: #fff;
    color: #20211c;
}
.nav-label {
    color: #696c61;
}
.table-wrap {
    border-color: #deded7;
}
.back-home:hover {
    background: #eef2ce;
}
.desktop {
    color-scheme: light;
}
.stream-title,
.session-card strong {
    color: #20211c;
}
.status-badge.active,
.status-badge.preparing,
.status-badge.human_controlled {
    background: #e7eff6;
    color: #355e7c;
    border-color: #c3d4df;
}
.status-badge.released {
    background: #eef3cc;
    color: #536320;
    border-color: #d6dfa8;
}
.status-badge.failed,
.status-badge.lost,
.status-badge.quarantined {
    background: #f7e8e3;
    color: #934d3c;
    border-color: #e3c6ba;
}
.status-badge {
    background: #f4f5ef;
    color: #5e6553;
    border-color: #deded7;
}
/* Executions occupies the viewport; only its rows scroll. */
@media (min-width: 701px) {
    .workspace > main:has(.execution-panel) {
        height: calc(100dvh - 65px);
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding: 20px 24px;
        min-height: 0;
        box-sizing: border-box;
    }
    main:has(.execution-panel) > .page-heading {
        min-height: 0;
        padding: 18px 22px;
        margin: 0;
        flex: none;
    }
    main:has(.execution-panel) > .status-totals {
        margin: 0;
        flex: none;
    }
    main:has(.execution-panel) > .status-breakdown {
        max-height: 100px;
        overflow: auto;
        flex: none;
    }
    .execution-panel {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
        width: 100%;
    }
    .execution-panel .table-wrap {
        flex: 1;
        min-height: 0;
        overflow: auto;
    }
    .execution-panel thead {
        position: sticky;
        top: 0;
        z-index: 1;
        background: #f5f5ef;
    }
    .execution-filters,
    .execution-footer {
        flex: none;
    }
}
.execution-panel table {
    table-layout: fixed;
    width: 100%;
    white-space: normal;
}
.execution-panel th,
.execution-panel td {
    padding: 12px 9px !important;
    overflow-wrap: anywhere;
    vertical-align: top;
}
.execution-panel th:nth-child(1) {
    width: 13%;
}
.execution-panel th:nth-child(2) {
    width: 14%;
}
.execution-panel th:nth-child(3) {
    width: 12%;
}
.execution-panel th:nth-child(4) {
    width: 12%;
}
.execution-panel th:nth-child(5) {
    width: 10%;
}
.execution-panel th:nth-child(6),
.execution-panel th:nth-child(7) {
    width: 11%;
}
.execution-panel th:nth-child(8) {
    width: 8%;
}
.execution-panel th:nth-child(9) {
    width: 9%;
}
.execution-panel .execution-link {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
    line-height: 1.5;
}
.execution-panel .status-badge {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}
@media (max-width: 700px) {
    .execution-panel thead {
        display: none;
    }
    .execution-panel table,
    .execution-panel tbody {
        display: block;
    }
    .execution-panel tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        border-bottom: 1px solid #deded7;
        padding: 8px;
    }
    .execution-panel td {
        display: block;
        border: 0;
        min-width: 0;
    }
    .execution-panel td:before {
        content: attr(data-label);
        display: block;
        font-size: 10px;
        color: #696c61;
        margin-bottom: 6px;
    }
    .execution-filter-summary {
        flex-wrap: wrap;
    }
    .execution-footer {
        gap: 6px;
        padding: 10px;
    }
    .execution-footer > span {
        margin-left: 0;
    }
}
