:root {
  --ink: #edf2ee;
  --ink-2: #cbd5cf;
  --ink-3: #a8b7b0;
  --paper: #0f1412;
  --paper-2: #242d29;
  --line: #33403b;
  --muted: #a2ada6;
  --muted-2: #75837c;
  --teal: #69b9a7;
  --teal-deep: #3d8d7d;
  --coral: #c98274;
  --sand: #c6ad67;
  --success: #79b88a;
  --danger: #dc776e;
  --white: #19211f;
  --night: #0b100e;
  --night-2: #141b18;
  --shadow: 0 14px 34px rgb(0 0 0 / 28%);
  --font-sans: "Segoe UI Variable", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
  --font-mono: "Cascadia Mono", Consolas, "Microsoft YaHei", monospace;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--paper); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
i[data-lucide] {
  display: inline-grid;
  width: 1em;
  height: 1em;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 1em;
  font-style: normal;
  font-weight: 500;
  line-height: 1;
}
i[data-lucide="layout-dashboard"]::before { content: "▦"; }
i[data-lucide="check-square"]::before { content: "☑"; }
i[data-lucide="folder-kanban"]::before { content: "▤"; }
i[data-lucide="book-open"]::before { content: "▱"; }
i[data-lucide="workflow"]::before { content: "↝"; }
i[data-lucide="menu"]::before { content: "≡"; }
i[data-lucide="chevrons-up-down"]::before { content: "↕"; }
i[data-lucide="search"]::before { content: "⌕"; }
i[data-lucide="notebook-pen"]::before { content: "✎"; }
i[data-lucide="bell"]::before { content: "◌"; }
i[data-lucide="sliders-horizontal"]::before { content: "≡"; }
i[data-lucide="play"]::before { content: "▶"; }
i[data-lucide="pause"]::before { content: "Ⅱ"; }
i[data-lucide="rotate-ccw"]::before { content: "↺"; }
i[data-lucide="trending-up"]::before { content: "↗"; }
i[data-lucide="arrow-up-right"]::before { content: "↗"; }
i[data-lucide="arrow-right"]::before { content: "→"; }
i[data-lucide="arrow-up"]::before { content: "↑"; }
i[data-lucide="plus"]::before { content: "+"; }
i[data-lucide="list-filter"]::before { content: "≡"; }
i[data-lucide="sparkles"]::before { content: "✦"; }
i[data-lucide="shield-check"]::before { content: "◇"; }
i[data-lucide="settings-2"]::before { content: "⊙"; }
i[data-lucide="folder-plus"]::before { content: "⊞"; }
i[data-lucide="x"]::before { content: "×"; }
i[data-lucide="check"]::before { content: "✓"; }
i[data-lucide="more-horizontal"]::before { content: "•••"; }
i[data-lucide="sun"]::before { content: "◉"; }
i[data-lucide="archive"]::before { content: "▣"; }
i[data-lucide="calendar-check"]::before { content: "▤"; }
i[data-lucide="zap"]::before { content: "ϟ"; }
i[data-lucide="inbox"]::before { content: "⌑"; }
i[data-lucide="file-text"]::before { content: "▧"; }
i[data-lucide="lightbulb"]::before { content: "◍"; }
i[data-lucide="sticky-note"]::before { content: "□"; }
i[data-lucide="link"]::before { content: "↗"; }
i[data-lucide="download"]::before { content: "↓"; }
i[data-lucide="pencil"]::before { content: "✎"; }
i[data-lucide="trash-2"]::before { content: "×"; }
i[data-lucide="save"]::before { content: "✓"; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgb(104 201 180 / 45%);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex: 0 0 234px;
  flex-direction: column;
  height: 100vh;
  padding: 20px 14px 14px;
  color: #e8ede8;
  background: var(--night);
  border-right: 1px solid rgb(255 255 255 / 8%);
  z-index: 10;
}

.brand-row { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 19px; font-weight: 800; letter-spacing: 0; text-decoration: none; }
.brand-mark { display: block; width: 29px; height: 29px; object-fit: cover; background: var(--teal); border: 1px solid rgb(255 255 255 / 20%); border-radius: 7px; }
.mobile-nav-button { display: none; }

