/* ═══════════════════════════════════════════════════════
   SHIDO TERMINAL — Premium Dark Theme
   Inspired by terminal2 glassmorphism design language
   ═══════════════════════════════════════════════════════ */

/* ─── Design Tokens ─── */
:root {
  --bg-primary: #06070b;
  --bg-secondary: #0c0d16;
  --bg-tertiary: #12131f;
  --bg-elevated: #181a28;
  --bg-card: #0e0f19;

  --text-primary: #ecedf2;
  --text-secondary: #8b8ea8;
  --text-tertiary: #4e5170;

  --cyan: #00e5ff;
  --cyan-dim: #00b8d4;
  --lime: #b8ff57;
  --lime-dim: #8bc34a;
  --amber: #ffab40;
  --magenta: #e040fb;
  --violet: #7c4dff;

  --bull: #00e676;
  --bear: #ff1744;

  --border: rgba(255, 255, 255, 0.05);
  --border-accent: rgba(0, 229, 255, 0.18);
  --glass: rgba(10, 11, 18, 0.78);

  --accent-rgb: 0, 229, 255;
  --accent-2-rgb: 124, 77, 255;
  --accent-3-rgb: 224, 64, 251;
  --live-glow-rgb: 0, 230, 118;

  --glass-grad-start: rgba(10, 12, 22, 0.70);
  --glass-grad-end: rgba(6, 8, 14, 0.78);
  --card-grad-start: rgba(15, 17, 30, 0.55);
  --card-grad-end: rgba(10, 12, 22, 0.60);
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-inset-border: rgba(255, 255, 255, 0.04);
  --panel-shadow: rgba(0, 0, 0, 0.5);

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  color-scheme: dark;
}

body[data-theme="default"] {
  color-scheme: dark;
}

body[data-theme="light-soft"] {
  --bg-primary: #f0f6fc;
  --bg-secondary: #e3edf7;
  --bg-tertiary: #d7e7f3;
  --bg-elevated: #fbf7ef;
  --bg-card: #fffdf8;

  --text-primary: #1b2e42;
  --text-secondary: #59728b;
  --text-tertiary: #7a8fa3;

  --cyan: #2d86c9;
  --cyan-dim: #216da7;
  --lime: #6daf72;
  --lime-dim: #4d8758;
  --amber: #f29f58;
  --magenta: #d1719c;
  --violet: #6f89c8;

  --bull: #2f9f6f;
  --bear: #c54d66;

  --border: rgba(49, 90, 126, 0.18);
  --border-accent: rgba(45, 134, 201, 0.30);
  --glass: rgba(255, 255, 255, 0.72);

  --accent-rgb: 45, 134, 201;
  --accent-2-rgb: 111, 137, 200;
  --accent-3-rgb: 242, 159, 88;
  --live-glow-rgb: 47, 159, 111;

  --glass-grad-start: rgba(255, 255, 255, 0.78);
  --glass-grad-end: rgba(248, 241, 227, 0.72);
  --card-grad-start: rgba(255, 255, 255, 0.70);
  --card-grad-end: rgba(242, 250, 255, 0.84);
  --panel-border: rgba(49, 90, 126, 0.20);
  --panel-inset-border: rgba(255, 255, 255, 0.42);
  --panel-shadow: rgba(38, 76, 109, 0.18);

  color-scheme: light;
}

body[data-theme="ember"] {
  --bg-primary: #0b0909;
  --bg-secondary: #16110f;
  --bg-tertiary: #241712;
  --bg-elevated: #2f1d14;
  --bg-card: #17100d;

  --text-primary: #fff2e2;
  --text-secondary: #c6a181;
  --text-tertiary: #8f6b54;

  --cyan: #ff7a1a;
  --cyan-dim: #d55f0a;
  --lime: #e4a95f;
  --lime-dim: #bf8542;
  --amber: #ff9e45;
  --magenta: #ff6e40;
  --violet: #ff9854;

  --bull: #ffb35c;
  --bear: #ff4f38;

  --border: rgba(255, 131, 32, 0.18);
  --border-accent: rgba(255, 122, 26, 0.35);
  --glass: rgba(26, 16, 12, 0.78);

  --accent-rgb: 255, 122, 26;
  --accent-2-rgb: 255, 158, 69;
  --accent-3-rgb: 255, 79, 56;
  --live-glow-rgb: 255, 179, 92;

  --glass-grad-start: rgba(35, 21, 15, 0.74);
  --glass-grad-end: rgba(19, 11, 9, 0.84);
  --card-grad-start: rgba(49, 28, 19, 0.60);
  --card-grad-end: rgba(27, 15, 11, 0.66);
  --panel-border: rgba(255, 122, 26, 0.28);
  --panel-inset-border: rgba(255, 205, 159, 0.11);
  --panel-shadow: rgba(0, 0, 0, 0.58);

  color-scheme: dark;
}

body[data-theme="swap-neon"] {
  --bg-primary: #05030c;
  --bg-secondary: #0c0818;
  --bg-tertiary: #130d26;
  --bg-elevated: #1e1333;
  --bg-card: #0d0720;

  --text-primary: #f4ebff;
  --text-secondary: #b79bd5;
  --text-tertiary: #7f6aa8;

  --cyan: #ff4cc9;
  --cyan-dim: #df2dad;
  --lime: #ff84e5;
  --lime-dim: #d864be;
  --amber: #c372ff;
  --magenta: #ff2fa3;
  --violet: #8f52ff;

  --bull: #ff63d1;
  --bear: #ff3f92;

  --border: rgba(190, 99, 255, 0.20);
  --border-accent: rgba(255, 76, 201, 0.34);
  --glass: rgba(13, 7, 28, 0.78);

  --accent-rgb: 255, 76, 201;
  --accent-2-rgb: 143, 82, 255;
  --accent-3-rgb: 255, 47, 163;
  --live-glow-rgb: 255, 99, 209;

  --glass-grad-start: rgba(23, 11, 40, 0.74);
  --glass-grad-end: rgba(10, 5, 24, 0.84);
  --card-grad-start: rgba(33, 15, 56, 0.62);
  --card-grad-end: rgba(14, 7, 31, 0.68);
  --panel-border: rgba(255, 76, 201, 0.25);
  --panel-inset-border: rgba(238, 195, 255, 0.10);
  --panel-shadow: rgba(0, 0, 0, 0.58);

  color-scheme: dark;
}

body[data-theme="space-dots"] {
  --bg-primary: #02060f;
  --bg-secondary: #070d1c;
  --bg-tertiary: #0c1325;
  --bg-elevated: #121b31;
  --bg-card: #08101f;

  --text-primary: #d8e7ff;
  --text-secondary: #8ea9cf;
  --text-tertiary: #5d759a;

  --cyan: #50d4ff;
  --cyan-dim: #2ba9d7;
  --lime: #8ef2d2;
  --lime-dim: #62c9ae;
  --amber: #9ea8ff;
  --magenta: #65b8ff;
  --violet: #7f8dff;

  --bull: #74ffd6;
  --bear: #ff7ea6;

  --border: rgba(110, 150, 210, 0.18);
  --border-accent: rgba(80, 212, 255, 0.30);
  --glass: rgba(7, 12, 24, 0.80);

  --accent-rgb: 80, 212, 255;
  --accent-2-rgb: 127, 141, 255;
  --accent-3-rgb: 101, 184, 255;
  --live-glow-rgb: 116, 255, 214;

  --glass-grad-start: rgba(10, 17, 33, 0.76);
  --glass-grad-end: rgba(4, 9, 19, 0.86);
  --card-grad-start: rgba(14, 24, 43, 0.62);
  --card-grad-end: rgba(7, 13, 25, 0.70);
  --panel-border: rgba(95, 146, 220, 0.24);
  --panel-inset-border: rgba(175, 216, 255, 0.08);
  --panel-shadow: rgba(0, 0, 0, 0.60);

  color-scheme: dark;
}

body[data-theme="ocean-deep"] {
  --bg-primary: #030d14;
  --bg-secondary: #081a25;
  --bg-tertiary: #0c2433;
  --bg-elevated: #133044;
  --bg-card: #071723;

  --text-primary: #daf0ff;
  --text-secondary: #7eb8d8;
  --text-tertiary: #4d88a8;

  --cyan: #00d4aa;
  --cyan-dim: #00a888;
  --lime: #5ce8c4;
  --lime-dim: #3cc0a0;
  --amber: #7ec8ff;
  --magenta: #00e8d4;
  --violet: #00c8ff;

  --bull: #2eeab8;
  --bear: #ff6b8a;

  --border: rgba(0, 212, 170, 0.16);
  --border-accent: rgba(0, 212, 170, 0.30);
  --glass: rgba(5, 18, 30, 0.80);

  --accent-rgb: 0, 212, 170;
  --accent-2-rgb: 0, 200, 255;
  --accent-3-rgb: 0, 232, 212;
  --live-glow-rgb: 46, 234, 184;

  --glass-grad-start: rgba(8, 22, 35, 0.76);
  --glass-grad-end: rgba(3, 12, 20, 0.84);
  --card-grad-start: rgba(12, 30, 48, 0.60);
  --card-grad-end: rgba(6, 16, 28, 0.68);
  --panel-border: rgba(0, 212, 170, 0.22);
  --panel-inset-border: rgba(150, 230, 220, 0.08);
  --panel-shadow: rgba(0, 0, 0, 0.58);

  color-scheme: dark;
}

