:root {
  color-scheme: light;
  --wechat-green: #1aad19;
  --wechat-green-strong: #07c160;
  --wechat-green-soft: #dff2df;
  --bg-app: #e7e8e6;
  --bg-rail: #e6e7e5;
  --bg-panel: #f7f7f7;
  --bg-chat: #f3f3f3;
  --bg-card: #ffffff;
  --bg-hover: rgba(0, 0, 0, 0.035);
  --border-light: rgba(0, 0, 0, 0.06);
  --border-medium: rgba(0, 0, 0, 0.1);
  --text-primary: #1f2326;
  --text-secondary: #75797d;
  --text-tertiary: #a0a4a8;
  --danger: #b94a48;
  --shadow-soft: 0 8px 28px rgba(0, 0, 0, 0.08);
  --shadow-pop: 0 20px 60px rgba(0, 0, 0, 0.18);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  background: var(--bg-app);
  color: var(--text-primary);
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  min-height: 34px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--wechat-green);
  color: #fff;
  padding: 0 14px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

button:hover:not(:disabled) {
  background: #159515;
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: #fff;
  color: var(--text-primary);
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(26, 173, 25, 0.35);
  box-shadow: 0 0 0 3px rgba(26, 173, 25, 0.08);
}

textarea {
  resize: vertical;
  line-height: 1.55;
}

label {
  display: grid;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 12px;
}

.app-shell {
  display: grid;
  grid-template-columns: 64px 292px minmax(0, 1fr);
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: var(--bg-app);
}

.nav-rail {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: start;
  padding: 18px 10px 14px;
  overflow: hidden;
  background: var(--bg-rail);
  border-right: 1px solid var(--border-light);
}

.rail-profile {
  flex: 0 0 auto;
  align-self: center;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(145deg, #32c55f, #159a3e);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 5px 14px rgba(26, 173, 25, 0.2);
}

.rail-spacer {
  flex: 1 1 auto;
  min-height: 16px;
}

.rail-button,
.icon-btn,
.tool-button,
.settings-tab,
.secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.rail-button {
  flex: 0 0 auto;
  align-self: center;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 10px;
}

.rail-button:hover,
.icon-btn:hover,
.tool-button:hover,
.settings-tab:hover,
.secondary:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: transparent;
  color: var(--text-primary);
}

.sidebar {
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 74px minmax(0, 1fr);
  overflow: hidden;
  background: var(--bg-panel);
  border-right: 1px solid var(--border-light);
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 58px 0 18px;
  border-bottom: 1px solid var(--border-light);
}

.brand strong {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0;
}

.brand-add {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.brand-add:active:not(:disabled) {
  transform: translateY(calc(-50% + 1px));
}

.room-subtitle,
.chat-header p,
.settings-header p,
.muted {
  color: var(--text-secondary);
  font-size: 12px;
}

.ai-status-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 50%;
  background: #d14d42;
  box-shadow: 0 0 0 2px rgba(209, 77, 66, 0.12);
}

.ai-status-dot.online,
.ai-status-dot.thinking {
  background: var(--wechat-green-strong);
  box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.12);
}

.ai-status-dot.thinking {
  animation: aiPulse 1.8s ease-in-out infinite;
}

@keyframes aiPulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}

.room-list {
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 8px;
  display: grid;
  align-content: start;
  gap: 2px;
}

.room-list::-webkit-scrollbar,
.messages::-webkit-scrollbar,
.settings-content::-webkit-scrollbar {
  width: 8px;
}

.room-list::-webkit-scrollbar-thumb,
.messages::-webkit-scrollbar-thumb,
.settings-content::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 999px;
}

.room {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  text-align: left;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 9px 10px;
}

.room:hover {
  background: rgba(0, 0, 0, 0.04);
}

.room.active {
  background: var(--wechat-green-soft);
  border-color: rgba(26, 173, 25, 0.12);
}

.room-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e3e7e4;
  color: #52615a;
  font-size: 13px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.room.group .room-avatar {
  background: linear-gradient(145deg, #2fc15f, #179246);
  color: #fff;
}

.room.ic .room-avatar {
  background: #dce8f8;
  color: #3c5e86;
}

.room.pbc_manager .room-avatar {
  background: #efe7d8;
  color: #7b5b2e;
}

.room.data .room-avatar {
  background: #dbeee8;
  color: #2f6e5c;
}

.room.email .room-avatar {
  background: #eadff0;
  color: #6b4a7d;
}

.room.executor .room-avatar {
  background: #e8e4dc;
  color: #675a45;
}

.room.reviewer .room-avatar {
  background: #f2dedc;
  color: #7a4741;
}

.room-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.room-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.room-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 560;
}

