:root {
  color-scheme: dark;
  --bg: #0b1020;
  --bg-deep: #060a14;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #111827;
  --text: #e5edf7;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.24);
  --line-soft: rgba(148, 163, 184, 0.14);
  --blue: #60a5fa;
  --teal: #2dd4bf;
  --amber: #f59e0b;
  --rose: #fb7185;
  --good: #22c55e;
  --bad: #f87171;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
  --body-bg:
    radial-gradient(circle at 18% 12%, rgba(96, 165, 250, 0.2), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(45, 212, 191, 0.16), transparent 24%),
    linear-gradient(135deg, #080d19 0%, #0f172a 48%, #111827 100%);
  --button-bg: rgba(15, 23, 42, 0.78);
  --input-bg: rgba(15, 23, 42, 0.72);
  --surface-soft: rgba(15, 23, 42, 0.56);
  --table-head: rgba(15, 23, 42, 0.96);
  --bar-bg: rgba(148, 163, 184, 0.22);
  --badge-bg: rgba(148, 163, 184, 0.16);
  --badge-text: #cbd5e1;
  --good-bg: rgba(34, 197, 94, 0.16);
  --bad-bg: rgba(248, 113, 113, 0.16);
  --solid-button-bg: #e5edf7;
  --solid-button-text: #0f172a;
  --value-text: #dbe5f2;
  --env-key-bg: rgba(96, 165, 250, 0.14);
  --env-key-border: rgba(96, 165, 250, 0.24);
  --env-key-text: #93c5fd;
  --source-system-bg: rgba(148, 163, 184, 0.16);
  --source-system-text: #cbd5e1;
  --source-service-bg: rgba(34, 197, 94, 0.16);
  --source-service-text: #86efac;
  --source-dashboard-bg: rgba(96, 165, 250, 0.16);
  --source-dashboard-text: #93c5fd;
  --source-default-bg: rgba(148, 163, 184, 0.12);
  --source-default-text: #94a3b8;
  --source-override-bg: rgba(245, 158, 11, 0.18);
  --source-override-text: #fbbf24;
  --auth-bg: rgba(15, 23, 42, 0.94);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef2f7;
  --bg-deep: #0b1020;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --text: #101828;
  --muted: #667085;
  --line: rgba(15, 23, 42, 0.12);
  --line-soft: rgba(15, 23, 42, 0.07);
  --blue: #2563eb;
  --teal: #0f766e;
  --amber: #d97706;
  --rose: #e11d48;
  --good: #16a34a;
  --bad: #dc2626;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.13);
  --body-bg:
    radial-gradient(circle at 18% 12%, rgba(37, 99, 235, 0.18), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(15, 118, 110, 0.16), transparent 24%),
    linear-gradient(135deg, #f8fafc 0%, #e8eef7 46%, #f7f7fb 100%);
  --button-bg: rgba(255, 255, 255, 0.9);
  --input-bg: rgba(255, 255, 255, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.58);
  --table-head: rgba(248, 250, 252, 0.96);
  --bar-bg: #e2e8f0;
  --badge-bg: #eef2f7;
  --badge-text: #475467;
  --good-bg: #dcfce7;
  --bad-bg: #fee2e2;
  --solid-button-bg: #111827;
  --solid-button-text: #ffffff;
  --value-text: #344054;
  --env-key-bg: rgba(37, 99, 235, 0.08);
  --env-key-border: rgba(37, 99, 235, 0.16);
  --env-key-text: #1d4ed8;
  --source-system-bg: #eef2f7;
  --source-system-text: #475467;
  --source-service-bg: #dcfce7;
  --source-service-text: #15803d;
  --source-dashboard-bg: #dbeafe;
  --source-dashboard-text: #1d4ed8;
  --source-default-bg: #f1f5f9;
  --source-default-text: #64748b;
  --source-override-bg: #fef3c7;
  --source-override-text: #92400e;
  --auth-bg: rgba(255, 255, 255, 0.93);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--body-bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.auth-lock {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--button-bg);
  color: var(--text);
  padding: 0 14px;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

button:hover {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #2563eb, #0f766e);
  color: #fff;
}

button.warn {
  color: var(--amber);
}

button.ghost {
  background: transparent;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

input,
select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  padding: 0 12px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
select:focus {
  border-color: rgba(37, 99, 235, 0.68);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.hidden {
  display: none !important;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 252px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.96)),
    var(--bg-deep);
  color: #fff;
  padding: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #38bdf8, #34d399);
  color: #06202b;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(34, 211, 238, 0.25);
}

.brand small {
  display: block;
  margin-top: 3px;
  color: #aab6c7;
}

.nav-tabs {
  display: grid;
  gap: 8px;
}

.nav-tabs button,
.sidebar .ghost {
  justify-content: flex-start;
  border-color: transparent;
  background: transparent;
  color: #d7deea;
  text-align: left;
}

.nav-tabs button:hover,
.sidebar .ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: none;
}

.nav-tabs button.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.42), rgba(15, 118, 110, 0.34));
  color: #fff;
}

