@font-face { font-family: "Meslo Nerd Font Mono"; src: url("/fonts/meslo/MesloLGSNerdFontMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Meslo Nerd Font Mono"; src: url("/fonts/meslo/MesloLGSNerdFontMono-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Meslo Nerd Font Mono"; src: url("/fonts/meslo/MesloLGSNerdFontMono-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Meslo Nerd Font Mono"; src: url("/fonts/meslo/MesloLGSNerdFontMono-BoldItalic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@import url("/app.css");
:root {
  --sidebar-width: 258px;
  color-scheme: dark;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #dde3e9;
  background: #0d1014;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea {
  outline-offset: 5px;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid #8ae0b1;
}
button {
  cursor: pointer;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
.sidebar {
  width: var(--sidebar-width);
  position: fixed;
  inset: 0 auto 0 0;
  background: #101318;
  border-right: 1px solid #242a31;
  display: flex;
  flex-direction: column;
  padding: 30px 18px 20px;
}
#sidebar-divider {
  position: fixed;
  inset: 0 auto 0 var(--sidebar-width);
  width: 7px;
  z-index: 20;
  transform: translateX(-50%);
  cursor: col-resize;
  touch-action: none;
}
#sidebar-divider::after {
  content: "";
  position: absolute;
  inset: 0 2px;
  background: #8ae0b1;
  opacity: 0;
}
#sidebar-divider:hover::after,
#sidebar-divider:focus-visible::after,
.sidebar-resizing #sidebar-divider::after {
  opacity: .65;
}
#sidebar-divider:focus-visible {
  outline: 1px solid #8ae0b1;
  outline-offset: -1px;
}
.sidebar-resizing,
.sidebar-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}
.terminal-focus-mode #sidebar-divider {
  display: none;
}
@media (max-width: 720px) {
  #sidebar-divider { display: none; }
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 10px;
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -1px;
}
.brandmark {
  width: 35px;
  height: 35px;
  color: #8ce2b1;
  display: grid;
  place-items: center;
  border: 1px solid #385344;
  border-radius: 10px;
  font-size: 28px;
  background: #16271f;
}
.brand-sub {
  display: block;
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #6e7b87;
  margin-top: 5px;
  font-weight: 500;
}
.workspace-label {
  margin: 33px 2px 28px;
  padding: 12px 8px;
  border: 1px solid #2a3037;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}
.workspace-label small {
  display: block;
  font-size: 10px;
  color: #7e8a96;
  margin-top: 5px;
}
.workspace-label > span:last-child {
  margin-left: auto;
}
.avatar {
  width: 29px;
  height: 29px;
  background: #2b333e;
  border: 1px solid #3d4653;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #c3cdd8;
}
.avatar.small {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}
.section-label {
  font-size: 9px;
  letter-spacing: 1.5px;
  font-weight: 600;
  color: #74808e;
  padding: 0 10px;
  display: flex;
  justify-content: space-between;
}
.count {
  background: #252d36;
  color: #a8b3c0;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
}
.projects-label {
  margin: 22px 0 12px;
}
.project-link {
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  font-size: 12px;
  border-radius: 6px;
  margin-bottom: 5px;
  color: #a9b4c0;
}
.project-link.active {
  background: #1a2523;
  border-color: #2b4238;
  color: #a6eac4;
}
.project-link:hover {
  background: #1b232b;
}
.project-icon {
  font-size: 19px;
  width: 20px;
  text-align: center;
  color: #98a8b9;
}
.active .project-icon {
  color: #99e1b7;
}
.project-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8ad6a9;
  margin-left: auto;
}
.quiet {
  background: #6a7582;
}
.sidebar-tasks {
  margin-top: 35px;
  padding-top: 22px;
  border-top: 1px solid #252b32;
}
.compact-task {
  display: flex;
  gap: 9px;
  align-items: center;
  margin: 17px 10px;
  font-size: 11px;
  color: #a0aab6;
}
.compact-task input:checked + span {
  color: #64717d;
  text-decoration: line-through;
}
input[type="checkbox"] {
  accent-color: #87dca9;
  width: 13px;
  height: 13px;
  cursor: pointer;
  flex-shrink: 0;
}
.text-button {
  background: none;
  border: 0;
  font-size: 10px;
  color: #8595a5;
  padding: 0;
}
.sidebar-tasks > .text-button {
  margin: 8px 12px;
  display: flex;
  justify-content: space-between;
  width: 85%;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 20px 10px 0;
  color: #8e9aa7;
  font-size: 10px;
}
.sidebar-bottom small {
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  letter-spacing: 1.5px;
  margin-top: 19px;
  color: #566371;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #89daac;
  border-radius: 50%;
  margin-right: 6px;
}
.amber {
  background: #d7ac67;
}
.workspace {
  margin-left: var(--sidebar-width);
}
.topbar {
  height: 70px;
  border-bottom: 1px solid #242a31;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  font-size: 11px;
  color: #778592;
}
.topbar strong {
  color: #c6ced7;
  font-weight: 400;
}
.slash {
  margin: 0 14px;
  color: #48535e;
}
.top-actions {
  display: flex;
  gap: 20px;
  align-items: center;
}
.mode-badge {
  font-size: 10px;
  color: #d9b77c;
  border: 1px solid #51432c;
  border-radius: 5px;
  padding: 5px 9px;
  background: #211e18;
}
main {
  max-width: 1580px;
  margin: auto;
  padding: 36px 36px 0;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #7f938b;
  font-weight: 600;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  font-weight: 550;
  margin: 11px 0;
}
.title-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #8de2b2;
  border-radius: 50%;
  vertical-align: middle;
  margin-left: 14px;
}
.page-heading p {
  font-size: 12px;
  color: #82909e;
  margin: 0;
}
.button {
  border: 1px solid #333e49;
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 11px;
  background: #191f26;
  white-space: nowrap;
}
.button:hover {
  background: #26313a;
}
.primary {
  background: #8ddfb0;
  color: #10261a;
  border-color: #8ddfb0;
  font-weight: 600;
}
.context-strip {
  display: flex;
  align-items: center;
  gap: 23px;
  border: 1px solid #272e37;
  background: #12171d;
  border-radius: 7px;
  padding: 14px 16px;
  margin-top: 26px;
  font-size: 10px;
  color: #738292;
}
.context-strip b {
  font-weight: 400;
  color: #adb9c6;
  margin-left: 6px;
}
.context-tag {
  font-size: 8px;
  margin-left: 9px;
  color: #8897a6;
  border: 1px solid #33404b;
  padding: 2px 5px;
  border-radius: 3px;
}
.context-right {
  margin-left: auto;
  font-size: 9px;
}
.directory {
  font-family: monospace;
}
.terminal-shell {
  border: 1px solid #2a3540;
  border-radius: 8px;
  overflow: hidden;
  background: #0d131a;
}
.terminal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 43px;
  background: #151c24;
  border-bottom: 1px solid #28323e;
}
.terminal-tabs {
  height: 100%;
  display: flex;
}
.terminal-tab {
  padding: 0 16px;
  border: 0;
  border-right: 1px solid #2c3642;
  background: #0d131a;
  font-size: 10px;
  color: #b5c3d1;
}
.terminal-tab > span:last-child {
  margin-left: 20px;
  color: #536272;
}
.terminal-type {
  padding-right: 17px;
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #657584;
}
.terminal-context {
  padding: 17px 22px 9px;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #8bd7ac;
}
.terminal-context > span:last-child {
  color: #8493a4;
  font-size: 9px;
}
#terminal {
  height: 355px;
  margin: 0 20px 10px;
}
.terminal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 17px;
  background: #111820;
  border-top: 1px solid #26303b;
  font-size: 9px;
  color: #6f8192;
}
.terminal-action {
  background: none;
  border: 0;
  font-size: 9px;
  color: #a9c7b8;
  margin-left: 14px;
}
.notice {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #758696;
  font-size: 10px;
  padding: 6px 2px;
}
.notice > span {
  color: #82a995;
}
.notice strong {
  font-weight: 500;
  color: #a3b4c1;
}
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 13px;
}
.card {
  border: 1px solid #29313a;
  border-radius: 8px;
  background: #12171d;
  padding: 18px 20px;
}
.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #c9d3dd;
  margin-bottom: 18px;
}
.task-preview {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 11px;
  color: #9eacba;
  margin: 12px 0;
}
.priority {
  font-size: 7px;
  letter-spacing: 1px;
  color: #7d8b99;
  margin-left: auto;
  border: 1px solid #303a44;
  padding: 3px 5px;
  border-radius: 3px;
}
.note-preview {
  color: #8a99a8;
  font-size: 11px;
  line-height: 1.8;
  white-space: pre-wrap;
  max-height: 50px;
  overflow: hidden;
}
.small-label {
  color: #526371;
  font-size: 8px;
  letter-spacing: 1px;
}
footer {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #596b7a;
  padding: 24px 0;
}
.muted {
  color: #728394;
}
.content-card {
  min-height: 400px;
}
.task-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 0;
  border-bottom: 1px solid #28323a;
  font-size: 13px;
}
.task-row.done > span:first-of-type {
  color: #657585;
  text-decoration: line-through;
}
#add-task {
  display: flex;
  gap: 10px;
  margin-top: 25px;
}
input:not([type="checkbox"]),
textarea {
  background: #0d131a;
  border: 1px solid #34414d;
  color: #d0dae4;
  padding: 12px;
  border-radius: 5px;
  width: 100%;
  font-size: 12px;
}
textarea {
  height: 270px;
  resize: vertical;
  line-height: 1.8;
  margin-bottom: 15px;
}
.activity-row {
  display: flex;
  gap: 10px;
  font-size: 12px;
  padding: 20px 0;
  border-bottom: 1px solid #29343d;
}
.activity-row time {
  margin-left: auto;
  color: #778998;
  font-size: 10px;
}
.empty {
  text-align: center;
  padding: 70px 20px;
  color: #8293a3;
}
.empty > span {
  font-size: 30px;
}
.empty h3 {
  color: #c9d5df;
}
.empty p {
  font-size: 12px;
}
dialog {
  border: 1px solid #3c4d59;
  background: #141c24;
  color: #d1dde7;
  border-radius: 12px;
  width: min(500px, 90vw);
  padding: 28px;
}
dialog::backdrop {
  background: #000a;
  backdrop-filter: blur(4px);
}
dialog p {
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  background: #253e30;
  color: #b2edc9;
  border: 1px solid #426650;
  border-radius: 7px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
}
.toast.visible {
  opacity: 1;
}
.loading {
  padding: 50px;
  color: #91a99a;
}
@media (min-width: 1600px) {
  #terminal {
    height: 430px;
  }
  main {
    padding-top: 45px;
  }
}
@media (max-width: 1100px) {
  :root {
    --sidebar-width: 220px;
  }
  .sidebar {
    padding: 25px 12px;
  }
  main {
    padding: 25px 22px 0;
  }
  .topbar {
    padding: 0 22px;
  }
  .context-right {
    display: none;
  }
  .context-strip {
    gap: 12px;
    flex-wrap: wrap;
  }
  .page-heading .button span {
    display: none;
  }
}
@media (max-width: 720px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid #29323b;
  }
  .brand {
    font-size: 22px;
  }
  .brand-sub {
    font-size: 7px;
  }
  .workspace-label,
  .sidebar > .section-label,
  .sidebar-tasks,
  .sidebar-bottom {
    display: none;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    gap: 6px;
    margin-top: 19px;
  }
  .project-link {
    width: auto;
    white-space: nowrap;
    padding: 9px;
    font-size: 10px;
    margin: 0;
  }
  .project-icon {
    font-size: 15px;
  }
  .project-dot {
    display: none;
  }
  .workspace {
    margin-left: 0;
  }
  .topbar {
    height: 48px;
    padding: 0 17px;
  }
  .top-actions .avatar {
    display: none;
  }
  main {
    padding: 24px 16px 0;
  }
  h1 {
    font-size: 26px;
  }
  .page-heading p {
    font-size: 11px;
  }
  .directory {
    width: 100%;
  }
  .bottom-grid {
    grid-template-columns: 1fr;
  }
  #terminal {
    height: 340px;
    margin: 0 10px 8px;
  }
  .terminal-context {
    padding: 13px 12px;
  }
  .terminal-footer {
    font-size: 8px;
    padding: 12px 10px;
  }
  #dimensions {
    display: none;
  }
  .terminal-action {
    margin-left: 8px;
  }
  footer > span:last-child {
    display: none;
  }
  .activity-row {
    flex-wrap: wrap;
  }
  .activity-row time {
    width: 100%;
    margin-left: 16px;
  }
  .notice {
    line-height: 1.8;
  }
}
/* A quiet, text-first project sidebar. */
.sidebar {
  background: #101112;
}
.brand {
  padding: 0 10px;
  font-size: 25px;
  letter-spacing: -0.8px;
}
.brand-sub {
  font-size: 9px;
  letter-spacing: 1.7px;
  line-height: 1.6;
  color: #899096;
  margin-top: 7px;
}
.new-project {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 35px 0 4px;
  padding: 12px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
  font-size: 13px;
  color: #c3c6c9;
}
.new-project:hover {
  background: #202224;
}
.projects-label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 500;
  color: #9fa3a7;
  margin: 29px 0 12px;
}
.project-link {
  border: 0;
  padding: 12px 10px;
  gap: 0;
  font-size: 13px;
  color: #bdc1c5;
  margin-bottom: 3px;
}
.project-link.active {
  border: 0;
  background: #242628;
  color: #f0f1f2;
}
.project-link:hover {
  background: #202224;
}
.sidebar nav {
  overflow-y: auto;
  min-height: 60px;
}
.sidebar-tasks {
  margin-top: 30px;
}
.context-strip {
  border: 0;
  background: transparent;
  padding: 10px 0;
  border-radius: 0;
}
.context-tag {
  border: 0;
  background: #23272b;
  padding: 3px 7px;
  border-radius: 12px;
}
.terminal-shell {
  border: 0;
  border-radius: 12px;
}
.terminal-toolbar {
  border: 0;
  background: #11171e;
}
.terminal-tab {
  border: 0;
  background: transparent;
}
.terminal-tab.active {
  background: #0d131a;
  border-radius: 8px 8px 0 0;
}
.terminal-footer {
  border: 0;
}
.terminal-labels {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 14px;
  font-size: 12px;
}
.terminal-labels span {
  border: 0;
  border-radius: 20px;
  padding: 6px 12px;
}
.agent-label {
  background: #142033;
  color: #79acff;
}
.host-label {
  background: #262729;
  color: #c7cbd0;
}
.project-dialog {
  width: min(470px, calc(100vw - 32px));
  padding: 28px;
  border: 0;
  border-radius: 16px;
  background: #202223;
  box-shadow: 0 20px 90px #0008;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}
.dialog-heading h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 550;
  letter-spacing: -0.5px;
}
.dialog-close {
  border: 0;
  background: transparent;
  color: #aab1b6;
  font-size: 25px;
  padding: 0 4px;
}
.field-label,
.agent-options legend {
  display: block;
  font-size: 12px;
  color: #c7cbd0;
  margin-bottom: 10px;
}
.project-dialog input[name="name"] {
  background: #151718;
  border: 1px solid #43474a;
  border-radius: 9px;
  font-size: 14px;
  padding: 13px;
}
.agent-options {
  border: 0;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  gap: 9px;
}
.agent-option {
  flex: 1;
  position: relative;
  cursor: pointer;
}
.agent-option input {
  position: absolute;
  opacity: 0;
}
.agent-option span {
  display: block;
  text-align: center;
  padding: 12px 8px;
  background: #2c2e30;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 13px;
}
.agent-option input:checked + span {
  background: #39453e;
  border-color: #8cba9e;
  color: #d5efdf;
}
.agent-option input:focus-visible + span {
  outline: 2px solid #8ae0b1;
  outline-offset: 3px;
}
.dialog-help {
  font-size: 12px !important;
  line-height: 1.7 !important;
  color: #959da4;
  margin: 19px 0;
}
.create-project-button {
  width: 100%;
  border: 0;
  border-radius: 9px;
  padding: 12px;
  margin-top: 6px;
  font-size: 13px;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
#create-project-error {
  color: #efaaaa;
  font-size: 12px;
}
@media (max-width: 720px) {
  .new-project {
    margin: 18px 0 0;
    width: 100%;
  }
  .sidebar nav {
    min-height: 0;
  }
  .sidebar .projects-label {
    display: none;
  }
  .brand-sub {
    font-size: 8px;
  }
  .terminal-labels {
    margin-top: 0;
  }
}
.project-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.project-title h1 {
  overflow-wrap: anywhere;
}
.project-row {
  display: flex;
  align-items: center;
  border-radius: 7px;
  margin-bottom: 3px;
}
.project-row.active {
  background: #242628;
}
.project-row:hover {
  background: #202224;
}
.project-row .project-link {
  margin: 0;
  min-width: 0;
  flex: 1;
  background: transparent;
}
.project-row .project-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-row.active .project-link {
  color: #f0f1f2;
}
.project-more {
  border: 0;
  background: transparent;
  color: #a5abb1;
  letter-spacing: 1px;
  font-size: 20px;
  padding: 5px 9px;
  border-radius: 6px;
  flex-shrink: 0;
}
.project-more:hover {
  background: #343638;
  color: white;
}
.project-menu {
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 5px;
  width: 155px;
  border: 1px solid #3b3e41;
  border-radius: 9px;
  background: #242628;
  color: #e1e5e8;
  box-shadow: 0 8px 25px #0006;
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
}
.project-menu button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 5px;
  padding: 9px 12px;
  text-align: left;
  font-size: 13px;
  background: transparent;
}
.project-menu button:hover,
.project-menu button:focus-visible {
  background: #343638;
}
#rename-error {
  color: #efaaaa;
  font-size: 12px;
}
@media (max-width: 720px) {
  .project-row {
    flex-shrink: 0;
    max-width: 240px;
    margin: 0;
  }
  .project-title h1 {
    font-size: 25px;
  }
  .page-heading {
    align-items: flex-start;
  }
}
.project-more {
  opacity: 0;
  pointer-events: none;
}
.project-row:hover .project-more,
.project-row:focus-within .project-more {
  opacity: 1;
  pointer-events: auto;
}
@media (hover: none) {
  .project-more {
    opacity: 1;
    pointer-events: auto;
  }
}
.connection-panel {
  max-width: 800px;
  border: 0;
}
.connection-panel h2 {
  margin: 0 0 12px;
  font-size: 21px;
  font-weight: 500;
}
.connection-panel > p {
  font-size: 12px;
  line-height: 1.8;
}
.connection-fields {
  margin: 30px 0;
}
.connection-fields > div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 15px;
  padding: 18px 0;
  border-bottom: 1px solid #283039;
  font-size: 12px;
}
.connection-fields dt {
  color: #8695a4;
}
.connection-fields dd {
  margin: 0;
  color: #c8d3dd;
  overflow-wrap: anywhere;
}
.connection-help {
  color: #7e8e9c;
}
@media (max-width: 720px) {
  .connection-fields > div {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
/* Keep the project surface compact and let the terminal use the viewport. */
#app {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
.workspace {
  flex: 1;
  min-height: 0;
}
main {
  height: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 24px;
}
.page-heading {
  flex-shrink: 0;
}
.project-title h1 {
  margin: 4px 0;
}
#panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-bottom: 2px;
}
.terminal-labels {
  flex-shrink: 0;
  margin: 0 0 10px;
}
.terminal-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  border-radius: 10px 10px 0 0;
}
.terminal-toolbar,
.terminal-context,
.terminal-footer {
  flex-shrink: 0;
}
#terminal {
  flex: 1;
  height: 0;
  min-height: 0;
  margin-bottom: 0;
}
#panel > .content-card,
#panel > .connection-panel {
  flex-shrink: 0;
}
@media (max-width: 720px) {
  .sidebar {
    flex-shrink: 0;
  }
  .workspace {
    min-height: 0;
  }
  main {
    padding: 10px 12px 0;
  }
}
.terminal-window-controls {
  display: flex;
  align-items: center;
  padding-right: 10px;
}
.terminal-footer {
  justify-content: flex-end;
}

