:root {
  --demo-h: 40px;
  --bg: #060915;
  --bg-2: #090d1f;
  --bg-3: #0d1228;
  --panel: #11172e;
  --panel-2: #141c37;
  --line: rgba(171, 184, 224, 0.16);
  --line-soft: rgba(171, 184, 224, 0.1);
  --text: #e6ebff;
  --muted: #9aa6cb;
  --muted-2: #7f8db8;
  --accent: #6f74c9;
  --accent-2: #5a5fad;
  --active: #aeb8dc;
  --danger: #cf6f83;
  --success: #70c8ac;
  --token-icon-size: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  font-size: 15px;
}

body {
  font-family: "Manrope", "Space Grotesk", sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 620px at 10% -5%, #182145 0%, #0b1126 42%, #060915 100%);
}

.demo-bar {
  height: var(--demo-h);
  display: grid;
  place-items: center;
  background: linear-gradient(90deg, #2f274a 0%, #3b2f58 50%, #2b2342 100%);
  color: #dfb2ff;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-bottom: 1px solid rgba(207, 156, 255, 0.3);
  box-shadow: inset 0 -1px 0 rgba(207, 156, 255, 0.14);
  transition: height 0.28s ease, opacity 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
  overflow: hidden;
}

.app-shell {
  display: grid;
  grid-template-columns: 272px 1fr;
  min-height: calc(100vh - var(--demo-h));
  transition: min-height 0.28s ease;
}

body.wallet-connected {
  --demo-h: 0px;
}

body.wallet-connected .demo-bar {
  opacity: 0;
  border-color: transparent;
  box-shadow: none;
}

.sidebar {
  background: linear-gradient(180deg, #0b1022 0%, #090d1b 100%);
  border-right: 1px solid var(--line-soft);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
  padding: 6px 8px;
}

.brand-wordmark {
  width: 218px;
  max-width: 100%;
  height: 56px;
  border-radius: 8px;
  background-image: url("./assets/brand/darksun-logo-450x150.webp");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: contain;
}

.brand-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.brand-with-wordmark .brand-title {
  display: none;
}

.side-nav {
  display: grid;
  gap: 4px;
}

.side-nav a,
.side-bottom a {
  text-decoration: none;
  color: var(--muted);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.98rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.side-nav a.active,
.side-nav a:hover,
.side-bottom a:hover {
  color: var(--active);
  border-color: rgba(171, 184, 224, 0.2);
  background: rgba(171, 184, 224, 0.07);
  font-weight: 700;
}

.side-bottom {
  margin-top: auto;
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
  display: grid;
  gap: 4px;
}

.main-area {
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 72px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(8, 12, 26, 0.78);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 120;
}

.menu-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #161d38;
  color: var(--text);
  width: 38px;
  height: 34px;
  display: none;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.lang-select {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #141b35;
  color: #d9e1ff;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  min-height: 38px;
}

.notify-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #141b35;
  color: #d9e1ff;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.notify-pill:hover {
  cursor: default;
  border-color: rgba(171, 184, 224, 0.34);
}

.settings-gear-btn {
  width: 38px;
  min-width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #141b35;
  color: #d9e1ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.settings-gear-btn:hover {
  cursor: pointer;
  border-color: rgba(171, 184, 224, 0.34);
}

.settings-gear-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.notify-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.notify-chevron,
.network-chevron {
  display: inline-block;
  color: #c9d3f8;
  font-size: 0.78rem;
  line-height: 1;
  transition: transform 0.18s ease;
}

#walletMenuTrigger[aria-expanded="true"] .network-chevron {
  transform: rotate(180deg);
}

.btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 14px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: #e9edff;
}

.hidden {
  display: none !important;
}

.btn-solid {
  background: linear-gradient(180deg, #6469bd 0%, #575da8 100%);
  border-color: rgba(182, 192, 234, 0.2);
}

.btn-ghost {
  background: rgba(138, 149, 199, 0.12);
  border-color: rgba(138, 149, 199, 0.28);
  color: #d9e0ff;
}

.network-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #141b35;
  color: #d9e1ff;
  padding: 9px 13px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.92rem;
  font-weight: 600;
}

.wallet-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  max-height: 72vh;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #0f1530 0%, #0b1229 100%);
  box-shadow: 0 20px 45px rgba(2, 5, 16, 0.62);
  z-index: 220;
  padding: 12px;
}