.room-time {
  flex: 0 0 auto;
  color: var(--text-tertiary);
  font-size: 11px;
}

.room-subtitle {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-list .room {
  grid-template-columns: 1fr;
  min-height: 52px;
}

.employee-list .room-name,
.employee-list .room-subtitle {
  display: block;
}

.chat {
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-rows: 74px minmax(0, 1fr) auto;
  background: var(--bg-chat);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: rgba(248, 248, 248, 0.96);
  border-bottom: 1px solid var(--border-light);
}

.chat-header h1 {
  margin: 0 0 5px;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 620;
}

.chat-header p {
  margin: 0;
}

.chat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.connector-status {
  max-width: 148px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-secondary);
  font-size: 12px;
}

.connector-status::before {
  content: '';
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d94b4b;
}

.connector-status.online::before {
  background: var(--wechat-green);
}

.omnia-workflow-menu-options button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.icon-btn {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 8px;
}

.compact {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--border-light);
}

.messages {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 22px 34px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.message {
  max-width: min(720px, 76%);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.message.user {
  align-self: flex-end;
  grid-template-columns: minmax(0, 1fr) 34px;
}

.message.system {
  align-self: center;
  display: block;
  max-width: 88%;
}

.message-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #dde3df;
  color: #536059;
  font-size: 12px;
  font-weight: 700;
}

.message.user .message-avatar {
  grid-column: 2;
  background: #cdecc8;
  color: #237422;
}

.message-content {
  min-width: 0;
}

.message.user .message-content {
  grid-column: 1;
  grid-row: 1;
}

.message-meta {
  margin-bottom: 5px;
  color: var(--text-tertiary);
  font-size: 11px;
}

.message.user .message-meta {
  text-align: right;
}

.message-bubble {
  width: fit-content;
  max-width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.045);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.035);
}

.message.user .message-bubble {
  margin-left: auto;
  background: #95ec69;
  border-color: rgba(57, 174, 58, 0.18);
}

.message.system .message-bubble {
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.045);
  color: var(--text-secondary);
  border: 0;
  box-shadow: none;
  font-size: 12px;
}

.message-body {
  white-space: pre-wrap;
  line-height: 1.58;
  font-size: 14px;
}

.attachment {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.78);
  color: #168f35;
  text-decoration: none;
}

.attachment-preview {
  margin: 10px 0 0;
  display: grid;
  gap: 8px;
}

.attachment-preview img {
  max-width: min(640px, 68vw);
  max-height: 360px;
  display: block;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #fff;
  object-fit: contain;
}

.attachment-preview figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--text-secondary);
  font-size: 12px;
}

.attachment-preview figcaption .attachment {
  margin-top: 0;
}

.chat-empty {
  min-height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--text-secondary);
}

.chat-empty-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  transform: translateY(-6%);
}

.chat-empty-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--border-light);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.045);
}

.chat-empty-icon::before,
.chat-empty-icon::after {
  content: "";
  display: block;
  border-radius: 999px;
  background: #c3c8c4;
}

.chat-empty-icon::before {
  width: 28px;
  height: 20px;
  border-radius: 12px 12px 12px 4px;
}

.chat-empty-icon::after {
  width: 18px;
  height: 4px;
  margin-top: -18px;
  background: #fff;
}

.chat-empty-title {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 550;
}

.chat-empty-copy {
  max-width: 320px;
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 1.6;
}

.composer {
  min-height: 178px;
  padding: 0 18px 18px;
  background: var(--bg-chat);
  border-top: 1px solid var(--border-light);
  overflow: hidden;
}

.composer-panel {
  position: relative;
  display: grid;
  grid-template-rows: 8px 30px auto 34px;
  gap: 8px;
  padding: 4px 12px 12px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.045);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.035);
}

.composer-resize-handle {
  height: 8px;
  cursor: ns-resize;
  position: relative;
  border-radius: 999px;
  touch-action: none;
}

.composer-resize-handle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 3px;
  width: 44px;
  height: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #d8ddd9;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.composer-resize-handle:hover::before,
.composer-resize-handle:focus-visible::before,
.composer.is-resizing .composer-resize-handle::before {
  opacity: 1;
  background: #b8c0ba;
}

.composer.is-resizing,
.composer.is-resizing * {
  cursor: ns-resize;
  user-select: none;
}

.composer-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  min-width: 0;
}

