/*
 * Runtime CSS policy:
 * - app.css remains the single browser-facing stylesheet.
 * - Keep new rules near their ownership section; see docs/reference/css-ownership.md.
 * - If source splitting is introduced later, concatenate ordered source files back into this file.
 */

:root,
.theme-dark {
    --background: #080808;
    --foreground: #e7e5e4;
    --muted: #151515;
    --muted-foreground: #a1a1aa;
    --card: #111111;
    --card-foreground: #e7e5e4;
    --border: #292929;
    --input: #3a3a3a;
    --primary: #e7e5e4;
    --primary-foreground: #0a0a0a;
    --secondary: #181818;
    --secondary-foreground: #d4d4d8;
    --accent: #242424;
    --accent-foreground: #f4f4f5;
    --success: #86efac;
    --success-soft: rgba(134, 239, 172, 0.10);
    --warning: #fcd34d;
    --warning-soft: rgba(252, 211, 77, 0.11);
    --danger: #fda4af;
    --danger-soft: rgba(253, 164, 175, 0.12);
    --attention: #fb923c;
    --attention-soft: rgba(251, 146, 60, 0.12);
    --review: #c4b5fd;
    --review-soft: rgba(196, 181, 253, 0.12);
    --info: #93c5fd;
    --info-soft: rgba(147, 197, 253, 0.11);
    --radius: 0.625rem;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    --scrollbar-size: 10px;
    --scrollbar-track: rgba(255, 255, 255, 0.04);
    --scrollbar-thumb: rgba(255, 255, 255, 0.16);
    --scrollbar-thumb-hover: rgba(255, 255, 255, 0.28);
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

html.js [data-lc-time]:not(.lc-time-ready) {
    visibility: hidden;
}

html:not(.js) [data-lc-time] {
    visibility: visible;
}

.theme-light {
    --background: #f8fafc;
    --foreground: #0f172a;
    --muted: #f1f5f9;
    --muted-foreground: #64748b;
    --card: #ffffff;
    --card-foreground: #0f172a;
    --border: #e2e8f0;
    --input: #cbd5e1;
    --primary: #2563eb;
    --primary-foreground: #ffffff;
    --secondary: #f1f5f9;
    --secondary-foreground: #0f172a;
    --accent: #dbeafe;
    --accent-foreground: #1e3a8a;
    --info: #2563eb;
    --info-soft: rgba(37, 99, 235, 0.10);
    --attention: #ea580c;
    --attention-soft: rgba(234, 88, 12, 0.10);
    --scrollbar-track: rgba(15, 23, 42, 0.06);
    --scrollbar-thumb: rgba(15, 23, 42, 0.22);
    --scrollbar-thumb-hover: rgba(15, 23, 42, 0.36);
}

* {
    box-sizing: border-box;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    scrollbar-width: thin;
}

*::-webkit-scrollbar {
    height: var(--scrollbar-size);
    width: var(--scrollbar-size);
}

*::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
    background-clip: padding-box;
}

*::-webkit-scrollbar-corner {
    background: transparent;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    background:
        radial-gradient(circle at top right, rgba(244, 244, 245, 0.035), transparent 34rem),
        var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.45;
}

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

button,
input,
textarea,
select {
    font: inherit;
}

code,
pre {
    font-family: var(--font-mono);
}

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

.app-shell-public {
    grid-template-columns: minmax(0, 1fr);
}

.app-main {
    min-width: 0;
}

.app-topbar,
.topbar {
    align-items: center;
    background: rgba(8, 8, 8, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    min-height: 64px;
    padding: 0 24px;
}

.app-sidebar {
    align-self: start;
    background: rgba(14, 14, 14, 0.92);
    backdrop-filter: blur(12px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    padding: 16px;
    position: sticky;
    top: 0;
}

.sidebar-brand {
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    min-height: 44px;
    padding: 0 6px 12px;
}

.sidebar-nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    padding-top: 12px;
}

.nav-section {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.nav-section + .nav-section {
    border-top: 1px solid rgba(255, 255, 255, 0.055);
    padding-top: 12px;
}

.nav-section-bottom {
    margin-top: auto;
}

.nav-section-title {
    color: var(--muted-foreground);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    overflow: hidden;
    padding: 0 10px 3px;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.topbar-left,
.topbar-right {
    align-items: center;
    display: flex;
    gap: 12px;
    min-width: 0;
}

.topbar-title {
    color: var(--muted-foreground);
    font-size: 13px;
    font-weight: 600;
}

.project-switcher {
    max-width: 100%;
    min-width: 0;
    position: relative;
}

.project-switcher-summary {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--foreground);
    cursor: pointer;
    display: inline-flex;
    gap: 6px;
    list-style: none;
    max-width: min(420px, 52vw);
    min-height: 38px;
    min-width: 0;
    padding: 7px 10px;
    transition: background-color .16s ease, border-color .16s ease;
}

.project-switcher-summary::-webkit-details-marker {
    display: none;
}

.project-switcher-summary:hover,
.project-switcher[open] .project-switcher-summary {
    background: rgba(244, 244, 245, 0.06);
}

.project-switcher-summary:focus-visible {
    border-color: rgba(244, 244, 245, 0.34);
    outline: none;
}

.project-switcher-kicker {
    color: var(--muted-foreground);
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1;
    text-transform: uppercase;
}

.project-switcher-kicker::after {
    content: ":";
}

.project-switcher-title {
    flex: 1 1 auto;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-switcher-code {
    color: var(--muted-foreground);
    flex: 0 1 auto;
    font-size: 11px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-switcher-code::before {
    content: "\00b7";
    margin-right: 6px;
}

.project-switcher-caret {
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted-foreground) 50%),
        linear-gradient(135deg, var(--muted-foreground) 50%, transparent 50%);
    background-position:
        left center,
        right center;
    background-repeat: no-repeat;
    background-size: 6px 6px, 6px 6px;
    flex: 0 0 auto;
    height: 10px;
    justify-self: center;
    transition: transform .16s ease;
    width: 13px;
}

.project-switcher[open] .project-switcher-caret {
    transform: rotate(180deg);
}

.topbar-scratch-trigger {
    align-items: center;
    background: color-mix(in srgb, var(--review-soft) 88%, transparent);
    border: 1px solid color-mix(in srgb, var(--review) 42%, transparent);
    border-radius: 8px;
    box-shadow: 0 0 14px color-mix(in srgb, var(--review) 30%, transparent);
    color: var(--review);
    cursor: pointer;
    display: inline-flex;
    flex-shrink: 0;
    height: 32px;
    justify-content: center;
    padding: 0;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
    width: 32px;
}

.topbar-scratch-trigger svg,
.topbar-scratch-icon {
    height: 17px;
    width: 17px;
}

.topbar-scratch-trigger:hover {
    background: color-mix(in srgb, var(--review-soft) 72%, var(--secondary));
    border-color: color-mix(in srgb, var(--review) 58%, transparent);
    box-shadow: 0 0 18px color-mix(in srgb, var(--review) 42%, transparent);
    color: #ddd6fe;
}

.topbar-scratch-trigger:disabled {
    background: color-mix(in srgb, var(--muted) 70%, var(--background));
    border-color: color-mix(in srgb, var(--border) 82%, var(--muted-foreground));
    box-shadow: none;
    color: var(--muted-foreground);
    cursor: default;
    opacity: .74;
}

.task-reference {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: .86rem;
    font-weight: 650;
    gap: 5px;
    line-height: 1.2;
    max-width: 100%;
    padding: .12rem .45rem;
    vertical-align: baseline;
    white-space: nowrap;
}

.task-reference-key {
    font-variant-numeric: tabular-nums;
}

.task-reference-link {
    border: 1px solid transparent;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, filter 0.15s ease;
}

.task-reference-link:hover {
    filter: brightness(1.1);
    text-decoration: none;
}

.task-reference-link:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--foreground) 28%, transparent);
    outline-offset: 2px;
}

.task-reference-link.task-reference-status-new {
    background: color-mix(in srgb, var(--info-soft) 88%, transparent);
    border-color: color-mix(in srgb, var(--info) 34%, transparent);
    color: var(--info);
}

.task-reference-link.task-reference-status-in_progress {
    background: rgba(212, 212, 216, 0.10);
    border-color: rgba(212, 212, 216, 0.22);
    color: #d4d4d8;
}

.task-reference-link.task-reference-status-waiting {
    background: color-mix(in srgb, var(--warning-soft) 88%, transparent);
    border-color: color-mix(in srgb, var(--warning) 34%, transparent);
    color: var(--warning);
}

.task-reference-link.task-reference-status-done {
    background: color-mix(in srgb, var(--success-soft) 88%, transparent);
    border-color: color-mix(in srgb, var(--success) 34%, transparent);
    color: var(--success);
}

.task-reference-link.task-reference-status-dropped {
    background: color-mix(in srgb, var(--danger-soft) 84%, transparent);
    border-color: color-mix(in srgb, var(--danger) 34%, transparent);
    color: var(--danger);
}

.task-reference-invalid {
    background: color-mix(in srgb, var(--danger-soft) 84%, transparent);
    border: 1px dashed color-mix(in srgb, var(--danger) 42%, transparent);
    color: var(--danger);
    cursor: help;
}

.task-reference-unknown {
    background: rgba(212, 212, 216, 0.10);
    border: 1px solid rgba(212, 212, 216, 0.24);
    color: var(--muted-foreground);
}

.task-reference-icon {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 800;
    height: 14px;
    justify-content: center;
    line-height: 1;
    width: 14px;
}

.task-reference-icon-invalid {
    background: color-mix(in srgb, var(--danger) 18%, transparent);
    border: 1px solid currentColor;
}

.project-switcher-menu {
    background: rgba(17, 17, 17, 0.98);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: grid;
    gap: 4px;
    left: 0;
    margin-top: 8px;
    min-width: min(360px, calc(100vw - 48px));
    padding: 8px;
    position: absolute;
    top: 100%;
    z-index: 20;
}

.project-switcher-item {
    border-radius: calc(var(--radius) - 2px);
    display: grid;
    gap: 2px;
    padding: 8px 10px;
}

.project-switcher-item:hover,
.project-switcher-item-current {
    background: rgba(244, 244, 245, 0.08);
}

.project-switcher-item-name {
    font-weight: 700;
}

.project-switcher-item-code {
    color: var(--muted-foreground);
    font-size: 11px;
}

.account-link {
    align-items: center;
    color: var(--foreground);
    display: inline-flex;
    font-size: 12px;
    font-weight: 600;
    gap: 8px;
    min-height: 30px;
    max-width: 260px;
    overflow: hidden;
    padding: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.notification-bell {
    align-items: center;
    color: var(--muted-foreground);
    display: inline-flex;
    height: 28px;
    justify-content: center;
    position: relative;
    text-decoration: none;
    transition: color 0.15s ease;
    width: 28px;
}

.bug-report-trigger {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--muted-foreground);
    cursor: pointer;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    padding: 0;
    position: relative;
    text-decoration: none;
    transition: color 0.15s ease;
    width: 28px;
}

