:root {
  --bg-canvas: #ffffff;
  --bg-sidebar: #fafafa;
  --bg-panel: #ffffff;
  --bg-panel-strong: #ffffff;
  --bg-muted: rgba(0, 0, 0, 0.03);
  --bg-chip: rgba(0, 0, 0, 0.05);
  --bg-hero: #faf7f2;
  --bg-hero-accent: rgba(190, 168, 141, 0.24);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --text: #1a1a1a;
  --text-soft: #666666;
  --text-faint: #999999;
  --accent: #1a1a1a;
  --accent-soft: rgba(0, 0, 0, 0.06);
  --accent-green: #22c55e;
  --danger: #dc2626;
  --warning-bg: #fefce8;
  --warning-border: #fde68a;
  --warning-text: #92400e;
  --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 2px 12px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.08);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-canvas);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
}

code {
  font-family: "SF Mono", Menlo, Consolas, monospace;
}

.hidden {
  display: none !important;
}

/* ── Auth screen ────────────────────────────── */

.auth-screen,
.app-shell {
  min-height: 100vh;
}

.auth-screen {
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: var(--bg-canvas);
}

.auth-card {
  width: min(480px, 100%);
  padding: 48px 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
}

.auth-kicker {
  margin: 0 0 24px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  text-transform: none;
}

.landing-kicker,
.section-label,
.brand-kicker,
.workspace-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.auth-card h1 {
  margin: 0;
  font-family: inherit;
  font-weight: 600;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text);
}

.landing-title,
.workspace-title {
  margin: 0;
  font-family: inherit;
  font-weight: 400;
  letter-spacing: -0.03em;
  color: var(--text);
}

.auth-copy,
.landing-subtitle,
.setup-card p,
.install-card p,
.onboarding-card p,
.account-copy span,
.composer-hint {
  color: var(--text-soft);
  line-height: 1.5;
}

.auth-copy,
.auth-error {
  margin-top: 16px;
}

.auth-error {
  color: var(--danger);
}

.auth-actions,
.setup-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 24px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-soft);
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  color: var(--text);
}

input {
  padding: 10px 14px;
}

textarea {
  resize: none;
  min-height: 56px;
  max-height: 200px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 15px;
  line-height: 1.5;
}

textarea:focus,
input:focus {
  outline: none;
  border-color: var(--border-strong);
}

/* ── Buttons ────────────────────────────────── */

.primary-button,
.secondary-button,
.ghost-button,
.icon-button,
.nav-button,
.new-task-button,
.machine-pill,
.composer-target,
.suggestion-chip {
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.primary-button,
.secondary-button,
.ghost-button,
.new-task-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.primary-button {
  background: var(--text);
  color: #ffffff;
  border-radius: 999px;
}

.primary-button:hover {
  background: #333333;
}

.secondary-button {
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
}

.secondary-button:hover {
  background: var(--bg-muted);
}

.ghost-button {
  background: transparent;
  color: var(--text-soft);
}

.ghost-button:hover {
  color: var(--text);
  background: var(--bg-muted);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-soft);
  border: none;
  font-size: 13px;
}

.icon-button:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.primary-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled,
.icon-button:disabled,
.nav-button:disabled,
.new-task-button:disabled,
.machine-pill:disabled,
.composer-target:disabled,
.suggestion-chip:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

/* ── App layout ─────────────────────────────── */

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

/* ── Sidebar ────────────────────────────────── */

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 16px 12px;
  overflow: hidden;
  border-right: 1px solid var(--border);
  background: var(--bg-sidebar);
}

.sidebar-head,
.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-head {
  padding: 4px 4px 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-lockup .brand-kicker {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--text);
}

.brand-lockup h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  color: var(--text-faint);
}

.setup-card h3,
.install-card h3,
.onboarding-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.setup-card p:not(.section-label),
.install-card p:not(.section-label),
.onboarding-card p:not(.section-label) {
  margin: 0;
}

.sidebar-close {
  display: none;
}

.new-task-button {
  width: 100%;
  margin-top: 20px;
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 500;
  min-height: 40px;
  font-size: 14px;
}

.new-task-button:hover {
  background: var(--bg-muted);
}

.nav-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 16px;
  padding: 0 4px;
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-soft);
  border: none;
  text-align: left;
  font-size: 14px;
  font-weight: 400;
}

.nav-button:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.nav-button.is-active {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 500;
}

.setup-panel {
  margin-top: 14px;
}

.setup-card,
.install-card,
.onboarding-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-panel);
}

.setup-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfaf7 100%);
  box-shadow: var(--shadow-sm);
}

.composer-shell,
.workspace,
.message,
.approval-card,
.tool-status {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-panel);
}

/* ── Sidebar task list ──────────────────────── */

.task-groups-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  margin-top: 24px;
  margin-bottom: 8px;
}

.task-groups-label span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.task-groups {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin-top: 8px;
  padding-right: 4px;
}

.task-group {
  margin-bottom: 4px;
}