.tool-button {
  width: 32px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 7px;
}

.workflow-status {
  height: 30px;
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0 10px;
  border: 1px solid rgba(0, 0, 0, 0.045);
  border-radius: 7px;
  background: #f7f8f7;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 30px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.workflow-status::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #b9c0ba;
}

.workflow-status span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-status.thinking {
  color: #237a3a;
  background: #f2faf4;
  border-color: rgba(7, 193, 96, 0.16);
}

.workflow-status.thinking::before {
  background: var(--wechat-green);
  animation: statusPulse 1.4s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% {
    opacity: 0.35;
    transform: scale(0.82);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.composer.is-dragging-file .composer-panel {
  border-color: rgba(7, 193, 96, 0.45);
  box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.12), 0 8px 22px rgba(0, 0, 0, 0.045);
}

.composer.is-dragging-file .composer-panel::after {
  content: "松开添加到当前消息";
  position: absolute;
  inset: 10px 12px 12px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(7, 193, 96, 0.55);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--wechat-green-strong);
  font-size: 13px;
  pointer-events: none;
}

.composer textarea {
  height: 86px;
  min-height: 0;
  max-height: none;
  border: 0;
  border-radius: 0;
  padding: 2px 4px;
  box-shadow: none;
  background: transparent;
  resize: none;
  overflow-y: auto;
}

.composer textarea:focus {
  border-color: transparent;
  box-shadow: none;
}

.composer-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.selected-file {
  min-height: 18px;
  color: var(--text-tertiary);
  font-size: 12px;
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
}

.selected-file-name {
  max-width: min(520px, 100%);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-file-remove {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-left: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #6d7470;
  font-size: 14px;
  line-height: 18px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.selected-file-remove:hover {
  background: transparent;
  color: #1f2326;
}

#sendBtn {
  align-self: end;
  min-width: 72px;
  height: 34px;
  min-height: 34px;
  background: var(--wechat-green);
  border-radius: 7px;
  font-size: 14px;
}

#sendBtn:hover:not(:disabled) {
  background: var(--wechat-green-strong);
}

#sendBtn:disabled {
  background: #dfe4df;
  color: #9aa29b;
  opacity: 1;
}

.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  position: relative;
  vertical-align: middle;
}

.icon-refresh::before {
  content: "↻";
  position: absolute;
  inset: -2px 0 0;
  text-align: center;
  font-size: 17px;
  line-height: 18px;
}

.icon-settings::before {
  content: "⚙";
  position: absolute;
  inset: -1px 0 0;
  text-align: center;
  font-size: 17px;
  line-height: 18px;
}

.icon-plus::before,
.icon-plus::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 8px;
  height: 1.8px;
  border-radius: 999px;
  background: currentColor;
}

.icon-plus::after {
  transform: rotate(90deg);
}

.icon-attach::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 8px;
  height: 13px;
  border: 1.8px solid currentColor;
  border-radius: 6px;
  transform: rotate(35deg);
}

.icon-image::before {
  content: "";
  position: absolute;
  inset: 3px 2px;
  border: 1.6px solid currentColor;
  border-radius: 3px;
}

.icon-image::after {
  content: "";
  position: absolute;
  left: 5px;
  bottom: 5px;
  width: 9px;
  height: 6px;
  background: currentColor;
  clip-path: polygon(0 100%, 40% 32%, 62% 64%, 78% 42%, 100% 100%);
  opacity: 0.72;
}

.icon-smile::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1.6px solid currentColor;
  border-radius: 50%;
}

.icon-smile::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  width: 8px;
  height: 7px;
  border-bottom: 1.6px solid currentColor;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 -1px 0 -0.2px currentColor;
}

.icon-command::before {
  content: "/";
  position: absolute;
  inset: -3px 0 0;
  text-align: center;
  font-weight: 700;
  font-size: 20px;
}

.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(20, 24, 22, 0.36);
}

.settings-overlay[hidden] {
  display: none;
}

.settings-dialog {
  width: min(1120px, 100%);
  height: min(760px, 100%);
  display: grid;
  grid-template-rows: 70px 1fr;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}

.group-dialog {
  width: min(520px, 100%);
  height: auto;
  grid-template-rows: 70px auto;
}

.group-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border-light);
}

.settings-header h2 {
  margin: 0 0 4px;
  font-size: 17px;
}

.settings-header p {
  margin: 0;
}

.settings-body {
  display: grid;
  grid-template-columns: 160px 1fr;
  min-height: 0;
  overflow: hidden;
}

