: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 {
  min-height: 100vh;
  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,
.auth-status {
  margin-top: 16px;
}

.auth-status {
  color: var(--text-soft);
}

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

.auth-mode-switch {
  display: inline-flex;
  gap: 8px;
  margin-top: 24px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-muted);
}

.auth-mode-button {
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}

.auth-mode-button.is-active {
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

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

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  color: var(--text-faint);
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.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);
}

.auth-link-button {
  align-self: flex-start;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.auth-link-button:hover {
  color: var(--text);
}

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: 17px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: #242628;
}

textarea::placeholder {
  color: #a7aaaf;
}

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);
}

.primary-button.is-disabled,
.secondary-button.is-disabled {
  opacity: 0.6;
  pointer-events: none;
}

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

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

.danger-button {
  color: var(--danger);
}

.danger-button:hover {
  color: #b91c1c;
  background: #fef2f2;
}

.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: 56px minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  height: 100vh;
  overflow: hidden;
}

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

.sidebar-rail {
  width: 56px;
  min-width: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-right: 1px solid var(--border);
  background: var(--bg-panel, #fff);
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 5;
}

.sidebar-rail-top,
.sidebar-rail-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.sidebar-rail-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-sm, 8px);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

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

.rail-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: #e5e7eb;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  border: none;
  transition: background-color 0.15s;
}

.rail-avatar:hover {
  background-color: #d1d5db;
}

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

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: min(300px, calc(100vw - 56px));
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--border);
  background: var(--bg-sidebar);
  z-index: 40;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
}

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

.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: inline-flex;
}

.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-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,
.approval-card {
  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 {
  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;
}

.context-menu {
  position: fixed;
  z-index: 80;
  min-width: 168px;
  padding: 6px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(16px);
}

.context-menu-item {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}

.context-menu-item:hover {
  background: #fef2f2;
}

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

.sidebar-guest-cta {
  display: flex;
  flex-direction: column;
  padding: 8px;
}

.sidebar-guest-copy {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}

.sidebar-guest-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-guest-actions .secondary-button,
.sidebar-guest-actions .ghost-button {
  min-height: 36px;
  padding: 0 12px;
}

.sidebar-guest-or {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
}

.sidebar-guest-login-link {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.sidebar-guest-login-link:hover {
  color: var(--text);
}

.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;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: var(--bg-panel);
  box-shadow: none;
  overflow: hidden;
}

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

.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;
  display: flex;
  align-items: center;
  gap: 16px;
}

.guest-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.guest-header-actions .secondary-button,
.guest-header-actions .ghost-button {
  min-height: 34px;
  padding: 0 14px;
}

.machine-pill,
.composer-target {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(27, 31, 35, 0.06);
  background: linear-gradient(180deg, #fafafa 0%, #f2f2f2 100%);
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.machine-pill:hover,
.composer-target:hover {
  background: linear-gradient(180deg, #fbfbfb 0%, #f5f5f5 100%);
}

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

.composer-target {
  justify-content: flex-start;
  gap: 12px;
  padding-right: 22px;
}

.composer-target-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #c8ccd2;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.72);
  flex-shrink: 0;
}

.composer-target-dot.is-online {
  background: #34c759;
}

.composer-target-dot.is-offline {
  background: #9ca3af;
}

.composer-target-label {
  white-space: nowrap;
}

.privilege-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.privilege-badge.is-admin {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
}

.privilege-badge.is-user {
  border-color: var(--border);
  background: var(--bg-muted);
  color: var(--text-soft);
}

.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;
  flex-shrink: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(440px, 100%);
  padding: 24px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.2);
}

.modal-kicker {
  margin: 0 0 10px;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 500;
}

.modal-copy {
  margin: 16px 0 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.55;
}

.modal-inline-note {
  margin-top: 12px;
  font-size: 13px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.modal-danger-button {
  background: var(--danger);
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.2);
}

.modal-danger-button:hover {
  background: #b91c1c;
}

.share-modal-card {
  width: min(720px, calc(100% - 32px));
}

.share-dialog-list {
  margin-top: 18px;
}

.share-dialog-form {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(140px, 0.9fr) auto;
  gap: 10px;
  margin-top: 16px;
}

.share-dialog-form select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  color: var(--text);
}

.share-dialog-form select:focus {
  outline: none;
  border-color: var(--border-strong);
}

.public-access-approval-shell {
  flex: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 88px 24px 48px;
}

