/* frontend/src/forward-page.css */
body[data-view=forward] {
  overflow-y: auto;
  background: var(--home-bg);
}
.forward-page {
  min-width: 0;
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding: 36px 32px;
}
.forward-page .home-section-heading {
  align-items: center;
}
#dashboard .forward-new {
  min-height: 42px;
}
.forward-toolbar {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 4px 0 28px;
}
.forward-toolbar .forward-hint {
  margin: 0;
}
.forward-switch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(118px, 1fr));
  flex: 0 0 auto;
  padding: 4px;
  border: 1px solid var(--home-line);
  border-radius: 10px;
  background: #e9edf2;
  isolation: isolate;
}
.forward-switch::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 2);
  border-radius: 7px;
  background: var(--home-surface);
  box-shadow: 0 1px 5px #17203520;
  transition: transform 180ms ease;
}
.forward-switch[data-active-mode=isolated]::before {
  transform: translateX(100%);
}
#dashboard .forward-switch button {
  min-height: 36px;
  padding: 5px 15px;
  border-radius: 7px;
  background: transparent;
  color: var(--home-muted);
  font-weight: 600;
  white-space: nowrap;
}
#dashboard .forward-switch button[aria-pressed=true] {
  color: var(--home-ink);
}
.forward-list-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.forward-list-heading h2 {
  margin: 0;
  font-size: 17px;
}
.forward-list-heading span {
  color: var(--home-muted);
  font-size: 12px;
}
.forward-library [data-rule-message]:empty {
  display: none;
}
.forward-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.forward-rule {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 92px;
  border: 1px solid var(--home-line);
  border-radius: 16px;
  background: var(--home-surface);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.forward-rule:hover,
.forward-rule.selected {
  border-color: var(--home-accent);
  box-shadow: 0 4px 16px #1720350d;
}
#dashboard .forward-rule-select {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 14px;
  padding: 17px;
  background: transparent;
  text-align: left;
}
.forward-rule-symbol {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  height: 48px;
  border-radius: 13px;
  color: var(--home-surface);
  background: #596078;
  font-size: 23px;
  font-weight: 600;
}
.forward-rule-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 4px;
}
.forward-rule-copy strong,
.forward-rule-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.forward-rule-copy strong {
  font-size: 15px;
}
.forward-rule-copy small {
  color: var(--home-muted);
  font-size: 12px;
}
.forward-rule-actions {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding-right: 12px;
}
#dashboard .forward-rule-actions button {
  padding: 4px 8px;
  border-radius: 5px;
  background: transparent;
  color: var(--home-muted);
  font-size: 12px;
}
#dashboard .forward-rule-actions button:hover {
  background: var(--home-accent-soft);
  color: var(--home-accent-hover);
}
.forward-empty {
  grid-column: 1 / -1;
  padding: 42px 20px;
  border: 1px dashed var(--home-line);
  border-radius: 16px;
  background: var(--home-surface);
  text-align: center;
}
.forward-empty strong {
  font-size: 15px;
}
.forward-empty p {
  color: var(--home-muted);
  margin: 8px 0 0;
}
.forward-card {
  padding: 24px;
  margin-top: 24px;
  border: 1px solid var(--home-line);
  border-radius: 12px;
  background: var(--home-surface);
}
.forward-connection-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.forward-connection-heading h2 {
  margin: 0 0 4px;
  font-size: 18px;
}
.forward-connection-heading p {
  margin: 0;
  color: var(--home-muted);
  overflow-wrap: anywhere;
}
.forward-warning {
  border: 1px solid var(--home-accent);
  border-left-width: 4px;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 18px;
  background: var(--home-accent-soft);
}
.forward-warning p {
  margin: 6px 0 0;
  line-height: 1.7;
}
.forward-badge {
  padding: 6px 10px;
  border-radius: 5px;
  background: var(--home-accent-soft);
  color: var(--home-accent-hover);
  font-size: 12px;
  white-space: nowrap;
}
.forward-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
#dashboard .forward-form .forward-trust {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.7;
  font-weight: 400;
}
#dashboard .forward-form .forward-trust input {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 3px;
  accent-color: var(--home-accent);
}
.forward-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
#dashboard .forward-page .home-button {
  min-height: 44px;
}
.forward-hint {
  color: var(--home-muted);
  font-size: 13px;
  line-height: 1.8;
}
.forward-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--home-line);
  padding-top: 18px;
  margin-top: 18px;
  overflow-wrap: anywhere;
}
.forward-status [data-status].is-retained {
  flex: 1;
  border: 1px solid var(--home-accent);
  border-left-width: 4px;
  border-radius: 6px;
  padding: 12px 14px;
  background: var(--home-accent-soft);
  color: var(--home-ink);
  font-weight: 700;
  line-height: 1.6;
}
.forward-setup {
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid var(--home-line);
  border-radius: 10px;
  background: var(--home-surface);
  line-height: 1.8;
}
.forward-page code {
  font-family: var(--home-mono);
}
.forward-page [data-key-fingerprint] {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--home-mono);
}
.forward-page [data-preview-link] {
  display: inline-block;
  margin-top: 16px;
  overflow-wrap: anywhere;
}
.forward-rule-dialog {
  width: min(480px, calc(100vw - 32px));
}
.forward-rule-fields {
  display: grid;
  gap: 15px;
  margin: 20px 0;
}
.forward-rule-fields label {
  display: grid;
  gap: 7px;
  font-weight: 600;
}
#dashboard .forward-rule-fields :is(input, select) {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--home-line);
  border-radius: 6px;
  background: var(--home-bg);
  color: var(--home-ink);
  font-size: 15px;
}
.forward-page [hidden] {
  display: none !important;
}
@media (max-width: 850px) {
  .forward-rules {
    grid-template-columns: minmax(0, 1fr);
  }
  .forward-toolbar {
    align-items: start;
    flex-direction: column;
  }
}
@media (max-width: 600px) {
  .forward-page {
    padding: 24px 16px;
  }
  .forward-page .home-section-heading {
    align-items: start;
    flex-direction: column;
  }
  .forward-switch {
    width: 100%;
  }
  .forward-card {
    padding: 18px;
  }
  .forward-connection-heading,
  .forward-status {
    align-items: start;
    flex-direction: column;
  }
  .forward-form {
    align-items: stretch;
    flex-direction: column;
  }
  .forward-actions {
    width: 100%;
  }
  .forward-actions button {
    flex: 1;
  }
}

/* frontend/src/multi-exec.css */
.multi-exec-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.multi-exec-page[hidden] {
  display: none;
}
.multi-exec-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.multi-exec-hosts {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.multi-exec-hosts-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.multi-exec-hosts-heading h2 {
  margin: 0;
  font-size: 14px;
}
.multi-exec-hosts-heading span {
  font-size: 11px;
  color: var(--muted);
}
.multi-exec-host-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 50vh;
  overflow-y: auto;
}
.multi-exec-host {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  background: var(--surface);
}
.multi-exec-host:hover {
  border-color: var(--accent);
}
.multi-exec-host input {
  margin-top: 2px;
  accent-color: var(--accent);
}
.multi-exec-host-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.multi-exec-host-copy strong {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.multi-exec-host-copy small {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.multi-exec-empty {
  margin: 0;
  padding: 12px 4px;
  font-size: 12px;
  color: var(--muted);
}
.multi-exec-runner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.multi-exec-command-label {
  font-size: 12px;
  font-weight: 600;
}
.multi-exec-command {
  resize: vertical;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  outline: none;
}
.multi-exec-command:focus {
  border-color: var(--accent);
}
.multi-exec-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.multi-exec-presets button {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
}
.multi-exec-presets button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.multi-exec-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.multi-exec-summary {
  font-size: 12px;
  color: var(--muted);
}
.multi-exec-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.multi-exec-result {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  overflow: hidden;
}
.multi-exec-result.is-success {
  border-left: 3px solid var(--success, #2ea043);
}
.multi-exec-result.is-error {
  border-left: 3px solid var(--danger);
}
.multi-exec-result.is-running {
  border-left: 3px solid var(--accent);
}
.multi-exec-result header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.multi-exec-result header strong {
  font-size: 13px;
}
.multi-exec-result header small {
  font-size: 11px;
  color: var(--muted);
  margin-right: auto;
}
.multi-exec-status {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}
.multi-exec-status.is-success {
  color: var(--success, #2ea043);
  background: color-mix(in srgb, var(--success, #2ea043) 14%, transparent);
}
.multi-exec-status.is-error {
  color: var(--danger);
  background: var(--danger-dim);
}
.multi-exec-status.is-running {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.multi-exec-status.is-pending {
  color: var(--muted);
  background: var(--surface);
}
.multi-exec-result pre {
  margin: 0;
  padding: 10px 12px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface);
}
.multi-exec-result pre.is-stderr {
  color: var(--danger);
}
.multi-exec-note {
  margin: 0;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--danger);
}
.multi-exec-time {
  display: block;
  padding: 0 12px 8px;
  font-size: 10px;
  color: var(--muted);
}
@media (max-width: 760px) {
  .multi-exec-layout {
    grid-template-columns: 1fr;
  }
}

/* frontend/src/s3-browser.css */
.s3-browser-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.s3-browser-page[hidden] {
  display: none;
}
.s3-browser-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.s3-credential-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 460px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.s3-credential-form h2 {
  margin: 0 0 4px;
  font-size: 16px;
}
.s3-credential-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.s3-credential-form .field span {
  font-size: 12px;
  color: var(--muted);
}
.s3-credential-form input {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  outline: none;
  font-family: var(--mono);
}
.s3-credential-form input:focus {
  border-color: var(--accent);
}
.s3-form-actions {
  display: flex;
  gap: 10px;
}
.s3-hint {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.s3-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.s3-bucket-select {
  display: flex;
  align-items: center;
  gap: 8px;
}
.s3-bucket-select label {
  font-size: 12px;
  color: var(--muted);
}
.s3-bucket-select select {
  height: 36px;
  min-width: 220px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
}
.s3-upload-wrap {
  position: relative;
}
.s3-upload-wrap input[type=file] {
  display: none;
}
.s3-upload-wrap label.home-button {
  display: inline-block;
  cursor: pointer;
}
.s3-credential-meta {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
}
.s3-breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 12px;
}
.s3-breadcrumb button {
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 4px;
  border-radius: 4px;
}
.s3-breadcrumb button:hover {
  background: var(--surface-2);
}
.s3-object-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  padding: 8px;
}
.s3-object-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 13px;
  width: 100%;
}
.s3-object-row.is-prefix {
  cursor: pointer;
}
.s3-object-row.is-prefix:hover {
  border-color: var(--accent);
  background: var(--surface);
}
.s3-object-row svg {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.s3-object-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.s3-object-meta {
  flex: none;
  min-width: 70px;
  text-align: right;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
}
.s3-object-actions {
  display: flex;
  gap: 4px;
  flex: none;
}
.s3-object-actions button {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  cursor: pointer;
}
.s3-object-actions button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.s3-empty {
  margin: 0;
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.s3-error {
  margin: 0;
  padding: 16px;
  font-size: 13px;
  color: var(--danger);
}
button[data-retry] {
  align-self: flex-start;
}

/* frontend/src/audit-page.css */
body[data-view=audit] {
  overflow-y: auto;
  background: var(--home-bg);
}
body[data-view=audit] #dashboard :is(.home-search, .header-add) {
  display: none;
}
body[data-view=audit] .home-account {
  margin-left: auto;
}
.audit-page {
  min-width: 0;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding: 32px;
}
.audit-heading {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 20px;
}
.audit-heading h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}
.audit-heading p {
  margin: 6px 0 0;
  color: var(--home-muted);
  max-width: 560px;
}
#dashboard .audit-heading .home-button {
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
}
.audit-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.audit-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--home-muted);
  font-size: 13px;
}
#dashboard .audit-toolbar select {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--home-line);
  border-radius: 6px;
  color: var(--home-ink);
  background: var(--home-surface);
  font: inherit;
}
.audit-status {
  margin: 0 0 12px;
  color: var(--home-muted);
  overflow-wrap: anywhere;
}
.audit-list {
  display: grid;
  gap: 10px;
}
.audit-row {
  border: 1px solid var(--home-line);
  border-left: 3px solid var(--home-success);
  border-radius: 8px;
  background: var(--home-surface);
  padding: 14px 16px;
}
.audit-row[data-status=denied] {
  border-left-color: var(--home-accent);
}
.audit-row[data-status=error] {
  border-left-color: var(--home-danger);
}
.audit-row-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.audit-row-heading strong {
  font-size: 15px;
}
.audit-row-heading time {
  margin-left: auto;
  color: var(--home-muted);
  font-size: 12px;
}
.audit-badge {
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  background: #e7f6ee;
  color: var(--home-success);
}
.audit-badge.denied {
  background: var(--home-accent-soft);
  color: var(--home-accent-hover);
}
.audit-badge.error {
  background: #fdecea;
  color: var(--home-danger);
}
.audit-row-detail {
  margin: 8px 0 6px;
  color: var(--home-ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.audit-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0;
  color: var(--home-muted);
  font-size: 12px;
}
.audit-row-meta code {
  font: 12px/1.5 var(--home-mono);
  color: var(--home-muted);
}
.audit-more {
  margin-top: 16px;
}
@media (max-width: 700px) {
  .audit-page {
    padding: 24px 16px;
  }
  .audit-heading {
    flex-direction: column;
    align-items: stretch;
  }
  .audit-row-heading time {
    margin-left: 0;
    width: 100%;
  }
}

/* frontend/src/keychain.css */
body[data-view=keychain] {
  overflow-y: auto;
  background: var(--home-bg);
}
body[data-view=keychain] #dashboard :is(.home-search, .header-add) {
  display: none;
}
body[data-view=keychain] .home-account {
  margin-left: auto;
}
.keychain-page {
  min-width: 0;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding: 32px;
}
.keychain-heading,
.keychain-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 24px;
}
.keychain-heading h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}
.keychain-heading .home-button {
  gap: 8px;
}
.keychain-heading-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
#dashboard .keychain-heading [data-terminal] {
  width: 44px;
  height: 44px;
  padding: 10px;
}
.keychain-toolbar input {
  max-width: 440px;
  flex: 1;
  min-width: 0;
}
#dashboard .keychain-toolbar input,
#dashboard .keychain-copy textarea {
  padding: 10px 12px;
  border: 1px solid var(--home-line);
  border-radius: 6px;
  color: var(--home-ink);
  background: var(--home-surface);
  box-shadow: none;
}
#dashboard .keychain-toolbar input {
  min-height: 44px;
  font: inherit;
}
.keychain-status {
  color: var(--home-muted);
  overflow-wrap: anywhere;
}
.keychain-list {
  border-top: 1px solid var(--home-line);
}
.keychain-row {
  display: flex;
  gap: 18px;
  padding: 24px 0;
  border-bottom: 1px solid var(--home-line);
  align-items: flex-start;
}
.keychain-row > svg {
  margin-top: 4px;
  color: var(--home-success);
}
.keychain-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.keychain-copy strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}
.keychain-copy small {
  color: var(--home-muted);
}
.keychain-copy code {
  font: 12px/1.5 var(--home-mono);
  overflow-wrap: anywhere;
}
#dashboard .keychain-copy textarea {
  width: 100%;
  resize: vertical;
  min-height: 72px;
  font: 12px/1.5 var(--home-mono);
}
.keychain-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
#dashboard .keychain-actions .home-button,
#dashboard .keychain-toolbar .home-button {
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
}
.keychain-dialog {
  width: min(620px, calc(100vw - 24px));
}
#dashboard .keychain-dialog {
  border-radius: 8px;
}
.keychain-dialog form {
  min-width: 0;
}
.keychain-dialog h2 {
  margin: 0;
  font-size: 22px;
}
.keychain-dialog .credential-help {
  color: var(--home-muted);
  font-size: 12px;
}
.keychain-dialog textarea {
  font-family: var(--home-mono);
}
.keychain-key-actions {
  display: flex;
  justify-content: flex-end;
}
.keychain-key-actions .home-button {
  gap: 8px;
  min-width: 100px;
}
@media (max-width: 700px) {
  .keychain-page {
    padding: 24px 16px;
  }
  .keychain-row {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 12px;
  }
  .keychain-actions {
    grid-column: 2;
  }
  #dashboard .keychain-toolbar input {
    font-size: 16px;
  }
}