.bug-report-trigger svg {
    height: 16px;
    width: 16px;
}

.bug-report-trigger:hover {
    color: var(--foreground);
}

.bug-report-dialog {
    max-width: min(500px, calc(100vw - 32px));
}

.notification-bell svg {
    height: 15px;
    width: 15px;
}

.notification-bell:hover,
.notification-bell-active {
    color: var(--foreground);
}

.notification-bell-active {
    color: var(--warning);
}

.notification-dot {
    align-items: center;
    background: var(--danger);
    border: 2px solid var(--background);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 10px;
    font-weight: 700;
    justify-content: center;
    line-height: 1;
    min-height: 17px;
    min-width: 17px;
    padding: 0 4px;
    position: absolute;
    right: -5px;
    top: -5px;
}

.account-link span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-link-icon {
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    height: 24px;
    justify-content: center;
    position: relative;
    width: 24px;
}

.account-link-icon::before,
.account-link-icon::after {
    background: currentColor;
    content: "";
    display: block;
    position: absolute;
}

.account-link-icon::before {
    border-radius: 999px;
    height: 6px;
    top: 5px;
    width: 6px;
}

.account-link-icon::after {
    border-radius: 999px 999px 4px 4px;
    height: 7px;
    top: 13px;
    width: 12px;
}

.logout-form {
    margin: 0;
}

.app-content,
.shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0 auto;
    max-width: 1180px;
    padding: 24px;
}

.welcome-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.welcome-topbar {
    align-items: center;
    background: rgba(8, 8, 8, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-shrink: 0;
    justify-content: flex-end;
    min-height: 64px;
    padding: 0 24px;
}

.welcome-page {
    align-items: center;
    display: grid;
    flex: 1;
    padding: 32px;
}

.welcome-panel {
    margin: 0 auto;
    max-width: 640px;
}

.base-logo {
    display: block;
    flex-shrink: 0;
    object-fit: contain;
}

.base-logo--brand {
    height: 36px;
    width: 36px;
}

.base-logo--welcome {
    height: 96px;
    margin-bottom: 28px;
    width: 96px;
}

.brand-logo {
    align-items: center;
    display: inline-flex;
    min-height: 36px;
    min-width: 0;
}

.welcome-panel h1 {
    font-size: clamp(34px, 5vw, 56px);
    letter-spacing: 0;
    line-height: 1.02;
    margin: 0;
}

.welcome-copy {
    color: var(--muted-foreground);
    font-size: 16px;
    line-height: 1.7;
    margin: 18px 0 28px;
    max-width: 560px;
}

.auth-page {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.auth-card {
    max-width: 420px;
    width: 100%;
}

.brand {
    color: var(--foreground);
    font-weight: 720;
    letter-spacing: 0;
}

.topbar nav,
.app-topbar nav {
    display: flex;
    gap: 6px;
}

.nav-item {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--muted-foreground);
    cursor: pointer;
    display: flex;
    font-weight: 500;
    gap: 9px;
    min-height: 34px;
    padding: 0 10px;
    position: relative;
    text-align: left;
    width: 100%;
}

.nav-item > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-item-icon {
    align-items: center;
    color: var(--muted-foreground);
    display: inline-flex;
    flex: 0 0 auto;
    height: 18px;
    justify-content: center;
    opacity: 0.88;
    width: 18px;
}

.nav-item-icon svg {
    display: block;
    height: 18px;
    width: 18px;
}

.nav-item:hover .nav-item-icon,
.nav-item-active .nav-item-icon {
    color: inherit;
    opacity: 1;
}

.nav-item:hover {
    background: rgba(39, 39, 42, 0.58);
    color: var(--foreground);
}

.nav-item-active {
    background: rgba(244, 244, 245, 0.075);
    color: var(--foreground);
}

.nav-item-active::before {
    background: var(--foreground);
    border-radius: 999px;
    content: "";
    height: 16px;
    left: 0;
    opacity: 0.86;
    position: absolute;
    width: 2px;
}

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

.page-header-main {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.page-actions {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.breadcrumb-list {
    align-items: center;
    color: var(--muted-foreground);
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-item {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.breadcrumb-item:not(.breadcrumb-current)::after {
    color: var(--muted-foreground);
    content: "/";
}

.breadcrumb-list a {
    color: var(--muted-foreground);
    text-decoration: none;
}

.breadcrumb-list a:hover {
    color: var(--foreground);
}

.page-subtitle {
    color: var(--muted-foreground);
    font-size: 14px;
    margin: 2px 0 0;
    max-width: 52rem;
}

.page-local-nav {
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
}

.page-local-nav-link {
    color: var(--muted-foreground);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: -1px;
    padding: 7px 0 8px;
    position: relative;
    text-decoration: none;
}

.page-local-nav-link:hover {
    color: var(--foreground);
}

.page-local-nav-link.is-active {
    color: var(--foreground);
}

.page-local-nav-link.is-active::after {
    background: var(--foreground);
    bottom: 0;
    content: "";
    height: 2px;
    left: 0;
    position: absolute;
    right: 0;
}

.task-context-nav .page-local-nav-link {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.eyebrow {
    color: var(--muted-foreground);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    margin: 0 0 6px;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    letter-spacing: 0;
    margin: 0;
}

h1 {
    font-size: 28px;
    font-weight: 700;
}

h2 {
    font-size: 18px;
}

.grid {
    display: grid;
    gap: 16px;
}

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

.card,
.panel,
.token-panel {
    background: rgba(17, 17, 17, 0.86);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--card-foreground);
    margin-bottom: 0;
    overflow: hidden;
}

.table-panel {
    background: rgba(17, 17, 17, 0.86);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--card-foreground);
    margin-bottom: 0;
    overflow-x: auto;
    overflow-y: visible;
}

.card-header {
    border-bottom: 1px solid var(--border);
    padding: 15px 16px 12px;
}

.card-header-actions {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
}

.card-title {
    font-size: 16px;
    font-weight: 650;
    margin: 0;
}

.card-description {
    color: var(--muted-foreground);
    font-size: 13px;
    margin-top: 4px;
}

.card-content,
.panel,
.table-panel,
.token-panel {
    padding: 16px;
}

.card-footer {
    border-top: 1px solid var(--border);
    padding: 12px 16px;
}

.token-panel {
    border-color: rgba(196, 181, 253, 0.24);
}

.token-panel pre {
    background: rgba(8, 8, 8, 0.76);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    color: #ddd6fe;
    overflow-x: auto;
    padding: 14px;
}

.btn,
.button,
button {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: calc(var(--radius) - 2px);
    color: var(--foreground);
    cursor: pointer;
    display: inline-flex;
    font-weight: 500;
    gap: .5rem;
    justify-content: center;
    min-height: 2.25rem;
    padding: .5rem .875rem;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease, transform .08s ease;
    width: fit-content;
    max-width: 100%;
    flex: 0 0 auto;
}

.btn:hover,
.button:hover,
button:hover {
    transform: translateY(-.5px);
}

.btn-primary,
.button,
button {
    background: var(--primary);
    box-shadow: 0 10px 24px rgba(244, 244, 245, 0.10);
    color: var(--primary-foreground);
}

.btn-secondary,
.button.secondary {
    background: var(--secondary);
    border-color: var(--border);
    box-shadow: none;
    color: var(--secondary-foreground);
}

.btn-ghost {
    color: var(--muted-foreground);
}

.btn-ghost:hover {
    background: rgba(39, 39, 42, 0.76);
    color: var(--foreground);
}

.btn-small {
    font-size: 12px;
    min-height: 30px;
    padding: .35rem .65rem;
}

.btn-icon {
    gap: 0;
    min-height: 30px;
    min-width: 30px;
    padding: .35rem;
}

.btn-icon svg {
    display: block;
    flex-shrink: 0;
    height: 16px;
    width: 16px;
}

.row-actions .btn-icon {
    flex-shrink: 0;
}

.btn-danger {
    background: var(--danger);
    color: #1f1114;
}

.link-button {
    background: transparent;
    box-shadow: none;
    color: var(--danger);
    min-height: auto;
    padding: 0;
}

.link-button:hover {
    background: transparent;
    text-decoration: underline;
}

.input,
.textarea,
.select,
input,
textarea,
select {
    background: rgba(8, 8, 8, 0.72);
    border: 1px solid var(--input);
    border-radius: calc(var(--radius) - 2px);
    color: var(--foreground);
    outline: none;
    padding: .55rem .75rem;
    width: 100%;
}

.input-no-spinner {
    appearance: textfield;
}

.input-no-spinner::-webkit-inner-spin-button,
.input-no-spinner::-webkit-outer-spin-button {
    appearance: none;
    margin: 0;
}

.select,
select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted-foreground) 50%),
        linear-gradient(135deg, var(--muted-foreground) 50%, transparent 50%);
    background-position:
        calc(100% - 1rem) 50%,
        calc(100% - .72rem) 50%;
    background-repeat: no-repeat;
    background-size: .28rem .28rem, .28rem .28rem;
    padding-right: 2.25rem;
}

.input::placeholder,
.textarea::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--muted-foreground);
}

.input:focus,
.textarea:focus,
.select:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(244, 244, 245, 0.10);
}

.textarea {
    min-height: 9rem;
    resize: vertical;
}

.textarea-compact {
    min-height: 5rem;
}

.form-field,
label {
    color: var(--foreground);
    display: grid;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
}

.form-label {
    color: var(--foreground);
    font-weight: 600;
}

.form-label-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
    min-width: 0;
}

.form-label-row .form-label {
    min-width: 0;
}

.form-label-row .voice-input-status {
    flex: 1 1 140px;
}

.form-hint,
.muted {
    color: var(--muted-foreground);
    font-size: 12px;
}

.form-error {
    color: var(--danger);
    font-size: 12px;
}

.voice-input-control {
    min-width: 38px;
}

.voice-input-control.is-recording {
    background: var(--success-soft);
    border-color: color-mix(in srgb, var(--success) 42%, transparent);
    color: var(--success);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 12%, transparent);
}

.voice-input-control.is-processing {
    background: var(--info-soft);
    border-color: rgba(147, 197, 253, 0.34);
    color: var(--info);
}

.voice-input-control.is-failed {
    background: var(--danger-soft);
    border-color: rgba(253, 164, 175, 0.34);
    color: var(--danger);
}

.voice-input-control:disabled {
    cursor: default;
    opacity: .72;
    transform: none;
}

.voice-input-status {
    color: var(--muted-foreground);
    display: inline-flex;
    font-size: 12px;
    line-height: 1.3;
    min-height: 16px;
    padding-left: 8px;
    vertical-align: middle;
}