body[data-theme="sakura"] {
  --bg-primary: #0c0510;
  --bg-secondary: #160a1a;
  --bg-tertiary: #201028;
  --bg-elevated: #2c1535;
  --bg-card: #120816;

  --text-primary: #fce8f4;
  --text-secondary: #c89cb8;
  --text-tertiary: #8d6a84;

  --cyan: #ff7eb3;
  --cyan-dim: #e0609a;
  --lime: #ffb1d4;
  --lime-dim: #e090b5;
  --amber: #d896ff;
  --magenta: #ff5da0;
  --violet: #c880ff;

  --bull: #ff90c8;
  --bear: #ff4a7e;

  --border: rgba(255, 126, 179, 0.18);
  --border-accent: rgba(255, 126, 179, 0.32);
  --glass: rgba(16, 8, 20, 0.80);

  --accent-rgb: 255, 126, 179;
  --accent-2-rgb: 200, 128, 255;
  --accent-3-rgb: 255, 93, 160;
  --live-glow-rgb: 255, 144, 200;

  --glass-grad-start: rgba(20, 10, 28, 0.76);
  --glass-grad-end: rgba(10, 5, 14, 0.84);
  --card-grad-start: rgba(30, 14, 40, 0.60);
  --card-grad-end: rgba(16, 8, 22, 0.68);
  --panel-border: rgba(255, 126, 179, 0.24);
  --panel-inset-border: rgba(255, 200, 230, 0.09);
  --panel-shadow: rgba(0, 0, 0, 0.58);

  color-scheme: dark;
}

body[data-theme="matrix"] {
  --bg-primary: #000a00;
  --bg-secondary: #001400;
  --bg-tertiary: #002000;
  --bg-elevated: #003000;
  --bg-card: #001000;

  --text-primary: #c8ffc8;
  --text-secondary: #62b062;
  --text-tertiary: #3d7a3d;

  --cyan: #00ff41;
  --cyan-dim: #00cc33;
  --lime: #39ff14;
  --lime-dim: #30d010;
  --amber: #80ff60;
  --magenta: #00ff80;
  --violet: #00e855;

  --bull: #00ff55;
  --bear: #ff2a2a;

  --border: rgba(0, 255, 65, 0.14);
  --border-accent: rgba(0, 255, 65, 0.28);
  --glass: rgba(0, 12, 0, 0.80);

  --accent-rgb: 0, 255, 65;
  --accent-2-rgb: 0, 232, 85;
  --accent-3-rgb: 0, 255, 128;
  --live-glow-rgb: 0, 255, 85;

  --glass-grad-start: rgba(0, 18, 0, 0.76);
  --glass-grad-end: rgba(0, 8, 0, 0.86);
  --card-grad-start: rgba(0, 28, 0, 0.62);
  --card-grad-end: rgba(0, 14, 0, 0.70);
  --panel-border: rgba(0, 255, 65, 0.20);
  --panel-inset-border: rgba(100, 255, 150, 0.08);
  --panel-shadow: rgba(0, 0, 0, 0.60);

  color-scheme: dark;
}

body[data-theme="arctic"] {
  --bg-primary: #eaf4fb;
  --bg-secondary: #dbedf8;
  --bg-tertiary: #cce5f5;
  --bg-elevated: #f4f8fc;
  --bg-card: #f8fbff;

  --text-primary: #1a2e40;
  --text-secondary: #4d7090;
  --text-tertiary: #7a9ab8;

  --cyan: #4da8da;
  --cyan-dim: #3688b8;
  --lime: #6bc5d2;
  --lime-dim: #50a8b4;
  --amber: #a0c4e8;
  --magenta: #7aadd4;
  --violet: #6498c8;

  --bull: #2ea88c;
  --bear: #d4546a;

  --border: rgba(77, 168, 218, 0.20);
  --border-accent: rgba(77, 168, 218, 0.32);
  --glass: rgba(244, 248, 255, 0.75);

  --accent-rgb: 77, 168, 218;
  --accent-2-rgb: 100, 152, 200;
  --accent-3-rgb: 122, 173, 212;
  --live-glow-rgb: 46, 168, 140;

  --glass-grad-start: rgba(245, 250, 255, 0.80);
  --glass-grad-end: rgba(230, 242, 252, 0.75);
  --card-grad-start: rgba(248, 252, 255, 0.72);
  --card-grad-end: rgba(235, 245, 254, 0.85);
  --panel-border: rgba(77, 168, 218, 0.22);
  --panel-inset-border: rgba(255, 255, 255, 0.50);
  --panel-shadow: rgba(50, 100, 140, 0.15);

  color-scheme: light;
}

body[data-theme="sunset-glow"] {
  --bg-primary: #0c0514;
  --bg-secondary: #170a22;
  --bg-tertiary: #231030;
  --bg-elevated: #30163e;
  --bg-card: #130820;

  --text-primary: #ffe8f0;
  --text-secondary: #c89dba;
  --text-tertiary: #8d6c86;

  --cyan: #ff8c42;
  --cyan-dim: #e07030;
  --lime: #ffc062;
  --lime-dim: #d8a048;
  --amber: #ff6888;
  --magenta: #ff5050;
  --violet: #d47af5;

  --bull: #ffb060;
  --bear: #ff4060;

  --border: rgba(255, 140, 66, 0.18);
  --border-accent: rgba(255, 140, 66, 0.32);
  --glass: rgba(16, 8, 24, 0.80);

  --accent-rgb: 255, 140, 66;
  --accent-2-rgb: 212, 122, 245;
  --accent-3-rgb: 255, 80, 80;
  --live-glow-rgb: 255, 176, 96;

  --glass-grad-start: rgba(22, 10, 32, 0.76);
  --glass-grad-end: rgba(10, 5, 16, 0.84);
  --card-grad-start: rgba(34, 16, 48, 0.60);
  --card-grad-end: rgba(18, 8, 28, 0.68);
  --panel-border: rgba(255, 140, 66, 0.24);
  --panel-inset-border: rgba(255, 210, 180, 0.09);
  --panel-shadow: rgba(0, 0, 0, 0.58);

  color-scheme: dark;
}

