:root {
  --bg: #f7f8fa;
  --surface: #fff;
  --ink: #202331;
  --muted: #7a7f90;
  --line: #e8eaf0;
  --accent: #7258ed;
  --green: #218a65;
  --red: #bf4a4a;
  --side: #171b29;
  --accent-ink: #fff;
  --input: #fff;
  --input-line: #dfe2eb;
  --radius: 12px;
  font:
    14px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--accent);
}
button {
  border: 0;
  background: none;
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 29px;
  line-height: 1.25;
  letter-spacing: -1px;
  font-weight: 650;
}
h2 {
  font-size: 15px;
  font-weight: 650;
}
h3 {
  font-size: 13px;
}
code,
.mono {
  font:
    12px/1.6 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
}
.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 224px 1fr;
}
.sidebar {
  background: var(--side);
  color: #9ea5ba;
  padding: 30px 17px 18px;
  position: fixed;
  inset: 0 auto 0 0;
  width: 224px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.6px;
  padding: 0 12px;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  border-radius: 9px;
  width: 32px;
  height: 34px;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}
.brand small {
  display: block;
  color: #8c92a9;
  font-size: 12px;
  letter-spacing: 0.8px;
  line-height: 1.1;
}
.space-label {
  margin: 40px 13px 12px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 1.5px;
  color: #6e768e;
}
.nav {
  display: grid;
  gap: 5px;
}
.nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 7px;
  text-align: left;
  font-size: 13px;
}
.nav button:hover {
  background: #242a3c;
  color: #e8eaff;
}
.nav button.active {
  background: #302c4f;
  color: #c3b6ff;
}
.icon {
  width: 17px;
  height: 17px;
  display: inline-block;
  vertical-align: middle;
  flex: none;
}
.sidebar-bottom {
  margin-top: auto;
}
.docs-link {
  padding: 14px 12px;
  display: flex;
  gap: 10px;
  font-size: 12px;
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #2c3142;
  padding: 20px 9px 0;
  margin-top: 14px;
  color: #e5e7f0;
}
.avatar {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ddd4ff;
  color: #6145af;
  font-size: 11px;
  font-weight: 700;
}
.profile small {
  display: block;
  color: #8e96ad;
  font-size: 10px;
}
.profile button {
  margin-left: auto;
  color: #8992ab;
}
.main {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 76px;
  padding: 0 42px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #9095a3;
}
.breadcrumb strong {
  color: #454b5e;
  font-weight: 500;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-size: 11px;
  white-space: nowrap;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
}
.login-theme {
  position: absolute;
  top: 24px;
  right: 24px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 5px;
  font-size: 11px;
  padding: 3px 8px;
  font-weight: 550;
  background: #f0f1f5;
  color: #747b8d;
  white-space: nowrap;
}
.pill.green {
  background: #eaf7ef;
  color: #288461;
}
.pill.purple {
  background: #f0ecff;
  color: #7961cf;
}
.pill.orange {
  background: #fff3df;
  color: #a27528;
}
.pill.red {
  background: #ffeded;
  color: #ba5151;
}
.dot {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  display: inline-block;
}
.demo-banner {
  background: #f0ecff;
  color: #6d58ae;
  text-align: center;
  font-size: 11px;
  padding: 7px 20px;
  border-bottom: 1px solid #e6dffc;
}
.content {
  max-width: 1490px;
  margin: auto;
  padding: 37px 42px 40px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 29px;
}
.eyebrow {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 600;
  margin-bottom: 8px;
}
.subtitle {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid #dfe2ea;
  border-radius: 7px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  min-height: 36px;
}
.btn:hover {
  background: #f4f5f9;
  border-color: #c7c5d5;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 3px 7px #7158ed16;
}
.btn.primary:hover {
  background: #644ad6;
}
.btn.danger {
  color: var(--red);
  border-color: #e9cccc;
}
.btn.small {
  padding: 5px 10px;
  min-height: 30px;
  font-size: 11px;
}
.button-group {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
  margin-bottom: 24px;
}
.metric {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 19px 21px;
}
.metric-label {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.metric-value {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.8px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.metric-value .pill {
  font-size: 10px;
  letter-spacing: 0;
}
.metric-foot {
  color: #989dab;
  font-size: 10px;
  margin-top: 6px;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  margin-bottom: 22px;
}
.card-header {
  padding: 19px 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.card-title {
  display: flex;
  align-items: center;
  gap: 9px;
}
.card-subtitle {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.card-body {
  padding: 23px;
}
.instance-title {
  display: flex;
  align-items: center;
  gap: 14px;
}
.bot-icon {
  width: 43px;
  height: 43px;
  border: 1px solid #e9e3fc;
  background: #f7f4ff;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--accent);
}
.bot-icon .icon {
  width: 25px;
  height: 25px;
}
.instance-title h2 {
  font-size: 16px;
}
.instance-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
}
.instance-details {
  padding: 24px;
  border-right: 1px solid var(--line);
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 35px;
}
.detail-label {
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 1px;
  color: #959aaa;
  margin-bottom: 6px;
}
.detail-value {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.detail-value .icon {
  color: #989dad;
  width: 14px;
  height: 14px;
}
.detail-value code {
  background: #f5f5f9;
  border: 1px solid #ecedf2;
  border-radius: 4px;
  padding: 1px 5px;
  color: #667087;
  font-size: 10px;
}
.health-panel {
  padding: 23px;
}
.health-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 10px 0;
  font-size: 11px;
}
.check-state {
  margin-left: auto;
  color: #36916f;
  font-size: 10px;
}
.check-row .icon {
  width: 14px;
  height: 14px;
  color: #36916f;
}
.check-row.disabled .icon,
.check-row.disabled .check-state {
  color: #b1b5c1;
}
.check-row.error .icon,
.check-row.error .check-state {
  color: var(--red);
}
.instance-footer {
  border-top: 1px solid var(--line);
  padding: 13px 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fdfdfe;
}
.small-note {
  font-size: 10px;
  color: #9b9faa;
}
.two-col {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 22px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 11px;
}
th {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 550;
  color: #959aaa;
  background: #fcfcfd;
  padding: 11px 23px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 15px 23px;
  border-bottom: 1px solid #f0f1f5;
  color: #737a8c;
}
td:first-child {
  color: #40475a;
}
tr:last-child td {
  border-bottom: 0;
}
.commit {
  display: flex;
  align-items: center;
  gap: 8px;
}
.commit .icon {
  color: #9d8bd4;
  width: 14px;
  height: 14px;
}
.text-link {
  color: var(--accent);
  font-size: 11px;
}
.terminal {
  background: #1d2231;
  color: #aeb9ce;
  padding: 17px 20px;
  font:
    10px/2 ui-monospace,
    SFMono-Regular,
    monospace;
  overflow: auto;
  min-height: 149px;
  max-height: 370px;
}
.terminal-line {
  display: flex;
  gap: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.terminal-time {
  color: #69768f;
  white-space: nowrap;
}
.terminal-level {
  color: #8dbf9f;
}
.terminal-message {
  color: #b8c2d5;
}
.terminal .warning {
  color: #dfb169;
}
.terminal .error {
  color: #f0a1a1;
}
.live-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #388c6e;
  font-size: 10px;
}
.resource {
  margin-bottom: 19px;
}
.resource:last-child {
  margin-bottom: 0;
}
.resource-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 8px;
}
.resource-label span:last-child {
  color: #989eac;
  font-size: 10px;
}
progress {
  display: block;
  width: 100%;
  height: 5px;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #f0f1f6;
  accent-color: var(--accent);
}
progress::-webkit-progress-bar {
  background: #f0f1f6;
  border-radius: 10px;
}
progress::-webkit-progress-value {
  background: #9b87ed;
  border-radius: 10px;
}
progress::-moz-progress-bar {
  background: #9b87ed;
  border-radius: 10px;
}
.notice {
  background: #faf7ed;
  color: #8b713d;
  border: 1px solid #eee5ce;
  padding: 13px 17px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 22px;
}
.notice.info {
  background: #f4f2ff;
  color: #71638e;
  border-color: #e8e2fa;
}
.guild {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 22px;
  border-bottom: 1px solid var(--line);
}
.guild:last-child {
  border-bottom: 0;
}
.guild-avatar {
  width: 35px;
  height: 35px;
  background: #eff0f7;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #8c86a3;
}
.guild-name {
  font-size: 12px;
  font-weight: 550;
}
.guild-id {
  color: var(--muted);
  font-size: 10px;
}
.guild a {
  margin-left: auto;
}
.activity {
  padding: 19px 23px;
  display: flex;
  gap: 13px;
  border-bottom: 1px solid var(--line);
}
.activity:last-child {
  border: 0;
}
.activity .icon {
  color: #8c7abe;
}
.activity p {
  font-size: 12px;
}
.activity small {
  font-size: 10px;
  color: var(--muted);
}
.empty {
  text-align: center;
  padding: 45px 25px;
  color: var(--muted);
}
.empty h2 {
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 8px;
}
.empty p {
  margin-bottom: 18px;
}
.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 30px;
  color: #a1a6b4;
  font-size: 10px;
}
.section-note {
  padding: 15px 23px;
  color: var(--muted);
  font-size: 11px;
  border-top: 1px solid var(--line);
}
.setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 23px;
  border-bottom: 1px solid var(--line);
}
.setting:last-child {
  border-bottom: 0;
}
.setting p {
  font-size: 12px;
}
.setting small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
dialog {
  border: 1px solid #e3e2ee;
  border-radius: 15px;
  box-shadow: 0 30px 100px #161b2940;
  padding: 0;
  width: min(560px, calc(100% - 32px));
  max-height: 88vh;
  color: var(--ink);
  background: var(--surface);
}
dialog::backdrop {
  background: #12172b70;
  backdrop-filter: blur(3px);
}
.dialog-head {
  padding: 22px 25px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-head h2 {
  font-size: 18px;
}
.dialog-body {
  padding: 23px 25px;
}
.dialog-footer {
  padding: 16px 25px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}
.field {
  margin-bottom: 18px;
}
.field:last-child {
  margin-bottom: 0;
}
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 7px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--input-line);
  border-radius: 7px;
  background: var(--input);
  color: var(--ink);
  font-size: 13px;
}
.field textarea {
  min-height: 100px;
  resize: vertical;
}
.field small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
.plan-list {
  padding: 0 0 0 20px;
  margin: 15px 0;
}
.plan-list li {
  font-size: 12px;
  margin: 12px 0;
  color: #626a80;
}
.plan-meta {
  padding: 13px;
  border-radius: 8px;
  background: #f7f7fb;
  font-size: 11px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.error-text {
  color: var(--red);
  font-size: 12px;
  margin-top: 12px;
}
.hidden {
  display: none !important;
}
.login,
.loading {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
  text-align: center;
  padding: 30px;
}
.login h1 {
  font-size: 34px;
}
.login p {
  color: var(--muted);
  max-width: 410px;
}
.mobile-brand {
  display: none;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #252b3c;
  color: white;
  padding: 12px 20px;
  box-shadow: 0 4px 20px #0002;
  border-radius: 9px;
  font-size: 12px;
  z-index: 10;
  max-width: calc(100vw - 30px);
  display: none;
}
#toast.show {
  display: block;
}
.key-row {
  padding: 18px 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.key-row code {
  font-size: 10px;
  overflow-wrap: anywhere;
}
.spacer {
  height: 10px;
}
.job-step {
  font-size: 11px;
  color: var(--muted);
  padding: 0 23px 18px;
}
.selected-instance {
  padding: 7px 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  max-width: 220px;
  color: var(--ink);
  font-size: 11px;
}

:root[data-theme="dark"] {
  --bg: #0e1420;
  --surface: #182130;
  --ink: #e8edf7;
  --muted: #aeb9ce;
  --line: #354258;
  --accent: #b7a4ff;
  --green: #7edbb2;
  --red: #ff9ba5;
  --side: #111827;
  --accent-ink: #211746;
  --input: #111927;
  --input-line: #526079;
}
:root[data-theme="dark"] .sidebar {
  color: #b4bfd3;
}
:root[data-theme="dark"] .brand small,
:root[data-theme="dark"] .space-label,
:root[data-theme="dark"] .profile small,
:root[data-theme="dark"] .profile button {
  color: #a3acc0;
}
:root[data-theme="dark"] .breadcrumb,
:root[data-theme="dark"] .breadcrumb strong {
  color: #c3cede;
}
:root[data-theme="dark"] .pill {
  background: #293548;
  color: #c6d0e4;
}
:root[data-theme="dark"] .pill.green {
  background: #153d37;
  color: #91e8be;
}
:root[data-theme="dark"] .pill.purple {
  background: #302858;
  color: #cfbfff;
}
:root[data-theme="dark"] .pill.orange {
  background: #493820;
  color: #f3c986;
}
:root[data-theme="dark"] .pill.red {
  background: #522a38;
  color: #ffb5bd;
}
:root[data-theme="dark"] .demo-banner {
  background: #302858;
  color: #e3d7ff;
  border-color: #554676;
}
:root[data-theme="dark"] .btn {
  border-color: var(--line);
}
:root[data-theme="dark"] .btn:hover {
  background: #273248;
  border-color: #8576c2;
}
:root[data-theme="dark"] .btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
:root[data-theme="dark"] .btn.primary:hover {
  background: #c9bbff;
}
:root[data-theme="dark"] .btn.danger {
  color: var(--red);
  border-color: #765467;
}
:root[data-theme="dark"] .metric-foot,
:root[data-theme="dark"] .detail-label,
:root[data-theme="dark"] .detail-value .icon,
:root[data-theme="dark"] .small-note,
:root[data-theme="dark"] .resource-label span:last-child,
:root[data-theme="dark"] .page-footer,
:root[data-theme="dark"] th {
  color: #aab7cd;
}
:root[data-theme="dark"] .bot-icon {
  background: #2b254c;
  border-color: #554674;
}
:root[data-theme="dark"] .detail-value code,
:root[data-theme="dark"] .plan-meta {
  background: #253044;
  border-color: var(--line);
  color: #d6def0;
}
:root[data-theme="dark"] .check-state,
:root[data-theme="dark"] .check-row .icon,
:root[data-theme="dark"] .live-indicator {
  color: #8de2b6;
}
:root[data-theme="dark"] .check-row.disabled .icon,
:root[data-theme="dark"] .check-row.disabled .check-state {
  color: #9eabc1;
}
:root[data-theme="dark"] .check-row.error .icon,
:root[data-theme="dark"] .check-row.error .check-state {
  color: var(--red);
}
:root[data-theme="dark"] .instance-footer,
:root[data-theme="dark"] th {
  background: #1c2737;
}
:root[data-theme="dark"] td {
  border-bottom-color: var(--line);
  color: #c4cede;
}
:root[data-theme="dark"] td:first-child {
  color: var(--ink);
}
:root[data-theme="dark"] progress,
:root[data-theme="dark"] progress::-webkit-progress-bar {
  background: #293548;
}
:root[data-theme="dark"] .notice {
  background: #3a3023;
  color: #efd09c;
  border-color: #695334;
}
:root[data-theme="dark"] .notice.info {
  background: #2e2850;
  color: #d9cbff;
  border-color: #5b4b83;
}
:root[data-theme="dark"] .guild-avatar {
  background: #293548;
  color: #d0c1ff;
}
:root[data-theme="dark"] .activity .icon,
:root[data-theme="dark"] .commit .icon {
  color: #c2adff;
}
:root[data-theme="dark"] .plan-list li {
  color: #c6d0e0;
}
:root[data-theme="dark"] #toast {
  background: #35445b;
  color: #fff;
}
@media (min-width: 1500px) {
  .content {
    padding-top: 46px;
  }
  .metrics {
    gap: 22px;
  }
}
@media (max-width: 1150px) {
  .content {
    padding: 29px 26px;
  }
  .topbar {
    padding: 0 26px;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .instance-grid {
    grid-template-columns: 1.2fr 1fr;
  }
  .detail-grid {
    gap: 20px;
  }
  .metric {
    padding: 16px;
  }
  .metric-value {
    font-size: 22px;
  }
  .instance-footer {
    align-items: flex-start;
    gap: 10px;
  }
  .instance-footer .small-note {
    max-width: 170px;
  }
}
@media (max-width: 850px) {
  .layout {
    grid-template-columns: 75px 1fr;
  }
  .sidebar {
    width: 75px;
    padding: 24px 9px;
  }
  .brand {
    padding: 0 12px;
  }
  .brand > span,
  .brand small,
  .space-label,
  .nav .nav-label,
  .sidebar-bottom,
  .profile {
    display: none;
  }
  .nav {
    margin-top: 38px;
  }
  .nav button {
    justify-content: center;
    padding: 13px;
  }
  .brand-mark {
    width: 32px;
    flex: none;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .instance-grid {
    grid-template-columns: 1fr;
  }
  .instance-details {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .instance-footer {
    flex-direction: column;
  }
  .instance-footer .small-note {
    max-width: none;
  }
  .topbar {
    height: 65px;
  }
  .topbar-right .small-note {
    display: none;
  }
  .theme-toggle span {
    display: none;
  }
}
@media (max-width: 560px) {
  .content {
    padding: 24px 15px;
  }
  .topbar {
    padding: 0 15px;
  }
  .breadcrumb span:first-child,
  .breadcrumb span:nth-child(2) {
    display: none;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading .button-group {
    flex-direction: column;
  }
  .page-heading h1 {
    font-size: 24px;
  }
  .subtitle {
    font-size: 12px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 13px;
  }
  .metric-value {
    font-size: 21px;
  }
  .metric-label {
    font-size: 10px;
  }
  .metric-label .icon {
    display: none;
  }
  .card-header,
  .card-body,
  .instance-details,
  .health-panel {
    padding: 17px;
  }
  .detail-grid {
    gap: 20px 10px;
  }
  .detail-value {
    font-size: 11px;
  }
  .card-header > .button-group {
    gap: 4px;
  }
  .card-header > .button-group .btn {
    font-size: 10px;
    padding: 6px;
  }
  .instance-title h2 {
    font-size: 14px;
  }
  .bot-icon {
    display: none;
  }
  .page-footer span:last-child {
    display: none;
  }
  .topbar .pill {
    display: none;
  }
  .terminal {
    font-size: 9px;
    padding: 12px;
  }
  .terminal-time {
    display: none;
  }
  .selected-instance {
    max-width: 150px;
  }
  .key-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 560px) {
  .layout {
    grid-template-columns: 60px minmax(0, 1fr);
  }
  .sidebar {
    width: 60px;
  }
  .brand {
    padding: 0 4px;
  }
  .page-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .page-heading .button-group {
    flex-direction: row;
    align-self: flex-start;
  }
  .card-header {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .instance-title {
    min-width: 0;
    flex-wrap: wrap;
    gap: 9px;
  }
  .instance-title > div {
    min-width: 0;
    flex: 1;
  }
  .card-header > .button-group {
    width: 100%;
  }
  .card-header > .button-group .btn {
    width: 100%;
  }
  .detail-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .detail-value {
    overflow-wrap: anywhere;
    min-width: 0;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  .page-heading .subtitle {
    max-width: 260px;
  }
  .instance-title h2 {
    font-size: 15px;
  }
  .selected-instance {
    max-width: 125px;
  }
}
/* Allow nested grids to shrink while wide tables scroll inside their cards. */
.two-col > * {
  min-width: 0;
}
.card {
  min-width: 0;
}
