:root {
  color-scheme: light;
  --bg: #eef3f1;
  --surface: #ffffff;
  --surface-2: #f4f7f6;
  --text: #172126;
  --muted: #66727a;
  --line: #d5dfdb;
  --green: #1f8a5b;
  --teal: #0e7c86;
  --amber: #b06a10;
  --red: #b23b3b;
  --ink: #253037;
  --shadow: 0 12px 26px rgba(23, 33, 38, 0.07);
  --shadow-hover: 0 18px 38px rgba(23, 33, 38, 0.12);
  --spot: #1f8a5b;
  --earn: #0e7c86;
  --futures: #7b4ea3;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1417;
  --surface: #172126;
  --surface-2: #223039;
  --text: #eef4f6;
  --muted: #a2b1b9;
  --line: #31424b;
  --green: #42c087;
  --teal: #35a7b2;
  --amber: #e0a044;
  --red: #e26666;
  --ink: #eef4f6;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  --shadow-hover: 0 18px 38px rgba(0, 0, 0, 0.34);
  --spot: #42c087;
  --earn: #35a7b2;
  --futures: #b58be0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  font-size: 15px;
}

button,
a {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: #14201f;
  color: #f8fbfc;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e8f3ef;
  color: var(--green);
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 17px;
}

.brand div span {
  color: #9ba9b0;
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border-radius: 8px;
  color: #c7d1d6;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.nav-item.is-active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-item:hover {
  transform: translateX(2px);
}

.nav-item.is-active {
  box-shadow: inset 3px 0 0 var(--green);
}

.icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.sync-card {
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.sync-card strong,
.sync-card span {
  display: block;
}

.sync-card span {
  color: #aebbc1;
  font-size: 12px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 5px rgba(176, 106, 16, 0.18);
}

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(31, 138, 91, 0.18);
}

.main {
  min-width: 0;
  padding: 28px;
  max-width: 1480px;
}

.topbar {
  min-height: 74px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

h2 {
  font-size: 19px;
}

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

.view {
  display: none;
}

.view.is-active {
  display: block;
  animation: viewIn 180ms ease-out;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 138, 91, 0.38);
  background: #f8fbfa;
}

html[data-theme="dark"] .icon-button:hover {
  background: #1e2b32;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.metric,
.panel,
.exchange-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric {
  min-height: 118px;
  padding: 18px;
  display: grid;
  align-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.metric.primary {
  background: #153a34;
  color: #f7fffc;
  border-color: #153a34;
}

html[data-theme="dark"] .metric.primary {
  background: #14352f;
}

.metric.warning strong {
  color: var(--amber);
}

.metric.warning {
  border-color: rgba(176, 106, 16, 0.28);
}

.metric:not(.primary)::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--teal);
}

.metric.warning::before {
  background: var(--amber);
}

