:root {
    --bg-primary: #0B0D12;
    --bg-secondary: #10131A;
    --bg-card: #151923;
    --bg-card-hover: #1A1F2B;
    --border-color: #252B3A;
    --border-subtle: #1A1F2B;
    --text-primary: #F2F4F8;
    --text-secondary: #98A2B3;
    --text-muted: #667085;
    --accent: #3E8BFF;
    --accent-dim: rgba(62, 139, 255, 0.15);
    --accent-glow: rgba(62, 139, 255, 0.3);
    --orange: #FF6B35;
    --blue: #3B82F6;
    --purple: #7C5CFC;
    --pink: #FF4D6A;
    --yellow: #FFB800;
    --error: #EF4444;
    --warning: #FFB800;
    --card-bg: #151923;
    --surface-1: #10131A;
    --surface-2: #151923;
    --surface-3: #252B3A;
    --text-tertiary: #667085;
    --border: #252B3A;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: 0.2s ease;
    --max-width: 1200px;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(13, 15, 20, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-ghost {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    background: var(--accent);
    color: #0D0F14;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: #2F6FD6;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: 10px;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(13, 15, 20, 0.98);
    backdrop-filter: blur(20px);
    padding: 24px;
    flex-direction: column;
    gap: 12px;
    z-index: 99;
    border-bottom: 1px solid var(--border-subtle);
}

.mobile-menu.active {
    display: flex;
}

/* HERO */
.hero {
    position: relative;
    padding: 160px 0 100px;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse, var(--accent-dim) 0%, transparent 70%);
    opacity: 0.6;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(42, 45, 58, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 45, 58, 0.3) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-logo {
    display: inline-block;
    margin-bottom: 32px;
}

.hero h1 {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.backed-by {
    margin-top: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 14px;
}

.investor-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

/* FEATURES OVERVIEW */
.features-overview {
    padding: 100px 0;
}

.features-overview h2 {
    text-align: center;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    margin-bottom: 12px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent), #00B8D4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 17px;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* DETAIL FEATURES */
.detail-features {
    padding: 60px 0;
}

.detail-feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 60px 0;
    border-top: 1px solid var(--border-subtle);
}

.detail-feature.reverse {
    direction: rtl;
}

.detail-feature.reverse > * {
    direction: ltr;
}

.detail-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-content h2 {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 700;
    margin-bottom: 16px;
}

.detail-content p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
}

/* VISUAL CARDS */
.visual-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.green { background: var(--accent); }
.dot.orange { background: var(--orange); }
.dot.blue { background: var(--blue); }
.dot.purple { background: var(--purple); }

/* Execution Card */
.execution-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.metric {
    text-align: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
}

.metric-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.metric-label {
    font-size: 12px;
    color: var(--text-muted);
}

.execution-bars {
    display: flex;
    gap: 6px;
    height: 40px;
    align-items: flex-end;
}

.bar {
    flex: 1;
    background: var(--accent);
    border-radius: 4px 4px 0 0;
    opacity: 0.4;
    animation: barGrow 1.5s ease-in-out infinite;
}

.bar-1 { height: 60%; animation-delay: 0s; }
.bar-2 { height: 80%; animation-delay: 0.2s; }
.bar-3 { height: 100%; animation-delay: 0.4s; opacity: 1; }
.bar-4 { height: 70%; animation-delay: 0.6s; }
.bar-5 { height: 50%; animation-delay: 0.8s; }

@keyframes barGrow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Sniper Card */
.sniper-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feed-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
    font-size: 14px;
}

.token-name {
    font-weight: 600;
    min-width: 120px;
}

.status {
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.status.success {
    background: rgba(62, 139, 255, 0.15);
    color: var(--accent);
}

.status.pending {
    background: rgba(255, 107, 53, 0.15);
    color: var(--orange);
    animation: pulse 1.5s infinite;
}

.time {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 13px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* MEV Card */
.protection-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.protection-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: var(--transition);
}

.protection-item.active {
    border-color: rgba(62, 139, 255, 0.2);
}

/* Strategy Card */
.strategy-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
}

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-dim);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.step-title {
    font-weight: 600;
    font-size: 15px;
    display: block;
}

.step-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.step-line {
    width: 2px;
    height: 20px;
    background: var(--border-color);
    margin-left: 33px;
}

/* PLATFORMS */
.platforms-section {
    padding: 100px 0;
}

.platform-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.platform-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition);
}

.platform-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.platform-preview {
    padding: 24px;
    min-height: 200px;
    position: relative;
}

.perps-preview {
    background: linear-gradient(180deg, rgba(62, 139, 255, 0.05) 0%, transparent 100%);
}

.yield-preview {
    background: linear-gradient(180deg, rgba(124, 92, 252, 0.05) 0%, transparent 100%);
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s infinite;
}

.green-dot {
    background: var(--accent);
}

.chart-svg {
    width: 100%;
    height: 80px;
}

.yield-display {
    text-align: center;
    margin-bottom: 20px;
}

.apy {
    display: block;
    font-size: 40px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--purple), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.apy-label {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.yield-bars {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    height: 60px;
    justify-content: center;
}

.ybar {
    width: 24px;
    background: rgba(124, 92, 252, 0.3);
    border-radius: 4px 4px 0 0;
    transition: var(--transition);
}

.ybar.active {
    background: var(--purple);
}

.platform-info {
    padding: 24px;
    border-top: 1px solid var(--border-subtle);
}

.platform-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.platform-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 12px;
}

.stat {
    font-size: 14px;
    color: var(--text-secondary);
}

.stat strong {
    color: var(--text-primary);
}

.powered-by {
    font-size: 13px;
    color: var(--text-muted);
}

.platform-cta {
    text-align: center;
    margin-top: 48px;
}

/* REWARDS */
.rewards-section {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.rewards-section h2 {
    text-align: center;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    margin-bottom: 60px;
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.reward-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
}

.reward-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.reward-icon {
    margin-bottom: 20px;
}

.reward-card h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
}

.reward-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ARCHITECTURE */
.architecture-section {
    padding: 100px 0;
}

.architecture-section h2 {
    text-align: center;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    margin-bottom: 60px;
}

.arch-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.arch-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
    text-align: center;
    transition: var(--transition);
}

.arch-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.arch-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.arch-card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    max-width: 400px;
    margin: 0 auto;
}

/* Integration Hub Visual */
.integration-hub {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 32px;
}

.hub-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.hub-node {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.5;
}

.node-1 { top: 0; left: 50%; transform: translateX(-50%); }
.node-2 { top: 50%; right: 0; transform: translateY(-50%); }
.node-3 { bottom: 0; left: 50%; transform: translateX(-50%); }
.node-4 { top: 50%; left: 0; transform: translateY(-50%); }

.hub-line {
    position: absolute;
    background: linear-gradient(var(--accent-dim), transparent);
}

.line-1 { width: 1px; height: 60px; top: 16px; left: 50%; }
.line-2 { width: 60px; height: 1px; top: 50%; right: 16px; }
.line-3 { width: 1px; height: 60px; bottom: 16px; left: 50%; }
.line-4 { width: 60px; height: 1px; top: 50%; left: 16px; }

/* Security Shield Visual */
.security-shield {
    margin-bottom: 32px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* FAQ */
.faq-section {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.faq-section h2 {
    text-align: center;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    margin-bottom: 60px;
}

.faq-list {
    max-width: 720px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-subtle);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    font-family: var(--font);
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--accent);
}

.faq-chevron {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    color: var(--text-muted);
}

.faq-item.active .faq-chevron {
    transform: rotate(180deg);
    color: var(--accent);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding-bottom: 24px;
}

.faq-answer p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

/* CTA SECTION */
.cta-section {
    position: relative;
    padding: 120px 0;
    text-align: center;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cta-glow {
    position: absolute;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, var(--accent-dim) 0%, transparent 70%);
}

.cta-section h2 {
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 700;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.cta-section .btn-primary {
    position: relative;
    z-index: 1;
}

/* FOOTER */
footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-subtle);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 14px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-legal {
    display: flex;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
}

.footer-legal a {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-legal a:hover {
    color: var(--text-secondary);
}

/* ANIMATIONS */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .features-grid,
    .rewards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-feature {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .detail-feature.reverse {
        direction: ltr;
    }

    .platform-grid {
        grid-template-columns: 1fr;
    }

    .arch-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero {
        padding: 140px 0 80px;
    }

    .features-grid,
    .rewards-grid {
        grid-template-columns: 1fr;
    }

    .execution-metrics {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 32px;
    }

    .btn-lg {
        padding: 12px 24px;
        font-size: 15px;
    }
}

/* ======================== */
/* AUTH PAGES               */
/* ======================== */

.auth-page {
    min-height: 100vh;
}

.auth-main {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px 60px;
}

.auth-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.auth-glow {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 500px;
    background: radial-gradient(ellipse, var(--accent-dim) 0%, transparent 70%);
    opacity: 0.5;
}

.auth-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(42, 45, 58, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 45, 58, 0.2) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 60%);
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.auth-card.hidden {
    display: none;
}

.auth-card-enter {
    animation: cardEnter 0.3s ease;
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    display: inline-block;
    margin-bottom: 20px;
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* Wallet Buttons */
.wallet-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.wallet-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
}

.wallet-btn:hover {
    border-color: var(--accent);
    background: rgba(62, 139, 255, 0.05);
    transform: translateY(-1px);
}

.wallet-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    object-fit: cover;
}

.token-icon-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #1a1d24;
    flex-shrink: 0;
}

.wallet-logo-fallback {
    display: flex !important;
}

.wallet-name {
    flex: 1;
    text-align: left;
}

.wallet-badge {
    padding: 3px 8px;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    color: var(--text-muted);
    font-size: 13px;
    white-space: nowrap;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.optional {
    color: var(--text-muted);
    font-weight: 400;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition);
}

.input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.input-wrapper svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.input-wrapper input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
    padding: 12px 0;
    font-family: var(--font);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.toggle-password {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--text-secondary);
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid #0D0F14;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.link-accent {
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.link-accent:hover {
    color: #2F6FD6;
}

.btn-full {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    margin-top: 8px;
}

.auth-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--accent);
    font-weight: 600;
}

.auth-switch a:hover {
    color: #2F6FD6;
}

/* Password Strength */
.field-error {
    display: block;
    color: #FF4D6A;
    font-size: 12px;
    margin-top: 4px;
    min-height: 16px;
}

.password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.strength-bar {
    flex: 1;
    height: 3px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.strength-fill {
    width: 0;
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease, background 0.3s ease;
}

.strength-text {
    font-size: 12px;
    font-weight: 500;
    min-width: 50px;
}

/* Connecting Animation */
.connecting-animation {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success */
.success-icon {
    margin-bottom: 8px;
}

.success-icon svg {
    animation: successPop 0.4s ease;
}

@keyframes successPop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.success-loading {
    padding: 24px 0;
}

.loading-bar {
    height: 3px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.loading-fill {
    width: 0;
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    animation: loadingProgress 2s ease forwards;
}

@keyframes loadingProgress {
    to { width: 100%; }
}

/* Wallet Choose Grid */
.wallet-choose-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
}

.wallet-choose-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.wallet-choose-card:hover {
    border-color: var(--accent);
    background: rgba(62, 139, 255, 0.05);
    transform: translateY(-2px);
}

.wallet-choose-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wallet-choose-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.wallet-choose-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* Generating Steps */
.generating-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
    width: 100%;
}

.gen-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    opacity: 0.4;
    transition: all 0.3s;
}

.gen-step.active {
    opacity: 1;
    border-color: var(--accent);
    background: rgba(62, 139, 255, 0.05);
}

.gen-step.done {
    opacity: 0.7;
    border-color: var(--accent);
}

.gen-step.done .gen-step-icon {
    background: var(--accent);
    color: var(--bg-primary);
}

.gen-step.done .gen-step-icon::after {
    content: '✓';
    font-size: 12px;
}

.gen-step-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
}

.gen-step span {
    font-size: 13px;
    color: var(--text-secondary);
}

.gen-step.active span {
    color: var(--text-primary);
}

/* Seed Phrase Grid */
.seed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 20px 0;
}

.seed-word {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.seed-word-num {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 18px;
}

.seed-word-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

/* Seed Warning */
.seed-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255, 184, 0, 0.08);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 10px;
    margin-top: 16px;
}

.seed-warning span {
    font-size: 12px;
    color: #FFB800;
    line-height: 1.5;
}

.seed-warning svg {
    flex-shrink: 0;
    margin-top: 1px;
}

/* Seed Actions */
.seed-actions {
    display: flex;
    gap: 8px;
}

.seed-actions .btn-ghost {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    font-size: 13px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.seed-actions .btn-ghost:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

/* Confirm Words */
.confirm-words .form-group {
    margin-bottom: 16px;
}

.confirm-words label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.confirm-word-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.confirm-word-input:focus {
    outline: none;
    border-color: var(--accent);
}

/* Auth Responsive */
@media (max-width: 768px) {
    .auth-main {
        padding: 80px 20px 40px;
    }
    .auth-card {
        padding: 32px 28px;
    }
    .auth-header h1 {
        font-size: 22px;
    }
    .auth-header p {
        font-size: 14px;
    }
    .wallet-options {
        gap: 10px;
    }
    .wallet-btn {
        padding: 14px 16px;
    }
    .auth-divider {
        margin: 20px 0;
    }
    .auth-form {
        gap: 0;
    }
    .form-group {
        margin-bottom: 16px;
    }
    .btn-primary {
        padding: 13px;
        font-size: 15px;
    }
    .auth-switch {
        margin-top: 20px;
        font-size: 13px;
    }
    .code-digit {
        width: 44px;
        height: 52px;
        font-size: 22px;
    }
    .code-inputs { gap: 8px; }
    .seed-grid { gap: 8px; padding: 0 8px; }
    .seed-word { padding: 8px 10px; font-size: 13px; }
    .wallet-choose-grid { gap: 10px; padding: 0 8px; }
    .wallet-choose-card { padding: 16px; }
    .confirm-words .form-group { margin-bottom: 14px; }
    .connecting-animation { margin: 20px 0; }
    .generating-steps { padding: 0 16px; gap: 10px; }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 28px 20px;
    }

    .auth-main {
        padding: 70px 16px 30px;
    }

    .auth-header h1 {
        font-size: 20px;
    }

    .wallet-btn {
        padding: 12px 14px;
    }

    .wallet-name {
        font-size: 13px;
    }

    .code-digit {
        width: 40px;
        height: 48px;
        font-size: 18px;
    }
    .code-inputs { gap: 6px; }

    .seed-grid { gap: 6px; }
    .seed-word { padding: 6px 8px; font-size: 12px; }
    .wallet-choose-grid { gap: 8px; }
    .wallet-choose-card { padding: 14px; }
}

/* ========================================
   DASHBOARD STYLES
   ======================================== */

.dash-page {
    overflow: hidden;
    height: 100vh;
}

/* ===== DISCOVER CHART ===== */
.discover-chart-container {
    background: #131620;
    border: 1px solid #2A2D3A;
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
}

.discover-chart-pair {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}
.discover-chart-tf-btns {
    display: flex;
    gap: 2px;
}
.discover-chart-tf-btns button {
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500;
    color: #6B7280;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: var(--font);
}
.discover-chart-tf-btns button:hover {
    color: #A0AEC0;
    background: rgba(255,255,255,0.04);
}
.discover-chart-tf-btns button.active {
    color: #3E8BFF;
    background: rgba(62, 139, 255,0.1);
}

/* ===== HOTKEY TOOLTIP ===== */
.hotkey-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(19,22,32,0.95);
    border: 1px solid #2A2D3A;
    border-radius: 10px;
    padding: 10px 18px;
    display: flex;
    gap: 14px;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(12px);
    font-size: 12px;
    color: #A0AEC0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.hotkey-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.hotkey-toast kbd {
    display: inline-block;
    padding: 2px 6px;
    background: #2A2D3A;
    border: 1px solid #3A3D4A;
    border-radius: 4px;
    font-size: 11px;
    font-family: monospace;
    color: #fff;
    margin: 0 2px;
}

/* Top Bar */
.dash-topbar {
    height: 52px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    gap: 16px;
    position: relative;
    z-index: 10;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.topbar-left .logo {
    font-size: 16px;
    font-weight: 700;
}

.topbar-tabs {
    display: flex;
    gap: 4px;
}

.topbar-tab {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.topbar-tab:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
}

.topbar-tab.active {
    color: var(--text-primary);
    background: rgba(62, 139, 255, 0.1);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 220px;
}

.topbar-search svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.topbar-search input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 13px;
    width: 100%;
    font-family: var(--font);
}

.topbar-search input::placeholder {
    color: var(--text-muted);
}

.topbar-balance {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.balance-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.balance-amount {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
}

.topbar-wallet {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
}

.wallet-avatar {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--accent);
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.wallet-addr {
    font-size: 13px;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
}

.topbar-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.topbar-icon-btn:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

/* Dashboard Layout */


/* Sidebar */
.dash-sidebar {
    width: 56px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px 0;
    flex-shrink: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 4px;
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 500;
    transition: var(--transition);
    border-radius: 8px;
    margin: 0 6px;
}

.sidebar-link:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
}

.sidebar-link.active {
    color: var(--accent);
    background: rgba(62, 139, 255, 0.1);
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
}

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Main Content */
.dash-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* Filters */
.dash-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border-subtle);
    gap: 12px;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    gap: 4px;
}

.filter-tab {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
}

.filter-tab:hover {
    color: var(--text-secondary);
}

.filter-tab.active {
    color: var(--text-primary);
    background: rgba(62, 139, 255, 0.1);
    border-color: rgba(62, 139, 255, 0.2);
}

.filter-right {
    display: flex;
    align-items: center;
    gap: 10px;
}



.filter-group label {
    font-size: 11px;
    color: var(--text-muted);
}

.filter-input {
    width: 60px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 12px;
    font-family: var(--font);
    text-align: center;
}

.filter-input:focus {
    outline: none;
    border-color: var(--accent);
}

.filter-reset {
    padding: 4px 10px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    font-family: var(--font);
}

.filter-reset:hover {
    border-color: var(--text-secondary);
    color: var(--text-secondary);
}

/* Token Table */


.dash-table-wrap::-webkit-scrollbar {
    width: 6px;
}



.dash-table-wrap::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.dash-table th {
    padding: 8px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
}

.dash-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
}

.token-row {
    cursor: pointer;
    transition: background 0.15s;
    animation: rowFadeIn 0.3s ease forwards;
    opacity: 0;
}





.token-row.selected {
    background: rgba(62, 139, 255, 0.06);
    border-left: 2px solid var(--accent);
}



.token-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.token-name {
    font-weight: 600;
    font-size: 13px;
}

.token-sym {
    font-size: 11px;
    color: var(--text-muted);
}

.age-cell {
    color: var(--text-muted);
}

.change-pos {
    color: var(--accent);
    font-weight: 600;
}

.change-neg {
    color: var(--pink);
    font-weight: 600;
}

.btn-sm {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    cursor: pointer;
    font-family: var(--font);
    transition: var(--transition);
}



.btn-xs {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    font-family: var(--font);
    transition: var(--transition);
}

.btn-xs:hover {
    background: rgba(62, 139, 255,0.15);
    color: var(--accent);
    border-color: rgba(62, 139, 255,0.3);
}

.flash-green {
    color: var(--accent) !important;
}

.flash-red {
    color: var(--pink) !important;
}

/* Bottom Panel */
.dash-bottom {
    display: grid;
    grid-template-columns: 340px 1fr;
    border-top: 1px solid var(--border-subtle);
    height: 220px;
    flex-shrink: 0;
}

/* Trade Panel */
.trade-panel {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
}

.trade-header {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 12px;
}



.trade-tab {
    padding: 4px 14px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-family: var(--font);
    transition: var(--transition);
}

.trade-tab.active {
    background: var(--accent);
    color: var(--bg-primary);
}

.trade-tab.sell.active {
    background: var(--pink);
    color: white;
}

.trade-token {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.trade-body {
    padding: 10px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trade-input-group label {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}

.trade-input-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.trade-input {
    flex: 1;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
}

.trade-input:focus {
    outline: none;
    border-color: var(--accent);
}

.trade-quick-btns {
    display: flex;
    gap: 3px;
}

.trade-quick-btns button {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font);
}

.trade-quick-btns button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.trade-settings {
    display: flex;
    gap: 12px;
}



.trade-setting label {
    font-size: 10px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 3px;
}

.setting-btns {
    display: flex;
    gap: 3px;
}

.setting-btns button {
    flex: 1;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font);
}

.setting-btns button.active {
    background: rgba(62, 139, 255, 0.1);
    border-color: rgba(62, 139, 255, 0.3);
    color: var(--accent);
}

.btn-buy {
    background: var(--accent);
    color: var(--bg-primary);
    font-weight: 700;
    padding: 8px;
    font-size: 13px;
}

.btn-sell {
    background: var(--pink);
    color: white;
    font-weight: 700;
    padding: 8px;
    font-size: 13px;
}

/* Activity Feed */
.activity-feed {
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.feed-header {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.feed-header h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--accent);
    font-weight: 500;
}

.live-dot-sm {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s infinite;
}

.feed-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.feed-list::-webkit-scrollbar {
    width: 4px;
}

.feed-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.feed-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px;
    font-size: 12px;
    animation: feedSlide 0.3s ease;
}

@keyframes feedSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.feed-type {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    min-width: 36px;
    text-align: center;
}

.feed-type.buy {
    background: rgba(62, 139, 255, 0.15);
    color: var(--accent);
}

.feed-type.sell {
    background: rgba(255, 77, 106, 0.15);
    color: var(--pink);
}

.feed-token {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 60px;
}

.feed-amount {
    color: var(--text-secondary);
    min-width: 70px;
}

.feed-wallet {
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
    font-size: 11px;
    flex: 1;
}

.feed-time {
    color: var(--text-muted);
    font-size: 11px;
}

/* Dashboard Responsive */
.wallet-success-address {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--accent);
    margin-bottom: 4px;
}

@media (max-width: 1024px) {
    .topbar-search {
        display: none;
    }

    .dash-bottom {
        grid-template-columns: 1fr;
        height: auto;
    }

    .trade-panel {
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
    }
}

@media (max-width: 768px) {
    .topbar-tabs {
        display: none;
    }

    .topbar-balance {
        display: none;
    }
}

/* Verification Code View */
.code-display {
    background: rgba(62, 139, 255,0.08);
    border: 1px dashed rgba(62, 139, 255,0.4);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 24px;
    text-align: center;
}

.code-label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.code-value {
    display: block;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 12px;
    color: var(--accent);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.code-hint {
    display: block;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 8px;
}

.code-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.code-digit {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    font-family: 'SF Mono', 'Fira Code', monospace;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.code-digit:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(62, 139, 255,0.15);
}

.code-digit.filled {
    border-color: var(--accent);
    background: rgba(62, 139, 255,0.05);
}

.code-digit.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239,68,68,0.15);
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Wallet Required Overlay */




.wallet-overlay-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 48px 40px;
    max-width: 440px;
    width: 90%;
    text-align: center;
}

.wallet-overlay-card .overlay-icon {
    width: 72px;
    height: 72px;
    background: rgba(239,68,68,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.wallet-overlay-card .overlay-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--error);
}

.wallet-overlay-card h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.wallet-overlay-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 28px;
}

.wallet-overlay-card .overlay-wallets {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.wallet-overlay-card .overlay-wallets .wallet-btn {
    border-color: var(--border-color);
}

.wallet-overlay-card .overlay-skip {
    color: var(--text-tertiary);
    font-size: 13px;
}

.wallet-overlay-card .overlay-skip a {
    color: var(--error);
    cursor: pointer;
    text-decoration: underline;
}

/* Trade disabled state */
.trade-disabled {
    opacity: 0.4;
    pointer-events: none;
    position: relative;
}

.trade-disabled::after {
    content: '';
    position: absolute;
    inset: 0;
    cursor: not-allowed;
}

/* ===== Page Sections ===== */
.page-section {
    display: none;
    flex: 1;
    overflow: auto;
    min-height: 0;
}

.page-section.active {
    display: flex;
    flex-direction: column;
}

/* ===== PERPS PAGE ===== */
.perps-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1px;
    background: var(--border-color);
    height: 100%;
    min-height: 0;
}

.perps-left {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    min-height: 0;
    overflow: auto;
}

.perps-right {
    background: var(--bg-primary);
    padding: 16px;
    overflow: auto;
}

.perps-header-bar {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.perps-pair-selector {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(0,0,0,0.25);
    border-radius: var(--radius);
    cursor: pointer;
    margin-bottom: 12px;
    position: relative;
}

.perps-pair-selector:hover {
    background: rgba(0,0,0,0.4);
}





.pair-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    width: 320px;
    max-height: 400px;
    background: #1a1d24;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    z-index: 100;
    overflow: hidden;
}



.pair-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
}

.pair-search {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

.pair-search::placeholder {
    color: var(--text-tertiary);
}

.pair-list {
    max-height: 340px;
    overflow-y: auto;
}





.pair-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.1s;
}





.pair-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: white;
    flex-shrink: 0;
}



.pair-item-name {
    font-size: 13px;
    font-weight: 600;
}

.pair-item-base {
    font-size: 11px;
    color: var(--text-tertiary);
}



.pair-item-last {
    font-size: 13px;
    font-weight: 600;
}

.pair-item-chg {
    font-size: 11px;
}

.perps-pair-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: white;
}

.perps-pair-name {
    font-weight: 600;
    font-size: 15px;
}

.perps-price-info {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}

.perps-last-price {
    font-size: 28px;
    font-weight: 800;
}

.perps-price-change {
    font-size: 14px;
    font-weight: 600;
}

.positive { color: var(--accent); }
.negative { color: var(--error); }

.perps-stats-row {
    display: flex;
    gap: 24px;
}

.perps-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 13px;
    font-weight: 600;
}

.perps-chart {
    flex: 1;
    min-height: 300px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}



.chart-timeframe-btns {
    display: flex;
    gap: 2px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border-color);
}

.chart-timeframe-btns button {
    padding: 4px 10px;
    font-size: 12px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s;
}

.chart-timeframe-btns button:hover { color: var(--text-primary); }
.chart-timeframe-btns button.active { background: var(--accent); color: #0D0F14; font-weight: 600; }





/* Perps Positions */
.perps-positions {
    border-top: 1px solid var(--border-color);
}

.positions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
}

.positions-header h3 {
    font-size: 14px;
    font-weight: 600;
}



.positions-tabs button {
    padding: 4px 12px;
    font-size: 12px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px;
}

.positions-tabs button.active { background: rgba(255,255,255,0.06); color: var(--text-primary); }



