/* ═══════════════════════════════════════════
   Trading Hub — Design System v3.0  (CYBERPUNK)
   Re-skinned from the cyberpunk hub (hub.arxbots.com).
   Token-driven: every legacy class auto-adopts the new palette.
   Fonts: Orbitron (display) · Chakra Petch (body) · Share Tech Mono (mono)
   Import: <link rel="stylesheet" href="/design-system.css">
   ═══════════════════════════════════════════ */

/* Legacy Nippo kept as a harmless fallback; no token references it now. */
@font-face {
    font-family: 'Nippo';
    src: url('/fonts/Nippo-Variable.woff2') format('woff2'),
         url('/fonts/Nippo-Variable.woff') format('woff');
    font-weight: 200 700; font-display: swap; font-style: normal;
}

/* ── Cyberpunk webfonts (self-hosted woff2 under /fonts) ── */
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/1f367de1-59c2-4eda-81c0-cad014a43965.woff2") format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/e1e0117e-7f6f-436a-b71e-5da2984abe14.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/1512011f-6324-491d-9551-25784fdbf9ea.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/93c7e0f3-9c6c-44a1-9593-d55e20ab1b5d.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/326c7f98-ca80-460a-81fe-b6dedc333afc.woff2") format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/113880d4-a79b-4d58-bd1f-321d18ec8cea.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/28b0b878-055b-4e65-a4c0-ff50a3c3ee05.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/7e99fd3c-a246-444a-a6bb-3250d00eb937.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/432a4edc-b220-4cd1-b34b-29d22b92a5ca.woff2") format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/857aec03-5b1f-414b-9ce7-0d12b3dff00d.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/37877b51-c850-403f-838a-2b2b695e8440.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/e9b6d63a-ec7f-40f6-a897-6312aa25db6d.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/5c585584-70a3-4ff2-846f-d3b8c1372937.woff2") format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/6cf9a658-4133-48e9-b2c8-5c96712f4fb7.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/da557a30-0dee-40ab-9e4f-397d789e4237.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/bd08da6e-91c7-441a-a393-61f762680c53.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/9b1a7397-ee48-4d18-b30a-85cacb789f04.woff2") format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/6fce3ec4-a725-4503-b54e-60ce1f7f1e86.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/757bd1a1-2591-4b05-8acf-8d8c53aee8ef.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Chakra Petch';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/4ebf91da-ed11-4acd-96f9-d296c21d0b99.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/5e8f6c89-341d-43e5-8d7f-d8c2cab9e563.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/5e8f6c89-341d-43e5-8d7f-d8c2cab9e563.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/5e8f6c89-341d-43e5-8d7f-d8c2cab9e563.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/5e8f6c89-341d-43e5-8d7f-d8c2cab9e563.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/5e8f6c89-341d-43e5-8d7f-d8c2cab9e563.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Orbitron';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/fonts/5e8f6c89-341d-43e5-8d7f-d8c2cab9e563.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Share Tech Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/86aba006-2757-4351-92b9-c226e97798da.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ══════════════════════════════════════════════
   THEME TOKENS  (RGB triplets — usage: rgb(var(--token) / .5))
   ══════════════════════════════════════════════ */
