/* Manus-style chat shell. Light background, generous whitespace, single column. */
html,
body.x-home-body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: #fafafa;
}

* {
  box-sizing: border-box;
}

.x-home-body {
  overflow: hidden;
  color: #171717;
  font-family: var(--font-sans, Inter, "PingFang SC", "Microsoft YaHei", sans-serif);
  font-size: var(--fs-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  --x-ui-selected-bg: #e9e9eb;
  --x-ui-selected-bg-hover: #e2e2e5;
  --x-ui-selected-border: #ddddE2;
  --x-ui-selected-text: #18181b;
  --x-ui-scrollbar-thumb: #c7c7cc;
  --x-ui-scrollbar-thumb-hover: #a1a1aa;
  /* Design tokens 閳?妤傛ê瀹虫稉澶嬨€?+ 閸﹀棜顫楅崶娑欍€?+ 娑撹娓剧憴鎺炵礄娣囨繄鏆€ composer 18px 閸濅胶澧濈拠鍡楀焼閿?*/
  --x-ctrl-sm: 28px;       /* 表格行内 / 消息悬停操作 */
  --x-ctrl-md: 32px;       /* 工具栏 / 触发器 / 关闭按钮 */
  --x-ctrl-lg: 38px;       /* 主操作 / 快捷任务 / 确认按钮 */
  --x-r-sm: 6px;           /* 按钮 tag 菜单项 */
  --x-r-md: 8px;           /* 输入框 / 卡片内嵌按钮 / 表格 */
  --x-r-lg: 12px;          /* 卡片 / 菜单容器 / 表格容器 */
  --x-r-pill: 999px;       /* pill 触发器 / 头像 / 进度条 */
  --x-r-modal: 14px;       /* 模态框（含登录弹窗） */

  /* 一招清零：把全站旧的青绿品牌 token 在 X 首页命名空间下统一重定义为黑白灰，
     让 Agent 工作区里所有 var(--brand) / var(--brand-strong) 用法自动失去彩色。
     原始 design-system.css 的青绿值仅在登录页 / 未登录态才生效。 */
  --brand: #18181b;            /* 原 #0f766e 青绿 → 主黑 */
  --brand-strong: #18181b;     /* 原 #0b3b35 深青 → 主黑 */
  --brand-ink: #18181b;        /* 原 #075e54 → 主黑 */
  --brand-soft: #fafafa;       /* 原 #e8f8f5 浅青底 → 浅灰底 */
  --brand-line: #e5e5e7;       /* 原 #b7e7de 青边 → 标准灰边 */
  --brand-tint: #f4f4f5;       /* 原 #f2fffc → 浅灰 */
}

/* 閸忓彉闊╃紒鍡樼泊閸斻劍娼?閳?鐟曞棛娲?home body 閸愬懏澧嶉張澶婂讲濠婃艾濮╅崗鍐閿涘奔绗?Agent 瀹搞儰缍旈崠杞扮閼锋番鈧?*/
.x-home-body *::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.x-home-body *::-webkit-scrollbar-track {
  background: transparent;
}
.x-home-body *::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: var(--x-r-pill);
  background: var(--x-ui-scrollbar-thumb);
  background-clip: padding-box;
}
.x-home-body *::-webkit-scrollbar-thumb:hover {
  background: var(--x-ui-scrollbar-thumb-hover);
  background-clip: padding-box;
}
.x-home-body * {
  scrollbar-width: thin;
  scrollbar-color: var(--x-ui-scrollbar-thumb) transparent;
}

button,
input,
textarea {
  font: inherit;
}

.x-home {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  background: #fafafa;
}

/* Sidebar: takes the left grid column, internal scroll only when needed. */
.x-home-sidebar {
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 10px 10px;
  background: #f4f4f4;
  border-right: 1px solid #ececec;
  overflow-y: auto;
  overflow-x: hidden;
}

.x-home-sidebar-footer {
  margin-top: auto;
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #e6e6e8;
}

.x-home-sidebar-actions {
  width: 100%;
  display: grid;
  gap: 8px;
}

.x-home-sidebar-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px 10px;
  color: #18181b;
  text-decoration: none;
}

.x-home-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.x-home-brand-copy {
  min-width: 0;
  display: flex;
  align-items: center;
}

.x-home-brand-copy strong {
  font-size: var(--fs-lg);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.x-home-sidebar-nav {
  display: grid;
  gap: 2px;
}

.x-home-sidebar-item {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #404040;
  font-size: var(--fs-sm);
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.x-home-sidebar-item:hover {
  background: #ececec;
  color: #18181b;
}

.x-home-sidebar-item.is-active {
  background: #e6e6e6;
  color: #18181b;
  font-weight: 600;
}

.x-home-sidebar-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: inherit;
  flex: 0 0 auto;
}

.x-home-sidebar-logo-icon {
  width: 20px;
  height: 20px;
}

.x-home-sidebar-logo-icon .x-home-mark {
  width: 20px;
  height: 20px;
  border-radius: 6px;
}

.x-home-sidebar-section {
  display: grid;
  gap: 4px;
}

.x-home-sidebar-heading {
  padding: 8px 10px 4px;
  color: #8e8e93;
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.x-home-sidebar-history {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.x-home-history-search-wrap {
  padding: 6px 10px 4px;
}

.x-home-history-search {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 10px;
  border: 1px solid #e4e4e7;
  border-radius: var(--x-r-md);
  background: #f9f9fb;
  color: #18181b;
  font-size: var(--fs-xs);
  outline: none;
  transition: border-color 120ms ease, background 120ms ease;
}

.x-home-history-search::placeholder {
  color: #a1a1aa;
}

.x-home-history-search:focus {
  border-color: #a1a1aa;
  background: #ffffff;
}

.x-home-sidebar-history-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #d4d4d4 transparent;
}

.x-home-sidebar-history-list li {
  min-height: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  padding: 0 4px 0 10px;
  border-radius: 10px;
  color: #525252;
  font-size: var(--fs-sm);
  cursor: pointer;
}

.x-home-sidebar-history-list li:hover {
  background: #ececec;
  color: #18181b;
}

.x-home-sidebar-history-list li.is-active {
  background: #e6e6e6;
  color: #18181b;
  font-weight: 600;
}

.x-home-sidebar-history-list li.is-loading {
  position: relative;
}

.x-home-sidebar-history-list li.is-loading::after {
  content: "";
  position: absolute;
  right: 10px;
  width: 14px;
  height: 14px;
  border: 1.5px solid #d4d4d8;
  border-top-color: #18181b;
  border-radius: 999px;
  animation: x-home-history-spin 0.72s linear infinite;
}

.x-home-history-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.x-home-sidebar-history-list li.is-loading .x-home-history-title {
  padding-right: 22px;
}

.x-home-history-more {
  width: var(--x-ctrl-sm);
  height: var(--x-ctrl-sm);
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--x-r-sm);
  background: transparent;
  color: #71717a;
  cursor: pointer;
  opacity: 0;
  transition: opacity 120ms ease, background 120ms ease;
}

.x-home-sidebar-history-list li:hover .x-home-history-more,
.x-home-sidebar-history-list li.is-active .x-home-history-more {
  opacity: 1;
}

.x-home-history-more:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #18181b;
}

.x-home-history-more:disabled {
  opacity: 0 !important;
  pointer-events: none;
}

.x-home-history-menu {
  z-index: 60;
  min-width: 140px;
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid #e5e5e7;
  border-radius: var(--x-r-lg);
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.x-home-history-menu button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--x-r-sm);
  background: transparent;
  color: #18181b;
  font-size: var(--fs-sm);
  text-align: left;
  cursor: pointer;
}

.x-home-history-menu button:hover {
  background: #f4f4f5;
}

.x-home-history-menu button[data-action="delete"] {
  color: #b91c1c;
}

.x-home-history-menu button[data-action="delete"]:hover {
  background: #fef2f2;
}

.x-home-sidebar-history-empty {
  color: #a1a1aa !important;
  font-size: var(--fs-xs) !important;
  cursor: default !important;
  white-space: normal !important;
  line-height: 1.5;
  padding: 8px 10px !important;
  border-radius: 10px !important;
}

.x-home-sidebar-history-empty:hover {
  background: transparent !important;
  color: #a1a1aa !important;
}

.x-home-history-group-header {
  padding: 10px 10px 2px;
  font-size: var(--fs-2xs);
  font-weight: 600;
  color: #a1a1aa;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
  cursor: default;
}

.x-home-history-group-header:first-child {
  padding-top: 2px;
}

.x-home-agent-workspace {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  display: none;
  overflow: hidden;
  background: #f7f7f8;
}

.x-home-assets-workspace {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: #f7f7f8;
}

.x-home.is-agent-view .x-home-workspace,
.x-home.is-assets-view .x-home-workspace {
  display: none;
}

.x-home.is-agent-view .x-home-agent-workspace {
  display: block;
}

.x-home.is-assets-view .x-home-assets-workspace {
  display: flex;
}

/* Hide chat & agent when in assets view */
.x-home.is-assets-view .x-home-agent-workspace {
  display: none;
}

.mobile-nav-global {
  display: none;
}

.x-home-mobile-topbar {
  display: none;
}

.mobile-nav-agent[hidden],
.mobile-nav-global[hidden] {
  display: none !important;
}

.x-home-mobile-login[hidden],
.x-home-mobile-account[hidden] {
  display: none !important;
}

/* ─── Asset library page (P3) ──────────────────────────────────────── */
.x-home-assets-head {
  padding: 20px 28px 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.x-home-assets-head h1 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
}

.x-home-assets-head-sub {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
}

.x-home-assets-capacity {
  min-width: 200px;
  font-size: 13px;
  color: #4b5563;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.x-home-assets-capacity-bar {
  width: 200px;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.x-home-assets-capacity-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #18181b, #404040);
  transition: width 0.3s;
}

.x-home-assets-capacity.is-warn .x-home-assets-capacity-bar > span {
  background: #b91c1c;
}

.x-home-assets-toolbar {
  padding: 12px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

/* Secondary tab row (media type filter) */
.x-home-assets-media-tabs {
  padding: 8px 28px;
  display: flex;
  gap: 4px;
  background: #fafafa;
  border-bottom: 1px solid #e5e5e7;
}

.x-home-assets-media-tabs:empty {
  display: none;
}

.x-home-assets-media-tabs button {
  padding: 4px 12px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 999px;
  font-size: 12px;
  color: #52525b;
  cursor: pointer;
  line-height: 1.6;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.x-home-assets-media-tabs button:hover {
  background: #f4f4f5;
  color: #18181b;
}

.x-home-assets-media-tabs button.is-active {
  background: #ffffff;
  color: #18181b;
  border-color: #18181b;
  font-weight: 500;
}

.x-home-assets-tabs {
  display: flex;
  gap: 4px;
}

.x-home-assets-tabs button {
  padding: 6px 14px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.x-home-assets-tabs button:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.x-home-assets-tabs button.is-active {
  background: #1f2937;
  color: #fff;
}

.x-home-assets-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.x-home-assets-select {
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
}

.x-home-assets-employee-filter {
  min-width: 120px;
  display: inline-flex;
  align-items: center;
}

.x-home-assets-employee-filter .x-select {
  width: 100%;
}

.x-home-assets-refresh {
  width: 32px;
  height: 32px;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #6b7280;
  transition: background 0.15s, color 0.15s;
}

.x-home-assets-refresh:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.x-home-assets-body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  min-height: 0;
  overflow: hidden;
}

.x-home-assets-grid {
  padding: 20px 28px;
  overflow: visible;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  grid-auto-rows: max-content;
  gap: 16px;
  align-content: start;
  align-items: start;
}

.x-home-assets-empty,
.x-home-assets-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
  padding: 48px 16px;
}

.x-home-assets-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  display: flex;
  flex-direction: column;
  align-self: start;
}

.x-home-assets-card:hover {
  border-color: #a1a1aa;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.x-home-assets-card.is-active {
  border-color: #18181b;
  box-shadow: 0 0 0 2px rgba(24, 24, 27, 0.15);
}

.x-home-assets-card.is-checked {
  border-color: #18181b;
  box-shadow: 0 0 0 2px rgba(24, 24, 27, 0.18);
}

/* Checkbox overlay in top-right of every card */
.x-home-assets-check {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}

.x-home-assets-card:hover .x-home-assets-check,
.x-home-assets-card.is-checked .x-home-assets-check {
  opacity: 1;
}

.x-home-assets-check input {
  position: absolute;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.x-home-assets-check-box {
  width: 18px;
  height: 18px;
  border: 1.5px solid #d1d5db;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

.x-home-assets-check input:checked + .x-home-assets-check-box {
  background: #18181b;
  border-color: #18181b;
}

.x-home-assets-check input:checked + .x-home-assets-check-box::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

.x-home-assets-selection-bar {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  font-size: 13px;
  color: #171717;
  margin-right: 4px;
}

.x-home-assets-selection-bar[hidden] {
  display: none;
}

.x-home-assets-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 28px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.x-home-assets-pagination[hidden] {
  display: none;
}

.x-home-assets-pagination-summary {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
}

.x-home-assets-pagination-summary strong {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}

.x-home-assets-page-progress {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f4f4f5;
  color: #52525b;
  font-size: 11px;
  font-weight: 600;
}

.x-home-assets-pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.x-home-assets-pagination-controls.is-compact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.x-home-assets-page-btn {
  min-width: 34px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  color: #374151;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.x-home-assets-page-btn:hover:not(:disabled) {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #111827;
}

.x-home-assets-page-btn.is-active {
  background: #18181b;
  border-color: #18181b;
  color: #fff;
}

.x-home-assets-page-btn.is-current-indicator {
  min-width: 0;
  cursor: default;
  opacity: 1;
}

.x-home-assets-page-nav {
  min-width: 60px;
}

.x-home-assets-page-btn:disabled {
  cursor: default;
  opacity: 0.55;
}

.x-home-assets-page-ellipsis {
  min-width: 18px;
  text-align: center;
  color: #9ca3af;
  font-size: 12px;
}

.x-home-assets-sel-count strong {
  color: #18181b;
  margin: 0 2px;
  font-weight: 600;
}

.x-home-assets-sel-count {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  white-space: nowrap;
}

.x-home-assets-sel-hint {
  color: #71717a;
  font-size: 12px;
  white-space: nowrap;
}

.x-home-assets-sel-spacer {
  flex: 1;
  min-width: 24px;
}

.x-home-assets-selection-bar .x-home-assets-action {
  height: 32px;
  padding: 0 12px;
  white-space: nowrap;
}

/* Toolbar "全选" button — primary-style black solid per design 10.2 */
.x-home-assets-filters .x-home-assets-action#xHomeAssetsSelectAll {
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  background: #18181b;
  color: #ffffff;
  border-color: #18181b;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  flex: 0 0 auto;
}

.x-home-assets-filters .x-home-assets-action#xHomeAssetsSelectAll:hover {
  background: #27272a;
  border-color: #27272a;
  color: #ffffff;
}

/* Card needs relative positioning so the checkbox overlay anchors right */
.x-home-assets-card { position: relative; }

.x-home-assets-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.x-home-assets-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.x-home-assets-thumb-auth {
  all: unset;
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.x-home-assets-thumb-auth img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.x-home-assets-thumb > span:first-child,
.x-home-assets-thumb-fallback {
  font-size: 36px;
  color: #a1a1aa;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.x-home-assets-thumb-fallback[hidden] {
  display: none;
}

.x-home-assets-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  background: rgba(31, 41, 55, 0.85);
  color: #fff;
  font-weight: 500;
}

.x-home-assets-tag.is-generated {
  background: rgba(82, 82, 91, 0.85);
}

.x-home-assets-meta {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.x-home-assets-meta strong {
  font-size: 13px;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.x-home-assets-meta span {
  font-size: 11px;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.x-home-assets-meta-sub {
  color: #9ca3af !important;
}

.x-home-assets-detail {
  background: #fff;
  border-left: 1px solid #e5e7eb;
  padding: 12px 12px 18px;
  overflow: hidden;
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.x-home-assets-detail[hidden] {
  display: none !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.x-home-assets-detail-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.x-home-assets-detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: 0;
  font-size: 22px;
  color: #6b7280;
  cursor: pointer;
  line-height: 1;
}

.x-home-assets-detail-thumb {
  min-height: 0;
  flex: 1 1 auto;
  width: 100%;
  min-height: 180px;
  background: #f6f6f7;
  border: 1px solid #ececf0;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.x-home-assets-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}

.x-home-assets-detail-thumb span {
  font-size: 48px;
  color: #9ca3af;
}

.x-home-assets-detail-thumb.is-empty {
  margin-bottom: 0;
  border-style: dashed;
  background: #fafafa;
}

.x-home-assets-detail-thumb.is-empty span {
  width: 100%;
  height: 100%;
  display: block;
}

.x-home-assets-detail-thumb-auth {
  all: unset;
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}

.x-home-assets-detail h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  word-break: break-all;
  line-height: 1.35;
}

.x-home-assets-detail-head {
  display: flex;
  align-items: flex-start;
  flex: 0 0 auto;
}

.x-home-assets-detail-list {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 4px 10px;
  font-size: 11px;
  margin: 0;
  padding-top: 4px;
  border-top: 1px solid #f1f5f9;
}

.x-home-assets-detail-list dt {
  color: #94a3b8;
}

.x-home-assets-detail-list dd {
  margin: 0;
  color: #1f2937;
  word-break: break-all;
  line-height: 1.4;
}

.x-home-assets-detail-list code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 10px;
  color: #4b5563;
  background: #f3f4f6;
  padding: 1px 4px;
  border-radius: 3px;
}

.x-home-assets-detail-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 2px;
}

.x-home-assets-detail-empty {
  min-height: 100%;
  display: flex;
  align-items: flex-start;
}

.x-home-assets-action {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 6px;
  font-size: 12px;
  color: #1f2937;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s, border-color 0.15s;
}

.x-home-assets-action:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.x-home-assets-action.is-danger {
  color: #b91c1c;
  border-color: #fecaca;
}

.x-home-assets-action.is-danger:hover {
  background: #fef2f2;
  border-color: #b91c1c;
}
/* ─── /Asset library page ─────────────────────────────────────────── */

.x-home-agent-workspace .app-shell,
body.is-authenticated .x-home-agent-workspace .app-shell,
body.is-authenticated .x-home-agent-workspace .app-shell[data-mobile-view] {
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  height: 100% !important;
  height: 100dvh !important;
  min-height: 0 !important;
  max-height: none !important;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  gap: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  background: #f7f7f8 !important;
}

.x-home-agent-workspace .app-shell[hidden] {
  display: none !important;
}

.x-home-agent-workspace .app-shell[data-ready="false"] .workspace {
  visibility: hidden !important;
}

.x-home-agent-workspace .center-pane,
.x-home-agent-workspace .workspace,
body.is-authenticated .x-home-agent-workspace .center-pane,
body.is-authenticated .x-home-agent-workspace .workspace {
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
}

.x-home-agent-workspace .center-pane {
  border-radius: 0 !important;
  border-width: 0 1px 0 0 !important;
  box-shadow: none !important;
}

.x-home-agent-workspace .workspace {
  padding: 18px !important;
  overflow: hidden !important;
}

.x-home-agent-workspace .console-sidebar-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  padding: 14px 6px 6px !important;
  overflow: hidden !important;
}

.x-home-agent-workspace .mobile-nav {
  z-index: 30;
}

.x-home-agent-workspace .center-pane {
  background: #f7f7f8 !important;
}

.x-home-agent-workspace .center-pane,
.x-home-agent-workspace .workspace,
.x-home-agent-workspace .workspace-body,
.x-home-agent-workspace .employee-list,
.x-home-agent-workspace .config-form-scroll,
.x-home-agent-workspace .tab-panel-wrap,
.x-home-agent-workspace #taskList,
.x-home-agent-workspace .json-box.scroll,
.x-home-agent-workspace .mono.scroll,
.x-home-agent-workspace .asset-center-panel-body,
.x-home-quick-actions {
  scrollbar-width: thin !important;
  scrollbar-color: var(--x-ui-scrollbar-thumb) transparent !important;
}

.x-home-agent-workspace .center-pane::-webkit-scrollbar,
.x-home-agent-workspace .workspace::-webkit-scrollbar,
.x-home-agent-workspace .workspace-body::-webkit-scrollbar,
.x-home-agent-workspace .employee-list::-webkit-scrollbar,
.x-home-agent-workspace .config-form-scroll::-webkit-scrollbar,
.x-home-agent-workspace .tab-panel-wrap::-webkit-scrollbar,
.x-home-agent-workspace #taskList::-webkit-scrollbar,
.x-home-agent-workspace .json-box.scroll::-webkit-scrollbar,
.x-home-agent-workspace .mono.scroll::-webkit-scrollbar,
.x-home-agent-workspace .asset-center-panel-body::-webkit-scrollbar,
.x-home-quick-actions::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.x-home-agent-workspace .center-pane::-webkit-scrollbar-track,
.x-home-agent-workspace .workspace::-webkit-scrollbar-track,
.x-home-agent-workspace .workspace-body::-webkit-scrollbar-track,
.x-home-agent-workspace .employee-list::-webkit-scrollbar-track,
.x-home-agent-workspace .config-form-scroll::-webkit-scrollbar-track,
.x-home-agent-workspace .tab-panel-wrap::-webkit-scrollbar-track,
.x-home-agent-workspace #taskList::-webkit-scrollbar-track,
.x-home-agent-workspace .json-box.scroll::-webkit-scrollbar-track,
.x-home-agent-workspace .mono.scroll::-webkit-scrollbar-track,
.x-home-agent-workspace .asset-center-panel-body::-webkit-scrollbar-track,
.x-home-quick-actions::-webkit-scrollbar-track {
  background: transparent;
}

.x-home-agent-workspace .center-pane::-webkit-scrollbar-track-piece,
.x-home-agent-workspace .workspace::-webkit-scrollbar-track-piece,
.x-home-agent-workspace .workspace-body::-webkit-scrollbar-track-piece,
.x-home-agent-workspace .employee-list::-webkit-scrollbar-track-piece,
.x-home-agent-workspace .config-form-scroll::-webkit-scrollbar-track-piece,
.x-home-agent-workspace .tab-panel-wrap::-webkit-scrollbar-track-piece,
.x-home-agent-workspace #taskList::-webkit-scrollbar-track-piece,
.x-home-agent-workspace .json-box.scroll::-webkit-scrollbar-track-piece,
.x-home-agent-workspace .mono.scroll::-webkit-scrollbar-track-piece,
.x-home-agent-workspace .asset-center-panel-body::-webkit-scrollbar-track-piece,
.x-home-quick-actions::-webkit-scrollbar-track-piece {
  background: transparent;
}

.x-home-agent-workspace .center-pane::-webkit-scrollbar-thumb,
.x-home-agent-workspace .workspace::-webkit-scrollbar-thumb,
.x-home-agent-workspace .workspace-body::-webkit-scrollbar-thumb,
.x-home-agent-workspace .employee-list::-webkit-scrollbar-thumb,
.x-home-agent-workspace .config-form-scroll::-webkit-scrollbar-thumb,
.x-home-agent-workspace .tab-panel-wrap::-webkit-scrollbar-thumb,
.x-home-agent-workspace #taskList::-webkit-scrollbar-thumb,
.x-home-agent-workspace .json-box.scroll::-webkit-scrollbar-thumb,
.x-home-agent-workspace .mono.scroll::-webkit-scrollbar-thumb,
.x-home-agent-workspace .asset-center-panel-body::-webkit-scrollbar-thumb,
.x-home-quick-actions::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--x-ui-scrollbar-thumb);
  background-clip: padding-box;
}

