:root {
  /* 中性阶 + 单一蓝色强调(全站统一一个 accent) */
  --bg: #f5f7fb; --bg-2: #eef1f7;
  --card: #ffffff; --surface-2: #f7f9fc;
  --line: #e6eaf1; --line-strong: #d7dde7;
  --text: #111827; --text-2: #334155; --muted: #6b7686;
  --brand: #2563eb; --brand-d: #1d4ed8; --brand-50: #eef4ff; --brand-100: #dbe7fe;
  --ok: #059669; --run: #2563eb; --pend: #94a3b8; --fail: #dc2626;
  /* 待处理 / 已处理语义色(反馈页统计条 + 状态徽标) */
  --amber: #ef9f27; --amber-bg: #fef3e2; --amber-t: #854f0b;
  --done-bg: #e7f4ee; --done-t: #0f6e56;
  /* 圆角 / 阴影 / 焦点环 */
  --r-sm: 8px; --r: 10px; --r-lg: 14px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
  --shadow-card: 0 1px 2px rgba(15,23,42,.04), 0 12px 28px -18px rgba(15,23,42,.18);
  --shadow-pop: 0 8px 24px -6px rgba(15,23,42,.18), 0 24px 60px -20px rgba(15,23,42,.30);
  --ring: 0 0 0 3px rgba(37,99,235,.18);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; color: var(--text);
  background: var(--bg); background-image: linear-gradient(180deg, #f7f9fd 0%, var(--bg) 30%, var(--bg-2) 100%);
  background-attachment: fixed;
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h2, h3 { margin: 0 0 14px; letter-spacing: -.01em; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px; box-shadow: var(--shadow-card); }
.center { max-width: 360px; margin: 13vh auto; }
@media (prefers-reduced-motion: no-preference) {
  .center, .page:not([hidden]) { animation: rise .32s cubic-bezier(.16,1,.3,1) both; }
  .modal:not([hidden]) .card { animation: pop .22s cubic-bezier(.16,1,.3,1) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

.layout { display: flex; gap: 22px; max-width: 1040px; margin: 24px auto; padding: 0 18px; }
.side { width: 200px; flex-shrink: 0; display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 78px; align-self: flex-start;
  background: rgba(255,255,255,.55); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 8px; box-shadow: var(--shadow-sm); }
.nav-group { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); padding: 8px 12px 6px; margin-top: 8px; }
.side > .nav-group:first-child { margin-top: 0; }
.nav-item { position: relative; display: flex; align-items: center; gap: 10px;
  padding: 9px 12px 9px 13px; border-radius: var(--r);
  font-size: 14px; color: var(--text-2); cursor: pointer; text-decoration: none;
  transition: background .14s ease, color .14s ease; }
.nav-ic { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; color: var(--muted);
  transition: color .14s ease; }
.nav-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item:hover { background: #eef1f6; color: var(--text); }
.nav-item:hover .nav-ic { color: var(--text-2); }
.nav-item.active { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.nav-item.active .nav-ic { color: var(--brand); }
.nav-item.active::before { content: ""; position: absolute; left: 3px; top: 9px; bottom: 9px;
  width: 3px; border-radius: 3px; background: var(--brand); }
.content { flex: 1; min-width: 0; }
@media (max-width: 720px) {
  .layout { flex-direction: column; gap: 14px; }
  .side { width: auto; position: static; flex-direction: row; overflow-x: auto; gap: 6px;
    padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .nav-group, .nav-sep { display: none; }
  .nav-item { white-space: nowrap; }
  .nav-item.active::before { display: none; }
}

/* 表单控件:统一焦点环,单列控件限宽避免拉得过长 */
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong);
  border-radius: var(--r); font-size: 14px; background: #fff; color: var(--text);
  transition: border-color .14s ease, box-shadow .14s ease; }
input, select { margin-bottom: 10px; }
textarea { font: inherit; resize: vertical; }
input::placeholder, textarea::placeholder { color: #9aa5b4; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.page .field input, .page .field select, .page .field textarea { max-width: 460px; }
.field { margin-bottom: 4px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 5px; }
.field-hint { font-size: 12px; color: var(--muted); margin: -2px 0 7px; max-width: 460px; line-height: 1.5; }

button { background: var(--brand); color: #fff; border: 0; border-radius: var(--r);
  padding: 10px 18px; font-size: 14px; font-weight: 550; cursor: pointer;
  box-shadow: 0 1px 2px rgba(37,99,235,.25); transition: background .14s ease, transform .06s ease, box-shadow .14s ease; }
button:hover { background: var(--brand-d); box-shadow: 0 2px 8px rgba(37,99,235,.32); }
button:active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(37,99,235,.25); }
button:focus-visible { outline: none; box-shadow: var(--ring); }
button.ghost { background: #fff; color: var(--text-2); border: 1px solid var(--line-strong); box-shadow: none; }
button.ghost:hover { background: #f1f4f8; color: var(--text); box-shadow: none; }
button.link { background: none; color: var(--brand); padding: 0 4px; box-shadow: none; font-weight: 500; }
button.link:hover { background: none; box-shadow: none; text-decoration: underline; }
button.link.warn { color: var(--fail); }

/* 顶栏:毛玻璃吸顶 */
.bar { display: flex; align-items: center; gap: 14px; padding: 11px 24px;
  background: rgba(255,255,255,.78); backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-badge { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  color: #fff; flex-shrink: 0; background: linear-gradient(145deg, #3b82f6, var(--brand-d));
  box-shadow: 0 2px 6px rgba(37,99,235,.32), inset 0 1px 0 rgba(255,255,255,.45); }
.brand-name { font-weight: 650; font-size: 17px; letter-spacing: -.01em; color: var(--text); }
.brand-name .ai { color: var(--brand); }
.bot { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.brand-badge .bot { width: 19px; height: 19px; }
h2.brand { display: flex; justify-content: center; gap: 12px; margin-bottom: 8px; }
h2.brand .brand-badge { width: 44px; height: 44px; border-radius: 14px; }
h2.brand .brand-badge .bot { width: 27px; height: 27px; }
h2.brand .brand-name { font-size: 25px; }
.login-sub { text-align: center; color: var(--muted); font-size: 13.5px; margin: 0 0 20px; }

.wstatus { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; line-height: 1;
  color: var(--text-2); padding: 6px 12px; border: 1px solid var(--line);
  border-radius: var(--r-pill); background: #fff; white-space: nowrap; box-shadow: var(--shadow-sm); }
.wstatus .dot { position: relative; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.wstatus .dot.ok { background: var(--ok); }
.wstatus .dot.ok::after { content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 1.5px solid var(--ok); animation: dotpulse 2s ease-out infinite; }
.wstatus .dot.off { background: var(--pend); }
.wstatus .busy { color: var(--run); font-weight: 600; }
@keyframes dotpulse { 0% { transform: scale(.5); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wstatus .dot.ok::after { animation: none; } }

.usermenu { display: flex; align-items: center; gap: 10px; }
.usermenu .sep { width: 1px; height: 20px; background: var(--line-strong); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-size: 12.5px; font-weight: 600; flex-shrink: 0;
  background: linear-gradient(145deg, #3b82f6, var(--brand-d)); box-shadow: var(--shadow-sm); }
.bar button.ghost { padding: 7px 13px; font-size: 13px; }
/* 页眉醒目 CTA:渐变 + 投影,从一众 ghost 按钮里跳出来 */
.cta-feature { padding: 8px 16px; font-size: 13.5px; font-weight: 600; border-radius: var(--r-pill);
  background: linear-gradient(135deg, #3b82f6, var(--brand-d)); color: #fff; white-space: nowrap;
  box-shadow: 0 2px 10px rgba(37,99,235,.38); transition: transform .12s, box-shadow .12s; }
.cta-feature:hover { background: linear-gradient(135deg, #3b82f6, var(--brand-d));
  transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37,99,235,.5); }
@media (max-width: 720px) {
  .bar { flex-wrap: wrap; padding: 10px 14px; }
  .wstatus { order: 10; flex-basis: 100%; justify-content: center; }
  .cta-feature { font-size: 12.5px; padding: 7px 13px; }
}
.spacer { flex: 1; }
.who { color: var(--text); font-size: 13px; font-weight: 500; }

/* 页面标题区:标题 + 说明的统一节奏 */
.page > h3:first-child, .page > h3.mt { font-size: 18px; }
.page > h3 + .muted { margin-top: -8px; margin-bottom: 18px; }

.row { display: flex; gap: 10px; }
.check { display: flex; align-items: center; gap: 7px; font-size: 14px; margin: 4px 0 14px; color: var(--text-2); }
.check input { width: auto; margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.chip { background: #fff; color: var(--text-2); border: 1px solid var(--line-strong);
  border-radius: var(--r-pill); padding: 5px 13px; font-size: 13px; cursor: pointer;
  transition: background .14s, color .14s, border-color .14s; }
.chip:hover { background: #f1f4f8; color: var(--text); }
.chip.active { background: var(--brand-50); color: var(--brand); border-color: var(--brand-100); font-weight: 600; }

.jobs { list-style: none; padding: 0; margin: 0; }
.jobs li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.jobs li:first-child { padding-top: 2px; }
.jobs li:last-child { border-bottom: 0; padding-bottom: 2px; }
.job-top { display: flex; align-items: center; gap: 9px; }
.job-top b { font-size: 15px; }
.job-sub { font-size: 14px; color: var(--text-2); margin-top: 4px; word-break: break-all; }
.job-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.job-act { margin-top: 8px; }
.st { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: var(--r-pill); color: #fff;
  white-space: nowrap; line-height: 1.4; }
.st-pending { background: var(--pend); } .st-claimed { background: var(--pend); }
.st-running { background: var(--run); } .st-done { background: var(--ok); }
.st-failed { background: var(--fail); }
/* 功能需求状态:待看 / 在做 / 已上线 / 不做 */
.st-fr-pending { background: var(--pend); } .st-fr-in_progress { background: var(--run); }
.st-fr-shipped { background: var(--ok); } .st-fr-declined { background: #b0b8c1; }
h3.mt { margin-top: 26px; }
.fr-note { font-size: 13px; color: var(--text-2); margin-top: 8px; padding: 8px 12px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); }
.fr-note-in { font-size: 13px; }
.sum { font-size: 13px; color: var(--muted); margin: 6px 0; }

/* 表格:留白 + 软标题带 + 行 hover */
.users { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 14px; font-size: 14px;
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.users th, .users td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.users thead th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 12.5px;
  white-space: nowrap; position: sticky; top: 0; }
.users tbody tr:last-child td { border-bottom: 0; }
.users tbody tr:hover td { background: #fafbfd; }
.users tbody tr:hover .sk-row td, .sk-row td { background: var(--surface-2); }
/* 圆角裁剪外壳:<table> 自身的 overflow:hidden 在 WebKit 里裁不住单元格的 inset 阴影
   (待处理行的琥珀色左强调条会顶出圆角、突破背景),改用外层 div 承担圆角+裁剪。
   横向用 overflow-x:auto:窄屏表格放不下时改成横向滚动,而不是把「时间/状态」等列裁掉看不见 */
.tablewrap { border: 1px solid var(--line); border-radius: var(--r-lg); overflow-x: auto; overflow-y: hidden; margin-top: 14px; }
.tablewrap .users { border: 0; border-radius: 0; margin-top: 0; }
.skgrid { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 6px 0 14px; }
.skcheck { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2);
  white-space: nowrap; cursor: pointer; }
.skcheck input { width: auto; margin: 0; }
.skbar { display: flex; align-items: center; gap: 12px; }
.skbar button { padding: 7px 15px; font-size: 13px; }

.muted { color: var(--muted); font-size: 13px; }
.err { color: var(--fail); font-size: 13px; min-height: 18px; }
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.45);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal .card { width: 340px; max-width: 100%; box-shadow: var(--shadow-pop); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 功能缺陷反馈 */
.fb-card { width: 480px; max-width: 92vw; }
.fb-tools { align-items: center; margin-bottom: 12px; }
.fb-filelabel { cursor: pointer; }
.fb-filelabel input[type=file] { display: none; }
/* 附件 chip 列表:已上传的图片/PDF,可逐个删除 */
.fb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.fb-chips:empty { margin: 0; }
.fb-chip { display: inline-flex; align-items: center; gap: 6px;
  background: #f1f4f8; color: var(--text-2); border: 1px solid var(--line-strong);
  border-radius: 6px; padding: 3px 8px; font-size: 12px; max-width: 100%; }
.fb-chip a { color: var(--text-2); text-decoration: none; font-weight: 700; }
.fb-chip a:hover { color: #c0392b; text-decoration: none; }
.warn { color: var(--fail); }
.fb-done { color: var(--ok); font-size: 13px; font-weight: 500; }
.fb-title { font-weight: 600; cursor: pointer; }
.fb-filters { gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.fb-hby { font-size: 11px; margin: 2px 0; }

/* 展示编号徽标(J- / FR- / FB-):等宽小蓝章,列表 + 详情通用 */
.idno { display: inline-block; font: 600 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 2px 7px; border-radius: 6px; background: var(--brand-50); color: var(--brand-d);
  white-space: nowrap; vertical-align: middle; }
.job-top .idno { margin-right: 2px; }
.idsub { font-size: 12px; margin-top: 2px; }

/* 反馈页标题行 + 顶部统计条 */
.fb-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fb-head h3 { margin: 0; font-size: 18px; }
.fb-head + .muted { margin-top: 6px; margin-bottom: 18px; }
.fb-stats { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.fb-stat { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  padding: 5px 11px; border-radius: var(--r-pill); line-height: 1; }
.fb-stat .d { width: 7px; height: 7px; border-radius: 50%; }
.fb-stat-todo { background: var(--amber-bg); color: var(--amber-t); }
.fb-stat-todo .d { background: var(--amber); }
.fb-stat-done { background: var(--done-bg); color: var(--done-t); }
.fb-stat-done .d { background: var(--ok); }
.fb-stat-all { background: #f1f4f8; color: var(--text-2); }

/* 反馈表:状态 pill、待处理行左侧强调条、已处理行淡化 */
.fb-table td:nth-child(4) { white-space: pre-wrap; max-width: 380px; }
.fb-table td:first-child, .fb-table td:last-child { white-space: nowrap; }
/* 功能列不折行:功能名与 ↗ 保持一行、下方「任务 J-N」也不拆行 */
.fb-table td:nth-child(3) { white-space: nowrap; }
.fb-pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px;
  border-radius: var(--r-pill); white-space: nowrap; }
.fb-pill-todo { background: var(--amber-bg); color: var(--amber-t); }
.fb-pill-done { background: var(--done-bg); color: var(--done-t); }
.fb-row-todo td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
.fb-row-done { opacity: .62; }
.fb-table td .link { margin-top: 6px; }

/* 附件小 chip(反馈表 + 详情通用) */
.att-chip { display: inline-flex; align-items: center; gap: 4px; background: #f1f4f8;
  border: 1px solid var(--line-strong); border-radius: 6px; padding: 2px 8px; font-size: 12px;
  color: var(--text-2); text-decoration: none; margin: 2px 4px 2px 0; white-space: nowrap; }
.att-chip:hover { background: #e7ecf3; text-decoration: none; color: var(--text); }

/* 详情弹窗顶部编号行 */
.fbd-nos { display: flex; gap: 8px; margin: 0 0 4px; }

/* 反馈任务详情弹窗 */
.fbd-card { width: 560px; max-width: 94vw; max-height: 86vh; overflow-y: auto; }
.fbd-sec { margin-top: 14px; }
.fbd-sec h4 { margin: 0 0 6px; font-size: 13px; color: var(--text-2); letter-spacing: .02em; }
.fbd-att { margin-top: 8px; font-size: 13px; }
.kv { display: flex; gap: 10px; font-size: 13px; padding: 4px 0; border-bottom: 1px dashed var(--border, #e5e7eb); }
.kv:last-child { border-bottom: none; }
.kv .k { flex: 0 0 110px; color: var(--muted); }
.kv .v { flex: 1; color: var(--text); word-break: break-all; white-space: pre-wrap; }

/* 列表分页条(全部任务 / 需求管理 / 缺陷反馈 / 审计日志 通用,每页 10 条) */
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.pager:empty { display: none; }
.pager .pg-btn { background: #fff; color: var(--text-2); border: 1px solid var(--line-strong);
  border-radius: var(--r); padding: 6px 14px; font-size: 13px; font-weight: 500; box-shadow: none; }
.pager .pg-btn:hover:not(:disabled) { background: #f1f4f8; color: var(--text); box-shadow: none; }
.pager .pg-btn:disabled { opacity: .45; cursor: default; }
.pager .pg-info { font-size: 13px; color: var(--muted); min-width: 132px; text-align: center; }

/* 全局网络异常红条:fetch 网络层抛错(断网/自签证书放行到期)时亮起,任一请求成功自动消失 */
#net-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  background: #fef2f2; color: #991b1b; border-bottom: 1px solid #fecaca;
  padding: 10px 16px; font-size: 13.5px; font-weight: 500; text-align: center; }
#net-banner .nb-btn { background: #dc2626; color: #fff; border: 0; border-radius: var(--r);
  padding: 4px 12px; margin: 0 8px; font-size: 13px; font-weight: 600; box-shadow: none; }
#net-banner .nb-btn:hover { background: #b91c1c; }
#net-banner .nb-sub { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; color: #b45309; }