:root,
[data-theme="acid"],
[data-theme="neon-blue-purple"] {
  /* backgrounds */
  --color-bg-deep: 5 6 9; --color-bg-panel: 8 9 13; --color-bg-panel-hover: 12 14 20;
  --color-bg-elevated: 12 14 20; --color-bg-elevated-2: 17 20 28; --color-bg-elevated-3: 26 30 40; --color-bg-elevated-4: 36 42 54;
  /* accents */
  --color-accent-primary: 0 255 136; --color-accent-primary-dim: 0 204 110;
  --color-accent-secondary: 0 240 255; --color-accent-tertiary: 255 43 214;
  /* semantic */
  --color-success: 0 255 136; --color-danger: 255 51 85; --color-warning: 255 182 39; --color-info: 0 240 255;
  /* text */
  --color-text-heading: 232 255 239; --color-text-primary: 198 214 205; --color-text-secondary: 143 160 151;
  --color-text-muted: 74 90 82; --color-text-inverse: 5 6 9;
  /* glass → cyberpunk panel + neon line border */
  --glass-bg: rgba(12,14,20,0.55); --glass-bg-hover: rgba(17,20,28,0.6);
  --glass-bg-elevated: rgba(17,20,28,0.7);
  --glass-border: rgba(0, 255, 136,0.14); --glass-border-hover: rgba(0, 255, 136,0.32); --glass-border-focus: rgba(0, 255, 136,0.5);
  --glass-blur: 6px; --glass-glow-hover: rgba(0, 255, 136,0.05);
  /* theme-aware glows / scrollbar / separator */
  --shadow-glow-primary: 0 0 20px rgb(0 255 136 / 0.18), 0 0 40px rgb(0 255 136 / 0.06);
  --shadow-glow-secondary: 0 0 20px rgb(0 240 255 / 0.16), 0 0 40px rgb(0 240 255 / 0.05);
  --shadow-glow-primary-sm: 0 0 8px rgb(0 255 136 / 0.4);
  --shadow-glow-success: 0 0 6px rgb(0 255 136 / 0.5); --shadow-glow-danger: 0 0 6px rgb(255 51 85 / 0.5);
  --shadow-glow-warning: 0 0 5px rgb(255 182 39 / 0.45);
  --scrollbar-thumb: rgb(0 255 136 / 0.18); --scrollbar-thumb-hover: rgb(0 255 136 / 0.38);
  --sep-gradient: linear-gradient(90deg, transparent, rgb(0 255 136 / 0.14), transparent);
  /* cyberpunk-native tokens (collision-free; usable by rebuilt pages) */
  --bg: rgb(5 6 9); --line: rgba(0, 255, 136,0.10); --line-2: rgba(0, 255, 136,0.22); --line-3: rgba(0, 255, 136,0.45);
  --acid: rgb(0 255 136); --acid-dim: rgb(0 204 110); --cyan: rgb(0 240 255); --magenta: rgb(255 43 214); --amber: rgb(255 182 39);
  --glow: 0, 255, 136;
}
[data-theme="bloodmoon"],
[data-theme="crimson-dusk"] {
  /* backgrounds */
  --color-bg-deep: 6 3 4; --color-bg-panel: 10 5 6; --color-bg-panel-hover: 16 7 9;
  --color-bg-elevated: 16 7 9; --color-bg-elevated-2: 22 9 12; --color-bg-elevated-3: 34 16 20; --color-bg-elevated-4: 48 24 30;
  /* accents */
  --color-accent-primary: 255 51 85; --color-accent-primary-dim: 204 31 58;
  --color-accent-secondary: 255 122 140; --color-accent-tertiary: 255 182 39;
  /* semantic */
  --color-success: 255 51 85; --color-danger: 255 51 85; --color-warning: 255 182 39; --color-info: 255 122 140;
  /* text */
  --color-text-heading: 255 232 236; --color-text-primary: 214 198 201; --color-text-secondary: 160 143 147;
  --color-text-muted: 90 74 77; --color-text-inverse: 6 3 4;
  /* glass → cyberpunk panel + neon line border */
  --glass-bg: rgba(16,7,9,0.55); --glass-bg-hover: rgba(22,9,12,0.6);
  --glass-bg-elevated: rgba(22,9,12,0.7);
  --glass-border: rgba(255, 51, 85,0.14); --glass-border-hover: rgba(255, 51, 85,0.32); --glass-border-focus: rgba(255, 51, 85,0.5);
  --glass-blur: 6px; --glass-glow-hover: rgba(255, 51, 85,0.05);
  /* theme-aware glows / scrollbar / separator */
  --shadow-glow-primary: 0 0 20px rgb(255 51 85 / 0.18), 0 0 40px rgb(255 51 85 / 0.06);
  --shadow-glow-secondary: 0 0 20px rgb(255 122 140 / 0.16), 0 0 40px rgb(255 122 140 / 0.05);
  --shadow-glow-primary-sm: 0 0 8px rgb(255 51 85 / 0.4);
  --shadow-glow-success: 0 0 6px rgb(255 51 85 / 0.5); --shadow-glow-danger: 0 0 6px rgb(255 51 85 / 0.5);
  --shadow-glow-warning: 0 0 5px rgb(255 182 39 / 0.45);
  --scrollbar-thumb: rgb(255 51 85 / 0.18); --scrollbar-thumb-hover: rgb(255 51 85 / 0.38);
  --sep-gradient: linear-gradient(90deg, transparent, rgb(255 51 85 / 0.14), transparent);
  /* cyberpunk-native tokens (collision-free; usable by rebuilt pages) */
  --bg: rgb(6 3 4); --line: rgba(255, 51, 85,0.10); --line-2: rgba(255, 51, 85,0.22); --line-3: rgba(255, 51, 85,0.45);
  --acid: rgb(255 51 85); --acid-dim: rgb(204 31 58); --cyan: rgb(255 122 140); --magenta: rgb(255 182 39); --amber: rgb(255 182 39);
  --glow: 255, 51, 85;
}
[data-theme="ice"],
[data-theme="frostbite"] {
  /* backgrounds */
  --color-bg-deep: 3 8 15; --color-bg-panel: 5 13 24; --color-bg-panel-hover: 8 19 32;
  --color-bg-elevated: 8 19 32; --color-bg-elevated-2: 12 27 46; --color-bg-elevated-3: 20 40 64; --color-bg-elevated-4: 30 54 84;
  /* accents */
  --color-accent-primary: 77 214 255; --color-accent-primary-dim: 43 168 216;
  --color-accent-secondary: 174 242 255; --color-accent-tertiary: 124 140 255;
  /* semantic */
  --color-success: 77 214 255; --color-danger: 255 51 85; --color-warning: 143 214 255; --color-info: 174 242 255;
  /* text */
  --color-text-heading: 232 247 255; --color-text-primary: 198 218 230; --color-text-secondary: 143 163 181;
  --color-text-muted: 74 93 110; --color-text-inverse: 3 8 15;
  /* glass → cyberpunk panel + neon line border */
  --glass-bg: rgba(8,19,32,0.55); --glass-bg-hover: rgba(12,27,46,0.6);
  --glass-bg-elevated: rgba(12,27,46,0.7);
  --glass-border: rgba(77, 214, 255,0.14); --glass-border-hover: rgba(77, 214, 255,0.32); --glass-border-focus: rgba(77, 214, 255,0.5);
  --glass-blur: 6px; --glass-glow-hover: rgba(77, 214, 255,0.05);
  /* theme-aware glows / scrollbar / separator */
  --shadow-glow-primary: 0 0 20px rgb(77 214 255 / 0.18), 0 0 40px rgb(77 214 255 / 0.06);
  --shadow-glow-secondary: 0 0 20px rgb(174 242 255 / 0.16), 0 0 40px rgb(174 242 255 / 0.05);
  --shadow-glow-primary-sm: 0 0 8px rgb(77 214 255 / 0.4);
  --shadow-glow-success: 0 0 6px rgb(77 214 255 / 0.5); --shadow-glow-danger: 0 0 6px rgb(255 51 85 / 0.5);
  --shadow-glow-warning: 0 0 5px rgb(143 214 255 / 0.45);
  --scrollbar-thumb: rgb(77 214 255 / 0.18); --scrollbar-thumb-hover: rgb(77 214 255 / 0.38);
  --sep-gradient: linear-gradient(90deg, transparent, rgb(77 214 255 / 0.14), transparent);
  /* cyberpunk-native tokens (collision-free; usable by rebuilt pages) */
  --bg: rgb(3 8 15); --line: rgba(77, 214, 255,0.10); --line-2: rgba(77, 214, 255,0.22); --line-3: rgba(77, 214, 255,0.45);
  --acid: rgb(77 214 255); --acid-dim: rgb(43 168 216); --cyan: rgb(174 242 255); --magenta: rgb(124 140 255); --amber: rgb(143 214 255);
  --glow: 77, 214, 255;
}
[data-theme="synthwave"] {
  /* backgrounds */
  --color-bg-deep: 10 5 24; --color-bg-panel: 15 8 34; --color-bg-panel-hover: 20 12 44;
  --color-bg-elevated: 20 12 44; --color-bg-elevated-2: 26 17 56; --color-bg-elevated-3: 40 28 76; --color-bg-elevated-4: 56 40 100;
  /* accents */
  --color-accent-primary: 255 43 214; --color-accent-primary-dim: 201 31 168;
  --color-accent-secondary: 0 240 255; --color-accent-tertiary: 255 182 39;
  /* semantic */
  --color-success: 255 43 214; --color-danger: 255 51 85; --color-warning: 255 182 39; --color-info: 0 240 255;
  /* text */
  --color-text-heading: 255 232 251; --color-text-primary: 214 198 218; --color-text-secondary: 160 143 165;
  --color-text-muted: 90 74 93; --color-text-inverse: 10 5 24;
  /* glass → cyberpunk panel + neon line border */
  --glass-bg: rgba(20,12,44,0.55); --glass-bg-hover: rgba(26,17,56,0.6);
  --glass-bg-elevated: rgba(26,17,56,0.7);
  --glass-border: rgba(255, 43, 214,0.14); --glass-border-hover: rgba(255, 43, 214,0.32); --glass-border-focus: rgba(255, 43, 214,0.5);
  --glass-blur: 6px; --glass-glow-hover: rgba(255, 43, 214,0.05);
  /* theme-aware glows / scrollbar / separator */
  --shadow-glow-primary: 0 0 20px rgb(255 43 214 / 0.18), 0 0 40px rgb(255 43 214 / 0.06);
  --shadow-glow-secondary: 0 0 20px rgb(0 240 255 / 0.16), 0 0 40px rgb(0 240 255 / 0.05);
  --shadow-glow-primary-sm: 0 0 8px rgb(255 43 214 / 0.4);
  --shadow-glow-success: 0 0 6px rgb(255 43 214 / 0.5); --shadow-glow-danger: 0 0 6px rgb(255 51 85 / 0.5);
  --shadow-glow-warning: 0 0 5px rgb(255 182 39 / 0.45);
  --scrollbar-thumb: rgb(255 43 214 / 0.18); --scrollbar-thumb-hover: rgb(255 43 214 / 0.38);
  --sep-gradient: linear-gradient(90deg, transparent, rgb(255 43 214 / 0.14), transparent);
  /* cyberpunk-native tokens (collision-free; usable by rebuilt pages) */
  --bg: rgb(10 5 24); --line: rgba(255, 43, 214,0.10); --line-2: rgba(255, 43, 214,0.22); --line-3: rgba(255, 43, 214,0.45);
  --acid: rgb(255 43 214); --acid-dim: rgb(201 31 168); --cyan: rgb(0 240 255); --magenta: rgb(255 182 39); --amber: rgb(255 182 39);
  --glow: 255, 43, 214;
}
[data-theme="mono"] {
  /* backgrounds */
  --color-bg-deep: 10 10 11; --color-bg-panel: 26 26 28; --color-bg-panel-hover: 34 34 37;
  --color-bg-elevated: 34 34 37; --color-bg-elevated-2: 44 44 48; --color-bg-elevated-3: 58 58 62; --color-bg-elevated-4: 74 74 80;
  /* accents */
  --color-accent-primary: 255 122 26; --color-accent-primary-dim: 216 98 15;
  --color-accent-secondary: 255 164 92; --color-accent-tertiary: 255 122 26;
  /* semantic */
  --color-success: 255 122 26; --color-danger: 255 51 85; --color-warning: 255 157 60; --color-info: 255 164 92;
  /* text */
  --color-text-heading: 244 244 245; --color-text-primary: 205 205 210; --color-text-secondary: 161 161 166;
  --color-text-muted: 107 107 112; --color-text-inverse: 10 10 11;
  /* glass → cyberpunk panel + neon line border */
  --glass-bg: rgba(34,34,37,0.55); --glass-bg-hover: rgba(44,44,48,0.6);
  --glass-bg-elevated: rgba(44,44,48,0.7);
  --glass-border: rgba(255, 122, 26,0.14); --glass-border-hover: rgba(255, 122, 26,0.32); --glass-border-focus: rgba(255, 122, 26,0.5);
  --glass-blur: 6px; --glass-glow-hover: rgba(255, 122, 26,0.05);
  /* theme-aware glows / scrollbar / separator */
  --shadow-glow-primary: 0 0 20px rgb(255 122 26 / 0.18), 0 0 40px rgb(255 122 26 / 0.06);
  --shadow-glow-secondary: 0 0 20px rgb(255 164 92 / 0.16), 0 0 40px rgb(255 164 92 / 0.05);
  --shadow-glow-primary-sm: 0 0 8px rgb(255 122 26 / 0.4);
  --shadow-glow-success: 0 0 6px rgb(255 122 26 / 0.5); --shadow-glow-danger: 0 0 6px rgb(255 51 85 / 0.5);
  --shadow-glow-warning: 0 0 5px rgb(255 157 60 / 0.45);
  --scrollbar-thumb: rgb(255 122 26 / 0.18); --scrollbar-thumb-hover: rgb(255 122 26 / 0.38);
  --sep-gradient: linear-gradient(90deg, transparent, rgb(255 122 26 / 0.14), transparent);
  /* cyberpunk-native tokens (collision-free; usable by rebuilt pages) */
  --bg: rgb(10 10 11); --line: rgba(255, 122, 26,0.10); --line-2: rgba(255, 122, 26,0.22); --line-3: rgba(255, 122, 26,0.45);
  --acid: rgb(255 122 26); --acid-dim: rgb(216 98 15); --cyan: rgb(255 164 92); --magenta: rgb(255 122 26); --amber: rgb(255 157 60);
  --glow: 255, 122, 26;
}
[data-theme="gold"] {
  /* backgrounds */
  --color-bg-deep: 10 8 3; --color-bg-panel: 14 11 5; --color-bg-panel-hover: 20 16 8;
  --color-bg-elevated: 20 16 8; --color-bg-elevated-2: 28 22 11; --color-bg-elevated-3: 42 34 18; --color-bg-elevated-4: 58 48 26;
  /* accents */
  --color-accent-primary: 255 196 60; --color-accent-primary-dim: 216 158 31;
  --color-accent-secondary: 255 224 138; --color-accent-tertiary: 255 122 60;
  /* semantic */
  --color-success: 255 196 60; --color-danger: 255 51 85; --color-warning: 255 224 138; --color-info: 255 224 138;
  /* text */
  --color-text-heading: 255 246 224; --color-text-primary: 224 214 196; --color-text-secondary: 181 165 137;
  --color-text-muted: 110 98 74; --color-text-inverse: 10 8 3;
  /* glass → cyberpunk panel + neon line border */
  --glass-bg: rgba(20,16,8,0.55); --glass-bg-hover: rgba(28,22,11,0.6);
  --glass-bg-elevated: rgba(28,22,11,0.7);
  --glass-border: rgba(255, 196, 60,0.14); --glass-border-hover: rgba(255, 196, 60,0.32); --glass-border-focus: rgba(255, 196, 60,0.5);
  --glass-blur: 6px; --glass-glow-hover: rgba(255, 196, 60,0.05);
  /* theme-aware glows / scrollbar / separator */
  --shadow-glow-primary: 0 0 20px rgb(255 196 60 / 0.18), 0 0 40px rgb(255 196 60 / 0.06);
  --shadow-glow-secondary: 0 0 20px rgb(255 224 138 / 0.16), 0 0 40px rgb(255 224 138 / 0.05);
  --shadow-glow-primary-sm: 0 0 8px rgb(255 196 60 / 0.4);
  --shadow-glow-success: 0 0 6px rgb(255 196 60 / 0.5); --shadow-glow-danger: 0 0 6px rgb(255 51 85 / 0.5);
  --shadow-glow-warning: 0 0 5px rgb(255 224 138 / 0.45);
  --scrollbar-thumb: rgb(255 196 60 / 0.18); --scrollbar-thumb-hover: rgb(255 196 60 / 0.38);
  --sep-gradient: linear-gradient(90deg, transparent, rgb(255 196 60 / 0.14), transparent);
  /* cyberpunk-native tokens (collision-free; usable by rebuilt pages) */
  --bg: rgb(10 8 3); --line: rgba(255, 196, 60,0.10); --line-2: rgba(255, 196, 60,0.22); --line-3: rgba(255, 196, 60,0.45);
  --acid: rgb(255 196 60); --acid-dim: rgb(216 158 31); --cyan: rgb(255 224 138); --magenta: rgb(255 122 60); --amber: rgb(255 224 138);
  --glow: 255, 196, 60;
}