.positions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.positions-table th {
    padding: 8px 12px;
    text-align: left;
    font-weight: 500;
    color: var(--text-tertiary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.positions-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
}



.pos-side {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.pos-side.long { background: rgba(46, 189, 133,0.15); color: var(--accent); }
.pos-side.short { background: rgba(239,68,68,0.15); color: var(--error); }

.liq-price { color: var(--warning, #FFB800); }


.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-sm:hover { background: rgba(255,255,255,0.1); }

.btn-close-pos {
    background: rgba(239,68,68,0.1);
    border-color: rgba(239,68,68,0.3);
    color: var(--error);
}

.btn-close-pos:hover { background: rgba(239,68,68,0.2); }

/* Trade rows in positions table */
.positions-table .trade-section-header td {
    padding: 6px 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.positions-table tr.trade-row td {
    opacity: 0.55;
    font-size: 11px;
}
.positions-table tr.trade-row:hover td { opacity: 0.85; }
.pos-side.trade {
    background: rgba(62, 139, 255,0.1);
    color: #3E8BFF;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
}

/* Perps Order Form */
.perps-order-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.perps-order-tabs {
    display: flex;
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(0,0,0,0.2);
}

.perps-order-tab {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    font-weight: 700;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.perps-order-tab.active {
    background: var(--accent);
    color: #0D0F14;
}

.perps-order-tab.short.active {
    background: var(--error);
    color: white;
}

.perps-leverage {
    display: flex;
    flex-direction: column;
    gap: 8px;
}



.leverage-header label {
    font-size: 13px;
    color: var(--text-secondary);
}

.leverage-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
}

.leverage-slider {
    width: 100%;
    -webkit-appearance: none;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.1);
    outline: none;
}

.leverage-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(62, 139, 255,0.4);
}

.leverage-presets {
    display: flex;
    gap: 6px;
}

.leverage-presets button {
    flex: 1;
    padding: 6px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.leverage-presets button:hover { border-color: var(--accent); color: var(--accent); }
.leverage-presets button.active { background: rgba(62, 139, 255,0.15); border-color: var(--accent); color: var(--accent); }

.perps-form-group label {
    display: block;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.perps-input-wrap {
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.perps-input {
    width: 100%;
    padding: 12px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    outline: none;
}

.perps-input-btns {
    display: flex;
    border-top: 1px solid var(--border-color);
}

.perps-input-btns button {
    flex: 1;
    padding: 6px;
    font-size: 11px;
    font-weight: 600;
    background: none;
    border: none;
    border-right: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
}


.perps-input-btns button:hover { color: var(--accent); }

.perps-order-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.info-row span:first-child { color: var(--text-tertiary); }


.btn-long { background: var(--accent) !important; color: #0D0F14 !important; }
.btn-short { background: var(--error) !important; color: white !important; }

.perps-risk-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: rgba(255,184,0,0.08);
    border: 1px solid rgba(255,184,0,0.2);
    border-radius: var(--radius);
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ===== YIELD PAGE ===== */
.yield-layout {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: auto;
}

.yield-summary-cards {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 12px;
}

.yield-card {
    padding: 16px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.yield-card-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.yield-card-icon {
    width: 52px;
    height: 52px;
    background: rgba(62, 139, 255,0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.yield-card-label {
    display: block;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.yield-card-value {
    display: block;
    font-size: 22px;
    font-weight: 800;
}

.yield-body {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.yield-pool-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.yield-pool-tabs button {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.yield-pool-tabs button:hover { border-color: var(--accent); color: var(--accent); }
.yield-pool-tabs button.active { background: rgba(62, 139, 255,0.1); border-color: var(--accent); color: var(--accent); }

.yield-pool-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
}

.pool-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.pool-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pool-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pool-info h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}

.pool-info p {
    font-size: 12px;
    color: var(--text-tertiary);
}



.apy-value {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--accent);
}

.apy-label {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: uppercase;
}

.pool-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.pool-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pool-stat span:first-child {
    font-size: 11px;
    color: var(--text-tertiary);
}

.pool-stat span:last-child {
    font-size: 13px;
    font-weight: 600;
}

.pool-deposit {
    display: flex;
    gap: 8px;
}

.pool-input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
}

.pool-input:focus {
    border-color: var(--accent);
}



.yield-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-tertiary);
}

.yield-empty p {
    margin-top: 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
}

.yield-empty span {
    font-size: 13px;
}

.yield-position-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 8px;
}

.yield-pos-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.yield-pos-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
}

.yield-pos-name {
    font-size: 14px;
    font-weight: 600;
}

.yield-pos-apy {
    font-size: 12px;
    color: var(--accent);
}



.yield-pos-deposited {
    font-size: 14px;
    font-weight: 600;
}

.yield-pos-earned {
    font-size: 12px;
    color: var(--accent);
}

.yield-pos-actions {
    display: flex;
    gap: 6px;
}

.yield-pos-actions button {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
}

.yield-withdraw-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.yield-harvest-btn {
    background: var(--accent);
    border: none;
    color: #0D0F14;
}

/* ===== PORTFOLIO PAGE ===== */
.portfolio-layout {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: auto;
}

.portfolio-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.portfolio-label {
    display: block;
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}

.portfolio-value {
    display: block;
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 4px;
}

.portfolio-change {
    font-size: 14px;
    font-weight: 500;
}

.portfolio-chart-mini {
    width: 280px;
    height: 60px;
}



.portfolio-body {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 20px;
}

.holdings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.holdings-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.holdings-tabs {
    display: flex;
    gap: 4px;
}

.holdings-tabs button {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.holdings-tabs button.active {
    background: rgba(62, 139, 255,0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.holding-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.holding-row:hover {
    border-color: var(--accent);
}

.holding-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}



.holding-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.holding-sym {
    font-size: 12px;
    color: var(--text-tertiary);
}



.holding-qty {
    display: block;
    font-size: 13px;
    font-weight: 500;
}

.holding-val {
    font-size: 12px;
    color: var(--text-secondary);
}

.holding-pnl {
    font-size: 13px;
    font-weight: 700;
    min-width: 60px;
    text-align: right;
}

/* Portfolio Right */
.portfolio-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.portfolio-stat-card {
    padding: 14px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.portfolio-stat-card .stat-label {
    display: block;
    font-size: 11px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.portfolio-stat-card .stat-value {
    font-size: 18px;
    font-weight: 700;
}

.portfolio-history h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.history-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.history-icon.buy { background: rgba(46, 189, 133,0.15); color: var(--accent); }
.history-icon.sell { background: rgba(239,68,68,0.15); color: var(--error); }
.history-icon.stake { background: rgba(59,130,246,0.15); color: #3B82F6; }



.history-action {
    display: block;
    font-size: 13px;
    font-weight: 600;
}

.history-time {
    font-size: 11px;
    color: var(--text-tertiary);
}



.history-qty {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
}

.history-val {
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 1200px) {
    .perps-layout { grid-template-columns: 1fr; }
    .perps-right { border-top: 1px solid var(--border-color); }
    .yield-summary-cards { grid-template-columns: 1fr 1fr; }
    .yield-body { grid-template-columns: 1fr; }
    .portfolio-body { grid-template-columns: 1fr; }
    .portfolio-summary { flex-direction: column; gap: 16px; text-align: center; }
    .portfolio-chart-mini { width: 100%; height: 40px; }
}

@media (max-width: 768px) {
    .yield-summary-cards { grid-template-columns: 1fr; }
    .pool-stats { grid-template-columns: 1fr 1fr; }
    .portfolio-stats-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   VORTEX DASHBOARD - Axiom.trade Inspired Redesign
   ============================================================ */

/* ---- Top Bar ---- */
.dash-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 12px;
    background: #0D0F14;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: relative;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1 1 auto;
    min-width: 0;
}

.topbar-left .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.topbar-center {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    max-width: 360px;
    margin: 0 auto;
    padding: 0 8px;
}

.topbar-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    width: 100%;
    max-width: 320px;
    height: 32px;
    transition: border-color 0.15s;
    cursor: text;
}

.topbar-search:focus-within {
    border-color: rgba(62, 139, 255,0.4);
}

.topbar-search svg {
    color: rgba(255,255,255,0.3);
    flex-shrink: 0;
}

.topbar-search input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 12px;
    font-family: var(--font);
}

.topbar-search input::placeholder {
    color: rgba(255,255,255,0.3);
}

.topbar-search kbd {
    font-size: 10px;
    padding: 1px 5px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    color: rgba(255,255,255,0.3);
    font-family: var(--font);
    line-height: 1.4;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.topbar-balance {
    padding: 4px 10px;
    background: rgba(62, 139, 255,0.08);
    border-radius: 6px;
    white-space: nowrap;
}

.balance-amount {
    font-size: 12px;
    font-weight: 600;
    color: #3E8BFF;
}

.topbar-wallet {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    max-width: 210px;
    min-width: 0;
}

.wallet-avatar {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: #3E8BFF;
    color: #0D0F14;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

.wallet-addr {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    font-family: 'Courier New', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.topbar-icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: none;
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.topbar-icon-btn:hover {
    border-color: rgba(255,255,255,0.15);
    color: #fff;
}

/* ---- Sidebar ---- */
.dash-sidebar {
    width: 48px;
    background: #0D0F14;
    border-right: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px 0;
    flex-shrink: 0;
    z-index: 10;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 4px;
    color: rgba(255,255,255,0.35);
    font-size: 9px;
    font-weight: 500;
    transition: all 0.15s;
    position: relative;
    border-radius: 8px;
    margin: 0 6px;
    overflow: hidden;
}

.sidebar-link span {
    display: none;
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #1a1d24;
    border: 1px solid rgba(255,255,255,0.08);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}

.dash-sidebar:hover .sidebar-link span {
    display: block;
    opacity: 1;
}

.sidebar-link:hover {
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.04);
}

.sidebar-link.active {
    color: #3E8BFF;
    background: rgba(62, 139, 255,0.1);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 16px;
    background: #3E8BFF;
    border-radius: 0 2px 2px 0;
}

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.sidebar-section-label {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.2);
    padding: 8px 0 4px;
    text-align: center;
    font-weight: 600;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 4px 8px;
}

/* ---- Layout ---- */
.dash-layout {
    display: flex;
    height: calc(100vh - 52px);
}

.dash-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
    overflow-y: hidden;
    min-width: 0;
    background: #0D0F14;
}

/* ---- Page Sections ---- */
.page-section {
    display: none;
    flex: 1;
    overflow-x: clip;
    overflow-y: hidden;
    min-height: 0;
}

.page-section.active {
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 16px;
}

/* ---- Perpetuals override (no extra padding, has internal layout) ---- */
.page-section#page-perps.active,
.page-section#page-portfolio.active,
.page-section#page-pulse.active {
    padding: 0;
    gap: 0;
}

/* ---- Discover Layout ---- */
.dash-discover-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.dash-discover-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    border-right: 1px solid rgba(255,255,255,0.06);
}

.dash-discover-right {
    width: 420px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #11131A;
}

.discover-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: rgba(255,255,255,0.2);
    font-size: 13px;
}

.discover-split {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.discover-split.hidden {
    display: none;
}

.discover-chart-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    min-height: 200px;
}

.discover-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.discover-chart-token {
    display: flex;
    align-items: center;
    gap: 10px;
}

.discover-chart-symbol {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.discover-chart-price {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
}

.discover-chart-change {
    font-size: 12px;
    font-weight: 600;
}

.discover-chart-change.positive { color: #3E8BFF; }
.discover-chart-change.negative { color: #FF4D6A; }

.discover-trade-panel {
    display: flex;
    flex-direction: column;
    background: #151820;
    overflow: hidden;
    min-height: 0;
}

/* ---- Filters ---- */
.dash-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    gap: 8px;
    flex-wrap: wrap;
    background: #0D0F14;
}

.filter-tabs {
    display: flex;
    gap: 2px;
}

.filter-tab {
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font);
}

.filter-tab:hover {
    color: rgba(255,255,255,0.7);
}

.filter-tab.active {
    color: #fff;
    background: rgba(62, 139, 255,0.12);
    border-color: rgba(62, 139, 255,0.2);
}

.filter-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.filter-group label {
    font-size: 10px;
    color: rgba(255,255,255,0.3);
}

.filter-input {
    width: 52px;
    padding: 3px 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    color: #fff;
    font-size: 11px;
    font-family: var(--font);
    text-align: center;
}

.filter-input:focus {
    outline: none;
    border-color: rgba(62, 139, 255,0.4);
}

.filter-reset {
    padding: 3px 8px;
    background: none;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    color: rgba(255,255,255,0.3);
    font-size: 10px;
    cursor: pointer;
    font-family: var(--font);
}

.filter-reset:hover {
    border-color: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.6);
}

/* ---- Token Table ---- */
.dash-table-wrap {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
}

.dash-table-wrap::-webkit-scrollbar {
    width: 4px;
}

.dash-table-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.dash-table-wrap::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.dash-table th {
    padding: 6px 10px;
    text-align: left;
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #0D0F14;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
}

.dash-table td {
    padding: 7px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    white-space: nowrap;
}

.token-row {
    cursor: pointer;
    transition: background 0.12s;
    animation: rowFadeIn 0.3s ease forwards;
    opacity: 0;
}

@keyframes rowFadeIn {
    to { opacity: 1; }
}

.token-row:hover {
    background: rgba(62, 139, 255,0.03);
}

.token-row.selected {
    background: rgba(62, 139, 255,0.06);
}

.token-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.token-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: white;
    flex-shrink: 0;
}

.token-name {
    font-weight: 600;
    font-size: 12px;
}

.token-sym {
    font-size: 10px;
    color: rgba(255,255,255,0.35);
}

.age-cell {
    color: rgba(255,255,255,0.35);
}

.change-pos {
    color: #3E8BFF;
    font-weight: 600;
}

.change-neg {
    color: #FF4D6A;
    font-weight: 600;
}

.btn-sm {
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 600;
    background: #3E8BFF;
    color: #0D0F14;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.15s;
}

.btn-sm:hover {
    background: #2F6FD6;
}

.btn-quick-buy {
    background: rgba(62, 139, 255,0.12);
    color: #3E8BFF;
    border: 1px solid rgba(62, 139, 255,0.2);
}

.btn-quick-buy:hover {
    background: rgba(62, 139, 255,0.2);
}

.flash-green {
    color: #3E8BFF !important;
}

.flash-red {
    color: #FF4D6A !important;
}

/* ---- Trade Panel ---- */
.trade-header {
    padding: 6px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 10px;
}

.trade-tabs {
    display: flex;
    gap: 2px;
}

.trade-tab {
    padding: 4px 14px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,0.35);
    font-family: var(--font);
    transition: all 0.15s;
}

.trade-tab.active {
    background: #3E8BFF;
    color: #0D0F14;
}

.trade-tab[data-side="sell"].active {
    background: #FF4D6A;
    color: #fff;
}

.trade-token {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
}

.trade-body {
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.trade-input-group label {
    font-size: 10px;
    color: rgba(255,255,255,0.3);
    display: block;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trade-input-row {
    display: flex;
    gap: 4px;
    align-items: center;
}

.trade-input {
    flex: 1;
    padding: 6px 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font);
}

.trade-input:focus {
    outline: none;
    border-color: rgba(62, 139, 255,0.4);
}

.trade-quick-btns {
    display: flex;
    gap: 2px;
}

.trade-quick-btns button {
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.12s;
}

.trade-quick-btns button:hover {
    border-color: rgba(62, 139, 255,0.3);
    color: #3E8BFF;
}

.trade-settings {
    display: flex;
    gap: 8px;
}

.trade-setting {
    flex: 1;
}

.trade-setting label {
    font-size: 9px;
    color: rgba(255,255,255,0.25);
    display: block;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.setting-btns {
    display: flex;
    gap: 2px;
}

.setting-btns button {
    flex: 1;
    padding: 3px 5px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.12s;
}

.setting-btns button.active {
    background: rgba(62, 139, 255,0.1);
    border-color: rgba(62, 139, 255,0.25);
    color: #3E8BFF;
}

.btn-buy {
    background: #3E8BFF;
    color: #0D0F14;
    font-weight: 700;
    padding: 8px;
    font-size: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font);
    width: 100%;
    transition: all 0.15s;
}

.btn-buy:hover { background: #2F6FD6; }

.btn-sell {
    background: #FF4D6A;
    color: #fff;
    font-weight: 700;
    padding: 8px;
    font-size: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font);
    width: 100%;
    transition: all 0.15s;
}

.btn-sell:hover { background: #E63E5A; }

.btn-full { width: 100%; }

/* ---- Activity Bar ---- */
.dash-activity-bar {
    height: 28px;
    background: #0A0C10;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.activity-bar-header {
    padding: 0 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.activity-bar-scroll {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    padding: 0 8px;
}

.activity-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    font-size: 10px;
    white-space: nowrap;
    flex-shrink: 0;
    animation: feedSlide 0.3s ease;
}

@keyframes feedSlide {
    from { opacity: 0; transform: translateX(8px); }
    to { opacity: 1; transform: translateX(0); }
}

.activity-type {
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.activity-type.buy {
    background: rgba(62, 139, 255,0.12);
    color: #3E8BFF;
}

.activity-type.sell {
    background: rgba(255,77,106,0.12);
    color: #FF4D6A;
}
.activity-type.warning {
    background: rgba(255,183,0,0.12);
    color: #FFB700;
}
.activity-type.migrated {
    background: rgba(130,100,255,0.12);
    color: #8264FF;
}

.activity-token {
    font-weight: 600;
    color: rgba(255,255,255,0.7);
}

.activity-amount {
    color: rgba(255,255,255,0.4);
}

.activity-usd {
    color: rgba(255,255,255,0.25);
}

.activity-wallet {
    color: rgba(255,255,255,0.2);
    font-family: 'Courier New', monospace;
    font-size: 9px;
}

.activity-time {
    color: rgba(255,255,255,0.2);
    font-size: 10px;
}

/* ---- Discover Page (Axiom-style) ---- */
.discover-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
    overflow: hidden;
    min-height: 0;
}

.discover-main {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    min-height: 0;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.04);
}

.discover-trade-panel {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    overflow: hidden;
    min-height: 0;
    gap: 0;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.04);
}

.discover-filters {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.filter-tab {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

.filter-tab:hover {
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.05);
}

.filter-tab.active {
    color: #fff;
    background: rgba(62, 139, 255,0.12);
}

.discover-table-wrap {
    flex: 1;
    overflow: auto;
    min-height: 0;
}

.discover-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.discover-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #0D0F14;
}

.discover-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    white-space: nowrap;
}

.discover-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    white-space: nowrap;
}

.token-row {
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}

.token-row:hover {
    background: rgba(255,255,255,0.03);
    box-shadow: inset 0 0 0 1px rgba(62, 139, 255,0.08), inset 0 0 20px rgba(62, 139, 255,0.02);
}

.token-row.selected {
    background: rgba(62, 139, 255,0.06);
    box-shadow: inset 0 0 0 1px rgba(62, 139, 255,0.15);
}

.token-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.token-info-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.token-name-row { display: flex; align-items: center; gap: 6px; }
.token-name { font-weight: 600; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.token-sym { font-size: 11px; color: rgba(255,255,255,0.35); font-weight: 500; }
.token-meta-row { display: flex; align-items: center; gap: 6px; }
.token-age { font-size: 10px; color: rgba(255,255,255,0.25); }

.token-price-col { text-align: right; }
.token-price-main { font-size: 13px; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }

.token-data-col { text-align: right; }
.token-data-label { display: block; font-size: 9px; color: rgba(255,255,255,0.2); text-transform: uppercase; letter-spacing: 0.5px; }
.token-data-val { display: block; font-size: 12px; color: rgba(255,255,255,0.6); font-weight: 500; font-variant-numeric: tabular-nums; }

.token-change-col { text-align: right; }
.token-change-val { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }

.token-action-col { text-align: right; }
.token-qb-inline { display: flex; gap: 6px; justify-content: flex-end; }

.qb-snap {
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 7px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.qb-snap:hover {
    background: rgba(62, 139, 255,0.1);
    color: #3E8BFF;
    border-color: rgba(62, 139, 255,0.25);
}

.qb-snap-main {
    background: rgba(62, 139, 255,0.12);
    color: #3E8BFF;
    border-color: rgba(62, 139, 255,0.2);
    font-weight: 700;
}

.qb-snap-main:hover {
    background: rgba(62, 139, 255,0.25);
    border-color: rgba(62, 139, 255,0.4);
    box-shadow: 0 0 10px rgba(62, 139, 255,0.15);
}

.hide-mobile { }




@keyframes priceFlashUp {
    0% { background: rgba(62, 139, 255,0.2); }
    100% { background: transparent; }
}
@keyframes priceFlashDown {
    0% { background: rgba(255,77,106,0.2); }
    100% { background: transparent; }
}
.token-row.flash-up { animation: priceFlashUp 0.6s ease; }
.token-row.flash-down { animation: priceFlashDown 0.6s ease; }

.token-sym {
    color: rgba(255,255,255,0.3);
    font-size: 10px;
}

.age-cell {
    color: rgba(255,255,255,0.4);
}

.change-pos { color: #3E8BFF; }
.change-neg { color: #EF4444; }

/* ===== TOKEN TOOLTIP ===== */
.token-tooltip {
    position: fixed;
    z-index: 99999;
    width: 240px;
    background: linear-gradient(135deg,#1A1D27 0%,#13151C 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,.6),0 0 0 1px rgba(62, 139, 255,0.06);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .2s ease,transform .2s ease;
    pointer-events: none;
}
.token-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}
.tt-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 12px;
}
.tt-icon { flex-shrink: 0; }
.tt-title { flex: 1; min-width: 0; }
.tt-name { font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-sym { font-size: 10px; color: rgba(255,255,255,0.3); }
.tt-price { font-size: 13px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.tt-body { display: flex; flex-direction: column; gap: 6px; }
.tt-row { display: flex; justify-content: space-between; align-items: center; font-size: 11px; }
.tt-row span:first-child { color: rgba(255,255,255,0.3); }
.tt-row span:last-child { color: rgba(255,255,255,0.7); font-weight: 600; font-variant-numeric: tabular-nums; }
.tt-row .tt-chg { font-weight: 700; }
.tt-footer { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.06); }
.tt-mint { font-size: 9px; color: rgba(255,255,255,0.2); font-family: monospace; }

.btn-sm {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-quick-buy {
    background: rgba(62, 139, 255,0.12);
    color: #3E8BFF;
    font-weight: 600;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid rgba(62, 139, 255,0.2);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-quick-buy:hover {
    background: rgba(62, 139, 255,0.25);
    border-color: rgba(62, 139, 255,0.4);
    box-shadow: 0 0 12px rgba(62, 139, 255,0.15);
}

.qb-wrap { position: relative; display: inline-block; }

.qb-popup {
    position: absolute;
    bottom: calc(100% + 6px);
    right: 0;
    display: flex;
    gap: 4px;
    background: #1A1D27;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 4px;
    z-index: 50;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.qb-popup.hidden { display: none; }

.qb-opt {
    background: rgba(255,255,255,0.04);
    color: #3E8BFF;
    border: 1px solid rgba(62, 139, 255,0.15);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.qb-opt:hover {
    background: rgba(62, 139, 255,0.15);
    border-color: rgba(62, 139, 255,0.35);
    box-shadow: 0 0 8px rgba(62, 139, 255,0.15);
}

@keyframes qbSlideIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.tok-icon-wrap { position: relative; display: inline-flex; flex-shrink: 0; }
.tok-dot-badge { pointer-events: none; }
@keyframes tokShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.tok-icon-shimmer { pointer-events: none; }

.token-icon-img { transition: transform 0.2s, box-shadow 0.2s; }
.token-row:hover .token-icon-img { transform: scale(1.08); box-shadow: 0 0 12px rgba(255,255,255,0.08); }
.token-icon-cdn { z-index: 1; }

/* ---- Split panel (legacy) ---- */

/* ---- Pulse Page (full-page 3-column) ---- */
.pulse-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.pulse-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.pulse-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
}

.pulse-filter-row {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 14px 28px 0 !important;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.pulse-filter-row select {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 8px 12px;
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: border-color .2s, background .2s;
}
.pulse-filter-row select:hover {
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
}
.pulse-filter-row select:focus {
    border-color: #526fff;
}

.pulse-columns {
    flex: 1;
    display: flex;
    gap: 20px;
    padding: 20px 28px 28px;
    min-height: 0;
}

.pulse-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.02);
    min-height: 0;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    backdrop-filter: blur(2px);
}

.pulse-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.pulse-col-header h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.55);
}

.pulse-col-header .live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #3E8BFF;
    font-weight: 600;
}

.pulse-col-count {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.06);
    padding: 4px 10px;
    border-radius: 6px;
}

.pulse-col-feed {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.pulse-col-feed::-webkit-scrollbar {
    width: 4px;
}

.pulse-col-feed::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
}

.pulse-feed {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

.pulse-feed-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 24px;
    color: rgba(255,255,255,0.15);
    font-size: 13px;
    text-align: center;
    font-weight: 500;
}

.pulse-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    font-size: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    margin: 0 8px 6px;
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    animation: feedSlide 0.3s ease;
    transition: background .15s;
}
.pulse-item:hover {
    background: rgba(255,255,255,0.05);
}

.pulse-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
}
.pulse-item-left .activity-type {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 6px;
    border-radius: 4px;
    line-height: 1;
}

.pulse-token-name {
    font-weight: 600;
    color: #fff;
    font-size: 12px;
    line-height: 1.3;
}

.pulse-token-sym {
    color: rgba(255,255,255,0.3);
    font-size: 10px;
    line-height: 1.2;
}

.pulse-item-mid {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    color: rgba(255,255,255,0.5);
    min-width: 0;
    justify-content: center;
}

.pulse-item-right {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.35);
    flex-shrink: 0;
}

.pulse-wallet {
    font-family: 'Courier New', monospace;
    font-size: 10px;
}

.pulse-qb-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 8px;
    border: none;
    background: #526fff;
    color: #000;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    line-height: 1;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}
.pulse-qb-btn:hover {
    background: #6b84ff;
    transform: scale(1.05);
}
.pulse-qb-btn svg {
    flex-shrink: 0;
}

.pulse-item .tok-dot-badge {
    width: 5px !important;
    height: 5px !important;
    bottom: -1px !important;
    right: -1px !important;
}
.pulse-item .tok-dot-badge div {
    width: 3px !important;
    height: 3px !important;
}

/* ---- Swap Page ---- */
.swap-layout {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: auto;
}

.swap-card {
    width: 100%;
    max-width: 400px;
    background: #151820;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.swap-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.swap-card-header h3 {
    font-size: 14px;
    font-weight: 700;
}

.swap-settings-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: none;
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.swap-settings-btn:hover {
    border-color: rgba(255,255,255,0.15);
    color: #fff;
}

