:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #1f2329;
  --ink2: #5f6773;
  --ink3: #8b93a0;
  --line: #e6e9ef;
  --brand: #3669fc;
  --brand-soft: #eaf0ff;
  --high: #d64545;
  --mid: #c47f16;
  --low: #2f8f5b;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 8px 24px rgba(16,24,40,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono { font-family: "Cascadia Code", Consolas, "SF Mono", Menlo, monospace; }
.app-root { min-height: 100vh; }

/* ---------- 认证页 ---------- */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: var(--panel);
}
.auth-visual {
  position: relative;
  overflow: hidden;
  background: #0f1a33;
  color: #fff;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-visual::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(circle at 25% 20%, rgba(54,105,252,.55), transparent 42%),
    radial-gradient(circle at 78% 68%, rgba(19,168,168,.45), transparent 46%),
    radial-gradient(circle at 60% 10%, rgba(139,92,246,.35), transparent 40%);
  filter: blur(6px);
}
.auth-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), transparent 85%);
}
.auth-visual > * { position: relative; z-index: 1; }
.auth-brand { font-size: 19px; font-weight: 700; letter-spacing: .4px; display: flex; align-items: center; gap: 10px; }
.auth-brand i {
  width: 30px; height: 30px; border-radius: 9px; display: inline-block;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect x='6' y='6' width='88' height='88' rx='24' fill='%23101828'/><path d='M22 72 V34 L37 54 L52 34 V72' stroke='%233669fc' stroke-width='8' stroke-linecap='round' stroke-linejoin='round' fill='none'/><path d='M60 34 V72 M74 34 V72 M60 53 L74 53' stroke='white' stroke-width='8' stroke-linecap='round'/><path d='M68 60 L75 67 L85 55' stroke='%233669fc' stroke-width='6' stroke-linecap='round' stroke-linejoin='round' fill='none'/></svg>");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-color: #101828;
  box-shadow: 0 6px 18px rgba(2, 8, 23, .35);
}
.auth-visual h1 { font-size: 38px; line-height: 1.28; margin: 0; letter-spacing: .5px; }
.auth-visual p { color: rgba(255,255,255,.72); max-width: 420px; margin: 18px 0 0; }
.auth-points { display: grid; gap: 14px; margin-top: 34px; }
.auth-point { display: flex; gap: 12px; align-items: flex-start; color: rgba(255,255,255,.86); }
.auth-point b { display: block; font-size: 14px; }
.auth-point span { color: rgba(255,255,255,.6); font-size: 12.5px; }
.auth-point em {
  width: 26px; height: 26px; border-radius: 8px; flex: none;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  display: grid; place-items: center; font-style: normal; font-size: 13px;
}
.auth-form-wrap { display: grid; place-items: center; padding: 48px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h2 { font-size: 24px; margin: 0 0 6px; }
.auth-card .sub { color: var(--ink3); font-size: 13px; margin: 0 0 28px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 12.5px; color: var(--ink2); margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 12px; background: #fff; outline: none; transition: border .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(54,105,252,.12); }
.textarea { resize: vertical; min-height: 90px; line-height: 1.55; }
.check { display: flex; align-items: center; gap: 8px; color: var(--ink2); font-size: 13px; margin: 4px 0 20px; }
.btn {
  border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 9px 16px; cursor: pointer; transition: all .15s; font-weight: 500;
}
.btn:hover { border-color: #c9cfda; background: #fafbfe; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(54,105,252,.28); }
.btn.primary:hover { background: #2a5af0; }
.btn.danger { color: var(--high); }
.btn.small { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }
.btn.block { width: 100%; padding: 11px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.auth-foot { margin-top: 22px; color: var(--ink3); font-size: 13px; text-align: center; }
.auth-foot a { color: var(--brand); }
.auth-back-home { margin: 18px 0 0; text-align: center; font-size: 12px; }
.auth-back-home a { color: var(--ink3); transition: color .15s; }
.auth-back-home a:hover { color: var(--brand); }
.demo-box {
  margin-top: 26px; border: 1px dashed #cfd7e6; border-radius: 10px;
  background: #f8faff; padding: 12px 14px; font-size: 12.5px; color: var(--ink2);
}
.demo-box b { color: var(--ink); }
.form-error { color: var(--high); font-size: 12.5px; min-height: 18px; margin: -6px 0 12px; }

/* ---------- 主框架 ---------- */
.topbar {
  height: 60px; background: var(--panel); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 20px; padding: 0 22px; position: sticky; top: 0; z-index: 30;
}
.brand { font-weight: 700; font-size: 15.5px; display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.brand i {
  width: 24px; height: 24px; border-radius: 7px; flex: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><rect x='6' y='6' width='88' height='88' rx='24' fill='%23101828'/><path d='M22 72 V34 L37 54 L52 34 V72' stroke='%233669fc' stroke-width='8' stroke-linecap='round' stroke-linejoin='round' fill='none'/><path d='M60 34 V72 M74 34 V72 M60 53 L74 53' stroke='white' stroke-width='8' stroke-linecap='round'/><path d='M68 60 L75 67 L85 55' stroke='%233669fc' stroke-width='6' stroke-linecap='round' stroke-linejoin='round' fill='none'/></svg>");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-color: #101828;
}
.org-switch { display: flex; align-items: center; gap: 8px; }
.org-switch select { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: #fafbfe; }
.topnav { display: flex; gap: 4px; margin-left: 8px; }
.topnav a { padding: 7px 12px; border-radius: 8px; color: var(--ink2); font-size: 13px; }
.topnav a:hover { background: #f3f5fa; color: var(--ink); }
.topnav a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.mobile-nav { display: none; }
.user-menu { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--ink2); font-size: 13px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.layout { display: flex; min-height: calc(100vh - 60px); }
.sidebar {
  width: 264px; flex: none; background: var(--panel); border-right: 1px solid var(--line);
  padding: 18px 12px; position: sticky; top: 60px; height: calc(100vh - 60px); overflow: auto;
}
.side-title { font-size: 11.5px; color: var(--ink3); letter-spacing: .6px; text-transform: uppercase; padding: 6px 10px; }
.side-sep { height: 1px; background: var(--line); margin: 14px 10px; }
.side-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px;
  color: var(--ink2); cursor: pointer; font-size: 13px; border: none; background: none; width: 100%; text-align: left;
}
.side-item:hover { background: #f4f6fa; color: var(--ink); }
.side-item.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.side-item .count { margin-left: auto; font-size: 11.5px; color: var(--ink3); background: #f1f3f7; border-radius: 999px; padding: 0 7px; }
.side-group { margin: 4px 0 10px; }
.side-group-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 13px; font-weight: 600; cursor: pointer; border-radius: 8px; }
.side-group-head:hover { background: #f6f8fc; }
.side-group-head .caret { font-size: 10px; color: var(--ink3); transition: transform .15s; }
.side-group.open .caret { transform: rotate(90deg); }
.side-sub { display: none; margin-left: 16px; border-left: 1px solid var(--line); padding-left: 6px; }
.side-group.open .side-sub { display: block; }
.side-sub .side-item { font-size: 12.5px; padding: 6px 10px; }
.side-sub .side-item .count { background: none; }
.main { flex: 1; min-width: 0; padding: 24px 26px 60px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-head h1 { font-size: 21px; margin: 0; }
.page-head p { color: var(--ink3); font-size: 12.5px; margin: 5px 0 0; }
.head-actions { display: flex; gap: 10px; align-items: center; }

/* ---------- 统计卡 ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 17px; box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 26px; line-height: 1.2; }
.stat span { color: var(--ink3); font-size: 12px; }

/* ---------- 筛选 ---------- */
.filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.filters .search { flex: 1; min-width: 220px; }
.filters select { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: #fff; }
.filters .spacer { flex: 1; }
.result-hint { color: var(--ink3); font-size: 12.5px; }
.seg { display: inline-flex; background: #eef1f6; border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 13px; border-radius: 7px; font-size: 12.5px; color: var(--ink3); cursor: pointer; white-space: nowrap; }
.seg button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(16,24,40,.1); }
.design-note { display: flex; align-items: center; gap: 10px; background: #f6f3ff; border: 1px solid #e6ddfb; border-radius: var(--radius); padding: 11px 15px; margin-bottom: 16px; font-size: 12.5px; }
.design-note b { color: #6d45c4; }
.design-note span { color: var(--ink2); }

/* ---------- 缺陷卡片 ---------- */
.bug-list { display: grid; gap: 12px; }
.bug-card {
  display: flex; gap: 16px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
  cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.bug-card:hover { border-color: #c8d3ea; transform: translateY(-1px); box-shadow: 0 10px 26px rgba(16,24,40,.08); }
.bug-body { flex: 1; min-width: 0; }
.bug-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.code { font: 600 12px/1.4 "Cascadia Code", Consolas, monospace; color: var(--ink2); }
.code.copyable { cursor: copy; padding: 1px 6px; border-radius: 4px; transition: background .15s, color .15s; }
.code.copyable:hover { background: #eaf0ff; color: var(--brand); }
.pill { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; border: 1px solid transparent; white-space: nowrap; }
.pill.type { background: #eef2ff; color: #4054b2; }
.pill.pri-高 { background: #fdecec; color: var(--high); }
.pill.pri-中 { background: #fdf3e3; color: var(--mid); }
.pill.pri-低 { background: #eaf6ef; color: var(--low); }
.pill.st-待评审 { background: #f1f3f7; color: var(--ink2); }
.pill.st-确认修改 { background: #eaf0ff; color: var(--brand); }
.pill.st-已修复 { background: #eaf6ef; color: var(--low); }
.pill.st-不修改 { background: #f5eefc; color: #7c4dbe; }
.pill.st-未解决 { background: #fdecec; color: var(--high); }
.pill.st-已采纳 { background: #eaf0ff; color: var(--brand); }
.pill.st-已出新版 { background: #fff1e3; color: #b76a12; }
.pill.st-待验收 { background: #fdf3e3; color: var(--mid); }
.pill.st-已完成 { background: #eaf6ef; color: var(--low); }
.pill.kind { background: #f3ecff; color: #6d45c4; }
.quote { margin-top: 8px; padding: 7px 11px; border-left: 3px solid #c9b8f0; background: #faf8ff; border-radius: 0 7px 7px 0; font-size: 12.5px; color: #4a4160; line-height: 1.6; }
.quote-block { border-left-width: 3px; font-size: 13px; }
.bug-time { margin-left: auto; color: var(--ink3); font-size: 12px; }
.bug-card h3 { margin: 2px 0 6px; font-size: 14.5px; line-height: 1.5; font-weight: 600; }
.bug-meta { color: var(--ink3); font-size: 12.5px; display: flex; gap: 12px; flex-wrap: wrap; }
.bug-meta .url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 520px; }
.element {
  margin-top: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: #f8f9fc; border: 1px solid #eef0f5; border-radius: 8px; padding: 6px 9px; font-size: 12px; color: var(--ink2);
}
.element code { color: #4054b2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 460px; }
.bug-foot { margin-top: 9px; display: flex; gap: 14px; color: var(--ink3); font-size: 12px; align-items: center; }
.thumb {
  width: 220px; height: 140px; flex: none; border-radius: 9px; border: 1px solid var(--line);
  background: #f4f6fa center/cover no-repeat; overflow: hidden; display: grid; place-items: center;
  color: #b4bcc9; font-size: 12px;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.empty {
  text-align: center; color: var(--ink3); background: var(--panel); border: 1px dashed var(--line);
  border-radius: var(--radius); padding: 46px 20px;
}
.load-more { text-align: center; margin-top: 16px; }

/* ---------- 抽屉 ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.34); z-index: 50;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.overlay.on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 560px; max-width: 94vw; background: var(--panel);
  z-index: 60; box-shadow: -24px 0 60px rgba(15,23,42,.18); transform: translateX(102%);
  transition: transform .24s ease; display: flex; flex-direction: column;
}
.drawer.on { transform: none; }
.drawer-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.drawer-head .code { font-size: 13px; }
.drawer-head .close { margin-left: auto; border: none; background: #f3f5fa; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; }
.drawer-body { padding: 20px 22px 40px; overflow: auto; }
.detail-title { font-size: 17px; font-weight: 600; margin: 10px 0 16px; line-height: 1.55; }
.kv { display: grid; grid-template-columns: 84px 1fr; gap: 8px 12px; font-size: 13px; margin-bottom: 18px; }
.kv dt { color: var(--ink3); }
.kv dd { margin: 0; color: var(--ink); word-break: break-all; }
.section { margin-bottom: 22px; }
.section h4 { font-size: 12.5px; color: var(--ink3); font-weight: 600; margin: 0 0 9px; letter-spacing: .3px; }
.code-box { background: #f7f8fc; border: 1px solid #eceff5; border-radius: 9px; padding: 9px 11px; display: flex; gap: 8px; align-items: center; margin-bottom: 7px; }
.code-box code { flex: 1; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #4054b2; }
.shot { width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; cursor: zoom-in; }
.review-form { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fbfcfe; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.comment { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.comment .who { font-size: 12px; color: var(--ink3); margin-bottom: 3px; }
.timeline { font-size: 12.5px; color: var(--ink2); }
.timeline li { list-style: none; padding: 5px 0 5px 14px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 12px; width: 5px; height: 5px; border-radius: 50%; background: #c3cad6; }
.timeline { padding: 0; margin: 0; }
.conflict { background: #fff8e6; border: 1px solid #f3dca6; border-radius: 10px; padding: 12px; font-size: 12.5px; margin-bottom: 14px; }
.conflict pre { white-space: pre-wrap; margin: 6px 0 0; font-size: 12px; color: var(--ink2); }

/* ---------- 需求清单 / 详情（对齐需求中心） ---------- */
.req-stats .stat.accent b { color: var(--brand); }
.req-mod-panel { margin: -2px 0 0; }
.req-mod-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 10px 10px; }
.req-mod-title { font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: .02em; }
.req-mod-total { font-size: 11px; font-weight: 600; color: var(--ink3); background: #f3f6fb; border-radius: 6px; padding: 2px 7px; }
.req-mod-body { display: flex; flex-direction: column; gap: 2px; }
.req-mod-row { padding: 8px 10px; border-radius: 9px; }
.req-mod-row .req-mod-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-mod-mark { width: 6px; height: 6px; border-radius: 2px; background: #cbd5e6; flex: none; }
.req-mod-row.on .req-mod-mark { background: var(--brand); }
.req-mod-row .count { margin-left: auto; }

/* ---------- 需求分类树 ---------- */
.req-cat-body { display: flex; flex-direction: column; gap: 2px; }
.req-cat-row {
  display: flex; align-items: center; gap: 6px; min-height: 32px; padding-right: 6px;
  border-radius: 9px; cursor: pointer; color: var(--ink2); font-size: 13px;
}
.req-cat-row:hover { background: #f3f6fc; }
.req-cat-row.on { background: rgba(54, 105, 252, .09); color: var(--brand); font-weight: 600; }
.req-cat-caret { width: 14px; flex: none; text-align: center; color: var(--ink3); font-size: 11px; }
.req-cat-caret.none { opacity: .45; }
.req-cat-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-cat-row .count { font-size: 11.5px; color: var(--ink3); }
.req-cat-row.on .count { color: var(--brand); }
.req-cat-more {
  border: 0; background: transparent; color: var(--ink3); cursor: pointer;
  padding: 0 2px; font-size: 15px; line-height: 1; opacity: 0;
}
.req-cat-row:hover .req-cat-more { opacity: 1; }
.cat-menu { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.req-toolbar {
  position: sticky; top: 60px; z-index: 20; display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; padding: 10px 0; margin: -4px 0 8px;
  background: rgba(245, 247, 251, .92); backdrop-filter: blur(8px);
}
.req-toolbar .search { flex: 1; min-width: 220px; max-width: 380px; height: 38px; padding: 0 12px 0 34px; border-radius: 9px; border: 1px solid #d3dae6; background: #fff 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='%236f7a8d' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px center; outline: none; }
.req-toolbar .search:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(54,105,252,.12); }
.req-toolbar .sort-box { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink3); }
.req-toolbar .sort-box select { height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 10px; font-size: 12.5px; color: var(--ink); outline: none; }
.req-toolbar .hint { margin-left: auto; color: var(--ink3); font-size: 12px; }
.req-list { display: grid; gap: 12px; }
.req-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); position: relative; cursor: pointer;
  transition: border-color .16s, box-shadow .16s, transform .16s;
}
.req-card::before {
  content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px;
  border-radius: 0 3px 3px 0; background: linear-gradient(180deg, var(--brand), #9dbcff); opacity: .85;
}
.req-card:hover { border-color: #b9c9e8; box-shadow: 0 12px 26px -16px rgba(30,60,140,.35); transform: translateY(-1px); }
.req-id { font-family: "Cascadia Code", Consolas, monospace; font-size: 11.5px; color: var(--ink3); letter-spacing: .4px; }
.req-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 16.5px; font-weight: 700; margin: 4px 0 6px; }
.req-name:hover { color: var(--brand); }
.req-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; color: var(--ink3); font-size: 12px; }
.req-meta b { color: var(--ink); font-weight: 600; }
.req-meta .req-warn, .req-meta .req-warn b { color: var(--mid); }
.req-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.req-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.req-links .chip-link {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 7px; font-size: 12.5px; color: #4b5568;
  background: #fff; transition: .15s; cursor: default;
}
.req-links .chip-link:not(.off):hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.req-links .chip-link.off { opacity: .42; background: #f7f8fb; }
.req-links .chip-link.pending { opacity: .72; border-style: dashed; background: #fffaeb; color: #8a5b08; }
.req-links .chip-link .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .55; }
.tag.tag-blue { background: #eaf1ff; color: #2450cc; }
.tag.tag-green { background: #e7f7ee; color: #0b7a45; }
.tag.tag-gray { background: #eef1f6; color: #5d6573; }
.tag.tag-ver { background: #f2f4fa; color: #55627a; font-family: "Cascadia Code", Consolas, monospace; }
.req-hero {
  background: linear-gradient(120deg, #ffffff 0%, #f7faff 100%);
  border: 1px solid var(--line); border-radius: 16px; padding: 24px 26px;
  box-shadow: var(--shadow); margin-bottom: 18px; position: relative; overflow: hidden;
}
.req-hero::after {
  content: ""; position: absolute; right: -60px; top: -80px; width: 240px; height: 240px;
  border-radius: 50%; background: radial-gradient(circle, rgba(54,105,252,.14), rgba(54,105,252,0) 68%);
}
.req-hero h1 { margin: 6px 0 8px; font-size: 26px; line-height: 1.35; }
.req-hero p { margin: 0; color: var(--ink3); font-size: 13px; max-width: 880px; line-height: 1.75; word-break: break-all; }
.req-hero-meta { display: flex; gap: 10px 22px; flex-wrap: wrap; margin-top: 16px; color: var(--ink3); font-size: 12.5px; }
.req-hero-meta b { color: var(--ink); font-weight: 600; }
.req-ver-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.req-ver-bar > b { font-size: 12.5px; font-weight: 400; color: var(--ink3); }
.req-ver-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; background: #eaeef7; border-radius: 9px; padding: 3px; }
.req-ver-seg button {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 13px;
  border: 0; border-radius: 7px; background: none; color: var(--ink3); font-size: 12.5px;
  font-family: "Cascadia Code", Consolas, monospace; cursor: pointer;
}
.req-ver-seg button:hover { color: var(--ink); }
.req-ver-seg button.on { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 1px 3px rgba(16,24,40,.1); }
.req-ver-note { margin-left: auto; font-size: 12px; color: var(--ink3); }
.req-entry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.req-entry {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow); transition: .16s;
}
.req-entry:hover { border-color: #b9c9e8; box-shadow: 0 14px 26px -18px rgba(30,60,140,.4); transform: translateY(-1px); }
.req-entry .icon {
  width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center;
  justify-content: center; background: var(--brand-soft); color: var(--brand); font-size: 15px; font-weight: 700;
}
.req-entry h3 { margin: 0; font-size: 14.5px; }
.req-entry p { margin: 0; color: var(--ink3); font-size: 12.5px; line-height: 1.65; flex: 1; }
.req-file-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px;
  font-size: 12.5px; background: #fbfcff; word-break: break-all;
}
.req-file-row span { color: var(--ink3); font-size: 11.5px; flex: none; }
.req-entry-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:10px; }
.req-entry-actions .btn.small { text-decoration:none; display:inline-flex; align-items:center; }
.req-off-note { color: var(--mid); font-size: 12px; }
.req-block { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; }
.req-block h2 { font-size: 14px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.req-block h2 span { color: var(--ink3); font-weight: 400; font-size: 12px; }
.req-actions { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 1100px) {
  .req-entry-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .req-toolbar { top: 0; }
  .req-card { grid-template-columns: 1fr; }
  .req-side { align-items: flex-start; }
  .req-links { justify-content: flex-start; }
  .req-ver-note { margin-left: 0; }
}

/* ---------- 设置 ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 18px; }
.card-head { padding: 15px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.card-head b { font-size: 14px; }
.card-head span { color: var(--ink3); font-size: 12.5px; }
.card-head .btn { margin-left: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 11px 18px; border-bottom: 1px solid #f0f2f6; }
.table th { color: var(--ink3); font-weight: 500; font-size: 12px; background: #fafbfe; }
.table tr:last-child td { border-bottom: none; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #f1f3f7; color: var(--ink2); font-size: 11.5px; }
.tag.off { background: #f6f7f9; color: #b4bcc9; }
.color-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: middle; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 18px; }
.inline-form .input { width: auto; min-width: 160px; }
.agent-form { padding: 14px 18px; }
.agent-form .select, .agent-form .textarea { font-size: 12.5px; }
.card-head .btn + .btn { margin-left: 8px; }
.invite-result { margin: 0 18px 16px; background: #f6f9ff; border: 1px solid #dbe5ff; border-radius: 9px; padding: 12px; font-size: 12.5px; word-break: break-all; }

/* ---------- 弹窗 / 提示 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.36); display: none; place-items: center; z-index: 80; padding: 20px; }
.modal-mask.on { display: grid; }
.modal { width: 100%; max-width: 440px; background: var(--panel); border-radius: 14px; box-shadow: 0 30px 80px rgba(15,23,42,.28); padding: 22px; }
.modal h3 { margin: 0 0 6px; font-size: 17px; }
.modal p { color: var(--ink3); font-size: 12.5px; margin: 0 0 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 20px);
  background: #1f2329; color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: all .2s; z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,.2);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--high); }
.muted { color: var(--ink3); }
.hidden { display: none !important; }
.right { text-align: right; }
.small { font-size: 12.5px; }
.grow { flex: 1; }

/* ---------- DrawHub 画板工作台 ---------- */
body.draw-shell { overflow: hidden; }
.draw-shell .layout { display: block; height: calc(100vh - 60px); min-height: 0; }
.draw-shell .sidebar { display: none; }
.draw-shell .main { height: 100%; padding: 0; overflow: hidden; }
.draw-page { height: 100%; min-height: 0; background: var(--bg); }
.draw-frame { display: block; width: 100%; height: 100%; border: 0; background: var(--bg); }

@media (max-width: 860px) {
  body.draw-shell .layout { height: calc(100vh - 101px); }
}

@media (max-width: 1100px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .thumb { width: 160px; height: 104px; }
}
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .sidebar { display: none; }
  .mobile-nav {
    display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px;
    background: var(--panel); border-bottom: 1px solid var(--line);
    position: sticky; top: 60px; z-index: 25;
  }
  .mobile-nav-item {
    flex: none; padding: 6px 12px; border-radius: 8px;
    color: var(--ink2); font-size: 13px; white-space: nowrap;
  }
  .mobile-nav-item.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
}