.settings-nav {
  padding: 12px;
  border-right: 1px solid var(--border-light);
  background: #f7f8f7;
  display: grid;
  align-content: start;
  gap: 8px;
}

.settings-tab {
  width: 100%;
  text-align: left;
  border-radius: var(--radius-md);
}

.settings-tab.active {
  background: var(--wechat-green-soft);
  color: #177a16;
  border-color: rgba(26, 173, 25, 0.14);
}

.settings-content {
  min-height: 0;
  overflow: hidden;
}

.panel {
  display: none;
  padding: 16px;
  min-height: 0;
  overflow: auto;
}

.panel.active {
  display: grid;
  gap: 14px;
}

.ai-login-pane {
  min-height: 100%;
  display: grid;
  place-items: start center;
  padding: 32px 16px;
}

.ai-login-card {
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.06);
}

.ai-login-card.signed-in {
  border-color: rgba(26, 173, 25, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f8fcf8 100%);
}

.ai-login-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #177a16;
  background: var(--wechat-green-soft);
  font-weight: 700;
}

.ai-login-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.ai-login-main h2 {
  margin: 0;
  font-size: 17px;
}

.system-settings-pane {
  width: min(680px, 100%);
  display: grid;
  align-content: start;
  gap: 16px;
}

.system-settings-header h2 {
  margin: 0 0 4px;
  font-size: 17px;
}

.system-settings-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.system-version-card {
  padding: 18px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #fff;
}

.system-version-card div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.system-version-card span {
  color: var(--text-secondary);
  font-size: 13px;
}

.system-version-card strong {
  color: var(--text-primary);
  font-size: 15px;
}

.ai-login-main p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.ai-login-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--text-secondary);
  font-size: 12px;
}

#employeesPanel.panel.active {
  display: block;
  padding: 0;
  overflow: hidden;
  height: 100%;
  min-height: 0;
}

#groupsPanel.panel.active {
  display: block;
  padding: 0;
  overflow: hidden;
  height: 100%;
  min-height: 0;
}

#knowledgePanel.panel.active {
  display: block;
  padding: 0;
  overflow: hidden;
  height: 100%;
  min-height: 0;
}

#promptsPanel.panel.active {
  display: block;
  padding: 0;
  overflow: hidden;
  height: 100%;
  min-height: 0;
}

#logsPanel.panel.active {
  display: block;
  padding: 0;
  overflow: hidden;
  height: 100%;
  min-height: 0;
}

.connector-settings-pane {
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding: 28px 32px 36px;
  background: #fff;
}

.connector-settings-header,
.connector-section-title,
.connector-device-card,
.connector-command-row {
  display: flex;
  align-items: center;
}

