:root {
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #e7e9e6;
  background: #101210;
  font-synthesis: none;
  --muted: #858b82;
  --line: #2b3029;
  --panel: #181b17;
  --accent: #c4f178;
  --danger: #f69689;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.layout {
  display: grid;
  grid-template-columns: 236px 1fr;
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #151813;
  border-right: 1px solid var(--line);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 650;
  letter-spacing: -0.4px;
  font-size: 17px;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.6px;
  margin-top: 5px;
}
.brand-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #172011;
  font-size: 23px;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #626b5b;
  margin: 42px 12px 14px;
}
.nav {
  display: grid;
  gap: 6px;
}
.nav a {
  padding: 12px;
  border-radius: 7px;
  color: #9da596;
  font-size: 13px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.nav a:hover {
  background: #22271d;
}
.nav a.active {
  background: #29321e;
  color: var(--accent);
}
.nav .symbol {
  font-size: 19px;
  width: 22px;
  text-align: center;
}
.sidebar-bottom {
  margin-top: auto;
}
.connection {
  padding: 15px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 24px;
  font-size: 11px;
  color: var(--muted);
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 7px;
}
.identity {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 22px 10px 0;
  font-size: 12px;
}
.avatar {
  background: #343b2e;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
}
.identity small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.main {
  min-width: 0;
}
.topbar {
  height: 76px;
  border-bottom: 1px solid var(--line);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.topbar strong {
  font-weight: 500;
  color: #c7ccbf;
}
.top-right {
  display: flex;
  gap: 18px;
  align-items: center;
}
.tag {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 10px;
  letter-spacing: 0.4px;
}
.content {
  max-width: 1560px;
  margin: auto;
  padding: 38px 40px 60px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 30px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 12px;
}
.page-heading h1 {
  font-size: 30px;
  letter-spacing: -1px;
  font-weight: 550;
  margin: 0 0 10px;
}
.page-heading p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.button {
  border: 1px solid var(--line);
  background: #20251c;
  border-radius: 6px;
  padding: 10px 15px;
  color: #dce2d6;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #1b2810;
  font-weight: 650;
}
.button.danger {
  color: var(--danger);
}
.button.small {
  padding: 7px 10px;
  font-size: 11px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 23px;
}
.metric-label {
  font-size: 12px;
  color: #a2aa98;
  display: flex;
  justify-content: space-between;
}
.metric-value {
  font-size: 33px;
  letter-spacing: -1px;
  margin: 22px 0 13px;
  font-weight: 500;
}
.metric-note {
  font-size: 11px;
  color: var(--muted);
}
.accent {
  color: var(--accent);
}
.muted {
  color: var(--muted);
}
.panels {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 22px;
  margin-bottom: 26px;
}
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 22px;
}
.panels .panel {
  margin-bottom: 0;
}
.panel-head {
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  font-size: 14px;
  font-weight: 550;
  margin: 0;
}
.panel-head p {
  font-size: 11px;
  color: var(--muted);
  margin: 7px 0 0;
}
.panel-body {
  padding: 24px;
}
.chart {
  height: 178px;
  display: flex;
  align-items: end;
  gap: 10px;
  border-bottom: 1px solid #38402f;
  padding: 12px 0 0;
}
.chart-column {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: end;
  position: relative;
}
.chart-bar {
  background: #759f43;
  border-radius: 4px 4px 0 0;
  width: 100%;
  min-height: 2px;
  transition: height 0.3s;
}
.chart-column:last-child .chart-bar {
  background: var(--accent);
}
.chart-column:hover .chart-bar {
  background: var(--accent);
}
.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 10px;
  color: var(--muted);
}
.legend {
  font-size: 11px;
  color: var(--muted);
  margin-top: 18px;
}
.legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  margin-right: 6px;
}
.agent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.agent-row:last-child {
  border-bottom: 0;
}
.agent-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #28301f;
  color: var(--accent);
  font-size: 15px;
}
.agent-info {
  flex: 1;
  min-width: 0;
  font-size: 12px;
}
.agent-info small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.agent-cost {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.7px;
  font-weight: 500;
  padding: 13px 24px;
  background: #1c2019;
}
td {
  font-size: 12px;
  padding: 17px 24px;
  border-top: 1px solid var(--line);
}
td small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
}
tr.clickable {
  cursor: pointer;
}
tr.clickable:hover {
  background: #21261c;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  border-radius: 5px;
  padding: 5px 8px;
  background: #273420;
  color: #b8dc91;
}
.badge.running,
.badge.queued {
  background: #24313a;
  color: #8fbdde;
}
.badge.failed,
.badge.critical,
.badge.high {
  background: #3c2621;
  color: #f7a396;
}
.badge.partial,
.badge.medium {
  background: #39351f;
  color: #dec787;
}
.badge.superseded,
.badge.low {
  background: #30312c;
  color: #adb4a3;
}
.badge::before {
  content: "";
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
}
.empty {
  padding: 52px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.empty strong {
  display: block;
  color: #c6cebc;
  font-size: 16px;
  margin-bottom: 10px;
}
.notice {
  padding: 14px 18px;
  border: 1px solid #45472d;
  border-radius: 7px;
  background: #26291c;
  color: #c7d1ab;
  font-size: 12px;
  margin-bottom: 22px;
  line-height: 1.65;
}
.notice a {
  color: var(--accent);
  text-decoration: underline;
}
.field {
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: #b5bea9;
  margin-bottom: 20px;
}
.field small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
input,
select,
textarea {
  background: #11150f;
  border: 1px solid #363e2e;
  border-radius: 6px;
  padding: 11px 12px;
  color: #dfe7d6;
  min-width: 0;
  width: 100%;
  font-size: 13px;
}
input[type="checkbox"] {
  width: 16px;
  accent-color: var(--accent);
}
textarea {
  min-height: 110px;
  resize: vertical;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.checks {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 14px 0 24px;
}
.checks label {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 12px;
}
.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}
.filters input {
  max-width: 400px;
}
.filters select {
  width: 180px;
}
.filters .button {
  margin-left: auto;
}
.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
}
.finding {
  border-bottom: 1px solid var(--line);
  padding: 22px 24px;
}
.finding:last-child {
  border: 0;
}
.finding h3 {
  font-size: 14px;
  line-height: 1.7;
  margin: 10px 0;
}
.finding p {
  font-size: 13px;
  color: #b7c0ad;
  white-space: pre-wrap;
  line-height: 1.8;
  margin-bottom: 0;
}
.code-path {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--muted);
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  color: #aeb9a1;
  line-height: 1.7;
  margin: 0;
}
.kv {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.kv span {
  color: var(--muted);
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
}
.login-story {
  padding: 60px 10%;
  background:
    radial-gradient(ellipse at 30% 45%, #283c16 0, transparent 65%), #151a11;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
}
.login-story h1 {
  font-size: clamp(40px, 5vw, 76px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -3px;
}
.login-story p {
  color: #a3af97;
  line-height: 1.8;
  max-width: 400px;
  font-size: 14px;
}
.login-form {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}
.login-card {
  max-width: 370px;
  width: 100%;
}
.login-card h2 {
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.7px;
}
.login-card p {
  color: var(--muted);
  line-height: 1.8;
  font-size: 13px;
}
.login-card .button {
  width: 100%;
  margin: 18px 0;
}
.login-footer {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.9;
}
.loading {
  padding: 40px;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #d0f294;
  color: #19220f;
  border-radius: 8px;
  max-width: 500px;
  padding: 0;
  box-shadow: 0 6px 30px #0006;
  z-index: 20;
  font-size: 13px;
}
#toast.visible {
  padding: 16px 22px;
}
#toast.error {
  background: #e9a597;
}
.demo-ribbon {
  font-size: 11px;
  background: #31391e;
  color: var(--accent);
  padding: 9px 16px;
  border-radius: 6px;
  margin-bottom: 22px;
}
.footnote {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}
.mobile-brand {
  display: none;
}
.settings-aside {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.agent-table-input {
  max-width: 300px;
}
.pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
}
.link {
  color: var(--accent);
}
@media (min-width: 1600px) {
  .content {
    padding-top: 48px;
  }
  .metric {
    padding: 28px;
  }
  .chart {
    height: 230px;
  }
}
@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 190px 1fr;
  }
  .sidebar {
    padding: 26px 12px;
  }
  .brand {
    font-size: 14px;
  }
  .topbar {
    padding: 0 24px;
  }
  .content {
    padding: 28px 24px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 18px;
  }
  .metric-value {
    font-size: 27px;
  }
  .panels,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 50px 9%;
  }
}
@media (max-width: 720px) {
  .layout {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    padding: 18px;
    display: block;
  }
  .sidebar .brand {
    margin-bottom: 20px;
  }
  .nav-label,
  .sidebar-bottom {
    display: none;
  }
  .nav {
    display: flex;
    overflow: auto;
    gap: 6px;
  }
  .nav a {
    white-space: nowrap;
    padding: 9px;
  }
  .nav .symbol {
    display: none;
  }
  .topbar {
    height: 55px;
    padding: 0 18px;
  }
  .content {
    padding: 25px 16px;
  }
  .top-right .tag {
    display: none;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
  .page-heading h1 {
    font-size: 27px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .metric-value {
    font-size: 26px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 25px;
    min-height: 300px;
  }
  .login-story h1 {
    font-size: 40px;
    letter-spacing: -1.5px;
    margin: 30px 0 15px;
  }
  .login-story .login-footer {
    display: none;
  }
  .login-form {
    padding: 35px 25px;
  }
  .filters {
    flex-wrap: wrap;
  }
  .filters input {
    max-width: none;
  }
  .filters select {
    flex: 1;
  }
  .panel-head {
    padding: 18px;
  }
  .panel-body {
    padding: 18px;
  }
  th,
  td {
    padding: 14px 18px;
  }
}
.stage-editor {
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px 18px;
}
.stage-editor .panel-head {
  padding: 18px 0;
}
.stage-row {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.stage-row:last-child {
  border-bottom: 0;
}
.stage-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.stage-toolbar label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.stage-toolbar .actions {
  margin-left: auto;
}
.stage-row textarea {
  min-height: 100px;
}