.wallet-menu.open {
  display: block !important;
}

.wallet-menu-head {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

.wallet-menu-list {
  display: grid;
  gap: 8px;
}

.wallet-menu-item {
  width: 100%;
  background: #141c38;
  border: 1px solid rgba(171, 184, 224, 0.2);
  border-radius: 10px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px;
}

.wallet-menu-item-select {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: 0;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 6px;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}

.wallet-menu-item-remove {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(171, 184, 224, 0.22);
  background: rgba(171, 184, 224, 0.08);
  color: #e4ebff;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.wallet-menu-item-remove:hover {
  border-color: rgba(207, 111, 131, 0.42);
  background: rgba(207, 111, 131, 0.14);
  color: #f2c2d2;
}

.wallet-menu-item.active {
  border-color: rgba(214, 164, 255, 0.45);
  background: linear-gradient(180deg, #2a2048 0%, #1a1f43 100%);
}

.wallet-menu-item-main {
  display: grid;
  gap: 2px;
}

.wallet-menu-item-main strong {
  font-size: 0.94rem;
  font-weight: 700;
}

.wallet-menu-item-main span {
  font-size: 0.8rem;
  color: var(--muted);
}

.wallet-menu-item-badge {
  font-size: 0.74rem;
  color: #d9b5ff;
  border: 1px solid rgba(207, 156, 255, 0.45);
  border-radius: 999px;
  padding: 3px 8px;
}

.wallet-menu-item-badge.off {
  color: #aab7df;
  border-color: rgba(163, 177, 223, 0.35);
}

.wallet-menu-item-toggle {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(171, 184, 224, 0.22);
  background: rgba(171, 184, 224, 0.08);
  color: #aab8e6;
  font-family: inherit;
  font-size: 0.88rem;
  line-height: 1;
  cursor: pointer;
}

.wallet-menu-item-toggle.on {
  border-color: rgba(149, 215, 190, 0.45);
  background: rgba(111, 190, 160, 0.14);
  color: #9be3c8;
}

.wallet-menu-empty {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.wallet-menu-actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 8px;
}

.wallet-menu-action {
  background: rgba(138, 149, 199, 0.1);
  color: #d7dfff;
  border: 1px solid rgba(171, 184, 224, 0.23);
  border-radius: 9px;
  padding: 9px 10px;
  text-align: left;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.wallet-menu-action.danger {
  color: #efafc2;
  border-color: rgba(207, 111, 131, 0.35);
  background: rgba(207, 111, 131, 0.12);
}

.network-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fef4b3 0%, #d7b846 55%, #ad8d2b 100%);
}

.content {
  padding: 18px 22px 24px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.page-header {
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.page-header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
}

.page-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.page-actions {
  display: flex;
  gap: 8px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.kpi-card {
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 12px 14px;
}

.kpi-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.kpi-card strong {
  margin-top: 4px;
  display: block;
  font-size: 2.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.kpi-card small {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--muted-2);
}

.kpi-card small.neg {
  color: var(--danger);
  font-weight: 600;
}

.kpi-card small.neutral {
  color: var(--muted);
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.decision-grid,
.risk-grid,
.intel-grid,
.flow-grid {
  margin-top: 14px;
  display: grid;
  gap: 14px;
}

.dashboard-visual-grid,
.action-grid {
  margin-top: 14px;
  display: grid;
  gap: 14px;
}

.dashboard-visual-grid {
  grid-template-columns: 1.05fr 0.9fr 1.2fr;
}

.action-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.decision-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.risk-grid,
.flow-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.intel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.risk-grid .panel-card:first-child,
.flow-grid .panel-card:last-child {
  grid-column: 1 / -1;
}

.panel-card {
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 16px;
}

.panel-card header {
  margin-bottom: 14px;
}

.panel-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.signal-list,
.compact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.signal-list {
  display: grid;
  gap: 10px;
}

.signal-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #d8dff8;
}

.signal-list em {
  font-style: normal;
  font-size: 0.75rem;
  color: #f2d39d;
  border: 1px solid rgba(242, 211, 157, 0.35);
  background: rgba(242, 211, 157, 0.1);
  border-radius: 999px;
  padding: 2px 7px;
}

.state-good {
  color: #9fb2ff;
}

.state-warn {
  color: #cf9cff;
}

.state-bad {
  color: #ea8dad;
}

.signal-list.positive em {
  color: #97e9cb;
  border-color: rgba(151, 233, 203, 0.35);
  background: rgba(151, 233, 203, 0.1);
}

.signal-list em.state-good {
  color: #b9c7ff;
  border-color: rgba(159, 178, 255, 0.42);
  background: rgba(159, 178, 255, 0.12);
}

.signal-list em.state-warn {
  color: #dfb2ff;
  border-color: rgba(207, 156, 255, 0.4);
  background: rgba(207, 156, 255, 0.12);
}

.signal-list em.state-bad {
  color: #f3a3b6;
  border-color: rgba(243, 163, 182, 0.35);
  background: rgba(243, 163, 182, 0.1);
}

.compact-list {
  display: grid;
  gap: 10px;
}

.compact-list li {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #ccd6f6;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
}

.compact-list b {
  color: var(--text);
}

.risk-score-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 4px;
  gap: 10px;
}

.risk-score-row strong {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.risk-score-row span {
  font-size: 0.82rem;
  color: var(--muted);
}

.metric-bars {
  display: grid;
  gap: 10px;
}

.metric-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(122, 141, 214, 0.04);
}

.metric-bar span {
  font-size: 0.84rem;
  color: #c8d2f2;
}

.metric-bar b {
  font-size: 0.9rem;
  color: var(--text);
}

.metric-bar i {
  grid-column: 1 / -1;
  display: block;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6f9bff 0%, #8d73ff 45%, #4cd3c2 100%);
  width: var(--w);
}

.metric-bar.state-good i {
  background: linear-gradient(90deg, #7f96ff 0%, #9fb2ff 55%, #76b6ff 100%);
}

.metric-bar.state-warn i {
  background: linear-gradient(90deg, #a97dff 0%, #cf9cff 60%, #e0b2ff 100%);
}

.metric-bar.state-bad i {
  background: linear-gradient(90deg, #c96a87 0%, #ea8dad 100%);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.impact-grid article {
  padding: 10px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(122, 141, 214, 0.04);
}

.impact-grid article.state-good {
  border-color: rgba(159, 178, 255, 0.38);
  background: rgba(159, 178, 255, 0.1);
}

.impact-grid article.state-warn {
  border-color: rgba(207, 156, 255, 0.38);
  background: rgba(207, 156, 255, 0.1);
}

.impact-grid article.state-bad {
  border-color: rgba(234, 141, 173, 0.38);
  background: rgba(234, 141, 173, 0.1);
}

.policy-impact .impact-grid article.state-good {
  border-color: rgba(105, 214, 170, 0.42);
  background: rgba(72, 180, 141, 0.14);
}

.policy-impact .impact-grid article.state-good p {
  color: #9fdcc2;
}

.policy-impact .impact-grid article.state-good strong {
  color: #c8f6df;
}

.impact-grid p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.impact-grid strong {
  font-size: 0.98rem;
  font-weight: 700;
  color: #e6ecff;
}

.viz-donut {
  width: 166px;
  height: 166px;
  margin: 6px auto 12px;
  border-radius: 50%;
  background: conic-gradient(
    #6f9bff 0 52%,
    #8d73ff 52% 76%,
    #c96fda 76% 90%,
    #4cd3c2 90% 100%
  );
  position: relative;
}

.viz-donut::after {
  content: "";
  position: absolute;
  inset: 21px;
  border-radius: 50%;
  background: #121a33;
  border: 1px solid var(--line-soft);
}

.mini-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.mini-legend li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  color: #cbd5f5;
}

.mini-legend b {
  color: var(--text);
  font-weight: 700;
}

.swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 7px;
  vertical-align: middle;
}

.swatch.lunc {
  background: #6f9bff;
}

.swatch.cw20 {
  background: #8d73ff;
}

.swatch.nft {
  background: #c96fda;
}

.swatch.cash {
  background: #4cd3c2;
}

.risk-gauge-wrap {
  padding: 10px 0 0;
  text-align: center;
}

.risk-gauge {
  width: 150px;
  height: 78px;
  margin: 0 auto;
  border-top-left-radius: 150px;
  border-top-right-radius: 150px;
  overflow: hidden;
  background: conic-gradient(
    from 180deg,
    #4cd3c2 0deg 58deg,
    #7e8fff 58deg 126deg,
    #d67db0 126deg 180deg
  );
  position: relative;
}

.risk-gauge::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: -40px;
  height: 92px;
  border-radius: 92px;
  background: #131a34;
  border: 1px solid var(--line-soft);
}

.risk-gauge span {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  z-index: 1;
  font-size: 1.6rem;
  font-weight: 700;
  color: #eaf0ff;
}

.gauge-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.histo {
  height: 180px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  padding: 8px 6px 0;
}

.bar {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.bar i {
  width: 100%;
  height: var(--h);
  display: block;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #8ba1e6 0%, #5f74ba 100%);
  border: 1px solid rgba(203, 219, 255, 0.18);
}

.bar:nth-child(2) i {
  background: linear-gradient(180deg, #aa8eff 0%, #7358d5 100%);
}

.bar:nth-child(3) i {
  background: linear-gradient(180deg, #5ed8c8 0%, #37a79a 100%);
}

.bar:nth-child(4) i {
  background: linear-gradient(180deg, #da7faa 0%, #a75478 100%);
}

.bar span {
  font-size: 0.72rem;
  line-height: 1.2;
  text-align: center;
  color: var(--muted);
}

.action-card p {
  margin: 0 0 14px;
  font-size: 0.95rem;
  color: #c5cff1;
  line-height: 1.6;
}

.action-card strong {
  display: block;
  font-size: 0.84rem;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.action-card.buy strong {
  color: var(--success);
}

.action-card.hold strong {
  color: #b8c4eb;
}

.action-card.reduce strong {
  color: var(--danger);
}

.portfolio-panel {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 10px;
}

.chart-card,
.alloc-card,
.positions-panel,
.status-col,
.proposal-cats article,
.eco-row,
.eco-tags button,
.eco-search-row {
  background: linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 100%);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
}

.chart-card {
  padding: 14px;
  position: relative;
}

.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chart-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.chart-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.chart-range {
  display: inline-flex;
  gap: 4px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #131a3a;
}

.chart-range-btn {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #b9c4e9;
  padding: 6px 9px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}

.chart-range-btn:hover {
  cursor: pointer;
}

.chart-range-btn.active {
  background: #2a315f;
  color: #f2f5ff;
}

.portfolio-total {
  margin-top: 8px;
  font-size: 2.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.portfolio-delta {
  margin: 3px 0 10px;
  color: var(--danger);
  font-weight: 600;
  font-size: 0.88rem;
}

#portfolioChart {
  width: 100%;
  height: 246px;
}

.chart-tooltip {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, calc(-100% - 10px));
  pointer-events: none;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid rgba(146, 164, 221, 0.45);
  background: rgba(8, 12, 30, 0.94);
  color: #dde6ff;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  opacity: 0;
  transition: opacity 120ms ease;
  white-space: normal;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 140px;
  z-index: 5;
}

.chart-tooltip strong {
  font-size: 0.79rem;
  font-weight: 700;
  color: #e9f0ff;
  line-height: 1.2;
}

.chart-tooltip span {
  font-size: 0.69rem;
  color: #bac8ef;
  line-height: 1.2;
}

.chart-tooltip.visible {
  opacity: 1;
}

.alloc-card {
  padding: 13px;
}

.alloc-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.alloc-card h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
}

.alloc-card a {
  color: #bac5ee;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
}

.donut {
  width: 186px;
  height: 186px;
  margin: 14px auto 10px;
  border-radius: 50%;
  background: conic-gradient(
    #a7b6de 0 43.22%,
    #95a6d8 43.22% 64.34%,
    #7f90cb 64.34% 78.81%,
    #6c7bb9 78.81% 90.84%,
    #55639b 90.84% 100%
  );
  position: relative;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  background: #141b36;
  border: 1px solid var(--line-soft);
}

.alloc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.alloc-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #d2ddff;
  font-size: 0.88rem;
}

.alloc-list span {
  color: var(--muted);
}

.alloc-list strong {
  font-weight: 700;
}

.positions-panel {
  margin-top: 10px;
  padding: 10px;
}

.live-positions-panel {
  padding: 14px;
}

.positions-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.positions-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.positions-table-wrap {
  margin-top: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
}

.positions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.positions-table thead th {
  text-align: left;
  font-weight: 600;
  color: #ccd5f7;
  background: rgba(120, 136, 194, 0.08);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.positions-table tbody td {
  padding: 10px 12px;
  color: #d7e0ff;
  border-bottom: 1px solid var(--line-soft);
}

.positions-table tbody tr:last-child td {
  border-bottom: 0;
}

.positions-table .mono {
  font-variant-numeric: tabular-nums;
}

.token-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.token-icon-img,
.token-icon-fallback {
  width: var(--token-icon-size);
  height: var(--token-icon-size);
  border-radius: 50%;
  flex: 0 0 var(--token-icon-size);
}

.token-icon-img {
  object-fit: cover;
  border: 1px solid rgba(171, 184, 224, 0.28);
  background: #0b1129;
}

.token-icon-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: #dfe7ff;
  border: 1px solid rgba(171, 184, 224, 0.26);
}

.token-icon-fallback.native {
  background: linear-gradient(145deg, #2f5fd3 0%, #2ba5cc 100%);
}

.token-icon-fallback.non-native {
  background: linear-gradient(145deg, #7047cf 0%, #b25bd0 100%);
}

.positions-table .empty-row {
  text-align: center;
  color: var(--muted);
}

.positions-note {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.wallet-tokens-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(126, 143, 197, 0.08);
  color: #e7eeff;
  padding: 12px 14px;
}

.wallet-tokens-row:hover {
  cursor: pointer;
}

.wallet-tokens-title {
  display: grid;
  gap: 2px;
  text-align: left;
}

.wallet-tokens-title strong {
  font-size: 1.04rem;
  font-weight: 700;
}

.wallet-tokens-title span {
  font-size: 0.82rem;
  color: var(--muted);
}

.wallet-tokens-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.wallet-tokens-right b {
  font-size: 1.05rem;
}

.wallet-chevron {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(171, 184, 224, 0.22);
  background: rgba(149, 167, 228, 0.08);
  transition: transform 0.2s ease;
}

.wallet-tokens-row[aria-expanded="false"] .wallet-chevron {
  transform: rotate(-90deg);
}

.wallet-tokens-content {
  margin-top: 10px;
}

.wallet-tokens-content.collapsed {
  display: none;
}

.positions-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.toggle-pill {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #151d3f;
  color: #ced7f7;
  padding: 7px 10px;
  font-size: 0.92rem;
  font-weight: 600;
}

.view-toggle {
  display: inline-flex;
  background: #111736;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 2px;
}

.view-toggle button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #a9b4d8;
  padding: 7px 11px;
  font-size: 0.92rem;
  font-weight: 500;
}

.view-toggle .active {
  background: #2a315f;
  color: #f2f5ff;
  font-weight: 700;
}

.position-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, #171e3f 0%, #121833 100%);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}

.position-row strong {
  font-size: 1rem;
  font-weight: 600;
}

.position-row span {
  color: var(--muted-2);
  display: block;
  margin-top: 1px;
  font-size: 0.84rem;
}

.position-row b {
  font-size: 1.04rem;
  font-weight: 700;
}

.portfolio-group {
  margin-bottom: 8px;
}

.portfolio-group-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: linear-gradient(180deg, #171e3f 0%, #121833 100%);
  color: #e6ecff;
  padding: 12px 14px;
}

.portfolio-group-toggle:hover {
  cursor: pointer;
}

.portfolio-group-toggle > div:first-child {
  display: grid;
  gap: 2px;
  text-align: left;
}

.portfolio-group-toggle strong {
  font-size: 1rem;
  font-weight: 600;
}

.portfolio-group-toggle span {
  color: var(--muted);
  font-size: 0.82rem;
}

.portfolio-group-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.portfolio-group-right b {
  font-size: 1.03rem;
}

.portfolio-group-content {
  margin-top: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(126, 143, 197, 0.06);
  padding: 10px 12px;
}

.portfolio-group-content p {
  margin: 0;
  color: #b8c4ea;
  font-size: 0.85rem;
  line-height: 1.5;
}

#stakingDetails {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.staking-block h4 {
  margin: 0 0 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #dbe4ff;
}

.staking-table-wrap {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow: hidden;
}

.staking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.staking-table th,
.staking-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
}

.staking-table th {
  color: #c8d3f7;
  background: rgba(120, 136, 194, 0.09);
  font-weight: 600;
}

.staking-table td {
  color: #d7e0ff;
}

.staking-table tbody tr:last-child td {
  border-bottom: 0;
}

.portfolio-group-content.collapsed {
  display: none;
}

.portfolio-group-toggle[aria-expanded="false"] .wallet-chevron {
  transform: rotate(-90deg);
}

.proposal-cats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.proposal-cats article {
  padding: 14px;
  font-weight: 600;
  color: #dde2ff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.proposal-cats article b {
  min-width: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(140, 156, 211, 0.42);
  color: #c9d4fa;
  font-size: 0.78rem;
  text-align: center;
}

.proposal-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.status-col {
  padding: 10px;
  align-self: start;
}

.status-col header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  font-weight: 700;
}

.status-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-expand-btn {
  border: 1px solid rgba(126, 143, 198, 0.45);
  background: rgba(30, 40, 79, 0.7);
  color: #c7d3f8;
  min-width: 46px;
  height: 28px;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
}

.status-expand-count {
  font-weight: 700;
  font-size: 0.76rem;
  color: #dbe4ff;
}

.status-expand-chevron {
  font-size: 0.74rem;
  color: #b8c6f2;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.dot.req {
  background: #c8b8f0;
}

.dot.prog {
  background: #e7cb8b;
}

.dot.solved {
  background: var(--success);
}

.skeleton {
  height: 72px;
  border-radius: 8px;
  background: linear-gradient(90deg, #1d2548 0%, #222b52 45%, #1e274a 100%);
  margin-bottom: 9px;
}

.proposal-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.status-col-solved .proposal-list {
  max-height: min(66vh, 980px);
  overflow-y: auto;
  padding-right: 6px;
}

.status-col-solved .proposal-list::-webkit-scrollbar {
  width: 8px;
}

.status-col-solved .proposal-list::-webkit-scrollbar-track {
  background: rgba(22, 31, 64, 0.6);
  border-radius: 999px;
}

.status-col-solved .proposal-list::-webkit-scrollbar-thumb {
  background: rgba(125, 142, 198, 0.6);
  border-radius: 999px;
}

.status-col-solved .proposal-list::-webkit-scrollbar-thumb:hover {
  background: rgba(152, 170, 230, 0.72);
}

.proposal-item {
  border: 1px solid rgba(87, 102, 162, 0.45);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(36, 48, 92, 0.42) 0%, rgba(19, 28, 58, 0.42) 100%);
  padding: 10px;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.proposal-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.proposal-item-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.proposal-item h4 {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.3;
  font-weight: 700;
  color: #e5ecff;
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.proposal-item p {
  margin: 0;
  color: #aebbe6;
  font-size: 0.8rem;
  line-height: 1.35;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.proposal-item p a {
  color: #9ec0ff;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.proposal-item p a:hover {
  color: #bdd4ff;
}

.proposal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.proposal-meta span {
  color: #9fb0e0;
  font-size: 0.72rem;
}

.proposal-impact {
  border-radius: 999px;
  padding: 4px 8px;
  border: 1px solid rgba(134, 148, 203, 0.42);
  font-size: 0.7rem;
  font-weight: 700;
  color: #d2dbf8;
  white-space: nowrap;
  flex: 0 0 auto;
}

.proposal-chain-badge {
  border-radius: 999px;
  padding: 4px 8px;
  border: 1px solid rgba(104, 123, 187, 0.5);
  background: rgba(44, 61, 117, 0.4);
  color: #cad8ff;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.proposal-subscores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.proposal-subscores span {
  color: #b7c4ec;
  font-size: 0.72rem;
}

.proposal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.proposal-tags span {
  border: 1px solid rgba(129, 144, 202, 0.42);
  border-radius: 999px;
  color: #c0cbed;
  font-size: 0.68rem;
  padding: 3px 7px;
}

.proposal-empty {
  border: 1px dashed rgba(120, 135, 191, 0.45);
  border-radius: 10px;
  padding: 14px;
  font-size: 0.82rem;
  color: #aebbe6;
}

.status-col.status-col-empty {
  padding-bottom: 12px;
}


.eco-tags {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.eco-tags button {
  padding: 14px;
  color: #d5dcfa;
  text-align: left;
  font-weight: 600;
  border: 1px solid var(--line-soft);
}

.eco-tags button.active {
  background: linear-gradient(145deg, rgba(111, 116, 201, 0.32) 0%, rgba(90, 95, 173, 0.26) 100%);
  border-color: rgba(150, 163, 214, 0.45);
  color: #f2f5ff;
}

.eco-tags button:disabled {
  opacity: 0.55;
}

.eco-search-row {
  padding: 8px;
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
}

.eco-search-row input {
  flex: 1;
  border: 1px solid transparent;
  background: #121940;
  border-radius: 8px;
  color: #edf0ff;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
}

.eco-search-row input:focus {
  border-color: rgba(165, 178, 224, 0.5);
}

.ecosystem-list {
  display: grid;
  gap: 10px;
}

.eco-row {
  padding: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.eco-row strong {
  font-size: 1rem;
  font-weight: 600;
}

.eco-row span {
  color: var(--muted-2);
  display: block;
  margin-top: 2px;
  font-size: 0.84rem;
}

.row-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1a2248;
  color: #d7deff;
  padding: 7px 11px;
  font-size: 0.9rem;
  font-weight: 600;
}

.admin-panel {
  margin-top: 10px;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-form label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.admin-form input {
  width: 100%;
  border: 1px solid rgba(171, 184, 224, 0.22);
  border-radius: 10px;
  background: rgba(126, 143, 197, 0.08);
  color: #e8eeff;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.9rem;
}

.admin-form select {
  width: 100%;
  border: 1px solid rgba(171, 184, 224, 0.22);
  border-radius: 10px;
  background: rgba(126, 143, 197, 0.08);
  color: #e8eeff;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.9rem;
}

.admin-form input:focus {
  outline: none;
  border-color: rgba(207, 156, 255, 0.48);
  box-shadow: 0 0 0 2px rgba(207, 156, 255, 0.15);
}

.admin-form select:focus {
  outline: none;
  border-color: rgba(207, 156, 255, 0.48);
  box-shadow: 0 0 0 2px rgba(207, 156, 255, 0.15);
}

.settings-form {
  max-width: 560px;
}

.admin-actions {
  margin-top: 4px;
  display: flex;
  gap: 8px;
}

.admin-status {
  margin: 2px 2px 0;
  font-size: 0.84rem;
  color: #b0bbe0;
}

.wallet-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 21, 0.72);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 50;
}

.wallet-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.wallet-modal {
  width: min(520px, calc(100vw - 24px));
  background: linear-gradient(180deg, #192145 0%, #141c37 100%);
  border: 1px solid rgba(161, 177, 228, 0.24);
  border-radius: 16px;
  padding: 22px 20px 18px;
  box-shadow: 0 20px 45px rgba(3, 7, 22, 0.5);
  position: relative;
}

.wallet-modal h2 {
  margin: 0 0 6px;
  font-size: 1.8rem;
  font-weight: 700;
}

.wallet-modal p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.96rem;
}

.wallet-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wallet-manual {
  margin-top: 12px;
}

.wallet-manual label {
  display: block;
  margin-bottom: 8px;
  color: #b8c4ea;
  font-size: 0.86rem;
  font-weight: 600;
}

.wallet-manual-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.wallet-manual-row input {
  border: 1px solid rgba(169, 185, 233, 0.28);
  border-radius: 10px;
  background: rgba(149, 167, 228, 0.08);
  color: #e7eeff;
  padding: 11px 12px;
  font-size: 0.94rem;
  font-family: inherit;
}

.wallet-manual-row input:focus {
  outline: none;
  border-color: rgba(201, 156, 255, 0.52);
  box-shadow: 0 0 0 3px rgba(201, 156, 255, 0.15);
}

.wallet-option {
  border: 1px solid rgba(169, 185, 233, 0.28);
  border-radius: 10px;
  background: rgba(149, 167, 228, 0.08);
  color: #e7eeff;
  padding: 12px 14px;
  font-size: 0.98rem;
  font-weight: 600;
}

.wallet-option:hover {
  cursor: pointer;
  border-color: rgba(201, 156, 255, 0.5);
  background: rgba(201, 156, 255, 0.12);
}

.wallet-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(170, 183, 224, 0.24);
  background: rgba(122, 141, 214, 0.08);
  color: #dce5ff;
}

.wallet-close:hover {
  cursor: pointer;
}

.wallet-modal small {
  display: block;
  margin-top: 14px;
  color: #a8b3d9;
  font-size: 0.84rem;
  line-height: 1.45;
}

.manage-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 9, 21, 0.78);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 55;
}

.manage-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.manage-modal {
  width: min(1120px, calc(100vw - 28px));
  max-height: calc(100vh - 34px);
  overflow-y: auto;
  background: linear-gradient(180deg, #141c37 0%, #0f1631 100%);
  border: 1px solid rgba(161, 177, 228, 0.24);
  border-radius: 16px;
  padding: 24px 22px;
  box-shadow: 0 20px 45px rgba(3, 7, 22, 0.58);
  position: relative;
}

.manage-modal h2 {
  margin: 0 0 4px;
  font-size: 2rem;
  font-weight: 700;
}

.manage-modal p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.manage-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.manage-card {
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(126, 143, 197, 0.06);
  padding: 12px;
}

.manage-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.manage-card-head h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.manage-note {
  margin: 8px 0 10px !important;
  color: #a9b5db !important;
  font-size: 0.86rem !important;
}

.manage-wallet-list,
.manage-portfolio-list {
  display: grid;
  gap: 8px;
}

.manage-wallet-item,
.manage-portfolio-item {
  border: 1px solid rgba(171, 184, 224, 0.2);
  border-radius: 10px;
  background: #161e3c;
  padding: 10px 11px;
}

.manage-wallet-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.manage-wallet-item-main {
  display: grid;
  gap: 2px;
}

.manage-wallet-item-main strong {
  font-size: 0.94rem;
  font-weight: 700;
}

.manage-wallet-item-main span {
  color: var(--muted);
  font-size: 0.8rem;
}

.manage-wallet-item-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.manage-wallet-btn {
  border: 1px solid rgba(171, 184, 224, 0.26);
  border-radius: 8px;
  background: rgba(126, 143, 197, 0.1);
  color: #dbe3ff;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}

.manage-wallet-btn:hover {
  cursor: pointer;
}

.manage-wallet-btn.danger {
  border-color: rgba(207, 111, 131, 0.4);
  color: #f0b2c3;
  background: rgba(207, 111, 131, 0.12);
}

.manage-wallet-move {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #aebadd;
  font-size: 0.74rem;
  font-weight: 600;
}

.manage-wallet-select {
  border: 1px solid rgba(171, 184, 224, 0.26);
  border-radius: 8px;
  background: rgba(126, 143, 197, 0.1);
  color: #dbe3ff;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
}

.manage-wallet-select:focus {
  outline: none;
  border-color: rgba(188, 170, 242, 0.45);
}

.manage-portfolio-item strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
}

.manage-portfolio-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.manage-portfolio-item.active {
  border-color: rgba(214, 164, 255, 0.45);
  background: linear-gradient(180deg, #2a2048 0%, #1a1f43 100%);
}

@media (max-width: 1180px) {
  .dashboard-kpi-grid,
  .risk-grid,
  .flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .decision-grid,
  .intel-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-visual-grid,
  .action-grid {
    grid-template-columns: 1fr;
  }

  .impact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .portfolio-panel,
  .proposal-status-grid {
    grid-template-columns: 1fr;
  }

  .manage-grid {
    grid-template-columns: 1fr;
  }

  .proposal-cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .alloc-card {
    display: grid;
    grid-template-columns: 240px 1fr;
    align-items: center;
    gap: 8px;
  }

  .alloc-card header {
    grid-column: 1 / -1;
  }

  .donut {
    margin: 8px auto;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: -290px;
    top: 40px;
    bottom: 0;
    width: 272px;
    z-index: 20;
    transition: left 0.2s ease;
  }

  .sidebar.open {
    left: 0;
  }

  .menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .dashboard-kpi-grid,
  .kpi-grid,
  .eco-tags {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manage-card-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 680px) {
  .demo-bar {
    font-size: 0.86rem;
    padding: 0 10px;
    text-align: center;
  }

  .content,
  .topbar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .kpi-grid,
  .dashboard-kpi-grid,
  .dashboard-visual-grid,
  .action-grid,
  .risk-grid,
  .flow-grid,
  .proposal-cats,
  .eco-tags {
    grid-template-columns: 1fr;
  }

  .alloc-card {
    grid-template-columns: 1fr;
  }

  .positions-head,
  .page-header,
  .eco-search-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .impact-grid {
    grid-template-columns: 1fr;
  }

  .wallet-options {
    grid-template-columns: 1fr;
  }

  .admin-actions {
    width: 100%;
  }
}
