* { box-sizing: border-box; }

:root {
  --bg: #f7f8fa;
  --fg: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --danger: #dc2626;
  --card: #ffffff;
  --open: #6b7280;
  --progress: #2563eb;
  --resolved: #16a34a;
}

html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--fg); font-size: 14px;
}
#app { height: 100%; }

/* 登录页 */
.login-wrap { height: 100%; display: flex; align-items: center; justify-content: center; }
.login-box {
  background: var(--card); padding: 40px 32px; border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06); width: 320px; text-align: center;
}
.login-box h1 { margin: 0 0 4px; font-size: 24px; }
.login-box .sub { margin: 0 0 24px; color: var(--muted); font-size: 13px; }
.login-box form { display: flex; flex-direction: column; gap: 12px; }
.login-box input {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; outline: none; transition: border-color .15s;
}
.login-box input:focus { border-color: var(--accent); }
.login-box button {
  padding: 10px; background: var(--accent); color: #fff; border: none;
  border-radius: 8px; font-size: 14px; cursor: pointer;
  transition: background .15s;
}
.login-box button:hover:not(:disabled) { background: var(--accent-hover); }
.login-box button:disabled { opacity: .6; cursor: not-allowed; }
.error { color: var(--danger); margin: 16px 0 0; font-size: 13px; }