/* frontend/src/dashboard.css */
:root {
  --home-bg: #fafbfd;
  --home-surface: #ffffff;
  --home-ink: #111827;
  --home-muted: #667085;
  --home-line: #e9ecf1;
  --home-accent: #f4511e;
  --home-accent-hover: #d53b0a;
  --home-accent-soft: #fff0e9;
  --home-danger: #b42318;
  --home-success: #0b7a4b;
  --home-shadow: #1720351a;
  --home-overlay: #11182766;
  --home-font:
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  --home-display:
    "Segoe UI Variable Display",
    "Segoe UI",
    "PingFang SC",
    sans-serif;
  --home-mono:
    "Cascadia Code",
    Consolas,
    monospace;
}
html,
body {
  overflow-x: clip;
}
body[data-view=dashboard] {
  overflow-y: auto;
  background: var(--home-bg);
}
#dashboard {
  min-height: 100dvh;
  color: var(--home-ink);
  background: var(--home-bg);
  font-family: var(--home-font);
  font-size: 14px;
  line-height: 1.5;
  color-scheme: light;
}
#dashboard svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}
#dashboard button {
  border: 0;
  font: inherit;
  cursor: pointer;
  transition:
    background 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}
#dashboard button:disabled {
  cursor: wait;
  opacity: .5;
}
#dashboard button:active:not(:disabled) {
  transform: translateY(1px);
}
#dashboard :is(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--home-accent);
  outline-offset: 3px;
}
#dashboard a {
  color: inherit;
}
#dashboard h1,
#dashboard h2 {
  font-family: var(--home-display);
  font-style: normal;
  overflow-wrap: anywhere;
  min-width: 0;
}
.home-header {
  min-height: 80px;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--home-line);
  background: var(--home-surface);
}
.home-brand {
  display: inline-flex;
  gap: 0;
  align-items: center;
  text-decoration: none;
  font-family: var(--home-display);
  font-weight: 750;
  font-size: 23px;
  letter-spacing: -.7px;
  white-space: nowrap;
}
.home-brand > span:last-child {
  color: var(--home-accent);
}
.brand-chevron {
  margin-right: 14px;
  color: var(--home-accent);
  font-family: var(--home-mono);
  font-size: 30px;
}
.home-search {
  max-width: 480px;
  min-width: 160px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--home-bg);
  border: 1px solid var(--home-line);
  border-radius: 9px;
  padding: 0 14px;
  color: var(--home-muted);
}
#dashboard .home-search input {
  min-width: 0;
  width: 100%;
  height: 44px;
  border: none;
  padding: 0;
  background: transparent;
  color: var(--home-ink);
  box-shadow: none;
}
.home-search kbd {
  white-space: nowrap;
  font-size: 11px;
  padding: 1px 5px;
  border: 1px solid var(--home-line);
  border-radius: 4px;
  font-family: var(--home-mono);
}
#dashboard .home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid var(--home-line);
  border-radius: 7px;
  background: var(--home-surface);
  color: var(--home-ink);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}
#dashboard .home-button:hover {
  background: var(--home-bg);
  border-color: var(--home-muted);
}
#dashboard .home-button.primary {
  background: var(--home-accent);
  color: var(--home-surface);
  border-color: var(--home-accent);
}
#dashboard .home-button.primary:hover {
  background: var(--home-accent-hover);
  border-color: var(--home-accent-hover);
}
.header-add {
  margin-left: auto;
}
.home-account {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 12px;
  min-width: 0;
}
.account-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--home-line);
  border-radius: 50%;
  font-weight: 700;
  flex-shrink: 0;
}
#account-label {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-account a {
  color: var(--home-muted) !important;
  padding: 12px 0;
  text-decoration: none;
}
.home-layout {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  min-height: calc(100dvh - 80px);
}
.home-rail {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 20px 10px;
  gap: 14px;
  border-right: 1px solid var(--home-line);
  background: var(--home-surface);
}
#dashboard .rail-item {
  min-height: 74px;
  padding: 12px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: none;
  color: var(--home-muted);
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
}
#dashboard .rail-item.selected {
  color: var(--home-accent-hover);
  background: var(--home-accent-soft);
  box-shadow: inset 2px 0 var(--home-accent);
}
#dashboard .rail-item:hover {
  background: var(--home-bg);
  color: var(--home-accent);
}
.rail-security {
  margin-top: auto;
  padding: 24px 0 4px;
  text-align: center;
  color: var(--home-muted);
  font-size: 10px;
}
.rail-security svg {
  display: block;
  margin: 0 auto 8px;
  color: var(--home-success);
}
.home-content {
  width: 100%;
  max-width: 1450px;
  margin-inline: auto;
  padding: 36px 32px 20px;
  min-width: 0;
}
.home-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 490px;
}
.hosts-pane {
  padding-right: 28px;
  min-width: 0;
}
.home-section-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 23px;
}
.home-eyebrow {
  font-family: var(--home-mono);
  font-size: 10px;
  letter-spacing: 1.6px;
  font-weight: 500;
  margin: 0 0 10px;
  color: var(--home-muted);
}
.home-section-heading h1 {
  margin: 0;
  font-size: 29px;
  line-height: 1.3;
  letter-spacing: -.9px;
  font-weight: 700;
}
.home-section-heading p:last-child {
  margin: 8px 0 0;
  color: var(--home-muted);
  font-size: 13px;
}
.host-filters {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--home-line);
  margin-bottom: 12px;
}
#dashboard .host-filters button {
  padding: 12px 2px;
  color: var(--home-muted);
  background: none;
  font-size: 12px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