/* ══════════════════════════════════════════════
   BACKWARD-COMPAT ALIASES (legacy var names → token system)
   ══════════════════════════════════════════════ */
:root {
    --bg-0: rgb(var(--color-bg-deep));
    --bg-1: rgb(var(--color-bg-deep));
    --bg-2: rgb(var(--color-bg-panel));
    --bg-3: rgb(var(--color-bg-elevated));
    --bg-4: rgb(var(--color-bg-elevated-2));
    --bg-5: rgb(var(--color-bg-elevated-3));
    --border-1: var(--glass-border);
    --border-2: var(--glass-border-hover);
    --text-1: rgb(var(--color-text-heading));
    --text-2: rgb(var(--color-text-primary));
    --text-3: rgb(var(--color-text-secondary));
    --text-4: rgb(var(--color-text-muted));
    --accent: rgb(var(--color-accent-primary));
    --accent-hover: rgb(var(--color-accent-primary-dim));
    --accent-glow: rgb(var(--color-accent-primary) / 0.25);
    --green: rgb(var(--color-success));
    --green-glow: rgb(var(--color-success) / 0.2);
    --red: rgb(var(--color-danger));
    --red-glow: rgb(var(--color-danger) / 0.2);
    --yellow: rgb(var(--color-warning));
    --orange: rgb(var(--color-warning));
    --purple: rgb(var(--color-accent-tertiary));
    --blue: rgb(var(--color-info));

    /* Radius — angular cyberpunk edges (chamfers are per-component clip-path) */
    --radius: 3px; --radius-sm: 2px; --radius-xs: 1px; --radius-lg: 4px;

    /* Typography — cyberpunk families */
    --font-sans: 'Chakra Petch', system-ui, sans-serif;
    --font-mono: 'Share Tech Mono', ui-monospace, 'SF Mono', Consolas, monospace;
    --font-display: 'Orbitron', sans-serif;
    --display: 'Orbitron', sans-serif;
    --glyph: 'Orbitron', sans-serif;
    --body: 'Chakra Petch', sans-serif;
    --mono: 'Share Tech Mono', ui-monospace, monospace;

    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.6);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.7);
    --shadow-glow: var(--shadow-glow-primary);
    --focus-ring: 0 0 0 2px rgb(var(--color-bg-deep)), 0 0 0 4px rgb(var(--color-accent-primary));
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms; --duration-normal: 200ms; --duration-slow: 300ms; --duration-entrance: 400ms;
    --container-max: 1400px; --container-wide: 1600px;
}