/* 主界面 */
.main-wrap { height: 100%; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px; height: 56px;
  background: var(--card); border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.brand { font-weight: 700; font-size: 16px; }
.spacer { flex: 1; }
.user { color: var(--muted); }
.search {
  width: 240px; padding: 7px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 13px; outline: none;
}
.search:focus { border-color: var(--accent); }
.btn-primary {
  background: var(--accent); color: #fff; border: none;
  padding: 7px 14px; border-radius: 8px; font-size: 13px; cursor: pointer;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost {
  background: transparent; border: 1px solid var(--border);
  padding: 7px 12px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.btn-ghost:hover { background: #f3f4f6; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-link {
  background: none; border: none; color: var(--accent);
  cursor: pointer; font-size: 13px; padding: 0;
}
.btn-link:hover { text-decoration: underline; }

/* 主体 */
.body { flex: 1; display: flex; overflow: hidden; }

/* 左侧 */
.sidebar {
  width: 300px; background: var(--card); border-right: 1px solid var(--border);
  overflow-y: auto; padding: 12px; flex-shrink: 0;
}
.sidebar-loading, .sidebar-empty {
  padding: 40px 20px; color: var(--muted); text-align: center; font-size: 13px;
}
.group { margin-bottom: 16px; }

.group-count {
  background: #f3f4f6; color: var(--muted);
  border-radius: 10px; padding: 0 8px; font-size: 11px;
}
.issue-item {
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
  transition: background .1s;
}
.issue-item:hover { background: #f3f4f6; }
.issue-item.active { background: #eff6ff; }


.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot-open { background: var(--open); }
.dot-in_progress { background: var(--progress); }
.dot-resolved { background: var(--resolved); }

/* 右侧详情 */
.detail { flex: 1; overflow-y: auto; background: var(--bg); }
.detail-empty {
  height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--muted);
}
.detail-inner { padding: 32px 40px; max-width: 1000px; margin: 0 auto; }
.detail-title { margin: 0 0 20px; font-size: 22px; font-weight: 600; }

.detail-meta {
  display: flex; flex-wrap: wrap; gap: 20px 32px;
  padding: 16px 20px; background: var(--card); border-radius: 10px;
  border: 1px solid var(--border); margin-bottom: 24px;
}
.meta-item { display: flex; flex-direction: column; gap: 4px; }
.meta-item label {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px;
}
.meta-item span { font-size: 13px; }
.meta-item select {
  padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; background: #fff; cursor: pointer; outline: none;
}
.meta-item select:focus { border-color: var(--accent); }

/* Section */
.section { margin-bottom: 24px; }
.section-title {
  font-size: 12px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 10px;
}
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.section-head .section-title { margin-bottom: 0; }
.section-actions { display: flex; gap: 6px; }
.muted { color: var(--muted); font-size: 13px; padding: 8px 0; }

.description {
  background: var(--card); padding: 16px 20px; border-radius: 10px;
  border: 1px solid var(--border);
  line-height: 1.7; font-size: 14px;
}

/* 编辑 */
.desc-edit { display: flex; flex-direction: column; gap: 8px; }
.desc-textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit;
  resize: vertical; outline: none; line-height: 1.6;
}
.desc-textarea:focus { border-color: var(--accent); }
.edit-footer {
  display: flex; align-items: center; gap: 12px;
  margin-top: 4px;
}
.edit-hint { font-size: 12px; color: var(--muted); }

/* 内容渲染 */
.content-rendered {
  line-height: 1.7; font-size: 14px; word-break: break-word;
}
.content-rendered .inline-img {
  display: block;
  max-width: 100%;
  max-height: 240px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: zoom-in;
}
.content-rendered a.img-link {
  display: block;
  text-decoration: none;
  line-height: 0;
  margin: 16px 0;
}
.content-rendered a.att-link {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}
.content-rendered a.att-link:hover {
  color: var(--accent-hover);
}

/* 附件列表 */
.attachments {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.attachments-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 8px;
}

.attachments-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.attachment-item {
  display: block;
}

.att-img {
  display: block;
  max-width: 100%;
  max-height: 240px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: zoom-in;
}
.att-thumb {
  display: block;
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  cursor: zoom-in;
  background: #fafafa;
}
.attachment-item a.img-link {
  display: block;
  line-height: 0;
}
.att-file {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: #fff;
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--fg); text-decoration: none;
  font-size: 13px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.att-file:hover { background: #f3f4f6; border-color: #d1d5db; }
.att-file .file-icon { font-size: 16px; }
.att-file .file-name { color: var(--fg); font-weight: 500; }
.att-file .file-size { color: var(--muted); font-size: 12px; }

/* 待发送附件预览 */
.attachment-preview {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
}
.preview-item { position: relative; display: inline-block; }
.preview-img {
  max-width: 120px; max-height: 120px;
  border-radius: 6px; border: 1px solid var(--border);
  display: block;
}
.preview-file {
  display: inline-block; padding: 8px 12px;
  background: #f3f4f6; border-radius: 6px;
  font-size: 12px;
}
.preview-remove {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: #fff;
  border: none; cursor: pointer; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.preview-remove:hover { background: rgba(0,0,0,0.8); }

/* 时间线 */
.timeline { display: flex; flex-direction: column; gap: 2px; }
.timeline-item { display: flex; gap: 12px; padding: 8px 0; position: relative; }
.timeline-dot {
  width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0;
}
.timeline-create .timeline-dot,
.timeline-status_change .timeline-dot,
.timeline-assign .timeline-dot,
.timeline-update .timeline-dot { background: #d1d5db; }
.timeline-comment .timeline-dot { background: var(--accent); }
.timeline-body { flex: 1; min-width: 0; }
.timeline-head {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.timeline-user { font-weight: 600; font-size: 13px; }
.timeline-action { color: var(--muted); font-size: 12px; }
.timeline-time { color: var(--muted); font-size: 12px; }
.timeline-content {
  margin-top: 6px; padding: 10px 14px; background: var(--card);
  border-radius: 8px; border: 1px solid var(--border);
  font-size: 13px; line-height: 1.6;
}

/* 评论输入 */
.comment-input {
  width: 100%;
  padding: 10px 12px;
  min-height: 200px;   /* 加这行，最低 100px */
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: border-color .15s;
}
.comment-input:focus { border-color: var(--accent); }
.comment-actions {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px;
}

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.modal {
  background: #fff; border-radius: 12px; padding: 24px;
  width: 480px; max-width: 90vw; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-sm { width: 380px; }
.modal h3 { margin: 0 0 20px; font-size: 17px; }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-row label { font-size: 12px; color: var(--muted); }
.form-row input,
.form-row textarea,
.form-row select {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit; outline: none;
  transition: border-color .15s;
}
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus { border-color: var(--accent); }
.form-row textarea { resize: vertical; }
.modal-actions {
  display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px;
}
/* ==================== 铃铛和通知 ==================== */
.bell-wrap {
  position: relative;
}
.bell-btn {
  position: relative;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 15px;
}
.bell-btn:hover { background: #f3f4f6; }
.bell-icon { display: block; line-height: 1; }
.bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
  line-height: 1.4;
}

.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-height: 480px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.notif-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 14px;
}
.notif-list {
  overflow-y: auto;
  max-height: 420px;
}
.notif-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.notif-item {
  padding: 10px 16px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background .1s;
}
.notif-item:hover { background: #f9fafb; }
.notif-item.unread { background: #eff6ff; }
.notif-item.unread:hover { background: #dbeafe; }
.notif-content {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 4px;
}
.notif-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
.notif-issue {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}

/* ==================== @提及 ==================== */
.mention {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.92em;
  line-height: 1.4;
  margin: 0 1px;
}

.mention-dropdown {
  position: absolute;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  padding: 4px;
  z-index: 200;
  min-width: 160px;
  max-height: 240px;
  overflow-y: auto;
  margin-top: 4px;
}
.mention-item {
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 6px;
}
.mention-item:hover,
.mention-item.active {
  background: #eff6ff;
  color: var(--accent);
}
.mention-empty {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
}

/* 让 desc-edit / comment-actions 作为定位上下文 */
.desc-edit { position: relative; }
.comment-actions + .mention-dropdown,
.comment-input + .attachment-preview + .comment-actions + .mention-dropdown {
  position: absolute;
}

/* 评论区的 @ 下拉：相对 .section 定位 */
.section { position: relative; }
/* ==================== 结案区 ==================== */
.resolution-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 16px 20px;
}
.resolution-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.resolution-user {
  font-weight: 600;
  font-size: 13px;
  color: #15803d;
}
.resolution-time {
  color: var(--muted);
  font-size: 12px;
}
.resolution-box .attachments {
  border-top-color: #bbf7d0;
}
.resolution-box .attachments-label {
  color: #15803d;
}

/* ==================== 用户管理 ==================== */
.user-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 16px;
}
.user-row {
  display: grid;
  grid-template-columns: 1fr 100px 70px auto;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 6px;
}
.user-row:hover { background: #f9fafb; }
.user-tag-wrap {
  display: inline-flex;
  align-items: center;
}
.user-name { font-weight: 500; }
.user-role {
  color: var(--muted);
  font-size: 12px;
}
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}
.sub-title {
  font-size: 14px;
  margin: 0 0 12px;
  font-weight: 600;
}
/* ==================== 备份管理 ==================== */
.modal-lg {
  width: 640px;
}

.backup-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.backup-hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 8px;
}
.backup-hint code {
  background: #f3f4f6;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 11px;
}

.backup-warn {
  font-size: 13px;
  color: #b91c1c;
  background: #fef2f2;
  border-left: 3px solid #ef4444;
  padding: 8px 12px;
  border-radius: 4px;
  margin: 8px 0 12px;
}

.backup-import {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.import-file-name {
  font-size: 13px;
  color: var(--muted);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}
.btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-danger:disabled { opacity: .5; cursor: not-allowed; }

.backup-list {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.backup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
}
.backup-row:last-child { border-bottom: none; }
.backup-row:hover { background: #f9fafb; }

.backup-info { flex: 1; min-width: 0; }
.backup-name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.backup-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.backup-row-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  margin-left: 12px;
}
.btn-link.danger {
  color: var(--danger);
}
.btn-link.danger:hover {
  color: #b91c1c;
}
/* ==================== 授权标识 ==================== */
.license-chip {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.license-chip:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}
.detail-title-input {
  width: 100%;
  font-size: 22px;
  font-weight: 600;
  border: 1px solid transparent;
  background: transparent;
  padding: 4px 8px;
  border-radius: 6px;
  outline: none;
  font-family: inherit;
  color: var(--fg);
  margin: 0 0 20px;
  transition: border-color .15s, background .15s;
}
.detail-title-input:hover {
  background: #fff;
  border-color: var(--border);
}
.detail-title-input:focus {
  background: #fff;
  border-color: var(--accent);
}

.meta-input {
  padding: 4px 8px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  width: 100%;
  min-width: 80px;
  transition: border-color .15s, background .15s;
}
.meta-input:hover {
  background: #fff;
  border-color: var(--border);
}
.meta-input:focus {
  background: #fff;
  border-color: var(--accent);
}
/* ==================== 标题小笔编辑 ==================== */
.title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.title-row .detail-title {
  margin: 0;
  flex: 1;
}
.title-input {
  flex: 1;
  font-size: 22px;
  font-weight: 600;
  border: 1px solid var(--accent);
  background: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  outline: none;
  font-family: inherit;
  color: var(--fg);
}

/* 小笔按钮 */
.edit-pencil {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.3;
  padding: 2px 6px;
  border-radius: 4px;
  transition: opacity .15s, background .15s;
  line-height: 1;
}
.edit-pencil:hover {
  opacity: 1;
  background: #f3f4f6;
}
.edit-pencil.small {
  font-size: 11px;
  padding: 0 4px;
}

/* meta 值 + 小笔 */
.meta-value {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

/* ==================== 结案多条 ==================== */
.resolution-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.resolution-box:not(.resolution-latest) {
  background: #f9fafb;
  border-color: var(--border);
}
.resolution-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.resolution-user {
  font-weight: 600;
  font-size: 13px;
  color: #15803d;
}
.resolution-box:not(.resolution-latest) .resolution-user {
  color: var(--muted);
}
.resolution-time {
  color: var(--muted);
  font-size: 12px;
  margin-left: auto;
}
.resolution-box .attachments {
  border-top-color: #bbf7d0;
}
.resolution-box:not(.resolution-latest) .attachments {
  border-top-color: var(--border);
}

/* ==================== 评论编辑/删除按钮 ==================== */
.timeline-actions {
  display: inline-flex;
  gap: 8px;
  margin-right: 12px;
}
.timeline-head .spacer {
  flex: 1;
}
.timeline-actions .btn-link.small {
  font-size: 12px;
  padding: 0;
}
.btn-link.small {
  font-size: 12px;
  padding: 0;
}
.btn-link.danger {
  color: var(--danger);
}
.btn-link.danger:hover {
  color: #b91c1c;
}

/* "已编辑" 标记 */
.edited-tag {
  font-size: 11px;
  color: var(--muted);
  background: #f3f4f6;
  padding: 1px 6px;
  border-radius: 8px;
}

/* 评论编辑态 */
.comment-edit {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.comment-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.deleted-content {
  padding: 8px 12px;
  background: #f9fafb;
  border-radius: 6px;
  font-size: 13px;
  font-style: italic;
}
.head-spacer {
  flex: 1;
}
.content-with-deleted {
  position: relative;
}
.content-with-deleted.is-deleted {
  opacity: 0.6;
}
.deleted-tag {
  display: inline-block;
  background: #f3f4f6;
  color: var(--muted);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 8px;
  margin-bottom: 6px;
}
.detail-code {
  font-family: "SF Mono", Monaco, Consolas, monospace;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}
.issue-code {
  font-family: "SF Mono", Monaco, Consolas, monospace;
  font-size: 11px;
  color: var(--muted);
  margin-right: 6px;
}
/* 分组维度下拉 */
.group-by {
  margin-bottom: 12px;
  padding: 0 4px;
}
.group-by select {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
  outline: none;
  font-family: inherit;
}
.group-by select:focus {
  border-color: var(--accent);
}

/* 分组标题（可点击折叠） */
.group-title {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
}
.group-title:hover {
  background: #f3f4f6;
  border-radius: 6px;
}
.group-arrow {
  font-size: 10px;
  color: var(--muted);
  width: 10px;
}
.group-label {
  flex: 1;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.group-count {
  background: #f3f4f6;
  color: var(--muted);
  border-radius: 10px;
  padding: 0 8px;
  font-size: 11px;
}

/* 列表项极简化 */
.issue-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.issue-code {
  font-family: "SF Mono", Monaco, Consolas, monospace;
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}
.issue-title-text {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.issue-row .dot {
  flex-shrink: 0;
}

/* 详情页编号 */
.detail-code {
  font-family: "SF Mono", Monaco, Consolas, monospace;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}
.search-wrap {
  position: relative;
  display: inline-block;
}
.search-wrap .search {
  padding-right: 30px;   /* 给叉留空间 */
}
.search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
}
.search-clear:hover {
  background: #f3f4f6;
  color: var(--fg);
}
/* 顶栏图标按钮 */
.icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.icon-btn:hover { background: #f3f4f6; }

/* 垃圾桶列表 */
.trash-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.trash-item {
  padding: 10px 14px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background .1s;
}
.trash-item:last-child { border-bottom: none; }
.trash-item:hover { background: #f9fafb; }
.trash-title {
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.trash-time {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.user-tag {
  font-size: 11px;
  color: #b45309;
  background: #fef3c7;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 8px;
}
.copy-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.copy-row input {
  flex: 1;
  font-family: "SF Mono", Monaco, Consolas, monospace;
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f9fafb;
}
.copy-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.copy-row input {
  flex: 1;
  font-family: "SF Mono", Monaco, Consolas, monospace;
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f9fafb;
}

[v-cloak] {
  display: none !important;
}


/* 启动动画 */
.splash {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.splash-logo {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #1a1a1a;
  padding-left: 0.2em;
  opacity: 0;
  animation: splash-logo-in 0.8s ease-out 0.1s forwards;
}

.splash-slogan {
  font-size: 14px;
  letter-spacing: 0.4em;
  color: #6b7280;
  padding-left: 0.4em;
  opacity: 0;
  animation: splash-fade-in 0.8s ease-out 0.5s forwards;
}

.splash-dots {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  opacity: 0;
  animation: splash-fade-in 0.8s ease-out 0.9s forwards;
}

.splash-dots span {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
  animation: splash-bounce 1.2s ease-in-out infinite;
}

.splash-dots span:nth-child(1) { animation-delay: 0s; }
.splash-dots span:nth-child(2) { animation-delay: 0.15s; }
.splash-dots span:nth-child(3) { animation-delay: 0.3s; }
.splash-dots span:nth-child(4) { animation-delay: 0.45s; }
.splash-dots span:nth-child(5) { animation-delay: 0.6s; }

@keyframes splash-logo-in {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes splash-fade-in {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes splash-bounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

/* v-cloak */
[v-cloak] {
  display: none !important;
}

/* 长文本折叠 */
.collapsible {
  position: relative;
  transition: max-height 0.3s ease;
  overflow: hidden;
}

.collapsible.collapsed {
  max-height: 300px;
}

.collapsible.collapsed.need-expand::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--card));
  pointer-events: none;
}

.expand-arrow {
  text-align: center;
  padding: 4px 0;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  transition: color .15s;
  line-height: 1;
}

.expand-arrow:hover {
  color: var(--accent);
}