.public-access-approval-card {
  width: min(720px, 100%);
  padding: 32px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

.access-approval-actions {
  margin-top: 24px;
}

.computer-remote-access-panel {
  margin: 16px 0 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(219, 234, 254, 0.55);
  border: 1px solid rgba(59, 130, 246, 0.16);
}

.computer-remote-access-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

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

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

.task-thread {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.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-method-grid {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.install-method-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.install-method-kicker {
  margin: 0;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.install-method-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.install-method-copy {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.install-method-card .install-actions {
  margin-top: 4px;
}

.install-method-card .install-platform-actions {
  padding: 0;
}

.install-method-card .install-platform-status {
  min-height: 0;
}

.install-platform-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.install-action-slot {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.install-download-button {
  width: 100%;
  min-height: 48px;
  padding: 0 20px;
}

.install-download-button.primary-button,
.install-download-button.is-recommended {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

.install-download-button.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

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

.install-platform-status {
  margin: 0;
  min-height: 2.8em;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.45;
}

.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;
}

.install-share-link-row {
  margin-top: 14px;
}

.install-copy-link-wrap {
  position: relative;
  display: flex;
  width: 100%;
}

.install-copy-link-button {
  width: 100%;
  min-width: 184px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  border-color: rgba(0, 0, 0, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 247, 247, 0.94));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    opacity 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.install-copy-link-button .button-icon {
  opacity: 0.72;
}

.install-copy-link-button:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(242, 242, 242, 0.96));
  border-color: rgba(0, 0, 0, 0.16);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.install-copy-link-button[aria-busy="true"] {
  opacity: 0.92;
}

.install-remote-actions {
  margin-top: auto;
}

.install-copy-link-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(26, 26, 26, 0.94);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
  pointer-events: none;
}

.install-copy-link-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% - 1px);
  width: 10px;
  height: 10px;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}

.install-copy-link-tooltip.is-success {
  background: rgba(21, 128, 61, 0.96);
}

.install-copy-link-tooltip.is-error {
  background: rgba(185, 28, 28, 0.96);
}

/* ── Computer overview ─────────────────────── */

.computers-dashboard,
.computer-overview,
.feedback-dashboard,
.settings-pane {
  overflow: auto;
  padding: 24px 24px 32px;
}

.computers-dashboard-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.feedback-dashboard-shell {
  width: min(960px, 100%);
  margin: 0 auto;
}

.settings-pane-shell {
  width: min(960px, 100%);
  margin: 0 auto;
}

.computer-overview-shell {
  width: min(880px, 100%);
  margin: 0 auto;
}

.computers-dashboard-header,
.feedback-dashboard-header,
.settings-pane-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.dashboard-install-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  margin-bottom: 18px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(250, 250, 250, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: var(--shadow-sm);
}

.dashboard-install-status {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}

.dashboard-install-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.dashboard-install-method {
  height: 100%;
}

.dashboard-install-actions {
  width: 100%;
  margin-top: 0;
  flex-shrink: 0;
}

.computers-dashboard-title {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.computers-dashboard-caption {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}

.feedback-filter-form {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
}

.feedback-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.feedback-filter-field span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.feedback-filter-field input,
.feedback-filter-field select {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.feedback-filter-field input {
  min-width: 360px;
}

.feedback-dashboard-status {
  margin: 0 0 14px;
  color: var(--text-soft);
  font-size: 13px;
}

.feedback-dashboard-status.is-error {
  color: var(--danger);
}

.feedback-dashboard-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-pane-status {
  margin: 0 0 14px;
  color: var(--text-soft);
  font-size: 13px;
}

.settings-pane-status.is-error {
  color: var(--danger);
}

.settings-pane-status.is-success {
  color: #166534;
}

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

.settings-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-panel);
  box-shadow: var(--shadow-sm);
}

.settings-card-danger {
  border-color: rgba(220, 38, 38, 0.18);
  background: linear-gradient(180deg, rgba(255, 246, 246, 0.98), rgba(255, 255, 255, 0.98));
}

.settings-card-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.settings-card-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.settings-card-copy {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.6;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-field span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.settings-field input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.feedback-record {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-panel);
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.feedback-record:hover {
  border-color: rgba(0, 0, 0, 0.14);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.feedback-record-head,
.feedback-record-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feedback-record-rating {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.feedback-record-rating.is-up {
  background: #dcfce7;
  color: #166534;
}

.feedback-record-rating.is-down {
  background: #fee2e2;
  color: #b91c1c;
}

.feedback-record-meta,
.feedback-record-foot {
  color: var(--text-soft);
  font-size: 12px;
}

.feedback-record-foot-meta,
.feedback-record-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.feedback-record-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feedback-record-comment,
.feedback-record-preview {
  margin: 0;
  line-height: 1.5;
}

.feedback-record-comment {
  color: var(--text);
  font-size: 14px;
}

.feedback-record-preview {
  color: var(--text-soft);
  font-size: 13px;
}

.feedback-record-open {
  min-height: 32px;
  padding: 0 10px;
}

.feedback-record-link {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.feedback-record-link:hover {
  color: var(--text);
}

.computers-dashboard-table-wrap {
  min-width: 0;
  overflow: hidden;
}

.computers-dashboard-table {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-panel);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.computers-dashboard-head,
.computers-dashboard-row {
  display: grid;
  grid-template-columns:
    minmax(0, 1.8fr)
    minmax(0, 1.15fr)
    minmax(0, 0.8fr)
    minmax(0, 0.85fr)
    minmax(0, 0.8fr)
    minmax(0, 1.25fr)
    minmax(0, 0.9fr)
    minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.computers-dashboard-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: #fafafa;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.computers-dashboard-row {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  text-align: left;
  transition: background-color 0.15s ease;
}

.computers-dashboard-row:last-child {
  border-bottom: none;
}

.computers-dashboard-row:hover {
  background: #fcfcfc;
}

.computers-dashboard-cell {
  min-width: 0;
  overflow: hidden;
}

.computers-dashboard-head > span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.computers-dashboard-name {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.computers-dashboard-open,
.computers-dashboard-share-button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
}

.computers-dashboard-open:hover .computers-dashboard-name {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.computers-dashboard-share-button {
  cursor: pointer;
}

.computers-dashboard-share-button:hover .computers-dashboard-chip {
  filter: brightness(0.97);
}

.computers-dashboard-subtext {
  display: block;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.computers-dashboard-value {
  display: block;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.computers-dashboard-agent-actions,
.computers-dashboard-agent-pending {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.computer-agent-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text-soft);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.computer-agent-action-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.computer-agent-action-button:hover:not(:disabled) {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: var(--text);
}

.computer-agent-action-button.is-danger:hover:not(:disabled) {
  border-color: rgba(220, 38, 38, 0.24);
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
}

.computer-agent-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.computers-dashboard-inline-action {
  padding: 0;
  border: none;
  background: transparent;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
}

.computers-dashboard-inline-action:hover:not(:disabled) {
  color: #1d4ed8;
}

.computers-dashboard-inline-action:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.computers-dashboard-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.computers-dashboard-chip.is-online {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.computers-dashboard-chip.is-offline {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

.computers-dashboard-chip.is-admin {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.computers-dashboard-chip.is-user {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

.computers-dashboard-chip.is-shared {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
}

.computers-dashboard-chip.is-direct {
  background: rgba(15, 23, 42, 0.08);
  color: #334155;
}

.computers-dashboard-cell .access-role-chip {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.computers-dashboard-empty {
  padding: 20px 18px 22px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
}

.computer-overview-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.computer-overview-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
  margin-bottom: 18px;
}

.computer-overview-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.computer-overview-title {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.computer-overview-meta,
.computer-history-meta,
.computer-history-action {
  color: var(--text-soft);
  font-size: 13px;
}

.computer-overview-meta {
  margin: 0;
  white-space: nowrap;
}

.overview-card {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-panel);
  box-shadow: var(--shadow-sm);
}

.overview-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.overview-card-title {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.access-role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.access-role-badge.is-owner,
.access-role-chip.is-owner {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.access-role-badge.is-admin,
.access-role-chip.is-admin {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.access-role-badge.is-view,
.access-role-chip.is-view {
  background: rgba(100, 116, 139, 0.14);
  color: #475569;
}

.access-role-badge.is-superadmin,
.access-role-chip.is-superadmin {
  background: rgba(126, 34, 206, 0.14);
  color: #7e22ce;
}

.computer-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin: 0;
}

.computer-detail-row {
  min-width: 0;
}

.computer-detail-row dt {
  margin: 0 0 4px;
  color: var(--text-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.computer-detail-row dd {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.computer-access-summary,
.computer-share-feedback,
.computer-share-empty,
.computer-share-note {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}

.computer-share-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.computer-share-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(250, 250, 250, 0.96), rgba(255, 255, 255, 0.98));
}

.computer-share-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.computer-share-name {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.computer-share-email {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.access-role-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.computer-share-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.role-menu {
  position: relative;
  min-width: 136px;
}

.role-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-panel);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.role-menu-trigger:hover {
  background: var(--bg-muted);
}

.role-menu-trigger[aria-expanded="true"] {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.role-menu-trigger.is-admin {
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.16);
  color: #15803d;
}

.role-menu-trigger.is-view {
  background: rgba(100, 116, 139, 0.1);
  border-color: rgba(100, 116, 139, 0.16);
  color: #475569;
}

.role-menu-caret {
  font-size: 11px;
  line-height: 1;
  opacity: 0.72;
  transition: transform 0.15s ease;
}

.role-menu.is-open .role-menu-caret {
  transform: rotate(180deg);
}

.role-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  gap: 4px;
  min-width: 164px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

.role-menu-option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.role-menu-option:hover {
  background: var(--bg-muted);
}

.role-menu-option.is-current {
  font-weight: 600;
}

.role-menu-option.is-admin.is-current {
  background: rgba(22, 163, 74, 0.08);
  color: #15803d;
}

.role-menu-option.is-view.is-current {
  background: rgba(100, 116, 139, 0.1);
  color: #475569;
}

.role-menu-option:disabled,
.role-menu-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.role-menu-create {
  min-width: 0;
}

.role-menu-create .role-menu-trigger {
  min-height: 42px;
  border-radius: var(--radius-sm);
}

.role-menu-create .role-menu-list {
  left: 0;
  right: 0;
  min-width: 0;
}

.computer-share-revoke {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(220, 38, 38, 0.15);
  border-radius: var(--radius-sm);
  background: rgba(254, 242, 242, 0.9);
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.computer-share-form {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(140px, 0.9fr) auto;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.computer-share-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.computer-share-field span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.computer-share-field input,
.computer-share-form .role-menu-trigger {
  min-height: 42px;
  padding: 0 12px;
  font-size: 14px;
}

.computer-share-field input {
  border-radius: var(--radius-sm);
}

.computer-share-submit-button {
  align-self: end;
  min-height: 42px;
  padding: 0 16px;
}

.computer-share-feedback {
  margin-top: 12px;
}

.computer-share-feedback.is-error {
  color: var(--danger);
}

.computer-share-feedback.is-success {
  color: #15803d;
}

.modal-confirm-field {
  margin-top: 18px;
}

.computer-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.computer-history-item,
.computer-history-empty {
  width: 100%;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-panel);
  box-shadow: var(--shadow-sm);
}

.computer-history-item {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.computer-history-item:hover {
  background: #fcfcfc;
}

.computer-history-item.is-active {
  border-color: var(--border-strong);
  background: var(--accent-soft);
}

.computer-history-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.computer-history-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.computer-history-action {
  font-weight: 500;
}

.computer-history-empty h3,
.computer-history-empty p:not(.section-label) {
  margin: 0;
}

.computer-history-empty h3 {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.computer-history-empty p:not(.section-label) {
  margin-top: 8px;
}

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

.thread-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 24px 24px 10px;
}

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

.message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 100%;
  width: 100%;
  line-height: 1.6;
  font-size: 14px;
}

.message-bubble {
  width: fit-content;
  max-width: min(100%, 800px);
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-panel);
  color: var(--text);
  transition: box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.message-bubble-assistant {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.message-user {
  align-self: flex-end;
  align-items: flex-end;
}

@media (min-width: 641px) {
  .message-user .message-bubble {
    max-width: min(78%, 640px);
  }
}

.message-user.message-user-other {
  align-self: flex-end;
  align-items: flex-end;
}

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

.message-bubble-user {
  background: #f3f4f6;
  border-color: #e5e7eb;
}

.message-user.message-user-other .message-bubble-user {
  background: #fff7ed;
  border-color: #fed7aa;
}

.message-bubble-system {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
  text-align: center;
}

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

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

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

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

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

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

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

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

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

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

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

.message-author {
  margin-bottom: 6px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.message-user .message-body {
  text-align: right;
}

.message-user.message-user-other .message-body {
  text-align: right;
}

.message-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--text-faint);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 80ms ease, transform 80ms ease;
}

.message-user .message-footer {
  justify-content: flex-end;
}

.message-weekday {
  cursor: default;
  position: relative;
  text-transform: capitalize;
}

.message-weekday::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  min-width: max-content;
  max-width: 320px;
  padding: 7px 9px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.96);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(2px);
  transition: opacity 60ms ease 480ms, transform 60ms ease 480ms;
  z-index: 20;
}

.message-weekday:hover::after,
.message-weekday:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.message-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.message-action-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  box-shadow: none;
  transition: color 140ms ease, transform 140ms ease;
}

.message-feedback-button.is-active {
  border-radius: 999px;
  transform: translateY(-1px);
}

.message-feedback-button[data-message-feedback-rating="up"].is-active {
  background: #15803d;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(21, 128, 61, 0.28);
}

.message-feedback-button[data-message-feedback-rating="down"].is-active {
  background: #b91c1c;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(185, 28, 28, 0.24);
}

.message-action-button::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  min-width: max-content;
  max-width: 220px;
  padding: 7px 9px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.96);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(2px);
  transition: opacity 60ms ease 480ms, transform 60ms ease 480ms;
  z-index: 20;
}

.message-action-button:hover::after,
.message-action-button:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.new-task-button[data-tooltip],
.sidebar-rail-icon[data-tooltip] {
  position: relative;
}

.new-task-button[data-tooltip]::after,
.sidebar-rail-icon[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  max-width: 220px;
  padding: 7px 9px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.96);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(2px);
  transition: opacity 60ms ease 320ms, transform 60ms ease 320ms;
  z-index: 20;
}

.sidebar-rail-icon[data-tooltip]::after {
  left: calc(100% + 8px);
  right: auto;
  top: 50%;
  bottom: auto;
  transform: translate(-2px, -50%);
  z-index: 120;
}

.new-task-button[data-tooltip]:hover::after,
.new-task-button[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.sidebar-rail-icon[data-tooltip]:hover::after,
.sidebar-rail-icon[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.message-copy-feedback {
  display: inline-flex;
  align-items: center;
  margin-left: 2px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 140ms ease, transform 140ms ease;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.message-copy-feedback[data-tone="success"] {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.message-copy-feedback[data-tone="error"] {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.message-copy-feedback.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.message:hover .message-footer,
.message:focus-within .message-footer,
.message.show-message-feedback .message-footer,
.message-footer.is-always-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.message-action-button:hover,
.message-action-button:focus-visible {
  color: var(--text);
  transform: translateY(-1px);
  outline: none;
}

.message-feedback-composer {
  width: 100%;
  margin-top: 6px;
}

.message-feedback-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(440px, 100%);
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfbfb;
}

.message-feedback-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.message-feedback-panel-head strong {
  font-size: 13px;
}

.message-feedback-panel-head span {
  color: var(--text-soft);
  font-size: 11px;
}

.message-feedback-input {
  width: 100%;
  min-height: 88px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
}

.message-feedback-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.message-feedback-panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.message-feedback-cancel,
.message-feedback-submit {
  min-height: 34px;
  padding: 0 12px;
}

.message-permalink-highlight .message-bubble {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

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

.approval-card {
  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;
}

.status-running {
  gap: 6px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.status-running-indicator {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  animation: status-pulse 0.9s ease-in-out infinite;
}

.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:not(.primary-button):not(.secondary-button):not(.ghost-button) {
  min-height: 44px;
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.approval-buttons button:not(.primary-button):not(.secondary-button):not(.ghost-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);
}

.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% - 64px));
  margin-left: auto;
  margin-right: auto;
  flex-shrink: 0;
}

.composer-shell {
  display: flex;
  flex-direction: column;
  padding: 14px 20px 12px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(27, 31, 35, 0.08);
  border-radius: 24px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.07), 0 1px 6px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.composer-shell.is-arm-pending {
  border-color: rgba(166, 191, 255, 0.95);
  box-shadow: 0 0 0 2px rgba(166, 191, 255, 0.18), 0 8px 20px rgba(59, 130, 246, 0.07);
}

.workspace.is-new-task .composer-panel {
  margin: auto auto;
  width: min(920px, calc(100% - 64px));
}

.workspace.is-computer-overview .composer-shell {
  padding: 18px 20px 16px;
}

.workspace.is-computer-overview .composer-panel {
  order: 1;
  margin: 24px auto 0;
  width: min(920px, calc(100% - 64px));
  flex-shrink: 0;
}

.workspace.is-computer-overview .computer-overview {
  order: 2;
}

.workspace.is-new-task .composer-shell {
  min-height: 214px;
  padding: 18px 20px 16px;
  border-color: rgba(27, 31, 35, 0.08);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.workspace.is-new-task .composer-meta {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  text-align: left;
}

.workspace.is-new-task .composer-hint {
  max-width: none;
  text-align: right;
}

.workspace.is-new-task .composer-footer {
  justify-content: space-between;
}

.workspace.is-new-task textarea {
  min-height: 72px;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

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

.composer-control-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 2px;
}

.composer-inline-action {
  padding: 0;
  min-height: auto;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #2563eb;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.composer-inline-action:hover {
  background: transparent;
  color: #1d4ed8;
}

.composer-inline-action:disabled {
  color: #94a3b8;
  text-decoration: none;
}

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

.composer-hint {
  margin: 0;
  font-size: 12px;
  color: #a6a8ad;
  white-space: nowrap;
  text-align: right;
}

.composer-shell .composer-target {
  min-height: 40px;
  padding: 0 16px 0 14px;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}

.composer-shell .composer-target-dot {
  width: 10px;
  height: 10px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.72);
}

#message-input {
  flex: 1 1 auto;
  min-height: 36px;
  font-size: 14px;
  line-height: 1.45;
}

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

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

.suggestion-chip {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8f8f7 0%, #f0efed 100%);
  color: #676b72;
  border: 1px solid rgba(27, 31, 35, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 500;
}

.suggestion-chip:hover {
  background: linear-gradient(180deg, #fbfbfa 0%, #f3f1ef 100%);
  color: var(--text);
}

.suggestion-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.send-button {
  min-width: 42px;
  min-height: 42px;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #1c1c1e;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.14);
}

.send-button svg {
  width: 16px;
  height: 16px;
}

.send-button:hover {
  background: #111214;
}

.send-button:disabled {
  background: #dedede;
  box-shadow: none;
}

.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 {
  position: fixed;
  inset: 0;
  display: block;
  z-index: 30;
  background: rgba(0, 0, 0, 0.3);
}

/* ── 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);
  }
}

@keyframes status-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.75);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@supports (height: 100dvh) {
  .app-shell {
    height: 100dvh;
  }
}

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

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

  .workspace {
    height: 100%;
  }
}

/* sidebar-toggle now always visible via rail */

@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;
  }

  .computer-overview-status {
    width: 100%;
    justify-content: space-between;
  }

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

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

  .composer-hint {
    white-space: normal;
    text-align: left;
  }

  .suggestion-chip {
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
  }

  .send-button {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    align-self: flex-end;
  }

  .arm-toggle-wrap {
    justify-content: center;
  }

  .arm-pending-hint,
  .arm-status-hint {
    padding-left: 0;
    padding-right: 0;
  }

  textarea {
    min-height: 56px;
    font-size: 16px;
  }

  #message-input,
  .workspace.is-new-task textarea {
    min-height: 56px;
    font-size: 16px;
  }

  .message {
    max-width: 100%;
  }

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

  .workspace.is-computer-overview .composer-panel {
    width: calc(100% - 32px);
    margin: 16px auto 0;
  }

  .workspace.is-new-task .composer-panel {
    width: calc(100% - 32px);
    margin: auto 16px;
  }

  .workspace.is-new-task .composer-meta {
    align-items: flex-start;
    text-align: left;
  }

  .workspace.is-new-task .composer-hint {
    text-align: left;
  }

  .computers-dashboard,
  .computer-overview,
  .feedback-dashboard,
  .settings-pane {
    padding: 18px 16px 24px;
  }

  .computers-dashboard-header,
  .computer-overview-header,
  .feedback-dashboard-header,
  .settings-pane-header {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .dashboard-install-panel {
    padding: 18px;
  }

  .dashboard-install-grid {
    grid-template-columns: 1fr;
  }

  .install-copy-link-wrap {
    display: flex;
  }

  .install-copy-link-button {
    width: 100%;
  }

  .computer-overview-status {
    flex-direction: column;
    align-items: flex-start;
  }

  .computer-overview-meta {
    white-space: normal;
  }

  .computer-overview-panels,
  .computer-details-grid {
    grid-template-columns: 1fr;
  }

  .overview-card-head,
  .computer-share-form {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .share-dialog-form {
    grid-template-columns: 1fr;
  }

  .computer-share-item {
    grid-template-columns: 1fr;
  }

  .computer-share-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .access-role-badge {
    align-self: flex-start;
  }

  .computer-share-revoke,
  .computer-share-actions .role-menu,
  .computer-share-actions .role-menu-trigger,
  .computer-share-submit-button {
    width: 100%;
  }

  .computer-share-actions .role-menu-list {
    left: 0;
    right: 0;
    min-width: 0;
  }

  .computer-history-item {
    align-items: flex-start;
  }

  .modal-card {
    padding: 20px;
    border-radius: 18px;
  }

  .modal-title {
    font-size: 24px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .primary-button,
  .modal-actions .secondary-button,
  .share-dialog-form .primary-button {
    width: 100%;
  }

  .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%;
  }

  .install-platform-actions {
    grid-template-columns: 1fr;
  }

  .install-platform-status {
    min-height: 0;
  }
}

/* ── Simon App Wireframe overrides ─────────── */

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

.sidebar {
  padding: 16px;
  background: #fafafa;
}


.sidebar-head {
  padding: 0;
}

.new-task-button {
  min-height: 34px;
  margin-top: 16px;
  border: 1px solid #1a1a1a;
  border-radius: 6px;
  background: #1a1a1a;
  color: #ffffff;
  font-weight: 500;
}

.new-task-button:hover {
  background: #111111;
}

.nav-row {
  gap: 10px;
  margin-top: 16px;
  padding: 0;
}

.nav-button {
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.nav-button svg,
.computer-card-folder svg,
.install-download-button .button-icon {
  flex-shrink: 0;
}

.nav-button.nav-section {
  justify-content: flex-start;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  color: #888888;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-button.nav-section:hover {
  background: #f1f1f1;
  color: #52525b;
}

.nav-button.nav-section.is-active {
  background: #ececec;
  color: #1a1a1a;
}

.nav-button.nav-search {
  justify-content: flex-start;
  gap: 8px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  background: #ffffff;
  color: #a1a1aa;
  font-size: 13px;
  cursor: default;
  pointer-events: none;
}

.nav-button.nav-search:hover {
  background: #ffffff;
  color: #a1a1aa;
}

.task-groups {
  margin-top: 12px;
  padding-right: 0;
}

.computer-group {
  margin-bottom: 12px;
}

.computer-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  width: 100%;
  padding: 10px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f5f5f5;
  text-align: left;
}

.computer-card:hover {
  background: #f1f1f1;
}

.computer-card.is-selected {
  border-color: #e5e5e5;
  background: #f0f0f0;
}

.computer-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.computer-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.computer-card-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 600;
}

.computer-card-folder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: #737373;
  transition: color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
  opacity: 0.95;
}

.computer-card:hover .computer-card-folder,
.computer-card.is-selected .computer-card-folder {
  color: #1f2937;
}

.computer-card-folder.is-collapsed {
  transform: translateY(0.5px);
}

.computer-card-folder.is-expanded {
  color: #52525b;
}

.computer-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: #888888;
  font-size: 11px;
}

.computer-card-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
}

.computer-card-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
}

.computer-card-badge.is-admin {
  background: #dcfce7;
  color: #16a34a;
}

.computer-card-badge.is-ready {
  background: #eef2ff;
  color: #4f46e5;
}

.computer-card-badge.is-viewer,
.computer-card-badge.is-offline {
  background: #f0f0f0;
  color: #888888;
}

.computer-card-status,
.computer-card-platform {
  color: #888888;
}

.computer-task-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 4px;
  padding-left: 14px;
}

.computer-task-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  text-align: left;
}

.computer-task-item:hover,
.computer-task-item.is-active {
  background: #f5f5f5;
}

.computer-task-item.is-empty {
  cursor: default;
}

.computer-task-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 500;
}

.computer-task-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #888888;
  font-size: 11px;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #e4e4e7;
}

.account-card {
  gap: 10px;
  padding: 12px 0 0;
  border-radius: 0;
}

.account-card:hover {
  background: transparent;
}

.account-avatar {
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background-color: #2563eb;
  color: #ffffff;
  font-size: 12px;
}

.account-copy strong {
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 500;
}

.account-copy span {
  color: #888888;
  font-size: 11px;
}

.sidebar-footer .ghost-button {
  min-height: auto;
  padding: 0;
  background: transparent;
  color: #2563eb;
  font-size: 12px;
  font-weight: 500;
}

.sidebar-footer .ghost-button:hover {
  background: transparent;
  color: #1d4ed8;
}

.workspace-header {
  min-height: 56px;
  padding: 0 24px;
}

.workspace-copy {
  gap: 0;
}

.workspace-label {
  color: #1a1a1a;
  font-size: 16px;
  font-weight: 500;
}

.workspace-header-right {
  gap: 12px;
}

.machine-pill {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #dddddd;
  border-radius: 8px;
  background: #ffffff;
  color: #888888;
  font-size: 13px;
  font-weight: 400;
}

.machine-pill::after {
  content: "▾";
  margin-left: 8px;
  color: #a1a1aa;
  font-size: 10px;
}

.machine-pill.is-empty {
  color: #888888;
}

.machine-pill:hover {
  background: #fafafa;
}

#account-avatar-header {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50%;
  background-color: #e0e0e0;
  color: #666666;
  font-size: 12px;
  font-weight: 600;
}

.landing-state {
  align-items: stretch;
  justify-content: center;
  padding: 56px 40px 40px;
  background: #ffffff;
}

.landing-state::before {
  display: none;
}

.landing-copy {
  display: none;
}

.landing-shell {
  width: 100%;
  max-width: none;
  gap: 0;
}

.landing-cards {
  width: 100%;
  display: flex;
  justify-content: center;
}

.install-card {
  width: min(480px, 100%);
  padding: 0;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  text-align: center;
  backdrop-filter: none;
}

.install-card::before {
  display: none;
}

.install-card-header {
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  padding: 40px 40px 24px;
}

.install-card-badge {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border: 1px solid #eeeeee;
  border-radius: 14px;
  background: #f5f5f5;
  color: #1a1a1a;
  box-shadow: none;
}

.install-card-heading .section-label {
  display: none;
}

.install-card h3 {
  font-size: 22px;
  font-weight: 600;
}

.install-card-copy {
  margin: 0;
  padding: 0 40px 24px;
  color: #888888;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
}

.install-card-divider {
  height: 1px;
  background: #f0f0f0;
}

.install-method-grid {
  gap: 16px;
  margin-top: 0;
  padding: 24px 40px 20px;
}

.install-method-card {
  gap: 12px;
  padding: 18px;
  border: 1px solid #ececec;
  border-radius: 14px;
  background: #fafafa;
  text-align: left;
}

.install-method-kicker {
  color: #888888;
  font-size: 11px;
}

.install-method-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
}

.install-method-copy {
  color: #666666;
  font-size: 13px;
  line-height: 1.6;
}

.install-method-card .install-actions {
  margin: 0;
}

.install-method-card .install-platform-actions {
  padding: 0;
}

.install-method-card .install-platform-status {
  text-align: left;
}

.install-actions {
  margin: 0;
}

.install-platform-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 24px 40px 20px;
}

.install-action-slot {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.install-download-button {
  width: 100%;
  min-height: 48px;
  gap: 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
}

.install-download-button.primary-button {
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  background: #1a1a1a;
  box-shadow: none;
}

.install-download-button.primary-button:hover {
  background: #1a1a1a;
}

.install-download-button.secondary-button {
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  background: #ffffff;
  color: #555555;
}

.install-download-button.secondary-button:hover {
  background: #fafafa;
}

.install-download-button.is-disabled {
  background: #ffffff;
  color: #aaaaaa;
  opacity: 1;
}

.install-download-button[aria-busy="true"] {
  cursor: progress;
}

.install-copy-link-button {
  width: 100%;
  min-width: 0;
  gap: 10px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: none;
  font-size: 14px;
  font-weight: 500;
}

.install-copy-link-button:hover {
  background: #fafafa;
  border-color: #e5e5e5;
  box-shadow: none;
  transform: none;
}

.install-copy-link-button[aria-busy="true"] {
  opacity: 0.75;
}

.install-download-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(480px, calc(100vw - 32px));
  padding: 12px 16px;
  border: 1px solid rgba(28, 28, 28, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
  color: #1a1a1a;
  font-size: 13px;
  line-height: 1.45;
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}

.install-download-toast .spinner {
  flex-shrink: 0;
}

.install-platform-status {
  min-height: 0;
  margin: 0;
  color: #aaaaaa;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

.install-card-steps {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 16px 40px 20px;
}

.install-step {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #888888;
  font-size: 12px;
}

.install-step-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f0f0f0;
  color: #888888;
  font-size: 11px;
  font-weight: 500;
}

.install-step.is-active {
  color: #1a1a1a;
  font-weight: 500;
}

.install-step.is-active .install-step-dot {
  background: #1a1a1a;
  color: #ffffff;
}

.install-status {
  margin: 0;
  padding: 0 40px 20px;
  border-top: none;
  color: #888888;
  font-size: 12px;
  text-align: left;
}

@media (max-width: 960px) {
  .landing-state {
    padding: 24px;
  }

  .install-card {
    width: 100%;
  }

  .install-card-header,
  .install-card-copy,
  .install-method-grid,
  .install-platform-actions,
  .install-card-steps,
  .install-status {
    padding-left: 24px;
    padding-right: 24px;
  }

  .install-card-steps {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* Signed-out homepage (base — overridden by Concept-D block below) */

.auth-screen {
  position: relative;
  overflow: hidden;
  background: #faf9f7;
}

.auth-screen-shell {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
}

.auth-screen.is-single-panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: #ffffff;
}

.auth-screen.is-single-panel .auth-screen-shell {
  width: min(480px, 100%);
}

.auth-screen.is-single-panel .auth-card-wrap {
  position: static;
  inset: unset;
  display: block;
  padding: 0;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 1;
  pointer-events: all;
}

.auth-screen.is-single-panel .auth-card {
  transform: none;
  box-shadow: var(--shadow-lg);
}

.auth-screen.is-install-invite .auth-screen-shell {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: 40px 24px;
}

.auth-screen.is-install-invite .auth-card-wrap {
  display: none;
}

.public-home-copy {
  max-width: 680px;
}

.public-home-title {
  margin: 0;
  color: #1a1a1a;
}

.public-install-owner-callout {
  display: grid;
  gap: 6px;
  width: fit-content;
  max-width: min(100%, 520px);
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid rgba(190, 168, 141, 0.34);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(250, 247, 242, 0.98));
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.public-install-owner-label,
.public-install-owner-name,
.public-install-owner-detail {
  margin: 0;
}

.public-install-owner-label {
  color: #7b6a56;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.public-install-owner-name {
  color: #1a1a1a;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.public-install-owner-detail {
  max-width: 40ch;
  color: #555555;
  font-size: 14px;
  line-height: 1.5;
}

.public-home-subtitle {
  max-width: 56ch;
  margin: 18px 0 0;
  color: #666666;
  font-size: 16px;
  line-height: 1.65;
  text-wrap: balance;
}

/* auth-card-wrap: modal overlay styles are in the Concept-D block below */

.auth-card {
  width: 100%;
  padding: 38px 34px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.auth-card .auth-kicker {
  margin-bottom: 16px;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.auth-card h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.auth-card .auth-copy {
  max-width: 42ch;
}

#public-install-card {
  width: min(560px, 100%);
  margin: 0;
  text-align: left;
}

#public-install-card .install-card-header {
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  padding: 28px 28px 20px;
}

#public-install-card .install-card-heading .section-label {
  display: block;
}

#public-install-card .install-card-copy {
  padding: 0 28px 22px;
  text-align: left;
}

#public-install-card .install-platform-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 24px 28px 20px;
}

#public-install-card .install-platform-status,
#public-install-card .install-status {
  text-align: left;
}

#public-install-card .install-card-steps {
  justify-content: flex-start;
  gap: 12px;
  padding: 16px 28px 22px;
}

#public-install-card .install-status {
  padding: 0 28px 24px;
}