.sidebar .ghost {
  margin-top: auto;
}

.content {
  min-width: 0;
  padding: 26px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  min-width: 72px;
  min-height: 34px;
  border-color: var(--line-soft);
  background: var(--panel);
  font-weight: 800;
}

.topbar h1 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1.15;
}

.topbar p {
  margin: 7px 0 0;
  color: var(--muted);
}

.eyebrow {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pill,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-text);
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
}

.badge.good {
  background: var(--good-bg);
  color: var(--good);
}

.badge.bad {
  background: var(--bad-bg);
  color: var(--bad);
}

.badge.gray {
  background: var(--badge-bg);
  color: var(--badge-text);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.metric-card,
.panel {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.metric-card {
  position: relative;
  display: grid;
  min-height: 146px;
  align-content: space-between;
  overflow: hidden;
  padding: 18px;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--blue);
}

.metric-card.accent-teal::before {
  background: var(--teal);
}

.metric-card.accent-amber::before {
  background: var(--amber);
}

.metric-card.accent-rose::before {
  background: var(--rose);
}

.metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metric-head span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.metric-head strong {
  font-size: 28px;
  line-height: 1;
}

.service-card {
  gap: 12px;
}

.service-card.running::before {
  background: var(--good);
}

.service-card.stopped::before {
  background: var(--rose);
}

.service-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.service-status-head > span:first-child {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 900;
}

.status-pill.good {
  background: var(--good-bg);
  color: var(--good);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.18) inset;
}

.status-pill.bad {
  background: var(--bad-bg);
  color: var(--bad);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.18) inset;
}

.status-pill.idle {
  background: var(--badge-bg);
  color: var(--badge-text);
}

.service-state-text {
  font-size: 24px;
  line-height: 1.1;
}

.service-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.service-meta-grid span {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 8px 10px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bar-bg);
}

.bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  transition: width 180ms ease;
}

.metric-card small,
.service-line,
.list small {
  color: var(--muted);
}

.service-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

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

.panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-head h2 {
  margin: 0;
  font-size: 17px;
}

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

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

.toolbar select {
  max-width: 360px;
}

.list {
  display: grid;
  gap: 10px;
}

.list-row {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line-soft);
  padding-top: 11px;
}

.list-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

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

.component-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 16px;
}

.component-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.component-title h3 {
  margin: 0;
  font-size: 18px;
}

.component-meta {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 8px 12px;
  color: var(--muted);
}

.component-meta strong {
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.process-top-grid {
  align-items: start;
}

.process-list {
  display: grid;
  gap: 12px;
}

.process-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

.process-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.process-rank {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 900;
}

.process-main {
  min-width: 0;
}

.process-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.process-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.process-title span {
  color: var(--text);
  font-weight: 900;
}

.process-bar {
  height: 6px;
  margin-bottom: 6px;
}

.port-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.kv-list {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 11px 14px;
  margin: 0;
}

.kv-list dt {
  color: var(--muted);
}

.kv-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.spring-panel-head {
  align-items: center;
}

.compact-actions {
  margin-left: auto;
}

.compact-actions button {
  min-height: 34px;
}

.action-result {
  margin: -4px 0 12px;
  text-align: right;
}

.inline-result {
  min-height: 20px;
  color: var(--muted);
}

.error-text {
  min-height: 20px;
  color: var(--bad);
}

.log-panel {
  min-height: calc(100vh - 142px);
}

.log-pane {
  height: calc(100vh - 232px);
  overflow: auto;
  border: 1px solid rgba(17, 24, 39, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.98)),
    #111827;
  color: #d1fae5;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  padding: 12px;
  white-space: pre-wrap;
}

.log-line {
  min-height: 20px;
  overflow-wrap: anywhere;
}

.env-form {
  display: grid;
  grid-template-columns: minmax(160px, 280px) minmax(220px, 1fr) 96px;
  gap: 10px;
  margin-bottom: 14px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  white-space: nowrap;
}

.search {
  width: 180px;
}

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 4px;
}

.segmented button {
  min-height: 30px;
  border: 0;
  background: transparent;
  padding: 0 12px;
  box-shadow: none;
  font-weight: 800;
}

.segmented button:hover {
  transform: none;
  box-shadow: none;
}

.segmented button.active {
  background: var(--solid-button-bg);
  color: var(--solid-button-text);
}