.swap-body {
    padding: 12px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.swap-field label {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    display: block;
    margin-bottom: 4px;
}

.swap-input-wrap {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 8px 10px;
    gap: 8px;
    transition: border-color 0.15s;
}

.swap-input-wrap:focus-within {
    border-color: rgba(62, 139, 255,0.4);
}

.swap-token-select {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(255,255,255,0.06);
    border-radius: 16px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
    transition: background 0.15s;
}

.swap-token-select:hover {
    background: rgba(255,255,255,0.1);
}

.swap-token-native {
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(62,139,255,0.18) 0%, rgba(153,69,255,0.16) 100%);
    border: 1px solid rgba(62,139,255,0.40);
    border-radius: 14px;
    padding: 9px 32px 9px 14px;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    outline: none;
    color-scheme: dark;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: 0 2px 10px rgba(62,139,255,0.18), inset 0 0 14px rgba(62,139,255,0.08);
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236E9BFF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 26px;
    max-width: 150px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s;
}
.swap-token-native:hover {
    border-color: rgba(110,155,255,0.75);
    box-shadow: 0 2px 14px rgba(62,139,255,0.30), inset 0 0 16px rgba(62,139,255,0.14);
}
.swap-token-native:focus {
    border-color: #6E9BFF;
    box-shadow: 0 0 0 3px rgba(62,139,255,0.25), 0 3px 16px rgba(62,139,255,0.32);
}
.swap-token-native:active { transform: scale(0.98); }
.swap-token-native option {
    background: #1a1f2e;
    color: #e8edf7;
    font-weight: 600;
    padding: 10px 12px;
}
.swap-token-native option:hover,
.swap-token-native option:checked {
    background: linear-gradient(135deg, rgba(62,139,255,0.45), rgba(153,69,255,0.45));
    color: #fff;
}
@media (max-width: 768px) {
    .swap-token-native { min-height: 48px; padding: 10px 34px 10px 14px; border-radius: 12px; max-width: none; width: 100%; }
}

.swap-token-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 10px;
    color: #fff;
}

.swap-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font);
    text-align: right;
}

.swap-input::placeholder {
    color: rgba(255,255,255,0.2);
}

.swap-balance {
    font-size: 10px;
    color: rgba(255,255,255,0.25);
    margin-top: 3px;
    display: block;
}

.swap-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 4px;
}

.swap-flip {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #151820;
    border: 2px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: all 0.2s;
}

.swap-flip:hover {
    border-color: rgba(62, 139, 255,0.3);
    color: #3E8BFF;
    transform: rotate(180deg);
}

.swap-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
}

.swap-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.swap-info-row span:first-child { color: rgba(255,255,255,0.3); }
.swap-info-row span:last-child { color: rgba(255,255,255,0.6); font-weight: 500; }

#swapBtn {
    margin-top: 4px;
}

/* ---- Perps (Compact) ---- */
.perps-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1px;
    background: rgba(255,255,255,0.06);
    height: 100%;
    min-height: 0;
}

.perps-left {
    display: flex;
    flex-direction: column;
    background: #0D0F14;
    min-height: 0;
    overflow: auto;
}

.perps-right {
    background: #11131A;
    padding: 12px;
    overflow: auto;
}

.perps-header-bar {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.perps-pair-selector {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 8px;
    position: relative;
}

.perps-pair-selector:hover {
    background: rgba(255,255,255,0.08);
}

.perps-pair-selector svg {
    transition: transform 0.2s;
}

.perps-pair-selector.open svg {
    transform: rotate(180deg);
}

.pair-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    width: 300px;
    max-height: 380px;
    background: #1a1d24;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    z-index: 100;
    overflow: hidden;
}

.pair-dropdown.open {
    display: block;
}

.pair-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.pair-search {
    flex: 1;
    background: none;
    border: none;
    color: #fff;
    font-size: 12px;
    outline: none;
}

.pair-search::placeholder {
    color: rgba(255,255,255,0.25);
}

.pair-list {
    max-height: 320px;
    overflow-y: auto;
}

.pair-list::-webkit-scrollbar {
    width: 4px;
}

.pair-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.pair-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.1s;
    font-size: 12px;
}

.pair-item:hover {
    background: rgba(255,255,255,0.04);
}

.pair-item.active {
    background: rgba(62, 139, 255,0.08);
}

.pair-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    color: white;
    flex-shrink: 0;
}

.pair-item-info { flex: 1; }
.pair-item-name { font-size: 12px; font-weight: 600; }
.pair-item-base { font-size: 10px; color: rgba(255,255,255,0.25); }
.pair-item-price { text-align: right; }
.pair-item-last { font-size: 12px; font-weight: 600; }
.pair-item-chg { font-size: 10px; }

.perps-pair-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    color: white;
}

.perps-pair-name {
    font-weight: 600;
    font-size: 13px;
}