/* ─── Reset ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

button {
  cursor: pointer;
  font: inherit;
  border: none;
  background: none;
  color: inherit;
}

input {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ─── Animated Mesh Background ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% -10%, rgba(var(--accent-rgb), 0.10) 0%, transparent 55%),
    radial-gradient(ellipse 50% 50% at 85% 20%, rgba(var(--accent-2-rgb), 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 60% 110%, rgba(var(--accent-3-rgb), 0.07) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 10% 80%, rgba(var(--accent-rgb), 0.05) 0%, transparent 50%);
  pointer-events: none;
  animation: mesh-drift 25s ease-in-out infinite alternate;
}

/* ─── Subtle Grid Overlay ─── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(0, 0, 0, 0.5) 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(0, 0, 0, 0.5) 0%, transparent 70%);
  pointer-events: none;
}

body[data-theme="swap-neon"]::after {
  background-image:
    radial-gradient(circle at 12% 92%, rgba(255, 76, 201, 0.40) 0 1.5px, transparent 2.2px),
    radial-gradient(circle at 28% 84%, rgba(143, 82, 255, 0.40) 0 1.7px, transparent 2.4px),
    radial-gradient(circle at 45% 95%, rgba(255, 47, 163, 0.35) 0 1.3px, transparent 2px),
    radial-gradient(circle at 67% 89%, rgba(115, 89, 255, 0.33) 0 1.4px, transparent 2.1px),
    radial-gradient(circle at 84% 93%, rgba(255, 76, 201, 0.36) 0 1.6px, transparent 2.2px),
    radial-gradient(circle at 95% 82%, rgba(196, 112, 255, 0.32) 0 1.2px, transparent 2px);
  background-size: 180px 180px, 210px 210px, 150px 150px, 240px 240px, 200px 200px, 170px 170px;
  animation: neon-dots-rise 22s linear infinite;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.45) 58%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.45) 58%, transparent 100%);
}

@keyframes neon-dots-rise {
  from {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  }

  to {
    background-position: 0 -500px, 0 -560px, 0 -470px, 0 -610px, 0 -540px, 0 -510px;
  }
}

body[data-theme="space-dots"]::after {
  background-image:
    radial-gradient(circle at 8% 96%, rgba(120, 200, 255, 0.42) 0 1px, transparent 1.6px),
    radial-gradient(circle at 20% 90%, rgba(170, 210, 255, 0.28) 0 0.9px, transparent 1.5px),
    radial-gradient(circle at 34% 95%, rgba(95, 180, 255, 0.36) 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 49% 89%, rgba(145, 165, 255, 0.35) 0 1px, transparent 1.6px),
    radial-gradient(circle at 64% 93%, rgba(95, 220, 255, 0.34) 0 1.1px, transparent 1.8px),
    radial-gradient(circle at 80% 87%, rgba(170, 220, 255, 0.30) 0 0.9px, transparent 1.5px),
    radial-gradient(circle at 92% 96%, rgba(130, 190, 255, 0.38) 0 1.1px, transparent 1.7px);
  background-size: 160px 160px, 190px 190px, 210px 210px, 230px 230px, 180px 180px, 250px 250px, 170px 170px;
  animation: space-dots-rise 30s linear infinite;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.98), rgba(0, 0, 0, 0.60) 65%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.98), rgba(0, 0, 0, 0.60) 65%, transparent 100%);
}

@keyframes space-dots-rise {
  from {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
    opacity: 0.92;
  }

  50% {
    opacity: 1;
  }

  to {
    background-position: 0 -560px, 0 -600px, 0 -640px, 0 -680px, 0 -590px, 0 -720px, 0 -610px;
    opacity: 0.9;
  }
}

body[data-theme="ember"]::after {
  background-image:
    radial-gradient(circle at 10% 94%, rgba(255, 122, 26, 0.40) 0 1.4px, transparent 2px),
    radial-gradient(circle at 25% 88%, rgba(30, 15, 8, 0.55) 0 1.6px, transparent 2.3px),
    radial-gradient(circle at 42% 96%, rgba(255, 158, 69, 0.35) 0 1.2px, transparent 1.9px),
    radial-gradient(circle at 58% 85%, rgba(20, 10, 5, 0.50) 0 1.5px, transparent 2.2px),
    radial-gradient(circle at 75% 92%, rgba(255, 100, 20, 0.38) 0 1.3px, transparent 2px),
    radial-gradient(circle at 90% 90%, rgba(40, 20, 10, 0.48) 0 1.4px, transparent 2.1px);
  background-size: 170px 170px, 200px 200px, 160px 160px, 230px 230px, 190px 190px, 180px 180px;
  animation: ember-dots-rise 24s linear infinite;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.50) 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.50) 55%, transparent 100%);
}

@keyframes ember-dots-rise {
  from {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  }

  to {
    background-position: 0 -520px, 0 -580px, 0 -490px, 0 -630px, 0 -550px, 0 -530px;
  }
}

body[data-theme="light-soft"]::after {
  background-image:
    radial-gradient(circle at 15% 93%, rgba(100, 180, 240, 0.38) 0 1.3px, transparent 2px),
    radial-gradient(circle at 30% 87%, rgba(45, 90, 160, 0.42) 0 1.5px, transparent 2.2px),
    radial-gradient(circle at 44% 95%, rgba(120, 200, 250, 0.32) 0 1.1px, transparent 1.8px),
    radial-gradient(circle at 60% 90%, rgba(55, 100, 175, 0.38) 0 1.4px, transparent 2.1px),
    radial-gradient(circle at 76% 94%, rgba(90, 170, 230, 0.35) 0 1.2px, transparent 1.9px),
    radial-gradient(circle at 92% 86%, rgba(40, 80, 150, 0.40) 0 1.3px, transparent 2px);
  background-size: 175px 175px, 205px 205px, 155px 155px, 225px 225px, 185px 185px, 195px 195px;
  animation: light-dots-rise 26s linear infinite;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.90), rgba(0, 0, 0, 0.40) 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.90), rgba(0, 0, 0, 0.40) 55%, transparent 100%);
}

@keyframes light-dots-rise {
  from {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  }

  to {
    background-position: 0 -540px, 0 -590px, 0 -500px, 0 -640px, 0 -560px, 0 -520px;
  }
}

body[data-theme="ocean-deep"]::after {
  background-image:
    radial-gradient(circle at 10% 95%, rgba(0, 212, 170, 0.40) 0 1.3px, transparent 2px),
    radial-gradient(circle at 24% 88%, rgba(0, 200, 255, 0.35) 0 1.5px, transparent 2.2px),
    radial-gradient(circle at 40% 93%, rgba(80, 230, 200, 0.32) 0 1.1px, transparent 1.8px),
    radial-gradient(circle at 55% 86%, rgba(0, 180, 220, 0.36) 0 1.4px, transparent 2.1px),
    radial-gradient(circle at 72% 95%, rgba(0, 232, 212, 0.34) 0 1.2px, transparent 1.9px),
    radial-gradient(circle at 88% 89%, rgba(50, 200, 240, 0.30) 0 1.3px, transparent 2px);
  background-size: 165px 165px, 195px 195px, 215px 215px, 235px 235px, 175px 175px, 205px 205px;
  animation: ocean-dots-rise 28s linear infinite;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.50) 58%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.50) 58%, transparent 100%);
}

@keyframes ocean-dots-rise {
  from {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  }

  to {
    background-position: 0 -550px, 0 -610px, 0 -480px, 0 -660px, 0 -570px, 0 -530px;
  }
}

body[data-theme="sakura"]::after {
  background-image:
    radial-gradient(circle at 14% 92%, rgba(255, 180, 210, 0.40) 0 1.4px, transparent 2.1px),
    radial-gradient(circle at 28% 86%, rgba(255, 240, 245, 0.30) 0 1.1px, transparent 1.7px),
    radial-gradient(circle at 43% 94%, rgba(255, 126, 179, 0.36) 0 1.3px, transparent 2px),
    radial-gradient(circle at 59% 88%, rgba(255, 220, 235, 0.28) 0 1px, transparent 1.6px),
    radial-gradient(circle at 74% 95%, rgba(200, 128, 255, 0.34) 0 1.2px, transparent 1.9px),
    radial-gradient(circle at 90% 84%, rgba(255, 160, 200, 0.32) 0 1.4px, transparent 2.1px);
  background-size: 180px 180px, 200px 200px, 165px 165px, 220px 220px, 190px 190px, 175px 175px;
  animation: sakura-dots-rise 25s linear infinite;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.48) 56%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.48) 56%, transparent 100%);
}

@keyframes sakura-dots-rise {
  from {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  }

  to {
    background-position: 0 -510px, 0 -570px, 0 -480px, 0 -620px, 0 -540px, 0 -500px;
  }
}

body[data-theme="matrix"]::after {
  background-image:
    radial-gradient(circle at 12% 94%, rgba(0, 255, 65, 0.42) 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 26% 87%, rgba(0, 180, 40, 0.35) 0 1px, transparent 1.6px),
    radial-gradient(circle at 40% 96%, rgba(0, 255, 100, 0.38) 0 1.3px, transparent 2px),
    radial-gradient(circle at 56% 84%, rgba(0, 200, 55, 0.32) 0 1.1px, transparent 1.7px),
    radial-gradient(circle at 70% 93%, rgba(0, 255, 65, 0.36) 0 1.2px, transparent 1.9px),
    radial-gradient(circle at 86% 90%, rgba(0, 220, 70, 0.30) 0 1px, transparent 1.6px),
    radial-gradient(circle at 50% 97%, rgba(50, 255, 120, 0.34) 0 1.1px, transparent 1.7px);
  background-size: 150px 150px, 180px 180px, 200px 200px, 220px 220px, 170px 170px, 240px 240px, 160px 160px;
  animation: matrix-dots-rise 20s linear infinite;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.98), rgba(0, 0, 0, 0.55) 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.98), rgba(0, 0, 0, 0.55) 60%, transparent 100%);
}

@keyframes matrix-dots-rise {
  from {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  }

  to {
    background-position: 0 -600px, 0 -660px, 0 -540px, 0 -720px, 0 -640px, 0 -570px, 0 -680px;
  }
}

body[data-theme="arctic"]::after {
  background-image:
    radial-gradient(circle at 11% 93%, rgba(77, 168, 218, 0.35) 0 1.2px, transparent 1.8px),
    radial-gradient(circle at 27% 85%, rgba(180, 210, 230, 0.40) 0 1.4px, transparent 2.1px),
    radial-gradient(circle at 42% 96%, rgba(100, 160, 210, 0.32) 0 1.1px, transparent 1.7px),
    radial-gradient(circle at 58% 88%, rgba(200, 225, 240, 0.38) 0 1.3px, transparent 2px),
    radial-gradient(circle at 73% 94%, rgba(77, 140, 200, 0.34) 0 1.2px, transparent 1.9px),
    radial-gradient(circle at 89% 87%, rgba(160, 200, 230, 0.36) 0 1.4px, transparent 2.1px);
  background-size: 170px 170px, 200px 200px, 155px 155px, 225px 225px, 185px 185px, 210px 210px;
  animation: arctic-dots-rise 28s linear infinite;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.38) 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.38) 55%, transparent 100%);
}

@keyframes arctic-dots-rise {
  from {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  }

  to {
    background-position: 0 -480px, 0 -540px, 0 -460px, 0 -580px, 0 -510px, 0 -490px;
  }
}

body[data-theme="sunset-glow"]::after {
  background-image:
    radial-gradient(circle at 13% 91%, rgba(255, 140, 66, 0.40) 0 1.4px, transparent 2.1px),
    radial-gradient(circle at 29% 85%, rgba(255, 180, 100, 0.35) 0 1.2px, transparent 1.9px),
    radial-gradient(circle at 44% 94%, rgba(255, 80, 80, 0.34) 0 1.3px, transparent 2px),
    radial-gradient(circle at 60% 87%, rgba(255, 200, 140, 0.30) 0 1.1px, transparent 1.7px),
    radial-gradient(circle at 76% 93%, rgba(212, 122, 245, 0.36) 0 1.3px, transparent 2px),
    radial-gradient(circle at 91% 88%, rgba(255, 160, 90, 0.33) 0 1.4px, transparent 2.1px);
  background-size: 175px 175px, 205px 205px, 160px 160px, 230px 230px, 185px 185px, 195px 195px;
  animation: sunset-dots-rise 24s linear infinite;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.48) 56%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.48) 56%, transparent 100%);
}

@keyframes sunset-dots-rise {
  from {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  }

  to {
    background-position: 0 -530px, 0 -590px, 0 -500px, 0 -640px, 0 -560px, 0 -520px;
  }
}

@keyframes mesh-drift {
  0% {
    filter: hue-rotate(0deg);
    opacity: 1;
  }

  50% {
    opacity: 0.85;
  }

  100% {
    filter: hue-rotate(8deg);
    opacity: 1;
  }
}

/* ─── Floating Orbs ─── */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.orb-1 {
  width: 500px;
  height: 500px;
  top: -15%;
  left: 10%;
  background: rgba(var(--accent-rgb), 0.07);
  animation: orb-float-1 28s ease-in-out infinite alternate;
}

.orb-2 {
  width: 400px;
  height: 400px;
  top: 50%;
  right: -5%;
  background: rgba(var(--accent-2-rgb), 0.07);
  animation: orb-float-2 32s ease-in-out infinite alternate;
}

.orb-3 {
  width: 350px;
  height: 350px;
  bottom: -10%;
  left: 30%;
  background: rgba(var(--accent-3-rgb), 0.07);
  animation: orb-float-3 25s ease-in-out infinite alternate;
}