/* ══════════════════════════════════════════════
   RESET
   ══════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    font-weight: 300;
    background: rgb(var(--color-bg-deep));
    color: rgb(var(--color-text-primary));
    min-height: 100vh;
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Elements that should NOT be uppercase */
pre, code, .code, .text-mono, input, textarea, .no-caps {
    text-transform: none;
    letter-spacing: normal;
}
a { color: rgb(var(--color-accent-primary)); text-decoration: none; transition: color 0.2s; }
a:hover { color: rgb(var(--color-accent-primary-dim)); }
img { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; }


/* ══════════════════════════════════════════════
   ACCESSIBILITY
   ══════════════════════════════════════════════ */

:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}
:focus:not(:focus-visible) { outline: none; }

.skip-link {
    position: absolute; top: -100%; left: 16px; z-index: 9999;
    padding: 12px 20px; background: rgb(var(--color-accent-primary)); color: rgb(var(--color-text-inverse));
    border-radius: var(--radius-sm); font-weight: 600; font-size: 14px;
    transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .spinner { animation: none; border-top-color: rgb(var(--color-accent-primary)); }
}


/* ══════════════════════════════════════════════
   TYPOGRAPHY
   ══════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 { color: rgb(var(--color-text-heading)); font-weight: 600; line-height: 1.3; }
h1 { font-size: 24px; font-weight: 800; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }
.text-mono { font-family: var(--font-mono); }
.text-muted { color: rgb(var(--color-text-muted)); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-lg { font-size: 18px; }
.text-accent { color: rgb(var(--color-accent-primary)); }
.text-green { color: rgb(var(--color-success)); }
.text-red { color: rgb(var(--color-danger)); }
.text-yellow { color: rgb(var(--color-warning)); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-uppercase { text-transform: uppercase; letter-spacing: 0.05em; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

/* Section label (NFT Bidder style) */
.section-label {
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgb(var(--color-accent-primary) / 0.6);
}


/* ══════════════════════════════════════════════
   BACKGROUNDS & EFFECTS
   ══════════════════════════════════════════════ */

.bg-grid {
    position: fixed; inset: 0;
    background-image: linear-gradient(rgb(var(--color-accent-primary) / 0.02) 1px, transparent 1px),
                      linear-gradient(90deg, rgb(var(--color-accent-primary) / 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none; z-index: 0;
}
.bg-gradient {
    position: fixed; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 30%, rgb(var(--color-accent-primary) / 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgb(var(--color-accent-secondary) / 0.04) 0%, transparent 50%);
    pointer-events: none; z-index: 0;
}

/* Accent separator line */
.sep-accent {
    height: 1px;
    background: var(--sep-gradient);
}


/* ══════════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════════ */

.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 16px; position: relative; z-index: 1; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.w-full { width: 100%; }
.relative { position: relative; }

@media (min-width: 768px) { .container { padding: 0 24px; } }
@media (min-width: 1200px) { .container { padding: 0 32px; } }
@media (min-width: 1920px) { .container { max-width: var(--container-wide); } }
@media (min-width: 2560px) { .container { max-width: 2000px; } }


/* ══════════════════════════════════════════════
   GRID SYSTEM
   ══════════════════════════════════════════════ */

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1920px) {
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
@media (min-width: 1920px) {
    .stats-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}


/* ══════════════════════════════════════════════
   CARDS (Glass Panels)
   ══════════════════════════════════════════════ */

.card, .glass-panel {
    background: var(--glass-bg);
    background-image: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 40%);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--panel-shadow);
    overflow: hidden;
    margin-bottom: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover, .glass-panel:hover {
    border-color: var(--glass-border-hover);
    box-shadow: var(--panel-shadow-hover);
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--glass-border);
    background: rgb(var(--color-bg-deep) / 0.3);
    flex-wrap: wrap; gap: 12px;
}
.card-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 14px; font-weight: 600; color: rgb(var(--color-text-heading));
}
.card-title-icon {
    width: 32px; height: 32px;
    background: rgb(var(--color-accent-primary) / 0.1);
    border: 1px solid rgb(var(--color-accent-primary) / 0.2);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}
