.lt-lobe-page {
  margin: 16px 0 24px;
  background:
    radial-gradient(900px 360px at 5% 0%, rgba(31, 94, 255, 0.08), transparent 55%),
    radial-gradient(900px 360px at 95% 100%, rgba(0, 163, 255, 0.07), transparent 55%);
  border-radius: 18px;
  padding: 10px 0;
}

.lt-lobe-lock {
  max-width: 860px;
  margin: 0 auto;
  border: 1px solid rgba(31, 35, 41, 0.14);
  border-radius: 14px;
  background: #fff;
  padding: 22px;
}

.lt-lobe-lock-embed {
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
}

.lt-lobe-embed {
  width: 100%;
  min-height: 680px;
  height: calc(100vh - 140px);
}

.lt-lobe-embed-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  border-radius: 16px;
  background: #fff;
}

.lt-lobe-app {
  max-width: 1500px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 14px;
  min-height: calc(100vh - 170px);
  padding: 0 8px;
}

.lt-lobe-left,
.lt-lobe-main {
  border: 1px solid rgba(31, 35, 41, 0.12);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.lt-lobe-left {
  display: flex;
  flex-direction: column;
  min-height: 620px;
}

.lt-lobe-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid rgba(31, 35, 41, 0.08);
}

.lt-lobe-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, #1f5eff, #00a3ff);
  color: #fff;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lt-lobe-brand-text .name {
  font-size: 14px;
  font-weight: 700;
}

.lt-lobe-brand-text .sub {
  font-size: 12px;
  opacity: 0.68;
}