@media (max-width: 960px) {
  .auth-screen {
    padding: 24px;
  }

  .auth-screen-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    width: min(720px, 100%);
  }

  .auth-card-wrap {
    width: 100%;
    justify-self: stretch;
  }

  #public-install-card {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .auth-screen {
    padding: 18px;
  }

  .public-home-title {
    font-size: clamp(2.1rem, 12vw, 3.2rem);
  }

  .public-install-owner-callout {
    padding: 14px 16px;
  }

  .public-home-subtitle {
    font-size: 15px;
  }

  .auth-card {
    padding: 28px 22px;
  }

  #public-install-card .install-card-header,
  #public-install-card .install-card-copy,
  #public-install-card .install-platform-actions,
  #public-install-card .install-card-steps,
  #public-install-card .install-status {
    padding-left: 22px;
    padding-right: 22px;
  }

  .install-method-grid {
    padding-left: 22px;
    padding-right: 22px;
  }

  #public-install-card .install-platform-actions {
    grid-template-columns: 1fr;
  }

  #public-install-card .install-card-steps {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Concept-D: Prompt-first centered layout ── */

.auth-screen {
  position: relative;
  overflow: hidden;
  background: #faf9f7;
}

.auth-screen::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  background: radial-gradient(ellipse 70% 55% at 50% 48%, rgba(190, 168, 141, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.auth-screen-shell {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
}

.public-home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.public-home.is-access-approval-route {
  justify-content: center;
}

/* ── Fixed nav ── */

.public-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 56px;
}

.public-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.public-nav-brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #1a1a1a;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.public-nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.public-nav-guest-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.public-nav-account {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.public-nav-account-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}

.public-nav-account-copy strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.public-nav-account-copy span {
  color: var(--text-soft);
  font-size: 11px;
}

.public-nav-actions .nav-link {
  padding: 7px 14px;
  border: none;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}

.public-nav-actions .nav-link:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

.public-nav-actions .nav-btn {
  padding: 7px 16px;
  border: 1.5px solid var(--border-strong);
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.15s, border-color 0.15s;
}

.public-nav-actions .nav-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* ── Centered main content ── */

.public-preview-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 40px;
}

