:root {
  --bg: #fbf8f7;
  --panel: #ffffff;
  --line: #f1e9e7;
  --line-2: #e8dcd9;
  --text: #221c1b;
  --text-2: #5d5351;
  --muted: #a0938f;
  --red: #d2453d;
  --red-2: #e9675d;
  --red-soft: #fdeeec;
  --red-line: #f3c9c4;
  --green: #2f9468;
  --green-soft: #e6f5ec;
  --amber: #b97d0c;
  --amber-soft: #fdf3dc;
  --blue: #3b6fd1;
  --blue-soft: #e9f0fd;
  --ink: #262120;
  --cell: #f5f0ef;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(80, 40, 30, .04), 0 10px 30px rgba(80, 40, 30, .04);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Cascadia Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 13px/1.55 var(--font);
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(900px 420px at 72% -120px, rgba(233, 103, 93, .10), transparent 70%),
    radial-gradient(700px 360px at 20% -160px, rgba(233, 103, 93, .06), transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.tiny { font-size: 11px; line-height: 1.6; }
.mono { font-family: var(--mono); }
.red { color: var(--red); }

/* ---------- 品牌 ---------- */
.brand { display: flex; align-items: center; gap: 10px; font-size: 13.5px; letter-spacing: .05em; white-space: nowrap; }
.logo {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(145deg, #c9372f, #e0564c); color: #fff; font: 700 15px/1 Georgia, serif;
  box-shadow: 0 4px 12px rgba(210, 69, 61, .28);
}

/* ---------- 布局 ---------- */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 22px 16px 18px; border-right: 1px solid var(--line); background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(6px);
}
.side .brand { padding: 0 6px 18px; }
.ws-switch { display: grid; gap: 4px; margin-bottom: 26px; }
.ws-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--text-2); }
.ws-item.active { background: var(--red-soft); color: var(--red); font-weight: 600; }
.ws-item em { margin-left: auto; font-style: normal; font-size: 10px; opacity: .8; }
.side-label { font-size: 10px; letter-spacing: .22em; color: var(--muted); padding: 0 12px 10px; }
.nav { display: grid; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--text-2); transition: background .15s; }
.nav a:hover { background: #f6efed; }
.nav a.active { background: var(--red); color: #fff; box-shadow: 0 6px 16px rgba(210, 69, 61, .25); }
.ico { font-style: normal; width: 16px; text-align: center; opacity: .85; }
.badge { margin-left: auto; font-size: 10px; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--red); color: #fff; text-align: center; line-height: 18px; }
.badge:empty { display: none; }
.nav a.active .badge { background: #fff; color: var(--red); }
.side-foot { margin-top: auto; display: grid; gap: 10px; padding: 0 8px; }
.conn { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.conn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.conn.on .dot { background: #3cb57c; box-shadow: 0 0 0 4px rgba(60, 181, 124, .15); }
.conn.off .dot { background: var(--red); }
.me-line { font-size: 12px; color: var(--text-2); }

.main { min-width: 0; padding: 0 34px 60px; }
.top { display: flex; align-items: center; justify-content: space-between; height: 68px; border-bottom: 1px solid var(--line); margin: 0 -34px 0; padding: 0 34px; }
.crumb { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 12px; }
.crumb b { color: var(--text); font-weight: 600; }
.crumb i { font-style: normal; opacity: .6; }
.top-actions { display: flex; align-items: center; gap: 10px; position: relative; }
.avatar { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); background: #fff; color: var(--red); font-weight: 700; cursor: pointer; }
.menu { position: absolute; right: 0; top: 40px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 190px; padding: 6px; z-index: 30; }
.menu-head { padding: 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: 12px; }
.menu button { width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.menu button:hover { background: var(--red-soft); color: var(--red); }

/* ---------- 页头 ---------- */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 34px 0 20px; }
.eyebrow { font-size: 10px; letter-spacing: .32em; color: var(--red); font-weight: 700; margin-bottom: 8px; }
.hero h1 { margin: 0 0 8px; font-size: 26px; letter-spacing: .02em; }
.hero p { margin: 0; color: var(--text-2); }
.hero .meta { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ---------- 搜索 ---------- */
.search { position: relative; margin-bottom: 18px; }
.search input {
  width: 100%; height: 44px; padding: 0 70px 0 42px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255, 255, 255, .9); outline: none; transition: border-color .15s, box-shadow .15s;
}
.search input:focus { border-color: var(--red-line); box-shadow: 0 0 0 4px rgba(210, 69, 61, .08); }
.search .s-ico { position: absolute; left: 16px; top: 12px; color: var(--muted); }
.search kbd { position: absolute; right: 14px; top: 11px; font: 11px var(--mono); color: var(--muted); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; background: #fff; }
.search-pop { position: absolute; left: 0; right: 0; top: 50px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 20; max-height: 360px; overflow: auto; padding: 6px; }
.search-pop .hit { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.search-pop .hit:hover, .search-pop .hit.sel { background: var(--red-soft); }
.search-pop .empty { padding: 14px; color: var(--muted); }

/* ---------- 卡片 ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 14px; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.kpi:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.kpi b { display: block; font-size: 24px; line-height: 1.2; font-weight: 700; }
.kpi span { font-size: 11px; color: var(--muted); }
.kpi.hot { border: 1.5px solid var(--red-line); background: linear-gradient(180deg, #fff6f5, #fff); }
.kpi.hot b { color: var(--red); }

.grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; align-items: start; }
.stack { display: grid; gap: 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: 0 1px 0 rgba(0, 0, 0, .01); min-width: 0; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel-h h3 { margin: 0; font-size: 13px; font-weight: 700; }
.panel-h .muted { font-size: 11px; }

/* ---------- 团队大脑 ---------- */
.brain { position: relative; border-radius: 12px; overflow: hidden; height: 236px;
  background: radial-gradient(ellipse 70% 90% at 50% 60%, #fdeceb 0%, #fbf2f1 55%, #fdf9f8 100%); }
.brain svg { display: block; width: 100%; height: 100%; }
.brain-cap { margin-top: 8px; font-size: 10.5px; color: var(--muted); }
.brain .edge { stroke: rgba(210, 69, 61, .22); stroke-width: 1.2; }
.brain .edge.hot { stroke: rgba(210, 69, 61, .45); }
.brain .bead { fill: var(--red); }
.brain .bead-static { fill: rgba(210, 69, 61, .55); }
.brain .halo { transform-box: fill-box; transform-origin: center; animation: pulse 2.2s ease-in-out infinite; }
.brain .nlabel { font-size: 10.5px; fill: var(--text-2); text-anchor: middle; }
.brain .nsub { font-size: 9.5px; fill: var(--muted); text-anchor: middle; }
.brain .ntext { font-size: 11px; fill: #fff; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
@keyframes pulse { 0%, 100% { opacity: .35; transform: scale(.92); } 50% { opacity: .75; transform: scale(1.12); } }

/* ---------- AI 员工 ---------- */
.agents { display: grid; gap: 4px; max-height: 620px; overflow-y: auto; padding-right: 4px; }
.agent { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.agent:last-child { border-bottom: 0; }
.av { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; }
.av.claude { background: linear-gradient(145deg, #c9372f, #e45c51); }
.av.codex { background: linear-gradient(145deg, #1d1918, #3d3533); }
.av.human { background: linear-gradient(145deg, #e9675d, #f19a90); }
.av.agent { background: linear-gradient(145deg, #4a72c4, #7c9be0); }
.av.sm { width: 24px; height: 24px; border-radius: 7px; font-size: 11px; }
.agent .nm { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.agent .nm b { font-size: 13.5px; }
.agent .nm small { color: var(--muted); font-size: 11px; }
.agent .act { margin-top: 3px; font-weight: 600; font-size: 12px; color: var(--text); word-break: break-all; }
.agent .sub { font-size: 11px; color: var(--muted); }
.agent .quota { font-size: 11px; color: var(--muted); }
.agent .quota.low { color: var(--red); font-weight: 600; }
.linkish { color: var(--red); cursor: pointer; border: 0; background: none; padding: 0; font-size: 11px; }
.handoff { margin-top: 8px; display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line-2); background: #fff; border-radius: 8px; padding: 5px 10px; font-size: 11.5px; cursor: pointer; }
.handoff:hover { border-color: var(--red-line); color: var(--red); }

/* ---------- 状态药丸 ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; line-height: 18px; padding: 0 8px; border-radius: 9px; background: var(--cell); color: var(--text-2); white-space: nowrap; }
.pill.working, .pill.running { background: var(--green-soft); color: var(--green); }
.pill.idle { background: #f3efee; color: var(--text-2); }
.pill.offline { background: #f6f3f2; color: var(--muted); }
.pill.pending_approval { background: var(--red-soft); color: var(--red); }
.pill.queued { background: var(--blue-soft); color: var(--blue); }
.pill.review { background: var(--amber-soft); color: var(--amber); }
.pill.done { background: var(--green-soft); color: var(--green); }
.pill.failed { background: #fbe3e1; color: #b3261e; }
.pill.cancelled { background: #f2eeed; color: var(--muted); text-decoration: line-through; }
.pill.high { background: var(--red); color: #fff; }

/* ---------- 流水线 ---------- */
.pipe { width: 100%; border-collapse: separate; border-spacing: 5px 6px; table-layout: fixed; margin: -6px -5px; width: calc(100% + 10px); }
.pipe th { font-size: 10.5px; font-weight: 500; color: var(--muted); text-align: center; padding-bottom: 2px; }
.pipe th:first-child { text-align: left; width: 31%; }
.pipe td { height: 30px; border-radius: 7px; background: var(--cell); text-align: center; font-size: 10.5px; color: var(--muted); }
.pipe td.proj { background: none; text-align: left; height: auto; padding: 2px 0; }
.pipe td.proj b { display: block; font-size: 12.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipe td.proj small { color: var(--muted); font-size: 10.5px; }
.pipe td.c-done { background: var(--green-soft); color: var(--green); font-weight: 600; }
.pipe td.c-running { background: var(--red-soft); color: var(--red); font-weight: 600; }
.pipe td.c-review { background: var(--amber-soft); color: var(--amber); font-weight: 600; }
.pipe td.c-queued, .pipe td.c-pending_approval { background: var(--blue-soft); color: var(--blue); }
.pipe td.c-failed { background: #fbe3e1; color: #b3261e; }
.pipe td.clickable { cursor: pointer; }
.pipe td.clickable:hover { filter: brightness(.97); }

/* ---------- 列表项 ---------- */
.waits { display: grid; gap: 8px; }
.wait { background: #faf6f5; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.wait .from { font-size: 10.5px; color: var(--muted); margin-bottom: 2px; }
.wait .t { font-weight: 600; font-size: 12.5px; cursor: pointer; }
.wait .t:hover { color: var(--red); }
.wait .row { display: flex; gap: 6px; margin-top: 8px; }
.empty-note { color: var(--muted); font-size: 12px; padding: 10px 2px; }

.feed { display: grid; gap: 0; }
.feed-item { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.feed-item:last-child { border-bottom: 0; }
.feed-item .txt { font-size: 12.5px; word-break: break-word; }
.feed-item .txt b { font-weight: 600; }
.feed-item time { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.tid { font-family: var(--mono); font-size: 11px; color: var(--red); cursor: pointer; }
.tid:hover { text-decoration: underline; }

/* ---------- 表单 ---------- */
.form { display: grid; gap: 10px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: grid; gap: 5px; }
.field > span { font-size: 11px; color: var(--muted); }
input.in, select.in, textarea.in {
  width: 100%; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; padding: 8px 10px; outline: none;
}
textarea.in { resize: vertical; min-height: 74px; line-height: 1.5; }
input.in:focus, select.in:focus, textarea.in:focus { border-color: var(--red-line); box-shadow: 0 0 0 3px rgba(210, 69, 61, .08); }
.check { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); cursor: pointer; }
.check input { accent-color: var(--red); }
.btn { border: 1px solid var(--line-2); background: #fff; border-radius: 9px; padding: 8px 14px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { border-color: var(--red-line); color: var(--red); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.btn.primary:hover { background: #bf3a33; color: #fff; }
.btn.ghost { background: rgba(255, 255, 255, .7); }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.ok { background: var(--green); border-color: var(--green); color: #fff; }
.btn.ok:hover { background: #267d57; color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 看板 ---------- */
.board-tools { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.board-tools .in { width: auto; min-width: 160px; }
.board { display: grid; grid-template-columns: repeat(6, minmax(168px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: rgba(255, 255, 255, .6); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 300px; }
.col-h { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 10px; font-weight: 700; font-size: 12px; }
.col-h span { color: var(--muted); font-weight: 500; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; margin-bottom: 8px; cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.card:hover { border-color: var(--red-line); box-shadow: var(--shadow); }
.card .t { font-weight: 600; font-size: 12.5px; margin: 3px 0 6px; word-break: break-word; }
.card .m { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 10.5px; color: var(--muted); }

/* ---------- 频道 ---------- */
.chat { display: grid; grid-template-rows: 1fr auto; height: calc(100vh - 230px); min-height: 420px; padding: 0; overflow: hidden; }
.chat-list { overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: grid; grid-template-columns: 32px 1fr; gap: 10px; }
.msg .who { font-size: 12px; display: flex; gap: 8px; align-items: baseline; }
.msg .who b { font-size: 12.5px; }
.msg .who time { color: var(--muted); font-size: 10.5px; }
.msg .body { margin-top: 3px; background: #faf6f5; border: 1px solid var(--line); border-radius: 4px 12px 12px 12px; padding: 8px 12px; white-space: pre-wrap; word-break: break-word; max-width: 760px; }
.msg.mine .body { background: var(--red-soft); border-color: var(--red-line); }
.msg.sys { display: block; text-align: center; font-size: 11px; color: var(--muted); }
.msg.sys .tid { font-size: 11px; }
.chat-input { border-top: 1px solid var(--line); padding: 12px; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; background: #fffdfc; }
.chat-input textarea { min-height: 44px; max-height: 160px; }
.mention { color: var(--red); font-weight: 600; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; font-weight: 500; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .nmc { display: flex; gap: 10px; align-items: center; }
.table .btns { flex-wrap: nowrap; }
.table th { white-space: nowrap; }

/* ---------- 代码块 ---------- */
.code { position: relative; background: #1f1b1a; color: #f3e9e6; border-radius: 10px; padding: 14px 16px; font: 12px/1.65 var(--mono); white-space: pre-wrap; word-break: break-all; margin: 8px 0 4px; }
.code .copy { position: absolute; top: 8px; right: 8px; background: rgba(255, 255, 255, .1); color: #fff; border: 0; border-radius: 6px; padding: 3px 9px; font-size: 11px; cursor: pointer; }
.code .copy:hover { background: rgba(255, 255, 255, .2); }
.steps { counter-reset: s; display: grid; gap: 18px; }
.step h4 { margin: 0 0 4px; font-size: 14px; display: flex; gap: 10px; align-items: center; }
.step h4::before { counter-increment: s; content: counter(s); width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 12px; }
.step p { margin: 4px 0; color: var(--text-2); }
.token-box { background: var(--amber-soft); border: 1px solid #f1dca8; border-radius: 10px; padding: 12px 14px; margin-top: 12px; }
.token-box code { font: 12.5px var(--mono); word-break: break-all; user-select: all; }
.flow { display: grid; grid-template-columns: repeat(5, auto); align-items: center; justify-content: start; gap: 10px; margin: 6px 0 4px; font-size: 12px; }
.flow .node { background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px; text-align: center; }
.flow .arrow { color: var(--red); }

/* ---------- 抽屉 ---------- */
.drawer-mask { position: fixed; inset: 0; background: rgba(40, 20, 15, .18); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(600px, 100vw); background: #fff; z-index: 41; box-shadow: -20px 0 50px rgba(60, 30, 25, .12); display: flex; flex-direction: column; animation: slidein .2s ease-out; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
.dr-head { padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.dr-head .top-line { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.dr-head h2 { margin: 0; font-size: 18px; line-height: 1.4; word-break: break-word; }
.dr-close { margin-left: auto; border: 0; background: none; font-size: 20px; color: var(--muted); cursor: pointer; }
.dr-body { flex: 1; overflow-y: auto; padding: 16px 22px 30px; display: grid; gap: 18px; align-content: start; }
.meta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 14px; font-size: 12px; }
.meta-grid div span { display: block; font-size: 10.5px; color: var(--muted); }
.sec h4 { margin: 0 0 8px; font-size: 12px; color: var(--text-2); letter-spacing: .04em; }
.prose { white-space: pre-wrap; word-break: break-word; background: #faf6f5; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; max-height: 320px; overflow: auto; }
.logs { background: #1f1b1a; color: #e9dfdc; border-radius: 10px; padding: 10px 12px; font: 11.5px/1.6 var(--mono); max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-all; }
.logs:empty::before { content: '暂无日志'; color: #8c7f7b; }
.thread { display: grid; gap: 8px; }
.cmt { border-left: 3px solid var(--line-2); padding: 4px 0 4px 10px; }
.cmt.feedback { border-left-color: var(--amber); }
.cmt.system { border-left-color: var(--line); color: var(--muted); }
.cmt.progress { border-left-color: var(--green); }
.cmt .h { font-size: 11px; color: var(--muted); }
.cmt .b { white-space: pre-wrap; word-break: break-word; font-size: 12.5px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 9px 16px; border-radius: 10px; z-index: 60; font-size: 12.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.toast.err { background: #b3261e; }

/* ---------- 登录 ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 30px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.login-card h1 { margin: 8px 0 0; font-size: 20px; }
.login-card p { margin: 0; }
.login-card input { height: 44px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 12px; outline: none; font-family: var(--mono); }
.login-card input:focus { border-color: var(--red-line); box-shadow: 0 0 0 4px rgba(210, 69, 61, .08); }
.login-card .btn { height: 44px; }
.err { color: #b3261e; min-height: 1em; font-size: 12px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
  .grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; min-width: 0; padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .brand { padding-bottom: 10px; }
  .ws-switch, .side-label, .side-foot .tiny { display: none; }
  .nav { grid-auto-flow: column; overflow-x: auto; gap: 4px; }
  .nav a { white-space: nowrap; padding: 7px 10px; }
  .side-foot { margin-top: 10px; grid-auto-flow: column; justify-content: space-between; }
  .main { padding: 0 16px 40px; }
  .top { margin: 0 -16px; padding: 0 16px; }
  .hero { flex-direction: column; align-items: flex-start; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form .row2, .meta-grid { grid-template-columns: 1fr 1fr; }
  .pipe th:first-child { width: 38%; }
  .flow { grid-template-columns: 1fr; }
  .flow .arrow { transform: rotate(90deg); justify-self: center; }
}