.connector-settings-header {
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.connector-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.connector-settings-header h2,
.connector-section-title h3 {
  margin: 0;
  color: var(--text-primary);
}

.connector-settings-header h2 {
  font-size: 18px;
}

.connector-settings-header p {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.connector-pairing-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  margin: 20px 0;
  padding: 18px;
  border: 1px solid rgba(7, 193, 96, 0.26);
  border-radius: 8px;
  background: #f3fbf5;
}

.connector-pairing-code,
.connector-pairing-command {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.connector-pairing-code span,
.connector-pairing-command span,
.connector-pairing-code small,
.connector-device-main span,
.connector-device-main small,
.connector-device-meta small,
.connector-command-row small {
  color: var(--text-secondary);
  font-size: 12px;
}

.connector-pairing-code strong {
  font-size: 24px;
  letter-spacing: 0;
}

.connector-pairing-command code {
  display: block;
  overflow: hidden;
  padding: 9px 10px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: #fff;
  color: #343434;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connector-pairing-command button {
  align-self: flex-end;
}

.connector-device-section,
.connector-command-section {
  margin-top: 24px;
}

.connector-section-title {
  justify-content: space-between;
  min-height: 34px;
  margin-bottom: 10px;
}

.connector-section-title h3 {
  font-size: 15px;
}

.connector-section-title > span {
  color: var(--text-secondary);
  font-size: 12px;
}

.connector-device-list,
.connector-command-list {
  border-top: 1px solid var(--border-light);
}

.connector-device-card {
  min-height: 82px;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.connector-device-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #d9534f;
}

.connector-device-card.online .connector-device-dot {
  background: var(--wechat-green);
  box-shadow: 0 0 0 4px rgba(7, 193, 96, 0.1);
}

.connector-device-main {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.connector-device-main strong,
.connector-device-main span,
.connector-device-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connector-device-main strong {
  font-size: 14px;
}

.connector-device-meta {
  display: flex;
  width: 250px;
  flex: 0 0 250px;
  align-items: flex-end;
  flex-direction: column;
  gap: 4px;
}

.connector-command-row {
  min-height: 56px;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-light);
}

.connector-command-row > div {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.connector-command-row > small {
  width: 180px;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .connector-pairing-card {
    grid-template-columns: 1fr;
  }

  .connector-device-meta {
    width: 170px;
    flex-basis: 170px;
  }
}

#capabilitiesPanel.panel.active {
  display: block;
  padding: 0;
  overflow: hidden;
  height: 100%;
  min-height: 0;
}

.capabilities-workspace {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.omnia-workflow-menu {
  position: relative;
  flex: 0 0 auto;
}

.omnia-workflow-menu[hidden] {
  display: none;
}

.omnia-workflow-trigger {
  color: #197b2d;
  border-color: rgba(26, 173, 25, 0.18);
  background: rgba(255, 255, 255, 0.68);
}

.omnia-workflow-trigger::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 0 3px 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.omnia-workflow-menu-options {
  position: absolute;
  top: calc(100% - 1px);
  right: 0;
  z-index: 12;
  width: 268px;
  display: none;
  padding: 8px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.omnia-workflow-menu:hover .omnia-workflow-menu-options,
.omnia-workflow-menu:focus-within .omnia-workflow-menu-options {
  display: grid;
  gap: 3px;
}

.omnia-workflow-menu:hover .omnia-workflow-trigger,
.omnia-workflow-menu:focus-within .omnia-workflow-trigger {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.omnia-workflow-menu-options button {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-primary);
  text-align: left;
}

.omnia-workflow-menu-options button:hover,
.omnia-workflow-menu-options button:focus-visible {
  background: var(--wechat-green-soft);
  color: var(--text-primary);
}

.omnia-workflow-menu-options strong,
.omnia-workflow-menu-options span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.omnia-workflow-menu-options strong {
  font-size: 14px;
  font-weight: 650;
}

.omnia-workflow-menu-options span {
  color: var(--text-secondary);
  font-size: 12px;
}

.omnia-workflow-overlay {
  z-index: 24;
}

.omnia-workflow-dialog {
  width: min(1120px, 100%);
  height: min(760px, 100%);
  min-height: 0;
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr) 64px;
  overflow: hidden;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
}

.omnia-workflow-header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-light);
}

.omnia-workflow-header h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}

.omnia-workflow-header p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.omnia-workflow-heading,
.omnia-workflow-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.omnia-workflow-status {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef6ee;
  color: #197b2d;
  font-size: 12px;
}

.omnia-workflow-body {
  min-height: 0;
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  overflow: hidden;
}

.omnia-workflow-steps,
.omnia-workflow-content {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.omnia-workflow-steps {
  padding: 14px 12px;
  border-right: 1px solid var(--border-light);
  background: #f7f8f7;
}

.omnia-step {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
  cursor: default;
}

.omnia-step + .omnia-step {
  margin-top: 3px;
}

.omnia-step:hover {
  background: transparent;
  color: var(--text-secondary);
}

.omnia-step.current {
  background: var(--wechat-green-soft);
  color: var(--text-primary);
}

.omnia-step.completed {
  color: #39794a;
}

.omnia-step.blocked {
  background: #fbefee;
  color: var(--danger);
}

.omnia-step-number {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-medium);
  border-radius: 50%;
  background: #fff;
  color: inherit;
  font-size: 12px;
  font-weight: 650;
}

.omnia-step.completed .omnia-step-number {
  border-color: rgba(26, 173, 25, 0.22);
  background: #e5f5e6;
}

.omnia-step.current .omnia-step-number {
  border-color: var(--wechat-green);
  background: var(--wechat-green);
  color: #fff;
}

.omnia-step-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.omnia-workflow-content {
  padding: 22px 26px 30px;
  background: #fff;
}

.omnia-workflow-content h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
}

.omnia-workflow-lead {
  max-width: 720px;
  margin: 8px 0 20px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.omnia-workflow-section {
  padding: 18px 0;
  border-top: 1px solid var(--border-light);
}

.omnia-workflow-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.omnia-workflow-section h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

.omnia-workflow-section p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.65;
}

.omnia-workflow-details {
  min-height: 118px;
  resize: vertical;
}

.omnia-workflow-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--border-light);
}

.omnia-workflow-fact {
  min-width: 0;
  padding: 12px;
  background: #fafafa;
}