.perps-price-info {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.perps-last-price {
    font-size: 22px;
    font-weight: 800;
}

.perps-price-change {
    font-size: 12px;
    font-weight: 600;
}

.positive { color: #3E8BFF; }
.negative { color: #FF4D6A; }

.perps-stats-row {
    display: flex;
    gap: 16px;
}

.perps-stat {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.stat-label {
    font-size: 9px;
    color: rgba(255,255,255,0.25);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 12px;
    font-weight: 600;
}

.perps-chart {
    flex: 1;
    min-height: 280px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
}

.chart-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chart-timeframe-btns {
    display: flex;
    gap: 2px;
    padding: 6px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.chart-timeframe-btns button {
    padding: 3px 8px;
    font-size: 11px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.12s;
}

.chart-timeframe-btns button:hover { color: rgba(255,255,255,0.7); }
.chart-timeframe-btns button.active { background: #3E8BFF; color: #0D0F14; font-weight: 600; }





/* Perps Positions */
.perps-positions {
    border-top: 1px solid rgba(255,255,255,0.06);
}

.positions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.positions-header h3 {
    font-size: 12px;
    font-weight: 600;
}

.positions-tabs {
    display: flex;
    gap: 2px;
}

.positions-tabs button {
    padding: 3px 10px;
    font-size: 11px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    border-radius: 4px;
}

.positions-tabs button.active { background: rgba(255,255,255,0.06); color: #fff; }

.positions-table-wrap {
    overflow-x: auto;
}

.positions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.positions-table th {
    padding: 6px 10px;
    text-align: left;
    font-weight: 500;
    color: rgba(255,255,255,0.25);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.positions-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.pos-market { font-weight: 600; }

.pos-side {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.pos-side.long { background: rgba(46, 189, 133,0.12); color: #2EBD85; }
.pos-side.short { background: rgba(255,77,106,0.12); color: #FF4D6A; }

.liq-price { color: #FFB800; }
.pos-pnl { font-weight: 600; }
.pos-pnl.positive { color: #2EBD85; }
.pos-pnl.negative { color: #FF4D6A; }

.btn-close-pos {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255,77,106,0.12);
    border: 1px solid rgba(255,77,106,0.3);
    border-radius: 8px;
    color: #FF4D6A;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.12s;
}

.btn-close-pos:hover { background: rgba(255,77,106,0.2); }

/* Perps Order Form */
.perps-order-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.perps-order-tabs {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
}

.perps-order-tab {
    flex: 1;
    padding: 8px;
    font-size: 13px;
    font-weight: 700;
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.15s;
}

.perps-order-tab.active {
    background: #3E8BFF;
    color: #0D0F14;
}

.perps-order-tab.short.active {
    background: #FF4D6A;
    color: #fff;
}

.perps-leverage {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.leverage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.leverage-header label {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

.leverage-value {
    font-size: 14px;
    font-weight: 700;
    color: #3E8BFF;
}

.leverage-slider {
    width: 100%;
    -webkit-appearance: none;
    height: 3px;
    border-radius: 2px;
    background: rgba(255,255,255,0.08);
    outline: none;
}

.leverage-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #3E8BFF;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(62, 139, 255,0.4);
}

.leverage-presets {
    display: flex;
    gap: 4px;
}

.leverage-presets button {
    flex: 1;
    padding: 5px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 5px;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.12s;
}

.leverage-presets button:hover { border-color: rgba(62, 139, 255,0.3); color: #3E8BFF; }
.leverage-presets button.active { background: rgba(62, 139, 255,0.12); border-color: #3E8BFF; color: #3E8BFF; }

.perps-form-group label {
    display: block;
    font-size: 10px;
    color: rgba(255,255,255,0.25);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.perps-input-wrap {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    overflow: hidden;
}

.perps-input {
    width: 100%;
    padding: 10px;
    background: none;
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    outline: none;
}

.perps-input-btns {
    display: flex;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.perps-input-btns button {
    flex: 1;
    padding: 5px;
    font-size: 10px;
    font-weight: 600;
    background: none;
    border: none;
    border-right: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    transition: color 0.12s;
}

.perps-input-btns button:last-child { border-right: none; }
.perps-input-btns button:hover { color: #3E8BFF; }

.perps-order-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.info-row span:first-child { color: rgba(255,255,255,0.25); }
.info-row span:last-child { font-weight: 500; }

.btn-long { background: #3E8BFF !important; color: #0D0F14 !important; }
.btn-short { background: #FF4D6A !important; color: #fff !important; }

.perps-risk-warning {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: rgba(255,184,0,0.06);
    border: 1px solid rgba(255,184,0,0.15);
    border-radius: 8px;
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    line-height: 1.4;
}

/* ---- Yield (Compact) ---- */
.yield-layout {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: auto;
}

.yield-summary-cards {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 8px;
}

.yield-card {
    padding: 12px 14px;
    background: #151820;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
}

.yield-card-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.yield-card-icon {
    width: 40px;
    height: 40px;
    background: rgba(62, 139, 255,0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.yield-card-label {
    display: block;
    font-size: 10px;
    color: rgba(255,255,255,0.3);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yield-card-value {
    display: block;
    font-size: 18px;
    font-weight: 800;
}

.yield-body {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 12px;
}

.section-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
}

.yield-pool-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.yield-pool-tabs button {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font);
}

.yield-pool-tabs button:hover { border-color: rgba(62, 139, 255,0.3); color: #3E8BFF; }
.yield-pool-tabs button.active { background: rgba(62, 139, 255,0.1); border-color: rgba(62, 139, 255,0.3); color: #3E8BFF; }

.yield-pool-card {
    background: #151820;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 8px;
}

.pool-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.pool-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pool-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pool-info h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 1px;
}

.pool-info p {
    font-size: 11px;
    color: rgba(255,255,255,0.25);
}

.pool-apy {
    text-align: right;
}

.apy-value {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: #3E8BFF;
}

.apy-label {
    font-size: 9px;
    color: rgba(255,255,255,0.25);
    text-transform: uppercase;
}

.pool-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 8px;
    padding: 8px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 12px;
}

.pool-stat {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.pool-stat span:first-child { font-size: 9px; color: rgba(255,255,255,0.25); }
.pool-stat span:last-child { font-size: 11px; font-weight: 600; }

.pool-deposit {
    display: flex;
    gap: 6px;
}

.pool-input {
    flex: 1;
    padding: 8px 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    outline: none;
    font-family: var(--font);
}

.pool-input:focus { border-color: rgba(62, 139, 255,0.4); }

.yield-positions { min-width: 0; }

.yield-empty {
    text-align: center;
    padding: 36px 16px;
    color: rgba(255,255,255,0.2);
}

.yield-empty p {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
}

.yield-empty span { font-size: 11px; }

.yield-position-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #151820;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    margin-bottom: 6px;
}

.yield-pos-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.yield-pos-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: white;
}

.yield-pos-name { font-size: 12px; font-weight: 600; display: block; }
.yield-pos-apy { font-size: 10px; color: #3E8BFF; }
.yield-pos-amounts { text-align: right; }
.yield-pos-deposited { font-size: 12px; font-weight: 600; display: block; }
.yield-pos-earned { font-size: 10px; color: #3E8BFF; }

.yield-pos-actions {
    display: flex;
    gap: 4px;
}

.yield-pos-actions button {
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.12s;
    font-family: var(--font);
}

.yield-withdraw-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
}

.yield-harvest-btn {
    background: #3E8BFF;
    border: none;
    color: #0D0F14;
}

/* ---- Portfolio (Compact) ---- */
.portfolio-layout {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: auto;
}

.portfolio-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #151820;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
}

.portfolio-label {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.portfolio-value {
    display: block;
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 2px;
}

.portfolio-change {
    font-size: 12px;
    font-weight: 500;
}

.portfolio-chart-mini {
    width: 240px;
    height: 50px;
}

.portfolio-chart-mini canvas {
    width: 100% !important;
    height: 100% !important;
}

.portfolio-body {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 12px;
}

.holdings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.holdings-header h3 { font-size: 13px; font-weight: 700; }

.holdings-tabs {
    display: flex;
    gap: 3px;
}

.holdings-tabs button {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    background: none;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 5px;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    transition: all 0.12s;
    font-family: var(--font);
}

.holdings-tabs button.active {
    background: rgba(62, 139, 255,0.1);
    border-color: rgba(62, 139, 255,0.3);
    color: #3E8BFF;
}

.holding-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #151820;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.12s;
}

.holding-row:hover {
    border-color: rgba(62, 139, 255,0.2);
}

.holding-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.holding-info { flex: 1; min-width: 0; }
.holding-name { display: block; font-size: 12px; font-weight: 600; }
.holding-sym { font-size: 10px; color: rgba(255,255,255,0.25); }
.holding-amounts { text-align: right; }
.holding-qty { display: block; font-size: 12px; font-weight: 500; }
.holding-val { font-size: 10px; color: rgba(255,255,255,0.4); }
.holding-pnl { font-size: 12px; font-weight: 700; min-width: 50px; text-align: right; }

/* Portfolio Right */
.portfolio-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 12px;
}

.portfolio-stat-card {
    padding: 10px 12px;
    background: #151820;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
}

.portfolio-stat-card .stat-label {
    display: block;
    font-size: 9px;
    color: rgba(255,255,255,0.25);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.portfolio-stat-card .stat-value {
    font-size: 15px;
    font-weight: 700;
}

.portfolio-history h3 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #151820;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
}

.history-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
}

.history-icon.buy { background: rgba(46, 189, 133,0.12); color: #2EBD85; }
.history-icon.sell { background: rgba(255,77,106,0.12); color: #FF4D6A; }
.history-icon.stake { background: rgba(59,130,246,0.12); color: #3B82F6; }

.history-info { flex: 1; min-width: 0; }
.history-action { display: block; font-size: 12px; font-weight: 600; }
.history-time { font-size: 10px; color: rgba(255,255,255,0.25); }
.history-amounts { text-align: right; }
.history-qty { display: block; font-size: 11px; color: rgba(255,255,255,0.4); }
.history-val { font-size: 12px; font-weight: 600; }

/* ---- Wallet Overlay ---- */
.wallet-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13,15,20,0.92);
    backdrop-filter: blur(8px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.wallet-overlay.active {
    display: flex;
}

.wallet-overlay-card {
    background: #151820;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 40px 36px;
    max-width: 420px;
    width: 90%;
    text-align: center;
}

.wallet-overlay-card .overlay-icon {
    width: 64px;
    height: 64px;
    background: rgba(239,68,68,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.wallet-overlay-card .overlay-icon svg {
    width: 28px;
    height: 28px;
    stroke: #FF4D6A;
}

.wallet-overlay-card h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.wallet-overlay-card p {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.wallet-overlay-card .overlay-wallets {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.wallet-overlay-card .overlay-wallets .wallet-btn {
    border-color: rgba(255,255,255,0.08);
}

.wallet-overlay-card .overlay-skip {
    color: rgba(255,255,255,0.25);
    font-size: 12px;
}

.wallet-overlay-card .overlay-skip a {
    color: #FF4D6A;
    cursor: pointer;
    text-decoration: underline;
}

/* ---- Announcement Bar ---- */
.announcement-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(62, 139, 255,0.12), rgba(62, 139, 255,0.04));
    border-bottom: 1px solid rgba(62, 139, 255,0.15);
    font-size: 13px;
    color: #E2E8F0;
    gap: 12px;
    flex-shrink: 0;
}
.announcement-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.announcement-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    flex-shrink: 0;
}
.announcement-close:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
}

/* ---- Filter Spacer (mobile trade toggle) ---- */
.filter-spacer { flex: 1; min-width: 8px; }
.mobile-trade-toggle { display: none; }

/* ---- Mobile Sidebar Toggle (hidden on desktop) ---- */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    align-items: center;
    justify-content: center;
}
.sidebar-toggle:hover { color: #fff; background: rgba(255,255,255,0.06); }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}
.sidebar-overlay.active { display: block; }

/* ---- Mobile Bottom Nav (hidden on desktop) ---- */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #0D0F14;
    border-top: 1px solid rgba(255,255,255,0.06);
    z-index: 200;
    justify-content: space-around;
    align-items: center;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.mbn-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    font-size: 10px;
    font-weight: 500;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.15s;
    min-width: 0;
    flex: 1;
    font-family: var(--font);
}
.mbn-item svg { flex-shrink: 0; }
.mbn-item.active { color: #3E8BFF; }
.mbn-item:hover { color: rgba(255,255,255,0.7); }

/* ---- Tablet Responsive (769–1024px): two-row topbar too ---- */
@media (max-width: 1024px) and (min-width: 769px) {
    .topbar-center { max-width: 280px; }
    .topbar-search kbd { display: none; }

    /* secondary action row: chain + balance + deposit + withdraw */
    .dash-topbar { height: auto; padding: 8px 14px 0; gap: 10px; flex-wrap: wrap; }
    .topbar-right { gap: 8px; }
    .topbar-right .chain-switcher { display: none; }
    .topbar-right .topbar-sol-balance { display: none; }
    .topbar-right .deposit-btn { display: none; }
    .topbar-right .withdraw-btn { display: none; }
    body.dash-page .topbar-secondary {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 8px 0 10px;
        margin-top: 8px;
        border-top: 1px solid rgba(255,255,255,0.05);
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .topbar-secondary::-webkit-scrollbar { display: none; }
    .topbar-secondary .topbar-sol-balance { display: flex; flex-shrink: 0; }
    .topbar-secondary .deposit-btn,
    .topbar-secondary .withdraw-btn { display: flex; flex-shrink: 0; }
    .chain-menu { position: fixed; z-index: 61; max-height: 60vh; overflow-y: auto; }
    .chain-menu::-webkit-scrollbar { display: none; }
    .dash-layout { height: calc(100vh - var(--tb-h, 112px)); }
}

/* ---- Mobile Responsive (768px) ---- */
@media (max-width: 768px) {
    /* ===== TOP BAR — spacious, comfortable ===== */
    .sidebar-toggle { display: flex; }
    .dash-topbar { height: auto; padding: 6px 12px 0; gap: 8px; flex-wrap: wrap; }
    .topbar-left { gap: 8px; flex: 0 0 auto; min-width: 0; }
    .topbar-left .logo span { display: none; }
    .topbar-left .logo img { width: 36px; height: 36px; }
    .topbar-center { flex: 1 1 auto; max-width: none; margin: 0 4px; min-width: 0; }
    .topbar-search { max-width: none; height: 38px; padding: 6px 10px; gap: 6px; border-radius: 10px; }
    .topbar-search input { font-size: 13px; }
    .topbar-search kbd { display: none; }
    .topbar-right { gap: 8px; }
    .topbar-right .chain-switcher { display: none; }
    .topbar-right .topbar-sol-balance { display: none; }
    .topbar-right .deposit-btn { display: none; }
    .topbar-right .withdraw-btn { display: none; }
    .topbar-wallet .wallet-addr { display: none; }
    .topbar-wallet { padding: 6px 10px; gap: 8px; min-height: 38px; border-radius: 10px; }
    .topbar-icon-btn { width: 40px; height: 40px; min-width: 40px; flex-shrink: 0; border-radius: 10px; }
    .chain-select-btn { padding: 4px 8px; font-size: 11px; gap: 4px; }
    .chain-select-btn svg { width: 12px; height: 12px; }

    /* ===== SECONDARY ACTION TOOLBAR — chain, balance, deposit, withdraw ===== */
    body.dash-page .topbar-secondary {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
        width: 100%;
        padding: 6px 0 10px;
        margin-top: 6px;
        border-top: 1px solid rgba(255,255,255,0.05);
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .topbar-secondary::-webkit-scrollbar { display: none; }
    .topbar-secondary .topbar-sol-balance { display: flex; flex-shrink: 0; }
    .topbar-secondary .topbar-sol-balance span {
        display: inline;
        white-space: nowrap;
    }
    .topbar-secondary .deposit-btn,
    .topbar-secondary .withdraw-btn { display: flex; flex-shrink: 0; }
    /* chain dropdown must float free of the scroll container on mobile */
    .chain-menu {
        position: fixed;
        z-index: 61;
        max-height: 60vh;
        overflow-y: auto;
    }
    .chain-menu::-webkit-scrollbar { display: none; }

    /* ===== SIDEBAR — slide-in drawer ===== */
    .dash-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        width: 280px;
        z-index: 200;
        background: #0D0F14;
        border-right: 1px solid rgba(255,255,255,0.06);
        box-shadow: 8px 0 48px rgba(0,0,0,0.6);
        transition: left 0.35s cubic-bezier(0.4,0,0.2,1);
        padding: 16px 0;
        overflow-y: auto;
        padding-top: calc(16px + env(safe-area-inset-top, 0px));
    }
    .dash-sidebar.sidebar-open { left: 0; }
    .dash-sidebar .sidebar-nav { align-items: stretch; gap: 4px; }
    .dash-sidebar .sidebar-link {
        flex-direction: row;
        gap: 14px;
        padding: 14px 20px;
        font-size: 15px;
        margin: 0 10px;
        border-radius: 10px;
        min-height: 48px;
    }
    .dash-sidebar .sidebar-link span {
        display: block; font-size: 15px; position: static; transform: none; left: auto; top: auto; background: none; border: none; padding: 0;
    }
    .dash-sidebar .sidebar-section-label {
        display: block; text-align: left; padding: 16px 24px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.3);
    }
    .dash-sidebar .sidebar-divider { margin: 10px 20px; }
    .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 199; }
    .sidebar-overlay.active { display: block; }

    /* ===== LAYOUT ===== */
    .dash-layout { height: calc(100vh - var(--tb-h, 112px) - 64px); }
    .dash-main {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* ===== BOTTOM NAV — taller, more comfortable tap targets ===== */
    .mobile-bottom-nav { display: flex; }
    .mbn-item { min-height: 48px; padding: 8px 8px; gap: 4px; }
    .mbn-item span { font-size: 11px; }
    .mbn-item svg { width: 22px; height: 22px; }

    /* ===== PAGE SECTIONS — generous breathing room ===== */
    .page-section { padding: 0; }
    .page-section.active { padding: 16px; gap: 16px; }
    .page-section#page-perps.active,
    .page-section#page-portfolio.active,
    .page-section#page-pulse.active { padding: 0; gap: 0; }

    /* ===== DISCOVER PAGE ===== */
    .mobile-trade-toggle { display: flex; }
    .discover-layout {
        grid-template-columns: 1fr !important;
        gap: 16px;
        padding: 0;
    }
    .discover-main {
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 12px;
        overflow: hidden;
    }
    .discover-trade-panel {
        display: flex;
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 12px;
        overflow: hidden;
    }
    .discover-trade-panel.mobile-visible { display: flex; }
    .discover-main.mobile-hidden { display: none; }
    body.dash-page .discover-trade-panel { position: relative; }
    body.dash-page .discover-trade-panel .ax-drawer-close {
        display: flex;
        position: absolute;
        top: 10px;
        right: 12px;
        z-index: 6;
        width: 30px;
        height: 30px;
        align-items: center;
        justify-content: center;
        background: #1B1E24;
        border: 1px solid #262931;
        border-radius: 8px;
        color: #98A2B3;
        cursor: pointer;
        font-size: 13px;
    }
    body.dash-page .discover-trade-panel .ax-drawer-close:active { color: #fff; }
    .discover-filters {
        padding: 14px 16px; gap: 10px;
        overflow-x: auto; flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .discover-filters::-webkit-scrollbar { display: none; }
    .filter-tab {
        white-space: nowrap; padding: 12px 20px;
        font-size: 14px; border-radius: 10px;
        flex-shrink: 0; min-height: 44px;
    }
    .mobile-trade-toggle {
        background: rgba(62, 139, 255,0.1) !important;
        color: #3E8BFF !important;
        border: 1px solid rgba(62, 139, 255,0.2) !important;
        font-weight: 600;
        min-height: 44px;
        padding: 10px 20px !important;
        font-size: 14px !important;
    }
    .mobile-trade-toggle:hover {
        background: rgba(62, 139, 255,0.18) !important;
    }
    .discover-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .discover-table { min-width: 0; }
    .discover-table td { padding: 14px 12px; font-size: 13px; }
    .discover-table th { padding: 12px 12px; font-size: 11px; white-space: nowrap; }
    .discover-chart-header { padding: 16px 20px; }
    .dash-discover-right { width: 100% !important; display: block !important; }
    .hide-mobile { display: none !important; }
    .token-qb-inline { flex-wrap: nowrap; gap: 8px; }
    .qb-snap { padding: 8px 14px; font-size: 12px; border-radius: 8px; }
    .qb-snap-main { padding: 8px 18px; font-size: 13px; border-radius: 8px; }
    .token-name { max-width: 100px; font-size: 13px; }
    .token-price-main { font-size: 13px; }
    .token-data-val { font-size: 12px; }
    .token-change-val { font-size: 12px; }

    /* Hide less important table columns on mobile */
    .discover-table th:nth-child(3),
    .discover-table td:nth-child(3) { display: none; }

    /* ===== SWAP / TRADE PANEL — spacious, easy to use ===== */
    .ts-swap-panel { padding: 24px 20px; gap: 20px; }
    .ts-search { padding: 14px 16px; min-height: 52px; border-radius: 12px; }
    .ts-search input { font-size: 15px; }
    .ts-field { padding: 18px; border-radius: 14px; }
    .ts-field-row { gap: 12px; }
    .ts-amt-input { font-size: 22px; }
    .ts-swap-btn { padding: 16px; font-size: 16px; border-radius: 14px; min-height: 54px; }
    /* Hide advanced swap settings on mobile — use trade sheet instead */
    .ts-settings-box { display: none; }
    .ts-set-label::after { content: none; }
    .ts-popular { gap: 12px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0 4px; }
    .ts-popular::-webkit-scrollbar { display: none; }
    .ts-pop-btn { padding: 8px 16px; min-height: 40px; white-space: nowrap; font-size: 13px; border-radius: 12px; }
    .ts-quote-info { padding: 12px 14px; gap: 8px; border-radius: 10px; }
    .ts-settings-box { padding: 14px; gap: 12px; border-radius: 10px; }
    .ts-side-tabs { padding: 4px; min-height: 48px; border-radius: 10px; }
    .ts-side-tab { min-height: 40px; padding: 10px 20px; font-size: 14px; border-radius: 8px; }
    .ts-trend-row { padding: 14px 16px; gap: 14px; }
    .ts-trending-head { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,0.06); }
    .ts-trend-buy { opacity: 1; transform: translateX(0); }
    .ts-trending-head h3 { font-size: 14px; }
    .ts-pill-filled { padding: 8px 14px; min-height: 40px; border-radius: 10px; font-size: 13px; }
    .ts-pill { padding: 8px 14px; min-height: 40px; border-radius: 10px; font-size: 13px; }
    .ts-token-pill, .ts-pill-empty { min-height: 48px; }
    .ts-set-btns button { min-height: 38px; padding: 8px 14px; font-size: 13px; border-radius: 8px; }
    .ts-quick { gap: 8px; flex-wrap: nowrap; overflow-x: auto; padding: 0 4px; }
    .ts-quick::-webkit-scrollbar { display: none; }

    /* ===== PULSE PAGE ===== */
    .pulse-layout { overflow-y: auto; }
    .pulse-header { padding: 16px 20px; }
    .pulse-header h3 { font-size: 15px; }
    .pulse-filter-row { padding: 12px 20px 0 !important; }
    .pulse-columns { flex-direction: column !important; gap: 16px; padding: 16px 20px 20px; }
    .pulse-column { flex: 1 0 auto; min-height: 200px; border-radius: 12px; }
    .pulse-col-header { padding: 14px 18px; }
    .pulse-item { padding: 12px 16px; margin: 0 6px 5px; }

    /* ===== TRACKERS PAGE ===== */
    .trackers-header { flex-direction: column; gap: 12px; padding: 18px; }
    .trackers-add { width: 100%; flex-direction: column; gap: 10px; }
    .trackers-add input { width: 100%; min-height: 48px; border-radius: 10px; }
    .trackers-list { max-height: none; padding: 0 18px 18px; }
    .trackers-empty { padding: 40px 20px; }

    /* ===== SWAP PAGE ===== */
    .swap-layout { padding: 0; }
    .swap-card {
        padding: 20px;
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 14px;
    }
    .swap-input { font-size: 22px; min-height: 48px; }
    .swap-input-wrap { flex-direction: column; align-items: stretch; gap: 8px; }
    .swap-token-select { min-height: 48px; padding: 10px 14px; border-radius: 10px; width: 100%; justify-content: space-between; }
    .swap-balance { font-size: 13px; margin-top: 6px; }
    .swap-info-row { padding: 10px 0; }
    .swap-flip { width: 44px; height: 44px; }
    .swap-body { display: flex; flex-direction: column; gap: 12px; }
    .sp-dropdown { position: static; max-height: 260px; margin-top: 4px; background: #1a1d24; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; overflow-y: auto; }
    .sp-dropdown .sp-modal-item { padding: 12px 14px; font-size: 14px; }
    .sp-dropdown .sp-modal-item:active { background: rgba(255,255,255,0.08); }

    /* ===== PERPS PAGE ===== */
    .perps-layout { grid-template-columns: 1fr !important; gap: 16px; }
    .perps-left { padding: 0; }
    .perps-right {
        padding: 0;
        width: 100% !important;
        border-left: none !important;
    }
    .perps-right .perps-order-form {
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 14px;
    }
    .perps-header-bar {
        padding: 18px;
        flex-wrap: wrap; gap: 12px;
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 14px;
        margin-bottom: 0;
    }
    .perps-price-info { font-size: 16px; }
    .perps-stats-row { gap: 10px; flex-wrap: wrap; }
    .perps-stat { padding: 10px 14px; border-radius: 10px; }
    .perps-chart-area {
        min-height: 220px;
        flex-direction: column;
        gap: 16px;
    }
    .perps-chart {
        min-height: 200px;
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 14px;
        height: auto;
    }
    .perps-chart .chart-canvas { min-height: 180px; }
    .perps-orderbook {
        min-height: 170px;
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 14px;
    }
    .chart-timeframe-btns {
        gap: 6px;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 10px;
    }
    .chart-timeframe-btns::-webkit-scrollbar { display: none; }
    .chart-timeframe-btns button { padding: 10px 18px; font-size: 13px; min-height: 44px; white-space: nowrap; border-radius: 8px; }
    /* Hide advanced timeframes on mobile */
    .chart-timeframe-btns button[data-tf="15"],
    .chart-timeframe-btns button[data-tf="240"],
    .chart-timeframe-btns button[data-tf="10080"] { display: none; }
    .perps-order-form { padding: 24px; }
    /* Perps advanced settings toggle */
    .perps-advanced-toggle {
        display: flex; align-items: center; justify-content: center; gap: 6px;
        width: 100%; padding: 8px; background: none;
        border: none; color: rgba(255,255,255,0.4);
        font-size: 13px; font-family: var(--font); cursor: pointer;
        min-height: 44px;
    }
    .perps-advanced-toggle svg { transition: transform 0.2s; }
    .perps-advanced-toggle:active svg { transform: rotate(180deg); }
    .perps-advanced-fields { display: none; }
    .perps-advanced-fields.open { display: block; }
    .perps-order-tab { min-height: 52px; font-size: 16px; padding: 14px 28px; border-radius: 12px; }
    .perps-input-wrap { min-height: 48px; }
    .perps-input { min-height: 48px; font-size: 16px; }
    .perps-input-btns button { min-height: 40px; padding: 8px 14px; font-size: 13px; border-radius: 8px; }
    .leverage-slider { height: 40px; }
    .leverage-presets button { min-height: 40px; padding: 8px 16px; font-size: 13px; border-radius: 8px; }
    .perps-risk-warning { padding: 14px 16px; margin-top: 14px; border-radius: 12px; }
    .perps-pair-selector { min-height: 48px; }
    .pair-dropdown { width: 280px; }
    .perps-positions {
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 14px;
        overflow: hidden;
    }
    /* Positions card layout */
    .positions-table-wrap { overflow-x: visible; }
    .positions-table { min-width: 0; width: 100%; }
    .positions-table thead { display: none; }
    .positions-table tbody { display: flex; flex-direction: column; gap: 8px; padding: 8px; }
    .positions-table tbody tr.trade-section-header { display: none; }
    .positions-table tbody tr.pos-row {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto;
        gap: 0;
        background: rgba(255,255,255,0.03);
        border-radius: 12px;
        padding: 14px;
        border: 1px solid rgba(255,255,255,0.04);
    }
    .positions-table tbody tr.pos-row td {
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 4px 0;
        font-size: 13px;
        border: none;
        background: none;
        min-height: auto;
    }
    .positions-table tbody tr.pos-row td::before {
        content: attr(data-label);
        font-size: 11px;
        color: rgba(255,255,255,0.35);
        min-width: 44px;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }
    /* Hide secondary columns on mobile, show on expand */
    .positions-table tbody tr.pos-row td[data-label="Entry"],
    .positions-table tbody tr.pos-row td[data-label="Mark"],
    .positions-table tbody tr.pos-row td[data-label="Liq. Price"],
    .positions-table tbody tr.pos-row td[data-label="Margin"] {
        display: none;
    }
    /* Show all when row is expanded */
    .positions-table tbody tr.pos-row.pos-expanded td[data-label="Entry"],
    .positions-table tbody tr.pos-row.pos-expanded td[data-label="Mark"],
    .positions-table tbody tr.pos-row.pos-expanded td[data-label="Liq. Price"],
    .positions-table tbody tr.pos-row.pos-expanded td[data-label="Margin"] {
        display: flex;
    }
    /* First row: market + side + close */
    .positions-table tbody tr.pos-row td:first-child { grid-column: 1; font-weight: 600; font-size: 14px; }
    .positions-table tbody tr.pos-row td[data-label="Side"] { grid-column: 2; }
    /* PnL and ROE prominent */
    .positions-table tbody tr.pos-row td[data-label="PnL"],
    .positions-table tbody tr.pos-row td[data-label="ROE"] { font-weight: 700; font-size: 14px; }
    /* Close button full width */
    .positions-table tbody tr.pos-row td:last-child:not([data-label]) {
        grid-column: 1 / -1;
        justify-content: flex-end;
        padding-top: 8px;
        border-top: 1px solid rgba(255,255,255,0.04);
        margin-top: 4px;
    }
    .positions-table tbody tr.pos-row td:last-child:not([data-label]) .btn-sm { min-height: 44px; }
    .trade-row { display: none; }
    .positions-header { flex-direction: column; gap: 12px; padding: 16px; }
    .positions-tabs { overflow-x: auto; flex-wrap: nowrap; gap: 6px; }
    .positions-tabs button { padding: 10px 20px; font-size: 13px; min-height: 44px; border-radius: 8px; }

    /* ===== PORTFOLIO PAGE ===== */
    .portfolio-layout { padding: 0; gap: 16px; }
    .portfolio-summary {
        padding: 24px; gap: 16px;
        flex-direction: column; text-align: center;
        grid-template-columns: 1fr !important;
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 14px;
    }
    .portfolio-total { padding: 0; }
    .portfolio-stats-grid {
        grid-template-columns: 1fr 1fr !important; gap: 12px !important;
    }
    .portfolio-stat-card { padding: 18px; border-radius: 12px; }
    .portfolio-body { grid-template-columns: 1fr !important; gap: 16px; }
    .portfolio-chart-mini { width: 100%; height: 44px; }
    .holdings-header { flex-direction: column; gap: 10px; padding: 16px; }
    .holdings-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
    .holdings-tabs::-webkit-scrollbar { display: none; }
    .holdings-tabs button { white-space: nowrap; padding: 10px 20px; font-size: 13px; min-height: 40px; }
    .portfolio-chart-area { height: 140px; }
    .portfolio-alloc-chart { display: flex; justify-content: center; }
    .portfolio-history { padding: 0; }

    /* ===== LIMITS PAGE ===== */
    .limits-layout { grid-template-columns: 1fr !important; gap: 16px; }
    .limits-left {
        border-right: none !important;
    }
    .limits-create-card {
        padding: 20px;
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 14px;
    }
    .limits-create-card h3 { padding: 0 0 18px; font-size: 17px; }
    .limits-form-group { margin-bottom: 18px; }
    .limits-input { min-height: 48px; font-size: 15px; border-radius: 10px; }
    .limits-input-row { gap: 12px; flex-direction: column; }
    .limits-amount-pct { gap: 8px; }
    .limits-amount-pct button { min-height: 40px; padding: 10px 16px; font-size: 13px; flex: 1; border-radius: 8px; }
    .limits-expiry { flex-direction: column; gap: 12px; }
    .limits-expiry-btns { flex-wrap: wrap; gap: 8px; }
    .limits-expiry-btns button { padding: 12px 16px; min-height: 42px; font-size: 13px; flex: 1; border-radius: 8px; }
    .limits-order-summary { padding: 14px 0; }
    .limits-right { padding: 0; }
    .limits-orders-section {
        padding: 20px;
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 14px;
    }
    .limits-orders-tabs { gap: 8px; margin-bottom: 14px; }
    .limits-orders-tabs button { padding: 12px 20px; font-size: 14px; min-height: 42px; border-radius: 8px; }
    .limits-form-tabs button { min-height: 44px; padding: 10px 24px; font-size: 14px; border-radius: 10px; }
    .limits-token-search input { min-height: 48px; }
    .limits-balance-hint { font-size: 13px; margin-top: 6px; }

    /* ===== SNIPER PAGE ===== */
    .sniper-layout { grid-template-columns: 1fr !important; gap: 16px; }
    .sniper-side {
        border-left: none !important;
        border-top: none;
    }
    .sniper-main {
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 14px;
        overflow: hidden;
    }
    .sniper-header { padding: 20px; }
    .sniper-header h3 { font-size: 17px; }
    .sniper-alerts { padding: 20px; }
    .sniper-quick-card, .sniper-settings-card, .sniper-history-card {
        padding: 20px;
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 14px;
        margin-bottom: 16px;
    }
    .sniper-quick-card h4, .sniper-settings-card h4, .sniper-history-card h4 { font-size: 15px; margin-bottom: 14px; }
    .sniper-input { min-height: 48px; font-size: 15px; border-radius: 10px; }
    .sniper-snipe-btn { min-height: 48px; margin-top: 12px; border-radius: 12px; }
    .sniper-quick-amounts { gap: 8px; }
    .sniper-quick-amounts button { min-height: 42px; padding: 10px 16px; font-size: 14px; flex: 1; border-radius: 8px; }
    .sniper-setting { margin-bottom: 18px; }
    .sniper-setting label { font-size: 14px; margin-bottom: 8px; display: block; }
    .sniper-set-btns { gap: 8px; }
    .sniper-set-btns button { min-height: 40px; padding: 10px 16px; font-size: 13px; border-radius: 8px; }

    /* ===== REWARDS PAGE ===== */
    .rewards-layout { padding: 0; }
    .rewards-header {
        padding: 20px;
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 14px;
    }
    .rewards-header h3 { font-size: 17px; }
    .rewards-tier-card {
        padding: 24px;
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 14px;
        flex-direction: column; gap: 16px;
    }
    .tier-row { padding: 14px 16px; flex-wrap: wrap; gap: 8px; font-size: 14px; }
    .tier-icon { font-size: 24px; }
    .tier-mult { font-size: 14px; }
    .rewards-points { padding: 20px; }

    /* ===== ACTIVITY BAR (hidden on mobile) ===== */
    .dash-activity-bar { display: none !important; }

    /* ===== MODALS — bottom sheet style ===== */
    .modal-overlay {
        padding-top: 0;
        align-items: flex-end;
    }
    .modal-panel {
        width: 100%;
        max-width: 100%;
        max-height: 90vh;
        border-radius: 24px 24px 0 0;
        animation: modalSlideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        padding-bottom: env(safe-area-inset-bottom, 20px);
    }
    @keyframes modalSlideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
    .modal-head { padding: 28px 28px 0; }
    .modal-body { padding: 24px 28px 32px; }
    .settings-section { margin-bottom: 24px; }
    .settings-row { padding: 16px 0; }
    .settings-pill { min-height: 42px; padding: 10px 18px; font-size: 14px; border-radius: 10px; }
    .settings-btn-danger { min-height: 50px; padding: 14px 24px; font-size: 15px; width: 100%; border-radius: 12px; }
    .settings-select { min-height: 42px; padding: 8px 14px; border-radius: 10px; }
    .settings-custom { min-height: 42px; }

    /* Deposit Modal */
    .deposit-modal-content {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 36px 28px;
        border-radius: 24px 24px 0 0;
        max-height: 92vh;
        overflow-y: auto;
        animation: modalSlideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .deposit-header h2 { font-size: 22px; }
    .deposit-address { font-size: 13px; word-break: break-all; }
    .deposit-address-row { gap: 12px; }

    /* Wallet Overlay */
    .wallet-overlay {
        align-items: center;
        padding: 24px;
    }
    .wallet-overlay-card {
        padding: 40px 28px;
        width: 100%;
        max-width: 400px;
        border-radius: 24px;
    }
    .wallet-overlay-card h2 { font-size: 22px; margin-top: 16px; }
    .wallet-overlay-card p { font-size: 15px; line-height: 1.7; }
    .wallet-overlay-card .overlay-wallets { gap: 14px; }
    .wallet-btn { min-height: 58px; padding: 16px; border-radius: 14px; }
    .wallet-btn .wallet-name { font-size: 15px; }
    .overlay-skip { font-size: 14px; }

    /* Seed Phrase Modals */
    #seedModal .wallet-overlay-card,
    #seedRevealModal .wallet-overlay-card {
        max-width: 92vw !important;
        padding: 36px 24px;
    }
    #seedGrid,
    #seedRevealGrid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    #seedModal h2, #seedRevealModal h2 { font-size: 20px; }

    /* ===== AI CHAT ===== */
    .ai-chat-panel {
        width: 100% !important;
        height: 100% !important;
        top: 0 !important;
        right: 0 !important;
        border-radius: 0 !important;
    }

    /* ===== ACCOUNT BOTTOM SHEET ===== */
    .account-sheet-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.6);
        z-index: 300;
        align-items: flex-end;
    }
    .account-sheet-overlay.active {
        display: flex;
    }
    .account-sheet-panel {
        width: 100%;
        background: #151820;
        border-radius: 24px 24px 0 0;
        padding-bottom: env(safe-area-inset-bottom, 20px);
        animation: modalSlideUp 0.3s cubic-bezier(0.4,0,0.2,1);
        max-height: 70vh;
        overflow-y: auto;
    }
    .account-sheet-handle {
        width: 36px;
        height: 4px;
        background: rgba(255,255,255,0.15);
        border-radius: 2px;
        margin: 10px auto 0;
    }
    .account-sheet-header {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 20px 24px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .account-avatar {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: rgba(62, 139, 255,0.15);
        color: #3E8BFF;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        font-weight: 700;
        flex-shrink: 0;
    }
    .account-name {
        font-size: 16px;
        font-weight: 600;
        color: #fff;
    }
    .account-email {
        font-size: 13px;
        color: rgba(255,255,255,0.45);
        margin-top: 2px;
    }
    .account-sheet-body {
        padding: 8px 12px 12px;
    }
    .account-sheet-item {
        display: flex;
        align-items: center;
        gap: 14px;
        width: 100%;
        padding: 16px;
        border: none;
        background: none;
        color: rgba(255,255,255,0.8);
        font-size: 15px;
        font-family: var(--font);
        border-radius: 12px;
        cursor: pointer;
        min-height: 52px;
        transition: background 0.15s;
    }
    .account-sheet-item:active {
        background: rgba(255,255,255,0.05);
    }
    .account-sheet-item svg {
        flex-shrink: 0;
        opacity: 0.7;
    }
    .account-sheet-danger {
        color: #FF4D6A;
        margin-top: 4px;
        border-top: 1px solid rgba(255,255,255,0.06);
        border-radius: 12px 12px 0 0;
        padding-top: 20px;
    }
    .account-sheet-danger svg { opacity: 1; }

    /* ===== TRADE BOTTOM SHEET ===== */
    .trade-sheet-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.6);
        z-index: 310;
        align-items: flex-end;
    }
    .trade-sheet-overlay.active { display: flex; }
    .trade-sheet-panel {
        width: 100%;
        background: #151820;
        border-radius: 24px 24px 0 0;
        padding-bottom: env(safe-area-inset-bottom, 16px);
        animation: modalSlideUp 0.3s cubic-bezier(0.4,0,0.2,1);
        max-height: 85vh;
        overflow-y: auto;
    }
    .trade-sheet-handle {
        width: 36px; height: 4px;
        background: rgba(255,255,255,0.15);
        border-radius: 2px;
        margin: 10px auto 0;
    }
    .trade-sheet-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 24px 8px;
    }
    .trade-sheet-title { font-size: 17px; font-weight: 700; color: #fff; }
    .trade-sheet-close {
        width: 36px; height: 36px;
        display: flex; align-items: center; justify-content: center;
        background: rgba(255,255,255,0.06);
        border: none; border-radius: 10px;
        color: rgba(255,255,255,0.5); cursor: pointer;
        min-height: 44px; min-width: 44px;
    }
    .trade-sheet-body { padding: 12px 24px 20px; display: flex; flex-direction: column; gap: 14px; }
    .trade-sheet-token {
        padding: 14px 18px;
        background: rgba(255,255,255,0.04);
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 12px;
        display: flex; align-items: center; gap: 10px;
    }
    .trade-sheet-tok-name { font-size: 15px; font-weight: 600; color: #fff; }
    .trade-sheet-sides { display: flex; gap: 8px; }
    .trade-sheet-side {
        flex: 1; padding: 12px; min-height: 48px;
        border-radius: 12px; border: none;
        font-size: 15px; font-weight: 600;
        font-family: var(--font); cursor: pointer;
        background: rgba(62, 139, 255,0.1); color: #3E8BFF;
        transition: all 0.15s;
    }
    .trade-sheet-side-sell { background: rgba(255,77,106,0.1); color: #FF4D6A; }
    .trade-sheet-side.active { background: #3E8BFF; color: #0D0F14; }
    .trade-sheet-side-sell.active { background: #FF4D6A; color: #fff; }
    .trade-sheet-amount-wrap {
        display: flex; align-items: center;
        background: rgba(255,255,255,0.04);
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 14px;
        padding: 4px 18px;
    }
    .trade-sheet-amount {
        flex: 1; background: none; border: none; outline: none;
        color: #fff; font-size: 24px; font-weight: 600;
        font-family: var(--font); padding: 12px 0;
        min-height: 48px;
    }
    .trade-sheet-amount::placeholder { color: rgba(255,255,255,0.2); }
    .trade-sheet-currency { font-size: 15px; font-weight: 600; color: rgba(255,255,255,0.5); }
    .trade-sheet-presets { display: flex; gap: 8px; }
    .trade-sheet-preset-head {
        display: flex; align-items: center; gap: 10px;
        margin: 16px 0 8px;
    }
    .trade-sheet-preset-title {
        flex-shrink: 0;
        font-size: 11px; font-weight: 800; letter-spacing: .08em;
        text-transform: uppercase; color: rgba(255,255,255,.35);
    }
    .trade-sheet-preset-head .ts-preset-pills { flex: 1; gap: 6px; }
    .trade-sheet-preset-head .ts-preset-pill {
        flex: 1; min-height: 40px; padding: 8px 0;
        font-size: 13px; text-align: center; border-radius: 10px;
        background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.08);
        color: rgba(255,255,255,0.6);
    }
    .trade-sheet-preset-head .ts-preset-pill.active {
        background: rgba(62,139,255,0.16); border-color: rgba(62,139,255,0.5); color: #5CA0FF;
    }
    .ts-sheet-preset-sum { margin-bottom: 12px; padding: 10px 14px; font-size: 12px; }
    .trade-sheet-presets button {
        flex: 1; padding: 10px; min-height: 44px;
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 10px; color: rgba(255,255,255,0.7);
        font-size: 14px; font-weight: 600;
        font-family: var(--font); cursor: pointer;
    }
    .trade-sheet-presets button:active { background: rgba(62, 139, 255,0.12); color: #3E8BFF; }
    .trade-sheet-info {
        background: rgba(255,255,255,0.03);
        border-radius: 12px; padding: 12px 16px;
    }
    .trade-sheet-info-row {
        display: flex; justify-content: space-between; align-items: center;
        padding: 4px 0; font-size: 13px;
        color: rgba(255,255,255,0.5);
    }
    .trade-sheet-info-row span:last-child { color: rgba(255,255,255,0.8); font-weight: 500; }
    .trade-sheet-advanced-toggle {
        display: flex; align-items: center; justify-content: center; gap: 6px;
        width: 100%; padding: 10px; background: none;
        border: none; color: rgba(255,255,255,0.4);
        font-size: 13px; font-family: var(--font); cursor: pointer;
        min-height: 44px;
    }
    .trade-sheet-advanced-toggle svg { transition: transform 0.2s; }
    .trade-sheet-advanced-toggle:active svg { transform: rotate(180deg); }
    .trade-sheet-advanced {
        display: none; flex-direction: column; gap: 12px;
        padding: 12px 0;
    }
    .trade-sheet-advanced.open { display: flex; }
    .trade-sheet-adv-row {
        display: flex; justify-content: space-between; align-items: center;
        font-size: 13px; color: rgba(255,255,255,0.5);
    }
    .trade-sheet-adv-btns { display: flex; gap: 6px; }
    .trade-sheet-adv-btns button {
        padding: 8px 14px; min-height: 40px;
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 8px; color: rgba(255,255,255,0.6);
        font-size: 12px; font-family: var(--font); cursor: pointer;
    }
    .trade-sheet-adv-btns button.active {
        background: rgba(62, 139, 255,0.12); color: #3E8BFF;
        border-color: rgba(62, 139, 255,0.2);
    }
    .trade-sheet-execute {
        width: 100%; padding: 16px; min-height: 54px;
        border-radius: 14px; border: none;
        font-size: 16px; font-weight: 700;
        font-family: var(--font); cursor: pointer;
        background: #3E8BFF; color: #0D0F14;
        margin-top: 4px;
    }
    .trade-sheet-execute:active { opacity: 0.9; transform: scale(0.98); }
    .ai-fab { bottom: 80px; right: 18px; width: 56px; height: 56px; }
    .ai-chat-panel { bottom: 18px; right: 18px; width: calc(100% - 36px); height: calc(100% - 130px); }
    .ai-chat-messages { padding: 24px; gap: 18px; }
    .ai-chat-input-area { padding: 16px 24px; gap: 12px; }
    .ai-chat-input { min-height: 50px; font-size: 16px; border-radius: 14px; }
    .ai-send-btn { min-width: 50px; min-height: 50px; border-radius: 14px; }
    .ai-msg-bubble { padding: 14px 18px; font-size: 15px; line-height: 1.6; border-radius: 14px; }
    .ai-quick-actions { padding: 12px 24px; gap: 10px; flex-wrap: wrap; }
    .ai-quick-actions button { padding: 10px 16px; font-size: 13px; min-height: 42px; white-space: nowrap; border-radius: 10px; }

    /* ===== TOKEN SELECTION MODAL ===== */
    .tp-modal {
        width: 95%;
        max-height: 80vh;
        border-radius: 18px;
    }
    .tp-modal-head { padding: 24px; }
    .tp-modal-head h4 { font-size: 18px; }
    .tp-modal-search { margin: 10px 24px; min-height: 48px; }
    .tp-modal-search input { min-height: 48px; font-size: 15px; }
    .tp-modal-list { padding: 10px; }
    .tp-row { padding: 14px 16px; min-height: 56px; }

    /* ===== CODE VERIFICATION INPUTS ===== */
    .code-digit { width: 48px; height: 56px; font-size: 24px; border-radius: 12px; }
    .code-inputs { gap: 12px; }

    /* ===== FORMS ===== */
    .form-group { margin-bottom: 20px; }
    .input-wrapper { padding: 0; }
    .btn-primary { padding: 16px; min-height: 50px; font-size: 16px; border-radius: 14px; }
    .auth-form { gap: 0; }
    .btn-full { min-height: 50px; border-radius: 14px; }

    /* ===== TRACKERS PAGE SPECIFIC ===== */
    .trackers-header { padding: 0 0 16px; }
    .trackers-list { padding: 0; }
    .tracker-item { padding: 14px 16px; border-radius: 12px; }
    .trackers-empty { padding: 44px 24px; }

    /* ===== TWEET MONITOR ===== */
    .tweetmonitor-header { padding: 0 0 16px; }
    .tweetmonitor-body { padding: 0; }
    .tweetmonitor-search { flex-direction: column; gap: 10px; }
    .tweetmonitor-search button { width: 100%; justify-content: center; }

    /* ===== TRADER SCAN ===== */
    .traderscan-header { padding: 0 0 16px; }
    .traderscan-body { padding: 0; }

    /* ===== YIELD / POOLS ===== */
    .yield-summary-cards { grid-template-columns: 1fr; gap: 16px; }
    .pool-stats { grid-template-columns: 1fr 1fr; gap: 14px; }

    /* ===== GENERAL TOUCH IMPROVEMENTS ===== */
    .btn-sm { min-height: 44px; padding: 10px 16px; font-size: 13px; border-radius: 10px; }
    input, select, textarea, button { font-size: 16px !important; }
    a, button, .sidebar-link, .mbn-item, [onclick] {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    .dash-main, .discover-table-wrap, .discover-filters {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    .dash-main { overflow-x: clip; }
    .page-section.active { overflow-x: clip; }
    /* Enforce 44px minimum on all interactive elements */
    button, a, input[type="button"], input[type="submit"],
    .filter-tab, .sidebar-link, .limits-amount-pct button,
    .limits-expiry-btns button, .sniper-set-btns button,
    .sniper-quick-amounts button, .holdings-tabs button,
    .positions-tabs button, .limits-orders-tabs button,
    .limits-form-tabs button, .ts-side-tab,
    .leverage-presets button, .chart-timeframe-btns button {
        min-height: 44px;
    }
}

/* ---- Mobile Responsive (480px) ---- */
@media (max-width: 480px) {
    .topbar-left .logo span { display: none; }
    .topbar-wallet { display: none; }
    .topbar-icon-btn { width: 36px; height: 36px; min-width: 36px; }
    .dash-topbar { padding: 4px 10px 0; gap: 6px; }
    .topbar-left .logo img { width: 32px; height: 32px; }
    .topbar-search { height: 36px; padding: 5px 9px; }
    .topbar-center { margin: 0 2px; }
    .chain-select-btn { padding: 5px 8px; }
    .chain-select-btn svg { width: 14px; height: 14px; }
    .topbar-secondary { padding: 4px 0 8px; gap: 6px; margin-top: 4px; }
    .topbar-secondary .topbar-sol-balance { padding: 5px 9px; font-size: 11px; }
    .topbar-secondary .deposit-btn,
    .topbar-secondary .withdraw-btn { padding: 6px 12px; font-size: 12px; }
    .dash-layout { height: calc(100vh - var(--tb-h, 100px) - 64px); }

    .mbn-item span { font-size: 10px; }
    .mbn-item svg { width: 20px; height: 20px; }
    .mbn-item { min-height: 44px; padding: 6px 4px; }

    .dash-sidebar { width: 260px; left: -280px; }

    .page-section { padding: 0; }
    .page-section.active { padding: 12px; gap: 12px; }
    .page-section#page-perps.active,
    .page-section#page-portfolio.active,
    .page-section#page-pulse.active { padding: 0; gap: 0; }
    .discover-table td { padding: 12px 10px; font-size: 12px; }
    .discover-table th { padding: 10px 10px; font-size: 10px; }
    .discover-table { min-width: 350px; }

    /* Hide Market Cap and 24h Change columns on very small screens */
    .discover-table th:nth-child(4),
    .discover-table td:nth-child(4) { display: none; }
    .discover-table th:nth-child(8),
    .discover-table td:nth-child(8) { display: none; }

    .ts-swap-panel { padding: 18px 14px; gap: 16px; }
    .ts-field { padding: 14px; }
    .ts-amt-input { font-size: 20px; }
    .ts-swap-btn { padding: 14px; font-size: 15px; min-height: 50px; }
    .ts-side-tab { padding: 10px 16px; font-size: 14px; }
    .ts-set-btns { flex-wrap: wrap; gap: 8px; }
    .ts-set-btns button { font-size: 13px; padding: 8px 14px; }

    .portfolio-layout { padding: 0; gap: 14px; }
    .portfolio-summary { padding: 18px; }
    .portfolio-stats-grid { gap: 10px !important; }
    .portfolio-stat-card { padding: 16px; }

    .perps-chart { min-height: 180px; }
    .perps-orderbook { min-height: 150px; }
    .perps-order-form { padding: 18px; }
    .perps-stat { padding: 8px 12px; }
    .perps-stat .stat-label { font-size: 11px; }
    .perps-stat .stat-value { font-size: 13px; }
    .chart-timeframe-btns button { padding: 8px 14px; font-size: 12px; }
    .leverage-presets button { font-size: 13px; padding: 8px 14px; }
    .positions-table { min-width: 400px; }
    .positions-table th, .positions-table td { padding: 12px 10px; font-size: 12px; }

    .wallet-overlay-card { padding: 32px 22px; }
    .wallet-btn { min-height: 52px; padding: 14px; }
    .wallet-btn .wallet-name { font-size: 14px; }

    .code-digit { width: 42px; height: 50px; font-size: 20px; }
    .code-inputs { gap: 8px; }

    .modal-panel { border-radius: 20px 20px 0 0; }
    .modal-head { padding: 24px 24px 0; }
    .modal-head h3 { font-size: 18px; }
    .modal-body { padding: 20px 24px 28px; }
    .deposit-modal-content { padding: 32px 24px; }
    .deposit-header h2 { font-size: 20px; }
    .deposit-subtitle { font-size: 14px; }

    .limits-create-card { padding: 18px; }
    .limits-form-group { margin-bottom: 16px; }
    .limits-expiry-btns button { font-size: 12px; padding: 10px 14px; }

    .sniper-quick-card, .sniper-settings-card, .sniper-history-card { padding: 18px; }
    .sniper-quick-amounts button { font-size: 13px; }
    .sniper-setting { margin-bottom: 16px; }

    .swap-layout { padding: 0; }
    .swap-card { padding: 18px; }
    .swap-info-row { font-size: 13px; }

    .rewards-layout { padding: 0; }
    .rewards-header { padding: 18px; }
    .tier-row { font-size: 13px; padding: 12px 14px; }

    .pulse-header { padding: 12px 16px; }
    .pulse-filter-row { padding: 10px 16px 0 !important; gap: 8px; }
    .pulse-columns { gap: 12px; padding: 12px 16px 16px; }
    .pulse-column { flex: 1 0 auto; min-height: 180px; border-radius: 10px; }
    .pulse-item { padding: 10px 14px; margin: 0 4px 4px; font-size: 11px; }
    .pulse-feed-empty { padding: 32px 16px; }

    .ai-fab { bottom: 72px; right: 14px; width: 52px; height: 52px; }
    .ai-fab svg { width: 22px; height: 22px; }
    .ai-chat-messages { padding: 16px; gap: 14px; }
    .ai-chat-input-area { padding: 14px 16px; }

    #seedGrid, #seedRevealGrid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    #seedGrid span, #seedRevealGrid span {
        padding: 12px 10px !important;
        font-size: 14px !important;
    }

    .mbn-item { flex: 1; min-width: 0; }

    .settings-btn-group { flex-wrap: wrap; gap: 8px; }
    .settings-pill { font-size: 13px; padding: 8px 14px; }
}

/* ---- Responsive (769px–1200px) ---- */
@media (max-width: 1200px) and (min-width: 769px) {
    .perps-layout { grid-template-columns: 1fr; }
    .perps-right { border-top: 1px solid rgba(255,255,255,0.06); }
    .yield-summary-cards { grid-template-columns: 1fr 1fr; }
    .yield-body { grid-template-columns: 1fr; }
    .portfolio-body { grid-template-columns: 1fr; }
    .portfolio-summary { flex-direction: column; gap: 12px; text-align: center; }
    .portfolio-chart-mini { width: 100%; height: 40px; }
    .dash-discover-right { width: 340px; }
}

@media (max-width: 900px) and (min-width: 769px) {
    .dash-discover-right { display: none; }
}

/* Hidden utility */
.hidden { display: none !important; }

/* ===== Modal Overlay ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: flex-start;
    padding-top: 80px;
}
.modal-overlay.open { display: flex; }

.modal-panel {
    background: #151820;
    border: 1px solid #2A2D3A;
    border-radius: 16px;
    width: 420px;
    max-width: 94vw;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalIn 0.2s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}
.modal-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #E2E8F0;
}
.modal-close {
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: #2A2D3A; color: #E2E8F0; }

.modal-body { padding: 16px 24px 24px; }

/* ===== Settings Modal ===== */
.settings-section { margin-bottom: 20px; }
.settings-section:last-child { margin-bottom: 0; }
.settings-section h4 {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #1E2130;
}
.settings-row:last-child { border-bottom: none; }
.settings-row label {
    font-size: 13px;
    color: #CBD5E0;
    white-space: nowrap;
}

.settings-btn-group {
    display: flex;
    gap: 6px;
    align-items: center;
}
.settings-pill {
    background: #1E2130;
    border: 1px solid #2A2D3A;
    color: #A0AEC0;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}
.settings-pill:hover { border-color: #3E8BFF; color: #E2E8F0; }
.settings-pill.active {
    background: rgba(62, 139, 255,0.12);
    border-color: #3E8BFF;
    color: #3E8BFF;
}

.settings-custom {
    width: 60px;
    background: #1E2130;
    border: 1px solid #2A2D3A;
    border-radius: 8px;
    color: #E2E8F0;
    font-size: 12px;
    padding: 5px 8px;
    text-align: center;
    outline: none;
    transition: border-color 0.15s;
}
.settings-custom:focus { border-color: #3E8BFF; }
.settings-custom::placeholder { color: #4A5568; }

.settings-select {
    background: #1E2130;
    border: 1px solid #2A2D3A;
    border-radius: 8px;
    color: #E2E8F0;
    font-size: 12px;
    padding: 5px 10px;
    outline: none;
    cursor: pointer;
}
.settings-select:focus { border-color: #3E8BFF; }

.settings-value {
    font-size: 13px;
    color: #A0AEC0;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
    cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: #2A2D3A;
    border-radius: 22px;
    transition: background 0.2s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    bottom: 3px;
    background: #A0AEC0;
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: #3E8BFF; }
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(16px);
    background: #0D0F14;
}

.settings-danger {
    padding-top: 14px !important;
    border-top: 1px solid #2A2D3A !important;
    border-bottom: none !important;
}
.settings-btn-danger {
    background: rgba(255,77,106,0.08);
    border: 1px solid rgba(255,77,106,0.3);
    color: #FF4D6A;
    font-size: 12px;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}
.settings-btn-danger:hover {
    background: rgba(255,77,106,0.15);
    border-color: #FF4D6A;
}

/* ===== Notifications Modal ===== */
.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 40px 0;
    text-align: center;
}
.notif-empty p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #A0AEC0;
}
.notif-empty span {
    font-size: 12px;
    color: #4A5568;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #1E2130;
    align-items: flex-start;
}
.notif-item:last-child { border-bottom: none; }

.notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.notif-icon.trade { background: rgba(62, 139, 255,0.12); color: #3E8BFF; }
.notif-icon.deposit { background: rgba(59,130,246,0.12); color: #3B82F6; }
.notif-icon.alert { background: rgba(255,184,0,0.12); color: #FFB800; }
.notif-icon.info { background: rgba(160,174,192,0.12); color: #A0AEC0; }

.notif-content { flex: 1; min-width: 0; }
.notif-title {
    font-size: 13px;
    font-weight: 500;
    color: #E2E8F0;
    margin: 0 0 2px;
}
.notif-desc {
    font-size: 12px;
    color: #718096;
    margin: 0;
}
.notif-time {
    font-size: 11px;
    color: #4A5568;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Pulse live dot animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* ===== TRACKERS PAGE ===== */
.trackers-layout { flex:1; display:flex; flex-direction:column; overflow:hidden; padding:24px; gap:16px; }
.trackers-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.trackers-header h3 { font-size: 18px; font-weight: 700; }
.trackers-add { display: flex; gap: 8px; align-items: center; }
.trackers-list { display: flex; flex-direction: column; gap: 8px; }
.trackers-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: var(--text-tertiary); }
.trackers-empty p { font-size: 14px; margin-top: 12px; color: var(--text-secondary); }
.trackers-empty span { font-size: 12px; margin-top: 4px; }

/* ===== PREDICTIONS PAGE ===== */
.predictions-layout { padding: 24px; }
.predictions-header { margin-bottom: 20px; }
.predictions-header h3 { font-size: 18px; font-weight: 700; }
.predictions-header .section-sub { font-size: 12px; color: var(--text-tertiary); }
.predictions-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.prediction-card { background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.prediction-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.prediction-pair { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.prediction-symbol { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; }
.prediction-timer { font-size: 11px; color: var(--text-tertiary); background: var(--surface-2); padding: 3px 8px; border-radius: 6px; }
.prediction-question { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }
.prediction-options { display: flex; gap: 8px; margin-bottom: 8px; }
.prediction-btn { flex: 1; padding: 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-primary); font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.prediction-btn.yes:hover { border-color: var(--accent); color: var(--accent); background: rgba(62, 139, 255,0.08); }
.prediction-btn.no:hover { border-color: #FF4D4D; color: #FF4D4D; background: rgba(255,77,77,0.08); }
.prediction-pool { font-size: 11px; color: var(--text-tertiary); text-align: right; }

/* ===== VISION PAGE ===== */
.vision-layout { padding: 24px; max-width: 700px; }
.vision-header { margin-bottom: 20px; }
.vision-header h3 { font-size: 18px; font-weight: 700; }
.vision-header .section-sub { font-size: 12px; color: var(--text-tertiary); }
.vision-search { margin-bottom: 24px; }
.vision-results { margin-top: 16px; }
.vision-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: var(--text-tertiary); }
.vision-empty p { font-size: 14px; margin-top: 12px; color: var(--text-secondary); }
.vision-empty span { font-size: 12px; margin-top: 4px; text-align: center; }

/* ===== REWARDS PAGE ===== */
.rewards-layout { flex:1; display:flex; flex-direction:column; overflow-y:auto; padding:24px; max-width:700px; width:100%; margin:0 auto; gap:16px; }
.rewards-header { margin-bottom: 24px; }
.rewards-header h3 { font-size: 18px; font-weight: 700; }
.rewards-header .section-sub { font-size: 12px; color: var(--text-tertiary); }
.rewards-tier-card { background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 24px; }
.tier-current { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.tier-badge { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-tertiary); }
.tier-name { font-size: 18px; font-weight: 700; color: var(--accent); }
.tier-multiplier { font-size: 14px; color: var(--text-secondary); margin-left: auto; }
.tier-progress { display: flex; flex-direction: column; gap: 6px; }
.tier-progress-bar { height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.tier-progress-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.5s; }
.tier-progress-text { font-size: 11px; color: var(--text-tertiary); }
.rewards-tiers { display: flex; flex-direction: column; gap: 6px; margin-bottom: 24px; }
.tier-row { display: grid; grid-template-columns: 32px 80px 50px 1fr 1fr; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; font-size: 12px; background: var(--surface-1); border: 1px solid transparent; }
.tier-row.active { border-color: var(--accent); background: rgba(62, 139, 255,0.05); }
.tier-row .tier-icon { font-size: 16px; }
.tier-row .tier-label { font-weight: 600; }
.tier-row .tier-mult { color: var(--accent); font-weight: 600; }
.tier-row .tier-cashback { color: var(--text-secondary); }
.tier-row .tier-fee { color: var(--text-tertiary); text-align: right; }
.rewards-points { background: var(--surface-1); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.rewards-points h4 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.rewards-points p { font-size: 12px; color: var(--text-tertiary); margin-bottom: 16px; line-height: 1.5; }
.points-earned { display: flex; align-items: baseline; gap: 8px; }
.points-value { font-size: 28px; font-weight: 700; color: var(--accent); }
.points-label { font-size: 12px; color: var(--text-tertiary); }

/* ========================================
   DEPOSIT MODAL
   ======================================== */

.deposit-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}

.deposit-modal.active {
    display: flex;
}

.deposit-modal-content {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    animation: modalEnter 0.25s ease;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.deposit-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.deposit-close-btn:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.deposit-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.deposit-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.deposit-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.deposit-chains {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}

.deposit-chain-tab {
    flex: 1;
    padding: 9px 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.deposit-chain-tab:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.deposit-chain-tab.active {
    background: rgba(62, 139, 255, 0.12);
    border-color: var(--accent);
    color: var(--accent);
}

.deposit-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.deposit-balance-label {
    font-size: 13px;
    color: var(--text-muted);
}

.deposit-balance-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
}

.deposit-qr {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.qr-placeholder {
    width: 130px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deposit-address-box {
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.deposit-address-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.deposit-address-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.deposit-address {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-primary);
    word-break: break-all;
    line-height: 1.4;
}

.deposit-copy-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(62, 139, 255, 0.1);
    border: 1px solid rgba(62, 139, 255, 0.2);
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.deposit-copy-btn:hover {
    background: rgba(62, 139, 255, 0.2);
    border-color: var(--accent);
}

.deposit-copy-btn.copied {
    background: var(--accent);
    color: var(--bg-primary);
    border-color: var(--accent);
}

.deposit-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.deposit-option-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.deposit-option-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: rgba(62, 139, 255, 0.05);
}

.deposit-note {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
    text-align: center;
}

/* ========================================
   DEPOSIT BUTTON (Topbar)
   ======================================== */

.deposit-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: #0D0F14;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
    flex-shrink: 0;
    white-space: nowrap;
}

.deposit-btn:hover {
    background: #2F6FD6;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.withdraw-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
    flex-shrink: 0;
    white-space: nowrap;
}

.withdraw-btn:hover {
    border-color: rgba(62,139,255,.5);
    color: #fff;
    transform: translateY(-1px);
}

/* ========================================
   TOPBAR CHAIN SWITCHER
   ======================================== */
.chain-switcher {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}
.chain-select-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 9px;
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s;
}
.chain-select-btn:hover { border-color: rgba(62,139,255,.5); color: #fff; }
.chain-select-icon { display: inline-flex; color: #5CA0FF; }
.chain-select-caret { opacity: .7; }
.chain-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 170px;
    padding: 6px;
    background: #14161d;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    z-index: 60;
    flex-direction: column;
}
.chain-menu.open { display: flex; }
.chain-menu-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0,0,0,0.001);
}
.chain-menu-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6B7280;
    padding: 4px 8px 6px;
}
.chain-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    background: none;
    border: none;
    border-radius: 7px;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    transition: all .15s;
}
.chain-menu-item svg { color: #5CA0FF; flex-shrink: 0; }
.chain-menu-item span:first-of-type { flex: 1; }
.chain-menu-sub { font-size: 10px; font-weight: 700; color: #6B7280; letter-spacing: .03em; }
.chain-menu-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.chain-menu-item.active { color: #5CA0FF; }
.chain-menu-item.active .chain-menu-sub { color: #5CA0FF; }

/* ========================================
   TOPBAR SECONDARY ROW (mobile actions toolbar)
   Hidden on desktop; shown as a wrap-able second row on mobile
   carrying chain selector + SOL balance + Deposit + Withdraw
   so the primary topbar row stays clean and spaced.
   ======================================== */
.topbar-secondary {
    display: none;
}
.topbar-sec-left,
.topbar-sec-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ========================================
   MULTI-CHAIN WALLET PANEL (dropdown)
   ======================================== */
.wallet-drop-wrap { position: relative; flex-shrink: 0; }
.wallet-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    max-width: 92vw;
    background: #14161B;
    border: 1px solid #262B33;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,.55);
    z-index: 300;
    overflow: hidden;
}
.wallet-panel.open { display: block; }
.wallet-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #232830;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.wp-close {
    background: none;
    border: none;
    color: #8A93A3;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}
.wp-close:hover { color: #fff; }
.wallet-chain-list { padding: 6px; }
.wallet-chain-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 9px;
    cursor: pointer;
    transition: background .15s;
}
.wallet-chain-row:hover { background: rgba(255,255,255,.04); }
.wallet-chain-row.active { background: rgba(62,139,255,.1); }
.wc-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 800;
}
.wc-body { flex: 1; min-width: 0; }
.wc-top { display: flex; align-items: center; gap: 6px; }
.wc-name { font-size: 13px; font-weight: 700; color: #fff; }
.wc-addr { font-size: 10.5px; color: #6B7280; font-family: 'Courier New', monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.wc-bal { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.85); text-align: right; flex-shrink: 0; }

.wp-derive {
    border-top: 1px solid var(--border-color);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wp-derive-btn {
    background: linear-gradient(135deg, #3E8BFF, #7C3AED);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}
.wp-derive-btn:hover { filter: brightness(1.1); }
.wp-derive-note { font-size: 10px; line-height: 1.4; color: #6B7280; }
.wp-derive-status { font-size: 11px; color: #34D399; line-height: 1.4; min-height: 0; word-break: break-word; }

/* ========================================
   TOPBAR SOL BALANCE
   ======================================== */

.topbar-sol-balance {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.topbar-sol-balance svg {
    flex-shrink: 0;
}

/* ===== TRADING PANEL (Swap) ===== */
.ts-swap-panel {
    display: flex;
    flex-direction: column;
    flex: 0 1 auto;
    max-height: 60%;
    overflow-y: auto;
    padding: 12px;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ts-swap-panel::-webkit-scrollbar { width: 4px; }
.ts-swap-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

/* Search */
.ts-search-wrap { position: relative; }
.ts-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    transition: border-color 0.15s;
}
.ts-search:focus-within { border-color: rgba(62, 139, 255,0.4); }
.ts-search svg { color: rgba(255,255,255,0.25); flex-shrink: 0; }
.ts-search input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 12px;
    font-family: var(--font);
}
.ts-search input::placeholder { color: rgba(255,255,255,0.2); }
.ts-spinner {
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: #3E8BFF;
    border-radius: 50%;
    animation: tsSpin 0.6s linear infinite;
    flex-shrink: 0;
}
@keyframes tsSpin { to { transform: rotate(360deg); } }

/* Dropdown */
.ts-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    max-height: 320px;
    overflow-y: auto;
    background: #1a1d24;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    z-index: 50;
}
.ts-dropdown::-webkit-scrollbar { width: 4px; }
.ts-dropdown::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
.ts-dd-loading, .ts-dd-empty {
    padding: 20px;
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.3);
}
.ts-dd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.1s;
}
.ts-dd-item:hover { background: rgba(255,255,255,0.04); }
.ts-dd-info { flex: 1; min-width: 0; }
.ts-dd-sym { font-size: 12px; font-weight: 600; }
.ts-dd-name { font-size: 10px; color: rgba(255,255,255,0.3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-dd-data { text-align: right; font-size: 11px; }

/* Popular tokens */
.ts-popular {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.ts-pop-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font);
}
.ts-pop-btn:hover { border-color: rgba(62, 139, 255,0.3); color: #3E8BFF; }

/* Side tabs (Buy/Sell) */
.ts-side-tabs {
    display: flex;
    gap: 2px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 3px;
}
.ts-side-tab {
    flex: 1;
    padding: 7px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font);
}
.ts-side-tab.active {
    background: #3E8BFF;
    color: #0D0F14;
}
.ts-side-tab[data-side="sell"].active {
    background: #FF4D6A;
    color: #fff;
}

/* Token field */
.ts-field {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 10px;
}
.ts-field-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ts-token-pill, .ts-pill-empty {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 20px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}
.ts-pill-empty {
    padding: 6px 10px;
    border: 1px dashed rgba(255,255,255,0.15);
    background: none;
    color: rgba(255,255,255,0.3);
    font-size: 12px;
}
.ts-token-pill:hover { background: rgba(255,255,255,0.1); }
.ts-pill-img {
    width: 22px; height: 22px;
    border-radius: 50%;
}
.ts-pill-fb {
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 10px;
    color: #fff;
    flex-shrink: 0;
}
.ts-pill-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}
.ts-amt-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    font-family: var(--font);
    text-align: right;
    min-width: 0;
}
.ts-amt-input::placeholder { color: rgba(255,255,255,0.15); }
.ts-field-sub {
    font-size: 10px;
    color: rgba(255,255,255,0.25);
    margin-top: 4px;
}

/* Arrow button */
.ts-arrow-wrap {
    display: flex;
    justify-content: center;
    margin: -6px 0;
    position: relative;
    z-index: 2;
}
.ts-arrow-btn {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: #151820;
    border: 2px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.ts-arrow-btn:hover {
    border-color: rgba(62, 139, 255,0.3);
    color: #3E8BFF;
    transform: rotate(180deg);
}

/* Quote info */
.ts-quote-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px;
}
.ts-q-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}
.ts-q-row span:first-child { color: rgba(255,255,255,0.3); }
.ts-q-row span:last-child { color: rgba(255,255,255,0.6); font-weight: 500; }

/* Quick buy */
.ts-quick {
    display: flex;
    gap: 6px;
}
.ts-qb-btn {
    flex: 1;
    padding: 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(62, 139, 255,0.08);
    border: 1px solid rgba(62, 139, 255,0.15);
    color: #3E8BFF;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.12s;
}
.ts-qb-btn:hover { background: rgba(62, 139, 255,0.15); border-color: rgba(62, 139, 255,0.3); }

/* Settings */
.ts-settings-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px;
}
.ts-set-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.ts-set-label {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    flex-shrink: 0;
    white-space: nowrap;
}
.ts-set-btns {
    display: flex;
    gap: 3px;
}
.ts-set-btns button {
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.12s;
    white-space: nowrap;
}
.ts-set-btns button:hover { border-color: rgba(62, 139, 255,0.3); color: rgba(255,255,255,0.7); }
.ts-set-btns button.active {
    background: rgba(62, 139, 255,0.1);
    border-color: rgba(62, 139, 255,0.25);
    color: #3E8BFF;
}

/* Swap button */
.ts-swap-btn {
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    background: #3E8BFF;
    color: #0D0F14;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    width: 100%;
    transition: all 0.15s;
}
.ts-swap-btn:hover { background: #2F6FD6; }
.ts-swap-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Token icons */
.ts-tok-icon { border-radius: 50%; display: inline-block; vertical-align: middle; }
.ts-tok-fb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    vertical-align: middle;
}

/* Color helpers */
.ts-green { color: #3E8BFF; }
.ts-red { color: #FF4D6A; }
.ts-yellow { color: #FFB800; }

/* ===== TRENDING PANEL (Right side) ===== */
.ts-trending-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ts-trending-head h3 { font-size: 13px; font-weight: 700; }
.ts-trending-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
    min-height: 0;
}
.ts-trending-list::-webkit-scrollbar { width: 4px; }
.ts-trending-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }
.ts-trend-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.ts-trend-row:hover { background: rgba(255,255,255,0.03); }
.ts-trend-row:hover .ts-trend-icon img { transform: scale(1.1); }
.ts-trend-icon img { transition: transform 0.2s; }
.ts-trend-rank {
    width: 18px;
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.25);
    text-align: center;
    flex-shrink: 0;
}
.ts-trend-icon { flex-shrink: 0; }
.ts-trend-info { flex: 1; min-width: 0; }
.ts-trend-sym { font-size: 12px; font-weight: 600; }
.ts-trend-name { font-size: 10px; color: rgba(255,255,255,0.25); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-trend-data { text-align: right; flex-shrink: 0; }
.ts-trend-price { font-size: 12px; font-weight: 600; }
.ts-trend-change { font-size: 10px; font-weight: 600; }
.ts-trend-extra { text-align: right; flex-shrink: 0; }
.ts-trend-vol, .ts-trend-mc { font-size: 9px; color: rgba(255,255,255,0.2); }
.ts-trend-buy {
    background: rgba(62, 139, 255,0.1);
    color: #3E8BFF;
    border: 1px solid rgba(62, 139, 255,0.2);
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s;
    opacity: 0;
    transform: translateX(4px);
}
.ts-trend-row:hover .ts-trend-buy { opacity: 1; transform: translateX(0); }
.ts-trend-buy:hover {
    background: rgba(62, 139, 255,0.25);
    border-color: rgba(62, 139, 255,0.4);
    box-shadow: 0 0 12px rgba(62, 139, 255,0.15);
}
.ts-trend-empty {
    padding: 40px 16px;
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.2);
}

/* Skeleton loaders */
.ts-trend-skels { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px; }
.ts-skel {
    height: 44px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: tsShimmer 1.5s infinite;
}
@keyframes tsShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ========================================
   AI TRADING ASSISTANT
   ======================================== */

.ai-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3E8BFF, #00B894);
    border: none;
    color: #0D0F14;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    z-index: 9998;
    box-shadow: 0 4px 24px rgba(62, 139, 255,0.4);
    transition: box-shadow 0.3s ease, transform 0.15s ease;
    animation: aiFabPulse 3s ease-in-out infinite;
    user-select: none;
    -webkit-user-select: none;
}
.ai-fab.dragging { cursor: grabbing; animation: none; transform: scale(1.12); box-shadow: 0 8px 40px rgba(62, 139, 255,0.6); transition: none; }
.ai-fab:hover { transform: scale(1.08); box-shadow: 0 6px 32px rgba(62, 139, 255,0.5); }
.ai-fab.dragging:hover { transform: scale(1.12); }
.ai-fab-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #FF4D6A;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}
@keyframes aiFabPulse {
    0%, 100% { box-shadow: 0 4px 24px rgba(62, 139, 255,0.4); }
    50% { box-shadow: 0 4px 32px rgba(62, 139, 255,0.6); }
}

.ai-chat-panel {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 400px;
    height: 580px;
    background: #131620;
    border: 1px solid #2A2D3A;
    border-radius: 16px;
    z-index: 9999;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6);
    animation: aiPanelIn 0.3s ease;
}
.ai-chat-panel.open { display: flex; }
@keyframes aiPanelIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(62, 139, 255,0.12), rgba(0,184,148,0.06));
    border-bottom: 1px solid #2A2D3A;
}
.ai-chat-header-left { display: flex; align-items: center; gap: 10px; }
.ai-avatar {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3E8BFF, #00B894);
    display: flex; align-items: center; justify-content: center;
    color: #0D0F14;
}
.ai-chat-title { font-size: 14px; font-weight: 700; color: #fff; }
.ai-chat-status { font-size: 11px; color: #3E8BFF; display: flex; align-items: center; gap: 4px; }
.ai-status-dot { width: 6px; height: 6px; border-radius: 50%; background: #3E8BFF; display: inline-block; animation: pulse 2s infinite; }
.ai-chat-close {
    background: none; border: none; color: #6B7280; cursor: pointer;
    padding: 4px; border-radius: 6px; transition: all 0.15s;
}
.ai-chat-close:hover { background: rgba(255,255,255,0.06); color: #fff; }

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ai-chat-messages::-webkit-scrollbar { width: 4px; }
.ai-chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

.ai-msg { display: flex; gap: 8px; max-width: 90%; animation: aiMsgIn 0.2s ease; }
.ai-msg-bot { align-self: flex-start; }
.ai-msg-user { align-self: flex-end; flex-direction: row-reverse; }
@keyframes aiMsgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.ai-msg-avatar {
    width: 26px; height: 26px; border-radius: 8px;
    background: linear-gradient(135deg, #3E8BFF, #00B894);
    display: flex; align-items: center; justify-content: center;
    color: #0D0F14; flex-shrink: 0; font-size: 10px;
}
.ai-msg-user .ai-msg-avatar { background: #3B82F6; color: #fff; }

.ai-msg-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #CBD5E0;
}
.ai-msg-bot .ai-msg-bubble {
    background: #1A1D27;
    border: 1px solid #2A2D3A;
    border-top-left-radius: 4px;
}
.ai-msg-user .ai-msg-bubble {
    background: rgba(59,130,246,0.15);
    border: 1px solid rgba(59,130,246,0.25);
    border-top-right-radius: 4px;
    color: #E2E8F0;
}

.ai-msg-bubble .ai-token-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 6px;
    background: rgba(62, 139, 255,0.1); border: 1px solid rgba(62, 139, 255,0.2);
    font-size: 11px; font-weight: 600; color: #3E8BFF; margin: 2px 0;
}
.ai-msg-bubble .ai-data-row {
    display: flex; justify-content: space-between;
    padding: 4px 0; font-size: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.ai-msg-bubble .ai-data-row:last-child { border-bottom: none; }
.ai-msg-bubble .ai-data-label { color: #6B7280; }
.ai-msg-bubble .ai-data-val { color: #E2E8F0; font-weight: 500; }
.ai-msg-bubble .ai-data-val.green { color: #3E8BFF; }
.ai-msg-bubble .ai-data-val.red { color: #FF4D6A; }
.ai-msg-bubble .ai-data-val.yellow { color: #FFB800; }

.ai-msg-bubble .ai-signal {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 6px;
    font-size: 11px; font-weight: 700; margin-top: 6px;
}
.ai-signal.buy { background: rgba(46, 189, 133,0.12); color: #2EBD85; }
.ai-signal.sell { background: rgba(255,77,106,0.12); color: #FF4D6A; }
.ai-signal.hold { background: rgba(255,184,0,0.12); color: #FFB800; }

.ai-typing {
    display: flex; gap: 4px; padding: 8px 14px; align-items: center;
}
.ai-typing-dot {
    width: 6px; height: 6px; border-radius: 50%; background: #6B7280;
    animation: aiTyping 1.2s ease-in-out infinite;
}
.ai-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes aiTyping { 0%, 60%, 100% { transform: translateY(0); opacity: 0.3; } 30% { transform: translateY(-4px); opacity: 1; } }

.ai-quick-actions {
    display: flex; gap: 6px; padding: 8px 14px;
    flex-wrap: wrap;
}
.ai-quick-actions button {
    padding: 5px 12px; border-radius: 14px;
    font-size: 11px; font-weight: 600;
    background: rgba(62, 139, 255,0.08);
    border: 1px solid rgba(62, 139, 255,0.15);
    color: #3E8BFF; cursor: pointer;
    font-family: var(--font);
    transition: all 0.15s;
}
.ai-quick-actions button:hover {
    background: rgba(62, 139, 255,0.15);
    border-color: rgba(62, 139, 255,0.3);
}

.ai-chat-input-area {
    display: flex; gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid #2A2D3A;
    background: #131620;
}
.ai-chat-input {
    flex: 1;
    background: #1A1D27;
    border: 1px solid #2A2D3A;
    border-radius: 10px;
    padding: 10px 14px;
    color: #fff;
    font-size: 13px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.15s;
}
.ai-chat-input:focus { border-color: rgba(62, 139, 255,0.4); }
.ai-chat-input::placeholder { color: #4A5568; }
.ai-send-btn {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: #3E8BFF;
    border: none; color: #0D0F14;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.15s; flex-shrink: 0;
}
.ai-send-btn:hover { background: #2F6FD6; }

/* ========================================
   ORDER BOOK (Perps)
   ======================================== */
.perps-chart-area {
    display: flex;
    gap: 0;
    flex: 1;
    min-height: 350px;
}
.perps-chart {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}
.chart-timeframe-btns {
    display: flex;
    gap: 2px;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.chart-timeframe-btns button {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: none;
    border: 1px solid transparent;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.15s;
}
.chart-timeframe-btns button:hover { color: rgba(255,255,255,0.6); }
.chart-timeframe-btns button.active {
    background: rgba(62, 139, 255,0.1);
    border-color: rgba(62, 139, 255,0.25);
    color: #3E8BFF;
}
.chart-canvas {
    flex: 1;
    position: relative;
    min-height: 300px;
}
.chart-canvas canvas {
    width: 100% !important;
    height: 100% !important;
}

.perps-orderbook {
    width: 220px;
    border-left: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    font-size: 11px;
}
.ob-header {
    padding: 8px 12px;
    font-weight: 700;
    font-size: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ob-spread {
    display: flex;
    justify-content: space-between;
    padding: 4px 12px;
    font-size: 10px;
    color: #6B7280;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.ob-asks, .ob-bids {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.ob-asks { justify-content: flex-end; }
.ob-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 12px;
    position: relative;
    font-size: 11px;
}
.ob-row .ob-price { font-weight: 500; }
.ob-row .ob-amt { color: #6B7280; }
.ob-row .ob-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    opacity: 0.08;
    pointer-events: none;
}
.ob-row.ask .ob-price { color: #FF4D6A; }
.ob-row.ask .ob-bar { background: #FF4D6A; }
.ob-row.bid .ob-price { color: #2EBD85; }
.ob-row.bid .ob-bar { background: #2EBD85; }

.ob-mid {
    padding: 6px 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
}

/* ========================================
   LIMIT ORDERS PAGE
   ======================================== */
.limits-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 12px;
    flex: 1;
    min-height: 0;
    padding: 16px;
}
.limits-left {
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.04);
}
.limits-right {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.limits-create-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}
.limits-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.limits-form-tabs {
    display: flex;
    gap: 2px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 3px;
}
.limits-form-tabs button {
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.15s;
}
.limits-form-tabs button.active {
    background: #3E8BFF;
    color: #0D0F14;
}
.limits-form-tabs button[data-side="sell"].active {
    background: #FF4D6A;
    color: #fff;
}
.limits-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.limits-form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
}
.limits-input {
    width: 100%;
    background: #1A1D27;
    border: 1px solid #2A2D3A;
    border-radius: 8px;
    padding: 10px 12px;
    color: #fff;
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.15s;
}
.limits-input:focus { border-color: #3E8BFF; }
.limits-input::placeholder { color: #4A5568; }

.limits-type-btns {
    display: flex;
    gap: 6px;
}
.limits-type-btns button {
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    background: #1A1D27;
    border: 1px solid #2A2D3A;
    color: #6B7280;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.15s;
}
.limits-type-btns button:hover { border-color: #4A5568; color: #A0AEC0; }
.limits-type-btns button.active {
    background: rgba(62, 139, 255,0.1);
    border-color: rgba(62, 139, 255,0.3);
    color: #3E8BFF;
}

.limits-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.limits-input-row .limits-input { flex: 1; }
.limits-amount-pct {
    display: flex;
    gap: 4px;
}
.limits-amount-pct button {
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.12s;
}
.limits-amount-pct button:hover { border-color: #3E8BFF; color: #3E8BFF; }
.limits-balance-hint {
    font-size: 11px;
    color: #4A5568;
}
.limits-expiry label {
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    margin-bottom: 6px;
    display: block;
}
.limits-expiry-btns {
    display: flex;
    gap: 6px;
}
.limits-expiry-btns button {
    flex: 1;
    padding: 7px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: #1A1D27;
    border: 1px solid #2A2D3A;
    color: #6B7280;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.12s;
}
.limits-expiry-btns button:hover { border-color: #4A5568; color: #A0AEC0; }
.limits-expiry-btns button.active {
    background: rgba(62, 139, 255,0.1);
    border-color: rgba(62, 139, 255,0.3);
    color: #3E8BFF;
}

.limits-order-summary {
    padding: 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px;
}
.limits-sum-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 3px 0;
}
.limits-sum-row span:first-child { color: #6B7280; }
.limits-sum-row span:last-child { color: #A0AEC0; font-weight: 500; }

.limits-submit-btn {
    margin-top: 4px;
}
.limits-submit-btn.btn-sell { background: #FF4D6A; color: #fff; }

.limits-token-search {
    position: relative;
}
.limits-token-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: #1a1d24;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    z-index: 10;
}
.limits-token-dropdown .ts-dd-item { padding: 8px 10px; }
.limits-selected-token {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(62, 139, 255,0.06);
    border: 1px solid rgba(62, 139, 255,0.15);
    border-radius: 8px;
}

.limits-orders-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 0 16px;
}
.limits-orders-tabs button {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #6B7280;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.15s;
}
.limits-orders-tabs button.active {
    color: #3E8BFF;
    border-bottom-color: #3E8BFF;
}
.limits-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: rgba(62, 139, 255,0.15);
    color: #3E8BFF;
    font-size: 10px;
    font-weight: 700;
    margin-left: 6px;
    padding: 0 5px;
}
.limits-orders-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}
.limits-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-tertiary);
}
.limits-empty-state p { font-size: 14px; margin-top: 12px; color: var(--text-secondary); font-weight: 600; }
.limits-empty-state span { font-size: 12px; margin-top: 4px; }

.limit-order-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 6px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px;
    font-size: 12px;
}
.limit-order-row .lo-side { font-weight: 700; }
.limit-order-row .lo-side.buy { color: #2EBD85; }
.limit-order-row .lo-side.sell { color: #FF4D6A; }
.limit-order-row .lo-pair { color: #A0AEC0; font-weight: 600; }
.limit-order-row .lo-price { color: #E2E8F0; font-weight: 500; }
.limit-order-row .lo-amount { color: #6B7280; }
.limit-order-cancel {
    background: none;
    border: 1px solid rgba(255,77,106,0.3);
    color: #FF4D6A;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.15s;
}
.limit-order-cancel:hover { background: rgba(255,77,106,0.1); }

/* ========================================
   SNIPER PAGE
   ======================================== */
.sniper-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 12px;
    flex: 1;
    min-height: 0;
    padding: 16px;
}
.sniper-main {
    overflow-y: auto;
    padding: 20px;
    background: var(--bg-primary);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.04);
}
.sniper-side {
    overflow-y: auto;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.04);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sniper-header {
    margin-bottom: 20px;
}
.sniper-header h3 { font-size: 18px; font-weight: 700; }
.sniper-header .section-sub { font-size: 12px; color: var(--text-tertiary); }
.sniper-status { margin-top: 8px; }

.sniper-alerts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sniper-alert-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    color: var(--text-tertiary);
}
.sniper-alert-placeholder p { font-size: 14px; margin-top: 12px; color: var(--text-secondary); font-weight: 600; }
.sniper-alert-placeholder span { font-size: 12px; margin-top: 4px; }

.sniper-alert-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    animation: sniperAlertIn 0.3s ease;
}
@keyframes sniperAlertIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }

.sniper-alert-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: #fff; font-size: 16px; flex-shrink: 0;
}
.sniper-alert-info { flex: 1; min-width: 0; }
.sniper-alert-name { font-size: 13px; font-weight: 600; }
.sniper-alert-meta { font-size: 11px; color: #6B7280; }
.sniper-alert-data { display: flex; gap: 12px; flex-shrink: 0; }
.sniper-alert-data span { font-size: 11px; font-weight: 500; }
.sniper-alert-buy {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    background: #3E8BFF;
    color: #0D0F14;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    flex-shrink: 0;
    transition: all 0.15s;
}
.sniper-alert-buy:hover { background: #2F6FD6; }

.sniper-quick-card, .sniper-settings-card, .sniper-history-card {
    padding: 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
}
.sniper-quick-card h4, .sniper-settings-card h4, .sniper-history-card h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}
.sniper-quick-amounts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 10px;
}
.sniper-quick-amounts button {
    padding: 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.12s;
}
.sniper-quick-amounts button:hover { border-color: #3E8BFF; color: #3E8BFF; }
.sniper-quick-amounts button.active {
    background: rgba(62, 139, 255,0.1);
    border-color: rgba(62, 139, 255,0.3);
    color: #3E8BFF;
}
.sniper-paste-group { display: flex; flex-direction: column; gap: 8px; }
.sniper-input {
    width: 100%;
    background: #1A1D27;
    border: 1px solid #2A2D3A;
    border-radius: 8px;
    padding: 10px 12px;
    color: #fff;
    font-size: 12px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.15s;
}
.sniper-input:focus { border-color: #3E8BFF; }
.sniper-input::placeholder { color: #4A5568; }
.sniper-snipe-btn {
    background: linear-gradient(135deg, #FF4D6A, #E31937);
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.15s;
}
.sniper-snipe-btn:hover { opacity: 0.9; }

.sniper-setting {
    margin-bottom: 10px;
}
.sniper-setting:last-child { margin-bottom: 0; }
.sniper-setting label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #6B7280;
    margin-bottom: 6px;
}
.sniper-set-btns {
    display: flex;
    gap: 4px;
}
.sniper-set-btns button {
    flex: 1;
    padding: 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.12s;
}
.sniper-set-btns button:hover { border-color: #3E8BFF; color: #3E8BFF; }
.sniper-set-btns button.active {
    background: rgba(62, 139, 255,0.1);
    border-color: rgba(62, 139, 255,0.3);
    color: #3E8BFF;
}

.sniper-history-list { display: flex; flex-direction: column; gap: 6px; }
.sniper-history-empty {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: #4A5568;
}
.sniper-history-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(255,255,255,0.02);
    border-radius: 6px;
    font-size: 11px;
}
.sniper-history-item .sh-pair { font-weight: 600; color: #A0AEC0; }
.sniper-history-item .sh-amt { color: #6B7280; margin-left: auto; }
.sniper-history-item .sh-pnl { font-weight: 600; }
.sniper-history-item .sh-pnl.profit { color: #3E8BFF; }
.sniper-history-item .sh-pnl.loss { color: #FF4D6A; }

/* ========================================
   ENHANCED PORTFOLIO
   ======================================== */
.portfolio-layout { padding: 20px; }
.portfolio-summary {
    display: grid;
    grid-template-columns: 1fr 2fr 200px;
    gap: 16px;
    margin-bottom: 16px;
    align-items: center;
}
.portfolio-total {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.portfolio-label { font-size: 12px; color: #6B7280; }
.portfolio-value { font-size: 32px; font-weight: 800; color: #fff; }
.portfolio-change { font-size: 13px; font-weight: 500; }
.portfolio-change.positive { color: #3E8BFF; }
.portfolio-change.negative { color: #FF4D6A; }
.portfolio-chart-area {
    height: 100px;
    position: relative;
}
.portfolio-chart-area canvas { width: 100% !important; height: 100% !important; }

.portfolio-alloc-chart {
    display: flex;
    align-items: center;
    gap: 12px;
}
.portfolio-alloc-legend {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.alloc-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #A0AEC0;
}
.alloc-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.portfolio-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.portfolio-stat-card {
    padding: 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.portfolio-stat-card .stat-label { font-size: 11px; color: #6B7280; }
.portfolio-stat-card .stat-value { font-size: 18px; font-weight: 700; color: #E2E8F0; }
.portfolio-stat-card .stat-value.positive { color: #3E8BFF; }
.portfolio-stat-card .stat-value.negative { color: #FF4D6A; }

.portfolio-body {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 16px;
}

/* Positions empty */
.positions-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    color: #6B7280;
}
.positions-empty p { font-size: 14px; font-weight: 600; color: #A0AEC0; margin-top: 8px; }
.positions-empty span { font-size: 12px; }

/* ROE column */
.perps-right {
    width: 320px;
    border-left: 1px solid rgba(255,255,255,0.06);
    overflow-y: auto;
    padding: 12px;
}

/* Token Picker Modal */
.tp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tp-modal-overlay.hidden { display: none; }

.tp-modal {
    background: #11131A;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    width: 400px;
    max-height: 480px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tp-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tp-modal-head h4 { margin: 0; font-size: 15px; color: #fff; font-weight: 600; }
.tp-modal-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}
.tp-modal-close:hover { color: #fff; }

.tp-modal-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 16px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    transition: border-color 0.2s;
}
.tp-modal-search:focus-within { border-color: rgba(62, 139, 255,0.4); }
.tp-modal-search svg { color: rgba(255,255,255,0.25); flex-shrink: 0; }
.tp-modal-search input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 13px;
}
.tp-modal-search input::placeholder { color: rgba(255,255,255,0.25); }

.tp-modal-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 8px;
}
.tp-modal-list::-webkit-scrollbar { width: 4px; }
.tp-modal-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.tp-modal-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.12s;
}
.tp-modal-item:hover { background: rgba(255,255,255,0.06); }

.tp-modal-item .ts-tok-icon { border-radius: 50%; object-fit: cover; }
.tp-modal-item-info { flex: 1; min-width: 0; }
.tp-modal-item-sym { font-size: 13px; font-weight: 600; color: #fff; }
.tp-modal-item-name { font-size: 11px; color: rgba(255,255,255,0.4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-modal-item-price { text-align: right; font-size: 12px; color: rgba(255,255,255,0.6); }

.tp-modal-empty { text-align: center; padding: 32px; color: rgba(255,255,255,0.3); font-size: 13px; }
.tp-modal-loading { text-align: center; padding: 24px; color: rgba(255,255,255,0.3); font-size: 13px; }

/* Make pill clickable hint */
.ts-pill-empty, .ts-token-pill { cursor: pointer; }
.ts-pill-empty:hover { background: rgba(255,255,255,0.08) !important; }

/* Seed phrase modal */
.seed-word { display: flex; align-items: center; gap: 8px; background: #1a1d24; border: 1px solid #2A2D3A; border-radius: 8px; padding: 8px 12px; }
.seed-num { color: #3E8BFF; font-weight: 700; font-size: 12px; min-width: 18px; }
.seed-text { color: #E2E8F0; font-size: 13px; font-family: monospace; }
.confirm-word-group { margin-bottom: 12px; }
.confirm-word-label { display: block; color: #A0AEC0; font-size: 12px; margin-bottom: 4px; }
.confirm-word-input { width: 100%; padding: 10px 12px; background: #1a1d24; border: 1px solid #2A2D3A; border-radius: 8px; color: #E2E8F0; font-size: 14px; font-family: monospace; outline: none; transition: border-color 0.2s; }
.confirm-word-input:focus { border-color: #3E8BFF; }
.confirm-word-input::placeholder { color: #4A5568; }

/* ===== GLOBAL SEARCH ===== */
.global-search-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);backdrop-filter:blur(8px);z-index:9999;display:flex;align-items:flex-start;justify-content:center;padding-top:120px}
.global-search-overlay.hidden{display:none}
.global-search-modal{width:560px;max-width:92vw;background:#131620;border:1px solid #2A2D3A;border-radius:16px;overflow:hidden;box-shadow:0 25px 60px rgba(0,0,0,.5)}
.global-search-input-wrap{display:flex;align-items:center;gap:10px;padding:16px 18px;border-bottom:1px solid #2A2D3A}
.global-search-input-wrap input{flex:1;background:none;border:none;color:#fff;font-size:15px;font-family:inherit;outline:none}
.global-search-input-wrap input::placeholder{color:#6B7280}
.global-search-input-wrap kbd{background:#1A1D27;border:1px solid #2A2D3A;border-radius:6px;padding:3px 8px;font-size:11px;color:#6B7280;font-family:inherit}
.global-search-results{max-height:400px;overflow-y:auto;padding:8px}
.global-search-hint{text-align:center;padding:24px;color:#6B7280;font-size:13px}
.global-search-result{display:flex;align-items:center;gap:12px;padding:12px;border-radius:10px;cursor:pointer;transition:background .15s}
.global-search-result:hover{background:#1A1D27}
.global-search-result .gsr-icon{width:36px;height:36px;border-radius:50%;background:#1A1D27;flex-shrink:0}
.global-search-result .gsr-info{flex:1;min-width:0}
.global-search-result .gsr-sym{font-weight:700;font-size:14px;color:#fff}
.global-search-result .gsr-name{font-size:12px;color:#6B7280;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.global-search-result .gsr-price{text-align:right}
.global-search-result .gsr-price-val{font-weight:600;font-size:13px;color:#fff}
.global-search-result .gsr-price-chg{font-size:11px;font-weight:600}
.global-search-result .gsr-mc{font-size:10px;color:#6B7280;margin-top:2px}
.gs-spinner{display:inline-block;width:14px;height:14px;border:2px solid rgba(255,255,255,0.1);border-top-color:#3E8BFF;border-radius:50%;animation:gsSpin .6s linear infinite;vertical-align:middle;margin-right:6px}
@keyframes gsSpin{to{transform:rotate(360deg)}}
.positive{color:#3E8BFF}
.negative{color:#FF4D6A}

/* ===== X MONITOR ===== */
.tweetmonitor-layout{display:flex;flex-direction:column;gap:16px}
.tweetmonitor-header{display:flex;justify-content:space-between;align-items:center}
.tweetmonitor-header h3{font-size:20px;font-weight:700}
.tweetmonitor-search{display:flex;gap:10px;align-items:center}
.tweetmonitor-add{display:flex;gap:8px}
.tweetmonitor-tracked{display:flex;flex-wrap:wrap;gap:6px}
.x-handle-tag{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;background:#1a1d24;border:1px solid #2A2D3A;border-radius:20px;font-size:12px;font-weight:500;color:#E2E8F0}
.x-handle-tag .x-remove{cursor:pointer;color:#6B7280;font-size:14px;line-height:1}
.x-handle-tag .x-remove:hover{color:#FF4D6A}
.tweetmonitor-tabs{display:flex;gap:4px}
.tweetmonitor-feed{display:flex;flex-direction:column;gap:8px}
.x-signal-card{background:#1a1d24;border:1px solid #2A2D3A;border-radius:12px;padding:14px 16px;display:flex;gap:12px;transition:border-color .2s}
.x-signal-card:hover{border-color:#3A3D4A}
.x-signal-card .x-signal-type{width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-size:14px;font-weight:700}
.x-signal-card .x-signal-type.pump{background:rgba(62, 139, 255,.12);color:#3E8BFF}
.x-signal-card .x-signal-type.whale{background:rgba(168,85,247,.12);color:#A855F7}
.x-signal-card .x-signal-type.trend{background:rgba(59,130,246,.12);color:#3B82F6}
.x-signal-card .x-signal-type.alert{background:rgba(239,68,68,.12);color:#EF4444}
.x-signal-card .x-signal-body{flex:1;min-width:0}
.x-signal-card .x-signal-title{font-weight:600;font-size:13px;margin-bottom:4px}
.x-signal-card .x-signal-desc{font-size:12px;color:#6B7280;line-height:1.5}
.x-signal-card .x-signal-meta{display:flex;gap:12px;margin-top:8px;font-size:11px;color:#6B7280}
.x-signal-card .x-signal-meta span{display:flex;align-items:center;gap:4px}
.x-signal-card .x-signal-action{display:flex;align-items:center;gap:6px;margin-top:10px}
.x-signal-card .x-signal-action button{padding:6px 14px;font-size:11px;font-weight:600;border-radius:6px;cursor:pointer;border:none;font-family:inherit}
.x-signal-card .x-signal-action .btn-buy{background:#3E8BFF;color:#000}
.x-signal-card .x-signal-action .btn-view{background:#1A1D27;color:#E2E8F0;border:1px solid #2A2D3A}

/* ===== REWARDS ENHANCED ===== */
.rewards-quests{display:flex;flex-direction:column;gap:8px}
.rewards-quest{display:flex;align-items:center;gap:12px;padding:12px 14px;background:#1a1d24;border:1px solid #2A2D3A;border-radius:10px}
.rewards-quest .rq-icon{width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0}
.rewards-quest .rq-info{flex:1}
.rewards-quest .rq-name{font-size:13px;font-weight:600}
.rewards-quest .rq-desc{font-size:11px;color:#6B7280;margin-top:2px}
.rewards-quest .rq-pts{font-size:12px;font-weight:700;color:#3E8BFF;white-space:nowrap}
.rewards-quest .rq-done{font-size:12px;font-weight:600;color:#3E8BFF;white-space:nowrap}
.rewards-quest.completed{opacity:.5}

/* ===== SWAP PAGE MODAL ===== */
.sp-modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.6);z-index:1000;display:flex;align-items:center;justify-content:center;backdrop-filter:blur(4px)}
.sp-modal-overlay.hidden{display:none}
.sp-modal{background:#1a1d24;border:1px solid rgba(255,255,255,0.08);border-radius:14px;width:90%;max-width:400px;max-height:70vh;display:flex;flex-direction:column;overflow:hidden}
.sp-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid rgba(255,255,255,0.06)}
.sp-modal-header h4{font-size:14px;font-weight:700;margin:0}
.sp-search-input{margin:10px 12px 0;padding:10px 12px;background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.08);border-radius:8px;color:#fff;font-size:13px;font-family:var(--font);outline:none}
.sp-search-input:focus{border-color:rgba(62, 139, 255,0.4)}
.sp-search-input::placeholder{color:rgba(255,255,255,0.25)}
.sp-search-results,.sp-popular-list{overflow-y:auto;padding:8px 12px;flex:1}
.sp-modal-item{display:flex;align-items:center;gap:10px;padding:10px;border-radius:8px;cursor:pointer;transition:background .15s}
.sp-modal-item:hover{background:rgba(255,255,255,0.06)}
.sp-dropdown{display:none}
.sp-slip-btn{padding:6px 12px;border-radius:6px;background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.08);color:rgba(255,255,255,0.5);font-size:12px;cursor:pointer;font-family:var(--font);transition:all .15s}
.sp-slip-btn.active{background:rgba(62, 139, 255,0.1);border-color:rgba(62, 139, 255,0.3);color:#3E8BFF}
.sp-slip-btn:hover{border-color:rgba(255,255,255,0.2)}
.ts-qk-slip,.ts-qk-prio,.ts-qk-mev,.ts-qk-auto{padding:6px 12px;border-radius:6px;border:1px solid #252B3A;background:#161A23;color:#8A93A6;font-size:11px;font-weight:700;cursor:pointer;font-family:inherit;transition:all .15s}
.ts-qk-slip:hover,.ts-qk-prio:hover,.ts-qk-mev:hover,.ts-qk-auto:hover{color:#fff;border-color:#2E3542}
.ts-qk-slip.active,.ts-qk-prio.active{background:rgba(62,139,255,.14);border-color:rgba(62,139,255,.45);color:#5CA0FF}
.ts-qk-mev.active{background:rgba(62,139,255,.14);border-color:rgba(62,139,255,.45);color:#5CA0FF}
.ts-qk-mev[data-val="off"].active{background:rgba(255,77,106,.14);border-color:rgba(255,77,106,.4);color:#FF4D6A}
.ts-qk-auto.active[data-v="1"]{background:rgba(46,189,133,.16);border-color:rgba(46,189,133,.45);color:#2EBD85}
.ts-qk-auto.active[data-v="0"]{background:rgba(255,77,106,.14);border-color:rgba(255,77,106,.4);color:#FF4D6A}

/* ===== AXIOM-STYLE TRADE PANEL ===== */
.ax-token-input{width:100%;padding:12px 14px;border-radius:10px;border:1px solid rgba(255,255,255,0.08);background:#0D1117;color:#fff;font-size:13px;font-family:var(--font);outline:none;transition:border-color .15s}
.ax-token-input:focus{border-color:rgba(62,139,255,0.4)}
.ax-token-input::placeholder{color:rgba(255,255,255,0.25)}
.ax-token-dropdown{position:absolute;top:100%;left:0;right:0;max-height:230px;overflow-y:auto;background:#10151E;border:1px solid rgba(62,139,255,0.2);border-radius:10px;margin-top:4px;z-index:50;box-shadow:0 8px 24px rgba(0,0,0,0.5)}
.ax-token-dropdown .ax-dd-item{display:flex;align-items:center;justify-content:space-between;padding:9px 12px;cursor:pointer;transition:background .12s;border-bottom:1px solid rgba(255,255,255,0.03)}
.ax-token-dropdown .ax-dd-item:hover{background:rgba(62,139,255,0.1)}
.ax-dd-left{display:flex;align-items:center;gap:10px;min-width:0}
.ax-dd-left b{font-size:13px;color:#fff;white-space:nowrap}
.ax-dd-left span{font-size:11px;color:#8A93A6}
.ax-dd-right{display:flex;align-items:center;gap:8px;font-size:11px;color:#8A93A6;white-space:nowrap}
.ax-dd-right .prio{color:#2EBD85;font-weight:700}
.ax-popular-row{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.ax-popular-row .ax-pop-btn{display:flex;align-items:center;gap:5px;padding:5px 10px;border-radius:20px;background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.08);color:#8A93A6;font-size:11px;font-weight:600;cursor:pointer;font-family:var(--font);transition:all .15s}
.ax-popular-row .ax-pop-btn:hover{background:rgba(62,139,255,0.12);border-color:rgba(62,139,255,0.3);color:#5CA0FF}
.ax-side-tab{transition:all .15s}
.ax-side-tab.active{background:#1A2332 !important}
.ax-amt-input{flex:1;min-width:0;background:none;border:none;color:#fff;font-size:16px;font-weight:700;font-family:var(--font);outline:none}
.ax-amt-input::placeholder{color:rgba(255,255,255,0.2)}
.ax-quick-btns{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:8px}
.ax-quick-btns .ax-qk{flex:1;padding:7px 0;border-radius:8px;background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.07);color:#8A93A6;font-size:12px;font-weight:700;cursor:pointer;font-family:var(--font);transition:all .15s}
.ax-quick-btns .ax-qk:hover{background:rgba(62,139,255,0.12);border-color:rgba(62,139,255,0.3);color:#5CA0FF}
.ax-cfg-group{display:flex;align-items:center;gap:4px}
.ax-cfg-label{font-size:10px;color:#8A93A6;font-weight:700;text-transform:uppercase;letter-spacing:.4px;margin-right:2px}
.ax-cfg-btn{padding:5px 9px;border-radius:6px;border:1px solid rgba(255,255,255,0.07);background:rgba(255,255,255,0.03);color:#8A93A6;font-size:10px;font-weight:700;cursor:pointer;font-family:var(--font);transition:all .15s;white-space:nowrap}
.ax-cfg-btn:hover{color:#fff;border-color:rgba(255,255,255,0.18)}
.ax-cfg-btn.active{background:rgba(62,139,255,0.14);border-color:rgba(62,139,255,0.45);color:#5CA0FF}
.ax-cfg-btn[data-axmev="off"].active{background:rgba(255,77,106,.14);border-color:rgba(255,77,106,.4);color:#FF4D6A}
.ax-exec-btn{width:100%;padding:14px 0;border:none;border-radius:12px;background:#2EBD85;color:#0A0E14;font-size:14px;font-weight:800;cursor:pointer;font-family:var(--font);transition:all .15s}
.ax-exec-btn:hover{filter:brightness(1.1)}
.ax-exec-btn.sell{background:#FF4D6A;color:#fff}
.ax-exec-btn:disabled{opacity:.5;cursor:not-allowed}

/* ===== WITHDRAW QUICK BUTTONS ===== */
.wd-quick-btn{flex:1;padding:8px;border-radius:6px;background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.08);color:rgba(255,255,255,0.5);font-size:11px;font-weight:600;cursor:pointer;font-family:var(--font);transition:all .15s}
.wd-quick-btn:hover{background:rgba(62, 139, 255,0.08);border-color:rgba(62, 139, 255,0.2);color:#3E8BFF}
.wd-chain-tabs{display:flex;gap:6px;margin-bottom:12px}
.wd-chain-tab{flex:1;padding:9px 0;border:1px solid rgba(255,255,255,0.08);border-radius:8px;background:rgba(255,255,255,0.03);color:rgba(255,255,255,0.45);font-size:13px;font-weight:700;cursor:pointer;font-family:var(--font);transition:all .15s}
.wd-chain-tab:hover{color:#fff;border-color:rgba(255,255,255,0.2)}
.wd-chain-tab.active{background:rgba(62,139,255,0.12);border-color:rgba(62,139,255,0.5);color:#3E8BFF}
.wd-bals{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}
.wd-bal-row{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:10px;background:rgba(255,255,255,0.02);border:1px solid rgba(255,255,255,0.05);cursor:pointer;transition:all .15s}
.wd-bal-row:hover{border-color:rgba(255,255,255,0.15)}
.wd-bal-row.active{border-color:rgba(62,139,255,0.5);background:rgba(62,139,255,0.07)}
.wd-warn{margin-top:12px;padding:10px;background:rgba(255,193,7,0.06);border:1px solid rgba(255,193,7,0.15);border-radius:8px;font-size:11px;color:rgba(255,255,255,0.5)}

/* ===== TOKEN ICON IMAGES (Axiom-style) ===== */
.pair-item-icon img,
.perps-pair-icon img,
.holding-icon img,
.sniper-alert-icon img {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pair-item:hover .pair-item-icon img,
.pair-item:hover img,
.holding-row:hover .holding-icon img,
.holding-row:hover img {
    transform: scale(1.08);
    box-shadow: 0 0 12px rgba(62, 139, 255, 0.15);
}
.token-row:hover .token-icon-img,
.token-row:hover img {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(62, 139, 255, 0.12);
}
img[src*="token.jup.ag"] {
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
}


/* =====================================================================
   MOBILE-FIRST POLISH v2 — final responsive layer (applies below 768px)
   Fixes congestion, squeeze and overlap reported on phones.
   Desktop untouched: every rule here lives inside max-width media queries.
   ===================================================================== */

/* ---- 0. Root overflow guards (no horizontal bleed anywhere) ---- */
@media (max-width: 768px) {
    html, body { overflow-x: hidden; max-width: 100vw; }
    .dash-layout, .dash-main, .page-section { max-width: 100vw; }
    .dash-main img, .page-section img { max-width: 100%; }
    /* any fixed-width modal or panel can never exceed the viewport */
    .tp-modal, .modal-panel, .wallet-overlay-card, .pair-dropdown,
    .notif-modal, .ai-chat-panel {
        width: auto !important;
        max-width: calc(100vw - 24px) !important;
    }

    /* ---- 1. Typography scale-down ---- */
    .section-title { font-size: 20px !important; }
    .rewards-header h2, .traderscan-header h2,
    .tweetmonitor-header h2, .trackers-header h2 { font-size: 20px !important; }
    .points-value { font-size: 24px; }
    .portfolio-total .pt-value { font-size: 26px !important; }

    /* ---- 2. Topbar decongestion ---- */
    .topbar-center { flex: 1; min-width: 0; }
    .topbar-search { min-width: 0; }
    .topbar-search input { width: 100%; }

    /* ---- 3. Pulse item: wrap into two tidy rows instead of one squeezed row ---- */
    .pulse-item { flex-wrap: wrap; row-gap: 8px; padding: 10px 12px; margin: 0 4px 5px; }
    .pulse-item-left { flex: 1 1 auto; min-width: 0; }
    .pulse-item-left > div:last-child { min-width: 0; }
    .pulse-token-name, .pulse-token-sym {
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        max-width: 110px;
    }
    .pulse-item-mid { flex: 0 0 auto; justify-content: flex-end; gap: 8px; font-size: 11px; }
    .pulse-item-right { flex: 1 1 100%; justify-content: space-between; gap: 6px;
                        border-top: 1px solid rgba(255,255,255,0.05); padding-top: 6px; }
    .pulse-qb-btn { flex: 1; justify-content: center; min-height: 36px; }

    /* ---- 4. Rewards tier grid: 5 columns -> stacked pairs ---- */
    .tier-row {
        display: grid !important;
        grid-template-columns: 32px 1fr auto !important;
        grid-template-areas:
            "icon label mult"
            "icon cash fee";
        row-gap: 2px;
    }
    .tier-row .tier-icon { grid-area: icon; }
    .tier-row .tier-label { grid-area: label; }
    .tier-row .tier-mult { grid-area: mult; }
    .tier-row .tier-cashback { grid-area: cash; font-size: 11px; }
    .tier-row .tier-fee { grid-area: fee; font-size: 11px; }

    /* ---- 5. Limit-order rows: let them wrap instead of overflowing ---- */
    .limit-order-row {
        grid-template-columns: 1fr auto;
        grid-auto-flow: row;
        row-gap: 6px;
    }
    .limit-order-row > div:first-child { grid-column: 1 / -1; }
    .lo-price { font-size: 12px; }
    .limit-order-cancel { min-height: 40px; padding: 8px 16px; grid-column: 1 / -1; }

    /* ---- 6. History rows (portfolio on-chain tab) wrap safely ---- */
    .history-item { flex-wrap: wrap; row-gap: 6px; }
    .history-amounts { margin-left: auto; text-align: right; }
    .history-val { word-break: break-all; }

    /* ---- 7. Positions table: keep card layout at <=480 too
            (later min-width:400px rule was re-squeezing it) ---- */
    .positions-table { min-width: 0 !important; }
    .positions-table-wrap { overflow-x: visible !important; }

    /* ---- 8. Wide tables scroll horizontally inside their wrappers ---- */
    .discover-table-wrap, .positions-table-wrap, .limits-orders-section,
    .traderscan-results, .tweetmonitor-body {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* ---- 9. Inputs >=16px to stop iOS focus zoom on key fields ---- */
    .ts-search input, .swap-input, .limits-input, .sniper-input,
    .topbar-search input { font-size: 16px; }

    /* ---- 10. Bottom nav clears iPhone home indicator ---- */
    .mobile-bottom-nav {
        height: calc(56px + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .dash-layout[style*="bottom-nav"], body.has-bottom-nav .dash-main {
        padding-bottom: 0;
    }

    /* ---- 11. Very small phones (<380px): reclaim space ---- */
    @media (max-width: 380px) {
        .topbar-search { min-width: 0; }
        .topbar-center { margin: 0; }
        .page-section.active { padding: 12px; }
        .pulse-item-mid { font-size: 10px; }
        .token-name { max-width: 80px; font-size: 12px; }
        .trade-sheet-body { padding: 10px 14px 16px; }
        .ts-field { padding: 12px; }
        .perps-order-form { padding: 16px; }
        .code-digit { width: 38px; height: 46px; font-size: 18px; }
        .code-inputs { gap: 6px; }
        .portfolio-stats-grid { grid-template-columns: 1fr !important; }
    }

    /* ---- 12. Landscape phones: keep drawer usable ---- */
    @media (max-height: 480px) and (orientation: landscape) {
        .dash-sidebar { top: 0; bottom: 0; overflow-y: auto; }
        .mobile-bottom-nav { display: none; }
    }
}

/* ===== MOBILE BOTTOM TAB BAR ===== */
.mtabbar{display:none}
@media(max-width:768px){
  .mtabbar{position:fixed;left:0;right:0;bottom:0;z-index:1200;display:flex;background:rgba(13,15,20,.97);backdrop-filter:blur(14px);border-top:1px solid #252B3A;padding:6px 4px calc(6px + env(safe-area-inset-bottom))}
  .mtab{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;background:none;border:none;color:#667085;font-family:inherit;font-size:10px;font-weight:600;padding:5px 2px;cursor:pointer;border-radius:9px}
  .mtab svg{width:20px;height:20px}
  .mtab.active{color:#3E8BFF}
  .mtab.active svg{filter:drop-shadow(0 0 6px rgba(62,139,255,.5))}
  .dash-main{padding-bottom:calc(74px + env(safe-area-inset-bottom))!important}
  /* trade panel: axiom-style button arrangement */
  .ts-side-tabs{display:flex;gap:6px;margin-bottom:12px}
  .ts-side-tabs button,.ts-side-tab{padding:12px 0;font-size:14px;font-weight:800;border-radius:9px}
  .ts-swap-btn{height:50px!important;font-size:15px!important;font-weight:800!important;border-radius:10px}
  .ts-quick{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
  .ts-quick>*{text-align:center;padding:9px 4px;font-size:12px;font-weight:700;border-radius:7px}
  .discover-trade-panel.mobile-visible{padding-bottom:calc(80px + env(safe-area-inset-bottom))}
}

/* ===== PULSE LAYOUT FIX: columns fill viewport ===== */
.page-section#page-pulse.active{display:flex;flex-direction:column;height:calc(100vh - 66px);min-height:600px}
.page-section#page-pulse.active .pulse-layout{flex:1;min-height:0;display:flex;flex-direction:column}
.page-section#page-pulse.active .pulse-columns{flex:1;min-height:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding:16px 24px 22px;align-items:stretch}
.page-section#page-pulse.active .pulse-feed{flex:1;min-height:0;overflow-y:auto}
@media(max-width:768px){
  .page-section#page-pulse.active{height:auto;min-height:0}
  .page-section#page-pulse.active .pulse-columns{display:flex;flex-direction:column;gap:14px;padding:14px 16px}
  .page-section#page-pulse.active .pulse-feed{max-height:400px}
}

/* ===== TRADE PANEL: axiom-style buttons (all viewports) ===== */
.ts-swap-panel .ts-side-tab{padding:12px 0;font-size:14px;font-weight:800;border-radius:9px;text-align:center}
.ts-swap-panel .ts-swap-btn{height:50px;font-size:15px;font-weight:800;border-radius:10px;margin-top:4px}
.ts-swap-panel .ts-quick{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-top:10px}
.ts-swap-panel .ts-quick>*{text-align:center;padding:9px 4px;font-size:12px;font-weight:700;border-radius:7px}

/* ===== AI FAB + CHAT PANEL ON MOBILE ===== */
.ai-fab,.ai-fab *{-webkit-user-select:none;user-select:none}
.ai-fab{touch-action:none}
@media(max-width:768px){
  .ai-fab{bottom:calc(88px + env(safe-area-inset-bottom))!important;top:auto!important;left:auto!important;right:14px!important;width:52px!important;height:52px!important;z-index:1250!important}
  .ai-fab .ai-fab-badge{font-size:10px}
  .ai-chat-panel.open{display:flex!important;flex-direction:column;position:fixed!important;left:10px!important;right:10px!important;top:auto!important;bottom:calc(86px + env(safe-area-inset-bottom))!important;width:auto!important;max-width:none!important;height:62vh!important;z-index:1300!important}
  .ai-chat-messages{flex:1;overflow-y:auto}
}

/* ===== PULSE TABS / SINGLE FULL-WIDTH FEED ===== */
.pulse-tabs{display:flex;gap:8px;padding:14px 24px 0;flex-wrap:wrap}
.ptab{padding:9px 18px;border-radius:9px;border:1px solid #252B3A;background:#10131A;color:#98A2B3;font-weight:700;font-size:12.5px;cursor:pointer;font-family:inherit;transition:.2s}
.ptab:hover{border-color:rgba(62,139,255,.4)}
.ptab.active{background:rgba(62,139,255,.14);border-color:rgba(62,139,255,.5);color:#3E8BFF}
.page-section#page-pulse.active .pulse-columns.single{display:block!important;padding:14px 24px 22px;height:auto}
.page-section#page-pulse.active .pulse-columns.single .pulse-column{display:none!important;height:calc(100vh - 230px);min-height:420px;width:100%!important}
.page-section#page-pulse.active .pulse-columns.single .pulse-column.pf-on{display:flex!important}
@media(max-width:768px){
  .pulse-tabs{padding:10px 14px 0}
  .page-section#page-pulse.active .pulse-columns.single .pulse-column{height:auto;min-height:0;max-height:62vh}
}

/* ==================== AXIOM THEME (logged-in reskin) ==================== */
body.dash-page {
    --font: 'IBM Plex Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --bg-primary: #0B0C0E;
    --bg-secondary: #0F1013;
    --bg-card: #141519;
    --bg-card-hover: #191B20;
    --border-color: #23262C;
    --border-subtle: #1B1D22;
    --card-bg: #141519;
    --surface-1: #0F1013;
    --surface-2: #141519;
    --surface-3: #23262C;
    --border: #23262C;
}

/* Chrome */
body.dash-page .dash-topbar { background: #0E0F12; border-bottom: 1px solid var(--border-subtle); }
body.dash-page .topbar-search { background: #131519; border-color: #22252B; border-radius: 8px; }

/* ---- Desktop topbar: keep right controls visible, let nav scroll ---- */
@media(min-width:769px){
    body.dash-page .dash-topbar { gap: 12px; padding: 0 14px; }
    body.dash-page .topbar-left { flex: 1 1 auto; min-width: 0; gap: 12px; }
    body.dash-page .topbar-center { flex: 0 0 auto; max-width: 300px; margin: 0 auto; padding: 0 8px; }
    body.dash-page .topbar-right { flex-shrink: 0; gap: 8px; }
    body.dash-page .topbar-right .deposit-btn { flex-shrink: 0; }
    body.dash-page .topbar-right .withdraw-btn { flex-shrink: 0; }
    body.dash-page .topbar-right .topbar-sol-balance { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
    body.dash-page .topbar-center .topbar-search { max-width: none; }
}
body.dash-page .dash-sidebar { background: #0B0C0E; border-right: 1px solid var(--border-subtle); }
body.dash-page .sidebar-link { color: rgba(255,255,255,.45); font-weight: 500; border-radius: 8px; }
body.dash-page .sidebar-link:hover { color: #fff; background: rgba(255,255,255,.04); }
body.dash-page .sidebar-link.active { color: #fff; background: rgba(62,139,255,.14); }

/* Trade panel buttons */
body.dash-page .ts-swap-panel { gap: 10px; }
body.dash-page .ts-side-tabs { background: #131519; padding: 4px; gap: 4px; border-radius: 9px; }
body.dash-page .ts-side-tab { border-radius: 6px; font-size: 13px; letter-spacing: .02em; }
body.dash-page .ts-side-tab.active { background: #2EBD85; color: #05261A; }
body.dash-page .ts-side-tab[data-side="sell"].active { background: #FF4D6A; color: #fff; }
body.dash-page .ts-qb-btn {
    background: #17191E;
    border: 1px solid #262931;
    color: #D7DBE2;
    border-radius: 7px;
    font-weight: 700;
    padding: 7px;
}
body.dash-page .ts-qb-btn:hover { border-color: rgba(62,139,255,.55); color: #fff; background: #181C26; }
body.dash-page .ts-set-btns button.active { background: rgba(62,139,255,.14); border-color: rgba(62,139,255,.35); color: #5CA0FF; }
body.dash-page .ts-swap-btn { height: 48px; font-size: 15px; font-weight: 800; letter-spacing: .01em; border-radius: 9px; }

/* Collapsible settings */
.ts-settings-toggle {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    border: 1px solid #20232A;
    border-radius: 8px;
    background: #111318;
    color: rgba(255,255,255,.45);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: border-color .15s, color .15s;
}
.ts-settings-toggle:hover { color: #fff; border-color: #2A2E37; }
.ts-settings-toggle svg:last-child { margin-left: auto; transition: transform .15s; }
body.dash-page .ts-settings-box { display: none; }
body.dash-page .ts-settings-box.open { display: flex; }

/* ==================== TRADING PRESETS (Axiom-style) ==================== */
.ts-preset-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0 6px;
}
.ts-preset-pills { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; padding: 2px; }
.ts-preset-pills::-webkit-scrollbar { display: none; }
.ts-preset-pill {
    flex-shrink: 0;
    padding: 6px 10px;
    border: 1px solid #23262D;
    border-radius: 8px;
    background: #14161D;
    color: #8A93A6;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
.ts-preset-pill:hover { color: #fff; border-color: #2E3542; }
.ts-preset-pill.active { background: rgba(62,139,255,.14); border-color: rgba(62,139,255,.45); color: #5CA0FF; }
.ts-preset-gear {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #23262D;
    border-radius: 8px;
    background: #14161D;
    color: #8A93A6;
    cursor: pointer;
    transition: all .15s;
}
.ts-preset-gear:hover, .ts-preset-gear.open { color: #5CA0FF; border-color: rgba(62,139,255,.45); }
.ts-preset-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 6px 10px;
    margin-bottom: 8px;
    background: rgba(62,139,255,0.06);
    border: 1px solid rgba(62,139,255,0.16);
    border-radius: 8px;
    color: #98A2B3;
    font-size: 10.5px;
    line-height: 1.5;
}
.ts-preset-summary b { color: #fff; font-weight: 700; }
.ts-preset-summary .ts-psum-side { color: #5CA0FF; font-weight: 800; }
.ts-preset-panel { display: none; }
.ts-preset-panel.open {
    position: absolute;
    inset: 4px;
    z-index: 30;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: #151820;
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0,0,0,0.5);
}
.ts-preset-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border: 1px solid #20232A;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    background: #111318;
}
.ts-preset-title { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: rgba(255,255,255,.75); text-transform: uppercase; }
.ts-preset-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1B1E24;
    border: 1px solid #262931;
    border-radius: 6px;
    color: #98A2B3;
    cursor: pointer;
    font-size: 11px;
}
.ts-preset-close:hover { color: #fff; }
.ts-preset-side-tabs {
    display: flex;
    gap: 4px;
    padding: 6px;
    border: 1px solid #20232A;
    border-bottom: none;
    background: #111318;
}
.ts-preset-side-tab {
    flex: 1;
    padding: 8px 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #8A93A6;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
}
.ts-preset-side-tab.active { background: #2EBD85; color: #05261A; }
.ts-preset-side-tab[data-side="sell"].active { background: #FF4D6A; color: #fff; }
.ts-preset-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 10px;
    border: 1px solid #20232A;
    border-bottom: none;
    background: #111318;
    max-height: 44vh;
    overflow-y: auto;
}
.ts-preset-fields::-webkit-scrollbar { width: 4px; }
.ts-preset-fields::-webkit-scrollbar-thumb { background: #2E3542; border-radius: 2px; }
.ts-p-input {
    width: 100%;
    margin-top: 6px;
    padding: 7px 9px;
    background: #161A23;
    border: 1px solid #252B3A;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-family: inherit;
    outline: none;
}
.ts-p-input:focus { border-color: rgba(62,139,255,.5); }
.ts-p-input-sm { width: 84px; }
.ts-p-opt-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-p-opt-btns button {
    padding: 6px 12px;
    border: 1px solid #252B3A;
    border-radius: 6px;
    background: #161A23;
    color: #8A93A6;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
}
.ts-p-opt-btns button:hover { color: #fff; border-color: #2E3542; }
.ts-p-opt-btns button.active { background: rgba(62,139,255,.14); border-color: rgba(62,139,255,.35); color: #5CA0FF; }
.ts-p-toggle { display: flex; gap: 4px; margin-top: 6px; }
.ts-p-toggle button {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid #252B3A;
    border-radius: 6px;
    background: #161A23;
    color: #8A93A6;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
}
.ts-p-toggle button.active[data-v="1"] { background: rgba(46,189,133,.16); border-color: rgba(46,189,133,.45); color: #2EBD85; }
.ts-p-toggle button.active[data-v="0"] { background: rgba(255,77,106,.14); border-color: rgba(255,77,106,.4); color: #FF4D6A; }
.ts-smart-row {
    border: 1px solid rgba(46,189,133,.25);
    border-radius: 8px;
    background: rgba(46,189,133,.06);
    padding: 8px 10px;
}
.ts-smart-row .ts-set-label { display: block; margin-bottom: 6px; color: #2EBD85; font-weight: 800; }
.ts-smart-body {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto auto;
    align-items: center;
    gap: 8px;
}
.ts-smart-item { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ts-smart-lbl { font-size: 10px; color: #8A93A6; text-transform: uppercase; letter-spacing: .04em; }
.ts-smart-val { font-size: 13px; font-weight: 800; color: #fff; white-space: nowrap; }
.ts-smart-apply {
    padding: 7px 14px;
    border: none;
    border-radius: 6px;
    background: #2EBD85;
    color: #05261A;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
    white-space: nowrap;
}
.ts-smart-apply:hover { background: #3ad397; }
.ts-smart-apply:disabled { background: #26303a; color: #6B7280; cursor: not-allowed; }
.ts-smart-refresh {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(46,189,133,.3);
    border-radius: 6px;
    background: transparent;
    color: #2EBD85;
    font-size: 15px;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
}
.ts-smart-refresh:hover { background: rgba(46,189,133,.12); }
@media (max-width:480px){
    .ts-smart-body { grid-template-columns: 1fr 1fr auto auto; }
}
.ts-preset-save { border: 1px solid #20232A; border-radius: 0 0 8px 8px; background: #111318; padding: 8px; }
.ts-preset-save-btn {
    width: 100%;
    padding: 10px 0;
    border: none;
    border-radius: 8px;
    background: #3E8BFF;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all .15s;
}
.ts-preset-save-btn:hover { background: #2F6FD6; }
.ts-preset-save-btn.saved { background: #2EBD85 !important; }
@media(max-width:480px){
    body.dash-page .ts-preset-bar { margin-top: 8px; }
    body.dash-page .ts-preset-pill { padding: 8px 12px; font-size: 12px; }
    body.dash-page .ts-preset-fields { max-height: none; }
}

/* ==================== PULSE FULL-WIDTH FIX ==================== */
body.dash-page .dash-main { width: 100%; }
.page-section#page-pulse.active .pulse-layout,
.page-section#page-pulse.active .pulse-columns { width: 100%; max-width: none; }
@media(min-width:769px){
    .page-section#page-pulse.active .pulse-columns.single .pulse-column.pf-on { width: 100% !important; max-width: none !important; flex: 1 1 auto; }
}

/* ==================== MOBILE POLISH (logged-in) ==================== */
@media(max-width:480px){
    body.dash-page .topbar-search { min-width: 120px; }
    body.dash-page .deposit-btn { padding: 6px 10px; font-size: 12px; }
    body.dash-page .wallet-addr { max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    body.dash-page .discover-table th, body.dash-page .discover-table td { padding-left: 10px; padding-right: 10px; }
    body.dash-page .ts-side-tab.active[data-side="sell"] { color: #fff; }
}

/* ==================== THEME ENGINE ==================== */
#themeFab {
    position: fixed;
    left: 14px;
    bottom: 14px;
    z-index: 9990;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #262A31;
    background: #15171B;
    color: #98A2B3;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}
#themeFab:hover { color: #fff; border-color: #3E8BFF; }
#themePop {
    display: none;
    position: fixed;
    left: 14px;
    bottom: 58px;
    z-index: 9990;
    background: #15171B;
    border: 1px solid #262A31;
    border-radius: 10px;
    padding: 6px;
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
#themePop.open { display: block; }
.tp-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 12.5px;
    color: #C9CFDA;
    cursor: pointer;
}
.tp-item:hover { background: rgba(255,255,255,.06); }
.tp-item.sel { color: #fff; background: rgba(62,139,255,.1); }
.tp-item i { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.tp-item b { width: 12px; height: 12px; border-radius: 4px; border: 1px solid rgba(255,255,255,.15); flex-shrink: 0; }
@media(max-width:768px){
    #themeFab { bottom: calc(86px + env(safe-area-inset-bottom)); left: 12px; }
    #themePop { bottom: calc(130px + env(safe-area-inset-bottom)); }
}

/* ==================== AXIOM COMPACT TRADE PANEL ==================== */
body.dash-page .ts-swap-panel { gap: 8px; }
/* drop the clutter Axiom doesn't have */
body.dash-page .ts-swap-panel .ts-popular { display: none; }
body.dash-page .ts-swap-panel .ts-arrow-wrap { display: none; }
/* Buy/Sell pill tabs, larger like Axiom */
body.dash-page .ts-side-tabs { padding: 4px; gap: 4px; border-radius: 10px; }
body.dash-page .ts-side-tab { padding: 11px 0; font-size: 14px; font-weight: 800; border-radius: 7px; }
/* receive side becomes a flat summary line, not a second input box */
body.dash-page .ts-rec-field {
    background: transparent;
    border: none;
    border-top: 1px dashed rgba(255,255,255,.08);
    border-radius: 0;
    padding: 8px 2px 2px;
}
body.dash-page .ts-rec-field .ts-amt-input {
    background: transparent;
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    text-align: right;
}
body.dash-page .ts-rec-field .ts-pill-empty {
    border: none;
    background: rgba(62,139,255,.1);
    color: #5CA0FF;
    font-weight: 700;
}
body.dash-page .ts-rec-field .ts-field-sub { display: none; }

/* ==================== AXIOM TOP NAV + DISCOVER DRAWER ==================== */
.axiom-topnav {
    display: none;
    align-items: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.axiom-topnav::-webkit-scrollbar { display: none; }
.axiom-topnav .sidebar-link {
    flex-direction: row;
    padding: 6px 10px;
    margin: 0;
    font-size: 12px;
    color: #98A2B3;
    white-space: nowrap;
    flex-shrink: 0;
}
.axiom-topnav .sidebar-link span {
    display: inline !important;
    position: static;
    transform: none;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    font-size: 12px;
}
.axiom-topnav .sidebar-link:hover { color: #fff; background: rgba(255,255,255,.05); }
.axiom-topnav .sidebar-link.active { color: #fff; background: rgba(62,139,255,.16); }

/* Token trading drawer scrim — hidden unless desktop drawer is open */
.drawer-scrim { display: none !important; }

@media(min-width:769px){
    body.dash-page .dash-sidebar { display: none !important; }
    body.dash-page #sidebarToggle { display: none !important; }
    body.dash-page .axiom-topnav { display: flex; }

    /* discover becomes full-width; chart+trade panel is inline right column on the landing page (no drawer pop-up) */
    body.dash-page .discover-trade-panel {
        position: relative;
        right: auto;
        top: auto;
        width: auto;
        max-width: none;
        height: auto;
        max-height: calc(100vh - 66px);
        overflow-y: auto;
        min-height: 0;
        z-index: auto;
        box-shadow: none;
        border-radius: 10px;
    }
    body.dash-page .discover-trade-panel .ax-drawer-close { display: none; }

    /* preset pills hidden on the landing inline panel; shown only when trading (drawer open) */
    body.dash-page:not(.ax-drawer-open) .discover-trade-panel .ts-preset-bar,
    body.dash-page:not(.ax-drawer-open) .discover-trade-panel .ts-preset-summary { display: none; }

    /* ---- Axiom-style token trading drawer (slides in on token click) ---- */
    body.dash-page.ax-drawer-open .drawer-scrim {
        display: block !important;
        position: fixed;
        inset: 0;
        background: rgba(5,6,9,0.6);
        z-index: 1199;
        cursor: pointer;
    }
    body.dash-page.ax-drawer-open .discover-layout { grid-template-columns: 1fr; }
    body.dash-page.ax-drawer-open .discover-trade-panel {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(460px, 94vw);
        max-height: none;
        height: 100vh;
        border-radius: 0;
        border: none;
        border-left: 1px solid #23262C;
        z-index: 1200;
        background: #0E0F13;
        box-shadow: -24px 0 70px rgba(0,0,0,.55);
        overflow-y: auto;
        animation: drawerSlideIn .22s ease;
    }
    body.dash-page.ax-drawer-open .discover-trade-panel .ax-drawer-close { display: flex; }
}
@keyframes drawerSlideIn { from { transform: translateX(60px); opacity: .4; } to { transform: translateX(0); opacity: 1; } }

/* denser axiom-style table */
body.dash-page .discover-table th { padding: 10px 14px; }
body.dash-page .discover-table td { padding: 11px 14px; }

/* ==================== TUNING: sort, favorites, flashes, toasts ==================== */
.th-sort { cursor: pointer; user-select: none; }
.th-sort:hover { color: rgba(255,255,255,.7); }
.sort-ind { margin-left: 4px; font-size: 8px; opacity: 0; }
.th-sort.asc .sort-ind { opacity: .9; color: #5CA0FF; }
.th-sort.desc .sort-ind { opacity: .9; color: #5CA0FF; }
.th-sort.asc .sort-ind::after { content: '\25B2'; }
.th-sort.desc .sort-ind::after { content: '\25BC'; }

.token-price-main { transition: color .35s ease; }
.token-price-main.f-up { color: #2EBD85 !important; }
.token-price-main.f-dn { color: #FF4D6A !important; }

.fav-star {
    background: none;
    border: none;
    color: rgba(255,255,255,.18);
    font-size: 13px;
    cursor: pointer;
    padding: 2px 5px;
    transition: color .15s, transform .15s;
}
.fav-star:hover { color: #FFC22C; transform: scale(1.2); }
.fav-star.on { color: #FFC22C; }

#tableSearch:focus { border-color: rgba(62,139,255,.45) !important; }

/* ==================== SPARKS / PRESSURE / DRAWER EXTRAS ==================== */
body.dash-page #discoverChartCanvas { height: 40vh !important; }
.ax-spark svg { display: block; margin: 0 auto; }
.ax-bs { min-width: 84px; max-width: 110px; }
.bs-bar { position: relative; height: 7px; border-radius: 4px; background: rgba(255,77,106,.25); overflow: hidden; }
.bs-fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(46,189,133,.85); border-radius: 4px 0 0 4px; }
.bs-lbl { font-size: 9px; color: #667085; margin-top: 2px; display: flex; justify-content: space-between; }
#drawerStats b { font-weight: 700; letter-spacing: 0; }
.sec-chip {
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 600;
    border: 1px solid #262931;
    background: #14171C;
    color: #C9CFDA;
}
.sec-good { border-color: rgba(46,189,133,.45); color: #2EBD85; }
.sec-warn { border-color: rgba(255,184,0,.5); color: #FFB800; }
details summary:hover { color: #fff; }

/* ==================== TRADING TERMINAL (page-swap) ==================== */
#page-trade .terminal-layout {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(340px,420px);
    gap: 16px;
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 16px;
    align-items: start;
    flex: 1 0 auto;
    min-height: auto;
}
.terminal-chart {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
    position: relative;
}
.tc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.15);
    flex-shrink: 0;
}
.tc-token { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tc-token-id { min-width: 0; }
.tc-token-line { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tc-symbol { font-size: 17px; font-weight: 800; color: #fff; }
.tc-price { font-size: 15px; font-weight: 700; color: #E8EBF2; font-variant-numeric: tabular-nums; }
.tc-change { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tc-change.up { color: #2EBD85; }
.tc-change.dn { color: #FF4D6A; }
.tc-sub { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.tc-actions { display: flex; gap: 6px; flex-shrink: 0; }
.tc-fav, .tc-ext {
    width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03); color: rgba(255,255,255,0.5); font-size: 15px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: color .15s, background .15s;
}
.tc-fav:hover, .tc-ext:hover { color: #fff; background: rgba(255,255,255,0.07); }
.tc-fav.on { color: #FFC22C; }
.tc-toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 8px 16px; border-bottom: 1px solid rgba(255,255,255,0.05); flex-shrink: 0;
}
.tc-tf-btns { display: flex; gap: 4px; }
.tc-tf-btn {
    padding: 5px 10px; border-radius: 6px; border: none; background: transparent;
    color: rgba(255,255,255,0.45); font-size: 11.5px; font-weight: 600; cursor: pointer; font-family: var(--font);
    transition: color .15s, background .15s;
}
.tc-tf-btn:hover { color: #fff; background: rgba(255,255,255,0.05); }
.tc-tf-btn.active { color: #5CA0FF; background: rgba(62,139,255,0.14); }
.tc-pair { font-size: 11px; color: rgba(255,255,255,0.35); }
.tc-canvas-wrap { position: relative; flex: 1; min-height: 340px; height: min(58vh, 560px); }
.trade-chart-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tc-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 10px 16px;
    gap: 8px;
    flex-shrink: 0;
}
.tc-stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tc-stat-lbl { font-size: 10px; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: .4px; }
.tc-stat-val { font-size: 12.5px; color: #D5DAE6; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tc-stat-val.up { color: #2EBD85; }
.tc-stat-val.dn { color: #FF4D6A; }
#page-trade .swap-card { max-width: none; display: flex; flex-direction: column; overflow: visible; }
#page-trade .ax-exec-btn { position: -webkit-sticky; position: sticky; bottom: 16px; z-index: 20; box-shadow: 0 6px 24px rgba(0,0,0,.35); }

/* PC: primary nav takes its own full-width row so every link stays visible */
@media (min-width: 769px) {
    body.dash-page .dash-topbar { flex-wrap: wrap; height: auto; min-height: 52px; row-gap: 8px; padding-top: 8px; }
    body.dash-page .dash-topbar .topbar-left { flex: 0 0 auto; }
    body.dash-page #axiomTopNav {
        flex: 1 1 100%;
        order: 20;
        justify-content: flex-start;
        gap: 3px;
        padding: 2px 6px;
        width: 100%;
        scrollbar-width: thin;
        scrollbar-color: rgba(255,255,255,0.2) transparent;
    }
    body.dash-page #axiomTopNav::-webkit-scrollbar { display: block; height: 4px; }
    body.dash-page #axiomTopNav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }
    body.dash-page #axiomTopNav .sidebar-link { padding: 5px 10px; font-size: 12px; }
}

@media (max-width: 1120px) {
    #page-trade .terminal-layout { display: flex; flex-direction: column; flex: 1 0 auto; grid-template-columns: none; align-items: stretch; }
    #page-trade .terminal-layout > * { flex-shrink: 0; }
    #page-trade .terminal-layout .swap-card { order: -1; }
    #page-trade .terminal-layout .spot-positions { order: 1; }
    #page-trade .terminal-layout .terminal-chart { order: 2; }
    .tc-stats { grid-template-columns: repeat(3, 1fr); }
    .tc-canvas-wrap { height: 46vh; min-height: 280px; }
}

#page-trade.active { padding: 0; gap: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; height: 100%; }

/* ---- Axiom-style preset chips (emoji + name) ---- */
.ts-preset-pill { display: inline-flex; align-items: center; gap: 5px; }
.ts-chip-emoji { font-size: 13px; line-height: 1; }
.ts-chip-name { white-space: nowrap; text-transform: none; }
body.dash-page .ts-preset-pill { padding: 8px 11px; }

/* ---- Preset config: emoji + name ---- */
.ts-emoji-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-emoji-pick {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid #23262D; border-radius: 8px;
    background: #14161D; cursor: pointer; font-size: 16px;
    transition: all .15s;
}
.ts-emoji-pick:hover { border-color: #2E3542; }
.ts-emoji-pick.active { background: rgba(62,139,255,0.14); border-color: rgba(62,139,255,0.45); }

/* ---- X Monitor page: allow full vertical scroll ---- */
#page-tweetmonitor.active { overflow-y: auto; }

/* ==================== SWAP PAGE (standalone) ==================== */
#page-swap.active { padding: 0; gap: 0; overflow-y: auto; }
.swap-page-layout {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 20px;
    overflow: visible;
}
.swap-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 4px 14px;
}
.swap-page-title { display: flex; align-items: center; gap: 10px; }
.swap-page-title h2 { font-size: 18px; font-weight: 800; margin: 0; }
.swap-page-sub { font-size: 12px; color: rgba(255,255,255,0.35); }
.swap-page-card {
    max-width: none;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    background: #151820;
}
.swap-page-card .ts-field { padding: 12px; }
.swap-page-card .ts-search-wrap { margin-top: 2px; }
.swap-page-swap-btn { width: 100%; }
.ts-rec-name { font-size: 11px; color: rgba(255,255,255,0.25); margin-top: 4px; }
.ts-pill-name { min-width: 0; }
#page-swap .ts-pop-btn { flex-shrink: 0; }

@media (max-width: 768px) {
    .swap-page-layout { padding: 14px 14px 24px; max-width: none; }
    .swap-page-head { flex-direction: column; align-items: flex-start; gap: 6px; }
    .swap-page-sub { font-size: 11px; }
    #page-swap .ts-amt-input { font-size: 19px; }
}

/* ---- Terminal price up/dn coloring ---- */
.tc-price.up { color: #3E8BFF; }
.tc-price.dn { color: #FF4D6A; }

/* ===== PERPS MOBILE: full-screen chart, scroll down to order side ===== */
@media (max-width: 768px) {
    #page-perps.active {
        overflow-y: auto;
        overflow-x: hidden;
        padding: 0;
        gap: 0;
    }
    #page-perps.active .perps-layout {
        display: flex;
        flex-direction: column;
        gap: 12px;
        height: auto;
        min-height: 0;
        background: transparent;
        flex: none;
    }
    #page-perps.active .perps-layout > * {
        flex: 0 0 auto;
    }
    #page-perps.active .perps-left {
        overflow: visible;
        min-height: 0;
        padding: 0 0 12px;
    }
    #page-perps.active .perps-right {
        overflow: visible;
        flex: 0 0 auto;
        width: 100%;
        padding: 0 12px 24px;
        border-top: none;
        border-left: none;
        background: transparent;
    }
    #page-perps.active .perps-header-bar {
        flex: 0 0 auto;
        margin: 0 12px;
        padding: 12px 14px;
        gap: 8px;
    }
    #page-perps.active .perps-pair-selector { margin-bottom: 6px; }
    #page-perps.active .perps-stats-row { display: none; }
    #page-perps.active .perps-price-info { font-size: 17px; line-height: 1.2; }
    #page-perps.active .perps-chart-area {
        min-height: 0;
        height: auto;
        gap: 0;
        margin: 0 12px;
    }
    #page-perps.active .perps-chart {
        flex: none;
        height: auto;
        min-height: 0;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
    }
    #page-perps.active .chart-placeholder { flex: none; }
    #page-perps.active .perps-chart .chart-canvas {
        flex: none;
        height: calc(100vh - 205px) !important;
        min-height: 0;
    }
    #page-perps.active .perps-orderbook { display: none; }
    #page-perps.active .perps-positions { display: none; }
    #page-perps.active .perps-order-form { padding: 18px; }
}

/* ===== PEOPLE / TOP TRADERS ===== */
.trade-tabs {
    display: flex;
    gap: 8px;
    padding: 14px 16px 0;
    max-width: 1480px;
    margin: 0 auto;
    width: 100%;
}
.trade-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border: 1px solid rgba(255,255,255,0.09);
    background: rgba(255,255,255,0.03);
    color: #8A93A6;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all .15s ease;
}
.trade-tab:hover { background: rgba(255,255,255,0.06); color: #fff; }
.trade-tab.active { background: #1A2332; border-color: rgba(62,139,255,0.35); color: #fff; }
@media (max-width: 768px) {
    #page-trade .trade-tabs { padding: 10px 12px 0; }
    .trade-tab { padding: 8px 14px; font-size: 12px; }
}

.people-layout {
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}
.people-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.people-header h2 { font-size: 20px; font-weight: 700; margin: 0; }
.people-sub { font-size: 13px; color: #8A93A6; font-weight: 500; }
.people-desc { font-size: 12px; color: rgba(255,255,255,0.4); margin: 6px 0 0; max-width: 520px; line-height: 1.5; }
.people-search input {
    width: 260px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.09);
    background: rgba(255,255,255,0.04);
    color: #fff;
    font-size: 12px;
    outline: none;
}
.people-search input:focus { border-color: rgba(62,139,255,0.5); }

.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.people-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 14px;
    cursor: pointer;
    transition: all .15s ease;
    position: relative;
}
.people-card:hover { background: rgba(255,255,255,0.05); border-color: rgba(62,139,255,0.35); transform: translateY(-1px); }
.pc-top { display: flex; align-items: center; gap: 10px; }
.pc-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 15px; color: #fff; flex-shrink: 0;
}
.pc-avatar span { font-size: 18px; }
.pc-name { font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-handle { font-size: 11px; color: #8A93A6; }
.pc-pos-count { font-size: 10px; color: rgba(255,255,255,0.45); margin-top: 2px; }
.pc-stats {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-top: 12px; padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.pc-chip {
    padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 600;
    background: rgba(255,255,255,0.05); color: #B8C0CC;
}
.pc-chip.win { background: rgba(46,189,133,0.12); color: #2EBD85; }
.pc-chip.pnl-pos { background: rgba(46,189,133,0.12); color: #2EBD85; }
.pc-chip.pnl-neg { background: rgba(255,77,106,0.12); color: #FF4D6A; }
.pc-hot {
    position: absolute; top: 12px; right: 12px;
    font-size: 10px; font-weight: 700; color: #2EBD85;
    background: rgba(46,189,133,0.12);
    padding: 3px 7px; border-radius: 6px;
    animation: pcPulse 1.4s ease-in-out infinite;
}
@keyframes pcPulse { 0%,100% {opacity: 1;} 50% {opacity: .45;} }
.pc-last { font-size: 10px; color: rgba(255,255,255,0.4); margin-top: 8px; }
.pc-followed { font-size: 10px; color: #3E8BFF; margin-top: 2px; }

.people-profile {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 16px;
}
.pp-top { margin-bottom: 12px; }
.pp-back {
    background: none; border: none; color: #8A93A6; font-size: 12px; cursor: pointer; padding: 4px 0;
}
.pp-back:hover { color: #fff; }
.pp-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pp-avatar {
    width: 56px; height: 56px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid rgba(255,255,255,0.12);
    color: #fff; font-weight: 800; font-size: 20px; flex-shrink: 0;
}
.pp-avatar span { font-size: 26px; }
.pp-identity { flex: 1; min-width: 200px; }
.pp-name { font-size: 17px; font-weight: 800; color: #fff; }
.pp-handle { font-size: 12px; color: #8A93A6; }
.pp-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pp-follow {
    padding: 8px 20px; border-radius: 10px; border: none;
    background: #3E8BFF; color: #fff; font-size: 13px; font-weight: 700; cursor: pointer;
    transition: all .15s ease;
}
.pp-follow.following { background: rgba(62,139,255,0.15); color: #3E8BFF; border: 1px solid rgba(62,139,255,0.4); }
.pp-overall {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin: 16px 0 6px;
}
.pp-ov-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 12px;
}
.pp-ov-lbl { font-size: 10px; color: #8A93A6; text-transform: uppercase; letter-spacing: 0.5px; }
.pp-ov-val { font-size: 16px; font-weight: 800; color: #fff; margin-top: 4px; }
.pp-ov-val.pos { color: #2EBD85; }
.pp-ov-val.neg { color: #FF4D6A; }
.pp-section-title {
    font-size: 13px; font-weight: 700; color: #fff;
    margin: 20px 0 10px; padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.pp-positions-wrap { overflow-x: auto; }
.pp-table { min-width: 820px; }
.pp-table td { font-size: 11px; }
.pp-table .pos-pnl.pos { color: #2EBD85; font-weight: 700; }
.pp-table .pos-pnl.neg { color: #FF4D6A; font-weight: 700; }
.pp-history { display: flex; flex-direction: column; gap: 8px; max-height: 560px; overflow-y: auto; }
.pp-ev {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    flex-wrap: wrap;
}
.pp-ev .pe-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 15px; }
.pe-side { font-size: 10px; font-weight: 800; border-radius: 5px; padding: 2px 7px; text-transform: uppercase; }
.pe-side.buy { background: rgba(46,189,133,0.12); color: #2EBD85; }
.pe-side.sell { background: rgba(255,77,106,0.12); color: #FF4D6A; }
.pe-main { flex: 1; min-width: 180px; }
.pe-sym { font-size: 12px; font-weight: 700; color: #fff; }
.pe-meta { font-size: 11px; color: #8A93A6; margin-top: 2px; }
.pe-right { text-align: right; }
.pe-usd { font-size: 12px; font-weight: 700; color: #fff; }
.pe-pnl { font-size: 11px; font-weight: 700; }
.pe-pnl.pos { color: #2EBD85; }
.pe-pnl.neg { color: #FF4D6A; }
.pe-time { font-size: 10px; color: rgba(255,255,255,0.4); }
@media (max-width: 768px) {
    .people-layout { padding: 14px 12px 40px; }
    .people-header { flex-direction: column; }
    .people-search input { width: 100%; }
    .people-grid { grid-template-columns: 1fr; }
    .pp-head { gap: 10px; }
    .pp-follow { padding: 8px 14px; font-size: 12px; }
}