@keyframes orb-float-1 {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(60px, 40px) scale(1.15);
  }
}

@keyframes orb-float-2 {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(-50px, -60px) scale(1.1);
  }
}

@keyframes orb-float-3 {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(40px, -30px) scale(1.2);
  }
}

/* ─── Glass Panel ─── */
.glass-panel {
  background: linear-gradient(135deg, var(--glass-grad-start) 0%, var(--glass-grad-end) 100%);
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  border: 1px solid var(--panel-border);
  box-shadow: 0 1px 0 var(--panel-inset-border) inset, 0 4px 24px -4px var(--panel-shadow);
}

/* ─── Premium Card ─── */
.premium-card {
  position: relative;
  background: linear-gradient(160deg, var(--card-grad-start) 0%, var(--card-grad-end) 100%);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-md);
  box-shadow:
    0 1px 0 var(--panel-inset-border) inset,
    0 4px 24px -4px var(--panel-shadow),
    0 0 0 0.5px var(--panel-inset-border);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  padding: 20px;
  z-index: 1;
}

.premium-card:hover {
  border-color: rgba(var(--accent-rgb), 0.24);
  box-shadow:
    0 1px 0 var(--panel-inset-border) inset,
    0 8px 32px -8px rgba(var(--accent-rgb), 0.16),
    0 4px 20px -4px var(--panel-shadow);
}

/* ─── Top Bar ─── */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  border-top: none;
  border-left: none;
  border-right: none;
  border-bottom: 1px solid var(--border);
}

.top-bar__left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo__icon {
  font-size: 20px;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.4);
}

.logo__text {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--text-primary);
}

.logo__badge {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--cyan);
  background: rgba(var(--accent-rgb), 0.10);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  padding: 2px 6px;
  border-radius: 4px;
}

.live-dot-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bull);
  box-shadow: 0 0 8px rgba(var(--live-glow-rgb), 0.5);
  animation: pulse-glow 2s ease-in-out infinite;
}

.live-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--bull);
}

@keyframes pulse-glow {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 8px rgba(var(--live-glow-rgb), 0.5);
  }

  50% {
    opacity: 0.5;
    box-shadow: 0 0 4px rgba(var(--live-glow-rgb), 0.3);
  }
}

/* ─── Navigation ─── */
.top-bar__nav {
  display: flex;
  gap: 4px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.nav-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.nav-btn.active {
  color: var(--cyan);
  background: rgba(var(--accent-rgb), 0.12);
}

.nav-btn svg {
  flex-shrink: 0;
}

/* ─── Top Bar Right ─── */
.top-bar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ─── Settings Panel ─── */
.settings-panel {
  position: fixed;
  top: 68px;
  right: 24px;
  z-index: 130;
  width: min(320px, calc(100vw - 48px));
  border-radius: var(--radius-md);
  padding: 14px;
  display: grid;
  gap: 14px;
}

.settings-panel[hidden] {
  display: none !important;
}

.settings-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: transparent;
}

.settings-backdrop[hidden] {
  display: none;
}

.settings-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.settings-panel__header h3 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.settings-group {
  display: grid;
  gap: 8px;
}

.settings-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.settings-select {
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

#timezoneSaveBtn {
  width: 100%;
  padding: 8px 10px;
  font-size: 12px;
}

#timezoneStatus {
  min-height: 16px;
}

.settings-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.segment-btn {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
}

.segment-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.22);
}

.segment-btn.active {
  color: var(--cyan);
  border-color: rgba(var(--accent-rgb), 0.40);
  background: rgba(var(--accent-rgb), 0.12);
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all 0.2s;
}

.icon-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.icon-btn.spin svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.wallet-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(var(--accent-rgb), 0.10);
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  font-size: 11px;
  font-weight: 500;
  color: var(--cyan);
}

.wallet-badge__count {
  font-family: var(--font-mono);
  font-weight: 700;
}

/* ─── Main Content ─── */
.main-content {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}

/* ─── Pages ─── */
.page {
  display: none;
}

.page.active {
  display: block;
  animation: page-in 0.35s ease-out;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.swap-frame-wrap {
  padding: 0;
  overflow: hidden;
}

.swap-frame {
  width: 100%;
  height: calc(100vh - 120px);
  min-height: 680px;
  border: 0;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
}

body.page-swap-active .main-content {
  max-width: none;
  height: calc(100vh - 56px - 32px);
  padding: 8px;
  overflow: hidden;
}

body.page-swap-active #page-swap {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

body.page-swap-active .swap-frame-wrap {
  flex: 1;
  display: flex;
  border-radius: 14px;
  min-height: 0;
}

body.page-swap-active .swap-frame {
  flex: 1;
  height: 100%;
  min-height: 0;
  border-radius: 14px;
}

/* ─── Section Headers ─── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 32px 0 16px;
}

.wallet-command-spacer {
  height: 18px;
}

.section-header:first-child {
  margin-top: 0;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.section-subtitle {
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.holdings-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 0;
}

.holdings-tools .glass-input {
  flex: 0 0 auto;
  font-size: 11px;
  padding: 7px 10px;
}

.holdings-search {
  width: 170px;
}

.holdings-select {
  width: 100px;
}

.holdings-toggle {
  font-size: 11px;
}

/* ─── Metric Grid ─── */
.metric-grid,
.terminal-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.metric-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, rgba(15, 17, 30, 0.50) 0%, rgba(10, 12, 22, 0.55) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.25s;
  animation: fade-in-up 0.4s ease-out both;
}

.metric-tile:nth-child(1) {
  animation-delay: 0s;
}

.metric-tile:nth-child(2) {
  animation-delay: 0.04s;
}

.metric-tile:nth-child(3) {
  animation-delay: 0.08s;
}

.metric-tile:nth-child(4) {
  animation-delay: 0.12s;
}

.metric-tile:nth-child(5) {
  animation-delay: 0.16s;
}

.metric-tile:nth-child(6) {
  animation-delay: 0.20s;
}

.metric-tile:nth-child(7) {
  animation-delay: 0.24s;
}

.metric-tile:nth-child(8) {
  animation-delay: 0.28s;
}

.metric-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.10);
}

.metric-tile__icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 16px;
  flex-shrink: 0;
}

.metric-tile__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.metric-tile__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.metric-tile__value {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

/* Metric accent variants */
[data-accent="cyan"] .metric-tile__icon {
  background: rgba(0, 229, 255, 0.08);
  color: var(--cyan);
}

[data-accent="lime"] .metric-tile__icon {
  background: rgba(184, 255, 87, 0.08);
  color: var(--lime);
}

[data-accent="amber"] .metric-tile__icon {
  background: rgba(255, 171, 64, 0.08);
  color: var(--amber);
}

[data-accent="violet"] .metric-tile__icon {
  background: rgba(124, 77, 255, 0.08);
  color: var(--violet);
}

[data-accent="magenta"] .metric-tile__icon {
  background: rgba(224, 64, 251, 0.08);
  color: var(--magenta);
}

[data-accent="bull"] .metric-tile__icon {
  background: rgba(0, 230, 118, 0.08);
  color: var(--bull);
}

[data-accent="bear"] .metric-tile__icon {
  background: rgba(255, 23, 68, 0.08);
  color: var(--bear);
}

[data-accent="cyan"] .metric-tile__value {
  color: var(--cyan);
}

[data-accent="lime"] .metric-tile__value {
  color: var(--lime);
}

[data-accent="amber"] .metric-tile__value {
  color: var(--amber);
}

[data-accent="violet"] .metric-tile__value {
  color: var(--violet);
}

[data-accent="magenta"] .metric-tile__value {
  color: var(--magenta);
}

[data-accent="bull"] .metric-tile__value {
  color: var(--bull);
}

[data-accent="bear"] .metric-tile__value {
  color: var(--bear);
}

/* ─── Two Column Grid ─── */
.two-col-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: start;
  gap: 16px;
  margin-bottom: 8px;
}

.card-2span {
  grid-column: span 1;
}

.wallets-row {
  grid-template-columns: 1fr;
}

/* ─── Card Internals ─── */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* ─── Range Pills ─── */
.range-pills {
  display: flex;
  gap: 4px;
}

.pill {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: all 0.2s;
}

.pill:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
}

.pill.active {
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.06);
  border-color: rgba(0, 229, 255, 0.15);
}

/* ─── Allocation Module ─── */
.allocation-card {
  overflow: hidden;
}

.alloc-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.alloc-focus-btn {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.alloc-focus-btn:hover {
  border-color: rgba(0, 229, 255, 0.34);
  color: var(--text-primary);
}

.alloc-focus-btn.active {
  border-color: rgba(0, 229, 255, 0.48);
  background: rgba(0, 229, 255, 0.12);
  color: var(--cyan);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.24) inset, 0 0 20px rgba(0, 229, 255, 0.2);
}

.allocation-card.focus-mode .alloc-canvas {
  border-color: transparent;
  box-shadow: none;
}

.alloc-style-pills {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

.alloc-style-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.alloc-style-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 229, 255, 0.3);
  background: rgba(0, 229, 255, 0.08);
}

.alloc-style-btn.active {
  border-color: rgba(0, 229, 255, 0.45);
  background: radial-gradient(circle at 30% 20%, rgba(0, 229, 255, 0.3), rgba(0, 229, 255, 0.08));
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.2) inset, 0 0 18px rgba(0, 229, 255, 0.28);
}

.alloc-canvas {
  width: 100%;
  height: 300px;
  border-radius: 12px;
  border: none;
  background: transparent;
  margin-bottom: 12px;
  touch-action: none;
  cursor: crosshair;
}

.alloc-canvas:focus-visible {
  outline: 1px solid rgba(0, 229, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.14);
}

