/* 企业 AI 工作台门户样式：深藏青侧栏 + 浅灰内容区，卡片白底，系统字体与内联 SVG。 */
/* UI1 设计令牌：间距 8/12/16/24；卡片圆角 12px、控件圆角 8px；边框 #e2e8f0；
   内容区背景 #f2f5f9；卡片阴影 0 1px 2px rgba(16,38,63,.05), 0 8px 24px rgba(16,38,63,.05)；
   主蓝 #2563eb；标题 20px/600 #0f2233；正文 14px #1f2d3d；辅助 12.5px #64748b。 */
:root {
  --ui-space-1: 8px;
  --ui-space-2: 12px;
  --ui-space-3: 16px;
  --ui-space-4: 24px;
  --ui-radius-card: 12px;
  --ui-radius-control: 8px;
  --ui-border: #e2e8f0;
  --ui-content-bg: #f2f5f9;
  --ui-card-shadow: 0 1px 2px rgba(16,38,63,.05), 0 8px 24px rgba(16,38,63,.05);
  --ui-blue: #2563eb;
  --ui-title-color: #0f2233;
  --ui-body-color: #1f2d3d;
  --ui-aux-color: #64748b;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: #f2f5f9;
  color: #1f2d3d;
  line-height: 1.6;
  font-size: 14px;
}

/* ===== 全局壳：左深藏青侧栏 + 右内容区 ===== */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 232px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #10263f;
  color: #c9d6e8;
  padding: 20px 14px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  padding: 4px 8px 18px;
  border-bottom: 1px solid rgba(201, 214, 232, .16);
  margin-bottom: 14px;
}

.brand-name {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: .04em;
}

.brand-sub {
  font-size: 12px;
  color: #c9d6e8;
  margin-top: 4px;
  letter-spacing: .06em;
}

/* 兼容旧品牌类名 */
.brand {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
}

.nav-list {
  list-style: none;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  height: 40px;
  padding: 0 12px;
  margin-bottom: 2px;
  border-radius: 8px;
  color: #c9d6e8;
  text-decoration: none;
}

.nav-item:hover {
  background: rgba(255,255,255,.08);
  color: #ffffff;
}

.nav-item.active {
  background: rgba(255,255,255,.14);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(16,38,63,.18);
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-label {
  flex: 1;
  white-space: nowrap;
}

.nav-badge {
  flex-shrink: 0;
  font-size: 11px;
  line-height: 1.4;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  color: #ffffff;
  white-space: nowrap;
}

.nav-badge-amber {
  background: #f59e0b;
  color: #1f2d3d;
  font-weight: 600;
}

.nav-item.active .nav-badge {
  background: rgba(255, 255, 255, .22);
  color: #ffffff;
}

.nav-item.active .nav-badge-amber {
  background: #f59e0b;
  color: #1f2d3d;
}

.sidebar-status {
  background: transparent;
  border: none;
  border-top: 1px solid rgba(255,255,255,.15);
  border-radius: 0;
  padding: 12px 4px 4px;
  margin-top: 14px;
}

.sidebar-status-title {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  margin-bottom: 8px;
}

.status-list {
  list-style: none;
  display: grid;
  gap: 6px;
}

.status-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
}

.status-name {
  color: rgba(255,255,255,.72);
  font-size: 12px;
}

.status-value {
  color: #ffffff;
  font-size: 12px;
  text-align: right;
  white-space: nowrap;
  margin-left: auto;
}

.main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ===== 顶栏（内容区上方） ===== */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 10px 20px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.topbar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
  position: relative;
}

/* UI1 顶栏搜索放大镜：纯视觉，背景图置于框内左侧，不接搜索逻辑。 */
.topbar-center::before {
  content: "🔍";
  position: absolute;
  left: calc(50% - 198px);
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
}

@media (max-width: 768px) {
  .topbar-center::before {
    left: 12px;
  }
}

.view-title {
  font-size: 16px;
  font-weight: 600;
  color: #10263f;
  white-space: nowrap;
}

.global-search {
  width: 100%;
  max-width: 420px;
  padding: 8px 14px 8px 36px;
  font-size: 14px;
  font-family: inherit;
  color: #1f2d3d;
  background: #f9fafb;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M21 21l-4.3-4.3'/></svg>");
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 16px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  outline: none;
}

