:root {
  color-scheme: dark;
  --bg: #12110f;
  --bg-soft: #191714;
  --panel: rgba(28, 26, 22, 0.92);
  --panel-strong: rgba(39, 35, 31, 0.96);
  --panel-muted: rgba(255, 255, 255, 0.04);
  --ink: #efe7d8;
  --muted: #aca491;
  --line: rgba(247, 233, 206, 0.1);
  --line-strong: rgba(247, 233, 206, 0.2);
  --accent: #ead7b2;
  --accent-ink: #1a1712;
  --accent-soft: rgba(234, 215, 178, 0.12);
  --warn: #dfbb63;
  --danger: #f27f73;
  --ok: #7ee09a;
  --code: #08130b;
  --code-line: #21492a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(142, 118, 78, 0.18), transparent 28rem),
    radial-gradient(circle at top right, rgba(61, 89, 72, 0.16), transparent 24rem),
    linear-gradient(180deg, #161411 0%, var(--bg) 24rem, #0f0e0c 100%);
  color: var(--ink);
  font: 15px/1.5 "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

code,
pre {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
}

code {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.08rem 0.45rem;
  color: #f6f0e4;
}

pre {
  overflow: auto;
  max-height: 430px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--code-line);
  border-radius: 14px;
  background: var(--code);
  color: #74ff8a;
  white-space: pre-wrap;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  align-content: start;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 15, 13, 0.78);
  backdrop-filter: blur(16px);
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand strong,
h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.brand strong {
  font-size: 1.18rem;
}

.brand span {
  color: var(--muted);
  font-size: 0.78rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nav a {
  border-radius: 999px;
  color: var(--ink);
  padding: 0.4rem 0.72rem;
  font-size: 0.9rem;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.nav a.active,
.nav a:hover {
  background: var(--accent-soft);
  color: #fff7ea;
}

.session-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.account-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  padding: 0.34rem 0.62rem;
  font-size: 0.78rem;
}

.main {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 14px 20px 48px;
}

.hero,
.topbar,
.split,
.row,
.actions {
  display: flex;
  gap: 14px;
}

.hero,
.topbar,
.split {
  align-items: flex-start;
  justify-content: space-between;
}

.hero {
  margin-bottom: 18px;
  padding: 8px 2px 2px;
}

.dashboard-bar,
.project-workbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.dashboard-bar h1 {
  font-size: 1.15rem;
}

.dashboard-actions {
  justify-content: flex-end;
}

.project-workbar {
  margin-bottom: 10px;
}

.project-workbar h1 {
  flex: 1;
  min-width: 0;
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

.project-workbar-actions {
  justify-content: flex-end;
}

.hero-actions {
  justify-content: flex-end;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.02;
  overflow-wrap: anywhere;
}

h2 {
  font-size: 1.35rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.lede,
.muted {
  overflow-wrap: anywhere;
}

.lede {
  max-width: 60ch;
  margin: 0;
  color: #ddd2bf;
  font-size: 1rem;
}

.muted {
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
}

.stack {
  display: grid;
  gap: 14px;
}

.card,
.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(34, 31, 27, 0.94), rgba(24, 22, 19, 0.94));
  box-shadow: var(--shadow);
}

.card {
  padding: 18px;
  display: grid;
  gap: 14px;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.panel {
  padding: 18px;
}

.project-card {
  position: relative;
}

.project-card-top {
  align-items: flex-start;
}

.project-card-actions {
  align-items: center;
}

.project-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.project-tile {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(24, 22, 19, 0.92);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.project-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(234, 215, 178, 0.34);
}

.project-tile-link {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.project-tile-preview {
  position: relative;
  height: 150px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #0d0c0b;
}

.project-tile-preview iframe {
  width: 150%;
  height: 150%;
  border: 0;
  pointer-events: none;
  transform: scale(0.667);
  transform-origin: top left;
}

.project-tile-preview.is-empty {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(234, 215, 178, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    #12110f;
}

.project-tile-preview.is-empty span {
  max-width: 80%;
  color: rgba(239, 231, 216, 0.34);
  font-size: 0.82rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-align: center;
}

.project-tile-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
}

.project-tile-name h3 {
  min-width: 0;
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
}

.worker-create-panel {
  margin-bottom: 14px;
  padding: 14px;
}

.worker-create-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 180px) auto;
  gap: 10px;
  align-items: end;
}

.worker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.worker-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(24, 22, 19, 0.9);
  padding: 13px;
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.worker-card:hover {
  transform: translateY(-1px);
  border-color: rgba(234, 215, 178, 0.32);
  background: rgba(30, 28, 24, 0.94);
}

.worker-card-main {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--ink);
}

.worker-card-main strong {
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.worker-card-main span {
  color: var(--muted);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.worker-card-status {
  justify-self: end;
}

.worker-card-actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
  gap: 8px;
}

.live-dot,
.quiet-dot {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 2px 7px;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.live-dot {
  background: rgba(99, 255, 122, 0.12);
  color: #63ff7a;
}

.quiet-dot {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.card-quiet {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.empty-panel {
  gap: 10px;
  place-items: start;
}

.new-project-panel {
  max-width: 760px;
}

.git-toggle {
  width: fit-content;
  min-width: 190px;
}

.git-options {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  padding: 14px;
}

.git-options[hidden] {
  display: none;
}

.deploy-key-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#deploy-key-public {
  min-height: 78px;
  font-size: 0.82rem;
}

.inline-help {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-muted);
  padding: 10px 12px;
}

.inline-help summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 700;
}

.inline-help ol {
  margin: 10px 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.row {
  flex-wrap: wrap;
  align-items: center;
}

.actions {
  flex-wrap: wrap;
  align-items: center;
}

.actions form {
  min-width: 0;
}

button,
.button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  font: inherit;
  line-height: 1;
  white-space: nowrap;
  transition: transform 120ms ease, border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

button:hover,
.button:hover {
  transform: translateY(-1px);
}

button,
.button {
  background: var(--accent);
  color: var(--accent-ink);
}

button.secondary,
.button.secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
}

button.subtle,
.button.subtle {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

button.danger,
.button.danger {
  background: var(--danger);
  color: #1f0f0d;
}

button.danger-ghost,
.button.danger-ghost {
  border-color: rgba(242, 127, 115, 0.35);
  background: rgba(242, 127, 115, 0.08);
  color: #ffb3a8;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 10, 9, 0.42);
  color: var(--ink);
  font: inherit;
  padding: 0.8rem 0.9rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(234, 215, 178, 0.34);
  box-shadow: 0 0 0 3px rgba(234, 215, 178, 0.08);
}

textarea {
  min-height: 150px;
  resize: vertical;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 11px;
  background: rgba(126, 224, 154, 0.12);
  color: var(--ok);
  font-size: 0.77rem;
  font-weight: 700;
  white-space: nowrap;
}

.status.warn {
  background: rgba(223, 187, 99, 0.12);
  color: var(--warn);
}

.status.danger {
  background: rgba(242, 127, 115, 0.12);
  color: var(--danger);
}

.meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.meta-compact {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.meta div {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-muted);
  padding: 12px;
}

.meta span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.76rem;
}

.project-console-panel {
  gap: 12px;
  padding: 12px;
}

.project-console-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.project-console-bar label {
  width: min(360px, 100%);
}

.terminal-state {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-bottom: 3px;
  font-size: 0.82rem;
}

.project-console-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 1px;
}

.project-console-tools .muted {
  min-width: 68px;
  font-size: 0.78rem;
}

.terminal-dot {
  color: var(--warn);
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.terminal-dot.connected {
  color: #63ff7a;
}

.xterm-host {
  min-height: 520px;
  height: calc(100vh - 220px);
  overflow: hidden;
  border: 1px solid #254d2f;
  border-radius: 10px;
  background: radial-gradient(circle at top left, rgba(31, 88, 42, 0.18), transparent 22rem), var(--code);
  padding: 10px;
}

.worker-terminal-panel {
  padding: 12px;
}

.worker-xterm-host {
  height: calc(100vh - 190px);
}

.xterm-host.dragging {
  border-color: #63ff7a;
  box-shadow: 0 0 0 1px rgba(99, 255, 122, 0.35), 0 0 30px rgba(99, 255, 122, 0.1);
}

.xterm .xterm-viewport {
  background-color: transparent !important;
}

.compact-panel {
  gap: 10px;
}

.project-preview-panel {
  margin-top: 14px;
  gap: 10px;
  padding: 12px;
}

.project-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.preview-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.preview-title h2 {
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
}

.project-preview-frame {
  overflow: hidden;
  height: min(58vh, 560px);
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0d0c0b;
}

.project-preview-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.project-container-actions {
  justify-content: flex-end;
}

.preview-visibility-form {
  display: inline-flex;
}

.container-log {
  max-height: 150px;
  font-size: 0.8rem;
}

.performance-shell {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.performance-header {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.resource-pill {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 11px 12px;
}

.resource-pill span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.resource-pill strong {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 1.2rem;
  color: #74ff8a;
}

.performance-message {
  min-height: 20px;
  color: var(--muted);
  font-size: 0.84rem;
}

.performance-message.is-error {
  color: var(--danger);
}

.vps-health {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}

.health-pill {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  padding: 9px 10px;
}

.health-pill span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.health-pill strong {
  overflow-wrap: anywhere;
  color: var(--ok);
  font-size: 0.8rem;
}

.health-pill.warn strong {
  color: var(--warn);
}

.health-pill.danger strong {
  color: var(--danger);
}

.performance-graph-wrap {
  overflow: hidden;
  border: 1px solid #254d2f;
  border-radius: 10px;
  background: var(--code);
}

#performance-graph {
  display: block;
  width: 100%;
  height: 260px;
}

.performance-list {
  display: grid;
  gap: 8px;
}

.resource-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(260px, 1.4fr) minmax(180px, auto);
  gap: 12px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  padding: 11px 12px;
}

.resource-row-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.resource-row-main strong {
  overflow-wrap: anywhere;
}

.resource-row-main span,
.resource-details {
  color: var(--muted);
  font-size: 0.78rem;
}

.resource-bars {
  display: grid;
  gap: 7px;
}

.resource-bar {
  display: grid;
  grid-template-columns: 54px minmax(80px, 1fr) 48px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.73rem;
}

.resource-bar div {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.resource-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #74ff8a, #ead7b2);
}

.resource-bar strong {
  color: var(--ink);
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-weight: 700;
  text-align: right;
}

.resource-details {
  display: grid;
  gap: 3px;
  justify-items: end;
}

.performance-empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.terminal-output {
  min-height: 360px;
  max-height: 560px;
}

.terminal-input-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}

.table th,
.table td {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
}

.table th {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.notice {
  margin-bottom: 14px;
  border: 1px solid rgba(234, 215, 178, 0.18);
  border-radius: 14px;
  background: rgba(234, 215, 178, 0.08);
  color: var(--ink);
  padding: 12px 14px;
  white-space: pre-wrap;
}

.field-block {
  display: grid;
  gap: 8px;
}

.field-block > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.compact-check-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-muted);
  padding: 8px 10px;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.2;
}