.metric:hover,
.panel:hover,
.exchange-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.panel,
.exchange-card {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.label,
.metric small {
  color: var(--muted);
}

.label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric.primary .label,
.metric.primary small {
  color: #b8d1c8;
}

.metric strong {
  display: block;
  font-size: 28px;
  line-height: 1.08;
}

.metric.primary strong {
  font-size: 38px;
}

.money-stack {
  display: grid;
  gap: 2px;
}

.money-stack strong {
  font: inherit;
  font-weight: 800;
}

.money-stack small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric.primary .money-stack small {
  color: #b8d1c8;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.panel {
  padding: 18px;
}

.panel:hover {
  border-color: rgba(31, 138, 91, 0.22);
}

.panel-head {
  min-height: 44px;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-head {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pill {
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e6f2ee;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

html[data-theme="dark"] .pill {
  background: rgba(66, 192, 135, 0.16);
}

.pill.ok {
  background: #e6f2ee;
  color: var(--green);
}

.pill.partial,
.pill.amber {
  background: #fff1dc;
  color: var(--amber);
}

html[data-theme="dark"] .pill.partial,
html[data-theme="dark"] .pill.amber {
  background: rgba(224, 160, 68, 0.16);
}

.pill.risk {
  background: #fde7e7;
  color: var(--red);
}

html[data-theme="dark"] .pill.risk {
  background: rgba(226, 102, 102, 0.16);
}

.pill.neutral {
  background: var(--surface-2);
  color: var(--muted);
}

.allocation-wrap {
  display: grid;
  grid-template-columns: 170px minmax(180px, 1fr);
  align-items: center;
  gap: 22px;
}

.donut {
  width: 170px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 40%, var(--teal) 40% 72%, var(--amber) 72% 88%, var(--red) 88% 100%);
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(23, 33, 38, 0.05);
}

.donut::after {
  content: "";
  position: absolute;
  inset: 31px;
  border-radius: 50%;
  background: var(--surface);
}

html[data-theme="dark"] .donut::after {
  background: var(--surface);
}

.legend {
  display: grid;
  gap: 6px;
}

.legend-row {
  min-height: 30px;
  display: grid;
  grid-template-columns: 12px minmax(72px, 1fr) max-content;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 4px 0;
}

.legend-row span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.legend-row strong {
  justify-self: end;
  white-space: nowrap;
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

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

.dashboard-alerts {
  margin-bottom: 68px;
}

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

.recommendation-item {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  border-left: 4px solid var(--teal);
}

.recommendation-item.partial {
  border-left-color: var(--amber);
}

.recommendation-item.risk {
  border-left-color: var(--red);
}

.recommendation-item.ok {
  border-left-color: var(--green);
}

.recommendation-item span,
.empty-note {
  color: var(--muted);
  font-size: 13px;
}

.empty-note {
  margin: 0;
}

.exchange-card {
  min-height: 158px;
  padding: 16px;
  display: grid;
  align-content: space-between;
  border-top: 4px solid var(--teal);
}

.exchange-card.ok {
  border-top-color: var(--green);
}

.exchange-card.partial {
  border-top-color: var(--amber);
}

.exchange-card.risk {
  border-top-color: var(--red);
}

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

.exchange-card h3 {
  margin: 0;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.exchange-logo {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-2);
  overflow: hidden;
}

.exchange-logo img,
.exchange-mini {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.exchange-logo span,
.exchange-mini {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.exchange-foot {
  color: var(--muted);
}

.exchange-card .amount {
  font-size: 24px;
  font-weight: 800;
}

.exchange-card .amount .money-stack small {
  font-size: 13px;
}

.assets-panel,
.users-panel {
  margin-bottom: 68px;
}

.asset-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.asset-tools input,
.asset-tools select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.asset-tools input:focus,
.asset-tools select:focus,
.user-form input:focus,
.user-form select:focus {
  border-color: rgba(31, 138, 91, 0.55);
  box-shadow: 0 0 0 3px rgba(31, 138, 91, 0.12);
}

.asset-tools input {
  width: 180px;
}

.asset-insights {
  display: grid;
  gap: 14px;
  margin: 18px 0 16px;
}

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

.asset-kpi {
  min-height: 96px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.asset-kpi.primary {
  background: #162522;
  border-color: #162522;
  color: #f8fbfc;
}

.asset-kpi.warning {
  border-color: rgba(176, 106, 16, 0.34);
  background: rgba(176, 106, 16, 0.08);
}

.asset-kpi span,
.chart-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.asset-kpi.primary span,
.asset-kpi.primary small {
  color: #a9bac0;
}

.asset-kpi strong {
  font-size: 22px;
  line-height: 1.1;
}

.asset-kpi small {
  color: var(--muted);
  font-size: 12px;
}

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

.asset-chart {
  min-height: 252px;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(23, 33, 38, 0.04);
}

.asset-chart.wide {
  grid-column: 1 / -1;
}

.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.chart-head strong {
  color: var(--text);
  font-size: 13px;
}

.bar-list {
  display: grid;
  gap: 12px;
}

.bar-list.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
}

.bar-row {
  display: grid;
  gap: 6px;
}

.bar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.bar-meta span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.bar-meta span i {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 3px;
}

.bar-meta strong {
  flex: 0 0 auto;
  font-size: 12px;
}

.bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.bar-track span {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
}

.bar-row small {
  color: var(--muted);
  font-size: 11px;
}

.segmented {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.segmented button {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.segmented .is-selected {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 4px 12px rgba(23, 33, 38, 0.08);
}

html[data-theme="dark"] .segmented .is-selected {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.users-table {
  min-width: 640px;
}

th,
td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

tbody tr {
  transition: background 140ms ease;
}

tbody tr:nth-child(even) {
  background: rgba(244, 247, 246, 0.68);
}

tbody tr:hover {
  background: rgba(31, 138, 91, 0.06);
}

.assets-panel th,
.assets-panel td {
  border-bottom-color: rgba(31, 138, 91, 0.18);
}

.assets-panel tbody tr:nth-child(even) {
  background: rgba(31, 138, 91, 0.035);
}

.assets-panel tbody tr:hover {
  background: rgba(14, 124, 134, 0.075);
}

html[data-theme="dark"] .assets-panel th,
html[data-theme="dark"] .assets-panel td {
  border-bottom-color: rgba(66, 192, 135, 0.18);
}

html[data-theme="dark"] .assets-panel tbody tr:nth-child(even) {
  background: rgba(66, 192, 135, 0.055);
}

html[data-theme="dark"] .assets-panel tbody tr:hover {
  background: rgba(53, 167, 178, 0.11);
}

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

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

.token-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  font-weight: 800;
  color: var(--ink);
  overflow: hidden;
}

.token-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.token-mark span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.signal {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #e6f2ee;
  color: var(--green);
}

.account-type {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.account-type.spot {
  color: var(--spot);
}

.account-type.earn {
  color: var(--earn);
}

.account-type.futures,
.account-type.swap,
.account-type.contract {
  color: var(--futures);
}

.empty-row {
  height: 76px;
  color: var(--muted);
  text-align: center;
}

.users-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.settings-panel {
  margin-bottom: 68px;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 16px;
  align-items: start;
}

.settings-block {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.settings-block h3 {
  margin: 0;
  font-size: 15px;
}

.settings-row {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.settings-row:last-child {
  border-bottom: 0;
}

.settings-row span {
  color: var(--muted);
}

.user-form {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.user-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.user-form input,
.user-form select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--text);
  text-transform: none;
}

.form-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.text-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.text-button:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 138, 91, 0.42);
  background: #f8fbfa;
}

html[data-theme="dark"] .text-button:hover {
  background: #1e2b32;
}

.text-button.primary {
  border-color: transparent;
  background: var(--green);
  color: #ffffff;
}

.text-button.primary:hover {
  background: #19734c;
  color: #ffffff;
}

.text-button.danger {
  color: var(--red);
}

.form-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

html[data-theme="dark"] .signal {
  background: rgba(66, 192, 135, 0.14);
}

.signal.watch {
  background: #fff1dc;
  color: var(--amber);
}

html[data-theme="dark"] .signal.watch {
  background: rgba(224, 160, 68, 0.16);
}

.signal.risk {
  background: #fde7e7;
  color: var(--red);
}

html[data-theme="dark"] .signal.risk {
  background: rgba(226, 102, 102, 0.16);
}

.bottom-nav {
  display: none;
}

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

  .sidebar {
    display: none;
  }

  .main {
    padding: 18px 14px 86px;
  }

  .topbar {
    min-height: auto;
    align-items: start;
  }

  .summary-grid,
  .content-grid,
  .exchange-grid {
    grid-template-columns: 1fr;
  }

  .asset-kpi-row,
  .asset-visual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bar-list.compact {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    gap: 8px;
  }

  .metric {
    min-height: 92px;
    padding: 14px;
  }

  .metric.primary {
    min-height: 132px;
  }

  .metric.primary strong {
    font-size: 34px;
  }

  .allocation-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 10;
    min-height: 58px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 36px rgba(23, 33, 38, 0.18);
    backdrop-filter: blur(12px);
  }

  html[data-theme="dark"] .bottom-nav {
    background: rgba(23, 33, 38, 0.94);
  }

  .bottom-nav a {
    display: grid;
    place-items: center;
    gap: 2px;
    min-width: 0;
    border-radius: 8px;
    color: var(--ink);
    text-decoration: none;
    font-size: 17px;
    transition: background 160ms ease, color 160ms ease;
  }

  .bottom-nav a.is-active {
    background: #e6f2ee;
    color: var(--green);
  }

  html[data-theme="dark"] .bottom-nav a.is-active {
    background: rgba(66, 192, 135, 0.14);
  }

  .bottom-nav span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px;
  }
}

@media (max-width: 520px) {
  body {
    background: var(--surface-2);
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 17px;
  }

  .main {
    padding: 16px 10px 86px;
  }

  .topbar {
    margin-bottom: 12px;
  }

  .top-actions {
    flex-direction: row;
  }

  .icon-button {
    width: 40px;
    height: 40px;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
  }

  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .metric {
    min-height: 86px;
    padding: 12px;
    box-shadow: none;
  }

  .metric.primary {
    grid-column: 1 / -1;
    min-height: 126px;
  }

  .metric strong {
    font-size: 21px;
  }

  .metric.primary strong {
    font-size: 32px;
  }

  .metric small,
  .label {
    font-size: 11px;
  }

  .panel,
  .exchange-card {
    padding: 14px;
    box-shadow: none;
  }

  .metric:hover,
  .panel:hover,
  .exchange-card:hover,
  .text-button:hover,
  .icon-button:hover {
    transform: none;
  }

  .donut {
    width: min(58vw, 168px);
  }

  .legend {
    width: 100%;
  }

  .legend-row {
    grid-template-columns: 12px minmax(0, 1fr) max-content;
  }

  .exchange-grid {
    gap: 8px;
  }

  .exchange-card {
    min-height: 128px;
  }

  .exchange-card .amount {
    font-size: 21px;
  }

  .segmented {
    width: 100%;
  }

  .segmented button {
    flex: 1;
  }

  .asset-tools,
  .asset-tools input,
  .asset-tools select {
    width: 100%;
  }

  .asset-tools {
    gap: 7px;
  }

  .asset-tools input,
  .asset-tools select {
    min-height: 42px;
  }

  .asset-insights {
    margin: 14px 0 12px;
  }

  .asset-kpi-row,
  .asset-visual-grid {
    grid-template-columns: 1fr;
  }

  .asset-kpi {
    min-height: 82px;
  }

  .asset-chart {
    min-height: 0;
    padding: 12px;
    box-shadow: none;
  }

  .bar-meta {
    align-items: start;
  }

  .assets-panel .table-wrap {
    overflow: visible;
  }

  .assets-panel table,
  .assets-panel thead,
  .assets-panel tbody,
  .assets-panel tr,
  .assets-panel td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .assets-panel table {
    border-collapse: separate;
    border-spacing: 0 8px;
  }

  .assets-panel thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .assets-panel tbody tr {
    padding: 12px;
    border: 1px solid rgba(31, 138, 91, 0.2);
    border-radius: 8px;
    background: var(--surface);
  }

  html[data-theme="dark"] .assets-panel tbody tr {
    border-color: rgba(66, 192, 135, 0.22);
  }

  .assets-panel tbody tr:nth-child(even),
  .assets-panel tbody tr:hover {
    background: var(--surface);
  }

  .assets-panel td {
    min-height: 30px;
    padding: 5px 0;
    border-bottom: 0;
    white-space: normal;
  }

  .assets-panel td:first-child {
    padding-top: 0;
  }

  .assets-panel td:not(:first-child) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text);
    font-size: 13px;
  }

  .assets-panel td:not(:first-child)::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .assets-panel td[data-label="Valor"] {
    align-items: start;
  }

  .assets-panel td[data-label="Valor"] .money-stack {
    justify-items: end;
    text-align: right;
  }

  .token-mark {
    width: 34px;
    height: 34px;
  }

  .token-cell strong {
    font-size: 17px;
  }

  .signal {
    max-width: 62%;
    min-height: 26px;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }

  .account-type {
    min-height: 24px;
  }

  .users-layout {
    grid-template-columns: 1fr;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }
}