.public-home-copy {
  max-width: 640px;
  text-align: center;
}

/* ── Eyebrow ── */

.public-home-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 28px;
  color: #aaaaaa;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  border: none;
  background: none;
  backdrop-filter: none;
  padding: 0;
  min-height: auto;
}

.public-home-kicker::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Headline ── */

.public-home-title {
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  text-align: center;
  color: var(--text);
  margin-bottom: 14px;
}

.public-home-title em {
  font-style: normal;
  color: var(--text-soft);
  font-weight: 400;
}

.public-home-subtitle {
  max-width: 440px;
  margin: 0 auto 44px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-soft);
  text-align: center;
  font-weight: 400;
}

/* ── Prompt box ── */

.public-preview-panel {
  width: min(680px, 100%);
}

.public-preview-card {
  width: 100%;
  border: 1.5px solid var(--border-strong);
  border-radius: 20px;
  background: #ffffff;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.07),
    0 1px 4px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.public-preview-card:focus-within {
  border-color: rgba(0, 0, 0, 0.28);
  box-shadow:
    0 0 0 4px rgba(0, 0, 0, 0.06),
    0 8px 32px rgba(0, 0, 0, 0.10),
    0 1px 4px rgba(0, 0, 0, 0.04);
}

.public-preview-target-row {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--border);
}