.global-search::placeholder {
  color: #9ca3af;
}

.global-search:disabled {
  cursor: not-allowed;
}

.demo-badge {
  font-size: 12px;
  font-weight: 600;
  color: #d97706;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

/* UI1 演示徽标：统一 .demo-chip；所在卡片内固定右上角（卡片 position:relative）。 */
.demo-chip {
  background: #fef3c7;
  color: #92400e;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

.card .demo-chip,
.morning-report .demo-chip {
  position: absolute;
  top: 8px;
  right: 8px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.user {
  font-size: 14px;
  color: #1f2d3d;
  white-space: nowrap;
}

/* UI1 当前用户区两行式：圆形头像（姓名首字）+ 姓名/角色上下两行；退出为次按钮。 */
#current-user-area {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#current-user-info {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.3;
  white-space: nowrap;
}

.current-user-name {
  font-size: 14px;
  font-weight: 600;
  color: #0f2233;
  line-height: 1.3;
}

.current-user-role {
  font-size: 12px;
  font-weight: 400;
  color: #64748b;
  line-height: 1.3;
}

#logout-btn {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  height: 34px;
  padding: 0 14px;
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
}

#logout-btn:hover {
  background: #f8fafc;
}

/* ===== UI1 按钮体系（全局）：button 与 .btn 统一 ===== */
button,
.btn {
  height: 34px;
  min-height: 34px;
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  background: #2563eb;
  color: #ffffff;
  border: 1px solid #2563eb;
  padding: 0 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

button:hover,
.btn:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

button.btn-secondary,
.btn-secondary {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
}

button.btn-secondary:hover,
.btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

button:disabled,
.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

button:focus-visible,
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37,99,235,.18);
}

/* ===== UI1 表单：label 上置 12.5px #475569；input/select 高 36px；textarea 仅边框圆角 ===== */
label {
  display: block;
  font-size: 12.5px;
  color: #475569;
  margin-bottom: 4px;
}

input,
select {
  height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 10px;
  font-family: inherit;
  font-size: 14px;
  color: #1f2d3d;
  background: #ffffff;
}

input[type="checkbox"],
input[type="radio"] {
  height: auto;
  width: auto;
}

input:focus,
select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.18);
}

textarea {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
  color: #1f2d3d;
  background: #ffffff;
}

textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.18);
}

/* ===== 内容区与视图 ===== */
.content {
  flex: 1;
  padding: 20px;
  min-width: 0;
  background: #f2f5f9;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.view h2 {
  font-size: 20px;
  font-weight: 600;
  color: #0f2233;
  margin-bottom: 12px;
}

.view p {
  color: #1f2d3d;
}

.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16,38,63,.05), 0 8px 24px rgba(16,38,63,.05);
  padding: 16px;
  margin-bottom: 16px;
  position: relative;
}

.card h3 {
  font-size: 15px;
  font-weight: 600;
  color: #0f2233;
  margin-bottom: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  font-size: 14px;
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #eef2f7;
}

th {
  background: #f9fafb;
  font-weight: 600;
  font-size: 12px;
  color: #64748b;
  height: 40px;
}

td {
  height: 40px;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: #f8fafc;
}