.task-group-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  font-size: 14px;
}

.task-group-header:hover {
  background: var(--bg-muted);
}

.task-group-header.is-selected {
  background: var(--accent-soft);
}

.task-group-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.task-group-title,
.task-item-title {
  font-weight: 500;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-group-meta,
.task-item-meta {
  color: var(--text-faint);
  font-size: 12px;
}

.task-group-status,
.machine-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-faint);
  font-size: 12px;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d1d5db;
}

.status-dot.online {
  background: var(--accent-green);
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 2px;
  padding-left: 0;
}

.task-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
}

.task-item:hover {
  background: var(--bg-muted);
}

.task-item.is-active {
  background: var(--accent-soft);
}

.task-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-faint);
  font-size: 14px;
}

.task-item-content {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.sidebar-footer {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.account-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
}

.account-card:hover {
  background: var(--bg-muted);
}

.account-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e5e7eb, #d1d5db);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.account-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.account-copy strong {
  font-size: 13px;
  font-weight: 600;
}

.account-copy span {
  font-size: 12px;
}

.account-copy strong,
.account-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Workspace ──────────────────────────────── */

.workspace {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0;
  border: none;
  border-radius: 0;
  background: var(--bg-panel);
  box-shadow: none;
}

.workspace-header {
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  min-height: 56px;
}

.workspace-header-left,
.workspace-header-right,
.workspace-copy {
  display: flex;
  align-items: center;
  gap: 12px;
}

.workspace-copy {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.workspace-label {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}

.workspace-title {
  display: none; /* Hidden in Manus style - content is centered in landing */
}

.workspace-header-right {
  margin-left: auto;
  gap: 16px;
}

.machine-pill,
.composer-target {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.machine-pill:hover,
.composer-target:hover {
  background: var(--bg-muted);
}

.machine-pill.is-empty,
.composer-target.is-empty {
  color: var(--text-faint);
}

.connection-banner {
  margin: 12px 24px 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--warning-border);
  background: var(--warning-bg);
  color: var(--warning-text);
  font-weight: 500;
  font-size: 13px;
}

/* ── Landing state ──────────────────────────── */

.landing-state,
.task-thread {
  flex: 1;
  min-height: 0;
}

.landing-state {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px 32px;
  overflow: hidden;
}

.landing-state::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 420px;
  background:
    radial-gradient(circle at top, var(--bg-hero-accent), transparent 62%),
    linear-gradient(180deg, var(--bg-hero) 0%, rgba(250, 247, 242, 0) 100%);
  pointer-events: none;
}

.landing-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: min(860px, 100%);
}

.landing-copy {
  max-width: 720px;
  text-align: center;
}

.landing-cards {
  width: min(720px, 100%);
}

.landing-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  margin-bottom: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  color: var(--text-soft);
}

.landing-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.landing-subtitle {
  max-width: 600px;
  margin: 16px auto 0;
  font-size: 16px;
  text-wrap: balance;
}

.install-card,
.onboarding-card {
  max-width: none;
  text-align: left;
}

.install-card {
  position: relative;
  padding: 26px;
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(16px);
}

.install-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: linear-gradient(90deg, rgba(26, 26, 26, 0.92), rgba(26, 26, 26, 0.2));
}

.install-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.install-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1a1a1a 0%, #434343 100%);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(26, 26, 26, 0.18);
  flex-shrink: 0;
}

.install-card-heading .section-label {
  margin-bottom: 6px;
}

.install-card-copy {
  max-width: 52ch;
  margin-top: 18px;
  font-size: 15px;
}

.install-card-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.install-step {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
}

.install-actions {
  margin-top: 22px;
  flex-wrap: wrap;
}