.nav-list { display: grid; gap: 4px; margin-top: 42px; }
.nav-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 42px;
  gap: 11px;
  padding: 0 11px;
  color: #aeb8b0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  text-align: left;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.nav-item svg { width: 18px; height: 18px; stroke-width: 1.8; }
.nav-item:hover { color: var(--ink); background: rgb(255 255 255 / 6%); }
.nav-item.is-active { color: var(--ink); background: rgb(255 255 255 / 11%); border-color: rgb(255 255 255 / 8%); }
.nav-item kbd, .command-button kbd, .command-search kbd {
  color: #9da7a0;
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
}
.nav-count { display: grid; min-width: 20px; height: 20px; place-items: center; color: #101614; background: var(--sand); border-radius: 5px; font-family: var(--font-mono); font-size: 10px; font-weight: 500; }
.sidebar-spacer { flex: 1; }

.mini-team { display: flex; align-items: center; min-height: 36px; gap: 8px; padding: 0 10px; color: #9da7a0; font-size: 11px; }
.mini-team-avatars { display: flex; }
.mini-team-avatars .avatar { width: 18px; height: 18px; margin-left: -4px; border: 1px solid var(--ink); font-size: 8px; }
.mini-team-avatars .avatar:first-child { margin-left: 0; }
.status-dot { display: inline-block; width: 7px; height: 7px; flex: none; background: var(--teal); border-radius: 50%; box-shadow: 0 0 0 3px rgb(104 201 180 / 15%); }
.mini-team .status-dot { margin-left: auto; }

.profile-button { display: grid; grid-template-columns: 32px minmax(0, 1fr) 17px; align-items: center; min-height: 54px; gap: 9px; padding: 6px 8px; color: var(--ink); background: rgb(255 255 255 / 5%); border: 1px solid rgb(255 255 255 / 8%); border-radius: 7px; text-align: left; }
.profile-button:hover { background: rgb(255 255 255 / 9%); }
.profile-button svg { width: 15px; color: #aeb8b0; }
.profile-copy { display: grid; min-width: 0; }
.profile-copy strong, .profile-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy strong { font-size: 12px; font-weight: 700; }
.profile-copy small { color: #9da7a0; font-size: 10px; }

.workspace { width: min(100%, 1660px); min-width: 0; padding: 0 32px 50px; margin: 0 auto; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 118px; gap: 24px; border-bottom: 1px solid var(--line); }
.page-context { min-width: 0; }
.eyebrow, .section-label { display: inline-flex; align-items: center; min-height: 18px; color: var(--muted); font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0; text-transform: uppercase; }
.page-context h1 { max-width: 720px; margin: 3px 0 0; color: var(--ink); font-size: clamp(20px, 2vw, 28px); font-weight: 800; letter-spacing: 0; line-height: 1.28; }
.topbar-actions { display: flex; align-items: center; flex: none; gap: 8px; }

.command-button { display: grid; grid-template-columns: 16px minmax(130px, 1fr) auto; align-items: center; width: min(292px, 26vw); min-height: 38px; gap: 8px; padding: 0 10px; color: var(--muted); background: var(--white); border: 1px solid var(--line); border-radius: 6px; text-align: left; }
.command-button:hover { color: var(--ink); border-color: #53645d; }
.command-button svg { width: 16px; height: 16px; }
.command-button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.command-button kbd { padding: 2px 4px; color: #8e9791; background: var(--paper-2); border-radius: 3px; }
.install-button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; gap: 6px; padding: 0 11px; color: #101614; background: var(--teal); border: 1px solid var(--teal); border-radius: 6px; font-size: 12px; font-weight: 700; transition: background .16s ease, border-color .16s ease; }
.install-button:hover, .install-button.is-ready { background: #82d7c4; border-color: #82d7c4; }
.install-button svg { width: 15px; height: 15px; }

.icon-button { display: inline-grid; width: 38px; height: 38px; flex: none; place-items: center; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 6px; transition: background .16s ease, border-color .16s ease, color .16s ease; }
.icon-button:hover { background: var(--paper-2); border-color: #53645d; }
.icon-button svg { width: 17px; height: 17px; stroke-width: 1.8; }
.icon-button-muted { color: var(--muted); }
.icon-button-outline { background: transparent; }
.icon-button-dark { color: #e5eee8; background: rgb(255 255 255 / 7%); border-color: rgb(255 255 255 / 11%); }
.icon-button-dark:hover { background: rgb(255 255 255 / 13%); border-color: rgb(255 255 255 / 18%); }
.mobile-nav-trigger { display: none; }
.has-notification { position: relative; }
.has-notification::after { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; content: ""; background: var(--coral); border: 1px solid var(--white); border-radius: 50%; }

[data-tooltip] { position: relative; }
[data-tooltip]::after { position: absolute; right: 0; bottom: calc(100% + 7px); z-index: 20; width: max-content; max-width: 180px; padding: 5px 7px; color: var(--ink); background: #26312d; border-radius: 4px; box-shadow: 0 6px 16px rgb(0 0 0 / 28%); content: attr(data-tooltip); font-size: 10px; opacity: 0; pointer-events: none; transform: translateY(3px); transition: opacity .15s ease, transform .15s ease; }
[data-tooltip]:hover::after { opacity: 1; transform: translateY(0); }

.dashboard-view { display: none; padding-top: 28px; }
.dashboard-view.is-visible, .empty-view.is-visible { display: block; }
.empty-view { display: none; padding-top: 36px; }

.summary-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 35px; }
.panel-dark, .panel-light, .panel-sand { position: relative; overflow: hidden; border-radius: 8px; }
.section-label-light { color: #bdc9c0; }
.section-label-light .status-dot { margin-right: 7px; }
.text-button { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; gap: 6px; padding: 0; color: var(--ink); background: transparent; border: 0; font-size: 12px; font-weight: 700; white-space: nowrap; }
.text-button:hover { color: var(--teal-deep); }
.text-button svg { width: 15px; height: 15px; }

.panel-light { display: flex; flex-direction: column; min-height: 306px; padding: 21px; background: var(--white); border: 1px solid var(--line); }
.panel-sand { display: flex; flex-direction: column; min-height: 260px; padding: 21px; background: #26261f; border: 1px solid #444233; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.panel-heading h2, .section-header h2, .copilot-header h2 { margin: 3px 0 0; color: var(--ink); font-size: 17px; font-weight: 800; letter-spacing: 0; line-height: 1.25; }
.task-priority { display: block; width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; }
.priority-coral { background: var(--coral); box-shadow: 0 0 0 3px rgb(232 141 124 / 15%); }
.priority-teal { background: var(--teal); box-shadow: 0 0 0 3px rgb(104 201 180 / 16%); }
.priority-sand { background: #caa745; box-shadow: 0 0 0 3px rgb(202 167 69 / 15%); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; gap: 7px; padding: 0 13px; border: 1px solid transparent; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.button:hover { transform: translateY(-1px); }
.button svg { width: 15px; height: 15px; stroke-width: 2; }
.button-dark { color: var(--ink); background: #2b3733; border-color: #3b4944; }
.button-dark:hover { background: #35443f; border-color: #4a5a54; }
.button-accent { color: #101614; background: var(--teal); border-color: var(--teal); }
.button-accent:hover { background: #82d7c4; border-color: #82d7c4; }
.button-outline { color: var(--ink); background: var(--white); border-color: var(--line); }
.button-outline:hover { background: var(--paper-2); }
.button-danger { color: #efaaa3; background: #2a1c1b; border-color: #653b37; }
.button-danger:hover { color: #ffd0cb; background: #382321; border-color: #8b4c47; }
[hidden] { display: none !important; }
.trend-positive { display: inline-flex; align-items: center; gap: 4px; padding: 3px 5px; color: #a9d7bb; background: rgb(255 255 255 / 7%); border-radius: 4px; font-family: var(--font-mono); font-size: 10px; }
.trend-positive svg { width: 13px; height: 13px; }
.pulse-score { display: flex; align-items: baseline; margin: auto 0 3px; font-family: var(--font-mono); }
.pulse-score strong { font-size: clamp(48px, 4.2vw, 64px); font-weight: 500; line-height: 1; }
.pulse-score span { margin-left: 3px; font-size: 18px; }
.pulse-panel p { margin: 0; color: var(--muted); font-size: 11px; }
.pulse-panel p strong { color: var(--ink); }
.pulse-bars { display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; height: 48px; gap: 5px; margin: 14px 0 4px; }
.pulse-bars span { display: block; height: var(--bar); min-height: 5px; background: rgb(198 173 103 / 34%); border-radius: 2px 2px 0 0; }
.pulse-bars .is-today { background: var(--sand); }
.pulse-days { display: grid; grid-template-columns: repeat(7, 1fr); color: #999b84; font-family: var(--font-mono); font-size: 9px; text-align: center; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, .39fr); gap: 28px; margin-top: 35px; }
.content-grid.overview-primary { margin-top: 0; }
.tasks-section { min-width: 0; }
.section-header { display: flex; align-items: end; justify-content: space-between; min-height: 48px; gap: 16px; margin-bottom: 16px; }
.section-header.compact { margin-bottom: 13px; }
.section-header h2 { font-size: 20px; }
.section-actions { display: flex; flex: none; gap: 7px; }
.task-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 10px; }
.task-column { min-width: 0; min-height: 236px; padding: 10px; background: #141b18; border: 1px solid #2d3834; border-radius: 7px; }
.task-column-header { display: flex; align-items: center; justify-content: space-between; min-height: 27px; margin-bottom: 8px; color: #b0bbb4; font-size: 11px; font-weight: 700; }
.task-column-header span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.column-count { color: #7f8d86; font-family: var(--font-mono); font-size: 10px; font-weight: 500; }
.task-column-dot { width: 7px; height: 7px; background: var(--teal); border-radius: 50%; }
.task-column-dot.is-progress { background: var(--coral); }
.task-column-dot.is-done { background: #8a968e; }
.task-cards { display: grid; gap: 8px; }
.task-card { display: grid; grid-template-columns: 17px minmax(0, 1fr) auto; align-items: start; min-height: 83px; gap: 9px; padding: 12px 9px; background: var(--white); border: 1px solid #303b37; border-radius: 6px; box-shadow: 0 2px 5px rgb(0 0 0 / 14%); transition: transform .15s ease, border-color .15s ease; }
.task-card:hover { border-color: #50625a; transform: translateY(-1px); }
.task-check { display: grid; width: 17px; height: 17px; place-items: center; padding: 0; color: #f4f7f4; background: #111715; border: 1.5px solid #66756e; border-radius: 4px; }
.task-check svg { width: 12px; height: 12px; stroke-width: 3; opacity: 0; }
.task-card.is-complete .task-check { background: var(--teal-deep); border-color: var(--teal-deep); }
.task-card.is-complete .task-check svg { opacity: 1; }
.task-card.is-complete .task-title { color: var(--muted); text-decoration: line-through; }
.task-content { min-width: 0; cursor: pointer; }
.task-title { display: block; overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 700; line-height: 1.4; }
.task-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.task-project, .task-due { max-width: 100%; overflow: hidden; color: var(--muted); font-family: var(--font-mono); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.task-detail { display: -webkit-box; margin: 6px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.task-more { display: grid; width: 18px; height: 20px; place-items: center; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 3px; }
.task-more:hover { color: var(--ink); background: var(--paper-2); }
.task-more svg { width: 15px; height: 15px; }
.task-card-actions { display: flex; align-items: center; gap: 2px; }
.task-card-actions .task-more { width: 30px; height: 30px; }
.task-delete:hover { color: #f0aaa3; background: #352321; }

.copilot-panel { display: flex; flex-direction: column; min-height: 454px; padding: 19px; color: var(--ink); background: var(--night); border: 1px solid #28332f; }
.copilot-header { display: grid; grid-template-columns: 34px minmax(0, 1fr) 38px; align-items: center; gap: 10px; }
.copilot-header h2 { color: var(--ink); font-size: 17px; }
.copilot-badge { display: grid; width: 34px; height: 34px; place-items: center; color: #101614; background: var(--sand); border-radius: 6px; }
.copilot-badge svg { width: 17px; height: 17px; }
.chat-thread { display: grid; align-content: start; gap: 14px; max-height: 311px; min-height: 205px; padding: 24px 0 10px; overflow-y: auto; }
.chat-message { display: grid; gap: 8px; font-size: 12px; line-height: 1.6; }
.ai-message { grid-template-columns: 25px minmax(0, 1fr); }
.user-message { justify-self: end; max-width: 86%; padding: 8px 10px; color: #101614; background: var(--sand); border-radius: 6px 6px 1px 6px; }
.message-avatar { display: grid; width: 25px; height: 25px; place-items: center; color: #101614; background: var(--teal); border-radius: 5px; }
.message-avatar svg { width: 13px; height: 13px; }
.ai-message p { margin: 0; color: #d8e0d9; }
.ai-response-card { margin-top: 7px; padding: 9px; color: #dfe7df; background: rgb(255 255 255 / 7%); border: 1px solid rgb(255 255 255 / 10%); border-radius: 5px; }
.ai-response-card strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 11px; }
.ai-response-card ul { margin: 0; padding-left: 17px; color: #bbc5bd; font-size: 11px; }
.ai-response-card button { margin-top: 8px; color: var(--teal); background: transparent; border: 0; font-size: 10px; font-weight: 700; }
.suggestion-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.suggestion-chips button { min-height: 26px; padding: 0 8px; color: #d5e2d8; background: rgb(255 255 255 / 7%); border: 1px solid rgb(255 255 255 / 11%); border-radius: 4px; font-size: 10px; }
.suggestion-chips button:hover { color: var(--ink); background: rgb(255 255 255 / 13%); }
.copilot-compose { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 32px; align-items: end; gap: 8px; margin-top: auto; padding: 8px; background: rgb(255 255 255 / 7%); border: 1px solid rgb(255 255 255 / 11%); border-radius: 7px; }
.copilot-compose textarea { width: 100%; min-height: 36px; max-height: 88px; padding: 1px 0; resize: vertical; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 11px; line-height: 1.55; }
.copilot-compose textarea::placeholder { color: #96a399; }
.send-button { display: grid; width: 32px; height: 32px; place-items: center; padding: 0; color: #101614; background: var(--teal); border: 0; border-radius: 5px; }
.send-button:hover { background: #82d7c4; }
.send-button svg { width: 16px; height: 16px; stroke-width: 2.4; }
.copilot-footer { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 9px 0 0; color: #93a096; font-size: 9px; }
.copilot-footer svg { width: 12px; height: 12px; }

.lower-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); gap: 28px; margin-top: 39px; }
.projects-panel, .automation-panel { min-width: 0; }
.project-list { display: grid; gap: 8px; }
.project-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) minmax(86px, .44fr) auto; align-items: center; min-height: 70px; gap: 11px; padding: 10px 11px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
.project-row:hover, .project-row:focus-visible { border-color: #50625a; transform: translateY(-1px); }
.project-symbol { display: grid; width: 32px; height: 32px; place-items: center; color: #101614; border-radius: 6px; font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.project-symbol.teal { background: var(--teal); }
.project-symbol.coral { background: var(--coral); }
.project-symbol.sand { background: var(--sand); }
.project-info { min-width: 0; }
.project-info strong, .project-info span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-info strong { font-size: 12px; }
.project-info span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.progress-track { height: 6px; overflow: hidden; background: var(--paper-2); border-radius: 3px; }
.progress-track > span { display: block; width: var(--progress); height: 100%; background: var(--project-color, var(--teal)); border-radius: inherit; }
.project-progress { min-width: 36px; color: var(--muted); font-family: var(--font-mono); font-size: 10px; text-align: right; }

.automation-list { display: grid; gap: 8px; }
.automation-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) 34px; align-items: center; min-height: 70px; gap: 9px; padding: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; }
.automation-icon { display: grid; width: 28px; height: 28px; place-items: center; color: var(--teal-deep); background: rgb(104 201 180 / 18%); border-radius: 5px; }
.automation-icon.sand { color: #806422; background: rgb(234 210 143 / 42%); }
.automation-icon svg { width: 15px; height: 15px; }
.automation-info { min-width: 0; }
.automation-info strong, .automation-info span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.automation-info strong { font-size: 11px; }
.automation-info span { margin-top: 2px; color: var(--muted); font-family: var(--font-mono); font-size: 9px; }
.toggle { position: relative; display: inline-block; width: 34px; height: 20px; padding: 0; background: #c5cac5; border: 0; border-radius: 10px; transition: background .18s ease; }
.toggle::after { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: var(--white); border-radius: 50%; content: ""; box-shadow: 0 1px 2px rgb(16 21 21 / 18%); transition: transform .18s ease; }
.toggle.is-on { background: var(--teal-deep); }
.toggle.is-on::after { transform: translateX(14px); }

.view-hero { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 0 0 24px; border-bottom: 1px solid var(--line); }
.view-hero h2 { max-width: 650px; margin: 4px 0 0; font-size: clamp(25px, 3vw, 38px); font-weight: 800; letter-spacing: 0; line-height: 1.2; }
.all-tasks-list { display: grid; gap: 8px; margin-top: 24px; }
.wide-task-row { display: grid; grid-template-columns: 20px minmax(0, 1.2fr) minmax(0, .75fr) auto auto; align-items: center; min-height: 64px; gap: 12px; padding: 10px 13px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; }
.wide-task-row .task-meta { margin: 0; }
.wide-task-row .task-status { justify-self: start; padding: 3px 6px; color: var(--muted); background: var(--paper-2); border-radius: 3px; font-family: var(--font-mono); font-size: 9px; }
.wide-task-row .task-priority { margin: 0; }

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.project-card { display: flex; flex-direction: column; min-height: 186px; padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: 7px; cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
.project-card:hover, .project-card:focus-visible { border-color: #50625a; transform: translateY(-1px); }
.project-card-top { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.project-card h3 { margin: 18px 0 5px; font-size: 17px; }
.project-card p { margin: 0; color: var(--muted); font-size: 11px; }
.project-detail-preview { display: -webkit-box; margin-top: 12px; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.project-card-bottom { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 19px; }
.project-card-bottom .progress-track { flex: 1; }

.library-layout { display: grid; grid-template-columns: minmax(250px, .75fr) minmax(0, 1.25fr); gap: 16px; margin-top: 24px; }
.library-feature { display: flex; flex-direction: column; min-height: 310px; color: var(--ink); background: var(--night); }
.library-feature img { width: 100%; height: 158px; object-fit: cover; filter: saturate(.7) contrast(1.08); }
.library-feature > div { padding: 15px; }
.library-feature h3 { margin: 4px 0 6px; font-size: 19px; line-height: 1.3; }
.library-feature p { margin: 0; color: #b6c0b8; font-size: 11px; }
.library-list { display: grid; align-content: start; gap: 8px; }
.library-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; min-height: 71px; gap: 10px; padding: 10px 12px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; }
.library-item-icon { display: grid; width: 34px; height: 34px; place-items: center; color: var(--ink); background: var(--paper-2); border-radius: 6px; }
.library-item-icon svg { width: 16px; height: 16px; }
.library-item-info { min-width: 0; }
.library-item-info strong, .library-item-info span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-item-info strong { font-size: 12px; }
.library-item-info span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.library-item time { color: var(--muted); font-family: var(--font-mono); font-size: 9px; white-space: nowrap; }

.automation-page-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.automation-card { display: grid; grid-template-columns: 36px minmax(0, 1fr) 34px; align-items: center; min-height: 88px; gap: 11px; padding: 13px; background: var(--white); border: 1px solid var(--line); border-radius: 7px; }
.automation-card .automation-icon { width: 36px; height: 36px; }
.automation-card .automation-info strong { font-size: 13px; }

.avatar { display: grid; width: 30px; height: 30px; flex: none; place-items: center; color: #101614; border-radius: 50%; font-family: var(--font-mono); font-size: 11px; font-weight: 500; }
.avatar-coral { background: var(--coral); }
.avatar-teal { background: var(--teal); }
.avatar-sand { background: var(--sand); }
.avatar-user { color: var(--ink); background: #35413d; }

.modal { width: min(440px, calc(100vw - 32px)); max-height: min(680px, calc(100vh - 32px)); padding: 0; color: var(--ink); background: transparent; border: 0; }
.modal::backdrop, .command-modal::backdrop { background: rgb(16 21 21 / 48%); backdrop-filter: blur(2px); }
.modal-surface { max-height: min(680px, calc(100vh - 32px)); padding: 20px; overflow-y: auto; background: #151c19; border: 1px solid #35413d; border-radius: 8px; box-shadow: 0 22px 60px rgb(0 0 0 / 42%); }
.modal-header { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.modal-header h2 { margin: 3px 0 0; font-size: 20px; line-height: 1.2; }
.modal-surface label { display: grid; gap: 6px; margin-top: 13px; color: #bdc7c1; font-size: 11px; font-weight: 700; }
.modal-surface input, .modal-surface textarea, .modal-surface select { width: 100%; padding: 10px 11px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 5px; font-size: 13px; font-weight: 500; outline: 0; }
.modal-surface textarea { resize: vertical; }
.modal-surface input::placeholder, .modal-surface textarea::placeholder { color: #a0a8a1; }
.modal-surface select { appearance: auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.modal-actions { display: flex; justify-content: end; gap: 8px; margin-top: 20px; }
.task-modal-actions { align-items: center; }
.modal-action-spacer { flex: 1; }
.install-modal { width: min(440px, calc(100vw - 32px)); }
.install-steps { display: grid; gap: 8px; margin: 3px 0 18px; }
.install-step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; }
.install-step-number { display: grid; width: 30px; height: 30px; place-items: center; color: #101614; background: var(--sand); border-radius: 5px; font-family: var(--font-mono); font-size: 10px; }
.install-step strong { display: block; font-size: 12px; }
.install-step p { margin: 2px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.install-modal-close { width: 100%; }

.command-modal { width: min(670px, calc(100vw - 32px)); padding: 0; background: transparent; border: 0; }
.command-surface { overflow: hidden; background: var(--white); border: 1px solid #35413d; border-radius: 8px; box-shadow: 0 24px 65px rgb(0 0 0 / 44%); }
.command-search { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; min-height: 56px; gap: 9px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.command-search svg { width: 18px; color: var(--muted); }
.command-search input { width: 100%; min-width: 0; padding: 0; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 14px; }
.command-search input::placeholder { color: #9ca49d; }
.command-search kbd { padding: 2px 4px; color: var(--muted); background: var(--paper-2); border-radius: 3px; }
.command-results { display: grid; gap: 2px; max-height: 380px; padding: 8px; overflow-y: auto; }
.command-group-label { padding: 10px 8px 5px; color: var(--muted); font-family: var(--font-mono); font-size: 9px; }
.command-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; min-height: 46px; gap: 10px; padding: 6px 8px; color: var(--ink); background: transparent; border: 0; border-radius: 5px; text-align: left; }
.command-item:hover, .command-item.is-selected { background: var(--paper-2); }
.command-item-icon { display: grid; width: 30px; height: 30px; place-items: center; color: var(--teal-deep); background: rgb(104 201 180 / 17%); border-radius: 5px; }
.command-item-icon svg { width: 15px; height: 15px; }
.command-item-copy { min-width: 0; }
.command-item-copy strong, .command-item-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.command-item-copy strong { font-size: 12px; }
.command-item-copy span { margin-top: 1px; color: var(--muted); font-size: 10px; }
.command-item kbd { color: var(--muted); font-family: var(--font-mono); font-size: 9px; }
.command-empty { padding: 28px 10px; color: var(--muted); font-size: 12px; text-align: center; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: min(360px, calc(100vw - 48px)); padding: 10px 13px; color: var(--ink); background: #26312d; border: 1px solid rgb(255 255 255 / 12%); border-radius: 6px; box-shadow: 0 12px 28px rgb(0 0 0 / 38%); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(14px); transition: opacity .18s ease, transform .18s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1240px) {
  .workspace { padding-right: 24px; padding-left: 24px; }
  .pulse-panel { min-height: 184px; }
  .pulse-score { margin: 15px 0 2px; }
  .content-grid { grid-template-columns: minmax(0, 1fr) minmax(285px, .45fr); gap: 22px; }
  .lower-grid { gap: 22px; }
}

@media (max-width: 1020px) {
  .sidebar { flex-basis: 204px; }
  .workspace { padding: 0 20px 40px; }
  .command-button { width: 235px; }
  .content-grid { grid-template-columns: 1fr; }
  .copilot-panel { min-height: 365px; }
  .chat-thread { max-height: 180px; min-height: 122px; }
  .lower-grid { grid-template-columns: 1fr; }
  .automation-panel { max-width: none; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 226px; height: 100vh; padding-top: 13px; box-shadow: 12px 0 30px rgb(16 21 21 / 18%); transform: translateX(-105%); transition: transform .2s ease; }
  .sidebar.is-open { transform: translateX(0); }
  .mobile-nav-button { display: inline-grid; width: 32px; height: 32px; color: var(--ink); background: rgb(255 255 255 / 7%); border-color: rgb(255 255 255 / 12%); }
  .workspace { width: 100%; padding: 0 14px 32px; }
  .topbar { align-items: start; min-height: 104px; padding-top: 16px; gap: 12px; }
  .mobile-nav-trigger { display: inline-grid; width: 34px; height: 34px; color: var(--ink); background: var(--night-2); border-color: #35413d; }
  .mobile-nav-trigger:hover { color: var(--ink); background: #283533; border-color: #42524c; }
  .page-context { flex: 1; }
  .page-context h1 { font-size: 19px; }
  .topbar-actions { gap: 6px; }
  .command-button { display: none; }
  .install-button { width: 34px; min-height: 34px; padding: 0; }
  .install-button span { display: none; }
  .topbar-actions .icon-button { width: 34px; height: 34px; }
  .dashboard-view { padding-top: 16px; }
  .summary-grid { gap: 12px; margin-top: 29px; }
  .panel-light, .panel-sand { min-height: 218px; }
  .content-grid { gap: 26px; margin-top: 29px; }
  .content-grid.overview-primary { margin-top: 0; }
  .section-header { align-items: start; }
  .section-header h2 { font-size: 18px; }
  .task-board { grid-template-columns: 1fr; gap: 8px; }
  .task-column { min-height: auto; }
  .task-cards { grid-template-columns: 1fr; }
  .task-card { min-height: 66px; }
  .lower-grid { gap: 27px; margin-top: 30px; }
  .project-row { grid-template-columns: 32px minmax(0, 1fr) auto; }
  .project-row .progress-track { display: none; }
  .view-hero { align-items: start; flex-direction: column; gap: 14px; }
  .view-hero h2 { font-size: 26px; }
  .wide-task-row { grid-template-columns: 20px minmax(0, 1fr) auto; align-items: start; gap: 9px; }
  .wide-task-row .task-status, .wide-task-row > .task-priority { display: none; }
  .wide-task-row .task-meta { display: flex; margin-top: 6px; }
  .project-grid { grid-template-columns: 1fr; }
  .library-layout { grid-template-columns: 1fr; }
  .automation-page-list { grid-template-columns: 1fr; }
  .toast { right: 14px; bottom: 14px; }
}

@media (max-width: 420px) {
  #quickNoteButton, #notificationButton { display: none; }
  .section-actions .icon-button { display: none; }
  .button { padding: 0 10px; }
  .pulse-panel { padding: 17px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .modal-surface { padding: 16px; }
}
