:root {
  color-scheme: dark;
  --bg: #0d1115;
  --panel: #151b20;
  --line: #28313a;
  --muted: #94a2ae;
  --text: #e7edf1;
  --green: #b5eb9d;
  --mint: #91d8ca;
  --danger: #f5a19a;
  font-family:
    Inter,
    Segoe UI,
    system-ui,
    sans-serif;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
.hidden {
  display: none !important;
}
a {
  color: inherit;
  text-decoration: none;
}
.shell {
  display: grid;
  grid-template-columns: 236px 1fr;
  min-height: 100vh;
}
aside {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  padding: 38px 24px 24px;
  display: flex;
  flex-direction: column;
  background: #10161a;
}
.brand {
  display: flex;
  gap: 12px;
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -1px;
}
.brand > span {
  line-height: 1;
}
.brand small {
  display: block;
  font-size: 8px;
  color: var(--muted);
  letter-spacing: 1.4px;
  margin-top: 11px;
}
nav {
  display: grid;
  gap: 8px;
  margin-top: 54px;
}
.nav {
  border: 0;
  border-radius: 7px;
  padding: 14px 11px;
  text-align: left;
  color: var(--muted);
  background: none;
  font-size: 13px;
}
.nav:hover {
  background: #1b2328;
}
.nav.active {
  color: var(--green);
  background: #243026;
}
.aside-bottom {
  margin-top: auto;
  font-size: 11px;
  color: var(--muted);
}
.local-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.dot {
  height: 6px;
  width: 6px;
  display: inline-block;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px #b5eb9d0b;
}
.aside-bottom p {
  margin: 10px 0 24px;
}
main {
  padding: 37px 42px 0;
  max-width: 1600px;
  width: 100%;
  margin: auto;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 27px;
}
h1 {
  font-weight: 500;
  font-size: 30px;
  letter-spacing: -0.8px;
  margin: 9px 0 0;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: var(--muted);
}
.header-status {
  font-size: 11px;
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--muted);
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 27px 0;
}
.intro p {
  font-size: 19px;
  line-height: 1.65;
  margin: 0;
  letter-spacing: -0.3px;
}
.intro p span {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0;
}
.pill {
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 6px 10px;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  min-width: 0;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 23px;
}
h2 {
  font-weight: 550;
  font-size: 15px;
  letter-spacing: -0.1px;
  margin: 0 0 18px;
}
.panel-heading h2 {
  margin: 0;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
label,
legend {
  display: block;
  font-size: 11px;
  color: #bac6ce;
  margin: 17px 0 8px;
}
form label:first-child {
  margin-top: 0;
}
input,
textarea,
select {
  width: 100%;
  color: var(--text);
  background: #10161a;
  border: 1px solid #303d47;
  border-radius: 6px;
  padding: 11px 12px;
  outline: none;
  min-width: 0;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 2px #91d8ca13;
}
input::placeholder,
textarea::placeholder {
  color: #677784;
}
textarea {
  resize: vertical;
  line-height: 1.6;
}
select {
  font-size: 12px;
}
button.primary {
  background: var(--green);
  color: #18231b;
  font-weight: 650;
  border: none;
  border-radius: 6px;
  padding: 12px 17px;
}
button.primary:hover {
  background: #c8f7b3;
}
.subtle,
.danger {
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
}
.subtle:hover {
  color: var(--text);
  border-color: #677784;
}
.danger {
  color: var(--danger);
}
.hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
#workflow-description {
  margin: 14px 0 18px;
  min-height: 34px;
}
.form-footer {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
details {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 15px;
}
summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 11px;
}
fieldset {
  border: 0;
  padding: 0;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
}
.check input {
  width: auto;
  accent-color: var(--green);
}
.empty {
  text-align: center;
  padding: 90px 8px;
}
.empty > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 25px;
  color: var(--green);
}
.empty h3 {
  font-weight: 450;
  font-size: 22px;
  margin: 21px 0 13px;
}
.empty p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 12px;
}
pre {
  font-family: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.8;
  font-size: 14px;
  margin: 24px 0;
  max-height: 500px;
  overflow: auto;
}
#run-meta {
  margin-top: -5px;
}
#trail {
  padding: 0;
  list-style: none;
  max-height: 220px;
  overflow: auto;
}
#trail li {
  border-bottom: 1px solid #28313a;
  padding: 9px 0;
  font-size: 11px;
  color: var(--muted);
}
.result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.history {
  margin-top: 22px;
}
.run-row {
  display: grid;
  grid-template-columns: 1fr 90px 85px 65px;
  gap: 15px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 15px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--text);
  font-size: 11px;
}
.run-row:hover {
  color: var(--green);
}
.run-row .run-title {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.run-row small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  font-size: 10px;
}
.status {
  font-size: 10px;
}
.succeeded {
  color: var(--green);
}
.failed,
.cancelled {
  color: var(--danger);
}
.running,
.queued {
  color: var(--mint);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.model-name {
  font-size: 22px;
  font-weight: 450;
  margin: 15px 0;
}
.model-row {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.model-row small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}
.info-panel {
  margin-top: 22px;
  color: var(--muted);
  line-height: 1.8;
}
.info-panel h2 {
  color: var(--text);
}
.memory-item,
.key-item,
.audit-item {
  border-top: 1px solid var(--line);
  padding: 16px 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.memory-item p {
  white-space: pre-wrap;
  line-height: 1.7;
  color: var(--muted);
}
.key-item p,
.audit-item p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.audit-item {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
}
.notice {
  background: #273027;
  border: 1px solid #516749;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 12px;
}
.notice.error {
  background: #372524;
  border-color: #77504b;
  color: var(--danger);
}
.error {
  color: var(--danger);
}
footer {
  display: flex;
  justify-content: space-between;
  margin-top: 36px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}
.login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 30%, #21312b 0, transparent 55%);
}
.login-box {
  width: 390px;
  max-width: 90vw;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 38px;
}
.brand-mark {
  color: var(--green);
  font-size: 35px;
}
.login-box h1 {
  font-size: 38px;
}
.login-box > p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 13px;
  margin: 19px 0 26px;
}
.login-box button {
  width: 100%;
  margin-top: 16px;
}
.login-box .hint {
  font-size: 10px;
}
.login-box .error {
  color: var(--danger);
  margin-bottom: 0;
}
.login-box .login-links {
  font-size: 11px;
  margin: 20px 0 0;
}
.login-links a:hover, .info-card a:hover { color: var(--green); }
.info-page { min-height: 100vh; padding: 48px 20px; background: radial-gradient(ellipse at 50% 0, #21312b 0, transparent 45%); }
.info-card { max-width: 680px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 13px; padding: clamp(26px, 5vw, 52px); }
.info-brand { color: var(--green); font-size: 24px; font-weight: 650; }
.info-card h1 { font-size: clamp(30px, 5vw, 46px); letter-spacing: -1px; }
.info-card h2 { font-size: 17px; margin-top: 28px; }
.info-card p { line-height: 1.7; color: var(--muted); }
.info-card a { color: var(--mint); }
.info-card .info-button { display: inline-block; background: var(--green); color: #111a14; border-radius: 8px; padding: 12px 18px; font-weight: 650; }
.info-card footer { display: flex; justify-content: flex-start; gap: 20px; }
#new-key {
  background: #21312b;
  padding: 15px;
  border-radius: 6px;
  margin-top: 20px;
}
#new-key input {
  font-family: monospace;
  font-size: 11px;
}
#new-key p {
  font-size: 11px;
}
@media (min-width: 1600px) {
  main {
    padding-left: 65px;
    padding-right: 65px;
  }
}
@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 190px 1fr;
  }
  aside {
    padding: 30px 15px;
  }
  .brand {
    font-size: 24px;
  }
  main {
    padding: 28px 23px 0;
  }
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .empty {
    padding: 55px 8px;
  }
  .header-status {
    display: none;
  }
}
@media (max-width: 650px) {
  .shell {
    display: block;
  }
  aside {
    position: static;
    width: 100%;
    height: auto;
    padding: 20px;
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }
  .brand small {
    display: none;
  }
  nav {
    display: flex;
    flex-wrap: wrap;
    margin-top: 20px;
    gap: 4px;
  }
  .nav {
    font-size: 11px;
    padding: 9px;
  }
  .aside-bottom {
    display: none;
  }
  main {
    padding: 24px 16px 0;
  }
  .intro p {
    font-size: 17px;
  }
  .intro p span {
    font-size: 11px;
  }
  .intro .pill {
    display: none;
  }
  .panel {
    padding: 20px;
  }
  .two {
    gap: 10px;
  }
  .form-footer .hint {
    display: none;
  }
  .form-footer {
    justify-content: flex-end;
  }
  .run-row {
    grid-template-columns: 1fr 65px;
  }
  .run-row > span:nth-child(3),
  .run-row > span:nth-child(4) {
    display: none;
  }
  footer span {
    font-size: 9px;
  }
  h1 {
    font-size: 27px;
  }
  .audit-item {
    display: block;
  }
}