.alloc-tooltip {
  position: absolute;
  z-index: 5;
  min-width: 148px;
  border-radius: 12px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  background: linear-gradient(165deg, rgba(9, 20, 33, 0.95), rgba(8, 13, 28, 0.96));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  padding: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.alloc-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.alloc-tooltip__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.alloc-tooltip__symbol {
  font-weight: 700;
  font-size: 12px;
  color: var(--text-primary);
}

.alloc-tooltip__rank {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 999px;
  padding: 1px 7px;
}

.alloc-tooltip__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.alloc-tooltip__row strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 600;
}

.alloc-insights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.alloc-spotlight {
  display: none;
  border: 1px solid rgba(0, 229, 255, 0.22);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
  background: linear-gradient(160deg, rgba(0, 229, 255, 0.07), rgba(124, 77, 255, 0.05));
}

.alloc-spotlight.visible {
  display: block;
}

.alloc-spotlight__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.alloc-spotlight__head strong {
  font-size: 13px;
  color: var(--text-primary);
}

.alloc-spotlight__head span {
  font-size: 11px;
  color: var(--text-secondary);
}

.alloc-spotlight__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.alloc-spotlight__item {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  padding: 7px 8px;
  background: rgba(4, 8, 17, 0.55);
}

.alloc-spotlight__item label {
  display: block;
  font-size: 10px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.alloc-spotlight__item strong {
  display: block;
  margin-top: 2px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
}

.alloc-spotlight__story {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.4;
}

.alloc-insight-pill {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  min-height: 54px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.alloc-insight-pill.active {
  border-color: rgba(0, 229, 255, 0.36);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.15) inset;
}

.alloc-insight-label {
  color: var(--text-tertiary);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.alloc-insight-val {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
}

.alloc-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.alloc-legend-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  color: inherit;
  text-align: left;
  width: 100%;
  padding: 8px 9px;
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.alloc-legend-item:hover {
  transform: translateY(-1px);
  border-color: var(--alloc-row, var(--cyan));
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.alloc-legend-item.is-active,
.alloc-legend-item.is-locked {
  border-color: var(--alloc-row, var(--cyan));
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.2) inset,
    0 10px 22px rgba(0, 0, 0, 0.24);
}

.alloc-legend-main,
.alloc-legend-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.alloc-legend-main {
  margin-bottom: 5px;
}

.alloc-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 0 12px rgba(0, 229, 255, 0.35);
  flex-shrink: 0;
}

.alloc-sym {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 600;
  flex: 1;
}

.alloc-rank {
  font-size: 10px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.alloc-pct,
.alloc-val {
  font-family: var(--font-mono);
  font-size: 11px;
}

.alloc-pct {
  color: var(--text-primary);
}

.alloc-val {
  color: var(--text-secondary);
}

.alloc-share-rail {
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  margin-top: 6px;
  overflow: hidden;
}

.alloc-share-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.34);
}

/* ─── Net Worth Hero ─── */
.net-worth-hero {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.net-worth-value {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.net-worth-change {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}

.net-worth-change.up {
  color: var(--bull);
}

.net-worth-change.down {
  color: var(--bear);
}

/* ─── Chart Canvas ─── */
.chart-canvas {
  width: 100%;
  height: 260px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.008));
  touch-action: none;
  cursor: crosshair;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nw-insights {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.nw-insight-chip {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nw-insight-chip__label {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.nw-insight-chip__value {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.nw-chart-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 110px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: linear-gradient(160deg, rgba(12, 20, 36, 0.92) 0%, rgba(6, 12, 22, 0.92) 100%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--panel-inset-border) inset;
  backdrop-filter: blur(8px);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.14s ease, transform 0.14s ease;
  z-index: 4;
}

.nw-chart-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.nw-chart-tooltip__time {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.nw-chart-tooltip__value {
  font-size: 13px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 600;
}

/* ─── Net Worth Fullscreen Button ─── */
.nw-fullscreen-btn {
  margin-left: 8px;
}

/* ─── Net Worth Fullscreen Overlay ─── */
.nw-fs-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  padding: 16px;
  animation: nw-fs-in 0.25s ease-out;
}

.nw-fs-overlay[hidden] {
  display: none !important;
}

.nw-fs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.nw-fs-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.nw-fs-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nw-fs-close {
  color: var(--text-secondary);
}

.nw-fs-close:hover {
  color: var(--text-primary);
}

.nw-fs-hero {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.nw-fs-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.nw-fs-change {
  font-size: 14px;
  font-weight: 500;
  color: var(--lime);
}

.nw-fs-chart-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
}

.nw-fs-chart-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.nw-chart-tooltip--fs {
  z-index: 10;
}

@keyframes nw-fs-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ─── Wallet Section ─── */
.wallet-form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.wallet-form.hidden {
  display: none;
}

.glass-input {
  flex: 1;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  transition: border-color 0.2s;
}

.glass-input:focus {
  border-color: var(--border-accent);
  outline: none;
}

.glass-input::placeholder {
  color: var(--text-tertiary);
}

.btn-accent {
  padding: 8px 16px;
  background: rgba(0, 229, 255, 0.10);
  border: 1px solid rgba(0, 229, 255, 0.20);
  border-radius: var(--radius-sm);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-accent:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: rgba(0, 229, 255, 0.30);
}

.btn-small {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.12);
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-small:hover {
  background: rgba(0, 229, 255, 0.10);
}

#portfolioScoreCard {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.score-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.25);
  background: rgba(0, 229, 255, 0.08);
}

.score-badge[data-state="partial"] {
  color: var(--amber);
  border-color: rgba(255, 171, 64, 0.35);
  background: rgba(255, 171, 64, 0.12);
}

.score-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.score-ring {
  --score: 0;
  --score-color: var(--text-tertiary);
  --ring-thickness: 12px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: transparent;
  position: relative;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 10px 24px -12px rgba(var(--accent-rgb), 0.45),
    0 0 24px -10px rgba(var(--accent-rgb), 0.85),
    0 0 42px -22px var(--score-color);
  animation: score-ring-neon 3.2s ease-in-out infinite;
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--score-color) calc(var(--score) * 1%), rgba(255, 255, 255, 0.12) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--ring-thickness)), #000 calc(100% - var(--ring-thickness)));
  mask: radial-gradient(farthest-side, transparent calc(100% - var(--ring-thickness)), #000 calc(100% - var(--ring-thickness)));
  filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), 0.55));
}

.score-ring::after {
  content: "";
  position: absolute;
  inset: calc(var(--ring-thickness) + 4px);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.015);
}

.score-core {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.score-value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
}

.score-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.score-meta {
  display: grid;
  gap: 7px;
}

.score-profile-spotlight {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  background: linear-gradient(150deg, rgba(var(--accent-rgb), 0.14), rgba(var(--accent-rgb), 0.04));
  box-shadow: 0 10px 24px -16px rgba(var(--accent-rgb), 0.60);
}

.score-profile-spotlight__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.score-profile-spotlight__summary {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.score-meta__line {
  font-size: 13px;
  color: var(--text-primary);
}

.score-meta__sub {
  color: var(--text-secondary);
}

@keyframes score-ring-neon {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset,
      0 10px 24px -12px rgba(var(--accent-rgb), 0.45),
      0 0 18px -10px rgba(var(--accent-rgb), 0.65),
      0 0 34px -24px var(--score-color);
  }

  50% {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10) inset,
      0 12px 28px -12px rgba(var(--accent-rgb), 0.52),
      0 0 28px -10px rgba(var(--accent-rgb), 0.95),
      0 0 48px -18px var(--score-color);
  }
}

.score-breakdown {
  display: grid;
  gap: 8px;
}

.score-factor {
  display: grid;
  gap: 5px;
}

.score-factor__meta {
  display: flex;
  justify-content: flex-end;
}

.score-factor__state {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--text-tertiary);
}

.score-factor__state--ready {
  color: var(--bull);
  border-color: rgba(116, 255, 214, 0.35);
  background: rgba(116, 255, 214, 0.08);
}

.score-factor__state--degraded {
  color: var(--amber);
  border-color: rgba(255, 171, 64, 0.30);
  background: rgba(255, 171, 64, 0.08);
}

.score-factor__state--unavailable {
  color: var(--text-secondary);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.score-factor__reason {
  font-size: 10px;
  color: var(--text-tertiary);
  line-height: 1.35;
}

.score-factor--degraded .score-factor__bar span {
  opacity: 0.78;
}

.score-factor--unavailable .score-factor__bar span {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.24));
  opacity: 0.6;
}

.score-factor__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-secondary);
}

.score-factor__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.score-factor__info {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  transition: all 0.2s;
}

.score-factor__info:hover,
.score-factor__info:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.55);
  color: var(--text-primary);
  background: rgba(var(--accent-rgb), 0.16);
  outline: none;
}

.score-factor-tooltip {
  position: absolute;
  z-index: 7;
  max-width: 280px;
  padding: 10px 11px;
  border-radius: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  background: linear-gradient(165deg, rgba(18, 9, 32, 0.95) 0%, rgba(10, 6, 20, 0.95) 100%);
  box-shadow: 0 8px 26px -10px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  opacity: 0;
  transform: translateY(3px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.score-factor-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.score-factor-tooltip__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.score-factor-tooltip__body {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-secondary);
}

.score-factor-tooltip__source {
  margin-top: 7px;
  font-size: 10px;
  color: var(--text-tertiary);
}

.score-factor__head strong {
  color: var(--text-primary);
  font-size: 12px;
}

.score-factor__bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.score-factor__bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  width: var(--w, 0%);
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.65), rgba(var(--accent-2-rgb), 0.88));
}

.score-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.score-panel {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  padding: 10px;
}

.score-panel__title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 7px;
}

