@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap");
:root {
  --bg: #f7f8fb;
  --ink: #24263c;
  --muted: #85889b;
  --line: #e9eaf1;
  --violet: #7054da;
  --soft: #f0ecfc;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px "DM Sans",
    Segoe UI,
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
a {
  color: var(--violet);
  text-decoration: none;
}
h1,
h2,
h3 {
  font-family:
    Manrope,
    Segoe UI,
    sans-serif;
  margin: 0;
  letter-spacing: -0.035em;
}
h1 {
  font-size: 29px;
  font-weight: 800;
}
h2 {
  font-size: 17px;
}
h3 {
  font-size: 15px;
}
p {
  line-height: 1.65;
}
small {
  font-size: 11px;
  color: var(--muted);
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 246px;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 30px 19px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.brand {
  font: 800 27px Manrope;
  color: #202339;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
}
.brand b {
  color: var(--violet);
  font-weight: 500;
}
.brand-mark {
  width: 33px;
  height: 37px;
  background: var(--violet);
  color: white;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 30px;
}
.workspace {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 32px 0 30px;
  padding: 13px 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 12px;
  font-weight: 600;
}
.workspace small,
.profile small {
  display: block;
  margin-top: 4px;
  font-weight: 400;
  font-size: 10px;
}
.avatar {
  background: #eeebfa;
  color: #7457bf;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
}
.nav-label {
  color: #a0a2b1;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin: 0 14px 14px;
}
.nav-item {
  display: flex;
  gap: 13px;
  width: 100%;
  border: 0;
  background: none;
  align-items: center;
  padding: 13px 14px;
  border-radius: 9px;
  margin: 3px 0;
  color: #717588;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
}
.nav-item svg {
  width: 18px;
  height: 18px;
}
.nav-item.active {
  background: var(--soft);
  color: var(--violet);
}
.nav-item:hover {
  background: #f6f4fc;
}
.nav-item .count {
  margin-left: auto;
  font-size: 10px;
  background: #e5ddfa;
  padding: 2px 6px;
  border-radius: 5px;
}
.sidebar-bottom {
  margin-top: auto;
}
.local-note {
  font-size: 11px;
  margin: 25px 10px;
  color: #608978;
}
.local-note small {
  display: block;
  margin-top: 8px;
  font-size: 9px;
}
.profile {
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  padding: 20px 8px 0;
  display: flex;
  gap: 11px;
  align-items: center;
  text-align: left;
  font-size: 12px;
  width: 100%;
}
.shell {
  margin-left: 246px;
}
.topbar {
  height: 78px;
  padding: 0 38px;
  border-bottom: 1px solid var(--line);
  background: #ffffffb0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.breadcrumb {
  font-size: 12px;
  color: #989aab;
}
.breadcrumb span {
  margin: 0 14px;
  color: #c0c0cb;
}
.breadcrumb b {
  color: #50546a;
  font-weight: 500;
}
.top-actions {
  display: flex;
  gap: 22px;
  align-items: center;
}
.connection {
  font-size: 11px;
  color: #229674;
}
.connection.offline {
  color: #b65e41;
}
.button {
  border: 1px solid var(--line);
  padding: 10px 15px;
  background: #fff;
  border-radius: 8px;
  color: #55586e;
  font-weight: 600;
  font-size: 12px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}
.button:hover {
  border-color: #b9a9ee;
  background: #fcfbff;
}
.button.primary {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
  box-shadow: 0 3px 6px #7054da20;
}
.button.danger {
  color: #ba4455;
}
.button.subtle {
  background: transparent;
  border: 0;
}
.icon-button {
  border: 0;
  background: none;
  color: var(--muted);
  padding: 8px;
}
#menu {
  display: none;
}
main {
  max-width: 1450px;
  padding: 36px 38px 45px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  gap: 20px;
}
.page-heading p {
  color: var(--muted);
  font-size: 13px;
  margin: 9px 0 0;
}
.eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.7px;
  color: var(--violet);
  font-weight: 700;
  margin-bottom: 11px;
}
.heading-actions {
  display: flex;
  gap: 9px;
}
.hero {
  background: linear-gradient(112deg, #eee8fc, #f1edfb 60%, #e9e6fa);
  border: 1px solid #e6dff7;
  border-radius: 15px;
  padding: 28px 30px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  margin-bottom: 24px;
  min-height: 197px;
  overflow: hidden;
}
.hero h2 {
  font-size: 23px;
  max-width: 420px;
}
.hero p {
  font-size: 12px;
  color: #78718c;
  max-width: 385px;
  margin: 12px 0 20px;
}
.network {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
}
.network-stack {
  display: grid;
  gap: 9px;
}
.node {
  border: 1px solid #ded6f1;
  background: #ffffffbb;
  border-radius: 10px;
  padding: 10px 15px;
  font-size: 10px;
  box-shadow: 0 4px 15px #62578508;
}
.node.center {
  font: 800 17px Manrope;
  color: var(--violet);
  padding: 24px 19px;
  background: white;
  border-color: #cebfed;
}
.connector {
  width: 30px;
  height: 1px;
  background: #bcaddd;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
  margin-bottom: 28px;
}
.metric {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 19px 21px;
}
.metric-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #82869b;
  font-size: 11px;
}
.metric-label svg {
  width: 16px;
  height: 16px;
  color: #9990b5;
}
.metric strong {
  display: block;
  font: 800 29px Manrope;
  margin: 12px 0 7px;
}
.metric small {
  font-size: 10px;
}
.columns {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  gap: 22px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 23px;
}
.panel-head {
  padding: 21px 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #f0f0f5;
}
.panel-head small {
  display: block;
  margin-top: 7px;
}
.panel-body {
  padding: 23px;
}
.text-link {
  border: 0;
  background: none;
  color: var(--violet);
  font-size: 11px;
  font-weight: 600;
}
.app-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 23px;
  border-bottom: 1px solid #f2f2f6;
}
.app-row:last-child {
  border: 0;
}
.app-icon {
  width: 37px;
  height: 37px;
  background: #edeafa;
  color: #7f66c3;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}
.app-row:nth-child(3n) .app-icon {
  background: #e8f3ef;
  color: #42977d;
}
.grow {
  flex: 1;
  min-width: 0;
}
.app-row b {
  font-size: 12px;
  font-weight: 600;
}
.app-row small {
  display: block;
  margin-top: 5px;
  font-size: 10px;
}
.badge {
  display: inline-flex;
  border-radius: 5px;
  background: #eef7f2;
  color: #499177;
  padding: 4px 7px;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}
.badge.pending,
.badge.offline,
.badge.unknown {
  background: #f2f2f6;
  color: #9292a4;
}
.badge.running {
  background: #ede9fb;
  color: #8063c6;
}
.badge.failed,
.badge.cancelled {
  background: #fff0ee;
  color: #b8756b;
}
.badge.awaiting_approval {
  background: #fff6e4;
  color: #ae8d45;
}
.setup-item {
  display: flex;
  gap: 12px;
  margin-bottom: 21px;
}
.step {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 1px solid #e1d9f2;
  color: #977fd0;
  display: grid;
  place-items: center;
  font-size: 10px;
  flex-shrink: 0;
}
.step.done {
  background: #ede8fa;
  border-color: #ede8fa;
  color: var(--violet);
}
.setup-item b {
  font-size: 12px;
  font-weight: 600;
}
.setup-item p {
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0 7px;
}
.empty {
  padding: 36px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.empty b {
  display: block;
  color: #575970;
  font-size: 14px;
  margin-bottom: 7px;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 21px;
}
.toolbar input {
  max-width: 340px;
}
.toolbar .spacer {
  flex: 1;
}
input,
select,
textarea {
  border: 1px solid #e1e2ec;
  background: #fff;
  border-radius: 8px;
  color: var(--ink);
  padding: 11px 12px;
  width: 100%;
  font-size: 12px;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #ded4fa;
  border-color: #9279db;
}
textarea {
  resize: vertical;
  min-height: 110px;
}
label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 17px;
}
label input,
label select,
label textarea {
  margin-top: 8px;
}
label small {
  display: block;
  font-weight: 400;
  margin-top: 6px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.app-card,
.provider-card {
  padding: 23px;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.app-card h3 {
  margin-bottom: 8px;
}
.app-card p {
  font-size: 11px;
  color: var(--muted);
  min-height: 36px;
}
.card-meta {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin: 17px 0;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #8c8c9c;
}
.card-actions {
  display: flex;
  gap: 9px;
}
.card-actions .button {
  flex: 1;
  font-size: 10px;
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  font-size: 9px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #9a9aab;
  background: #fcfcfe;
  padding: 13px 22px;
  font-weight: 600;
}
td {
  padding: 17px 22px;
  border-top: 1px solid #f1f1f6;
  font-size: 11px;
  max-width: 310px;
}
.task-title {
  border: 0;
  background: none;
  color: #505169;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  padding: 0;
}
.task-title:hover {
  color: var(--violet);
}
td small {
  display: block;
  margin-top: 6px;
  font-size: 9px;
}
.notice {
  border: 1px solid #e6e0f6;
  background: #f5f2fc;
  color: #74648d;
  border-radius: 9px;
  padding: 13px 16px;
  font-size: 11px;
  line-height: 1.7;
  margin-bottom: 22px;
}
.notice.warning {
  background: #fff9ee;
  border-color: #f3e9cf;
  color: #917943;
}
.connection-icon {
  width: 45px;
  height: 45px;
  border-radius: 13px;
  background: #efebfb;
  color: var(--violet);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 600;
}
.provider-card h3 {
  margin: 18px 0 8px;
}
.provider-card p {
  font-size: 12px;
  color: var(--muted);
  min-height: 65px;
}
.provider-card .button {
  width: 100%;
}
.code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f5f5fa;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 17px;
  color: #626078;
  font:
    11px/1.8 Consolas,
    monospace;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 22px 0;
}
.detail-grid small {
  display: block;
  margin-bottom: 6px;
}
.detail-grid b {
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.event {
  border-left: 2px solid #e9e2f7;
  padding: 0 0 18px 16px;
  margin-left: 5px;
}
.event b {
  font-size: 11px;
}
.event small {
  display: block;
  margin-top: 6px;
}
.event p {
  font-size: 11px;
  white-space: pre-wrap;
}
.page-error {
  padding: 20px;
  background: #fff0ee;
  color: #a35556;
  border-radius: 10px;
  margin-bottom: 20px;
}
.muted {
  color: var(--muted);
}
footer {
  max-width: 1450px;
  margin: auto;
  padding: 0 38px 25px;
  font-size: 10px;
  color: #9d9dab;
  display: flex;
  gap: 16px;
}
footer span:last-child {
  margin-left: auto;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: 0 24px 100px #2c234e24;
  max-width: 660px;
  width: calc(100% - 32px);
  max-height: 90vh;
  padding: 0;
  color: var(--ink);
}
dialog::backdrop {
  background: #23213955;
  backdrop-filter: blur(3px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 23px 26px;
  border-bottom: 1px solid var(--line);
}
.modal-body {
  padding: 25px;
}
.modal-footer {
  padding-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.secret {
  background: #f2f6f3;
  border: 1px solid #dceade;
  padding: 17px;
  border-radius: 8px;
  overflow-wrap: anywhere;
  font:
    12px/1.7 Consolas,
    monospace;
  margin: 20px 0;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 22px;
  border-radius: 10px;
  background: #29243e;
  color: white;
  font-size: 12px;
  z-index: 30;
  max-width: 90vw;
}
.inline-error {
  font-size: 12px;
  color: #b8545d;
  margin: 10px 0;
}
@media (max-width: 1100px) {
  .sidebar {
    width: 215px;
  }
  .shell {
    margin-left: 215px;
  }
  main {
    padding: 28px 25px;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .columns {
    grid-template-columns: 1fr;
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .network {
    display: none;
  }
}
@media (max-width: 720px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 15px 0 50px #20203933;
  }
  .shell {
    margin-left: 0;
  }
  #menu {
    display: block;
  }
  .topbar {
    height: 65px;
    padding: 0 15px;
  }
  .breadcrumb {
    margin-right: auto;
  }
  .top-actions .button {
    display: none;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  main {
    padding: 25px 17px;
  }
  .hero {
    padding: 24px;
  }
  .metric {
    padding: 16px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .toolbar input {
    max-width: none;
  }
  h1 {
    font-size: 26px;
  }
  footer {
    padding: 0 17px 20px;
  }
  .panel-head {
    padding: 18px;
  }
  td,
  th {
    padding: 14px;
  }
}
.chat-panel { max-width: 960px; margin: 0 auto; overflow: hidden; }
.chat-log { min-height: 340px; max-height: 52vh; overflow-y: auto; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.chat-welcome { text-align: center; margin: auto; padding: 24px 0; color: #77728c; }
.chat-welcome > span { font-size: 42px; color: #7153e6; }
.chat-welcome h2 { margin: 14px 0; color: #29243c; }
.chat-welcome p { line-height: 1.8; margin-bottom: 24px; }
.chat-message { max-width: 86%; padding: 16px 20px; border-radius: 16px; background: #f3f0fb; overflow-wrap: anywhere; }
.chat-message b { display: block; font-size: 11px; margin-bottom: 8px; }
.chat-message > div { white-space: pre-wrap; line-height: 1.7; }
.chat-message.user { align-self: flex-end; background: #7052de; color: white; }
.chat-message.error { background: #fff6e9; color: #805318; border: 1px solid #f2dfbf; }
.chat-wait { color: #77728c; font-size: 12px; }
.chat-composer { border-top: 1px solid #ebe7f1; padding: 22px; }
.chat-composer > div { display: flex; align-items: flex-end; gap: 12px; }
.chat-composer textarea { flex: 1; resize: vertical; min-width: 0; }
.chat-composer small { display: block; margin-top: 12px; color: #878196; line-height: 1.6; }
@media (max-width: 600px) { .chat-log { padding: 16px; } .chat-message { max-width: 95%; } .chat-composer { padding: 16px; } .chat-composer > div { flex-direction: column; align-items: stretch; } }
.chat-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 480px; }
.conversation-history { border-right: 1px solid #ebe7f1; padding: 14px; background: #fbfaff; }
.conversation-history .panel-head { padding: 4px 2px 12px; }
.conversation-item { width: 100%; display: block; text-align: left; border: 0; border-radius: 10px; background: transparent; padding: 11px; color: #29243c; cursor: pointer; margin-bottom: 5px; }
.conversation-item:hover, .conversation-item.active { background: #ece8fb; }
.conversation-item b, .conversation-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-item small { color: #878196; margin-top: 5px; font-size: 10px; }
.chat-main { min-width: 0; }
.provider-select { display: flex; align-items: center; gap: 8px; color: #77728c; font-size: 12px; }
.provider-select select { border: 1px solid #ddd8eb; border-radius: 8px; padding: 8px; background: white; color: #29243c; }
@media (max-width: 700px) { .chat-layout { grid-template-columns: 1fr; } .conversation-history { border-right: 0; border-bottom: 1px solid #ebe7f1; max-height: 150px; overflow-y: auto; } .conversation-item { display: inline-block; width: 48%; vertical-align: top; } }
