:root {
  color-scheme: dark;
  --bg: #111517;
  --surface: #171d20;
  --sidebar: #0c1012;
  --raised: #1c2428;
  --border: #2b363b;
  --text: #e6ecee;
  --muted: #9aa9b0;
  --accent: #91ddb5;
  --accent-ink: #102b1e;
  --danger: #ffaaaa;
  --focus: #a5d5ff;
  --radius: 6px;
  --space: 24px;
  --font: "Segoe UI", system-ui, sans-serif;
  --mono: Consolas, "Cascadia Code", monospace;
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6f7;
  --surface: #fff;
  --sidebar: #e9eef0;
  --raised: #edf2f4;
  --border: #c9d3d8;
  --text: #182a32;
  --muted: #53656e;
  --accent: #176a43;
  --accent-ink: #fff;
  --danger: #a32727;
  --focus: #176aa6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
}
[hidden] {
  display: none !important;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--focus);
}
button {
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 13px;
  border-radius: var(--radius);
  white-space: nowrap;
  min-height: 38px;
}
button:hover {
  background: var(--raised);
  border-color: var(--muted);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
  font-weight: 600;
}
.primary:hover {
  background: var(--accent);
  filter: brightness(0.92);
}
.plain {
  border: 0;
  background: none;
  padding: 6px;
}
.danger {
  color: var(--danger);
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  letter-spacing: -0.7px;
  font-weight: 600;
}
h2 {
  font-size: 17px;
  font-weight: 600;
}
h3 {
  font-size: 17px;
}
.muted,
.table-note,
.page-footer {
  color: var(--muted);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  letter-spacing: -0.7px;
  font-weight: 650;
}
.brand-mark {
  color: var(--accent);
  font: 700 30px var(--mono);
}
.shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  padding: 25px 16px;
  display: flex;
  flex-direction: column;
}
.sidebar > .brand {
  padding: 0 12px;
}
.workspace {
  margin: 30px 8px 22px;
  padding: 12px 3px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.workspace .muted {
  display: block;
  margin-left: 18px;
  font-size: 12px;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 100%;
  margin-right: 8px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
nav a {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  color: var(--muted);
  border-radius: 5px;
}
nav a.active {
  color: var(--text);
  background: var(--raised);
  box-shadow: inset 2px 0 var(--accent);
}
nav a:hover {
  color: var(--text);
}
.count {
  margin-left: auto;
  font: 12px var(--mono);
}
.nav-separator {
  height: 1px;
  background: var(--border);
  margin: 17px 8px;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 20px 8px 0;
}
.version {
  font: 12px var(--mono);
  color: var(--muted);
  display: block;
  margin-bottom: 9px;
}
.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  margin-top: 10px;
  padding-top: 12px;
}
.topbar {
  height: 65px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  font-size: 13px;
}
.topbar .muted {
  margin: 0 10px;
}
.connection {
  color: var(--muted);
  font-size: 12px;
}
.content {
  padding: 32px;
  max-width: 1800px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}
.page-heading p:not(.section-label) {
  color: var(--muted);
  margin-top: 7px;
}
.section-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 32px;
}
.metrics > div {
  padding: 20px 23px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.metrics > div:last-child {
  border: 0;
}
.metrics > div > span:first-child {
  font-size: 13px;
  color: var(--muted);
}
.metrics strong {
  font: 500 29px var(--mono);
  letter-spacing: -1px;
  margin: 5px 0;
}
.metrics strong small {
  font-size: 16px;
  color: var(--muted);
}
.metrics .muted {
  font-size: 12px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0 15px;
}
.section-heading h2 .muted {
  font: 13px var(--mono);
  margin-left: 8px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.search input {
  width: 220px;
}
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
  background: var(--surface);
}
table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
  text-align: left;
}
th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  background: var(--raised);
  padding: 12px 17px;
}
td {
  padding: 17px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
td:first-child strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
td .subline {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mono {
  font-family: var(--mono);
  font-size: 12px;
}
.status {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.status:before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}
.status.running {
  color: var(--accent);
}
.status.running:before {
  background: var(--accent);
}
.status.failed {
  color: var(--danger);
}
.status.failed:before {
  background: var(--danger);
}
.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}
.row-actions button {
  font-size: 12px;
  padding: 5px 8px;
  min-height: 32px;
}
.table-note {
  font-size: 12px;
  margin-top: 13px;
}
.empty {
  text-align: center;
  padding: 55px 20px;
}
.empty-symbol {
  font-size: 32px;
  color: var(--muted);
}
.empty h3 {
  margin: 14px 0 7px;
}
.empty p {
  color: var(--muted);
  margin-bottom: 22px;
}
.page-footer {
  font-size: 12px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
}
.pending {
  max-width: 800px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
}
.pending h2 {
  font-size: 23px;
  margin-bottom: 13px;
}
.pending p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}
.pending div {
  margin-top: 20px;
  color: var(--muted);
}
input,
textarea,
select {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  padding: 9px 11px;
  min-height: 39px;
  width: 100%;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.8;
}
textarea {
  font-family: var(--mono);
  resize: vertical;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
}
label .muted {
  font-size: 12px;
}
.check {
  flex-direction: row;
  align-items: center;
}
.check input {
  width: 16px;
  min-height: 16px;
  margin: 0 5px 0 0;
}
.toolbar select {
  max-width: 220px;
}
dialog {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  width: min(760px, 95vw);
  max-height: 90vh;
  overflow: auto;
}
dialog::backdrop {
  background: #0009;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 22px;
}
.full {
  grid-column: 1/-1;
}
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 22px;
}
.dialog-footer .danger {
  margin-right: auto;
}
.advanced {
  margin-top: 24px;
}
.advanced summary {
  cursor: pointer;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.advanced p {
  margin-top: 20px;
  font-size: 12px;
}
.error {
  color: var(--danger);
  margin-top: 12px;
}
#notice {
  padding: 12px 16px;
  border: 1px solid var(--border);
  background: var(--raised);
  margin-bottom: 20px;
  border-left: 3px solid var(--accent);
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-panel {
  width: min(400px, 100%);
}
.login-panel .brand {
  margin-bottom: 45px;
}
.login-panel h1 {
  font-size: 26px;
}
.login-panel > p {
  margin: 10px 0 24px;
  color: var(--muted);
}
.login-panel label {
  margin: 16px 0;
}
.login-panel > .primary {
  width: 100%;
  margin-top: 10px;
}
.login-panel details {
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
}
.login-panel details p {
  margin: 12px 0;
}
.login-panel footer {
  font: 12px var(--mono);
  color: var(--muted);
  margin-top: 35px;
}
.log-output {
  min-height: 350px;
  max-height: 65vh;
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--border);
  background: var(--sidebar);
  font: 13px/1.65 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (min-width: 1550px) {
  body {
    font-size: 15px;
  }
  td {
    padding: 20px;
  }
}
@media (max-width: 1150px) {
  .shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .content {
    padding: 24px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .metrics > div:nth-child(2) {
    border-right: 0;
  }
  .metrics > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }
  .section-heading {
    flex-wrap: wrap;
  }
}
@media (max-width: 720px) {
  .shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: relative;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .sidebar > .brand {
    font-size: 18px;
  }
  .workspace {
    display: none;
  }
  nav {
    flex-direction: row;
    overflow: auto;
    margin-top: 12px;
    gap: 5px;
  }
  nav a {
    white-space: nowrap;
    padding: 10px;
    font-size: 13px;
  }
  .nav-separator,
  .sidebar-bottom {
    display: none;
  }
  .topbar {
    padding: 0 18px;
    height: 48px;
  }
  .content {
    padding: 22px 16px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
  }
  h1 {
    font-size: 25px;
  }
  .metrics > div {
    padding: 16px;
  }
  .metrics strong {
    font-size: 24px;
  }
  .toolbar {
    flex-wrap: wrap;
    width: 100%;
  }
  .search input {
    width: 100%;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .full {
    grid-column: auto;
  }
  .page-footer {
    gap: 15px;
    flex-wrap: wrap;
  }
  .row-actions button {
    min-height: 40px;
  }
  .sidebar .brand {
    justify-content: center;
  }
  .toolbar select {
    flex: 1;
  }
  dialog {
    padding: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
@media (max-width: 720px) {
  .sidebar-bottom {
    display: flex;
    padding: 8px 8px 0;
    justify-content: space-between;
    align-items: center;
  }
  .sidebar-bottom .version {
    display: none;
  }
  .user-row {
    border: 0;
    padding: 0;
    margin: 0;
    gap: 12px;
  }
  button {
    min-height: 44px;
  }
}
#confirm-dialog {
  max-width: 450px;
}
#confirm-copy {
  margin-top: 14px;
  color: var(--muted);
}
.terminal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 12px;
}
.terminal-tabs button[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
}
.terminal-host {
  background: #0c1012;
  border: 1px solid var(--border);
  padding: 12px;
  height: 480px;
  border-radius: var(--radius);
  overflow: hidden;
}
.terminal-host .xterm {
  height: 100%;
}
.terminal-host .xterm-screen {
  min-height: 100%;
}
@media (max-width: 720px) {
  .terminal-host {
    height: 400px;
  }
}