#project-heading {
  cursor: text;
  border-radius: 5px;
  max-width: 100%;
}
#project-heading:hover {
  background: #171c21;
}
.project-title {
  max-width: 100%;
}
.project-title input.project-name-input {
  display: block;
  width: min(650px, calc(100vw - 330px));
  min-width: 100px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  outline: none;
}
@media (max-width: 720px) {
  .project-title input.project-name-input {
    width: calc(100vw - 24px);
  }
}
.sign-out {
  background: transparent;
  border: 0;
  color: #a5b0ba;
  font-size: 12px;
  padding: 7px 0;
}
.sign-out:hover {
  color: #e4e9ed;
}
@media (max-width: 720px) {
  .sidebar-bottom:has(.sign-out) {
    display: block;
    margin-top: 10px;
    padding: 0 10px;
  }
  .sidebar-bottom:has(.sign-out) small {
    display: none;
  }
}
.connection-panel select {
  width: 100%;
  background: #171d24;
  border: 1px solid #38434d;
  color: #d5dee7;
  padding: 12px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
}
.connection-panel form {
  margin-top: 25px;
}
.connection-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
#connection-result {
  font-size: 12px;
  line-height: 1.8;
  margin-top: 18px;
}
.check-success {
  color: #9dddb7;
}
.check-error,
#terminal-create-error {
  color: #efaaaa;
}
.checking {
  color: #a0adba;
}
.connection-empty {
  margin-top: 25px;
  border-top: 1px solid #29343d;
  padding-top: 20px;
}
.connection-empty h3 {
  font-size: 14px;
  font-weight: 500;
}
.connection-empty p {
  font-size: 12px;
  color: #8797a6;
  line-height: 1.8;
}
.terminal-tabs {
  min-width: 0;
  overflow-x: auto;
  align-items: stretch;
}
.terminal-tab {
  white-space: nowrap;
  flex-shrink: 0;
}
.terminal-add {
  background: transparent;
  border: 0;
  font-size: 20px;
  color: #9aacbb;
  padding: 0 14px;
}
.terminal-add:hover {
  background: #24303b;
  color: white;
}
.terminal-window-controls {
  flex-shrink: 0;
}
.connection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.ssh-dialog {
  width: min(530px, calc(100vw - 28px));
  max-height: 90dvh;
  overflow: auto;
}
.ssh-dialog .field-label {
  margin-top: 17px;
}
.ssh-dialog input,
.ssh-dialog select {
  font-size: 13px;
}
.ssh-dialog select {
  width: 100%;
  padding: 12px;
  background: #151718;
  border: 1px solid #43474a;
  color: #d1dde7;
  border-radius: 7px;
}
.ssh-form-grid {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 12px;
}
.ssh-checkbox {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 12px;
  line-height: 1.7;
  color: #b8c4ce;
  margin: 14px 0;
}
.ssh-advanced {
  margin-top: 18px;
  color: #9babb9;
  font-size: 12px;
}
.ssh-advanced input {
  margin-top: 12px;
}
.ssh-error {
  color: #efaaaa;
  font-size: 12px;
  line-height: 1.7;
}
.ssh-target {
  font-size: 13px;
  overflow-wrap: anywhere;
  color: #a8bac7;
}
.ssh-fingerprint {
  display: block;
  padding: 12px;
  background: #14191e;
  font-size: 12px;
  overflow-wrap: anywhere;
  border-radius: 7px;
  line-height: 1.8;
}
.ssh-dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 25px;
}
#ssh-install-status {
  font-size: 12px;
  line-height: 1.8;
  color: #9bb5a6;
}
.local-host-preset {
  margin: 0 0 5px;
}
.pending-connections {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
@media (max-width: 720px) {
  .connection-heading {
    align-items: flex-start;
  }
  .connection-heading h2 {
    font-size: 20px;
  }
  .ssh-dialog {
    padding: 22px;
  }
  .ssh-form-grid {
    grid-template-columns: minmax(0, 1fr) 75px;
  }
}

.terminal-tabs .terminal-tab { display: flex; align-items: center; padding: 0; flex-shrink: 0; }
.terminal-select, .terminal-close { border: 0; background: transparent; color: inherit; cursor: pointer; }
.terminal-select { padding: 10px 12px; font: inherit; }
.terminal-close { padding: 6px 8px; font-size: 16px; opacity: .55; }
.terminal-close:hover { opacity: 1; }
.terminal-close:disabled { visibility: hidden; }
.terminal-window-controls { flex-shrink: 0; gap: 8px; }
.terminal-toolbar .terminal-action { padding: 5px; white-space: nowrap; }

.terminal-panes { display: flex; flex: 1; min-height: 0; min-width: 0; }
.terminal-pane { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; overflow: hidden; }
.terminal-panes.is-split > .terminal-pane:first-child { flex: 0 0 calc(var(--pane-ratio) - 3px); }
.pane-heading { display: flex; gap: 12px; align-items: center; min-height: 34px; padding: 4px 12px; color: #8b99a8; font-size: 11px; border-bottom: 1px solid #202a33; }
.pane-heading select { max-width: 36%; background: transparent; color: #bcc8d5; border: none; font: inherit; }
.pane-host { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane-state { margin-left: auto; font-size: 10px; }
.pane-active .pane-heading { box-shadow: inset 0 -2px #648d7a; }
.terminal-mount { position: relative; flex: 1; min-height: 0; min-width: 0; }
.terminal-surface { position: absolute; inset: 0; padding: 8px; }
.pane-divider { width: 6px; flex-shrink: 0; cursor: col-resize; background: #202a33; touch-action: none; }
.pane-divider:hover, .pane-divider:focus { background: #648d7a; }
.terminal-toolbar { min-height: 43px; height: auto; flex-wrap: wrap; }
.terminal-window-controls { margin-left: auto; padding: 4px 8px; }
.terminal-tabs { min-width: 0; }
@media(max-width: 720px) { .pane-host { display: none; } .pane-heading { gap: 4px; padding: 4px; } .pane-heading select { max-width: 55%; } .terminal-window-controls { gap: 2px; } }

.terminal-tabs { height: auto; min-height: 40px; flex: 1 1 200px; }
.terminal-window-controls { max-width: 100%; overflow-x: auto; box-sizing: border-box; }
.pane-heading { flex-shrink: 0; min-width: 0; }
.pane-state { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#terminal-connection, #connection-terminal { width: 100%; padding: 10px; background: #171d24; color: #c3ceda; border: 1px solid #313942; border-radius: 6px; }
@media(max-width: 720px) {
  .terminal-tabs, .terminal-window-controls { flex-basis: 100%; }
  .terminal-toolbar .terminal-action { font-size: 11px; margin-left: 0; padding: 5px 6px; }
  .terminal-window-controls { justify-content: flex-end; }
  .pane-heading { flex-wrap: wrap; min-height: 44px; }
  .pane-heading select { max-width: 100%; width: 100%; }
  .pane-state { margin-left: 0; width: 100%; }
}

.sidebar .projects-label { font-size: 14px; font-weight: 650; letter-spacing: .02em; color: #bbc5d0; }
.project-row[draggable="true"] { position: relative; }
.project-row.project-dragging { opacity: .4; }
.project-row.drop-before::before, .project-row.drop-after::after { content: ""; position: absolute; left: 8px; right: 8px; height: 2px; background: #83b69e; pointer-events: none; }
.project-row.drop-before::before { top: -2px; }
.project-row.drop-after::after { bottom: -2px; }
.project-link:active { cursor: grabbing; }
@media(max-width:720px) { .project-row.drop-before::before, .project-row.drop-after::after { top: 3px; bottom: 3px; width: 2px; height: auto; } .project-row.drop-before::before { left: -2px; right: auto; } .project-row.drop-after::after { right: -2px; left: auto; } }

.saved-connections { margin: 12px 0 22px; }
.saved-connections h3 { font-size: 13px; font-weight: 600; margin: 0 0 10px; }
.saved-connection { display: flex; align-items: center; gap: 8px; padding: 10px 0; }
.saved-connection > div { flex: 1; min-width: 0; }
.saved-connection strong, .saved-connection span { display: block; overflow-wrap: anywhere; }
.saved-connection strong { font-size: 13px; font-weight: 500; }
.saved-connection span { font-size: 11px; color: #8e9aa8; margin-top: 4px; }

.danger-text { color: #e39a9a; }
.danger-text:hover { color: #ffc0c0; }
.danger-button { background: #9b353f; color: white; border-color: #b64b55; }
.danger-button:hover { background: #b23e49; }
.delete-description { color: #b7c1cc; font-size: 13px; line-height: 1.6; margin: 16px 0 22px; }
@media(max-width:720px) { .saved-connection { flex-wrap: wrap; } .saved-connection > div { flex-basis: 100%; } }

.terminal-focus-button { display: grid; place-items: center; padding: 6px; border: 0; border-radius: 5px; background: transparent; color: #9aabba; }
.terminal-focus-button:hover { background: #28333e; color: #e0e8ef; }
.terminal-focused { position: fixed; inset: 0 0 2px; z-index: 100; width: 100%; height: calc(100vh - 2px); height: calc(100dvh - 2px); border-radius: 0; }

/* One header per pane: a single terminal identity and local actions. */
.terminal-pane { container-type: inline-size; }
.pane-heading { height: 34px; min-height: 34px; padding: 0 8px; gap: 8px; flex-wrap: nowrap; background: #11171e; }
.pane-title { display: inline-flex; align-items: center; gap: 5px; flex: 0 1 auto; min-width: 0; padding: 4px 4px; border: 0; border-radius: 5px; background: transparent; color: #c6d1dc; font-size: 12px; text-align: left; cursor: pointer; }
.pane-title > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane-title svg { width: 12px; height: 12px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.4; opacity: .6; }
.pane-title:hover, .pane-icon:hover { background: #222b34; color: #edf2f7; }
.pane-actions { display: flex; align-items: center; gap: 3px; margin-left: auto; flex-shrink: 0; }
.pane-icon { display: grid; place-items: center; width: 28px; height: 28px; padding: 5px; border: 0; border-radius: 5px; background: transparent; color: #98a7b6; font-size: 19px; cursor: pointer; }
.pane-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.pane-connect { padding: 4px 7px; border: 0; border-radius: 5px; color: #b4c3d1; background: #1c2630; font-size: 11px; cursor: pointer; }
.pane-connect:hover { background: #2b3844; color: #e8edf2; }
.pane-state { display: inline-flex; align-items: center; gap: 6px; width: auto; margin: 0 4px; flex-shrink: 0; overflow: visible; color: #8b99a8; }
.pane-state-dot { width: 6px; height: 6px; border-radius: 50%; background: #697787; }
.pane-state[data-state=connected] .pane-state-dot { background: #82b39a; }
.pane-state[data-state=connecting] .pane-state-dot { background: #d3b378; }
.pane-state-label { display: none; }
.pane-menu { position: fixed; inset: auto; margin: 0; width: 220px; max-width: calc(100vw - 16px); max-height: min(400px,70vh); overflow-y: auto; box-sizing: border-box; padding: 5px; border: 1px solid #303a44; border-radius: 8px; background: #192129; color: #c9d3de; box-shadow: 0 10px 30px #0006; }
.pane-menu button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 4px; background: transparent; color: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.pane-menu button:hover, .pane-menu button:focus-visible { background: #293640; }
.pane-menu button[aria-checked=true] { color: #a5d5bb; background: #22302b; }
.pane-menu button:disabled { color: #63707c; cursor: default; }
.pane-menu .danger-text { color: #e39a9a; }
.pane-menu .overflow-new, .pane-menu .overflow-layout, .pane-menu .overflow-connect { display: none; }

@container (max-width: 450px) { .pane-actions > .pane-layout { display: none; } .pane-menu .overflow-layout { display: flex; } }
@container (max-width: 290px) { .pane-actions > .pane-connect { display: none; } .pane-menu .overflow-connect { display: flex; } .pane-heading { gap: 4px; padding: 0 5px; } }

.pane-menu button > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pane-connect:disabled { cursor: wait; opacity: .65; }

.focus-sidebar-edge, .focus-project-toggle, .focus-sidebar-backdrop { display: none; }
.terminal-focus-mode .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 120; width: min(var(--sidebar-width),85vw); height: 100vh; height: 100dvh; padding: 26px 18px 20px; border-right: 1px solid #29333d; border-bottom: 0; transform: translateX(-100%); visibility: hidden; transition: transform .16s ease, visibility .16s; box-shadow: 8px 0 30px #0005; }
.terminal-focus-mode.focus-projects-open .sidebar { transform: translateX(0); visibility: visible; }
.terminal-focus-mode .focus-sidebar-edge { display: block; position: fixed; inset: 0 auto 0 0; width: 5px; z-index: 114; }
.terminal-focus-mode .focus-project-toggle { display: grid; place-items: center; position: fixed; left: 0; top: calc(50% - 24px); z-index: 115; width: 18px; height: 48px; padding: 2px; border: 1px solid #34434e; border-left: 0; border-radius: 0 6px 6px 0; color: #92a6b4; background: #19242dc9; opacity: .5; transition: opacity .15s; }
.terminal-focus-mode .focus-project-toggle:hover, .terminal-focus-mode .focus-project-toggle:focus-visible { opacity: 1; }
.focus-project-toggle svg { width: 12px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.terminal-focus-mode.focus-projects-open .focus-project-toggle { left: min(var(--sidebar-width),85vw); opacity: 1; }
.focus-projects-open .focus-project-toggle svg { transform: rotate(180deg); }
.terminal-focus-mode.focus-projects-open .focus-sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 110; background: #0001; }
.terminal-focus-mode .sidebar nav { display: flex; flex-direction: column; flex: 1; overflow: auto; gap: 2px; margin-top: 0; }
.terminal-focus-mode .sidebar .project-link { width: 100%; padding: 11px 10px; font-size: 13px; text-align: left; }
.terminal-focus-mode .sidebar .projects-label { display: block; }
.terminal-focus-mode .sidebar .sidebar-bottom { display: block; }
.terminal-focus-mode .sidebar .new-project { width: 100%; margin-top: 30px; }
@media(prefers-reduced-motion:reduce) { .terminal-focus-mode .sidebar, .terminal-focus-mode .focus-project-toggle { transition: none; } }

/* Compact project rows with a small, optional agent indicator. */
.sidebar .project-row .project-link,
.terminal-focus-mode .sidebar .project-row .project-link {
  padding-top: 8px;
  padding-bottom: 8px;
  gap: 8px;
}
.project-agent-icon { width: 15px; height: 15px; flex: 0 0 15px; color: #aab3bb; }
.project-menu [role="menuitemradio"][aria-checked="true"] { background: #343638; }
.project-menu [role="menuitemradio"][aria-checked="true"]::after { content: "✓"; float: right; }

.account-controls { display: flex; align-items: center; gap: 9px; }
.account-icon { display: inline-flex; align-items: center; color: #a5b0ba; cursor: default; border-radius: 4px; }
.account-icon:focus-visible { outline: 1px solid #a5b0ba; outline-offset: 4px; }

img.project-agent-icon { object-fit: contain; }
img.project-agent-icon[src="/icons/openai.ico"] { filter: invert(1); }

.default-connection-form { margin: 18px 0 24px; }
.default-connection-controls { display: flex; align-items: center; gap: 10px; }
.default-connection-controls select { flex: 1; min-width: 0; }
.default-connection-controls button { flex-shrink: 0; }
.default-connection-error { color: #efaaaa; font-size: 12px; }

.account-controls { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.account-identity { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 4px 0; }
.account-username { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 550; color: #d8dfe5; }
.account-actions { display: flex; align-items: center; gap: 16px; padding-left: 27px; }
.account-action { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 5px 0; color: #a5b0ba; font-size: 12px; cursor: pointer; }
.account-action:hover { color: #e4e9ed; }
.settings-dialog { width: min(640px,calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 26px; border: 1px solid #343a40; border-radius: 14px; background: #15191e; color: #dce3e9; overflow: auto; }
.settings-dialog::backdrop { background: #0009; }
.settings-account { display: flex; flex-direction: column; gap: 4px; margin: 0 0 25px; }
.settings-account span { color: #919da8; font-size: 13px; }
.settings-section-heading,.account-host-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.settings-section-heading h3 { font-size: 15px; margin: 0; }
.account-host-card { margin-top: 14px; padding: 16px; background: #1c2229; border-radius: 10px; }
.account-host-target,.host-usage { color: #a5b0ba; font-size: 12px; margin: 7px 0 13px; overflow-wrap: anywhere; }
.host-status { font-size: 11px; color: #9bbfae; }
.account-host-card dl { margin: 12px 0; }
.account-host-card dt { font-size: 11px; color: #8f9ca8; margin-top: 8px; }
.account-host-card dd { margin: 4px 0; overflow-wrap: anywhere; font-size: 11px; }
.host-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.settings-empty { color: #a5b0ba; font-size: 13px; margin-top: 22px; }
#project-host,#saved-host,#saved-connection-tool { width: 100%; padding: 10px; border: 1px solid #34414d; border-radius: 5px; background: #0d131a; color: #d0dae4; }
#manage-project-hosts,.manage-saved-hosts { font-size: 12px; margin-top: 9px; }
.agent-options { grid-template-columns: repeat(auto-fit,minmax(90px,1fr)); }
.saved-connection { flex-wrap: wrap; }
.connection-help { color: #a5b0ba; font-size: 12px; line-height: 1.7; margin: 8px 0 16px; max-width: 680px; }
.connection-heading h2, .connection-heading h3 { margin-bottom: 0; }
.connection-heading > button { flex-shrink: 0; }
.terminal-assignments, .project-profiles { margin-top: 24px; padding-top: 20px; border-top: 1px solid #343a40; }
.terminal-assignments h3, .project-profiles h3 { font-size: 15px; margin: 0; }
.assignment-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; margin: 14px 0 18px; }
.assignment-row { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 12px; color: #dce3e9; background: #1c2229; border: 1px solid #343a40; border-radius: 7px; min-width: 0; }
.assignment-row.selected { border-color: #7b9bb6; background: #25323e; }
.assignment-row strong { font-size: 13px; }
.assignment-row span { font-size: 11px; color: #a5b0ba; overflow-wrap: anywhere; }
.terminal-assignment { max-width: 680px; }
.assignment-details { margin: 14px 0; color: #a5b0ba; font-size: 12px; }
.assignment-details .connection-fields { margin-top: 12px; }
.profile-host-group { margin: 16px 0; border: 1px solid #343a40; border-radius: 8px; padding: 14px; }
.profile-host-heading { padding-bottom: 10px; border-bottom: 1px solid #343a40; }
.profile-host-heading strong, .profile-host-heading span { display: block; overflow-wrap: anywhere; }
.profile-host-heading strong { font-size: 13px; }
.profile-host-heading span { font-size: 11px; color: #a5b0ba; margin-top: 6px; }
.profile-default { color: #9bbfae; font-size: 11px; margin-left: 6px; }
.host-duplicates { padding: 10px 12px; margin-bottom: 14px; border: 1px solid #665b3d; border-radius: 6px; }
.host-duplicates p { color: #c8bb98; font-size: 12px; line-height: 1.7; margin: 0 0 10px; }
.account-host-card summary { color: #a5b0ba; font-size: 12px; cursor: pointer; }
@media(max-width:720px) { .connection-panel > .connection-heading { flex-wrap: wrap; } .assignment-list { grid-template-columns: 1fr; } }
[hidden] { display: none !important; }
@media(max-width:720px){ .account-actions { padding-left: 0; } .settings-dialog { padding: 18px; } }

/* Mobile is a project picker followed by one project surface. */
.project-header { display: flex; align-items: center; gap: 8px; height: 34px; min-height: 34px; margin-left: var(--sidebar-width); padding: 0 24px; flex-shrink: 0; }
.project-header-title { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.project-header-title h1 { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; letter-spacing: -.1px; }
.project-header-title .project-name-input { max-width: 100%; height: 26px; padding: 2px 4px; font-size: 13px; }
.project-section-label { color: #8e9da9; font-size: 11px; white-space: nowrap; }
.project-header-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.project-header-icon { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 5px; background: transparent; color: #a9b6c2; font-size: 19px; }
.project-header-icon:hover { background: #202a33; color: #edf2f7; }
#mobile-projects-back { display: none; }
.project-context-menu { width: 180px; max-width: calc(100vw - 16px); }
.project-icon-options { border-top: 1px solid #3b3e41; margin-top: 5px; padding-top: 5px; }
.project-icon-options summary { font-size: 12px; color: #b2bdc6; padding: 9px 12px; cursor: pointer; }
.workspace-welcome { display: flex; flex: 1; min-height: 280px; flex-direction: column; align-items: center; justify-content: center; padding: 32px 24px; text-align: center; }
.workspace-welcome h1, .workspace-welcome h2 { font-size: 24px; font-weight: 500; letter-spacing: -.5px; margin: 0 0 12px; }
.workspace-welcome p { max-width: 420px; color: #92a1b0; font-size: 13px; line-height: 1.8; margin: 0 0 24px; }
.empty-project-icon { color: #7d9baf; font-size: 30px; margin-bottom: 24px; }
.terminal-assignments > summary { color: #aebbc8; font-size: 13px; cursor: pointer; }
.profile-options { position: relative; flex-shrink: 0; }
.profile-options > summary { display: grid; place-items: center; list-style: none; cursor: pointer; width: 32px; height: 32px; border-radius: 5px; font-size: 20px; color: #a5b0ba; }
.profile-options > summary::-webkit-details-marker { display: none; }
.profile-options > summary:hover { background: #25313c; }
.profile-options-menu { position: absolute; right: 0; top: 34px; z-index: 10; min-width: 170px; padding: 5px; border: 1px solid #343f49; border-radius: 8px; background: #192129; box-shadow: 0 8px 20px #0005; }
.profile-options-menu .button { display: block; width: 100%; text-align: left; border: 0; background: transparent; }
.profile-options-menu .button:hover { background: #293640; }
#terminal-connection.terminal-profile-picker { border: 0; padding: 0; margin: 16px 0; background: transparent; }
.terminal-profile-picker legend { color: #9aabb9; font-size: 12px; margin-bottom: 10px; }
.terminal-profile-option { display: flex; align-items: center; gap: 12px; padding: 13px; margin: 8px 0; border: 1px solid #34414d; border-radius: 8px; cursor: pointer; background: #151d25; }
.terminal-profile-option:has(input:checked) { border-color: #7aaf94; background: #1b2a25; }
.terminal-profile-option input[type=radio] { width: 16px; height: 16px; margin: 0; flex-shrink: 0; accent-color: #9bdbb5; }
.terminal-profile-option > span { flex: 1; min-width: 0; }
.terminal-profile-option strong { display: block; font-size: 13px; font-weight: 500; }
.terminal-profile-option small { display: block; font-size: 11px; color: #93a3b1; margin-top: 5px; overflow-wrap: anywhere; }
.profile-advanced { margin: 18px 0; color: #a4b3c0; font-size: 12px; }
.profile-advanced summary { cursor: pointer; }
#saved-host-dialog .field-label { margin-top: 17px; }
.manage-saved-hosts { margin-bottom: 3px; }
.pane-heading > .project-header { flex: 0 1 auto; max-width: 48%; height: 32px; min-height: 32px; margin: 0; padding: 0 8px 0 0; border-right: 1px solid #2a3540; }
.pane-heading .project-header-title { flex: 0 1 auto; max-width: 150px; }
.pane-heading .project-header-title h1 { font-size: 12px; }
@container (max-width: 550px) {
  .pane-heading:has(> .project-header) { gap: 4px; }
  .pane-heading:has(> .project-header) > .pane-actions > .pane-connect,
  .pane-heading:has(> .project-header) > .pane-actions > .pane-layout { display: none; }
  .pane-heading:has(> .project-header) .overflow-connect,
  .pane-heading:has(> .project-header) .overflow-layout { display: flex; }
  .pane-heading .project-header { gap: 3px; padding-right: 4px; }
  .pane-heading .project-header-title { max-width: 90px; }
  .pane-heading .project-header-actions { gap: 0; }
  .pane-heading .project-header-icon { width: 24px; }
}
@container (max-width: 350px) {
  .pane-heading:has(> .project-header) > .pane-title > span { display: none; }
}
@container (max-width: 300px) {
  .mobile-viewport .pane-heading:has(> .project-header) > .pane-actions > .pane-new { display: none; }
  .mobile-viewport .pane-heading:has(> .project-header) .overflow-new { display: flex; }
}
@media (max-width: 720px) {
  body { overflow: hidden; }
  #app { height: 100dvh; }
  .sidebar { display: none; }
  .mobile-navigation { display: flex; align-items: center; gap: 6px; height: 34px; min-height: 34px; flex-shrink: 0; padding: 0 8px; background: #11171e; border-bottom: 1px solid #29323b; z-index: 105; }
  .mobile-navigation button { flex-shrink: 0; border: 0; background: transparent; color: #c6d1dc; min-height: 28px; padding: 0 3px; font-size: 12px; }
  #mobile-projects-back { display: block; width: 22px; padding: 0; font-size: 0; }
  #mobile-projects-back::before { content: "‹"; font-size: 22px; }
  .project-header { margin-left: 0; }
  .project-header-title { flex-direction: column; align-items: flex-start; gap: 2px; }
  .project-header-title h1 { font-size: 12px; width: 100%; }
  .project-section-label { font-size: 10px; }
  .project-header-actions { gap: 0; }
  .project-header-actions .project-header-icon { width: 24px; }
  .project-header-actions #return-terminal { font-size: 12px; padding: 0 6px; }
  .saved-connection { flex-wrap: nowrap; }
  .saved-connection > div { flex-basis: auto; }
  .profile-options-menu { min-width: 160px; }
  .mobile-navigation .project-menu button { padding: 10px 12px; text-align: left; }
  .workspace { margin: 0; width: 100%; }
  main { padding: 0; }
  .page-heading { display: none; }
  #panel > :not(.terminal-shell) { margin: 12px; }
  .mobile-project-list .workspace, .mobile-project-list .mobile-navigation { display: none; }
  .mobile-project-list .sidebar { display: flex; position: static; flex-direction: column; width: 100%; height: 100%; padding: max(20px, env(safe-area-inset-top)) 18px max(16px, env(safe-area-inset-bottom)); border: 0; }
  .mobile-project-list .sidebar .brand { font-size: 26px; }
  .mobile-project-list .sidebar .new-project { width: 100%; margin-top: 24px; min-height: 44px; }
  .mobile-project-list .sidebar .projects-label { display: block; margin: 18px 0 12px; font-size: 16px; }
  .mobile-project-list .sidebar nav { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; margin: 0; gap: 3px; }
  .mobile-project-list .project-row { flex-shrink: 0; width: 100%; max-width: none; }
  .mobile-project-list .sidebar .project-row .project-link { width: 100%; min-height: 44px; font-size: 15px; text-align: left; padding: 10px; }
  .mobile-project-list .project-more { opacity: 1; min-width: 40px; min-height: 40px; }
  .mobile-project-list .sidebar .sidebar-bottom { display: block; margin-top: 14px; }
  .mobile-project-list .account-actions button { min-height: 44px; }
  .terminal-focused { top: 0; height: calc(100dvh - 2px); }
  .terminal-focus-mode .focus-project-toggle, .terminal-focus-mode .focus-sidebar-edge, .terminal-focus-mode .focus-sidebar-backdrop { display: none; }
}

.terminal-back-live { position: absolute; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 8; min-height: 40px; padding: 8px 14px; border: 1px solid #40574d; border-radius: 20px; background: #203c30; color: #dcf3e6; font-size: 13px; box-shadow: 0 3px 14px #0005; cursor: pointer; }

/* Only touch-capable phones opt into keyboard-aware sizing. */
.mobile-keyboard-toggle { display: none; }
@media (max-width: 720px) {
  .mobile-viewport #app { position: fixed; top: var(--mobile-visible-top, 0px); left: 0; right: 0; height: var(--mobile-visible-height, 100dvh); }
  .mobile-viewport .terminal-focused { top: var(--mobile-visible-top, 0px); height: calc(var(--mobile-visible-height, 100dvh) - 2px); }
  .mobile-viewport .mobile-keyboard-toggle { display: grid; }
  .mobile-viewport .mobile-keyboard-toggle[aria-pressed="true"] { color: #a4e1bd; background: #20332b; }
  .mobile-viewport input, .mobile-viewport select, .mobile-viewport textarea { font-size: 16px; }
  .mobile-viewport .xterm-helper-textarea { font-size: 16px !important; }
  .mobile-viewport dialog { max-height: calc(var(--mobile-visible-height, 100dvh) - 24px); }
  .mobile-viewport.mobile-keyboard-open dialog[open] { top: calc(var(--mobile-visible-top, 0px) + 12px); bottom: auto; margin-top: 0; margin-bottom: 0; }
}

/* Activity changes decorate project rows without moving or rebuilding terminals. */
@property --project-orbit-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.project-status-border { position: absolute; inset: 0; padding: 1px; border-radius: inherit; pointer-events: none; background: transparent; mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude; -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; }
.project-row.agent-needs-attention[data-agent-state="waiting"] .project-status-border { background: #e7bd72; }
.project-row.agent-needs-attention[data-agent-state="ready"] .project-status-border { background: #8cdbab; }
.project-row.agent-needs-attention[data-agent-state="error"] .project-status-border { background: #e09c9c; }
@keyframes project-orbit { to { --project-orbit-angle: 360deg; } }
.activity-tracking-settings { margin-top: 22px; padding-top: 16px; border-top: 1px solid #29333d; }
.activity-tracking-settings h3 { font-size: 14px; }
.activity-tracking-settings p { color: #a6b2bf; font-size: 12px; line-height: 1.6; max-width: 760px; }

/* Account working-animation picker and shared project effects. */
.animation-preview { position: relative; display: block; flex-shrink: 0; width: 100%; min-height: 34px; overflow: hidden; padding: 8px 10px; border: 0; border-radius: 7px; color: #c1c9d4; background: #171d24; text-align: left; font: inherit; font-size: 12px; cursor: pointer; }
.animation-preview:hover { background: #202a35; }
.animation-preview:focus-visible { outline: 2px solid #a9ceff; outline-offset: 1px; }
.preview-label { position: relative; z-index: 1; pointer-events: none; }
.preview-effect { pointer-events: none; }
.animation-preview[data-preview="circulating"] .preview-effect { background: conic-gradient(from var(--project-orbit-angle), #69a9ff1a 0deg 245deg, #69a9ff 300deg, #69a9ff1a 360deg); animation: project-orbit 2.6s linear infinite; }
.animation-preview[data-preview="breathing"] .preview-effect { background: #69a9ff; animation: preview-breathe 2.8s ease-in-out infinite; }
.animation-preview[data-preview="dash"] .preview-effect { background: conic-gradient(from var(--project-orbit-angle), transparent 0deg 330deg, #69a9ff 340deg 355deg, transparent 360deg); animation: project-orbit 2.3s linear infinite; }
.animation-preview[data-preview="shimmer"] .preview-effect { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, #69a9ff33 50%, transparent 65%); background-size: 250% 100%; animation: preview-shimmer 3s ease-in-out infinite; }
.animation-preview[data-preview="dot"] { padding-left: 32px; }
.animation-preview[data-preview="dot"] .preview-effect { position: absolute; left: 14px; top: calc(50% - 3px); width: 6px; height: 6px; border-radius: 50%; background: #69a9ff; animation: preview-dot 2s ease-out infinite; }
.animation-preview[data-preview="underline"] .preview-effect { position: absolute; bottom: 5px; left: 10px; right: 10px; height: 2px; overflow: hidden; }
.animation-preview[data-preview="underline"] .preview-effect::before { content: ''; display: block; width: 28%; height: 100%; border-radius: 2px; background: #69a9ff; animation: preview-underline 2s ease-in-out infinite alternate; }
@keyframes preview-breathe { 0%,100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes preview-shimmer { from { background-position: 150% 0; } to { background-position: -150% 0; } }
@keyframes preview-dot { 0% { box-shadow: 0 0 0 0 #69a9ff88; opacity: .65; } 65% { opacity: 1; } 100% { box-shadow: 0 0 0 8px #69a9ff00; opacity: .65; } }
@keyframes preview-underline { from { transform: translateX(0); } to { transform: translateX(255%); } }
@media (max-width: 720px) { .mobile-project-list .animation-preview { min-height: 40px; font-size: 14px; } }
@media (prefers-reduced-motion: reduce) {
  .animation-preview .preview-effect, .animation-preview .preview-effect::before { animation: none !important; }
  .animation-preview[data-preview="circulating"] .preview-effect, .animation-preview[data-preview="dash"] .preview-effect { background: #69a9ff; }
}

/* Two equal-length corner-to-corner paths. */
.animation-preview[data-preview="corner-split"] .preview-effect { position: absolute; inset: 0; }
.animation-preview[data-preview="corner-split"] svg { display: block; width: 100%; height: 100%; overflow: visible; }
.split-pulse { fill: none; stroke: #69a9ff; stroke-width: 1.6; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 12 200; stroke-dashoffset: 12; animation: preview-corner-split 3.4s linear infinite; }
.split-origin, .split-meeting { fill: #b8daff; opacity: 0; }
.split-origin { animation: preview-corner-origin 3.4s linear infinite; }
.split-meeting { animation: preview-corner-meeting 3.4s linear infinite; }
.animation-preview[data-preview="twin-orbit"] .preview-effect { background: conic-gradient(from var(--project-orbit-angle), transparent 0deg 145deg, #69a9ff 170deg, transparent 180deg 325deg, #69a9ff 350deg, transparent 360deg); animation: project-orbit 3.4s linear infinite; }
.animation-preview[data-preview="corner-beacons"] .preview-effect { position: absolute; inset: 1px; }
.animation-preview[data-preview="corner-beacons"] .preview-effect::before, .animation-preview[data-preview="corner-beacons"] .preview-effect::after { content: ''; position: absolute; width: 12px; height: 12px; border-color: #69a9ff; border-style: solid; animation: preview-beacons 2.6s ease-in-out infinite; }
.animation-preview[data-preview="corner-beacons"] .preview-effect::before { top: 0; left: 0; border-width: 1.5px 0 0 1.5px; border-radius: 6px 0 0; }
.animation-preview[data-preview="corner-beacons"] .preview-effect::after { bottom: 0; right: 0; border-width: 0 1.5px 1.5px 0; border-radius: 0 0 6px; animation-delay: -1.3s; }
.animation-preview[data-preview="halo"] { animation: preview-halo 3s ease-in-out infinite; }
.animation-preview[data-preview="halo"] .preview-effect { background: #69a9ff; opacity: .55; }
@keyframes preview-corner-split { 0% { stroke-dashoffset: 12; opacity: 0; } 8% { stroke-dashoffset: 0; opacity: 1; } 74% { stroke-dashoffset: -88; opacity: 1; } 82%,100% { stroke-dashoffset: -100; opacity: 0; } }
@keyframes preview-corner-origin { 0%,12% { opacity: .8; } 20%,100% { opacity: 0; } }
@keyframes preview-corner-meeting { 0%,68% { opacity: 0; } 76% { opacity: 1; } 90%,100% { opacity: 0; } }
@keyframes preview-beacons { 0%,100% { opacity: .2; } 50% { opacity: 1; } }
@keyframes preview-halo { 0%,100% { box-shadow: 0 0 0 0 #69a9ff00, inset 0 0 4px #69a9ff08; } 50% { box-shadow: 0 0 10px 1px #69a9ff33, inset 0 0 9px #69a9ff16; } }
@media (prefers-reduced-motion: reduce) {
  .animation-preview, .animation-preview .preview-effect *, .animation-preview .preview-effect::after { animation: none !important; }
  .split-pulse { stroke-dasharray: none; opacity: .7; }
  .animation-preview[data-preview="twin-orbit"] .preview-effect { background: #69a9ff; }
}

/* Long fading trails following the original split paths. */
.animation-preview[data-preview="corner-split-orbit"] .preview-effect { position: absolute; inset: 0; }
.animation-preview[data-preview="corner-split-orbit"] svg { display: block; width: 100%; height: 100%; overflow: visible; }
.split-orbit-pulse { fill: none; stroke: #69a9ff; stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-dasharray: 1.05 200; animation: preview-split-orbit 2.72s linear infinite; }
@keyframes preview-split-orbit { from { stroke-dashoffset: calc(var(--trail-offset) * 1px); } to { stroke-dashoffset: calc(var(--trail-offset) * 1px - 160px); } }
@media (prefers-reduced-motion: reduce) { .split-orbit-pulse { animation: none !important; stroke-dasharray: none; opacity: .035 !important; } }

.animation-settings { margin-top: 24px; padding-top: 18px; border-top: 1px solid #343a40; }
.animation-settings h3 { margin: 0; font-size: 15px; }
.animation-settings p { color: #9ca9b8; font-size: 12px; }
.animation-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.animation-options .animation-preview { padding-right: 28px; }
.animation-options .animation-preview[aria-pressed="true"] { background: #20334b; color: #e0eeff; }
.animation-options .animation-preview:disabled { cursor: wait; }
.preview-check { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #a9ceff; }
.animation-save-status { min-height: 16px; }
.project-row > .project-working-animation { position: absolute; inset: 0; width: auto; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: inherit; background: transparent; pointer-events: none; cursor: inherit; }
.project-row > .project-working-animation[hidden] { display: none; }
@media (max-width: 480px) { .animation-options { grid-template-columns: 1fr; } }