.score-panel__list {
  display: grid;
  gap: 6px;
}

.score-note {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.score-note strong {
  color: var(--text-primary);
  font-weight: 600;
}

.wallet-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
}

.wallet-hub-card {
  margin-top: 4px;
}

.wallet-form--expanded {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) auto;
  gap: 8px;
  margin-bottom: 12px;
}

.wallet-hub {
  display: grid;
  gap: 12px;
}

.wallet-hub__top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  --wallet-card-row-height: 172px;
  max-height: calc((var(--wallet-card-row-height) * 3) + (2 * 10px));
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  scrollbar-gutter: stable;
}

.wallet-hub__overflow-wrap {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
  padding: 8px;
}

.wallet-hub__overflow-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  padding: 0 2px;
}

.wallet-hub__overflow {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.wallet-intel-card {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  padding: 10px;
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  gap: 8px;
  min-height: var(--wallet-card-row-height);
  overflow: hidden;
}

.wallet-intel-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.wallet-intel-card__identity {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.wallet-alias-btn {
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  padding: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wallet-alias-btn:hover {
  color: var(--cyan);
}

.wallet-intel-card__score {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: conic-gradient(var(--cyan) calc(var(--score, 0) * 1%), rgba(255, 255, 255, 0.12) 0);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.wallet-intel-card__score span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-primary);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  color: var(--text-primary);
}

.wallet-intel-card__stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.wallet-intel-card__stats>div {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  padding: 6px;
  display: grid;
  gap: 2px;
}

.wallet-intel-card__stats label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

.wallet-intel-card__stats strong {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.wallet-intel-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}

.wallet-copy-btn {
  border: 1px solid rgba(var(--accent-rgb), 0.55);
  color: var(--cyan);
  background: rgba(var(--accent-rgb), 0.12);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  margin-left: 0;
  flex: 0 1 auto;
  max-width: 100%;
}

.wallet-copy-btn:hover {
  background: rgba(var(--accent-rgb), 0.2);
}

.wallet-item--compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.wallet-item__main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.wallet-item__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wallet-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.2s;
}

.wallet-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.wallet-addr {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.wallet-usd {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan);
}

.wallet-remove {
  font-size: 14px;
  color: var(--text-tertiary);
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
  white-space: nowrap;
  flex: 0 0 auto;
}

.wallet-remove:hover {
  color: var(--bear);
  background: rgba(255, 23, 68, 0.08);
}

/* ─── Data Table ─── */
.table-card {
  padding: 0;
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  font-size: 13px;
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.data-table th {
  padding: 12px 14px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  background: rgba(10, 12, 22, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table th.col-price,
.data-table th.col-num,
.data-table th.col-pct {
  text-align: right;
  font-family: var(--font-mono);
}

.data-table th.sortable {
  cursor: pointer;
  transition: color 0.2s;
}

.data-table th.sortable:hover {
  color: var(--cyan);
}

.data-table th.sorted {
  color: var(--cyan);
}

.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.025);
  white-space: nowrap;
}

.data-table tbody tr {
  transition: background 0.15s;
}

.data-table tbody tr:hover {
  background: rgba(0, 229, 255, 0.02);
}

.col-price,
.col-num,
.col-pct {
  text-align: right;
  font-family: var(--font-mono);
}

.col-status {
  text-align: center;
}

/* Token cell */
.token-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.token-icon-wrap {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.token-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.token-icon-wrap .token-letter {
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan);
}

.token-name {
  font-weight: 600;
  font-size: 13px;
}

.token-symbol {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-left: 6px;
}

/* Value colors */
.val-bull {
  color: var(--bull);
}

.val-bear {
  color: var(--bear);
}

.val-muted {
  color: var(--text-tertiary);
}

.net-worth-change.loading {
  color: var(--text-tertiary);
  font-style: italic;
}

/* ─── Rewards Grid ─── */
.rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.reward-card {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, rgba(15, 17, 30, 0.50) 0%, rgba(10, 12, 22, 0.55) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.25s;
  animation: fade-in-up 0.4s ease-out both;
}

.reward-card:nth-child(1) {
  animation-delay: 0s;
}

.reward-card:nth-child(2) {
  animation-delay: 0.06s;
}

.reward-card:nth-child(3) {
  animation-delay: 0.12s;
}

.reward-card:nth-child(4) {
  animation-delay: 0.18s;
}

.reward-card:nth-child(5) {
  animation-delay: 0.24s;
}

.reward-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.10);
}

.reward-card__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.reward-card__value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
}

.reward-card__sub {
  font-size: 11px;
  color: var(--text-tertiary);
}

.reward-card[data-accent="cyan"] .reward-card__value {
  color: var(--cyan);
}

.reward-card[data-accent="cyan"] {
  border-color: rgba(0, 229, 255, 0.10);
}

.reward-card[data-accent="violet"] .reward-card__value {
  color: var(--violet);
}

.reward-card[data-accent="violet"] {
  border-color: rgba(124, 77, 255, 0.10);
}

.reward-card[data-accent="lime"] .reward-card__value {
  color: var(--lime);
}

.reward-card[data-accent="lime"] {
  border-color: rgba(184, 255, 87, 0.10);
}

.reward-card[data-accent="amber"] .reward-card__value {
  color: var(--amber);
}

.reward-card[data-accent="amber"] {
  border-color: rgba(255, 171, 64, 0.10);
}

.reward-card[data-accent="magenta"] .reward-card__value {
  color: var(--magenta);
}

.reward-card[data-accent="magenta"] {
  border-color: rgba(224, 64, 251, 0.10);
}

/* ─── P&L Calendar ─── */
.pnl-month-label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 12px;
}

.cal-header {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 4px 0 8px;
}

.cal-day {
  min-height: 86px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  transition: all 0.2s;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px;
}

.cal-day:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.2);
}

.cal-day.future {
  color: var(--text-tertiary);
  opacity: 0.45;
  background: rgba(255, 255, 255, 0.02);
}

.cal-day.empty {
  visibility: hidden;
}

.cal-day.today {
  border-color: rgba(0, 229, 255, 0.20);
  box-shadow: inset 0 0 0 1px rgba(0, 229, 255, 0.12);
}

.cal-day__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cal-day__num {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.cal-day__dow {
  font-size: 9px;
  color: var(--text-tertiary);
  letter-spacing: 0.4px;
}

.cal-day__body {
  display: grid;
  gap: 2px;
}

.cal-day__note-row {
  margin-top: 2px;
}

.cal-day__note-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 2px 7px;
  cursor: pointer;
}

.cal-day__note-btn:hover {
  color: var(--text-primary);
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.12);
}

.cal-day__note-preview {
  margin-top: 2px;
  font-size: 8px;
  line-height: 1.25;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cal-day__amt {
  font-size: 11px;
  font-weight: 700;
}

.cal-day__pct {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.92;
}

.cal-day__net {
  font-size: 9px;
  color: var(--text-secondary);
}

.cal-day__empty {
  font-size: 10px;
  color: var(--text-tertiary);
}

.cal-day__pnl {
  font-size: 9px;
  font-weight: 600;
}

.cal-day.gain {
  background: rgba(0, 230, 118, 0.08);
  color: var(--bull);
}

.cal-day.loss {
  background: rgba(255, 23, 68, 0.08);
  color: var(--bear);
}

.cal-day.flat {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.cal-day.nodata {
  background: rgba(255, 255, 255, 0.03);
}

/* ─── Staking Grid ─── */
.staking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.staking-grid.staking-grid--rows {
  display: block;
}

.staking-rows-wrap {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(160deg, rgba(15, 17, 30, 0.50) 0%, rgba(10, 12, 22, 0.55) 100%);
}

.staking-rows-table .col-token,
.staking-rows-table .col-num,
.staking-rows-table .col-pct {
  white-space: nowrap;
}

.stake-card {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, rgba(15, 17, 30, 0.50) 0%, rgba(10, 12, 22, 0.55) 100%);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.25s;
  animation: fade-in-up 0.3s ease-out both;
}

.stake-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 229, 255, 0.12);
}

.stake-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stake-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stake-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stake-card__name {
  font-weight: 600;
  font-size: 14px;
}

.stake-card__platform {
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.stake-card__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stake-card__label {
  font-size: 11px;
  color: var(--text-tertiary);
}

.stake-card__val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.stake-card__val.accent {
  color: var(--cyan);
}

.stake-card__val.reward {
  color: var(--lime);
}

/* ─── Range Status Badge ─── */
.range-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.range-badge.in-range {
  background: rgba(0, 230, 118, 0.08);
  color: var(--bull);
  border: 1px solid rgba(0, 230, 118, 0.15);
}

.range-badge.out-range {
  background: rgba(255, 23, 68, 0.08);
  color: var(--bear);
  border: 1px solid rgba(255, 23, 68, 0.15);
}

.range-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ─── Status Bar ─── */
.status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 11px;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border);
  border-bottom: none;
  border-left: none;
  border-right: none;
}

.status-bar__left,
.status-bar__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-dot.green {
  background: var(--bull);
  box-shadow: 0 0 6px rgba(0, 230, 118, 0.4);
}

.status-dot.red {
  background: var(--bear);
}

.status-dot.amber {
  background: var(--amber);
}

/* ─── Toggle Switch ─── */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}

.toggle-input {
  display: none;
}

.toggle-switch {
  width: 32px;
  height: 18px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
  transition: background 0.2s;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-tertiary);
  transition: all 0.2s;
}

.toggle-input:checked+.toggle-switch {
  background: rgba(0, 229, 255, 0.15);
}

.toggle-input:checked+.toggle-switch::after {
  transform: translateX(14px);
  background: var(--cyan);
}

