/* =========================================================
   BugDock — 缺陷收件箱
   自绘视觉：深空底 + 双色光晕 + 玻璃面板 + 渐变强调色
   ========================================================= */

:root {
  --bg: #070a11;
  --panel: rgba(18, 23, 35, 0.72);
  --panel-2: rgba(24, 30, 46, 0.6);
  --well: rgba(9, 13, 22, 0.85);

  --line: rgba(148, 163, 184, 0.12);
  --line-2: rgba(148, 163, 184, 0.2);

  --text: #e9eefb;
  --muted: #8b98ad;
  --faint: #5c6a80;

  --indigo: #6b72ff;
  --cyan: #22d3ee;
  --emerald: #34d399;
  --amber: #fbbf24;
  --rose: #fb7185;
  --violet: #a78bfa;
  --sky: #38bdf8;
  --slate: #7c8aa0;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px rgba(3, 6, 16, 0.55);
  --focus: 0 0 0 3px rgba(107, 114, 255, 0.16);

  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei UI", "Noto Sans SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(circle at 50% -10%, #000 0%, transparent 68%);
  mask-image: radial-gradient(circle at 50% -10%, #000 0%, transparent 68%);
}

.glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(107, 114, 255, 0.22), transparent 62%),
    radial-gradient(760px 460px at 92% 2%, rgba(34, 211, 238, 0.14), transparent 58%),
    radial-gradient(620px 420px at 50% 104%, rgba(167, 139, 250, 0.1), transparent 60%);
}

::selection {
  background: rgba(107, 114, 255, 0.32);
  color: #fff;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.25) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.35);
  background-clip: content-box;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

h1, h2, h3, p {
  margin: 0;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

/* ---------------- topbar ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 10, 17, 0.74);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand__mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #aeb6ff;
  border: 1px solid rgba(107, 114, 255, 0.34);
  background:
    radial-gradient(120% 120% at 20% 0%, rgba(107, 114, 255, 0.34), rgba(34, 211, 238, 0.1) 60%, transparent),
    rgba(13, 18, 32, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 20px rgba(58, 68, 255, 0.18);
}

.brand__mark svg {
  width: 22px;
  height: 22px;
}

.brand__text strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.brand__text small {
  display: block;
  margin-top: 2px;
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.16em;
  color: var(--faint);
}

.topbar__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  justify-content: flex-end;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(360px, 100%);
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(9, 13, 22, 0.8);
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}

.search:focus-within {
  border-color: rgba(107, 114, 255, 0.55);
  box-shadow: var(--focus);
  background: rgba(12, 17, 28, 0.9);
}

.search svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--faint);
}

.search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  font-size: 13px;
  outline: none;
}

.search input::placeholder {
  color: #4d5a70;
}

.search input::-webkit-search-cancel-button {
  filter: invert(0.7);
}

.search kbd {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--faint);
  font: 500 10px/1.4 var(--mono);
}

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 0.16s, box-shadow 0.16s, filter 0.16s, background 0.16s, border-color 0.16s;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.btn--primary {
  color: #06111c;
  background: linear-gradient(135deg, #7d84ff, #35dcf0);
  box-shadow: 0 10px 26px rgba(74, 86, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn--primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(74, 86, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--ghost {
  color: var(--text);
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.035);
}

.btn--ghost:hover {
  border-color: rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.06);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition: color 0.16s, background 0.16s, border-color 0.16s;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn:hover {
  color: var(--text);
  border-color: rgba(148, 163, 184, 0.32);
  background: rgba(255, 255, 255, 0.06);
}

/* ---------------- page shell ---------------- */

.page {
  position: relative;
  z-index: 1;
  max-width: 1340px;
  margin: 0 auto;
  padding: 30px clamp(16px, 4vw, 40px) 64px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 10.5px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.16), 0 0 12px rgba(52, 211, 153, 0.6);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ---------------- hero ---------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(20px, 4vw, 48px);
  padding-bottom: 26px;
}

.hero__intro h1 {
  margin: 12px 0 0;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.045em;
  font-weight: 700;
  background: linear-gradient(112deg, #ffffff 8%, #c3c9ff 42%, #6fe6ff 78%, #9df7e4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 52ch;
  margin-top: 14px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(118px, 1fr));
  gap: 10px;
}

.stat {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 15px 16px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(26, 32, 48, 0.7), rgba(14, 19, 30, 0.66));
  overflow: hidden;
}

.stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.34), transparent);
}

.stat--accent {
  border-color: rgba(107, 114, 255, 0.32);
  background: linear-gradient(180deg, rgba(107, 114, 255, 0.16), rgba(20, 26, 44, 0.7));
}

.stat--accent::before {
  background: linear-gradient(90deg, transparent, rgba(125, 132, 255, 0.8), transparent);
}

.stat__label {
  font-size: 11.5px;
  color: var(--muted);
}

.stat__value {
  font: 600 27px/1.15 var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stat--accent .stat__value {
  color: #c7cbff;
}

.stat__hint {
  font-size: 10.5px;
  color: var(--faint);
}

/* ---------------- toolbar ---------------- */

.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 0 18px;
}

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 5px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(11, 15, 25, 0.7);
}

.tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  transition: color 0.16s, background 0.16s, border-color 0.16s;
}

.tabs button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.tabs button.is-active {
  color: #fff;
  border-color: rgba(107, 114, 255, 0.4);
  background: linear-gradient(180deg, rgba(107, 114, 255, 0.28), rgba(107, 114, 255, 0.14));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.tabs .tab-count {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font: 500 10.5px/1.4 var(--mono);
}

.toolbar__filters {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

.field--inline {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 10px 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(11, 15, 25, 0.7);
}

.field--inline .field__label {
  font-size: 11.5px;
  color: var(--faint);
  white-space: nowrap;
}

.field--inline select {
  height: 30px;
  padding: 0 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  outline: none;
  cursor: pointer;
}

.field--inline select option {
  background: #0e1421;
  color: var(--text);
}

/* ---------------- workspace ---------------- */

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 18px;
  align-items: start;
}

.panel {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(23, 29, 44, 0.78), rgba(13, 18, 29, 0.82));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.panel__head h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.badge--ghost {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  font: 500 11px/1.5 var(--mono);
}

.bug-list {
  display: grid;
  gap: 4px;
  padding: 10px;
  min-height: 220px;
}

/* ---------------- bug row ---------------- */

.bug-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  width: 100%;
  padding: 14px 14px 14px 17px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  text-align: left;
  transition: background 0.16s, border-color 0.16s, transform 0.16s;
}

.bug-row::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, #7d84ff, #35dcf0);
  opacity: 0;
  transition: opacity 0.16s;
}

.bug-row:hover {
  background: rgba(255, 255, 255, 0.032);
  border-color: var(--line);
}

.bug-row.is-active {
  background: linear-gradient(96deg, rgba(107, 114, 255, 0.17), rgba(107, 114, 255, 0.045) 62%, transparent);
  border-color: rgba(107, 114, 255, 0.34);
}

.bug-row.is-active::before {
  opacity: 1;
}

.bug-row__top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bug-row__id {
  font: 500 10.5px/1 var(--mono);
  letter-spacing: 0.06em;
  color: var(--faint);
}

.bug-row__title {
  margin-top: 7px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: #eef2fb;
}

.bug-row__preview {
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.62;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bug-row__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--faint);
}

.bug-row__meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.bug-row__meta svg {
  width: 12px;
  height: 12px;
  opacity: 0.75;
}

.bug-row__side {
  display: grid;
  align-content: space-between;
  justify-items: end;
  gap: 10px;
  padding-left: 4px;
}

.bug-row__flags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bug-row__chevron {
  color: var(--faint);
  transition: color 0.16s, transform 0.16s;
}

.bug-row__chevron svg {
  width: 15px;
  height: 15px;
}

.bug-row:hover .bug-row__chevron,
.bug-row.is-active .bug-row__chevron {
  color: #aeb6ff;
  transform: translateX(2px);
}