#dashboard .host-filters button.active {
  color: var(--home-ink);
  border-color: var(--home-accent);
}
.host-filter-divider {
  flex: 0 0 auto;
  width: 1px;
  align-self: stretch;
  margin: 10px 0;
  background: var(--home-line);
}
#dashboard .host-filters button.tag-chip {
  font-size: 11px;
}
.host-list {
  min-height: 282px;
  max-height: 480px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.host-group-heading {
  font-size: 12px;
  font-weight: 650;
  margin: 18px 0 9px;
  color: var(--home-muted);
}
.host-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 190px auto auto 24px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--home-line);
  border-radius: 8px;
  margin-bottom: 9px;
  padding: 14px 12px;
  background: var(--home-surface);
}
.host-row:hover {
  border-color: var(--home-accent);
  background: var(--home-accent-soft);
}
.host-symbol {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--home-bg);
  width: 36px;
  height: 36px;
  color: var(--home-muted);
  overflow: hidden;
}
.host-symbol svg {
  width: 22px;
  height: 22px;
}
.host-os-tile {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  color: #fff;
  background: var(--host-os-color);
}
#dashboard .host-os-tile svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  stroke: none;
}
#dashboard .host-os-tile path {
  fill: currentColor;
  stroke: none;
}
.host-copy {
  min-width: 0;
}
.host-copy strong {
  display: block;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.host-copy > span {
  display: block;
  font-size: 12px;
  color: var(--home-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
  font-family: var(--home-mono);
}
.host-copy > .host-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  overflow: visible;
  white-space: normal;
  font-family: inherit;
}
.host-tag {
  font-size: 10px;
  line-height: 1.5;
  padding: 1px 6px;
  border: 1px solid var(--home-line);
  border-radius: 999px;
  color: var(--home-muted);
  background: var(--home-bg);
}
.host-location {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 6px;
  width: min(190px, 100%);
  font-size: 12px;
  color: var(--home-muted);
  white-space: nowrap;
}
.host-location-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.host-location.unknown .host-location-text {
  grid-column: 1 / 3;
}
#dashboard .host-location-refresh {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--home-muted);
}
#dashboard .host-location-refresh:hover,
#dashboard .host-location-refresh:focus-visible {
  color: var(--home-accent-hover);
  background: var(--home-accent-soft);
}
#dashboard .host-location-refresh:disabled {
  opacity: .45;
  cursor: wait;
}
#dashboard .host-location-refresh svg {
  width: 15px;
  height: 15px;
}
@media (pointer: coarse) {
  #dashboard .host-location-refresh {
    width: 40px;
    height: 40px;
  }
}
.country-flag {
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 1px;
}
.host-location .country-flag {
  width: 30px;
  height: 22.5px;
  align-self: center;
}
#dashboard .connect-host {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 13px;
}
#dashboard .host-row-action {
  padding: 8px 1px;
  background: none;
  color: var(--home-muted);
  font-size: 12px;
  min-height: 36px;
  white-space: nowrap;
}
#dashboard .host-row-action:hover {
  color: var(--home-accent-hover);
}
#dashboard .host-row-action.delete {
  font-size: 20px;
}
.host-list-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--home-line);
  padding-top: 10px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--home-muted);
}
#dashboard .home-text-button {
  background: none;
  color: var(--home-muted);
  padding: 8px 0;
  font-size: 12px;
  white-space: nowrap;
}
#dashboard .home-text-button:hover {
  color: var(--home-accent-hover);
}
.home-empty {
  text-align: center;
  padding: 70px 16px;
  color: var(--home-muted);
}
.home-empty svg {
  display: block;
  margin: 0 auto 16px;
  color: var(--home-accent);
}
.home-empty strong {
  display: block;
  color: var(--home-ink);
  font-size: 16px;
  font-weight: 500;
}
.home-empty p {
  font-size: 12px;
  margin: 8px 0 0;
}
.globe-pane {
  position: relative;
  min-width: 0;
  padding: 0 0 0 24px;
  border-left: 1px solid var(--home-line);
  background-image: radial-gradient(var(--home-line) .75px, transparent .75px);
  background-size: 12px 12px;
}
.globe-heading {
  position: absolute;
  top: 4px;
  left: 26px;
  z-index: 15;
  pointer-events: none;
}
.globe-heading h2 {
  margin: 0;
  font-size: clamp(21px, 2vw, 28px);
  letter-spacing: -.8px;
  line-height: 1.35;
  font-weight: 650;
}
.globe-heading h2 span {
  color: var(--home-accent);
}
.globe-heading > p:last-child {
  color: var(--home-muted);
  font-size: 12px;
  margin-top: 8px;
}
.host-globe {
  width: min(100%, 520px);
  aspect-ratio: 1;
  margin: 38px auto 0;
  position: relative;
}
.host-globe canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: pan-y;
}
.host-globe canvas:active {
  cursor: grabbing;
}
#dashboard .globe-marker {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 0;
  margin: -10px 0 0 -10px;
  background: transparent;
  text-align: left;
  color: var(--home-ink);
}
.globe-pin {
  display: block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--home-surface);
  border-radius: 50%;
  background: var(--home-accent);
  box-shadow: 0 0 0 4px var(--home-accent-soft), 0 3px 12px var(--home-shadow);
  flex-shrink: 0;
}
.globe-label {
  display: block;
  max-width: 105px;
  border: 1px solid var(--home-line);
  padding: 6px 10px;
  border-radius: 7px;
  background: var(--home-surface);
  box-shadow: 0 2px 10px var(--home-shadow);
}
.globe-label strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.globe-label small {
  display: block;
  font-size: 10px;
  color: var(--home-muted);
}
.globe-marker.compact .globe-label {
  display: none;
}
.globe-marker:hover .globe-label,
.globe-marker:focus-visible .globe-label {
  display: block;
}
.globe-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  color: var(--home-muted);
  font-size: 12px;
}
.globe-caption {
  margin: 0;
  padding: 0 16px;
  color: var(--home-muted);
  font-size: 10px;
}
.home-bottom {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 16px;
}
.storage-note,
#dashboard .quick-card {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--home-line);
  border-radius: 9px;
  background: var(--home-surface);
  padding: 23px;
  text-align: left;
}
.storage-note > svg {
  color: var(--home-accent);
}
.storage-note strong,
.quick-card strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.storage-note p,
.quick-card small {
  display: block;
  margin: 5px 0 0;
  font-size: 11px;
  color: var(--home-muted);
}
.storage-tag {
  margin-left: auto;
  color: var(--home-success);
  font-size: 10px;
  white-space: nowrap;
  font-family: var(--home-mono);
}
#dashboard .quick-card {
  color: var(--home-ink);
}
#dashboard .quick-card:hover {
  border-color: var(--home-accent);
}
.quick-card > span:last-child {
  margin-left: auto;
  color: var(--home-accent);
  font-size: 22px;
}
.home-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  margin-top: 20px;
  color: var(--home-muted);
  font-size: 10px;
}
.home-footer a {
  text-decoration: none;
}
.home-notice {
  border: 1px solid var(--home-line);
  border-left: 3px solid var(--home-accent);
  background: var(--home-surface);
  padding: 12px 16px;
  margin-bottom: 18px;
  border-radius: 5px;
  overflow-wrap: anywhere;
}
.topbar-actions .home-back {
  width: auto;
  min-width: 0;
  padding-inline: 10px;
  overflow: hidden;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.host-dialog {
  width: min(540px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  padding: 28px;
  border: 1px solid var(--home-line);
  border-radius: 14px;
  color: var(--home-ink);
  background: var(--home-surface);
  box-shadow: 0 20px 80px var(--home-shadow);
}
.host-dialog::backdrop {
  background: var(--home-overlay);
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.dialog-heading h2 {
  margin: 0;
  font-size: 23px;
}
.dialog-heading .home-eyebrow {
  margin-bottom: 5px;
}
.dialog-intro {
  color: var(--home-muted);
  font-size: 12px;
  margin: 14px 0 20px;
}
.host-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.host-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--home-ink);
  font-size: 12px;
  min-width: 0;
}
.host-form-grid .wide {
  grid-column: 1 / -1;
}
#dashboard .host-form-grid :is(input, select, textarea) {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--home-line);
  border-radius: 6px;
  color: var(--home-ink);
  background: var(--home-bg);
  box-shadow: none;
  font-family: var(--home-font);
}
.host-form-grid small {
  color: var(--home-muted);
  font-size: 11px;
}
.host-advanced {
  margin-top: 20px;
  font-size: 12px;
}
.host-advanced summary {
  padding: 6px 0 12px;
  cursor: pointer;
}
.host-form-disclosure {
  margin-top: 18px;
  font-size: 11px;
  color: var(--home-muted);
}
.host-form-error {
  color: var(--home-danger);
  font-size: 12px;
}
.host-form-error.is-success {
  color: var(--home-success, #15803d);
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
@media (min-width: 1600px) {
  .home-content {
    padding-top: 44px;
  }
  .home-main-grid {
    min-height: 570px;
  }
}
@media (max-width: 1250px) {
  .home-header {
    gap: 18px;
    padding-inline: 20px;
  }
  #account-label {
    display: none;
  }
  .home-content {
    padding: 28px 22px;
  }
  .home-layout {
    grid-template-columns: 86px minmax(0, 1fr);
  }
  .hosts-pane {
    padding-right: 18px;
  }
  .host-row {
    grid-template-columns: 32px minmax(0, 1fr) auto auto 22px;
    gap: 8px;
  }
  .host-location {
    grid-column: 2;
    grid-row: 2;
    max-width: none;
  }
  .host-row .connect-host {
    grid-column: 3;
    grid-row: 1 / 3;
  }
  .host-row .host-row-action {
    grid-column: 4;
    grid-row: 1 / 3;
  }
  .host-row .host-row-action.delete {
    grid-column: 5;
  }
  .storage-tag {
    display: none;
  }
  .host-globe {
    margin-top: 95px;
  }
}
@media (max-width: 950px) {
  .home-main-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hosts-pane {
    padding-right: 0;
  }
  .globe-pane {
    margin-top: 30px;
    padding: 0;
    border-left: 0;
    border-top: 1px solid var(--home-line);
  }
  .globe-heading {
    top: 22px;
    left: 16px;
  }
  .host-globe {
    max-width: 420px;
    margin-top: 24px;
  }
  .home-bottom {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-search kbd {
    display: none;
  }
}
@media (max-width: 600px) {
  .home-header {
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 12px;
  }
  .home-brand {
    font-size: 21px;
  }
  .home-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }
  .home-account {
    margin-left: auto;
  }
  #dashboard .header-add {
    display: none;
  }
  .home-layout {
    display: block;
  }
  .home-rail {
    flex-direction: row;
    gap: 8px;
    padding: 8px 16px;
    border-right: none;
    border-bottom: 1px solid var(--home-line);
  }
  #dashboard .rail-item {
    min-height: 44px;
    padding: 8px 12px;
    flex-direction: row;
    gap: 6px;
  }
  .rail-security {
    display: none;
  }
  .home-content {
    padding: 24px 16px 20px;
  }
  .home-section-heading {
    gap: 12px;
    align-items: flex-start;
  }
  .home-section-heading h1 {
    font-size: 25px;
  }
  .home-section-heading p:last-child {
    font-size: 12px;
  }
  .home-eyebrow {
    font-size: 9px;
  }
  #dashboard .home-section-heading .home-button {
    font-size: 12px;
    padding-inline: 10px;
  }
  .host-filters {
    gap: 12px;
  }
  .host-row {
    grid-template-columns: 28px minmax(0, 1fr) auto 30px;
    gap: 7px;
    padding: 11px 9px;
  }
  .host-row .host-row-action:not(.delete) {
    grid-row: 2;
    grid-column: 3;
  }
  .host-row .host-row-action.delete {
    grid-column: 4;
  }
  .host-row .connect-host {
    grid-row: 1;
  }
  .host-copy strong {
    font-size: 13px;
  }
  .host-copy > span {
    font-size: 11px;
  }
  .host-symbol {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }
  #dashboard .host-os-tile svg {
    width: 17px;
    height: 17px;
  }
  .host-list {
    max-height: none;
  }
  .globe-heading h2 {
    font-size: 22px;
  }
  .globe-heading > p:last-child {
    font-size: 11px;
  }
  .host-globe {
    margin-top: 56px;
  }
  .globe-label {
    max-width: 82px;
    padding: 5px 7px;
  }
  .globe-label strong {
    font-size: 10px;
  }
  .globe-pin {
    width: 20px;
    height: 20px;
  }
  .storage-note,
  #dashboard .quick-card {
    padding: 18px 16px;
    gap: 12px;
  }
  .storage-note p {
    line-height: 1.8;
  }
  .host-dialog {
    padding: 20px;
  }
  #dashboard .host-form-grid :is(input, select, textarea),
  #dashboard .home-search input {
    font-size: 16px;
  }
  .home-footer {
    font-size: 10px;
    line-height: 1.8;
  }
}
@media (prefers-reduced-motion: reduce) {
  #dashboard * {
    transition: none !important;
  }
}
@media (max-width: 620px) {
  .topbar .topbar-actions {
    gap: 6px;
  }
  .topbar-actions .home-back {
    flex: 0 1 auto;
    padding-inline: 7px;
    font-size: 11px;
  }
}

/* frontend/src/file-page.css */
body[data-view=files] {
  height: auto;
  min-height: 100%;
  overflow-y: auto;
  background: var(--home-bg);
}
.files-page {
  --surface: var(--home-surface);
  --surface-2: var(--home-bg);
  --surface-3: var(--home-line);
  --panel: var(--home-surface);
  --border: var(--home-line);
  --border-soft: var(--home-line);
  --text: var(--home-ink);
  --muted: var(--home-muted);
  --muted-2: var(--home-muted);
  --accent: var(--home-accent-hover);
  --accent-dim: var(--home-accent-soft);
  --danger: var(--home-danger);
  --danger-dim: var(--home-accent-soft);
  --warning: var(--home-accent-hover);
  --sans: var(--home-font);
  --mono: var(--home-mono);
  min-width: 0;
  width: 100%;
  max-width: 1700px;
  margin-inline: auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.files-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.files-heading h1 {
  margin: 0;
  font-size: 29px;
  line-height: 1.3;
  letter-spacing: -.8px;
}
.files-heading p:last-child {
  margin: 8px 0 0;
  color: var(--home-muted);
}
.files-connection {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--home-line);
  border-radius: 10px;
  background: var(--home-surface);
}
.files-host-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--home-accent-soft);
  color: var(--home-accent-hover);
  flex-shrink: 0;
}
.files-host-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  max-width: 510px;
  min-width: 0;
  color: var(--home-muted);
  font-size: 12px;
}
#dashboard .files-host-field select {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 32px 0 12px;
  color: var(--home-ink);
  background: var(--home-bg);
  border: 1px solid var(--home-line);
  border-radius: 6px;
  font: 13px var(--home-mono);
}
#files-connect {
  margin-top: 24px;
  min-width: 104px;
}
.files-connection-meta {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  font-size: 12px;
  color: var(--home-muted);
  text-align: right;
}
.files-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--home-muted);
  font-weight: 600;
}
.files-state::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.files-state[data-state=connected] {
  color: var(--home-success);
}
.files-state[data-state=error] {
  color: var(--home-danger);
}
.files-state[data-state=connecting] {
  color: var(--home-accent-hover);
}
.files-notice {
  margin: 0;
  padding: 10px 14px;
  border-left: 3px solid var(--home-accent);
  background: var(--home-accent-soft);
  color: var(--home-ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.files-notice.error {
  color: var(--home-danger);
  border-color: var(--home-danger);
}
.files-browser {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--home-line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--home-surface);
}
.files-browser-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--home-line);
}
.files-browser-heading strong {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}
.files-browser-heading strong svg {
  color: var(--home-accent-hover);
}
.files-browser-heading > span {
  color: var(--home-muted);
  font: 11px var(--home-mono);
}
.files-panel-slot {
  display: grid;
  min-width: 0;
  height: clamp(390px, calc(100dvh - 490px), 850px);
}
.files-page .file-manager {
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.files-page .file-toolbar {
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
}
.files-page .file-path-field {
  flex-basis: 100%;
}
.files-page .file-path-field input {
  height: 40px;
  font-size: 13px;
  padding-inline: 12px;
}
.files-page .file-actions {
  flex: 1;
  flex-wrap: wrap;
  gap: 6px;
  overflow: visible;
}
#dashboard .files-page .file-action {
  min-width: 38px;
  height: 38px;
  border: 1px solid var(--home-line);
  background: var(--home-surface);
  font-size: 14px;
}
#dashboard .files-page .file-view-controls .file-action {
  min-width: 44px;
  height: 44px;
}
#dashboard .files-page .file-action-wide {
  padding-inline: 14px;
  font-size: 13px;
  font-weight: 500;
}
#dashboard .files-page #file-upload {
  background: var(--home-accent-hover);
  color: var(--home-surface);
  border-color: var(--home-accent-hover);
}
#dashboard .files-page #file-delete {
  color: var(--home-danger);
  margin-left: auto;
}
#dashboard .files-page button:disabled {
  cursor: not-allowed;
}
.files-page .file-tree {
  background: var(--home-bg);
}
.files-page .file-tree-header {
  height: 42px;
  padding-inline: 14px;
  background: var(--home-bg);
  font-size: 12px;
  text-transform: none;
}
#dashboard .files-page .file-tree-collapse {
  width: 30px;
  height: 30px;
  font-size: 14px;
}
.files-page .file-manager:has(> .file-tree.is-collapsed) {
  grid-template-columns: 40px minmax(0, 1fr);
}
.files-page .file-tree-scroller {
  padding-block: 8px;
}
.files-page .file-tree-row {
  min-height: 34px;
  gap: 8px;
  font-size: 12px;
}
.files-page .file-tree-icon {
  font-size: 14px;
}
.files-page .file-table {
  font-size: 12px;
}
.files-page .file-table th {
  height: 42px;
  padding-inline: 12px;
  font-size: 12px;
  font-weight: 500;
  border-right: 0;
}
.files-page .file-table td {
  height: 42px;
  padding-inline: 12px;
}
.files-page .file-table th:first-child {
  width: 32%;
}
.files-page .file-table th:nth-child(6),
.files-page .file-table th:nth-child(7) {
  width: 8.5%;
}
.files-page .file-kind-icon {
  width: 20px;
  flex-basis: 20px;
  font-size: 16px;
}
.files-page .file-manager-state {
  font-size: 14px;
  line-height: 1.8;
}
.files-page .file-statusbar {
  min-height: 42px;
  padding: 8px 16px;
  font-size: 11px;
  flex-wrap: wrap;
}
.files-page .file-progress {
  max-width: 100%;
}
.files-page .file-manager:fullscreen .file-toolbar {
  gap: 8px;
  padding: 8px 12px;
}
.files-page .file-manager:fullscreen .file-path-field {
  flex-basis: 260px;
}
#dashboard .files-page .file-progress-cancel {
  height: 30px;
  color: var(--home-ink);
  background: var(--home-bg);
}
.files-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--home-muted);
  font-size: 12px;
}
body[data-view=files] #dashboard .home-search,
body[data-view=files] #dashboard .header-add {
  display: none;
}
body[data-view=files] .home-account {
  margin-left: auto;
}
@media (max-width: 1100px) {
  .files-page {
    padding: 24px;
  }
  .files-connection {
    flex-wrap: wrap;
  }
  .files-connection-meta {
    flex-basis: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .files-page .file-manager {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .files-page .file-table :is(th, td):nth-child(n+5) {
    display: none;
  }
}
@media (max-width: 600px) {
  .files-page {
    padding: 20px 12px;
    gap: 16px;
  }
  .files-heading {
    align-items: flex-start;
  }
  .files-heading h1 {
    font-size: 25px;
  }
  .files-heading p:last-child {
    font-size: 12px;
  }
  #dashboard #files-terminal {
    min-height: 44px;
    padding-inline: 10px;
    font-size: 12px;
  }
  .files-connection {
    padding: 14px;
    gap: 12px;
  }
  .files-host-icon {
    display: none;
  }
  .files-host-field {
    flex-basis: calc(100% - 116px);
  }
  #dashboard .files-host-field select {
    height: 44px;
    font-size: 16px;
  }
  #files-connect {
    min-height: 44px;
  }
  .files-connection-meta {
    align-items: flex-start;
    text-align: left;
    font-size: 11px;
  }
  .files-connection-meta > span:last-child {
    max-width: 65%;
  }
  .files-browser-heading {
    padding: 14px 12px;
  }
  .files-browser-heading > span {
    font-size: 10px;
  }
  .files-page .file-toolbar {
    padding: 12px;
  }
  .files-page .file-path-field input {
    font-size: 16px;
    height: 44px;
  }
  #dashboard .files-page .file-action {
    min-width: 44px;
    height: 44px;
  }
  #dashboard .files-page .file-action-wide {
    padding-inline: 10px;
  }
  .files-page .file-action-separator {
    display: none;
  }
  .files-page .file-manager {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "toolbar" "table" "status";
  }
  .files-page .file-manager > .file-tree {
    display: none;
  }
  .files-page .file-manager:has(> .file-tree.is-collapsed) {
    grid-template-columns: minmax(0, 1fr);
  }
  .files-page .file-table th:first-child {
    width: 48%;
  }
  .files-page .file-table th:nth-child(2) {
    width: 20%;
  }
  .files-page .file-table th:nth-child(4) {
    width: 32%;
  }
  .files-page .file-table :is(th, td):nth-child(3) {
    display: none;
  }
  .files-page .file-table td {
    height: 48px;
  }
  .files-panel-slot {
    height: 560px;
  }
  .files-footer {
    flex-direction: column;
    gap: 6px;
  }
  #dashboard .home-rail {
    gap: 4px;
    padding-inline: 8px;
    justify-content: space-between;
  }
  #dashboard .rail-item {
    padding-inline: 8px;
    font-size: 11px;
  }
  #dashboard .rail-item svg {
    width: 18px;
    height: 18px;
  }
}