.card-body { padding: 20px; }
.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--glass-border);
    background: rgb(var(--color-bg-deep) / 0.2);
}


/* ══════════════════════════════════════════════
   STAT CARDS
   ══════════════════════════════════════════════ */

.stat-card {
    background: var(--glass-bg);
    background-image: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 40%);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--panel-shadow);
    padding: 16px;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: var(--panel-shadow-hover);
}
.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgb(var(--color-accent-primary) / 0.4), transparent);
    border-radius: var(--radius) var(--radius) 0 0;
}
.stat-card.green::before { background: linear-gradient(90deg, transparent, rgb(var(--color-success) / 0.5), transparent); }
.stat-card.red::before { background: linear-gradient(90deg, transparent, rgb(var(--color-danger) / 0.5), transparent); }
.stat-card.purple::before { background: linear-gradient(90deg, transparent, rgb(var(--color-accent-secondary) / 0.5), transparent); }
.stat-card.yellow::before { background: linear-gradient(90deg, transparent, rgb(var(--color-warning) / 0.5), transparent); }

.stat-label {
    font-size: 10px; font-weight: 300; color: rgb(var(--color-text-muted));
    text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 6px;
}
.stat-value {
    font-size: 22px; font-weight: 500; color: rgb(var(--color-text-heading));
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}
.stat-change {
    font-size: 12px; font-weight: 500; margin-top: 4px;
}
.stat-change.up { color: rgb(var(--color-success)); }
.stat-change.down { color: rgb(var(--color-danger)); }


/* ══════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════ */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px;
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 40px;
    text-decoration: none;
    white-space: nowrap;
    background: var(--glass-bg);
    color: rgb(var(--color-text-primary));
    backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
}
.btn:hover {
    border-color: var(--glass-border-hover);
    background: var(--glass-bg-hover);
    transform: translateY(-1px);
}
.btn:active {
    transform: scale(0.97);
    transition-duration: 80ms;
}

/* Primary — neon accent ghost */
.btn-primary {
    border-color: rgb(var(--color-accent-primary) / 0.35);
    color: rgb(var(--color-accent-primary));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 0 12px rgb(var(--color-accent-primary) / 0.06);
}
.btn-primary:hover {
    background: rgb(var(--color-accent-primary) / 0.08);
    border-color: rgb(var(--color-accent-primary) / 0.50);
    box-shadow: 0 0 20px rgb(var(--color-accent-primary) / 0.12);
    color: rgb(var(--color-accent-primary));
}

/* Secondary */
.btn-secondary {
    border-color: rgb(var(--color-accent-secondary) / 0.25);
    color: rgb(var(--color-text-secondary));
}
.btn-secondary:hover {
    border-color: rgb(var(--color-accent-secondary) / 0.40);
    background: rgb(var(--color-accent-secondary) / 0.06);
}

/* Success — neon green ghost */
.btn-success {
    border-color: rgb(var(--color-success) / 0.35);
    color: rgb(var(--color-success));
    box-shadow: 0 0 8px rgb(var(--color-success) / 0.06);
}
.btn-success:hover {
    background: rgb(var(--color-success) / 0.08);
    border-color: rgb(var(--color-success) / 0.50);
    box-shadow: 0 0 16px rgb(var(--color-success) / 0.12);
}

/* Danger — neon red ghost */
.btn-danger {
    border-color: rgb(var(--color-danger) / 0.35);
    color: rgb(var(--color-danger));
    box-shadow: 0 0 8px rgb(var(--color-danger) / 0.06);
}
.btn-danger:hover {
    background: rgb(var(--color-danger) / 0.08);
    border-color: rgb(var(--color-danger) / 0.50);
    box-shadow: 0 0 16px rgb(var(--color-danger) / 0.12);
}

/* Filled accent (for CTAs like login) */
.btn-filled {
    background: rgb(var(--color-accent-primary) / 0.85);
    border-color: rgb(var(--color-accent-primary) / 0.7);
    color: rgb(var(--color-text-inverse));
    box-shadow: 0 0 20px rgb(var(--color-accent-primary) / 0.20);
}
.btn-filled:hover {
    background: rgb(var(--color-accent-primary));
    box-shadow: 0 0 30px rgb(var(--color-accent-primary) / 0.30);
}

/* Ghost */
.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: rgb(var(--color-text-secondary));
    backdrop-filter: none;
}
.btn-ghost:hover {
    color: rgb(var(--color-text-heading));
    background: rgb(var(--color-bg-elevated) / 0.5);
    border-color: var(--glass-border);
}

/* Sizes */
.btn-sm { padding: 6px 12px; font-size: 12px; min-height: 32px; }
.btn-xs { padding: 4px 8px; font-size: 11px; min-height: 26px; }
.btn-lg { padding: 14px 24px; font-size: 15px; min-height: 48px; }
.btn-full { width: 100%; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-sm); }
.btn-icon.sm { width: 28px; height: 28px; }

.btn[disabled], .btn.disabled {
    opacity: 0.35; cursor: not-allowed; pointer-events: none;
}
.btn:focus-visible { box-shadow: var(--focus-ring); }


/* ══════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════ */

.form-group { margin-bottom: 16px; }
.form-label {
    display: block; font-size: 11px; font-weight: 300;
    color: rgb(var(--color-text-secondary));
    margin-bottom: 8px; text-transform: uppercase;
    letter-spacing: 0.08em;
}
.form-input, .config-input {
    width: 100%; padding: 10px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: rgb(var(--color-text-primary));
    font-family: var(--font-mono);
    font-size: 14px;
    backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    transition: all 0.2s ease;
}
.form-input { padding: 12px 16px; }
.form-input:focus, .config-input:focus {
    outline: none;
    border-color: rgb(var(--color-accent-primary) / 0.50);
    box-shadow:
        0 0 0 2px rgb(var(--color-accent-primary) / 0.15),
        0 0 25px rgb(var(--color-accent-primary) / 0.10);
}
.form-input::placeholder, .config-input::placeholder {
    color: rgb(var(--color-text-muted));
}
.form-hint { font-size: 11px; color: rgb(var(--color-text-muted)); margin-top: 4px; }
.form-error { font-size: 12px; color: rgb(var(--color-danger)); margin-top: 4px; }
.config-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.config-label { font-size: 12px; font-weight: 500; color: rgb(var(--color-text-secondary)); }