.omnia-workflow-fact span,
.omnia-workflow-fact strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.omnia-workflow-fact span {
  margin-bottom: 5px;
  color: var(--text-secondary);
  font-size: 12px;
}

.omnia-workflow-attachments,
.omnia-workflow-updates {
  display: grid;
  gap: 8px;
}

.omnia-workflow-attachment,
.omnia-workflow-update {
  min-width: 0;
  min-height: 44px;
  display: grid;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: #fafafa;
}

.omnia-workflow-attachment {
  grid-template-columns: minmax(0, 1fr) auto;
}

.omnia-workflow-attachment-name,
.omnia-workflow-update p {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.omnia-workflow-attachment-name {
  white-space: nowrap;
}

.omnia-workflow-update {
  grid-template-columns: 118px minmax(0, 1fr);
}

.omnia-workflow-update time {
  color: var(--text-tertiary);
  font-size: 12px;
}

.omnia-workflow-update p {
  display: -webkit-box;
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.omnia-workflow-list {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.omnia-workflow-footer {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
  border-top: 1px solid var(--border-light);
  background: #fbfbfb;
}

.omnia-workflow-footer-note {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 12px;
}

.omnia-workflow-footer-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.omnia-workflow-busy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.omnia-workflow-busy::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid rgba(26, 173, 25, 0.2);
  border-top-color: var(--wechat-green);
  border-radius: 50%;
  animation: omnia-workflow-spin 0.8s linear infinite;
}

@keyframes omnia-workflow-spin {
  to { transform: rotate(360deg); }
}

.capability-roster,
.capability-detail {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.capability-roster {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-right: 1px solid var(--border-light);
  background: #fbfbfb;
}

.capability-detail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #fff;
}

.capability-roster-header,
.capability-detail-header {
  min-height: 68px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border-light);
}

.capability-roster-header h2,
.capability-detail-header h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.capability-roster-header p,
.capability-detail-header p {
  max-width: 620px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capability-list,
.capability-detail-scroll {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.employee-capability-scroll {
  gap: 18px;
}

.employee-capability-list {
  display: grid;
  align-content: start;
  gap: 6px;
}

.employee-capability-item {
  width: 100%;
  height: 68px;
  padding: 8px 12px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: #fff;
  color: var(--text-primary);
  text-align: left;
}

.employee-capability-item:hover {
  background: #f7f8f7;
}

.employee-capability-item.active {
  border-color: rgba(26, 173, 25, 0.22);
  background: var(--wechat-green-soft);
}

.employee-capability-item > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.employee-capability-item strong,
.employee-capability-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-capability-item strong {
  font-size: 14px;
}

.employee-capability-item small,
.employee-capability-item em {
  color: var(--text-secondary);
  font-size: 12px;
  font-style: normal;
}

.employee-capability-detail {
  display: grid;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.employee-capability-detail > header,
.employee-capability-add > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.employee-capability-detail h3,
.employee-capability-add h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.employee-capability-detail p,
.employee-capability-add p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.employee-capability-add {
  display: grid;
  align-content: start;
  gap: 16px;
}

.employee-capability-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 12px;
}

.employee-capability-divider::before,
.employee-capability-divider::after {
  content: '';
  height: 1px;
  background: var(--border-light);
}

.capability-list {
  padding: 8px;
}

.capability-row {
  width: 100%;
  height: 82px;
  padding: 10px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
}

.capability-row:hover {
  background: #f2f3f2;
}

.capability-row.active {
  border-color: rgba(26, 173, 25, 0.16);
  background: var(--wechat-green-soft);
}

.capability-row-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e9edeb;
  color: #365044;
  font-size: 13px;
  font-weight: 700;
}

.capability-row-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.capability-row-main strong,
.capability-row-main span,
.capability-row-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capability-row-main strong {
  font-size: 14px;
}

.capability-row-main span,
.capability-row-main small {
  color: var(--text-secondary);
  font-size: 12px;
}

.capability-detail-scroll {
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 16px;
}

.capability-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: #f8f9f8;
}

.capability-summary div {
  min-width: 0;
  padding: 13px;
  display: grid;
  gap: 5px;
  border-right: 1px solid var(--border-light);
}

.capability-summary div:last-child {
  border-right: 0;
}

.capability-summary span {
  color: var(--text-secondary);
  font-size: 12px;
}

.capability-summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.capability-form {
  padding: 16px;
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 12px;
}

.capability-form.compact {
  padding: 0;
  overflow: visible;
}

.capability-form label {
  display: grid;
  gap: 6px;
}

.capability-form label > span,
.capability-step-picker legend {
  color: var(--text-secondary);
  font-size: 12px;
}

.capability-step-picker {
  max-height: 260px;
  margin: 0;
  padding: 10px;
  overflow: auto;
  display: grid;
  gap: 4px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
}

.capability-step-picker label {
  min-height: 48px;
  padding: 8px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  border-radius: 6px;
}

.capability-step-picker label:hover {
  background: #f5f6f5;
}

.capability-step-picker input {
  width: 16px;
  height: 16px;
}

.capability-step-picker label span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.capability-step-picker small {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capability-form-actions,
.capability-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.capability-schema,
.capability-runs {
  display: grid;
  gap: 8px;
}

.capability-schema h3,
.capability-runs h3 {
  margin: 0;
  font-size: 14px;
}

.capability-schema > div {
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.capability-schema p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.capability-run {
  padding: 12px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--border-light);
  border-left: 3px solid #aeb6b1;
  border-radius: 6px;
}

.capability-run.succeeded {
  border-left-color: var(--wechat-green);
}

.capability-run.failed {
  border-left-color: #d94b4b;
}

.capability-run > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.capability-run > div span {
  color: var(--text-secondary);
}

.capability-run p,
.capability-run pre {
  margin: 0;
}

.capability-run p {
  color: #b53c3c;
  font-size: 13px;
}

.capability-run pre {
  max-height: 180px;
  padding: 10px;
  overflow: auto;
  border-radius: 6px;
  background: #f5f6f5;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .capabilities-workspace {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .capability-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .capability-summary div:nth-child(2) {
    border-right: 0;
  }
}

.group-workspace {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.group-roster,
.group-detail {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.group-roster {
  border-right: 1px solid var(--border-light);
  background: #fbfbfb;
}

.group-detail {
  background: #fff;
}

.group-roster-header,
.group-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
}

.group-roster-header h2,
.group-detail-header h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.group-roster-header p,
.group-detail-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.group-list {
  min-height: 0;
  align-content: start;
  grid-auto-rows: max-content;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 10px 8px;
}

.group-detail > .form-grid,
.group-detail > .empty {
  min-height: 0;
  align-content: start;
  grid-auto-rows: max-content;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

.logs-workspace {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: #fff;
}

.logs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
}

.logs-header h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.logs-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.logs-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.button-link {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: #fff;
  text-decoration: none;
  font-size: 14px;
}

.logs-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 170px;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  background: #fbfbfb;
}

.logs-meta div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.logs-meta span {
  color: var(--text-secondary);
  font-size: 12px;
}

.logs-meta strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.logs-list {
  min-height: 0;
  overflow: auto;
  padding: 12px 16px;
  display: grid;
  align-content: start;
  gap: 8px;
  background: #f6f6f6;
}

.log-line {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #fff;
}

.log-line.warn {
  border-color: rgba(232, 153, 35, 0.28);
}

.log-line.error {
  border-color: rgba(220, 70, 70, 0.32);
}

.log-line-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 110px 48px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.log-time,
.log-level {
  color: var(--text-secondary);
  font-size: 12px;
}

.log-line strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.log-line pre {
  margin: 8px 0 0;
  max-height: 180px;
  overflow: auto;
  color: var(--text-secondary);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#groupManageForm {
  height: 100%;
}

.group-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}