.group-hint {
  margin: -4px 0 14px;
  color: var(--muted);
  text-align: center;
  overflow-wrap: anywhere;
}

.table-wrap {
  max-height: calc(100vh - 282px);
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line-soft);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  background: var(--table-head);
  color: var(--muted);
  font-size: 13px;
}

td {
  overflow-wrap: anywhere;
}

td.actions {
  width: 146px;
  white-space: nowrap;
}

td.actions button {
  min-height: 30px;
  padding: 0 9px;
}

.env-table-wrap {
  background: var(--surface-soft);
}

.env-table {
  min-width: 780px;
  table-layout: auto;
}

.env-table th,
.env-table td {
  text-align: center;
  vertical-align: middle;
}

.env-table th {
  height: 44px;
  font-weight: 800;
}

.env-key-cell,
.env-source-cell,
.env-table td.actions {
  width: 1%;
  white-space: nowrap;
}

.env-value-cell {
  min-width: 260px;
  max-width: 58vw;
}

.env-key-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: min(360px, 32vw);
  min-height: 30px;
  border: 1px solid var(--env-key-border);
  border-radius: 8px;
  background: var(--env-key-bg);
  color: var(--env-key-text);
  padding: 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 700 12px/1.2 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.env-value-text {
  display: inline-block;
  max-width: 100%;
  color: var(--value-text);
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.source-pill.system {
  background: var(--source-system-bg);
  color: var(--source-system-text);
}

.source-pill.service {
  background: var(--source-service-bg);
  color: var(--source-service-text);
}

.source-pill.dashboard {
  background: var(--source-dashboard-bg);
  color: var(--source-dashboard-text);
}

.source-pill.default {
  background: var(--source-default-bg);
  color: var(--source-default-text);
}

.source-pill.override {
  margin-left: 6px;
  background: var(--source-override-bg);
  color: var(--source-override-text);
}

.env-table td.actions {
  width: 150px;
}

.env-table td.actions button {
  margin: 2px;
}

.empty-cell {
  height: 120px;
  color: var(--muted);
  text-align: center;
}

.upload-box {
  display: grid;
  gap: 12px;
}

.deploy-flow {
  display: grid;
  gap: 16px;
}

.step-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
}

.step-index {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #0f766e);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22);
}

.step-body {
  min-width: 0;
}

.panel-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.file-picker {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px dashed rgba(37, 99, 235, 0.38);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 14px;
  cursor: pointer;
}

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.file-picker span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  background: var(--solid-button-bg);
  color: var(--solid-button-text);
  font-weight: 800;
}

.file-picker strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-actions,
.script-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.script-editor {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  border: 1px solid rgba(17, 24, 39, 0.16);
  border-radius: 8px;
  background: #0f172a;
  color: #d1fae5;
  padding: 14px;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  outline: none;
}

.script-editor:focus {
  border-color: rgba(37, 99, 235, 0.68);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.hint-text {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.run-output {
  min-height: 180px;
  max-height: 360px;
  overflow: auto;
  border: 1px solid rgba(17, 24, 39, 0.16);
  border-radius: 8px;
  background: #111827;
  color: #d1fae5;
  padding: 12px;
  white-space: pre-wrap;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.upload-progress {
  height: 10px;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 30% 20%, rgba(37, 99, 235, 0.28), transparent 30%),
    rgba(7, 12, 24, 0.66);
  backdrop-filter: blur(12px);
}

.auth-dialog {
  width: min(430px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: var(--auth-bg);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  padding: 28px;
}

.auth-dialog h1 {
  margin: 8px 0 8px;
  font-size: 28px;
}

.auth-dialog p {
  margin: 0 0 18px;
  color: var(--muted);
}

.auth-dialog label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.auth-dialog input,
.auth-dialog button {
  width: 100%;
}

.auth-dialog button {
  margin-top: 14px;
}

.lock-mark {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: var(--solid-button-bg);
  color: var(--solid-button-text);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 1040px) {
  .metric-grid,
  .split-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
  }

  .nav-tabs {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .nav-tabs button,
  .sidebar .ghost {
    justify-content: center;
    text-align: center;
    padding: 0 8px;
  }

  .content {
    padding: 14px;
  }

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

  .metric-grid,
  .split-grid,
  .component-grid {
    grid-template-columns: 1fr;
  }

  .panel-head,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .spring-panel-head {
    align-items: stretch;
  }

  .panel-title-row,
  .compact-actions {
    justify-content: space-between;
    margin-left: 0;
  }

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

  .step-card,
  .file-picker {
    grid-template-columns: 1fr;
  }

  .upload-actions,
  .script-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .log-pane {
    height: 62vh;
  }
}