/* frontend/src/file-list.css */
.files-page .file-table-wrap:has(.files-list) {
  overflow: hidden;
}
.files-list {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  color: var(--home-ink);
  font: 12px var(--home-mono);
}
.files-list-columns {
  display: grid;
  grid-template-columns: minmax(0, 3.2fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.8fr) repeat(3, minmax(0, .85fr));
  align-items: center;
  height: 100%;
}
.files-list-columns > span {
  min-width: 0;
  padding-inline: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.files-list-header {
  flex: 0 0 42px;
  height: 42px;
  border-bottom: 1px solid var(--home-line);
  background: var(--home-bg);
  color: var(--home-muted);
  font: 500 12px var(--home-font);
}
.files-list-viewport {
  flex: 1;
  min-height: 0;
}
.files-list-viewport [role=tree] {
  outline: none;
}
.files-list-row {
  cursor: pointer;
  border-bottom: 1px solid var(--home-line);
}
.files-list-row:hover {
  background: var(--home-bg);
}
.files-list-row.is-selected {
  background: var(--home-accent-soft);
}
.files-list-viewport:focus-within .files-list-row:focus {
  outline: 2px solid var(--home-accent-hover);
  outline-offset: -2px;
}
.files-list-viewport [role=tree]:focus-visible {
  outline: 2px solid var(--home-accent-hover);
  outline-offset: -2px;
}
.files-list-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}
.files-list-name > span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.files-list-meta {
  color: var(--home-muted);
  font-variant-numeric: tabular-nums;
}
.files-list-icon {
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--home-muted);
}
.files-list-icon.is-folder {
  color: var(--home-accent-hover);
  fill: var(--home-accent-soft);
}
.files-list-icon.is-archive {
  color: var(--home-accent-hover);
}
@media (max-width: 1100px) {
  .files-list-columns {
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.8fr);
  }
  .files-list-columns > :is(.column-3, .column-4, .column-5) {
    display: none;
  }
}
@media (max-width: 600px) {
  .files-list-columns {
    grid-template-columns: minmax(0, 1fr) 72px 104px;
  }
  .files-list-columns > .column-1 {
    display: none;
  }
  .files-list-columns > span {
    padding-inline: 8px;
  }
  .files-list-name {
    gap: 7px;
  }
  .files-list-meta {
    font-size: 11px;
  }
}