.group-actions button {
  width: 132px;
  height: 36px;
  min-height: 36px;
  padding: 0 14px;
  flex: 0 0 auto;
}

.group-row {
  width: 100%;
  height: 64px;
  min-height: 64px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  text-align: left;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
}

.group-row:hover {
  background: var(--bg-hover);
}

.group-row.active {
  background: var(--wechat-green-soft);
  border-color: rgba(26, 173, 25, 0.14);
}

.group-row .room-avatar {
  width: 38px;
  height: 38px;
}

.group-row-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.employee-workspace {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.employee-roster {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-right: 1px solid var(--border-light);
  background: #fbfbfb;
  overflow: hidden;
}

.employee-roster-header,
.employee-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
}

.employee-roster-header h2,
.employee-detail-header h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.employee-roster-header p,
.employee-detail-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.employee-roster .employee-list {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 10px 8px;
}

.employee-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  text-align: left;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
}

.employee-row:hover {
  background: var(--bg-hover);
}

.employee-row.active {
  background: var(--wechat-green-soft);
  border-color: rgba(26, 173, 25, 0.14);
}

.employee-row .room-avatar {
  width: 38px;
  height: 38px;
}

.employee-row-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.employee-detail {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #fff;
  overflow: hidden;
}

.employee-detail > .form-grid,
.employee-detail > .empty {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

.knowledge-workspace {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.knowledge-roster,
.knowledge-detail {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.knowledge-roster {
  border-right: 1px solid var(--border-light);
  background: #fbfbfb;
}

.knowledge-detail {
  background: #fff;
}

.knowledge-roster-header,
.knowledge-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
}

.knowledge-roster-header h2,
.knowledge-detail-header h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.knowledge-roster-header p,
.knowledge-detail-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.knowledge-roster .knowledge-list,
.knowledge-detail-scroll {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 10px;
}

.knowledge-detail-scroll {
  padding: 16px;
}

.prompt-workspace .knowledge-roster,
.prompt-workspace .knowledge-detail {
  min-height: 0;
  overflow: hidden;
}

.prompt-workspace #promptList {
  display: grid;
  grid-auto-rows: 116px;
  align-content: start;
  min-height: 0;
  overflow: auto;
}

.prompt-workspace .knowledge-row {
  height: 116px;
  min-height: 116px;
  align-content: start;
}

.prompt-workspace .knowledge-detail-scroll {
  min-height: 0;
  overflow: auto;
}

.knowledge-row {
  width: 100%;
  min-width: 0;
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding: 10px;
  text-align: left;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
}

.knowledge-row:hover {
  background: var(--bg-hover);
}

.knowledge-row.active {
  background: var(--wechat-green-soft);
  border-color: rgba(26, 173, 25, 0.14);
}

.knowledge-row-title {
  min-width: 0;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-row-meta {
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  color: var(--text-secondary);
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
}

.knowledge-row-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-row-preview {
  min-width: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.knowledge-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #fff;
}

.knowledge-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.knowledge-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.knowledge-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.knowledge-card pre {
  max-height: 44vh;
  margin: 0;
  padding: 12px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: var(--radius-md);
  background: #f7f8f7;
  border: 1px solid var(--border-light);
  font: inherit;
  line-height: 1.58;
}

.usage-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #f7f8f7;
}

.usage-summary div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.usage-summary span,
.usage-summary p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.usage-summary strong {
  font-size: 17px;
  font-weight: 650;
}

.usage-summary p {
  grid-column: 1 / -1;
}

.section {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.section:last-child {
  border-bottom: 0;
}

.section h2,
.section h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.form-grid,
.task-list,
.knowledge-list,
.group-list,
.employee-list {
  display: grid;
  gap: 10px;
}

.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.record {
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: #fff;
}

.record h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.record p {
  margin: 4px 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.record-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.status {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  background: #eef1ed;
}

.status.blocked,
.status.review_note,
.status.rejected {
  background: #f8e1df;
  color: #873329;
}

.status.completed,
.status.approved {
  background: #dff1e8;
  color: #20634e;
}

.status.pending {
  background: #f4ead7;
  color: #7a541f;
}

.empty {
  padding: 18px;
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 30;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: #172018;
  color: #fff;
  box-shadow: var(--shadow-soft);
}

@media (min-width: 1600px) {
  .app-shell {
    grid-template-columns: 68px 316px minmax(0, 1fr);
  }

  .messages {
    padding-left: 46px;
    padding-right: 46px;
  }

  .composer {
    padding-left: 28px;
    padding-right: 28px;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 56px minmax(220px, 34vw) minmax(0, 1fr);
  }

  .chat-header {
    padding: 0 16px;
  }

  .messages {
    padding: 18px;
  }

  .settings-overlay {
    padding: 10px;
  }

  .omnia-workflow-dialog {
    grid-template-rows: 72px minmax(0, 1fr) 68px;
  }

  .omnia-workflow-body {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .omnia-workflow-content {
    padding: 18px;
  }

  .omnia-workflow-facts {
    grid-template-columns: 1fr;
  }

  .settings-body {
    grid-template-columns: 1fr;
  }

  .settings-nav {
    grid-template-columns: repeat(3, 1fr);
    border-right: 0;
    border-bottom: 1px solid var(--border-light);
  }

  .employee-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(180px, 34%) minmax(0, 1fr);
  }

  .knowledge-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(200px, 38%) minmax(0, 1fr);
  }

  .employee-roster {
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--border-light);
  }

  .knowledge-roster {
    border-right: 0;
    border-bottom: 1px solid var(--border-light);
  }

  .two-cols {
    grid-template-columns: 1fr;
  }
}