select.form-input, select.config-input {
    color-scheme: dark;
    appearance: none;
    background-color: rgb(var(--color-bg-elevated));
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23828aa5'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
select.form-input option, select.config-input option {
    background-color: rgb(var(--color-bg-elevated));
    color: rgb(var(--color-text-primary));
}

/* ── Custom Select (div-based replacement for native <select>) ── */
.custom-select {
    position: relative; width: 100%;
}
.custom-select select { display: none; }
.custom-select-trigger {
    width: 100%; padding: 10px 36px 10px 14px;
    background: rgb(var(--color-bg-elevated));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: rgb(var(--color-text-primary));
    font-family: var(--font-mono);
    font-size: 14px; cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
}
.custom-select-trigger::after {
    content: '';
    position: absolute; right: 12px; top: 50%;
    transform: translateY(-50%);
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgb(var(--color-text-muted));
    transition: transform 0.2s ease;
}
.custom-select.open .custom-select-trigger::after {
    transform: translateY(-50%) rotate(180deg);
}
.custom-select-trigger:hover {
    border-color: var(--glass-border-hover);
}
.custom-select.open .custom-select-trigger {
    border-color: rgb(var(--color-accent-primary) / 0.50);
    box-shadow: 0 0 0 2px rgb(var(--color-accent-primary) / 0.15);
}
.custom-select-trigger .cs-placeholder {
    color: rgb(var(--color-text-muted));
}
.custom-select-options {
    display: none; position: absolute;
    top: calc(100% + 4px); left: 0; right: 0;
    background: rgb(var(--color-bg-panel));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    max-height: 280px; overflow-y: auto;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
}
.custom-select.open .custom-select-options { display: block; }
.custom-select-option {
    padding: 8px 14px; cursor: pointer;
    font-size: 13px; font-family: var(--font-mono);
    color: rgb(var(--color-text-secondary));
    transition: all 0.1s ease;
    border-left: 2px solid transparent;
}
.custom-select-option:hover {
    background: var(--glass-bg-hover);
    color: rgb(var(--color-text-primary));
}
.custom-select-option.selected {
    background: rgb(var(--color-accent-primary) / 0.08);
    color: rgb(var(--color-accent-primary));
    border-left-color: rgb(var(--color-accent-primary));
}
.custom-select-option.cs-placeholder-opt {
    color: rgb(var(--color-text-muted));
    font-style: italic;
}

/* Toggle switch */
.toggle {
    position: relative; width: 44px; height: 24px;
    background: rgb(var(--color-bg-elevated-2));
    border: 1px solid var(--glass-border);
    border-radius: 12px; cursor: pointer; transition: all 0.2s ease;
}
.toggle::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 18px; height: 18px; background: rgb(var(--color-text-secondary));
    border-radius: 50%; transition: all 0.2s ease;
}
.toggle.active {
    background: rgb(var(--color-success) / 0.2);
    border-color: rgb(var(--color-success) / 0.4);
}
.toggle.active::after {
    transform: translateX(20px);
    background: rgb(var(--color-success));
    box-shadow: 0 0 8px rgb(var(--color-success) / 0.4);
}
.toggle:focus-visible { box-shadow: var(--focus-ring); }
.toggle[tabindex] { outline: none; }


/* ══════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════ */

.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: var(--radius-xs);
    font-size: 10px; font-weight: 600;
    letter-spacing: 0.05em; text-transform: uppercase;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgb(var(--color-bg-elevated) / 0.4);
    color: rgb(var(--color-text-secondary));
}
.badge-green {
    background: rgb(var(--color-success) / 0.08);
    color: rgb(var(--color-success));
    border-color: rgb(var(--color-success) / 0.3);
}
.badge-red {
    background: rgb(var(--color-danger) / 0.08);
    color: rgb(var(--color-danger));
    border-color: rgb(var(--color-danger) / 0.3);
}
.badge-yellow {
    background: rgb(var(--color-warning) / 0.08);
    color: rgb(var(--color-warning));
    border-color: rgb(var(--color-warning) / 0.3);
}
.badge-accent {
    background: rgb(var(--color-accent-primary) / 0.08);
    color: rgb(var(--color-accent-primary));
    border-color: rgb(var(--color-accent-primary) / 0.3);
}
.badge-purple {
    background: rgb(var(--color-accent-secondary) / 0.08);
    color: rgb(var(--color-accent-secondary));
    border-color: rgb(var(--color-accent-secondary) / 0.3);
}

/* Status dot */
.status-dot {
    width: 6px; height: 6px; border-radius: 50%;
    display: inline-block; flex-shrink: 0;
}
.status-dot.online { background: rgb(var(--color-success)); box-shadow: var(--shadow-glow-success); }
.status-dot.offline { background: rgb(var(--color-text-muted)); }
.status-dot.error { background: rgb(var(--color-danger)); box-shadow: var(--shadow-glow-danger); }
.status-dot.warning { background: rgb(var(--color-warning)); box-shadow: var(--shadow-glow-warning); }


/* ══════════════════════════════════════════════
   TABS
   ══════════════════════════════════════════════ */

.panel-tabs {
    display: flex; gap: 4px; overflow-x: auto;
    padding-bottom: 0; margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.panel-tabs::-webkit-scrollbar { display: none; }
.panel-tab {
    padding: 10px 18px;
    background: transparent; border: none;
    color: rgb(var(--color-text-muted)); font-size: 13px; font-weight: 500;
    cursor: pointer; white-space: nowrap;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
    position: relative;
    letter-spacing: 0.02em;
}
.panel-tab:hover {
    color: rgb(var(--color-text-primary));
    background: rgb(var(--color-bg-elevated) / 0.3);
}
.panel-tab.active {
    color: rgb(var(--color-accent-primary));
}
.panel-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgb(var(--color-accent-primary)), transparent);
}
.panel-tab:focus-visible { box-shadow: var(--focus-ring); }
.panel-tab-content { display: none; }
.panel-tab-content.active { display: block; }


/* ══════════════════════════════════════════════
   TABLES
   ══════════════════════════════════════════════ */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th {
    text-align: left; padding: 10px 14px;
    font-size: 10px; font-weight: 300; color: rgb(var(--color-text-muted));
    text-transform: uppercase; letter-spacing: 0.08em;
    border-bottom: 1px solid var(--glass-border);
    background: rgb(var(--color-bg-deep) / 0.3);
    white-space: nowrap;
}
td {
    padding: 10px 14px; font-size: 13px; color: rgb(var(--color-text-primary));
    border-bottom: 1px solid rgb(var(--color-bg-elevated) / 0.5);
}
tr:hover td {
    background: rgb(var(--color-accent-primary) / 0.02);
}
.td-mono { font-family: var(--font-mono); }


/* ══════════════════════════════════════════════
   LOADING / EMPTY / ERROR STATES
   ══════════════════════════════════════════════ */

