:root {
  --primary: #3457d5;
  --primary-dark: #243da0;
  --primary-soft: #eef2ff;
  --accent: #16a3a3;
  --accent-2: #3457d5;
  --ink: #1b2433;
  --ink-soft: #39445a;
  --muted: #77839a;
  --line: #e5e9f0;
  --line-strong: #d3dae6;
  --soft: #f5f7fb;
  --paper: #ffffff;
  --sidebar: #101b2e;
  --sidebar-2: #16243c;
  --pl: #1f6f78;
  --ls: #4f7942;
  --ar: #b05a3c;
  --in: #7a4e6d;
  --st: #374151;
  --qs: #8a6d2b;
  --danger: #d64545;
  --ok: #2f8a5b;
  --shadow: 0 8px 30px rgba(24, 39, 75, .07);
  --shadow-lg: 0 18px 48px rgba(24, 39, 75, .14);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Inter", "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 600px at 90% -10%, rgba(52,87,213,.08), transparent 60%),
    radial-gradient(900px 500px at 5% 100%, rgba(22,163,163,.07), transparent 55%),
    var(--soft);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font-family: inherit; }
button { cursor: pointer; }
a { color: var(--primary); text-decoration: none; }

.app { display: grid; grid-template-columns: 244px 1fr; grid-template-rows: 1fr 36px; height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
  grid-row: 1 / 3;
  background: linear-gradient(180deg, var(--sidebar-2), var(--sidebar));
  border-right: 1px solid rgba(255,255,255,.06);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  min-height: 0;
  color: #dbe4f3;
}
.brand { display: flex; gap: 11px; align-items: center; padding: 0 6px 18px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 19px;
  box-shadow: 0 8px 20px rgba(22,163,163,.28);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 14px; color: #fff; letter-spacing: .02em; }
.brand-text span { color: #8fa1bd; font-size: 10.5px; }
.project-switch {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 12px; margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,.1); border-radius: 10px;
  background: rgba(255,255,255,.06); color: #e8eef8; font-size: 12px; text-align: left;
  transition: .18s;
}
.project-switch:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); }
.project-switch .dot { width: 8px; height: 8px; border-radius: 50%; background: #4cd6a4; box-shadow: 0 0 0 4px rgba(76,214,164,.14); }
.project-switch .chev { margin-left: auto; color: #8fa1bd; }
.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow: auto; }
.nav::-webkit-scrollbar { width: 5px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 6px; }
.nav-group { font-size: 10px; color: #7084a3; padding: 14px 10px 5px; letter-spacing: .12em; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: 9px; border: 0;
  background: transparent; color: #b9c7dc; font-size: 13px; text-align: left; width: 100%;
  transition: background .15s, color .15s, transform .15s;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; transform: translateX(2px); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(52,87,213,.42), rgba(22,163,163,.20));
  color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--accent);
}
.nav-item .ico { width: 18px; text-align: center; color: #8094b2; }
.nav-item.active .ico { color: #7ff0d8; }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; margin-top: 8px; }
.user { display: flex; gap: 9px; align-items: center; padding: 4px 6px; }
.avatar { width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(135deg,#3b58c9,#1f9f9f); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.user div:last-child { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.user strong { font-size: 12px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user span { font-size: 10px; color: #8fa1bd; }
.sidebar-foot .mode-switch { margin: 10px 6px 0; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.sidebar-foot .mode-btn { flex: 1; padding: 6px 4px; font-size: 11px; color: #a9b8d0; }
.sidebar-foot .mode-btn.active { background: rgba(255,255,255,.14); color: #fff; box-shadow: none; }
.sidebar-foot .foot-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 6px 0; }
.sidebar-foot .foot-actions .btn.ghost {
  flex: 1 1 auto; padding: 6px 8px; font-size: 11px;
  background: rgba(255,255,255,.06); color: #cdd8ea; border-color: rgba(255,255,255,.14);
}
.sidebar-foot .foot-actions .btn.ghost:hover { color: #fff; border-color: #7ff0d8; box-shadow: none; }

/* ---------- Main / topbar ---------- */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar {
  height: 62px; flex: 0 0 62px; background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); display: flex;
  align-items: center; justify-content: space-between; padding: 0 26px;
  box-shadow: 0 2px 12px rgba(24,39,75,.03); z-index: 5;
}
.crumb { font-size: 13px; color: var(--muted); }
.crumb b { color: var(--ink); font-weight: 650; }
.top-actions { display: flex; align-items: center; gap: 10px; }

/* 筛选框 / 搜索框：重点优化 */
.search {
  position: relative;
  min-width: 230px; width: 280px;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--line-strong);
  border-radius: 11px; color: var(--muted); font-size: 12px;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2377839a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px center;
  transition: border-color .18s, box-shadow .18s, background-color .18s;
}
.search:hover { border-color: #b9c6dc; background-color: #fff; }
.search:focus-within, .search:focus {
  outline: none; border-color: var(--primary); background-color: #fff;
  box-shadow: 0 0 0 4px rgba(52,87,213,.12);
}
.icon-btn {
  width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; color: var(--muted); transition: .18s;
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

/* 分段筛选 */
.mode-switch {
  display: flex; gap: 3px; padding: 3px;
  border: 1px solid var(--line); border-radius: 11px;
  background: #f1f4f9;
}
.mode-btn {
  padding: 6px 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 12px; font-weight: 600;
  transition: .18s;
}
.mode-btn:hover { color: var(--primary); }
.mode-btn.active {
  background: #fff; color: var(--primary);
  box-shadow: 0 2px 8px rgba(24,39,75,.10);
}

/* ---------- Auth ---------- */
.auth-overlay { position: fixed; inset: 0; background: rgba(12,22,40,.62); backdrop-filter: blur(6px); z-index: 40; display: grid; place-items: center; }
.auth-overlay.hidden { display: none; }
.auth-card {
  width: 390px; max-width: 92vw; background: #fff; border-radius: 18px; padding: 28px;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.7);
}
.auth-card .brand-mark { margin-bottom: 4px; }
.auth-card h2 { margin: 12px 0 4px; font-size: 20px; }
.auth-tabs { display: flex; gap: 4px; margin: 18px 0 12px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #f4f6fa; }
.auth-tabs .mode-btn { flex: 1; }

/* ---------- Controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 15px; border-radius: 10px; border: 1px solid transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; font-size: 12px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(52,87,213,.18);
  transition: transform .15s, box-shadow .15s, opacity .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(52,87,213,.24); opacity: 1; }
.btn:active { transform: translateY(0); }
.btn.ghost {
  background: #fff; color: var(--primary); border-color: var(--line-strong);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.btn.sm { padding: 6px 11px; font-size: 11px; border-radius: 8px; }

input[type=text], input[type=password], input[type=file], textarea, select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--ink);
  background: #fff;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.6; }
select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2377839a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
  cursor: pointer;
}
input:hover, textarea:hover, select:hover { border-color: #b9c6dc; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 4px rgba(52,87,213,.12);
}
input::placeholder, textarea::placeholder { color: #a4aec0; }
.field-label { display: block; font-size: 11px; color: var(--muted); margin: 12px 0 6px; font-weight: 600; letter-spacing: .02em; }
input[type=file] { padding: 8px; background: #f8fafc; border-style: dashed; cursor: pointer; }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); width: 15px; height: 15px; }

/* 筛选标签 / chips */
.elements { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.elements .tag {
  cursor: default; border: 1px solid var(--line); background: #fff;
  padding: 5px 11px; font-size: 11px; font-weight: 500; color: var(--ink-soft);
  box-shadow: 0 1px 2px rgba(24,39,75,.03); transition: .16s;
}
.elements .tag:hover, .elements .tag.ok {
  border-color: var(--primary); color: var(--primary); background: var(--primary-soft);
  transform: translateY(-1px); box-shadow: 0 4px 10px rgba(52,87,213,.12);
}
button.tag { cursor: pointer; }
.filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(180deg,#fff,#f9fbfe); margin-bottom: 14px;
}
.filter-bar .filter-field { min-width: 160px; flex: 1; }
.filter-bar .filter-label { font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 4px; display: block; }

/* ---------- Content ---------- */
.content { flex: 1; overflow: auto; padding: 26px 28px 34px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; gap: 16px; }
.page-head h1 { margin: 0; font-size: 23px; letter-spacing: -.01em; font-weight: 720; }
.page-head p { margin: 5px 0 0; color: var(--muted); font-size: 12.5px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.card:hover { box-shadow: var(--shadow-lg); border-color: #d9e0ec; }
.card h3 { margin: 0 0 12px; font-size: 14px; font-weight: 680; }
.card h4 { margin: 0 0 10px; font-size: 13px; }
.card .sub { color: var(--muted); font-size: 11px; }

/* 按模态配置 AI：可折叠卡片 */
.mod-card { padding: 0; align-self: start; overflow: hidden; }
.mod-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; cursor: pointer; user-select: none; }
.mod-head:hover { background: var(--soft); }
.mod-head:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.mod-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.mod-head h4 { margin: 0; }
.mod-state { font-size: 11px; color: var(--muted); background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 1px 8px; white-space: nowrap; }
.mod-state.ok { color: var(--ok); border-color: #cfe9db; background: #f0faf5; }
.mod-chev { color: var(--muted); font-size: 13px; flex: none; }
.mod-body { padding: 0 14px 14px; border-top: 1px solid var(--line); }
.metric { position: relative; overflow: hidden; }
.metric::after {
  content: ''; position: absolute; right: -18px; top: -18px; width: 76px; height: 76px;
  border-radius: 50%; background: linear-gradient(135deg, rgba(52,87,213,.10), rgba(22,163,163,.06));
}
.metric .value { font-size: 28px; font-weight: 750; color: var(--primary); letter-spacing: -.03em; }
.metric .label { font-size: 12px; color: var(--muted); }
.metric .trend { font-size: 11px; color: var(--ok); }

.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #eef1f6; }
.row:last-child { border-bottom: 0; }
.row .title { font-size: 13px; font-weight: 620; }
.row .meta { margin-left: auto; font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px; font-size: 10px; font-weight: 600;
  background: #edf2f7; color: #425466;
}
.tag.pl { background: #e3f1f1; color: var(--pl); }
.tag.ls { background: #eaf1e7; color: var(--ls); }
.tag.ar { background: #f6e9e3; color: var(--ar); }
.tag.in { background: #f1e9ef; color: var(--in); }
.tag.st { background: #eceff2; color: var(--st); }
.tag.qs { background: #f5f0dd; color: var(--qs); }
.tag.vd { background: #ece9f5; color: #5d4e8c; }
.tag.ok { background: #e6f5ec; color: var(--ok); }
.tag.err { background: #fdeaea; color: var(--danger); }

/* ---------- Route ---------- */
.route-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }

/* 提需求：一体化输入区（参考对话框的视觉样式） */
.composer-wrap {
  border: 1px solid var(--line-strong); border-radius: 16px; overflow: hidden;
  background: #fff; transition: border-color .18s, box-shadow .18s;
}
.composer-wrap:focus-within { border-color: #b9c6dc; box-shadow: 0 0 0 4px rgba(52,87,213,.08); }
.composer-box { padding: 6px 6px 0; }
.composer-input {
  display: block; width: 100%; min-height: 92px; border: 0; border-radius: 12px;
  padding: 12px 12px 6px; font-size: 14px; line-height: 1.6; background: transparent; resize: vertical;
}
.composer-input:focus { outline: none; box-shadow: none; background: transparent; }
.composer-input::placeholder { color: #9aa5b8; }
.composer-attachments { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px; }
.composer-attachments:empty { display: none; }
.att-chip {
  display: inline-flex; align-items: center; gap: 5px; max-width: 180px;
  padding: 3px 9px; border-radius: 8px; background: var(--primary-soft);
  color: var(--primary); font-size: 11px; border: 1px solid #dfe6ff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.composer-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 8px; }
.composer-left, .composer-right { display: flex; align-items: center; gap: 8px; }
.composer-plus {
  width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink-soft); font-size: 19px; line-height: 1;
  display: grid; place-items: center; transition: .16s;
}
.composer-plus:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.composer-hint { font-size: 11px; color: #a4aec0; }
.composer-file { display: none; }
.composer-footbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 14px; background: #f7f9fc; border-top: 1px solid var(--line);
}
.foot-select {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft);
  background: #fff; border: 1px solid var(--line-strong); border-radius: 9px;
  padding: 5px 10px; cursor: pointer; transition: .16s;
}
.foot-select:hover { border-color: var(--primary); color: var(--primary); }
.foot-select select {
  width: auto; border: 0; padding: 0 18px 0 0; background-color: transparent;
  font-size: 12px; color: var(--ink-soft); box-shadow: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2377839a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right center;
}
.foot-select select:focus { box-shadow: none; }
.ws-filelist .small { padding: 3px 0; border-bottom: 1px solid #eef1f6; }
.ws-filelist .small:last-child { border-bottom: 0; }
.route-result { border-left: 3px solid var(--primary); background: linear-gradient(180deg,#f9fbff,#f4f7fd); }
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 8px 12px; font-size: 12px; }
.kv .k { color: var(--muted); font-weight: 600; }
.scorebar { height: 7px; background: #e6ebf1; border-radius: 5px; overflow: hidden; }
.scorebar > i { display: block; height: 100%; background: linear-gradient(90deg,var(--accent),var(--primary)); }
.notice {
  padding: 11px 13px; border-radius: 10px; font-size: 12px;
  background: #fff9ec; color: #8a6218; border: 1px solid #f2e2bb; margin-top: 12px;
}

/* ---------- Roles ---------- */
.role-card { position: relative; overflow: hidden; }
.role-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--rc, var(--primary)); }
.role-card h4 { margin: 0 0 6px; font-size: 13px; }
.role-card p { margin: 0; font-size: 11px; color: var(--muted); }
.tier-head { display: flex; align-items: baseline; gap: 10px; margin: 22px 0 12px; }
.tier-head h2 { margin: 0; font-size: 16px; }
.tier-head span { color: var(--muted); font-size: 12px; }

/* ---------- Deliverables / QA / table ---------- */
.deliver-card { display: flex; flex-direction: column; gap: 8px; }
.deliver-card .ico { font-size: 21px; color: var(--primary); }
.artifact { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #eef1f6; font-size: 12px; }
.artifact:last-child { border-bottom: 0; }
.artifact .name { font-weight: 620; }
.artifact .meta { margin-left: auto; color: var(--muted); font-size: 11px; }
.qa-summary { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.qa-summary .big { font-size: 26px; font-weight: 750; }
.qa-item { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid #eef1f6; font-size: 12px; }
.qa-item .lv { min-width: 52px; }
.qa-item .fix { margin-left: auto; color: var(--primary); }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { text-align: left; padding: 10px 11px; border-bottom: 1px solid #e9edf3; vertical-align: top; }
th { color: var(--muted); font-weight: 650; background: #f8fafc; }
tr:last-child td { border-bottom: 0; }

/* ---------- Status / drawer / toast ---------- */
.statusbar {
  grid-column: 1 / 3; background: rgba(255,255,255,.94); border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; font-size: 11px; color: var(--muted);
}
.status-left { display: flex; gap: 8px; }
.status-pill { background: #f1f4f9; border-radius: 999px; padding: 4px 11px; }
.status-pill b { color: var(--ink); }
.warn-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #e0a83d; margin-right: 4px; box-shadow: 0 0 0 3px rgba(224,168,61,.16); }
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: 430px; max-width: 92vw;
  background: #fff; border-left: 1px solid var(--line); box-shadow: -14px 0 44px rgba(24,39,75,.16);
  transform: translateX(105%); transition: transform .24s cubic-bezier(.2,.7,.2,1); z-index: 20;
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head { padding: 17px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-weight: 650; }
.drawer-body { padding: 20px; overflow: auto; font-size: 13px; }
.acct-profile {
  display: flex; align-items: center; gap: 12px;
  padding: 2px 0 16px; border-bottom: 1px solid var(--line);
}
.acct-profile .avatar { width: 44px; height: 44px; font-size: 16px; border-radius: 12px; flex: none; }
.acct-profile strong { font-size: 15px; }
.acct-profile .small { margin-top: 3px; }
.toast {
  position: fixed; left: 50%; bottom: 54px; transform: translateX(-50%) translateY(12px);
  background: linear-gradient(135deg,#1b2433,#2c3b57); color: #fff;
  padding: 10px 18px; border-radius: 10px; font-size: 12px;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: .22s; z-index: 30;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.mt { margin-top: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  .sidebar {
    grid-row: 1; flex-direction: row; align-items: center; gap: 10px;
    padding: 10px 12px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .brand { padding: 0; flex: 0 0 auto; }
  .brand-text { display: none; }
  .project-switch { width: auto; margin: 0; flex: 0 0 auto; }
  .nav { flex-direction: row; overflow-x: auto; gap: 4px; flex: 1; padding-bottom: 2px; }
  .nav-group { display: none; }
  .nav-item { width: auto; white-space: nowrap; padding: 7px 10px; }
  .nav-item .ico { display: none; }
  .sidebar-foot {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    border-top: 0; border-left: 1px solid rgba(255,255,255,.08);
    padding: 0 0 0 10px; margin: 0;
  }
  .sidebar-foot .user { padding: 2px 0; }
  .sidebar-foot .user span { display: none; }
  .sidebar-foot .mode-switch, .sidebar-foot .foot-actions { margin: 0; }
  .main { grid-row: 2; }
  .topbar { height: auto; min-height: 56px; padding: 8px 14px; flex-wrap: wrap; gap: 8px; }
  .search { width: 100%; order: 3; }
  .content { padding: 16px; }
  .statusbar { grid-column: 1; height: auto; min-height: 36px; padding: 6px 12px; flex-wrap: wrap; gap: 6px; }
  .status-right { font-size: 10px; }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  .route-layout { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 10px; }
}
@media (max-width: 600px) {
  .grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .drawer { width: 100%; }
  table { font-size: 11px; }
  .top-actions { flex-wrap: wrap; }
}

/* ---------- 降级提示横幅（演示数据标注） ---------- */
.demo-banner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 10px 13px; margin-bottom: 14px; border-radius: 10px; font-size: 12px;
  background: #fdeaea; color: #9b2c2c; border: 1px solid #f0c8c4;
}
.demo-banner b { font-weight: 700; }
.demo-banner .btn { margin-left: 2px; }
.demo-banner + .demo-banner { display: none; }
