:root {
  color-scheme: dark;
  --bg: #171715;
  --panel: rgba(105, 98, 94, .38);
  --panel2: rgba(54, 50, 48, .56);
  --border: rgba(255, 250, 242, .13);
  --text: #fbfaf6;
  --muted: #c1bbb4;
  --cyan: #e7f6ad;
  --blue: #d7efb0;
  --violet: #c6b7ad;
  --pink: #ff9a62;
  --mint: #b9edc5;
  --yellow: #f3d848;
  --orange: #ff8a55;
  --red: #ff765f;
  --shadow: 0 24px 70px rgba(8, 7, 6, .24), inset 0 1px 0 rgba(255, 255, 255, .08);
}
html { background: var(--bg); }
body {
  background: radial-gradient(circle at 50% -10%, rgba(112, 74, 56, .30), transparent 36%), linear-gradient(145deg, #171715 0%, #1c1b19 56%, #141413 100%);
  background-attachment: fixed;
  padding: 18px;
}
.aurora::before, .aurora::after { opacity: .17; filter: blur(110px); }
.aurora::before { left: 22vw; top: -12vh; background: #e17643; }
.aurora::after { right: -10vw; top: 45vh; background: #6d574e; }
.glass {
  background: linear-gradient(145deg, rgba(113, 105, 101, .40), rgba(65, 60, 58, .37));
  border-color: var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(112%);
  -webkit-backdrop-filter: blur(28px) saturate(112%);
}
.topbar {
  position: fixed;
  inset: 18px auto 18px 18px;
  z-index: 30;
  width: 88px;
  min-height: 0;
  margin: 0;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 25px;
  background: rgba(16, 16, 15, .91);
  border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.brand { display: block; }
.brand > span:last-child { display: none; }
.brand-mark.small { width: 52px; height: 52px; border-radius: 17px; background: #f6f3eb; color: #171715; box-shadow: none; letter-spacing: -.06em; }
.topbar nav { width: 100%; margin: 44px 0 auto; padding: 0; display: flex; flex-direction: column; gap: 10px; background: transparent; border: 0; }
.nav-button { width: 100%; min-height: 58px; padding: 8px 4px; display: grid; place-items: center; gap: 2px; color: #97928d; border: 1px solid transparent; border-radius: 16px; font-size: 8px; letter-spacing: .02em; text-transform: none; }
.nav-button span { font-size: 21px; line-height: 1; }
.nav-button:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-button.active { color: #fff; background: rgba(255, 255, 255, .10); border-color: rgba(255,255,255,.13); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.topbar > .icon-button { flex: 0 0 auto; background: transparent; border-color: transparent; color: #aaa49e; }
main {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 36px);
  margin-left: 100px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 31px;
  background: radial-gradient(circle at 43% 1%, rgba(191, 118, 80, .34), transparent 27%), radial-gradient(circle at 88% 20%, rgba(122, 104, 91, .25), transparent 29%), linear-gradient(145deg, rgba(58, 54, 53, .96), rgba(38, 36, 35, .98));
  box-shadow: 0 34px 90px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.08);
}
main::before { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; top: -260px; left: 30%; border-radius: 50%; background: rgba(239, 113, 53, .20); filter: blur(90px); pointer-events: none; }
.workspace-header { min-height: 104px; margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.workspace-copy .eyebrow { margin: 0 0 5px; color: #e7f6ad; }
.workspace-copy h1 { margin: 0; font-size: clamp(30px, 3vw, 46px); line-height: 1; letter-spacing: -.055em; }
.workspace-copy > p:last-child { margin: 10px 0 0; color: #bbb4ad; }
.header-actions { gap: 10px; }
.account-picker, .segmented, .metric-menu-button { background: rgba(24, 23, 22, .55); border-color: rgba(255, 250, 242, .13); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.account-picker { padding: 9px 13px; border-radius: 14px; }
.account-picker span { color: #aaa39c; }
.account-picker select { color: #fff; }
.account-picker select option { color: #171715; background: #f4f0e9; }
.ghost, .text-button, .icon-button { background: rgba(24, 23, 22, .52); border-color: rgba(255, 250, 242, .13); border-radius: 13px; }
.ghost:hover, .text-button:hover, .icon-button:hover { color: #f3d848; border-color: rgba(243, 216, 72, .45); background: rgba(243, 216, 72, .08); transform: translateY(-1px); }
.activity-banner { position: relative; min-height: 160px; margin: 0 0 18px; padding: 24px 28px; overflow: hidden; border-radius: 26px; background: linear-gradient(100deg, rgba(57, 50, 47, .90) 0%, rgba(126, 82, 63, .72) 48%, rgba(91, 75, 66, .55) 100%); }
.activity-banner::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 63% 38%, rgba(255, 143, 78, .46), transparent 29%); pointer-events: none; }
.activity-banner::after { content: ""; position: absolute; right: 14%; bottom: -52%; width: 230px; height: 230px; background-image: var(--activity-art); background-position: center; background-size: contain; background-repeat: no-repeat; opacity: .78; filter: drop-shadow(0 24px 24px rgba(20,10,5,.28)); pointer-events: none; }
.activity-banner > * { position: relative; z-index: 1; }
.activity-banner > div:nth-of-type(2) { max-width: 48%; }
.activity-banner strong { font-size: clamp(22px, 2.2vw, 34px); letter-spacing: -.035em; }
.activity-banner small { color: #e7f6ad; }
.activity-banner .ghost { background: rgba(18, 17, 16, .72); }
.activity-icon { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); color: #f3d848; }
.pulse { background: #f3d848; box-shadow: 0 0 0 7px rgba(243,216,72,.10), 0 0 20px rgba(243,216,72,.7); }
.dashboard-grid { gap: 16px; }
.column { gap: 16px; }
.card, .trend-panel, .page-header, .dex-tools, .region-head { border-color: rgba(255, 250, 242, .12); }
.card { border-radius: 24px; padding: 22px; }
.card:hover, .trend-panel:hover { border-color: rgba(255, 250, 242, .23); box-shadow: 0 27px 70px rgba(10,8,7,.26), inset 0 1px 0 rgba(255,255,255,.11); }
.card-heading { color: #d3ccc5; }
.subheading, .catch-row span, .chart-title > span { color: #a9a29b; }
.avatar { color: #171715; background: linear-gradient(145deg, #f3d848, #ff9a62); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 15px 28px rgba(31,21,15,.2); }
.level-pill { color: #f3d848; background: rgba(243,216,72,.09); border-color: rgba(243,216,72,.27); }
.hero-stat, .stat-grid > div, .rate-grid > div, .catch-row, .reset-callout { background: rgba(25, 23, 22, .42); border: 1px solid rgba(255,250,242,.08); }
.hero-stat strong { color: #ff9a62; }
.hero-stat small, .stat-grid small, .rate-grid small, .reset-callout small, .dex-total small { color: #aaa39c; }
.limit-icon { background: rgba(25,23,22,.58); border: 1px solid rgba(255,250,242,.08); }
.progress { background: rgba(20,18,17,.62); }
.progress span { background: linear-gradient(90deg, #ff8a55, #f3d848); box-shadow: 0 0 12px rgba(243,216,72,.20); }
.limit-row:nth-child(2n) .progress span { background: linear-gradient(90deg, #b9edc5, #e7f6ad); }
.reset-callout > span { color: #f3d848; }
.segmented button.active { color: #171715; background: #f4f0e9; box-shadow: none; }
.trend-card { overflow: visible; }
.metric-menu { position: relative; z-index: 12; }
.metric-menu-button { min-width: 190px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 9px 12px; border: 1px solid rgba(255,250,242,.13); border-radius: 14px; color: #fff; cursor: pointer; }
.metric-menu-button span { display: flex; align-items: center; gap: 10px; }
.metric-menu-button small { color: #aaa39c; font-size: 9px; letter-spacing: .12em; }
.metric-menu-button strong { font-size: 12px; }
.metric-menu-button i { font-style: normal; font-size: 18px; transition: transform .18s ease; }
.metric-menu-button[aria-expanded="true"] i { transform: rotate(180deg); }
.metric-menu-list { position: absolute; right: 0; top: calc(100% + 8px); width: 220px; padding: 7px; border-radius: 16px; background: rgba(39, 36, 34, .96); z-index: 30; }
.metric-menu-list button { width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; text-align: left; color: #d8d1ca; cursor: pointer; }
.metric-menu-list button:hover, .metric-menu-list button[aria-selected="true"] { background: rgba(243,216,72,.11); color: #f3d848; }
.chart { position: relative; border-radius: 16px; background: linear-gradient(180deg, rgba(255,255,255,.018), rgba(20,18,17,.08)); cursor: crosshair; }
.chart-grid { stroke: rgba(255,250,242,.11); }
.chart-line { filter: drop-shadow(0 0 5px color-mix(in srgb,var(--chart) 24%,transparent)); }
.chart-crosshair { position: absolute; top: 4%; bottom: 4%; width: 1px; background: rgba(255,250,242,.48); opacity: 0; pointer-events: none; }
.chart-hover-dot { position: absolute; width: 11px; height: 11px; border: 3px solid #fff; border-radius: 50%; background: var(--chart, #f3d848); box-shadow: 0 0 0 5px rgba(255,255,255,.10), 0 4px 14px rgba(0,0,0,.28); transform: translate(-50%, -50%); opacity: 0; pointer-events: none; }
.chart-tooltip { position: absolute; top: 8px; min-width: 150px; padding: 10px 12px; border: 1px solid rgba(255,250,242,.18); border-radius: 13px; background: rgba(27,25,24,.93); box-shadow: 0 14px 38px rgba(0,0,0,.30); backdrop-filter: blur(18px); transform: translateX(-50%) translateY(-5px); opacity: 0; pointer-events: none; transition: opacity .12s ease, transform .12s ease; z-index: 8; }
.chart-tooltip small, .chart-tooltip span { display: block; color: #b8b1aa; font-size: 9px; }
.chart-tooltip strong { display: block; margin: 2px 0; color: #fff; font-size: 15px; }
.chart.inspecting .chart-crosshair, .chart.inspecting .chart-hover-dot { opacity: 1; }
.chart.inspecting .chart-tooltip { opacity: 1; transform: translateX(-50%) translateY(0); }
.catch-row img { background: radial-gradient(circle, rgba(255,154,98,.14), transparent 68%); }
.dex-total strong, .freshness { color: #e7f6ad; }
.dex-tools input { background: rgba(24,23,22,.55); border-color: rgba(255,250,242,.13); }
.dex-tools input:focus { border-color: #f3d848; box-shadow: 0 0 0 3px rgba(243,216,72,.08); }
.trait-row button { background: rgba(24,23,22,.50); border-color: rgba(255,250,242,.13); }
.trait-row button.active { color: #171715; background: #e7f6ad; border-color: #e7f6ad; }
.dex-card { background: linear-gradient(150deg, rgba(91,84,80,.48), rgba(45,41,39,.56)); border-color: rgba(255,250,242,.13); }
.dex-card:hover { background: linear-gradient(150deg, rgba(118,106,99,.58), rgba(61,54,51,.62)); border-color: rgba(243,216,72,.34); box-shadow: 0 18px 42px rgba(12,9,7,.22); }
.dialog { background: linear-gradient(145deg, rgba(77,70,66,.98), rgba(38,35,33,.98)); border-color: rgba(255,250,242,.16); }
.toast { background: rgba(38,35,33,.96); border-color: rgba(255,250,242,.16); }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px rgba(243,216,72,0), 0 0 25px rgba(243,216,72,.4); } }
@media (max-width: 1180px) {
  main { padding: 22px; }
  .activity-banner::after { right: 8%; }
}
@media (max-width: 760px) {
  body { padding: 0 0 76px; }
  .topbar { inset: auto 10px 10px 10px; width: auto; height: 62px; padding: 7px 10px; display: grid; grid-template-columns: 44px 1fr 38px; border-radius: 19px; }
  .brand-mark.small { width: 42px; height: 42px; border-radius: 13px; }
  .topbar nav { width: auto; margin: 0; flex-direction: row; justify-content: center; gap: 4px; }
  .nav-button { min-height: 44px; width: 58px; padding: 4px; border-radius: 12px; font-size: 7px; }
  .nav-button span { font-size: 17px; }
  main { min-height: 100vh; margin-left: 0; padding: 18px 14px 24px; border: 0; border-radius: 0; }
  .workspace-header { align-items: flex-start; flex-direction: column; min-height: 0; margin-bottom: 18px; }
  .workspace-copy h1 { font-size: 34px; }
  .header-actions { width: 100%; justify-content: space-between; }
  .account-picker { flex: 1; }
  .activity-banner { min-height: 180px; grid-template-columns: auto 1fr; padding: 20px; }
  .activity-banner::after { right: -10px; bottom: -28%; width: 170px; height: 170px; opacity: .52; }
  .activity-banner > div:nth-of-type(2) { max-width: 70%; }
  .activity-banner .ghost { grid-column: 1 / -1; width: max-content; }
  .metric-menu-button { min-width: 160px; }
  .metric-menu-list { width: 200px; }
  .chart-tooltip { min-width: 130px; }
}