/* UI1 状态 chip：服务健康总览等状态文本挂载（仅样式，不改逻辑）。 */
.st-ok {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

.st-warn {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

.st-off {
  display: inline-block;
  background: #e2e8f0;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* 门户首页补充样式：公告、待办、晨报概览与快捷入口 */
.demo-note {
  font-size: 12.5px;
  color: #64748b;
  margin-bottom: 16px;
}

.card-subtitle {
  font-size: 12.5px;
  color: #64748b;
  margin-bottom: 10px;
}

.notice-list {
  list-style: none;
}

.notice-list li {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}

.notice-list li:last-child {
  border-bottom: none;
}

.notice-date {
  flex-shrink: 0;
  font-size: 13px;
  color: #6b7280;
}

.notice-title {
  color: #374151;
}

.stat-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.stat-item {
  flex: 1 1 160px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 16px;
}

.stat-label {
  display: block;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 20px;
  font-weight: 600;
  color: #10263f;
}

.alert {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  color: #92400e;
  padding: 10px 12px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.quick-entry {
  display: block;
  text-align: center;
  padding: 14px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.quick-entry:hover {
  background: #dbeafe;
}

/* 应用中心与会议助手补充样式 */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.app-card {
  margin-bottom: 0;
}

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

.app-card-head h3 {
  margin-bottom: 0;
}

.status-badge {
  flex-shrink: 0;
  font-size: 12px;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* 应用中心分组与期数角标 */
.app-group {
  margin-bottom: 20px;
}

.app-group-title {
  font-size: 15px;
  font-weight: 600;
  color: #10263f;
  margin-bottom: 10px;
}

.phase-badge {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: #d97706;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

.app-card-link {
  display: block;
  text-decoration: none;
}

.app-card-link:hover {
  border-color: #bfdbfe;
}

.app-card-link p {
  color: #4b5563;
}

.app-card-status {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.step-card {
  margin-bottom: 0;
}

.step-no {
  display: inline-block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 50%;
  margin-bottom: 8px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.report-item {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 16px;
}

.report-item h4 {
  font-size: 14px;
  font-weight: 600;
  color: #10263f;
  margin-bottom: 6px;
}

/* AI 工作台补充样式 */
.chat-list {
  display: grid;
  gap: 12px;
}

.chat-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.chat-row-user {
  flex-direction: row-reverse;
}

.chat-role {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 2px 8px;
}

.chat-bubble {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
  color: #374151;
  max-width: 80%;
}

.chat-row-user .chat-bubble {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e3a5f;
}

.chat-source {
  font-size: 13px;
  color: #6b7280;
}

.ai-quick {
  display: grid;
  gap: 4px;
}

.ai-quick-desc {
  font-size: 12px;
  font-weight: 400;
  color: #6b7280;
}

.ai-input-bar {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.ai-input-bar input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #9ca3af;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 12px;
}

.ai-input-bar input::placeholder {
  color: #9ca3af;
}

.ai-input-bar button {
  flex-shrink: 0;
  padding: 10px 20px;
  font-size: 14px;
  font-family: inherit;
  color: #9ca3af;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  cursor: not-allowed;
}

/* 采购比价补充样式 */
.price-lowest {
  font-weight: 600;
  color: #065f46;
  background: #ecfdf5;
}

.lowest-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #065f46;
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 6px;
  white-space: nowrap;
  vertical-align: middle;
}

.procure-summary p {
  margin-bottom: 8px;
}

.procure-saving {
  font-weight: 600;
  color: #065f46;
}

/* ===== 门户首页 Demo 对齐：欢迎横幅、晨报条、KPI、双栏、入口、架构带、提问框 ===== */
.welcome-banner {
  background: linear-gradient(120deg, #2563eb, #1d4ed8 55%, #10263f);
  color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(16,38,63,.08);
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.welcome-title {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.welcome-date {
  color: rgba(255,255,255,.75);
  font-size: 14px;
}

.welcome-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.welcome-capsule {
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  padding: 6px 12px;
  display: flex;
  gap: 8px;
  align-items: baseline;
  white-space: nowrap;
}

.welcome-capsule-label {
  font-size: 12px;
  color: rgba(255,255,255,.85);
}

.welcome-capsule-value {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.morning-report {
  background: #fffaf0;
  border: 1px solid #fde68a;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16,38,63,.05), 0 8px 24px rgba(16,38,63,.05);
  padding: 16px;
  margin-bottom: 16px;
  position: relative;
}

.morning-report-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.morning-report-title {
  font-size: 15px;
  font-weight: 600;
  color: #10263f;
}

.morning-metrics {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.morning-metric {
  flex: 1 1 140px;
  background: #ffffff;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 10px 14px;
}

.morning-metric-label {
  display: block;
  font-size: 13px;
  color: #6b7280;
}

.morning-metric-value {
  font-size: 20px;
  font-weight: 700;
  color: #10263f;
}

.morning-summary {
  color: #374151;
  margin-bottom: 6px;
}

.morning-alert {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  color: #92400e;
  padding: 8px 12px;
  margin-bottom: 10px;
}

.morning-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.morning-link:hover {
  text-decoration: underline;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  margin-bottom: 0;
  display: grid;
  gap: 4px;
  padding: 16px 18px;
}

.kpi-label {
  font-size: 12px;
  color: #64748b;
}

.kpi-value {
  font-size: 28px;
  font-weight: 600;
  color: #0f2233;
}

.kpi-spark {
  width: 100%;
  height: 32px;
  display: block;
  /* UI1 首页迷你趋势图容器浅色点线网格（纯背景，不改数据/SVG path） */
  background-color: #f8fafc;
  background-image:
    repeating-linear-gradient(0deg, rgba(100,116,139,.14) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(90deg, rgba(100,116,139,.14) 0 1px, transparent 1px 8px);
  border-radius: 8px;
}

.kpi-delta {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.kpi-up {
  color: #16a34a;
}

.kpi-down {
  color: #dc2626;
}

.home-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.home-col {
  margin-bottom: 0;
}

.read-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #6b7280;
}

.read-progress-label {
  flex-shrink: 0;
}

.read-progress-track {
  flex: 1;
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.read-progress-fill {
  display: block;
  height: 100%;
  background: #2563eb;
  border-radius: 999px;
}

.notice-row {
  align-items: center;
  flex-wrap: wrap;
}

.confirm-read {
  flex-shrink: 0;
  font-size: 13px;
  font-family: inherit;
  color: #ffffff;
  background: #2563eb;
  border: 1px solid #2563eb;
  border-radius: 8px;
  padding: 5px 12px;
  cursor: pointer;
}

.confirm-read:disabled {
  color: #9ca3af;
  background: #f3f4f6;
  border-color: #d1d5db;
  cursor: not-allowed;
}

.todo-list {
  list-style: none;
}

.todo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}

.todo-row:last-child {
  border-bottom: none;
}

.todo-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #374151;
  cursor: pointer;
}

.todo-badge {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

.todo-badge-amber {
  background: #fef3c7;
  color: #d97706;
  border: 1px solid #fcd34d;
}

.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.entry-cell {
  display: block;
  text-align: center;
  padding: 14px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  color: #2563eb;
  font-weight: 600;
}

.arch-band {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  text-align: center;
}

.arch-step {
  font-weight: 600;
  color: #10263f;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 6px 14px;
  white-space: nowrap;
}

.arch-arrow {
  color: #2563eb;
  font-weight: 700;
}

.home-ask-bar {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.home-ask-bar input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  color: #9ca3af;
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 12px;
}

.home-ask-bar input::placeholder {
  color: #9ca3af;
}

.home-ask-bar button {
  flex-shrink: 0;
  padding: 12px 22px;
  font-size: 14px;
  font-family: inherit;
  color: #9ca3af;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  cursor: not-allowed;
}

/* ===== Demo 对齐：AI 工作台双栏与执行轨迹、知识库空间标签与待核区 ===== */
.ai-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.ai-columns .card {
  margin-bottom: 0;
}

.trace-list {
  list-style: none;
}

.trace-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}

.trace-row:last-child {
  border-bottom: none;
}

.trace-step {
  flex: 1;
  color: #374151;
}

.trace-time {
  flex-shrink: 0;
  font-size: 13px;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}

.space-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.space-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 6px 14px;
}

.space-tab-pending {
  color: #d97706;
  background: #fef3c7;
  border-color: #fcd34d;
}

.space-tab-count {
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
  color: #d97706;
  background: #ffffff;
  border: 1px solid #fcd34d;
  border-radius: 999px;
  padding: 1px 7px;
}

.review-btn {
  flex-shrink: 0;
  font-size: 13px;
  font-family: inherit;
  color: #9ca3af;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 5px 12px;
  cursor: not-allowed;
}

/* ===== UI1 登录卡：圆角 16px、阴影加深一级、品牌行 18px/700 ===== */
#login-gate .card {
  border-radius: 16px;
  box-shadow: 0 2px 4px rgba(16,38,63,.06), 0 12px 32px rgba(16,38,63,.10);
}

#login-gate h2 {
  font-size: 18px;
  font-weight: 700;
  color: #0f2233;
}

@media (max-width: 768px) {
  .ai-columns {
    grid-template-columns: 1fr;
  }

  .home-columns {
    grid-template-columns: 1fr;
  }

  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
  }

  .nav-list {
    display: flex;
    flex-wrap: wrap;
  }

  .nav-item {
    margin-right: 4px;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .topbar-center {
    flex-basis: 100%;
    order: 3;
  }

  .content {
    padding: 12px;
  }
}