/* frontend/src/snippets.css */
.snippet-surface {
  --snip-bg: var(--panel);
  --snip-card: var(--surface);
  --snip-soft: var(--surface-2);
  --snip-text: var(--text);
  --snip-muted: var(--muted);
  --snip-border: var(--border);
  --snip-accent: var(--accent);
  --snip-accent-soft: var(--accent-dim);
  --snip-danger: var(--danger);
  color: var(--snip-text);
  background: var(--snip-bg);
}
.snippet-page,
body[data-view=snippets] .snippet-dialog {
  --snip-bg: var(--home-bg);
  --snip-card: var(--home-surface);
  --snip-soft: var(--home-bg);
  --snip-text: var(--home-ink);
  --snip-muted: var(--home-muted);
  --snip-border: var(--home-line);
  --snip-accent: var(--home-success);
  --snip-accent-soft: #e8f5ee;
  --snip-danger: var(--home-danger);
  color-scheme: light;
}
body[data-view=snippets] {
  overflow-y: auto;
  background: var(--home-bg);
}
.snippet-surface button {
  min-height: 36px;
  border: 1px solid var(--snip-border);
  border-radius: 7px;
  padding: 7px 10px;
  color: var(--snip-text);
  background: var(--snip-card);
  cursor: pointer;
  font-size: 12px;
  transition: background 150ms ease, border-color 150ms ease;
}
.snippet-surface button:hover:not(:disabled) {
  background: var(--snip-soft);
  border-color: var(--snip-accent);
}
.snippet-surface button:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.snippet-surface :is(button, input, textarea):focus-visible {
  outline: 2px solid var(--snip-accent);
  outline-offset: 2px;
}
.snippet-surface button.snippet-primary,
.snippet-surface button.snippet-use {
  color: var(--snip-accent);
  background: var(--snip-accent-soft);
  font-weight: 600;
}
.snippet-symbol {
  color: var(--snip-accent);
  font: 700 20px var(--mono);
  white-space: nowrap;
}
.snippet-page {
  min-width: 0;
  padding: 36px 32px;
  width: 100%;
  max-width: 1450px;
  margin-inline: auto;
}
.snippet-page-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 32px;
}
.snippet-open-terminal {
  margin-left: auto;
  white-space: nowrap;
}
.snippet-page-heading > .snippet-symbol {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  background: var(--snip-accent-soft);
  border-radius: 16px;
  font-size: 26px;
  flex-shrink: 0;
}
.snippet-page-heading h1 {
  font-size: 28px;
  margin: 4px 0 8px;
}
.snippet-page-heading p {
  margin: 0;
  color: var(--snip-muted);
  font-size: 13px;
}
.snippet-page-heading p:first-child {
  font: 10px var(--mono);
  letter-spacing: 1.6px;
}
.snippet-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.snippet-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 120px;
  padding: 0 12px;
  border: 1px solid var(--snip-border);
  border-radius: 8px;
  background: var(--snip-card);
}
.snippet-search > span {
  color: var(--snip-muted);
  font-size: 24px;
}
.snippet-surface .snippet-search input {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 0;
  box-shadow: none;
  background: transparent;
  color: var(--snip-text);
  padding: 0;
}
.snippet-status {
  font-size: 12px;
  color: var(--snip-muted);
  margin: 14px 0;
  line-height: 1.5;
}
.snippet-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 14px;
}
.snippet-card {
  min-width: 0;
  border: 1px solid var(--snip-border);
  border-radius: 12px;
  padding: 18px;
  background: var(--snip-card);
}
.snippet-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}
.snippet-card pre {
  margin: 0 0 16px;
  padding: 12px;
  background: var(--snip-soft);
  border-radius: 6px;
  color: var(--snip-text);
  font: 12px/1.6 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 160px;
  overflow-y: auto;
}
.snippet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.snippet-actions .snippet-delete {
  margin-left: auto;
  color: var(--snip-muted);
}
.snippet-actions .snippet-delete:hover {
  color: var(--snip-danger);
}
.snippet-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 16px;
  color: var(--snip-muted);
}
.snippet-empty .snippet-symbol {
  display: block;
  font-size: 32px;
  margin-bottom: 24px;
}
.snippet-empty strong {
  display: block;
  color: var(--snip-text);
}
.snippet-empty p {
  font-size: 13px;
  line-height: 1.6;
}
.terminal-card:has(> .snippet-panel) {
  position: relative;
}
.snippet-panel {
  position: absolute;
  z-index: 5;
  right: 12px;
  top: 54px;
  width: 320px;
  max-width: calc(100% - 16px);
  max-height: min(480px, calc(100% - 68px));
  border: 1px solid var(--snip-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.snippet-panel.is-collapsed {
  width: 186px;
}
.snippet-panel-heading {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  padding: 6px;
  border-bottom: 1px solid var(--snip-border);
}
.is-collapsed .snippet-panel-heading {
  border-bottom: 0;
}
.is-collapsed .snippet-manage {
  display: none;
}
.snippet-panel button.snippet-drag {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  touch-action: none;
  user-select: none;
  text-align: left;
}
.snippet-panel button.snippet-drag:active {
  cursor: grabbing;
}
.snippet-drag strong {
  white-space: nowrap;
  font-size: 13px;
}
.snippet-grip {
  color: var(--snip-muted);
  margin-left: auto;
}
.snippet-panel :is(button.snippet-collapse, button.snippet-manage) {
  width: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 20px;
  flex-shrink: 0;
}
#snippet-panel-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 12px 12px;
  scrollbar-width: thin;
}
.snippet-panel-hint {
  color: var(--snip-muted);
  font-size: 11px;
  margin: 12px 0;
}
.compact .snippet-search {
  flex-basis: 100%;
}
.compact .snippet-toolbar > button[data-new] {
  flex: 1;
}
.compact .snippet-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
}
.compact .snippet-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 8px;
  padding: 8px 10px;
  border-radius: 8px;
}
.compact .snippet-card h3 {
  min-width: 0;
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compact .snippet-card pre {
  grid-column: 1 / -1;
  padding: 0;
  margin: 0;
  max-height: 64px;
  border-radius: 0;
  background: transparent;
  line-height: 1.5;
  scrollbar-width: thin;
}
.compact .snippet-actions {
  flex-wrap: nowrap;
  gap: 2px;
}
.compact .snippet-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  min-height: 28px;
  padding: 0;
  border-color: transparent;
  border-radius: 6px;
  background: transparent;
}
.compact .snippet-actions button.snippet-use {
  background: var(--snip-accent-soft);
}
.compact .snippet-actions button:active:not(:disabled) {
  background: var(--snip-accent-soft);
}
.compact .snippet-actions svg {
  width: 15px;
  height: 15px;
  pointer-events: none;
}
.snippet-dialog {
  width: min(540px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 24px;
  border: 1px solid var(--snip-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.snippet-dialog::backdrop {
  background: #080b10a6;
}
.snippet-dialog header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.snippet-dialog h2 {
  margin: 0;
  font-size: 20px;
}
.snippet-dialog label {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  font-size: 13px;
}
.snippet-dialog :is(input, textarea) {
  width: 100%;
  padding: 12px;
  color: var(--snip-text);
  background: var(--snip-card);
  border: 1px solid var(--snip-border);
  border-radius: 8px;
}
.snippet-dialog textarea {
  font: 13px/1.6 var(--mono);
  resize: vertical;
}
.snippet-hint {
  font-size: 12px;
  line-height: 1.6;
  color: var(--snip-muted);
}
.snippet-editor-error {
  color: var(--snip-danger);
  font-size: 13px;
}
.snippet-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}
@media (max-width: 700px) {
  .snippet-page {
    padding: 24px 16px;
  }
  .snippet-page-heading {
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
  }
  .snippet-page-heading > .snippet-symbol {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }
  .snippet-page-heading h1 {
    font-size: 24px;
  }
  .snippet-surface button {
    min-height: 44px;
  }
  .snippet-panel :is(button.snippet-collapse, button.snippet-manage) {
    width: 44px;
  }
  .snippet-surface :is(input, textarea),
  .snippet-surface .snippet-search input {
    font-size: 16px;
  }
  .snippet-dialog {
    padding: 20px;
  }
}
@media (max-width: 600px) {
  #dashboard .home-rail {
    overflow-x: auto;
  }
  #dashboard .rail-item {
    flex-shrink: 0;
  }
}
@media (pointer: coarse) {
  .compact .snippet-actions {
    gap: 8px;
  }
  .compact .snippet-actions button {
    width: 44px;
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .snippet-surface button {
    transition: none;
  }
}

/* node_modules/@xterm/xterm/css/xterm.css */
.xterm {
  cursor: text;
  position: relative;
  user-select: none;
  -ms-user-select: none;
  -webkit-user-select: none;
}
.xterm.focus,
.xterm:focus {
  outline: none;
}
.xterm .xterm-helpers {
  position: absolute;
  top: 0;
  z-index: 5;
}
.xterm .xterm-helper-textarea {
  padding: 0;
  border: 0;
  margin: 0;
  position: absolute;
  opacity: 0;
  left: -9999em;
  top: 0;
  width: 0;
  height: 0;
  z-index: -5;
  white-space: nowrap;
  overflow: hidden;
  resize: none;
}
.xterm .composition-view {
  background: #000;
  color: #FFF;
  display: none;
  position: absolute;
  white-space: nowrap;
  z-index: 1;
}
.xterm .composition-view.active {
  display: block;
}
.xterm .xterm-viewport {
  background-color: #000;
  overflow-y: scroll;
  cursor: default;
  position: absolute;
  right: 0;
  left: 0;
  top: 0;
  bottom: 0;
}
.xterm .xterm-screen {
  position: relative;
}
.xterm .xterm-screen canvas {
  position: absolute;
  left: 0;
  top: 0;
}
.xterm-char-measure-element {
  display: inline-block;
  visibility: hidden;
  position: absolute;
  top: 0;
  left: -9999em;
  line-height: normal;
}
.xterm.enable-mouse-events {
  cursor: default;
}
.xterm.xterm-cursor-pointer,
.xterm .xterm-cursor-pointer {
  cursor: pointer;
}
.xterm.column-select.focus {
  cursor: crosshair;
}
.xterm .xterm-accessibility:not(.debug),
.xterm .xterm-message {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 10;
  color: transparent;
  pointer-events: none;
}
.xterm .xterm-accessibility-tree:not(.debug) *::selection {
  color: transparent;
}
.xterm .xterm-accessibility-tree {
  font-family: monospace;
  user-select: text;
  white-space: pre;
}
.xterm .xterm-accessibility-tree > div {
  transform-origin: left;
  width: fit-content;
}
.xterm .live-region {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.xterm-dim {
  opacity: 1 !important;
}
.xterm-underline-1 {
  text-decoration: underline;
}
.xterm-underline-2 {
  text-decoration: double underline;
}
.xterm-underline-3 {
  text-decoration: wavy underline;
}
.xterm-underline-4 {
  text-decoration: dotted underline;
}
.xterm-underline-5 {
  text-decoration: dashed underline;
}
.xterm-overline {
  text-decoration: overline;
}
.xterm-overline.xterm-underline-1 {
  text-decoration: overline underline;
}
.xterm-overline.xterm-underline-2 {
  text-decoration: overline double underline;
}
.xterm-overline.xterm-underline-3 {
  text-decoration: overline wavy underline;
}
.xterm-overline.xterm-underline-4 {
  text-decoration: overline dotted underline;
}
.xterm-overline.xterm-underline-5 {
  text-decoration: overline dashed underline;
}
.xterm-strikethrough {
  text-decoration: line-through;
}
.xterm-screen .xterm-decoration-container .xterm-decoration {
  z-index: 6;
  position: absolute;
}
.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer {
  z-index: 7;
}
.xterm-decoration-overview-ruler {
  z-index: 8;
  position: absolute;
  top: 0;
  right: 0;
  pointer-events: none;
}
.xterm-decoration-top {
  z-index: 2;
  position: relative;
}
.xterm .xterm-scrollable-element > .scrollbar {
  cursor: default;
}
.xterm .xterm-scrollable-element > .scrollbar > .scra {
  cursor: pointer;
  font-size: 11px !important;
}
.xterm .xterm-scrollable-element > .visible {
  opacity: 1;
  background: rgba(0, 0, 0, 0);
  transition: opacity 100ms linear;
  z-index: 11;
}
.xterm .xterm-scrollable-element > .invisible {
  opacity: 0;
  pointer-events: none;
}
.xterm .xterm-scrollable-element > .invisible.fade {
  transition: opacity 800ms linear;
}
.xterm .xterm-scrollable-element > .shadow {
  position: absolute;
  display: none;
}
.xterm .xterm-scrollable-element > .shadow.top {
  display: block;
  top: 0;
  left: 3px;
  height: 3px;
  width: 100%;
  box-shadow: var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset;
}
.xterm .xterm-scrollable-element > .shadow.left {
  display: block;
  top: 3px;
  left: 0;
  height: 100%;
  width: 3px;
  box-shadow: var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset;
}
.xterm .xterm-scrollable-element > .shadow.top-left-corner {
  display: block;
  top: 0;
  left: 0;
  height: 3px;
  width: 3px;
}
.xterm .xterm-scrollable-element > .shadow.top.left {
  box-shadow: var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset;
}

/* frontend/src/style.css */
:root {
  color-scheme: dark;
  --bg: #080b10;
  --panel: #0d1219;
  --surface: #111820;
  --surface-2: #17212b;
  --surface-3: #1c2935;
  --terminal: #080d12;
  --term-chrome: #101820;
  --term-panel: #0d151c;
  --term-control: #151f28;
  --term-control-border: #2a3b48;
  --term-control-border-hover: #496171;
  --term-control-text: #d7e2e6;
  --term-border: #1c2932;
  --term-muted: #8799a5;
  --term-muted-2: #718590;
  --term-input: #080d12;
  --term-scrollbar: #31424e;
  --term-hover: #1b2933;
  --term-menu: #17212b;
  --term-focus: #315a4d;
  --term-accent: #69e6b4;
  --term-accent-text: #94f2ca;
  --term-accent-soft: rgba(105, 230, 180, 0.12);
  --term-key-alt-border: #284969;
  --term-key-alt-text: #8bc8ff;
  --term-send-border: #397b65;
  --term-send-bg: #1d5f4a;
  --term-send-text: #f2fff9;
  --term-send-hover: #25765b;
  --term-scanline: rgba(255, 255, 255, 0.012);
  --term-rate-up: #e0857a;
  --term-rate-down: #82c898;
  --term-title: #c5d2db;
  --term-metric-text: #a8b8c1;
  --term-metric-label: #8fa2ad;
  --term-metric-value: #d4e0e5;
  --term-metric-detail: #9aadb7;
  --term-usage-mix: 88%;
  --term-track: #263642;
  --term-card: #182530;
  --term-card-edge: rgba(0, 0, 0, 0);
  --term-select-bg: #182530;
  --term-select-border: #263642;
  --border: #253341;
  --border-soft: #19242e;
  --text: #e9f0f3;
  --muted: #8496a3;
  --muted-2: #5e707d;
  --accent: #69e6b4;
  --accent-strong: #36c991;
  --accent-dim: rgba(105, 230, 180, 0.12);
  --blue: #70b7ff;
  --warning: #f5c76b;
  --danger: #ff7b82;
  --danger-dim: rgba(255, 123, 130, 0.12);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  --topbar-height: calc(62px + env(safe-area-inset-top));
  --mono:
    "Cascadia Code",
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
  --sans:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
[data-theme=light] {
  color-scheme: light;
  --bg: #edf2f3;
  --panel: #f8fbfb;
  --surface: #ffffff;
  --surface-2: #edf4f3;
  --surface-3: #e4eeec;
  --terminal: #ffffff;
  --term-chrome: #e7f0ee;
  --term-panel: #dcebe8;
  --term-control: #ffffff;
  --term-control-border: #b7cac8;
  --term-control-border-hover: #8ba49f;
  --term-control-text: #1b2a30;
  --term-border: #c5d5d3;
  --term-muted: #4f6369;
  --term-muted-2: #566e74;
  --term-input: #ffffff;
  --term-scrollbar: #9fb5b3;
  --term-hover: #d2e5e1;
  --term-menu: #ffffff;
  --term-focus: #8cc4b1;
  --term-accent: #0f7a58;
  --term-accent-text: #0b6349;
  --term-accent-soft: rgba(15, 122, 88, 0.12);
  --term-key-alt-border: #a6c7e2;
  --term-key-alt-text: #1a5f9c;
  --term-send-border: #68ab92;
  --term-send-bg: #dff0e9;
  --term-send-text: #0b5c45;
  --term-send-hover: #cbe5da;
  --term-scanline: rgba(23, 35, 41, 0.035);
  --term-rate-up: #b2473c;
  --term-rate-down: #177a4e;
  --term-title: #10323b;
  --term-metric-text: #3d545a;
  --term-metric-label: #53686e;
  --term-metric-value: #14272d;
  --term-metric-detail: #587077;
  --term-usage-mix: 40%;
  --term-track: #ccdcda;
  --term-card: #eff5f3;
  --term-card-edge: #bcd0cd;
  --term-select-bg: #ffffff;
  --term-select-border: #b7cac8;
  --border: #cbd9d8;
  --border-soft: #dce7e5;
  --text: #172329;
  --muted: #63767c;
  --muted-2: #87989c;
  --accent: #12825f;
  --accent-strong: #0c6d4e;
  --accent-dim: rgba(18, 130, 95, 0.1);
  --blue: #246da8;
  --warning: #a86c0c;
  --danger: #c63d4b;
  --danger-dim: rgba(198, 61, 75, 0.1);
  --shadow: 0 20px 50px rgba(38, 64, 67, 0.13);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body,
#app {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
}
body {
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}
button,
a,
input,
textarea,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
summary {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.topbar {
  position: relative;
  z-index: 30;
  display: flex;
  height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  padding: env(safe-area-inset-top) max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
}
.brand-group,
.topbar-actions,
.brand,
.session-target,
.form-actions,
.section-title-row,
.panel-heading,
.terminal-actions,
.event-bar,
.file-picker,
.profile-main,
.profile-meta {
  display: flex;
  align-items: center;
}
.brand-group,
.topbar-actions {
  min-width: 0;
  gap: 12px;
}
.brand {
  gap: 10px;
  color: var(--text);
  font-size: 15px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 54%, var(--border));
  border-radius: 9px;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}
.count-badge {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  transition:
    background 150ms ease,
    color 150ms ease,
    border-color 150ms ease;
}
#panel-toggle {
  display: grid;
}
.icon-button:hover {
  background: var(--surface-2);
  color: var(--text);
}
.language-icon {
  position: relative;
  display: block;
  width: 23px;
  height: 21px;
}
.language-icon span {
  position: absolute;
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}
.language-icon span:first-child {
  top: 0;
  left: 0;
}
.language-icon span:last-child {
  right: 0;
  bottom: 0;
  font-family: var(--mono);
}
#language-toggle[data-language=zh-CN] .language-icon span:first-child,
#language-toggle[data-language=en] .language-icon span:last-child {
  z-index: 2;
  border-color: color-mix(in srgb, var(--accent) 52%, var(--border));
  background: var(--surface-2);
  color: var(--accent);
}
#language-toggle[data-language=zh-CN] .language-icon span:last-child,
#language-toggle[data-language=en] .language-icon span:first-child {
  z-index: 1;
  color: var(--muted);
}
#language-toggle:hover .language-icon span {
  color: var(--text);
}
#language-toggle:hover[data-language=zh-CN] .language-icon span:first-child,
#language-toggle:hover[data-language=en] .language-icon span:last-child {
  border-color: var(--accent);
  color: var(--accent);
}
.icon-button.bordered {
  border: 1px solid var(--border);
}
.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.icon-button[href] svg {
  fill: currentColor;
  stroke: none;
}
.live-orb {
  position: relative;
  display: block;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin: 0 2px;
  border-radius: 50%;
  background: var(--muted-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--muted-2) 16%, transparent), inset 0 1px 1px rgba(255, 255, 255, 0.25);
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}
.live-orb::after {
  position: absolute;
  inset: -5px;
  border: 1px solid transparent;
  border-radius: inherit;
  content: "";
  pointer-events: none;
}
.live-orb.connecting {
  background: var(--warning);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--warning) 18%, transparent), 0 0 12px color-mix(in srgb, var(--warning) 42%, transparent);
}
.live-orb.connecting::after {
  border-color: color-mix(in srgb, var(--warning) 50%, transparent);
  animation: live-orb-ring 1.35s ease-out infinite;
}
.live-orb.disconnecting {
  background: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-dim), 0 0 10px color-mix(in srgb, var(--danger) 35%, transparent);
  animation: live-orb-pulse 1.1s ease-in-out infinite;
}
.live-orb.connected {
  background: var(--accent);
  box-shadow:
    0 0 0 3px var(--accent-dim),
    0 0 14px color-mix(in srgb, var(--accent) 55%, transparent),
    inset 0 1px 1px rgba(255, 255, 255, 0.35);
}
.live-orb.error {
  background: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-dim), 0 0 12px color-mix(in srgb, var(--danger) 45%, transparent);
}
@keyframes live-orb-ring {
  0% {
    opacity: 0.9;
    transform: scale(0.55);
  }
  75%, 100% {
    opacity: 0;
    transform: scale(1.35);
  }
}
@keyframes live-orb-pulse {
  50% {
    transform: scale(0.72);
    opacity: 0.7;
  }
}
.app-shell {
  display: grid;
  height: calc(100% - var(--topbar-height));
  grid-template-columns: minmax(0, 1fr);
}
.connection-panel {
  position: fixed;
  top: var(--topbar-height);
  bottom: 0;
  left: 0;
  z-index: 50;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  width: min(90vw, 350px);
  padding: 24px 20px max(24px, env(safe-area-inset-bottom));
  border-right: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  scrollbar-color: var(--surface-3) transparent;
  scrollbar-width: thin;
  transform: translateX(-102%);
  transition: transform 220ms cubic-bezier(0.2, 0.75, 0.2, 1);
}
.connection-panel.open {
  transform: translateX(0);
}
.panel-heading,
.section-title-row {
  justify-content: space-between;
}
.panel-heading {
  margin-bottom: 24px;
}
.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.17em;
}
.panel-heading h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.035em;
}
.panel-heading h1 small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 550;
  letter-spacing: 0;
}
.small-button,
.toolbar-button,
.secondary-button,
.primary-button {
  border-radius: 8px;
  font-weight: 700;
  transition:
    transform 150ms ease,
    background 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}
.small-button,
.toolbar-button {
  padding: 7px 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
}
.small-button:hover,
.toolbar-button:hover,
.secondary-button:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  color: var(--text);
}
.profiles-section {
  margin-bottom: 24px;
}
.section-title-row {
  margin-bottom: 10px;
}
.section-title-row h2,
.auth-fieldset legend {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.section-title-row h2 {
  margin: 0;
}
.count-badge {
  min-width: 23px;
  padding: 3px 6px;
  text-align: center;
}
.profile-list {
  display: grid;
  gap: 7px;
  max-height: 190px;
  overflow-y: auto;
}
.empty-list {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 9px;
  color: var(--muted-2);
  font-size: 12px;
  text-align: center;
}
.profile-card {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}
.profile-main:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.profile-card:hover,
.profile-card.active {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--border));
  background: var(--accent-dim);
}
.profile-main {
  flex: 1;
  min-width: 0;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.profile-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: var(--surface-3);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}