/* ─── Empty State ─── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-tertiary);
  font-size: 13px;
}

.wallet-name {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
  font-weight: 600;
}

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  --activity-row-height: 118px;
  max-height: calc((var(--activity-row-height) * 8) + (7 * 10px));
  height: 100%;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  padding-bottom: 4px;
}

.alloc-activity-row {
  align-items: stretch;
}

.alloc-activity-row>.premium-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.activity-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: flex-start;
  min-height: var(--activity-row-height);
  padding: 12px 12px;
  border-radius: 10px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.activity-row:hover {
  border-color: var(--border-accent);
}

.activity-row--buy {
  border-left: 2px solid color-mix(in srgb, var(--bull) 70%, transparent);
}

.activity-row--sell {
  border-left: 2px solid color-mix(in srgb, var(--bear) 70%, transparent);
}

.activity-row__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--cyan) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--cyan) 26%, transparent);
}

.activity-row__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.activity-row__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.activity-row__type {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-primary);
}

.activity-row__kind {
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text-secondary) 80%, white);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 4px 6px;
}

.activity-row__pair,
.activity-row__flow,
.activity-row__qty,
.activity-row__usd,
.activity-row__outcome,
.activity-row__quality,
.activity-row__delta {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.activity-row__pair {
  color: var(--text-primary);
}

.activity-row__flow {
  color: var(--text-tertiary);
}

.activity-row__qty,
.activity-row__usd {
  font-family: var(--font-mono);
}

.activity-row__outcome {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.activity-row__outcome--success {
  color: var(--bull);
}

.activity-row__outcome--failed {
  color: var(--bear);
}

.activity-row__outcome--pending,
.activity-row__outcome--unknown {
  color: var(--amber);
}

.activity-row__quality {
  color: var(--text-tertiary);
  font-size: 10px;
}

.activity-row__delta {
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.activity-row__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.activity-row__time {
  font-size: 10px;
  color: var(--text-tertiary);
}

.activity-row__link {
  font-size: 11px;
}

.activity-feed::-webkit-scrollbar {
  width: 8px;
}

.activity-feed::-webkit-scrollbar-track {
  background: transparent;
}

.activity-feed::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text-tertiary) 65%, transparent);
  border-radius: 999px;
}

.intel-grid {
  margin-top: 4px;
}

.intel-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.intel-row,
.intel-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.intel-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.intel-badge--calm,
.intel-badge--high {
  border-color: rgba(0, 230, 118, 0.35);
  color: var(--bull);
}

.intel-badge--active,
.intel-badge--medium {
  border-color: rgba(255, 171, 64, 0.35);
  color: var(--amber);
}

.intel-badge--congested,
.intel-badge--limited,
.intel-badge--warming {
  border-color: rgba(255, 23, 68, 0.35);
  color: var(--bear);
}

.intel-profile-item {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.intel-strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.intel-sub {
  font-size: 11px;
  color: var(--text-tertiary);
}

.intel-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.intel-chip {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.22);
  color: var(--cyan);
}

.intel-risk {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}

.intel-risk--high {
  border-color: rgba(255, 23, 68, 0.35);
}

.intel-risk--medium {
  border-color: rgba(255, 171, 64, 0.35);
}

/* ─── Privacy Mode ─── */
body.privacy .privacy-sensitive {
  filter: blur(8px);
  user-select: none;
  transition: filter 0.3s;
}

body.privacy .privacy-sensitive:hover {
  filter: blur(0);
}

/* ─── Loading shimmer ─── */
.shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.03) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Account Button ─── */
.account-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s;
}

.account-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.10);
}

.account-btn.signed-in {
  color: var(--cyan);
  border-color: rgba(0, 229, 255, 0.15);
  background: rgba(0, 229, 255, 0.05);
}

.account-btn svg {
  flex-shrink: 0;
}

/* ─── Auth Overlay ─── */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 3, 6, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: auth-fade-in 0.2s ease-out;
}

.auth-overlay[hidden] {
  display: none !important;
}

@keyframes auth-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.auth-dialog {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 16px;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  animation: auth-slide-up 0.25s ease-out;
}

@keyframes auth-slide-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 20px;
  color: var(--text-tertiary);
  transition: all 0.2s;
}

.auth-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.auth-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.auth-msg {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.auth-msg.error {
  background: rgba(255, 23, 68, 0.08);
  color: var(--bear);
  border: 1px solid rgba(255, 23, 68, 0.15);
}

.auth-msg.success {
  background: rgba(0, 230, 118, 0.08);
  color: var(--bull);
  border: 1px solid rgba(0, 230, 118, 0.15);
}

.auth-msg.muted {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.auth-field span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.auth-field .glass-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
}

.auth-submit {
  width: 100%;
  padding: 11px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
}

.auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-link {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-tertiary);
  transition: color 0.2s;
}

.auth-link:hover {
  color: var(--cyan);
}

.auth-account-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.auth-account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13px;
}

.auth-account-row span {
  color: var(--text-secondary);
}

.auth-account-row strong {
  font-family: var(--font-mono);
  color: var(--cyan);
  font-weight: 600;
}

.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-buttons .btn-accent {
  width: 100%;
  text-align: center;
  padding: 11px;
  font-size: 13px;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .two-col-grid {
    grid-template-columns: 1fr;
  }

  .top-bar__nav {
    position: fixed;
    bottom: 32px;
    left: 0;
    right: 0;
    z-index: 99;
    justify-content: center;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(10, 12, 22, 0.90) 0%, rgba(6, 8, 14, 0.95) 100%);
    backdrop-filter: blur(28px);
    border-top: 1px solid var(--border);
    gap: 6px;
  }

  .nav-btn span:not(.sr-only) {
    display: none;
  }

  .nav-btn {
    padding: 10px 16px;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 16px 12px 120px;
  }

  body.page-swap-active .main-content {
    height: calc(100vh - 56px - 32px);
    padding: 8px 6px 112px;
  }

  body.page-swap-active #page-swap {
    height: 100%;
    min-height: 0;
  }

  .top-bar {
    padding: 0 12px;
  }

  .metric-grid,
  .terminal-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .rewards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .holdings-tools {
    justify-content: flex-start;
  }

  .holdings-search {
    width: 140px;
  }

  .staking-grid {
    grid-template-columns: 1fr;
  }

  .net-worth-value {
    font-size: 24px;
  }

  .swap-frame {
    height: calc(100vh - 170px);
    min-height: 620px;
  }
}

@media (max-width: 480px) {

  .metric-grid,
  .terminal-stats {
    grid-template-columns: 1fr;
  }

  .rewards-grid {
    grid-template-columns: 1fr;
  }

  .holdings-search,
  .holdings-select {
    width: 100%;
  }

  .holdings-tools {
    width: 100%;
  }

  .swap-frame {
    height: calc(100vh - 150px);
    min-height: 560px;
  }

  body.page-swap-active .main-content {
    height: calc(100vh - 56px - 32px);
    padding: 6px 4px 108px;
  }
}

/* ═══════════════════════════════════════════════════════
   MOBILE APP EXPERIENCE
   Premium app-style mobile layout with bottom nav,
   hamburger drawer, swipe gestures & page transitions
   ═══════════════════════════════════════════════════════ */

/* ── Desktop: hide mobile elements ── */
.mob-header,
.mob-nav,
.mob-drawer,
.mob-drawer-backdrop {
  display: none;
}

.mob-drawer[hidden] {
  display: none !important;
}

.mob-drawer-backdrop[hidden] {
  display: none !important;
}

