:root {
  --bg: #eef1f6;
  --panel: #ffffff;
  --side: #f6f8fb;
  --line: #e4e8f0;
  --line-2: #eef1f6;
  --text: #1c2434;
  --muted: #7b8496;
  --accent: #2f6bff;
  --accent-soft: #eaf0ff;
  --green: #12a67a;
  --red: #e5534b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .05);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: #dfe4ee;
  color: var(--text);
  font: 14px/1.55 "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.shell {
  display: grid;
  grid-template-columns: 56px 300px 1fr;
  height: 100vh;
  background: var(--panel);
  overflow: hidden;
}

/* ---------- left rail ---------- */
.rail {
  background: #101828;
  color: #c7d0e0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
}

.rail-logo {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #4f8bff, #2f6bff);
  color: #fff; font-weight: 800; letter-spacing: .5px;
  margin-bottom: 8px;
}

.rail-btn {
  width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: transparent; color: #9aa7bd;
  display: grid; place-items: center;
}
.rail-btn:hover { background: rgba(255,255,255,.08); color: #fff; }

.rail-foot { margin-top: auto; font-size: 10px; color: #6b7891; text-align: center; line-height: 1.2; padding: 0 4px; word-break: break-all; }

/* ---------- sidebar ---------- */
.side {
  background: var(--side);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  transition: width .18s ease;
}
.side.collapsed { width: 0; overflow: hidden; border-right: 0; }

.brand { display: flex; gap: 12px; align-items: center; padding: 20px 20px 14px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, #101828, #33415c);
  color: #fff; display: grid; place-items: center; font-weight: 800;
}
.brand-text { display: flex; flex-direction: column; }
.brand-text b { font-size: 17px; letter-spacing: .2px; }
.brand-text span { color: var(--muted); font-size: 12px; }

.side-new {
  margin: 6px 16px 12px;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: #fff; border-radius: 12px;
  color: var(--text); font-weight: 600;
}
.side-new:hover { border-color: #cdd6e6; box-shadow: var(--shadow); }
.side-new svg { color: var(--accent); }

.nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }
.nav button {
  display: flex; align-items: center; gap: 10px;
  border: 0; background: transparent; color: #4a5468;
  padding: 10px 12px; border-radius: 10px; text-align: left;
}
.nav button:hover { background: #eceff6; color: var(--text); }
.nav button.active { background: #e7edfb; color: var(--accent); font-weight: 600; }
.nav .ico { display: grid; place-items: center; width: 20px; }

.nav-sep { height: 1px; background: var(--line); margin: 10px 8px; }

.recent { margin-top: 12px; padding: 0 16px; min-height: 0; display: flex; flex-direction: column; }
.recent-head { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; padding: 6px 2px; }
.mini { border: 0; background: transparent; color: var(--muted); font-size: 16px; line-height: 1; }
.recent-list { display: flex; flex-direction: column; gap: 2px; overflow: auto; }
.recent-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 0; background: transparent; text-align: left;
  padding: 7px 8px; border-radius: 8px; color: #4a5468; font-size: 12.5px;
}
.recent-item:hover { background: #eceff6; }
.recent-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #c3cad8; flex: 0 0 6px; }
.dot.running { background: var(--accent); }
.dot.done { background: var(--green); }
.dot.error, .dot.cancelled { background: var(--red); }

.side-foot { margin-top: auto; padding: 12px 18px; display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }

/* ---------- content ---------- */
.content { min-width: 0; display: flex; flex-direction: column; background: #fff; border-radius: 18px 0 0 0; }

.page-head {
  display: flex; align-items: center; gap: 14px;
  padding: 26px 34px 20px;
  border-bottom: 1px solid var(--line-2);
}
.head-icon {
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
}
.head-icon svg { width: 22px; height: 22px; }
.head-text h1 { margin: 0; font-size: 21px; }
.head-text p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; }

.page-body { flex: 1; overflow: auto; padding: 24px 34px 34px; }
.page-body.chat { display: flex; padding: 0; }

/* ---------- generic ---------- */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.empty {
  border: 1px dashed #d8dfeb; border-radius: var(--radius);
  padding: 34px; text-align: center; color: var(--muted);
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.link { border: 0; background: transparent; color: var(--accent); padding: 0; }
.ghost {
  border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 7px 12px; color: #46506a;
}
.ghost:hover { border-color: #cdd6e6; }
.ghost.sm, .primary.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.primary {
  border: 0; background: var(--accent); color: #fff;
  border-radius: 9px; padding: 8px 16px; font-weight: 600;
}
.primary:disabled { opacity: .55; }
.badge { font-size: 11px; padding: 2px 9px; border-radius: 999px; background: #f1f3f8; color: var(--muted); }
.badge.done { background: #e8f6f0; color: var(--green); }
.badge.running { background: var(--accent-soft); color: var(--accent); }
.badge.error, .badge.cancelled { background: #fdeeee; color: var(--red); }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.toolbar-actions { margin-left: auto; }
.field { display: flex; align-items: center; gap: 10px; }
.field label { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.search {
  border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 8px 12px; min-width: 240px; outline: none;
}
.search:focus { border-color: #a9c0f8; }

/* workbench */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px; background: #fff;
}
.stat-card span { color: var(--muted); font-size: 12.5px; }
.stat-card b { font-size: 24px; }
.stat-card small { color: var(--muted); font-size: 11px; }

.chips-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 6px 13px; font-size: 12.5px;
}
.chip:hover { border-color: #d9b7bd; color: var(--text); }
.chip.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.cat-tag { margin-left: auto; font-size: 11px; color: var(--muted); background: #f3eef0; padding: 2px 8px; border-radius: 999px; }
.cap-actions { display: flex; gap: 6px; }
.form textarea { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; color: var(--text); resize: vertical; font: inherit; }
.form textarea:focus { border-color: #a9c0f8; }
.hit-snippet { max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ghost.danger { color: #c0392b; border-color: #f0d3cf; }
.ghost.danger:hover { background: #fdf3f1; }

/* trend */
.trend {
  display: flex; align-items: flex-end; gap: 14px; height: 150px;
  padding: 12px 14px 8px; border: 1px solid var(--line); border-radius: 12px;
}
.bar-wrap { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.bar { width: 58%; max-width: 44px; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, #7aa2ff, #2f6bff); min-height: 2px; }
.bar-num { font-size: 11px; color: var(--muted); height: 14px; }
.bar-label { font-size: 11px; color: var(--muted); }

/* progress */
.progress-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line-2); background: #fff;
}
.progress-card:last-child { border-bottom: 0; }
.progress-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid #d8e3ff; border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.progress-body { display: flex; flex-direction: column; gap: 2px; }
.progress-body span { color: var(--muted); font-size: 12px; }
.assign-row { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; }
.assign-row select { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: #fff; }
.badge.pending { background: #fff7e6; color: #9a6a00; }
.badge.approved { background: #e9f8ef; color: #1c7c43; }
.badge.rejected { background: #fdecea; color: #b3261e; }
.linklike { background: none; border: 0; padding: 0; color: var(--text); font: inherit; text-align: left; }

.goal-bar { flex: 1; max-width: 240px; height: 8px; margin-left: auto; background: #eef2f9; border-radius: 999px; overflow: hidden; }
.goal-fill { display: block; height: 100%; background: #8fb0ff; }
.goal-fill.ok { background: #39a96b; }
.goal-fill.warn { background: #e0a800; }

/* command palette */
.palette {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(18, 24, 38, .32);
  display: flex; justify-content: center; align-items: flex-start;
  padding-top: 12vh;
}
.palette[hidden] { display: none; }
.palette-box {
  width: min(640px, 92vw); background: #fff; border-radius: 14px;
  box-shadow: 0 24px 60px rgba(20, 30, 60, .25); overflow: hidden;
}
.palette-box input {
  width: 100%; border: 0; border-bottom: 1px solid var(--line-2);
  padding: 16px 18px; font-size: 15px; outline: none;
}
.palette-list { max-height: 52vh; overflow: auto; padding: 6px; }
.palette-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 0; background: none; text-align: left; padding: 10px 12px; border-radius: 9px;
}
.palette-item:hover, .palette-item.active { background: var(--accent-soft); }
.palette-kind { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; }
.palette-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.palette-snippet { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-item mark { background: #ffec9e; color: inherit; padding: 0 1px; border-radius: 2px; }
.palette-empty { padding: 18px; color: var(--muted); font-size: 13px; text-align: center; }
.palette-section { padding: 8px 12px 4px; font-size: 11px; color: var(--muted); letter-spacing: .04em; }

/* budget */
.budget { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.budget-bar { flex: 1; max-width: 320px; height: 6px; background: #eef2f9; border-radius: 999px; overflow: hidden; }
.budget-bar span { display: block; height: 100%; background: #7aa2ff; }
.budget-bar span.high { background: #e0a800; }

.block { margin-bottom: 24px; }
.block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.block-head h2 { margin: 0; font-size: 15px; }
.tile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile {
  border: 1px solid var(--line); background: #fff; border-radius: 12px;
  padding: 14px; text-align: left; display: flex; flex-direction: column; gap: 6px;
}
.tile:hover { border-color: #b9c9ee; box-shadow: var(--shadow); }
.tile b { font-size: 14px; }
.tile span { color: var(--muted); font-size: 12.5px; }

.rows { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rows .row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 0; border-bottom: 1px solid var(--line-2); background: #fff;
  padding: 12px 16px; text-align: left;
}
.rows .row:last-child { border-bottom: 0; }
.rows .row:hover { background: #fafbfe; }
.batch-gallery { display: flex; gap: 12px; flex-wrap: wrap; margin: 10px 0; }
.batch-gallery figure { margin: 0; width: 220px; }
.batch-gallery img { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; display: block; }
.batch-gallery figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.row-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card-grid.three { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.cap-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  display: flex; flex-direction: column; gap: 8px; background: #fff;
}
.cap-card:hover { border-color: #d9b7bd; box-shadow: var(--shadow); }
.cap-top { display: flex; align-items: center; gap: 9px; }
.cap-ico { width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.cap-ico svg { width: 16px; height: 16px; }
.cap-card p { margin: 0; color: var(--muted); font-size: 12.5px; min-height: 34px; }
.cap-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.cap-foot code { font-size: 11px; color: var(--muted); background: #f3eef0; padding: 3px 7px; border-radius: 6px; }

/* connectors */
.conn {
  display: flex; align-items: center; gap: 12px; text-align: left;
  border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff;
}
.conn:hover { border-color: #b9c9ee; box-shadow: var(--shadow); }
.logo-tile {
  width: 44px; height: 44px; border-radius: 10px; flex: 0 0 44px;
  background: linear-gradient(135deg, #2f6bff, #4f8bff); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 18px;
}
.conn-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.conn-text small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { margin-left: auto; color: #b6bfd0; font-size: 20px; }

.detail { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.detail-head { display: flex; align-items: center; gap: 14px; }
.detail-head h2 { margin: 0; font-size: 18px; }
.detail-head p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; }
.detail-head .badge { margin-left: auto; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 20px 0; }
.detail-grid label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.back { margin-bottom: 14px; }

/* table */
.table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.table th, .table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.table th { background: #fafbfe; color: var(--muted); font-weight: 500; font-size: 12px; }
.table tr:last-child td { border-bottom: 0; }

/* form */
.form { max-width: 560px; display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12.5px; }
.form input { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; outline: none; color: var(--text); }
.form input:focus { border-color: #a9c0f8; }
.row { display: flex; align-items: center; gap: 12px; }

/* chat */
.chat { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chat-scroll { flex: 1; overflow: auto; padding: 30px 34px 18px; display: flex; flex-direction: column; gap: 16px; }
.welcome { max-width: 760px; margin: 8px auto 0; width: 100%; }
.welcome h2 { font-size: 20px; line-height: 1.5; margin: 0 0 18px; font-weight: 650; }
.welcome p { margin: 0 0 8px; color: #3d465a; }
.welcome ul { margin: 0 0 14px; padding-left: 20px; color: #3d465a; }
.welcome li { margin: 6px 0; }
.welcome .meta-line { color: var(--muted); font-size: 12px; }
.msg { display: flex; gap: 12px; max-width: 820px; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.avatar { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: #101828; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.msg.user .avatar { background: var(--accent); }
.bubble { background: #f6f8fc; border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 14px; white-space: normal; word-break: break-word; }
.bubble.streaming { white-space: pre-wrap; }
.msg.user .bubble { background: var(--accent-soft); border-color: #dbe6ff; }
.bubble h1, .bubble h2, .bubble h3, .bubble h4 { margin: 12px 0 6px; line-height: 1.4; }
.bubble h1 { font-size: 17px; }
.bubble h2 { font-size: 15.5px; }
.bubble h3, .bubble h4 { font-size: 14.5px; }
.bubble ul { margin: 6px 0 8px; padding-left: 20px; }
.bubble li { margin: 3px 0; }
.bubble code { background: #eef1f7; border-radius: 4px; padding: 1px 5px; font: 12.5px ui-monospace, Consolas, monospace; }
.bubble pre { background: #f3f5fa; border-radius: 8px; padding: 10px 12px; overflow: auto; margin: 8px 0; }
.bubble pre code { background: transparent; padding: 0; }
.bubble strong { font-weight: 650; }
.tool-card {
  margin-left: 42px; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; font-size: 12.5px; display: flex; gap: 10px; align-items: center; background: #fbfcfe;
}
.tool-card b { color: var(--accent); font-weight: 600; }

.composer { border-top: 1px solid var(--line-2); padding: 14px 34px 20px; background: #fff; }
.composer textarea {
  width: 100%; resize: none; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; outline: none; background: #fbfcfe;
}
.composer textarea:focus { border-color: #a9c0f8; background: #fff; }
.composer-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.composer-bar .hint { color: var(--muted); font-size: 12px; }
.ctx { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ctx-chip { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; }

/* modal & toast */
.modal { position: fixed; inset: 0; background: rgba(16,24,40,.4); display: grid; place-items: center; z-index: 40; }
.modal[hidden] { display: none; }
.modal-box { width: min(860px, 86vw); max-height: 80vh; display: flex; flex-direction: column; background: #fff; border-radius: 16px; overflow: hidden; }
.modal-box header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-box pre { margin: 0; padding: 18px; overflow: auto; white-space: pre-wrap; font: 12.5px/1.65 ui-monospace, Consolas, monospace; }
.md-body { padding: 18px; overflow: auto; white-space: pre-wrap; font-size: 13px; line-height: 1.7; }
.md-body h1, .md-body h2, .md-body h3 { margin: 14px 0 6px; }
.md-body h1 { font-size: 18px; }
.md-body h2 { font-size: 16px; }
.md-body h3 { font-size: 14.5px; }
.md-body ul { margin: 6px 0 10px; padding-left: 20px; }
.md-body code { background: #eef1f7; border-radius: 4px; padding: 1px 5px; font: 12.5px ui-monospace, Consolas, monospace; }
.md-body pre { background: #f3f5fa; border-radius: 8px; padding: 10px 12px; overflow: auto; }
.md-body pre code { background: transparent; padding: 0; }
.toast {
  position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%);
  background: #101828; color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; z-index: 50; box-shadow: var(--shadow);
}
.toast[hidden] { display: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d7dde9; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* task detail */
.detail-title { margin: 0 0 16px; font-size: 18px; }
.section-title { margin: 22px 0 10px; font-size: 14px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.step { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; position: relative; }
.step::before { content: ""; position: absolute; left: -20px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: #c3cad8; }
.step.done::before { background: var(--green); }
.step.running::before { background: var(--accent); }
.step.error::before { background: var(--red); }
.step-name { font-weight: 600; }
.step-time { color: var(--muted); font-size: 11px; }
.step-detail { flex-basis: 100%; color: var(--muted); font-size: 12px; word-break: break-word; }
.error-text { color: var(--red); font-size: 12.5px; }

.row-actions { margin-left: auto; display: flex; gap: 8px; }

.team-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.team-row .search { min-width: 180px; }

.conn-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.conn-form label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12px; }
.conn-form input { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; outline: none; color: var(--text); }
.conn-form textarea { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; outline: none; color: var(--text); resize: vertical; font: 12.5px ui-monospace, Consolas, monospace; grid-column: span 3; }
.conn-form label:has(textarea) { grid-column: span 3; }
.conn-form input:focus { border-color: #a9c0f8; }

/* hero */
.hero { max-width: 900px; margin: 46px auto 0; text-align: center; }
.hero h1 { font-size: 42px; line-height: 1.25; margin: 0 0 12px; font-weight: 700; letter-spacing: -.5px; }
.hero h1 b { color: var(--accent); }
.hero-sub { font-size: 18px; color: #3d465a; margin: 0 0 22px; }
.hero-list { max-width: 640px; margin: 0 auto 18px; padding-left: 20px; text-align: left; color: var(--muted); font-size: 13.5px; }
.hero-list li { margin: 7px 0; }
.hero-tip { color: #3d465a; font-size: 14px; margin: 0 0 6px; }

/* knowledge categories */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.cat {
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  padding: 14px 16px;
}
.cat:hover { border-color: #b9c9ee; box-shadow: var(--shadow); }
.cat.active { border-color: var(--accent); background: var(--accent-soft); }
.cat-ico { color: var(--accent); display: flex; }
.cat b { font-size: 14.5px; }
.cat small { color: var(--muted); font-size: 12px; }

/* composer extras */
.composer-left { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: #46506a;
  display: grid; place-items: center; font-size: 16px; line-height: 1;
}
.icon-btn:hover { border-color: #cdd6e6; }
.mode-chip { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.data-select { border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; font-size: 12px; color: var(--muted); background: #fff; max-width: 190px; }

/* inline create forms */
.inline-form {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px;
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; background: #fbfcfe;
}
.inline-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.inline-form input, .inline-form textarea, .inline-form select {
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px;
  outline: none; background: #fff; resize: vertical;
}
.inline-form input:focus, .inline-form textarea:focus { border-color: #a9c0f8; }

.inline-form .row { display: flex; gap: 10px; }
.inline-form .grow { flex: 1; }

.check-row { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 13px; }
.check-row input { width: 16px; height: 16px; }


/* ---------- AIECengine brand kit 2.2.0 ---------- */
:root {
  --bg: #F8F6F7;
  --panel: #FFFFFF;
  --side: #FFFFFF;
  --line: #DCE3EE;
  --line-2: #EDF1F7;
  --text: #172440;
  --muted: #59677F;
  --accent: #2855D9;
  --accent-soft: #EAF0FF;
  --teal: #24A6A0;
  --green: #24A6A0;
  --red: #E5534B;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(23, 36, 64, .06);
}
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
.shell { grid-template-columns: 56px 288px 1fr; background: var(--bg); }
.rail {
  background: #FFFFFF;
  color: var(--muted);
  border-right: 1px solid var(--line);
}
.rail-logo {
  width: 36px; height: 36px; border-radius: 0;
  background: transparent; margin-bottom: 10px;
}
.rail-logo svg { width: 28px; height: 28px; stroke: none; }
.rail-btn { color: var(--muted); }
.rail-btn:hover { background: #EEF2F9; color: var(--accent); }
.rail-foot { color: #8A97AC; }
.side { background: #FFFFFF; }
.brand { padding: 20px 18px 12px; gap: 10px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: #FFFFFF; padding: 0;
}
.brand-mark svg { width: 34px; height: 34px; stroke: none; }
.brand-text b {
  font: 650 19px/1.2 "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: -.4px; color: var(--text);
}
.brand-text span { font-size: 11.5px; color: var(--muted); }
.side-new { border-color: var(--line); border-radius: 10px; }
.side-new svg { color: var(--accent); }
.nav button { color: #3D4B63; }
.nav button:hover { background: #F1F4FA; color: var(--text); }
.nav button.active { background: var(--accent-soft); color: var(--accent); }
.content { background: var(--bg); border-radius: 0; }
.page-head { background: #FFFFFF; padding: 24px 32px 18px; border-bottom: 1px solid var(--line); }
.page-body { padding: 24px 32px 32px; }
.head-icon { background: var(--accent-soft); color: var(--accent); border-radius: 10px; }
.head-text h1 { font-size: 20px; letter-spacing: -.2px; }
.primary { background: var(--accent); border-radius: 8px; }
.primary:hover { background: #1F46B8; }
.ghost, .search, .side-new { border-radius: 8px; }
.stat-card, .tile, .empty { border-radius: 10px; background: #FFFFFF; }
.tile:hover { border-color: #B9C9EE; box-shadow: var(--shadow); }
.section-title { font-size: 15px; }
.badge.running { background: var(--accent-soft); color: var(--accent); }
.chip.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ---------- AIECengine brand pass 2.3.0 ---------- */
.rail { background: var(--bg); border-right: 1px solid var(--line); }
.rail-btn { color: #6B7A93; }
.rail-btn:hover { background: #E9EEF8; color: var(--accent); }
svg { stroke-width: 1.75; }
.nav { padding: 0 10px; }
.nav button { font-size: 13px; padding: 9px 10px; gap: 10px; border-radius: 6px; }
.nav .ico { width: 19px; }
.nav .ico svg { width: 19px; height: 19px; }
.nav-sep { margin: 8px 6px; }
.side-new { border-radius: 6px; font-size: 13px; }
.ghost, .primary, .search, .side-new { border-radius: 6px; }
.page-head { padding: 22px 32px 16px; }
.head-text h1 { font-size: 20px; letter-spacing: -.3px; }
.head-text p { font-size: 12.5px; }
.section-title { font-size: 15px; letter-spacing: -.1px; }
.stat-card b { font-size: 28px; letter-spacing: -1px; }
.table { border-radius: 10px; }
.table th { background: #f8f6f7; }
.chip { border-radius: 6px; }
.badge { border-radius: 4px; }

/* ---------- AIECengine brand kit 2.4.0（红焰版） ---------- */
:root {
  --bg: #F8F6F7;
  --panel: #FFFFFF;
  --side: #FFFFFF;
  --line: #E6DFE2;
  --line-2: #F2ECEE;
  --text: #282326;
  --muted: #6C6268;
  --accent: #C62E3B;
  --accent-soft: #FCEBEE;
  --teal: #E95354;
  --green: #15745F;
  --red: #B63945;
  --warn: #916100;
  --radius: 10px;
  --shadow: 0 6px 24px rgba(40, 35, 38, .07);
}
body { background: var(--bg); color: var(--text); }
.rail { background: #F8F6F7; border-right: 1px solid var(--line); }
.rail-btn { color: #7A6D73; }
.rail-btn:hover { background: #F3E7EA; color: var(--accent); }
.side { background: #FFFFFF; }
.brand-text b { color: var(--text); }
.side-new { border-color: var(--line); }
.side-new svg { color: var(--accent); }
.nav button { color: #4C4247; }
.nav button:hover { background: #F7EFF1; color: var(--text); }
.nav button.active { background: #FCEBEE; color: var(--accent); }
.content { background: var(--bg); }
.page-head { background: #FFFFFF; border-bottom: 1px solid var(--line); }
.head-icon { background: #FCEBEE; color: var(--accent); }
.primary { background: var(--accent); }
.primary:hover { background: #A92531; }
.link { color: var(--accent); }
.chip.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.badge.running { background: var(--accent-soft); color: var(--accent); }
.badge.done { background: #E4F4EE; color: #15745F; }
.badge.error, .badge.cancelled { background: #F7E7E9; color: #B63945; }
.search:focus { border-color: #E5A6AD; }
.ghost:hover { border-color: #D9C7CC; }
.stat-card, .tile, .empty { background: #FFFFFF; }

/* ---------- 新建任务首页 ---------- */
.home-hero { text-align:center; padding:96px 24px 24px; }
.home-hero h1 { margin:0; font-size:44px; letter-spacing:-1.5px; font-weight:650; color:var(--text); }
.home-hero h1 b { color:var(--accent); font-weight:700; }
.home-hero p { margin:16px 0 0; color:var(--muted); font-size:16px; }
.quick-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:16px; max-width:1120px; margin:26px auto 0; padding:0 24px; }
.quick-card { position:relative; display:flex; justify-content:space-between; align-items:flex-start; text-align:left; border:1px solid var(--line); background:#fff; border-radius:14px; padding:22px 24px; min-height:148px; overflow:hidden; }
.quick-card:hover { border-color:#E3B7BD; box-shadow:var(--shadow); }
.quick-copy { display:flex; flex-direction:column; gap:8px; max-width:64%; z-index:1; }
.quick-copy b { font-size:17px; color:var(--text); }
.quick-copy span { color:var(--muted); font-size:13px; line-height:1.55; }
.quick-arrow { width:30px; height:30px; border-radius:50%; border:1px solid var(--line); display:grid; place-items:center; color:var(--muted); z-index:1; }
.quick-card:hover .quick-arrow { background:var(--accent); border-color:var(--accent); color:#fff; }
.quick-card img { position:absolute; right:10px; bottom:-8px; width:150px; height:112px; object-fit:contain; pointer-events:none; }
.home-note { text-align:center; color:var(--muted); font-size:12px; margin-top:18px; }
@media (max-width:1000px) { .quick-grid { grid-template-columns:1fr; } .home-hero h1 { font-size:34px; } }

/* ---------- 视觉工坊 ---------- */
.studio-shell { max-width: 1280px; margin: 0 auto; }
.studio-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.studio-head h2 { margin: 0; font-size: 22px; letter-spacing: -.5px; }
.studio-head span { display: block; margin-top: 4px; }
.studio-body { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: start; }
.studio-side { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; position: sticky; top: 10px; }
.studio-side button { border: 0; background: transparent; text-align: left; padding: 9px 10px; border-radius: 6px; color: var(--muted); font-size: 13px; }
.studio-side button:hover { background: #F7EFF1; color: var(--text); }
.studio-side button.active { background: #FCEBEE; color: var(--accent); font-weight: 600; }
.studio-main { min-width: 0; }
.studio-title-row { display: flex; align-items: center; gap: 10px; }
.studio-title-row h3 { margin: 0; font-size: 16px; }
.studio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.studio-card { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 0; overflow: hidden; text-align: left; }
.studio-card:hover { border-color: #E3B7BD; box-shadow: var(--shadow); }
.studio-card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
.studio-card-meta { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; }
.studio-card-meta b { font-size: 13.5px; font-weight: 600; }
.studio-tag { align-self: flex-start; font-size: 11px; color: var(--accent); background: #FCEBEE; border-radius: 4px; padding: 2px 7px; }
.studio-detail { display: grid; grid-template-columns: 280px 1fr; gap: 18px; }
.studio-detail img { width: 100%; border-radius: 10px; border: 1px solid var(--line); }
@media (max-width: 1100px) { .studio-grid { grid-template-columns: repeat(2, 1fr); } .studio-body { grid-template-columns: 120px 1fr; } }
@media (max-width: 760px) { .studio-body { grid-template-columns: 1fr; } .studio-detail { grid-template-columns: 1fr; } }

/* ---------- 常用经营现场 ---------- */
.platform-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.platform-card { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 12px 14px; text-align: left; }
.platform-card:hover { border-color: #E3B7BD; box-shadow: var(--shadow); }
.platform-card img { width: 28px; height: 28px; border-radius: 6px; object-fit: contain; }
.platform-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.platform-text b { font-size: 13px; font-weight: 600; color: var(--text); }
.platform-text small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.platform-card .chev { color: var(--muted); }
.conn-logo { width: 30px; height: 30px; border-radius: 8px; object-fit: contain; }
@media (max-width: 1100px) { .platform-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 生图工作区表单 ---------- */
.studio-form { display:flex; flex-direction:column; gap:12px; max-width:660px; background:#fff; border:1px solid var(--line); border-radius:12px; padding:18px; margin-top:14px; }
.studio-field { display:flex; flex-direction:column; gap:6px; font-size:12.5px; color:var(--muted); }
.studio-field input, .studio-field textarea, .studio-field select { border:1px solid var(--line); border-radius:6px; padding:9px 11px; font:inherit; color:var(--text); background:#fff; }
.studio-field input:focus, .studio-field textarea:focus, .studio-field select:focus { outline:none; border-color:#E5A6AD; }

.cap-ico img { width: 26px; height: 26px; object-fit: contain; border-radius: 6px; }

.agent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.agent-hero { margin-bottom: 14px; }
.agent-hero h2 { margin: 2px 0 0; font-size: 24px; }
@media (max-width: 900px) { .agent-grid { grid-template-columns: 1fr; } }

.side-user { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line-2); margin-top: 8px; }
.side-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.side-user-text { display: flex; flex-direction: column; min-width: 0; }
.side-user-text b { font-size: 12.5px; }
.side-user-text small { color: var(--muted); font-size: 11px; }

.studio-case-layout { display: flex; gap: 18px; align-items: flex-start; }
.studio-filters { width: 280px; flex: 0 0 280px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; }
.studio-results { flex: 1; min-width: 0; }
.studio-cat-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.studio-cat-list button { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; color: var(--text); }
.studio-cat-list button.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.studio-cat-list small { color: var(--muted); }
@media (max-width: 1100px) { .studio-case-layout { flex-direction: column; } .studio-filters { width: 100%; flex: none; } }

.studio-fav { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,.92); color: var(--accent); border-radius: 999px; padding: 2px 7px; font-size: 12px; }
.studio-card { position: relative; }

.studio-side button { display: flex; align-items: center; gap: 9px; }
.studio-nav-ico { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; background: var(--accent-soft); color: var(--accent); flex: none; }
.studio-nav-ico svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.studio-side button.active .studio-nav-ico { background: var(--accent); color: #fff; }

.dept-layout { display: grid; grid-template-columns: 260px 1fr; gap: 16px; }
.dept-tree { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; display: flex; flex-direction: column; gap: 4px; }
.dept-tree button { display: flex; justify-content: space-between; align-items: center; border: 0; background: transparent; padding: 8px 10px; border-radius: 7px; color: var(--text); font-size: 13px; text-align: left; }
.dept-tree button.active { background: var(--accent-soft); color: var(--accent); }
.dept-detail { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: #fff; }
.dept-detail h3 { margin: 0 0 4px; }
@media (max-width: 1000px) { .dept-layout { grid-template-columns: 1fr; } }

.brain-mascot { position: fixed; right: 24px; bottom: 80px; z-index: 30; background: transparent; border: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; }
.brain-mascot img { width: 58px; height: 58px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(40,35,38,.16)); }
.brain-mascot span { font-size: 10px; color: var(--muted); }

.studio-detail { grid-template-columns: minmax(320px, 1.1fr) 1fr; }
.studio-prompt { background: #f8f6f7; border: 1px solid var(--line); border-radius: 8px; padding: 10px; color: var(--text); margin-bottom: 10px; }
.studio-similar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.studio-similar button { border: 0; background: transparent; padding: 0; text-align: left; color: var(--text); }
.studio-similar img { width: 100%; height: 90px; object-fit: cover; border-radius: 6px; display: block; margin-bottom: 4px; }
.studio-similar span { font-size: 11px; color: var(--muted); }

.studio-detail { align-items: start; }
.studio-detail .small p { margin: 6px 0; }
.studio-detail .small h3 { font-size: 18px; }
.studio-detail-media img { max-height: 420px; object-fit: contain; background: #fff; }

.dept-add { display: flex; gap: 6px; padding: 8px 6px 4px; border-top: 1px solid var(--line-2); margin-top: 4px; }
.dept-add input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 12px; }
.dept-add select { border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }

.role-switch { margin-left: auto; border: 1px solid var(--line); border-radius: 6px; font-size: 11px; padding: 2px 4px; background: #fff; color: var(--muted); }

/* P15 product packages */
.product-packages .panel{background:var(--panel,#fff);border:1px solid #e9e3e5;border-radius:12px;padding:22px;margin-bottom:18px}.product-toolbar{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.product-toolbar label{display:grid;gap:6px;font-size:12px}.product-toolbar input{padding:9px;border:1px solid #ddd;border-radius:6px}.product-record{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid #eee}.product-record code{font-size:11px;color:#666}.product-detail{padding:14px 0;border-bottom:1px solid #eee}.product-media{display:flex;flex-wrap:wrap;gap:9px;margin:12px 0}.product-media span{background:#f5f2f3;padding:7px;border-radius:5px;font-size:12px}.product-packages table{width:100%;border-collapse:collapse;margin:14px 0}.product-packages th,.product-packages td{text-align:left;padding:8px;border-bottom:1px solid #eee;font-size:12px}.product-packages pre{white-space:pre-wrap;max-height:400px;overflow:auto;font-size:11px}.product-issue{color:#a32431;font-size:12px}

.product-review{border-color:#c62e3b!important}.review-candidate{margin:20px 0;padding:18px;border:1px solid #e5dfe1;border-radius:9px}.review-source{overflow-wrap:anywhere;font-weight:600}.review-conflict{display:grid;gap:10px;margin:16px 0;border:1px solid #c62e3b;border-radius:6px}.review-conflict label{display:grid;grid-template-columns:auto 1fr;gap:5px}.review-conflict small{grid-column:2;overflow-wrap:anywhere}.review-table-wrap{overflow:auto;max-height:500px}.review-diff{table-layout:fixed;min-width:800px}.review-diff pre{font-size:11px;max-height:160px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;margin:0}.review-diff small{display:block;font-size:10px;overflow-wrap:anywhere;color:#666}.review-diff td{vertical-align:top}.review-diff tr[data-review-kind=deleted]{background:#fff1f1}.review-diff tr[data-review-kind=added]{background:#f1faf5}.review-accept{display:block;margin:18px 0}.review-candidate select{max-width:100%;padding:6px}

/* ============================================================
   P23 / 2.75.0 · 经营指挥台外壳
   ============================================================ */
:root {
  --ink: #1B1719;
  --paper: #F6F1EE;
  --surface: #FFFDFC;
  --signal: #C62E3B;
  --signal-soft: #F7E3E2;
  --muted: #6F625D;
  --line: #E5D9D4;
  --line-2: #F0E7E3;
  --ok: #2F7D5A;
  --warn: #A8691B;
  --unknown: #6D5B8A;
  --bg: var(--paper);
  --panel: var(--surface);
  --side: var(--paper);
  --text: var(--ink);
  --accent: var(--signal);
  --accent-soft: var(--signal-soft);
  --radius: 10px;
}
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 13.5px/1.55 "MiSans", "HarmonyOS Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.app-shell {
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr);
  height: 100vh;
  background: var(--paper);
  overflow: hidden;
}
.command-deck {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  background: var(--ink);
  color: #F8F1EC;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.deck-brand { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; color: inherit; padding: 0; }
.deck-mark { width: 26px; height: 26px; color: #F26B5E; display: grid; place-items: center; }
.deck-mark svg { width: 24px; height: 24px; stroke: none; }
.deck-wordmark { font-weight: 700; letter-spacing: .2px; font-size: 14px; }
.deck-crumb { color: #A99A93; font-size: 12px; border-left: 1px solid rgba(255,255,255,.16); padding-left: 14px; white-space: nowrap; }
.deck-search {
  flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px;
  height: 34px; margin-left: 8px; padding: 0 12px;
  border: 1px solid rgba(255,255,255,.14); border-radius: 8px;
  background: rgba(255,255,255,.06); color: #B9ACA6; text-align: left;
}
.deck-search:hover { background: rgba(255,255,255,.1); color: #F8F1EC; }
.deck-search svg { width: 15px; height: 15px; }
.deck-search span { flex: 1; font-size: 12px; }
.deck-search kbd, .shortcut-grid kbd {
  border: 1px solid rgba(255,255,255,.18); border-radius: 4px;
  padding: 0 4px; font: 11px/18px "SFMono-Regular", Consolas, monospace; color: #CBBDB6;
}
.deck-status {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid rgba(255,255,255,.14); background: transparent;
  color: #B9ACA6; border-radius: 999px; padding: 5px 10px; font-size: 11.5px;
}
.deck-status.busy { color: #F8F1EC; border-color: rgba(242,107,94,.5); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #8A7C76; }
.deck-status.busy .status-dot { background: #F26B5E; box-shadow: 0 0 0 3px rgba(242,107,94,.16); }
.deck-new {
  display: flex; align-items: center; gap: 6px;
  border: 0; border-radius: 7px; background: var(--signal); color: #fff;
  padding: 7px 12px; font-weight: 600; font-size: 12px;
}
.deck-new:hover { background: #A92531; }
.deck-new svg { width: 15px; height: 15px; }
.deck-avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: #3A2F2D; color: #F8F1EC; font-size: 12px; font-weight: 700;
}
.deck-role {
  border: 1px solid rgba(255,255,255,.14); background: transparent; color: #B9ACA6;
  border-radius: 6px; font-size: 11px; padding: 3px 5px; max-width: 72px;
}
.workspace {
  display: grid;
  grid-template-columns: 76px 248px minmax(0, 1fr);
  min-height: 0;
  position: relative;
}
.dock {
  display: flex; flex-direction: column; align-items: stretch; gap: 4px;
  padding: 12px 8px; background: #241D20; color: #B9ACA6;
  border-right: 1px solid #33282B;
}
.dock button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 0; background: transparent; color: inherit; border-radius: 10px;
  padding: 8px 2px; font-size: 10px; line-height: 1.2;
}
.dock button:hover { background: rgba(255,255,255,.06); color: #F8F1EC; }
.dock button.active { background: var(--signal); color: #fff; }
.dock-ico { display: grid; place-items: center; width: 26px; height: 26px; }
.dock-ico svg { width: 19px; height: 19px; }
.dock-spacer { flex: 1; }
.dock-help { opacity: .7; }
.context {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--paper); border-right: 1px solid var(--line);
}
.context-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 16px 10px; color: var(--ink); font-size: 13px; font-weight: 700;
}
.context-nav { display: flex; flex-direction: column; gap: 2px; padding: 2px 8px 10px; }
.context-nav button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  border: 0; background: transparent; text-align: left; color: #5D514C;
  border-radius: 7px; padding: 8px 10px; font-size: 12.5px;
}
.context-nav button:hover { background: #EFE5E0; color: var(--ink); }
.context-nav button.active { background: var(--signal-soft); color: var(--signal); font-weight: 600; }
.context-nav small { color: #9A8A84; font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.recent { margin-top: 4px; padding: 0 12px; min-height: 0; display: flex; flex-direction: column; }
.recent-head { display: flex; justify-content: space-between; align-items: center; color: #9A8A84; font-size: 10.5px; letter-spacing: .4px; padding: 8px 2px; }
.recent-list { display: flex; flex-direction: column; gap: 1px; overflow: auto; }
.recent-item { display: flex; align-items: center; justify-content: space-between; gap: 6px; border: 0; background: transparent; text-align: left; padding: 7px 8px; border-radius: 6px; color: #5D514C; font-size: 11.5px; }
.recent-item:hover { background: #EFE5E0; color: var(--ink); }
.context-foot { margin-top: auto; padding: 10px 14px; display: flex; justify-content: space-between; color: #A3948E; font-size: 10.5px; border-top: 1px solid var(--line); }
.content { min-width: 0; display: flex; flex-direction: column; background: var(--surface); border-radius: 0; }
.page-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 30px 14px; border-bottom: 1px solid var(--line-2); background: var(--surface); }
.head-text { min-width: 0; flex: 1; }
.crumb { color: #9A8A84; font-size: 11px; letter-spacing: .3px; margin-bottom: 3px; }
.crumb span { color: #C9BAB3; padding: 0 2px; }
.head-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.head-title-row h1 { margin: 0; font-size: 22px; letter-spacing: -.3px; font-weight: 700; color: var(--ink); }
.head-actions { display: flex; gap: 6px; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.page-body { flex: 1; overflow: auto; padding: 20px 30px 32px; }
.page-body.chat { display: flex; padding: 0; }
.inspector {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 40;
  width: min(380px, 42vw); background: var(--surface);
  border-left: 1px solid var(--line); box-shadow: -14px 0 40px rgba(27,23,25,.08);
  display: flex; flex-direction: column;
}
.inspector[hidden] { display: none; }
.inspector-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.inspector-body { padding: 14px 16px; overflow: auto; font-size: 12.5px; }
.shortcut-grid { display: grid; gap: 10px; }
.shortcut-grid > div { display: flex; align-items: center; gap: 7px; }
.shortcut-grid span { color: var(--muted); font-size: 12px; }
.shortcut-grid kbd { border-color: var(--line); color: var(--ink); background: var(--paper); }
/* existing components inherit the new surface */
.stat-card, .tile, .empty, .block, .cap-card, .progress-card { background: var(--surface); border-color: var(--line); }
.block { border-radius: 12px; }
.block-head h2 { font-size: 14px; letter-spacing: -.1px; }
.badge { border-radius: 5px; }
.chip { border-radius: 6px; }
.search, select, input[type="text"], input[type="password"], input[type="number"], textarea { border-color: var(--line); background: var(--surface); border-radius: 6px; }
.search:focus, select:focus, textarea:focus, input:focus { outline: 2px solid rgba(198,46,59,.16); border-color: #D9A6AC; }
.primary { border-radius: 7px; }
.ghost { border-radius: 7px; }
/* Today */
.today-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.today-kicker { color: var(--signal); font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; font-weight: 700; }
.today-hero h2 { margin: 4px 0 4px; font-size: 26px; letter-spacing: -.5px; }
.today-hero p { margin: 0; color: var(--muted); font-size: 12.5px; }
.today-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.today-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr) minmax(260px,.8fr); gap: 14px; align-items: start; }
.today-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.today-panel { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 14px; }
.today-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.today-panel-head h3 { margin: 0; font-size: 13px; }
.today-panel-head span { color: var(--muted); font-size: 11px; }
.today-empty { color: var(--muted); font-size: 12px; padding: 10px 2px; }
.today-task { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: transparent; text-align: left; padding: 9px 6px; border-radius: 7px; color: var(--ink); }
.today-task:hover { background: var(--paper); }
.today-task-main { flex: 1; min-width: 0; }
.today-task-main b { display: block; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-task-main small { color: var(--muted); font-size: 10.5px; }
.today-task .badge { flex: none; }
.today-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.today-quick button { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 9px 10px; color: var(--ink); font-size: 12px; }
.today-quick button:hover { border-color: #D9A6AC; background: var(--signal-soft); }
.today-quick small { display: block; color: var(--muted); font-size: 10.5px; margin-top: 2px; }
.today-metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.today-metric { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 11px 12px; }
.today-metric b { display: block; font-size: 22px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.today-metric span { color: var(--muted); font-size: 10.5px; }
.today-artifact { display: flex; justify-content: space-between; gap: 8px; width: 100%; border: 0; background: transparent; text-align: left; padding: 7px 4px; border-bottom: 1px solid var(--line-2); color: var(--ink); font-size: 11.5px; }
.today-artifact:last-child { border-bottom: 0; }
@media (max-width: 1280px) { .today-grid { grid-template-columns: 1fr 1fr; } .today-col:last-child { grid-column: 1 / -1; } }
@media (max-width: 1060px) {
  .workspace { grid-template-columns: 68px 210px minmax(0,1fr); }
  .deck-search span { display: none; }
  .deck-search { max-width: 190px; }
  .today-metric-strip { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .workspace { grid-template-columns: 64px minmax(0,1fr); }
  .context { display: none; }
  .today-grid { grid-template-columns: 1fr; }
  .today-col:last-child { grid-column: auto; }
}

/* visual studio batch strip */
.studio-batch { margin: 14px 0 0; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px; }
.studio-batch-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.studio-batch-head b { font-size: 13px; }
.studio-batch-head .row { flex-wrap: wrap; }
.studio-batch-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.studio-batch-item { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line-2); border-radius: 8px; padding: 7px; background: var(--paper); min-width: 0; }
.studio-batch-item.unknown { border-color: #CDBFE0; background: #F6F1FA; }
.studio-batch-item.failed { border-color: #E8C4C7; background: #FCF1F2; }
.studio-batch-item.saved { border-color: #CBE2D8; background: #F2FAF6; }
.studio-batch-thumb { width: 46px; height: 46px; flex: none; border-radius: 6px; background: #EFE5E0; display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 11px; }
.studio-batch-thumb img { width: 100%; height: 100%; object-fit: cover; }
.studio-batch-meta { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.studio-batch-meta b { font-size: 11.5px; }
.studio-batch-meta small { color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.studio-shell { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.studio-head { padding: 16px 18px; border-bottom: 1px solid var(--line-2); background: var(--surface); }
.studio-head h2 { margin: 2px 0; font-size: 20px; }
.studio-body { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 0; }
.studio-side { padding: 10px 8px; border-right: 1px solid var(--line-2); background: var(--paper); }
.studio-side button { width: 100%; justify-content: flex-start; }
.studio-main { padding: 14px 16px 18px; min-width: 0; }
@media (max-width: 860px) { .studio-body { grid-template-columns: 1fr; } .studio-side { display: flex; gap: 4px; overflow: auto; border-right: 0; border-bottom: 1px solid var(--line-2); } .studio-side button { width: auto; white-space: nowrap; } }

/* brain pending modules */
.brain-pending { border-style: dashed; color: #7A6A63; background: #FBF7F3; }
.brain-pending:hover { border-color: #C9A98B; color: var(--ink); }
.pending-tag { display: inline-block; margin-left: 5px; padding: 0 5px; border: 1px solid #E0C7A9; border-radius: 4px; background: #FBF3E7; color: #8A5A18; font-size: 9.5px; line-height: 16px; vertical-align: 1px; font-weight: 500; }
.brain-pending-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border: 1px solid #E8D3B8; background: #FBF3E7; border-radius: 9px; padding: 9px 11px; margin-bottom: 12px; color: #6C4A20; font-size: 12px; }
.brain-pending-note b { font-weight: 600; }
.brain-pending-note span:not(.pending-tag) { color: #8B6A45; }
.brain-pending-modal ul { margin: 10px 0; padding-left: 18px; line-height: 1.9; }
.brain-pending-modal li b { color: var(--ink); }

/* inspector content */
.inspect-block { padding: 12px 0; border-bottom: 1px solid var(--line); }
.inspect-block:last-child { border-bottom: 0; }
.inspect-block h3 { margin: 2px 0 4px; font-size: 15px; }
.inspect-block p { margin: 0; line-height: 1.55; }
.inspect-kicker { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.inspect-facts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; margin-top: 8px; }
.inspect-facts > div { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.inspect-facts b { font-size: 18px; }
.inspect-facts span { color: var(--muted); font-size: 11px; }
.inspect-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* settings and turns polish */
.settings-head { align-items: flex-start; padding-bottom: 8px; }
.settings-head h2 { margin: 2px 0 4px; }
.settings-head .kicker { color: var(--signal); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.settings-form { max-width: 860px; }
.agent-turns { max-width: 980px; }
.agent-turns h2 { margin-top: 0; }

/* 2.76 page modernization */
.page-context { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:10px; padding-top:10px; border-top:1px solid var(--line); color:var(--muted); font-size:11px; }
.page-context span { text-transform:uppercase; letter-spacing:.08em; font-size:9.5px; color:var(--signal); }
.page-context b { font-weight:500; color:var(--ink); }
.page-context small { margin-left:auto; color:var(--muted); }
.card-grid { grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:12px; }
.cap-card { background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:16px; box-shadow:none; }
.cap-card:hover { border-color:var(--line-strong); transform:translateY(-1px); }
.cap-top { gap:8px; }
.cap-ico { background:var(--paper); border:1px solid var(--line); border-radius:8px; }
.toolbar { background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:10px 12px; }
.toolbar .search { border:0; background:var(--paper); }
.chips-row .chip { background:var(--surface); border:1px solid var(--line); }
.block { background:var(--surface); border:1px solid var(--line); border-radius:14px; box-shadow:none; }
.block-head h2 { font-size:15px; }
.agent-hero h2 { font-size:24px; letter-spacing:-.03em; }

/* 经营大脑本地模块 */
.brain-module { margin-bottom: 12px; }
.brain-summary { margin: 10px 0 0; padding: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; font-size: 11px; line-height: 1.55; white-space: pre-wrap; max-height: 220px; overflow: auto; }
.pending-tag.ready, .badge.ready { background: #E9F4EC; color: #2F6B43; border-color: #B9D8C3; }

/* ---------- 总控：工作卡片首页 ---------- */
.page-body.workbench { display: flex; padding: 0; overflow: hidden; }
.workbench-home { flex: 1; min-height: 0; }
.workbench-scroll { display: block; overflow: auto; padding: 22px 34px 20px; }
.workbench-summary { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; max-width: 1180px; margin: 0 auto 8px; color: var(--muted); font-size: 12px; }
.workbench-summary-label { color: var(--accent); font-weight: 700; letter-spacing: .4px; }
.workbench-summary b { color: var(--text); font-weight: 650; }
.workbench-summary span:last-child { margin-left: auto; }
.workbench-hero { padding: 24px 24px 8px; }
.workbench-hero h1 { font-size: 40px; }
.workbench-hero p { margin-top: 10px; }
.workbench-quick { max-width: 1180px; gap: 12px; margin-top: 18px; }
.workbench-quick .quick-card { min-height: 112px; padding: 18px 20px; }
.workbench-quick .quick-copy { gap: 6px; }
.workbench-cards { max-width: 1180px; margin: 20px auto 0; }
.workbench-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.work-card { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 14px; min-width: 0; }
.work-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.work-card-head h3 { margin: 0 0 2px; font-size: 13px; }
.work-card-head span { color: var(--muted); font-size: 11px; }
.work-card .today-task { padding: 7px 4px; }
.work-card .today-task-main small { font-size: 10px; }
.work-card .btn, .work-card button.ghost { white-space: nowrap; }
.workbench-entry-card { margin-top: 12px; }
.workbench-entries { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.workbench-entries button { text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 9px 10px; color: var(--text); min-width: 0; }
.workbench-entries button:hover { border-color: #E3B7BD; background: #fff; }
.workbench-entries b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workbench-entries small { display: block; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.workbench-home .composer { flex: 0 0 auto; padding-bottom: 16px; }
@media (max-width: 1280px) {
  .workbench-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workbench-entries { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .workbench-scroll { padding: 16px 18px; }
  .workbench-hero h1 { font-size: 32px; }
  .workbench-quick { grid-template-columns: 1fr; }
  .workbench-card-grid { grid-template-columns: 1fr; }
  .workbench-entries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workbench-summary span:last-child { margin-left: 0; }
}

/* 总控工作卡片：隐藏重复侧栏，把空间留给工作卡片 */
body.on-workbench .workspace { grid-template-columns: 68px minmax(0,1fr); }
body.on-workbench .context { display: none; }
body.on-workbench .deck { border-right: 0; }

.workbench-legacy-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

/* ---------- 大麦 AIEC 新版品牌 ---------- */
.deck-lockup { display: flex; align-items: center; }
.deck-lockup img { display: block; height: 40px; width: auto; max-width: 310px; object-fit: contain; }
:root {
  --ink: #201C18;
  --paper: #F6F3ED;
  --surface: #FFFFFF;
  --signal: #BD2824;
  --signal-soft: #F6E7E3;
  --muted: #6C5F52;
  --line: #D6C9B9;
  --line-2: #EEE8DE;
  --accent: #BD2824;
  --accent-soft: #F6E7E3;
}

/* ---------- 宽屏 / 超宽屏自适应 ---------- */
@media (min-width: 1700px) {
  .studio-shell { max-width: 2400px; width: 100%; }
  .studio-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .studio-filters { flex-basis: 320px; width: 320px; }
  .ops-page { max-width: 2400px; }
  .workbench-summary, .workbench-quick, .workbench-cards { max-width: 2200px; }
  .workbench-quick, .quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .workbench-card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .workbench-entries { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .settings-form { max-width: 1200px; }
  .agent-turns { max-width: 1600px; }
  .modal-box { width: min(1100px, 90vw); }
}
@media (min-width: 2400px) {
  .studio-shell { max-width: 2800px; }
  .ops-page { max-width: 2800px; }
  .workbench-summary, .workbench-quick, .workbench-cards { max-width: 2600px; }
  .studio-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}
