:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --ink: #172033;
  --muted: #667085;
  --line: #e1e5eb;
  --line-strong: #c9d1dc;
  --blue: #315fce;
  --blue-soft: #eaf0ff;
  --teal: #0b7d79;
  --teal-soft: #e4f5f3;
  --amber: #b96809;
  --amber-soft: #fff2d8;
  --green: #18764f;
  --green-soft: #e7f7ef;
  --shadow: 0 14px 36px rgba(23, 32, 51, 0.1);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); line-height: 1.45; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid #7597ea; outline-offset: 2px; }
.app-shell[hidden], .auth-screen[hidden] { display: none; }

.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #f1f3f6; }
.auth-panel { width: min(380px, 100%); background: var(--surface); border: 1px solid #dce1e8; border-radius: 8px; padding: 30px 32px 24px; box-shadow: 0 18px 50px rgba(23, 32, 51, .1); }
.auth-brand { display: flex; align-items: center; gap: 10px; }
.auth-kicker { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .08em; margin-top: 34px; }
.auth-panel h1 { font-size: 24px; margin-top: 7px; letter-spacing: 0; }
.auth-form { display: grid; gap: 13px; padding-top: 24px; }
.auth-form label { display: grid; gap: 6px; color: #596779; font-size: 11px; font-weight: 700; }
.auth-form label[hidden] { display: none; }
.auth-form input { width: 100%; border: 1px solid var(--line-strong); border-radius: 6px; padding: 12px 12px; color: var(--ink); outline: 0; font-size: 14px; font-weight: 500; }
.auth-form input:focus { border-color: #8ca9f7; box-shadow: 0 0 0 3px #eff3ff; }
.auth-submit { width: 100%; margin-top: 3px; padding: 11px; }
.auth-error { min-height: 16px; color: #c23a32; font-size: 11px; }
.auth-footnote { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; margin-top: 22px; }

.app-shell { min-height: 100vh; }
.topbar { height: 62px; padding: 0 clamp(20px, 2.4vw, 38px); display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 8; backdrop-filter: blur(12px); }
.brand-lockup, .topbar-actions, .sync-state, .command-input-wrap, .command-suggestions, .filter-group, .table-toolbar, .timeline-legend, .modal-actions { display: flex; align-items: center; }
.brand-lockup { gap: 10px; }
.brand-mark { width: 32px; height: 32px; border-radius: 7px; display: grid; place-items: center; color: #fff; background: var(--ink); font-weight: 750; letter-spacing: 0; }
.brand-name { font-size: 14px; font-weight: 760; letter-spacing: 0; }
.brand-subtitle { color: var(--muted); font-size: 10px; margin-top: 1px; }
.topbar-actions { gap: 8px; }
.integration-chip { min-height: 31px; display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px 4px 5px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: #526174; font-size: 10px; font-weight: 750; white-space: nowrap; }
.integration-logo { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 5px; background: #edf0f4; color: #667487; font-size: 8px; font-weight: 900; }
.integration-chip.is-connected { border-color: #b8dfcd; color: var(--green); background: #f5fbf8; }
.integration-chip.is-connected .integration-logo { background: var(--green); color: #fff; }
.integration-chip.is-error { border-color: #edb7b1; color: #b4473e; background: #fff7f6; }
.integration-chip.is-error .integration-logo { background: #c64b41; color: #fff; }
.integration-chip:hover { border-color: #9fb6ed; color: var(--blue); }
.sync-state { color: var(--muted); font-size: 11px; gap: 6px; padding: 0 4px; }
.sync-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.notification-button { min-width: 38px; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: #5a6a7d; position: relative; font-size: 10px; font-weight: 750; line-height: 1; }
.notification-button:hover { color: var(--blue); border-color: #b5c7fb; }
.notification-count { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; display: grid; place-items: center; border-radius: 999px; background: #d84c40; color: #fff; font-size: 9px; font-weight: 800; }
.notification-count[hidden] { display: none; }
.online-count { color: var(--muted); font-size: 10px; white-space: nowrap; padding-right: 2px; }
.user-chip { display: flex; align-items: center; gap: 6px; color: var(--ink); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px 9px 4px 4px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.user-chip:hover { border-color: #b5c7fb; background: #f4f7ff; }
.chip-avatar { width: 22px; height: 22px; flex: 0 0 22px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #dfe5ee; color: #526174; font-size: 9px; }
.user-chip #currentUserName { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.chip-avatar img, .owner-avatar img, .collaborator-avatar img, .timeline-avatar img, .history-avatar img, .profile-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.ghost-button, .primary-button, .filter-button, .command-suggestions button, .icon-button { border: 0; background: transparent; color: var(--ink); }
.ghost-button { padding: 8px 9px; color: #566376; font-size: 11px; }
.ghost-button:hover { color: var(--blue); }
.primary-button { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; background: var(--blue); color: white; padding: 8px 13px; border-radius: 6px; font-size: 11px; font-weight: 750; box-shadow: 0 4px 10px rgba(49,95,206,.16); }
.primary-button:hover { background: #2855c7; }

.workspace { max-width: 1780px; margin: 0 auto; padding: 18px clamp(18px, 2.1vw, 32px) 42px; }
.command-strip { display: grid; grid-template-columns: minmax(200px, 250px) minmax(420px, 1fr); gap: 22px; align-items: start; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 9px; color: var(--blue); font-weight: 800; }
h1, h2, p { margin: 0; }
h1 { font-size: 19px; letter-spacing: 0; margin-top: 3px; }
h2 { font-size: 15px; letter-spacing: 0; margin-top: 3px; }
.command-copy { padding-top: 2px; }
.command-copy p { max-width: 230px; margin-top: 8px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.ai-command-heading { display: flex; align-items: center; gap: 10px; }
.ai-mark { width: 35px; height: 35px; flex: 0 0 35px; display: grid; place-items: center; border-radius: 7px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 850; }
.command-form { min-width: 0; }
.ai-command-toolbar { min-height: 29px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.ai-mode-tabs { display: inline-flex; padding: 3px; border-radius: 6px; background: #f1f3f6; }
.ai-mode-tabs button { min-height: 24px; padding: 4px 10px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 720; }
.ai-mode-tabs button.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(23,32,51,.12); }
.ai-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.ai-status i { width: 6px; height: 6px; border-radius: 50%; background: #aab3bf; }
.ai-status.is-ready { color: var(--green); }
.ai-status.is-ready i { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.command-input-wrap { align-items: flex-end; background: #fbfcfd; border: 1px solid var(--line-strong); border-radius: 7px; padding: 4px 4px 4px 11px; box-shadow: none; }
.command-input-wrap:focus-within { border-color: #8ca9f7; box-shadow: 0 0 0 3px #eff3ff; }
.command-input-wrap textarea { min-width: 0; width: 100%; min-height: 34px; max-height: 104px; flex: 1; resize: none; overflow-y: auto; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; line-height: 1.5; padding: 8px 8px 6px 0; }
.command-submit { width: 48px; height: 34px; flex: 0 0 48px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: 6px; color: #fff; background: var(--ink); font-size: 10px; font-weight: 800; line-height: 1; }
.command-submit b { font-size: 13px; font-weight: 600; }
.command-submit:hover { background: var(--blue); }
.command-submit:disabled { opacity: .55; cursor: wait; }
.command-suggestions { gap: 12px; margin-top: 7px; flex-wrap: wrap; }
.command-suggestions[hidden], .ai-result-actions [hidden] { display: none; }
.command-suggestions button { color: #59677a; font-size: 10px; padding: 0; }
.command-suggestions button:hover { color: var(--blue); }
.ai-result { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.ai-result[hidden] { display: none; }
.ai-result-copy { min-width: 0; }
.ai-result-copy strong { display: block; font-size: 11px; }
.ai-result-copy p { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.ai-operation-list { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.ai-operation { max-width: 100%; padding: 4px 7px; border-radius: 5px; background: #f1f4f8; color: #4e5d71; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-result-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.ai-result.is-error strong { color: #b4473e; }
.ai-result.is-success strong { color: var(--green); }

.metrics-row { display: grid; grid-template-columns: repeat(4, 1fr); margin: 12px 0 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.metric-card { min-height: 62px; padding: 12px 18px; display: flex; align-items: center; gap: 8px; color: inherit; font: inherit; text-align: left; background: transparent; border: 0; border-right: 1px solid var(--line); cursor: pointer; transition: background .16s ease, box-shadow .16s ease; }
.metric-card:last-child { border-right: 0; }
.metric-card:hover { background: #f7f9fc; }
.metric-card.is-active { background: #f2f5fd; box-shadow: inset 0 -3px 0 var(--blue); }
.metric-card:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--blue); outline-offset: -2px; }
.metric-marker { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; }
.active-marker { background: var(--blue); }.handoff-marker { background: var(--amber); }.done-marker { background: var(--green); }
.metric-label { color: var(--muted); font-size: 10px; }
.metric-card strong { margin-left: auto; color: var(--ink); font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: 0; }

.board-layout { display: grid; grid-template-columns: minmax(380px, var(--board-ratio, 46%)) 12px minmax(420px, 1fr); gap: 6px; align-items: stretch; }
.board-panel, .assistant-panel, .timeline-panel { background: var(--surface); border: 1px solid #dce1e8; border-radius: 8px; min-width: 0; box-shadow: 0 1px 2px rgba(23,32,51,.03); }
.board-panel, .board-layout .timeline-panel { height: min(74vh, 760px); min-height: 520px; display: flex; flex-direction: column; }
.board-panel { overflow: hidden; }
.layout-resizer { position: relative; display: grid; place-items: center; min-width: 12px; cursor: col-resize; touch-action: none; outline: none; }
.layout-resizer::before { content: ""; position: absolute; inset: 0 5px; border-radius: 2px; background: #d5dae2; transition: background .16s ease, inset .16s ease; }
.layout-resizer span { position: relative; z-index: 1; width: 12px; height: 40px; display: grid; place-items: center; border: 1px solid #c5ccd6; border-radius: 5px; background: #fff; color: #697586; font-size: 15px; line-height: 1; box-shadow: 0 2px 6px rgba(31, 45, 64, .08); }
.layout-resizer:hover::before, .layout-resizer:focus-visible::before, body.is-resizing-layout .layout-resizer::before { inset: 0 3px; background: var(--blue); }
.layout-resizer:focus-visible span { box-shadow: 0 0 0 3px rgba(62, 104, 214, .18); }
body.is-resizing-layout { cursor: col-resize; user-select: none; }
.panel-header { min-height: 66px; padding: 13px 18px 11px; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.panel-title { min-width: 0; }
.panel-title-row { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.panel-title-row h2 { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.panel-count { flex: 0 0 auto; color: #8a94a3; font-size: 9px; font-variant-numeric: tabular-nums; }
.filter-group { border: 0; border-radius: 6px; padding: 3px; gap: 1px; flex-wrap: nowrap; background: #f1f3f6; }
.filter-button { padding: 6px 10px; color: var(--muted); border-radius: 4px; font-size: 10px; white-space: nowrap; }
.filter-button.is-active { background: var(--blue); color: #fff; box-shadow: 0 1px 3px rgba(49,95,206,.18); }
.filter-button:not(.is-active):hover { color: var(--blue); }
.table-toolbar { justify-content: space-between; flex-wrap: wrap; padding: 10px 18px; gap: 8px; background: #fbfcfd; border-top: 1px solid #eef0f3; }
.search-field { flex: 1; min-width: 160px; max-width: 320px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 5px; padding: 7px 9px; color: var(--muted); background: #fff; }
.search-field input { border: 0; outline: 0; width: 100%; color: var(--ink); background: transparent; font-size: 12px; }
.table-toolbar select { min-height: 31px; border: 1px solid var(--line); background: #fff; border-radius: 5px; padding: 6px 26px 6px 8px; color: #526174; font-size: 10px; }
.board-filter-selects { display: flex; align-items: center; gap: 8px; }
.task-table-wrap { flex: 1; min-height: 0; overflow: auto; scrollbar-color: #aab4c2 #f1f3f6; scrollbar-width: thin; }
.task-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 900px; }
.task-table th { position: sticky; top: 0; z-index: 2; text-align: left; padding: 9px 11px; background: var(--surface-soft); color: #7d8795; font-size: 9px; font-weight: 780; letter-spacing: .04em; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.task-table th:first-child, .task-table td:first-child { padding-left: 22px; }
.task-table th:last-child, .task-table td:last-child { padding-right: 22px; }
.task-table th:first-child { left: 0; z-index: 4; min-width: 260px; box-shadow: 1px 0 0 var(--line); }
.task-table td:first-child { position: sticky; left: 0; z-index: 1; min-width: 260px; background: #fff; box-shadow: 1px 0 0 #edf0f4; }
.task-table td { height: 60px; padding: 8px 11px; border-bottom: 1px solid #edf0f4; color: #344054; font-size: 11px; vertical-align: middle; background: #fff; }
.task-table tbody tr:hover td { background: #f8faff; }
.task-table tbody tr:hover td:first-child { background: #f8faff; }
.task-table tbody tr.is-own td { background: #f7f9ff; }
.task-table tbody tr.is-own td:first-child { background: #f4f7ff; box-shadow: inset 3px 0 0 var(--blue), 1px 0 0 #dce4f7; }
.task-table tbody tr.is-own .task-title-button, .task-table tbody tr.is-own .task-title-link { color: #214fae; font-weight: 850; }
.task-table tbody tr.is-complete:not(.is-own) .task-title-button, .task-table tbody tr.is-complete:not(.is-own) .task-title-link { color: #697586; }
.task-title { font-weight: 700; color: var(--ink); max-width: 270px; }
.task-title-button { display: block; max-width: 270px; border: 0; padding: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 760; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-title-button:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.task-title-link { display: flex; align-items: center; gap: 5px; max-width: 270px; color: var(--blue); font-weight: 780; text-decoration: none; }
.task-title-link .task-title-text { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.task-title-link .task-link-arrow { flex: 0 0 auto; font-size: 10px; }
.task-title-link:hover .task-title-text { text-decoration: underline; text-underline-offset: 3px; }
.task-subline { color: var(--muted); font-size: 9px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 270px; }
.task-demand-preview { max-width: 250px; display: flex; align-items: center; gap: 7px; margin-top: 6px; border: 0; padding: 0; background: transparent; color: #526174; text-align: left; }
.task-demand-preview:hover { color: var(--blue); }
.task-demand-preview img { width: 38px; height: 30px; flex: 0 0 38px; border: 1px solid var(--line); border-radius: 4px; object-fit: cover; background: #eef1f5; }
.task-demand-preview span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 9px; }
.task-resources { display: flex; gap: 8px; margin-top: 5px; }
.task-resource { color: var(--blue); font-size: 9px; text-decoration: none; }
.task-resource.external { color: #177554; font-weight: 800; }
.task-resource:hover { text-decoration: underline; }
.stage-chip, .status-chip, .handoff-chip { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; border-radius: 5px; font-size: 9px; padding: 4px 7px; font-weight: 750; }
.stage-chip.ui { color: var(--blue); background: var(--blue-soft); }
.stage-chip.stitch { color: var(--teal); background: var(--teal-soft); }
.stage-chip.motion { color: #8a5c10; background: #fff2cf; }
.owner-cell { display: flex; align-items: center; gap: 3px; white-space: nowrap; border: 1px solid transparent; border-radius: 6px; padding: 2px 3px; }
.owner-cell:hover, .owner-cell:focus-within { border-color: #bfd0ff; background: #f4f7ff; }
.owner-avatar { width: 25px; height: 25px; flex: 0 0 25px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #e6ebf2; color: #5d6d80; font-weight: 800; font-size: 10px; }
.owner-detail { min-width: 0; display: flex; align-items: center; gap: 5px; border: 0; padding: 0; background: transparent; color: #425268; text-align: left; cursor: pointer; }
.owner-detail:hover .owner-name, .owner-detail:focus-visible .owner-name { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.owner-detail:focus-visible { outline: 2px solid #9eb7f5; outline-offset: 2px; border-radius: 4px; }
.owner-name { max-width: 72px; overflow: hidden; text-overflow: ellipsis; font-size: 10px; font-weight: 750; }
.owner-switcher { position: relative; width: 24px; height: 25px; flex: 0 0 24px; display: grid; place-items: center; border-left: 1px solid #dce3ec; color: #7a8798; font-size: 13px; cursor: pointer; }
.owner-switcher:hover { color: var(--blue); }
.owner-select { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; cursor: pointer; }
.owner-select option { color: #425268; background: #fff; }
.owner-source { margin-left: 3px; padding-left: 6px; border-left: 1px solid #dce3ec; color: #8090a2; font-size: 8px; font-weight: 800; }
.collaborator-cell { min-width: 128px; display: flex; align-items: center; gap: 7px; border: 0; padding: 3px 5px 3px 3px; border-radius: 6px; background: transparent; color: #425268; text-align: left; }
.collaborator-cell:hover { background: #eef3ff; color: var(--blue); }
.collaborator-cell > span:last-child { min-width: 0; }
.collaborator-cell strong, .collaborator-cell small { display: block; max-width: 105px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; letter-spacing: 0; }
.collaborator-cell strong { font-size: 10px; }
.collaborator-cell small { margin-top: 2px; color: var(--muted); font-size: 8px; font-weight: 500; }
.collaborator-avatar { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #fff1d7; color: #8a550f; font-size: 9px; font-weight: 850; box-shadow: 0 0 0 1px #e5c98f; }
.collaborator-empty { color: #b2bbc6; }
.date-cell { white-space: nowrap; color: #526174; font-variant-numeric: tabular-nums; }
.date-cell strong { color: var(--ink); font-weight: 700; }
.status-chip { border: 1px solid transparent; cursor: pointer; appearance: none; outline: none; }
.status-chip.status-未开始 { color: #6f7d8f; background: #f0f2f5; }
.status-chip.status-进行中 { color: #176ab2; background: #e2f0ff; }
.status-chip.status-已完成 { color: var(--green); background: var(--green-soft); }
.status-chip:disabled { cursor: default; opacity: 1; }
.handoff-chip.ready { color: var(--amber); background: var(--amber-soft); }
.handoff-chip.linked { color: var(--teal); background: var(--teal-soft); }
.handoff-chip.none { color: #9aa5b3; background: #f3f4f6; }
.row-actions { display: flex; justify-content: flex-end; gap: 4px; }
.row-action { border: 1px solid var(--line); background: #fff; color: #5d6d80; padding: 5px 8px; border-radius: 4px; font-size: 9px; white-space: nowrap; }
.row-action:hover { color: var(--blue); border-color: #b5c7fb; }
.row-action.primary { color: var(--blue); border-color: #bfd0ff; background: #f6f8ff; }
.empty-state { text-align: center; color: var(--muted); padding: 34px; font-size: 12px; }

.assistant-panel { display: flex; flex-direction: column; min-height: 360px; }
.collaboration-panel { min-height: 0; margin-top: 14px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); align-items: start; overflow: hidden; }
.collaboration-panel .assistant-header { grid-column: 1 / -1; }
.collaboration-panel .handoff-list { max-height: 300px; overflow: auto; display: grid; grid-template-columns: repeat(3, minmax(210px, 1fr)); align-items: start; }
.collaboration-panel .assistant-log { align-self: stretch; height: 100%; margin: 0; padding: 15px 18px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: #fafbfc; }
.assistant-header { padding-bottom: 11px; }
.assistant-pulse { font-size: 9px; color: var(--green); letter-spacing: .12em; font-weight: 800; }
.handoff-list { padding: 0 17px; display: flex; flex-direction: column; gap: 9px; }
.handoff-item { border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 5px; padding: 11px 12px 10px; background: #fffdf8; }
.handoff-item.linked { border-left-color: var(--teal); background: #f7fbfa; }
.handoff-title { font-size: 12px; font-weight: 750; color: var(--ink); }
.handoff-meta { font-size: 10px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.handoff-action { margin-top: 9px; border: 0; color: var(--blue); background: transparent; font-size: 10px; padding: 0; font-weight: 700; }
.assistant-log { margin: auto 17px 17px; border-top: 1px solid var(--line); padding-top: 13px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.log-line { display: flex; gap: 7px; margin-top: 7px; }
.log-time { color: #a1adbc; white-space: nowrap; }

.timeline-panel { margin-top: 0; overflow: hidden; }
.timeline-header { padding-bottom: 10px; align-items: flex-start; }
.timeline-header-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.board-layout .timeline-header { align-items: flex-start; flex-direction: column; }
.board-layout .timeline-header-tools { width: 100%; justify-content: flex-start; }
.timeline-header-tools select, .history-toolbar select { min-height: 31px; border: 1px solid var(--line); border-radius: 5px; padding: 6px 28px 6px 9px; background: #fff; color: #526174; font-size: 10px; }
.timeline-zoom { height: 31px; display: flex; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: #718093; font-size: 10px; font-weight: 750; }
.timeline-zoom-label { color: #526174; font-size: 9px; }
.timeline-zoom input { width: 124px; accent-color: var(--blue); cursor: ew-resize; }
.timeline-zoom output { width: 36px; color: #526174; text-align: right; font-size: 9px; font-variant-numeric: tabular-nums; }
.history-button { min-height: 31px; border: 1px solid var(--line); border-radius: 5px; padding: 6px 9px; background: #fff; color: #526174; font-size: 9px; font-weight: 750; }
.history-button:hover { color: var(--blue); border-color: #b5c7fb; }
.timeline-legend { gap: 13px; color: var(--muted); font-size: 10px; }
.timeline-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; }
.pending-dot { background: #b7c0cc; }.active-dot { background: var(--blue); }.done-dot { background: var(--green); }
.timeline-scroll { flex: 1; min-height: 0; max-height: none; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; border-top: 1px solid var(--line); scrollbar-color: #aab4c2 #f1f3f6; scrollbar-width: thin; }
.timeline-scroll:focus-visible { outline: 2px solid #8ca9f7; outline-offset: -2px; }
.timeline-scroll::-webkit-scrollbar { width: 12px; height: 12px; }
.timeline-scroll::-webkit-scrollbar-track { background: #f1f3f6; }
.timeline-scroll::-webkit-scrollbar-thumb { border: 3px solid #f1f3f6; border-radius: 8px; background: #aab4c2; }
.timeline-scroll::-webkit-scrollbar-thumb:hover { background: #8794a5; }
.timeline-grid { --timeline-label-width: 214px; display: block; position: relative; min-width: 100%; }
.timeline-date-row { display: grid; grid-template-columns: var(--timeline-label-width) repeat(var(--days), var(--day-width, 56px)); }
.timeline-date-row { position: sticky; top: 0; z-index: 6; height: 43px; background: var(--surface-soft); border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(25, 39, 58, .04); }
.timeline-date-row > div { border-right: 1px solid #edf0f4; padding: 8px 8px; }
.timeline-date-row > div:first-child { position: sticky; left: 0; z-index: 8; color: var(--muted); background: var(--surface-soft); font-size: 10px; font-weight: 750; box-shadow: 1px 0 0 var(--line); }
.date-heading { text-align: center; color: #697586; background: #fff; font-size: 9px; font-variant-numeric: tabular-nums; }
.date-heading.today { color: var(--blue); font-weight: 800; box-shadow: inset 0 -2px 0 var(--blue); }
.timeline-task-row { position: relative; min-height: 58px; border-bottom: 1px solid #edf0f4; background-color: #fff; background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(var(--day-width, 56px) - 1px), #f0f2f5 calc(var(--day-width, 56px) - 1px), #f0f2f5 var(--day-width, 56px)); background-position: var(--timeline-label-width) 0; }
.timeline-task-label { position: sticky; left: 0; z-index: 3; width: var(--timeline-label-width); min-height: 58px; box-sizing: border-box; padding: 8px 12px 7px 16px; border: 0; border-right: 1px solid var(--line); background: #fff; text-align: left; overflow: hidden; box-shadow: 1px 0 0 rgba(31, 45, 64, .04); }
.timeline-task-label:hover .task-label-title { color: var(--blue); }
.timeline-task-label .task-label-title { display: block; font-weight: 700; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline-task-label .task-label-meta { display: flex; align-items: center; gap: 7px; min-height: 26px; color: var(--muted); font-size: 10px; margin-top: 3px; white-space: nowrap; overflow: hidden; }
.timeline-task-title-link, .timeline-task-title-button { width: 100%; display: flex; align-items: center; gap: 5px; min-width: 0; border: 0; padding: 0; background: transparent; color: var(--ink); text-align: left; text-decoration: none; }
.timeline-task-title-link .task-label-title, .timeline-task-title-button .task-label-title { min-width: 0; flex: 1; }
.timeline-task-title-link { color: var(--blue); }
.timeline-task-title-link:hover .task-label-title { text-decoration: underline; text-underline-offset: 3px; }
.timeline-task-meta-button { width: 100%; display: block; border: 0; padding: 0; background: transparent; text-align: left; }
.timeline-owner { display: inline-flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.timeline-avatar { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; overflow: hidden; border: 2px solid #fff; border-radius: 50%; background: #e1e6ee; box-shadow: 0 0 0 1px #cbd3de; color: #526174; font-size: 10px; font-weight: 850; }
.timeline-task-row.is-own .timeline-task-label { background: #f3f6ff; box-shadow: inset 3px 0 0 var(--blue); }
.timeline-task-row.is-own .task-label-title { color: #173f9d; font-size: 12px; font-weight: 850; }
.timeline-task-row.is-collaborator .timeline-task-label { background: #fffaf0; box-shadow: inset 3px 0 0 #d79a32; }
.timeline-task-row.is-collaborator .task-label-title { color: #7e520d; font-weight: 800; }
.timeline-bar { container-type: inline-size; position: absolute; left: calc(var(--timeline-label-width) + var(--bar-left) + 3px); top: 50%; width: max(8px, calc(var(--bar-width) - 6px)); height: 25px; box-sizing: border-box; transform: translateY(-50%); border-radius: 4px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #fff; font-size: 9px; font-weight: 760; z-index: 1; cursor: grab; touch-action: none; user-select: none; }
.timeline-bar.is-dragging { cursor: grabbing; z-index: 4; box-shadow: 0 4px 12px rgba(26, 39, 61, .24); }
.timeline-bar.timeline-active { background: var(--blue); }
.timeline-bar.timeline-done { background: var(--green); }
.timeline-bar.timeline-pending { background: #cfd5de; color: #5f6d7d; border: 1px solid #b7c0cc; }
.timeline-bar.is-own { height: 28px; font-size: 10px; font-weight: 850; box-shadow: 0 3px 9px rgba(29, 54, 99, .2); }
.timeline-bar.is-own.timeline-active { background: #204fc5; }
.timeline-bar.is-own.timeline-done { background: #126942; }
.timeline-bar.is-own.timeline-pending { background: #8f9aaa; color: #fff; border-color: #7d8898; }
.timeline-bar .bar-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.timeline-bar .bar-duration { flex: 0 0 auto; padding: 2px 4px; border-radius: 3px; background: rgba(255,255,255,.2); font-size: 8px; font-variant-numeric: tabular-nums; }
@container (max-width: 130px) { .timeline-bar .bar-duration { display: none; } }
.timeline-handle { position: absolute; top: 3px; bottom: 3px; z-index: 2; width: 12px; padding: 0; border: 0; border-radius: 2px; background: rgba(255,255,255,.56); cursor: ew-resize; opacity: .72; }
.timeline-handle:hover, .timeline-bar.is-dragging .timeline-handle { opacity: 1; background: #fff; }
.timeline-handle.left { left: 3px; }.timeline-handle.right { right: 3px; }
.timeline-connector { position: absolute; z-index: 2; width: 24px; height: 18px; border-bottom: 1px dashed #f1a632; border-right: 1px dashed #f1a632; border-radius: 0 0 6px 0; pointer-events: none; }
.timeline-empty { grid-column: 1 / -1; padding: 28px; text-align: center; color: var(--muted); font-size: 11px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(18, 31, 49, .4); display: grid; place-items: center; padding: 18px; }
.modal-backdrop[hidden] { display: none; }
.reminder-modal { width: min(510px, 100%); display: flex; gap: 16px; align-items: flex-start; padding: 23px; background: var(--surface); border-radius: 8px; box-shadow: var(--shadow); border: 1px solid #f4d6a1; }
.reminder-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 9px; color: var(--amber); background: var(--amber-soft); font-weight: 900; font-size: 18px; }
.reminder-content { min-width: 0; flex: 1; }
.reminder-content h2 { margin-top: 5px; font-size: 18px; }
.reminder-content p { color: #465466; font-size: 13px; line-height: 1.7; margin-top: 10px; }
.reminder-meta { color: var(--muted); font-size: 11px; margin-top: 8px; }
.reminder-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 19px; }
.task-modal { background: var(--surface); width: min(620px, 100%); max-height: calc(100vh - 36px); overflow: hidden; border-radius: 8px; box-shadow: var(--shadow); }
.external-task-notice { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid #b8dfcd; border-radius: 7px; background: #f4fbf7; color: #365b4d; }
.external-task-notice[hidden] { display: none; }
.external-source-badge { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 6px; background: var(--green); color: #fff; font-size: 9px; font-weight: 900; }
.external-task-notice > span:nth-child(2) { min-width: 0; flex: 1; }
.external-task-notice strong, .external-task-notice small { display: block; }
.external-task-notice strong { font-size: 11px; }
.external-task-notice small { margin-top: 3px; color: #6a8077; font-size: 9px; }
.external-task-notice a { flex: 0 0 auto; color: #167553; font-size: 10px; font-weight: 750; text-decoration: none; }
.external-task-notice a:hover { text-decoration: underline; }
.external-demand { display: grid; gap: 11px; padding: 13px; border: 1px solid #cbd8e9; border-radius: 7px; background: #f8fafc; }
.external-demand[hidden] { display: none; }
.external-demand-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.external-demand-header > div { min-width: 0; }
.external-demand-header .form-label, .external-demand-header small { display: block; }
.external-demand-header small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.external-mapped-badge { flex: 0 0 auto; padding: 3px 6px; border-radius: 4px; background: #e5f4ed; color: #167553; font-size: 8px; font-weight: 850; }
.external-description { color: #344457; font-size: 11px; line-height: 1.72; overflow-wrap: anywhere; }
.external-description > :first-child { margin-top: 0; }
.external-description > :last-child { margin-bottom: 0; }
.external-description p, .external-description ul, .external-description ol, .external-description blockquote, .external-description pre, .external-description table { margin: 7px 0; }
.external-description ul, .external-description ol { padding-left: 19px; }
.external-description h1, .external-description h2, .external-description h3, .external-description h4, .external-description h5, .external-description h6 { margin: 10px 0 5px; font-size: 12px; }
.external-description blockquote { padding-left: 10px; border-left: 3px solid #bcc9da; color: #5d6d80; }
.external-description pre { overflow: auto; padding: 9px; border-radius: 5px; background: #edf1f6; font-size: 10px; }
.external-description table { width: 100%; border-collapse: collapse; }
.external-description th, .external-description td { padding: 5px 7px; border: 1px solid #d8e0ea; text-align: left; }
.external-description a { color: var(--blue); }
.external-image-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.external-image-gallery a { min-height: 110px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #edf1f5; }
.external-image-gallery img { display: block; width: 100%; height: 100%; max-height: 240px; object-fit: contain; }
.external-attachments { display: flex; flex-wrap: wrap; gap: 7px; }
.external-attachment { display: inline-flex; align-items: center; gap: 5px; padding: 6px 8px; border: 1px solid #c8d5e7; border-radius: 5px; background: #fff; color: var(--blue); font-size: 9px; text-decoration: none; }
.external-attachment:hover { border-color: #91acf3; }
.external-demand-empty { padding: 11px; border: 1px dashed #c8d2df; border-radius: 5px; color: var(--muted); font-size: 10px; text-align: center; }
.modal-header { padding: 20px 22px 14px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }
.icon-button { width: 30px; height: 30px; border-radius: 6px; font-size: 22px; line-height: 1; color: var(--muted); }
.icon-button:hover { color: var(--ink); background: var(--surface-soft); }
.task-form { padding: 18px 22px 22px; display: grid; gap: 14px; max-height: calc(100vh - 105px); overflow-y: auto; }
.task-form label { display: grid; gap: 6px; color: #5a6878; font-size: 11px; font-weight: 700; }
.task-form input, .task-form select, .task-form textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 6px; padding: 9px 10px; color: var(--ink); background: #fff; outline: 0; font-size: 12px; font-weight: 400; }
.task-form input:focus, .task-form select:focus, .task-form textarea:focus { border-color: #8ca9f7; box-shadow: 0 0 0 3px #eff3ff; }
.task-form input:disabled, .task-form select:disabled { color: #687789; background: #f3f5f7; cursor: default; opacity: 1; }
.task-form textarea { resize: vertical; min-height: 62px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.effect-field { display: grid; gap: 6px; }
.form-label { color: #5a6878; font-size: 11px; font-weight: 700; }
.effect-dropzone { min-height: 78px; display: flex; align-items: center; justify-content: center; gap: 11px; width: 100%; padding: 13px; border: 1px dashed #aebbd0; border-radius: 6px; background: #f8faff; color: #506176; text-align: left; }
.effect-dropzone:hover, .effect-dropzone.is-dragover { border-color: var(--blue); background: #f1f5ff; }
.effect-dropzone:disabled { opacity: .65; cursor: wait; }
.effect-upload-icon { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 18px; }
.effect-dropzone strong, .effect-dropzone small { display: block; letter-spacing: 0; }
.effect-dropzone strong { font-size: 11px; color: var(--ink); }
.effect-dropzone small { margin-top: 4px; color: var(--muted); font-size: 9px; font-weight: 400; }
.effect-preview { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface-soft); }
.effect-preview img { display: block; width: 100%; max-height: 230px; object-fit: contain; background: #eef1f5; }
.effect-preview-actions { min-height: 34px; padding: 7px 10px; display: flex; align-items: center; justify-content: flex-end; gap: 13px; border-top: 1px solid var(--line); }
.effect-preview-actions a, .effect-preview-actions button { border: 0; background: transparent; color: var(--blue); font-size: 10px; text-decoration: none; }
.effect-preview-actions button { color: #b4483e; }
.modal-actions { justify-content: flex-end; gap: 9px; margin-top: 3px; }
.task-modal-actions { justify-content: space-between; }
.modal-actions-right { display: flex; align-items: center; gap: 9px; }
.danger-button { min-height: 32px; padding: 0 13px; border: 1px solid #e2a49e; border-radius: 5px; background: #fff5f4; color: #b83f35; font-size: 10px; font-weight: 750; }
.danger-button:hover { border-color: #c95b51; background: #fbe9e7; }
.danger-button:disabled { opacity: .6; cursor: wait; }
.danger-button[hidden] { display: none; }

.profile-modal { width: min(430px, 100%); overflow: hidden; border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.integration-modal { width: min(510px, 100%); overflow: hidden; border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.integration-content { padding: 20px 22px 22px; }
.integration-state-row { display: flex; align-items: center; gap: 11px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.integration-state-row strong, .integration-state-row small { display: block; }
.integration-state-row strong { font-size: 13px; }
.integration-state-row small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.integration-state-dot { width: 11px; height: 11px; flex: 0 0 11px; border-radius: 50%; background: #9da8b5; box-shadow: 0 0 0 5px #f0f2f5; }
.integration-state-dot.is-connected { background: var(--green); box-shadow: 0 0 0 5px var(--green-soft); }
.integration-state-dot.is-error { background: #c64b41; box-shadow: 0 0 0 5px #fdebea; }
.integration-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin: 17px 0 0; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.integration-stats div { padding: 11px 13px; border-bottom: 1px solid var(--line); }
.integration-stats div:nth-child(odd) { border-right: 1px solid var(--line); }
.integration-stats div:nth-last-child(-n + 2) { border-bottom: 0; }
.integration-stats dt { color: var(--muted); font-size: 9px; }
.integration-stats dd { margin: 5px 0 0; color: var(--ink); font-size: 12px; font-weight: 750; }
.integration-error { margin-top: 12px; padding: 9px 10px; border: 1px solid #edb7b1; border-radius: 6px; background: #fff7f6; color: #a93e35; font-size: 10px; line-height: 1.5; }
.integration-actions { margin-top: 18px; }
.link-button { display: inline-flex; align-items: center; text-decoration: none; }
.profile-content { padding: 22px; }
.avatar-picker { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px dashed #aebbd0; border-radius: 7px; background: #f8faff; color: #506176; text-align: left; }
.avatar-picker:hover { border-color: var(--blue); background: #f1f5ff; }
.avatar-picker:disabled { opacity: .65; cursor: wait; }
.profile-avatar-preview { width: 66px; height: 66px; flex: 0 0 66px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #dde4ee; color: #546578; font-size: 22px; font-weight: 850; }
.avatar-picker strong, .avatar-picker small { display: block; letter-spacing: 0; }
.avatar-picker strong { color: var(--ink); font-size: 13px; }
.avatar-picker small { margin-top: 5px; color: var(--muted); font-size: 9px; font-weight: 400; }
.profile-name { margin: 13px 0 18px; text-align: center; color: var(--ink); font-size: 14px; font-weight: 750; }

.history-modal { width: min(760px, 100%); max-height: calc(100vh - 36px); display: flex; flex-direction: column; overflow: hidden; border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.history-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.history-list { min-height: 180px; padding: 14px 20px 20px; overflow-y: auto; display: grid; gap: 9px; }
.history-item { padding: 13px 14px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.history-item-head, .history-actor { display: flex; align-items: center; }
.history-item-head { justify-content: space-between; gap: 12px; }
.history-actor { gap: 9px; min-width: 0; }
.history-avatar { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #e3e8f0; color: #59697c; font-size: 9px; font-weight: 850; }
.history-actor strong, .history-actor small { display: block; letter-spacing: 0; }
.history-actor strong { color: var(--ink); font-size: 11px; }
.history-actor small { margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 400; }
.history-action { border-radius: 999px; padding: 4px 8px; background: #eef1f5; color: #667487; font-size: 9px; font-weight: 750; }
.history-action.action-restore { background: var(--amber-soft); color: var(--amber); }
.history-action.action-create { background: var(--green-soft); color: var(--green); }
.history-action.action-delete { background: #fbe9e7; color: #b83f35; }
.history-summary { margin-top: 10px; color: #334256; font-size: 11px; font-weight: 700; }
.history-item ul { margin: 7px 0 0; padding-left: 16px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.history-restore { margin-top: 9px; padding: 0; border: 0; background: transparent; color: var(--blue); font-size: 10px; font-weight: 750; }
.history-restore:disabled { color: #aab3bf; cursor: wait; }
.history-empty { padding: 36px 18px; text-align: center; color: var(--muted); font-size: 11px; }

.toast { position: fixed; right: 26px; bottom: 24px; z-index: 30; background: var(--ink); color: #fff; font-size: 12px; padding: 11px 14px; border-radius: 7px; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); pointer-events: none; transition: all .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) {
  .workspace { padding-left: 18px; padding-right: 18px; }
  .topbar { padding: 0 18px; }
  .command-strip { grid-template-columns: 1fr; gap: 16px; }
  .board-layout { grid-template-columns: 1fr; }
  .layout-resizer { display: none; }
  .board-panel, .board-layout .timeline-panel { height: auto; min-height: 0; }
  .board-panel .task-table-wrap { max-height: 580px; }
  .board-layout .timeline-scroll { max-height: min(68vh, 680px); }
  .assistant-panel { min-height: 0; }
  .collaboration-panel { grid-template-columns: 1fr; }
  .handoff-list { display: grid; grid-template-columns: repeat(2, 1fr); }
  .collaboration-panel .handoff-list { grid-template-columns: repeat(2, minmax(210px, 1fr)); }
  .collaboration-panel .assistant-log { margin: 0; padding: 14px 18px; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .sync-state, .online-count, .topbar-actions > .ghost-button { display: none; }
  .topbar-actions { gap: 6px; }
}
@media (max-width: 700px) {
  .topbar { height: 58px; padding: 0 12px; }
  .topbar-actions { gap: 4px; }
  .integration-chip { width: 31px; padding: 4px; }
  #teambitionStatusLabel { display: none; }
  .user-chip { max-width: 76px; overflow: hidden; text-overflow: ellipsis; }
  .brand-subtitle { display: none; }
  .new-task-button { width: 34px; padding: 0; }
  .new-task-label { display: none; }
  .workspace { padding: 12px 10px 32px; }
  .command-strip { gap: 9px; padding: 12px; }
  .command-copy p { max-width: none; }
  .ai-command-toolbar { align-items: flex-start; }
  .ai-status { padding-top: 6px; }
  .ai-result { align-items: stretch; flex-direction: column; }
  .ai-result-actions { justify-content: flex-end; }
  h1 { font-size: 18px; }
  .command-suggestions { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .command-suggestions button { flex: 0 0 auto; }
  .metrics-row { grid-template-columns: 1fr 1fr; margin: 10px 0 12px; }
  .metric-card { min-height: 54px; padding: 10px 12px; }
  .metric-card:nth-child(2) { border-right: 0; }
  .metric-card:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .metric-card strong { font-size: 19px; }
  .panel-header { min-height: 0; padding: 12px; align-items: flex-start; flex-direction: column; }
  .filter-group { width: 100%; overflow-x: auto; }
  .table-toolbar { padding: 9px 12px; align-items: stretch; }
  .search-field { width: 100%; max-width: none; }
  .board-filter-selects { flex: 1; }
  .board-filter-selects select { min-width: 0; flex: 1; }
  .filter-button { flex: 0 0 auto; padding: 6px 9px; }
  .handoff-list, .collaboration-panel .handoff-list { grid-template-columns: 1fr; padding: 0 12px 12px; }
  .timeline-legend { gap: 7px; }
  .timeline-header { align-items: flex-start; flex-direction: column; }
  .timeline-header-tools { width: 100%; justify-content: flex-start; }
  .timeline-header-tools select { flex: 1; min-width: 145px; }
  .timeline-zoom { order: 2; }
  .timeline-zoom input { width: 92px; }
  .timeline-legend { width: 100%; }
  .timeline-grid { --timeline-label-width: 190px; }
  .timeline-task-label { padding-left: 12px; }
  .history-toolbar { padding-left: 14px; padding-right: 14px; }
  .history-list { padding-left: 14px; padding-right: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .external-image-gallery { grid-template-columns: 1fr; }
  .auth-panel { padding: 26px 22px 22px; }
}
