/* Signals desk: filters, list, stats, marker popover, notification centre, shortcut editor */
.tb-btn { position: relative; }
#alert-btn.has-unread::after { content: ""; position: absolute; top: 5px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 2px #0a0c11; }

/* side panel */
.sg-nav { display: inline-flex; gap: 4px; }
.sg-nav button, .sg-seg button {
  height: 22px; min-width: 24px; padding: 0 7px; border-radius: 6px; border: 1px solid var(--line-2); background: none;
  color: var(--muted); font-size: 11px; letter-spacing: 0; text-transform: none;
}
.sg-nav button:hover, .sg-seg button:hover { color: var(--text); background: var(--bg-3); }
.sg-seg { display: inline-flex; gap: 3px; }
.sg-seg button.on { color: var(--accent); border-color: rgba(52, 211, 153, .45); background: rgba(52, 211, 153, .1); }
.sg-filters { padding: 2px 12px 8px; display: flex; flex-direction: column; gap: 6px; }
.sg-line { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.sg-chip { height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: none; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.sg-chip.on { color: var(--accent); border-color: rgba(52, 211, 153, .45); background: rgba(52, 211, 153, .1); }
.sg-chip:hover { color: var(--text); }
#sg-days { height: 26px; margin-left: auto; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 0 6px; font-size: 11.5px; }
.sig-row.cur { background: rgba(52, 211, 153, .08); }
.st-row { display: grid; grid-template-columns: 1.4fr .8fr .8fr .8fr 1fr; gap: 4px; padding: 6px 14px; font-size: 12px; font-variant-numeric: tabular-nums; align-items: center; border-bottom: 1px solid var(--line); }
.st-row span { text-align: right; }
.st-row.st-h { color: var(--faint); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }

/* marker popover */
#sig-pop {
  position: fixed; z-index: 90; width: 250px; padding: 10px 12px 10px; border-radius: 14px;
  background: rgba(20, 25, 34, .97); border: 1px solid var(--line-2); box-shadow: 0 18px 50px rgba(0, 0, 0, .6); backdrop-filter: blur(10px);
}
.sp-h { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.sp-h b { font-size: 13.5px; flex: 1; }
.sp-x { width: 26px; height: 26px; border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; border-radius: 8px; }
.sp-x:hover { background: var(--bg-4); color: var(--text); }
.sp-row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 12px; color: var(--muted); }
.sp-row b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.sp-row b.up { color: var(--good); } .sp-row b.down { color: var(--bad); }
.sp-act { display: flex; gap: 6px; margin-top: 8px; }
.sp-act .btn { flex: 1; height: 30px; font-size: 12px; }

/* notification centre */
#obj-tree {
  position: fixed; z-index: 80; width: 250px; max-height: min(60vh, 480px); display: flex; flex-direction: column;
  background: rgba(16, 20, 28, .98); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 18px 48px rgba(0, 0, 0, .6); overflow: hidden;
}
.obj-h { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 8px; font-size: 12px; }
.obj-h button { height: 24px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line-2); background: none; color: var(--muted); font-size: 11px; }
.obj-list { overflow: auto; }
.obj-list button { display: flex; gap: 8px; align-items: center; width: 100%; text-align: left; padding: 8px 12px; background: none; border: 0; border-top: 1px solid var(--line); color: var(--text); font-size: 12.5px; }
.obj-list button:hover { background: var(--bg-3); }
.obj-list i { color: var(--accent, #22d3ee); font-style: normal; width: 12px; }
.obj-empty { padding: 14px 12px; color: var(--muted); font-size: 12px; }
#nc {
  position: fixed; z-index: 85; top: 52px; right: 12px; width: 370px; max-height: min(72vh, 620px); display: flex; flex-direction: column;
  background: rgba(16, 20, 28, .98); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .65); overflow: hidden;
}
.nc-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; }
.nc-h span { display: inline-flex; gap: 4px; }
.nc-h button { height: 26px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--line-2); background: none; color: var(--muted); font-size: 11.5px; }
.nc-h button:hover, .nc-h button.on { color: var(--text); background: var(--bg-3); }
.nc-list { overflow: auto; overscroll-behavior: contain; }
.nc-item { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; padding: 9px 14px; background: none; border: 0; border-top: 1px solid var(--line); }
.nc-item:hover { background: var(--bg-3); }
.nc-item b { font-size: 12.5px; font-weight: 600; }
.nc-item span { color: var(--muted); font-size: 11.5px; }
.nc-item small { color: var(--faint); font-size: 10.5px; }
.nc-item.unread b::before { content: "● "; color: var(--amber); font-size: 9px; }
.nc-set { padding: 4px 14px 12px; border-top: 1px solid var(--line-2); overflow: auto; }
.nc-chk { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12.5px; }
.nc-chk input { width: 18px; height: 18px; accent-color: var(--accent); }
.nc-hook { display: flex; gap: 6px; margin-top: 6px; }
.nc-hook input { flex: 1; min-width: 0; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 9px; }
.nc-note { display: block; margin-top: 5px; color: var(--faint); font-size: 10.5px; line-height: 1.4; }
.nc-foot { margin-top: 10px; }

/* shortcut editor */
.kb-sheet { padding-bottom: 6px; }
.kb-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 13px; }
.kb-key { min-width: 84px; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.kb-key:hover { background: var(--bg-3); }
.kb-key.custom { border-color: rgba(251, 191, 36, .5); }
.kb-key.cap { border-color: var(--accent); color: var(--accent); }
.kb-row kbd { color: var(--muted); font-size: 12px; }
.kb-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; color: var(--faint); font-size: 11.5px; }

@media (max-width: 720px) {
  #nc { left: 8px; right: 8px; width: auto; top: calc(56px + env(safe-area-inset-top, 0px)); max-height: 70dvh; }
  #sig-pop { width: min(300px, calc(100vw - 16px)); }
  .sg-chip { height: 32px; padding: 0 12px; }
  .sg-nav button, .sg-seg button { height: 30px; min-width: 32px; }
  .nc-chk input { width: 22px; height: 22px; }
  .kb-key { height: 36px; }
}

.sig-row.focus { background: rgba(52, 211, 153, .14); box-shadow: inset 0 0 0 1px rgba(52, 211, 153, .35); }
.sg-focus { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 12px 6px; padding: 7px 10px; border-radius: 10px; background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .3); font-size: 12px; }
.sg-focus b { font-weight: 650; }
.sg-focus button { width: 24px; height: 24px; border: 0; border-radius: 7px; background: none; color: var(--muted); font-size: 16px; line-height: 1; }
.sg-focus button:hover { background: var(--bg-4); color: var(--text); }

/* signals grouped by bot */
.sg-bot { display: flex; align-items: center; gap: 7px; padding: 9px 14px 5px; cursor: pointer; user-select: none; border-top: 1px solid var(--line); }
.sg-bot:first-child { border-top: 0; }
.sg-bot b { font-size: 12.5px; letter-spacing: .01em; } .sg-chev { width: 10px; color: var(--muted); font-size: 10px; }
.sg-bm { margin-left: auto; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; } .sg-bm em { font-style: normal; margin-right: 6px; }
.sg-solo { height: 20px; padding: 0 7px; border: 1px solid var(--line-2); border-radius: 6px; background: none; color: var(--muted); font-size: 10px; }
.sg-solo:hover { color: var(--text); background: var(--bg-3); }
.sg-scope { width: 100%; } .sg-scope button { flex: 1; height: 28px; }