.lt-lobe-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.lt-lobe-nav > button {
  border: 1px solid rgba(31, 35, 41, 0.12);
  background: #f7f8fa;
  min-height: 36px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.lt-lobe-nav > button.is-active {
  background: #1f5eff;
  color: #fff;
  border-color: #1f5eff;
}

.lt-lobe-thread-head {
  margin-top: 4px;
  padding: 0 12px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}

.lt-lobe-thread-head > button {
  border: 1px solid rgba(31, 35, 41, 0.12);
  border-radius: 8px;
  background: #fff;
  min-height: 30px;
  padding: 0 10px;
  cursor: pointer;
}

.lt-lobe-thread-list {
  padding: 0 10px 12px;
  overflow: auto;
  min-height: 180px;
}

.lt-lobe-thread-item {
  border: 1px solid rgba(31, 35, 41, 0.1);
  border-radius: 10px;
  background: #fbfcff;
  padding: 9px 10px;
  margin-bottom: 8px;
  cursor: pointer;
}

.lt-lobe-thread-item.is-active {
  border-color: #1f5eff;
  background: #eef3ff;
}

.lt-lobe-thread-item .t {
  font-size: 13px;
  font-weight: 600;
}

.lt-lobe-thread-item .d {
  font-size: 12px;
  opacity: 0.64;
  margin-top: 4px;
}

.lt-lobe-main {
  display: flex;
  flex-direction: column;
  min-height: 620px;
}

.lt-lobe-panel {
  display: none;
  height: 100%;
}

.lt-lobe-panel.is-active {
  display: flex;
  flex-direction: column;
}

.lt-lobe-panel-head {
  min-height: 58px;
  border-bottom: 1px solid rgba(31, 35, 41, 0.1);
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lt-lobe-panel-head > h3 {
  margin: 0;
  font-size: 16px;
}

.lt-lobe-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lt-lobe-inline input,
.lt-lobe-inline select {
  border: 1px solid rgba(31, 35, 41, 0.16);
  border-radius: 8px;
  min-height: 34px;
  padding: 0 10px;
}

.lt-lobe-btn {
  border: 1px solid rgba(31, 35, 41, 0.16);
  background: #fff;
  color: #222;
  min-height: 34px;
  border-radius: 9px;
  padding: 0 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

.lt-lobe-btn-primary {
  background: #1f5eff;
  border-color: #1f5eff;
  color: #fff;
}

.lt-lobe-msgs {
  flex: 1;
  overflow: auto;
  padding: 14px;
  background: radial-gradient(circle at top right, rgba(31, 94, 255, 0.06), transparent 35%), #f8fbff;
}

.lt-lobe-msg {
  max-width: min(78%, 860px);
  border: 1px solid rgba(31, 35, 41, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: #fff;
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: 14px;
}

.lt-lobe-msg.role-user {
  margin-left: auto;
  background: #1f5eff;
  color: #fff;
  border-color: #1f5eff;
}

.lt-lobe-msg.role-assistant {
  border-color: rgba(31, 94, 255, 0.28);
}

.lt-lobe-inputbar {
  border-top: 1px solid rgba(31, 35, 41, 0.1);
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.lt-lobe-inputbar textarea {
  width: 100%;
  min-height: 86px;
  max-height: 220px;
  resize: vertical;
  border: 1px solid rgba(31, 35, 41, 0.16);
  border-radius: 10px;
  padding: 10px;
}

.lt-lobe-grid-list {
  padding: 12px;
  overflow: auto;
}

.lt-lobe-card {
  border: 1px solid rgba(31, 35, 41, 0.12);
  border-radius: 12px;
  margin-bottom: 10px;
  background: #fff;
  overflow: hidden;
}

.lt-lobe-card-head {
  min-height: 42px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(31, 35, 41, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lt-lobe-card-head .title {
  font-weight: 600;
  font-size: 14px;
}

.lt-lobe-card-body {
  padding: 10px 12px;
}

.lt-lobe-card-body input,
.lt-lobe-card-body textarea,
.lt-lobe-card-body select {
  width: 100%;
  border: 1px solid rgba(31, 35, 41, 0.15);
  border-radius: 8px;
  min-height: 34px;
  padding: 7px 9px;
  margin-bottom: 8px;
}

.lt-lobe-card-body textarea {
  min-height: 90px;
  resize: vertical;
}

.lt-lobe-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 12px;
}

.lt-lobe-vector-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px;
  overflow: auto;
}

.lt-lobe-input-col,
.lt-lobe-search-col {
  border: 1px solid rgba(31, 35, 41, 0.12);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
}

#lt-lobe-doc-title,
#lt-lobe-search-q {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(31, 35, 41, 0.16);
  border-radius: 8px;
  padding: 0 9px;
}

#lt-lobe-doc-content {
  width: 100%;
  margin-top: 8px;
  min-height: 210px;
  resize: vertical;
  border: 1px solid rgba(31, 35, 41, 0.16);
  border-radius: 8px;
  padding: 9px;
}

#lt-lobe-doc-add {
  margin-top: 8px;
}

.lt-lobe-search-res,
.lt-lobe-doc-list {
  margin-top: 10px;
  max-height: 270px;
  overflow: auto;
}

.lt-lobe-search-item,
.lt-lobe-doc-item {
  border: 1px solid rgba(31, 35, 41, 0.12);
  border-radius: 10px;
  padding: 8px 9px;
  margin-bottom: 8px;
  background: #fafcff;
  font-size: 13px;
  line-height: 1.5;
}

.lt-lobe-doc-item .head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lt-lobe-doc-item .head .t {
  font-weight: 600;
}

.lt-lobe-doc-item .head .act button {
  border: 1px solid rgba(255, 76, 76, 0.4);
  color: #d43d3d;
  background: #fff;
  border-radius: 8px;
  min-height: 28px;
  padding: 0 8px;
  cursor: pointer;
}

.lt-lobe-chip {
  display: inline-flex;
  align-items: center;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(31, 94, 255, 0.28);
  background: rgba(31, 94, 255, 0.09);
  color: #1f5eff;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
}

.lt-wf-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 2px 0 8px;
}

.lt-wf-tools > button {
  border: 1px solid rgba(31, 35, 41, 0.15);
  background: #fff;
  color: #1f2d3d;
  min-height: 30px;
  border-radius: 8px;
  padding: 0 10px;
  cursor: pointer;
  font-size: 12px;
}

.lt-wf-nodes {
  border: 1px dashed rgba(31, 35, 41, 0.18);
  border-radius: 10px;
  padding: 9px;
  margin-bottom: 8px;
  background: #f9fbff;
}

.lt-wf-node {
  border: 1px solid rgba(31, 35, 41, 0.12);
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  margin-bottom: 8px;
}

.lt-wf-node:last-child {
  margin-bottom: 0;
}

.lt-wf-node-empty {
  border-style: dashed;
  text-align: center;
  color: #7a8699;
  background: transparent;
}

.lt-wf-node-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.lt-wf-node-head .tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(31, 94, 255, 0.25);
  background: rgba(31, 94, 255, 0.08);
  color: #1f5eff;
  padding: 0 8px;
  min-height: 24px;
  font-size: 12px;
  font-weight: 600;
}