.profile-avatar.region {
  padding: 0;
  background: color-mix(in srgb, var(--surface-3) 60%, transparent);
}
.profile-avatar.region .country-flag {
  width: 24px;
  height: 18px;
  border-radius: 2px;
}
.profile-avatar.region.unknown {
  font-size: 14px;
  color: var(--muted-2);
}
.profile-copy {
  min-width: 0;
}
.profile-copy strong,
.profile-copy time,
.profile-copy .profile-address {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-copy strong {
  margin-bottom: 3px;
  font-size: 12px;
}
.profile-copy .profile-address {
  margin-bottom: 2px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}
.profile-copy time,
.profile-meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}
.profile-delete {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-2);
}
.profile-delete:hover {
  background: var(--danger-dim);
  color: var(--danger);
}
.connection-form {
  display: grid;
  gap: 13px;
}
.field-grid {
  display: grid;
  gap: 10px;
}
.field-grid.host-grid {
  grid-template-columns: minmax(0, 1fr) 78px;
}
.field-grid.two {
  grid-template-columns: 1fr 1fr;
}
.field {
  display: grid;
  min-width: 0;
  gap: 6px;
}
.field > span:first-child,
.field > label:first-child,
.auth-fieldset legend {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.045em;
}
.field small {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 500;
}
.field > span:first-child small {
  margin-left: 4px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}
.field input,
.field select {
  height: 38px;
  padding: 0 10px;
}
.field textarea {
  min-height: 82px;
  padding: 9px 10px;
  resize: vertical;
  line-height: 1.5;
}
.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: color-mix(in srgb, var(--muted) 54%, var(--border));
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  background: color-mix(in srgb, var(--surface) 86%, var(--accent-dim));
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-2);
}
.auth-fieldset {
  display: grid;
  min-width: 0;
  gap: 11px;
  margin: 0;
  padding: 0;
  border: 0;
}
.auth-fieldset legend {
  margin-bottom: 7px;
  padding: 0;
}
.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
}
.segmented-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.segmented-control span {
  display: block;
  min-height: 36px;
  padding: 7px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}
.segmented-control input:checked + span {
  background: var(--surface-2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  color: var(--accent);
}
.segmented-control input:focus-visible + span {
  outline: 2px solid var(--accent);
}
.input-action-wrap {
  position: relative;
  display: block;
}
.input-action-wrap input {
  padding-right: 44px;
}
.input-action {
  position: absolute;
  top: 5px;
  right: 5px;
  bottom: 5px;
  display: grid;
  width: 34px;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}
.input-action:hover {
  color: var(--text);
}
.reveal-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.reveal-icon-eye-off {
  display: none;
}
.input-action[aria-pressed=true] .reveal-icon-eye {
  display: none;
}
.input-action[aria-pressed=true] .reveal-icon-eye-off {
  display: block;
}
.key-field {
  display: grid;
  gap: 9px;
}
.file-picker {
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
}
.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.file-picker small {
  overflow: hidden;
  color: var(--muted-2);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.advanced-options {
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}
.advanced-options summary {
  padding: 10px 1px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.05em;
  list-style: none;
}
.advanced-options summary::-webkit-details-marker {
  display: none;
}
.advanced-options summary::after {
  content: "+";
  float: right;
  color: var(--accent);
  font-family: var(--mono);
}
.advanced-options[open] summary::after {
  content: "-";
}
.advanced-body {
  display: grid;
  gap: 11px;
  padding: 3px 0 13px;
}
.form-error {
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--danger) 32%, var(--border));
  border-radius: 8px;
  background: var(--danger-dim);
  color: var(--danger);
  font-size: 11px;
  line-height: 1.45;
}
.form-actions {
  gap: 8px;
}
.primary-button,
.secondary-button {
  height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  font-size: 10px;
}
.primary-button {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  background: var(--accent);
  color: #06130e;
}
.primary-button > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-theme=light] .primary-button {
  color: #fff;
}
.primary-button:hover:not(:disabled) {
  background: var(--accent-strong);
  transform: translateY(-1px);
}
.primary-button.is-danger {
  border-color: color-mix(in srgb, var(--danger) 70%, var(--border));
  background: var(--danger);
  color: #26090d;
}
[data-theme=light] .primary-button.is-danger {
  color: #fff;
}
.primary-button.is-danger:hover:not(:disabled) {
  background: color-mix(in srgb, var(--danger) 82%, #8f1f2c);
}
.button-icon {
  font-family: var(--mono);
  font-size: 10px;
}
.secondary-button {
  background: var(--surface);
  border-color: var(--border);
  color: var(--muted);
}
.privacy-note {
  margin: 16px 2px 0;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.5;
}
.workspace {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  padding: 18px;
  background:
    radial-gradient(
      circle at 82% 8%,
      color-mix(in srgb, var(--accent) 5%, transparent),
      transparent 28%),
    var(--bg);
}
.session-target {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 10px;
}
.session-target > div {
  min-width: 0;
}
.session-target strong,
.session-target span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.session-target strong {
  margin-bottom: 2px;
  color: var(--term-title);
  font-size: 12px;
}
.session-target span {
  color: var(--term-muted-2);
  font-family: var(--mono);
  font-size: 9px;
}
.session-metrics {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0px;
  min-width: 144px;
}
.session-metrics > div {
  min-width: 72px;
  padding: 0 7px;
  border-left: 1px solid var(--term-border);
  font-variant-numeric: tabular-nums;
}
.session-metrics span,
.session-metrics strong {
  display: block;
  font-family: var(--mono);
  text-align: right;
}
.resource-metrics {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  gap: 14px;
}
.resource-metric {
  min-width: 60px;
  flex: 1 1 0;
  color: var(--term-metric-text);
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
}
.resource-metric + .resource-metric {
  padding-left: 12px;
  border-left: 1px solid var(--term-border);
}
.resource-metric-line {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 6px;
}
.resource-metric-line > span {
  flex: 0 0 auto;
  color: var(--term-metric-label);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.resource-metric-line > strong {
  flex: 0 0 auto;
  overflow: hidden;
  color: var(--term-metric-value);
  font-size: 10px;
  font-weight: 750;
  text-overflow: ellipsis;
}
.resource-metric-line > .resource-percentage {
  color: color-mix(in srgb, var(--usage-color, var(--term-metric-value)) var(--term-usage-mix, 88%), var(--text));
  font-weight: 900;
  transition: color 220ms ease;
}
.resource-metric-line > .resource-detail {
  min-width: 0;
  flex: 1 1 auto;
  color: var(--term-metric-detail);
  font-weight: 400;
  text-align: right;
}
.resource-metric progress {
  width: 100%;
  height: 4px;
  display: block;
  margin-top: 2px;
  overflow: hidden;
  border: 0;
  border-radius: 99px;
  accent-color: var(--usage-color, var(--accent));
}
.resource-metric progress::-webkit-progress-bar {
  border-radius: 99px;
  background: var(--term-track);
}
.resource-metric progress::-webkit-progress-value {
  border-radius: 99px;
  background: var(--usage-color, var(--accent));
  transition: background-color 320ms ease;
}
.resource-metric progress::-moz-progress-bar {
  border-radius: 99px;
  background: var(--usage-color, var(--accent));
  transition: background-color 320ms ease;
}
.resource-sparkline {
  display: block;
  height: 12px;
  margin-top: 1px;
  background: var(--term-card);
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--term-card-edge);
  width: auto;
  min-width: 120px;
  max-width: 100%;
  flex: 0 0 auto;
  align-self: stretch;
}
.resource-network #resource-network-iface {
  flex: 0 0 auto;
  color: var(--term-metric-label);
  font-weight: 400;
  letter-spacing: 0.02em;
}
.resource-network .resource-network-select {
  flex: 0 1 auto;
  min-width: 52px;
  max-width: 110px;
  padding: 0 4px;
  color: var(--term-metric-value);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.4;
  background: var(--term-select-bg);
  border: 1px solid var(--term-select-border);
  border-radius: 4px;
  cursor: pointer;
}
.resource-network .resource-network-select option {
  background-color: var(--term-select-bg);
  color: var(--term-metric-value);
}
.resource-network .resource-network-select:hover,
.resource-network .resource-network-select:focus-visible {
  border-color: var(--accent);
  outline: none;
}
.resource-network #resource-network-rate-up,
.resource-network #resource-network-rate-down {
  display: inline-block;
  min-width: 10ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  white-space: nowrap;
}
.resource-network #resource-network-rate-up {
  color: var(--term-rate-up);
}
.resource-network #resource-network-rate-down {
  color: var(--term-rate-down);
}
.resource-network .resource-network-rates {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 21ch;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}
.session-metrics span {
  margin-bottom: 2px;
  color: var(--term-muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.session-metrics strong {
  overflow: hidden;
  color: var(--term-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  min-width: 42px;
}
.terminal-card {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) minmax(34px, 0fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--terminal);
  box-shadow: var(--shadow);
  transition: grid-template-rows 220ms cubic-bezier(0.2, 0.75, 0.2, 1);
}
.terminal-card.workspace-panel-open {
  grid-template-rows: minmax(0, 1.618fr) minmax(34px, 1fr);
}
@media (max-width: 760px) {
  .terminal-card.workspace-panel-open {
    grid-template-rows: minmax(0, 1fr) minmax(34px, 1fr);
  }
}
.terminal-pane {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: 42px minmax(0, 1fr) auto;
  overflow: hidden;
}
.terminal-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 11px;
  border-bottom: 1px solid var(--term-border);
  background: var(--term-chrome);
  color: var(--term-muted);
}
.window-controls {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}
.window-controls i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff6f75;
}
.window-controls i:nth-child(2) {
  background: #f6c560;
}
.window-controls i:nth-child(3) {
  background: #5fd49d;
}
.terminal-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}
.terminal-actions .toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 7px;
  border-color: var(--border);
  background: var(--term-control);
  color: var(--term-muted);
  font-size: 8px;
}
.terminal-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 10px 8px 7px 12px;
  background: linear-gradient(var(--term-scanline) 50%, transparent 50%) 0 0 / 100% 4px, var(--terminal);
}
#terminal {
  width: 100%;
  height: 100%;
}
.terminal-stage .xterm .xterm-viewport {
  background-color: var(--terminal);
}
.terminal-tools {
  min-width: 0;
  border-top: 1px solid var(--term-border);
  background: var(--term-panel);
  color: var(--term-control-text);
}
.terminal-keybar {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  border-bottom: 1px solid var(--term-border);
}
.terminal-key-scroll {
  display: flex;
  min-width: 0;
  gap: 5px;
  overflow-x: auto;
  padding: 5px 8px;
  scrollbar-color: var(--term-scrollbar) transparent;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.terminal-key,
.command-editor-toggle,
.command-editor-action,
.command-editor-send,
.command-editor-send-menu,
.command-editor-close,
.command-send-options button {
  border: 1px solid var(--term-control-border);
  border-radius: 6px;
  background: var(--term-control);
  color: var(--term-control-text);
}
.terminal-key {
  min-width: 40px;
  height: 32px;
  flex: 0 0 auto;
  padding: 0 9px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  touch-action: manipulation;
}
.terminal-key:hover:not(:disabled),
.terminal-key:active:not(:disabled),
.terminal-key[aria-pressed=true] {
  border-color: var(--term-accent);
  background: var(--term-accent-soft);
  color: var(--term-accent-text);
}
.terminal-key-control {
  border-color: var(--term-key-alt-border);
  color: var(--term-key-alt-text);
}
.terminal-key-arrow {
  min-width: 36px;
  padding: 0 7px;
  font-size: 16px;
}
.terminal-key:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}
.command-editor-toggle {
  display: inline-flex;
  min-width: 82px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 5px 8px 5px 0;
  padding: 0 9px;
  color: var(--term-accent-text);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.command-editor-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.command-editor-toggle:hover,
.command-editor-toggle[aria-expanded=true] {
  border-color: var(--term-accent);
  background: var(--term-accent-soft);
}
.command-editor {
  display: grid;
  height: 176px;
  min-height: 0;
  grid-template-rows: 34px minmax(0, 1fr) 42px;
  background: var(--term-chrome);
}
.command-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 12px;
  border-bottom: 1px solid var(--term-border);
  color: var(--term-muted);
  font-size: 11px;
}
.command-editor-close {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-color: transparent;
  background: transparent;
  color: var(--term-muted);
  font-size: 18px;
  line-height: 1;
}
.command-editor-close:hover {
  border-color: var(--term-control-border);
  background: var(--term-hover);
  color: var(--term-control-text);
}
#command-editor-input {
  width: 100%;
  min-height: 0;
  resize: none;
  border: 0;
  border-radius: 0;
  outline: 0;
  padding: 10px 12px;
  background: var(--term-input);
  color: var(--term-control-text);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: 0;
  tab-size: 2;
}
#command-editor-input::placeholder {
  color: var(--muted-2);
}
#command-editor-input:focus {
  box-shadow: inset 0 0 0 1px var(--term-focus);
}
.command-editor-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-top: 1px solid var(--term-border);
}
.command-editor-action,
.command-editor-send,
.command-editor-send-menu {
  height: 30px;
  padding: 0 11px;
  font-size: 11px;
  font-weight: 700;
}
.command-editor-action:hover:not(:disabled) {
  border-color: var(--term-control-border-hover);
  background: var(--term-hover);
}
.command-send-group {
  position: relative;
  display: flex;
  margin-left: auto;
}
.command-editor-send {
  border-radius: 6px 0 0 6px;
  border-color: var(--term-send-border);
  background: var(--term-send-bg);
  color: var(--term-send-text);
}
.command-editor-send-menu {
  width: 30px;
  padding: 0;
  border-left: 0;
  border-radius: 0 6px 6px 0;
  border-color: var(--term-send-border);
  background: var(--term-send-bg);
  color: var(--term-send-text);
}
.command-editor-send:hover:not(:disabled),
.command-editor-send-menu:hover:not(:disabled) {
  background: var(--term-send-hover);
}
.command-editor-action:disabled,
.command-editor-send:disabled,
.command-editor-send-menu:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}
.command-send-options {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 25;
  display: grid;
  min-width: 132px;
  padding: 4px;
  border: 1px solid var(--term-control-border);
  border-radius: 7px;
  background: var(--term-menu);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
}
.command-send-options button {
  height: 32px;
  border-color: transparent;
  text-align: left;
  font-size: 11px;
}
.command-send-options button:hover {
  background: var(--term-hover);
  color: var(--term-accent-text);
}
@media (max-width: 760px) {
  .terminal-key-scroll {
    padding-left: 6px;
  }
  .terminal-key {
    min-width: 42px;
    height: 34px;
  }
  .command-editor-toggle {
    min-width: 42px;
    margin-right: 5px;
    padding: 0 8px;
  }
  .command-editor-toggle span {
    display: none;
  }
  .command-editor {
    height: 154px;
    padding-bottom: env(safe-area-inset-bottom);
  }
}
.xterm,
.xterm-viewport,
.xterm-screen {
  height: 100%;
}
.xterm-viewport {
  overflow-x: hidden;
  scrollbar-color: var(--term-scrollbar) transparent;
  scrollbar-width: thin;
}
.terminal-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 24px;
  background: var(--terminal);
  color: var(--text);
  text-align: center;
}
.terminal-empty[hidden] {
  display: none;
}
.empty-glyph {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  place-items: center;
  border: 1px solid var(--term-accent);
  border-radius: 13px;
  background: var(--term-accent-soft);
  color: var(--term-accent);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
}
.terminal-empty h2 {
  margin: 0 0 8px;
  font-size: 17px;
}
.terminal-empty p {
  max-width: 430px;
  margin: 0 0 18px;
  color: var(--term-muted-2);
  font-size: 12px;
  line-height: 1.55;
}
.terminal-empty p span[lang=en],
.host-key-dialog p span[lang=en] {
  color: color-mix(in srgb, currentColor 78%, transparent);
  font-size: 0.92em;
}
.terminal-empty .small-button {
  border-color: var(--term-accent);
  background: var(--term-accent-soft);
  color: var(--term-accent);
}
.event-bar {
  min-width: 0;
  justify-content: space-between;
  gap: 12px;
  padding: 0 11px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}