@media (max-width: 768px) {

  /* ═══ Hide Desktop Elements ═══ */
  .top-bar {
    display: none !important;
  }

  .status-bar {
    display: none !important;
  }

  .orb {
    display: none !important;
  }

  /* ═══ Mobile Header ═══ */
  .mob-header {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: 56px;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
    border-top: none;
    border-left: none;
    border-right: none;
  }

  .mob-header__left {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .mob-tab-pill {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--cyan);
    background: rgba(var(--accent-rgb), 0.10);
    border: 1px solid rgba(var(--accent-rgb), 0.25);
    text-shadow: 0 0 6px rgba(var(--accent-rgb), 0.4);
  }

  .mob-status-dot {
    display: flex;
    align-items: center;
  }

  .mob-hamburger {
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
  }

  .mob-hamburger:active {
    background: rgba(255, 255, 255, 0.06);
  }

  .mob-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
  }

  .mob-hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: var(--cyan);
  }

  .mob-hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .mob-hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: var(--cyan);
  }

  /* ═══ Mobile Bottom Nav ═══ */
  .mob-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: 72px;
    align-items: stretch;
    justify-content: space-around;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    border-bottom: none;
    border-left: none;
    border-right: none;
  }

  .mob-nav__btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 2px 8px;
    position: relative;
    color: var(--text-tertiary);
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    border: none;
    background: none;
  }

  .mob-nav__btn span {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: color 0.3s;
  }

  .mob-nav__btn svg {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Active indicator bar */
  .mob-nav__btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 32px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--cyan);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.6);
  }

  .mob-nav__btn.active {
    color: var(--cyan);
  }

  .mob-nav__btn.active::before {
    transform: translateX(-50%) scaleX(1);
  }

  .mob-nav__btn.active svg {
    transform: translateY(-2px);
    filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.5));
  }

  .mob-nav__btn:active {
    transform: scale(0.92);
    transition: transform 0.1s;
  }

  /* Center button elevated ring */
  .mob-nav__btn--center {
    margin-top: -8px;
  }

  .mob-nav__center-ring {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.12), rgba(var(--accent-2-rgb), 0.08));
    border: 1.5px solid rgba(var(--accent-rgb), 0.22);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px -4px rgba(var(--accent-rgb), 0.25);
  }

  .mob-nav__btn--center.active .mob-nav__center-ring {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.22), rgba(var(--accent-2-rgb), 0.15));
    border-color: rgba(var(--accent-rgb), 0.45);
    box-shadow:
      0 4px 24px -2px rgba(var(--accent-rgb), 0.45),
      0 0 40px -8px rgba(var(--accent-rgb), 0.25);
  }

  .mob-nav__btn--center::before {
    display: none;
  }

  .mob-nav__btn--center span {
    margin-top: -2px;
  }

  /* ═══ Mobile Drawer ═══ */
  .mob-drawer-backdrop:not([hidden]) {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 290;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: mob-fade-in 0.25s ease-out;
  }

  .mob-drawer:not([hidden]) {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 300;
    width: min(320px, 85vw);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    border-right: none;
    padding: 0;
    animation: mob-drawer-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  @keyframes mob-drawer-in {
    from {
      transform: translateX(100%);
      opacity: 0.5;
    }

    to {
      transform: translateX(0);
      opacity: 1;
    }
  }

  @keyframes mob-fade-in {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }

  .mob-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border);
  }

  .mob-drawer__header h3 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-secondary);
  }

  .mob-drawer__close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 22px;
    color: var(--text-tertiary);
    transition: all 0.2s;
  }

  .mob-drawer__close:active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
  }

  .mob-drawer__body {
    padding: 16px 20px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .mob-drawer__group {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .mob-drawer__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-tertiary);
  }

  .mob-drawer__select {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-size: 13px;
    appearance: none;
    -webkit-appearance: none;
  }

  .mob-drawer__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }

  .mob-drawer__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    font-size: 13px;
  }

  /* ═══ Mobile Content Layout ═══ */
  .main-content {
    padding: 68px 12px 84px !important;
    max-width: none !important;
  }

  /* Reorder portfolio sections: Net Worth first on mobile */
  #page-portfolio.active {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    overflow-x: hidden;
    min-width: 0;
  }

  #page-holdings {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
  }

  #page-holdings:not(.active) {
    display: none !important;
  }

  #page-portfolio>* {
    order: 2;
    min-width: 0;
    max-width: 100%;
  }

  #page-portfolio>.section-header {
    margin-top: 0;
    margin-bottom: 0;
  }

  /* Break Net Worth + Wallets grid into independent flex children */
  #page-portfolio>.two-col-grid:not(.alloc-activity-row) {
    display: contents;
  }

  #netWorthCard {
    order: 0;
    min-width: 0;
    max-width: 100%;
  }

  #page-lp {
    margin-top: 24px;
  }

  #walletsCard {
    order: 999;
    min-width: 0;
    max-width: 100%;
    margin-top: 24px;
  }

  .wallet-command-spacer {
    display: none;
  }

  .wallet-form--expanded {
    grid-template-columns: 1fr;
  }

  .wallet-hub__top {
    grid-template-columns: 1fr;
    --wallet-card-row-height: 252px;
    max-height: calc((var(--wallet-card-row-height) * 3) + (2 * 10px));
    padding-right: 0;
  }

  .wallet-intel-card {
    min-height: auto;
    padding: 12px;
    gap: 10px;
  }

  .wallet-intel-card__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .wallet-intel-card__stats>div:last-child {
    grid-column: 1 / -1;
  }

  .wallet-intel-card__actions {
    justify-content: space-between;
    gap: 6px;
    flex-wrap: nowrap;
  }

  .wallet-copy-btn {
    margin-left: 0;
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 72px);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Market Pulse header + grid second */
  #page-portfolio>.section-header:first-child {
    order: 1;
  }

  #page-portfolio>.metric-grid {
    order: 1;
  }

  #portfolioScoreCard {
    order: 2;
  }

  /* Keep the Portfolio Intelligence heading above the IQ score card on mobile. */
  #page-portfolio>.section-header[data-mob-tab~="iq"] {
    order: 1;
  }

  /* Allocation + Activity row */
  #page-portfolio>.alloc-activity-row {
    order: 10;
    margin-top: 12px;
  }

  .score-hero {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .score-ring {
    width: 124px;
    height: 124px;
  }

  .score-panels {
    grid-template-columns: 1fr;
  }

  .score-factor-tooltip {
    max-width: min(280px, calc(100vw - 48px));
  }

  .activity-feed {
    max-height: 420px;
  }

  body.page-swap-active .main-content {
    padding: 56px 0 72px !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* ═══ Mobile tab section visibility ═══ */
  .mob-hidden {
    display: none !important;
  }

  /* When a grid has only one visible child, span it full width */
  .two-col-grid>*:not(.mob-hidden):only-child,
  .two-col-grid.mob-single-child>*:not(.mob-hidden) {
    grid-column: 1 / -1;
  }

  /* ═══ Page Transitions ═══ */
  .page.mob-slide-left {
    animation: mob-slide-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .page.mob-slide-right {
    animation: mob-slide-right 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }

  @keyframes mob-page-in {
    from {
      opacity: 0;
      transform: translateY(12px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes mob-slide-left {
    from {
      opacity: 0;
      transform: translateX(50px);
    }

    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  @keyframes mob-slide-right {
    from {
      opacity: 0;
      transform: translateX(-50px);
    }

    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  /* ═══ Swap Page Mobile ═══ */
  .swap-frame {
    height: calc(100dvh - 128px) !important;
    min-height: 400px !important;
    border-radius: 0 !important;
  }

  .swap-frame-wrap {
    border-radius: 0 !important;
    margin: 0 -12px;
  }

  body.page-swap-active .swap-frame-wrap {
    margin: 0;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: none !important;
    backdrop-filter: none !important;
  }

  body.page-swap-active .swap-frame {
    height: calc(100dvh - 128px) !important;
    border-radius: 0 !important;
  }

  /* ═══ Compact Mobile Styles ═══ */
  .two-col-grid {
    gap: 12px;
    margin-bottom: 12px;
  }

  .metric-grid,
  .terminal-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
    margin-bottom: 16px;
  }

  .metric-tile {
    padding: 10px 12px;
    gap: 8px;
  }

  .metric-tile__icon {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  .metric-tile__value {
    font-size: 13px;
    appearance: none;

  .metric-tile__label {
    font-size: 9px;
  }

  .section-header {
    margin: 20px 0 12px;
  }

  .section-header:first-child {
    margin-top: 0;
  }

  .holdings-tools {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .holdings-search,
  .holdings-select {
    width: 100% !important;
  }

  .holdings-select {
    display: none !important;
  }

  .holdings-toggles-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    width: 100%;
  }

  .net-worth-value {
    font-size: 22px !important;
  }

  .net-worth-hero {
    flex-direction: column;
    gap: 4px;
  }

  .chart-canvas {
    height: 220px;
  }

  .nw-insights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rewards-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
  }

  .reward-card {
    padding: 12px;
  }

  .reward-card__value {
    font-size: 16px;
  }

  .calendar-grid {
    gap: 4px;
    padding: 8px;
  }

  .cal-day {
    min-height: 72px;
    padding: 6px;
    gap: 4px;
  }

  .cal-day__amt {
    font-size: 10px;
  }

  .cal-day__pct,
  .cal-day__net,
  .cal-day__empty,
  .cal-day__pnl {
    font-size: 8px;
  }

  .cal-day__note-btn {
    font-size: 8px;
    padding: 2px 6px;
  }

  .cal-day__note-preview {
    font-size: 7px;
  }

  .data-table {
    font-size: 11px;
  }

  .data-table th {
    padding: 8px 6px;
    font-size: 9px;
  }

  .data-table td {
    padding: 8px 6px;
  }

  /* Sticky first column (Token) on horizontally scrollable tables */
  #holdingsTable th:first-child,
  #holdingsTable td:first-child,
  .staking-rows-table th:first-child,
  .staking-rows-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--bg-card);
  }

  #holdingsTable thead th:first-child,
  .staking-rows-table thead th:first-child {
    z-index: 3;
  }

  .token-icon-wrap {
    width: 24px;
    height: 24px;
  }

  .token-cell {
    gap: 6px;
    min-width: 0;
  }

  .token-name {
    display: block;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }



  .premium-card {
    padding: 14px;
  }

  .card-header {
    margin-bottom: 12px;
  }

  .alloc-canvas {
    height: 220px;
    max-width: 100%;
  }

  .alloc-insights,
  .alloc-legend {
    grid-template-columns: 1fr;
  }

  .alloc-spotlight__grid {
    grid-template-columns: 1fr;
  }

  .alloc-focus-btn {
    padding: 6px 9px;
    font-size: 10px;
  }

  .alloc-style-btn {
    width: 28px;
    height: 28px;
  }

  .table-card {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .staking-rows-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  canvas {
    max-width: 100%;
  }

  .staking-grid {
    grid-template-columns: 1fr !important;
  }

  /* Hide desktop nav on mobile completely */
  .top-bar__nav {
    display: none !important;
    position: static !important;
  }
}

@media (max-width: 380px) {
  .mob-nav {
    height: 64px;
  }

  .mob-nav__btn span {
    font-size: 9px;
  }

  .mob-nav__btn--center {
    margin-top: -6px;
  }

  .mob-nav__center-ring {
    width: 42px;
    height: 42px;
  }

  .rewards-grid {
    grid-template-columns: 1fr !important;
  }

  .metric-grid,
  .terminal-stats {
    grid-template-columns: 1fr !important;
  }

  .main-content {
    padding: 64px 8px 76px !important;
  }

  .wallet-hub__top {
    --wallet-card-row-height: 312px;
  }

  .wallet-intel-card__stats {
    grid-template-columns: 1fr !important;
  }

  .wallet-intel-card__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .wallet-copy-btn,
  .wallet-remove {
    width: 100%;
    max-width: none;
    text-align: center;
  }
}

}

.hidden {
  display: none !important;
}