.public-preview-target-label {
  font-size: 11px;
  font-weight: 500;
  color: #aaaaaa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 10px;
  flex-shrink: 0;
}

.public-preview-target-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.public-preview-target-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
  border: 1.5px solid transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  user-select: none;
}

.public-preview-target-chip:not(.is-selected):hover {
  background: rgba(0, 0, 0, 0.08);
}

.public-preview-target-chip.is-selected {
  background: var(--text);
  color: #ffffff;
  border-color: var(--text);
}

.public-preview-target-chip.is-add {
  background: transparent;
  border-color: rgba(0, 0, 0, 0.12);
  color: #9c9c9c;
  border-style: dashed;
}

.public-preview-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d6d6d6;
}

.public-preview-chip-dot.is-online {
  background: var(--accent-green);
}

/* ── Messages area (collapses when empty) ── */

.public-preview-messages {
  min-height: 0;
  max-height: 360px;
  overflow: auto;
  padding: 0;
}

.public-preview-messages:not(:empty) {
  min-height: 80px;
  padding: 18px 18px 0;
}

.public-preview-message {
  margin-bottom: 14px;
}

.public-preview-message-role {
  margin-bottom: 6px;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.public-preview-message-bubble {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
}

.public-preview-message.is-assistant .public-preview-message-bubble {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* ── Textarea ── */

.public-preview-form {
  padding: 16px 18px 12px;
}

#public-preview-input {
  min-height: 72px;
  max-height: 200px;
  padding: 10px;
  border: none;
  background: transparent;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  overflow-y: auto;
}

#public-preview-input::placeholder {
  color: #aaaaaa;
}

