/* FRM issues - dark theme in the dashboard palette */
:root {
  --bg: #0e0f13;
  --panel: #16181d;
  --panel-2: #1b1e24;
  --line: #262931;
  --line-2: #30343d;
  --text: #e3e4e6;
  --muted: #8b8f98;
  --faint: #5f636c;
  --accent: #e08a7e;
  --accent-soft: rgba(224, 138, 126, 0.14);
  --blue: #8ab8ff;
  --green: #73bf69;
  --orange: #e6a873;
  --red: #f2495c;
  --purple: #b7a6e0;
  --grey: #8b8f98;
  --radius: 12px;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 5px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--faint); }
::-webkit-scrollbar-corner { background: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; height: 60px; padding: 0 24px; background: rgba(14, 15, 19, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: 0.2px; white-space: nowrap; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), #c45f7c); display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #16181d; }
.game-switch { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); cursor: pointer; white-space: nowrap; }
.game-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(115, 191, 105, 0.18); }
.search { flex: 1; max-width: 460px; position: relative; }
.search input { width: 100%; height: 38px; padding: 0 14px 0 38px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); outline: none; transition: border-color 0.15s; }
.search input:focus { border-color: var(--accent); }
.search svg { position: absolute; left: 12px; top: 11px; color: var(--muted); }
.search kbd { position: absolute; right: 10px; top: 9px; font: 11px var(--mono); color: var(--faint); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 6px; }
.topnav { display: flex; gap: 4px; margin-left: auto; }
.topnav a { padding: 7px 12px; border-radius: 8px; color: var(--muted); white-space: nowrap; }
.topnav a:hover, .topnav a.on { color: var(--text); background: var(--panel-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line-2); display: grid; place-items: center; font-weight: 600; font-size: 13px; color: var(--blue); flex: none; }
.menu-btn { display: none; background: none; border: 0; padding: 6px; color: var(--text); cursor: pointer; }

.page { max-width: 1400px; margin: 0 auto; padding: 24px; }