.voice-input-action {
    min-height: 40px;
    min-width: 46px;
    padding: .55rem;
}

.voice-input-action svg {
    height: 18px;
    width: 18px;
}

.voice-input-meter {
    align-items: center;
    display: inline-flex;
    gap: 2px;
    height: 18px;
    padding-left: 2px;
    vertical-align: middle;
    width: 30px;
}

.voice-input-meter[hidden] {
    display: none;
}

.voice-input-meter-bar {
    --bar-scale: var(--voice-level, .12);
    background: var(--success);
    border-radius: 999px;
    display: block;
    height: calc(4px + (14px * var(--bar-scale)));
    opacity: .88;
    transition: height .08s ease;
    width: 3px;
}

.voice-input-progress {
    background: color-mix(in srgb, var(--muted) 36%, transparent);
    border: 1px solid color-mix(in srgb, var(--success) 24%, transparent);
    border-radius: 999px;
    display: inline-flex;
    height: 8px;
    min-width: 120px;
    overflow: hidden;
    position: relative;
    width: clamp(120px, 18vw, 220px);
}

.voice-input-progress[hidden] {
    display: none;
}

.voice-input-progress::before {
    background: linear-gradient(90deg, var(--success), color-mix(in srgb, var(--success) 72%, white));
    content: "";
    inset: 0 auto 0 0;
    position: absolute;
    transition: width .1s linear;
    width: calc(var(--voice-progress, 0) * 100%);
}

.voice-input-meter-bar:nth-child(1),
.voice-input-meter-bar:nth-child(5) {
    height: calc(4px + (8px * var(--bar-scale)));
}

.voice-input-meter-bar:nth-child(2),
.voice-input-meter-bar:nth-child(4) {
    height: calc(4px + (12px * var(--bar-scale)));
}

.voice-input-meter.is-fallback .voice-input-meter-bar {
    animation: voice-meter-fallback .72s ease-in-out infinite;
}

.voice-input-meter.is-fallback .voice-input-meter-bar:nth-child(2) {
    animation-delay: .08s;
}

.voice-input-meter.is-fallback .voice-input-meter-bar:nth-child(3) {
    animation-delay: .16s;
}

.voice-input-meter.is-fallback .voice-input-meter-bar:nth-child(4) {
    animation-delay: .24s;
}

.voice-input-meter.is-fallback .voice-input-meter-bar:nth-child(5) {
    animation-delay: .32s;
}

@keyframes voice-meter-fallback {
    0%,
    100% {
        height: 5px;
    }
    50% {
        height: 18px;
    }
}