/* ── Bottom bar with hints + send ── */

.public-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
}

.public-prompt-hints {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.public-hint-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-soft);
  cursor: pointer;
  border: none;
  font: inherit;
  font-size: 12px;
  transition: background 0.15s, color 0.15s;
}

.public-hint-chip:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text);
}

.public-hint-chip svg {
  color: #aaaaaa;
  flex-shrink: 0;
}

/* ── Send button ── */

.public-preview-send {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: var(--text);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, opacity 0.15s;
  opacity: 0.35;
}

.public-preview-send.is-active {
  opacity: 1;
}

.public-preview-send.is-active:hover {
  background: #333333;
  transform: scale(1.05);
}

.public-preview-send:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

/* ── Status / CTA ── */

.public-preview-status,
.public-preview-gate-copy {
  margin: 14px 0 0;
  text-align: center;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.6;
}

.public-preview-status.is-error {
  color: var(--danger);
}

.public-preview-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.public-preview-inline-link {
  min-height: 44px;
  padding: 0 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Auth nudge ── */

.public-auth-nudge {
  margin-top: 20px;
  font-size: 13px;
  color: #aaaaaa;
  text-align: center;
}

.public-auth-nudge button {
  color: var(--text-soft);
  font: inherit;
  font-size: 13px;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
  transition: color 0.15s;
}

.public-auth-nudge button:hover {
  color: var(--text);
}

/* ── Recent tasks ── */

.public-recent-tasks {
  width: min(680px, 100%);
  margin-top: 48px;
}

.public-recent-label {
  font-size: 11px;
  font-weight: 500;
  color: #aaaaaa;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  padding-left: 2px;
}

.public-recent-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.public-recent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  text-decoration: none;
  color: inherit;
}

.public-recent-item:hover {
  border-color: var(--border-strong);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.public-recent-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  flex-shrink: 0;
}

.public-recent-copy {
  flex: 1;
  min-width: 0;
}

.public-recent-copy h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.public-recent-meta {
  font-size: 11px;
  color: #aaaaaa;
  display: flex;
  align-items: center;
  gap: 6px;
}

.public-recent-meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #aaaaaa;
}

.public-recent-device {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #aaaaaa;
  flex-shrink: 0;
}

.public-recent-device.is-online::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-green);
}

.public-recent-arrow {
  color: #aaaaaa;
  flex-shrink: 0;
  transition: transform 0.15s, color 0.15s;
}

.public-recent-item:hover .public-recent-arrow {
  transform: translateX(2px);
  color: var(--text-soft);
}

/* ── Auth modal overlay ── */

.auth-card-wrap {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.auth-card-wrap.is-modal-open {
  opacity: 1;
  pointer-events: all;
}

.auth-card-wrap.is-hidden-on-home {
  opacity: 0;
  pointer-events: none;
}

.auth-card {
  position: relative;
  width: min(420px, 100%);
  padding: 40px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.18), 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-card-wrap.is-modal-open .auth-card {
  transform: translateY(0) scale(1);
}

.public-auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  transition: background 0.15s;
  min-width: auto;
  min-height: auto;
}

.public-auth-close:hover {
  background: rgba(0, 0, 0, 0.1);
}

/* ── Entrance animations ── */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.public-home-kicker { animation: fadeInUp 0.4s ease both; }
.public-home-title { animation: fadeInUp 0.5s ease both; }
.public-home-subtitle { animation: fadeInUp 0.5s ease both; animation-delay: 0.08s; }
.public-preview-card { animation: fadeInUp 0.5s ease both; animation-delay: 0.15s; }
.public-auth-nudge { animation: fadeInUp 0.5s ease both; animation-delay: 0.25s; }
.public-recent-tasks { animation: fadeInUp 0.5s ease both; animation-delay: 0.3s; }

@media (max-width: 720px) {
  .public-nav {
    padding: 0 18px;
  }

  .public-preview-shell {
    padding: 64px 18px 32px;
  }

  .public-home-title {
    font-size: clamp(1.8rem, 10vw, 2.6rem);
  }

  .public-preview-footer {
    flex-wrap: wrap;
  }

  .public-prompt-hints {
    width: 100%;
  }

  .public-preview-send {
    margin-left: auto;
  }

  .public-recent-item {
    flex-wrap: wrap;
  }

  .public-recent-device {
    width: 100%;
    padding-left: 44px;
  }

  .public-recent-arrow {
    display: none;
  }
}

/* ── Control toggle ─────────────────────────────────────────────────────────── */

.arm-toggle-wrap {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-height: 40px;
  padding: 0 12px 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(27, 31, 35, 0.14);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.arm-toggle-wrap.is-pending {
  border-color: rgba(147, 180, 255, 0.7);
  background: rgba(241, 246, 255, 0.95);
}

.arm-toggle-wrap.is-control {
  border-color: rgba(151, 224, 180, 0.9);
  background: rgba(237, 250, 241, 0.96);
}

.arm-toggle-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #666b73;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  white-space: nowrap;
  transition: color 0.2s;
  user-select: none;
}

.arm-toggle-label.is-control {
  color: #16a34a;
}

.arm-toggle-label.is-pending {
  color: #2e5fe2;
}

.arm-toggle {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #d8dadd;
  border: none;
  padding: 0;
  transition: background 0.2s;
  flex-shrink: 0;
  pointer-events: none;
}

.arm-toggle-wrap:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.arm-toggle.is-control {
  background: #16a34a;
}

.arm-toggle.is-pending {
  background: #9ab7ff;
}

.arm-toggle-wrap:disabled {
  opacity: 1;
  cursor: not-allowed;
}

.arm-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.18s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}

.arm-toggle.is-control::after {
  transform: translateX(16px);
}

.arm-toggle.is-pending::after {
  transform: translateX(8px);
  animation: arm-pulse 1.4s ease-in-out infinite;
}

@keyframes arm-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}