/* ---------------- badges ---------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.badge--plain::before {
  display: none;
}

.badge--type,
.badge--prio {
  font-size: 11px;
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.badge--type::before,
.badge--prio::before {
  display: none;
}

.status-open {
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.1);
}

.status-triage {
  color: var(--sky);
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.1);
}

.status-verify {
  color: var(--violet);
  border-color: rgba(167, 139, 250, 0.32);
  background: rgba(167, 139, 250, 0.11);
}

.status-resolved {
  color: var(--emerald);
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.1);
}

.status-closed {
  color: var(--slate);
  border-color: rgba(124, 138, 160, 0.32);
  background: rgba(124, 138, 160, 0.1);
}

.prio-urgent {
  color: var(--rose);
  border-color: rgba(251, 113, 133, 0.34) !important;
  background: rgba(251, 113, 133, 0.12) !important;
}

.prio-high {
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.3) !important;
  background: rgba(251, 191, 36, 0.1) !important;
}

.prio-normal {
  color: var(--sky);
  border-color: rgba(56, 189, 248, 0.26) !important;
  background: rgba(56, 189, 248, 0.09) !important;
}

.prio-low {
  color: var(--slate);
  border-color: rgba(124, 138, 160, 0.28) !important;
  background: rgba(124, 138, 160, 0.09) !important;
}

/* ---------------- pager ---------------- */

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
}

.pager button {
  min-width: 32px;
  height: 31px;
  padding: 0 9px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: 500 12px/1 var(--mono);
  transition: color 0.16s, background 0.16s, border-color 0.16s;
}

.pager button:hover:not([disabled]) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.pager button.is-active {
  color: #fff;
  border-color: rgba(107, 114, 255, 0.44);
  background: rgba(107, 114, 255, 0.2);
}

.pager button[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.pager .pager__gap {
  color: var(--faint);
  padding: 0 2px;
}

/* ---------------- detail ---------------- */

.detail-panel {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 108px);
  overflow: auto;
}

.detail-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 54px 28px 58px;
  text-align: center;
}

.detail-empty__art {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: 6px;
  border-radius: 20px;
  border: 1px solid var(--line-2);
  background: radial-gradient(120% 120% at 30% 0%, rgba(107, 114, 255, 0.18), transparent 70%);
  color: #8e98ff;
}

.detail-empty__art svg {
  width: 38px;
  height: 38px;
}

.detail-empty h3 {
  font-size: 15px;
  font-weight: 600;
}

.detail-empty p {
  max-width: 30ch;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

.detail {
  padding: 22px 22px 24px;
}

.detail__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.detail__id {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.08em;
  color: var(--faint);
}

.detail__flags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.detail__title {
  margin-top: 10px;
  font-size: 20px;
  line-height: 1.4;
  letter-spacing: -0.015em;
  font-weight: 650;
}

.detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--faint);
}

.detail__meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.detail__meta svg {
  width: 12px;
  height: 12px;
  opacity: 0.8;
}

.detail__section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.detail__section:first-of-type {
  margin-top: 22px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.section-title::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.prose {
  white-space: pre-wrap;
  font-size: 13.5px;
  line-height: 1.78;
  color: #c4cfe2;
}

.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  font-size: 13px;
  line-height: 1.68;
  color: #c4cfe2;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid rgba(107, 114, 255, 0.26);
  background: rgba(107, 114, 255, 0.14);
  color: #b3baff;
  font: 600 10.5px/1 var(--mono);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 5px 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 11.5px;
  color: var(--muted);
}

.chip b {
  margin-right: 6px;
  color: #d3dcec;
  font-weight: 500;
}

/* ---------------- thread ---------------- */

.thread {
  display: grid;
  gap: 14px;
}

.comment {
  position: relative;
  padding-left: 26px;
}

.comment::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 20px;
  bottom: -14px;
  width: 1px;
  background: var(--line);
}

.comment:last-child::before {
  display: none;
}

.comment__dot {
  position: absolute;
  left: 0;
  top: 5px;
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: #101726;
  color: var(--faint);
}

.comment__dot svg {
  width: 8px;
  height: 8px;
}

.comment--admin .comment__dot {
  border-color: rgba(52, 211, 153, 0.46);
  background: rgba(52, 211, 153, 0.14);
  color: #6ee7b7;
}

.comment__head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.comment__author {
  font-size: 12.5px;
  font-weight: 600;
  color: #dde5f5;
}

.comment__role {
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.26);
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
  font-size: 10.5px;
}

.comment__time {
  margin-left: auto;
  font: 500 10.5px/1.4 var(--mono);
  color: var(--faint);
}

.comment__body {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.72;
  color: #bcc7da;
  white-space: pre-wrap;
}