/* filters */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 7px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); color: var(--muted); cursor: pointer; white-space: nowrap; }
.chip b { color: var(--text); font-weight: 500; }
.chip svg { opacity: 0.6; }
select.chip { appearance: none; -webkit-appearance: none; padding-right: 28px; color: var(--text); background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238b8f98' stroke-width='1.6'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E") no-repeat right 10px center; }
.range-select { display: none; }
.reset-btn { height: 34px; color: var(--accent); }
.reset-btn[hidden] { display: none; }

/* stat cards */
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { position: relative; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.stat .label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.stat .value { margin-top: 6px; font-size: 26px; font-weight: 650; letter-spacing: -0.4px; font-variant-numeric: tabular-nums; }
.stat .delta { margin-top: 2px; font-size: 12px; }
.up { color: var(--green); }
.down { color: var(--red); }
.stat .accent-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.help { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 10px; color: var(--muted); cursor: help; position: relative; }
.help:hover, .help.on { color: var(--text); border-color: var(--faint); }
/* one floating tooltip for every help mark, placed by script so no card clips it */
.tip { position: fixed; z-index: 80; max-width: min(260px, calc(100vw - 16px)); padding: 10px 12px; border-radius: 10px; background: #23262d; border: 1px solid var(--line-2); color: var(--text); font-size: 12.5px; line-height: 1.45; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); pointer-events: none; display: none; }
.tip.on { display: block; }

/* panels */
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.layout > *, .grid-2 > *, .side > * { min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.panel-body { padding: 16px 18px; }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 12px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.chart { width: 100%; height: 150px; display: block; }

/* tabs */
.tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 13px 12px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs .n { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--panel-2); font-size: 11.5px; color: var(--muted); }
.tabs button.on .n { background: var(--accent-soft); color: var(--accent); }

/* issue list */
.issues { width: 100%; border-collapse: collapse; table-layout: fixed; }
.issues .c-id { width: 88px; } .issues .c-status { width: 118px; } .issues .c-occ { width: 118px; } .issues .c-players { width: 92px; }
.issues .c-pct { width: 118px; } .issues .col-spark { width: 124px; } .issues .c-last { width: 104px; } .issues .col-builds { width: 132px; }
.issues th { position: sticky; top: 60px; z-index: 5; background: var(--panel); text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; }
.issues th.num, .issues td.num { text-align: right; }
.issues th .arrow { opacity: 0; margin-left: 4px; }
.issues th.sorted { color: var(--text); }
.issues th.sorted .arrow { opacity: 1; color: var(--accent); }
.issues td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.issues tbody tr { cursor: pointer; transition: background 0.12s; }
.issues tbody tr:hover { background: var(--panel-2); }
.issues tbody tr:last-child td { border-bottom: 0; }
.id { font: 12.5px var(--mono); color: var(--muted); white-space: nowrap; }
.title-cell { min-width: 0; overflow: hidden; }
.issue-type { font-weight: 600; }
.where { font: 12px var(--mono); color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.t1 { display: flex; align-items: center; gap: 9px; min-width: 0; }
.msg-main { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.t2 { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 3px 0 0 29px; font-size: 12px; color: var(--faint); overflow: hidden; white-space: nowrap; }
.t2 .issue-type { font-weight: 500; color: var(--muted); flex: none; }
.t2 .where { min-width: 0; flex: 0 1 auto; }
.t2 .sig, .t2 .crash-tag { margin-left: 0; flex: none; }
.kind-icon { flex: none; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; }
.k-error { color: var(--orange); background: rgba(230, 168, 115, 0.12); }
.k-crash { color: var(--red); background: rgba(242, 73, 92, 0.13); }
.k-freeze { color: var(--blue); background: rgba(138, 184, 255, 0.12); }
.k-memory { color: var(--purple); background: rgba(183, 166, 224, 0.13); }
.k-graphics { color: var(--grey); background: rgba(139, 143, 152, 0.14); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 550; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.open { color: var(--orange); background: rgba(230, 168, 115, 0.12); }
.pill.new { color: var(--blue); background: rgba(138, 184, 255, 0.12); }
.pill.regressed { color: var(--red); background: rgba(242, 73, 92, 0.13); }
.pill.resolved { color: var(--green); background: rgba(115, 191, 105, 0.12); }
.pill.muted { color: var(--grey); background: rgba(139, 143, 152, 0.12); }
.crash-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 600; color: var(--red); border: 1px solid rgba(242, 73, 92, 0.35); vertical-align: 1px; }
.spark { width: 96px; height: 26px; display: block; }
.bar-pct { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.bar-pct span.track { width: 46px; height: 5px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.bar-pct span.fill { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.builds { font: 12px var(--mono); color: var(--muted); white-space: nowrap; }
.list-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line); }
.pager { display: flex; gap: 6px; }
.pager button { min-width: 32px; height: 30px; border: 1px solid var(--line-2); background: var(--panel); border-radius: 8px; color: var(--muted); cursor: pointer; }
.pager button.on { color: var(--text); border-color: var(--accent); }

/* signals */
.sig { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 0 7px; height: 19px; border-radius: 6px; font-size: 11px; font-weight: 600; vertical-align: 1px; white-space: nowrap; cursor: help; }
.sig.fresh { color: var(--blue); background: rgba(138, 184, 255, 0.12); }
.sig.trending { color: var(--orange); background: rgba(230, 168, 115, 0.13); }
.sig.early { color: var(--purple); background: rgba(183, 166, 224, 0.13); }
.sig.repetitive { color: var(--grey); background: rgba(139, 143, 152, 0.14); }
.tag-link { cursor: pointer; border-radius: 6px; margin: -4px -6px; padding: 4px 6px; transition: background 0.12s; }
.tag-link:hover { background: var(--panel-2); }
.tag-link:hover .name { color: var(--blue); }
.sym { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; color: var(--green); background: rgba(115, 191, 105, 0.12); }
.sym.missing { color: var(--orange); background: rgba(230, 168, 115, 0.13); }
.stack .raw { color: var(--faint); text-decoration: line-through; text-decoration-color: rgba(139, 143, 152, 0.4); }
.radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; margin-bottom: 8px; }
.radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio input { margin-top: 3px; accent-color: var(--accent); }
.radio small { display: block; color: var(--muted); font-size: 12px; }
.radio .inline-num { width: 70px; height: 28px; margin: 0 4px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line-2); background: #121318; }
.release-card { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
.adoption { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; display: flex; }
.adoption span { height: 100%; }

/* reactions */
.reactions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.react { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel-2); cursor: pointer; font-size: 13px; }
.react span { font-size: 12px; color: var(--muted); }
.react.mine { border-color: rgba(224, 138, 126, 0.55); background: var(--accent-soft); }
.react.mine span { color: var(--accent); }
.react.add { color: var(--faint); font-size: 12px; }
.react-pick { display: none; position: fixed; z-index: 50; padding: 6px; gap: 2px; border-radius: 12px; background: #23262d; border: 1px solid var(--line-2); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); }
.react-pick.on { display: flex; }
.react-pick button { border: 0; background: none; font-size: 18px; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; }
.react-pick button:hover { background: var(--panel-2); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); cursor: pointer; font-weight: 500; white-space: nowrap; transition: border-color 0.15s, background 0.15s; }
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #16181d; }
.btn.primary:hover { background: #ea9b90; }
.btn.danger { color: var(--red); }
.btn.ghost { background: none; }
.btn.pin-on { color: var(--accent); border-color: rgba(224, 138, 126, 0.5); }
.btn:disabled { opacity: 0.5; cursor: default; }

/* detail */
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.issue-head { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.issue-head h1 { overflow-wrap: anywhere; margin: 6px 0 4px; font-size: 22px; line-height: 1.3; font-weight: 650; letter-spacing: -0.2px; }
.issue-head .msg { font: 13.5px var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.stack-col { display: grid; gap: 16px; min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }
.kpi { padding: 14px 18px; border-right: 1px solid var(--line); }
.kpi:last-child { border-right: 0; }
.kpi .label { color: var(--muted); font-size: 12px; }
.kpi .value { font-size: 19px; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--faint); }
.stack { margin: 0; padding: 12px 0; font: 12.5px/1.65 var(--mono); color: #c7c9cd; background: #121318; border-radius: 0 0 var(--radius) var(--radius); }
.stack .ln { display: grid; grid-template-columns: 44px minmax(0, 1fr); padding-right: 18px; }
.stack .no { color: #41454d; text-align: right; padding-right: 14px; user-select: none; }
.stack .tx { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.stack .app .tx { color: var(--text); }
.stack .lib .tx { color: var(--faint); }
.stack .first { background: rgba(224, 138, 126, 0.08); box-shadow: inset 2px 0 0 var(--accent); }
.stack .first .tx::after { content: "first game frame"; margin-left: 10px; padding: 0 6px; border-radius: 5px; font: 10.5px Inter, sans-serif; color: var(--accent); background: var(--accent-soft); white-space: nowrap; }
.stack .fold { display: block; margin: 1px 0 1px 44px; padding: 1px 8px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: 12px var(--mono); cursor: pointer; }
.stack .fold:hover { background: var(--panel-2); color: var(--text); }
.stack .loc { color: var(--blue); }
.seg-small button { padding: 3px 10px; font-size: 12.5px; }
.stack-head { justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
.stack-head h3 { margin-right: auto !important; }
.copy-btn { height: 30px; padding: 0 10px; gap: 6px; font-size: 12.5px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.share-list { display: grid; gap: 10px; }
.share-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 13px; }
.share-row .bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.share-row .bar span { display: block; height: 100%; border-radius: 3px; }
.share-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-row .pct { color: var(--muted); font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 56px 14px minmax(0, 1fr); gap: 10px; font-size: 13px; padding: 6px 0; }
.tl .t { color: var(--faint); font: 12px var(--mono); text-align: right; }
.tl .dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--line-2); justify-self: center; }
.tl.err .dot { background: var(--red); box-shadow: 0 0 0 3px rgba(242, 73, 92, 0.18); }
.tl.warn .dot { background: var(--orange); }
.tl .e { font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 8px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table a { color: var(--blue); }
.scroll-x { overflow-x: auto; }
.tag-row { cursor: pointer; }
.tag-row:hover td { background: var(--panel-2); }

/* side column */
.side { display: grid; gap: 16px; position: sticky; top: 76px; }
.resolve-box { padding: 16px 18px; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 12.5px; color: var(--muted); }
.input { height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: #121318; outline: none; width: 100%; }
.input:focus { border-color: var(--accent); }
textarea.input { height: 80px; padding: 10px 12px; resize: vertical; }
.thread { display: grid; gap: 14px; padding: 16px 18px; max-height: 520px; overflow-y: auto; }
.comment { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
.comment .avatar { width: 30px; height: 30px; font-size: 12px; }
.comment .who { font-size: 13px; font-weight: 600; }
.comment .who span { font-weight: 400; color: var(--faint); margin-left: 6px; font-size: 12px; }
.comment .body { line-height: 1.5; }
.comment .body { font-size: 13px; color: #c7c9cd; margin-top: 2px; }
.event-line { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.ev-icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; justify-self: center; border: 1px solid currentColor; }
.ev-report .ev-icon { color: var(--blue); background: rgba(138, 184, 255, 0.10); }
.ev-resolve .ev-icon { color: var(--green); background: rgba(115, 191, 105, 0.10); }
.ev-regress .ev-icon { color: var(--red); background: rgba(242, 73, 92, 0.10); }
.ev-text { line-height: 1.45; }
.ev-text b { color: var(--text); font-weight: 600; }
.ev-time { display: block; font-size: 12px; color: var(--faint); }
.compose { padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.compose .row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }

/* admin */
.role { padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: #121318; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at top, rgba(224, 138, 126, 0.10), transparent 60%), var(--bg); }
.login-card { width: 100%; max-width: 380px; padding: 32px 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35); }
.login-card h1 { margin: 18px 0 4px; font-size: 20px; }

/* dialog */
.dialog-back { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); display: none; place-items: center; z-index: 50; padding: 16px; }
.dialog-back.on { display: grid; }
.dialog { width: 100%; max-width: 420px; padding: 22px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5); }
.dialog h3 { margin: 0 0 4px; font-size: 16px; }

/* menus */
.drop { position: relative; }
.pop { display: none; position: absolute; top: calc(100% + 8px); left: 0; min-width: 220px; padding: 6px; border-radius: 12px; background: #23262d; border: 1px solid var(--line-2); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); z-index: 40; }
.pop.on { display: block; }
.pop-right { left: auto; right: 0; }
.pop button, .pop a { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); text-align: left; cursor: pointer; font-size: 13.5px; }
.pop button:hover, .pop a:hover, .pop .sel { background: var(--panel-2); }
.pop small { color: var(--faint); font-size: 12px; margin-left: auto; }
.pop-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.pop-head b { display: block; font-weight: 600; }
.pop-head small { margin: 0; }
.search .pop { right: 0; min-width: 0; }
.search .pop a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; }
.search .pop .id { grid-row: span 2; align-self: center; }
.search .pop .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search .pop .w { font: 12px var(--mono); color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search .pop .none { padding: 10px; color: var(--muted); font-size: 13px; }
button.avatar { cursor: pointer; padding: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 10px; background: #23262d; border: 1px solid var(--line-2); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); z-index: 70; display: none; font-size: 13.5px; }
.toast.on { display: block; }
.toast.err { border-color: rgba(242, 73, 92, 0.5); color: #ffb3bb; }
.empty { padding: 40px 18px; text-align: center; color: var(--muted); }
.form-error { color: #ff8f9b; font-size: 13px; margin: -4px 0 12px; min-height: 0; }
.form-error:empty { display: none; }
.link-box { display: flex; gap: 8px; margin: 12px 0 16px; }
.link-box .input { font: 12.5px var(--mono); }
.ev-reopen .ev-icon, .ev-unmute .ev-icon { color: var(--orange); background: rgba(230, 168, 115, 0.10); }
.ev-mute .ev-icon { color: var(--grey); background: rgba(139, 143, 152, 0.10); }
.ev-note { display: block; color: #c7c9cd; margin-top: 2px; }
.comment .body code { font: 12px var(--mono); padding: 1px 5px; border-radius: 5px; background: #121318; border: 1px solid var(--line); }
.comment .body pre { margin: 6px 0; padding: 10px 12px; border-radius: 8px; background: #121318; border: 1px solid var(--line); font: 12px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.comment .body a { color: var(--blue); }
.comment .body a:hover { text-decoration: underline; }
.issue-sub a, .crumbs a:hover, .kv a { color: var(--blue); }
.tl.log .dot { background: var(--line-2); }
.upload-btn { height: 26px; padding: 0 9px; font-size: 12px; }
.skeleton { color: var(--faint); }

/* charts */
.chart-plot { position: relative; height: 150px; }
.chart-plot svg { width: 100%; height: 100%; display: block; }
.chart-y { position: absolute; left: 0; top: -3px; font: 11px var(--mono); color: var(--faint); pointer-events: none; }
.chart-x { position: relative; height: 16px; margin-top: 6px; font: 11px var(--mono); color: var(--faint); }
.chart-x span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.chart-x span.first { transform: none; }
.chart-x span.last { transform: translateX(-100%); }
.chart-col { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: rgba(255, 255, 255, 0.05); pointer-events: none; display: none; }
.chart-tip { position: absolute; top: 4px; z-index: 5; padding: 8px 10px; border-radius: 8px; background: #23262d; border: 1px solid var(--line-2); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); font-size: 12px; line-height: 1.55; white-space: nowrap; pointer-events: none; display: none; font-variant-numeric: tabular-nums; }
.chart-tip b { display: block; font-weight: 600; margin-bottom: 2px; }
.chart-tip i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.chart-tip span { color: var(--muted); }

/* issue header that stays while scrolling */
.sticky-head { position: fixed; top: 60px; left: 0; right: 0; z-index: 15; display: none; align-items: center; gap: 10px; padding: 8px 24px; background: rgba(14, 15, 19, 0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.sticky-head.on { display: flex; }
.sticky-head .st-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.sticky-head .actions { margin-left: auto; flex-wrap: nowrap; }
.sticky-head .btn { height: 32px; }

/* scope and walking the list */
.crumbs { flex-wrap: wrap; }
.crumb-nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.crumb-nav .btn { height: 28px; padding: 0 9px; font-size: 12.5px; gap: 4px; }
.crumb-nav .btn:disabled { opacity: 0.4; }
.scope-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 18px; font-size: 12.5px; color: var(--muted); }
.scope-row .chip { height: 30px; }
.scope-row .clear { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 0 4px; font-size: 12.5px; }
.keys { font-size: 12px; color: var(--faint); }
.keys kbd { font: 11px var(--mono); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 5px; margin: 0 2px; color: var(--muted); }
select.chip.set { border-color: rgba(224, 138, 126, 0.55); color: var(--accent); }
.dim { opacity: 0.5; transition: opacity 0.15s; pointer-events: none; }
.issues tbody tr.cursor { background: var(--panel-2); box-shadow: inset 2px 0 0 var(--accent); }

/* release notes */
.release-notes { padding: 6px 18px 16px; border-top: 1px solid var(--line); }
.release-notes .rn-h { margin: 12px 0 4px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.release-notes ul { margin: 0; padding-left: 18px; }
.release-notes li { margin: 3px 0; font-size: 13px; color: #c7c9cd; }
.release-notes li b { color: var(--text); font-weight: 600; }
.release-notes p { margin: 4px 0; font-size: 13px; color: #c7c9cd; }
.notes-btn { height: 24px; padding: 0 8px; margin-left: 8px; font-size: 11.5px; }
tr.notes-row td { white-space: normal; background: #121318; }
tr.notes-row .release-notes { border-top: 0; padding: 4px 4px 10px; }

/* pins */
.pins-head { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.pins { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 20px; }
.pin-card { display: grid; gap: 4px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); cursor: pointer; transition: border-color 0.12s; }
.pin-card:hover { border-color: var(--line-2); background: var(--panel-2); }
.pin-card .top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pin-card .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.pin-card .meta { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.pin-card .pin-btn { margin-left: auto; }
.pin-btn { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 6px; background: none; color: var(--faint); cursor: pointer; vertical-align: middle; }
.pin-btn:hover { color: var(--text); background: var(--line); }
.pin-btn.on { color: var(--accent); }
.cell-id .pin-btn { margin-left: 2px; opacity: 0; }
.issues tr:hover .pin-btn, .cell-id .pin-btn.on { opacity: 1; }

/* tablet */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .kpis, .release-card { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi:nth-child(3n) { border-right: 0; }
  .kpi:nth-child(-n + 3) { border-bottom: 1px solid var(--line); }
  .col-spark, .col-builds { display: none; }
}

@media (max-width: 1100px) {
  .range-seg { display: none; }
  .range-select { display: inline-flex; }
}

@media (max-width: 960px) {
  .topnav { display: none; }
  .topnav.open { display: flex !important; position: fixed; top: 60px; left: 0; right: 0; flex-direction: column; gap: 2px; margin: 0; padding: 8px 12px 12px; background: var(--panel); border-bottom: 1px solid var(--line); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
  .topnav.open a { padding: 10px 12px; }
  .menu-btn { display: block; }
  .c-last, .cell-last { display: none; }
  .data-table td { white-space: normal; }
  .hide-tab { display: none; }
}

/* phone */
@media (max-width: 720px) {
  .topbar { padding: 0 16px; gap: 10px; }
  .brand span:last-child, .topnav { display: none; }
  .menu-btn { display: block; }
  .search kbd { display: none; }
  .page { padding: 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px; }
  .stat .value { font-size: 22px; }
  .filters { gap: 6px; }
  .chip { height: 32px; padding: 0 10px; font-size: 13px; }
  .tabs { padding: 0 4px; overflow: visible; }
  .tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 10px 2px; font-size: 12.5px; min-width: 0; }
  .tabs .n { margin: 4px 0 0; }
  .issues thead { display: none; }
  .issues, .issues tbody, .issues tr, .issues td { display: block; width: 100%; }
  .issues tbody tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .issues td { padding: 0; border: 0; }
  .issues td.cell-id { grid-column: 1; }
  .cell-id .pin-btn { opacity: 1; }
  .issues td.cell-status { grid-column: 3; grid-row: 1; justify-self: end; }
  .issues td.title-cell { grid-column: 1 / -1; max-width: none; }
  .issues td.num { text-align: left; grid-column: auto; font-size: 12.5px; color: var(--muted); }
  .issues td.num[data-label]::before { content: attr(data-label) " "; color: var(--faint); }
  .issues td.cell-occ { grid-column: 1 / 2; }
  .issues td.cell-players { grid-column: 2 / 3; }
  .issues td.cell-pct { grid-column: 3 / 4; justify-self: end; }
  .issues td.cell-last { display: none; }
  .bar-pct span.track { display: none; }
  .issue-head { flex-direction: column; align-items: stretch; }
  .sticky-head { padding: 8px 16px; }
  .sticky-head .lbl, .sticky-head .st-title { display: none; }
  .sticky-head .btn { padding: 0 9px; }
  .t2 { margin-left: 0; }
  .keys { display: none; }
  .accounts thead { display: none; }
  .accounts, .accounts tbody, .accounts tr, .accounts td { display: block; }
  .accounts tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .accounts tr:last-child { border-bottom: 0; }
  .accounts td { padding: 0; border: 0; white-space: normal; }
  .accounts td.hide-phone { display: block; grid-column: 1 / -1; order: 2; font-size: 12.5px; }
  .accounts td.acc-actions { grid-column: 1 / -1; text-align: left !important; order: 3; }
  .actions { justify-content: flex-start; }
  .kpis, .release-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .kpi:nth-child(2n) { border-right: 0; }
  .kpi:nth-child(3n) { border-right: 1px solid var(--line); }
  .kpi:nth-child(2n) { border-right: 0; }
  .kpi:nth-last-child(-n + 2) { border-bottom: 0; }
  .grid-2, .side { grid-template-columns: minmax(0, 1fr); }
  .hide-phone { display: none; }
  .data-table th, .data-table td { padding-left: 10px; padding-right: 10px; }
}