#event-message {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workspace-dock {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: 34px minmax(0, 1fr);
  overflow: hidden;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.dock-tabs {
  display: flex;
  height: 100%;
  flex: 0 0 auto;
  align-items: stretch;
  margin-right: -11px;
}
.dock-tab {
  position: relative;
  display: inline-flex;
  min-width: 92px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 13px;
  border: 0;
  border-left: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 10px;
  font-weight: 650;
}
.dock-tab-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.toolbar-button-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.dock-tab:hover {
  background: var(--surface-3);
  color: var(--text);
}
.dock-tab[aria-selected=true] {
  background: var(--surface);
  color: var(--accent);
}
.dock-tab[aria-selected=true]::after {
  position: absolute;
  right: 10px;
  bottom: 0;
  left: 10px;
  height: 2px;
  background: var(--accent);
  content: "";
}
.event-log {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 9px 11px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.7;
}
.file-manager {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: var(--file-tree-width, 240px) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) 25px;
  grid-template-areas: "toolbar toolbar" "tree    table" "status  status";
  overflow: hidden;
  background: var(--surface);
}
.file-manager:has(> .file-tree.is-collapsed) {
  grid-template-columns: 24px minmax(0, 1fr);
}
.file-manager:has(> .file-tree.is-collapsed) > .file-tree {
  overflow: hidden;
}
.file-manager:has(> .file-tree.is-collapsed) > .file-tree .file-tree-scroller,
.file-manager:has(> .file-tree.is-collapsed) > .file-tree .file-tree-resize {
  display: none;
}
.file-manager:has(> .file-tree.is-collapsed) > .file-tree .file-tree-title {
  display: none;
}
.file-manager:has(> .file-tree.is-collapsed) > .file-tree .file-tree-header {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}
.file-toolbar {
  grid-area: toolbar;
}
.file-tree {
  grid-area: tree;
}
.file-table-wrap {
  grid-area: table;
}
.file-statusbar {
  grid-area: status;
}
.file-tree {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid var(--border-soft);
  background: var(--surface);
  position: relative;
}
.file-tree-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 0 6px;
  height: 25px;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--border-soft);
  background: var(--panel);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.file-tree-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-tree-collapse {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  line-height: 1;
}
.file-tree-collapse:hover,
.file-tree-collapse:focus-visible {
  background: var(--surface-3);
  color: var(--text);
}
.file-tree-scroller {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  scrollbar-color: var(--border) transparent;
  scrollbar-width: thin;
  padding: 4px 0;
}
.file-tree-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 18px;
  padding: 1px 8px;
  padding-left: calc(8px + var(--file-tree-depth, 0) * 14px);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
  outline: 0;
}
.file-tree-row:hover {
  background: var(--surface-3);
}
.file-tree-row:focus-visible {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--accent-dim);
}
.file-tree-row.is-selected {
  background: var(--accent-dim);
  color: var(--accent);
}
.file-tree-toggle {
  width: 12px;
  flex: 0 0 auto;
  text-align: center;
  color: var(--muted);
  font-size: 8px;
  line-height: 1;
}
.file-tree-icon {
  width: 14px;
  flex: 0 0 auto;
  font-size: 10px;
  text-align: center;
}
.file-tree-icon.directory {
  color: var(--warning);
}
.file-tree-icon.file,
.file-tree-icon.symlink,
.file-tree-icon.other {
  color: var(--muted);
}
.file-tree-name {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-tree-row.is-loading .file-tree-spinner {
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: file-spin 750ms linear infinite;
  flex: 0 0 auto;
}
.file-tree-row.is-error {
  color: var(--danger);
}
.file-tree-row.is-unavailable {
  opacity: 0.55;
}
.file-tree-row.is-unavailable .file-tree-name {
  color: var(--color-text-muted, #888);
  font-style: italic;
}
.file-tree-lock {
  display: inline-block;
  width: 12px;
  text-align: center;
  font-size: 0.85em;
  opacity: 0.7;
}
.file-tree-retry {
  flex: 0 0 auto;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 8px;
  cursor: pointer;
  text-decoration: underline;
}
.file-tree-retry:hover {
  color: var(--accent-strong);
}
.file-tree-status {
  display: flex;
  align-items: center;
  padding: 1px 8px;
  padding-left: calc(8px + var(--file-tree-depth, 0) * 14px + 16px);
  min-height: 18px;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted-2);
  font-style: italic;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
}
.file-tree-resize {
  position: absolute;
  right: -2px;
  top: 0;
  bottom: 0;
  width: 4px;
  cursor: col-resize;
  z-index: 2;
}
.file-tree-resize:hover,
.file-tree-resize:active {
  background: var(--accent-dim);
}
.process-manager {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) 25px;
  overflow: hidden;
  background: var(--surface);
}
.process-table-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  scrollbar-color: var(--border) transparent;
  scrollbar-width: thin;
}
.process-table {
  width: 100%;
  min-width: 820px;
  border-spacing: 0;
  table-layout: fixed;
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
}
.process-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 25px;
  padding: 0 8px;
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 9px;
  text-align: right;
  white-space: nowrap;
}
.process-table th:first-child {
  width: 7%;
}
.process-table th:nth-child(2) {
  width: 8%;
}
.process-table th:nth-child(3) {
  width: 8%;
}
.process-table th:nth-child(4),
.process-table th:nth-child(5) {
  width: 7%;
}
.process-table th:nth-child(6) {
  width: 6%;
}
.process-table th:nth-child(7) {
  width: 9%;
}
.process-table th:nth-child(8) {
  width: 41%;
  text-align: center;
}
.process-table th:nth-child(8) .process-sort {
  text-align: center;
}
.process-table th:nth-child(9) {
  width: 8%;
  text-align: center;
}
.process-sort {
  position: relative;
  width: 100%;
  height: 25px;
  padding: 0 11px 0 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: right;
}
.process-sort::after {
  position: absolute;
  right: 0;
  color: var(--muted-2);
  content: "\2195";
}
.process-table th[aria-sort=ascending] .process-sort,
.process-table th[aria-sort=descending] .process-sort {
  color: var(--accent);
}
.process-table th[aria-sort=ascending] .process-sort::after {
  content: "\2191";
}
.process-table th[aria-sort=descending] .process-sort::after {
  content: "\2193";
}
.process-table td {
  height: 24px;
  padding: 0 8px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.process-table td:not(:last-child) {
  text-align: right;
}
.process-table td:nth-child(8) {
  text-align: left;
}
.process-table td:last-child {
  text-align: left;
}
.process-table tbody tr:hover {
  background: var(--surface-2);
}
.process-manager-state {
  position: absolute;
  inset: 25px 0 0;
  display: grid;
  padding: 16px;
  place-items: center;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--muted);
  font-size: 10px;
}
.process-manager-state.error {
  color: var(--danger);
}
.process-statusbar {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 8px;
  border-top: 1px solid var(--border-soft);
  background: var(--panel);
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
  white-space: nowrap;
}
#process-manager-status {
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-toolbar {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--panel);
}
.file-path-field {
  display: block;
  min-width: 120px;
  flex: 1 1 260px;
}
.file-path-field input {
  width: 100%;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  outline: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
}
.file-path-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}
.file-actions {
  display: flex;
  min-width: 0;
  flex: 0 1 auto;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.file-action {
  display: grid;
  min-width: 27px;
  height: 26px;
  flex: 0 0 auto;
  padding: 0 6px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}
.file-action-wide {
  min-width: auto;
  font-family: var(--sans);
  font-size: 9px;
}
.file-view-controls {
  display: flex;
  flex: 0 0 auto;
  margin-left: auto;
}
.file-view-controls .file-action {
  width: 44px;
  height: 44px;
  padding: 0;
}
.file-view-controls svg {
  width: 18px;
  height: 18px;
}
.file-view-controls #exit-fullscreen-files {
  display: none;
}
.file-manager:fullscreen #fullscreen-files {
  display: none;
}
.file-manager:fullscreen #exit-fullscreen-files {
  display: grid;
}
.file-view-controls .file-action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.file-action:hover:not(:disabled) {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--text);
}
.file-action.danger:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--border));
  background: var(--danger-dim);
  color: var(--danger);
}
.file-action-separator {
  width: 1px;
  height: 16px;
  flex: 0 0 auto;
  margin: 0 2px;
  background: var(--border);
}
.file-table-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  scrollbar-color: var(--border) transparent;
  scrollbar-width: thin;
}
.file-table {
  width: 100%;
  min-width: 240px;
  border-spacing: 0;
  table-layout: fixed;
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
}
.file-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 25px;
  padding: 0 8px;
  border-right: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}
.file-table th:first-child {
  width: 28%;
}
.file-table th:nth-child(2) {
  width: 10%;
  text-align: right;
}
.file-table th:nth-child(3) {
  width: 10%;
}
.file-table th:nth-child(4) {
  width: 17%;
}
.file-table th:nth-child(5) {
  width: 14%;
}
.file-table th:nth-child(6),
.file-table th:nth-child(7) {
  width: 10.5%;
}
.file-table td {
  height: 24px;
  padding: 0 8px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-table td:nth-child(2) {
  color: var(--muted);
  text-align: right;
}
.file-table tbody tr {
  cursor: default;
}
.file-table tbody tr:hover {
  background: var(--surface-2);
}
.file-table tbody tr[aria-selected=true] {
  background: var(--accent-dim);
  color: var(--accent);
}
.file-name-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}
.file-name-cell span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-kind-icon {
  width: 15px;
  flex: 0 0 15px;
  color: var(--muted);
  text-align: center;
}
.file-kind-icon.directory {
  color: var(--warning);
}
.file-manager-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
.file-manager-state.error {
  color: var(--danger);
}
.file-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: file-spin 750ms linear infinite;
}
.file-statusbar {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 8px;
  border-top: 1px solid var(--border-soft);
  background: var(--panel);
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
}
#file-manager-status {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-progress {
  display: flex;
  min-width: 0;
  max-width: 70%;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  color: var(--muted);
  white-space: nowrap;
}
#file-manager-progress-label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-progress progress {
  width: 90px;
  flex: 0 1 90px;
  height: 6px;
  overflow: hidden;
  border: 0;
  border-radius: 99px;
  accent-color: var(--accent);
}
.file-progress-cancel {
  min-width: 42px;
  height: 21px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 8px;
}
.file-progress-cancel:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--border));
  background: var(--danger-dim);
  color: var(--danger);
}
.event-line {
  display: grid;
  grid-template-columns: 68px 120px minmax(0, 1fr);
  gap: 7px;
}
.event-line time {
  color: #4f626e;
}
.event-line strong {
  overflow: hidden;
  color: #69e6b4;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.event-line.error strong {
  color: #ff7b82;
}
.terminal-card:fullscreen {
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
}
.file-manager:fullscreen {
  width: 100%;
  height: 100dvh;
  border: 0;
  border-radius: 0;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.toast-region {
  position: fixed;
  top: calc(var(--topbar-height) + 12px);
  right: max(18px, env(safe-area-inset-right));
  z-index: 80;
  display: grid;
  width: min(340px, calc(100vw - 36px));
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 11px;
  line-height: 1.45;
  animation: toast-in 180ms ease-out;
}
.toast.error {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
  color: var(--danger);
}
.idle-banner {
  position: fixed;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(560px, calc(100vw - 32px));
  transform: translateX(-50%);
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--warning) 55%, var(--border));
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 11px;
  line-height: 1.4;
}
.idle-banner[hidden] {
  display: none;
}
.idle-banner-text {
  flex: 1;
  min-width: 0;
}
.idle-banner-action {
  flex: none;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.idle-banner-action:hover {
  border-color: var(--accent);
}
.idle-banner-action.danger {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
}
.host-key-dialog {
  width: min(520px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58);
  color: var(--text);
}
.host-key-dialog::backdrop {
  background: rgba(2, 6, 9, 0.76);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.host-key-dialog form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px 16px;
  padding: 22px;
}
.dialog-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--warning) 44%, var(--border));
  border-radius: 11px;
  background: color-mix(in srgb, var(--warning) 10%, transparent);
  color: var(--warning);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}