.install-actions .primary-button {
  min-width: 220px;
  padding: 0 24px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

.install-actions .secondary-button {
  background: rgba(255, 255, 255, 0.72);
}

.install-status {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}

/* ── Chat thread ────────────────────────────── */

.thread-scroll {
  height: 100%;
  overflow: auto;
  padding: 24px 24px 10px;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 800px;
  margin: 0 auto;
}

.message {
  width: fit-content;
  max-width: 100%;
  padding: 12px 16px;
  line-height: 1.6;
  color: var(--text);
  font-size: 14px;
}

.message-user {
  align-self: flex-end;
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.message-assistant {
  align-self: flex-start;
  background: var(--bg-panel);
  border-color: var(--border);
}

.message-system,
.message-error {
  align-self: center;
  max-width: 90%;
  text-align: center;
}

.message-system {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

.message-error {
  background: #fef2f2;
  color: var(--danger);
  border-color: #fecaca;
}

.message.markdown-body {
  white-space: normal;
}

.message.markdown-body p,
.message.markdown-body ul,
.message.markdown-body ol,
.message.markdown-body pre,
.message.markdown-body blockquote,
.message.markdown-body table,
.message.markdown-body h1,
.message.markdown-body h2,
.message.markdown-body h3 {
  margin: 0 0 0.6em;
}

.message.markdown-body p:last-child,
.message.markdown-body ul:last-child,
.message.markdown-body ol:last-child,
.message.markdown-body pre:last-child,
.message.markdown-body blockquote:last-child,
.message.markdown-body table:last-child {
  margin-bottom: 0;
}

.message.markdown-body code {
  background: rgba(0, 0, 0, 0.06);
  border-radius: 4px;
  padding: 0.15em 0.35em;
  font-size: 13px;
}

.message.markdown-body pre {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: #1e1e1e;
  color: #d4d4d4;
  overflow-x: auto;
}

.message.markdown-body pre code {
  background: transparent;
  padding: 0;
}

.message.markdown-body blockquote {
  margin-left: 0;
  padding-left: 14px;
  border-left: 3px solid var(--border-strong);
  color: var(--text-soft);
}

.message.markdown-body table {
  width: 100%;
  border-collapse: collapse;
}

.message.markdown-body th,
.message.markdown-body td {
  padding: 6px 10px;
  border: 1px solid var(--border);
  text-align: left;
  font-size: 13px;
}

.message.is-rtl {
  text-align: right;
}

/* ── Approval / Tool cards ──────────────────── */

.approval-card,
.tool-status {
  align-self: stretch;
  width: 100%;
  max-width: 100%;
}

.approval-card {
  overflow: hidden;
}

.approval-header {
  padding: 12px 16px;
}

.approval-header-compact {
  display: flex;
  align-items: center;
  gap: 10px;
}

.approval-explanation {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 14px;
}

.approval-risk {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 13px;
}

.approval-risk-badge,
.approval-decided,
.status-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--bg-chip);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.approval-risk-reason {
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 13px;
}

.approval-details {
  display: none;
  padding: 12px 16px;
  background: var(--bg-muted);
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.approval-details.show {
  display: block;
}

.approval-details-toggle {
  border: none;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
}

.approval-details-toggle-icon {
  min-width: 26px;
  min-height: 26px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-panel);
}

.approval-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border);
}

.approval-buttons button {
  min-height: 44px;
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.approval-buttons button:first-child {
  border-right: 1px solid var(--border);
}

.btn-allow {
  color: #16a34a;
}

.btn-allow:hover {
  background: #f0fdf4;
}

.btn-deny {
  color: var(--danger);
}

.btn-deny:hover {
  background: #fef2f2;
}

.status-completed {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}

.status-denied,
.status-cancelled,
.status-timeout,
.status-failed {
  background: rgba(220, 38, 38, 0.08);
  color: var(--danger);
}

.tool-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  max-width: fit-content;
  font-size: 13px;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Composer ───────────────────────────────── */

.composer-panel {
  margin: auto 24px 24px;
  width: min(800px, calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
}

.composer-shell {
  padding: 16px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.composer-meta,
.composer-footer,
.suggestion-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.composer-meta {
  justify-content: space-between;
  margin-bottom: 10px;
}

.composer-footer {
  justify-content: space-between;
  margin-top: 12px;
  gap: 12px;
}

.suggestion-row {
  flex-wrap: wrap;
  gap: 8px;
}

.suggestion-chip {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--text-soft);
  border: 1px solid var(--border);
  font-size: 13px;
}

.suggestion-chip:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
}

.send-button {
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.claim-output {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: #f0fdf4;
  color: #166534;
  font-weight: 600;
  font-size: 13px;
}

.sidebar-backdrop {
  display: none;
}

/* ── Scrollbar ──────────────────────────────── */

.thread-scroll::-webkit-scrollbar,
.task-groups::-webkit-scrollbar {
  width: 6px;
}

.thread-scroll::-webkit-scrollbar-thumb,
.task-groups::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
}

.thread-scroll::-webkit-scrollbar-track,
.task-groups::-webkit-scrollbar-track {
  background: transparent;
}

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

/* ── Responsive ─────────────────────────────── */

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

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(300px, 85vw);
    height: 100vh;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    border-right: 1px solid var(--border);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-close,
  .sidebar-toggle {
    display: inline-flex;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    display: block;
    z-index: 30;
    background: rgba(0, 0, 0, 0.3);
  }

  .workspace {
    min-height: 100vh;
  }
}

@media (min-width: 961px) {
  .sidebar-toggle {
    display: none;
  }
}

@media (max-width: 760px) {
  .workspace-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .workspace-header-right,
  .composer-footer {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .machine-pill,
  .composer-target {
    width: 100%;
    justify-content: center;
  }

  .composer-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .message {
    max-width: 100%;
  }

  .composer-panel {
    width: calc(100% - 32px);
    margin-left: auto;
    margin-right: auto;
  }

  .landing-cards {
    width: 100%;
  }

  .install-card {
    padding: 22px;
  }

  .install-card-header {
    align-items: flex-start;
  }

  .install-actions .primary-button,
  .install-actions .secondary-button {
    width: 100%;
  }
}