/* ---------------- actions & reply ---------------- */

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.status-actions .label {
  width: 100%;
  margin-bottom: 2px;
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.status-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 12px;
  transition: color 0.16s, background 0.16s, border-color 0.16s;
}

.status-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.status-btn.is-current {
  color: #fff;
  border-color: rgba(107, 114, 255, 0.42);
  background: rgba(107, 114, 255, 0.18);
  cursor: default;
}

.reply {
  display: grid;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.reply__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.reply textarea {
  min-height: 84px;
  resize: vertical;
}

/* ---------------- form controls ---------------- */

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field__label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--muted);
}

.field__label i {
  color: var(--rose);
  font-style: normal;
}

.field__hint {
  font-size: 10.5px;
  color: var(--faint);
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: var(--well);
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}

textarea {
  min-height: 78px;
  resize: vertical;
  font-family: inherit;
}

input::placeholder,
textarea::placeholder {
  color: #4d5a70;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(107, 114, 255, 0.55);
  box-shadow: var(--focus);
  background: rgba(11, 16, 26, 0.95);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #7b8aa2 50%),
    linear-gradient(135deg, #7b8aa2 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 1px), calc(100% - 11px) calc(50% - 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

select option {
  background: #0e1421;
  color: var(--text);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ---------------- modal ---------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal__veil {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 14, 0.74);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  animation: fade 0.18s ease-out;
}

.modal__card {
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 22px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, #161d2d, #0d1220 62%);
  box-shadow: 0 40px 100px rgba(2, 5, 12, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.modal__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 24px 12px;
  background: linear-gradient(180deg, #161d2d 72%, rgba(22, 29, 45, 0));
}

.modal__head h2 {
  margin-top: 9px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.modal__body {
  display: grid;
  gap: 16px;
  padding: 4px 24px 8px;
}

.modal__foot {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
  background: linear-gradient(0deg, #0d1220 62%, rgba(13, 18, 32, 0));
}

.form-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(251, 113, 133, 0.34);
  background: rgba(251, 113, 133, 0.1);
  color: #fda4af;
  font-size: 12.5px;
}

@keyframes fade {
  from { opacity: 0; }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
}

/* ---------------- toasts ---------------- */

.toasts {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 13px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, #172033, #111828);
  box-shadow: var(--shadow);
  font-size: 12.5px;
  line-height: 1.6;
  color: #dbe4f4;
  pointer-events: auto;
  animation: toastIn 0.2s ease-out;
}

.toast svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.toast--ok {
  border-color: rgba(52, 211, 153, 0.3);
}

.toast--ok svg {
  color: var(--emerald);
}

.toast--err {
  border-color: rgba(251, 113, 133, 0.34);
}

.toast--err svg {
  color: var(--rose);
}

.toast--info svg {
  color: var(--sky);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ---------------- states ---------------- */

.skeleton {
  height: 92px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  background-size: 220% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}

@keyframes shimmer {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

.list-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
}

.list-empty strong {
  color: var(--text);
  font-size: 14px;
}

.list-empty p {
  font-size: 12.5px;
}

/* ---------------- footer ---------------- */

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font: 500 11px/1.6 var(--mono);
  color: var(--faint);
}

/* ---------------- responsive ---------------- */

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    position: static;
    max-height: none;
  }

  .hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-wrap: wrap;
    padding: 12px 14px;
  }

  .topbar__actions {
    width: 100%;
    margin-left: 0;
  }

  .search {
    width: auto;
    flex: 1 1 auto;
  }

  .search kbd {
    display: none;
  }

  .page {
    padding: 22px 14px 48px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero__intro h1 {
    font-size: clamp(30px, 9vw, 40px);
  }

  .toolbar {
    align-items: stretch;
  }

  .tabs {
    width: 100%;
    overflow-x: auto;
  }

  .toolbar__filters {
    margin-left: 0;
    width: 100%;
  }

  .field--inline {
    flex: 1 1 0;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .bug-row {
    padding: 13px 12px 13px 15px;
  }

  .bug-row__side {
    display: none;
  }

  .detail {
    padding: 18px 16px 20px;
  }

  .modal {
    padding: 12px;
  }

  .modal__body,
  .modal__head,
  .modal__foot {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------------- row main / checkbox ---------------- */
.bug-row__main{min-width:0}
.check{display:inline-flex;align-items:center;gap:7px;font-size:11.5px;color:var(--muted);white-space:nowrap;cursor:pointer}
.check input[type=checkbox]{width:15px;height:15px;margin:0;accent-color:#7d84ff;cursor:pointer}
.reply__row input[type=text]{max-width:260px}
.status-btn[disabled]{opacity:1}

[hidden]{display:none!important}

/* ---------------- toolbar inline fields (override .field grid) ---------------- */
.field.field--inline {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 10px 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(11, 15, 25, 0.7);
}

.field.field--inline .field__label {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: var(--faint);
  white-space: nowrap;
}

.field.field--inline select {
  height: 30px;
  min-width: 112px;
  padding: 0 26px 0 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 12.5px;
  background-image:
    linear-gradient(45deg, transparent 50%, #8b98ad 50%),
    linear-gradient(135deg, #8b98ad 50%, transparent 50%);
  background-position: calc(100% - 14px) calc(50% - 1px), calc(100% - 9px) calc(50% - 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field.field--inline select:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* ---------------- mobile overflow guards ---------------- */
.topbar { min-width: 0; }
.topbar__actions { min-width: 0; }
.search { min-width: 0; }
.search input { min-width: 0; width: 100%; }

@media (max-width: 720px) {
  .topbar { row-gap: 10px; }
  .topbar__actions { min-width: 0; flex-wrap: nowrap; }
  .search { width: auto; flex: 1 1 0%; min-width: 0; }
  .topbar .btn { flex: 0 0 auto; padding: 0 12px; }
  .page { overflow-x: clip; }
  .panel, .list-panel, .detail-panel, .workspace { min-width: 0; }
  .stat__value { font-size: 23px; }
}

.list-empty .btn { margin-top: 10px; }

/* ---------------- 账号与权限 ---------------- */
.auth-area {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.btn--auth {
  padding: 0 14px;
}

.btn--auth span {
  white-space: nowrap;
}

.who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.035);
  max-width: 220px;
}

.who__name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role {
  flex: 0 0 auto;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}

.role--admin {
  border-color: rgba(52, 211, 153, 0.32);
  background: rgba(52, 211, 153, 0.13);
  color: #6ee7b7;
}

.role--user {
  border-color: var(--line-2);
  color: var(--muted);
}

.icon-btn--danger {
  color: var(--rose);
  border-color: rgba(251, 113, 133, 0.3);
}

.icon-btn--danger:hover {
  color: #fff;
  background: rgba(251, 113, 133, 0.16);
  border-color: rgba(251, 113, 133, 0.5);
}

.detail__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.reply__who {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
}

.reply__who svg {
  width: 14px;
  height: 14px;
}

.reply__who b {
  color: var(--text);
  font-weight: 600;
}

.locked {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 18px;
  border-radius: 12px;
  border: 1px dashed var(--line-2);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 12.5px;
}

.field--identity .identity {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 11px;
  border: 1px dashed var(--line-2);
  background: rgba(255, 255, 255, 0.025);
  font-size: 12.5px;
  color: var(--muted);
}

.identity__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.8);
}

.identity b {
  color: var(--text);
  font-weight: 600;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(11, 15, 25, 0.7);
}

.auth-tabs button {
  height: 33px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  transition: color 0.16s, background 0.16s, border-color 0.16s;
}

.auth-tabs button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.auth-tabs button.is-active {
  color: #fff;
  border-color: rgba(107, 114, 255, 0.4);
  background: linear-gradient(180deg, rgba(107, 114, 255, 0.28), rgba(107, 114, 255, 0.14));
}

.auth-hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.7;
  color: var(--faint);
}

.modal__card--sm {
  width: min(440px, 100%);
}

@media (max-width: 860px) {
  .topbar__actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }

  .who {
    max-width: 150px;
  }
}

@media (max-width: 720px) {
  .auth-area {
    width: 100%;
    justify-content: flex-end;
  }

  .btn--auth {
    height: 36px;
  }

  .who {
    height: 36px;
    max-width: 180px;
  }

  .detail__flags {
    display: none;
  }
}

.role {
  font-family: var(--mono);
  letter-spacing: 0.06em;
}
