:root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --text:#0b1220;
  --muted:#55627a;
  --border:rgba(15, 23, 42, .10);
  --pill:rgba(15, 23, 42, .06);
  --shadow: 0 10px 30px rgba(2, 6, 23, .08);
}

*{box-sizing:border-box}
html,body{
  height:100%;
  min-height: 100svh;
  overflow-x: hidden;
  max-width: 100%;
}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, "PingFang SC", "Noto Sans CJK SC", sans-serif;
  overflow-x: hidden;
}

/* ========================================
 * 0. 锁宽诊断（v0.4）
 * ========================================
 * 
 * 【锁宽位置诊断】
 * 文件：webapp/frontend/console/console.css
 * 
 * 1. 第 26-32 行：.container
 *    - max-width: 1200px  ← 这是主要锁宽位置
 *    - margin: 0 auto      ← 居中导致两侧空白
 * 
 * 2. 第 36-40 行：main.container
 *    - max-width: 1200px  ← 重复锁宽
 *    - margin: 0 auto     ← 重复居中
 * 
 * 3. HTML 结构：<main class="container">
 *    - 所有 panel 都在这个容器内
 *    - 导致所有页面都被限制在 1200px
 * 
 * 【解决方案】
 * - 为 Console 创建独立全宽容器
 * - 移除 .container 的 max-width 限制（或仅对特定页面保留）
 * ======================================== */

/* v0.4: Console 全局布局 - 全宽容器 */
.console-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 16px;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* 保留 .container 用于其他页面（向后兼容） */
.container{
  padding:16px; 
  max-width:1200px; 
  margin:0 auto;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* v0.4: 如果使用 .container，Memory 页面覆盖为全宽 */
main.container #panel-memory,
.container #panel-memory {
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}
.panel{display:none}
.panel.show{display:block}

/* Memory UI v1.0 - 真三栏布局（对标 Things 3 / Apple Notes） */
/* v0.4: 统一 Console 全局布局 - 全宽 + 自适应三列 */
.memory-layout-v1 {
  display: grid;
  /* 桌面端：320px + 自适应 + 360px */
  grid-template-columns: 320px minmax(520px, 1fr) 360px;
  gap: 16px;
  min-height: calc(100vh - 200px);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  padding: 0;
  box-sizing: border-box;
  margin: 0;
}

/* v0.4: Console 页面全宽（覆盖可能的父容器限制） */
.console-page {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 16px !important;
  box-sizing: border-box;
}

.memory-sidebar-v1 {
  position: sticky;
  top: 100px;
  height: fit-content;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  min-width: 0;
}

.memory-main-v1 {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-x: hidden;
  /* A. 记录流区域必须可滚动 */
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.memory-insight-v1 {
  position: sticky;
  top: 100px;
  height: fit-content;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.board-card-collapsible {
  transition: all 0.2s;
}

.board-content-collapsible {
  transition: all 0.2s;
}

/* [B] 统计条 → 真实筛选器（Filter Chips） */
.memory-filter-chips {
  display: flex;
  gap: 8px;
  padding: 12px 0;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.filter-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--pill);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
  user-select: none;
  white-space: nowrap;
}

.filter-chip:hover {
  background: rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.filter-chip.active {
  background: rgba(15, 23, 42, 0.15);
  border-color: var(--text);
  font-weight: 700;
}

.filter-chip .chip-label {
  color: var(--muted);
  font-weight: 600;
}

.filter-chip.active .chip-label {
  color: var(--text);
}

.filter-chip .chip-value {
  color: var(--text);
  font-weight: 900;
  font-size: 14px;
  min-width: 20px;
  text-align: center;
}

/* [C] 快速输入区（Quick Add） */
/* P1: QuickAdd 吸顶（sticky top），不遮挡列表、占位固定；透明区域不拦截列表点击 */
.quick-add-card {
  position: sticky;
  top: 0;
  z-index: 10;
  pointer-events: none;
}
.quick-add-card .quick-add-header,
.quick-add-card .quick-add-body,
.quick-add-card input,
.quick-add-card button,
.quick-add-card textarea,
.quick-add-card .quick-add-buttons,
.quick-add-card .quick-add-more,
.quick-add-card .quick-add-menu,
.quick-add-card .quick-add-receipt {
  pointer-events: auto;
}

.quick-add-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.quick-add-buttons {
  display: flex;
  gap: 6px;
  align-items: center;
}
.quick-add-kind-btn.active {
  background: var(--text);
  color: var(--card);
  border-color: var(--text);
}

.quick-add-more {
  position: relative;
}

.quick-add-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 100;
  min-width: 150px;
}

.menu-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  border-radius: 0;
}

.menu-item:hover {
  background: var(--pill);
}

.quick-add-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-add-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: none;
  min-height: 40px;
  max-height: 120px;
  overflow-y: auto;
  box-sizing: border-box;
}

.quick-add-input:focus {
  outline: none;
  border-color: var(--text);
}