.arm-pending-hint {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 28px;
  margin-top: 20px;
  border-radius: 24px;
  background: #eff4ff;
  border: 1.5px solid rgba(147, 180, 255, 0.7);
  font-size: 17px;
  color: #2854d6;
  line-height: 1.45;
}

.arm-pending-hint svg {
  flex-shrink: 0;
  color: #2854d6;
}

.arm-pending-hint-cancel {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 17px;
  font-weight: 500;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.arm-pending-hint-cancel:hover {
  color: #1e3fa6;
}

.arm-status-hint {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 0 0;
  margin-top: 8px;
  border-radius: 0;
  font-size: 17px;
  line-height: 1.45;
}

.arm-status-hint.is-approved {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.arm-status-hint.is-denied {
  background: transparent;
  border: none;
  color: #686d74;
}

.arm-status-hint-dismiss {
  flex-shrink: 0;
  font-size: 17px;
  font-weight: 500;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.arm-status-hint-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(27, 31, 35, 0.16);
  background: linear-gradient(180deg, #f5f5f3 0%, #eceae7 100%);
  color: #5e7498;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.arm-status-hint-dismiss:hover {
  opacity: 1;
}

.arm-request-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #fffbeb;
  border: 1px solid #fde68a;
  margin-top: 10px;
}

.arm-request-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.arm-request-item-meta {
  font-size: 12px;
  color: var(--text-soft);
}

.arm-request-item-actions {
  display: flex;
  gap: 8px;
}

.arm-request-approve-btn {
  flex: 1;
  min-height: 32px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.arm-request-approve-btn:hover {
  opacity: 0.85;
}

.arm-request-deny-btn {
  flex: 1;
  min-height: 32px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-soft);
  border: 1px solid var(--border-strong);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.arm-request-deny-btn:hover {
  background: var(--bg-muted);
}

body {
  background: #f4efe7;
}

.app-shell {
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.85), transparent 34%),
    linear-gradient(180deg, #f8f4ed 0%, #f3eee6 100%);
}

/* Sidebar: overlay slide-out, no hover-expand */
.sidebar {
  background: rgba(255, 255, 255, 0.96);
  border-right: 1px solid rgba(34, 34, 34, 0.08);
  backdrop-filter: blur(18px);
}

.sidebar-rail {
  background: rgba(255, 255, 255, 0.72);
  border-right: 1px solid rgba(34, 34, 34, 0.08);
}

/* Workspace header: three-zone layout */
.workspace-header {
  position: relative;
  background: transparent;
  border-bottom: none;
  padding: 16px 24px;
  min-height: 56px;
}

.workspace-header-left {
  flex-shrink: 0;
}

.workspace-brand {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 0;
}

.workspace-header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  max-width: 60%;
  text-align: center;
}

.workspace-title {
  display: block;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-soft);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.workspace-header-right {
  flex-shrink: 0;
  gap: 12px;
}

.install-chip-calm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid rgba(28, 28, 28, 0.1);
  background: transparent;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.install-chip-calm:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.install-chip-calm.is-disabled,
.install-chip-calm[aria-disabled="true"],
.public-preview-cta a.is-disabled,
.public-preview-cta a[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.58;
}

.install-chip-calm[aria-busy="true"],
.public-preview-cta a[aria-busy="true"] {
  cursor: progress;
}

.landing-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 140px);
}

.landing-shell {
  width: min(760px, calc(100vw - 160px));
}

.landing-copy {
  text-align: left;
  margin-bottom: 20px;
}

.landing-kicker {
  display: none;
}

.landing-title {
  font-size: clamp(48px, 6vw, 70px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  margin: 0 0 12px;
}

.landing-subtitle {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: rgba(32, 33, 36, 0.64);
  max-width: 720px;
}

/* App shell composer: floating at bottom, reusing hp-composer styles */
.app-shell .composer-panel {
  position: sticky;
  bottom: 0;
  max-width: 848px;
  margin: 0 auto;
  padding: 0 24px 24px;
  background: transparent;
  border-top: none;
  z-index: 10;
  width: 100%;
}

.app-composer {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}

.app-shell #message-input {
  min-height: auto;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: normal;
  padding: 10px;
  background: transparent;
}

.workspace.is-guest-preview .app-composer {
  max-width: 848px;
}

.workspace.is-guest-preview #message-input {
  min-height: 72px;
  padding: 14px 14px 10px;
}

/* Thread scroll: space for floating composer */
.thread-scroll {
  padding-bottom: 120px;
}

.composer-hint {
  display: none;
}

.composer-footer {
  align-items: center;
}

.suggestion-row {
  margin-top: 18px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.suggestion-chip {
  border-radius: 999px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(28,28,28,0.1);
}

.send-button {
  width: 56px;
  height: 56px;
  min-height: 56px;
  border-radius: 18px;
  padding: 0;
  background: #191919;
}

.chat-messages {
  width: min(860px, calc(100vw - 220px));
  margin: 0 auto;
}

@media (max-width: 960px) {
  .landing-shell,
  .chat-messages {
    width: min(100%, calc(100vw - 32px));
  }

  .landing-title {
    font-size: 40px;
  }

  .landing-subtitle {
    font-size: 22px;
  }
}

/* ════════════════════════════════════════════════
   Homepage (hp-*) — new clean landing layout
   ════════════════════════════════════════════════ */

.public-home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-hero, #faf7f2);
}

.hp-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Sidebar strip */
.hp-sidebar-strip {
  width: 56px;
  min-width: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-right: 1px solid var(--border);
  background: var(--bg-panel, #fff);
}

.hp-sidebar-top,
.hp-sidebar-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hp-sidebar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

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

/* Main content area */
.hp-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Nav bar */
.hp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  flex-shrink: 0;
}

.hp-brand {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.03em;
}

.hp-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hp-signin-button {
  padding: 8px 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.hp-signin-button:hover {
  background: var(--bg-muted);
  border-color: var(--text-soft);
}

/* Centered content */
.hp-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 24px 48px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.hp-hero {
  text-align: left;
  margin-bottom: 20px;
  max-width: 800px;
  width: 100%;
  padding-left: 10px;
}

.auth-screen:not(.is-install-invite) .hp-hero {
  display: flex;
  align-items: baseline;
  gap: 0.45ch;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.auth-screen:not(.is-install-invite) .hp-hero::-webkit-scrollbar {
  display: none;
}

.hp-title {
  margin: 0 0 10px;
  font-size: 38px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.hp-subtitle {
  margin: 0;
  font-size: 16px;
  color: var(--text-soft);
  line-height: 1.5;
}

.auth-screen:not(.is-install-invite) .hp-title,
.auth-screen:not(.is-install-invite) .hp-subtitle {
  margin: 0;
  flex: 0 0 auto;
  font-size: 28px;
  line-height: 1.35;
  color: var(--text);
}

.auth-screen:not(.is-install-invite) .hp-subtitle {
  font-weight: 400;
}

/* Composer card */
.hp-composer {
  width: 100%;
  max-width: 800px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
}

.app-shell .app-composer {
  overflow: visible;
}

.hp-composer-form {
  display: flex;
  flex-direction: column;
}

.hp-composer-input {
  width: 100%;
  padding: 14px 14px;
  border: none;
  outline: none;
  resize: none;
  font-size: 15px;
  color: var(--text);
  background: transparent;
  line-height: 1.5;
}

.hp-composer-input::placeholder {
  color: var(--text-faint);
}

.hp-composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px 8px;
}

.hp-composer-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hp-composer-add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.hp-composer-add:hover {
  background: var(--bg-muted);
  color: var(--text-soft);
}

.hp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-panel);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.composer-target-anchor {
  position: relative;
}

.composer-target-caret {
  margin-left: 2px;
  font-size: 10px;
  line-height: 1;
  opacity: 0.7;
  transition: transform 0.15s ease;
}

#composer-target-button[aria-expanded="true"] .composer-target-caret {
  transform: rotate(180deg);
}

