:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    sans-serif;
  color: #dae3df;
  background: #101719;
  font-synthesis: none;
  --panel: #172023;
  --line: #2a3436;
  --muted: #859792;
  --accent: #b4ebce;
  --yellow: #e5bc7e;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.fine {
  font-size: 12px;
  color: #7f928b;
  line-height: 1.7;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: #99baa9;
  margin: 0 0 14px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  font-weight: 550;
  letter-spacing: -1px;
}
h2 {
  font-size: 19px;
  font-weight: 550;
}
h3 {
  font-size: 15px;
  font-weight: 550;
}
button {
  border: 0;
}
.button,
.primary,
.secondary,
.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #202b2d;
  color: #dce6e0;
  font-size: 13px;
}
.primary {
  background: var(--accent);
  color: #15291f;
  border-color: var(--accent);
  font-weight: 650;
}
.primary:hover {
  background: #caf4de;
}
.secondary {
  background: transparent;
}
.danger {
  color: #f0a7a0;
  background: #3c2526;
  border-color: #593436;
}
.small-button {
  padding: 7px 11px;
  font-size: 12px;
}
.icon-button {
  background: transparent;
  color: #9baea6;
  font-size: 21px;
  padding: 0 5px;
}
.error {
  color: #f0a7a0;
  font-size: 13px;
  line-height: 1.6;
  margin: 12px 0 0;
  white-space: pre-wrap;
}
.login-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 60% 20%, #20332c 0, transparent 60%);
}
.login-card {
  width: min(440px, 90vw);
  padding: 40px;
}
.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--accent);
  color: #172c21;
  font-size: 40px;
  font-weight: 650;
  position: relative;
  line-height: 47px;
  text-align: center;
  margin-bottom: 35px;
}
.brand-mark span {
  font-size: 20px;
  position: absolute;
  right: 5px;
  top: 0;
  line-height: 24px;
}
.brand-mark.small {
  display: block;
  width: 38px;
  height: 38px;
  line-height: 32px;
  font-size: 30px;
  border-radius: 10px;
  margin: 0;
}
.brand-mark.small span {
  font-size: 13px;
  line-height: 15px;
  right: 4px;
}
.login-card form {
  margin-top: 30px;
}
.login-card .primary {
  width: 100%;
  justify-content: space-between;
  margin-top: 8px;
}
.login-card .muted {
  font-size: 14px;
  line-height: 1.8;
}
label {
  display: block;
  color: #b6c5bd;
  font-size: 12px;
  margin-bottom: 17px;
}
input,
textarea,
select {
  display: block;
  background: #101719;
  border: 1px solid #35433e;
  border-radius: 6px;
  color: #e0ebe4;
  width: 100%;
  padding: 11px;
  margin-top: 8px;
  outline: none;
  font-size: 13px;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px #b4ebce12;
}
textarea {
  resize: vertical;
  min-height: 95px;
  line-height: 1.65;
}
label .hint {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 5px;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.checkbox input {
  display: inline;
  width: 16px;
  margin: 0;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 230px;
  background: #131d1e;
  border-right: 1px solid var(--line);
  padding: 30px 17px 18px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 10px 48px;
}
.brand strong {
  font-size: 16px;
  letter-spacing: -0.4px;
}
.brand-sub {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: #91a69a;
  letter-spacing: 1px;
  margin-top: 5px;
}
.sidebar-label {
  font-size: 10px;
  letter-spacing: 1.4px;
  color: #748a80;
  margin: 0 13px 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  color: #94a79e;
  background: none;
  border-radius: 7px;
  margin-bottom: 5px;
  font-size: 13px;
}
.nav-item span {
  font-size: 18px;
  width: 18px;
  text-align: center;
}
.nav-item.active {
  background: #263b31;
  color: #c3ebd1;
}
.nav-item:hover {
  background: #23302c;
}
.projects-label {
  margin-top: 32px;
}
#project-nav {
  overflow: auto;
}
.project-link {
  background: none;
  color: #99afa3;
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  font-size: 12px;
  border-radius: 6px;
}
.project-link.selected {
  color: #d1eadb;
  background: #1c2c25;
}
.project-link:before {
  content: "◈";
  color: #78a68d;
  margin-right: 10px;
}
.sidebar-bottom {
  margin-top: auto;
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 11px;
  color: #879e91;
  padding: 20px 10px 0;
}
.sidebar-bottom button {
  margin-left: auto;
}
.connection-dot {
  width: 6px;
  height: 6px;
  background: #daaa6b;
  border-radius: 50%;
  flex-shrink: 0;
}
.connection-dot.live {
  background: #a9e3bd;
}
.workspace {
  margin-left: 230px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 73px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
}
.breadcrumb {
  font-size: 12px;
  color: #8aa095;
}
.breadcrumb span {
  margin: 0 12px;
  color: #4d6157;
}
.breadcrumb strong {
  font-weight: 450;
  color: #c8d8cd;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.server-badge {
  font-size: 10px;
  color: #91a99a;
  letter-spacing: 1px;
}
main {
  padding: 34px 38px 50px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  gap: 16px;
}
.page-head h1 {
  margin: 7px 0 9px;
}
.page-head p {
  font-size: 12px;
  color: #899e92;
  margin-bottom: 0;
  line-height: 1.7;
}
.page-head .eyebrow {
  font-size: 10px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 30px;
}
.stat {
  border: 1px solid var(--line);
  background: linear-gradient(110deg, #192522, #172023);
  padding: 19px 20px;
  border-radius: 9px;
}
.stat-label {
  font-size: 11px;
  color: #93a69a;
  display: flex;
  justify-content: space-between;
}
.stat-number {
  display: block;
  font-size: 29px;
  font-weight: 500;
  color: #dcece0;
  margin: 14px 0 5px;
  font-variant-numeric: tabular-nums;
}
.stat-note {
  font-size: 10px;
  color: #668574;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}
.section-head h2 {
  font-size: 14px;
  margin: 0;
}
.section-head span {
  font-size: 11px;
  color: #7f9889;
}
.filter-row {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.chip {
  border: 1px solid var(--line);
  color: #8fa79a;
  background: none;
  border-radius: 5px;
  padding: 7px 10px;
  font-size: 11px;
}
.chip.active {
  color: #c8edd5;
  background: #223a2c;
  border-color: #3b5847;
}
.task-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(330px, 1.6fr);
  gap: 18px;
}
.task-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.task-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #182123;
  text-align: left;
  padding: 17px;
  color: #cddbd1;
}
.task-card.selected {
  border-color: #739f83;
  background: #1d2d25;
  box-shadow: inset 3px 0 0 #a8ddbc;
}
.task-top {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}
.task-project {
  font-size: 10px;
  color: #84a08f;
  letter-spacing: 0.5px;
}
.task-card h3 {
  line-height: 1.65;
  margin: 0 0 9px;
}
.task-card .task-goal {
  font-size: 11px;
  color: #839a8c;
  line-height: 1.7;
  margin-bottom: 14px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.task-foot {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #698572;
}
.status {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  border-radius: 4px;
  padding: 4px 6px;
  background: #29352e;
  color: #a7c5b1;
  white-space: nowrap;
}
.status.running,
.status.planning,
.status.reviewing,
.status.checking {
  background: #244238;
  color: #b2e7c8;
}
.status.waiting_credentials,
.status.awaiting_plan,
.status.awaiting_review,
.status.awaiting_acceptance {
  background: #3a3226;
  color: #e0c08b;
}
.status.failed,
.status.interrupted,
.status.cancelled {
  background: #3e2d2c;
  color: #e6a7a1;
}
.status.accepted {
  background: #2d4633;
  color: #bdeac4;
}
.detail-panel {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #151f20;
  min-height: 400px;
  overflow: hidden;
}
.detail-header {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
}
.detail-header h2 {
  margin: 11px 0;
  line-height: 1.6;
}
.detail-meta {
  font-size: 11px;
  color: #839f8d;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}
.detail-body {
  padding: 20px 24px;
}
.detail-body p {
  font-size: 12px;
  line-height: 1.9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.detail-label {
  font-size: 10px;
  color: #7f9a89;
  letter-spacing: 1px;
  margin: 19px 0 9px;
}
.detail-label:first-child {
  margin-top: 0;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.actions button {
  font-size: 11px;
  padding: 9px 12px;
}
.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  padding: 0 22px;
  gap: 20px;
}
.tab {
  background: none;
  color: #8ba493;
  padding: 13px 0;
  font-size: 11px;
  border-bottom: 2px solid transparent;
}
.tab.active {
  color: #d5eadb;
  border-color: #afdec0;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    11px/1.85 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  color: #b3c9b9;
  margin: 0;
  max-height: 500px;
  overflow: auto;
}
.code-box {
  padding: 15px;
  background: #101a18;
  border: 1px solid #283c30;
  border-radius: 6px;
}
.empty {
  border: 1px dashed #34483c;
  border-radius: 9px;
  padding: 50px 25px;
  text-align: center;
  color: #8ba493;
}
.empty-icon {
  font-size: 30px;
  display: block;
  color: #a5d3b5;
  margin-bottom: 20px;
}
.empty h3 {
  color: #cbdfd0;
  font-size: 16px;
}
.empty p {
  font-size: 12px;
  line-height: 1.9;
  max-width: 430px;
  margin: 0 auto 20px;
}
.empty.detail {
  border: 0;
  display: grid;
  place-content: center;
  min-height: 350px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}
.resource-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 23px;
}
.resource-card h3 {
  font-size: 16px;
  margin-bottom: 17px;
}
.resource-card dl {
  font-size: 12px;
  margin: 0;
}
.resource-card dt {
  color: #789582;
  margin-top: 14px;
  font-size: 10px;
}
.resource-card dd {
  margin: 6px 0 0;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.resource-card .actions {
  margin-bottom: 0;
}
.notice {
  padding: 15px 18px;
  border: 1px solid #534832;
  background: #28261e;
  border-radius: 7px;
  color: #d1bb91;
  font-size: 12px;
  line-height: 1.8;
  margin-bottom: 22px;
}
.notice.green {
  background: #1d3025;
  border-color: #35513f;
  color: #b3d9bf;
}
.approval {
  border: 1px solid #655035;
  background: #29271f;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 15px;
}
.approval h3 {
  color: #e3c38f;
  font-size: 13px;
}
.approval pre {
  max-height: 120px;
}
.check-row {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.check-row:last-child {
  border: 0;
}
.check-row summary {
  cursor: pointer;
  font-size: 12px;
  line-height: 1.8;
}
.check-row pre {
  margin-top: 12px;
}
.check-pass {
  color: #b4dfbd;
}
.check-fail {
  color: #edaaa2;
}
.event-line {
  padding: 8px 0;
  border-bottom: 1px solid #22332a;
  font-size: 11px;
  color: #91ae9b;
}
.event-time {
  color: #60836c;
  margin-right: 10px;
}
.event-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.steps {
  display: flex;
  gap: 5px;
  align-items: center;
  margin: 18px 0;
}
.step {
  font-size: 10px;
  flex: 1;
  padding: 7px 3px;
  text-align: center;
  color: #6e8a78;
  background: #1e2d25;
  border-radius: 3px;
}
.step.current {
  background: #3b5542;
  color: #d4ecd9;
}
footer {
  padding: 20px 38px;
  border-top: 1px solid #24352b;
  font-size: 10px;
  color: #60826a;
  display: flex;
  justify-content: space-between;
}
dialog {
  color: #d7e6db;
  background: #17221d;
  border: 1px solid #3a5141;
  border-radius: 12px;
  width: min(540px, 94vw);
  padding: 25px;
  max-height: 90dvh;
  overflow: auto;
}
dialog::backdrop {
  background: #050b08bd;
  backdrop-filter: blur(5px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.dialog-head h2 {
  margin: 0;
}
.dialog-submit {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
#toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  max-width: min(440px, 90vw);
  border: 1px solid #49694f;
  background: #263d2d;
  color: #d8f2df;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.7;
  z-index: 10;
  box-shadow: 0 10px 40px #0005;
}
.model-badge {
  font-size: 10px;
  padding: 4px 6px;
  border: 1px solid #3e5747;
  color: #a7c3b0;
  border-radius: 4px;
  display: inline-block;
  margin: 0 5px 5px 0;
}
.tool-note {
  font-size: 11px;
  color: #87a38f;
  line-height: 1.8;
}
.mono {
  font-family: ui-monospace, monospace;
  font-size: 11px;
}
.mobile-brand {
  display: none;
}
@media (min-width: 1500px) {
  .task-layout {
    grid-template-columns: 360px 1fr;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 195px;
  }
  .workspace {
    margin-left: 195px;
  }
  .brand {
    margin-left: 4px;
    gap: 8px;
  }
  .brand strong {
    font-size: 14px;
  }
  .topbar {
    padding: 0 24px;
  }
  main {
    padding: 28px 24px;
  }
  .task-layout {
    grid-template-columns: 1fr;
  }
  .task-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .detail-panel {
    min-height: 250px;
  }
  .stats {
    gap: 9px;
  }
  .stat {
    padding: 15px;
  }
  .stat-label {
    font-size: 10px;
  }
}
@media (max-width: 700px) {
  .sidebar {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    height: 65px;
    z-index: 5;
    padding: 5px 8px max(5px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    border-right: 0;
    background: #132019f5;
    backdrop-filter: blur(12px);
  }
  .sidebar .brand,
  .sidebar-label,
  #project-nav,
  .sidebar-bottom {
    display: none;
  }
  .sidebar nav {
    display: flex;
    justify-content: space-around;
    height: 100%;
    align-items: center;
  }
  .nav-item {
    flex-direction: column;
    gap: 4px;
    font-size: 9px;
    padding: 6px 4px;
    margin: 0;
    line-height: 1.2;
    width: 20%;
    border-radius: 6px;
  }
  .nav-item span {
    font-size: 18px;
  }
  .workspace {
    margin-left: 0;
    padding-bottom: 65px;
  }
  .topbar {
    height: 57px;
    padding: 0 18px;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .breadcrumb span {
    margin: 0 7px;
  }
  .server-badge {
    display: none;
  }
  main {
    padding: 25px 17px 30px;
  }
  .page-head {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 23px;
  }
  .page-head h1 {
    font-size: 24px;
    margin-top: 5px;
  }
  .page-head .eyebrow {
    font-size: 9px;
  }
  .page-head p {
    font-size: 11px;
    max-width: 240px;
  }
  .page-head .primary,
  .page-head .button {
    padding: 9px 10px;
    font-size: 11px;
    white-space: nowrap;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
    margin-bottom: 25px;
  }
  .stat {
    padding: 14px;
  }
  .stat-number {
    font-size: 25px;
    margin-top: 10px;
  }
  .stat-note {
    font-size: 9px;
  }
  .task-list {
    display: flex;
  }
  .task-card {
    padding: 16px;
  }
  .detail-header,
  .detail-body {
    padding: 18px;
  }
  .tabs {
    padding: 0 18px;
    gap: 18px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .filter-row {
    max-width: 220px;
    justify-content: flex-end;
  }
  .chip {
    font-size: 10px;
    padding: 6px 8px;
  }
  .section-head {
    align-items: flex-start;
    gap: 12px;
  }
  .section-head h2 {
    margin-top: 7px;
    white-space: nowrap;
  }
  footer {
    padding: 18px;
    font-size: 9px;
    gap: 12px;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .login-card {
    padding: 24px;
  }
  #toast {
    bottom: 83px;
    right: 17px;
  }
  dialog {
    padding: 21px;
  }
  .resource-card {
    padding: 21px;
  }
}

.nodes-head {
  margin-top: 30px;
}
.nav-empty {
  margin-left: 13px;
}