/* P1 写入成功：输入框轻微闪绿，0.3s */
.quick-add-card.quick-add-success .quick-add-input {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.quick-add-receipt {
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  min-height: 20px;
  transition: color 0.15s;
}

.quick-add-receipt-ok {
  color: #16a34a;
}

/* [D] 记录流 Timeline：列表行（低密度、耐看） */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: calc(100vh - 500px);
  overflow-y: auto;
  min-height: 200px;
}

/* List Row：左标签 | 中文本两行截断 | 右时间；点击整行打开详情 */
.timeline-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: background 0.15s, border-color 0.15s;
  background: var(--card);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  min-height: 52px;
}

.timeline-row:hover {
  background: var(--pill);
  border-color: var(--border);
}

.timeline-row-selected,
.timeline-row-selected:hover {
  background: rgba(15, 23, 42, 0.06);
  border-left-color: var(--text);
  border-left-width: 3px;
}

.timeline-row-tag {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  min-width: 52px;
  text-align: center;
}

.timeline-row-tag.memo { background: #f3f4f6; color: var(--text); }
.timeline-row-tag.work { background: #fef3c7; color: #92400e; }
.timeline-row-tag.idea { background: #e0e7ff; color: #3730a3; }
.timeline-row-tag.finance { background: #dbeafe; color: #1e40af; }
.timeline-row-tag.tasks { background: #fce7f3; color: #9d174d; }

.timeline-row-body {
  flex: 1;
  min-width: 0;
}

.timeline-row-text {
  font-size: 13px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
}

.timeline-row-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.timeline-row-clickable {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  pointer-events: auto;
}
.timeline-row-meta-inline {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.timeline-row-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.timeline-row-amount {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}

/* P1: 弱红/弱绿，低饱和不刺眼 */
.timeline-row-amount.expense { color: #b87373; }
.timeline-row-amount.income { color: #5a9a6a; }
.timeline-row-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; opacity: 0.7; pointer-events: auto; }
.timeline-row-actions .ledger-action-btn { padding: 4px 6px; border: none; background: transparent; cursor: pointer; font-size: 14px; border-radius: 6px; }
.timeline-row-actions .ledger-action-btn:hover { background: rgba(15, 23, 42, 0.08); }
.timeline-row:hover .timeline-row-actions { opacity: 1; }

/* 兼容旧类名 */
.timeline-item-v1 {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 52px;
}

.timeline-item-v1:hover {
  background: var(--pill);
  border-color: var(--text);
}

.timeline-item-content {
  flex: 1;
  min-width: 0;
}

.timeline-item-title {
  font-weight: 500;
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.timeline-item-meta-v1 {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.timeline-item-meta-v1 .muted.small {
  font-size: 10px;
  opacity: 0.7;
}

.timeline-item-actions-v1 {
  display: none;
}

.timeline-item-actions-v1 button {
  padding: 4px 8px;
  font-size: 11px;
}

/* [E] 看板卡片 */
.board-card {
  margin-bottom: 16px;
}

.board-content {
  padding: 12px;
  min-height: 60px;
  font-size: 13px;
  line-height: 1.6;
}

.board-section {
  margin-bottom: 12px;
}

.board-section-title {
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 6px;
  color: var(--text);
}

/* [G] 记账摘要卡 */
.finance-summary-card {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
}

.finance-summary-body {
  padding: 12px;
  min-height: 80px;
}

.finance-actions {
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.finance-more {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

/* Finance 账本 Drawer：右侧抽屉，覆盖当前页 */
.finance-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 900;
}
.finance-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 95vw;
  background: var(--card);
  border-left: 1px solid var(--border);
  z-index: 901;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
}
.finance-drawer-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.finance-drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

/* 记账明细：气泡/胶囊样式 */
.ledger-day {
  margin-bottom: 24px;
}

.ledger-day-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 12px;
  padding-left: 4px;
}

/* 账本明细：胶囊/气泡，大圆角、弱色背景、行距明显 */
.finance-bubble-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.06);
  transition: background 0.15s;
}

.finance-bubble-row:hover {
  background: rgba(15, 23, 42, 0.07);
}

.finance-bubble-row:hover .finance-bubble-actions {
  opacity: 1;
}

.finance-bubble-left {
  flex: 1;
  min-width: 0;
}

.finance-bubble-desc {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 6px;
}

.finance-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.finance-bubble-time {
  font-size: 11px;
  color: var(--muted);
  opacity: 0.9;
}

.finance-bubble-amount {
  font-weight: 600;
  font-size: 14px;
}

/* P1: 支出弱红/收入弱绿，低饱和 */
.finance-bubble-amount.expense {
  color: #a06565;
}
.finance-bubble-amount.income {
  color: #4a8c5a;
}
/* Drawer 顶部 Tabs */
.finance-tab { background: var(--pill); color: var(--muted); border: 1px solid var(--border); }
.finance-tab.active { background: var(--text); color: var(--card); border-color: var(--text); }

.finance-bubble-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.ledger-action-btn {
  padding: 4px 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  border-radius: 6px;
  line-height: 1;
}

.ledger-action-btn:hover {
  background: rgba(15, 23, 42, 0.08);
}

.finance-bubble-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn.full {
  width: 100%;
}

/* 删除确认 Popconfirm：按钮旁或居中 */
.popconfirm-backdrop {
  background: rgba(0, 0, 0, 0.2);
}
.popconfirm-panel {
  min-width: 200px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.popconfirm-title {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 12px;
}
.popconfirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* [F] 任务列表 */
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-item-v1 {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: opacity 0.2s;
}

.task-item-v1.done {
  opacity: 0.6;
}

.task-checkbox-v1 {
  margin-top: 2px;
  cursor: pointer;
}

.task-content-v1 {
  flex: 1;
  min-width: 0;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--card);
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.modal-body {
  padding: 16px;
}

/* 详情卡片 */
.detail-card {
  margin-top: 16px;
}

.detail-content {
  padding: 12px;
  font-size: 13px;
  line-height: 1.6;
}

/* v0.4: 响应式适配 - 自适应三列 + 移动端折叠 */
/* Desktop (>= 1200px) - 三列铺满 */
@media (min-width: 1200px) {
  .memory-layout-v1 {
    grid-template-columns: 320px minmax(520px, 1fr) 360px;
  }
}

/* Laptop (>= 900px < 1200px) - 中等屏：右侧列自动下移 */
@media (min-width: 900px) and (max-width: 1199px) {
  .memory-layout-v1 {
    grid-template-columns: 280px 1fr;
    grid-template-rows: auto auto;
  }
  
  .memory-insight-v1 {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
  }
}

/* Tablet (>= 640px < 900px) - 右侧列变 Drawer */
@media (min-width: 640px) and (max-width: 899px) {
  .memory-layout-v1 {
    grid-template-columns: 280px 1fr;
  }
  
  .memory-insight-v1 {
    position: fixed;
    right: -360px;
    top: 100px;
    width: 360px;
    max-height: calc(100vh - 120px);
    background: var(--card);
    border-left: 1px solid var(--border);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease-out;
    z-index: 100;
    padding: 16px;
    overflow-y: auto;
  }
  
  .memory-insight-v1.show {
    right: 0;
  }
}

/* Mobile (< 640px) - 三列变 1 列，左侧导航用 hamburger 抽屉 */
@media (max-width: 639px) {
  .memory-layout-v1 {
    grid-template-columns: 1fr;
  }
  
  .memory-sidebar-v1 {
    position: fixed;
    left: -280px;
    top: 100px;
    width: 280px;
    max-height: calc(100vh - 120px);
    background: var(--card);
    border-right: 1px solid var(--border);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    transition: left 0.3s ease-out;
    z-index: 100;
    padding: 16px;
    overflow-y: auto;
  }
  
  .memory-sidebar-v1.show {
    left: 0;
  }
  
  .memory-insight-v1 {
    position: fixed;
    right: -360px;
    top: 100px;
    width: 360px;
    max-height: calc(100vh - 120px);
    background: var(--card);
    border-left: 1px solid var(--border);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease-out;
    z-index: 100;
    padding: 16px;
    overflow-y: auto;
  }
  
  .memory-insight-v1.show {
    right: 0;
  }
}

/* Mac 适配：强制无横向滚动 */
.memory-layout-v1,
.memory-sidebar-v1,
.memory-main-v1,
.memory-insight-v1 {
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.memory-main-v1 *,
.memory-sidebar-v1 *,
.memory-insight-v1 * {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.memory-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.memory-main {
  min-width: 0; /* 防止 grid 溢出 */
}

.memory-drawer {
  position: sticky;
  top: 100px;
  height: fit-content;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.drawer-content {
  font-size: 14px;
  line-height: 1.6;
}

/* 过滤按钮 */
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.9);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.filter-btn.active {
  background: var(--pill);
  color: var(--text);
  border-color: var(--text);
}

.filter-btn:hover {
  background: var(--pill);
}

/* 搜索输入 */
.search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
}

/* 统计条 */
.memory-stats {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  flex-wrap: wrap;
}

.stat-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--pill);
  border-radius: 6px;
  font-size: 13px;
}

.stat-label {
  color: var(--muted);
  font-weight: 600;
}

.stat-value {
  color: var(--text);
  font-weight: 900;
  font-size: 16px;
}

/* 任务列表样式增强 */
.memory-tasks-list .task-item {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.memory-tasks-list .task-item:last-child {
  border-bottom: none;
}

.task-checkbox {
  margin-top: 4px;
  cursor: pointer;
}

.task-content {
  flex: 1;
}

.task-meta {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* Timeline 条目增强 */
.memory-timeline .timeline-item {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.memory-timeline .timeline-item:hover {
  background: var(--pill);
}

.timeline-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.timeline-item-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.timeline-item-actions {
  display: flex;
  gap: 6px;
}

.timeline-item-text {
  margin: 8px 0;
  color: var(--text);
  line-height: 1.5;
}

.timeline-item-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

/* 看板卡片样式 */
.board-card {
  padding: 16px;
  background: var(--pill);
  border-radius: 8px;
  margin-bottom: 12px;
}

.board-section {
  margin-bottom: 16px;
}

.board-section-title {
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.board-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.board-list li {
  padding: 6px 0;
  padding-left: 16px;
  position: relative;
}

.board-list li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--muted);
}

/* 响应式 */
@media (max-width: 1200px) {
  .memory-layout {
    grid-template-columns: 200px 1fr;
  }
  .memory-drawer {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .memory-layout {
    grid-template-columns: 1fr;
  }
  .memory-sidebar {
    position: static;
  }
  .memory-boards {
    grid-template-columns: 1fr;
  }
}

/* Topbar */
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 16px;
  border-bottom:1px solid var(--border);
  background:rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  position:sticky;
  top:0;
  z-index:20;
}
.runtime-banner{
  max-width:1200px;
  margin:0 auto;
  padding:8px 16px 4px;
  display:flex;
  flex-direction:column;
  gap:2px;
  font-size:13px;
  color:var(--muted);
}
.brand{display:flex; flex-wrap:wrap; gap:12px; align-items:center;}
.brand-link{color:var(--muted); text-decoration:none}
.brand-title{font-weight:900}
.brand-role{width:100%; margin-top:4px; font-weight:400; font-size:12px;}
.actions{display:flex; gap:10px; align-items:center;}

.btn{
  border:1px solid var(--border);
  background:rgba(255,255,255,.95);
  color:var(--text);
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
  font-weight:900;
  box-shadow: 0 1px 0 rgba(2,6,23,.04);
}
.btn.primary{
  background:rgba(15,23,42,.92);
  color:#fff;
}
.btn.danger{
  border-color: rgba(180,35,24,.25);
  color:#b42318;
}
.btn.small{
  padding:8px 10px;
  border-radius:10px;
  font-size:13px;
}

/* Tabs */
.tabs{
  display:flex;
  gap:8px;
  padding:10px 16px;
  border-bottom:1px solid var(--border);
  background:rgba(255,255,255,.55);
  position:sticky;
  top:56px;
  z-index:10;
}
.tab{
  border:1px solid var(--border);
  background:rgba(255,255,255,.9);
  color:var(--muted);
  border-radius:999px;
  padding:8px 12px;
  cursor:pointer;
  font-weight:900;
}
.tab.active{
  color:var(--text);
  background:var(--pill);
}

/* Cards */
.card{
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--card);
  padding:14px;
  box-shadow: var(--shadow);
  margin-bottom:12px;
}
.card-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
}

.muted{color:var(--muted)}
.small{font-size:13px}
.mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  white-space:pre-wrap;
  word-break:break-word;
  margin:0;
  color:rgba(2,6,23,.92);
  font-size:13px;
  line-height:1.5;
}
.mono-inline{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background:rgba(2,6,23,.04);
  border:1px solid var(--border);
  padding:2px 6px;
  border-radius:8px;
}

.list{display:flex; flex-direction:column; gap:10px; margin-top:12px}
.row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.bar-row{
  align-items:center;
}
.bar{
  flex:1 1 120px;
  height:6px;
  border-radius:999px;
  background:rgba(2,6,23,.08);
  overflow:hidden;
}
.bar-fill{
  display:block;
  height:100%;
  background:linear-gradient(90deg, #1f2937, #64748b);
}
.pill{
  border:1px solid var(--border);
  background:rgba(2,6,23,.03);
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  color:var(--muted);
}
.title{
  font-weight:900;
  margin:6px 0 6px;
}
.desc{color:var(--muted); font-size:13px; margin-top:6px}

.item{
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px;
  background:rgba(255,255,255,.96);
}
.item-actions{display:flex; gap:8px; margin-top:10px; flex-wrap:wrap;}

.home-kpi-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:12px;
}
.home-cognition-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:12px;
  margin-top:12px;
}
.home-cognition-grid .card{
  min-height: 172px;
}
.cognition-tight .card{
  min-height: 0;
}
.kpi-tight .kpi-mini .card-head,
.kpi-head-tight{margin-bottom:2px;}
.kpi-value-tight{
  font-size:22px;
  font-weight:900;
  letter-spacing:-0.5px;
  margin:2px 0 6px;
}
.kpi-meta-tight{font-size:11px; line-height:1.3;}
.kpi-tight .card{padding:10px 12px;}
.card-tight{padding:10px 12px; min-height:0;}
.card-head-tight{margin-bottom:6px;}
.card-head-tight .brand-title{font-size:13px;}
.cognition-tight .compact-item,
.cognition-tight .empty-box{padding:6px 8px; font-size:12px;}
.empty-box{
  color:var(--muted);
  font-size:12px;
  padding:8px 10px;
  border-radius:8px;
  background:rgba(2,6,23,.02);
  border:1px dashed var(--border);
}
.kpi-mini .card-head{margin-bottom:6px;}
.kpi-value{
  font-size:28px;
  font-weight:900;
  letter-spacing:-0.5px;
  margin:6px 0 10px;
}

#draftGuide .row{justify-content:flex-start; gap:12px;}
#draftReviewBox .title{font-size:16px;}
#draftReviewBox .item-actions{margin-top:10px;}

.link{
  color:rgba(15,23,42,.92);
  text-decoration:none;
  border:1px solid var(--border);
  background:rgba(2,6,23,.03);
  padding:6px 10px;
  border-radius:12px;
  font-weight:900;
  font-size:13px;
}

.empty{
  color:var(--muted);
  font-size:13px;
  border:1px dashed var(--border);
  border-radius:14px;
  padding:12px;
}

/* Banner */
.banner{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
.banner-title{
  font-size:16px;
  font-weight:1000;
}
.banner-sub{
  margin-top:4px;
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
}
.banner-actions{margin-top:8px;}
.banner-right{min-width:240px; text-align:right;}
@media (max-width: 980px){
  .banner{flex-direction:column;}
  .banner-right{text-align:left; min-width:auto;}
}

/* Home two columns */
/* Home layout: left column + right column stack */
.home-grid{
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  align-items: start;
}
.home-left{
  grid-column: 1;
}
.home-right-col{
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (max-width: 840px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
  .home-left,
  .home-right-col{
    grid-column: 1;
  }
}

/* Inbox card */
.inbox-card{
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px;
  background:rgba(255,255,255,.96);
  box-shadow: 0 6px 18px rgba(2,6,23,.06);
}
.inbox-top{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
}
.inbox-pills{display:flex; gap:8px; flex-wrap:wrap;}
.inbox-title{
  margin-top:10px;
  font-size:16px;
  font-weight:1000;
  line-height:1.25;
}
.inbox-k{font-weight:900; font-size:12px; color:var(--muted); margin:10px 0 6px;}
.inbox-ul{margin:0; padding-left:18px; color:rgba(2,6,23,.92);}
.inbox-ul li{margin:6px 0; line-height:1.4;}
.inbox-domain{margin-top:8px;}

/* Workbench */
.workbench{
  position:sticky;
  top:118px; /* topbar+tabs */
}
.wb-empty{
  border:1px dashed var(--border);
  border-radius:16px;
  padding:14px;
  background:rgba(2,6,23,.02);
}
.wb-empty-title{
  font-weight:1000;
  margin-bottom:6px;
}
.wb-step{margin-top:12px;}
.wb-title{font-weight:1000; font-size:14px;}
.wb-textarea{
  width:100%;
  margin-top:8px;
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px;
  font-size:13px;
  line-height:1.5;
  resize:vertical;
  background:rgba(255,255,255,.98);
}
.wb-box{
  margin-top:8px;
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px;
  background:rgba(2,6,23,.02);
}
.wb-row{
  display:grid;
  grid-template-columns:80px 1fr;
  gap:10px;
  padding:6px 0;
}
.wb-k{color:var(--muted); font-weight:900; font-size:12px;}
.wb-v{font-size:13px;}

.domain-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:8px;
  margin-top:10px;
}
.domain-btn{
  border:1px solid var(--border);
  background:rgba(255,255,255,.95);
  border-radius:14px;
  padding:10px;
  cursor:pointer;
  font-weight:900;
  text-align:left;
}
.domain-btn:hover{
  background:rgba(2,6,23,.06);
  border-color:rgba(15,23,42,.2);
}
.domain-btn.selected,
.domain-btn.active{
  border-color: rgba(15,23,42,.45);
  background: rgba(15,23,42,.08);
}


.wb-result{
  margin-top:10px;
  border-radius:14px;
  padding:10px;
  border:1px solid var(--border);
  font-size:13px;
}
.wb-result.ok{background:rgba(34,197,94,.08);}
.wb-result.bad{background:rgba(239,68,68,.08);}

/* Diagnostics */
.diag summary{
  cursor:pointer;
  font-weight:1000;
  color:var(--text);
}
.lt-item{
  line-height: 1.6;
  color: rgba(2,6,23,.92);
  font-size: 13px;
}
/* (duplicate home-grid definitions removed) */

.right-stack{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ===== Gemini-ish neutral theme override ===== */
:root{
  --bg:#f6f7f9;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --border:#e5e7eb;
  --shadow:0 1px 2px rgba(0,0,0,.06);
}

body{ background:var(--bg); color:var(--text); }
.card{ background:var(--card); border:1px solid var(--border); box-shadow:var(--shadow); }
.topbar{ background:var(--card); border-bottom:1px solid var(--border); }
.tabs{ background:transparent; }

/* V3.0 console cockpit compression */
.runtime-banner{
  max-width:none;
  margin:0;
  padding:8px 16px 10px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  font-size:12px;
}

.runtime-banner > div{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border:1px solid var(--border);
  border-radius:999px;
  background:rgba(255,255,255,.82);
  color:var(--muted);
  white-space:nowrap;
}

.brand-role{
  width:auto;
  margin-top:0;
}

.topbar{
  padding:12px 16px;
}

.tabs{
  gap:10px;
  padding:8px 16px 10px;
}

.card-head .brand-title{
  font-size:15px;
}

.home-kpi-grid .kpi-mini .brand-title{
  font-size:14px;
}

@media (max-width: 900px){
  .runtime-banner{
    padding:8px 12px;
    gap:6px;
  }

  .runtime-banner > div{
    width:auto;
    max-width:100%;
  }
}

.btn{ background:#fff; border:1px solid var(--border); color:var(--text); }
.btn:hover{ background:#f3f4f6; }
.btn.primary{ background:#111827; color:#fff; border-color:#111827; }
.btn.primary:hover{ background:#0b1220; }

.banner{ background:var(--card); border:1px solid var(--border); }
.muted{ color:var(--muted); }
.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
}
.section-label{
  margin:14px 2px 8px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--muted);
}
.workspace-strip{
  margin-top:12px;
}
.action-lane-card{
  margin-top:8px;
  background:linear-gradient(180deg,#ffffff 0%,#fbfcfe 100%);
}
/* 学习核查 Agent 状态卡片（优先于收件箱） */
.agent-live-card {
  margin-bottom: 12px;
  border-left: 4px solid var(--border);
}
.agent-live-card .card-head { margin-bottom: 8px; }
.agent-live-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px 16px;
  font-size: 13px;
}
.agent-live-row { display: flex; align-items: baseline; gap: 6px; }
.agent-live-label { color: var(--muted); min-width: 64px; }
.agent-live-value { font-weight: 600; color: var(--text); }
.agent-live-card.follow-on .agent-live-value { color: #0d9488; }

.action-lane-compact .card-head.action-lane-head{
  margin-bottom:4px;
  flex-wrap:wrap;
  gap:4px;
}
.action-lane-compact .action-lane{
  margin-top:4px;
}
.action-lane{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-top:6px;
}
.lane-item-compact{
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:10px;
  background:rgba(2,6,23,.02);
  border:1px solid var(--border);
}
.lane-item-compact .lane-step{
  flex:0 0 22px;
  width:22px;
  height:22px;
  border-radius:999px;
  background:#0f172a;
  color:#fff;
  font-size:11px;
  font-weight:800;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.lane-item-compact .lane-title{
  font-weight:700;
  font-size:13px;
}
.lane-item-compact .muted.small,
.lane-item-compact .lane-status{
  margin-left:auto;
  font-size:11px;
  color:var(--muted);
}
.action-lane-oneline .action-lane-head{margin-bottom:2px;}
.action-lane-oneline .action-lane-oneline-inner{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:4px;
}
.action-lane-oneline .action-lane-oneline-inner .lane-item-compact{
  padding:4px 8px;
  flex:1;
  min-width:0;
}
.action-lane-oneline .action-lane-oneline-inner .lane-step{width:18px;height:18px;font-size:10px;}
.action-lane-oneline .action-lane-oneline-inner .lane-title{font-size:12px;}
.inbox-card .card-head .brand-title{margin-right:6px;}
.inbox-hint{font-weight:700;color:var(--text);margin-left:4px;}
.inbox-list .list-item{padding:8px 10px;}
.inbox-list .btn.small.primary{font-weight:700;}
.action-chip{
  appearance:none;
  width:100%;
  text-align:left;
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px;
  background:#fff;
  cursor:pointer;
  display:flex;
  gap:12px;
  align-items:flex-start;
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.action-chip:hover{
  transform:translateY(-1px);
  box-shadow:0 6px 18px rgba(15,23,42,.08);
  background:#f9fafb;
}
.action-chip.ready{
  border-color:rgba(15,23,42,.24);
  background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
}
.action-step{
  flex:0 0 28px;
  width:28px;
  height:28px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#111827;
  color:#fff;
  font-size:12px;
  font-weight:900;
}
.action-copy{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.action-copy strong{
  font-size:14px;
  line-height:1.35;
}
.action-copy span{
  font-size:12px;
  color:var(--muted);
  line-height:1.45;
}
@media (max-width: 980px){
  .action-lane{
    grid-template-columns:1fr;
  }
}

/* mini chat */
.chat-mini{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:10px; }
.chat-input{
  min-width:260px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff;
}
.chatlog{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:220px;
}
.chatmsg{ padding:10px 12px; border:1px solid var(--border); border-radius:12px; background:#fff; }
.chatmsg.ok{ border-color:#d1fae5; }
.chatmsg.bad{ border-color:#fee2e2; }
.chatmeta{ font-size:12px; color:var(--muted); margin-bottom:6px; }
.chatbody{ font-size:14px; color:var(--text); }
.hit{ padding:10px; border:1px solid var(--border); border-radius:12px; margin-top:10px; }
.hit-section-title{
  margin-top: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hit-title{ font-weight:600; margin-bottom:4px; }
.hit-preview{ margin-top:6px; color:#374151; }
.compact-list{
  gap:8px;
}
.compact-item{
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px;
  background:rgba(255,255,255,.96);
  min-height:76px;
}
.compact-item-title{
  font-size:14px;
  font-weight:800;
  line-height:1.35;
  margin-bottom:4px;
}
.compact-item-meta{
  font-size:12px;
  color:var(--muted);
  line-height:1.5;
}
.compact-item-actions{
  margin-top:10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.compact-empty{
  color:var(--muted);
  font-size:13px;
  border:1px dashed var(--border);
  border-radius:12px;
  padding:10px;
}
.review-snapshot-card .compact-item{
  background:linear-gradient(180deg,#fff 0%,#fbfcff 100%);
}
.home-diagnostics-card summary{
  cursor:pointer;
  font-weight:800;
  color:var(--text);
}
.home-diagnostics-card[open],
.home-diagnostics-card details[open]{
  background:linear-gradient(180deg,#fff 0%,#fafafa 100%);
}
.home-right-col .card,
.home-left .card{
  overflow:hidden;
}

/* V3.0 收口：次要区块折叠 */
details.secondary-block{
  border-radius:12px;
  background:var(--card);
  border:1px solid var(--border);
  padding:0;
  margin-bottom:12px;
}
details.secondary-block summary{
  list-style:none;
  cursor:pointer;
  padding:12px 14px;
  font-weight:600;
  color:var(--text);
}
details.secondary-block summary::-webkit-details-marker{display:none}
details.secondary-block .secondary-block-inner,
details.secondary-block > .list{
  padding:0 14px 14px;
}
details.secondary-block[open] summary{margin-bottom:8px; border-bottom:1px solid var(--border);}
.chatlog-block.chatlog-empty summary{padding:6px 12px; font-size:12px;}
.chatlog-empty-hint{padding:6px 12px 8px; font-size:11px; line-height:1.35;}
.chatlog-block .chatlog{max-height:200px; overflow-y:auto;}

/* V3.0 卡片紧凑 */
.home-right-col .card,
.right-stack .card{margin-bottom:10px;}
.kpi-mini .card-head{margin-bottom:4px;}
.wb-summary .wb-summary-box,
.wb-panel .wb-qa{margin-top:6px;}
.wb-panel .qa-title{margin-top:8px; margin-bottom:4px; font-size:13px;}
.wb-actions{gap:8px; margin-top:10px;}
.workbench-tight .card-head-tight{flex-wrap:wrap;}
.workbench-tight .wb-summary .wb-summary-box{font-size:12px; line-height:1.4;}
.workbench-tight .wb-result.ok-msg{background:rgba(34,197,94,.12); border-color:rgba(34,197,94,.3); padding:8px 10px; font-weight:600;}

/* V3.0 compact workspace overrides */
.topbar{
  padding:10px 14px;
}

.brand{
  gap:10px;
  align-items:center;
}

.brand-title{
  font-size:15px;
}

.brand-role{
  font-size:12px;
}

.runtime-banner{
  display:flex !important;
  justify-content:center;
  align-items:center;
  flex-wrap:wrap;
  gap:8px !important;
  padding:6px 14px !important;
}

.runtime-banner > div{
  width:auto !important;
  max-width:none !important;
  margin:0 !important;
  flex:0 0 auto;
}

.runtime-banner .pill{
  padding:3px 10px;
}

.tabs{
  padding:8px 14px 8px;
  gap:8px;
}

.tab{
  padding:10px 14px;
}

.console-page{
  gap:14px;
}

.card{
  padding:14px;
  border-radius:18px;
}

.banner{
  padding:16px;
}

.banner-title{
  font-size:18px;
  line-height:1.35;
}

.banner-sub{
  margin-top:4px;
  font-size:13px;
}

.banner-actions{
  margin-top:12px;
  gap:8px;
}

.chat-mini{
  margin-top:8px;
}

.chat-input{
  min-width:220px;
}

.home-grid{
  gap:14px;
}

.home-kpi-grid{
  gap:12px;
}

.home-kpi-grid .card{
  min-height:0;
}

.kpi-value{
  font-size:26px;
  line-height:1.1;
}

.workspace-strip,
.action-lane-card{
  margin-top:0;
}

.action-lane{
  gap:8px;
}

.action-chip{
  padding:10px 12px;
  border-radius:14px;
}

.action-copy strong{
  font-size:13px;
}

.action-copy span{
  font-size:12px;
}

.home-cognition-grid{
  gap:12px;
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.home-cognition-grid .card,
.home-left .card,
.home-right-col .card{
  min-height:0;
}

.compact-list{
  gap:6px;
}

.compact-item{
  min-height:0;
  padding:8px 10px;
}

.compact-item-title{
  font-size:13px;
  margin-bottom:3px;
}

.compact-item-meta{
  font-size:12px;
  line-height:1.4;
}

.compact-item-actions{
  margin-top:8px;
}

.right-stack{
  gap:12px;
}

.review-snapshot-card .compact-item{
  padding:8px 10px;
}

.workbench .wb-empty{
  padding:12px;
}

@media (max-width: 1280px){
  .home-cognition-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* V3.0 daily workspace final overrides */
.runtime-banner{
  display:flex !important;
  flex-direction:row !important;
  justify-content:flex-start !important;
  align-items:center !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  padding:4px 14px 8px !important;
}

.runtime-banner > div{
  display:inline-flex !important;
  flex:0 0 auto !important;
  width:auto !important;
  max-width:none !important;
  margin:0 !important;
  white-space:nowrap !important;
}

.runtime-banner .pill{
  white-space:nowrap !important;
}

.brand-role{
  font-size:13px !important;
}

.banner{
  padding:12px 14px !important;
}

.banner-title{
  font-size:17px !important;
  line-height:1.35 !important;
}

.banner-sub{
  margin-top:6px !important;
  max-width:920px;
}

.banner-actions{
  margin-top:10px !important;
}

.banner-right{
  min-width:320px !important;
  text-align:right !important;
}

.tabs{
  padding:8px 14px !important;
}

.tab{
  padding:10px 16px !important;
}

.home-grid{
  gap:12px !important;
}

.home-kpi-grid{
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  gap:10px !important;
}

.home-kpi-grid .card{
  min-height:0 !important;
  padding:12px !important;
}

.home-cognition-grid{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:10px !important;
  margin-top:10px !important;
}

.home-cognition-grid .card,
.home-left .card,
.home-right-col .card{
  min-height:0 !important;
}

#homeGuidance{
  display:none !important;
}

#homeGuidance.closest-card-hidden{
  display:none !important;
}

.workspace-strip,
.action-lane-card{
  margin-top:10px !important;
}

.compact-list{
  gap:6px !important;
}

.compact-item{
  min-height:0 !important;
  padding:8px 10px !important;
}

.compact-item-title{
  font-size:13px !important;
}

.compact-item-meta{
  font-size:12px !important;
  line-height:1.45 !important;
}

.review-snapshot-card .compact-item{
  padding:8px 10px !important;
}

@media (max-width: 1280px){
  .home-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .home-cognition-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

@media (max-width: 900px){
  .banner-right{
    min-width:auto !important;
    text-align:left !important;
  }

  .home-kpi-grid,
  .home-cognition-grid{
    grid-template-columns:1fr !important;
  }
}

/* V3.0.2 final workspace tightening */
.runtime-banner{
  padding:6px 14px 4px !important;
  justify-content:flex-start !important;
  align-items:center !important;
}

.runtime-banner > div{
  margin:0 !important;
}

.tabs{
  padding:6px 14px 8px !important;
}

.banner{
  padding:12px 14px !important;
  margin-bottom:10px !important;
}

.banner-title{
  font-size:16px !important;
  line-height:1.35 !important;
}

.banner-sub{
  margin-top:4px !important;
  max-width:980px !important;
}

.banner-actions{
  margin-top:8px !important;
}

.home-grid{
  gap:10px !important;
}

.home-kpi-grid{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:10px !important;
}

.home-kpi-grid .card{
  min-height:0 !important;
  padding:12px !important;
}

.home-cognition-grid{
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:10px !important;
}

.home-cognition-grid .card,
.home-left .card,
.home-right-col .card,
.action-lane-card{
  min-height:0 !important;
}

.action-lane{
  gap:8px !important;
}

.action-lane-step{
  padding:12px 14px !important;
}

.compact-item{
  padding:8px 10px !important;
}

.compact-item-meta{
  line-height:1.45 !important;
}

.chatlog{
  min-height:180px !important;
  max-height:360px !important;
}

.review-snapshot-card .compact-item,
.workbench .wb-empty{
  padding:10px 12px !important;
}

@media (max-width: 1280px){
  .home-kpi-grid,
  .home-cognition-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}

@media (max-width: 900px){
  .home-kpi-grid,
  .home-cognition-grid{
    grid-template-columns:1fr !important;
  }
}
/* V3.0.4 active workspace cleanup */
.runtime-banner{
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:wrap !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:8px !important;
}

.runtime-banner > div{
  display:inline-flex !important;
  align-items:center !important;
  flex:0 0 auto !important;
  width:auto !important;
  max-width:none !important;
  white-space:nowrap !important;
}

.right-stack{
  display:flex;
  flex-direction:column;
}

.workbench{
  order:1;
}

.review-snapshot-card{
  order:2;
}
.review-snapshot-one{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:6px 10px;
  font-size:12px;
}
.review-snapshot-one .review-snapshot-text{color:var(--muted);}
.review-snapshot-card .list.compact-list{padding:0;}