.state-container {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 48px 20px; text-align: center;
}
.state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.state-title { font-size: 16px; font-weight: 600; color: rgb(var(--color-text-heading)); margin-bottom: 8px; }
.state-desc { font-size: 13px; color: rgb(var(--color-text-muted)); max-width: 360px; line-height: 1.6; }

/* Spinner */
.spinner {
    width: 32px; height: 32px;
    border: 2px solid var(--glass-border);
    border-top-color: rgb(var(--color-accent-primary));
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.spinner-lg { width: 48px; height: 48px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg,
        rgb(var(--color-bg-elevated)) 25%,
        rgb(var(--color-bg-elevated-2)) 50%,
        rgb(var(--color-bg-elevated)) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text.short { width: 60%; }
.skeleton-stat { height: 28px; width: 80px; }
.skeleton-card { height: 120px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Inline loading */
.loading {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: rgb(var(--color-text-secondary));
}
.loading::before {
    content: ''; width: 16px; height: 16px;
    border: 2px solid var(--glass-border);
    border-top-color: rgb(var(--color-accent-primary));
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Error text */
.error-text { color: rgb(var(--color-danger)); font-size: 13px; margin-top: 8px; }

/* Toast notifications */
.toast-container { position: fixed; top: 16px; right: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
    padding: 12px 20px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 500;
    background: var(--glass-bg); border: 1.5px solid var(--glass-border);
    color: rgb(var(--color-text-primary));
    backdrop-filter: blur(12px) saturate(1.3);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    box-shadow: var(--panel-shadow);
    max-width: 400px;
    animation: slideIn var(--duration-slow) var(--ease-out-expo);
}
.toast-success { border-color: rgb(var(--color-success) / 0.4); color: rgb(var(--color-success)); background: rgb(var(--color-success) / 0.05); }
.toast-error { border-color: rgb(var(--color-danger) / 0.4); color: rgb(var(--color-danger)); background: rgb(var(--color-danger) / 0.05); }
.toast-warning { border-color: rgb(var(--color-warning) / 0.4); color: rgb(var(--color-warning)); background: rgb(var(--color-warning) / 0.05); }
.toast.toast-exit { animation: fadeOut var(--duration-normal) ease forwards; }


/* ══════════════════════════════════════════════
   MOBILE NAVIGATION
   ══════════════════════════════════════════════ */

.mobile-menu-btn {
    display: none; position: fixed; top: 12px; left: 12px; z-index: 1001;
    width: 40px; height: 40px;
    background: rgb(var(--color-bg-panel) / 0.9);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: rgb(var(--color-text-heading)); font-size: 18px;
    cursor: pointer; align-items: center; justify-content: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.mobile-nav-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.7); z-index: 1002;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.mobile-nav {
    position: fixed; top: 0; left: 0; bottom: 0; width: 280px;
    background: rgb(var(--color-bg-panel) / 0.95);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    border-right: 1px solid var(--glass-border);
    z-index: 1003;
    transform: translateX(-100%); transition: var(--transition-slow);
    overflow-y: auto; padding: 60px 16px 80px;
}
.mobile-nav.active { transform: translateX(0); }
.mobile-nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: var(--radius-sm);
    color: rgb(var(--color-text-secondary)); font-size: 14px; font-weight: 500;
    cursor: pointer; transition: all 0.2s ease;
}
.mobile-nav-item:hover, .mobile-nav-item.active {
    color: rgb(var(--color-accent-primary));
    background: rgb(var(--color-accent-primary) / 0.06);
}
.mobile-nav-icon { font-size: 18px; width: 24px; text-align: center; }

/* Bottom tab bar */
.mobile-bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0;
    background: rgb(var(--color-bg-panel) / 0.9);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border-top: 1px solid var(--glass-border);
    z-index: 100; padding: 8px; justify-content: space-around;
}
.mobile-bottom-item {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 8px 12px; border-radius: 8px; cursor: pointer;
    color: rgb(var(--color-text-muted)); font-size: 10px; transition: all 0.2s ease;
}
.mobile-bottom-item:hover, .mobile-bottom-item.active {
    color: rgb(var(--color-accent-primary));
    background: rgb(var(--color-accent-primary) / 0.06);
}
.mobile-bottom-icon { font-size: 20px; }

@media (min-width: 768px) {
    .mobile-menu-btn, .mobile-nav-overlay, .mobile-nav, .mobile-bottom-nav { display: none !important; }
}
@media (max-width: 767px) {
    .mobile-menu-btn { display: flex; }
    body { padding-bottom: 70px; }
}


/* ══════════════════════════════════════════════
   SPACING UTILITIES
   ══════════════════════════════════════════════ */

.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.p-12 { padding: 12px; }
.p-16 { padding: 16px; }
.p-20 { padding: 20px; }
.px-16 { padding-left: 16px; padding-right: 16px; }
.py-8 { padding-top: 8px; padding-bottom: 8px; }


/* ══════════════════════════════════════════════
   SCROLLBAR
   ══════════════════════════════════════════════ */

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }


/* ══════════════════════════════════════════════
   MISC UTILITIES
   ══════════════════════════════════════════════ */

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.no-wrap { white-space: nowrap; }
.hidden { display: none !important; }
.clickable { cursor: pointer; }
.clickable:hover { opacity: 0.85; }
.divider { height: 1px; background: var(--glass-border); margin: 16px 0; }
.price-up { color: rgb(var(--color-success)); }
.price-down { color: rgb(var(--color-danger)); }

/* Code blocks */
code, .code {
    font-family: var(--font-mono);
    background: rgb(var(--color-bg-elevated) / 0.6); padding: 2px 6px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xs); font-size: 0.9em;
}
pre {
    background: rgb(var(--color-bg-panel));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm); padding: 16px;
    overflow-x: auto; font-family: var(--font-mono); font-size: 13px;
}


/* ══════════════════════════════════════════════
   BREADCRUMB
   ══════════════════════════════════════════════ */

.hub-breadcrumb {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px;
    background: rgb(var(--color-bg-panel) / 0.8);
    border-bottom: 1px solid var(--glass-border);
    font-size: 13px;
    position: sticky; top: 0; z-index: 100;
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
}
.hub-breadcrumb a {
    color: rgb(var(--color-accent-primary));
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 4px;
    transition: color 0.2s ease;
}
.hub-breadcrumb a:hover { color: rgb(var(--color-text-heading)); }
.hub-breadcrumb .breadcrumb-sep { color: rgb(var(--color-text-muted)); font-size: 11px; }
.hub-breadcrumb .breadcrumb-current { color: rgb(var(--color-text-primary)); font-weight: 500; }