.form-grid {
    align-items: end;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

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

.form-grid .form-wide {
    grid-column: span 2;
}

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

.form-grid > .btn {
    justify-self: start;
}

.aligned-form {
    display: grid;
    gap: 8px;
}

.aligned-controls,
.aligned-hints {
    display: grid;
    gap: 14px;
}

.aligned-controls {
    align-items: end;
}

.aligned-hints {
    align-items: start;
}

.hint-cell {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.account-form-grid {
    align-items: start;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-profile-controls,
.account-profile-hints {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-profile-form .btn {
    justify-self: start;
    margin-top: 6px;
}

.account-token-form-grid {
    align-items: end;
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) auto;
}

.token-create-controls,
.token-create-hints {
    grid-template-columns: minmax(180px, max-content) minmax(220px, max-content) auto;
    justify-content: start;
    justify-items: start;
}

.project-token-create-controls,
.project-token-create-hints {
    grid-template-columns: minmax(220px, max-content) auto;
    justify-content: start;
    justify-items: start;
}

.account-form-grid .btn {
    align-self: end;
    justify-self: start;
}

.admin-user-profile-form > .btn {
    align-self: start;
    margin-top: 24px;
}

.form-inline-row {
    align-items: start;
    display: grid;
    gap: 14px;
}

.form-inline-row .form-hint {
    font-weight: 400;
    text-align: left;
}

.form-inline-submit-cell {
    display: grid;
    gap: 6px;
}

.form-inline-submit-cell .form-label {
    visibility: hidden;
}

.form-inline-submit-cell .btn,
.form-inline-submit-cell .project-toolbar-actions {
    justify-self: start;
    white-space: nowrap;
}

.project-create-form {
    display: grid;
    gap: 6px;
}

.project-archive-form {
    align-items: start;
    grid-template-columns: minmax(220px, 336px) auto;
}

.project-archive-form > .btn {
    align-self: start;
    margin-top: calc(13px * 1.2 + 6px);
}

.project-toolbar-row {
    --project-toolbar-hint-line-height: 1.45;
    --project-toolbar-hint-lines: 2;
    --project-toolbar-control-height: 2.25rem;
    align-items: start;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.project-toolbar-field {
    grid-template-rows: auto auto minmax(0, auto);
    min-width: 0;
}

.project-toolbar-field .input,
.project-toolbar-field .select,
.project-toolbar-pair .select {
    box-sizing: border-box;
    min-height: var(--project-toolbar-control-height);
    width: 100%;
}

.project-toolbar-pair {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
}

.project-toolbar-pair .form-field {
    min-width: 0;
}

.project-toolbar-row .form-hint {
    font-weight: 400;
    line-height: var(--project-toolbar-hint-line-height);
    min-height: calc(var(--project-toolbar-hint-lines) * var(--project-toolbar-hint-line-height) * 1em);
    text-align: left;
}

.project-toolbar-hint-placeholder {
    visibility: hidden;
}

.project-toolbar-row .form-inline-submit-cell {
    grid-template-rows: auto auto minmax(0, auto);
}

.project-toolbar-row .form-inline-submit-cell > .btn,
.project-toolbar-row .form-inline-submit-cell .project-toolbar-actions {
    align-self: end;
    min-height: var(--project-toolbar-control-height);
}

.project-toolbar-actions {
    align-items: center;
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 8px;
}

.project-toolbar-spacer-btn {
    pointer-events: none;
    visibility: hidden;
}

.git-webhook-create-row {
    grid-template-columns:
        minmax(120px, .7fr)
        minmax(0, 1fr)
        minmax(180px, 1fr)
        minmax(220px, 1.2fr)
        auto;
}

.project-user-add-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-user-add-row .form-field,
.project-user-add-row .form-inline-submit-cell,
.project-user-add-row .user-picker {
    min-width: 0;
}

.user-picker {
    min-width: 0;
    position: relative;
    width: 100%;
}

.user-picker-results {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    list-style: none;
    margin: 4px 0 0;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 20;
}

.user-picker-results.is-floating {
    margin: 0;
    position: fixed;
    z-index: 1200;
}

.card.project-user-add-card,
.card.project-user-add-card .card-content,
.card.project-users-panel {
    overflow: visible;
}

.project-user-role-cell {
    justify-content: center;
    width: 100%;
}

.project-user-role-cell form {
    margin: 0;
    width: min(100%, 180px);
}

.project-user-role-select {
    width: 100%;
}

.project-user-row-actions {
    justify-content: center;
}

.project-user-row-actions form {
    margin: 0;
}

.user-picker-results[hidden] {
    display: none;
}

.user-picker-option {
    border-radius: calc(var(--radius) - 2px);
    cursor: pointer;
    padding: 8px 10px;
}

.user-picker-option:hover,
.user-picker-option.is-active {
    background: rgba(39, 39, 42, 0.8);
}

.user-picker-option-label {
    display: block;
    font-weight: 600;
}

.user-picker-option-username {
    color: var(--muted-foreground);
    display: block;
    font-size: 12px;
}

.user-picker-empty {
    color: var(--muted-foreground);
    font-size: 13px;
    padding: 10px 12px;
}

.task-key-copy-cell {
    align-items: center;
    display: inline-flex;
    flex-wrap: nowrap;
}

.copyable-code {
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: inherit;
    padding: 0;
    text-decoration: underline dotted;
    text-decoration-color: rgba(161, 161, 170, 0.55);
    text-underline-offset: 3px;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.copyable-code:hover,
.copyable-code:focus-visible {
    color: var(--secondary-foreground);
    outline: none;
    text-decoration-color: rgba(212, 212, 216, 0.75);
}

.copyable-code.is-copied {
    color: inherit;
    text-decoration-color: rgba(134, 239, 172, 0.65);
}

.password-form-grid {
    align-items: end;
    gap: 8px 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
}

.password-form-grid .password-controls,
.password-form-grid .password-hints {
    display: contents;
}

.password-form-grid .form-hint {
    align-self: start;
}

.password-form-grid .btn {
    white-space: nowrap;
}

.projection-edit-toggle {
    flex: 0 0 auto;
    min-width: 0;
}

.projection-edit-toggle summary {
    list-style: none;
}

.projection-edit-toggle summary::-webkit-details-marker {
    display: none;
}

.projection-edit-toggle[open] {
    flex: 1 1 100%;
    width: 100%;
}

.projection-edit-toggle[open] summary {
    margin-left: auto;
    width: fit-content;
}

.projection-correction-form {
    background: rgba(8, 8, 8, 0.42);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 14px;
    padding: 14px;
}

.projection-correction-form .form-wide {
    grid-column: span 2;
}

.correction-checkbox {
    align-self: end;
}

.checkbox-field {
    align-content: start;
    gap: 6px;
}

.checkbox-field .checkbox-control {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    min-height: 2.25rem;
    min-width: 0;
    width: 100%;
}

.checkbox-field .checkbox-control .form-label {
    flex: 1;
    min-width: 0;
}

.checkbox-field .checkbox-control input[type="checkbox"] {
    accent-color: var(--primary);
    flex-shrink: 0;
    height: 1rem;
    margin: 0;
    width: 1rem;
}

.checkbox-field .form-hint {
    display: block;
    font-weight: 400;
    min-width: 0;
    width: 100%;
}

.checkbox-grid {
    display: grid;
    gap: 10px 14px;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    margin-top: 4px;
}

.checkbox-grid .checkbox-control {
    align-items: center;
    color: var(--text);
    display: flex;
    font-size: 0.88rem;
    gap: 8px;
    min-width: 0;
}

.checkbox-grid .checkbox-control input[type="checkbox"] {
    accent-color: var(--primary);
    flex-shrink: 0;
    margin: 0;
    order: 2;
}

.checkbox-grid .checkbox-control > span {
    min-width: 0;
    order: 1;
    overflow-wrap: anywhere;
}

.signal-checkbox-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.signal-checkbox-grid .checkbox-control {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) 16px;
    justify-content: start;
}

.signal-checkbox-grid .checkbox-control input[type="checkbox"] {
    justify-self: end;
    order: 2;
}

.signal-checkbox-grid .checkbox-control span {
    min-width: 0;
    order: 1;
    overflow-wrap: anywhere;
}

.projection-correction-form .form-actions {
    grid-column: 1 / -1;
}

.ai-provider-form {
    align-items: start;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-provider-form .hint-cell {
    display: none;
}

.ai-provider-form > .btn,
.ai-provider-form > .http-channel-form-actions {
    grid-column: 1 / -1;
    justify-self: end;
}

.ai-model-tabs-card {
    overflow: visible;
    padding: 0;
}

.ai-model-tabs-layout {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 420px;
}

.ai-model-tab-panel {
    min-width: 0;
    padding: 16px;
}

.ai-model-tab-nav {
    min-width: 50px;
}

.ai-model-tab-nav .integrations-tab-link {
    font-size: 12px;
    letter-spacing: .08em;
    padding: 16px 9px;
}

.ai-fallback-row {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    width: auto;
}

.ai-fallback-row .badge {
    align-self: center;
    justify-self: auto;
}

.ai-fallback-name {
    color: var(--foreground);
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-fallback-row .form-hint {
    margin: 0;
}

.integrations-tabs-card {
    overflow: visible;
    padding: 0;
}

.integrations-tabs-card > .card-header {
    display: none;
}

.integrations-tabs-layout {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 420px;
}

.integrations-tab-nav {
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 12px 0;
}

.integrations-tab-link {
    border-right: 2px solid transparent;
    color: var(--muted-foreground);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    line-height: 1;
    padding: 20px 16px;
    text-decoration: none;
    text-transform: uppercase;
    transform: rotate(180deg);
    writing-mode: vertical-rl;
}

.integrations-tab-link:hover {
    background: rgba(255, 255, 255, .03);
    color: var(--foreground);
}

.integrations-tab-link.is-active {
    background: rgba(255, 255, 255, .05);
    border-right-color: var(--primary);
    color: var(--foreground);
}

.integrations-tab-panels {
    min-width: 0;
    overflow: visible;
    padding: 16px;
}

.integrations-tab-panel.is-hidden {
    display: none;
}

.stack {
    display: grid;
    gap: 16px;
}

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

.kv-group {
    min-width: 0;
}

.kv-group h3 {
    color: var(--foreground);
    font-size: 13px;
    margin: 0 0 10px;
}

.badge {
    align-items: center;
    align-self: flex-start;
    border: 1px solid var(--border);
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 600;
    gap: .35rem;
    justify-self: end;
    line-height: 1rem;
    max-width: 100%;
    padding: .125rem .5rem;
    white-space: nowrap;
    width: fit-content;
}

.badge-open {
    background: var(--warning-soft);
    border-color: rgba(245, 158, 11, 0.28);
    color: var(--warning);
}

.badge-active {
    background: var(--success-soft);
    border-color: rgba(34, 197, 94, 0.28);
    color: var(--success);
}

.badge-success {
    background: var(--success-soft);
    border-color: rgba(34, 197, 94, 0.28);
    color: var(--success);
}

.badge-waiting {
    background: var(--info-soft);
    border-color: rgba(147, 197, 253, 0.24);
    color: var(--info);
}

.badge-review {
    background: var(--review-soft);
    border-color: rgba(139, 92, 246, 0.28);
    color: var(--review);
}

.badge-ai {
    background: var(--review-soft);
    border-color: rgba(139, 92, 246, 0.28);
    color: var(--review);
}

.badge-done {
    background: rgba(212, 212, 216, 0.10);
    border-color: rgba(212, 212, 216, 0.22);
    color: #d4d4d8;
}

.badge-danger {
    background: var(--danger-soft);
    border-color: rgba(239, 68, 68, 0.28);
    color: var(--danger);
}

.badge-attention {
    background: var(--attention-soft);
    border-color: rgba(251, 146, 60, 0.28);
    color: var(--attention);
}

.badge-warning {
    background: var(--warning-soft);
    border-color: rgba(245, 158, 11, 0.28);
    color: var(--warning);
}

.badge-info {
    background: var(--info-soft);
    border-color: rgba(147, 197, 253, 0.24);
    color: var(--info);
}

.badge-included {
    background: var(--review-soft);
    border-color: rgba(139, 92, 246, 0.28);
    color: var(--review);
}

.badge-excluded {
    background: rgba(212, 212, 216, 0.10);
    border-color: rgba(212, 212, 216, 0.22);
    color: #d4d4d8;
}

.badge-muted {
    background: rgba(212, 212, 216, 0.10);
    border-color: rgba(212, 212, 216, 0.22);
    color: #d4d4d8;
}

.badge-status-new {
    background: var(--info-soft);
    border-color: rgba(147, 197, 253, 0.24);
    color: var(--info);
}

.badge-status-in_progress {
    background: rgba(212, 212, 216, 0.10);
    border-color: rgba(212, 212, 216, 0.22);
    color: #d4d4d8;
}

.badge-status-waiting {
    background: var(--warning-soft);
    border-color: rgba(245, 158, 11, 0.28);
    color: var(--warning);
}

.badge-status-done {
    background: var(--success-soft);
    border-color: rgba(34, 197, 94, 0.28);
    color: var(--success);
}

.badge-status-dropped {
    background: var(--danger-soft);
    border-color: rgba(253, 164, 175, 0.28);
    color: var(--danger);
}

.badge-project-active {
    background: var(--success-soft);
    border-color: rgba(34, 197, 94, 0.28);
    color: var(--success);
}

.badge-project-paused {
    background: var(--warning-soft);
    border-color: rgba(245, 158, 11, 0.28);
    color: var(--warning);
}

.badge-project-done {
    background: rgba(212, 212, 216, 0.10);
    border-color: rgba(212, 212, 216, 0.22);
    color: #d4d4d8;
}

.badge-project-closed {
    background: var(--danger-soft);
    border-color: rgba(239, 68, 68, 0.28);
    color: var(--danger);
}

.badge-processing-pending,
.badge-processing-processing {
    background: var(--info-soft);
    border-color: rgba(147, 197, 253, 0.24);
    color: var(--info);
}

.badge-processing-ready {
    background: var(--review-soft);
    border-color: rgba(139, 92, 246, 0.28);
    color: var(--review);
}

.badge-processing-needs_review {
    background: var(--attention-soft);
    border-color: rgba(251, 146, 60, 0.28);
    color: var(--attention);
}

.badge-processing-failed,
.badge-processing-dead {
    background: var(--danger-soft);
    border-color: rgba(239, 68, 68, 0.28);
    color: var(--danger);
}

.badge-scratch-active {
    background: var(--info-soft);
    border-color: rgba(147, 197, 253, 0.24);
    color: var(--info);
}

.badge-scratch-promoted,
.badge-scratch-attached {
    background: var(--success-soft);
    border-color: rgba(34, 197, 94, 0.28);
    color: var(--success);
}

.badge-scratch-expired {
    background: var(--warning-soft);
    border-color: rgba(245, 158, 11, 0.28);
    color: var(--warning);
}

.badge-scratch-dismissed {
    background: var(--danger-soft);
    border-color: rgba(253, 164, 175, 0.28);
    color: var(--danger);
}

.status-list {
    display: grid;
    gap: 10px;
    margin: 0;
    min-width: 0;
}

.status-list div {
    align-items: center;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    padding-bottom: 10px;
}

.status-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

dt {
    color: var(--muted-foreground);
}

dd {
    font-weight: 600;
    margin: 0;
    min-width: 0;
    text-align: right;
    word-break: break-word;
}

.status-list-stack {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 3px;
    line-height: 1.35;
    min-width: 0;
}

.status-list dd {
    display: flex;
    flex: 0 1 auto;
    justify-content: flex-end;
    width: auto;
}

.status-list.compact {
    gap: 0;
    margin-top: 8px;
}

.status-list.compact div {
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
}

.status-list.compact dt {
    flex: 0 0 84px;
}

.status-list.compact dd {
    justify-content: flex-start;
    overflow-wrap: anywhere;
    text-align: left;
}

.status-list-row-stack {
    align-items: flex-start;
}

.integration-commit-examples {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.integration-commit-example {
    display: block;
    font-size: 12px;
    white-space: nowrap;
}

.webhook-url-copy-cell {
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
}

[data-copy-feedback] {
    overflow: visible;
    position: relative;
}

[data-copy-feedback] .copy-feedback-label {
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 4px);
    bottom: calc(100% + 6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    color: var(--muted-foreground);
    font-size: 11px;
    font-weight: 500;
    left: 50%;
    line-height: 1.2;
    opacity: 0;
    padding: 3px 7px;
    pointer-events: none;
    position: absolute;
    transform: translate(-50%, 4px);
    transition: opacity 0.16s ease, transform 0.16s ease;
    white-space: nowrap;
}

[data-copy-feedback] .copy-feedback-label:not(:empty) {
    opacity: 1;
    transform: translate(-50%, 0);
}

[data-copy-feedback] .copy-feedback-label:empty {
    border: 0;
    box-shadow: none;
    display: block;
    padding: 0;
}

[data-copy-feedback].is-copy-failed .copy-feedback-label:not(:empty) {
    background: var(--danger-soft);
    border-color: rgba(253, 164, 175, 0.28);
    color: var(--danger);
}

.copy-source-hidden {
    height: 1px;
    left: -9999px;
    overflow: hidden;
    position: absolute;
    width: 1px;
}

.project-mcp-copy-row {
    align-items: center;
    display: inline-flex;
    margin-top: 16px;
}

.integration-entry {
    border-bottom: 1px solid var(--border);
}

.token-scopes-disclosure {
    margin-top: 16px;
}

.token-scopes-toggle {
    cursor: pointer;
    list-style: none;
    width: fit-content;
}

.token-scopes-toggle::-webkit-details-marker {
    display: none;
}

.token-scopes-panel {
    background: rgba(8, 8, 8, 0.32);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 12px;
    max-width: 720px;
    padding: 14px 16px;
}

.scope-group + .scope-group {
    border-top: 1px solid var(--border);
    margin-top: 14px;
    padding-top: 14px;
}

.scope-group-title {
    color: var(--foreground);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.token-scopes-panel .scope-checkbox-list {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(220px, max-content));
    justify-content: start;
    list-style: none;
    margin: 0;
    padding: 0;
}

.token-scopes-panel .scope-checkbox-list li {
    margin: 0;
}

.token-scopes-panel .scope-checkbox {
    align-items: center;
    color: var(--muted-foreground);
    display: inline-flex;
    font-size: .86rem;
    font-weight: 500;
    gap: 8px;
    justify-content: flex-start;
    width: auto;
}

.token-scopes-panel .scope-checkbox-label {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.token-scopes-panel .scope-checkbox input[type="checkbox"] {
    accent-color: var(--primary);
    flex-shrink: 0;
    height: 1rem;
    margin: 0;
    width: 1rem;
}

.git-webhook-setup {
    border-top: 1px solid var(--border);
    margin-top: 18px;
    padding-top: 16px;
}

.git-webhook-setup-list {
    margin-bottom: 12px;
}

.git-provider-setup-panel {
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.git-history-panel {
    display: grid;
    gap: 16px;
}

.git-history-filter-form {
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.git-history-results {
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.git-integration-modal {
    display: grid;
    gap: 16px;
}

.git-integration-modal-meta {
    margin: 0;
}

.git-integration-edit-form .form-field {
    display: grid;
    font-weight: 600;
    gap: 6px;
}

.git-integration-edit-form .form-hint {
    font-weight: 400;
    line-height: 1.45;
}

.git-integration-modal-actions,
.git-api-modal-actions {
    align-items: center;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 16px;
}

.git-integration-modal-actions form,
.git-api-modal-actions form {
    margin: 0;
}

.card-disclosure {
    display: block;
}

.card-disclosure-summary {
    cursor: pointer;
    list-style: none;
}

.card-disclosure-summary::-webkit-details-marker {
    display: none;
}

.card-disclosure[open] .card-disclosure-summary {
    border-bottom: 1px solid var(--border);
}

.integration-provider-setup {
    font-size: 12px;
    line-height: 1.45;
    margin: 0;
}

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

.table th {
    border-bottom: 1px solid var(--border);
    color: var(--muted-foreground);
    font-size: 12px;
    font-weight: 600;
    padding: 10px 12px;
    text-align: center;
}

.table td {
    border-bottom: 1px solid var(--border);
    padding: 12px;
    text-align: center;
    overflow-wrap: anywhere;
    vertical-align: middle;
}

.table tr:hover td {
    background: rgba(39, 39, 42, 0.42);
}

.table-row {
    align-items: center;
    border-bottom: 1px solid var(--border);
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 46px;
    padding: 0 12px;
}

.table-row.token {
    grid-template-columns: minmax(90px, .75fr) minmax(90px, .7fr) minmax(80px, .6fr) minmax(100px, .75fr) minmax(110px, .75fr) minmax(72px, .5fr) minmax(148px, .85fr);
}

.table-row.token > :not(.row-actions) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-row.project-user {
    grid-template-columns:
        minmax(160px, 1.4fr)
        minmax(140px, 1fr)
        minmax(120px, .9fr)
        minmax(112px, .75fr);
    overflow: visible;
}

.table-row.project-user > * {
    justify-content: center;
    text-align: center;
}

.table-row.project-user .row-actions {
    justify-content: center;
}

.table-row.token .row-actions .btn {
    white-space: nowrap;
}

.table-row.project-user .row-actions .btn {
    white-space: nowrap;
}

.table-row.account-token {
    grid-template-columns:
        minmax(96px, .9fr)
        minmax(88px, .65fr)
        minmax(96px, .75fr)
        minmax(86px, .62fr)
        minmax(86px, .62fr)
        minmax(76px, .55fr)
        minmax(76px, .55fr)
        minmax(72px, .55fr);
}

.table-row.account-token > :not(.row-actions) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-row.account-token .btn:not(.btn-icon) {
    min-height: 2rem;
    padding: .4rem .6rem;
}

.table-row.git-webhook {
    grid-template-columns:
        minmax(80px, .65fr)
        minmax(120px, 1fr)
        minmax(96px, .7fr)
        minmax(92px, .65fr)
        minmax(110px, .75fr)
        minmax(72px, .5fr)
        minmax(124px, .75fr);
}

.table-row.git-webhook > :not(.row-actions),
.table-row.ai-provider > :not(.row-actions) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-row.git-webhook .row-actions,
.table-row.ai-provider .row-actions,
.table-row.http-channel .row-actions,
.table-row.token .row-actions,
.table-row.account-token .row-actions,
.table-row.project-user .row-actions {
    flex-shrink: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
    min-width: auto;
    overflow: visible;
}

.table-row.git-webhook .row-actions .btn,
.table-row.ai-provider .row-actions .btn {
    white-space: nowrap;
}

.webhook-history-event {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}

.webhook-history-event-header {
    align-items: start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.webhook-history-title,
.webhook-history-counters {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.webhook-history-counters {
    color: var(--muted);
    font-size: 12px;
    justify-content: flex-end;
}

.webhook-history-meta {
    margin: 14px 0;
}

.webhook-history-meta .webhook-history-meta-wide {
    align-items: stretch;
    display: grid;
    gap: 7px;
    justify-content: stretch;
}

.webhook-history-meta dd.webhook-history-compare {
    justify-content: flex-start;
    text-align: left;
    width: 100%;
}

.webhook-history-compare {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
}

.webhook-history-compare-url {
    background: rgba(8, 8, 8, 0.42);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--foreground);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.45;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 7px 9px;
}

.webhook-history-compare-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.git-api-settings-form {
    display: grid;
    gap: 6px 12px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.git-api-settings-form .form-hint {
    font-weight: 400;
    line-height: 1.35;
}

.table-row.webhook-history-delivery {
    grid-template-columns:
        minmax(92px, .7fr)
        minmax(120px, .9fr)
        minmax(78px, .6fr)
        minmax(130px, .8fr)
        minmax(0, 2.4fr);
}

.table-row.webhook-history-delivery > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-row.user {
    grid-template-columns:
        minmax(130px, 1fr)
        minmax(140px, 1fr)
        minmax(96px, .75fr)
        minmax(90px, .65fr)
        minmax(112px, .8fr)
        minmax(112px, .8fr);
}

.table-row.project {
    grid-template-columns: minmax(170px, 1.2fr) minmax(96px, .65fr) minmax(120px, .8fr) minmax(70px, .45fr) minmax(88px, .55fr) minmax(145px, .85fr) minmax(96px, .6fr);
}

.table-row.ai-provider {
    grid-template-columns: minmax(110px, 1fr) minmax(94px, .65fr) minmax(160px, 1.35fr) minmax(110px, .9fr) minmax(105px, .75fr) minmax(86px, .6fr) minmax(105px, .7fr) minmax(124px, .75fr);
}

.table-row.http-channel {
    grid-template-columns:
        minmax(110px, 1fr)
        minmax(160px, 1.35fr)
        minmax(100px, .85fr)
        minmax(96px, .7fr)
        minmax(110px, .75fr)
        minmax(124px, .75fr);
}

.table-row.http-channel > :not(.row-actions) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-row.http-channel .row-actions {
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    overflow: visible;
}

.table-row.http-channel .row-actions .btn {
    white-space: nowrap;
}

.table-row.platform-project {
    grid-template-columns:
        minmax(170px, 1.35fr)
        minmax(150px, 1fr)
        minmax(56px, .34fr)
        minmax(48px, .3fr)
        minmax(82px, .45fr)
        minmax(112px, .65fr)
        minmax(96px, .52fr)
        minmax(128px, .75fr);
}

.table-row.platform-project > .platform-project-owner,
.table-row.platform-project > .platform-project-created {
    justify-content: center;
    text-align: center;
}

.table-row.scratch-row {
    grid-template-columns:
        minmax(280px, 2fr)
        minmax(88px, .4fr)
        minmax(108px, .5fr)
        minmax(120px, .55fr)
        minmax(150px, .65fr)
        minmax(120px, .5fr);
}

.card > .table-panel.scratch-table {
    border-top: 1px solid var(--border);
    padding: 0;
}

.table-row.scratch-row > .scratch-row-title {
    color: var(--text);
    font-weight: 650;
    justify-content: flex-start;
    text-align: left;
}

.platform-project-note {
    display: block;
    font-size: 12px;
    margin-top: 4px;
}

.admin-project-lifecycle-value {
    font-weight: 500;
}

.platform-project-filter-form {
    align-items: end;
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
}

.platform-project-filter-search {
    flex: 0 1 220px;
    max-width: 240px;
    min-width: 160px;
}

.platform-project-filter-status .select {
    min-width: 9.5rem;
}

.platform-project-filter-limit .select {
    min-width: 5.5rem;
}

.platform-project-filter-form > .btn {
    flex-shrink: 0;
}

.platform-project-ai-split {
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: 999px;
    display: inline-flex;
    justify-content: center;
    overflow: hidden;
}

.platform-project-ai-segment {
    align-items: center;
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    justify-content: center;
    line-height: 1;
    min-height: 22px;
    min-width: 26px;
    padding: 0 8px;
}

.platform-project-ai-segment + .platform-project-ai-segment {
    border-left: 1px solid rgba(255, 255, 255, .18);
}

.platform-project-ai-segment.is-enabled {
    background: rgba(34, 197, 94, .16);
    color: #86efac;
}

.platform-project-ai-segment.is-disabled {
    background: rgba(113, 113, 122, .18);
    color: var(--muted-foreground);
}

.platform-project-ai-segment.is-missing {
    background: rgba(245, 158, 11, .16);
    color: #fbbf24;
}

.scratch-filter-form {
    grid-template-columns: minmax(220px, 1.5fr) minmax(120px, .8fr) minmax(120px, .8fr) auto;
    justify-content: start;
}

.scratch-filter-form .scratch-filter-apply {
    justify-self: start;
}

.scratch-filter-status .select,
.scratch-filter-expired .select {
    min-width: 9.5rem;
}

.mcp-config-textarea {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.45;
    margin-top: 8px;
    min-height: 220px;
    resize: vertical;
    white-space: pre;
    width: 100%;
}

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

.admin-project-control-row {
    align-items: center;
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-end;
}

.admin-project-control-row form {
    align-items: center;
    display: inline-flex;
    flex-shrink: 0;
    margin: 0;
}

.admin-project-control-row .badge {
    align-self: center;
    margin: 0;
}

.admin-project-control-row .btn-small {
    align-self: center;
    flex-shrink: 0;
}

.admin-project-status-select {
    flex: 0 0 auto;
    min-height: 30px;
    padding: .35rem 2rem .35rem .65rem;
    width: 8.5rem;
}

.table-row.bug-report {
    grid-template-columns:
        minmax(112px, .78fr)
        minmax(120px, .9fr)
        minmax(180px, 1.3fr)
        minmax(84px, .55fr)
        minmax(84px, .55fr)
        minmax(88px, .6fr)
        minmax(200px, 1.45fr);
}

.bug-report-filter-form {
    grid-template-columns: minmax(0, 200px) minmax(0, 200px) minmax(0, 200px) auto;
    justify-content: start;
}

.bug-report-filter-form .form-actions.align-input {
    align-items: center;
    align-self: end;
    display: flex;
    gap: 8px;
    justify-self: start;
}

.bug-report-context {
    align-items: center;
    flex-direction: column;
    gap: 2px;
}

.bug-report-context small {
    color: var(--muted-foreground);
    font-size: 12px;
    max-width: 100%;
}

.table-row.bug-report:not(.header) {
    align-items: start;
    min-height: 56px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.table-row.bug-report:not(.header) > :last-child {
    justify-content: flex-start;
    text-align: left;
}

.table-row.bug-report .bug-report-description {
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    align-items: flex-start;
    align-self: start;
    color: var(--muted-foreground);
    display: -webkit-box;
    justify-content: flex-start;
    line-height: 1.45;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: normal;
}

.bug-report-detail-grid {
    align-items: start;
}

.bug-report-triage-form {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
}

.bug-report-triage-form > .form-field:first-of-type {
    max-width: 220px;
}

.bug-report-triage-form > .btn {
    justify-self: start;
}

.pre-wrap {
    white-space: pre-wrap;
}

.break-word {
    overflow-wrap: anywhere;
}

.table-row.header {
    color: var(--muted-foreground);
    font-size: 12px;
    font-weight: 700;
    min-height: 34px;
    text-transform: uppercase;
}

.table-row:hover:not(.header) {
    background: rgba(39, 39, 42, 0.42);
}

.table-row[data-row-href],
.task-row[data-row-href],
.kanban-card[data-row-href],
.notification-item[data-row-href] {
    cursor: pointer;
}

.row-link {
    color: inherit;
    min-width: 0;
    overflow: hidden;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row-link:hover,
.row-link:focus-visible {
    color: var(--primary);
}

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

.table-row > * {
    align-items: center;
    display: flex;
    justify-content: center;
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: center;
}

.table-row > :first-child {
    justify-content: center;
    text-align: center;
}

.table-row > :last-child {
    justify-content: center;
    text-align: center;
}

.table-row.token > :nth-child(2),
.table-row.ai-provider > :nth-child(2),
.table-row.ai-provider > :nth-child(4) {
    justify-content: center;
    text-align: center;
}

.table-row.scratch-row > * {
    min-width: 0;
    overflow-wrap: normal;
}

.table-row.scratch-row.header > :first-child {
    justify-content: flex-start;
    text-align: left;
}

.table-row.scratch-row:not(.header) > :first-child {
    align-items: stretch;
    justify-content: flex-start;
    text-align: left;
}

.table-row.scratch-row > .scratch-row-title {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.task-list {
    display: grid;
}

.kanban-board {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(230px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
}

.kanban-column {
    background: rgba(17, 17, 17, 0.28);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 230px;
    padding: 12px;
}

.kanban-column-header {
    align-items: flex-start;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.kanban-column-header h3 {
    font-size: 14px;
    margin: 0;
}

.kanban-column-header p {
    color: var(--muted-foreground);
    font-size: 12px;
    margin: 4px 0 0;
}

.kanban-cards {
    display: grid;
    gap: 10px;
}

.kanban-card {
    background: rgba(39, 39, 42, 0.42);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    color: inherit;
    display: grid;
    gap: 8px;
    padding: 12px;
    text-decoration: none;
}

.kanban-card:hover {
    background: rgba(39, 39, 42, 0.62);
    border-color: var(--border-strong);
}

.kanban-card .task-title,
.kanban-card .task-meta {
    white-space: normal;
}

.kanban-card .task-title,
.kanban-card .task-card-summary,
.kanban-card .task-card-signal {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.kanban-card .task-title,
.kanban-card .task-card-summary,
.kanban-card .task-card-signal {
    -webkit-line-clamp: 2;
}

.kanban-card-footer {
    align-items: center;
    color: var(--muted-foreground);
    display: flex;
    font-size: 12px;
    gap: 8px;
    justify-content: space-between;
    margin-top: 2px;
}

.kanban-card-hidden {
    display: none;
}

.kanban-column-footer {
    margin-top: 12px;
}

.kanban-more {
    color: var(--muted-foreground);
    font-size: 12px;
    margin: 12px 0 0;
}

.notification-list {
    display: grid;
    gap: 12px;
}

.notification-item {
    background: rgba(17, 17, 17, 0.34);
    border: 1px solid var(--border);
    border-left: 2px solid var(--border-strong);
    border-radius: calc(var(--radius) - 2px);
    padding: 14px 16px;
}

.notification-item[data-row-href]:hover {
    background: rgba(39, 39, 42, 0.42);
}

.notification-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.notification-message {
    color: var(--foreground);
    line-height: 1.55;
    margin: 0;
    white-space: pre-wrap;
}

.notification-context {
    color: var(--foreground);
    font-size: 13px;
    font-weight: 650;
    margin: 0 0 8px;
}

.notification-foot {
    color: var(--muted-foreground);
    font-size: 12px;
    line-height: 1.5;
    margin: 10px 0 0;
}

.notification-foot a {
    color: var(--info);
    text-decoration: none;
}

.notification-foot a:hover {
    text-decoration: underline;
}

.task-row {
    align-items: center;
    background: rgba(17, 17, 17, 0.34);
    border-bottom: 1px solid var(--border);
    display: grid;
    gap: 12px;
    grid-template-columns: 28px 88px minmax(0, 1fr) minmax(160px, max-content);
    padding: 14px 16px;
    position: relative;
}

.task-row > * {
    min-width: 0;
}

.task-row:hover {
    background: rgba(39, 39, 42, 0.56);
}

.task-row-active {
    background: rgba(244, 244, 245, 0.07);
    box-shadow: inset 3px 0 0 var(--primary);
}

.task-row-dragging {
    opacity: 0.48;
}

.task-row-drop-before::before,
.task-row-drop-after::after {
    background: var(--foreground);
    content: "";
    height: 2px;
    left: 12px;
    position: absolute;
    right: 12px;
    z-index: 1;
}

.task-row-drop-before::before {
    top: -1px;
}

.task-row-drop-after::after {
    bottom: -1px;
}

.task-drag-cell {
    align-items: center;
    display: flex;
    justify-content: center;
}

.task-drag-handle {
    border-radius: 6px;
    color: var(--muted-foreground);
    cursor: grab;
    font-size: 16px;
    line-height: 1;
    padding: 4px 2px;
    user-select: none;
}

.task-drag-handle:hover {
    background: rgba(244, 244, 245, 0.08);
    color: var(--foreground);
}

.task-drag-handle:active {
    cursor: grabbing;
}

.task-pin-top-form {
    left: 0;
    margin: 0;
    position: absolute;
    top: 0;
    z-index: 2;
}

.task-pin-top-btn {
    --task-pin-top-size: 54px;
    align-items: flex-start;
    background: rgba(244, 244, 245, 0.09);
    border: 0;
    box-sizing: border-box;
    clip-path: path('M 0 0 H 54 A 54 54 0 0 0 0 54 Z');
    color: var(--muted-foreground);
    cursor: pointer;
    display: flex;
    font-size: 15px;
    font-weight: 700;
    height: var(--task-pin-top-size);
    justify-content: flex-start;
    line-height: 1;
    padding: 3px 0 0 4px;
    width: var(--task-pin-top-size);
}

.task-pin-top-btn:hover {
    background: var(--primary);
    color: var(--primary-foreground);
}

.task-id {
    color: var(--muted-foreground);
    font-family: var(--font-mono);
    font-size: 12px;
}

.task-row-link {
    color: inherit;
    text-decoration: none;
}

.task-row-link:hover .task-title,
.task-title.task-row-link:hover {
    color: var(--primary);
}

.task-main {
    display: block;
    min-width: 0;
}

.task-title {
    color: var(--foreground);
    display: block;
    font-weight: 650;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-meta {
    color: var(--muted-foreground);
    display: flex;
    font-size: 12px;
    gap: 14px;
    margin-top: 6px;
    min-width: 0;
}

.task-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.row-actions form {
    margin: 0;
}

.scope-list {
    color: var(--muted-foreground);
    font-size: 12px;
}

.action-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.action-hint {
    flex-basis: 100%;
    font-size: 12px;
    margin: 0;
    text-align: right;
}

.modal-dialog {
    background: rgba(17, 17, 17, 0.98);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    color: var(--foreground);
    max-width: min(520px, calc(100vw - 32px));
    padding: 0;
    width: 100%;
}

.modal-dialog:not([open]) {
    display: none;
}

.modal-dialog-wide {
    max-width: min(640px, calc(100vw - 32px));
}

.modal-dialog.modal-dialog-generated {
    border: 1px solid color-mix(in srgb, var(--review) 32%, transparent);
    box-shadow: var(--shadow), inset 3px 0 0 color-mix(in srgb, var(--review) 24%, transparent);
}

.btn-generated-accent {
    background: var(--review-soft);
    border-color: color-mix(in srgb, var(--review) 32%, transparent);
    color: var(--review);
}

.btn-generated-accent:hover {
    background: color-mix(in srgb, var(--review-soft) 70%, var(--secondary));
    border-color: color-mix(in srgb, var(--review) 48%, transparent);
    color: #ddd6fe;
}

.btn-warning-accent {
    background: color-mix(in srgb, var(--warning-soft) 55%, var(--secondary));
    border-color: color-mix(in srgb, var(--warning) 18%, var(--border));
    color: color-mix(in srgb, #fbbf24 68%, var(--secondary-foreground));
}

.btn-warning-accent:hover {
    background: color-mix(in srgb, var(--warning-soft) 68%, var(--secondary));
    border-color: color-mix(in srgb, var(--warning) 26%, var(--border));
    color: color-mix(in srgb, #fbbf24 82%, var(--secondary-foreground));
}

.btn:disabled,
.button:disabled,
button:disabled,
.btn-generated-accent:disabled,
.btn-warning-accent:disabled {
    background: color-mix(in srgb, var(--muted) 72%, var(--background));
    border-color: color-mix(in srgb, var(--border) 84%, var(--muted-foreground));
    box-shadow: none;
    color: color-mix(in srgb, var(--muted-foreground) 84%, var(--foreground));
    cursor: default;
    opacity: .76;
}

.btn:disabled:hover,
.button:disabled:hover,
button:disabled:hover,
.btn-generated-accent:disabled:hover,
.btn-warning-accent:disabled:hover {
    background: color-mix(in srgb, var(--muted) 72%, var(--background));
    border-color: color-mix(in srgb, var(--border) 84%, var(--muted-foreground));
    box-shadow: none;
    color: color-mix(in srgb, var(--muted-foreground) 84%, var(--foreground));
    transform: none;
}

.modal-form-scroll {
    max-height: min(70vh, 720px);
    overflow-y: auto;
    padding-right: 4px;
}

.modal-dialog::backdrop {
    background: rgba(0, 0, 0, 0.64);
    backdrop-filter: blur(3px);
}

.modal-form {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.http-channel-dialog {
    max-height: min(860px, calc(100vh - 32px));
}

.http-channel-modal {
    max-height: calc(100vh - 72px);
    overflow-y: auto;
}

.http-channel-modal .card-title,
.http-channel-modal .card-description,
.http-channel-form .form-label,
.http-channel-form .form-hint,
.http-channel-form .section-title {
    text-align: left;
}

.http-channel-form {
    align-items: start;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 3.4fr) minmax(68px, 0.65fr) minmax(72px, max-content);
}

.http-channel-form-modal,
.http-channel-form-create {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 4fr) minmax(64px, 0.58fr) minmax(56px, max-content);
}

.http-channel-form-modal .http-channel-enabled-field,
.http-channel-form-create .http-channel-enabled-field {
    min-width: 56px;
}

.http-channel-form-hints {
    display: grid;
    gap: 14px 16px;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 3.4fr) minmax(68px, 0.65fr) minmax(72px, max-content);
}

.http-channel-form-modal .http-channel-form-hints {
    grid-column: 1 / 4;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 4fr) minmax(64px, 0.58fr);
}

.http-channel-form .form-field > .form-hint {
    display: -webkit-box;
    font-weight: 400;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.35;
    min-width: 0;
    overflow: hidden;
    text-align: left;
}

.http-channel-form .form-field-wide,
.http-channel-form .http-channel-form-actions {
    grid-column: 1 / -1;
}

.http-channel-hint {
    align-self: start;
    display: -webkit-box;
    font-weight: 400;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.35;
    margin-top: -8px;
    min-width: 0;
    overflow: hidden;
}

.http-channel-enabled-field {
    align-self: start;
    gap: 6px;
    justify-items: end;
    justify-self: end;
    min-width: 72px;
    text-align: right;
    width: 100%;
}

.http-channel-enabled-field .form-label {
    text-align: right;
    width: 100%;
}

.http-channel-enabled-field .toggle-switch {
    justify-self: end;
}

.http-channel-form .textarea.http-channel-textarea {
    min-height: 0;
    resize: vertical;
}

.http-channel-form .textarea.http-channel-textarea-headers {
    height: calc(0.55rem * 2 + 1.45em * 4);
}

.http-channel-form .textarea.http-channel-textarea-body {
    height: calc(0.55rem * 2 + 1.45em * 6);
}

.http-channel-signal-groups {
    display: grid;
    gap: 10px 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 2px;
}

.http-channel-signal-group {
    background: rgba(8, 8, 8, 0.34);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 4px);
    min-width: 0;
    padding: 8px 10px;
}

.http-channel-signal-group-title {
    color: var(--muted-foreground);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.04em;
    margin: 0 0 6px;
    text-align: left;
    text-transform: uppercase;
}

.http-channel-signal-groups .signal-checkbox-grid {
    gap: 3px 6px;
    grid-template-columns: minmax(0, 1fr);
    margin-top: 0;
}

.http-channel-signal-groups .checkbox-control {
    font-size: 12px;
    gap: 6px;
    line-height: 1.25;
}

.http-channel-signal-groups .signal-checkbox-grid .checkbox-control {
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) 14px;
}

.http-channel-form .form-field .form-hint {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.http-channel-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.http-channel-form-actions .btn {
    flex: 0 0 auto;
    width: auto;
}

.toggle-switch {
    cursor: pointer;
    display: inline-flex;
    flex-shrink: 0;
    position: relative;
}

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

.toggle-switch-track {
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: 999px;
    display: block;
    height: 24px;
    position: relative;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    width: 42px;
}

.toggle-switch-track::after {
    background: var(--muted-foreground);
    border-radius: 50%;
    content: "";
    height: 18px;
    left: 2px;
    position: absolute;
    top: 2px;
    transition: transform 0.15s ease, background-color 0.15s ease;
    width: 18px;
}

.toggle-switch input:checked + .toggle-switch-track {
    background: var(--success-soft);
    border-color: rgba(134, 239, 172, 0.35);
}

.toggle-switch input:checked + .toggle-switch-track::after {
    background: var(--success);
    transform: translateX(18px);
}

.toggle-switch input:focus-visible + .toggle-switch-track {
    outline: 2px solid var(--info);
    outline-offset: 2px;
}

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

.modal-header h2 {
    font-size: 17px;
    margin: 0;
}

.modal-header p {
    color: var(--muted-foreground);
    font-size: 13px;
    line-height: 1.45;
    margin: 4px 0 0;
}

.modal-close {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--muted-foreground);
    cursor: pointer;
    display: inline-flex;
    font-size: 24px;
    height: 30px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 30px;
}

.modal-close:hover {
    color: var(--foreground);
}

.modal-actions {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.modal-actions-left {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    gap: 8px;
    justify-content: flex-start;
    min-width: 0;
}

.badge-row {
    align-items: flex-start;
    align-self: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    justify-self: end;
    min-width: 0;
    width: fit-content;
    max-width: 100%;
}

.task-row > .badge,
.task-row > .badge-row {
    justify-self: end;
}

.table-row .badge {
    flex: 0 0 auto;
    width: fit-content;
}

.semantic-tags .badge {
    justify-self: start;
}

.metric-card .badge {
    justify-self: start;
}

.semantic-tags {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
    margin-top: 0;
}

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

.metric-card {
    background: rgba(8, 8, 8, 0.42);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    padding: 12px;
}

.metric-card-link {
    color: inherit;
    display: block;
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.metric-card-link:hover {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.dashboard-owned-filter-view {
    flex: 0 1 220px;
    max-width: 240px;
    min-width: 180px;
}

.dashboard-owned-filter-project .select {
    min-width: 10rem;
}

.dashboard-owned-filter-view .select {
    min-width: 100%;
}

.dashboard-task-row {
    grid-template-columns: 72px minmax(0, 1fr) minmax(220px, auto);
}

.dashboard-task-badges {
    align-items: center;
    column-gap: 6px;
    row-gap: 6px;
}

.dashboard-task-updated {
    color: var(--muted-foreground);
    font-size: 12px;
    margin-left: 12px;
    white-space: nowrap;
}

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

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

.review-task-row {
    grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
}

.review-task-row .task-main {
    min-width: 0;
}

.review-task-row .task-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-task-row .badge-row {
    justify-self: end;
}

.project-settings-layout {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
}

.project-settings-metadata {
    grid-row: span 2;
}

.project-metadata-form {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-metadata-form .form-wide {
    grid-column: 1 / -1;
}

.project-metadata-regional-row {
    align-items: start;
    display: grid;
    gap: 14px;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}

.project-metadata-save-cell {
    display: grid;
    gap: 6px;
}

.project-metadata-save-cell .form-label {
    visibility: hidden;
}

.project-metadata-save-cell .btn {
    justify-self: start;
    white-space: nowrap;
}

.project-owner-form {
    display: grid;
    gap: 12px;
}

.project-owner-form .btn {
    justify-self: start;
}

.project-status-current {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin-bottom: 16px;
}

.project-status-current-label {
    color: var(--muted-foreground);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.project-overview {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 0;
}

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

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

.metrics-footnote {
    margin: 12px 0 0;
}

.task-detail-metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.task-action-key-row {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.task-action-key-row .task-action-key {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.task-action-key-row .task-action-key:hover,
.task-action-key-row .task-action-key:focus-visible {
    text-decoration: underline dotted;
}

.task-work-inline-form {
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.task-work-inline-form > .btn {
    align-self: end;
    white-space: nowrap;
}


.task-work-compact-field .input,
.task-work-compact-field .select {
    min-width: 5rem;
    width: 5rem;
}

.task-work-assignee-field .select {
    min-width: calc(10rem + 12px);
    width: calc(10rem + 12px);
}

.task-detail-metrics .metric-card {
    align-content: start;
    display: grid;
    gap: 6px;
    min-width: 0;
}

.task-detail-metrics .metric-card strong,
.task-detail-metrics .metric-card .badge {
    justify-self: start;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: fit-content;
    max-width: 100%;
}

.task-layout {
    align-items: start;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
}

.task-delete-panel {
    border-top: 1px solid var(--border);
    color: var(--muted-foreground);
    font-size: 13px;
    padding-top: 16px;
}

.task-delete-copy {
    margin: 0 0 10px;
    max-width: 52rem;
}

.scratch-danger-panel {
    align-items: flex-start;
    display: flex;
    justify-content: flex-start;
}

.scratch-danger-panel form {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    max-width: 520px;
}

.scratch-action-form .form-field {
    width: 100%;
}

.scratch-action-field {
    display: none;
}

.scratch-action-field.is-visible {
    display: block;
}

.scratch-action-form-actions {
    display: flex;
    justify-content: flex-start;
}

.task-page-heading {
    min-width: 0;
}

.task-page-title {
    max-width: min(860px, 68vw);
    overflow-wrap: anywhere;
}

.task-main-column,
.task-side-column {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.task-main-column > .card,
.task-side-column > .card {
    margin-bottom: 0;
}

.generated-surface {
    border-color: color-mix(in srgb, var(--review) 24%, transparent);
    box-shadow: inset 2px 0 0 color-mix(in srgb, var(--review) 18%, transparent);
}

.layer-pill {
    align-self: flex-start;
    background: var(--review-soft);
    border: 1px solid color-mix(in srgb, var(--review) 24%, transparent);
    border-radius: 999px;
    color: var(--review);
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 4px 8px;
    text-transform: uppercase;
}

.metric-label {
    color: var(--muted-foreground);
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
}

.field-list {
    display: grid;
    gap: 18px;
}

.field-block {
    min-width: 0;
}

.field-label {
    color: var(--foreground);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.field-value {
    color: var(--muted-foreground);
    line-height: 1.55;
    overflow-wrap: anywhere;
    text-align: left;
}

.field-note {
    display: block;
    font-size: 12px;
    margin-top: 4px;
}

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

.project-state-meta {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.project-state-meta-item {
    background: rgba(8, 8, 8, 0.42);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 10px 12px;
}

.project-state-meta-label {
    color: var(--muted-foreground);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.project-state-meta-value,
code.project-state-meta-value {
    background: transparent;
    border: 0;
    color: var(--foreground);
    font-size: 14px;
    font-weight: 600;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 0;
}

.project-domain-context {
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    display: grid;
    gap: 12px;
    padding: 14px;
}

.project-domain-context-header {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.project-domain-context-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
}

.project-domain-context-header .form-hint {
    margin-top: 4px;
}

.project-description-panel {
    background: rgba(8, 8, 8, 0.5);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    color: var(--foreground);
    font-size: 13px;
    line-height: 1.6;
    max-height: 12rem;
    overflow-wrap: anywhere;
    overflow-y: auto;
    padding: 12px 14px;
    text-align: left;
    white-space: pre-line;
}

.project-description-panel.is-empty {
    color: var(--muted-foreground);
    display: grid;
    gap: 6px;
    max-height: none;
    overflow-y: visible;
}

.project-description-panel.is-empty p {
    margin: 0;
}

.projection-card {
    background: rgba(8, 8, 8, 0.38);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-top: 16px;
    padding: 16px;
}

.projection-card-flush {
    margin-top: 0;
}

.projection-card h3 {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 8px;
}

.projection-card p {
    color: var(--muted-foreground);
    line-height: 1.55;
    margin: 0 0 14px;
}

.timeline {
    display: grid;
    gap: 12px;
}

.timeline-item {
    border-left: 2px solid var(--border);
    padding-left: 12px;
}

.timeline-item-excluded {
    border-left-color: var(--danger);
    opacity: 0.78;
}

.timeline-item-layout {
    align-items: start;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.timeline-item-main {
    min-width: 0;
}

.timeline-item-aside {
    align-items: center;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 10px;
    min-width: 52px;
}

.timeline-meta {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.timeline-meta-time {
    font-size: 12px;
    line-height: 1.35;
    text-align: center;
    white-space: nowrap;
}

.timeline-head {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.timeline-item p {
    color: var(--muted-foreground);
    margin: 8px 0 0;
}

.timeline-text {
    line-height: 1.55;
    max-width: 78ch;
    white-space: pre-wrap;
}

.timeline-git-link {
    display: inline-flex;
    line-height: 0;
    text-decoration: none;
}

.timeline-git-link:hover {
    opacity: 0.85;
}

.timeline-git-icon {
    display: block;
    height: 44px;
    width: 44px;
}

.timeline-inclusion-form {
    margin: 0;
}

.timeline-inclusion-toggle {
    appearance: none;
    border-radius: 999px;
    box-shadow: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    line-height: 1rem;
    margin: 0;
    min-height: 0;
    padding: .125rem .5rem;
    transform: none;
}

.timeline-inclusion-toggle:hover {
    filter: brightness(1.12);
    transform: none;
}

.form-field > .timeline-inclusion-toggle {
    justify-self: start;
}

.timeline-foot {
    color: var(--muted-foreground);
    font-size: 12px;
    line-height: 1.45;
}

.timeline-compact-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    max-width: 78ch;
}

.timeline-compact-meta > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.commit-fetch-debug,
.commit-job-details {
    margin-top: 8px;
}

.commit-fetch-debug summary,
.commit-job-details summary {
    align-items: center;
    color: var(--muted-foreground);
    cursor: pointer;
    display: inline-flex;
    font-size: 12px;
    gap: 6px;
    list-style: none;
    min-height: 28px;
    padding: 2px 0;
}

.commit-job-details-summary {
    justify-content: flex-end;
    width: 100%;
}

.table-row.ai-provider .row-actions {
    justify-content: center;
}

.commit-job-details-summary .button {
    pointer-events: none;
}

.commit-job-details summary::-webkit-details-marker,
.webhook-batch-more summary::-webkit-details-marker {
    display: none;
}

.commit-job-details summary:hover,
.webhook-batch-more summary:hover {
    color: var(--foreground);
}

.commit-job-detail-grid {
    background: rgba(8, 8, 8, 0.34);
    border: 1px solid var(--border);
    border-radius: 6px;
    display: grid;
    gap: 0;
    margin: 8px 0 0;
    padding: 6px 10px;
}

.commit-job-detail-row {
    display: grid;
    gap: 8px;
    grid-template-columns: 86px minmax(0, 1fr);
    padding: 6px 0;
}

.commit-job-detail-row + .commit-job-detail-row {
    border-top: 1px solid rgba(63, 63, 70, 0.48);
}

.commit-job-detail-row dt {
    color: var(--muted-foreground);
    font-size: 12px;
}

.commit-job-detail-row dd {
    color: var(--foreground);
    font-size: 12px;
    margin: 0;
    overflow-wrap: anywhere;
}

.commit-job-detail-note {
    color: var(--muted-foreground);
    font-size: 12px;
    line-height: 1.45;
    margin: 8px 0 0;
}

.commit-job-actions {
    margin-top: 8px;
}

.commit-fetch-debug pre,
.commit-job-details pre {
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--muted-foreground);
    font-size: 12px;
    line-height: 1.45;
    margin: 8px 0 0;
    max-height: 224px;
    overflow: auto;
    padding: 10px;
    white-space: pre-wrap;
    word-break: break-word;
}

.webhook-batch-more {
    margin-top: 8px;
}

.webhook-batch-more summary {
    color: var(--muted-foreground);
    cursor: pointer;
    font-size: 12px;
    width: fit-content;
}

.webhook-batch-more .timeline-item {
    margin-top: 8px;
}

.processing-item.success {
    border-left-color: var(--success);
}

.processing-item.failed {
    border-left-color: var(--danger);
}

.tabs {
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 18px;
}

.tab {
    border-bottom: 2px solid transparent;
    color: var(--muted-foreground);
    font-weight: 500;
    padding: 12px 0;
}

.tab:hover {
    color: var(--foreground);
}

.tab-active {
    border-bottom-color: var(--primary);
    color: var(--foreground);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px;
}

.page-link {
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted-foreground);
    display: inline-flex;
    justify-content: center;
    min-height: 32px;
    min-width: 32px;
}

.page-link:hover {
    background: var(--muted);
    color: var(--foreground);
}

.page-link-active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-foreground);
}

.page-link-ellipsis {
    border-color: transparent;
    cursor: default;
    min-width: 24px;
    pointer-events: none;
}

.empty-state {
    color: var(--muted-foreground);
    display: grid;
    min-height: 240px;
    padding: 32px;
    place-items: center;
    text-align: center;
}

.empty-state.compact {
    min-height: 140px;
}

.empty-state h2 {
    color: var(--foreground);
    margin: 0 0 8px;
}

.empty {
    color: var(--muted-foreground);
    margin: 16px 0 0;
}

.alert {
    background: rgba(17, 17, 17, 0.86);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-weight: 600;
    margin: 0;
    padding: 12px 14px;
}

.alert-success,
.alert.notice {
    background: var(--success-soft);
    border-color: rgba(34, 197, 94, 0.28);
    color: var(--success);
}

.alert-warning {
    background: var(--warning-soft);
    border-color: rgba(245, 158, 11, 0.28);
    color: #fbbf24;
}

.alert-danger,
.alert.error {
    background: var(--danger-soft);
    border-color: rgba(239, 68, 68, 0.28);
    color: #fca5a5;
}

.card-content > .alert:not(:last-child) {
    margin-bottom: 16px;
}

.alert > p {
    font-weight: 400;
    margin: 6px 0 0;
}

@media (max-width: 1180px) {
    .split-workbench,
    .two-column-layout,
    .task-layout,
    .grid.two {
        grid-template-columns: 1fr;
    }

    .task-detail-pane {
        order: -1;
    }

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

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

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

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

    .project-settings-layout {
        grid-template-columns: 1fr;
    }

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

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

    .kv-groups {
        grid-template-columns: 1fr;
    }

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

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

    .app-sidebar {
        border-bottom: 1px solid var(--border);
        border-right: 0;
        height: auto;
        max-height: none;
        overflow-y: visible;
        position: static;
    }

    .sidebar-brand {
        min-height: 38px;
    }

    .sidebar-nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .nav-section,
    .nav-section-bottom {
        margin-top: 0;
    }

    .nav-section-title {
        width: 100%;
    }

    .app-content,
    .shell {
        padding: 16px;
    }

    .app-topbar,
    .topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding: 14px 16px;
    }

    .topbar-left,
    .topbar-right {
        width: 100%;
    }

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

    .topbar nav,
    .app-topbar nav {
        flex-wrap: wrap;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .task-page-title {
        max-width: 100%;
    }

    .project-settings-layout,
    .admin-project-layout {
        grid-template-columns: 1fr;
    }

    .form-grid,
    .ai-provider-form,
    .http-channel-form,
    .http-channel-form-create,
    .account-token-form-grid,
    .aligned-controls,
    .aligned-hints,
    .account-profile-controls,
    .account-profile-hints,
    .token-create-controls,
    .token-create-hints,
    .project-token-create-controls,
    .project-token-create-hints,
    .password-form-grid,
    .projection-correction-form,
    .review-task-row,
    .kanban-board,
    .task-row,
    .ai-fallback-row,
    .table-row,
    .table-row.ai-provider,
    .table-row.http-channel,
    .table-row.account-token,
    .table-row.bug-report,
    .table-row.platform-project,
    .table-row.project,
    .table-row.user,
    .table-row.project-user,
    .table-row.scratch-row,
    .table-row.token,
    .table-row.git-webhook {
        grid-template-columns: 1fr;
    }

    .project-archive-form > .btn {
        margin-top: 0;
    }

    .http-channel-signal-groups {
        grid-template-columns: 1fr;
    }

    .http-channel-form-hints,
    .http-channel-form-modal .http-channel-form-hints {
        grid-column: 1 / -1;
        grid-template-columns: 1fr;
    }

    .table-row,
    .table-row.ai-provider,
    .table-row.http-channel,
    .table-row.account-token,
    .table-row.bug-report,
    .table-row.platform-project,
    .table-row.project,
    .table-row.user,
    .table-row.project-user,
    .table-row.scratch-row,
    .table-row.token,
    .table-row.git-webhook {
        align-items: start;
        padding: 12px 0;
    }

    .bug-report-filter-form,
    .scratch-filter-form,
    .git-api-settings-form {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .git-integration-modal-actions,
    .git-api-modal-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .platform-project-filter-form {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .task-work-inline-form {
        align-items: flex-end;
    }

    .platform-project-filter-search {
        flex: 1 1 100%;
        max-width: none;
    }

    .dashboard-owned-filter-view {
        flex: 1 1 100%;
        max-width: none;
    }

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

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

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

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

    .project-metric-group {
        grid-template-columns: 1fr;
    }

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

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

    .kanban-board {
        overflow-x: visible;
    }

    .kanban-column {
        min-width: 0;
    }

    .integrations-tabs-layout {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .integrations-tab-nav {
        border-bottom: 1px solid var(--border);
        border-right: 0;
        flex-direction: row;
        padding: 0;
    }

    .integrations-tab-link {
        flex: 1 1 0;
        padding: 14px 12px;
        text-align: center;
        transform: none;
        writing-mode: horizontal-tb;
    }

    .integrations-tab-link.is-active {
        border-bottom: 2px solid var(--primary);
        border-right-color: transparent;
    }

    .integrations-tab-panels {
        padding: 16px;
    }

    .projection-correction-form .form-wide {
        grid-column: auto;
    }

    .project-metadata-form {
        grid-template-columns: 1fr;
    }

    .project-metadata-form .form-wide {
        grid-column: auto;
    }

    .project-metadata-regional-row {
        grid-template-columns: 1fr;
    }

    .project-metadata-save-cell .btn {
        justify-self: start;
    }

    .project-toolbar-row,
    .git-webhook-create-row,
    .project-user-add-row {
        grid-template-columns: 1fr;
    }

    .project-toolbar-pair {
        grid-template-columns: 1fr;
    }

    .project-toolbar-spacer {
        display: none;
    }
}