.x-home-agent-workspace .center-pane::-webkit-scrollbar-button,
.x-home-agent-workspace .workspace::-webkit-scrollbar-button,
.x-home-agent-workspace .workspace-body::-webkit-scrollbar-button,
.x-home-agent-workspace .employee-list::-webkit-scrollbar-button,
.x-home-agent-workspace .config-form-scroll::-webkit-scrollbar-button,
.x-home-agent-workspace .tab-panel-wrap::-webkit-scrollbar-button,
.x-home-agent-workspace #taskList::-webkit-scrollbar-button,
.x-home-agent-workspace .json-box.scroll::-webkit-scrollbar-button,
.x-home-agent-workspace .mono.scroll::-webkit-scrollbar-button,
.x-home-agent-workspace .asset-center-panel-body::-webkit-scrollbar-button,
.x-home-quick-actions::-webkit-scrollbar-button {
  width: 0;
  height: 0;
  display: none;
  background: transparent;
}

.x-home-agent-workspace .center-pane::-webkit-scrollbar-button:single-button,
.x-home-agent-workspace .workspace::-webkit-scrollbar-button:single-button,
.x-home-agent-workspace .workspace-body::-webkit-scrollbar-button:single-button,
.x-home-agent-workspace .employee-list::-webkit-scrollbar-button:single-button,
.x-home-agent-workspace .config-form-scroll::-webkit-scrollbar-button:single-button,
.x-home-agent-workspace .tab-panel-wrap::-webkit-scrollbar-button:single-button,
.x-home-agent-workspace #taskList::-webkit-scrollbar-button:single-button,
.x-home-agent-workspace .json-box.scroll::-webkit-scrollbar-button:single-button,
.x-home-agent-workspace .mono.scroll::-webkit-scrollbar-button:single-button,
.x-home-agent-workspace .asset-center-panel-body::-webkit-scrollbar-button:single-button,
.x-home-quick-actions::-webkit-scrollbar-button:single-button {
  width: 0;
  height: 0;
  display: none;
}

.x-home-agent-workspace .center-pane::-webkit-scrollbar-corner,
.x-home-agent-workspace .workspace::-webkit-scrollbar-corner,
.x-home-agent-workspace .workspace-body::-webkit-scrollbar-corner,
.x-home-agent-workspace .employee-list::-webkit-scrollbar-corner,
.x-home-agent-workspace .config-form-scroll::-webkit-scrollbar-corner,
.x-home-agent-workspace .tab-panel-wrap::-webkit-scrollbar-corner,
.x-home-agent-workspace #taskList::-webkit-scrollbar-corner,
.x-home-agent-workspace .json-box.scroll::-webkit-scrollbar-corner,
.x-home-agent-workspace .mono.scroll::-webkit-scrollbar-corner,
.x-home-agent-workspace .asset-center-panel-body::-webkit-scrollbar-corner,
.x-home-quick-actions::-webkit-scrollbar-corner {
  background: transparent;
}

.x-home-agent-workspace .center-pane:hover::-webkit-scrollbar-thumb,
.x-home-agent-workspace .workspace:hover::-webkit-scrollbar-thumb,
.x-home-agent-workspace .workspace-body:hover::-webkit-scrollbar-thumb,
.x-home-agent-workspace .employee-list:hover::-webkit-scrollbar-thumb,
.x-home-agent-workspace .config-form-scroll:hover::-webkit-scrollbar-thumb,
.x-home-agent-workspace .tab-panel-wrap:hover::-webkit-scrollbar-thumb,
.x-home-agent-workspace #taskList:hover::-webkit-scrollbar-thumb,
.x-home-agent-workspace .json-box.scroll:hover::-webkit-scrollbar-thumb,
.x-home-agent-workspace .mono.scroll:hover::-webkit-scrollbar-thumb,
.x-home-agent-workspace .asset-center-panel-body:hover::-webkit-scrollbar-thumb,
.x-home-quick-actions:hover::-webkit-scrollbar-thumb {
  background: var(--x-ui-scrollbar-thumb-hover);
  background-clip: padding-box;
}

.x-home-agent-workspace .center-pane .center-card {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 14px !important;
}

.x-home-agent-workspace .employee-registry {
  padding: 0 4px 6px !important;
}

.x-home-agent-workspace .overview-card {
  margin-top: 14px !important;
  padding-top: 14px !important;
  border-top: 1px solid #ececec !important;
}

.x-home-agent-workspace .employee-list {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 6px !important;
  padding: 0 2px 4px 0 !important;
}

.x-home-agent-workspace .employee-card.simple {
  min-height: 0 !important;
  display: block !important;
  padding: 7px 8px 7px 10px !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  text-align: left !important;
  box-shadow: none !important;
  transition: background 140ms ease, border-color 140ms ease !important;
}
.x-home-agent-workspace .employee-card.simple::before {
  border-radius: 8px 0 0 8px !important;
}

.x-home-agent-workspace .employee-card.simple:hover {
  background: #efeff1 !important;
  border-color: transparent !important;
}

.x-home-agent-workspace .employee-card.simple.selected {
  background: var(--x-ui-selected-bg) !important;
  border-color: transparent !important;
}

.x-home-agent-workspace .employee-row-index {
  display: none;
}

.x-home-agent-workspace .employee-row-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.x-home-agent-workspace .employee-row-title {
  min-width: 0;
}

.x-home-agent-workspace .employee-row-title strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #18181b;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.25;
}

.x-home-agent-workspace .employee-row-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin-top: 1px;
}
.x-home-agent-workspace .employee-row-role {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #a1a1aa;
  font-size: 11px;
  line-height: 1.3;
}

.x-home-agent-workspace .employee-row-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.x-home-agent-workspace .employee-row-status i {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
}

.x-home-agent-workspace .employee-row-status.status-running,
.x-home-agent-workspace .employee-row-status.status-success {
  background: #eef6f0 !important;
  color: #2f6f44 !important;
}

.x-home-agent-workspace .employee-row-status.status-failed,
.x-home-agent-workspace .employee-row-status.status-stopped {
  background: #fbeff1 !important;
  color: #a14654 !important;
}

.x-home-agent-workspace .employee-row-status.status-idle,
.x-home-agent-workspace .employee-row-status.status-stopping,
.x-home-agent-workspace .employee-row-status.status-partial_success,
.x-home-agent-workspace .employee-row-status.status-unknown {
  background: #f3f4f6 !important;
  color: #6b7280 !important;
}

.x-home-agent-workspace .employee-card.simple.selected .employee-row-title strong,
.x-home-agent-workspace .employee-card.simple.selected .employee-row-role,
.x-home-agent-workspace .employee-card.simple.selected .employee-row-status {
  color: var(--x-ui-selected-text) !important;
}

.x-home-agent-workspace .employee-card.simple.selected .employee-row-status.status-running,
.x-home-agent-workspace .employee-card.simple.selected .employee-row-status.status-success {
  background: #edf4ef !important;
  color: #2f6f44 !important;
}

.x-home-agent-workspace .employee-card.simple.selected .employee-row-status.status-failed,
.x-home-agent-workspace .employee-card.simple.selected .employee-row-status.status-stopped {
  background: #f8ecee !important;
  color: #a14654 !important;
}

.x-home-agent-workspace .overview-card .stats-grid {
  gap: 8px !important;
}

.x-home-agent-workspace .overview-card .stat-chip {
  min-height: 58px !important;
  padding: 10px 12px !important;
  border-radius: 8px !important;
  border: 0 !important;
  background: #f1f1f2 !important;
}

.x-home-agent-workspace .workspace-head {
  flex: 0 0 auto !important;
  position: relative !important;
  z-index: 14 !important;
  min-height: auto !important;
  padding: 4px 0 18px !important;
  align-items: center !important;
  border: 0 !important;
  border-bottom: 1px solid #ececec !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.is-authenticated .x-home-agent-workspace .workspace-head {
  background: #ffffff !important;
  background-image: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.x-home-agent-workspace .workspace-head::before,
.x-home-agent-workspace .workspace-head::after {
  display: none !important;
  background: none !important;
  content: none !important;
}

.x-home-agent-workspace .hero-avatar {
  width: 48px !important;
  height: 48px !important;
  border-radius: 12px !important;
  font-size: var(--fs-2xl) !important;
  background: #18181b !important;
  color: #ffffff !important;
}

.x-home-agent-workspace .workspace-title h2 {
  font-size: var(--fs-2xl) !important;
  line-height: 1.08 !important;
}

.x-home-agent-workspace .head-action-panel {
  gap: 10px !important;
}

.x-home-agent-workspace .head-action-panel button {
  min-height: 36px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.x-home-agent-workspace .head-action-panel .primary:hover,
.x-home-agent-workspace .task-filter-chips .filter-chip.active:hover,
.x-home-agent-workspace .filter-chips .filter-chip.active:hover {
  background: var(--x-ui-selected-bg-hover) !important;
}

.x-home-agent-workspace .head-action-panel .primary {
  background: var(--x-ui-selected-bg) !important;
  border-color: transparent !important;
  color: var(--x-ui-selected-text) !important;
  box-shadow: none !important;
}

.x-home-agent-workspace .head-action-panel .secondary {
  background: #ffffff !important;
  border-color: #d4d4d8 !important;
  color: #111113 !important;
}

.x-home-agent-workspace .head-action-panel .danger {
  background: #ffffff !important;
  border-color: #e7d6d8 !important;
  color: #a14654 !important;
}

.x-home-agent-workspace .summary-grid {
  display: block !important;
}

.x-home-agent-workspace .agent-overview-stack {
  display: grid;
  gap: 12px;
}

.x-home-agent-workspace .agent-run-card,
.x-home-agent-workspace .agent-metric-strip,
.x-home-agent-workspace .agent-context-strip {
  border: 0;
  border-radius: 10px;
  background: #f7f7f8;
  box-shadow: none;
}

.x-home-agent-workspace .agent-run-card {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
}

.x-home-agent-workspace .agent-run-card-head,
.x-home-agent-workspace .agent-run-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #71717a;
  font-size: var(--fs-xs);
  font-weight: 600;
}

.x-home-agent-workspace .agent-run-focus {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
}

.x-home-agent-workspace .agent-run-label {
  margin-bottom: 4px;
  color: #71717a;
  font-size: var(--fs-xs);
  font-weight: 600;
}

.x-home-agent-workspace .agent-run-focus h3 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #111113;
  font-size: var(--fs-xl);
  line-height: 1.22;
}

.x-home-agent-workspace .agent-run-progress {
  color: #111113;
  font-size: var(--fs-2xl);
  font-weight: 700;
  line-height: 1;
}

.x-home-agent-workspace .agent-run-rail {
  height: 7px !important;
  border-radius: 999px !important;
  background: #e4e4e7 !important;
}

.x-home-agent-workspace .agent-run-rail span {
  background: #18181b !important;
}

.x-home-agent-workspace .agent-metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  background: #f7f7f8;
}

.x-home-agent-workspace .agent-metric-strip .metric-card {
  min-height: 70px !important;
  padding: 12px 14px !important;
  border-width: 0 1px 0 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  border-color: #e7e7ea !important;
}

.x-home-agent-workspace .agent-metric-strip .metric-card:last-child {
  border-right: 0 !important;
}

.x-home-agent-workspace .agent-context-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  background: #f7f7f8;
}

.x-home-agent-workspace .agent-context-strip .summary-context-row {
  min-height: 64px !important;
  padding: 12px 14px !important;
  border-width: 0 1px 0 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  border-color: #e7e7ea !important;
}

.x-home-agent-workspace .agent-context-strip .summary-context-row:last-child {
  border-right: 0 !important;
}

.x-home-agent-workspace .workspace-body > .tab-bar {
  flex: 0 0 auto !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 16 !important;
  --active-tab-left: 14px;
  --active-tab-width: 48px;
  --active-tab-opacity: 1;
  margin: 0 !important;
  min-height: 56px !important;
  height: 56px !important;
  align-items: stretch !important;
  padding: 0 !important;
  border-bottom: 1px solid #ececec !important;
  background: #f5f5f5 !important;
}