/* ══════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-8px); }
}
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 6px rgb(var(--color-success) / 0.6); }
    50% { box-shadow: 0 0 14px rgb(var(--color-success) / 0.3); }
}
@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
@keyframes typewriterRow {
    0% { opacity: 0; background-color: rgb(var(--color-accent-primary) / 0.06); }
    30% { opacity: 1; background-color: rgb(var(--color-accent-primary) / 0.04); }
    100% { opacity: 1; background-color: transparent; }
}

/* Entrance utility classes */
.animate-in {
    animation: fadeInUp var(--duration-entrance) var(--ease-out-expo) both;
}
.animate-in-scale {
    animation: fadeInScale var(--duration-slow) var(--ease-out-expo) both;
}
.animate-in-down {
    animation: fadeInDown var(--duration-entrance) var(--ease-out-expo) both;
}
.animate-pulse {
    animation: pulse-glow 2s ease-in-out infinite;
}
.animate-glow {
    animation: glowPulse 2s ease-in-out infinite;
}

/* Stagger delays */
.stagger > :nth-child(1) { animation-delay: 0ms; }
.stagger > :nth-child(2) { animation-delay: 50ms; }
.stagger > :nth-child(3) { animation-delay: 100ms; }
.stagger > :nth-child(4) { animation-delay: 150ms; }
.stagger > :nth-child(5) { animation-delay: 200ms; }
.stagger > :nth-child(6) { animation-delay: 250ms; }
.stagger > :nth-child(7) { animation-delay: 300ms; }
.stagger > :nth-child(8) { animation-delay: 350ms; }
.stagger > :nth-child(n+9) { animation-delay: 400ms; }


/* ══════════════════════════════════════════════
   MICRO-INTERACTIONS
   ══════════════════════════════════════════════ */

/* Card hover lift */
.card-hover {
    transition: transform var(--duration-normal) var(--ease-out-expo),
                box-shadow var(--duration-normal) ease,
                border-color var(--duration-normal) ease;
}
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--panel-shadow-hover);
    border-color: var(--glass-border-hover);
}
.card-hover:active {
    transform: translateY(0);
}

/* Subtle lift on hover */
.hover-lift {
    transition: transform var(--duration-normal) var(--ease-out-expo);
}
.hover-lift:hover {
    transform: translateY(-1px);
}

/* Glow on hover */
.hover-glow {
    transition: box-shadow var(--duration-normal) ease, border-color var(--duration-normal) ease;
}
.hover-glow:hover {
    box-shadow: var(--shadow-glow-primary);
    border-color: rgb(var(--color-accent-primary) / 0.25);
}

/* Press effect */
.press:active {
    transform: scale(0.97);
    transition-duration: var(--duration-fast);
}


/* ══════════════════════════════════════════════
   TRAIT PICKER (button-based trait selection)
   ══════════════════════════════════════════════ */

.trait-picker-loading {
    display: flex; align-items: center; justify-content: center;
    gap: 8px; padding: 24px; color: rgb(var(--color-text-muted));
    font-size: 12px;
}
.trait-picker-loading .spinner {
    width: 16px; height: 16px;
    border: 2px solid rgb(var(--color-accent-primary) / 0.2);
    border-top-color: rgb(var(--color-accent-primary));
    border-radius: 50%;
    animation: trait-spin 0.8s linear infinite;
}
@keyframes trait-spin { to { transform: rotate(360deg); } }

.trait-picker-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    max-height: 400px; overflow-y: auto;
}

.trait-category {
    padding: 10px; border-radius: var(--radius-sm);
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    display: flex; flex-direction: column; max-height: 180px;
}
.trait-category-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px; flex-shrink: 0;
}
.trait-category-name {
    font-size: 11px; font-weight: 600;
    color: rgb(var(--color-text-secondary));
    text-transform: uppercase; letter-spacing: 0.05em;
}
.trait-category-count {
    font-size: 10px; color: rgb(var(--color-text-muted));
}

.trait-values-scroll {
    flex: 1; overflow-y: auto; min-height: 0;
}
.trait-values {
    display: flex; flex-wrap: wrap; gap: 4px;
}

.trait-btn {
    padding: 4px 8px; border-radius: 4px;
    font-size: 11px; font-family: var(--font-mono);
    cursor: pointer; transition: all 0.15s ease;
    border: 1px solid var(--glass-border);
    background: rgb(var(--color-bg-deep));
    color: rgb(var(--color-text-secondary));
    text-transform: none; letter-spacing: 0;
    line-height: 1.3;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.trait-btn:hover {
    border-color: var(--glass-border-hover);
    background: rgb(var(--color-bg-elevated));
    color: rgb(var(--color-text-primary));
}
.trait-btn.selected {
    background: rgb(var(--color-accent-primary) / 0.15);
    border-color: rgb(var(--color-accent-primary) / 0.6);
    color: rgb(var(--color-accent-primary));
    box-shadow: 0 0 12px rgb(var(--color-accent-primary) / 0.15),
                inset 0 1px 0 rgba(255,255,255,0.06);
}
.trait-btn .trait-count {
    opacity: 0.6; font-size: 10px; margin-left: 2px;
}

.trait-selected-tags {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin-top: 10px; padding-top: 10px;
    border-top: 1px solid var(--glass-border);
}
.trait-tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 6px 4px 10px; border-radius: 6px;
    font-size: 11px; font-family: var(--font-mono);
    background: rgb(var(--color-bg-deep) / 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgb(var(--color-accent-primary) / 0.3);
    color: rgb(var(--color-accent-primary));
    text-transform: none; letter-spacing: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.trait-tag-remove {
    cursor: pointer; font-size: 11px; line-height: 1;
    transition: all 0.15s ease;
    margin-left: 2px; border: none;
    color: rgb(var(--color-accent-primary));
    padding: 2px 4px; border-radius: 3px;
    background: rgb(var(--color-accent-primary) / 0.1);
}
.trait-tag-remove:hover {
    background: rgb(var(--color-danger) / 0.2);
    color: rgb(var(--color-danger));
}


/* ══════════════════════════════════════════════
   THEME SWITCHER UI
   ══════════════════════════════════════════════ */

.theme-switcher {
    display: inline-flex; gap: 6px; align-items: center;
}
.theme-swatch {
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid var(--glass-border);
    cursor: pointer; transition: all 0.2s ease;
    position: relative;
}
.theme-swatch:hover { border-color: var(--glass-border-hover); transform: scale(1.15); }
.theme-swatch.active { border-color: rgb(var(--color-accent-primary)); box-shadow: 0 0 8px rgb(var(--color-accent-primary) / 0.4); }
.theme-swatch[data-theme="neon-blue-purple"] { background: linear-gradient(135deg, #0C0C12 50%, #00B4FF 50%); }
.theme-swatch[data-theme="crimson-dusk"] { background: linear-gradient(135deg, #101527 50%, #FFA586 50%); }
.theme-swatch[data-theme="frostbite"] { background: linear-gradient(135deg, #06141B 50%, #CCD0CF 50%); }