.composer-target-menu {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  z-index: 30;
  display: grid;
  gap: 4px;
  min-width: 240px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

.composer-target-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.composer-target-menu-item:hover {
  background: var(--bg-muted);
}

.composer-target-menu-item.is-selected {
  background: rgba(17, 24, 39, 0.06);
}

.composer-target-menu-item.is-selected .composer-target-menu-meta {
  color: var(--text);
}

.composer-target-menu-item.is-install {
  margin-top: 0;
  padding-top: 0;
}

.composer-target-menu-item.is-disabled,
.composer-target-menu-item:disabled {
  color: var(--text-faint);
  cursor: not-allowed;
}

.composer-target-menu-item.is-disabled:hover,
.composer-target-menu-item:disabled:hover {
  background: transparent;
}

.composer-target-menu-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.composer-target-menu-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-target-menu-meta {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-soft);
}

.composer-target-menu-item.is-disabled .composer-target-menu-meta,
.composer-target-menu-item:disabled .composer-target-menu-meta {
  color: var(--text-faint);
}

.composer-target-menu-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #c8ccd2;
  flex-shrink: 0;
}

.composer-target-menu-dot.is-online {
  background: #34c759;
}

.composer-target-menu-dot.is-offline {
  background: #9ca3af;
}

.hp-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  flex-shrink: 0;
}

.hp-send-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: var(--text);
  color: #fff;
  cursor: pointer;
  transition: opacity 0.15s;
}

.hp-send-button:hover {
  opacity: 0.85;
}

/* Action chips */
.hp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 800px;
}

.hp-action-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-panel);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.hp-action-chip:hover {
  background: var(--bg-muted);
  border-color: var(--border-strong);
  color: var(--text);
}

.hp-action-chip svg {
  flex-shrink: 0;
  opacity: 0.5;
}

/* Override old auth-screen styles when new homepage is active */
.auth-screen:has(.hp-layout) {
  padding: 0;
  display: block;
  background: var(--bg-hero, #faf7f2);
}

.auth-screen:has(.hp-layout)::before {
  display: none;
}

.auth-screen:has(.hp-layout) .auth-screen-shell {
  display: block;
  width: 100%;
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .hp-sidebar-strip {
    display: none;
  }

  .hp-nav {
    padding: 12px 16px;
  }

  .hp-content {
    padding: 0 16px 32px;
  }

  .hp-title {
    font-size: 28px;
  }

  .hp-composer {
    max-width: 100%;
  }

  .hp-actions {
    max-width: 100%;
  }
}

/* Final sidebar shell layout */

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

.sidebar-shell {
  width: 56px;
  min-width: 56px;
  height: 100vh;
  display: block;
  overflow: visible;
  border-right: 1px solid rgba(34, 34, 34, 0.08);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
  transition: width 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
  position: relative;
  z-index: 20;
}

.app-shell.is-sidebar-open .sidebar-shell {
  width: 320px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 12px 0 40px rgba(15, 23, 42, 0.08);
}

.sidebar-rail {
  position: absolute;
  inset: 0 auto 0 0;
  width: 56px;
  min-width: 0;
  height: 100%;
  border-right: none;
  background: transparent;
  z-index: 2;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.app-shell.is-sidebar-open .sidebar-rail {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-10px);
}

.sidebar {
  position: absolute;
  inset: 0;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 20px 16px 16px;
  border-right: none;
  background: transparent;
  backdrop-filter: none;
  transform: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.16s ease;
}

.sidebar.is-open {
  transform: none;
}

.app-shell.is-sidebar-open .sidebar {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

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

.brand-lockup {
  gap: 0;
}

.brand-lockup .brand-kicker {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.sidebar-close {
  display: inline-flex;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.app-shell.is-sidebar-open .sidebar-close {
  opacity: 1;
  pointer-events: auto;
}

.new-task-button {
  justify-content: flex-start;
  min-height: 40px;
  margin-top: 8px;
  padding: 0 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(15, 23, 42, 0.82);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

#nav-computers-button,
#nav-feedback-button {
  color: rgba(15, 23, 42, 0.82);
}

.new-task-button svg {
  flex-shrink: 0;
  color: inherit;
}

.new-task-button:hover {
  background: rgba(15, 23, 42, 0.05);
  color: rgba(15, 23, 42, 0.88);
}

#nav-computers-button:hover,
#nav-feedback-button:hover {
  color: rgba(15, 23, 42, 0.88);
}

.new-task-button:active {
  background: rgba(15, 23, 42, 0.08);
}

.nav-row {
  gap: 4px;
  margin-top: 4px;
}

.nav-button.nav-section,
.nav-button.nav-search {
  justify-content: flex-start;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: none;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
}

.nav-button.nav-section:hover {
  background: rgba(15, 23, 42, 0.05);
  color: var(--text);
}

.nav-button.nav-section.is-active {
  background: rgba(15, 23, 42, 0.08);
  color: rgba(15, 23, 42, 0.82);
  font-weight: 700;
}

.nav-button.nav-search {
  color: rgba(15, 23, 42, 0.42);
  cursor: not-allowed;
  opacity: 1;
  pointer-events: none;
}

.task-groups {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  padding-right: 0;
}

.sidebar .computer-history-item,
.sidebar .computer-history-empty {
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
}

.sidebar .computer-history-item:hover {
  background: rgba(15, 23, 42, 0.05);
}

.sidebar .computer-history-item.is-active {
  border-color: transparent;
  background: rgba(15, 23, 42, 0.08);
  color: rgba(15, 23, 42, 0.82);
}

.sidebar .computer-history-title {
  font-size: 13px;
}

.sidebar .computer-history-item.is-active .computer-history-title {
  color: rgba(15, 23, 42, 0.82);
  font-weight: 700;
}

.sidebar .computer-history-item.is-active .computer-history-meta {
  color: rgba(15, 23, 42, 0.58);
}

.sidebar .computer-history-meta {
  font-size: 11px;
}

.sidebar .computer-history-action {
  display: none;
}

.sidebar-history-empty {
  background: rgba(255, 255, 255, 0.42);
}

.sidebar-footer {
  padding-top: 14px;
  border-top: 1px solid rgba(34, 34, 34, 0.08);
}

.account-card {
  padding: 12px 0 0;
  border-radius: 0;
  background: transparent;
}

.account-card:hover {
  background: transparent;
}

.account-avatar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.account-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: #e5e7eb;
  color: var(--text);
}

.rail-avatar,
.account-avatar {
  position: relative;
  overflow: hidden;
}

.rail-avatar.is-active,
.account-avatar-button:hover,
.account-avatar-button:focus-visible,
.account-avatar-button.is-active {
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.12);
}

.account-avatar-button:hover,
.account-avatar-button.is-active {
  transform: translateY(-1px);
}

.account-avatar-button:focus-visible {
  outline: none;
}

.avatar-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.avatar-fallback {
  line-height: 1;
}

.workspace {
  min-width: 0;
}

.landing-shell {
  width: min(760px, calc(100% - 48px));
}

.chat-messages {
  width: min(860px, 100%);
  max-width: 860px;
}

.thread-scroll {
  padding-inline: 24px;
}

.sidebar-backdrop {
  grid-column: 1 / -1;
}

@supports (height: 100dvh) {
  .sidebar-shell {
    height: 100dvh;
  }
}

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

  .sidebar-shell {
    width: 56px;
    min-width: 56px;
    overflow: visible;
    border-right: none;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
  }

  .app-shell.is-sidebar-open .sidebar-shell {
    width: 56px;
    background: transparent;
    box-shadow: none;
  }

  .sidebar-rail {
    position: relative;
    inset: auto;
    height: 100vh;
    background: rgba(255, 255, 255, 0.72);
    border-right: 1px solid rgba(34, 34, 34, 0.08);
  }

  .app-shell.is-sidebar-open .sidebar-rail {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .sidebar {
    position: fixed;
    left: 56px;
    top: 0;
    bottom: 0;
    width: min(300px, calc(100vw - 56px));
    min-width: 0;
    height: auto;
    padding: 16px;
    border-right: 1px solid rgba(34, 34, 34, 0.08);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
    transform: translateX(-100%);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 40;
    transition: transform 0.2s ease;
  }

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

  .sidebar-close {
    display: inline-flex;
    opacity: 1;
    pointer-events: auto;
  }

  .thread-scroll {
    padding-inline: 16px;
  }

  .chat-messages {
    width: min(100%, calc(100vw - 32px));
  }
}
