/* bounty dashboard: motion + polish, layered over dashboard.css */
:root {
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --edge: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.025) 60%, rgba(255,255,255,.015));
  --edge-hi: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.04) 60%, rgba(255,255,255,.02));
}

/* smooth, even edges: a gradient border instead of a flat line */
.card { border: 1px solid transparent; background: linear-gradient(180deg, #121212, #0f0f0f) padding-box, var(--edge) border-box; transition: background .3s, transform .35s var(--ease), box-shadow .3s; }
.card.lift:hover { background: linear-gradient(180deg, #141414, #101010) padding-box, var(--edge-hi) border-box; transform: translateY(-2px); box-shadow: 0 14px 40px rgba(0,0,0,.35); }
.switcher, .seg, .tabs, .menu, .savebar, .toast, .input { border: 1px solid transparent !important; }
.switcher { background: linear-gradient(180deg, #171717, #121212) padding-box, var(--edge) border-box; }
.seg, .tabs { background: linear-gradient(180deg, #141414, #101010) padding-box, var(--edge) border-box; position: relative; }
.menu { background: linear-gradient(180deg, #161616, #121212) padding-box, var(--edge-hi) border-box; }
.savebar { background: linear-gradient(180deg, #1a1a1a, #141414) padding-box, var(--edge-hi) border-box; }
.toast { background: linear-gradient(180deg, #1a1a1a, #151515) padding-box, var(--edge-hi) border-box; }
.input { background-color: transparent; background-image: linear-gradient(#0d0d0d, #0d0d0d), var(--edge); background-origin: border-box; background-clip: padding-box, border-box; }
select.input { background-image: linear-gradient(45deg, transparent 50%, #777 50%), linear-gradient(135deg, #777 50%, transparent 50%), linear-gradient(#0d0d0d, #0d0d0d), var(--edge);
  background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px, 0 0, 0 0; background-size: 5px 5px, 5px 5px, auto, auto; background-repeat: no-repeat; background-clip: padding-box, padding-box, padding-box, border-box; background-origin: padding-box, padding-box, border-box, border-box; }
.input:focus { box-shadow: 0 0 0 4px rgba(255,255,255,.04); }
.btn { border: 1px solid transparent; background: linear-gradient(180deg, #f4f4f4, #dcdcdc); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 6px 18px rgba(0,0,0,.35); }
.btn:hover { background: linear-gradient(180deg, #fff, #e6e6e6); }
.btn.ghost { background: linear-gradient(180deg, #1c1c1c, #151515) padding-box, var(--edge) border-box; border: 1px solid transparent; box-shadow: none; }
.btn.ghost:hover { background: linear-gradient(180deg, #222, #181818) padding-box, var(--edge-hi) border-box; }
.btn.danger { background: rgba(248,113,113,.12); box-shadow: none; }
.page-head h1 .pi { border: 1px solid transparent; background: linear-gradient(180deg, #1d1d1d, #141414) padding-box, var(--edge-hi) border-box; }
.table .row { border: 1px solid transparent; background: linear-gradient(180deg, #151515, #121212) padding-box, var(--edge) border-box; }
.table .row:hover { background: linear-gradient(180deg, #181818, #141414) padding-box, var(--edge-hi) border-box; }
.toggle { transition: background .25s var(--ease); }
.toggle::after { transition: transform .35s var(--spring), background .2s; }

/* sliding active highlight in the sidebar */
.nav-groups { position: relative; }
.nav-indicator {
  position: absolute; left: 0; right: 0; top: 0; height: 36px; border-radius: 10px; pointer-events: none; z-index: 0; opacity: 0;
  background: linear-gradient(180deg, #202020, #191919) padding-box, var(--edge-hi) border-box; border: 1px solid transparent;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  transition: transform .45s var(--spring), height .3s var(--ease), opacity .2s;
}
.group a { position: relative; z-index: 1; }
.group a.on { background: transparent; box-shadow: none; }
.side-search { position: relative; margin-top: 12px; }
.side-search input { width: 100%; height: 36px; padding: 0 44px 0 34px; border-radius: 10px; font-size: 13px; outline: 0; border: 1px solid transparent; background: linear-gradient(#111, #111) padding-box, var(--edge) border-box; color: #ddd; }
.side-search > i { position: absolute; left: 12px; top: 11px; font-size: 12px; color: #666; }
.side-search kbd { position: absolute; right: 8px; top: 8px; font-family: var(--mono); font-size: 10px; color: #666; border: 1px solid #262626; border-radius: 6px; padding: 1px 6px; }
.group.hidden, .group a.hidden { display: none; }

/* sliding segment / tab highlight */
.seg .glider, .tabs .glider {
  position: absolute; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 8px; background: #262626; z-index: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 2px 8px rgba(0,0,0,.35);
  transition: transform .4s var(--spring), width .3s var(--ease);
}
.seg button, .tabs button { position: relative; z-index: 1; transition: color .2s; }
.seg button.on, .tabs button.on { background: transparent; }

/* page transitions: content rises in, children staggered */
@keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes riseUp { from { opacity: 0; transform: translateY(-14px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes leave { to { opacity: 0; transform: translateY(-6px); filter: blur(2px); } }
.content.leaving > * { animation: leave .16s var(--ease) forwards; }
.content.enter > *, .content.enter .stack > *, .content.enter .kpis > *, .content.enter .tables > *, .content.enter .stat-strip > * { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
.content.enter.from-above > *, .content.enter.from-above .stack > * { animation-name: riseUp; }
.tab-body.swap > * { animation: rise .42s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
.fade-in { animation: rise .45s var(--ease) both; }
.li.pop { animation: rise .4s var(--ease) both; }
.li.out { animation: leave .25s var(--ease) forwards; }

/* chart lines draw in */
.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.3s var(--ease) forwards .15s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.area-in { opacity: 0; animation: fadeArea 1s var(--ease) forwards .5s; }
@keyframes fadeArea { to { opacity: 1; } }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: #1b1b1b; color: #cfcfcf; border: 1px solid #262626; white-space: nowrap; }
.badge.good { background: rgba(74,222,128,.1); color: #86efac; border-color: rgba(74,222,128,.2); }
.badge.bad { background: rgba(248,113,113,.1); color: #fca5a5; border-color: rgba(248,113,113,.22); }
.badge.warn { background: rgba(250,204,21,.08); color: #fde68a; border-color: rgba(250,204,21,.2); }
.badge.info { background: rgba(146,200,210,.1); color: #bfe3ea; border-color: rgba(146,200,210,.22); }
.badge .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* stat strip */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 14px; }
.stat { padding: 18px 20px; }
.stat small { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 8px; }
.stat small i { color: #9a9a9a; }
.stat b { display: block; font-size: 24px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }

/* generic list rows */
.list { display: grid; gap: 7px; margin-top: 16px; }
.li { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 12px; border: 1px solid transparent; background: linear-gradient(180deg, #151515, #121212) padding-box, var(--edge) border-box; transition: background .2s; min-height: 52px; }
.li:hover { background: linear-gradient(180deg, #181818, #141414) padding-box, var(--edge-hi) border-box; }
.li .grow { flex: 1; min-width: 0; }
.li .grow b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .grow span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: linear-gradient(180deg, #1e1e1e, #161616); color: #d7d7d7; font-size: 14px; }
.li img.av, .li .av { width: 32px; height: 32px; border-radius: 50%; flex: none; background: #222; object-fit: cover; }
.li .actions { display: flex; gap: 6px; flex: none; align-items: center; }
.icon-btn { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #999; transition: background .15s, color .15s, transform .2s var(--spring); }
.icon-btn:hover { background: #1f1f1f; color: #fff; }
.icon-btn.danger:hover { background: rgba(248,113,113,.12); color: #fca5a5; }
.icon-btn:active { transform: scale(.88); }
.add-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.add-row .input { width: auto; flex: 1; min-width: 150px; }
.rank-n { width: 28px; text-align: center; font-weight: 700; color: #777; flex: none; }
.meter { flex: 1; height: 6px; border-radius: 9px; background: #1f1f1f; overflow: hidden; min-width: 60px; max-width: 220px; }
.meter i { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, #8d9699, #e3e8ea); width: 0; transition: width 1s var(--ease) .2s; }
.two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.cmd-mod h4 { font-size: 13px; color: var(--muted); font-weight: 600; margin: 20px 0 6px; display: flex; gap: 8px; align-items: center; }
.cmd-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 11px; transition: background .15s; }
.cmd-row:hover { background: #141414; }
.cmd-row code { font-family: var(--mono); font-size: 13px; color: #eee; min-width: 120px; }
.cmd-row span.d { color: var(--muted); font-size: 12.5px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-row.off code { color: #6f6f6f; text-decoration: line-through; }
.drawer-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 70; opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer-bg.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(440px, 100vw); z-index: 71; padding: 26px; overflow-y: auto; transform: translateX(100%); transition: transform .45s var(--ease);
  background: linear-gradient(180deg, #131313, #0e0e0e); border-left: 1px solid #222; }
.drawer.open { transform: none; }
.drawer h2 { font-size: 18px; }
.drawer p.sub { color: var(--muted); font-size: 13px; margin: 6px 0 10px; }
.drawer label.f { display: block; font-size: 13px; font-weight: 600; margin: 18px 0 8px; }
.drawer .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 26px; }
.empty-state { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty-state > i { font-size: 26px; color: #444; display: block; margin-bottom: 12px; }
.empty-state b { color: #ddd; display: block; margin-bottom: 4px; }
.filterbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.filterbar .input { width: 260px; }
@media (max-width: 980px) { .two { grid-template-columns: 1fr; } .filterbar .input { width: 100%; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

/* stagger: each section of a page arrives a beat after the one above */
.content.enter > :nth-child(2), .content .stack > :nth-child(2), .kpis > :nth-child(2), .stat-strip > :nth-child(2), .tables > :nth-child(2) { --i: 1; }
.content.enter > :nth-child(3), .content .stack > :nth-child(3), .kpis > :nth-child(3), .stat-strip > :nth-child(3), .tables > :nth-child(3) { --i: 2; }
.content.enter > :nth-child(4), .content .stack > :nth-child(4), .kpis > :nth-child(4), .stat-strip > :nth-child(4), .tables > :nth-child(4) { --i: 3; }
.content.enter > :nth-child(5), .content .stack > :nth-child(5), .kpis > :nth-child(5), .stat-strip > :nth-child(5), .tables > :nth-child(5) { --i: 4; }
.content.enter > :nth-child(6), .content .stack > :nth-child(6), .kpis > :nth-child(6), .stat-strip > :nth-child(6), .tables > :nth-child(6) { --i: 5; }
.content.enter > :nth-child(7), .content .stack > :nth-child(7), .kpis > :nth-child(7), .stat-strip > :nth-child(7), .tables > :nth-child(7) { --i: 6; }
.content.enter > :nth-child(8), .content .stack > :nth-child(8), .kpis > :nth-child(8), .stat-strip > :nth-child(8), .tables > :nth-child(8) { --i: 7; }
.content.enter > :nth-child(9), .content .stack > :nth-child(9), .kpis > :nth-child(9), .stat-strip > :nth-child(9), .tables > :nth-child(9) { --i: 8; }
.content.enter > :nth-child(10), .content .stack > :nth-child(10), .kpis > :nth-child(10), .stat-strip > :nth-child(10), .tables > :nth-child(10) { --i: 9; }
.content.enter > :nth-child(11), .content .stack > :nth-child(11), .kpis > :nth-child(11), .stat-strip > :nth-child(11), .tables > :nth-child(11) { --i: 10; }
.content.enter > :nth-child(12), .content .stack > :nth-child(12), .kpis > :nth-child(12), .stat-strip > :nth-child(12), .tables > :nth-child(12) { --i: 11; }
.tab-body.swap .li { animation: rise .42s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms); }

/* no change is not good news: keep it grey */
.delta.flat { color: var(--muted); }