.lt-wf-node-head .act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lt-wf-node-head .act button {
  border: 1px solid rgba(31, 35, 41, 0.14);
  background: #fff;
  min-height: 24px;
  border-radius: 7px;
  padding: 0 7px;
  font-size: 12px;
  cursor: pointer;
}

.lt-wf-kv {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lt-wf-kv label {
  font-size: 12px;
  color: #667085;
}

.lt-wf-kv input {
  width: 110px;
}

body.night .lt-lobe-left,
body.night .lt-lobe-main,
body.night .lt-lobe-input-col,
body.night .lt-lobe-search-col,
body.night .lt-lobe-card,
body.night .lt-wf-node,
body.night .lt-lobe-lock {
  background: #252c36;
  border-color: rgba(255, 255, 255, 0.12);
}

body.night .lt-lobe-msgs {
  background: radial-gradient(circle at top right, rgba(31, 94, 255, 0.16), transparent 35%), #1f2630;
}

body.night .lt-lobe-msg {
  background: #2e3744;
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
}

body.night .lt-lobe-msg.role-user {
  background: #1f5eff;
  border-color: #1f5eff;
}

body.night .lt-lobe-chip,
body.night .lt-wf-node-head .tag {
  border-color: rgba(117, 158, 255, 0.5);
  background: rgba(31, 94, 255, 0.2);
  color: #b8ccff;
}

body.night .lt-lobe-nav > button,
body.night .lt-lobe-btn,
body.night .lt-wf-tools > button,
body.night .lt-wf-node-head .act button,
body.night .lt-lobe-thread-head > button {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.9);
}

body.night .lt-lobe-nav > button.is-active,
body.night .lt-lobe-btn-primary {
  background: #1f5eff;
  border-color: #1f5eff;
  color: #fff;
}

body.night .lt-lobe-thread-item,
body.night .lt-lobe-search-item,
body.night .lt-lobe-doc-item,
body.night .lt-lobe-inputbar textarea,
body.night .lt-lobe-card-body textarea,
body.night .lt-lobe-card-body input,
body.night .lt-lobe-card-body select,
body.night #lt-lobe-doc-title,
body.night #lt-lobe-doc-content,
body.night #lt-lobe-search-q,
body.night .lt-lobe-inline input,
body.night .lt-lobe-inline select {
  background: #2d3642;
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
}

body.night .lt-wf-nodes {
  background: #222a34;
  border-color: rgba(255, 255, 255, 0.14);
}

body.night .lt-lobe-page {
  background:
    radial-gradient(900px 360px at 5% 0%, rgba(31, 94, 255, 0.16), transparent 55%),
    radial-gradient(900px 360px at 95% 100%, rgba(0, 163, 255, 0.12), transparent 55%);
}

@media (max-width: 1100px) {
  .lt-lobe-app {
    grid-template-columns: 1fr;
  }

  .lt-lobe-left {
    min-height: 240px;
  }

  .lt-lobe-vector-box {
    grid-template-columns: 1fr;
  }
}