.x-home-agent-workspace .workspace-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.x-home-agent-workspace .tab-panel-wrap {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.x-home-agent-workspace .tab-panel-wrap > .tab-panel {
  min-height: 100% !important;
}

.x-home-agent-workspace .workspace-body > .tab-bar::after {
  content: "" !important;
  position: absolute !important;
  left: var(--active-tab-left) !important;
  bottom: 0 !important;
  width: var(--active-tab-width) !important;
  height: 2px !important;
  background: #18181b !important;
  opacity: var(--active-tab-opacity) !important;
  pointer-events: none !important;
}

.x-home-agent-workspace .workspace-body > .tab-bar .tab-button {
  position: relative !important;
  align-items: center !important;
  min-width: 0 !important;
  min-height: 56px !important;
  height: 56px !important;
  padding: 0 14px !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  outline: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.x-home-agent-workspace .workspace-body > .tab-bar .tab-button:hover {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #111113 !important;
}

.x-home-agent-workspace .workspace-body > .tab-bar .tab-button.active {
  border-color: transparent !important;
  border-bottom-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #111113 !important;
}

.x-home-agent-workspace .workspace-body > .tab-bar .tab-button::after {
  display: none !important;
  content: none !important;
}

.x-home-agent-workspace .workspace-body > .tab-bar .tab-button.active::after {
  display: none !important;
  content: none !important;
}



.x-home-agent-workspace .task-center-toolbar {
  margin: 0 0 12px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.x-home-agent-workspace .task-search-box input {
  min-height: 38px !important;
  border: 1px solid #e4e4e7 !important;
  border-radius: 8px !important;
  background: #f7f7f8 !important;
  box-shadow: none !important;
}

.x-home-agent-workspace .task-filter-chips {
  gap: 8px !important;
}

.x-home-agent-workspace .task-filter-chips .filter-chip {
  min-height: 34px !important;
  border-radius: 8px !important;
  border-color: #d4d4d8 !important;
  background: #ffffff !important;
  color: #111113 !important;
}

.x-home-agent-workspace .task-filter-chips .filter-chip.active {
  background: var(--x-ui-selected-bg) !important;
  border-color: transparent !important;
  color: var(--x-ui-selected-text) !important;
}

.x-home-agent-workspace .filter-chips .filter-chip.active {
  background: var(--x-ui-selected-bg) !important;
  border-color: transparent !important;
  color: var(--x-ui-selected-text) !important;
}

.x-home-agent-workspace #taskList {
  gap: 10px !important;
}

.x-home-agent-workspace .task-item {
  padding: 16px 16px !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  background: #f7f7f8 !important;
  box-shadow: none !important;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease !important;
}

.x-home-agent-workspace .task-item:hover {
  background: #f1f1f2 !important;
}

.x-home-agent-workspace .task-item.selected {
  border-color: transparent !important;
  background: var(--x-ui-selected-bg) !important;
  box-shadow: inset 0 0 0 1px var(--x-ui-selected-border) !important;
}

.x-home-agent-workspace .task-item .badge {
  border-radius: 6px !important;
  border-color: #e4e4e7 !important;
  background: #fafafa !important;
  color: #52525b !important;
}

.x-home-agent-workspace .task-item.selected .badge {
  border-color: transparent !important;
  background: #ffffff !important;
  color: var(--x-ui-selected-text) !important;
}

.x-home-agent-workspace .panel-head {
  margin-bottom: 10px !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="tasks"] .panel-head,
.x-home-agent-workspace .tab-panel[data-tab-panel="snapshot"] .panel-head,
.x-home-agent-workspace .tab-panel[data-tab-panel="logs"] .panel-head,
.x-home-agent-workspace .tab-panel[data-tab-panel="assets"] .asset-center-head {
  padding-bottom: 8px !important;
  border-bottom: 1px solid #ececec !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-shell,
.x-home-agent-workspace .tab-panel[data-tab-panel="assets"] .asset-center-shell,
.x-home-agent-workspace .tab-panel[data-tab-panel="snapshot"] .json-box,
.x-home-agent-workspace .tab-panel[data-tab-panel="logs"] .mono {
  border: 0 !important;
  border-radius: 10px !important;
  background: #f7f7f8 !important;
  box-shadow: none !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="snapshot"] .json-box {
  white-space: normal !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="snapshot"] .snapshot-shell pre {
  white-space: pre-wrap !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-actions {
  border-top: 1px solid #ececec !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  background: transparent !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-actions button {
  border: 1px solid #e4e4e7 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #111113 !important;
  box-shadow: none !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-actions button:first-child,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-actions .primary {
  border-color: transparent !important;
  background: var(--x-ui-selected-bg) !important;
  color: var(--x-ui-selected-text) !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-actions button:hover {
  background: #f4f4f5 !important;
  border-color: #d4d4d8 !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-actions button:first-child:hover,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-actions .primary:hover {
  border-color: transparent !important;
  background: var(--x-ui-selected-bg-hover) !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-form-scroll {
  padding: 0 0 6px !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-grid,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-section-grid,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-managed-grid {
  gap: 12px !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-grid > .config-section:first-child,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-grid > .prompt-library-box:first-child,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-grid > .date-range-field:first-child,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-grid > .field:first-child {
  margin-top: 0 !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-section,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .prompt-library-box,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-managed-block,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-managed-kpi,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-managed-card,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-asset-log-row,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .prompt-library-section,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .date-range-field {
  border: 0 !important;
  border-radius: 10px !important;
  background: #f7f7f8 !important;
  background-image: none !important;
  box-shadow: none !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-section {
  gap: 14px !important;
  padding: 16px !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-section-head,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .prompt-workspace-head {
  padding-bottom: 10px !important;
  border-bottom: 1px solid #ececec !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-section-head p {
  color: #71717a !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-field-card,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .field.field-type-textarea,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .prompt-workspace-editor,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .path-input-row {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-field-card:focus-within {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .field-head label,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .prompt-library-section label {
  color: #111113 !important;
  font-size: var(--fs-sm) !important;
  font-weight: 700 !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .field-required {
  border: 0 !important;
  background: #ededf0 !important;
  color: #52525b !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] input,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] select,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .field input,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .field select,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .field .x-select [data-x-select-trigger],
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .prompt-library-row input,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .prompt-library-row select,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .path-input-row input {
  height: 35px !important;
  min-height: 35px !important;
  border: 1px solid #e4e4e7 !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  background-image: none !important;
  box-shadow: none !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] textarea,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .field textarea,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .prompt-workspace-editor textarea {
  min-height: 136px !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .field .x-select {
  min-height: 35px !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] input:hover,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] select:hover,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] textarea:hover,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .field input:hover,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .field select:hover,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .field textarea:hover,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .field .x-select [data-x-select-trigger]:hover,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .prompt-library-row input:hover,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .prompt-library-row select:hover,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .prompt-workspace-editor textarea:hover,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .path-input-row input:hover {
  border-color: #d4d4d8 !important;
  background: #ffffff !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] input:focus,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] select:focus,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] textarea:focus,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .field input:focus,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .field select:focus,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .field textarea:focus,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .field .x-select.is-open [data-x-select-trigger],
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .field .x-select [data-x-select-trigger]:focus-visible,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .prompt-library-row input:focus,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .prompt-library-row select:focus,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .prompt-workspace-editor textarea:focus,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .path-input-row input:focus {
  border-color: #d4d4d8 !important;
  box-shadow: 0 0 0 3px rgba(228, 228, 231, 0.9) !important;
  outline: none !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .prompt-workspace-editor textarea {
  min-height: 136px !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .prompt-library-row button,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .path-action-button,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .artifact-link,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .artifact-link-secondary,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-managed-actions button {
  border: 1px solid #e4e4e7 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #111113 !important;
  box-shadow: none !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .prompt-library-row button:hover,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .path-action-button:hover,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .artifact-link:hover,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .artifact-link-secondary:hover,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-managed-actions button:hover {
  background: #f4f4f5 !important;
  border-color: #d4d4d8 !important;
  color: #111113 !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] [data-config-section="employee-prompt-library"] .prompt-library-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  gap: 10px !important;
  align-items: center !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] [data-config-section="employee-prompt-library"] .prompt-library-row:first-child {
  grid-template-columns: minmax(0, 1fr) auto !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] [data-prompt-library-panel] .config-managed-note {
  margin-top: 10px !important;
  padding: 12px 14px !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  border: 1px solid #e4e4e7 !important;
  color: #3f3f46 !important;
  line-height: 1.6 !important;
  white-space: pre-wrap !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] [data-prompt-library-panel] .x-select {
  width: 100% !important;
}

.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-managed-meta span,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .soft-chip,
.x-home-agent-workspace .tab-panel[data-tab-panel="config"] .path-selected-name {
  border: 0 !important;
  background: #ededf0 !important;
  color: #52525b !important;
}

.x-home-mark {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 6px;
  overflow: hidden;
  background: transparent url("../assets/xenlion-logo.png?v=20260509-logo-restore") no-repeat center / contain;
}

.x-home-mark-sm {
  width: 22px;
  height: 22px;
}

.x-home-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.x-home-sidebar-actions {
  display: grid;
  align-items: stretch;
  gap: 8px;
}

.x-home-btn[hidden],
.x-home-account[hidden] {
  display: none !important;
}

.x-home-btn {
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  color: #171717;
  background: #ffffff;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 140ms ease, border-color 140ms ease;
}

.x-home-btn:hover {
  background: #f4f4f5;
  border-color: #d4d4d4;
}

.x-home-btn-ghost {
  border-color: transparent;
  background: var(--x-ui-selected-bg);
  color: var(--x-ui-selected-text);
}

.x-home-btn-ghost:hover {
  border-color: transparent;
  background: var(--x-ui-selected-bg-hover);
}

.x-home-sidebar-login {
  width: 100%;
  min-height: 40px;
  justify-content: flex-start;
  padding: 0 12px;
  border-radius: 10px;
}

.x-home-account {
  position: relative;
  display: inline-flex;
}

.x-home-sidebar-account {
  width: 100%;
  display: block;
}

.x-home-account-trigger {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #18181b;
  color: #ffffff;
  cursor: pointer;
  transition: box-shadow 140ms ease, border-color 140ms ease;
}

.x-home-sidebar-account-trigger {
  width: 100%;
  height: auto;
  min-height: 56px;
  grid-template-columns: 34px 14px;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #e5e5e7;
  border-radius: 12px;
  background: #ffffff;
  color: #18181b;
  place-items: initial;
  align-items: center;
  box-shadow: none;
}

.x-home-account-trigger:hover {
  border-color: #d4d4d4;
  background: #fafafa;
}

.x-home-sidebar-account.menu-open .x-home-sidebar-account-trigger,
.x-home-sidebar-account:focus-within .x-home-sidebar-account-trigger {
  border-color: transparent;
  background: var(--x-ui-selected-bg);
}

.x-home-account-avatar {
  font-size: var(--fs-sm);
  font-weight: 700;
}

.x-home-sidebar-account-trigger .x-home-account-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #18181b;
  color: #ffffff;
  font-size: var(--fs-sm);
}

.x-home-sidebar-account-caret {
  color: #71717a;
}

.x-home-account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: 264px;
  display: flex;
  flex-direction: column;
  padding: 8px;
  border: 1px solid #e5e5e7;
  border-radius: var(--x-r-lg);
  background: #ffffff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.06);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 150ms ease, transform 150ms ease;
}

.x-home-sidebar-account .x-home-account-menu {
  top: auto;
  right: 0;
  bottom: calc(100% + 8px);
  left: 0;
  width: auto;
  transform: translateY(6px) scale(0.98);
  transform-origin: bottom left;
}

.x-home-account.menu-open .x-home-account-menu,
.x-home-account:focus-within .x-home-account-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.x-home-mobile-account-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(6px);
}

.x-home-mobile-account-sheet {
  width: min(100%, 420px);
  display: grid;
  gap: 14px;
  padding: 18px 16px 16px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 -18px 40px rgba(15, 23, 42, 0.18);
}

.x-home-mobile-account-sheet-close {
  justify-self: end;
  width: 34px;
  height: 34px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-size: 20px;
  line-height: 1;
}

.x-home-mobile-account-sheet-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.x-home-mobile-account-sheet-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #18181b;
  color: #ffffff;
  font-weight: 700;
}

.x-home-mobile-account-sheet-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.x-home-mobile-account-sheet-copy strong {
  color: #111827;
  font-size: 15px;
}

.x-home-mobile-account-sheet-copy span {
  color: #6b7280;
  font-size: 12px;
}

.x-home-mobile-account-sheet-cost {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: #f8fafc;
}

.x-home-mobile-account-sheet-cost div {
  display: grid;
  gap: 4px;
}

.x-home-mobile-account-sheet-cost span {
  color: #64748b;
  font-size: 11px;
}

.x-home-mobile-account-sheet-cost strong {
  color: #0f172a;
  font-size: 14px;
}

.x-home-mobile-account-sheet-actions {
  display: grid;
  gap: 10px;
}

.x-home-mobile-account-sheet-actions button {
  min-height: 46px;
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  padding: 0 14px;
}

.x-home-mobile-account-sheet-actions button.is-danger {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff5f5;
}

/* Profile header */
.x-home-acct-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
}

.x-home-acct-avatar-lg {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #18181b;
  color: #ffffff;
  font-size: var(--fs-md);
  font-weight: 700;
  user-select: none;
}

.x-home-acct-profile-info {
  min-width: 0;
  display: flex;
  align-items: center;
}

.x-home-acct-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: #18181b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Separator */
.x-home-acct-sep {
  height: 1px;
  margin: 2px 0;
  background: #f0f0f0;
}

.x-home-acct-cost {
  padding: 8px 14px 6px;
  display: grid;
  gap: 4px;
}

.x-home-acct-cost-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--fs-xs);
  color: #71717a;
}

.x-home-acct-cost-row strong {
  color: #18181b;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Menu rows */
.x-home-acct-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #18181b;
  font-size: var(--fs-sm);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 100ms ease;
}

.x-home-acct-row:hover {
  background: #f4f4f5;
}

.x-home-acct-icon {
  flex: 0 0 auto;
  color: #71717a;
}

.x-home-acct-logout {
  color: #dc2626;
}

.x-home-acct-logout .x-home-acct-icon {
  color: #dc2626;
}

.x-home-acct-logout:hover {
  background: #fef2f2;
}

.x-home-workspace {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 24px 28px;
  overflow: hidden;
}

.x-home-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 4px;
}

.x-home-title {
  margin: 0;
  color: #18181b;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: 0.005em;
}

/* Thread occupies full main-area width. Scrollbar is fully hidden (still scrollable). */
.x-home-thread {
  width: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 24px 0 16px;
  overflow-y: auto;
  /* Firefox */
  scrollbar-width: none;
  /* IE / old Edge */
  -ms-overflow-style: none;
}

/* Webkit (Chrome / Edge / Safari): hide the scrollbar entirely. */
.x-home-thread::-webkit-scrollbar,
.x-home-sidebar::-webkit-scrollbar,
.x-home-sidebar-history-list::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.x-home-sidebar,
.x-home-sidebar-history-list {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.x-home-mobile-history {
  display: none;
}

@media (min-width: 768px) {
  .x-home-mobile-history {
    display: none !important;
  }
}

/* Chat mode: stay flex-column but flip to flex-start so thread fills the main area
   while composer drops to the bottom. Thread fades in as it appears. */
.x-home.is-chatting .x-home-workspace {
  justify-content: flex-start;
  gap: 0;
  padding: 0 0 16px;
}

.x-home.is-chatting .x-home-welcome {
  display: none;
}

.x-home.is-chatting .x-home-thread {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  animation: x-home-thread-fade 220ms ease-out both;
}

@keyframes x-home-thread-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Generic message wrapper. Capped to 760px and centered in the wider thread. */
.x-home-message {
  width: min(760px, calc(100% - 48px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #18181b;
}

/* User: right-aligned beige bubble, no avatar. */
.x-home-message-user {
  align-items: flex-end;
}

.x-home-message-user p {
  max-width: min(520px, 70vw);
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: #ffffff;
  color: #18181b;
  font-size: var(--fs-md);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.x-home-user-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  max-width: min(520px, 70vw);
}
.x-home-user-attachment-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.08);
  display: block;
}

/* Assistant: left-aligned, no bubble. Header row + plain text body. */
.x-home-message-assistant {
  align-items: flex-start;
}

.x-home-message-head {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #404040;
}

.x-home-message-head .x-home-message-mark {
  width: 45px;
  height: 45px;
  border-radius: 10px;
}

.x-home-message-head strong {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: #18181b;
  letter-spacing: 0.01em;
}

.x-home-message-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  background: #ffffff;
  color: #6b7280;
  font-size: var(--fs-2xs);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.x-home-message-assistant p {
  margin: 0;
  padding: 0;
  color: #18181b;
  font-size: var(--fs-md);
  line-height: 1.7;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.x-home-message-loading {
  opacity: 0.98;
}

.x-home-session-loading-card {
  width: min(520px, 100%);
  display: grid;
  gap: 10px;
  padding: 8px 0 0;
}

.x-home-session-loading-title {
  color: #18181b;
  font-size: var(--fs-md);
  font-weight: 500;
  line-height: 1.45;
}

.x-home-session-loading-subtitle {
  color: #71717a;
  font-size: var(--fs-sm);
  line-height: 1.55;
}

.x-home-session-loading-lines {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.x-home-session-loading-line {
  display: block;
  width: min(100%, 360px);
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #efefef 0%, #f7f7f8 48%, #efefef 100%);
  background-size: 220% 100%;
  animation: x-home-loading-shimmer 1.2s linear infinite;
}

.x-home-session-loading-line.is-wide {
  width: min(100%, 420px);
}

.x-home-session-loading-line.is-short {
  width: min(100%, 240px);
}

.x-home-message-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.x-home-message:hover .x-home-message-meta,
.x-home-message:focus-within .x-home-message-meta {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.x-home-message-meta-user {
  align-self: flex-end;
}

.x-home-message-meta-assistant {
  align-self: flex-start;
}

.x-home-message-copy,
.x-home-message-regen {
  position: relative;
  box-sizing: border-box;
  width: var(--x-ctrl-sm);
  min-width: var(--x-ctrl-sm);
  height: var(--x-ctrl-sm);
  min-height: var(--x-ctrl-sm);
  aspect-ratio: 1 / 1;
  flex: 0 0 var(--x-ctrl-sm);
  display: grid;
  place-items: center;
  padding: 0;
  margin: 0;
  border: 1px solid transparent;
  border-radius: var(--x-r-sm);
  background: transparent;
  color: #71717a;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.x-home-message-copy:hover,
.x-home-message-regen:hover,
.x-home-message-copy:focus-visible,
.x-home-message-regen:focus-visible {
  background: #f4f4f5;
  border-color: #e5e5e7;
  color: #18181b;
  outline: none;
}

.x-home-message-copy::before,
.x-home-message-regen::before {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%) translateY(2px);
  padding: 4px 8px;
  border-radius: 6px;
  background: #18181b;
  color: #ffffff;
  font-size: var(--fs-2xs);
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
}

.x-home-message-copy:hover::before,
.x-home-message-copy:focus-visible::before,
.x-home-message-regen:hover::before,
.x-home-message-regen:focus-visible::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.x-home-message-time {
  margin-left: 4px;
  color: #a1a1aa;
  font-size: var(--fs-2xs);
  line-height: 1;
}

.x-home-message.is-pending p::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-left: 8px;
  border-radius: 999px;
  background: #9ca3af;
  box-shadow: 9px 0 0 #c2c7cf, 18px 0 0 #d8dce2;
  animation: x-home-pending-pulse 1.4s ease-in-out infinite;
}

@keyframes x-home-pending-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Thinking ring on the avatar while waiting for the first token. */
.x-home-message-assistant.is-pending .x-home-message-mark {
  animation: x-home-mark-thinking 1.6s ease-in-out infinite;
}

@keyframes x-home-mark-thinking {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(24, 24, 27, 0.24);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(24, 24, 27, 0);
  }
}

@keyframes x-home-history-spin {
  to { transform: rotate(360deg); }
}

@keyframes x-home-loading-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

/* Cards stay aligned with assistant body (left, no avatar offset). */
.x-home-data-card {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  margin-top: 4px;
  padding: 14px;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #ffffff;
}

.x-home-data-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.x-home-data-head span,
.x-home-data-note {
  color: #737373;
  font-size: var(--fs-xs);
}

.x-home-employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
}

.x-home-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.x-home-employee-chip {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  padding: 12px 12px 11px;
  border: 1px solid #e6e7eb;
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.x-home-employee-chip:hover {
  background:
    linear-gradient(180deg, #fffdf8 0%, #f8f4ec 100%);
  border-color: #d8c7a9;
  box-shadow: 0 10px 22px rgba(32, 24, 16, 0.08);
  transform: translateY(-1px);
}

.x-home-employee-chip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.x-home-emp-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #1f2937;
  color: #fff7e8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
}

.x-home-emp-arrow {
  color: #b4b4b8;
  font-size: 13px;
  line-height: 1;
}

.x-home-emp-name {
  display: block;
  min-width: 0;
  color: #171717;
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.x-home-emp-role {
  min-width: 0;
  width: 100%;
  color: #5f5f67;
  font-size: var(--fs-2xs);
  font-weight: 500;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  text-align: left;
}

.x-home-status-grid span {
  padding: 10px;
  border-radius: 10px;
  background: #fafafa;
}

.x-home-status-grid em {
  display: block;
  margin-top: 4px;
  color: #18181b;
  font-size: var(--fs-xl);
  font-style: normal;
  font-weight: 700;
}

/* Composer: rounded white box with a quiet single-line-first input. */
.x-home-composer {
  width: min(768px, calc(100vw - 48px));
  flex: 0 0 auto;
  display: grid;
  grid-template-rows: minmax(24px, auto) auto;
  gap: 10px;
  padding: 14px 16px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 14px 36px rgba(0, 0, 0, 0.06);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.x-home-composer:focus-within {
  border-color: #d4d4d4;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 18px 42px rgba(0, 0, 0, 0.075);
}

.x-home-composer .x-home-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 24px;
  max-height: 132px;
  margin: 0;
  padding: 2px 0;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  color: #171717;
  font-size: var(--fs-md);
  line-height: 1.55;
  resize: none;
  box-shadow: none !important;
  font-family: inherit;
  overflow-y: hidden;
  appearance: none;
  -webkit-appearance: none;
}

.x-home-composer .x-home-input:focus,
.x-home-composer .x-home-input:focus-visible,
.x-home-composer .x-home-input:hover {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  border-color: transparent !important;
  background: transparent !important;
}

.x-home-composer .x-home-input::placeholder {
  color: #a1a1aa;
}

.x-home-composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  padding-top: 2px;
}

.x-home-composer-tools,
.x-home-composer-end {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.x-home-tool-btn {
  width: var(--x-ctrl-md);
  height: var(--x-ctrl-md);
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--x-r-pill);
  background: transparent;
  color: #525252;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.x-home-tool-btn:hover {
  background: #f4f4f5;
  color: #18181b;
}

/* Mode/model pickers as compact pills inside the composer toolbar. */
.x-home-mode,
.x-home-model {
  position: relative;
  display: inline-flex;
}

.x-home-mode-trigger,
.x-home-model-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 12px;
  height: var(--x-ctrl-md);
  border: 1px solid #e5e5e5;
  border-radius: var(--x-r-pill);
  background: #ffffff;
  color: #404040;
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.x-home-mode-trigger:hover,
.x-home-mode.menu-open .x-home-mode-trigger,
.x-home-model-trigger:hover,
.x-home-model.menu-open .x-home-model-trigger {
  background: #f8f8f8;
  border-color: #d4d4d4;
  color: #18181b;
}

.x-home-mode-caret,
.x-home-model-caret {
  color: #9ca3af;
  transition: transform 140ms ease;
}

.x-home-mode.menu-open .x-home-mode-caret,
.x-home-model.menu-open .x-home-model-caret {
  transform: rotate(180deg);
}

.x-home-mode-menu,
.x-home-model-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 40;
  min-width: 280px;
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.x-home-mode-menu {
  min-width: 240px;
}

.x-home-mode.menu-open .x-home-mode-menu,
.x-home-model.menu-open .x-home-model-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.x-home-mode-menu button,
.x-home-model-menu button {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.x-home-mode-menu button:hover,
.x-home-model-menu button:hover {
  background: #f4f4f5;
}

.x-home-mode-menu button[aria-checked="true"],
.x-home-model-menu button[aria-checked="true"] {
  background: #f4f4f5;
}

.x-home-mode-menu button strong,
.x-home-model-menu button strong {
  color: #111827;
  font-size: var(--fs-sm);
  font-weight: 700;
}

.x-home-mode-menu button em,
.x-home-model-menu button em {
  color: #6b7280;
  font-size: var(--fs-2xs);
  font-style: normal;
  letter-spacing: 0.01em;
}

/* Send button: round, dark when enabled, gray when disabled. */
.x-home-send {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #e5e5e5;
  color: #a1a1aa;
  cursor: not-allowed;
  transition: background 140ms ease, color 140ms ease;
}

.x-home-send:not(:disabled) {
  background: var(--x-ui-selected-bg);
  color: var(--x-ui-selected-text);
  cursor: pointer;
}

.x-home-send:not(:disabled):hover {
  background: var(--x-ui-selected-bg-hover);
}

.x-home-quick-actions {
  width: min(768px, calc(100vw - 48px));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.x-home-quick-actions > button,
.x-home-more-trigger {
  min-height: var(--x-ctrl-lg);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid #e4e4e7;
  border-radius: var(--x-r-pill);
  background: #ffffff;
  color: #18181b;
  font-size: var(--fs-md);
  font-weight: 500;
  cursor: pointer;
  box-shadow: none;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.x-home-quick-actions > button:hover,
.x-home-more-trigger:hover,
.x-home-more-tasks.menu-open .x-home-more-trigger {
  background: #f4f4f5;
  border-color: #d4d4d8;
}

.x-home-quick-actions svg {
  color: #71717a;
  flex: 0 0 auto;
}

.x-home-more-tasks {
  position: relative;
  display: inline-flex;
}

.x-home-more-menu {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 42;
  width: 220px;
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.04);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.x-home-more-tasks.menu-open .x-home-more-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.x-home-more-menu button {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #18181b;
  font-size: var(--fs-sm);
  text-align: left;
  cursor: pointer;
}

.x-home-more-menu button:hover {
  background: #f4f4f5;
}

.x-home.is-chatting .x-home-quick-actions {
  display: none;
}

.x-home.is-chatting .x-home-mobile-history {
  display: none;
}

.x-home-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 20, 20, 0.34);
  backdrop-filter: blur(7px);
}

.x-home-login-backdrop {
  position: fixed;
  isolation: isolate;
  padding: clamp(88px, 10vh, 120px) 24px 24px;
  background:
    radial-gradient(circle at 1px 1px, rgba(24, 24, 27, 0.08) 1.1px, transparent 0) 0 0 / 18px 18px,
    linear-gradient(180deg, #fcfcfc 0%, #f5f5f5 100%);
  backdrop-filter: none;
}

.x-home-login-brand {
  position: absolute;
  top: clamp(20px, 3vh, 28px);
  left: clamp(20px, 3vw, 36px);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #222222;
  text-decoration: none;
}

.x-home-modal {
  width: min(560px, 100%);
  max-height: min(86vh, 720px);
  overflow: auto;
  border: 1px solid #e5e5e5;
  border-radius: var(--x-r-modal);
  background: #ffffff;
  color: #171717;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.18);
}

.x-home-login-modal {
  position: relative;
  width: min(432px, calc(100vw - 32px));
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.x-home-login-shell {
  position: relative;
  display: grid;
  gap: 30px;
  padding: 34px 30px 30px;
  border: 1px solid #e5e5e5;
  border-radius: var(--x-r-modal);
  background: #ffffff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.18);
}

.x-home-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #eeeeee;
  overflow: visible;
}

.x-home-login-modal .x-home-modal-head {
  position: relative;
  display: grid;
  justify-self: center;
  width: max-content;
  max-width: 100%;
  justify-items: center;
  align-items: center;
  gap: 4px;
  padding: 0;
  border-bottom: 0;
  text-align: center;
}

.x-home-login-modal .x-home-modal-head::before {
  content: none;
}

.x-home-brand-mark-hero {
  width: 120px;
  height: 120px;
  border-radius: 32px;
}

.x-home-login-copy {
  display: grid;
  width: auto;
  max-width: 100%;
  gap: 3px;
  justify-items: center;
}

.x-home-modal-head h2 {
  margin: 0;
  font-size: var(--fs-xl);
  line-height: 1.2;
}

.x-home-login-modal .x-home-modal-head h2 {
  font-size: var(--fs-2xl);
  font-weight: 700;
  letter-spacing: 0;
}

.x-home-login-copy p {
  max-width: 280px;
  margin: 0;
  color: #71717a;
  font-size: var(--fs-sm);
  line-height: 1.5;
  text-align: center;
}

.x-home-modal-head p {
  margin: 6px 0 0;
  color: #71717a;
  font-size: var(--fs-sm);
}

.x-home-modal-close {
  position: relative;
  width: var(--x-ctrl-md);
  height: var(--x-ctrl-md);
  border: 0;
  border-radius: var(--x-r-md);
  background: transparent;
  color: #a1a1aa;
  font-size: var(--fs-xl);
  line-height: 1;
  cursor: pointer;
  overflow: visible;
  transition: color 0.12s, background 0.12s;
}


.x-home-login-modal .x-home-modal-close {
  position: absolute;
  top: 0;
  right: 0;
  border: 0;
  background: #f4f4f5;
  color: #71717a;
}

.x-home-modal-close:hover {
  color: #18181b;
  background: #f4f4f5;
}

.x-home-modal-body,
.x-home-settings-form {
  display: grid;
  gap: 16px;
}

.x-home-modal-body {
  padding: 20px 22px 22px;
}

.x-home-login-modal .x-home-modal-body {
  padding: 0;
  gap: 18px;
}

.x-home-login-form {
  gap: 18px;
}

.x-home-login-modal .x-home-form-grid {
  gap: 16px;
}

.x-home-login-modal .x-home-form-grid label {
  gap: 8px;
  color: #52525b;
  font-size: var(--fs-xs);
  font-weight: 600;
}

.x-home-login-modal .x-home-form-grid input {
  min-height: 48px;
  padding: 0 14px;
  border-color: #e5e5e7;
  border-radius: var(--x-r-lg);
  background: #fafafa;
  box-shadow: none;
}

.x-home-login-modal .x-home-modal-actions {
  margin-top: 2px;
}

.x-home-login-modal .x-home-modal-primary {
  width: 100%;
  min-height: 46px;
  border-color: #18181b;
  border-radius: 12px;
  background: #171717;
  color: #ffffff;
  font-size: var(--fs-md);
  font-weight: 600;
}

.x-home-login-modal .x-home-modal-primary:hover {
  background: #101010;
  border-color: #101010;
}

.x-home-settings-form + .x-home-settings-form {
  padding-top: 18px;
  border-top: 1px solid #eeeeee;
}

.x-home-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.x-home-login-grid {
  grid-template-columns: 1fr;
}

.x-home-form-grid label {
  display: grid;
  gap: 7px;
  color: #52525b;
  font-size: var(--fs-sm);
}

.x-home-form-grid input,
.x-home-form-grid select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #dddddd;
  border-radius: var(--x-r-md);
  background: #ffffff;
  color: #171717;
  font-size: inherit;
}

.x-home-form-grid select {
  padding-right: 32px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2371717a' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

.x-home-form-grid input:focus,
.x-home-form-grid select:focus {
  outline: none;
  border-color: #18181b;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.12);
}

.x-home-login-modal .x-home-form-grid input:focus {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}

.x-home-field-span {
  grid-column: 1 / -1;
}

.x-home-modal-actions {
  display: flex;
  justify-content: flex-end;
}

.x-home-modal-primary {
  min-height: var(--x-ctrl-lg);
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--x-r-md);
  background: var(--x-ui-selected-bg);
  color: var(--x-ui-selected-text);
  font-weight: 700;
  cursor: pointer;
}

.x-home-settings-message {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: var(--fs-sm);
}

.x-home-login-modal .x-home-settings-message {
  border: 1px solid transparent;
  border-radius: 12px;
}

.x-home-settings-message[data-type="success"] {
  background: #ecfdf5;
  color: #047857;
}

.x-home-settings-message[data-type="error"] {
  background: #fff1f2;
  color: #be123c;
}

.x-home-login-modal .x-home-settings-message[data-type="error"] {
  border-color: #fecdd3;
  background: #fff5f6;
  color: #be123c;
}

/* 閳光偓閳光偓 Settings modal: two-column (sidebar nav + content) 閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓 */
.x-home-settings-modal {
  width: min(1000px, 100%);
  height: min(88vh, 740px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.x-home-settings-modal .x-home-modal-head {
  flex-shrink: 0;
  padding: 16px 20px 14px;
  align-items: center;
}

.x-home-settings-modal .x-home-modal-head h2 {
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.x-home-settings-modal .x-home-modal-body {
  display: grid;
  grid-template-columns: 168px 1fr;
  padding: 0;
  gap: 0;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.x-home-settings-nav {
  padding: 8px 6px;
  border-right: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow-y: auto;
}

.x-home-settings-nav-section {
  font-size: var(--fs-2xs);
  font-weight: 600;
  color: #a1a1aa;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 10px 3px;
  pointer-events: none;
  user-select: none;
}

.x-home-settings-nav-section:first-child {
  padding-top: 2px;
}

.x-home-settings-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--x-r-sm);
  background: transparent;
  color: #52525b;
  font-size: var(--fs-sm);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  min-height: var(--x-ctrl-sm);
  transition: background 0.1s;
}

.x-home-settings-nav-item svg {
  flex-shrink: 0;
  opacity: 0.65;
}

.x-home-settings-nav-item:hover {
  background: #f4f4f5;
  color: #18181b;
}

.x-home-settings-nav-item.is-active {
  background: #e4e4e7;
  color: #18181b;
  font-weight: 600;
}

.x-home-settings-nav-item.is-active svg {
  opacity: 1;
}

.x-home-settings-content {
  padding: 20px 22px;
  overflow-y: auto;
  min-height: 0;
}

.x-home-settings-section {
  display: none;
}

.x-home-settings-section.is-active {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.x-home-settings-section > h3 {
  font-size: var(--fs-md);
  font-weight: 700;
  color: #18181b;
  margin: 0;
}

.x-home-settings-section > p {
  font-size: var(--fs-sm);
  color: #71717a;
  margin: -8px 0 4px;
  line-height: 1.5;
}

/* ===== Sub-account management embedded in settings ===== */
.x-home-subacct-host {
  display: grid;
  gap: 16px;
}
.x-home-subacct-form {
  display: grid;
  gap: 16px;
}
.x-home-subacct-perm {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #eeeeee;
  border-radius: var(--x-r-md);
  background: #fafafa;
}
.x-home-subacct-perm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #18181b;
  font-size: var(--fs-sm);
  font-weight: 600;
}
.x-home-subacct-emp-list {
  display: grid;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}
.x-home-subacct-emp-list::-webkit-scrollbar { width: 8px; }
.x-home-subacct-emp-list::-webkit-scrollbar-thumb {
  border: 2px solid #fafafa;
  background: var(--x-ui-scrollbar-thumb);
  border-radius: 999px;
}
.x-home-subacct-emp {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid #eeeeee;
  border-radius: var(--x-r-md);
  background: #ffffff;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.x-home-subacct-emp:hover {
  border-color: #dddddd;
  background: #fcfcfc;
}
.x-home-subacct-emp-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.x-home-subacct-emp-copy strong {
  color: #18181b;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 18px;
}
.x-home-subacct-emp-copy em {
  color: #71717a;
  font-size: var(--fs-xs);
  font-style: normal;
  font-weight: 400;
  line-height: 16px;
}
.x-home-subacct-switches {
  display: grid;
  gap: 10px;
  padding: 2px 2px 0;
}
.x-home-subacct-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #52525b;
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
}
/* Custom checkbox scoped to settings modal: remove native rendering */
.x-home-settings-modal input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  box-sizing: border-box !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  flex: 0 0 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1.5px solid #9ca3af !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  cursor: pointer;
  position: relative;
  display: inline-block !important;
  vertical-align: middle;
  transition: border-color 120ms ease, background 120ms ease;
}
.x-home-settings-modal input[type="checkbox"]:hover {
  border-color: #6b7280 !important;
}
.x-home-settings-modal input[type="checkbox"]:checked {
  border-color: #18181b !important;
  background: #18181b !important;
}
.x-home-settings-modal input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 4px;
  width: 4px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg);
}
.x-home-settings-modal input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.18);
}
.x-home-subacct-list {
  display: grid;
  gap: 8px;
}
.x-home-subacct-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #eeeeee;
  border-radius: var(--x-r-md);
  background: #ffffff;
}
.x-home-subacct-row-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.x-home-subacct-row-main strong {
  color: #18181b;
  font-size: var(--fs-sm);
  font-weight: 600;
}
.x-home-subacct-row-main span {
  color: #71717a;
  font-size: var(--fs-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.x-home-subacct-row-main em {
  color: #52525b;
  font-size: var(--fs-xs);
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.x-home-subacct-row-actions {
  display: flex;
  gap: 6px;
}
.x-home-subacct-row-actions button {
  min-height: var(--x-ctrl-sm);
  padding: 0 10px;
  border: 1px solid #e5e5e5;
  border-radius: var(--x-r-sm);
  background: #ffffff;
  color: #52525b;
  font-size: var(--fs-xs);
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.x-home-subacct-row-actions button:hover {
  background: #fafafa;
  border-color: #d4d4d8;
  color: #18181b;
}
.x-home-subacct-row-actions button[data-subacct-action="delete"] {
  color: #b42318;
}
.x-home-subacct-row-actions button[data-subacct-action="delete"]:hover {
  border-color: #fecaca;
  background: #fff5f5;
}
.x-home-modal-secondary {
  min-height: var(--x-ctrl-lg);
  padding: 0 16px;
  border: 1px solid #e5e5e5;
  border-radius: var(--x-r-md);
  background: #ffffff;
  color: #52525b;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.x-home-modal-secondary:hover {
  background: #fafafa;
  border-color: #d4d4d8;
  color: #18181b;
}

@media (max-width: 560px) {
  .x-home-settings-modal .x-home-modal-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .x-home-settings-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    border-right: none;
    border-bottom: 1px solid #f0f0f0;
    padding: 6px 8px;
    overflow-x: auto;
    gap: 4px;
  }
  .x-home-settings-nav-section { display: none; }
  .x-home-settings-nav-item { flex-shrink: 0; }
}

@media (max-width: 760px) {
  .x-home-login-backdrop {
    padding: 88px 16px 16px;
  }

  .x-home-login-brand {
    left: 16px;
    gap: 10px;
  }

  .x-home-brand-mark {
    width: 36px;
    height: 36px;
  }

  .x-home-login-shell {
    gap: 24px;
    padding: 28px 20px 22px;
    border-radius: 18px;
  }

  .x-home-brand-mark-hero {
    width: 88px;
    height: 88px;
    border-radius: 24px;
  }

  .x-home-login-modal .x-home-modal-head h2 {
    font-size: var(--fs-2xl);
  }

  .x-home-workspace {
    padding: 18px 16px 18px;
  }

  .x-home-title {
    font-size: var(--fs-2xl);
  }

  .x-home-form-grid,
  .x-home-employee-grid,
  .x-home-status-grid {
    grid-template-columns: 1fr;
  }

  .x-home-quick-actions {
    width: calc(100vw - 32px);
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .x-home-quick-actions::-webkit-scrollbar {
    display: none;
  }

  .x-home-quick-actions > button,
  .x-home-more-trigger {
    flex: 0 0 auto;
  }

  .x-home-composer {
    gap: 8px;
    padding: 12px 14px 10px;
  }

  .x-home-composer .x-home-input {
    font-size: var(--fs-md);
  }

  .x-home-modal-backdrop {
    align-items: end;
    padding: 12px;
  }
}

/* Phase 2-4: X home task cards (dispatched employee runs). */
.x-home-task-card {
  width: 100%;
  min-width: 0;
  margin-top: 4px;
  padding: 14px 14px 12px;
  border: 1px solid #e5e5e7;
  border-radius: var(--x-r-lg);
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.x-home-task-card[data-variant="failed"] {
  border-color: #fecaca;
  background: #ffffff;
}

.x-home-task-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.x-home-task-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.x-home-task-card-title strong {
  font-size: var(--fs-md);
  color: #0b1220;
}

.x-home-task-card-tag {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: var(--fs-2xs);
  letter-spacing: 0.02em;
  background: #f4f4f5;
  color: #52525b;
}

.x-home-task-card[data-variant="failed"] .x-home-task-card-tag {
  background: #fde9e9;
  color: #b42318;
}

.x-home-task-card-status {
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.x-home-task-card-status.is-running {
  color: #18181b;
  background: #f4f4f5;
}

.x-home-task-card-status.is-success {
  color: #047857;
  background: #d1fadf;
}

.x-home-task-card-status.is-failed {
  color: #b42318;
  background: #fde9e9;
}

.x-home-task-card-status.is-stopped {
  color: #5f6b7a;
  background: #e6e9ee;
}

.x-home-task-card-body {
  display: grid;
  gap: 8px;
}

.x-home-task-progress {
  height: 6px;
  border-radius: 999px;
  background: #eaf3ef;
  overflow: hidden;
}

.x-home-task-progress-bar {
  height: 100%;
  width: 4%;
  background: #18181b;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.x-home-task-progress-bar.is-indeterminate {
  width: 30% !important;
  background: linear-gradient(90deg, transparent 0%, #18181b 50%, transparent 100%);
  animation: x-home-progress-shimmer 1.6s infinite linear;
}

@keyframes x-home-progress-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(330%); }
}

.x-home-task-card[data-variant="failed"] .x-home-task-progress-bar {
  background: linear-gradient(90deg, #f87171 0%, #fbbf24 100%);
}

.x-home-task-card-meta {
  margin: 0;
  color: #5f6b7a;
  font-size: var(--fs-xs);
  line-height: 1.5;
}

.x-home-task-card-tail {
  display: none;
}

.x-home-task-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  font-size: var(--fs-xs);
  color: #6b7280;
}

.x-home-task-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.x-home-task-card-id code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #f1f4f8;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: #344054;
}

.x-home-task-card-link {
  color: #18181b;
  text-decoration: none;
  border-bottom: 1px dashed rgba(24, 24, 27, 0.35);
}

.x-home-task-card-link:hover {
  color: #000000;
  border-bottom-color: #000000;
}

.x-home-task-stop {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #fecaca;
  border-radius: var(--x-r-md);
  background: #ffffff;
  color: #b91c1c;
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.x-home-task-stop:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #fca5a5;
}

.x-home-task-stop:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.x-home-task-error-banner {
  margin: 6px 14px 0;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: var(--fs-xs);
  line-height: 1.5;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.x-home-task-error-banner.is-transient {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.x-home-task-error-banner.is-param {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

.x-home-task-error-banner.is-permission {
  background: #faf5ff;
  color: #6b21a8;
  border-color: #e9d5ff;
}

.x-home-task-retry {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #18181b;
  border-radius: 8px;
  background: #18181b;
  color: #ffffff;
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease;
}

.x-home-task-retry:hover:not(:disabled) {
  background: #27272a;
}

.x-home-task-retry:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.x-home-task-restart {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  background: #ffffff;
  color: #18181b;
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.x-home-task-restart:hover:not(:disabled) {
  background: #f4f4f5;
  border-color: #a1a1aa;
}

.x-home-task-restart:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

/* 閳光偓閳光偓 Task artifacts 閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓 */
.x-home-task-artifacts {
  padding: 10px 14px 2px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Phase 7/10 閳?cost & audit 閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓 */
.x-home-cost-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #e5e7eb;
  margin: 8px 0 12px;
  padding: 0;
}

.x-home-cost-tab {
  background: transparent;
  border: none;
  padding: 8px 14px;
  font-size: var(--fs-xs);
  color: #6b7280;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.x-home-cost-tab:hover {
  color: #1f2937;
  background: #f9fafb;
}

.x-home-cost-tab.is-active {
  color: #111827;
  font-weight: 600;
  border-bottom-color: #111827;
  background: transparent;
}

.x-home-cost-pane {
  display: none;
}

.x-home-cost-pane.is-active {
  display: block;
}

.x-home-cost-task-table tbody td {
  vertical-align: top;
  padding: 10px 10px;
}

.x-home-cost-task-emp {
  font-weight: 600;
  color: #1f2937;
  font-size: var(--fs-xs);
}

.x-home-cost-task-label {
  font-size: var(--fs-2xs);
  color: #6b7280;
  margin-top: 2px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.x-home-cost-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.x-home-cost-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-xs);
  background: #ffffff;
  border: 1px solid #e5e5e7;
  border-radius: var(--x-r-lg);
  overflow: hidden;
}

.x-home-cost-table thead {
  background: #fafafa;
}

.x-home-cost-table th,
.x-home-cost-table td {
  padding: 10px 12px;
  text-align: right;
  border-bottom: 1px solid #f4f4f5;
  font-variant-numeric: tabular-nums;
}

.x-home-cost-table th:first-child,
.x-home-cost-table td:first-child {
  text-align: left;
}

.x-home-cost-table th {
  font-weight: 600;
  color: #6b7280;
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.x-home-cost-table tbody tr:last-child td {
  border-bottom: none;
}

.x-home-cost-table code {
  font-size: var(--fs-2xs);
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
  color: #334155;
}

/* G3 閳?preference profile (settings 閳?娴ｈ法鏁ら悽璇插剼 tab) 閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓 */
.x-home-pref-stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.x-home-pref-empty {
  padding: 16px;
  text-align: center;
  color: #6b7280;
  font-size: var(--fs-xs);
  border: 1px dashed #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
}

.x-home-pref-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.x-home-pref-summary > div {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.x-home-pref-summary strong {
  font-size: var(--fs-lg);
  color: #111827;
}

.x-home-pref-summary span {
  font-size: var(--fs-2xs);
  color: #6b7280;
}

.x-home-pref-h {
  margin: 4px 0 6px;
  font-size: var(--fs-sm);
  color: #374151;
}

.x-home-pref-note {
  margin: -2px 0 6px;
  font-size: var(--fs-2xs);
  color: #6b7280;
}

.x-home-pref-emp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  counter-reset: emp-rank;
}

.x-home-pref-emp-list li {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--x-r-md);
  background: #ffffff;
  border: 1px solid #e5e5e7;
  font-size: var(--fs-xs);
  position: relative;
}

.x-home-pref-emp-rank::before {
  counter-increment: emp-rank;
  content: counter(emp-rank);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #374151;
  font-size: var(--fs-2xs);
  font-weight: 700;
}

.x-home-pref-emp-list li:nth-child(1) .x-home-pref-emp-rank::before { background: #18181b; color: #ffffff; }
.x-home-pref-emp-list li:nth-child(2) .x-home-pref-emp-rank::before { background: #525252; color: #ffffff; }
.x-home-pref-emp-list li:nth-child(3) .x-home-pref-emp-rank::before { background: #a1a1aa; color: #ffffff; }

.x-home-pref-emp-label {
  color: #1f2937;
  font-weight: 500;
}

.x-home-pref-emp-count {
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}

.x-home-pref-emp-bar {
  grid-column: 1 / -1;
  height: 4px;
  border-radius: 999px;
  background: #f3f4f6;
  overflow: hidden;
}

.x-home-pref-emp-bar > span {
  display: block;
  height: 100%;
  background: #18181b;
  border-radius: inherit;
}

.x-home-pref-params {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.x-home-pref-params li {
  padding: 8px 10px;
  border-radius: var(--x-r-md);
  background: #ffffff;
  border: 1px solid #e5e5e7;
  font-size: var(--fs-xs);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.x-home-pref-params li strong {
  color: #18181b;
  margin-right: 4px;
}

.x-home-pref-param {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: #f4f4f5;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: #18181b;
}

/* F4 閳?multi-step workflow card 閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓 */
.x-home-workflow {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fafafa;
  border: 1px solid #e5e5e5;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.x-home-workflow-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.x-home-workflow-head strong {
  font-size: var(--fs-sm);
  color: #18181b;
}

.x-home-workflow-tag {
  margin-left: auto;
  padding: 1px 8px;
  font-size: var(--fs-2xs);
  border-radius: 999px;
  background: #e5e5e7;
  color: #404040;
}

.x-home-workflow-tag[data-status="success"] { background: #18181b; color: #ffffff; }
.x-home-workflow-tag[data-status="partial"] { background: #525252; color: #ffffff; }
.x-home-workflow-tag[data-status="failed"]  { background: #f4f4f5; color: #b91c1c; border: 1px solid #fecaca; }

.x-home-workflow-count {
  font-size: var(--fs-2xs);
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}

.x-home-workflow-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.x-home-workflow-step {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--x-r-md);
  border: 1px solid #e5e5e7;
  background: #ffffff;
  transition: border-color 0.18s, background 0.18s;
}

.x-home-workflow-step[data-status="running"] {
  border-color: #d4d4d8;
  background: #ffffff;
}

.x-home-workflow-step[data-status="success"] {
  border-color: #e5e5e7;
  background: #ffffff;
}

.x-home-workflow-step[data-status="failed"] {
  border-color: #fecaca;
  background: #ffffff;
}

.x-home-workflow-step[data-status="skipped"] {
  opacity: 0.55;
}

.x-home-workflow-step-index {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-2xs);
  font-weight: 700;
  background: #e5e5e7;
  color: #525252;
}

.x-home-workflow-step[data-status="running"] .x-home-workflow-step-index {
  background: #18181b;
  color: #ffffff;
  animation: x-home-live-pulse 1.6s ease-in-out infinite;
}

.x-home-workflow-step[data-status="success"] .x-home-workflow-step-index {
  background: #18181b;
  color: #ffffff;
}

.x-home-workflow-step[data-status="failed"] .x-home-workflow-step-index {
  background: #ffffff;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.x-home-workflow-step-body {
  flex: 1 1 auto;
  min-width: 0;
}

.x-home-workflow-step-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-xs);
}

.x-home-workflow-step-emp {
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.x-home-workflow-step-status {
  margin-left: auto;
  font-size: var(--fs-2xs);
  color: #6b7280;
}

.x-home-workflow-step[data-status="success"] .x-home-workflow-step-status { color: #18181b; font-weight: 600; }
.x-home-workflow-step[data-status="failed"]  .x-home-workflow-step-status { color: #b91c1c; font-weight: 600; }
.x-home-workflow-step[data-status="running"] .x-home-workflow-step-status { color: #18181b; font-weight: 600; }

.x-home-workflow-step-phrase {
  margin-top: 2px;
  font-size: var(--fs-2xs);
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.x-home-workflow-step-artifacts {
  margin-top: 4px;
  font-size: var(--fs-2xs);
  color: #4b5563;
}

.x-home-workflow-step-error {
  margin-top: 4px;
  font-size: var(--fs-2xs);
  color: #b91c1c;
}

/* P1.3 閳?running task live preview 閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓 */
.x-home-task-artifacts.is-live {
  border-top: 1px dashed #c7d2fe;
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.45), transparent);
}

.x-home-task-live-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e0e7ff;
}

.x-home-task-live-pill {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
  padding: 1px 7px;
  font-size: var(--fs-2xs);
  font-weight: 700;
  letter-spacing: 0.4px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.35);
  animation: x-home-live-pulse 1.6s ease-in-out infinite;
}

@keyframes x-home-live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(99, 102, 241, 0); }
}

.x-home-task-live-image,
.x-home-task-live-video {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  display: block;
  background: #f8fafc;
}

.x-home-task-live-file {
  padding: 28px 16px;
  font-size: var(--fs-sm);
  color: #475569;
  text-align: center;
  background: #f1f5f9;
}

.x-home-task-live-caption {
  padding: 4px 10px 6px;
  font-size: var(--fs-2xs);
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.x-home-task-live-count {
  font-size: var(--fs-2xs);
  color: #4f46e5;
  font-weight: 600;
  text-align: right;
}

.x-home-artifacts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.x-home-artifact-thumb-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.x-home-artifact-dl {
  width: 26px;
  height: 22px;
  padding: 0;
  border: 1px solid #e4e4e7;
  border-radius: 5px;
  background: #f9f9fb;
  color: #52525b;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  transition: border-color 0.1s, background 0.1s;
}

.x-home-artifact-dl:hover {
  border-color: #a1a1aa;
  background: #f0f0f3;
  color: #18181b;
}

.x-home-artifact-thumb {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  background: #f4f4f5;
  transition: border-color 0.12s;
  flex: 0 0 auto;
}

.x-home-artifact-thumb:hover {
  border-color: #a1a1aa;
}

.x-home-artifact-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.x-home-artifacts-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.x-home-artifact-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  color: #3b82f6;
  text-decoration: none;
  padding: 3px 6px;
  border-radius: 6px;
  transition: background 0.1s;
}

.x-home-artifact-file:hover {
  background: #eff6ff;
  color: #2563eb;
}

.x-home-artifact-file svg {
  flex-shrink: 0;
  color: #71717a;
}

.x-home-artifact-name {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.x-home-artifact-size {
  color: #a1a1aa;
  flex-shrink: 0;
}

.x-home-artifacts-bundle {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  margin-bottom: 6px;
  padding: 5px 12px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #fafafa;
  color: #3f3f46;
  font-size: var(--fs-xs);
  font-weight: 500;
  text-decoration: none;
  transition: background 0.1s, border-color 0.1s;
}

.x-home-artifacts-bundle:hover {
  background: #f0f0f0;
  border-color: #d4d4d8;
}

/* 閳光偓閳光偓 Heavy-op warning banner 閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓 */
.x-home-proposal-heavy-banner {
  padding: 8px 14px;
  background: #fff7ed;
  border-top: 1px solid #fed7aa;
  border-bottom: 1px solid #fed7aa;
  color: #9a3412;
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.5;
}

/* Plan B — param conflict warnings, surfaced inline on the task proposal card */
.x-home-proposal-conflicts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--x-r-sm);
  margin: 4px 0 10px;
}
.x-home-proposal-conflict {
  color: #991b1b;
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.55;
}

/* Plan D — task-completion system notice (distinct from regular X bubbles) */
.x-home-message-task-complete {
  background: #fafafa !important;
  border: 1px solid #e5e7eb;
  border-left-width: 3px;
  border-radius: var(--x-r-sm);
  padding: 10px 14px !important;
  margin: 6px 0;
  max-width: 540px;
  box-shadow: none;
}
.x-home-message-task-complete .x-home-message-head { display: none; }
.x-home-message-task-complete p {
  margin: 0;
  color: #374151;
  font-size: var(--fs-sm);
  line-height: 1.55;
}
.x-home-message-task-complete.is-success { border-left-color: #16a34a; }
.x-home-message-task-complete.is-success p { color: #166534; }
.x-home-message-task-complete.is-failed,
.x-home-message-task-complete.is-error { border-left-color: #dc2626; background: #fef2f2 !important; }
.x-home-message-task-complete.is-failed p,
.x-home-message-task-complete.is-error p { color: #991b1b; }
.x-home-message-task-complete.is-partial_success,
.x-home-message-task-complete.is-timeout { border-left-color: #f59e0b; background: #fffbeb !important; }
.x-home-message-task-complete.is-partial_success p,
.x-home-message-task-complete.is-timeout p { color: #92400e; }
.x-home-message-task-complete.is-stopped { border-left-color: #9ca3af; }

/* M2 — clickable download buttons rendered under x.task_completion bubbles.
   Looks like a small chip row that wraps if there are too many files. */
.x-home-task-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.x-home-task-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #ffffff;
  color: #374151;
  font-size: var(--fs-xs, 12px);
  text-decoration: none;
  line-height: 1.5;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.x-home-task-download-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #111827;
  transform: translateY(-1px);
}
.x-home-task-download-btn svg { flex: none; }
.x-home-task-download-btn .x-home-task-download-label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.x-home-task-download-btn.is-bundle {
  background: #1f2937;
  border-color: #1f2937;
  color: #ffffff;
}
.x-home-task-download-btn.is-bundle:hover {
  background: #111827;
  border-color: #111827;
  color: #ffffff;
}

.x-home-proposal-btn.is-heavy {
  background: #ea580c;
  color: #ffffff;
  border-color: #c2410c;
}

.x-home-proposal-btn.is-heavy:hover {
  background: #c2410c;
  border-color: #9a3412;
}

/* Task proposal card: shown before dispatch when params still need review. */
.x-home-task-proposal {
  border-color: #e4e4e7;
  background: #ffffff;
}

.x-home-proposal-list {
  display: grid;
  gap: 6px;
}

.x-home-proposal-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--x-r-md);
  background: #ffffff;
  border: 1px solid #e5e5e7;
}

.x-home-proposal-row.is-missing {
  border-color: #fecaca;
  background: #ffffff;
}

.x-home-proposal-row.is-editing {
  align-items: stretch;
}

.x-home-proposal-label {
  font-size: var(--fs-sm);
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.x-home-proposal-req {
  color: #b91c1c;
  font-weight: 600;
}

.x-home-proposal-value {
  font-size: var(--fs-sm);
  color: #111827;
  word-break: break-all;
}

.x-home-proposal-control input,
.x-home-proposal-control select {
  width: 100%;
  padding: 6px 8px;
  font-size: var(--fs-sm);
  border: 1px solid #d4d4d8;
  border-radius: var(--x-r-sm);
  background: #ffffff;
}

.x-home-proposal-control input:focus,
.x-home-proposal-control select:focus {
  outline: none;
  border-color: #18181b;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.12);
}

.x-home-proposal-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
}

.x-home-proposal-readonly {
  font-size: var(--fs-sm);
  color: #6b7280;
  font-style: italic;
}

/* Inline file/folder picker for path-type proposal fields. */
.x-home-proposal-upload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.x-home-proposal-upload-status {
  font-size: var(--fs-sm);
  color: #6b7280;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.x-home-proposal-upload.is-bound .x-home-proposal-upload-status {
  color: #065f46;
  font-weight: 500;
}

.x-home-proposal-upload-btn {
  font-size: var(--fs-sm);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #1f2937;
  cursor: pointer;
  transition: background 0.15s;
}

.x-home-proposal-upload-btn:hover:not(:disabled) {
  background: #f3f4f6;
}

.x-home-proposal-upload-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.x-home-proposal-upload.is-bound .x-home-proposal-upload-btn {
  border-color: #10b981;
  color: #065f46;
}

/* Asset-library picker modal (opened from the "素材库" button on a path field) */
.x-home-proposal-asset-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  backdrop-filter: blur(2px);
}

.x-home-proposal-asset-modal {
  background: #fff;
  width: min(820px, 92vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.x-home-proposal-asset-modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-md);
}

.x-home-proposal-asset-modal-close {
  background: none;
  border: 0;
  font-size: 22px;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.x-home-proposal-asset-modal-close:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.x-home-proposal-asset-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.x-home-proposal-asset-section {
  font-size: var(--fs-sm);
  color: #4b5563;
  margin: 0 0 12px;
}

.x-home-proposal-asset-empty,
.x-home-proposal-asset-loading {
  color: #6b7280;
  text-align: center;
  padding: 32px 16px;
  font-size: var(--fs-sm);
}

.x-home-proposal-asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.x-home-proposal-asset-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
}

.x-home-proposal-asset-card:hover {
  border-color: #10b981;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.x-home-proposal-asset-thumb {
  aspect-ratio: 1 / 1;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.x-home-proposal-asset-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.x-home-proposal-asset-thumb span {
  font-size: 32px;
  color: #9ca3af;
}

.x-home-proposal-asset-meta {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.x-home-proposal-asset-meta strong {
  font-size: var(--fs-sm);
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.x-home-proposal-asset-meta span {
  font-size: 11px;
  color: #6b7280;
}

.x-home-proposal-asset-modal-foot {
  padding: 12px 20px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
}

.x-home-proposal-tag {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  border: 1px solid transparent;
}

.x-home-proposal-tag.is-extracted {
  background: #f0f9ff;
  color: #0369a1;
  border-color: #bae6fd;
}

.x-home-proposal-tag.is-attachment {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.x-home-proposal-tag.is-default {
  background: #f9fafb;
  color: #9ca3af;
  border-color: #e5e7eb;
}

.x-home-proposal-tag.is-missing {
  background: #fff7f7;
  color: #dc2626;
  border-color: #fecaca;
}

.x-home-proposal-advanced {
  margin-top: 4px;
}

.x-home-proposal-advanced summary {
  cursor: pointer;
  font-size: var(--fs-xs);
  color: #6b7280;
  padding: 4px 0;
  user-select: none;
}

.x-home-proposal-advanced[open] summary {
  margin-bottom: 4px;
}

.x-home-proposal-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.x-home-proposal-btn {
  padding: 6px 14px;
  font-size: var(--fs-sm);
  border-radius: var(--x-r-md);
  border: 1px solid #d4d4d8;
  background: #ffffff;
  color: #1f2937;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.x-home-proposal-btn:hover:not(:disabled) {
  background: #f3f4f6;
}

.x-home-proposal-btn.is-primary {
  background: var(--x-ui-selected-bg);
  border-color: transparent;
  color: var(--x-ui-selected-text);
}

.x-home-proposal-btn.is-primary:hover:not(:disabled) {
  background: var(--x-ui-selected-bg-hover);
  border-color: transparent;
}

.x-home-proposal-btn.is-quiet {
  border-color: transparent;
  color: #6b7280;
}

.x-home-proposal-btn.is-quiet:hover:not(:disabled) {
  background: transparent;
  color: #1f2937;
}

.x-home-proposal-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.x-home-proposal-error {
  margin: 8px 0 0;
  padding: 6px 8px;
  font-size: var(--fs-xs);
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
}

.x-home-dry-run-preview {
  margin: 10px 0 0;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 6px;
}

.x-home-dry-run-head {
  font-weight: 600;
  font-size: var(--fs-sm);
  color: #0f172a;
}

.x-home-dry-run-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: var(--fs-xs);
  color: #475569;
}

.x-home-dry-run-row strong {
  color: #0f172a;
  font-weight: 600;
  text-align: right;
}

.x-home-dry-run-warnings {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2px;
  font-size: var(--fs-xs);
  color: #92400e;
}

.x-home-dry-run-hint {
  margin-top: 4px;
  font-size: var(--fs-2xs);
  color: #64748b;
  font-style: italic;
}

.x-home-service-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 8px 16px;
  background: #b91c1c;
  color: #ffffff;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.2px;
  transform: translateY(-100%);
  transition: transform 220ms ease;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(185, 28, 28, 0.18);
}

.x-home-service-banner.is-visible {
  transform: translateY(0);
}

.x-home-msg-search {
  position: fixed;
  top: 16px;
  right: 24px;
  z-index: 9000;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.x-home-msg-search.is-open {
  display: inline-flex;
}

.x-home-msg-search-input {
  width: 220px;
  padding: 6px 10px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #f9f9fb;
  color: #18181b;
  font-size: var(--fs-sm);
  outline: none;
}

.x-home-msg-search-input:focus {
  border-color: #a1a1aa;
  background: #ffffff;
}

.x-home-msg-search-count {
  min-width: 42px;
  font-size: var(--fs-2xs);
  color: #71717a;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.x-home-msg-search-btn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #52525b;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 100ms ease;
}

.x-home-msg-search-btn:hover {
  background: #f4f4f5;
}

.x-home-msg-search-hit {
  background: #fef08a;
  color: #18181b;
  padding: 0 1px;
  border-radius: 2px;
}

.x-home-msg-search-hit-active {
  background: #facc15;
  outline: 2px solid #ca8a04;
  outline-offset: 1px;
}

.x-home-stream-interrupted {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 0;
  padding: 8px 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  color: #92400e;
  font-size: var(--fs-xs);
}

.x-home-stream-interrupted-btn {
  padding: 4px 10px;
  border: 1px solid #ca8a04;
  border-radius: 6px;
  background: #ffffff;
  color: #92400e;
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  transition: background 100ms ease;
}

.x-home-stream-interrupted-btn:hover {
  background: #fef3c7;
}

/* 閳光偓閳光偓 Command palette (Cmd+K) 閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓 */
.x-home-cmdk-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 16vh;
  background: rgba(15, 15, 18, 0.34);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.x-home-cmdk-backdrop.is-open {
  display: flex;
}

.x-home-cmdk {
  width: min(560px, 92vw);
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  animation: x-home-cmdk-pop 140ms cubic-bezier(.2,.7,.4,1.0);
}

@keyframes x-home-cmdk-pop {
  from { transform: translateY(-6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.x-home-cmdk-input {
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid #f0f0f0;
  background: transparent;
  color: #18181b;
  font-size: var(--fs-md);
  outline: none;
}

.x-home-cmdk-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  flex: 1 1 auto;
  overflow-y: auto;
}

.x-home-cmdk-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: var(--fs-sm);
  color: #18181b;
  cursor: pointer;
}

.x-home-cmdk-list li.is-active,
.x-home-cmdk-list li:hover {
  background: #f4f4f5;
}

.x-home-cmdk-label {
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.x-home-cmdk-hint {
  font-size: var(--fs-2xs);
  color: #a1a1aa;
  font-family: var(--font-mono);
  flex: 0 0 auto;
}

.x-home-cmdk-empty {
  padding: 24px 12px;
  text-align: center;
  color: #a1a1aa;
  font-size: var(--fs-sm);
  cursor: default;
}

.x-home-cmdk-foot {
  display: flex;
  gap: 14px;
  padding: 8px 14px;
  background: #fafafa;
  border-top: 1px solid #f0f0f0;
  font-size: var(--fs-2xs);
  color: #71717a;
}

.x-home-cmdk-foot kbd {
  padding: 1px 6px;
  border: 1px solid #e4e4e7;
  border-radius: 4px;
  background: #ffffff;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: #52525b;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

/* 閳光偓閳光偓 Triggers modal 閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓 */
.x-home-triggers-modal {
  width: min(680px, 92vw);
}

.x-home-triggers-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px 20px;
}

.x-home-triggers-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.x-home-triggers-new {
  padding: 7px 12px;
  border: 1px solid #18181b;
  border-radius: 8px;
  background: #18181b;
  color: #ffffff;
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
}

.x-home-triggers-new:hover {
  background: #27272a;
}

.x-home-triggers-hint {
  font-size: var(--fs-2xs);
  color: #71717a;
}

.x-home-triggers-list {
  display: grid;
  gap: 8px;
}

.x-home-triggers-empty {
  padding: 24px 16px;
  text-align: center;
  color: #a1a1aa;
  background: #fafafa;
  border-radius: 8px;
  border: 1px dashed #e4e4e7;
}

.x-home-triggers-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #ffffff;
}

.x-home-triggers-row-main {
  flex: 1 1 auto;
  min-width: 0;
}

.x-home-triggers-row-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-md);
}

.x-home-triggers-row-tag {
  padding: 1px 7px;
  border-radius: 999px;
  background: #f4f4f5;
  color: #52525b;
  font-size: var(--fs-2xs);
}

.x-home-triggers-row-meta {
  margin-top: 4px;
  font-size: var(--fs-2xs);
  color: #71717a;
}

.x-home-triggers-row-actions {
  display: flex;
  gap: 6px;
}

.x-home-triggers-row-actions button {
  padding: 5px 10px;
  border: 1px solid #d4d4d8;
  border-radius: 6px;
  background: #ffffff;
  color: #18181b;
  font-size: var(--fs-xs);
  cursor: pointer;
}

.x-home-triggers-row-actions button.is-danger {
  border-color: #fecaca;
  color: #be123c;
}

.x-home-triggers-row-actions button:hover {
  background: #f4f4f5;
}

.x-home-triggers-row-actions button.is-danger:hover {
  background: #fef2f2;
}

.x-home-triggers-form {
  margin-top: 8px;
  padding: 14px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #fafafa;
}

.x-home-triggers-form h3 {
  margin: 0 0 10px;
  font-size: var(--fs-md);
}

.x-home-triggers-form-foot {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.x-home-triggers-form-foot button {
  padding: 7px 14px;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  font-size: var(--fs-xs);
}

.x-home-triggers-form-foot .x-home-triggers-create {
  background: #18181b;
  border-color: #18181b;
  color: #ffffff;
  font-weight: 600;
}

.x-home-triggers-form-error {
  margin-top: 8px;
  font-size: var(--fs-xs);
  color: #b91c1c;
}

/* 閳光偓閳光偓 In-chat trigger proposal card 閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓 */
.x-home-trigger-proposal {
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  display: grid;
  gap: 10px;
}

.x-home-trigger-proposal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.x-home-trigger-proposal-head strong {
  font-size: var(--fs-sm);
  color: #0f172a;
}

.x-home-trigger-proposal-tag {
  padding: 1px 8px;
  font-size: var(--fs-2xs);
  border-radius: 999px;
  background: #e0e7ff;
  color: #3730a3;
  font-weight: 600;
}

.x-home-trigger-proposal-body {
  display: grid;
  gap: 6px;
}

.x-home-trigger-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--fs-xs);
  color: #475569;
}

.x-home-trigger-row strong,
.x-home-trigger-row code {
  color: #0f172a;
  font-weight: 600;
  text-align: right;
}

.x-home-trigger-row code {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
}

.x-home-trigger-name-row input {
  flex: 0 1 60%;
  padding: 4px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: var(--fs-xs);
  background: #ffffff;
}

.x-home-trigger-proposal-foot {
  display: flex;
  gap: 8px;
}

.x-home-trigger-proposal-btn {
  padding: 7px 14px;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  font-size: var(--fs-xs);
  color: #18181b;
}

.x-home-trigger-proposal-btn:hover:not(:disabled) {
  background: #f4f4f5;
}

.x-home-trigger-proposal-btn.is-primary {
  background: #18181b;
  border-color: #18181b;
  color: #ffffff;
  font-weight: 600;
}

.x-home-trigger-proposal-btn.is-primary:hover:not(:disabled) {
  background: #27272a;
}

.x-home-trigger-proposal-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.x-home-trigger-proposal-error {
  font-size: var(--fs-xs);
  color: #b91c1c;
  min-height: 1em;
}

.x-home-trigger-proposal-ok {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--fs-sm);
  color: #0f5132;
  padding: 4px 0;
}

/* Composer attachment chips (uploaded images preview). */
.x-home-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 4px 8px;
}

.x-home-attachments[hidden] {
  display: none;
}

.x-home-attachment-chip {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  border: 1px solid #ececec;
  background: #f4f4f5 center/cover no-repeat;
  overflow: hidden;
  flex: 0 0 auto;
}

.x-home-attachment-chip[data-uploading="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
  background-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(24, 24, 27, 0.28) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: x-home-chip-loading 1.2s ease-in-out infinite;
}

@keyframes x-home-chip-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.x-home-attachment-chip[data-failed="true"] {
  background: #fee2e2 !important;
  border-color: #fecaca;
}

.x-home-attachment-chip-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  font-size: var(--fs-xs);
  line-height: 1;
  cursor: pointer;
}

.x-home-attachment-chip-remove:hover {
  background: rgba(0, 0, 0, 0.78);
}

/* Disable the chip's hover ring while dragging files (visual cue). */
.x-home-composer.is-drop-target {
  border-color: #18181b;
  box-shadow: 0 0 0 4px rgba(24, 24, 27, 0.12);
}

/* Suggestions card: list of follow-up prompts under an assistant message. */
.x-home-suggestions {
  width: 100%;
  display: grid;
  gap: 0;
  margin-top: 4px;
  padding: 8px 0;
  border-top: 1px solid #ececec;
}

.x-home-suggestions-title {
  padding: 6px 4px 8px;
  color: #8e8e93;
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
}

.x-home-suggestion-row {
  width: 100%;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 4px;
  border: 0;
  border-radius: var(--x-r-md);
  background: transparent;
  color: #404040;
  font-size: var(--fs-md);
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.x-home-suggestion-row:hover {
  background: #f4f4f5;
  color: #18181b;
}

.x-home-suggestion-icon {
  display: grid;
  place-items: center;
  color: #9ca3af;
}

.x-home-suggestion-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.x-home-suggestion-arrow {
  color: #c7c7cc;
  font-size: var(--fs-lg);
  line-height: 1;
}

/* Auth-gate: assistant message asking user to log in. */
.x-home-message-auth-gate p {
  padding: 12px 14px;
  border-left: 3px solid #18181b;
  border-radius: 4px var(--x-r-lg) var(--x-r-lg) 4px;
  background: #fafafa;
  color: #18181b;
}

/* 閳光偓閳光偓 Mini dialog (rename / delete confirm) 閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓 */
.x-home-mini-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(4px);
}

.x-home-mini-dialog {
  width: min(400px, 100%);
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  animation: x-mini-dialog-in 140ms ease-out both;
}

@keyframes x-mini-dialog-in {
  from { opacity: 0; transform: scale(0.95) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.x-home-mini-dialog-body {
  padding: 20px 20px 14px;
}

.x-home-mini-dialog-title {
  margin: 0 0 6px;
  font-size: var(--fs-md);
  font-weight: 600;
  color: #111827;
}

.x-home-mini-dialog-desc {
  margin: 0;
  font-size: var(--fs-sm);
  color: #52525b;
  line-height: 1.55;
}

.x-home-mini-dialog-input {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 8px 10px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #ffffff;
  color: #111827;
  font-size: var(--fs-md);
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color 120ms ease;
}

.x-home-mini-dialog-input:focus {
  border-color: #a1a1aa;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}

.x-home-mini-dialog-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 0 20px 16px;
}

.x-home-mini-dialog-cancel {
  height: 34px;
  padding: 0 14px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #ffffff;
  color: #3f3f46;
  font-size: var(--fs-sm);
  font-family: inherit;
  cursor: pointer;
  transition: background 120ms ease;
}

.x-home-mini-dialog-cancel:hover {
  background: #f4f4f5;
}

.x-home-mini-dialog-confirm {
  height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #18181b;
  color: #ffffff;
  font-size: var(--fs-sm);
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 120ms ease;
}

.x-home-mini-dialog-confirm:hover {
  background: #27272a;
}

.x-home-mini-dialog-confirm.is-danger {
  background: #b91c1c;
}

.x-home-mini-dialog-confirm.is-danger:hover {
  background: #991b1b;
}

/* 閳光偓閳光偓 閼奉亜鐣炬稊澶夌瑓閹峰顢?<x-select> 閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓閳光偓
   閺囧じ鍞崢鐔烘晸 <select>閿涘奔绗呴幏澶愩€嶇€瑰苯鍙?CSS 閸欘垱甯堕敍灞肩瑢姒涙垹娅ч悘鎵兇缂佺喍绔撮懛娣偓?   闁倻鏁ら懠鍐ㄦ纯閿涙瓚 妫ｆ牠銆?+ Agent 瀹搞儰缍旈崠鎭掆偓?*/
.x-select {
  position: relative;
  display: inline-block;
  width: 100%;
  font-family: inherit;
}

.x-select [data-x-select-trigger] {
  width: 100%;
  min-height: var(--x-ctrl-md, 32px);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #e5e5e7;
  border-radius: var(--x-r-md, 8px);
  background: #ffffff;
  color: #18181b;
  font-size: var(--fs-sm);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.x-select [data-x-select-trigger]:hover {
  border-color: #d4d4d8;
  background: #fafafa;
}

.x-select.is-open [data-x-select-trigger],
.x-select [data-x-select-trigger]:focus-visible {
  outline: none;
  border-color: #18181b;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.10);
}

.x-select [data-x-select-label] {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.x-select-caret {
  flex: 0 0 auto;
  color: #71717a;
  font-size: var(--fs-2xs);
  line-height: 1;
  transition: transform 140ms ease;
}

.x-select.is-open .x-select-caret {
  transform: rotate(180deg);
}

.x-select [data-x-select-menu] {
  position: absolute;
  z-index: 80;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid #e5e5e7;
  border-radius: var(--x-r-lg, 12px);
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.04);
  max-height: 280px;
  overflow-y: auto;
  display: none;
}

.x-select-menu-portal[data-x-select-menu] {
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid #e5e5e7;
  border-radius: var(--x-r-lg, 12px);
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.04);
  overflow-y: auto;
  display: block;
}

.x-select.is-open [data-x-select-menu] {
  display: block;
}

.x-select [data-x-select-menu] > li,
.x-select-menu-portal[data-x-select-menu] > li {
  padding: 8px 10px;
  border-radius: var(--x-r-sm, 6px);
  font-size: var(--fs-sm);
  color: #18181b;
  cursor: pointer;
  user-select: none;
  outline: none;
  transition: background 100ms ease, color 100ms ease;
}

.x-select [data-x-select-menu] > li:hover,
.x-select [data-x-select-menu] > li:focus-visible,
.x-select-menu-portal[data-x-select-menu] > li:hover,
.x-select-menu-portal[data-x-select-menu] > li:focus-visible {
  background: #f4f4f5;
}

.x-select [data-x-select-menu] > li.is-active,
.x-select-menu-portal[data-x-select-menu] > li.is-active {
  background: #18181b;
  color: #ffffff;
}

.x-select [data-x-select-menu] > li.is-active:hover,
.x-select-menu-portal[data-x-select-menu] > li.is-active:hover {
  background: #18181b;
  color: #ffffff;
}

/* =========================================================================
   素材缩略图 + 图片预览 modal —— 黑白灰统一样式
   覆盖 components.css 里旧的渐变 / 青绿 hover / 大圆角风格。
   ========================================================================= */

/* 缩略图网格容器：响应列数 */
.x-home-agent-workspace .asset-thumb-grid,
.asset-current-basket .asset-thumb-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
  gap: 10px !important;
  padding: 6px 0 0 !important;
  align-content: start !important;
}

/* 缩略图卡片本体 */
.x-home-agent-workspace .asset-thumb-card,
.asset-current-basket .asset-thumb-card {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  min-width: 0 !important;
  padding: 8px !important;
  border: 1px solid #e5e5e7 !important;
  border-radius: var(--x-r-md, 8px) !important;
  background: #ffffff !important;
  box-shadow: none !important;
  transition: border-color 0.15s ease, background 0.15s ease !important;
}

.x-home-agent-workspace .asset-thumb-card:hover,
.asset-current-basket .asset-thumb-card:hover {
  transform: none !important;
  border-color: #d4d4d8 !important;
  background: #fafafa !important;
  box-shadow: none !important;
}

/* 图片容器（方形） */
.x-home-agent-workspace .asset-thumb-media,
.asset-current-basket .asset-thumb-media {
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  border: 1px solid #e5e5e7 !important;
  border-radius: var(--x-r-sm, 6px) !important;
  background: #fafafa !important;
  background-image: none !important;
}

.x-home-agent-workspace .asset-thumb-media[data-image-preview-src],
.asset-current-basket .asset-thumb-media[data-image-preview-src] {
  cursor: zoom-in !important;
}

.x-home-agent-workspace .asset-thumb-media[data-image-preview-src]:focus-visible,
.asset-current-basket .asset-thumb-media[data-image-preview-src]:focus-visible {
  outline: 2px solid #18181b !important;
  outline-offset: 2px !important;
}

.x-home-agent-workspace .asset-thumb-media img,
.asset-current-basket .asset-thumb-media img {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
  transition: none !important;       /* 取消之前的 hover scale */
}

.x-home-agent-workspace .asset-thumb-card:hover .asset-thumb-media img,
.asset-current-basket .asset-thumb-card:hover .asset-thumb-media img {
  transform: none !important;
}

/* FILE 占位（非图片资产） */
.x-home-agent-workspace .asset-thumb-file,
.asset-current-basket .asset-thumb-file {
  width: 100% !important;
  height: 100% !important;
  display: grid !important;
  place-items: center !important;
  color: #a1a1aa !important;
  font-size: var(--fs-2xs) !important;
  font-weight: 600 !important;
  letter-spacing: 0.12em !important;
  background: #fafafa !important;
}

/* 删除按钮：default 灰，hover 红（删除是危险动作，唯一红规则的合法用法）
   用 aspect-ratio + flex-shrink 强制正方形，避免被 button 默认样式挤变形 */
.x-home-agent-workspace .asset-thumb-remove,
.asset-current-basket .asset-thumb-remove {
  position: absolute !important;
  top: 6px !important;
  right: 6px !important;
  z-index: 2 !important;
  box-sizing: border-box !important;
  width: 20px !important;
  min-width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  aspect-ratio: 1 / 1 !important;
  flex: 0 0 20px !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid #e5e5e7 !important;
  border-radius: var(--x-r-sm, 6px) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  color: #71717a !important;
  font-size: 12px !important;
  line-height: 1 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease !important;
}

.x-home-agent-workspace .asset-thumb-remove:hover,
.asset-current-basket .asset-thumb-remove:hover {
  border-color: #dc2626 !important;
  background: #ffffff !important;
  color: #dc2626 !important;
}

/* 名称 + meta */
.x-home-agent-workspace .asset-thumb-name,
.asset-current-basket .asset-thumb-name {
  min-width: 0 !important;
  color: #18181b !important;
  font-size: var(--fs-2xs) !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  min-height: 2.8em !important;
}

.x-home-agent-workspace .asset-thumb-meta,
.asset-current-basket .asset-thumb-meta {
  color: #a1a1aa !important;
  font-size: var(--fs-2xs) !important;
  line-height: 1.4 !important;
}

/* =========================================================================
   图片预览 modal —— 黑白灰
   ========================================================================= */
.image-preview-modal {
  background: rgba(0, 0, 0, 0.88) !important;
  padding: 32px !important;
}

.image-preview-modal .image-preview-panel {
  width: min(96vw, 1600px) !important;
  height: calc(100vh - 64px) !important;
}

.image-preview-modal .image-preview-panel > img {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: #18181b !important;
  border-radius: var(--x-r-md, 8px) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5) !important;
}

.image-preview-toolbar {
  top: 20px !important;
  right: 20px !important;
}

.image-preview-dl-btn {
  min-height: 36px !important;
  padding: 0 14px !important;
  border: 1px solid #e5e5e7 !important;
  border-radius: var(--x-r-md, 8px) !important;
  background: #ffffff !important;
  color: #18181b !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}

.image-preview-dl-btn:hover {
  background: #18181b !important;
  color: #ffffff !important;
  border-color: #18181b !important;
}

.image-preview-close {
  width: 36px !important;
  height: 36px !important;
  border: 1px solid #e5e5e7 !important;
  border-radius: var(--x-r-md, 8px) !important;
  background: #ffffff !important;
  color: #18181b !important;
  font-size: 20px !important;
  font-weight: 400 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
}

.image-preview-close:hover {
  background: #18181b !important;
  color: #ffffff !important;
  border-color: #18181b !important;
}

.image-preview-title {
  left: 50% !important;
  bottom: 24px !important;
  transform: translateX(-50%) !important;
  max-width: min(72vw, 1280px) !important;
  padding: 8px 14px !important;
  background: rgba(0, 0, 0, 0.72) !important;
  color: #ffffff !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  border-radius: var(--x-r-md, 8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  backdrop-filter: blur(4px) !important;
}

/* =========================================================================
   素材库 modal —— 全部黑白灰化
   覆盖 experience.css 里旧的青绿 hover / checked / 渐变 / 大圆角风格。
   ========================================================================= */

/* modal 容器 + panel */
.asset-library-modal {
  padding: 16px !important;
}
.asset-library-modal .modal-panel {
  border: 1px solid #e5e5e7 !important;
  border-radius: var(--x-r-modal, 14px) !important;
  background: #ffffff !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18) !important;
}

/* 标题栏 */
.asset-library-modal .modal-head {
  min-height: 56px !important;
  padding: 14px 20px !important;
  border-bottom: 1px solid #f4f4f5 !important;
  background: #ffffff !important;
}
.asset-library-modal .modal-head h3,
.asset-library-modal .modal-head strong {
  color: #18181b !important;
  font-size: var(--fs-md) !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

/* 关闭按钮 × */
.asset-library-modal .modal-close {
  width: var(--x-ctrl-md, 32px) !important;
  height: var(--x-ctrl-md, 32px) !important;
  padding: 0 !important;
  border: 1px solid #e5e5e7 !important;
  border-radius: var(--x-r-md, 8px) !important;
  background: #ffffff !important;
  color: #71717a !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  box-shadow: none !important;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
}
.asset-library-modal .modal-close:hover {
  background: #18181b !important;
  border-color: #18181b !important;
  color: #ffffff !important;
}

/* row card —— 黑白灰，去渐变 / 去 lift */
.asset-library-modal .asset-library-row {
  border: 1px solid #e5e5e7 !important;
  border-radius: var(--x-r-md, 8px) !important;
  background: #ffffff !important;
  background-image: none !important;
  box-shadow: none !important;
  transform: none !important;
  transition: border-color 0.15s ease, background 0.15s ease !important;
}
.asset-library-modal .asset-library-row:hover {
  border-color: #d4d4d8 !important;
  background: #fcfcfd !important;
  background-image: none !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  transform: none !important;
}
.asset-library-modal .asset-library-row.is-selected {
  border-color: #18181b !important;
  background: #f8f8f8 !important;
  background-image: none !important;
  box-shadow: inset 0 0 0 1px #18181b, 0 1px 2px rgba(15, 23, 42, 0.05) !important;
}

/* 缩略图 media + img hover 静止 */
.asset-library-modal .asset-library-thumb-media {
  border: 1px solid #e5e5e7 !important;
  border-radius: var(--x-r-sm, 6px) !important;
  background: #fafafa !important;
  background-image: none !important;
}
.asset-library-modal .asset-library-row:hover .asset-library-thumb-media img,
.asset-library-modal .asset-library-row .asset-library-thumb-media img {
  transform: none !important;
  transition: none !important;
}

/* FILE 占位 */
.asset-library-modal .asset-library-thumb-file {
  color: #a1a1aa !important;
  background: #fafafa !important;
  font-size: var(--fs-2xs) !important;
  font-weight: 600 !important;
  letter-spacing: 0.12em !important;
}

/* checkbox：default 白底灰边、checked 黑底白勾 */
.asset-library-modal .asset-library-check {
  appearance: none !important;
  border: 1.5px solid #a1a1aa !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  accent-color: #18181b !important;
  transition: border-color 0.15s ease, background 0.15s ease !important;
}
.asset-library-modal .asset-library-check:hover {
  border-color: #18181b !important;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08) !important;
}
.asset-library-modal .asset-library-check:checked {
  border-color: #18181b !important;
  background: #18181b !important;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.10) !important;
}
.asset-library-modal .asset-library-check:checked::after {
  border-color: #ffffff !important;
}

/* 文件名 */
.asset-library-modal .asset-library-row-main strong {
  color: #18181b !important;
  font-weight: 600 !important;
}

/* 底部按钮区 */
.asset-library-modal .asset-library-actions {
  padding: 16px 20px 18px !important;
  border-top: 1px solid #f4f4f5 !important;
  background: #ffffff !important;
}
.asset-library-modal .asset-library-actions button {
  min-width: 64px !important;
  min-height: var(--x-ctrl-lg, 38px) !important;
  padding: 0 16px !important;
  border-radius: var(--x-r-md, 8px) !important;
  font-size: var(--fs-sm) !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
}

/* 全选（secondary）：白底灰边 */
.asset-library-modal .asset-library-actions button:not(.primary):not(.danger) {
  border: 1px solid #e5e5e7 !important;
  background: #ffffff !important;
  color: #18181b !important;
}
.asset-library-modal .asset-library-actions button:not(.primary):not(.danger):hover {
  border-color: #18181b !important;
  background: #fafafa !important;
}

/* 删除（danger）：白底红字红边，hover 浅红底 —— 唯一红的合法用法 */
.asset-library-modal .asset-library-actions .danger {
  border: 1px solid #fecaca !important;
  background: #ffffff !important;
  color: #b91c1c !important;
}
.asset-library-modal .asset-library-actions .danger:hover {
  border-color: #b91c1c !important;
  background: #fef2f2 !important;
  color: #b91c1c !important;
}

/* 确认（primary）：黑底白字 */
.asset-library-modal .asset-library-actions .primary {
  min-width: 72px !important;
  border: 1px solid #18181b !important;
  background: #18181b !important;
  color: #ffffff !important;
}
.asset-library-modal .asset-library-actions .primary:hover {
  background: #27272a !important;
  border-color: #27272a !important;
}

/* =========================================================================
   Hardcoded 青绿色清零（覆盖 components/experience/responsive 中
   不走 var(--brand) 的硬编码 #0f766e / #14b8a6 / #2dd4bf / rgba 青绿）
   全部限制在 body.x-home-body 命名空间下，未登录态保留原品牌青绿。
   ========================================================================= */

/* 工作区 tab 高亮 —— 黑色下划线 + 黑文字 */
body.x-home-body .workspace-body > .tab-bar .tab-button.active,
body.x-home-body .tab-button.active {
  color: #18181b !important;
}
body.x-home-body .workspace-body > .tab-bar .tab-button.active::after,
body.x-home-body .tab-button.active::after {
  background: #18181b !important;
}

/* 员工工作区导航条固定在工作区顶部 */
body.x-home-body .x-home-agent-workspace .workspace-body > .tab-bar {
  position: sticky !important;
  top: 0 !important;
  z-index: 24 !important;
}

/* 员工卡选中态 —— 黑边 + 浅灰底 */
body.x-home-body .employee-card.selected {
  border-color: #18181b !important;
  background: #fafafa !important;
  background-image: none !important;
  box-shadow: inset 0 0 0 1px #18181b !important;
}
body.x-home-body .employee-card.selected::before {
  background: #18181b !important;
}
body.x-home-body .employee-card:hover {
  border-color: #d4d4d8 !important;
  background: #fafafa !important;
}

/* 任务卡选中态 —— 黑边白底（无装饰渐变） */
body.x-home-body .task-item.selected {
  border-color: #18181b !important;
  background: #fafafa !important;
  background-image: none !important;
  box-shadow: inset 0 0 0 1px #18181b !important;
}
body.x-home-body .task-item:hover {
  border-color: #d4d4d8 !important;
}

/* primary 按钮（配置保存 / header / modal 确认）—— 黑底白字，去青绿阴影 */
body.x-home-body .config-actions .primary,
body.x-home-body .header-actions .primary,
body.x-home-body .modal-actions .primary {
  background: #18181b !important;
  border-color: #18181b !important;
  color: #ffffff !important;
  box-shadow: none !important;
}
body.x-home-body .config-actions .primary:hover,
body.x-home-body .header-actions .primary:hover,
body.x-home-body .modal-actions .primary:hover {
  background: #27272a !important;
  border-color: #27272a !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

/* 筛选 chip 激活态 —— 黑底白字 */
body.x-home-body .filter-chip.active {
  background: #18181b !important;
  border-color: #18181b !important;
  color: #ffffff !important;
}

/* 进度条 —— 渐变从青绿改为黑灰 */
body.x-home-body .task-progress span,
body.x-home-body .progress-rail span {
  background: linear-gradient(90deg, #18181b, #404040) !important;
}

/* 状态点 —— 默认黑实心，特殊状态由父级 tone-* 决定 */
body.x-home-body .status-dot {
  background: #18181b !important;
  background-image: none !important;
}

/* 概览数值 tone —— success/brand 也改黑（保留 failed/error 红） */
body.x-home-body .summary-item.tone-brand .value,
body.x-home-body .summary-item.tone-success .value,
body.x-home-body .summary-progress-number {
  color: #18181b !important;
}

/* 空状态 —— 灰虚线 + 灰内点 */
body.x-home-body .empty {
  border-color: #e5e5e7 !important;
  color: #71717a !important;
  background: transparent !important;
}
body.x-home-body .empty::before {
  border-color: #d4d4d8 !important;
  background-image: radial-gradient(circle at 50% 50%, #a1a1aa 0 3px, transparent 4px) !important;
  background-color: transparent !important;
  box-shadow: 0 0 0 6px #fafafa !important;
}

/* 路径相关组件 —— 全部去青绿 */
body.x-home-body .path-action-button,
body.x-home-body .path-action-button-cloud,
body.x-home-body .path-link,
body.x-home-body .path-input-row input[readonly] {
  border-color: #e5e5e7 !important;
  color: #18181b !important;
}
body.x-home-body .path-action-button:hover,
body.x-home-body .path-action-button-cloud:hover,
body.x-home-body .path-link:hover,
body.x-home-body .path-input-row input[readonly]:hover {
  border-color: #18181b !important;
  background: #fafafa !important;
  color: #18181b !important;
}
body.x-home-body .path-selected-name {
  color: #18181b !important;
}

/* 产物链接 —— 灰边黑字，hover 黑边 */
body.x-home-body .artifact-link {
  border-color: #e5e5e7 !important;
  color: #18181b !important;
  background: #ffffff !important;
}
body.x-home-body .artifact-link:hover {
  border-color: #18181b !important;
  background: #fafafa !important;
  color: #18181b !important;
}
body.x-home-body .artifact-key {
  color: #71717a !important;
}
body.x-home-body .artifact-item.is-uploaded {
  border-color: #e5e5e7 !important;
}
body.x-home-body .artifact-preview-image:focus-visible {
  border-color: #18181b !important;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.10) !important;
}

/* 表单字段聚焦态 —— 黑边 */
body.x-home-body .config-field-card:focus-within,
body.x-home-body .search-box input:focus,
body.x-home-body .task-search-box input:focus {
  border-color: #18181b !important;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06) !important;
}

/* 必填星号 / 提示词框 / snapshot 索引 —— 不再用青绿装饰 */
body.x-home-body .field-required {
  border-color: #e5e5e7 !important;
  color: #18181b !important;
  background: #fafafa !important;
}
body.x-home-body .prompt-library-box {
  background-image: none !important;
  background: #ffffff !important;
  box-shadow: none !important;
  border-color: #e5e5e7 !important;
}
body.x-home-body .snapshot-path-index {
  border-color: #e5e5e7 !important;
  color: #71717a !important;
}

/* 素材中心装饰渐变 / 边线 —— 全部去掉 */
body.x-home-body .asset-center-shell::before,
body.x-home-body .asset-center-panel-head::before {
  display: none !important;
}
body.x-home-body .asset-upload-card.is-cloud,
body.x-home-body .config-managed-card.is-cloud {
  border-color: #e5e5e7 !important;
  background: #ffffff !important;
  background-image: none !important;
}

/* count badge —— 黑底白字 */
body.x-home-body .count-badge {
  background: #18181b !important;
  background-image: none !important;
  color: #ffffff !important;
  border-color: #18181b !important;
}

/* hero-avatar / category-data / category-image —— 中性灰 */
body.x-home-body .category-image,
body.x-home-body .category-data {
  background: #fafafa !important;
  background-image: none !important;
  border-color: #e5e5e7 !important;
  color: #18181b !important;
}

/* 移动端导航激活态 */
body.x-home-body .mobile-nav button.active {
  background: #18181b !important;
  border-color: #18181b !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.x-home-agent-workspace .workspace-back-btn {
  display: none;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  font-size: 13px;
  font-weight: 600;
}
body.x-home-body .mobile-nav button.is-active {
  background: #18181b !important;
  border-color: #18181b !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

/* asset-library 旧版 row hover/checked（在 modal 容器外的列表场景） */
body.x-home-body .asset-library-row:hover {
  border-color: #d4d4d8 !important;
  background: #fafafa !important;
  background-image: none !important;
  box-shadow: none !important;
  transform: none !important;
}
body.x-home-body .asset-library-row.is-selected {
  border-color: #18181b !important;
  background: #fafafa !important;
  background-image: none !important;
  box-shadow: inset 0 0 0 1px #18181b !important;
}

/* responsive.css 里 !important 强制写死的青绿，需要更高权重才能压过 */
body.x-home-body .asset-library-modal input.asset-library-check:checked {
  border-color: #18181b !important;
  background: #18181b !important;
}
body.x-home-body .asset-library-modal .asset-library-thumb-media[data-image-preview-src]:focus-visible {
  outline: 2px solid #18181b !important;
}

/* body 大背景去青绿渐变（保持纯灰背景） */
body.is-authenticated.x-home-body {
  background: #fafafa !important;
  background-image: none !important;
}

/* Asset workspace final sizing fixes:
   keep the task-panel thumbnail grid square and scrollable without affecting
   the standalone desktop asset library layout. */
.x-home-agent-workspace .app-shell {
  grid-template-columns: 240px minmax(0, 1fr) !important;
}

.x-home-agent-workspace .center-pane,
.x-home-agent-workspace .workspace {
  min-width: 0 !important;
  min-height: 0 !important;
}

.x-home-agent-workspace .center-pane {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.x-home-agent-workspace .workspace {
  overflow: hidden !important;
}

.x-home-agent-workspace .tab-panel.active .asset-upload-list {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
  align-items: start !important;
}

.x-home-agent-workspace .tab-panel.active .asset-upload-card {
  min-width: 0 !important;
  min-height: 0 !important;
}

.x-home-agent-workspace .tab-panel.active .asset-current-basket {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  min-height: 0 !important;
  max-height: 520px !important;
  overflow: hidden !important;
}

.x-home-agent-workspace .tab-panel.active .asset-current-basket-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

.x-home-agent-workspace .tab-panel.active .asset-current-basket-head span {
  flex: 0 0 auto !important;
  color: #71717a !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
}

.x-home-agent-workspace .tab-panel.active .asset-thumb-grid,
.asset-current-basket .asset-thumb-grid {
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  min-height: 0 !important;
  max-height: 420px !important;
  padding-right: 2px !important;
}

.asset-current-basket .asset-thumb-card {
  align-self: start !important;
}

.asset-current-basket .asset-thumb-media,
.asset-current-basket .asset-thumb-media img {
  aspect-ratio: 1 / 1 !important;
}

.asset-library-modal .asset-library-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)) !important;
  grid-auto-rows: minmax(176px, max-content) !important;
  gap: 12px !important;
  align-content: start !important;
}

.asset-library-modal .asset-library-row {
  position: relative !important;
  display: grid !important;
  grid-template-rows: auto auto !important;
  align-content: start !important;
  align-self: stretch !important;
  min-height: 176px !important;
  height: 100% !important;
  padding: 8px !important;
  gap: 8px !important;
  border: 1px solid #e7e7ea !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  overflow: hidden !important;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease !important;
}

.asset-library-modal .asset-library-thumb {
  min-width: 0 !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
}

.asset-library-modal .asset-library-thumb-media,
.asset-library-modal .asset-library-thumb-media img {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  height: 100% !important;
  display: block !important;
}

.asset-library-modal .asset-library-thumb-media {
  border-radius: 8px !important;
  background: #f7f7f8 !important;
  overflow: hidden !important;
}

.asset-library-modal .asset-library-check-control {
  position: absolute !important;
  top: 7px !important;
  right: 7px !important;
  z-index: 3 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px !important;
  height: 22px !important;
  opacity: 0.72 !important;
  transition: opacity 120ms ease !important;
}

.asset-library-modal .asset-library-row:hover .asset-library-check-control,
.asset-library-modal .asset-library-row.is-selected .asset-library-check-control,
.asset-library-modal .asset-library-row:focus-within .asset-library-check-control {
  opacity: 1 !important;
}

.asset-library-modal .asset-library-check,
.asset-library-modal input.asset-library-check,
.asset-library-modal input[type="checkbox"].asset-library-check,
.asset-library-modal input[type="radio"].asset-library-check {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 0 !important;
  cursor: pointer !important;
  z-index: 2 !important;
}

.asset-library-modal .asset-library-check-ui {
  position: relative !important;
  width: 16px !important;
  height: 16px !important;
  border: 1.5px solid rgba(161, 161, 170, 0.9) !important;
  border-radius: 4px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.10) !important;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease !important;
}

.asset-library-modal .asset-library-row:hover .asset-library-check-ui {
  border-color: rgba(82, 82, 91, 0.82) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12) !important;
}

.asset-library-modal .asset-library-check:focus-visible + .asset-library-check-ui {
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08), 0 1px 2px rgba(15, 23, 42, 0.10) !important;
}

.asset-library-modal .asset-library-check:checked + .asset-library-check-ui {
  border-color: #18181b !important;
  background: #18181b !important;
  box-shadow: 0 0 0 1px rgba(24, 24, 27, 0.08), 0 2px 4px rgba(15, 23, 42, 0.12) !important;
}

.asset-library-modal .asset-library-check:checked + .asset-library-check-ui::after {
  content: "" !important;
  position: absolute !important;
  left: 5px !important;
  top: 2px !important;
  width: 4px !important;
  height: 8px !important;
  border: solid #ffffff !important;
  border-width: 0 2px 2px 0 !important;
  transform: rotate(45deg) !important;
}

.asset-library-modal .asset-library-row-main {
  min-width: 0 !important;
  padding: 1px 2px 2px !important;
}

.asset-library-modal .asset-library-row-main strong {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  font-weight: 600 !important;
  color: #18181b !important;
}

.asset-library-modal .asset-library-row-main span {
  display: none !important;
}

body.x-home-body .x-home-agent-workspace .tab-panel[data-tab-panel="config"] .field input,
body.x-home-body .x-home-agent-workspace .tab-panel[data-tab-panel="config"] .field select,
body.x-home-body .x-home-agent-workspace .tab-panel[data-tab-panel="config"] .path-input-row input,
body.x-home-body .x-home-agent-workspace .tab-panel[data-tab-panel="config"] .prompt-library-row input,
body.x-home-body .x-home-agent-workspace .tab-panel[data-tab-panel="config"] .prompt-library-row select,
body.x-home-body .x-home-agent-workspace .tab-panel[data-tab-panel="config"] .field .x-select,
body.x-home-body .x-home-agent-workspace .tab-panel[data-tab-panel="config"] .field .x-select [data-x-select-trigger] {
  height: 35px !important;
  min-height: 35px !important;
  max-height: 35px !important;
  line-height: 35px !important;
  box-sizing: border-box !important;
}

body.x-home-body .x-home-agent-workspace .tab-panel[data-tab-panel="config"] .field .x-select [data-x-select-trigger] {
  display: inline-flex !important;
  align-items: center !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body.x-home-body .x-home-assets-tool {
  height: 35px !important;
  min-height: 35px !important;
  padding: 0 12px !important;
  border: 1px solid #d4d4d8 !important;
  background: #ffffff !important;
  border-radius: 10px !important;
  color: #18181b !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 13px !important;
  line-height: 1 !important;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, color 120ms ease !important;
}

body.x-home-body .x-home-assets-tool:hover {
  background: #fafafa !important;
  border-color: #a1a1aa !important;
}

body.x-home-body .x-home-assets-tool:focus-visible {
  outline: none !important;
  border-color: #18181b !important;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.10) !important;
}

body.x-home-body .x-home-assets-tool-icon {
  width: 16px !important;
  height: 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: none !important;
}

body.x-home-body .x-home-assets-tool-label {
  white-space: nowrap !important;
}

body.x-home-body .x-home-assets-action {
  height: 35px !important;
  min-height: 35px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.x-home-body .x-home-assets-action:focus-visible {
  outline: none !important;
  border-color: #18181b !important;
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.10) !important;
}

body.x-home-body .x-home-assets-action.is-primary,
body.x-home-body .x-home-assets-filters .x-home-assets-action#xHomeAssetsSelectAll {
  background: #18181b !important;
  color: #ffffff !important;
  border-color: #18181b !important;
  font-weight: 500 !important;
}

body.x-home-body .x-home-assets-action.is-primary:hover,
body.x-home-body .x-home-assets-filters .x-home-assets-action#xHomeAssetsSelectAll:hover {
  background: #27272a !important;
  border-color: #27272a !important;
  color: #ffffff !important;
}

/* ========================================
   响应式适配：2K屏、小屏优化
   ======================================== */

/* 2K屏优化 (1920px - 2560px) */
@media (min-width: 1920px) {
  .x-home {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .x-home-sidebar {
    padding: 18px 14px 14px;
    gap: 16px;
  }

  .x-home-sidebar-brand {
    padding: 10px 12px 12px;
  }

  .x-home-brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  .x-home-brand-copy strong {
    font-size: 18px;
  }

  .x-home-sidebar-item {
    min-height: 38px;
    padding: 0 12px;
    font-size: 14px;
    gap: 12px;
  }

  .x-home-sidebar-icon {
    width: 20px;
    height: 20px;
  }

  .x-home-sidebar-heading {
    padding: 10px 12px 5px;
    font-size: 11px;
  }

  .x-home-workspace {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
  }

  .x-home-welcome {
    padding: 48px 0 32px;
  }

  .x-home-title {
    font-size: 36px;
  }

  .x-home-thread {
    gap: 20px;
    padding: 0 0 24px;
  }

  .x-home-composer {
    padding: 16px;
    border-radius: 16px;
  }

  .x-home-input {
    font-size: 15px;
    padding: 14px 16px;
    min-height: 52px;
  }

  .x-home-send {
    width: 42px;
    height: 42px;
  }

  .x-home-quick-actions {
    gap: 12px;
    margin-top: 16px;
  }

  .x-home-quick-actions button {
    padding: 10px 16px;
    font-size: 14px;
    min-height: 42px;
  }

  .x-home-assets-workspace {
    padding: 32px 48px;
  }

  .x-home-assets-head {
    padding-bottom: 28px;
  }

  .x-home-assets-head-title h1 {
    font-size: 32px;
  }

  .x-home-assets-grid {
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 10px;
  }
}

/* 超大屏优化 (2560px+): 4K/5K显示器 */
@media (min-width: 2560px) {
  .x-home {
    grid-template-columns: 360px minmax(0, 1fr);
  }

  .x-home-sidebar {
    padding: 20px 16px 16px;
  }

  .x-home-sidebar-item {
    min-height: 40px;
    padding: 0 14px;
    font-size: 15px;
  }

  .x-home-workspace {
    max-width: 1600px;
    padding: 32px;
  }

  .x-home-title {
    font-size: 42px;
  }

  .x-home-input {
    font-size: 16px;
    padding: 16px 18px;
    min-height: 56px;
  }

  .x-home-quick-actions button {
    padding: 12px 18px;
    font-size: 15px;
    min-height: 46px;
  }

  .x-home-assets-workspace {
    padding: 40px 64px;
  }

  .x-home-assets-grid {
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 10px;
  }
}

/* 小屏优化 (1024px - 1366px): 笔记本电脑 */
@media (min-width: 1024px) and (max-width: 1366px) {
  .x-home {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .x-home-sidebar {
    padding: 12px 8px 8px;
    gap: 12px;
  }

  .x-home-sidebar-brand {
    padding: 6px 8px 8px;
  }

  .x-home-brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .x-home-brand-copy strong {
    font-size: 15px;
  }

  .x-home-sidebar-item {
    min-height: 32px;
    padding: 0 8px;
    font-size: 12px;
    gap: 8px;
  }

  .x-home-sidebar-icon {
    width: 16px;
    height: 16px;
  }

  .x-home-sidebar-heading {
    padding: 6px 8px 3px;
    font-size: 10px;
  }

  .x-home-history-search {
    padding: 5px 8px;
    font-size: 11px;
  }

  .x-home-sidebar-history-list li {
    min-height: 30px;
    padding: 0 3px 0 8px;
    font-size: 12px;
  }

  .x-home-workspace {
    padding: 16px;
  }

  .x-home-welcome {
    padding: 32px 0 20px;
  }

  .x-home-title {
    font-size: 26px;
  }

  .x-home-composer {
    padding: 12px;
    border-radius: 12px;
  }

  .x-home-input {
    font-size: 13px;
    padding: 10px 12px;
    min-height: 42px;
  }

  .x-home-send {
    width: 36px;
    height: 36px;
  }

  .x-home-quick-actions {
    gap: 8px;
    margin-top: 12px;
  }

  .x-home-quick-actions button {
    padding: 8px 12px;
    font-size: 12px;
    min-height: 36px;
  }

  .x-home-composer-tools {
    gap: 6px;
  }

  .x-home-tool-btn {
    width: 32px;
    height: 32px;
  }

  .x-home-mode-trigger,
  .x-home-model-trigger {
    padding: 6px 10px;
    font-size: 11px;
    min-height: 32px;
  }

  .x-home-assets-workspace {
    padding: 20px 24px;
  }

  .x-home-assets-head-title h1 {
    font-size: 24px;
  }

  .x-home-assets-grid {
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 10px;
  }
}

/* 平板横屏 (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .x-home {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .x-home-sidebar {
    padding: 10px 6px 6px;
    gap: 10px;
  }

  .x-home-sidebar-brand {
    padding: 5px 6px 6px;
  }

  .x-home-brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .x-home-brand-copy strong {
    font-size: 14px;
  }

  .x-home-sidebar-item {
    min-height: 30px;
    padding: 0 6px;
    font-size: 11px;
    gap: 6px;
  }

  .x-home-sidebar-icon {
    width: 14px;
    height: 14px;
  }

  .x-home-workspace {
    padding: 12px;
  }

  .x-home-title {
    font-size: 24px;
  }

  .x-home-input {
    font-size: 13px;
  }

  .x-home-quick-actions {
    flex-wrap: wrap;
  }

  .x-home-quick-actions button {
    flex: 1 1 calc(50% - 4px);
    min-width: 140px;
  }
}

/* 移动端 (< 768px) */
@media (max-width: 767px) {
  .x-home {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
  }

  .x-home-mobile-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
    background: rgba(250, 250, 250, 0.92);
    border-bottom: 1px solid rgba(229, 229, 231, 0.9);
    backdrop-filter: blur(14px);
  }

  .x-home-mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 4px 14px 4px 2px;
    border-radius: 12px;
    color: #18181b;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .x-home-mobile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .x-home-mobile-login,
  .x-home-mobile-account {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #ffffff;
    color: #18181b;
    font-size: 13px;
    font-weight: 600;
  }

  .x-home-mobile-account {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 150px;
  }

  .x-home-mobile-account-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .x-home-workspace,
  .x-home-agent-workspace,
  .x-home-assets-workspace {
    grid-column: 1;
  }

  .x-home-sidebar {
    display: none;
  }

  .x-home-mobile-history {
    width: min(768px, calc(100vw - 24px));
    display: grid;
    gap: 10px;
    margin-top: 8px;
    padding: 0 2px;
    flex: 0 1 min(36dvh, 320px);
    min-height: 148px;
    max-height: min(36dvh, 320px);
    overflow: hidden;
  }

  .x-home-mobile-history-head {
    padding: 0 4px;
    color: #8e8e93;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
  }

  .x-home-mobile-history-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 6px;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
  }

  .x-home-mobile-history-list li {
    min-height: 42px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 0 8px 0 12px;
    border: 1px solid #ececf0;
    border-radius: 14px;
    background: #ffffff;
    color: #27272a;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.035);
  }

  .x-home-mobile-history-list .x-home-history-group-header {
    min-height: 18px;
    padding: 8px 4px 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #8e8e93;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
  }

  .x-home-mobile-history-list .x-home-sidebar-history-empty {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    text-align: center;
    color: #8e8e93;
  }

  .x-home-workspace {
    height: calc(100dvh - 86px - env(safe-area-inset-bottom));
    min-height: calc(100dvh - 86px - env(safe-area-inset-bottom));
    padding: 12px;
    padding-top: 72px;
    padding-bottom: 12px;
    justify-content: flex-start;
    overflow: hidden;
  }

  .x-home-welcome {
    flex: 0 0 auto;
    padding: 20px 0 16px;
  }

  .x-home-title {
    font-size: 22px;
  }

  .x-home-composer {
    flex: 0 0 auto;
    padding: 10px;
  }

  .x-home-input {
    font-size: 14px;
    padding: 10px 12px;
  }

  .x-home-quick-actions {
    flex: 0 0 auto;
    flex-direction: column;
    gap: 8px;
  }

  .x-home-quick-actions button {
    width: 100%;
  }

  .x-home-assets-workspace {
    padding: 72px 16px 16px;
  }

  .x-home-assets-grid {
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 10px;
  }
}

@media (max-width: 1320px) {
  .x-home-assets-head {
    padding: 16px 14px 12px !important;
    display: grid !important;
    gap: 12px !important;
  }

  .x-home-assets-head-title {
    display: grid;
    gap: 8px;
  }

  .x-home-assets-capacity {
    min-width: 0 !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .x-home-assets-capacity > span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }

  .x-home-assets-capacity-bar {
    width: 100% !important;
  }

  .x-home-assets-toolbar {
    padding: 12px 14px !important;
    display: grid !important;
    gap: 10px !important;
    align-items: stretch !important;
  }

  .x-home-assets-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .x-home-assets-tabs button {
    min-height: 40px !important;
    padding: 0 10px !important;
    writing-mode: horizontal-tb !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  .x-home-assets-filters {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    align-items: stretch !important;
    justify-content: stretch !important;
  }

  .x-home-assets-filters > * {
    min-width: 0;
  }

  .x-home-assets-filters .x-home-assets-action#xHomeAssetsSelectAll {
    order: 1;
  }

  .x-home-assets-filters .x-home-assets-action#xHomeAssetsSelectAll,
  .x-home-assets-tool,
  .x-home-assets-employee-filter {
    width: 100% !important;
    min-height: 40px !important;
  }

  .x-home-assets-employee-filter {
    order: 3;
    grid-column: 1 / -1 !important;
  }

  .x-home-assets-tool {
    order: 2;
    min-width: 0 !important;
    justify-content: center !important;
  }

  .x-home-assets-selection-bar {
    order: 4;
    grid-column: 1 / -1;
    display: grid !important;
    gap: 8px !important;
  }

  .x-home-assets-selection-bar[hidden] {
    display: none !important;
  }

  .x-home-assets-selection-bar .x-home-assets-action {
    width: 100% !important;
    height: 40px !important;
  }

  .x-home-assets-media-tabs {
    padding: 12px 14px !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)) !important;
    gap: 8px !important;
    overflow: visible !important;
    flex-wrap: wrap !important;
    scrollbar-width: auto;
  }

  .x-home-assets-media-tabs::-webkit-scrollbar {
    display: none;
  }

  .x-home-assets-media-tabs button {
    width: 100% !important;
    min-height: 40px !important;
    padding: 0 14px !important;
    white-space: nowrap !important;
    justify-content: center !important;
  }

  .x-home-assets-pagination {
    padding: 8px 12px 6px !important;
    display: grid !important;
    gap: 4px !important;
    justify-items: stretch !important;
    align-items: start !important;
    border-bottom: 0 !important;
  }

  .x-home-assets-pagination-summary {
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    row-gap: 4px !important;
  }

  .x-home-assets-pagination-controls {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    overflow-x: auto !important;
    justify-content: flex-start !important;
    scrollbar-width: none;
  }

  .x-home-assets-pagination-controls::-webkit-scrollbar {
    display: none;
  }

  .x-home-assets-page-btn,
  .x-home-assets-page-ellipsis {
    flex: 0 0 auto !important;
  }

  .x-home-assets-body {
    display: flex !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding-bottom: calc(104px + env(safe-area-inset-bottom)) !important;
  }

  .x-home-assets-grid {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 10px 12px calc(120px + env(safe-area-inset-bottom)) !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .x-home-composer {
    margin-bottom: calc(84px + env(safe-area-inset-bottom)) !important;
  }

  .x-home-thread {
    padding-bottom: calc(24px + env(safe-area-inset-bottom)) !important;
  }

  .x-home-assets-detail {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    z-index: 82 !important;
    border-left: 0 !important;
    border-top: 1px solid #e5e7eb !important;
    border-radius: 20px 20px 0 0 !important;
    box-shadow: 0 -12px 36px rgba(15, 23, 42, 0.16) !important;
    max-height: 72dvh !important;
  }

  .x-home-agent-workspace .app-shell {
    display: block !important;
    height: calc(100dvh - 132px) !important;
    min-height: calc(100dvh - 132px) !important;
    overflow: hidden !important;
  }

  .x-home-agent-workspace .center-pane,
  .x-home-agent-workspace .workspace {
    display: none !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
  }

  .x-home-agent-workspace .app-shell[data-mobile-view="panel"] .center-pane {
    display: flex !important;
  }

  .x-home-agent-workspace .app-shell[data-mobile-view="workspace"] .workspace {
    display: flex !important;
  }

  .x-home-agent-workspace .mobile-nav-agent {
    display: none !important;
  }

  .x-home-agent-workspace .mobile-nav-agent[hidden] {
    display: none !important;
  }

  .x-home-agent-workspace .app-shell[data-mobile-workspace-open="true"] ~ .mobile-nav-agent {
    display: none !important;
  }

  .x-home-agent-workspace .mobile-nav-agent button {
    min-height: 40px !important;
    border-radius: 14px !important;
    font-size: 14px !important;
  }

  .x-home-agent-workspace .center-pane {
    padding: 10px !important;
    gap: 10px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .x-home-agent-workspace .app-shell[data-mobile-view="panel"] .center-pane,
  .x-home-agent-workspace .app-shell[data-mobile-view="workspace"] .workspace {
    padding-bottom: 12px !important;
  }

  .x-home-agent-workspace .center-card,
  .x-home-agent-workspace .workspace-card {
    padding: 10px !important;
  }

  .x-home-agent-workspace .employee-list {
    gap: 4px !important;
  }

  .x-home-agent-workspace .workspace-head {
    padding: 10px !important;
    gap: 10px !important;
    flex: 0 0 auto !important;
  }

  .x-home-agent-workspace .workspace-back-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: fit-content;
  }

  .x-home-agent-workspace .workspace-title h2 {
    font-size: 18px !important;
  }

  .x-home-agent-workspace .workspace {
    overflow: hidden !important;
  }

  .x-home-agent-workspace .workspace-body {
    min-height: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
  }

  .x-home-agent-workspace .tab-panel-wrap {
    min-height: 0 !important;
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(108px + env(safe-area-inset-bottom)) !important;
  }

  .x-home-agent-workspace .tab-panel {
    min-height: 100% !important;
  }

  .x-home-agent-workspace .config-form-scroll,
  .x-home-agent-workspace #taskList,
  .x-home-agent-workspace .json-box.scroll,
  .x-home-agent-workspace .mono.scroll,
  .x-home-agent-workspace .asset-center-panel-body {
    max-height: none !important;
    overflow: visible !important;
  }

  .x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-shell {
    padding-bottom: calc(104px + env(safe-area-inset-bottom)) !important;
  }

  .x-home-agent-workspace .tab-panel[data-tab-panel="config"] .config-actions {
    padding-bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    margin-bottom: calc(84px + env(safe-area-inset-bottom)) !important;
  }

  .x-home-assets-workspace {
    min-height: calc(100dvh - 132px) !important;
  }

  .x-home-assets-body {
    min-height: 0 !important;
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(104px + env(safe-area-inset-bottom)) !important;
  }

  .x-home-assets-grid {
    min-height: 0 !important;
    padding-bottom: calc(128px + env(safe-area-inset-bottom)) !important;
  }

  .x-home-agent-workspace .employee-card.simple {
    min-height: 64px !important;
    padding: 10px 12px 10px 14px !important;
  }

  .x-home-agent-workspace .employee-row-meta {
    gap: 4px !important;
    flex-wrap: wrap !important;
  }
}

@media (max-width: 560px) {
  .x-home-assets-head {
    padding: 14px 12px 10px !important;
  }

  .x-home-assets-head h1 {
    font-size: 24px !important;
  }

  .x-home-assets-head-sub {
    font-size: 13px !important;
  }

  .x-home-assets-toolbar {
    padding: 10px 12px !important;
  }

  .x-home-assets-tabs {
    gap: 6px !important;
  }

  .x-home-assets-tabs button {
    min-height: 36px !important;
    padding: 0 8px !important;
    font-size: 13px !important;
  }

  .x-home-assets-media-tabs {
    padding: 12px 12px !important;
  }

  .x-home-assets-pagination {
    padding: 8px 12px 4px !important;
  }

  .x-home-assets-pagination-controls.is-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .x-home-assets-page-btn {
    min-width: 0 !important;
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }

  .x-home-assets-page-nav {
    min-width: 0 !important;
  }

  .x-home-assets-grid {
    padding: 8px 12px calc(120px + env(safe-area-inset-bottom)) !important;
    gap: 10px !important;
  }

  .x-home-assets-meta {
    padding: 9px 10px !important;
  }

  .x-home-assets-meta strong {
    font-size: 12px !important;
  }

  .x-home-assets-meta span {
    font-size: 10px !important;
  }

  .x-home-assets-detail {
    max-height: 78dvh !important;
  }

  .x-home-agent-workspace .mobile-nav-agent {
    left: 10px !important;
    right: 10px !important;
    bottom: calc(82px + env(safe-area-inset-bottom)) !important;
  }

  .x-home-agent-workspace .mobile-nav-agent button {
    min-height: 38px !important;
    font-size: 13px !important;
  }
}

/* Desktop asset library restore: keep the old two-pane layout and let only
   the thumbnail pane scroll internally. Mobile rules stay isolated above. */
@media (min-width: 1321px) {
  .x-home.is-assets-view .x-home-assets-workspace {
    padding: 24px 24px 20px !important;
  }

  .x-home.is-assets-view .x-home-assets-head {
    padding: 18px 24px 12px !important;
  }

  .x-home.is-assets-view .x-home-assets-toolbar,
  .x-home.is-assets-view .x-home-assets-media-tabs,
  .x-home.is-assets-view .x-home-assets-pagination {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  .x-home.is-assets-view .x-home-assets-body {
    grid-template-columns: minmax(0, 1fr) 420px !important;
    overflow: hidden !important;
  }

  .x-home.is-assets-view .x-home-assets-grid {
    padding: 20px 24px 18px !important;
    grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)) !important;
    grid-auto-rows: max-content !important;
    gap: 12px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    align-content: start !important;
    align-items: start !important;
  }

  .x-home.is-assets-view .x-home-assets-card {
    min-width: 0 !important;
  }

  .x-home.is-assets-view .x-home-assets-thumb {
    min-height: 152px !important;
  }

  .x-home.is-assets-view .x-home-assets-detail {
    max-width: 420px !important;
    padding: 12px 12px 16px !important;
    min-height: 0 !important;
  }

  .x-home.is-assets-view .x-home-assets-detail-body {
    gap: 10px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .x-home.is-assets-view .x-home-assets-detail-list {
    font-size: 12px !important;
  }

  .x-home.is-assets-view .x-home-assets-detail-actions .x-home-assets-action {
    min-height: 36px !important;
  }
}