.check-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--accent);
  box-shadow: none;
}

.settings-shell {
  display: grid;
  gap: 14px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.settings-panel {
  display: grid;
  gap: 14px;
}

.settings-panel h2 {
  font-family: "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
}

.settings-panel textarea {
  min-height: 122px;
}

.advanced-settings {
  padding: 14px 18px;
}

.advanced-settings summary,
.danger-details summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 700;
}

.advanced-settings .form-grid {
  margin-top: 14px;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
}

.settings-test-form {
  margin-top: 12px;
}

.env-override-panel {
  margin-top: 14px;
}

.env-override-form {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.copy-command-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.copy-command-row code {
  border-radius: 10px;
  padding: 0.48rem 0.62rem;
}

.copy-command-row .muted {
  font-size: 0.78rem;
}

.danger-details {
  margin-top: 12px;
  border: 1px solid rgba(242, 127, 115, 0.2);
  border-radius: 12px;
  background: rgba(242, 127, 115, 0.055);
  padding: 12px 14px;
}

.confirm-inline {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.danger-notice {
  border-color: rgba(242, 127, 115, 0.22);
  background: rgba(242, 127, 115, 0.08);
  color: #ffd0c8;
}

.dialog-shell {
  min-height: calc(100vh - 150px);
  display: grid;
  place-items: center;
  padding: 18px 0;
}

.confirm-panel,
.setup-card {
  width: min(620px, 100%);
}

.setup-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

@media (max-width: 820px) {
  .hero,
  .topbar,
  .split,
  .dashboard-bar,
  .project-workbar,
  .project-preview-bar,
  .project-console-bar,
  .worker-create-form,
  .settings-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .sidebar {
    align-items: center;
    gap: 8px 10px;
    padding: 8px 12px;
  }

  .nav-shell {
    flex: 1 1 auto;
    gap: 10px;
  }

  .session-tools {
    justify-content: flex-end;
  }

  .account-pill {
    display: none;
  }

  .worker-create-form,
  .env-override-form,
  .settings-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .nav {
    width: auto;
    gap: 4px;
  }

  .nav a {
    padding: 0.34rem 0.58rem;
    font-size: 0.84rem;
  }

  .main {
    padding: 10px 12px 40px;
  }

  .project-console-bar label,
  .confirm-panel,
  .setup-card {
    width: 100%;
  }

  .project-workbar-actions,
  .project-container-actions {
    justify-content: flex-start;
  }

  .project-tile-grid {
    grid-template-columns: 1fr;
  }

  .performance-header,
  .resource-row {
    grid-template-columns: 1fr;
  }

  .resource-details {
    justify-items: start;
  }

  .worker-card {
    grid-template-columns: 1fr;
  }

  .worker-card-status {
    justify-self: start;
  }

  .terminal-input-row {
    grid-template-columns: 1fr;
  }

  .xterm-host {
    min-height: 440px;
    height: calc(100vh - 340px);
  }

  .worker-xterm-host {
    height: calc(100vh - 270px);
  }

  .confirm-inline {
    grid-template-columns: 1fr;
  }
}