.host-key-dialog.changed {
  border-color: color-mix(in srgb, var(--danger) 48%, var(--border));
}
.host-key-dialog.changed .dialog-icon {
  border-color: color-mix(in srgb, var(--danger) 52%, var(--border));
  background: var(--danger-dim);
  color: var(--danger);
}
.host-key-dialog.changed .eyebrow,
.host-key-dialog.changed #host-key-title {
  color: var(--danger);
}
.host-key-dialog.changed #host-key-expected-fingerprint {
  color: var(--danger);
}
.host-key-dialog.changed .dialog-actions .primary-button {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}
.host-key-dialog h2 {
  margin: 0 0 7px;
  font-size: 18px;
}
.host-key-dialog p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}
.host-key-dialog dl,
.trust-check,
.dialog-actions {
  grid-column: 1 / -1;
}
.host-key-dialog dl {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin: 2px 0 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--border-soft);
}
.host-key-dialog dl div {
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 11px;
  background: var(--panel);
}
.host-key-dialog dt {
  color: var(--muted);
  font-size: 10px;
}
.host-key-dialog dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
}
.trust-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}
.trust-check input {
  accent-color: var(--accent);
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.dialog-actions .primary-button,
.dialog-actions .secondary-button {
  flex: 0 0 auto;
}
.process-table th.process-kill-column {
  padding: 0 4px;
}
.process-kill-cell {
  padding: 0 4px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.process-copyable {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.process-copyable:hover,
.process-copyable:focus-visible {
  background: var(--surface-2);
  color: var(--accent);
  outline: none;
}
.process-copyable:active {
  background: color-mix(in srgb, var(--accent) 15%, var(--surface-2));
}
.process-kill-button {
  display: inline-grid;
  min-width: 50px;
  height: 20px;
  padding: 0 8px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--danger) 28%, var(--border));
  border-radius: 5px;
  background: transparent;
  color: var(--danger);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background-color 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease;
}
.process-kill-button:hover:not(:disabled),
.process-kill-button:focus-visible:not(:disabled) {
  border-color: color-mix(in srgb, var(--danger) 55%, var(--border));
  background: var(--danger-dim);
  color: var(--danger);
  outline: none;
}
.process-kill-button:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--danger) 35%, transparent);
}
.process-kill-button[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  background: transparent;
}
.process-kill-dialog {
  width: min(460px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--danger) 48%, var(--border));
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.58);
  color: var(--text);
}
.process-kill-dialog::backdrop {
  background: rgba(2, 6, 9, 0.76);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.process-kill-dialog form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px 16px;
  padding: 22px;
}
.process-kill-dialog .dialog-icon {
  border-color: color-mix(in srgb, var(--danger) 52%, var(--border));
  background: var(--danger-dim);
  color: var(--danger);
}
.process-kill-dialog .eyebrow,
.process-kill-dialog h2 {
  color: var(--danger);
}
.process-kill-dialog h2 {
  margin: 0 0 7px;
  font-size: 18px;
}
.process-kill-dialog p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}
.process-kill-dialog dl,
.process-kill-dialog .process-kill-result,
.process-kill-dialog .dialog-actions {
  grid-column: 1 / -1;
}
.process-kill-dialog dl {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin: 2px 0 0;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--border-soft);
}
.process-kill-dialog dl div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 11px;
  background: var(--panel);
}
.process-kill-dialog dt {
  color: var(--muted);
  font-size: 10px;
}
.process-kill-dialog dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
}
.process-kill-dialog dd.process-kill-command {
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 80px;
  overflow-y: auto;
}
.process-kill-result {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 140px;
  overflow-y: auto;
}
.process-kill-result[data-state=success] {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-2));
  color: var(--accent);
}
.process-kill-result[data-state=error] {
  border-color: color-mix(in srgb, var(--danger) 48%, var(--border));
  background: var(--danger-dim);
  color: var(--danger);
}
@media (max-width: 760px) {
  .process-kill-dialog dl div {
    grid-template-columns: 72px minmax(0, 1fr);
  }
}
.panel-scrim {
  position: fixed;
  inset: var(--topbar-height) 0 0;
  z-index: 40;
  display: block;
  width: auto;
  padding: 0;
  border: 0;
  background: rgba(1, 5, 8, 0.68);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}
@keyframes file-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 960px) {
  .session-metrics > div {
    min-width: 58px;
    padding: 0 5px;
  }
}
@media (max-width: 1500px) {
  .resource-metric progress {
    display: none;
  }
}
@media (max-width: 1080px) {
  .session-metrics {
    display: none;
  }
  .resource-metrics {
    gap: 5px;
  }
  .resource-metric {
    flex-basis: 0;
  }
  .resource-detail {
    display: none;
  }
  .terminal-actions .button-label {
    display: none;
  }
}
@media (max-width: 760px) {
  :root {
    --topbar-height: calc(58px + env(safe-area-inset-top));
  }
  .topbar {
    padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
  }
  .app-shell {
    display: block;
    height: calc(100% - var(--topbar-height));
  }
  .workspace {
    height: 100%;
    padding: 8px;
  }
  .terminal-toolbar {
    gap: 6px;
    padding-inline: 7px;
  }
  .session-target {
    flex: 0 1 88px;
    gap: 6px;
  }
  .resource-metrics {
    flex: 0 1 180px;
    gap: 4px;
  }
  .resource-metric {
    flex: 1 1 0;
  }
  .resource-metric-line {
    justify-content: center;
    gap: 3px;
  }
  .terminal-actions {
    flex: 0 0 auto;
    gap: 3px;
    margin-left: auto;
  }
  .terminal-actions .toolbar-button {
    padding-inline: 6px;
  }
  .terminal-card {
    border-radius: 9px;
  }
  .window-controls i {
    width: 7px;
    height: 7px;
  }
  .terminal-stage {
    padding: 7px 4px 5px 7px;
  }
  .event-line {
    grid-template-columns: 58px minmax(0, 1fr);
  }
  .event-line strong {
    display: none;
  }
  .file-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px;
    padding: 3px 5px;
  }
  .file-manager {
    grid-template-columns: min(var(--file-tree-width, 200px), 45vw) minmax(0, 1fr);
    grid-template-areas: "toolbar toolbar" "tree    table" "status  status";
  }
  .file-manager:has(> .file-tree.is-collapsed) {
    grid-template-columns: 24px minmax(0, 1fr);
  }
  .file-tree-resize {
    display: none;
  }
  .file-actions {
    width: 100%;
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .file-view-controls {
    grid-column: 2;
    grid-row: 1;
  }
  .process-table {
    min-width: 650px;
  }
  .process-table th:nth-child(4),
  .process-table td:nth-child(4),
  .process-table th:nth-child(6),
  .process-table td:nth-child(6),
  .process-table th:nth-child(7),
  .process-table td:nth-child(7) {
    display: none;
  }
  .file-table [data-column=permissions],
  .file-table [data-column=owner],
  .file-table [data-column=group],
  .file-table td:nth-child(5),
  .file-table td:nth-child(6),
  .file-table td:nth-child(7) {
    display: none;
  }
  .file-table th:first-child {
    width: 40%;
  }
  .file-table th:nth-child(2) {
    width: 16%;
  }
  .file-table th:nth-child(3) {
    width: 16%;
  }
  .file-table th:nth-child(4) {
    width: 28%;
  }
  .button-label {
    display: none;
  }
  .dock-tab {
    min-width: 0;
    gap: 4px;
    padding: 0 7px;
    font-size: 10px;
  }
  .dock-tab .button-label {
    display: inline;
    white-space: nowrap;
  }
  .dock-tab-icon {
    width: 13px;
    height: 13px;
  }
  .resource-metrics .resource-swap {
    display: none;
  }
  .resource-network:not([hidden]) {
    display: flex;
  }
  .resource-network .resource-metric-line {
    position: relative;
  }
  .resource-network #resource-network-iface,
  .resource-network .resource-sparkline {
    display: none;
  }
  .resource-network .resource-network-select {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: transparent;
    opacity: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
  }
  .resource-network .resource-network-rates {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    line-height: 1.05;
    min-width: 0;
    flex: 0 1 auto;
  }
}
@media (max-width: 960px) {
  .resource-metrics {
    flex: 0 1 auto;
  }
  .resource-metric {
    flex: 0 1 auto;
    min-width: 60px;
    max-width: 320px;
  }
}
@media (max-width: 200px) {
  .terminal-pane {
    grid-template-rows: 70px minmax(0, 1fr);
  }
  .terminal-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 34px 28px;
    gap: 0 8px;
    padding-block: 3px;
  }
  .resource-metrics {
    width: 100%;
    grid-column: 1 / -1;
    justify-content: space-between;
    border-top: 1px solid #1c2932;
  }
  .resource-metric,
  .resource-memory,
  .resource-swap {
    min-width: 0;
  }
  .resource-metric-line > span,
  .resource-metric-line > strong {
    font-size: 8px;
  }
}
@media (max-width: 480px) {
  .brand > span:last-child {
    display: none;
  }
  .field-grid.two {
    grid-template-columns: 1fr;
  }
  .host-key-dialog form {
    grid-template-columns: 1fr;
    padding: 18px;
  }
  .dialog-icon {
    display: none;
  }
  .host-key-dialog dl,
  .trust-check,
  .dialog-actions {
    grid-column: 1;
  }
  .host-key-dialog dl div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .dialog-actions .primary-button,
  .dialog-actions .secondary-button {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.macro-record.is-recording {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-dim);
}
.macro-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  max-height: 42vh;
  border-top: 1px solid var(--term-control-border);
  background: var(--panel);
}
.macro-panel[hidden] {
  display: none;
}
.macro-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.macro-panel-header strong {
  font-size: 12px;
  color: var(--text);
}
.macro-close {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--term-control-border);
  border-radius: 6px;
  background: var(--term-control);
  color: var(--term-control-text);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.macro-new {
  display: flex;
  gap: 8px;
}
.macro-new input {
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--term-control-border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  outline: none;
}
.macro-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.macro-empty {
  margin: 0;
  padding: 8px 2px;
  color: var(--muted);
  font-size: 12px;
}
.macro-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-2);
}
.macro-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.macro-copy strong {
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.macro-copy small {
  font-size: 10px;
  color: var(--muted);
}
.macro-play,
.macro-remove {
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--term-control-border);
  border-radius: 6px;
  background: var(--term-control);
  color: var(--term-control-text);
  cursor: pointer;
  font-size: 11px;
}
.macro-play:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.macro-remove {
  padding: 0 8px;
  font-size: 14px;
}
.markdown-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  border-top: 1px solid var(--border);
  background: var(--panel);
}
.markdown-panel[hidden] {
  display: none;
}
.markdown-toolbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
.markdown-toolbar span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.markdown-toolbar small {
  font-size: 10px;
  color: var(--muted);
}
.markdown-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  flex: 1 1 auto;
  min-height: 0;
}
.markdown-input {
  resize: none;
  margin: 0;
  padding: 12px;
  border: 0;
  border-right: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  outline: none;
}
.markdown-preview {
  padding: 12px 16px;
  overflow-y: auto;
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
  word-break: break-word;
}
.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3,
.markdown-preview h4,
.markdown-preview h5,
.markdown-preview h6 {
  margin: 0 0 0.5em;
  color: var(--text);
  line-height: 1.25;
}
.markdown-preview h1 {
  font-size: 1.5em;
}
.markdown-preview h2 {
  font-size: 1.3em;
}
.markdown-preview h3 {
  font-size: 1.15em;
}
.markdown-preview h4 {
  font-size: 1em;
}
.markdown-preview p {
  margin: 0 0 0.8em;
}
.markdown-preview p:last-child {
  margin-bottom: 0;
}
.markdown-preview code {
  padding: 0.15em 0.4em;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 0.9em;
}
.markdown-preview pre {
  margin: 0 0 0.8em;
  padding: 10px 12px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}
.markdown-preview pre code {
  padding: 0;
  border: 0;
  background: transparent;
}
.markdown-preview blockquote {
  margin: 0 0 0.8em;
  padding: 4px 12px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
.markdown-preview a {
  color: var(--accent);
  text-decoration: none;
}
.markdown-preview a:hover {
  text-decoration: underline;
}
.markdown-preview ul,
.markdown-preview ol {
  margin: 0 0 0.8em;
  padding-left: 1.5em;
}
.markdown-preview li {
  margin: 0.15em 0;
}
.markdown-preview hr {
  margin: 1em 0;
  border: 0;
  border-top: 1px solid var(--border);
}
@media (max-width: 760px) {
  .markdown-layout {
    grid-template-columns: 1fr;
  }
  .markdown-input {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}
/*! Bundled license information:

@xterm/xterm/css/xterm.css:
  (**
   * Copyright (c) 2014 The xterm.js authors. All rights reserved.
   * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
   * https://github.com/chjj/term.js
   * @license MIT
   *
   * Permission is hereby granted, free of charge, to any person obtaining a copy
   * of this software and associated documentation files (the "Software"), to deal
   * in the Software without restriction, including without limitation the rights
   * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   * copies of the Software, and to permit persons to whom the Software is
   * furnished to do so, subject to the following conditions:
   *
   * The above copyright notice and this permission notice shall be included in
   * all copies or substantial portions of the Software.
   *
   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
   * THE SOFTWARE.
   *
   * Originally forked from (with the author's permission):
   *   Fabrice Bellard's javascript vt100 for jslinux:
   *   http://bellard.org/jslinux/
   *   Copyright (c) 2011 Fabrice Bellard
   *   The original design remains. The terminal itself
   *   has been extended to include xterm CSI codes, among
   *   other features.
   *)
*/
